aclocal.m4 revision 3da084b3
13da084b3Smrg# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
23da084b3Smrg
33da084b3Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
43da084b3Smrg# 2005  Free Software Foundation, Inc.
53da084b3Smrg# This file is free software; the Free Software Foundation
63da084b3Smrg# gives unlimited permission to copy and/or distribute it,
73da084b3Smrg# with or without modifications, as long as this notice is preserved.
83da084b3Smrg
93da084b3Smrg# This program is distributed in the hope that it will be useful,
103da084b3Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
113da084b3Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
123da084b3Smrg# PARTICULAR PURPOSE.
133da084b3Smrg
143da084b3Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
153da084b3Smrg
163da084b3Smrg# serial 48 Debian 1.5.22-4 AC_PROG_LIBTOOL
173da084b3Smrg
183da084b3Smrg
193da084b3Smrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
203da084b3Smrg# -----------------------------------------------------------
213da084b3Smrg# If this macro is not defined by Autoconf, define it here.
223da084b3Smrgm4_ifdef([AC_PROVIDE_IFELSE],
233da084b3Smrg         [],
243da084b3Smrg         [m4_define([AC_PROVIDE_IFELSE],
253da084b3Smrg	         [m4_ifdef([AC_PROVIDE_$1],
263da084b3Smrg		           [$2], [$3])])])
273da084b3Smrg
283da084b3Smrg
293da084b3Smrg# AC_PROG_LIBTOOL
303da084b3Smrg# ---------------
313da084b3SmrgAC_DEFUN([AC_PROG_LIBTOOL],
323da084b3Smrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
333da084b3Smrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
343da084b3Smrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
353da084b3Smrg  AC_PROVIDE_IFELSE([AC_PROG_CXX],
363da084b3Smrg    [AC_LIBTOOL_CXX],
373da084b3Smrg    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
383da084b3Smrg  ])])
393da084b3Smrgdnl And a similar setup for Fortran 77 support
403da084b3Smrg  AC_PROVIDE_IFELSE([AC_PROG_F77],
413da084b3Smrg    [AC_LIBTOOL_F77],
423da084b3Smrg    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
433da084b3Smrg])])
443da084b3Smrg
453da084b3Smrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
463da084b3Smrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
473da084b3Smrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
483da084b3Smrg  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
493da084b3Smrg    [AC_LIBTOOL_GCJ],
503da084b3Smrg    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
513da084b3Smrg      [AC_LIBTOOL_GCJ],
523da084b3Smrg      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
533da084b3Smrg	[AC_LIBTOOL_GCJ],
543da084b3Smrg      [ifdef([AC_PROG_GCJ],
553da084b3Smrg	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
563da084b3Smrg       ifdef([A][M_PROG_GCJ],
573da084b3Smrg	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
583da084b3Smrg       ifdef([LT_AC_PROG_GCJ],
593da084b3Smrg	     [define([LT_AC_PROG_GCJ],
603da084b3Smrg		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
613da084b3Smrg])])# AC_PROG_LIBTOOL
623da084b3Smrg
633da084b3Smrg
643da084b3Smrg# _AC_PROG_LIBTOOL
653da084b3Smrg# ----------------
663da084b3SmrgAC_DEFUN([_AC_PROG_LIBTOOL],
673da084b3Smrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
683da084b3SmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
693da084b3SmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
703da084b3SmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
713da084b3Smrg
723da084b3Smrg# This can be used to rebuild libtool when needed
733da084b3SmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
743da084b3Smrg
753da084b3Smrg# Always use our own libtool.
763da084b3SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
773da084b3SmrgAC_SUBST(LIBTOOL)dnl
783da084b3Smrg
793da084b3Smrg# Prevent multiple expansion
803da084b3Smrgdefine([AC_PROG_LIBTOOL], [])
813da084b3Smrg])# _AC_PROG_LIBTOOL
823da084b3Smrg
833da084b3Smrg
843da084b3Smrg# AC_LIBTOOL_SETUP
853da084b3Smrg# ----------------
863da084b3SmrgAC_DEFUN([AC_LIBTOOL_SETUP],
873da084b3Smrg[AC_PREREQ(2.50)dnl
883da084b3SmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl
893da084b3SmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl
903da084b3SmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
913da084b3SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
923da084b3SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
933da084b3SmrgAC_REQUIRE([AC_PROG_CC])dnl
943da084b3SmrgAC_REQUIRE([AC_PROG_LD])dnl
953da084b3SmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
963da084b3SmrgAC_REQUIRE([AC_PROG_NM])dnl
973da084b3Smrg
983da084b3SmrgAC_REQUIRE([AC_PROG_LN_S])dnl
993da084b3SmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
1003da084b3Smrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
1013da084b3SmrgAC_REQUIRE([AC_OBJEXT])dnl
1023da084b3SmrgAC_REQUIRE([AC_EXEEXT])dnl
1033da084b3Smrgdnl
1043da084b3Smrg
1053da084b3SmrgAC_LIBTOOL_SYS_MAX_CMD_LEN
1063da084b3SmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1073da084b3SmrgAC_LIBTOOL_OBJDIR
1083da084b3Smrg
1093da084b3SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1103da084b3Smrg_LT_AC_PROG_ECHO_BACKSLASH
1113da084b3Smrg
1123da084b3Smrgcase $host_os in
1133da084b3Smrgaix3*)
1143da084b3Smrg  # AIX sometimes has problems with the GCC collect2 program.  For some
1153da084b3Smrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
1163da084b3Smrg  # vanish in a puff of smoke.
1173da084b3Smrg  if test "X${COLLECT_NAMES+set}" != Xset; then
1183da084b3Smrg    COLLECT_NAMES=
1193da084b3Smrg    export COLLECT_NAMES
1203da084b3Smrg  fi
1213da084b3Smrg  ;;
1223da084b3Smrgesac
1233da084b3Smrg
1243da084b3Smrg# Sed substitution that helps us do robust quoting.  It backslashifies
1253da084b3Smrg# metacharacters that are still active within double-quoted strings.
1263da084b3SmrgXsed='sed -e 1s/^X//'
1273da084b3Smrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
1283da084b3Smrg
1293da084b3Smrg# Same as above, but do not quote variable references.
1303da084b3Smrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
1313da084b3Smrg
1323da084b3Smrg# Sed substitution to delay expansion of an escaped shell variable in a
1333da084b3Smrg# double_quote_subst'ed string.
1343da084b3Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1353da084b3Smrg
1363da084b3Smrg# Sed substitution to avoid accidental globbing in evaled expressions
1373da084b3Smrgno_glob_subst='s/\*/\\\*/g'
1383da084b3Smrg
1393da084b3Smrg# Constants:
1403da084b3Smrgrm="rm -f"
1413da084b3Smrg
1423da084b3Smrg# Global variables:
1433da084b3Smrgdefault_ofile=libtool
1443da084b3Smrgcan_build_shared=yes
1453da084b3Smrg
1463da084b3Smrg# All known linkers require a `.a' archive for static linking (except MSVC,
1473da084b3Smrg# which needs '.lib').
1483da084b3Smrglibext=a
1493da084b3Smrgltmain="$ac_aux_dir/ltmain.sh"
1503da084b3Smrgofile="$default_ofile"
1513da084b3Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld"
1523da084b3Smrg
1533da084b3SmrgAC_CHECK_TOOL(AR, ar, false)
1543da084b3SmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
1553da084b3SmrgAC_CHECK_TOOL(STRIP, strip, :)
1563da084b3Smrg
1573da084b3Smrgold_CC="$CC"
1583da084b3Smrgold_CFLAGS="$CFLAGS"
1593da084b3Smrg
1603da084b3Smrg# Set sane defaults for various variables
1613da084b3Smrgtest -z "$AR" && AR=ar
1623da084b3Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru
1633da084b3Smrgtest -z "$AS" && AS=as
1643da084b3Smrgtest -z "$CC" && CC=cc
1653da084b3Smrgtest -z "$LTCC" && LTCC=$CC
1663da084b3Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1673da084b3Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
1683da084b3Smrgtest -z "$LD" && LD=ld
1693da084b3Smrgtest -z "$LN_S" && LN_S="ln -s"
1703da084b3Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
1713da084b3Smrgtest -z "$NM" && NM=nm
1723da084b3Smrgtest -z "$SED" && SED=sed
1733da084b3Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump
1743da084b3Smrgtest -z "$RANLIB" && RANLIB=:
1753da084b3Smrgtest -z "$STRIP" && STRIP=:
1763da084b3Smrgtest -z "$ac_objext" && ac_objext=o
1773da084b3Smrg
1783da084b3Smrg# Determine commands to create old-style static archives.
1793da084b3Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1803da084b3Smrgold_postinstall_cmds='chmod 644 $oldlib'
1813da084b3Smrgold_postuninstall_cmds=
1823da084b3Smrg
1833da084b3Smrgif test -n "$RANLIB"; then
1843da084b3Smrg  case $host_os in
1853da084b3Smrg  openbsd*)
1863da084b3Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1873da084b3Smrg    ;;
1883da084b3Smrg  *)
1893da084b3Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1903da084b3Smrg    ;;
1913da084b3Smrg  esac
1923da084b3Smrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1933da084b3Smrgfi
1943da084b3Smrg
1953da084b3Smrg_LT_CC_BASENAME([$compiler])
1963da084b3Smrg
1973da084b3Smrg# Only perform the check for file, if the check method requires it
1983da084b3Smrgcase $deplibs_check_method in
1993da084b3Smrgfile_magic*)
2003da084b3Smrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
2013da084b3Smrg    AC_PATH_MAGIC
2023da084b3Smrg  fi
2033da084b3Smrg  ;;
2043da084b3Smrgesac
2053da084b3Smrg
2063da084b3SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
2073da084b3SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
2083da084b3Smrgenable_win32_dll=yes, enable_win32_dll=no)
2093da084b3Smrg
2103da084b3SmrgAC_ARG_ENABLE([libtool-lock],
2113da084b3Smrg    [AC_HELP_STRING([--disable-libtool-lock],
2123da084b3Smrg	[avoid locking (might break parallel builds)])])
2133da084b3Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2143da084b3Smrg
2153da084b3SmrgAC_ARG_WITH([pic],
2163da084b3Smrg    [AC_HELP_STRING([--with-pic],
2173da084b3Smrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
2183da084b3Smrg    [pic_mode="$withval"],
2193da084b3Smrg    [pic_mode=default])
2203da084b3Smrgtest -z "$pic_mode" && pic_mode=default
2213da084b3Smrg
2223da084b3Smrg# Use C for the default configuration in the libtool script
2233da084b3Smrgtagname=
2243da084b3SmrgAC_LIBTOOL_LANG_C_CONFIG
2253da084b3Smrg_LT_AC_TAGCONFIG
2263da084b3Smrg])# AC_LIBTOOL_SETUP
2273da084b3Smrg
2283da084b3Smrg
2293da084b3Smrg# _LT_AC_SYS_COMPILER
2303da084b3Smrg# -------------------
2313da084b3SmrgAC_DEFUN([_LT_AC_SYS_COMPILER],
2323da084b3Smrg[AC_REQUIRE([AC_PROG_CC])dnl
2333da084b3Smrg
2343da084b3Smrg# If no C compiler was specified, use CC.
2353da084b3SmrgLTCC=${LTCC-"$CC"}
2363da084b3Smrg
2373da084b3Smrg# If no C compiler flags were specified, use CFLAGS.
2383da084b3SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
2393da084b3Smrg
2403da084b3Smrg# Allow CC to be a program name with arguments.
2413da084b3Smrgcompiler=$CC
2423da084b3Smrg])# _LT_AC_SYS_COMPILER
2433da084b3Smrg
2443da084b3Smrg
2453da084b3Smrg# _LT_CC_BASENAME(CC)
2463da084b3Smrg# -------------------
2473da084b3Smrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
2483da084b3SmrgAC_DEFUN([_LT_CC_BASENAME],
2493da084b3Smrg[for cc_temp in $1""; do
2503da084b3Smrg  case $cc_temp in
2513da084b3Smrg    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
2523da084b3Smrg    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
2533da084b3Smrg    \-*) ;;
2543da084b3Smrg    *) break;;
2553da084b3Smrg  esac
2563da084b3Smrgdone
2573da084b3Smrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
2583da084b3Smrg])
2593da084b3Smrg
2603da084b3Smrg
2613da084b3Smrg# _LT_COMPILER_BOILERPLATE
2623da084b3Smrg# ------------------------
2633da084b3Smrg# Check for compiler boilerplate output or warnings with
2643da084b3Smrg# the simple compiler test code.
2653da084b3SmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE],
2663da084b3Smrg[ac_outfile=conftest.$ac_objext
2673da084b3Smrgprintf "$lt_simple_compile_test_code" >conftest.$ac_ext
2683da084b3Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2693da084b3Smrg_lt_compiler_boilerplate=`cat conftest.err`
2703da084b3Smrg$rm conftest*
2713da084b3Smrg])# _LT_COMPILER_BOILERPLATE
2723da084b3Smrg
2733da084b3Smrg
2743da084b3Smrg# _LT_LINKER_BOILERPLATE
2753da084b3Smrg# ----------------------
2763da084b3Smrg# Check for linker boilerplate output or warnings with
2773da084b3Smrg# the simple link test code.
2783da084b3SmrgAC_DEFUN([_LT_LINKER_BOILERPLATE],
2793da084b3Smrg[ac_outfile=conftest.$ac_objext
2803da084b3Smrgprintf "$lt_simple_link_test_code" >conftest.$ac_ext
2813da084b3Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2823da084b3Smrg_lt_linker_boilerplate=`cat conftest.err`
2833da084b3Smrg$rm conftest*
2843da084b3Smrg])# _LT_LINKER_BOILERPLATE
2853da084b3Smrg
2863da084b3Smrg
2873da084b3Smrg# _LT_AC_SYS_LIBPATH_AIX
2883da084b3Smrg# ----------------------
2893da084b3Smrg# Links a minimal program and checks the executable
2903da084b3Smrg# for the system default hardcoded library path. In most cases,
2913da084b3Smrg# this is /usr/lib:/lib, but when the MPI compilers are used
2923da084b3Smrg# the location of the communication and MPI libs are included too.
2933da084b3Smrg# If we don't find anything, use the default library path according
2943da084b3Smrg# to the aix ld manual.
2953da084b3SmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
2963da084b3Smrg[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
2973da084b3Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
2983da084b3Smrg}'`
2993da084b3Smrg# Check for a 64-bit object if we didn't find anything.
3003da084b3Smrgif 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; }
3013da084b3Smrg}'`; fi],[])
3023da084b3Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
3033da084b3Smrg])# _LT_AC_SYS_LIBPATH_AIX
3043da084b3Smrg
3053da084b3Smrg
3063da084b3Smrg# _LT_AC_SHELL_INIT(ARG)
3073da084b3Smrg# ----------------------
3083da084b3SmrgAC_DEFUN([_LT_AC_SHELL_INIT],
3093da084b3Smrg[ifdef([AC_DIVERSION_NOTICE],
3103da084b3Smrg	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
3113da084b3Smrg	 [AC_DIVERT_PUSH(NOTICE)])
3123da084b3Smrg$1
3133da084b3SmrgAC_DIVERT_POP
3143da084b3Smrg])# _LT_AC_SHELL_INIT
3153da084b3Smrg
3163da084b3Smrg
3173da084b3Smrg# _LT_AC_PROG_ECHO_BACKSLASH
3183da084b3Smrg# --------------------------
3193da084b3Smrg# Add some code to the start of the generated configure script which
3203da084b3Smrg# will find an echo command which doesn't interpret backslashes.
3213da084b3SmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
3223da084b3Smrg[_LT_AC_SHELL_INIT([
3233da084b3Smrg# Check that we are running under the correct shell.
3243da084b3SmrgSHELL=${CONFIG_SHELL-/bin/sh}
3253da084b3Smrg
3263da084b3Smrgcase X$ECHO in
3273da084b3SmrgX*--fallback-echo)
3283da084b3Smrg  # Remove one level of quotation (which was required for Make).
3293da084b3Smrg  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
3303da084b3Smrg  ;;
3313da084b3Smrgesac
3323da084b3Smrg
3333da084b3Smrgecho=${ECHO-echo}
3343da084b3Smrgif test "X[$]1" = X--no-reexec; then
3353da084b3Smrg  # Discard the --no-reexec flag, and continue.
3363da084b3Smrg  shift
3373da084b3Smrgelif test "X[$]1" = X--fallback-echo; then
3383da084b3Smrg  # Avoid inline document here, it may be left over
3393da084b3Smrg  :
3403da084b3Smrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
3413da084b3Smrg  # Yippee, $echo works!
3423da084b3Smrg  :
3433da084b3Smrgelse
3443da084b3Smrg  # Restart under the correct shell.
3453da084b3Smrg  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
3463da084b3Smrgfi
3473da084b3Smrg
3483da084b3Smrgif test "X[$]1" = X--fallback-echo; then
3493da084b3Smrg  # used as fallback echo
3503da084b3Smrg  shift
3513da084b3Smrg  cat <<EOF
3523da084b3Smrg[$]*
3533da084b3SmrgEOF
3543da084b3Smrg  exit 0
3553da084b3Smrgfi
3563da084b3Smrg
3573da084b3Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
3583da084b3Smrg# if CDPATH is set.
3593da084b3Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
3603da084b3Smrg
3613da084b3Smrgif test -z "$ECHO"; then
3623da084b3Smrgif test "X${echo_test_string+set}" != Xset; then
3633da084b3Smrg# find a string as large as possible, as long as the shell can cope with it
3643da084b3Smrg  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
3653da084b3Smrg    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
3663da084b3Smrg    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
3673da084b3Smrg       echo_test_string=`eval $cmd` &&
3683da084b3Smrg       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
3693da084b3Smrg    then
3703da084b3Smrg      break
3713da084b3Smrg    fi
3723da084b3Smrg  done
3733da084b3Smrgfi
3743da084b3Smrg
3753da084b3Smrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
3763da084b3Smrg   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
3773da084b3Smrg   test "X$echo_testing_string" = "X$echo_test_string"; then
3783da084b3Smrg  :
3793da084b3Smrgelse
3803da084b3Smrg  # The Solaris, AIX, and Digital Unix default echo programs unquote
3813da084b3Smrg  # backslashes.  This makes it impossible to quote backslashes using
3823da084b3Smrg  #   echo "$something" | sed 's/\\/\\\\/g'
3833da084b3Smrg  #
3843da084b3Smrg  # So, first we look for a working echo in the user's PATH.
3853da084b3Smrg
3863da084b3Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3873da084b3Smrg  for dir in $PATH /usr/ucb; do
3883da084b3Smrg    IFS="$lt_save_ifs"
3893da084b3Smrg    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
3903da084b3Smrg       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
3913da084b3Smrg       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
3923da084b3Smrg       test "X$echo_testing_string" = "X$echo_test_string"; then
3933da084b3Smrg      echo="$dir/echo"
3943da084b3Smrg      break
3953da084b3Smrg    fi
3963da084b3Smrg  done
3973da084b3Smrg  IFS="$lt_save_ifs"
3983da084b3Smrg
3993da084b3Smrg  if test "X$echo" = Xecho; then
4003da084b3Smrg    # We didn't find a better echo, so look for alternatives.
4013da084b3Smrg    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
4023da084b3Smrg       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
4033da084b3Smrg       test "X$echo_testing_string" = "X$echo_test_string"; then
4043da084b3Smrg      # This shell has a builtin print -r that does the trick.
4053da084b3Smrg      echo='print -r'
4063da084b3Smrg    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
4073da084b3Smrg	 test "X$CONFIG_SHELL" != X/bin/ksh; then
4083da084b3Smrg      # If we have ksh, try running configure again with it.
4093da084b3Smrg      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
4103da084b3Smrg      export ORIGINAL_CONFIG_SHELL
4113da084b3Smrg      CONFIG_SHELL=/bin/ksh
4123da084b3Smrg      export CONFIG_SHELL
4133da084b3Smrg      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
4143da084b3Smrg    else
4153da084b3Smrg      # Try using printf.
4163da084b3Smrg      echo='printf %s\n'
4173da084b3Smrg      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
4183da084b3Smrg	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
4193da084b3Smrg	 test "X$echo_testing_string" = "X$echo_test_string"; then
4203da084b3Smrg	# Cool, printf works
4213da084b3Smrg	:
4223da084b3Smrg      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
4233da084b3Smrg	   test "X$echo_testing_string" = 'X\t' &&
4243da084b3Smrg	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
4253da084b3Smrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
4263da084b3Smrg	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
4273da084b3Smrg	export CONFIG_SHELL
4283da084b3Smrg	SHELL="$CONFIG_SHELL"
4293da084b3Smrg	export SHELL
4303da084b3Smrg	echo="$CONFIG_SHELL [$]0 --fallback-echo"
4313da084b3Smrg      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
4323da084b3Smrg	   test "X$echo_testing_string" = 'X\t' &&
4333da084b3Smrg	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
4343da084b3Smrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
4353da084b3Smrg	echo="$CONFIG_SHELL [$]0 --fallback-echo"
4363da084b3Smrg      else
4373da084b3Smrg	# maybe with a smaller string...
4383da084b3Smrg	prev=:
4393da084b3Smrg
4403da084b3Smrg	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
4413da084b3Smrg	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
4423da084b3Smrg	  then
4433da084b3Smrg	    break
4443da084b3Smrg	  fi
4453da084b3Smrg	  prev="$cmd"
4463da084b3Smrg	done
4473da084b3Smrg
4483da084b3Smrg	if test "$prev" != 'sed 50q "[$]0"'; then
4493da084b3Smrg	  echo_test_string=`eval $prev`
4503da084b3Smrg	  export echo_test_string
4513da084b3Smrg	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
4523da084b3Smrg	else
4533da084b3Smrg	  # Oops.  We lost completely, so just stick with echo.
4543da084b3Smrg	  echo=echo
4553da084b3Smrg	fi
4563da084b3Smrg      fi
4573da084b3Smrg    fi
4583da084b3Smrg  fi
4593da084b3Smrgfi
4603da084b3Smrgfi
4613da084b3Smrg
4623da084b3Smrg# Copy echo and quote the copy suitably for passing to libtool from
4633da084b3Smrg# the Makefile, instead of quoting the original, which is used later.
4643da084b3SmrgECHO=$echo
4653da084b3Smrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
4663da084b3Smrg   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
4673da084b3Smrgfi
4683da084b3Smrg
4693da084b3SmrgAC_SUBST(ECHO)
4703da084b3Smrg])])# _LT_AC_PROG_ECHO_BACKSLASH
4713da084b3Smrg
4723da084b3Smrg
4733da084b3Smrg# _LT_AC_LOCK
4743da084b3Smrg# -----------
4753da084b3SmrgAC_DEFUN([_LT_AC_LOCK],
4763da084b3Smrg[AC_ARG_ENABLE([libtool-lock],
4773da084b3Smrg    [AC_HELP_STRING([--disable-libtool-lock],
4783da084b3Smrg	[avoid locking (might break parallel builds)])])
4793da084b3Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4803da084b3Smrg
4813da084b3Smrg# Some flags need to be propagated to the compiler or linker for good
4823da084b3Smrg# libtool support.
4833da084b3Smrgcase $host in
4843da084b3Smrgia64-*-hpux*)
4853da084b3Smrg  # Find out which ABI we are using.
4863da084b3Smrg  echo 'int i;' > conftest.$ac_ext
4873da084b3Smrg  if AC_TRY_EVAL(ac_compile); then
4883da084b3Smrg    case `/usr/bin/file conftest.$ac_objext` in
4893da084b3Smrg    *ELF-32*)
4903da084b3Smrg      HPUX_IA64_MODE="32"
4913da084b3Smrg      ;;
4923da084b3Smrg    *ELF-64*)
4933da084b3Smrg      HPUX_IA64_MODE="64"
4943da084b3Smrg      ;;
4953da084b3Smrg    esac
4963da084b3Smrg  fi
4973da084b3Smrg  rm -rf conftest*
4983da084b3Smrg  ;;
4993da084b3Smrg*-*-irix6*)
5003da084b3Smrg  # Find out which ABI we are using.
5013da084b3Smrg  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
5023da084b3Smrg  if AC_TRY_EVAL(ac_compile); then
5033da084b3Smrg   if test "$lt_cv_prog_gnu_ld" = yes; then
5043da084b3Smrg    case `/usr/bin/file conftest.$ac_objext` in
5053da084b3Smrg    *32-bit*)
5063da084b3Smrg      LD="${LD-ld} -melf32bsmip"
5073da084b3Smrg      ;;
5083da084b3Smrg    *N32*)
5093da084b3Smrg      LD="${LD-ld} -melf32bmipn32"
5103da084b3Smrg      ;;
5113da084b3Smrg    *64-bit*)
5123da084b3Smrg      LD="${LD-ld} -melf64bmip"
5133da084b3Smrg      ;;
5143da084b3Smrg    esac
5153da084b3Smrg   else
5163da084b3Smrg    case `/usr/bin/file conftest.$ac_objext` in
5173da084b3Smrg    *32-bit*)
5183da084b3Smrg      LD="${LD-ld} -32"
5193da084b3Smrg      ;;
5203da084b3Smrg    *N32*)
5213da084b3Smrg      LD="${LD-ld} -n32"
5223da084b3Smrg      ;;
5233da084b3Smrg    *64-bit*)
5243da084b3Smrg      LD="${LD-ld} -64"
5253da084b3Smrg      ;;
5263da084b3Smrg    esac
5273da084b3Smrg   fi
5283da084b3Smrg  fi
5293da084b3Smrg  rm -rf conftest*
5303da084b3Smrg  ;;
5313da084b3Smrg
5323da084b3Smrgx86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
5333da084b3Smrg  # Find out which ABI we are using.
5343da084b3Smrg  echo 'int i;' > conftest.$ac_ext
5353da084b3Smrg  if AC_TRY_EVAL(ac_compile); then
5363da084b3Smrg    case `/usr/bin/file conftest.o` in
5373da084b3Smrg    *32-bit*)
5383da084b3Smrg      case $host in
5393da084b3Smrg        x86_64-*linux*)
5403da084b3Smrg          LD="${LD-ld} -m elf_i386"
5413da084b3Smrg          ;;
5423da084b3Smrg        ppc64-*linux*|powerpc64-*linux*)
5433da084b3Smrg          LD="${LD-ld} -m elf32ppclinux"
5443da084b3Smrg          ;;
5453da084b3Smrg        s390x-*linux*)
5463da084b3Smrg          LD="${LD-ld} -m elf_s390"
5473da084b3Smrg          ;;
5483da084b3Smrg        sparc64-*linux*)
5493da084b3Smrg          LD="${LD-ld} -m elf32_sparc"
5503da084b3Smrg          ;;
5513da084b3Smrg      esac
5523da084b3Smrg      ;;
5533da084b3Smrg    *64-bit*)
5543da084b3Smrg      case $host in
5553da084b3Smrg        x86_64-*linux*)
5563da084b3Smrg          LD="${LD-ld} -m elf_x86_64"
5573da084b3Smrg          ;;
5583da084b3Smrg        ppc*-*linux*|powerpc*-*linux*)
5593da084b3Smrg          LD="${LD-ld} -m elf64ppc"
5603da084b3Smrg          ;;
5613da084b3Smrg        s390*-*linux*)
5623da084b3Smrg          LD="${LD-ld} -m elf64_s390"
5633da084b3Smrg          ;;
5643da084b3Smrg        sparc*-*linux*)
5653da084b3Smrg          LD="${LD-ld} -m elf64_sparc"
5663da084b3Smrg          ;;
5673da084b3Smrg      esac
5683da084b3Smrg      ;;
5693da084b3Smrg    esac
5703da084b3Smrg  fi
5713da084b3Smrg  rm -rf conftest*
5723da084b3Smrg  ;;
5733da084b3Smrg
5743da084b3Smrg*-*-sco3.2v5*)
5753da084b3Smrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
5763da084b3Smrg  SAVE_CFLAGS="$CFLAGS"
5773da084b3Smrg  CFLAGS="$CFLAGS -belf"
5783da084b3Smrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
5793da084b3Smrg    [AC_LANG_PUSH(C)
5803da084b3Smrg     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
5813da084b3Smrg     AC_LANG_POP])
5823da084b3Smrg  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
5833da084b3Smrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
5843da084b3Smrg    CFLAGS="$SAVE_CFLAGS"
5853da084b3Smrg  fi
5863da084b3Smrg  ;;
5873da084b3Smrgsparc*-*solaris*)
5883da084b3Smrg  # Find out which ABI we are using.
5893da084b3Smrg  echo 'int i;' > conftest.$ac_ext
5903da084b3Smrg  if AC_TRY_EVAL(ac_compile); then
5913da084b3Smrg    case `/usr/bin/file conftest.o` in
5923da084b3Smrg    *64-bit*)
5933da084b3Smrg      case $lt_cv_prog_gnu_ld in
5943da084b3Smrg      yes*) LD="${LD-ld} -m elf64_sparc" ;;
5953da084b3Smrg      *)    LD="${LD-ld} -64" ;;
5963da084b3Smrg      esac
5973da084b3Smrg      ;;
5983da084b3Smrg    esac
5993da084b3Smrg  fi
6003da084b3Smrg  rm -rf conftest*
6013da084b3Smrg  ;;
6023da084b3Smrg
6033da084b3SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
6043da084b3Smrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
6053da084b3Smrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
6063da084b3Smrg  AC_CHECK_TOOL(AS, as, false)
6073da084b3Smrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
6083da084b3Smrg  ;;
6093da084b3Smrg  ])
6103da084b3Smrgesac
6113da084b3Smrg
6123da084b3Smrgneed_locks="$enable_libtool_lock"
6133da084b3Smrg
6143da084b3Smrg])# _LT_AC_LOCK
6153da084b3Smrg
6163da084b3Smrg
6173da084b3Smrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
6183da084b3Smrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
6193da084b3Smrg# ----------------------------------------------------------------
6203da084b3Smrg# Check whether the given compiler option works
6213da084b3SmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
6223da084b3Smrg[AC_REQUIRE([LT_AC_PROG_SED])
6233da084b3SmrgAC_CACHE_CHECK([$1], [$2],
6243da084b3Smrg  [$2=no
6253da084b3Smrg  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
6263da084b3Smrg   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6273da084b3Smrg   lt_compiler_flag="$3"
6283da084b3Smrg   # Insert the option either (1) after the last *FLAGS variable, or
6293da084b3Smrg   # (2) before a word containing "conftest.", or (3) at the end.
6303da084b3Smrg   # Note that $ac_compile itself does not contain backslashes and begins
6313da084b3Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
6323da084b3Smrg   # The option is referenced via a variable to avoid confusing sed.
6333da084b3Smrg   lt_compile=`echo "$ac_compile" | $SED \
6343da084b3Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
6353da084b3Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
6363da084b3Smrg   -e 's:$: $lt_compiler_flag:'`
6373da084b3Smrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
6383da084b3Smrg   (eval "$lt_compile" 2>conftest.err)
6393da084b3Smrg   ac_status=$?
6403da084b3Smrg   cat conftest.err >&AS_MESSAGE_LOG_FD
6413da084b3Smrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
6423da084b3Smrg   if (exit $ac_status) && test -s "$ac_outfile"; then
6433da084b3Smrg     # The compiler can only warn and ignore the option if not recognized
6443da084b3Smrg     # So say no if there are warnings other than the usual output.
6453da084b3Smrg     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
6463da084b3Smrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
6473da084b3Smrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
6483da084b3Smrg       $2=yes
6493da084b3Smrg     fi
6503da084b3Smrg   fi
6513da084b3Smrg   $rm conftest*
6523da084b3Smrg])
6533da084b3Smrg
6543da084b3Smrgif test x"[$]$2" = xyes; then
6553da084b3Smrg    ifelse([$5], , :, [$5])
6563da084b3Smrgelse
6573da084b3Smrg    ifelse([$6], , :, [$6])
6583da084b3Smrgfi
6593da084b3Smrg])# AC_LIBTOOL_COMPILER_OPTION
6603da084b3Smrg
6613da084b3Smrg
6623da084b3Smrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
6633da084b3Smrg#                          [ACTION-SUCCESS], [ACTION-FAILURE])
6643da084b3Smrg# ------------------------------------------------------------
6653da084b3Smrg# Check whether the given compiler option works
6663da084b3SmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
6673da084b3Smrg[AC_CACHE_CHECK([$1], [$2],
6683da084b3Smrg  [$2=no
6693da084b3Smrg   save_LDFLAGS="$LDFLAGS"
6703da084b3Smrg   LDFLAGS="$LDFLAGS $3"
6713da084b3Smrg   printf "$lt_simple_link_test_code" > conftest.$ac_ext
6723da084b3Smrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
6733da084b3Smrg     # The linker can only warn and ignore the option if not recognized
6743da084b3Smrg     # So say no if there are warnings
6753da084b3Smrg     if test -s conftest.err; then
6763da084b3Smrg       # Append any errors to the config.log.
6773da084b3Smrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
6783da084b3Smrg       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
6793da084b3Smrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
6803da084b3Smrg       if diff conftest.exp conftest.er2 >/dev/null; then
6813da084b3Smrg         $2=yes
6823da084b3Smrg       fi
6833da084b3Smrg     else
6843da084b3Smrg       $2=yes
6853da084b3Smrg     fi
6863da084b3Smrg   fi
6873da084b3Smrg   $rm conftest*
6883da084b3Smrg   LDFLAGS="$save_LDFLAGS"
6893da084b3Smrg])
6903da084b3Smrg
6913da084b3Smrgif test x"[$]$2" = xyes; then
6923da084b3Smrg    ifelse([$4], , :, [$4])
6933da084b3Smrgelse
6943da084b3Smrg    ifelse([$5], , :, [$5])
6953da084b3Smrgfi
6963da084b3Smrg])# AC_LIBTOOL_LINKER_OPTION
6973da084b3Smrg
6983da084b3Smrg
6993da084b3Smrg# AC_LIBTOOL_SYS_MAX_CMD_LEN
7003da084b3Smrg# --------------------------
7013da084b3SmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
7023da084b3Smrg[# find the maximum length of command line arguments
7033da084b3SmrgAC_MSG_CHECKING([the maximum length of command line arguments])
7043da084b3SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
7053da084b3Smrg  i=0
7063da084b3Smrg  teststring="ABCD"
7073da084b3Smrg
7083da084b3Smrg  case $build_os in
7093da084b3Smrg  msdosdjgpp*)
7103da084b3Smrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
7113da084b3Smrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
7123da084b3Smrg    # during glob expansion).  Even if it were fixed, the result of this
7133da084b3Smrg    # check would be larger than it should be.
7143da084b3Smrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
7153da084b3Smrg    ;;
7163da084b3Smrg
7173da084b3Smrg  gnu*)
7183da084b3Smrg    # Under GNU Hurd, this test is not required because there is
7193da084b3Smrg    # no limit to the length of command line arguments.
7203da084b3Smrg    # Libtool will interpret -1 as no limit whatsoever
7213da084b3Smrg    lt_cv_sys_max_cmd_len=-1;
7223da084b3Smrg    ;;
7233da084b3Smrg
7243da084b3Smrg  cygwin* | mingw*)
7253da084b3Smrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
7263da084b3Smrg    # about 5 minutes as the teststring grows exponentially.
7273da084b3Smrg    # Worse, since 9x/ME are not pre-emptively multitasking,
7283da084b3Smrg    # you end up with a "frozen" computer, even though with patience
7293da084b3Smrg    # the test eventually succeeds (with a max line length of 256k).
7303da084b3Smrg    # Instead, let's just punt: use the minimum linelength reported by
7313da084b3Smrg    # all of the supported platforms: 8192 (on NT/2K/XP).
7323da084b3Smrg    lt_cv_sys_max_cmd_len=8192;
7333da084b3Smrg    ;;
7343da084b3Smrg
7353da084b3Smrg  amigaos*)
7363da084b3Smrg    # On AmigaOS with pdksh, this test takes hours, literally.
7373da084b3Smrg    # So we just punt and use a minimum line length of 8192.
7383da084b3Smrg    lt_cv_sys_max_cmd_len=8192;
7393da084b3Smrg    ;;
7403da084b3Smrg
7413da084b3Smrg  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
7423da084b3Smrg    # This has been around since 386BSD, at least.  Likely further.
7433da084b3Smrg    if test -x /sbin/sysctl; then
7443da084b3Smrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
7453da084b3Smrg    elif test -x /usr/sbin/sysctl; then
7463da084b3Smrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
7473da084b3Smrg    else
7483da084b3Smrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
7493da084b3Smrg    fi
7503da084b3Smrg    # And add a safety zone
7513da084b3Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7523da084b3Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7533da084b3Smrg    ;;
7543da084b3Smrg
7553da084b3Smrg  interix*)
7563da084b3Smrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
7573da084b3Smrg    lt_cv_sys_max_cmd_len=196608
7583da084b3Smrg    ;;
7593da084b3Smrg
7603da084b3Smrg  osf*)
7613da084b3Smrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
7623da084b3Smrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
7633da084b3Smrg    # nice to cause kernel panics so lets avoid the loop below.
7643da084b3Smrg    # First set a reasonable default.
7653da084b3Smrg    lt_cv_sys_max_cmd_len=16384
7663da084b3Smrg    #
7673da084b3Smrg    if test -x /sbin/sysconfig; then
7683da084b3Smrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
7693da084b3Smrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
7703da084b3Smrg      esac
7713da084b3Smrg    fi
7723da084b3Smrg    ;;
7733da084b3Smrg  sco3.2v5*)
7743da084b3Smrg    lt_cv_sys_max_cmd_len=102400
7753da084b3Smrg    ;;
7763da084b3Smrg  sysv5* | sco5v6* | sysv4.2uw2*)
7773da084b3Smrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
7783da084b3Smrg    if test -n "$kargmax"; then
7793da084b3Smrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ 	]]//'`
7803da084b3Smrg    else
7813da084b3Smrg      lt_cv_sys_max_cmd_len=32768
7823da084b3Smrg    fi
7833da084b3Smrg    ;;
7843da084b3Smrg  *)
7853da084b3Smrg    # If test is not a shell built-in, we'll probably end up computing a
7863da084b3Smrg    # maximum length that is only half of the actual maximum length, but
7873da084b3Smrg    # we can't tell.
7883da084b3Smrg    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
7893da084b3Smrg    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
7903da084b3Smrg	       = "XX$teststring") >/dev/null 2>&1 &&
7913da084b3Smrg	    new_result=`expr "X$teststring" : ".*" 2>&1` &&
7923da084b3Smrg	    lt_cv_sys_max_cmd_len=$new_result &&
7933da084b3Smrg	    test $i != 17 # 1/2 MB should be enough
7943da084b3Smrg    do
7953da084b3Smrg      i=`expr $i + 1`
7963da084b3Smrg      teststring=$teststring$teststring
7973da084b3Smrg    done
7983da084b3Smrg    teststring=
7993da084b3Smrg    # Add a significant safety factor because C++ compilers can tack on massive
8003da084b3Smrg    # amounts of additional arguments before passing them to the linker.
8013da084b3Smrg    # It appears as though 1/2 is a usable value.
8023da084b3Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
8033da084b3Smrg    ;;
8043da084b3Smrg  esac
8053da084b3Smrg])
8063da084b3Smrgif test -n $lt_cv_sys_max_cmd_len ; then
8073da084b3Smrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
8083da084b3Smrgelse
8093da084b3Smrg  AC_MSG_RESULT(none)
8103da084b3Smrgfi
8113da084b3Smrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN
8123da084b3Smrg
8133da084b3Smrg
8143da084b3Smrg# _LT_AC_CHECK_DLFCN
8153da084b3Smrg# ------------------
8163da084b3SmrgAC_DEFUN([_LT_AC_CHECK_DLFCN],
8173da084b3Smrg[AC_CHECK_HEADERS(dlfcn.h)dnl
8183da084b3Smrg])# _LT_AC_CHECK_DLFCN
8193da084b3Smrg
8203da084b3Smrg
8213da084b3Smrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
8223da084b3Smrg#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
8233da084b3Smrg# ---------------------------------------------------------------------
8243da084b3SmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
8253da084b3Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
8263da084b3Smrgif test "$cross_compiling" = yes; then :
8273da084b3Smrg  [$4]
8283da084b3Smrgelse
8293da084b3Smrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
8303da084b3Smrg  lt_status=$lt_dlunknown
8313da084b3Smrg  cat > conftest.$ac_ext <<EOF
8323da084b3Smrg[#line __oline__ "configure"
8333da084b3Smrg#include "confdefs.h"
8343da084b3Smrg
8353da084b3Smrg#if HAVE_DLFCN_H
8363da084b3Smrg#include <dlfcn.h>
8373da084b3Smrg#endif
8383da084b3Smrg
8393da084b3Smrg#include <stdio.h>
8403da084b3Smrg
8413da084b3Smrg#ifdef RTLD_GLOBAL
8423da084b3Smrg#  define LT_DLGLOBAL		RTLD_GLOBAL
8433da084b3Smrg#else
8443da084b3Smrg#  ifdef DL_GLOBAL
8453da084b3Smrg#    define LT_DLGLOBAL		DL_GLOBAL
8463da084b3Smrg#  else
8473da084b3Smrg#    define LT_DLGLOBAL		0
8483da084b3Smrg#  endif
8493da084b3Smrg#endif
8503da084b3Smrg
8513da084b3Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
8523da084b3Smrg   find out it does not work in some platform. */
8533da084b3Smrg#ifndef LT_DLLAZY_OR_NOW
8543da084b3Smrg#  ifdef RTLD_LAZY
8553da084b3Smrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
8563da084b3Smrg#  else
8573da084b3Smrg#    ifdef DL_LAZY
8583da084b3Smrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
8593da084b3Smrg#    else
8603da084b3Smrg#      ifdef RTLD_NOW
8613da084b3Smrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
8623da084b3Smrg#      else
8633da084b3Smrg#        ifdef DL_NOW
8643da084b3Smrg#          define LT_DLLAZY_OR_NOW	DL_NOW
8653da084b3Smrg#        else
8663da084b3Smrg#          define LT_DLLAZY_OR_NOW	0
8673da084b3Smrg#        endif
8683da084b3Smrg#      endif
8693da084b3Smrg#    endif
8703da084b3Smrg#  endif
8713da084b3Smrg#endif
8723da084b3Smrg
8733da084b3Smrg#ifdef __cplusplus
8743da084b3Smrgextern "C" void exit (int);
8753da084b3Smrg#endif
8763da084b3Smrg
8773da084b3Smrgvoid fnord() { int i=42;}
8783da084b3Smrgint main ()
8793da084b3Smrg{
8803da084b3Smrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
8813da084b3Smrg  int status = $lt_dlunknown;
8823da084b3Smrg
8833da084b3Smrg  if (self)
8843da084b3Smrg    {
8853da084b3Smrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
8863da084b3Smrg      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
8873da084b3Smrg      /* dlclose (self); */
8883da084b3Smrg    }
8893da084b3Smrg  else
8903da084b3Smrg    puts (dlerror ());
8913da084b3Smrg
8923da084b3Smrg    exit (status);
8933da084b3Smrg}]
8943da084b3SmrgEOF
8953da084b3Smrg  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
8963da084b3Smrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
8973da084b3Smrg    lt_status=$?
8983da084b3Smrg    case x$lt_status in
8993da084b3Smrg      x$lt_dlno_uscore) $1 ;;
9003da084b3Smrg      x$lt_dlneed_uscore) $2 ;;
9013da084b3Smrg      x$lt_dlunknown|x*) $3 ;;
9023da084b3Smrg    esac
9033da084b3Smrg  else :
9043da084b3Smrg    # compilation failed
9053da084b3Smrg    $3
9063da084b3Smrg  fi
9073da084b3Smrgfi
9083da084b3Smrgrm -fr conftest*
9093da084b3Smrg])# _LT_AC_TRY_DLOPEN_SELF
9103da084b3Smrg
9113da084b3Smrg
9123da084b3Smrg# AC_LIBTOOL_DLOPEN_SELF
9133da084b3Smrg# ----------------------
9143da084b3SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
9153da084b3Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
9163da084b3Smrgif test "x$enable_dlopen" != xyes; then
9173da084b3Smrg  enable_dlopen=unknown
9183da084b3Smrg  enable_dlopen_self=unknown
9193da084b3Smrg  enable_dlopen_self_static=unknown
9203da084b3Smrgelse
9213da084b3Smrg  lt_cv_dlopen=no
9223da084b3Smrg  lt_cv_dlopen_libs=
9233da084b3Smrg
9243da084b3Smrg  case $host_os in
9253da084b3Smrg  beos*)
9263da084b3Smrg    lt_cv_dlopen="load_add_on"
9273da084b3Smrg    lt_cv_dlopen_libs=
9283da084b3Smrg    lt_cv_dlopen_self=yes
9293da084b3Smrg    ;;
9303da084b3Smrg
9313da084b3Smrg  mingw* | pw32*)
9323da084b3Smrg    lt_cv_dlopen="LoadLibrary"
9333da084b3Smrg    lt_cv_dlopen_libs=
9343da084b3Smrg   ;;
9353da084b3Smrg
9363da084b3Smrg  cygwin*)
9373da084b3Smrg    lt_cv_dlopen="dlopen"
9383da084b3Smrg    lt_cv_dlopen_libs=
9393da084b3Smrg   ;;
9403da084b3Smrg
9413da084b3Smrg  darwin*)
9423da084b3Smrg  # if libdl is installed we need to link against it
9433da084b3Smrg    AC_CHECK_LIB([dl], [dlopen],
9443da084b3Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
9453da084b3Smrg    lt_cv_dlopen="dyld"
9463da084b3Smrg    lt_cv_dlopen_libs=
9473da084b3Smrg    lt_cv_dlopen_self=yes
9483da084b3Smrg    ])
9493da084b3Smrg   ;;
9503da084b3Smrg
9513da084b3Smrg  *)
9523da084b3Smrg    AC_CHECK_FUNC([shl_load],
9533da084b3Smrg	  [lt_cv_dlopen="shl_load"],
9543da084b3Smrg      [AC_CHECK_LIB([dld], [shl_load],
9553da084b3Smrg	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
9563da084b3Smrg	[AC_CHECK_FUNC([dlopen],
9573da084b3Smrg	      [lt_cv_dlopen="dlopen"],
9583da084b3Smrg	  [AC_CHECK_LIB([dl], [dlopen],
9593da084b3Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
9603da084b3Smrg	    [AC_CHECK_LIB([svld], [dlopen],
9613da084b3Smrg		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
9623da084b3Smrg	      [AC_CHECK_LIB([dld], [dld_link],
9633da084b3Smrg		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
9643da084b3Smrg	      ])
9653da084b3Smrg	    ])
9663da084b3Smrg	  ])
9673da084b3Smrg	])
9683da084b3Smrg      ])
9693da084b3Smrg    ;;
9703da084b3Smrg  esac
9713da084b3Smrg
9723da084b3Smrg  if test "x$lt_cv_dlopen" != xno; then
9733da084b3Smrg    enable_dlopen=yes
9743da084b3Smrg  else
9753da084b3Smrg    enable_dlopen=no
9763da084b3Smrg  fi
9773da084b3Smrg
9783da084b3Smrg  case $lt_cv_dlopen in
9793da084b3Smrg  dlopen)
9803da084b3Smrg    save_CPPFLAGS="$CPPFLAGS"
9813da084b3Smrg    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
9823da084b3Smrg
9833da084b3Smrg    save_LDFLAGS="$LDFLAGS"
9843da084b3Smrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
9853da084b3Smrg
9863da084b3Smrg    save_LIBS="$LIBS"
9873da084b3Smrg    LIBS="$lt_cv_dlopen_libs $LIBS"
9883da084b3Smrg
9893da084b3Smrg    AC_CACHE_CHECK([whether a program can dlopen itself],
9903da084b3Smrg	  lt_cv_dlopen_self, [dnl
9913da084b3Smrg	  _LT_AC_TRY_DLOPEN_SELF(
9923da084b3Smrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
9933da084b3Smrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
9943da084b3Smrg    ])
9953da084b3Smrg
9963da084b3Smrg    if test "x$lt_cv_dlopen_self" = xyes; then
9973da084b3Smrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
9983da084b3Smrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
9993da084b3Smrg    	  lt_cv_dlopen_self_static, [dnl
10003da084b3Smrg	  _LT_AC_TRY_DLOPEN_SELF(
10013da084b3Smrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
10023da084b3Smrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
10033da084b3Smrg      ])
10043da084b3Smrg    fi
10053da084b3Smrg
10063da084b3Smrg    CPPFLAGS="$save_CPPFLAGS"
10073da084b3Smrg    LDFLAGS="$save_LDFLAGS"
10083da084b3Smrg    LIBS="$save_LIBS"
10093da084b3Smrg    ;;
10103da084b3Smrg  esac
10113da084b3Smrg
10123da084b3Smrg  case $lt_cv_dlopen_self in
10133da084b3Smrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
10143da084b3Smrg  *) enable_dlopen_self=unknown ;;
10153da084b3Smrg  esac
10163da084b3Smrg
10173da084b3Smrg  case $lt_cv_dlopen_self_static in
10183da084b3Smrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
10193da084b3Smrg  *) enable_dlopen_self_static=unknown ;;
10203da084b3Smrg  esac
10213da084b3Smrgfi
10223da084b3Smrg])# AC_LIBTOOL_DLOPEN_SELF
10233da084b3Smrg
10243da084b3Smrg
10253da084b3Smrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
10263da084b3Smrg# ---------------------------------
10273da084b3Smrg# Check to see if options -c and -o are simultaneously supported by compiler
10283da084b3SmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
10293da084b3Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
10303da084b3SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
10313da084b3Smrg  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
10323da084b3Smrg  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
10333da084b3Smrg   $rm -r conftest 2>/dev/null
10343da084b3Smrg   mkdir conftest
10353da084b3Smrg   cd conftest
10363da084b3Smrg   mkdir out
10373da084b3Smrg   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
10383da084b3Smrg
10393da084b3Smrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
10403da084b3Smrg   # Insert the option either (1) after the last *FLAGS variable, or
10413da084b3Smrg   # (2) before a word containing "conftest.", or (3) at the end.
10423da084b3Smrg   # Note that $ac_compile itself does not contain backslashes and begins
10433da084b3Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
10443da084b3Smrg   lt_compile=`echo "$ac_compile" | $SED \
10453da084b3Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
10463da084b3Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
10473da084b3Smrg   -e 's:$: $lt_compiler_flag:'`
10483da084b3Smrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
10493da084b3Smrg   (eval "$lt_compile" 2>out/conftest.err)
10503da084b3Smrg   ac_status=$?
10513da084b3Smrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
10523da084b3Smrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
10533da084b3Smrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
10543da084b3Smrg   then
10553da084b3Smrg     # The compiler can only warn and ignore the option if not recognized
10563da084b3Smrg     # So say no if there are warnings
10573da084b3Smrg     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
10583da084b3Smrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
10593da084b3Smrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
10603da084b3Smrg       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
10613da084b3Smrg     fi
10623da084b3Smrg   fi
10633da084b3Smrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
10643da084b3Smrg   $rm conftest*
10653da084b3Smrg   # SGI C++ compiler will create directory out/ii_files/ for
10663da084b3Smrg   # template instantiation
10673da084b3Smrg   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
10683da084b3Smrg   $rm out/* && rmdir out
10693da084b3Smrg   cd ..
10703da084b3Smrg   rmdir conftest
10713da084b3Smrg   $rm conftest*
10723da084b3Smrg])
10733da084b3Smrg])# AC_LIBTOOL_PROG_CC_C_O
10743da084b3Smrg
10753da084b3Smrg
10763da084b3Smrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
10773da084b3Smrg# -----------------------------------------
10783da084b3Smrg# Check to see if we can do hard links to lock some files if needed
10793da084b3SmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
10803da084b3Smrg[AC_REQUIRE([_LT_AC_LOCK])dnl
10813da084b3Smrg
10823da084b3Smrghard_links="nottested"
10833da084b3Smrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
10843da084b3Smrg  # do not overwrite the value of need_locks provided by the user
10853da084b3Smrg  AC_MSG_CHECKING([if we can lock with hard links])
10863da084b3Smrg  hard_links=yes
10873da084b3Smrg  $rm conftest*
10883da084b3Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
10893da084b3Smrg  touch conftest.a
10903da084b3Smrg  ln conftest.a conftest.b 2>&5 || hard_links=no
10913da084b3Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
10923da084b3Smrg  AC_MSG_RESULT([$hard_links])
10933da084b3Smrg  if test "$hard_links" = no; then
10943da084b3Smrg    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
10953da084b3Smrg    need_locks=warn
10963da084b3Smrg  fi
10973da084b3Smrgelse
10983da084b3Smrg  need_locks=no
10993da084b3Smrgfi
11003da084b3Smrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
11013da084b3Smrg
11023da084b3Smrg
11033da084b3Smrg# AC_LIBTOOL_OBJDIR
11043da084b3Smrg# -----------------
11053da084b3SmrgAC_DEFUN([AC_LIBTOOL_OBJDIR],
11063da084b3Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
11073da084b3Smrg[rm -f .libs 2>/dev/null
11083da084b3Smrgmkdir .libs 2>/dev/null
11093da084b3Smrgif test -d .libs; then
11103da084b3Smrg  lt_cv_objdir=.libs
11113da084b3Smrgelse
11123da084b3Smrg  # MS-DOS does not allow filenames that begin with a dot.
11133da084b3Smrg  lt_cv_objdir=_libs
11143da084b3Smrgfi
11153da084b3Smrgrmdir .libs 2>/dev/null])
11163da084b3Smrgobjdir=$lt_cv_objdir
11173da084b3Smrg])# AC_LIBTOOL_OBJDIR
11183da084b3Smrg
11193da084b3Smrg
11203da084b3Smrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
11213da084b3Smrg# ----------------------------------------------
11223da084b3Smrg# Check hardcoding attributes.
11233da084b3SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
11243da084b3Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
11253da084b3Smrg_LT_AC_TAGVAR(hardcode_action, $1)=
11263da084b3Smrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
11273da084b3Smrg   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
11283da084b3Smrg   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
11293da084b3Smrg
11303da084b3Smrg  # We can hardcode non-existant directories.
11313da084b3Smrg  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
11323da084b3Smrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
11333da084b3Smrg     # have to relink, otherwise we might link with an installed library
11343da084b3Smrg     # when we should be linking with a yet-to-be-installed one
11353da084b3Smrg     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
11363da084b3Smrg     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
11373da084b3Smrg    # Linking always hardcodes the temporary library directory.
11383da084b3Smrg    _LT_AC_TAGVAR(hardcode_action, $1)=relink
11393da084b3Smrg  else
11403da084b3Smrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
11413da084b3Smrg    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
11423da084b3Smrg  fi
11433da084b3Smrgelse
11443da084b3Smrg  # We cannot hardcode anything, or else we can only hardcode existing
11453da084b3Smrg  # directories.
11463da084b3Smrg  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
11473da084b3Smrgfi
11483da084b3SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
11493da084b3Smrg
11503da084b3Smrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
11513da084b3Smrg  # Fast installation is not supported
11523da084b3Smrg  enable_fast_install=no
11533da084b3Smrgelif test "$shlibpath_overrides_runpath" = yes ||
11543da084b3Smrg     test "$enable_shared" = no; then
11553da084b3Smrg  # Fast installation is not necessary
11563da084b3Smrg  enable_fast_install=needless
11573da084b3Smrgfi
11583da084b3Smrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
11593da084b3Smrg
11603da084b3Smrg
11613da084b3Smrg# AC_LIBTOOL_SYS_LIB_STRIP
11623da084b3Smrg# ------------------------
11633da084b3SmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
11643da084b3Smrg[striplib=
11653da084b3Smrgold_striplib=
11663da084b3SmrgAC_MSG_CHECKING([whether stripping libraries is possible])
11673da084b3Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
11683da084b3Smrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
11693da084b3Smrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
11703da084b3Smrg  AC_MSG_RESULT([yes])
11713da084b3Smrgelse
11723da084b3Smrg# FIXME - insert some real tests, host_os isn't really good enough
11733da084b3Smrg  case $host_os in
11743da084b3Smrg   darwin*)
11753da084b3Smrg       if test -n "$STRIP" ; then
11763da084b3Smrg         striplib="$STRIP -x"
11773da084b3Smrg         AC_MSG_RESULT([yes])
11783da084b3Smrg       else
11793da084b3Smrg  AC_MSG_RESULT([no])
11803da084b3Smrgfi
11813da084b3Smrg       ;;
11823da084b3Smrg   *)
11833da084b3Smrg  AC_MSG_RESULT([no])
11843da084b3Smrg    ;;
11853da084b3Smrg  esac
11863da084b3Smrgfi
11873da084b3Smrg])# AC_LIBTOOL_SYS_LIB_STRIP
11883da084b3Smrg
11893da084b3Smrg
11903da084b3Smrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER
11913da084b3Smrg# -----------------------------
11923da084b3Smrg# PORTME Fill in your ld.so characteristics
11933da084b3SmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
11943da084b3Smrg[AC_MSG_CHECKING([dynamic linker characteristics])
11953da084b3Smrglibrary_names_spec=
11963da084b3Smrglibname_spec='lib$name'
11973da084b3Smrgsoname_spec=
11983da084b3Smrgshrext_cmds=".so"
11993da084b3Smrgpostinstall_cmds=
12003da084b3Smrgpostuninstall_cmds=
12013da084b3Smrgfinish_cmds=
12023da084b3Smrgfinish_eval=
12033da084b3Smrgshlibpath_var=
12043da084b3Smrgshlibpath_overrides_runpath=unknown
12053da084b3Smrgversion_type=none
12063da084b3Smrgdynamic_linker="$host_os ld.so"
12073da084b3Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
12083da084b3Smrgif test "$GCC" = yes; then
12093da084b3Smrg  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
12103da084b3Smrg  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
12113da084b3Smrg    # if the path contains ";" then we assume it to be the separator
12123da084b3Smrg    # otherwise default to the standard path separator (i.e. ":") - it is
12133da084b3Smrg    # assumed that no part of a normal pathname contains ";" but that should
12143da084b3Smrg    # okay in the real world where ";" in dirpaths is itself problematic.
12153da084b3Smrg    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
12163da084b3Smrg  else
12173da084b3Smrg    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
12183da084b3Smrg  fi
12193da084b3Smrgelse
12203da084b3Smrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
12213da084b3Smrgfi
12223da084b3Smrgneed_lib_prefix=unknown
12233da084b3Smrghardcode_into_libs=no
12243da084b3Smrg
12253da084b3Smrg# when you set need_version to no, make sure it does not cause -set_version
12263da084b3Smrg# flags to be left without arguments
12273da084b3Smrgneed_version=unknown
12283da084b3Smrg
12293da084b3Smrgcase $host_os in
12303da084b3Smrgaix3*)
12313da084b3Smrg  version_type=linux
12323da084b3Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
12333da084b3Smrg  shlibpath_var=LIBPATH
12343da084b3Smrg
12353da084b3Smrg  # AIX 3 has no versioning support, so we append a major version to the name.
12363da084b3Smrg  soname_spec='${libname}${release}${shared_ext}$major'
12373da084b3Smrg  ;;
12383da084b3Smrg
12393da084b3Smrgaix4* | aix5*)
12403da084b3Smrg  version_type=linux
12413da084b3Smrg  need_lib_prefix=no
12423da084b3Smrg  need_version=no
12433da084b3Smrg  hardcode_into_libs=yes
12443da084b3Smrg  if test "$host_cpu" = ia64; then
12453da084b3Smrg    # AIX 5 supports IA64
12463da084b3Smrg    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
12473da084b3Smrg    shlibpath_var=LD_LIBRARY_PATH
12483da084b3Smrg  else
12493da084b3Smrg    # With GCC up to 2.95.x, collect2 would create an import file
12503da084b3Smrg    # for dependence libraries.  The import file would start with
12513da084b3Smrg    # the line `#! .'.  This would cause the generated library to
12523da084b3Smrg    # depend on `.', always an invalid library.  This was fixed in
12533da084b3Smrg    # development snapshots of GCC prior to 3.0.
12543da084b3Smrg    case $host_os in
12553da084b3Smrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
12563da084b3Smrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
12573da084b3Smrg	   echo ' yes '
12583da084b3Smrg	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
12593da084b3Smrg	:
12603da084b3Smrg      else
12613da084b3Smrg	can_build_shared=no
12623da084b3Smrg      fi
12633da084b3Smrg      ;;
12643da084b3Smrg    esac
12653da084b3Smrg    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
12663da084b3Smrg    # soname into executable. Probably we can add versioning support to
12673da084b3Smrg    # collect2, so additional links can be useful in future.
12683da084b3Smrg    if test "$aix_use_runtimelinking" = yes; then
12693da084b3Smrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
12703da084b3Smrg      # instead of lib<name>.a to let people know that these are not
12713da084b3Smrg      # typical AIX shared libraries.
12723da084b3Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12733da084b3Smrg    else
12743da084b3Smrg      # We preserve .a as extension for shared libraries through AIX4.2
12753da084b3Smrg      # and later when we are not doing run time linking.
12763da084b3Smrg      library_names_spec='${libname}${release}.a $libname.a'
12773da084b3Smrg      soname_spec='${libname}${release}${shared_ext}$major'
12783da084b3Smrg    fi
12793da084b3Smrg    shlibpath_var=LIBPATH
12803da084b3Smrg  fi
12813da084b3Smrg  ;;
12823da084b3Smrg
12833da084b3Smrgamigaos*)
12843da084b3Smrg  library_names_spec='$libname.ixlibrary $libname.a'
12853da084b3Smrg  # Create ${libname}_ixlibrary.a entries in /sys/libs.
12863da084b3Smrg  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'
12873da084b3Smrg  ;;
12883da084b3Smrg
12893da084b3Smrgbeos*)
12903da084b3Smrg  library_names_spec='${libname}${shared_ext}'
12913da084b3Smrg  dynamic_linker="$host_os ld.so"
12923da084b3Smrg  shlibpath_var=LIBRARY_PATH
12933da084b3Smrg  ;;
12943da084b3Smrg
12953da084b3Smrgbsdi[[45]]*)
12963da084b3Smrg  version_type=linux
12973da084b3Smrg  need_version=no
12983da084b3Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12993da084b3Smrg  soname_spec='${libname}${release}${shared_ext}$major'
13003da084b3Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
13013da084b3Smrg  shlibpath_var=LD_LIBRARY_PATH
13023da084b3Smrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
13033da084b3Smrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
13043da084b3Smrg  # the default ld.so.conf also contains /usr/contrib/lib and
13053da084b3Smrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
13063da084b3Smrg  # libtool to hard-code these into programs
13073da084b3Smrg  ;;
13083da084b3Smrg
13093da084b3Smrgcygwin* | mingw* | pw32*)
13103da084b3Smrg  version_type=windows
13113da084b3Smrg  shrext_cmds=".dll"
13123da084b3Smrg  need_version=no
13133da084b3Smrg  need_lib_prefix=no
13143da084b3Smrg
13153da084b3Smrg  case $GCC,$host_os in
13163da084b3Smrg  yes,cygwin* | yes,mingw* | yes,pw32*)
13173da084b3Smrg    library_names_spec='$libname.dll.a'
13183da084b3Smrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
13193da084b3Smrg    postinstall_cmds='base_file=`basename \${file}`~
13203da084b3Smrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
13213da084b3Smrg      dldir=$destdir/`dirname \$dlpath`~
13223da084b3Smrg      test -d \$dldir || mkdir -p \$dldir~
13233da084b3Smrg      $install_prog $dir/$dlname \$dldir/$dlname~
13243da084b3Smrg      chmod a+x \$dldir/$dlname'
13253da084b3Smrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
13263da084b3Smrg      dlpath=$dir/\$dldll~
13273da084b3Smrg       $rm \$dlpath'
13283da084b3Smrg    shlibpath_overrides_runpath=yes
13293da084b3Smrg
13303da084b3Smrg    case $host_os in
13313da084b3Smrg    cygwin*)
13323da084b3Smrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
13333da084b3Smrg      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
13343da084b3Smrg      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
13353da084b3Smrg      ;;
13363da084b3Smrg    mingw*)
13373da084b3Smrg      # MinGW DLLs use traditional 'lib' prefix
13383da084b3Smrg      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
13393da084b3Smrg      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
13403da084b3Smrg      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
13413da084b3Smrg        # It is most probably a Windows format PATH printed by
13423da084b3Smrg        # mingw gcc, but we are running on Cygwin. Gcc prints its search
13433da084b3Smrg        # path with ; separators, and with drive letters. We can handle the
13443da084b3Smrg        # drive letters (cygwin fileutils understands them), so leave them,
13453da084b3Smrg        # especially as we might pass files found there to a mingw objdump,
13463da084b3Smrg        # which wouldn't understand a cygwinified path. Ahh.
13473da084b3Smrg        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
13483da084b3Smrg      else
13493da084b3Smrg        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
13503da084b3Smrg      fi
13513da084b3Smrg      ;;
13523da084b3Smrg    pw32*)
13533da084b3Smrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
13543da084b3Smrg      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
13553da084b3Smrg      ;;
13563da084b3Smrg    esac
13573da084b3Smrg    ;;
13583da084b3Smrg
13593da084b3Smrg  *)
13603da084b3Smrg    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
13613da084b3Smrg    ;;
13623da084b3Smrg  esac
13633da084b3Smrg  dynamic_linker='Win32 ld.exe'
13643da084b3Smrg  # FIXME: first we should search . and the directory the executable is in
13653da084b3Smrg  shlibpath_var=PATH
13663da084b3Smrg  ;;
13673da084b3Smrg
13683da084b3Smrgdarwin* | rhapsody*)
13693da084b3Smrg  dynamic_linker="$host_os dyld"
13703da084b3Smrg  version_type=darwin
13713da084b3Smrg  need_lib_prefix=no
13723da084b3Smrg  need_version=no
13733da084b3Smrg  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
13743da084b3Smrg  soname_spec='${libname}${release}${major}$shared_ext'
13753da084b3Smrg  shlibpath_overrides_runpath=yes
13763da084b3Smrg  shlibpath_var=DYLD_LIBRARY_PATH
13773da084b3Smrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
13783da084b3Smrg  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
13793da084b3Smrg  if test "$GCC" = yes; then
13803da084b3Smrg    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"`
13813da084b3Smrg  else
13823da084b3Smrg    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
13833da084b3Smrg  fi
13843da084b3Smrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
13853da084b3Smrg  ;;
13863da084b3Smrg
13873da084b3Smrgdgux*)
13883da084b3Smrg  version_type=linux
13893da084b3Smrg  need_lib_prefix=no
13903da084b3Smrg  need_version=no
13913da084b3Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
13923da084b3Smrg  soname_spec='${libname}${release}${shared_ext}$major'
13933da084b3Smrg  shlibpath_var=LD_LIBRARY_PATH
13943da084b3Smrg  ;;
13953da084b3Smrg
13963da084b3Smrgfreebsd1*)
13973da084b3Smrg  dynamic_linker=no
13983da084b3Smrg  ;;
13993da084b3Smrg
14003da084b3Smrgfreebsd* | dragonfly*)
14013da084b3Smrg  # DragonFly does not have aout.  When/if they implement a new
14023da084b3Smrg  # versioning mechanism, adjust this.
14033da084b3Smrg  if test -x /usr/bin/objformat; then
14043da084b3Smrg    objformat=`/usr/bin/objformat`
14053da084b3Smrg  else
14063da084b3Smrg    case $host_os in
14073da084b3Smrg    freebsd[[123]]*) objformat=aout ;;
14083da084b3Smrg    *) objformat=elf ;;
14093da084b3Smrg    esac
14103da084b3Smrg  fi
14113da084b3Smrg  version_type=freebsd-$objformat
14123da084b3Smrg  case $version_type in
14133da084b3Smrg    freebsd-elf*)
14143da084b3Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
14153da084b3Smrg      need_version=no
14163da084b3Smrg      need_lib_prefix=no
14173da084b3Smrg      ;;
14183da084b3Smrg    freebsd-*)
14193da084b3Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
14203da084b3Smrg      need_version=yes
14213da084b3Smrg      ;;
14223da084b3Smrg  esac
14233da084b3Smrg  shlibpath_var=LD_LIBRARY_PATH
14243da084b3Smrg  case $host_os in
14253da084b3Smrg  freebsd2*)
14263da084b3Smrg    shlibpath_overrides_runpath=yes
14273da084b3Smrg    ;;
14283da084b3Smrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
14293da084b3Smrg    shlibpath_overrides_runpath=yes
14303da084b3Smrg    hardcode_into_libs=yes
14313da084b3Smrg    ;;
14323da084b3Smrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
14333da084b3Smrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
14343da084b3Smrg    shlibpath_overrides_runpath=no
14353da084b3Smrg    hardcode_into_libs=yes
14363da084b3Smrg    ;;
14373da084b3Smrg  freebsd*) # from 4.6 on
14383da084b3Smrg    shlibpath_overrides_runpath=yes
14393da084b3Smrg    hardcode_into_libs=yes
14403da084b3Smrg    ;;
14413da084b3Smrg  esac
14423da084b3Smrg  ;;
14433da084b3Smrg
14443da084b3Smrggnu*)
14453da084b3Smrg  version_type=linux
14463da084b3Smrg  need_lib_prefix=no
14473da084b3Smrg  need_version=no
14483da084b3Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
14493da084b3Smrg  soname_spec='${libname}${release}${shared_ext}$major'
14503da084b3Smrg  shlibpath_var=LD_LIBRARY_PATH
14513da084b3Smrg  hardcode_into_libs=yes
14523da084b3Smrg  ;;
14533da084b3Smrg
14543da084b3Smrghpux9* | hpux10* | hpux11*)
14553da084b3Smrg  # Give a soname corresponding to the major version so that dld.sl refuses to
14563da084b3Smrg  # link against other versions.
14573da084b3Smrg  version_type=sunos
14583da084b3Smrg  need_lib_prefix=no
14593da084b3Smrg  need_version=no
14603da084b3Smrg  case $host_cpu in
14613da084b3Smrg  ia64*)
14623da084b3Smrg    shrext_cmds='.so'
14633da084b3Smrg    hardcode_into_libs=yes
14643da084b3Smrg    dynamic_linker="$host_os dld.so"
14653da084b3Smrg    shlibpath_var=LD_LIBRARY_PATH
14663da084b3Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
14673da084b3Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
14683da084b3Smrg    soname_spec='${libname}${release}${shared_ext}$major'
14693da084b3Smrg    if test "X$HPUX_IA64_MODE" = X32; then
14703da084b3Smrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
14713da084b3Smrg    else
14723da084b3Smrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
14733da084b3Smrg    fi
14743da084b3Smrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
14753da084b3Smrg    ;;
14763da084b3Smrg   hppa*64*)
14773da084b3Smrg     shrext_cmds='.sl'
14783da084b3Smrg     hardcode_into_libs=yes
14793da084b3Smrg     dynamic_linker="$host_os dld.sl"
14803da084b3Smrg     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
14813da084b3Smrg     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
14823da084b3Smrg     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
14833da084b3Smrg     soname_spec='${libname}${release}${shared_ext}$major'
14843da084b3Smrg     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
14853da084b3Smrg     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
14863da084b3Smrg     ;;
14873da084b3Smrg   *)
14883da084b3Smrg    shrext_cmds='.sl'
14893da084b3Smrg    dynamic_linker="$host_os dld.sl"
14903da084b3Smrg    shlibpath_var=SHLIB_PATH
14913da084b3Smrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
14923da084b3Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
14933da084b3Smrg    soname_spec='${libname}${release}${shared_ext}$major'
14943da084b3Smrg    ;;
14953da084b3Smrg  esac
14963da084b3Smrg  # HP-UX runs *really* slowly unless shared libraries are mode 555.
14973da084b3Smrg  postinstall_cmds='chmod 555 $lib'
14983da084b3Smrg  ;;
14993da084b3Smrg
15003da084b3Smrginterix3*)
15013da084b3Smrg  version_type=linux
15023da084b3Smrg  need_lib_prefix=no
15033da084b3Smrg  need_version=no
15043da084b3Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
15053da084b3Smrg  soname_spec='${libname}${release}${shared_ext}$major'
15063da084b3Smrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
15073da084b3Smrg  shlibpath_var=LD_LIBRARY_PATH
15083da084b3Smrg  shlibpath_overrides_runpath=no
15093da084b3Smrg  hardcode_into_libs=yes
15103da084b3Smrg  ;;
15113da084b3Smrg
15123da084b3Smrgirix5* | irix6* | nonstopux*)
15133da084b3Smrg  case $host_os in
15143da084b3Smrg    nonstopux*) version_type=nonstopux ;;
15153da084b3Smrg    *)
15163da084b3Smrg	if test "$lt_cv_prog_gnu_ld" = yes; then
15173da084b3Smrg		version_type=linux
15183da084b3Smrg	else
15193da084b3Smrg		version_type=irix
15203da084b3Smrg	fi ;;
15213da084b3Smrg  esac
15223da084b3Smrg  need_lib_prefix=no
15233da084b3Smrg  need_version=no
15243da084b3Smrg  soname_spec='${libname}${release}${shared_ext}$major'
15253da084b3Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
15263da084b3Smrg  case $host_os in
15273da084b3Smrg  irix5* | nonstopux*)
15283da084b3Smrg    libsuff= shlibsuff=
15293da084b3Smrg    ;;
15303da084b3Smrg  *)
15313da084b3Smrg    case $LD in # libtool.m4 will add one of these switches to LD
15323da084b3Smrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
15333da084b3Smrg      libsuff= shlibsuff= libmagic=32-bit;;
15343da084b3Smrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
15353da084b3Smrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
15363da084b3Smrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
15373da084b3Smrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
15383da084b3Smrg    *) libsuff= shlibsuff= libmagic=never-match;;
15393da084b3Smrg    esac
15403da084b3Smrg    ;;
15413da084b3Smrg  esac
15423da084b3Smrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
15433da084b3Smrg  shlibpath_overrides_runpath=no
15443da084b3Smrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
15453da084b3Smrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
15463da084b3Smrg  hardcode_into_libs=yes
15473da084b3Smrg  ;;
15483da084b3Smrg
15493da084b3Smrg# No shared lib support for Linux oldld, aout, or coff.
15503da084b3Smrglinux*oldld* | linux*aout* | linux*coff*)
15513da084b3Smrg  dynamic_linker=no
15523da084b3Smrg  ;;
15533da084b3Smrg
15543da084b3Smrg# This must be Linux ELF.
15553da084b3Smrglinux* | k*bsd*-gnu)
15563da084b3Smrg  version_type=linux
15573da084b3Smrg  need_lib_prefix=no
15583da084b3Smrg  need_version=no
15593da084b3Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15603da084b3Smrg  soname_spec='${libname}${release}${shared_ext}$major'
15613da084b3Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
15623da084b3Smrg  shlibpath_var=LD_LIBRARY_PATH
15633da084b3Smrg  shlibpath_overrides_runpath=no
15643da084b3Smrg  # This implies no fast_install, which is unacceptable.
15653da084b3Smrg  # Some rework will be needed to allow for fast_install
15663da084b3Smrg  # before this can be enabled.
15673da084b3Smrg  hardcode_into_libs=yes
15683da084b3Smrg
15693da084b3Smrg  # Append ld.so.conf contents to the search path
15703da084b3Smrg  if test -f /etc/ld.so.conf; then
15713da084b3Smrg    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' ' '`
15723da084b3Smrg    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
15733da084b3Smrg  fi
15743da084b3Smrg
15753da084b3Smrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
15763da084b3Smrg  # powerpc, because MkLinux only supported shared libraries with the
15773da084b3Smrg  # GNU dynamic linker.  Since this was broken with cross compilers,
15783da084b3Smrg  # most powerpc-linux boxes support dynamic linking these days and
15793da084b3Smrg  # people can always --disable-shared, the test was removed, and we
15803da084b3Smrg  # assume the GNU/Linux dynamic linker is in use.
15813da084b3Smrg  dynamic_linker='GNU/Linux ld.so'
15823da084b3Smrg  ;;
15833da084b3Smrg
15843da084b3Smrgnetbsdelf*-gnu)
15853da084b3Smrg  version_type=linux
15863da084b3Smrg  need_lib_prefix=no
15873da084b3Smrg  need_version=no
15883da084b3Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
15893da084b3Smrg  soname_spec='${libname}${release}${shared_ext}$major'
15903da084b3Smrg  shlibpath_var=LD_LIBRARY_PATH
15913da084b3Smrg  shlibpath_overrides_runpath=no
15923da084b3Smrg  hardcode_into_libs=yes
15933da084b3Smrg  dynamic_linker='NetBSD ld.elf_so'
15943da084b3Smrg  ;;
15953da084b3Smrg
15963da084b3Smrgnetbsd*)
15973da084b3Smrg  version_type=sunos
15983da084b3Smrg  need_lib_prefix=no
15993da084b3Smrg  need_version=no
16003da084b3Smrg  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
16013da084b3Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
16023da084b3Smrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
16033da084b3Smrg    dynamic_linker='NetBSD (a.out) ld.so'
16043da084b3Smrg  else
16053da084b3Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
16063da084b3Smrg    soname_spec='${libname}${release}${shared_ext}$major'
16073da084b3Smrg    dynamic_linker='NetBSD ld.elf_so'
16083da084b3Smrg  fi
16093da084b3Smrg  shlibpath_var=LD_LIBRARY_PATH
16103da084b3Smrg  shlibpath_overrides_runpath=yes
16113da084b3Smrg  hardcode_into_libs=yes
16123da084b3Smrg  ;;
16133da084b3Smrg
16143da084b3Smrgnewsos6)
16153da084b3Smrg  version_type=linux
16163da084b3Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16173da084b3Smrg  shlibpath_var=LD_LIBRARY_PATH
16183da084b3Smrg  shlibpath_overrides_runpath=yes
16193da084b3Smrg  ;;
16203da084b3Smrg
16213da084b3Smrgnto-qnx*)
16223da084b3Smrg  version_type=linux
16233da084b3Smrg  need_lib_prefix=no
16243da084b3Smrg  need_version=no
16253da084b3Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16263da084b3Smrg  soname_spec='${libname}${release}${shared_ext}$major'
16273da084b3Smrg  shlibpath_var=LD_LIBRARY_PATH
16283da084b3Smrg  shlibpath_overrides_runpath=yes
16293da084b3Smrg  ;;
16303da084b3Smrg
16313da084b3Smrgopenbsd*)
16323da084b3Smrg  version_type=sunos
16333da084b3Smrg  sys_lib_dlsearch_path_spec="/usr/lib"
16343da084b3Smrg  need_lib_prefix=no
16353da084b3Smrg  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
16363da084b3Smrg  case $host_os in
16373da084b3Smrg    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
16383da084b3Smrg    *)                         need_version=no  ;;
16393da084b3Smrg  esac
16403da084b3Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
16413da084b3Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
16423da084b3Smrg  shlibpath_var=LD_LIBRARY_PATH
16433da084b3Smrg  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
16443da084b3Smrg    case $host_os in
16453da084b3Smrg      openbsd2.[[89]] | openbsd2.[[89]].*)
16463da084b3Smrg	shlibpath_overrides_runpath=no
16473da084b3Smrg	;;
16483da084b3Smrg      *)
16493da084b3Smrg	shlibpath_overrides_runpath=yes
16503da084b3Smrg	;;
16513da084b3Smrg      esac
16523da084b3Smrg  else
16533da084b3Smrg    shlibpath_overrides_runpath=yes
16543da084b3Smrg  fi
16553da084b3Smrg  ;;
16563da084b3Smrg
16573da084b3Smrgos2*)
16583da084b3Smrg  libname_spec='$name'
16593da084b3Smrg  shrext_cmds=".dll"
16603da084b3Smrg  need_lib_prefix=no
16613da084b3Smrg  library_names_spec='$libname${shared_ext} $libname.a'
16623da084b3Smrg  dynamic_linker='OS/2 ld.exe'
16633da084b3Smrg  shlibpath_var=LIBPATH
16643da084b3Smrg  ;;
16653da084b3Smrg
16663da084b3Smrgosf3* | osf4* | osf5*)
16673da084b3Smrg  version_type=osf
16683da084b3Smrg  need_lib_prefix=no
16693da084b3Smrg  need_version=no
16703da084b3Smrg  soname_spec='${libname}${release}${shared_ext}$major'
16713da084b3Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16723da084b3Smrg  shlibpath_var=LD_LIBRARY_PATH
16733da084b3Smrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
16743da084b3Smrg  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
16753da084b3Smrg  ;;
16763da084b3Smrg
16773da084b3Smrgsolaris*)
16783da084b3Smrg  version_type=linux
16793da084b3Smrg  need_lib_prefix=no
16803da084b3Smrg  need_version=no
16813da084b3Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16823da084b3Smrg  soname_spec='${libname}${release}${shared_ext}$major'
16833da084b3Smrg  shlibpath_var=LD_LIBRARY_PATH
16843da084b3Smrg  shlibpath_overrides_runpath=yes
16853da084b3Smrg  hardcode_into_libs=yes
16863da084b3Smrg  # ldd complains unless libraries are executable
16873da084b3Smrg  postinstall_cmds='chmod +x $lib'
16883da084b3Smrg  ;;
16893da084b3Smrg
16903da084b3Smrgsunos4*)
16913da084b3Smrg  version_type=sunos
16923da084b3Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
16933da084b3Smrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
16943da084b3Smrg  shlibpath_var=LD_LIBRARY_PATH
16953da084b3Smrg  shlibpath_overrides_runpath=yes
16963da084b3Smrg  if test "$with_gnu_ld" = yes; then
16973da084b3Smrg    need_lib_prefix=no
16983da084b3Smrg  fi
16993da084b3Smrg  need_version=yes
17003da084b3Smrg  ;;
17013da084b3Smrg
17023da084b3Smrgsysv4 | sysv4.3*)
17033da084b3Smrg  version_type=linux
17043da084b3Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
17053da084b3Smrg  soname_spec='${libname}${release}${shared_ext}$major'
17063da084b3Smrg  shlibpath_var=LD_LIBRARY_PATH
17073da084b3Smrg  case $host_vendor in
17083da084b3Smrg    sni)
17093da084b3Smrg      shlibpath_overrides_runpath=no
17103da084b3Smrg      need_lib_prefix=no
17113da084b3Smrg      export_dynamic_flag_spec='${wl}-Blargedynsym'
17123da084b3Smrg      runpath_var=LD_RUN_PATH
17133da084b3Smrg      ;;
17143da084b3Smrg    siemens)
17153da084b3Smrg      need_lib_prefix=no
17163da084b3Smrg      ;;
17173da084b3Smrg    motorola)
17183da084b3Smrg      need_lib_prefix=no
17193da084b3Smrg      need_version=no
17203da084b3Smrg      shlibpath_overrides_runpath=no
17213da084b3Smrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
17223da084b3Smrg      ;;
17233da084b3Smrg  esac
17243da084b3Smrg  ;;
17253da084b3Smrg
17263da084b3Smrgsysv4*MP*)
17273da084b3Smrg  if test -d /usr/nec ;then
17283da084b3Smrg    version_type=linux
17293da084b3Smrg    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
17303da084b3Smrg    soname_spec='$libname${shared_ext}.$major'
17313da084b3Smrg    shlibpath_var=LD_LIBRARY_PATH
17323da084b3Smrg  fi
17333da084b3Smrg  ;;
17343da084b3Smrg
17353da084b3Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
17363da084b3Smrg  version_type=freebsd-elf
17373da084b3Smrg  need_lib_prefix=no
17383da084b3Smrg  need_version=no
17393da084b3Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
17403da084b3Smrg  soname_spec='${libname}${release}${shared_ext}$major'
17413da084b3Smrg  shlibpath_var=LD_LIBRARY_PATH
17423da084b3Smrg  hardcode_into_libs=yes
17433da084b3Smrg  if test "$with_gnu_ld" = yes; then
17443da084b3Smrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
17453da084b3Smrg    shlibpath_overrides_runpath=no
17463da084b3Smrg  else
17473da084b3Smrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
17483da084b3Smrg    shlibpath_overrides_runpath=yes
17493da084b3Smrg    case $host_os in
17503da084b3Smrg      sco3.2v5*)
17513da084b3Smrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
17523da084b3Smrg	;;
17533da084b3Smrg    esac
17543da084b3Smrg  fi
17553da084b3Smrg  sys_lib_dlsearch_path_spec='/usr/lib'
17563da084b3Smrg  ;;
17573da084b3Smrg
17583da084b3Smrguts4*)
17593da084b3Smrg  version_type=linux
17603da084b3Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
17613da084b3Smrg  soname_spec='${libname}${release}${shared_ext}$major'
17623da084b3Smrg  shlibpath_var=LD_LIBRARY_PATH
17633da084b3Smrg  ;;
17643da084b3Smrg
17653da084b3Smrg*)
17663da084b3Smrg  dynamic_linker=no
17673da084b3Smrg  ;;
17683da084b3Smrgesac
17693da084b3SmrgAC_MSG_RESULT([$dynamic_linker])
17703da084b3Smrgtest "$dynamic_linker" = no && can_build_shared=no
17713da084b3Smrg
17723da084b3Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
17733da084b3Smrgif test "$GCC" = yes; then
17743da084b3Smrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
17753da084b3Smrgfi
17763da084b3Smrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
17773da084b3Smrg
17783da084b3Smrg
17793da084b3Smrg# _LT_AC_TAGCONFIG
17803da084b3Smrg# ----------------
17813da084b3SmrgAC_DEFUN([_LT_AC_TAGCONFIG],
17823da084b3Smrg[AC_ARG_WITH([tags],
17833da084b3Smrg    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
17843da084b3Smrg        [include additional configurations @<:@automatic@:>@])],
17853da084b3Smrg    [tagnames="$withval"])
17863da084b3Smrg
17873da084b3Smrgif test -f "$ltmain" && test -n "$tagnames"; then
17883da084b3Smrg  if test ! -f "${ofile}"; then
17893da084b3Smrg    AC_MSG_WARN([output file `$ofile' does not exist])
17903da084b3Smrg  fi
17913da084b3Smrg
17923da084b3Smrg  if test -z "$LTCC"; then
17933da084b3Smrg    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
17943da084b3Smrg    if test -z "$LTCC"; then
17953da084b3Smrg      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
17963da084b3Smrg    else
17973da084b3Smrg      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
17983da084b3Smrg    fi
17993da084b3Smrg  fi
18003da084b3Smrg  if test -z "$LTCFLAGS"; then
18013da084b3Smrg    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
18023da084b3Smrg  fi
18033da084b3Smrg
18043da084b3Smrg  # Extract list of available tagged configurations in $ofile.
18053da084b3Smrg  # Note that this assumes the entire list is on one line.
18063da084b3Smrg  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
18073da084b3Smrg
18083da084b3Smrg  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
18093da084b3Smrg  for tagname in $tagnames; do
18103da084b3Smrg    IFS="$lt_save_ifs"
18113da084b3Smrg    # Check whether tagname contains only valid characters
18123da084b3Smrg    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
18133da084b3Smrg    "") ;;
18143da084b3Smrg    *)  AC_MSG_ERROR([invalid tag name: $tagname])
18153da084b3Smrg	;;
18163da084b3Smrg    esac
18173da084b3Smrg
18183da084b3Smrg    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
18193da084b3Smrg    then
18203da084b3Smrg      AC_MSG_ERROR([tag name \"$tagname\" already exists])
18213da084b3Smrg    fi
18223da084b3Smrg
18233da084b3Smrg    # Update the list of available tags.
18243da084b3Smrg    if test -n "$tagname"; then
18253da084b3Smrg      echo appending configuration tag \"$tagname\" to $ofile
18263da084b3Smrg
18273da084b3Smrg      case $tagname in
18283da084b3Smrg      CXX)
18293da084b3Smrg	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
18303da084b3Smrg	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
18313da084b3Smrg	    (test "X$CXX" != "Xg++"))) ; then
18323da084b3Smrg	  AC_LIBTOOL_LANG_CXX_CONFIG
18333da084b3Smrg	else
18343da084b3Smrg	  tagname=""
18353da084b3Smrg	fi
18363da084b3Smrg	;;
18373da084b3Smrg
18383da084b3Smrg      F77)
18393da084b3Smrg	if test -n "$F77" && test "X$F77" != "Xno"; then
18403da084b3Smrg	  AC_LIBTOOL_LANG_F77_CONFIG
18413da084b3Smrg	else
18423da084b3Smrg	  tagname=""
18433da084b3Smrg	fi
18443da084b3Smrg	;;
18453da084b3Smrg
18463da084b3Smrg      GCJ)
18473da084b3Smrg	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
18483da084b3Smrg	  AC_LIBTOOL_LANG_GCJ_CONFIG
18493da084b3Smrg	else
18503da084b3Smrg	  tagname=""
18513da084b3Smrg	fi
18523da084b3Smrg	;;
18533da084b3Smrg
18543da084b3Smrg      RC)
18553da084b3Smrg	AC_LIBTOOL_LANG_RC_CONFIG
18563da084b3Smrg	;;
18573da084b3Smrg
18583da084b3Smrg      *)
18593da084b3Smrg	AC_MSG_ERROR([Unsupported tag name: $tagname])
18603da084b3Smrg	;;
18613da084b3Smrg      esac
18623da084b3Smrg
18633da084b3Smrg      # Append the new tag name to the list of available tags.
18643da084b3Smrg      if test -n "$tagname" ; then
18653da084b3Smrg      available_tags="$available_tags $tagname"
18663da084b3Smrg    fi
18673da084b3Smrg    fi
18683da084b3Smrg  done
18693da084b3Smrg  IFS="$lt_save_ifs"
18703da084b3Smrg
18713da084b3Smrg  # Now substitute the updated list of available tags.
18723da084b3Smrg  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
18733da084b3Smrg    mv "${ofile}T" "$ofile"
18743da084b3Smrg    chmod +x "$ofile"
18753da084b3Smrg  else
18763da084b3Smrg    rm -f "${ofile}T"
18773da084b3Smrg    AC_MSG_ERROR([unable to update list of available tagged configurations.])
18783da084b3Smrg  fi
18793da084b3Smrgfi
18803da084b3Smrg])# _LT_AC_TAGCONFIG
18813da084b3Smrg
18823da084b3Smrg
18833da084b3Smrg# AC_LIBTOOL_DLOPEN
18843da084b3Smrg# -----------------
18853da084b3Smrg# enable checks for dlopen support
18863da084b3SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN],
18873da084b3Smrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
18883da084b3Smrg])# AC_LIBTOOL_DLOPEN
18893da084b3Smrg
18903da084b3Smrg
18913da084b3Smrg# AC_LIBTOOL_WIN32_DLL
18923da084b3Smrg# --------------------
18933da084b3Smrg# declare package support for building win32 DLLs
18943da084b3SmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL],
18953da084b3Smrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
18963da084b3Smrg])# AC_LIBTOOL_WIN32_DLL
18973da084b3Smrg
18983da084b3Smrg
18993da084b3Smrg# AC_ENABLE_SHARED([DEFAULT])
19003da084b3Smrg# ---------------------------
19013da084b3Smrg# implement the --enable-shared flag
19023da084b3Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
19033da084b3SmrgAC_DEFUN([AC_ENABLE_SHARED],
19043da084b3Smrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
19053da084b3SmrgAC_ARG_ENABLE([shared],
19063da084b3Smrg    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
19073da084b3Smrg	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
19083da084b3Smrg    [p=${PACKAGE-default}
19093da084b3Smrg    case $enableval in
19103da084b3Smrg    yes) enable_shared=yes ;;
19113da084b3Smrg    no) enable_shared=no ;;
19123da084b3Smrg    *)
19133da084b3Smrg      enable_shared=no
19143da084b3Smrg      # Look at the argument we got.  We use all the common list separators.
19153da084b3Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
19163da084b3Smrg      for pkg in $enableval; do
19173da084b3Smrg	IFS="$lt_save_ifs"
19183da084b3Smrg	if test "X$pkg" = "X$p"; then
19193da084b3Smrg	  enable_shared=yes
19203da084b3Smrg	fi
19213da084b3Smrg      done
19223da084b3Smrg      IFS="$lt_save_ifs"
19233da084b3Smrg      ;;
19243da084b3Smrg    esac],
19253da084b3Smrg    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
19263da084b3Smrg])# AC_ENABLE_SHARED
19273da084b3Smrg
19283da084b3Smrg
19293da084b3Smrg# AC_DISABLE_SHARED
19303da084b3Smrg# -----------------
19313da084b3Smrg# set the default shared flag to --disable-shared
19323da084b3SmrgAC_DEFUN([AC_DISABLE_SHARED],
19333da084b3Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
19343da084b3SmrgAC_ENABLE_SHARED(no)
19353da084b3Smrg])# AC_DISABLE_SHARED
19363da084b3Smrg
19373da084b3Smrg
19383da084b3Smrg# AC_ENABLE_STATIC([DEFAULT])
19393da084b3Smrg# ---------------------------
19403da084b3Smrg# implement the --enable-static flag
19413da084b3Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
19423da084b3SmrgAC_DEFUN([AC_ENABLE_STATIC],
19433da084b3Smrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
19443da084b3SmrgAC_ARG_ENABLE([static],
19453da084b3Smrg    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
19463da084b3Smrg	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
19473da084b3Smrg    [p=${PACKAGE-default}
19483da084b3Smrg    case $enableval in
19493da084b3Smrg    yes) enable_static=yes ;;
19503da084b3Smrg    no) enable_static=no ;;
19513da084b3Smrg    *)
19523da084b3Smrg     enable_static=no
19533da084b3Smrg      # Look at the argument we got.  We use all the common list separators.
19543da084b3Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
19553da084b3Smrg      for pkg in $enableval; do
19563da084b3Smrg	IFS="$lt_save_ifs"
19573da084b3Smrg	if test "X$pkg" = "X$p"; then
19583da084b3Smrg	  enable_static=yes
19593da084b3Smrg	fi
19603da084b3Smrg      done
19613da084b3Smrg      IFS="$lt_save_ifs"
19623da084b3Smrg      ;;
19633da084b3Smrg    esac],
19643da084b3Smrg    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
19653da084b3Smrg])# AC_ENABLE_STATIC
19663da084b3Smrg
19673da084b3Smrg
19683da084b3Smrg# AC_DISABLE_STATIC
19693da084b3Smrg# -----------------
19703da084b3Smrg# set the default static flag to --disable-static
19713da084b3SmrgAC_DEFUN([AC_DISABLE_STATIC],
19723da084b3Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
19733da084b3SmrgAC_ENABLE_STATIC(no)
19743da084b3Smrg])# AC_DISABLE_STATIC
19753da084b3Smrg
19763da084b3Smrg
19773da084b3Smrg# AC_ENABLE_FAST_INSTALL([DEFAULT])
19783da084b3Smrg# ---------------------------------
19793da084b3Smrg# implement the --enable-fast-install flag
19803da084b3Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
19813da084b3SmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL],
19823da084b3Smrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
19833da084b3SmrgAC_ARG_ENABLE([fast-install],
19843da084b3Smrg    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
19853da084b3Smrg    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
19863da084b3Smrg    [p=${PACKAGE-default}
19873da084b3Smrg    case $enableval in
19883da084b3Smrg    yes) enable_fast_install=yes ;;
19893da084b3Smrg    no) enable_fast_install=no ;;
19903da084b3Smrg    *)
19913da084b3Smrg      enable_fast_install=no
19923da084b3Smrg      # Look at the argument we got.  We use all the common list separators.
19933da084b3Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
19943da084b3Smrg      for pkg in $enableval; do
19953da084b3Smrg	IFS="$lt_save_ifs"
19963da084b3Smrg	if test "X$pkg" = "X$p"; then
19973da084b3Smrg	  enable_fast_install=yes
19983da084b3Smrg	fi
19993da084b3Smrg      done
20003da084b3Smrg      IFS="$lt_save_ifs"
20013da084b3Smrg      ;;
20023da084b3Smrg    esac],
20033da084b3Smrg    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
20043da084b3Smrg])# AC_ENABLE_FAST_INSTALL
20053da084b3Smrg
20063da084b3Smrg
20073da084b3Smrg# AC_DISABLE_FAST_INSTALL
20083da084b3Smrg# -----------------------
20093da084b3Smrg# set the default to --disable-fast-install
20103da084b3SmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL],
20113da084b3Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
20123da084b3SmrgAC_ENABLE_FAST_INSTALL(no)
20133da084b3Smrg])# AC_DISABLE_FAST_INSTALL
20143da084b3Smrg
20153da084b3Smrg
20163da084b3Smrg# AC_LIBTOOL_PICMODE([MODE])
20173da084b3Smrg# --------------------------
20183da084b3Smrg# implement the --with-pic flag
20193da084b3Smrg# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
20203da084b3SmrgAC_DEFUN([AC_LIBTOOL_PICMODE],
20213da084b3Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
20223da084b3Smrgpic_mode=ifelse($#,1,$1,default)
20233da084b3Smrg])# AC_LIBTOOL_PICMODE
20243da084b3Smrg
20253da084b3Smrg
20263da084b3Smrg# AC_PROG_EGREP
20273da084b3Smrg# -------------
20283da084b3Smrg# This is predefined starting with Autoconf 2.54, so this conditional
20293da084b3Smrg# definition can be removed once we require Autoconf 2.54 or later.
20303da084b3Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
20313da084b3Smrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
20323da084b3Smrg   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
20333da084b3Smrg    then ac_cv_prog_egrep='grep -E'
20343da084b3Smrg    else ac_cv_prog_egrep='egrep'
20353da084b3Smrg    fi])
20363da084b3Smrg EGREP=$ac_cv_prog_egrep
20373da084b3Smrg AC_SUBST([EGREP])
20383da084b3Smrg])])
20393da084b3Smrg
20403da084b3Smrg
20413da084b3Smrg# AC_PATH_TOOL_PREFIX
20423da084b3Smrg# -------------------
20433da084b3Smrg# find a file program which can recognise shared library
20443da084b3SmrgAC_DEFUN([AC_PATH_TOOL_PREFIX],
20453da084b3Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl
20463da084b3SmrgAC_MSG_CHECKING([for $1])
20473da084b3SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
20483da084b3Smrg[case $MAGIC_CMD in
20493da084b3Smrg[[\\/*] |  ?:[\\/]*])
20503da084b3Smrg  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
20513da084b3Smrg  ;;
20523da084b3Smrg*)
20533da084b3Smrg  lt_save_MAGIC_CMD="$MAGIC_CMD"
20543da084b3Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
20553da084b3Smrgdnl $ac_dummy forces splitting on constant user-supplied paths.
20563da084b3Smrgdnl POSIX.2 word splitting is done only on the output of word expansions,
20573da084b3Smrgdnl not every word.  This closes a longstanding sh security hole.
20583da084b3Smrg  ac_dummy="ifelse([$2], , $PATH, [$2])"
20593da084b3Smrg  for ac_dir in $ac_dummy; do
20603da084b3Smrg    IFS="$lt_save_ifs"
20613da084b3Smrg    test -z "$ac_dir" && ac_dir=.
20623da084b3Smrg    if test -f $ac_dir/$1; then
20633da084b3Smrg      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
20643da084b3Smrg      if test -n "$file_magic_test_file"; then
20653da084b3Smrg	case $deplibs_check_method in
20663da084b3Smrg	"file_magic "*)
20673da084b3Smrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
20683da084b3Smrg	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
20693da084b3Smrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
20703da084b3Smrg	    $EGREP "$file_magic_regex" > /dev/null; then
20713da084b3Smrg	    :
20723da084b3Smrg	  else
20733da084b3Smrg	    cat <<EOF 1>&2
20743da084b3Smrg
20753da084b3Smrg*** Warning: the command libtool uses to detect shared libraries,
20763da084b3Smrg*** $file_magic_cmd, produces output that libtool cannot recognize.
20773da084b3Smrg*** The result is that libtool may fail to recognize shared libraries
20783da084b3Smrg*** as such.  This will affect the creation of libtool libraries that
20793da084b3Smrg*** depend on shared libraries, but programs linked with such libtool
20803da084b3Smrg*** libraries will work regardless of this problem.  Nevertheless, you
20813da084b3Smrg*** may want to report the problem to your system manager and/or to
20823da084b3Smrg*** bug-libtool@gnu.org
20833da084b3Smrg
20843da084b3SmrgEOF
20853da084b3Smrg	  fi ;;
20863da084b3Smrg	esac
20873da084b3Smrg      fi
20883da084b3Smrg      break
20893da084b3Smrg    fi
20903da084b3Smrg  done
20913da084b3Smrg  IFS="$lt_save_ifs"
20923da084b3Smrg  MAGIC_CMD="$lt_save_MAGIC_CMD"
20933da084b3Smrg  ;;
20943da084b3Smrgesac])
20953da084b3SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
20963da084b3Smrgif test -n "$MAGIC_CMD"; then
20973da084b3Smrg  AC_MSG_RESULT($MAGIC_CMD)
20983da084b3Smrgelse
20993da084b3Smrg  AC_MSG_RESULT(no)
21003da084b3Smrgfi
21013da084b3Smrg])# AC_PATH_TOOL_PREFIX
21023da084b3Smrg
21033da084b3Smrg
21043da084b3Smrg# AC_PATH_MAGIC
21053da084b3Smrg# -------------
21063da084b3Smrg# find a file program which can recognise a shared library
21073da084b3SmrgAC_DEFUN([AC_PATH_MAGIC],
21083da084b3Smrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
21093da084b3Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then
21103da084b3Smrg  if test -n "$ac_tool_prefix"; then
21113da084b3Smrg    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
21123da084b3Smrg  else
21133da084b3Smrg    MAGIC_CMD=:
21143da084b3Smrg  fi
21153da084b3Smrgfi
21163da084b3Smrg])# AC_PATH_MAGIC
21173da084b3Smrg
21183da084b3Smrg
21193da084b3Smrg# AC_PROG_LD
21203da084b3Smrg# ----------
21213da084b3Smrg# find the pathname to the GNU or non-GNU linker
21223da084b3SmrgAC_DEFUN([AC_PROG_LD],
21233da084b3Smrg[AC_ARG_WITH([gnu-ld],
21243da084b3Smrg    [AC_HELP_STRING([--with-gnu-ld],
21253da084b3Smrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
21263da084b3Smrg    [test "$withval" = no || with_gnu_ld=yes],
21273da084b3Smrg    [with_gnu_ld=no])
21283da084b3SmrgAC_REQUIRE([LT_AC_PROG_SED])dnl
21293da084b3SmrgAC_REQUIRE([AC_PROG_CC])dnl
21303da084b3SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
21313da084b3SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
21323da084b3Smrgac_prog=ld
21333da084b3Smrgif test "$GCC" = yes; then
21343da084b3Smrg  # Check if gcc -print-prog-name=ld gives a path.
21353da084b3Smrg  AC_MSG_CHECKING([for ld used by $CC])
21363da084b3Smrg  case $host in
21373da084b3Smrg  *-*-mingw*)
21383da084b3Smrg    # gcc leaves a trailing carriage return which upsets mingw
21393da084b3Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
21403da084b3Smrg  *)
21413da084b3Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
21423da084b3Smrg  esac
21433da084b3Smrg  case $ac_prog in
21443da084b3Smrg    # Accept absolute paths.
21453da084b3Smrg    [[\\/]]* | ?:[[\\/]]*)
21463da084b3Smrg      re_direlt='/[[^/]][[^/]]*/\.\./'
21473da084b3Smrg      # Canonicalize the pathname of ld
21483da084b3Smrg      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
21493da084b3Smrg      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
21503da084b3Smrg	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
21513da084b3Smrg      done
21523da084b3Smrg      test -z "$LD" && LD="$ac_prog"
21533da084b3Smrg      ;;
21543da084b3Smrg  "")
21553da084b3Smrg    # If it fails, then pretend we aren't using GCC.
21563da084b3Smrg    ac_prog=ld
21573da084b3Smrg    ;;
21583da084b3Smrg  *)
21593da084b3Smrg    # If it is relative, then search for the first ld in PATH.
21603da084b3Smrg    with_gnu_ld=unknown
21613da084b3Smrg    ;;
21623da084b3Smrg  esac
21633da084b3Smrgelif test "$with_gnu_ld" = yes; then
21643da084b3Smrg  AC_MSG_CHECKING([for GNU ld])
21653da084b3Smrgelse
21663da084b3Smrg  AC_MSG_CHECKING([for non-GNU ld])
21673da084b3Smrgfi
21683da084b3SmrgAC_CACHE_VAL(lt_cv_path_LD,
21693da084b3Smrg[if test -z "$LD"; then
21703da084b3Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
21713da084b3Smrg  for ac_dir in $PATH; do
21723da084b3Smrg    IFS="$lt_save_ifs"
21733da084b3Smrg    test -z "$ac_dir" && ac_dir=.
21743da084b3Smrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
21753da084b3Smrg      lt_cv_path_LD="$ac_dir/$ac_prog"
21763da084b3Smrg      # Check to see if the program is GNU ld.  I'd rather use --version,
21773da084b3Smrg      # but apparently some variants of GNU ld only accept -v.
21783da084b3Smrg      # Break only if it was the GNU/non-GNU ld that we prefer.
21793da084b3Smrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
21803da084b3Smrg      *GNU* | *'with BFD'*)
21813da084b3Smrg	test "$with_gnu_ld" != no && break
21823da084b3Smrg	;;
21833da084b3Smrg      *)
21843da084b3Smrg	test "$with_gnu_ld" != yes && break
21853da084b3Smrg	;;
21863da084b3Smrg      esac
21873da084b3Smrg    fi
21883da084b3Smrg  done
21893da084b3Smrg  IFS="$lt_save_ifs"
21903da084b3Smrgelse
21913da084b3Smrg  lt_cv_path_LD="$LD" # Let the user override the test with a path.
21923da084b3Smrgfi])
21933da084b3SmrgLD="$lt_cv_path_LD"
21943da084b3Smrgif test -n "$LD"; then
21953da084b3Smrg  AC_MSG_RESULT($LD)
21963da084b3Smrgelse
21973da084b3Smrg  AC_MSG_RESULT(no)
21983da084b3Smrgfi
21993da084b3Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
22003da084b3SmrgAC_PROG_LD_GNU
22013da084b3Smrg])# AC_PROG_LD
22023da084b3Smrg
22033da084b3Smrg
22043da084b3Smrg# AC_PROG_LD_GNU
22053da084b3Smrg# --------------
22063da084b3SmrgAC_DEFUN([AC_PROG_LD_GNU],
22073da084b3Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl
22083da084b3SmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
22093da084b3Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
22103da084b3Smrgcase `$LD -v 2>&1 </dev/null` in
22113da084b3Smrg*GNU* | *'with BFD'*)
22123da084b3Smrg  lt_cv_prog_gnu_ld=yes
22133da084b3Smrg  ;;
22143da084b3Smrg*)
22153da084b3Smrg  lt_cv_prog_gnu_ld=no
22163da084b3Smrg  ;;
22173da084b3Smrgesac])
22183da084b3Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld
22193da084b3Smrg])# AC_PROG_LD_GNU
22203da084b3Smrg
22213da084b3Smrg
22223da084b3Smrg# AC_PROG_LD_RELOAD_FLAG
22233da084b3Smrg# ----------------------
22243da084b3Smrg# find reload flag for linker
22253da084b3Smrg#   -- PORTME Some linkers may need a different reload flag.
22263da084b3SmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
22273da084b3Smrg[AC_CACHE_CHECK([for $LD option to reload object files],
22283da084b3Smrg  lt_cv_ld_reload_flag,
22293da084b3Smrg  [lt_cv_ld_reload_flag='-r'])
22303da084b3Smrgreload_flag=$lt_cv_ld_reload_flag
22313da084b3Smrgcase $reload_flag in
22323da084b3Smrg"" | " "*) ;;
22333da084b3Smrg*) reload_flag=" $reload_flag" ;;
22343da084b3Smrgesac
22353da084b3Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
22363da084b3Smrgcase $host_os in
22373da084b3Smrg  darwin*)
22383da084b3Smrg    if test "$GCC" = yes; then
22393da084b3Smrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
22403da084b3Smrg    else
22413da084b3Smrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
22423da084b3Smrg    fi
22433da084b3Smrg    ;;
22443da084b3Smrgesac
22453da084b3Smrg])# AC_PROG_LD_RELOAD_FLAG
22463da084b3Smrg
22473da084b3Smrg
22483da084b3Smrg# AC_DEPLIBS_CHECK_METHOD
22493da084b3Smrg# -----------------------
22503da084b3Smrg# how to check for library dependencies
22513da084b3Smrg#  -- PORTME fill in with the dynamic library characteristics
22523da084b3SmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
22533da084b3Smrg[AC_CACHE_CHECK([how to recognise dependent libraries],
22543da084b3Smrglt_cv_deplibs_check_method,
22553da084b3Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
22563da084b3Smrglt_cv_file_magic_test_file=
22573da084b3Smrglt_cv_deplibs_check_method='unknown'
22583da084b3Smrg# Need to set the preceding variable on all platforms that support
22593da084b3Smrg# interlibrary dependencies.
22603da084b3Smrg# 'none' -- dependencies not supported.
22613da084b3Smrg# `unknown' -- same as none, but documents that we really don't know.
22623da084b3Smrg# 'pass_all' -- all dependencies passed with no checks.
22633da084b3Smrg# 'test_compile' -- check by making test program.
22643da084b3Smrg# 'file_magic [[regex]]' -- check by looking for files in library path
22653da084b3Smrg# which responds to the $file_magic_cmd with a given extended regex.
22663da084b3Smrg# If you have `file' or equivalent on your system and you're not sure
22673da084b3Smrg# whether `pass_all' will *always* work, you probably want this one.
22683da084b3Smrg
22693da084b3Smrgcase $host_os in
22703da084b3Smrgaix4* | aix5*)
22713da084b3Smrg  lt_cv_deplibs_check_method=pass_all
22723da084b3Smrg  ;;
22733da084b3Smrg
22743da084b3Smrgbeos*)
22753da084b3Smrg  lt_cv_deplibs_check_method=pass_all
22763da084b3Smrg  ;;
22773da084b3Smrg
22783da084b3Smrgbsdi[[45]]*)
22793da084b3Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
22803da084b3Smrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
22813da084b3Smrg  lt_cv_file_magic_test_file=/shlib/libc.so
22823da084b3Smrg  ;;
22833da084b3Smrg
22843da084b3Smrgcygwin*)
22853da084b3Smrg  # func_win32_libid is a shell function defined in ltmain.sh
22863da084b3Smrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
22873da084b3Smrg  lt_cv_file_magic_cmd='func_win32_libid'
22883da084b3Smrg  ;;
22893da084b3Smrg
22903da084b3Smrgmingw* | pw32*)
22913da084b3Smrg  # Base MSYS/MinGW do not provide the 'file' command needed by
22923da084b3Smrg  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
22933da084b3Smrg  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
22943da084b3Smrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
22953da084b3Smrg  ;;
22963da084b3Smrg
22973da084b3Smrgdarwin* | rhapsody*)
22983da084b3Smrg  lt_cv_deplibs_check_method=pass_all
22993da084b3Smrg  ;;
23003da084b3Smrg
23013da084b3Smrgfreebsd* | dragonfly*)
23023da084b3Smrg  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
23033da084b3Smrg    case $host_cpu in
23043da084b3Smrg    i*86 )
23053da084b3Smrg      # Not sure whether the presence of OpenBSD here was a mistake.
23063da084b3Smrg      # Let's accept both of them until this is cleared up.
23073da084b3Smrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
23083da084b3Smrg      lt_cv_file_magic_cmd=/usr/bin/file
23093da084b3Smrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
23103da084b3Smrg      ;;
23113da084b3Smrg    esac
23123da084b3Smrg  else
23133da084b3Smrg    lt_cv_deplibs_check_method=pass_all
23143da084b3Smrg  fi
23153da084b3Smrg  ;;
23163da084b3Smrg
23173da084b3Smrggnu*)
23183da084b3Smrg  lt_cv_deplibs_check_method=pass_all
23193da084b3Smrg  ;;
23203da084b3Smrg
23213da084b3Smrghpux10.20* | hpux11*)
23223da084b3Smrg  lt_cv_file_magic_cmd=/usr/bin/file
23233da084b3Smrg  case $host_cpu in
23243da084b3Smrg  ia64*)
23253da084b3Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
23263da084b3Smrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
23273da084b3Smrg    ;;
23283da084b3Smrg  hppa*64*)
23293da084b3Smrg    [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]']
23303da084b3Smrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
23313da084b3Smrg    ;;
23323da084b3Smrg  *)
23333da084b3Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
23343da084b3Smrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
23353da084b3Smrg    ;;
23363da084b3Smrg  esac
23373da084b3Smrg  ;;
23383da084b3Smrg
23393da084b3Smrginterix3*)
23403da084b3Smrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
23413da084b3Smrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
23423da084b3Smrg  ;;
23433da084b3Smrg
23443da084b3Smrgirix5* | irix6* | nonstopux*)
23453da084b3Smrg  case $LD in
23463da084b3Smrg  *-32|*"-32 ") libmagic=32-bit;;
23473da084b3Smrg  *-n32|*"-n32 ") libmagic=N32;;
23483da084b3Smrg  *-64|*"-64 ") libmagic=64-bit;;
23493da084b3Smrg  *) libmagic=never-match;;
23503da084b3Smrg  esac
23513da084b3Smrg  lt_cv_deplibs_check_method=pass_all
23523da084b3Smrg  ;;
23533da084b3Smrg
23543da084b3Smrg# This must be Linux ELF.
23553da084b3Smrglinux* | k*bsd*-gnu)
23563da084b3Smrg  lt_cv_deplibs_check_method=pass_all
23573da084b3Smrg  ;;
23583da084b3Smrg
23593da084b3Smrgnetbsd* | netbsdelf*-gnu)
23603da084b3Smrg  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
23613da084b3Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
23623da084b3Smrg  else
23633da084b3Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
23643da084b3Smrg  fi
23653da084b3Smrg  ;;
23663da084b3Smrg
23673da084b3Smrgnewos6*)
23683da084b3Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
23693da084b3Smrg  lt_cv_file_magic_cmd=/usr/bin/file
23703da084b3Smrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
23713da084b3Smrg  ;;
23723da084b3Smrg
23733da084b3Smrgnto-qnx*)
23743da084b3Smrg  lt_cv_deplibs_check_method=unknown
23753da084b3Smrg  ;;
23763da084b3Smrg
23773da084b3Smrgopenbsd*)
23783da084b3Smrg  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
23793da084b3Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
23803da084b3Smrg  else
23813da084b3Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
23823da084b3Smrg  fi
23833da084b3Smrg  ;;
23843da084b3Smrg
23853da084b3Smrgosf3* | osf4* | osf5*)
23863da084b3Smrg  lt_cv_deplibs_check_method=pass_all
23873da084b3Smrg  ;;
23883da084b3Smrg
23893da084b3Smrgsolaris*)
23903da084b3Smrg  lt_cv_deplibs_check_method=pass_all
23913da084b3Smrg  ;;
23923da084b3Smrg
23933da084b3Smrgsysv4 | sysv4.3*)
23943da084b3Smrg  case $host_vendor in
23953da084b3Smrg  motorola)
23963da084b3Smrg    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]]'
23973da084b3Smrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
23983da084b3Smrg    ;;
23993da084b3Smrg  ncr)
24003da084b3Smrg    lt_cv_deplibs_check_method=pass_all
24013da084b3Smrg    ;;
24023da084b3Smrg  sequent)
24033da084b3Smrg    lt_cv_file_magic_cmd='/bin/file'
24043da084b3Smrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
24053da084b3Smrg    ;;
24063da084b3Smrg  sni)
24073da084b3Smrg    lt_cv_file_magic_cmd='/bin/file'
24083da084b3Smrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
24093da084b3Smrg    lt_cv_file_magic_test_file=/lib/libc.so
24103da084b3Smrg    ;;
24113da084b3Smrg  siemens)
24123da084b3Smrg    lt_cv_deplibs_check_method=pass_all
24133da084b3Smrg    ;;
24143da084b3Smrg  pc)
24153da084b3Smrg    lt_cv_deplibs_check_method=pass_all
24163da084b3Smrg    ;;
24173da084b3Smrg  esac
24183da084b3Smrg  ;;
24193da084b3Smrg
24203da084b3Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
24213da084b3Smrg  lt_cv_deplibs_check_method=pass_all
24223da084b3Smrg  ;;
24233da084b3Smrgesac
24243da084b3Smrg])
24253da084b3Smrgfile_magic_cmd=$lt_cv_file_magic_cmd
24263da084b3Smrgdeplibs_check_method=$lt_cv_deplibs_check_method
24273da084b3Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
24283da084b3Smrg])# AC_DEPLIBS_CHECK_METHOD
24293da084b3Smrg
24303da084b3Smrg
24313da084b3Smrg# AC_PROG_NM
24323da084b3Smrg# ----------
24333da084b3Smrg# find the pathname to a BSD-compatible name lister
24343da084b3SmrgAC_DEFUN([AC_PROG_NM],
24353da084b3Smrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
24363da084b3Smrg[if test -n "$NM"; then
24373da084b3Smrg  # Let the user override the test.
24383da084b3Smrg  lt_cv_path_NM="$NM"
24393da084b3Smrgelse
24403da084b3Smrg  lt_nm_to_check="${ac_tool_prefix}nm"
24413da084b3Smrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 
24423da084b3Smrg    lt_nm_to_check="$lt_nm_to_check nm"
24433da084b3Smrg  fi
24443da084b3Smrg  for lt_tmp_nm in $lt_nm_to_check; do
24453da084b3Smrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
24463da084b3Smrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
24473da084b3Smrg      IFS="$lt_save_ifs"
24483da084b3Smrg      test -z "$ac_dir" && ac_dir=.
24493da084b3Smrg      tmp_nm="$ac_dir/$lt_tmp_nm"
24503da084b3Smrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
24513da084b3Smrg	# Check to see if the nm accepts a BSD-compat flag.
24523da084b3Smrg	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
24533da084b3Smrg	#   nm: unknown option "B" ignored
24543da084b3Smrg	# Tru64's nm complains that /dev/null is an invalid object file
24553da084b3Smrg	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
24563da084b3Smrg	*/dev/null* | *'Invalid file or object type'*)
24573da084b3Smrg	  lt_cv_path_NM="$tmp_nm -B"
24583da084b3Smrg	  break
24593da084b3Smrg	  ;;
24603da084b3Smrg	*)
24613da084b3Smrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
24623da084b3Smrg	  */dev/null*)
24633da084b3Smrg	    lt_cv_path_NM="$tmp_nm -p"
24643da084b3Smrg	    break
24653da084b3Smrg	    ;;
24663da084b3Smrg	  *)
24673da084b3Smrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
24683da084b3Smrg	    continue # so that we can try to find one that supports BSD flags
24693da084b3Smrg	    ;;
24703da084b3Smrg	  esac
24713da084b3Smrg	  ;;
24723da084b3Smrg	esac
24733da084b3Smrg      fi
24743da084b3Smrg    done
24753da084b3Smrg    IFS="$lt_save_ifs"
24763da084b3Smrg  done
24773da084b3Smrg  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
24783da084b3Smrgfi])
24793da084b3SmrgNM="$lt_cv_path_NM"
24803da084b3Smrg])# AC_PROG_NM
24813da084b3Smrg
24823da084b3Smrg
24833da084b3Smrg# AC_CHECK_LIBM
24843da084b3Smrg# -------------
24853da084b3Smrg# check for math library
24863da084b3SmrgAC_DEFUN([AC_CHECK_LIBM],
24873da084b3Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
24883da084b3SmrgLIBM=
24893da084b3Smrgcase $host in
24903da084b3Smrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
24913da084b3Smrg  # These system don't have libm, or don't need it
24923da084b3Smrg  ;;
24933da084b3Smrg*-ncr-sysv4.3*)
24943da084b3Smrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
24953da084b3Smrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
24963da084b3Smrg  ;;
24973da084b3Smrg*)
24983da084b3Smrg  AC_CHECK_LIB(m, cos, LIBM="-lm")
24993da084b3Smrg  ;;
25003da084b3Smrgesac
25013da084b3Smrg])# AC_CHECK_LIBM
25023da084b3Smrg
25033da084b3Smrg
25043da084b3Smrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
25053da084b3Smrg# -----------------------------------
25063da084b3Smrg# sets LIBLTDL to the link flags for the libltdl convenience library and
25073da084b3Smrg# LTDLINCL to the include flags for the libltdl header and adds
25083da084b3Smrg# --enable-ltdl-convenience to the configure arguments.  Note that
25093da084b3Smrg# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
25103da084b3Smrg# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
25113da084b3Smrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
25123da084b3Smrg# (note the single quotes!).  If your package is not flat and you're not
25133da084b3Smrg# using automake, define top_builddir and top_srcdir appropriately in
25143da084b3Smrg# the Makefiles.
25153da084b3SmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE],
25163da084b3Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
25173da084b3Smrg  case $enable_ltdl_convenience in
25183da084b3Smrg  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
25193da084b3Smrg  "") enable_ltdl_convenience=yes
25203da084b3Smrg      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
25213da084b3Smrg  esac
25223da084b3Smrg  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
25233da084b3Smrg  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
25243da084b3Smrg  # For backwards non-gettext consistent compatibility...
25253da084b3Smrg  INCLTDL="$LTDLINCL"
25263da084b3Smrg])# AC_LIBLTDL_CONVENIENCE
25273da084b3Smrg
25283da084b3Smrg
25293da084b3Smrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
25303da084b3Smrg# -----------------------------------
25313da084b3Smrg# sets LIBLTDL to the link flags for the libltdl installable library and
25323da084b3Smrg# LTDLINCL to the include flags for the libltdl header and adds
25333da084b3Smrg# --enable-ltdl-install to the configure arguments.  Note that
25343da084b3Smrg# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
25353da084b3Smrg# and an installed libltdl is not found, it is assumed to be `libltdl'.
25363da084b3Smrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
25373da084b3Smrg# '${top_srcdir}/' (note the single quotes!).  If your package is not
25383da084b3Smrg# flat and you're not using automake, define top_builddir and top_srcdir
25393da084b3Smrg# appropriately in the Makefiles.
25403da084b3Smrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
25413da084b3SmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE],
25423da084b3Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
25433da084b3Smrg  AC_CHECK_LIB(ltdl, lt_dlinit,
25443da084b3Smrg  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
25453da084b3Smrg  [if test x"$enable_ltdl_install" = xno; then
25463da084b3Smrg     AC_MSG_WARN([libltdl not installed, but installation disabled])
25473da084b3Smrg   else
25483da084b3Smrg     enable_ltdl_install=yes
25493da084b3Smrg   fi
25503da084b3Smrg  ])
25513da084b3Smrg  if test x"$enable_ltdl_install" = x"yes"; then
25523da084b3Smrg    ac_configure_args="$ac_configure_args --enable-ltdl-install"
25533da084b3Smrg    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
25543da084b3Smrg    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
25553da084b3Smrg  else
25563da084b3Smrg    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
25573da084b3Smrg    LIBLTDL="-lltdl"
25583da084b3Smrg    LTDLINCL=
25593da084b3Smrg  fi
25603da084b3Smrg  # For backwards non-gettext consistent compatibility...
25613da084b3Smrg  INCLTDL="$LTDLINCL"
25623da084b3Smrg])# AC_LIBLTDL_INSTALLABLE
25633da084b3Smrg
25643da084b3Smrg
25653da084b3Smrg# AC_LIBTOOL_CXX
25663da084b3Smrg# --------------
25673da084b3Smrg# enable support for C++ libraries
25683da084b3SmrgAC_DEFUN([AC_LIBTOOL_CXX],
25693da084b3Smrg[AC_REQUIRE([_LT_AC_LANG_CXX])
25703da084b3Smrg])# AC_LIBTOOL_CXX
25713da084b3Smrg
25723da084b3Smrg
25733da084b3Smrg# _LT_AC_LANG_CXX
25743da084b3Smrg# ---------------
25753da084b3SmrgAC_DEFUN([_LT_AC_LANG_CXX],
25763da084b3Smrg[AC_REQUIRE([AC_PROG_CXX])
25773da084b3SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP])
25783da084b3Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
25793da084b3Smrg])# _LT_AC_LANG_CXX
25803da084b3Smrg
25813da084b3Smrg# _LT_AC_PROG_CXXCPP
25823da084b3Smrg# ------------------
25833da084b3SmrgAC_DEFUN([_LT_AC_PROG_CXXCPP],
25843da084b3Smrg[
25853da084b3SmrgAC_REQUIRE([AC_PROG_CXX])
25863da084b3Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
25873da084b3Smrg    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
25883da084b3Smrg    (test "X$CXX" != "Xg++"))) ; then
25893da084b3Smrg  AC_PROG_CXXCPP
25903da084b3Smrgfi
25913da084b3Smrg])# _LT_AC_PROG_CXXCPP
25923da084b3Smrg
25933da084b3Smrg# AC_LIBTOOL_F77
25943da084b3Smrg# --------------
25953da084b3Smrg# enable support for Fortran 77 libraries
25963da084b3SmrgAC_DEFUN([AC_LIBTOOL_F77],
25973da084b3Smrg[AC_REQUIRE([_LT_AC_LANG_F77])
25983da084b3Smrg])# AC_LIBTOOL_F77
25993da084b3Smrg
26003da084b3Smrg
26013da084b3Smrg# _LT_AC_LANG_F77
26023da084b3Smrg# ---------------
26033da084b3SmrgAC_DEFUN([_LT_AC_LANG_F77],
26043da084b3Smrg[AC_REQUIRE([AC_PROG_F77])
26053da084b3Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
26063da084b3Smrg])# _LT_AC_LANG_F77
26073da084b3Smrg
26083da084b3Smrg
26093da084b3Smrg# AC_LIBTOOL_GCJ
26103da084b3Smrg# --------------
26113da084b3Smrg# enable support for GCJ libraries
26123da084b3SmrgAC_DEFUN([AC_LIBTOOL_GCJ],
26133da084b3Smrg[AC_REQUIRE([_LT_AC_LANG_GCJ])
26143da084b3Smrg])# AC_LIBTOOL_GCJ
26153da084b3Smrg
26163da084b3Smrg
26173da084b3Smrg# _LT_AC_LANG_GCJ
26183da084b3Smrg# ---------------
26193da084b3SmrgAC_DEFUN([_LT_AC_LANG_GCJ],
26203da084b3Smrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
26213da084b3Smrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
26223da084b3Smrg    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
26233da084b3Smrg      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
26243da084b3Smrg	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
26253da084b3Smrg	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
26263da084b3Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
26273da084b3Smrg])# _LT_AC_LANG_GCJ
26283da084b3Smrg
26293da084b3Smrg
26303da084b3Smrg# AC_LIBTOOL_RC
26313da084b3Smrg# -------------
26323da084b3Smrg# enable support for Windows resource files
26333da084b3SmrgAC_DEFUN([AC_LIBTOOL_RC],
26343da084b3Smrg[AC_REQUIRE([LT_AC_PROG_RC])
26353da084b3Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
26363da084b3Smrg])# AC_LIBTOOL_RC
26373da084b3Smrg
26383da084b3Smrg
26393da084b3Smrg# AC_LIBTOOL_LANG_C_CONFIG
26403da084b3Smrg# ------------------------
26413da084b3Smrg# Ensure that the configuration vars for the C compiler are
26423da084b3Smrg# suitably defined.  Those variables are subsequently used by
26433da084b3Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
26443da084b3SmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
26453da084b3SmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG],
26463da084b3Smrg[lt_save_CC="$CC"
26473da084b3SmrgAC_LANG_PUSH(C)
26483da084b3Smrg
26493da084b3Smrg# Source file extension for C test sources.
26503da084b3Smrgac_ext=c
26513da084b3Smrg
26523da084b3Smrg# Object file extension for compiled C test sources.
26533da084b3Smrgobjext=o
26543da084b3Smrg_LT_AC_TAGVAR(objext, $1)=$objext
26553da084b3Smrg
26563da084b3Smrg# Code to be used in simple compile tests
26573da084b3Smrglt_simple_compile_test_code="int some_variable = 0;\n"
26583da084b3Smrg
26593da084b3Smrg# Code to be used in simple link tests
26603da084b3Smrglt_simple_link_test_code='int main(){return(0);}\n'
26613da084b3Smrg
26623da084b3Smrg_LT_AC_SYS_COMPILER
26633da084b3Smrg
26643da084b3Smrg# save warnings/boilerplate of simple test code
26653da084b3Smrg_LT_COMPILER_BOILERPLATE
26663da084b3Smrg_LT_LINKER_BOILERPLATE
26673da084b3Smrg
26683da084b3SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
26693da084b3SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
26703da084b3SmrgAC_LIBTOOL_PROG_CC_C_O($1)
26713da084b3SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
26723da084b3SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
26733da084b3SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
26743da084b3SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
26753da084b3SmrgAC_LIBTOOL_SYS_LIB_STRIP
26763da084b3SmrgAC_LIBTOOL_DLOPEN_SELF
26773da084b3Smrg
26783da084b3Smrg# Report which library types will actually be built
26793da084b3SmrgAC_MSG_CHECKING([if libtool supports shared libraries])
26803da084b3SmrgAC_MSG_RESULT([$can_build_shared])
26813da084b3Smrg
26823da084b3SmrgAC_MSG_CHECKING([whether to build shared libraries])
26833da084b3Smrgtest "$can_build_shared" = "no" && enable_shared=no
26843da084b3Smrg
26853da084b3Smrg# On AIX, shared libraries and static libraries use the same namespace, and
26863da084b3Smrg# are all built from PIC.
26873da084b3Smrgcase $host_os in
26883da084b3Smrgaix3*)
26893da084b3Smrg  test "$enable_shared" = yes && enable_static=no
26903da084b3Smrg  if test -n "$RANLIB"; then
26913da084b3Smrg    archive_cmds="$archive_cmds~\$RANLIB \$lib"
26923da084b3Smrg    postinstall_cmds='$RANLIB $lib'
26933da084b3Smrg  fi
26943da084b3Smrg  ;;
26953da084b3Smrg
26963da084b3Smrgaix4* | aix5*)
26973da084b3Smrg  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
26983da084b3Smrg    test "$enable_shared" = yes && enable_static=no
26993da084b3Smrg  fi
27003da084b3Smrg    ;;
27013da084b3Smrgesac
27023da084b3SmrgAC_MSG_RESULT([$enable_shared])
27033da084b3Smrg
27043da084b3SmrgAC_MSG_CHECKING([whether to build static libraries])
27053da084b3Smrg# Make sure either enable_shared or enable_static is yes.
27063da084b3Smrgtest "$enable_shared" = yes || enable_static=yes
27073da084b3SmrgAC_MSG_RESULT([$enable_static])
27083da084b3Smrg
27093da084b3SmrgAC_LIBTOOL_CONFIG($1)
27103da084b3Smrg
27113da084b3SmrgAC_LANG_POP
27123da084b3SmrgCC="$lt_save_CC"
27133da084b3Smrg])# AC_LIBTOOL_LANG_C_CONFIG
27143da084b3Smrg
27153da084b3Smrg
27163da084b3Smrg# AC_LIBTOOL_LANG_CXX_CONFIG
27173da084b3Smrg# --------------------------
27183da084b3Smrg# Ensure that the configuration vars for the C compiler are
27193da084b3Smrg# suitably defined.  Those variables are subsequently used by
27203da084b3Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
27213da084b3SmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
27223da084b3SmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
27233da084b3Smrg[AC_LANG_PUSH(C++)
27243da084b3SmrgAC_REQUIRE([AC_PROG_CXX])
27253da084b3SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP])
27263da084b3Smrg
27273da084b3Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
27283da084b3Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)=
27293da084b3Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no
27303da084b3Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
27313da084b3Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
27323da084b3Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no
27333da084b3Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
27343da084b3Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
27353da084b3Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
27363da084b3Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
27373da084b3Smrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
27383da084b3Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no
27393da084b3Smrg_LT_AC_TAGVAR(module_cmds, $1)=
27403da084b3Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)=
27413da084b3Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
27423da084b3Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
27433da084b3Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)=
27443da084b3Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
27453da084b3Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
27463da084b3Smrg
27473da084b3Smrg# Dependencies to place before and after the object being linked:
27483da084b3Smrg_LT_AC_TAGVAR(predep_objects, $1)=
27493da084b3Smrg_LT_AC_TAGVAR(postdep_objects, $1)=
27503da084b3Smrg_LT_AC_TAGVAR(predeps, $1)=
27513da084b3Smrg_LT_AC_TAGVAR(postdeps, $1)=
27523da084b3Smrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
27533da084b3Smrg
27543da084b3Smrg# Source file extension for C++ test sources.
27553da084b3Smrgac_ext=cpp
27563da084b3Smrg
27573da084b3Smrg# Object file extension for compiled C++ test sources.
27583da084b3Smrgobjext=o
27593da084b3Smrg_LT_AC_TAGVAR(objext, $1)=$objext
27603da084b3Smrg
27613da084b3Smrg# Code to be used in simple compile tests
27623da084b3Smrglt_simple_compile_test_code="int some_variable = 0;\n"
27633da084b3Smrg
27643da084b3Smrg# Code to be used in simple link tests
27653da084b3Smrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
27663da084b3Smrg
27673da084b3Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
27683da084b3Smrg_LT_AC_SYS_COMPILER
27693da084b3Smrg
27703da084b3Smrg# save warnings/boilerplate of simple test code
27713da084b3Smrg_LT_COMPILER_BOILERPLATE
27723da084b3Smrg_LT_LINKER_BOILERPLATE
27733da084b3Smrg
27743da084b3Smrg# Allow CC to be a program name with arguments.
27753da084b3Smrglt_save_CC=$CC
27763da084b3Smrglt_save_LD=$LD
27773da084b3Smrglt_save_GCC=$GCC
27783da084b3SmrgGCC=$GXX
27793da084b3Smrglt_save_with_gnu_ld=$with_gnu_ld
27803da084b3Smrglt_save_path_LD=$lt_cv_path_LD
27813da084b3Smrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
27823da084b3Smrg  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
27833da084b3Smrgelse
27843da084b3Smrg  $as_unset lt_cv_prog_gnu_ld
27853da084b3Smrgfi
27863da084b3Smrgif test -n "${lt_cv_path_LDCXX+set}"; then
27873da084b3Smrg  lt_cv_path_LD=$lt_cv_path_LDCXX
27883da084b3Smrgelse
27893da084b3Smrg  $as_unset lt_cv_path_LD
27903da084b3Smrgfi
27913da084b3Smrgtest -z "${LDCXX+set}" || LD=$LDCXX
27923da084b3SmrgCC=${CXX-"c++"}
27933da084b3Smrgcompiler=$CC
27943da084b3Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
27953da084b3Smrg_LT_CC_BASENAME([$compiler])
27963da084b3Smrg
27973da084b3Smrg# We don't want -fno-exception wen compiling C++ code, so set the
27983da084b3Smrg# no_builtin_flag separately
27993da084b3Smrgif test "$GXX" = yes; then
28003da084b3Smrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
28013da084b3Smrgelse
28023da084b3Smrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
28033da084b3Smrgfi
28043da084b3Smrg
28053da084b3Smrgif test "$GXX" = yes; then
28063da084b3Smrg  # Set up default GNU C++ configuration
28073da084b3Smrg
28083da084b3Smrg  AC_PROG_LD
28093da084b3Smrg
28103da084b3Smrg  # Check if GNU C++ uses GNU ld as the underlying linker, since the
28113da084b3Smrg  # archiving commands below assume that GNU ld is being used.
28123da084b3Smrg  if test "$with_gnu_ld" = yes; then
28133da084b3Smrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
28143da084b3Smrg    _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'
28153da084b3Smrg
28163da084b3Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
28173da084b3Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
28183da084b3Smrg
28193da084b3Smrg    # If archive_cmds runs LD, not CC, wlarc should be empty
28203da084b3Smrg    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
28213da084b3Smrg    #     investigate it a little bit more. (MM)
28223da084b3Smrg    wlarc='${wl}'
28233da084b3Smrg
28243da084b3Smrg    # ancient GNU ld didn't support --whole-archive et. al.
28253da084b3Smrg    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
28263da084b3Smrg	grep 'no-whole-archive' > /dev/null; then
28273da084b3Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
28283da084b3Smrg    else
28293da084b3Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
28303da084b3Smrg    fi
28313da084b3Smrg  else
28323da084b3Smrg    with_gnu_ld=no
28333da084b3Smrg    wlarc=
28343da084b3Smrg
28353da084b3Smrg    # A generic and very simple default shared library creation
28363da084b3Smrg    # command for GNU C++ for the case where it uses the native
28373da084b3Smrg    # linker, instead of GNU ld.  If possible, this setting should
28383da084b3Smrg    # overridden to take advantage of the native linker features on
28393da084b3Smrg    # the platform it is being used on.
28403da084b3Smrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
28413da084b3Smrg  fi
28423da084b3Smrg
28433da084b3Smrg  # Commands to make compiler produce verbose output that lists
28443da084b3Smrg  # what "hidden" libraries, object files and flags are used when
28453da084b3Smrg  # linking a shared library.
28463da084b3Smrg  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
28473da084b3Smrg
28483da084b3Smrgelse
28493da084b3Smrg  GXX=no
28503da084b3Smrg  with_gnu_ld=no
28513da084b3Smrg  wlarc=
28523da084b3Smrgfi
28533da084b3Smrg
28543da084b3Smrg# PORTME: fill in a description of your system's C++ link characteristics
28553da084b3SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
28563da084b3Smrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes
28573da084b3Smrgcase $host_os in
28583da084b3Smrg  aix3*)
28593da084b3Smrg    # FIXME: insert proper C++ library support
28603da084b3Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
28613da084b3Smrg    ;;
28623da084b3Smrg  aix4* | aix5*)
28633da084b3Smrg    if test "$host_cpu" = ia64; then
28643da084b3Smrg      # On IA64, the linker does run time linking by default, so we don't
28653da084b3Smrg      # have to do anything special.
28663da084b3Smrg      aix_use_runtimelinking=no
28673da084b3Smrg      exp_sym_flag='-Bexport'
28683da084b3Smrg      no_entry_flag=""
28693da084b3Smrg    else
28703da084b3Smrg      aix_use_runtimelinking=no
28713da084b3Smrg
28723da084b3Smrg      # Test if we are trying to use run time linking or normal
28733da084b3Smrg      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
28743da084b3Smrg      # need to do runtime linking.
28753da084b3Smrg      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
28763da084b3Smrg	for ld_flag in $LDFLAGS; do
28773da084b3Smrg	  case $ld_flag in
28783da084b3Smrg	  *-brtl*)
28793da084b3Smrg	    aix_use_runtimelinking=yes
28803da084b3Smrg	    break
28813da084b3Smrg	    ;;
28823da084b3Smrg	  esac
28833da084b3Smrg	done
28843da084b3Smrg	;;
28853da084b3Smrg      esac
28863da084b3Smrg
28873da084b3Smrg      exp_sym_flag='-bexport'
28883da084b3Smrg      no_entry_flag='-bnoentry'
28893da084b3Smrg    fi
28903da084b3Smrg
28913da084b3Smrg    # When large executables or shared objects are built, AIX ld can
28923da084b3Smrg    # have problems creating the table of contents.  If linking a library
28933da084b3Smrg    # or program results in "error TOC overflow" add -mminimal-toc to
28943da084b3Smrg    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
28953da084b3Smrg    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
28963da084b3Smrg
28973da084b3Smrg    _LT_AC_TAGVAR(archive_cmds, $1)=''
28983da084b3Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
28993da084b3Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
29003da084b3Smrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
29013da084b3Smrg
29023da084b3Smrg    if test "$GXX" = yes; then
29033da084b3Smrg      case $host_os in aix4.[[012]]|aix4.[[012]].*)
29043da084b3Smrg      # We only want to do this on AIX 4.2 and lower, the check
29053da084b3Smrg      # below for broken collect2 doesn't work under 4.3+
29063da084b3Smrg	collect2name=`${CC} -print-prog-name=collect2`
29073da084b3Smrg	if test -f "$collect2name" && \
29083da084b3Smrg	   strings "$collect2name" | grep resolve_lib_name >/dev/null
29093da084b3Smrg	then
29103da084b3Smrg	  # We have reworked collect2
29113da084b3Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
29123da084b3Smrg	else
29133da084b3Smrg	  # We have old collect2
29143da084b3Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
29153da084b3Smrg	  # It fails to find uninstalled libraries when the uninstalled
29163da084b3Smrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
29173da084b3Smrg	  # to unsupported forces relinking
29183da084b3Smrg	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
29193da084b3Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
29203da084b3Smrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
29213da084b3Smrg	fi
29223da084b3Smrg	;;
29233da084b3Smrg      esac
29243da084b3Smrg      shared_flag='-shared'
29253da084b3Smrg      if test "$aix_use_runtimelinking" = yes; then
29263da084b3Smrg	shared_flag="$shared_flag "'${wl}-G'
29273da084b3Smrg      fi
29283da084b3Smrg    else
29293da084b3Smrg      # not using gcc
29303da084b3Smrg      if test "$host_cpu" = ia64; then
29313da084b3Smrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
29323da084b3Smrg	# chokes on -Wl,-G. The following line is correct:
29333da084b3Smrg	shared_flag='-G'
29343da084b3Smrg      else
29353da084b3Smrg	if test "$aix_use_runtimelinking" = yes; then
29363da084b3Smrg	  shared_flag='${wl}-G'
29373da084b3Smrg	else
29383da084b3Smrg	  shared_flag='${wl}-bM:SRE'
29393da084b3Smrg	fi
29403da084b3Smrg      fi
29413da084b3Smrg    fi
29423da084b3Smrg
29433da084b3Smrg    # It seems that -bexpall does not export symbols beginning with
29443da084b3Smrg    # underscore (_), so it is better to generate a list of symbols to export.
29453da084b3Smrg    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
29463da084b3Smrg    if test "$aix_use_runtimelinking" = yes; then
29473da084b3Smrg      # Warning - without using the other runtime loading flags (-brtl),
29483da084b3Smrg      # -berok will link without error, but may produce a broken library.
29493da084b3Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
29503da084b3Smrg      # Determine the default libpath from the value encoded in an empty executable.
29513da084b3Smrg      _LT_AC_SYS_LIBPATH_AIX
29523da084b3Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
29533da084b3Smrg
29543da084b3Smrg      _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"
29553da084b3Smrg     else
29563da084b3Smrg      if test "$host_cpu" = ia64; then
29573da084b3Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
29583da084b3Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
29593da084b3Smrg	_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"
29603da084b3Smrg      else
29613da084b3Smrg	# Determine the default libpath from the value encoded in an empty executable.
29623da084b3Smrg	_LT_AC_SYS_LIBPATH_AIX
29633da084b3Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
29643da084b3Smrg	# Warning - without using the other run time loading flags,
29653da084b3Smrg	# -berok will link without error, but may produce a broken library.
29663da084b3Smrg	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
29673da084b3Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
29683da084b3Smrg	# Exported symbols can be pulled into shared objects from archives
29693da084b3Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
29703da084b3Smrg	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
29713da084b3Smrg	# This is similar to how AIX traditionally builds its shared libraries.
29723da084b3Smrg	_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'
29733da084b3Smrg      fi
29743da084b3Smrg    fi
29753da084b3Smrg    ;;
29763da084b3Smrg
29773da084b3Smrg  beos*)
29783da084b3Smrg    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
29793da084b3Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
29803da084b3Smrg      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
29813da084b3Smrg      # support --undefined.  This deserves some investigation.  FIXME
29823da084b3Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
29833da084b3Smrg    else
29843da084b3Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
29853da084b3Smrg    fi
29863da084b3Smrg    ;;
29873da084b3Smrg
29883da084b3Smrg  chorus*)
29893da084b3Smrg    case $cc_basename in
29903da084b3Smrg      *)
29913da084b3Smrg	# FIXME: insert proper C++ library support
29923da084b3Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
29933da084b3Smrg	;;
29943da084b3Smrg    esac
29953da084b3Smrg    ;;
29963da084b3Smrg
29973da084b3Smrg  cygwin* | mingw* | pw32*)
29983da084b3Smrg    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
29993da084b3Smrg    # as there is no search path for DLLs.
30003da084b3Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
30013da084b3Smrg    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
30023da084b3Smrg    _LT_AC_TAGVAR(always_export_symbols, $1)=no
30033da084b3Smrg    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
30043da084b3Smrg
30053da084b3Smrg    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
30063da084b3Smrg      _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'
30073da084b3Smrg      # If the export-symbols file already is a .def file (1st line
30083da084b3Smrg      # is EXPORTS), use it as is; otherwise, prepend...
30093da084b3Smrg      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
30103da084b3Smrg	cp $export_symbols $output_objdir/$soname.def;
30113da084b3Smrg      else
30123da084b3Smrg	echo EXPORTS > $output_objdir/$soname.def;
30133da084b3Smrg	cat $export_symbols >> $output_objdir/$soname.def;
30143da084b3Smrg      fi~
30153da084b3Smrg      $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'
30163da084b3Smrg    else
30173da084b3Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
30183da084b3Smrg    fi
30193da084b3Smrg  ;;
30203da084b3Smrg      darwin* | rhapsody*)
30213da084b3Smrg        case $host_os in
30223da084b3Smrg        rhapsody* | darwin1.[[012]])
30233da084b3Smrg         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
30243da084b3Smrg         ;;
30253da084b3Smrg       *) # Darwin 1.3 on
30263da084b3Smrg         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
30273da084b3Smrg           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
30283da084b3Smrg         else
30293da084b3Smrg           case ${MACOSX_DEPLOYMENT_TARGET} in
30303da084b3Smrg             10.[[012]])
30313da084b3Smrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
30323da084b3Smrg               ;;
30333da084b3Smrg             10.*)
30343da084b3Smrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
30353da084b3Smrg               ;;
30363da084b3Smrg           esac
30373da084b3Smrg         fi
30383da084b3Smrg         ;;
30393da084b3Smrg        esac
30403da084b3Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
30413da084b3Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
30423da084b3Smrg      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
30433da084b3Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
30443da084b3Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
30453da084b3Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
30463da084b3Smrg
30473da084b3Smrg    if test "$GXX" = yes ; then
30483da084b3Smrg      lt_int_apple_cc_single_mod=no
30493da084b3Smrg      output_verbose_link_cmd='echo'
30503da084b3Smrg      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
30513da084b3Smrg       lt_int_apple_cc_single_mod=yes
30523da084b3Smrg      fi
30533da084b3Smrg      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
30543da084b3Smrg       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
30553da084b3Smrg      else
30563da084b3Smrg          _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'
30573da084b3Smrg        fi
30583da084b3Smrg        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
30593da084b3Smrg        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
30603da084b3Smrg          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
30613da084b3Smrg            _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}'
30623da084b3Smrg          else
30633da084b3Smrg            _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}'
30643da084b3Smrg          fi
30653da084b3Smrg            _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}'
30663da084b3Smrg      else
30673da084b3Smrg      case $cc_basename in
30683da084b3Smrg        xlc*)
30693da084b3Smrg         output_verbose_link_cmd='echo'
30703da084b3Smrg          _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'
30713da084b3Smrg          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
30723da084b3Smrg          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
30733da084b3Smrg          _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}'
30743da084b3Smrg          _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}'
30753da084b3Smrg          ;;
30763da084b3Smrg       *)
30773da084b3Smrg         _LT_AC_TAGVAR(ld_shlibs, $1)=no
30783da084b3Smrg          ;;
30793da084b3Smrg      esac
30803da084b3Smrg      fi
30813da084b3Smrg        ;;
30823da084b3Smrg
30833da084b3Smrg  dgux*)
30843da084b3Smrg    case $cc_basename in
30853da084b3Smrg      ec++*)
30863da084b3Smrg	# FIXME: insert proper C++ library support
30873da084b3Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
30883da084b3Smrg	;;
30893da084b3Smrg      ghcx*)
30903da084b3Smrg	# Green Hills C++ Compiler
30913da084b3Smrg	# FIXME: insert proper C++ library support
30923da084b3Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
30933da084b3Smrg	;;
30943da084b3Smrg      *)
30953da084b3Smrg	# FIXME: insert proper C++ library support
30963da084b3Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
30973da084b3Smrg	;;
30983da084b3Smrg    esac
30993da084b3Smrg    ;;
31003da084b3Smrg  freebsd[[12]]*)
31013da084b3Smrg    # C++ shared libraries reported to be fairly broken before switch to ELF
31023da084b3Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
31033da084b3Smrg    ;;
31043da084b3Smrg  freebsd-elf*)
31053da084b3Smrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
31063da084b3Smrg    ;;
31073da084b3Smrg  freebsd* | dragonfly*)
31083da084b3Smrg    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
31093da084b3Smrg    # conventions
31103da084b3Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
31113da084b3Smrg    ;;
31123da084b3Smrg  gnu*)
31133da084b3Smrg    ;;
31143da084b3Smrg  hpux9*)
31153da084b3Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
31163da084b3Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
31173da084b3Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
31183da084b3Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
31193da084b3Smrg    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
31203da084b3Smrg				# but as the default
31213da084b3Smrg				# location of the library.
31223da084b3Smrg
31233da084b3Smrg    case $cc_basename in
31243da084b3Smrg    CC*)
31253da084b3Smrg      # FIXME: insert proper C++ library support
31263da084b3Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
31273da084b3Smrg      ;;
31283da084b3Smrg    aCC*)
31293da084b3Smrg      _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'
31303da084b3Smrg      # Commands to make compiler produce verbose output that lists
31313da084b3Smrg      # what "hidden" libraries, object files and flags are used when
31323da084b3Smrg      # linking a shared library.
31333da084b3Smrg      #
31343da084b3Smrg      # There doesn't appear to be a way to prevent this compiler from
31353da084b3Smrg      # explicitly linking system object files so we need to strip them
31363da084b3Smrg      # from the output so that they don't get included in the library
31373da084b3Smrg      # dependencies.
31383da084b3Smrg      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'
31393da084b3Smrg      ;;
31403da084b3Smrg    *)
31413da084b3Smrg      if test "$GXX" = yes; then
31423da084b3Smrg        _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'
31433da084b3Smrg      else
31443da084b3Smrg        # FIXME: insert proper C++ library support
31453da084b3Smrg        _LT_AC_TAGVAR(ld_shlibs, $1)=no
31463da084b3Smrg      fi
31473da084b3Smrg      ;;
31483da084b3Smrg    esac
31493da084b3Smrg    ;;
31503da084b3Smrg  hpux10*|hpux11*)
31513da084b3Smrg    if test $with_gnu_ld = no; then
31523da084b3Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
31533da084b3Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
31543da084b3Smrg
31553da084b3Smrg      case $host_cpu in
31563da084b3Smrg      hppa*64*|ia64*)
31573da084b3Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
31583da084b3Smrg        ;;
31593da084b3Smrg      *)
31603da084b3Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
31613da084b3Smrg        ;;
31623da084b3Smrg      esac
31633da084b3Smrg    fi
31643da084b3Smrg    case $host_cpu in
31653da084b3Smrg    hppa*64*|ia64*)
31663da084b3Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
31673da084b3Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
31683da084b3Smrg      ;;
31693da084b3Smrg    *)
31703da084b3Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
31713da084b3Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
31723da084b3Smrg					      # but as the default
31733da084b3Smrg					      # location of the library.
31743da084b3Smrg      ;;
31753da084b3Smrg    esac
31763da084b3Smrg
31773da084b3Smrg    case $cc_basename in
31783da084b3Smrg      CC*)
31793da084b3Smrg	# FIXME: insert proper C++ library support
31803da084b3Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
31813da084b3Smrg	;;
31823da084b3Smrg      aCC*)
31833da084b3Smrg	case $host_cpu in
31843da084b3Smrg	hppa*64*)
31853da084b3Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
31863da084b3Smrg	  ;;
31873da084b3Smrg	ia64*)
31883da084b3Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
31893da084b3Smrg	  ;;
31903da084b3Smrg	*)
31913da084b3Smrg	  _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'
31923da084b3Smrg	  ;;
31933da084b3Smrg	esac
31943da084b3Smrg	# Commands to make compiler produce verbose output that lists
31953da084b3Smrg	# what "hidden" libraries, object files and flags are used when
31963da084b3Smrg	# linking a shared library.
31973da084b3Smrg	#
31983da084b3Smrg	# There doesn't appear to be a way to prevent this compiler from
31993da084b3Smrg	# explicitly linking system object files so we need to strip them
32003da084b3Smrg	# from the output so that they don't get included in the library
32013da084b3Smrg	# dependencies.
32023da084b3Smrg	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'
32033da084b3Smrg	;;
32043da084b3Smrg      *)
32053da084b3Smrg	if test "$GXX" = yes; then
32063da084b3Smrg	  if test $with_gnu_ld = no; then
32073da084b3Smrg	    case $host_cpu in
32083da084b3Smrg	    hppa*64*)
32093da084b3Smrg	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
32103da084b3Smrg	      ;;
32113da084b3Smrg	    ia64*)
32123da084b3Smrg	      _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'
32133da084b3Smrg	      ;;
32143da084b3Smrg	    *)
32153da084b3Smrg	      _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'
32163da084b3Smrg	      ;;
32173da084b3Smrg	    esac
32183da084b3Smrg	  fi
32193da084b3Smrg	else
32203da084b3Smrg	  # FIXME: insert proper C++ library support
32213da084b3Smrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
32223da084b3Smrg	fi
32233da084b3Smrg	;;
32243da084b3Smrg    esac
32253da084b3Smrg    ;;
32263da084b3Smrg  interix3*)
32273da084b3Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=no
32283da084b3Smrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
32293da084b3Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
32303da084b3Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
32313da084b3Smrg    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
32323da084b3Smrg    # Instead, shared libraries are loaded at an image base (0x10000000 by
32333da084b3Smrg    # default) and relocated if they conflict, which is a slow very memory
32343da084b3Smrg    # consuming and fragmenting process.  To avoid this, we pick a random,
32353da084b3Smrg    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
32363da084b3Smrg    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
32373da084b3Smrg    _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'
32383da084b3Smrg    _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'
32393da084b3Smrg    ;;
32403da084b3Smrg  irix5* | irix6*)
32413da084b3Smrg    case $cc_basename in
32423da084b3Smrg      CC*)
32433da084b3Smrg	# SGI C++
32443da084b3Smrg	_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'
32453da084b3Smrg
32463da084b3Smrg	# Archives containing C++ object files must be created using
32473da084b3Smrg	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
32483da084b3Smrg	# necessary to make sure instantiated templates are included
32493da084b3Smrg	# in the archive.
32503da084b3Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
32513da084b3Smrg	;;
32523da084b3Smrg      *)
32533da084b3Smrg	if test "$GXX" = yes; then
32543da084b3Smrg	  if test "$with_gnu_ld" = no; then
32553da084b3Smrg	    _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'
32563da084b3Smrg	  else
32573da084b3Smrg	    _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'
32583da084b3Smrg	  fi
32593da084b3Smrg	fi
32603da084b3Smrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
32613da084b3Smrg	;;
32623da084b3Smrg    esac
32633da084b3Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
32643da084b3Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
32653da084b3Smrg    ;;
32663da084b3Smrg  linux* | k*bsd*-gnu)
32673da084b3Smrg    case $cc_basename in
32683da084b3Smrg      KCC*)
32693da084b3Smrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
32703da084b3Smrg
32713da084b3Smrg	# KCC will only create a shared library if the output file
32723da084b3Smrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
32733da084b3Smrg	# to its proper name (with version) after linking.
32743da084b3Smrg	_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'
32753da084b3Smrg	_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'
32763da084b3Smrg	# Commands to make compiler produce verbose output that lists
32773da084b3Smrg	# what "hidden" libraries, object files and flags are used when
32783da084b3Smrg	# linking a shared library.
32793da084b3Smrg	#
32803da084b3Smrg	# There doesn't appear to be a way to prevent this compiler from
32813da084b3Smrg	# explicitly linking system object files so we need to strip them
32823da084b3Smrg	# from the output so that they don't get included in the library
32833da084b3Smrg	# dependencies.
32843da084b3Smrg	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'
32853da084b3Smrg
32863da084b3Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
32873da084b3Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
32883da084b3Smrg
32893da084b3Smrg	# Archives containing C++ object files must be created using
32903da084b3Smrg	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
32913da084b3Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
32923da084b3Smrg	;;
32933da084b3Smrg      icpc*)
32943da084b3Smrg	# Intel C++
32953da084b3Smrg	with_gnu_ld=yes
32963da084b3Smrg	# version 8.0 and above of icpc choke on multiply defined symbols
32973da084b3Smrg	# if we add $predep_objects and $postdep_objects, however 7.1 and
32983da084b3Smrg	# earlier do not add the objects themselves.
32993da084b3Smrg	case `$CC -V 2>&1` in
33003da084b3Smrg	*"Version 7."*)
33013da084b3Smrg  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
33023da084b3Smrg  	  _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'
33033da084b3Smrg	  ;;
33043da084b3Smrg	*)  # Version 8.0 or newer
33053da084b3Smrg	  tmp_idyn=
33063da084b3Smrg	  case $host_cpu in
33073da084b3Smrg	    ia64*) tmp_idyn=' -i_dynamic';;
33083da084b3Smrg	  esac
33093da084b3Smrg  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
33103da084b3Smrg	  _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'
33113da084b3Smrg	  ;;
33123da084b3Smrg	esac
33133da084b3Smrg	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
33143da084b3Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
33153da084b3Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
33163da084b3Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
33173da084b3Smrg	;;
33183da084b3Smrg      pgCC*)
33193da084b3Smrg        # Portland Group C++ compiler
33203da084b3Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
33213da084b3Smrg  	_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'
33223da084b3Smrg
33233da084b3Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
33243da084b3Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
33253da084b3Smrg	_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'
33263da084b3Smrg        ;;
33273da084b3Smrg      cxx*)
33283da084b3Smrg	# Compaq C++
33293da084b3Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
33303da084b3Smrg	_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'
33313da084b3Smrg
33323da084b3Smrg	runpath_var=LD_RUN_PATH
33333da084b3Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
33343da084b3Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
33353da084b3Smrg
33363da084b3Smrg	# Commands to make compiler produce verbose output that lists
33373da084b3Smrg	# what "hidden" libraries, object files and flags are used when
33383da084b3Smrg	# linking a shared library.
33393da084b3Smrg	#
33403da084b3Smrg	# There doesn't appear to be a way to prevent this compiler from
33413da084b3Smrg	# explicitly linking system object files so we need to strip them
33423da084b3Smrg	# from the output so that they don't get included in the library
33433da084b3Smrg	# dependencies.
33443da084b3Smrg	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'
33453da084b3Smrg	;;
33463da084b3Smrg    esac
33473da084b3Smrg    ;;
33483da084b3Smrg  lynxos*)
33493da084b3Smrg    # FIXME: insert proper C++ library support
33503da084b3Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
33513da084b3Smrg    ;;
33523da084b3Smrg  m88k*)
33533da084b3Smrg    # FIXME: insert proper C++ library support
33543da084b3Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
33553da084b3Smrg    ;;
33563da084b3Smrg  mvs*)
33573da084b3Smrg    case $cc_basename in
33583da084b3Smrg      cxx*)
33593da084b3Smrg	# FIXME: insert proper C++ library support
33603da084b3Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
33613da084b3Smrg	;;
33623da084b3Smrg      *)
33633da084b3Smrg	# FIXME: insert proper C++ library support
33643da084b3Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
33653da084b3Smrg	;;
33663da084b3Smrg    esac
33673da084b3Smrg    ;;
33683da084b3Smrg  netbsd* | netbsdelf*-gnu)
33693da084b3Smrg    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
33703da084b3Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
33713da084b3Smrg      wlarc=
33723da084b3Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
33733da084b3Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
33743da084b3Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
33753da084b3Smrg    fi
33763da084b3Smrg    # Workaround some broken pre-1.5 toolchains
33773da084b3Smrg    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
33783da084b3Smrg    ;;
33793da084b3Smrg  openbsd2*)
33803da084b3Smrg    # C++ shared libraries are fairly broken
33813da084b3Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
33823da084b3Smrg    ;;
33833da084b3Smrg  openbsd*)
33843da084b3Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
33853da084b3Smrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
33863da084b3Smrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
33873da084b3Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
33883da084b3Smrg    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
33893da084b3Smrg      _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'
33903da084b3Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
33913da084b3Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
33923da084b3Smrg    fi
33933da084b3Smrg    output_verbose_link_cmd='echo'
33943da084b3Smrg    ;;
33953da084b3Smrg  osf3*)
33963da084b3Smrg    case $cc_basename in
33973da084b3Smrg      KCC*)
33983da084b3Smrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
33993da084b3Smrg
34003da084b3Smrg	# KCC will only create a shared library if the output file
34013da084b3Smrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
34023da084b3Smrg	# to its proper name (with version) after linking.
34033da084b3Smrg	_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'
34043da084b3Smrg
34053da084b3Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
34063da084b3Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
34073da084b3Smrg
34083da084b3Smrg	# Archives containing C++ object files must be created using
34093da084b3Smrg	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
34103da084b3Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
34113da084b3Smrg
34123da084b3Smrg	;;
34133da084b3Smrg      RCC*)
34143da084b3Smrg	# Rational C++ 2.4.1
34153da084b3Smrg	# FIXME: insert proper C++ library support
34163da084b3Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
34173da084b3Smrg	;;
34183da084b3Smrg      cxx*)
34193da084b3Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
34203da084b3Smrg	_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'
34213da084b3Smrg
34223da084b3Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
34233da084b3Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
34243da084b3Smrg
34253da084b3Smrg	# Commands to make compiler produce verbose output that lists
34263da084b3Smrg	# what "hidden" libraries, object files and flags are used when
34273da084b3Smrg	# linking a shared library.
34283da084b3Smrg	#
34293da084b3Smrg	# There doesn't appear to be a way to prevent this compiler from
34303da084b3Smrg	# explicitly linking system object files so we need to strip them
34313da084b3Smrg	# from the output so that they don't get included in the library
34323da084b3Smrg	# dependencies.
34333da084b3Smrg	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'
34343da084b3Smrg	;;
34353da084b3Smrg      *)
34363da084b3Smrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
34373da084b3Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
34383da084b3Smrg	  _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'
34393da084b3Smrg
34403da084b3Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
34413da084b3Smrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
34423da084b3Smrg
34433da084b3Smrg	  # Commands to make compiler produce verbose output that lists
34443da084b3Smrg	  # what "hidden" libraries, object files and flags are used when
34453da084b3Smrg	  # linking a shared library.
34463da084b3Smrg	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
34473da084b3Smrg
34483da084b3Smrg	else
34493da084b3Smrg	  # FIXME: insert proper C++ library support
34503da084b3Smrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
34513da084b3Smrg	fi
34523da084b3Smrg	;;
34533da084b3Smrg    esac
34543da084b3Smrg    ;;
34553da084b3Smrg  osf4* | osf5*)
34563da084b3Smrg    case $cc_basename in
34573da084b3Smrg      KCC*)
34583da084b3Smrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
34593da084b3Smrg
34603da084b3Smrg	# KCC will only create a shared library if the output file
34613da084b3Smrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
34623da084b3Smrg	# to its proper name (with version) after linking.
34633da084b3Smrg	_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'
34643da084b3Smrg
34653da084b3Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
34663da084b3Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
34673da084b3Smrg
34683da084b3Smrg	# Archives containing C++ object files must be created using
34693da084b3Smrg	# the KAI C++ compiler.
34703da084b3Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
34713da084b3Smrg	;;
34723da084b3Smrg      RCC*)
34733da084b3Smrg	# Rational C++ 2.4.1
34743da084b3Smrg	# FIXME: insert proper C++ library support
34753da084b3Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
34763da084b3Smrg	;;
34773da084b3Smrg      cxx*)
34783da084b3Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
34793da084b3Smrg	_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'
34803da084b3Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
34813da084b3Smrg	  echo "-hidden">> $lib.exp~
34823da084b3Smrg	  $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~
34833da084b3Smrg	  $rm $lib.exp'
34843da084b3Smrg
34853da084b3Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
34863da084b3Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
34873da084b3Smrg
34883da084b3Smrg	# Commands to make compiler produce verbose output that lists
34893da084b3Smrg	# what "hidden" libraries, object files and flags are used when
34903da084b3Smrg	# linking a shared library.
34913da084b3Smrg	#
34923da084b3Smrg	# There doesn't appear to be a way to prevent this compiler from
34933da084b3Smrg	# explicitly linking system object files so we need to strip them
34943da084b3Smrg	# from the output so that they don't get included in the library
34953da084b3Smrg	# dependencies.
34963da084b3Smrg	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'
34973da084b3Smrg	;;
34983da084b3Smrg      *)
34993da084b3Smrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
35003da084b3Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
35013da084b3Smrg	 _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'
35023da084b3Smrg
35033da084b3Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
35043da084b3Smrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
35053da084b3Smrg
35063da084b3Smrg	  # Commands to make compiler produce verbose output that lists
35073da084b3Smrg	  # what "hidden" libraries, object files and flags are used when
35083da084b3Smrg	  # linking a shared library.
35093da084b3Smrg	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
35103da084b3Smrg
35113da084b3Smrg	else
35123da084b3Smrg	  # FIXME: insert proper C++ library support
35133da084b3Smrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
35143da084b3Smrg	fi
35153da084b3Smrg	;;
35163da084b3Smrg    esac
35173da084b3Smrg    ;;
35183da084b3Smrg  psos*)
35193da084b3Smrg    # FIXME: insert proper C++ library support
35203da084b3Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
35213da084b3Smrg    ;;
35223da084b3Smrg  sunos4*)
35233da084b3Smrg    case $cc_basename in
35243da084b3Smrg      CC*)
35253da084b3Smrg	# Sun C++ 4.x
35263da084b3Smrg	# FIXME: insert proper C++ library support
35273da084b3Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
35283da084b3Smrg	;;
35293da084b3Smrg      lcc*)
35303da084b3Smrg	# Lucid
35313da084b3Smrg	# FIXME: insert proper C++ library support
35323da084b3Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
35333da084b3Smrg	;;
35343da084b3Smrg      *)
35353da084b3Smrg	# FIXME: insert proper C++ library support
35363da084b3Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
35373da084b3Smrg	;;
35383da084b3Smrg    esac
35393da084b3Smrg    ;;
35403da084b3Smrg  solaris*)
35413da084b3Smrg    case $cc_basename in
35423da084b3Smrg      CC*)
35433da084b3Smrg	# Sun C++ 4.2, 5.x and Centerline C++
35443da084b3Smrg        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
35453da084b3Smrg	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
35463da084b3Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
35473da084b3Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
35483da084b3Smrg	$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'
35493da084b3Smrg
35503da084b3Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
35513da084b3Smrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
35523da084b3Smrg	case $host_os in
35533da084b3Smrg	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
35543da084b3Smrg	  *)
35553da084b3Smrg	    # The C++ compiler is used as linker so we must use $wl
35563da084b3Smrg	    # flag to pass the commands to the underlying system
35573da084b3Smrg	    # linker. We must also pass each convience library through
35583da084b3Smrg	    # to the system linker between allextract/defaultextract.
35593da084b3Smrg	    # The C++ compiler will combine linker options so we
35603da084b3Smrg	    # cannot just pass the convience library names through
35613da084b3Smrg	    # without $wl.
35623da084b3Smrg	    # Supported since Solaris 2.6 (maybe 2.5.1?)
35633da084b3Smrg	    _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'
35643da084b3Smrg	    ;;
35653da084b3Smrg	esac
35663da084b3Smrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
35673da084b3Smrg
35683da084b3Smrg	output_verbose_link_cmd='echo'
35693da084b3Smrg
35703da084b3Smrg	# Archives containing C++ object files must be created using
35713da084b3Smrg	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
35723da084b3Smrg	# necessary to make sure instantiated templates are included
35733da084b3Smrg	# in the archive.
35743da084b3Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
35753da084b3Smrg	;;
35763da084b3Smrg      gcx*)
35773da084b3Smrg	# Green Hills C++ Compiler
35783da084b3Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
35793da084b3Smrg
35803da084b3Smrg	# The C++ compiler must be used to create the archive.
35813da084b3Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
35823da084b3Smrg	;;
35833da084b3Smrg      *)
35843da084b3Smrg	# GNU C++ compiler with Solaris linker
35853da084b3Smrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
35863da084b3Smrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
35873da084b3Smrg	  if $CC --version | grep -v '^2\.7' > /dev/null; then
35883da084b3Smrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
35893da084b3Smrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
35903da084b3Smrg		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
35913da084b3Smrg
35923da084b3Smrg	    # Commands to make compiler produce verbose output that lists
35933da084b3Smrg	    # what "hidden" libraries, object files and flags are used when
35943da084b3Smrg	    # linking a shared library.
35953da084b3Smrg	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
35963da084b3Smrg	  else
35973da084b3Smrg	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
35983da084b3Smrg	    # platform.
35993da084b3Smrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
36003da084b3Smrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
36013da084b3Smrg		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
36023da084b3Smrg
36033da084b3Smrg	    # Commands to make compiler produce verbose output that lists
36043da084b3Smrg	    # what "hidden" libraries, object files and flags are used when
36053da084b3Smrg	    # linking a shared library.
36063da084b3Smrg	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
36073da084b3Smrg	  fi
36083da084b3Smrg
36093da084b3Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
36103da084b3Smrg	fi
36113da084b3Smrg	;;
36123da084b3Smrg    esac
36133da084b3Smrg    ;;
36143da084b3Smrg  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
36153da084b3Smrg    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
36163da084b3Smrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
36173da084b3Smrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
36183da084b3Smrg    runpath_var='LD_RUN_PATH'
36193da084b3Smrg
36203da084b3Smrg    case $cc_basename in
36213da084b3Smrg      CC*)
36223da084b3Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
36233da084b3Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
36243da084b3Smrg	;;
36253da084b3Smrg      *)
36263da084b3Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
36273da084b3Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
36283da084b3Smrg	;;
36293da084b3Smrg    esac
36303da084b3Smrg    ;;
36313da084b3Smrg  sysv5* | sco3.2v5* | sco5v6*)
36323da084b3Smrg    # Note: We can NOT use -z defs as we might desire, because we do not
36333da084b3Smrg    # link with -lc, and that would cause any symbols used from libc to
36343da084b3Smrg    # always be unresolved, which means just about no library would
36353da084b3Smrg    # ever link correctly.  If we're not using GNU ld we use -z text
36363da084b3Smrg    # though, which does catch some bad symbols but isn't as heavy-handed
36373da084b3Smrg    # as -z defs.
36383da084b3Smrg    # For security reasons, it is highly recommended that you always
36393da084b3Smrg    # use absolute paths for naming shared libraries, and exclude the
36403da084b3Smrg    # DT_RUNPATH tag from executables and libraries.  But doing so
36413da084b3Smrg    # requires that you compile everything twice, which is a pain.
36423da084b3Smrg    # So that behaviour is only enabled if SCOABSPATH is set to a
36433da084b3Smrg    # non-empty value in the environment.  Most likely only useful for
36443da084b3Smrg    # creating official distributions of packages.
36453da084b3Smrg    # This is a hack until libtool officially supports absolute path
36463da084b3Smrg    # names for shared libraries.
36473da084b3Smrg    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
36483da084b3Smrg    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
36493da084b3Smrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
36503da084b3Smrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
36513da084b3Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
36523da084b3Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
36533da084b3Smrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
36543da084b3Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
36553da084b3Smrg    runpath_var='LD_RUN_PATH'
36563da084b3Smrg
36573da084b3Smrg    case $cc_basename in
36583da084b3Smrg      CC*)
36593da084b3Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
36603da084b3Smrg	_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'
36613da084b3Smrg	;;
36623da084b3Smrg      *)
36633da084b3Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
36643da084b3Smrg	_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'
36653da084b3Smrg	;;
36663da084b3Smrg    esac
36673da084b3Smrg    ;;
36683da084b3Smrg  tandem*)
36693da084b3Smrg    case $cc_basename in
36703da084b3Smrg      NCC*)
36713da084b3Smrg	# NonStop-UX NCC 3.20
36723da084b3Smrg	# FIXME: insert proper C++ library support
36733da084b3Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
36743da084b3Smrg	;;
36753da084b3Smrg      *)
36763da084b3Smrg	# FIXME: insert proper C++ library support
36773da084b3Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
36783da084b3Smrg	;;
36793da084b3Smrg    esac
36803da084b3Smrg    ;;
36813da084b3Smrg  vxworks*)
36823da084b3Smrg    # FIXME: insert proper C++ library support
36833da084b3Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
36843da084b3Smrg    ;;
36853da084b3Smrg  *)
36863da084b3Smrg    # FIXME: insert proper C++ library support
36873da084b3Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
36883da084b3Smrg    ;;
36893da084b3Smrgesac
36903da084b3SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
36913da084b3Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
36923da084b3Smrg
36933da084b3Smrg_LT_AC_TAGVAR(GCC, $1)="$GXX"
36943da084b3Smrg_LT_AC_TAGVAR(LD, $1)="$LD"
36953da084b3Smrg
36963da084b3SmrgAC_LIBTOOL_POSTDEP_PREDEP($1)
36973da084b3SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
36983da084b3SmrgAC_LIBTOOL_PROG_CC_C_O($1)
36993da084b3SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
37003da084b3SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
37013da084b3SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
37023da084b3SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
37033da084b3Smrg
37043da084b3SmrgAC_LIBTOOL_CONFIG($1)
37053da084b3Smrg
37063da084b3SmrgAC_LANG_POP
37073da084b3SmrgCC=$lt_save_CC
37083da084b3SmrgLDCXX=$LD
37093da084b3SmrgLD=$lt_save_LD
37103da084b3SmrgGCC=$lt_save_GCC
37113da084b3Smrgwith_gnu_ldcxx=$with_gnu_ld
37123da084b3Smrgwith_gnu_ld=$lt_save_with_gnu_ld
37133da084b3Smrglt_cv_path_LDCXX=$lt_cv_path_LD
37143da084b3Smrglt_cv_path_LD=$lt_save_path_LD
37153da084b3Smrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
37163da084b3Smrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
37173da084b3Smrg])# AC_LIBTOOL_LANG_CXX_CONFIG
37183da084b3Smrg
37193da084b3Smrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
37203da084b3Smrg# ------------------------------------
37213da084b3Smrg# Figure out "hidden" library dependencies from verbose
37223da084b3Smrg# compiler output when linking a shared library.
37233da084b3Smrg# Parse the compiler output and extract the necessary
37243da084b3Smrg# objects, libraries and library flags.
37253da084b3SmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
37263da084b3Smrgdnl we can't use the lt_simple_compile_test_code here,
37273da084b3Smrgdnl because it contains code intended for an executable,
37283da084b3Smrgdnl not a library.  It's possible we should let each
37293da084b3Smrgdnl tag define a new lt_????_link_test_code variable,
37303da084b3Smrgdnl but it's only used here...
37313da084b3Smrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF
37323da084b3Smrgint a;
37333da084b3Smrgvoid foo (void) { a = 0; }
37343da084b3SmrgEOF
37353da084b3Smrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
37363da084b3Smrgclass Foo
37373da084b3Smrg{
37383da084b3Smrgpublic:
37393da084b3Smrg  Foo (void) { a = 0; }
37403da084b3Smrgprivate:
37413da084b3Smrg  int a;
37423da084b3Smrg};
37433da084b3SmrgEOF
37443da084b3Smrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF
37453da084b3Smrg      subroutine foo
37463da084b3Smrg      implicit none
37473da084b3Smrg      integer*4 a
37483da084b3Smrg      a=0
37493da084b3Smrg      return
37503da084b3Smrg      end
37513da084b3SmrgEOF
37523da084b3Smrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
37533da084b3Smrgpublic class foo {
37543da084b3Smrg  private int a;
37553da084b3Smrg  public void bar (void) {
37563da084b3Smrg    a = 0;
37573da084b3Smrg  }
37583da084b3Smrg};
37593da084b3SmrgEOF
37603da084b3Smrg])
37613da084b3Smrgdnl Parse the compiler output and extract the necessary
37623da084b3Smrgdnl objects, libraries and library flags.
37633da084b3Smrgif AC_TRY_EVAL(ac_compile); then
37643da084b3Smrg  # Parse the compiler output and extract the necessary
37653da084b3Smrg  # objects, libraries and library flags.
37663da084b3Smrg
37673da084b3Smrg  # Sentinel used to keep track of whether or not we are before
37683da084b3Smrg  # the conftest object file.
37693da084b3Smrg  pre_test_object_deps_done=no
37703da084b3Smrg
37713da084b3Smrg  # The `*' in the case matches for architectures that use `case' in
37723da084b3Smrg  # $output_verbose_cmd can trigger glob expansion during the loop
37733da084b3Smrg  # eval without this substitution.
37743da084b3Smrg  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
37753da084b3Smrg
37763da084b3Smrg  for p in `eval $output_verbose_link_cmd`; do
37773da084b3Smrg    case $p in
37783da084b3Smrg
37793da084b3Smrg    -L* | -R* | -l*)
37803da084b3Smrg       # Some compilers place space between "-{L,R}" and the path.
37813da084b3Smrg       # Remove the space.
37823da084b3Smrg       if test $p = "-L" \
37833da084b3Smrg	  || test $p = "-R"; then
37843da084b3Smrg	 prev=$p
37853da084b3Smrg	 continue
37863da084b3Smrg       else
37873da084b3Smrg	 prev=
37883da084b3Smrg       fi
37893da084b3Smrg
37903da084b3Smrg       if test "$pre_test_object_deps_done" = no; then
37913da084b3Smrg	 case $p in
37923da084b3Smrg	 -L* | -R*)
37933da084b3Smrg	   # Internal compiler library paths should come after those
37943da084b3Smrg	   # provided the user.  The postdeps already come after the
37953da084b3Smrg	   # user supplied libs so there is no need to process them.
37963da084b3Smrg	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
37973da084b3Smrg	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
37983da084b3Smrg	   else
37993da084b3Smrg	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
38003da084b3Smrg	   fi
38013da084b3Smrg	   ;;
38023da084b3Smrg	 # The "-l" case would never come before the object being
38033da084b3Smrg	 # linked, so don't bother handling this case.
38043da084b3Smrg	 esac
38053da084b3Smrg       else
38063da084b3Smrg	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
38073da084b3Smrg	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
38083da084b3Smrg	 else
38093da084b3Smrg	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
38103da084b3Smrg	 fi
38113da084b3Smrg       fi
38123da084b3Smrg       ;;
38133da084b3Smrg
38143da084b3Smrg    *.$objext)
38153da084b3Smrg       # This assumes that the test object file only shows up
38163da084b3Smrg       # once in the compiler output.
38173da084b3Smrg       if test "$p" = "conftest.$objext"; then
38183da084b3Smrg	 pre_test_object_deps_done=yes
38193da084b3Smrg	 continue
38203da084b3Smrg       fi
38213da084b3Smrg
38223da084b3Smrg       if test "$pre_test_object_deps_done" = no; then
38233da084b3Smrg	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
38243da084b3Smrg	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
38253da084b3Smrg	 else
38263da084b3Smrg	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
38273da084b3Smrg	 fi
38283da084b3Smrg       else
38293da084b3Smrg	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
38303da084b3Smrg	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
38313da084b3Smrg	 else
38323da084b3Smrg	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
38333da084b3Smrg	 fi
38343da084b3Smrg       fi
38353da084b3Smrg       ;;
38363da084b3Smrg
38373da084b3Smrg    *) ;; # Ignore the rest.
38383da084b3Smrg
38393da084b3Smrg    esac
38403da084b3Smrg  done
38413da084b3Smrg
38423da084b3Smrg  # Clean up.
38433da084b3Smrg  rm -f a.out a.exe
38443da084b3Smrgelse
38453da084b3Smrg  echo "libtool.m4: error: problem compiling $1 test program"
38463da084b3Smrgfi
38473da084b3Smrg
38483da084b3Smrg$rm -f confest.$objext
38493da084b3Smrg
38503da084b3Smrg# PORTME: override above test on systems where it is broken
38513da084b3Smrgifelse([$1],[CXX],
38523da084b3Smrg[case $host_os in
38533da084b3Smrginterix3*)
38543da084b3Smrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
38553da084b3Smrg  # hack all around it, let's just trust "g++" to DTRT.
38563da084b3Smrg  _LT_AC_TAGVAR(predep_objects,$1)=
38573da084b3Smrg  _LT_AC_TAGVAR(postdep_objects,$1)=
38583da084b3Smrg  _LT_AC_TAGVAR(postdeps,$1)=
38593da084b3Smrg  ;;
38603da084b3Smrg
38613da084b3Smrgsolaris*)
38623da084b3Smrg  case $cc_basename in
38633da084b3Smrg  CC*)
38643da084b3Smrg    # Adding this requires a known-good setup of shared libraries for
38653da084b3Smrg    # Sun compiler versions before 5.6, else PIC objects from an old
38663da084b3Smrg    # archive will be linked into the output, leading to subtle bugs.
38673da084b3Smrg    _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
38683da084b3Smrg    ;;
38693da084b3Smrg  esac
38703da084b3Smrg  ;;
38713da084b3Smrgesac
38723da084b3Smrg])
38733da084b3Smrg
38743da084b3Smrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in
38753da084b3Smrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
38763da084b3Smrgesac
38773da084b3Smrg])# AC_LIBTOOL_POSTDEP_PREDEP
38783da084b3Smrg
38793da084b3Smrg# AC_LIBTOOL_LANG_F77_CONFIG
38803da084b3Smrg# --------------------------
38813da084b3Smrg# Ensure that the configuration vars for the C compiler are
38823da084b3Smrg# suitably defined.  Those variables are subsequently used by
38833da084b3Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
38843da084b3SmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
38853da084b3SmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG],
38863da084b3Smrg[AC_REQUIRE([AC_PROG_F77])
38873da084b3SmrgAC_LANG_PUSH(Fortran 77)
38883da084b3Smrg
38893da084b3Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
38903da084b3Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)=
38913da084b3Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no
38923da084b3Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
38933da084b3Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
38943da084b3Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no
38953da084b3Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
38963da084b3Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
38973da084b3Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
38983da084b3Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
38993da084b3Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no
39003da084b3Smrg_LT_AC_TAGVAR(module_cmds, $1)=
39013da084b3Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)=
39023da084b3Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
39033da084b3Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
39043da084b3Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)=
39053da084b3Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
39063da084b3Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
39073da084b3Smrg
39083da084b3Smrg# Source file extension for f77 test sources.
39093da084b3Smrgac_ext=f
39103da084b3Smrg
39113da084b3Smrg# Object file extension for compiled f77 test sources.
39123da084b3Smrgobjext=o
39133da084b3Smrg_LT_AC_TAGVAR(objext, $1)=$objext
39143da084b3Smrg
39153da084b3Smrg# Code to be used in simple compile tests
39163da084b3Smrglt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
39173da084b3Smrg
39183da084b3Smrg# Code to be used in simple link tests
39193da084b3Smrglt_simple_link_test_code="      program t\n      end\n"
39203da084b3Smrg
39213da084b3Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
39223da084b3Smrg_LT_AC_SYS_COMPILER
39233da084b3Smrg
39243da084b3Smrg# save warnings/boilerplate of simple test code
39253da084b3Smrg_LT_COMPILER_BOILERPLATE
39263da084b3Smrg_LT_LINKER_BOILERPLATE
39273da084b3Smrg
39283da084b3Smrg# Allow CC to be a program name with arguments.
39293da084b3Smrglt_save_CC="$CC"
39303da084b3SmrgCC=${F77-"f77"}
39313da084b3Smrgcompiler=$CC
39323da084b3Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
39333da084b3Smrg_LT_CC_BASENAME([$compiler])
39343da084b3Smrg
39353da084b3SmrgAC_MSG_CHECKING([if libtool supports shared libraries])
39363da084b3SmrgAC_MSG_RESULT([$can_build_shared])
39373da084b3Smrg
39383da084b3SmrgAC_MSG_CHECKING([whether to build shared libraries])
39393da084b3Smrgtest "$can_build_shared" = "no" && enable_shared=no
39403da084b3Smrg
39413da084b3Smrg# On AIX, shared libraries and static libraries use the same namespace, and
39423da084b3Smrg# are all built from PIC.
39433da084b3Smrgcase $host_os in
39443da084b3Smrgaix3*)
39453da084b3Smrg  test "$enable_shared" = yes && enable_static=no
39463da084b3Smrg  if test -n "$RANLIB"; then
39473da084b3Smrg    archive_cmds="$archive_cmds~\$RANLIB \$lib"
39483da084b3Smrg    postinstall_cmds='$RANLIB $lib'
39493da084b3Smrg  fi
39503da084b3Smrg  ;;
39513da084b3Smrgaix4* | aix5*)
39523da084b3Smrg  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
39533da084b3Smrg    test "$enable_shared" = yes && enable_static=no
39543da084b3Smrg  fi
39553da084b3Smrg  ;;
39563da084b3Smrgesac
39573da084b3SmrgAC_MSG_RESULT([$enable_shared])
39583da084b3Smrg
39593da084b3SmrgAC_MSG_CHECKING([whether to build static libraries])
39603da084b3Smrg# Make sure either enable_shared or enable_static is yes.
39613da084b3Smrgtest "$enable_shared" = yes || enable_static=yes
39623da084b3SmrgAC_MSG_RESULT([$enable_static])
39633da084b3Smrg
39643da084b3Smrg_LT_AC_TAGVAR(GCC, $1)="$G77"
39653da084b3Smrg_LT_AC_TAGVAR(LD, $1)="$LD"
39663da084b3Smrg
39673da084b3SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
39683da084b3SmrgAC_LIBTOOL_PROG_CC_C_O($1)
39693da084b3SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
39703da084b3SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
39713da084b3SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
39723da084b3SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
39733da084b3Smrg
39743da084b3SmrgAC_LIBTOOL_CONFIG($1)
39753da084b3Smrg
39763da084b3SmrgAC_LANG_POP
39773da084b3SmrgCC="$lt_save_CC"
39783da084b3Smrg])# AC_LIBTOOL_LANG_F77_CONFIG
39793da084b3Smrg
39803da084b3Smrg
39813da084b3Smrg# AC_LIBTOOL_LANG_GCJ_CONFIG
39823da084b3Smrg# --------------------------
39833da084b3Smrg# Ensure that the configuration vars for the C compiler are
39843da084b3Smrg# suitably defined.  Those variables are subsequently used by
39853da084b3Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
39863da084b3SmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
39873da084b3SmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
39883da084b3Smrg[AC_LANG_SAVE
39893da084b3Smrg
39903da084b3Smrg# Source file extension for Java test sources.
39913da084b3Smrgac_ext=java
39923da084b3Smrg
39933da084b3Smrg# Object file extension for compiled Java test sources.
39943da084b3Smrgobjext=o
39953da084b3Smrg_LT_AC_TAGVAR(objext, $1)=$objext
39963da084b3Smrg
39973da084b3Smrg# Code to be used in simple compile tests
39983da084b3Smrglt_simple_compile_test_code="class foo {}\n"
39993da084b3Smrg
40003da084b3Smrg# Code to be used in simple link tests
40013da084b3Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
40023da084b3Smrg
40033da084b3Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
40043da084b3Smrg_LT_AC_SYS_COMPILER
40053da084b3Smrg
40063da084b3Smrg# save warnings/boilerplate of simple test code
40073da084b3Smrg_LT_COMPILER_BOILERPLATE
40083da084b3Smrg_LT_LINKER_BOILERPLATE
40093da084b3Smrg
40103da084b3Smrg# Allow CC to be a program name with arguments.
40113da084b3Smrglt_save_CC="$CC"
40123da084b3SmrgCC=${GCJ-"gcj"}
40133da084b3Smrgcompiler=$CC
40143da084b3Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
40153da084b3Smrg_LT_CC_BASENAME([$compiler])
40163da084b3Smrg
40173da084b3Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
40183da084b3Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
40193da084b3Smrg
40203da084b3Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
40213da084b3Smrg
40223da084b3SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
40233da084b3SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
40243da084b3SmrgAC_LIBTOOL_PROG_CC_C_O($1)
40253da084b3SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
40263da084b3SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
40273da084b3SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
40283da084b3SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
40293da084b3Smrg
40303da084b3SmrgAC_LIBTOOL_CONFIG($1)
40313da084b3Smrg
40323da084b3SmrgAC_LANG_RESTORE
40333da084b3SmrgCC="$lt_save_CC"
40343da084b3Smrg])# AC_LIBTOOL_LANG_GCJ_CONFIG
40353da084b3Smrg
40363da084b3Smrg
40373da084b3Smrg# AC_LIBTOOL_LANG_RC_CONFIG
40383da084b3Smrg# -------------------------
40393da084b3Smrg# Ensure that the configuration vars for the Windows resource compiler are
40403da084b3Smrg# suitably defined.  Those variables are subsequently used by
40413da084b3Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
40423da084b3SmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
40433da084b3SmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG],
40443da084b3Smrg[AC_LANG_SAVE
40453da084b3Smrg
40463da084b3Smrg# Source file extension for RC test sources.
40473da084b3Smrgac_ext=rc
40483da084b3Smrg
40493da084b3Smrg# Object file extension for compiled RC test sources.
40503da084b3Smrgobjext=o
40513da084b3Smrg_LT_AC_TAGVAR(objext, $1)=$objext
40523da084b3Smrg
40533da084b3Smrg# Code to be used in simple compile tests
40543da084b3Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
40553da084b3Smrg
40563da084b3Smrg# Code to be used in simple link tests
40573da084b3Smrglt_simple_link_test_code="$lt_simple_compile_test_code"
40583da084b3Smrg
40593da084b3Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
40603da084b3Smrg_LT_AC_SYS_COMPILER
40613da084b3Smrg
40623da084b3Smrg# save warnings/boilerplate of simple test code
40633da084b3Smrg_LT_COMPILER_BOILERPLATE
40643da084b3Smrg_LT_LINKER_BOILERPLATE
40653da084b3Smrg
40663da084b3Smrg# Allow CC to be a program name with arguments.
40673da084b3Smrglt_save_CC="$CC"
40683da084b3SmrgCC=${RC-"windres"}
40693da084b3Smrgcompiler=$CC
40703da084b3Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
40713da084b3Smrg_LT_CC_BASENAME([$compiler])
40723da084b3Smrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
40733da084b3Smrg
40743da084b3SmrgAC_LIBTOOL_CONFIG($1)
40753da084b3Smrg
40763da084b3SmrgAC_LANG_RESTORE
40773da084b3SmrgCC="$lt_save_CC"
40783da084b3Smrg])# AC_LIBTOOL_LANG_RC_CONFIG
40793da084b3Smrg
40803da084b3Smrg
40813da084b3Smrg# AC_LIBTOOL_CONFIG([TAGNAME])
40823da084b3Smrg# ----------------------------
40833da084b3Smrg# If TAGNAME is not passed, then create an initial libtool script
40843da084b3Smrg# with a default configuration from the untagged config vars.  Otherwise
40853da084b3Smrg# add code to config.status for appending the configuration named by
40863da084b3Smrg# TAGNAME from the matching tagged config vars.
40873da084b3SmrgAC_DEFUN([AC_LIBTOOL_CONFIG],
40883da084b3Smrg[# The else clause should only fire when bootstrapping the
40893da084b3Smrg# libtool distribution, otherwise you forgot to ship ltmain.sh
40903da084b3Smrg# with your package, and you will get complaints that there are
40913da084b3Smrg# no rules to generate ltmain.sh.
40923da084b3Smrgif test -f "$ltmain"; then
40933da084b3Smrg  # See if we are running on zsh, and set the options which allow our commands through
40943da084b3Smrg  # without removal of \ escapes.
40953da084b3Smrg  if test -n "${ZSH_VERSION+set}" ; then
40963da084b3Smrg    setopt NO_GLOB_SUBST
40973da084b3Smrg  fi
40983da084b3Smrg  # Now quote all the things that may contain metacharacters while being
40993da084b3Smrg  # careful not to overquote the AC_SUBSTed values.  We take copies of the
41003da084b3Smrg  # variables and quote the copies for generation of the libtool script.
41013da084b3Smrg  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
41023da084b3Smrg    SED SHELL STRIP \
41033da084b3Smrg    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
41043da084b3Smrg    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
41053da084b3Smrg    deplibs_check_method reload_flag reload_cmds need_locks \
41063da084b3Smrg    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
41073da084b3Smrg    lt_cv_sys_global_symbol_to_c_name_address \
41083da084b3Smrg    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
41093da084b3Smrg    old_postinstall_cmds old_postuninstall_cmds \
41103da084b3Smrg    _LT_AC_TAGVAR(compiler, $1) \
41113da084b3Smrg    _LT_AC_TAGVAR(CC, $1) \
41123da084b3Smrg    _LT_AC_TAGVAR(LD, $1) \
41133da084b3Smrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
41143da084b3Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
41153da084b3Smrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
41163da084b3Smrg    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
41173da084b3Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
41183da084b3Smrg    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
41193da084b3Smrg    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
41203da084b3Smrg    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
41213da084b3Smrg    _LT_AC_TAGVAR(old_archive_cmds, $1) \
41223da084b3Smrg    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
41233da084b3Smrg    _LT_AC_TAGVAR(predep_objects, $1) \
41243da084b3Smrg    _LT_AC_TAGVAR(postdep_objects, $1) \
41253da084b3Smrg    _LT_AC_TAGVAR(predeps, $1) \
41263da084b3Smrg    _LT_AC_TAGVAR(postdeps, $1) \
41273da084b3Smrg    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
41283da084b3Smrg    _LT_AC_TAGVAR(archive_cmds, $1) \
41293da084b3Smrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
41303da084b3Smrg    _LT_AC_TAGVAR(postinstall_cmds, $1) \
41313da084b3Smrg    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
41323da084b3Smrg    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
41333da084b3Smrg    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
41343da084b3Smrg    _LT_AC_TAGVAR(no_undefined_flag, $1) \
41353da084b3Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
41363da084b3Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
41373da084b3Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
41383da084b3Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
41393da084b3Smrg    _LT_AC_TAGVAR(hardcode_automatic, $1) \
41403da084b3Smrg    _LT_AC_TAGVAR(module_cmds, $1) \
41413da084b3Smrg    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
41423da084b3Smrg    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
41433da084b3Smrg    _LT_AC_TAGVAR(exclude_expsyms, $1) \
41443da084b3Smrg    _LT_AC_TAGVAR(include_expsyms, $1); do
41453da084b3Smrg
41463da084b3Smrg    case $var in
41473da084b3Smrg    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
41483da084b3Smrg    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
41493da084b3Smrg    _LT_AC_TAGVAR(archive_cmds, $1) | \
41503da084b3Smrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
41513da084b3Smrg    _LT_AC_TAGVAR(module_cmds, $1) | \
41523da084b3Smrg    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
41533da084b3Smrg    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
41543da084b3Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
41553da084b3Smrg    extract_expsyms_cmds | reload_cmds | finish_cmds | \
41563da084b3Smrg    postinstall_cmds | postuninstall_cmds | \
41573da084b3Smrg    old_postinstall_cmds | old_postuninstall_cmds | \
41583da084b3Smrg    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
41593da084b3Smrg      # Double-quote double-evaled strings.
41603da084b3Smrg      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
41613da084b3Smrg      ;;
41623da084b3Smrg    *)
41633da084b3Smrg      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
41643da084b3Smrg      ;;
41653da084b3Smrg    esac
41663da084b3Smrg  done
41673da084b3Smrg
41683da084b3Smrg  case $lt_echo in
41693da084b3Smrg  *'\[$]0 --fallback-echo"')
41703da084b3Smrg    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
41713da084b3Smrg    ;;
41723da084b3Smrg  esac
41733da084b3Smrg
41743da084b3Smrgifelse([$1], [],
41753da084b3Smrg  [cfgfile="${ofile}T"
41763da084b3Smrg  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
41773da084b3Smrg  $rm -f "$cfgfile"
41783da084b3Smrg  AC_MSG_NOTICE([creating $ofile])],
41793da084b3Smrg  [cfgfile="$ofile"])
41803da084b3Smrg
41813da084b3Smrg  cat <<__EOF__ >> "$cfgfile"
41823da084b3Smrgifelse([$1], [],
41833da084b3Smrg[#! $SHELL
41843da084b3Smrg
41853da084b3Smrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
41863da084b3Smrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
41873da084b3Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
41883da084b3Smrg#
41893da084b3Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
41903da084b3Smrg# Free Software Foundation, Inc.
41913da084b3Smrg#
41923da084b3Smrg# This file is part of GNU Libtool:
41933da084b3Smrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
41943da084b3Smrg#
41953da084b3Smrg# This program is free software; you can redistribute it and/or modify
41963da084b3Smrg# it under the terms of the GNU General Public License as published by
41973da084b3Smrg# the Free Software Foundation; either version 2 of the License, or
41983da084b3Smrg# (at your option) any later version.
41993da084b3Smrg#
42003da084b3Smrg# This program is distributed in the hope that it will be useful, but
42013da084b3Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
42023da084b3Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
42033da084b3Smrg# General Public License for more details.
42043da084b3Smrg#
42053da084b3Smrg# You should have received a copy of the GNU General Public License
42063da084b3Smrg# along with this program; if not, write to the Free Software
42073da084b3Smrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
42083da084b3Smrg#
42093da084b3Smrg# As a special exception to the GNU General Public License, if you
42103da084b3Smrg# distribute this file as part of a program that contains a
42113da084b3Smrg# configuration script generated by Autoconf, you may include it under
42123da084b3Smrg# the same distribution terms that you use for the rest of that program.
42133da084b3Smrg
42143da084b3Smrg# A sed program that does not truncate output.
42153da084b3SmrgSED=$lt_SED
42163da084b3Smrg
42173da084b3Smrg# Sed that helps us avoid accidentally triggering echo(1) options like -n.
42183da084b3SmrgXsed="$SED -e 1s/^X//"
42193da084b3Smrg
42203da084b3Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
42213da084b3Smrg# if CDPATH is set.
42223da084b3Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
42233da084b3Smrg
42243da084b3Smrg# The names of the tagged configurations supported by this script.
42253da084b3Smrgavailable_tags=
42263da084b3Smrg
42273da084b3Smrg# ### BEGIN LIBTOOL CONFIG],
42283da084b3Smrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
42293da084b3Smrg
42303da084b3Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
42313da084b3Smrg
42323da084b3Smrg# Shell to use when invoking shell scripts.
42333da084b3SmrgSHELL=$lt_SHELL
42343da084b3Smrg
42353da084b3Smrg# Whether or not to build shared libraries.
42363da084b3Smrgbuild_libtool_libs=$enable_shared
42373da084b3Smrg
42383da084b3Smrg# Whether or not to build static libraries.
42393da084b3Smrgbuild_old_libs=$enable_static
42403da084b3Smrg
42413da084b3Smrg# Whether or not to add -lc for building shared libraries.
42423da084b3Smrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
42433da084b3Smrg
42443da084b3Smrg# Whether or not to disallow shared libs when runtime libs are static
42453da084b3Smrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
42463da084b3Smrg
42473da084b3Smrg# Whether or not to optimize for fast installation.
42483da084b3Smrgfast_install=$enable_fast_install
42493da084b3Smrg
42503da084b3Smrg# The host system.
42513da084b3Smrghost_alias=$host_alias
42523da084b3Smrghost=$host
42533da084b3Smrghost_os=$host_os
42543da084b3Smrg
42553da084b3Smrg# The build system.
42563da084b3Smrgbuild_alias=$build_alias
42573da084b3Smrgbuild=$build
42583da084b3Smrgbuild_os=$build_os
42593da084b3Smrg
42603da084b3Smrg# An echo program that does not interpret backslashes.
42613da084b3Smrgecho=$lt_echo
42623da084b3Smrg
42633da084b3Smrg# The archiver.
42643da084b3SmrgAR=$lt_AR
42653da084b3SmrgAR_FLAGS=$lt_AR_FLAGS
42663da084b3Smrg
42673da084b3Smrg# A C compiler.
42683da084b3SmrgLTCC=$lt_LTCC
42693da084b3Smrg
42703da084b3Smrg# LTCC compiler flags.
42713da084b3SmrgLTCFLAGS=$lt_LTCFLAGS
42723da084b3Smrg
42733da084b3Smrg# A language-specific compiler.
42743da084b3SmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
42753da084b3Smrg
42763da084b3Smrg# Is the compiler the GNU C compiler?
42773da084b3Smrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1)
42783da084b3Smrg
42793da084b3Smrg# An ERE matcher.
42803da084b3SmrgEGREP=$lt_EGREP
42813da084b3Smrg
42823da084b3Smrg# The linker used to build libraries.
42833da084b3SmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1)
42843da084b3Smrg
42853da084b3Smrg# Whether we need hard or soft links.
42863da084b3SmrgLN_S=$lt_LN_S
42873da084b3Smrg
42883da084b3Smrg# A BSD-compatible nm program.
42893da084b3SmrgNM=$lt_NM
42903da084b3Smrg
42913da084b3Smrg# A symbol stripping program
42923da084b3SmrgSTRIP=$lt_STRIP
42933da084b3Smrg
42943da084b3Smrg# Used to examine libraries when file_magic_cmd begins "file"
42953da084b3SmrgMAGIC_CMD=$MAGIC_CMD
42963da084b3Smrg
42973da084b3Smrg# Used on cygwin: DLL creation program.
42983da084b3SmrgDLLTOOL="$DLLTOOL"
42993da084b3Smrg
43003da084b3Smrg# Used on cygwin: object dumper.
43013da084b3SmrgOBJDUMP="$OBJDUMP"
43023da084b3Smrg
43033da084b3Smrg# Used on cygwin: assembler.
43043da084b3SmrgAS="$AS"
43053da084b3Smrg
43063da084b3Smrg# The name of the directory that contains temporary libtool files.
43073da084b3Smrgobjdir=$objdir
43083da084b3Smrg
43093da084b3Smrg# How to create reloadable object files.
43103da084b3Smrgreload_flag=$lt_reload_flag
43113da084b3Smrgreload_cmds=$lt_reload_cmds
43123da084b3Smrg
43133da084b3Smrg# How to pass a linker flag through the compiler.
43143da084b3Smrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
43153da084b3Smrg
43163da084b3Smrg# Object file suffix (normally "o").
43173da084b3Smrgobjext="$ac_objext"
43183da084b3Smrg
43193da084b3Smrg# Old archive suffix (normally "a").
43203da084b3Smrglibext="$libext"
43213da084b3Smrg
43223da084b3Smrg# Shared library suffix (normally ".so").
43233da084b3Smrgshrext_cmds='$shrext_cmds'
43243da084b3Smrg
43253da084b3Smrg# Executable file suffix (normally "").
43263da084b3Smrgexeext="$exeext"
43273da084b3Smrg
43283da084b3Smrg# Additional compiler flags for building library objects.
43293da084b3Smrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
43303da084b3Smrgpic_mode=$pic_mode
43313da084b3Smrg
43323da084b3Smrg# What is the maximum length of a command?
43333da084b3Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len
43343da084b3Smrg
43353da084b3Smrg# Does compiler simultaneously support -c and -o options?
43363da084b3Smrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
43373da084b3Smrg
43383da084b3Smrg# Must we lock files when doing compilation?
43393da084b3Smrgneed_locks=$lt_need_locks
43403da084b3Smrg
43413da084b3Smrg# Do we need the lib prefix for modules?
43423da084b3Smrgneed_lib_prefix=$need_lib_prefix
43433da084b3Smrg
43443da084b3Smrg# Do we need a version for libraries?
43453da084b3Smrgneed_version=$need_version
43463da084b3Smrg
43473da084b3Smrg# Whether dlopen is supported.
43483da084b3Smrgdlopen_support=$enable_dlopen
43493da084b3Smrg
43503da084b3Smrg# Whether dlopen of programs is supported.
43513da084b3Smrgdlopen_self=$enable_dlopen_self
43523da084b3Smrg
43533da084b3Smrg# Whether dlopen of statically linked programs is supported.
43543da084b3Smrgdlopen_self_static=$enable_dlopen_self_static
43553da084b3Smrg
43563da084b3Smrg# Compiler flag to prevent dynamic linking.
43573da084b3Smrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
43583da084b3Smrg
43593da084b3Smrg# Compiler flag to turn off builtin functions.
43603da084b3Smrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
43613da084b3Smrg
43623da084b3Smrg# Compiler flag to allow reflexive dlopens.
43633da084b3Smrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
43643da084b3Smrg
43653da084b3Smrg# Compiler flag to generate shared objects directly from archives.
43663da084b3Smrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
43673da084b3Smrg
43683da084b3Smrg# Compiler flag to generate thread-safe objects.
43693da084b3Smrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
43703da084b3Smrg
43713da084b3Smrg# Library versioning type.
43723da084b3Smrgversion_type=$version_type
43733da084b3Smrg
43743da084b3Smrg# Format of library name prefix.
43753da084b3Smrglibname_spec=$lt_libname_spec
43763da084b3Smrg
43773da084b3Smrg# List of archive names.  First name is the real one, the rest are links.
43783da084b3Smrg# The last name is the one that the linker finds with -lNAME.
43793da084b3Smrglibrary_names_spec=$lt_library_names_spec
43803da084b3Smrg
43813da084b3Smrg# The coded name of the library, if different from the real name.
43823da084b3Smrgsoname_spec=$lt_soname_spec
43833da084b3Smrg
43843da084b3Smrg# Commands used to build and install an old-style archive.
43853da084b3SmrgRANLIB=$lt_RANLIB
43863da084b3Smrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
43873da084b3Smrgold_postinstall_cmds=$lt_old_postinstall_cmds
43883da084b3Smrgold_postuninstall_cmds=$lt_old_postuninstall_cmds
43893da084b3Smrg
43903da084b3Smrg# Create an old-style archive from a shared archive.
43913da084b3Smrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
43923da084b3Smrg
43933da084b3Smrg# Create a temporary old-style archive to link instead of a shared archive.
43943da084b3Smrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
43953da084b3Smrg
43963da084b3Smrg# Commands used to build and install a shared archive.
43973da084b3Smrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
43983da084b3Smrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
43993da084b3Smrgpostinstall_cmds=$lt_postinstall_cmds
44003da084b3Smrgpostuninstall_cmds=$lt_postuninstall_cmds
44013da084b3Smrg
44023da084b3Smrg# Commands used to build a loadable module (assumed same as above if empty)
44033da084b3Smrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
44043da084b3Smrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
44053da084b3Smrg
44063da084b3Smrg# Commands to strip libraries.
44073da084b3Smrgold_striplib=$lt_old_striplib
44083da084b3Smrgstriplib=$lt_striplib
44093da084b3Smrg
44103da084b3Smrg# Dependencies to place before the objects being linked to create a
44113da084b3Smrg# shared library.
44123da084b3Smrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
44133da084b3Smrg
44143da084b3Smrg# Dependencies to place after the objects being linked to create a
44153da084b3Smrg# shared library.
44163da084b3Smrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
44173da084b3Smrg
44183da084b3Smrg# Dependencies to place before the objects being linked to create a
44193da084b3Smrg# shared library.
44203da084b3Smrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
44213da084b3Smrg
44223da084b3Smrg# Dependencies to place after the objects being linked to create a
44233da084b3Smrg# shared library.
44243da084b3Smrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
44253da084b3Smrg
44263da084b3Smrg# The library search path used internally by the compiler when linking
44273da084b3Smrg# a shared library.
44283da084b3Smrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
44293da084b3Smrg
44303da084b3Smrg# Method to check whether dependent libraries are shared objects.
44313da084b3Smrgdeplibs_check_method=$lt_deplibs_check_method
44323da084b3Smrg
44333da084b3Smrg# Command to use when deplibs_check_method == file_magic.
44343da084b3Smrgfile_magic_cmd=$lt_file_magic_cmd
44353da084b3Smrg
44363da084b3Smrg# Flag that allows shared libraries with undefined symbols to be built.
44373da084b3Smrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
44383da084b3Smrg
44393da084b3Smrg# Flag that forces no undefined symbols.
44403da084b3Smrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
44413da084b3Smrg
44423da084b3Smrg# Commands used to finish a libtool library installation in a directory.
44433da084b3Smrgfinish_cmds=$lt_finish_cmds
44443da084b3Smrg
44453da084b3Smrg# Same as above, but a single script fragment to be evaled but not shown.
44463da084b3Smrgfinish_eval=$lt_finish_eval
44473da084b3Smrg
44483da084b3Smrg# Take the output of nm and produce a listing of raw symbols and C names.
44493da084b3Smrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
44503da084b3Smrg
44513da084b3Smrg# Transform the output of nm in a proper C declaration
44523da084b3Smrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
44533da084b3Smrg
44543da084b3Smrg# Transform the output of nm in a C name address pair
44553da084b3Smrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
44563da084b3Smrg
44573da084b3Smrg# This is the shared library runtime path variable.
44583da084b3Smrgrunpath_var=$runpath_var
44593da084b3Smrg
44603da084b3Smrg# This is the shared library path variable.
44613da084b3Smrgshlibpath_var=$shlibpath_var
44623da084b3Smrg
44633da084b3Smrg# Is shlibpath searched before the hard-coded library search path?
44643da084b3Smrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath
44653da084b3Smrg
44663da084b3Smrg# How to hardcode a shared library path into an executable.
44673da084b3Smrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
44683da084b3Smrg
44693da084b3Smrg# Whether we should hardcode library paths into libraries.
44703da084b3Smrghardcode_into_libs=$hardcode_into_libs
44713da084b3Smrg
44723da084b3Smrg# Flag to hardcode \$libdir into a binary during linking.
44733da084b3Smrg# This must work even if \$libdir does not exist.
44743da084b3Smrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
44753da084b3Smrg
44763da084b3Smrg# If ld is used when linking, flag to hardcode \$libdir into
44773da084b3Smrg# a binary during linking. This must work even if \$libdir does
44783da084b3Smrg# not exist.
44793da084b3Smrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
44803da084b3Smrg
44813da084b3Smrg# Whether we need a single -rpath flag with a separated argument.
44823da084b3Smrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
44833da084b3Smrg
44843da084b3Smrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
44853da084b3Smrg# resulting binary.
44863da084b3Smrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
44873da084b3Smrg
44883da084b3Smrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
44893da084b3Smrg# resulting binary.
44903da084b3Smrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
44913da084b3Smrg
44923da084b3Smrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
44933da084b3Smrg# the resulting binary.
44943da084b3Smrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
44953da084b3Smrg
44963da084b3Smrg# Set to yes if building a shared library automatically hardcodes DIR into the library
44973da084b3Smrg# and all subsequent libraries and executables linked against it.
44983da084b3Smrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
44993da084b3Smrg
45003da084b3Smrg# Variables whose values should be saved in libtool wrapper scripts and
45013da084b3Smrg# restored at relink time.
45023da084b3Smrgvariables_saved_for_relink="$variables_saved_for_relink"
45033da084b3Smrg
45043da084b3Smrg# Whether libtool must link a program against all its dependency libraries.
45053da084b3Smrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
45063da084b3Smrg
45073da084b3Smrg# Compile-time system search path for libraries
45083da084b3Smrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec
45093da084b3Smrg
45103da084b3Smrg# Run-time system search path for libraries
45113da084b3Smrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
45123da084b3Smrg
45133da084b3Smrg# Fix the shell variable \$srcfile for the compiler.
45143da084b3Smrgfix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
45153da084b3Smrg
45163da084b3Smrg# Set to yes if exported symbols are required.
45173da084b3Smrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
45183da084b3Smrg
45193da084b3Smrg# The commands to list exported symbols.
45203da084b3Smrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
45213da084b3Smrg
45223da084b3Smrg# The commands to extract the exported symbol list from a shared archive.
45233da084b3Smrgextract_expsyms_cmds=$lt_extract_expsyms_cmds
45243da084b3Smrg
45253da084b3Smrg# Symbols that should not be listed in the preloaded symbols.
45263da084b3Smrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
45273da084b3Smrg
45283da084b3Smrg# Symbols that must always be exported.
45293da084b3Smrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
45303da084b3Smrg
45313da084b3Smrgifelse([$1],[],
45323da084b3Smrg[# ### END LIBTOOL CONFIG],
45333da084b3Smrg[# ### END LIBTOOL TAG CONFIG: $tagname])
45343da084b3Smrg
45353da084b3Smrg__EOF__
45363da084b3Smrg
45373da084b3Smrgifelse([$1],[], [
45383da084b3Smrg  case $host_os in
45393da084b3Smrg  aix3*)
45403da084b3Smrg    cat <<\EOF >> "$cfgfile"
45413da084b3Smrg
45423da084b3Smrg# AIX sometimes has problems with the GCC collect2 program.  For some
45433da084b3Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems
45443da084b3Smrg# vanish in a puff of smoke.
45453da084b3Smrgif test "X${COLLECT_NAMES+set}" != Xset; then
45463da084b3Smrg  COLLECT_NAMES=
45473da084b3Smrg  export COLLECT_NAMES
45483da084b3Smrgfi
45493da084b3SmrgEOF
45503da084b3Smrg    ;;
45513da084b3Smrg  esac
45523da084b3Smrg
45533da084b3Smrg  # We use sed instead of cat because bash on DJGPP gets confused if
45543da084b3Smrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
45553da084b3Smrg  # text mode, it properly converts lines to CR/LF.  This bash problem
45563da084b3Smrg  # is reportedly fixed, but why not run on old versions too?
45573da084b3Smrg  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
45583da084b3Smrg
45593da084b3Smrg  mv -f "$cfgfile" "$ofile" || \
45603da084b3Smrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
45613da084b3Smrg  chmod +x "$ofile"
45623da084b3Smrg])
45633da084b3Smrgelse
45643da084b3Smrg  # If there is no Makefile yet, we rely on a make rule to execute
45653da084b3Smrg  # `config.status --recheck' to rerun these tests and create the
45663da084b3Smrg  # libtool script then.
45673da084b3Smrg  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
45683da084b3Smrg  if test -f "$ltmain_in"; then
45693da084b3Smrg    test -f Makefile && make "$ltmain"
45703da084b3Smrg  fi
45713da084b3Smrgfi
45723da084b3Smrg])# AC_LIBTOOL_CONFIG
45733da084b3Smrg
45743da084b3Smrg
45753da084b3Smrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
45763da084b3Smrg# -------------------------------------------
45773da084b3SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
45783da084b3Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
45793da084b3Smrg
45803da084b3Smrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
45813da084b3Smrg
45823da084b3Smrgif test "$GCC" = yes; then
45833da084b3Smrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
45843da084b3Smrg
45853da084b3Smrg  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
45863da084b3Smrg    lt_cv_prog_compiler_rtti_exceptions,
45873da084b3Smrg    [-fno-rtti -fno-exceptions], [],
45883da084b3Smrg    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
45893da084b3Smrgfi
45903da084b3Smrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
45913da084b3Smrg
45923da084b3Smrg
45933da084b3Smrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
45943da084b3Smrg# ---------------------------------
45953da084b3SmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
45963da084b3Smrg[AC_REQUIRE([AC_CANONICAL_HOST])
45973da084b3SmrgAC_REQUIRE([AC_PROG_NM])
45983da084b3SmrgAC_REQUIRE([AC_OBJEXT])
45993da084b3Smrg# Check for command to grab the raw symbol name followed by C symbol from nm.
46003da084b3SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
46013da084b3SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
46023da084b3Smrg[
46033da084b3Smrg# These are sane defaults that work on at least a few old systems.
46043da084b3Smrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
46053da084b3Smrg
46063da084b3Smrg# Character class describing NM global symbol codes.
46073da084b3Smrgsymcode='[[BCDEGRST]]'
46083da084b3Smrg
46093da084b3Smrg# Regexp to match symbols that can be accessed directly from C.
46103da084b3Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
46113da084b3Smrg
46123da084b3Smrg# Transform an extracted symbol line into a proper C declaration
46133da084b3Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
46143da084b3Smrg
46153da084b3Smrg# Transform an extracted symbol line into symbol name and symbol address
46163da084b3Smrglt_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'"
46173da084b3Smrg
46183da084b3Smrg# Define system-specific variables.
46193da084b3Smrgcase $host_os in
46203da084b3Smrgaix*)
46213da084b3Smrg  symcode='[[BCDT]]'
46223da084b3Smrg  ;;
46233da084b3Smrgcygwin* | mingw* | pw32*)
46243da084b3Smrg  symcode='[[ABCDGISTW]]'
46253da084b3Smrg  ;;
46263da084b3Smrghpux*) # Its linker distinguishes data from code symbols
46273da084b3Smrg  if test "$host_cpu" = ia64; then
46283da084b3Smrg    symcode='[[ABCDEGRST]]'
46293da084b3Smrg  fi
46303da084b3Smrg  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
46313da084b3Smrg  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'"
46323da084b3Smrg  ;;
46333da084b3Smrglinux* | k*bsd*-gnu)
46343da084b3Smrg  if test "$host_cpu" = ia64; then
46353da084b3Smrg    symcode='[[ABCDGIRSTW]]'
46363da084b3Smrg    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
46373da084b3Smrg    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'"
46383da084b3Smrg  fi
46393da084b3Smrg  ;;
46403da084b3Smrgirix* | nonstopux*)
46413da084b3Smrg  symcode='[[BCDEGRST]]'
46423da084b3Smrg  ;;
46433da084b3Smrgosf*)
46443da084b3Smrg  symcode='[[BCDEGQRST]]'
46453da084b3Smrg  ;;
46463da084b3Smrgsolaris*)
46473da084b3Smrg  symcode='[[BDRT]]'
46483da084b3Smrg  ;;
46493da084b3Smrgsco3.2v5*)
46503da084b3Smrg  symcode='[[DT]]'
46513da084b3Smrg  ;;
46523da084b3Smrgsysv4.2uw2*)
46533da084b3Smrg  symcode='[[DT]]'
46543da084b3Smrg  ;;
46553da084b3Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
46563da084b3Smrg  symcode='[[ABDT]]'
46573da084b3Smrg  ;;
46583da084b3Smrgsysv4)
46593da084b3Smrg  symcode='[[DFNSTU]]'
46603da084b3Smrg  ;;
46613da084b3Smrgesac
46623da084b3Smrg
46633da084b3Smrg# Handle CRLF in mingw tool chain
46643da084b3Smrgopt_cr=
46653da084b3Smrgcase $build_os in
46663da084b3Smrgmingw*)
46673da084b3Smrg  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
46683da084b3Smrg  ;;
46693da084b3Smrgesac
46703da084b3Smrg
46713da084b3Smrg# If we're using GNU nm, then use its standard symbol codes.
46723da084b3Smrgcase `$NM -V 2>&1` in
46733da084b3Smrg*GNU* | *'with BFD'*)
46743da084b3Smrg  symcode='[[ABCDGIRSTW]]' ;;
46753da084b3Smrgesac
46763da084b3Smrg
46773da084b3Smrg# Try without a prefix undercore, then with it.
46783da084b3Smrgfor ac_symprfx in "" "_"; do
46793da084b3Smrg
46803da084b3Smrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
46813da084b3Smrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
46823da084b3Smrg
46833da084b3Smrg  # Write the raw and C identifiers.
46843da084b3Smrg  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
46853da084b3Smrg
46863da084b3Smrg  # Check to see that the pipe works correctly.
46873da084b3Smrg  pipe_works=no
46883da084b3Smrg
46893da084b3Smrg  rm -f conftest*
46903da084b3Smrg  cat > conftest.$ac_ext <<EOF
46913da084b3Smrg#ifdef __cplusplus
46923da084b3Smrgextern "C" {
46933da084b3Smrg#endif
46943da084b3Smrgchar nm_test_var;
46953da084b3Smrgvoid nm_test_func(){}
46963da084b3Smrg#ifdef __cplusplus
46973da084b3Smrg}
46983da084b3Smrg#endif
46993da084b3Smrgint main(){nm_test_var='a';nm_test_func();return(0);}
47003da084b3SmrgEOF
47013da084b3Smrg
47023da084b3Smrg  if AC_TRY_EVAL(ac_compile); then
47033da084b3Smrg    # Now try to grab the symbols.
47043da084b3Smrg    nlist=conftest.nm
47053da084b3Smrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
47063da084b3Smrg      # Try sorting and uniquifying the output.
47073da084b3Smrg      if sort "$nlist" | uniq > "$nlist"T; then
47083da084b3Smrg	mv -f "$nlist"T "$nlist"
47093da084b3Smrg      else
47103da084b3Smrg	rm -f "$nlist"T
47113da084b3Smrg      fi
47123da084b3Smrg
47133da084b3Smrg      # Make sure that we snagged all the symbols we need.
47143da084b3Smrg      if grep ' nm_test_var$' "$nlist" >/dev/null; then
47153da084b3Smrg	if grep ' nm_test_func$' "$nlist" >/dev/null; then
47163da084b3Smrg	  cat <<EOF > conftest.$ac_ext
47173da084b3Smrg#ifdef __cplusplus
47183da084b3Smrgextern "C" {
47193da084b3Smrg#endif
47203da084b3Smrg
47213da084b3SmrgEOF
47223da084b3Smrg	  # Now generate the symbol file.
47233da084b3Smrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
47243da084b3Smrg
47253da084b3Smrg	  cat <<EOF >> conftest.$ac_ext
47263da084b3Smrg#if defined (__STDC__) && __STDC__
47273da084b3Smrg# define lt_ptr_t void *
47283da084b3Smrg#else
47293da084b3Smrg# define lt_ptr_t char *
47303da084b3Smrg# define const
47313da084b3Smrg#endif
47323da084b3Smrg
47333da084b3Smrg/* The mapping between symbol names and symbols. */
47343da084b3Smrgconst struct {
47353da084b3Smrg  const char *name;
47363da084b3Smrg  lt_ptr_t address;
47373da084b3Smrg}
47383da084b3Smrglt_preloaded_symbols[[]] =
47393da084b3Smrg{
47403da084b3SmrgEOF
47413da084b3Smrg	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
47423da084b3Smrg	  cat <<\EOF >> conftest.$ac_ext
47433da084b3Smrg  {0, (lt_ptr_t) 0}
47443da084b3Smrg};
47453da084b3Smrg
47463da084b3Smrg#ifdef __cplusplus
47473da084b3Smrg}
47483da084b3Smrg#endif
47493da084b3SmrgEOF
47503da084b3Smrg	  # Now try linking the two files.
47513da084b3Smrg	  mv conftest.$ac_objext conftstm.$ac_objext
47523da084b3Smrg	  lt_save_LIBS="$LIBS"
47533da084b3Smrg	  lt_save_CFLAGS="$CFLAGS"
47543da084b3Smrg	  LIBS="conftstm.$ac_objext"
47553da084b3Smrg	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
47563da084b3Smrg	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
47573da084b3Smrg	    pipe_works=yes
47583da084b3Smrg	  fi
47593da084b3Smrg	  LIBS="$lt_save_LIBS"
47603da084b3Smrg	  CFLAGS="$lt_save_CFLAGS"
47613da084b3Smrg	else
47623da084b3Smrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
47633da084b3Smrg	fi
47643da084b3Smrg      else
47653da084b3Smrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
47663da084b3Smrg      fi
47673da084b3Smrg    else
47683da084b3Smrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
47693da084b3Smrg    fi
47703da084b3Smrg  else
47713da084b3Smrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
47723da084b3Smrg    cat conftest.$ac_ext >&5
47733da084b3Smrg  fi
47743da084b3Smrg  rm -f conftest* conftst*
47753da084b3Smrg
47763da084b3Smrg  # Do not use the global_symbol_pipe unless it works.
47773da084b3Smrg  if test "$pipe_works" = yes; then
47783da084b3Smrg    break
47793da084b3Smrg  else
47803da084b3Smrg    lt_cv_sys_global_symbol_pipe=
47813da084b3Smrg  fi
47823da084b3Smrgdone
47833da084b3Smrg])
47843da084b3Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
47853da084b3Smrg  lt_cv_sys_global_symbol_to_cdecl=
47863da084b3Smrgfi
47873da084b3Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
47883da084b3Smrg  AC_MSG_RESULT(failed)
47893da084b3Smrgelse
47903da084b3Smrg  AC_MSG_RESULT(ok)
47913da084b3Smrgfi
47923da084b3Smrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
47933da084b3Smrg
47943da084b3Smrg
47953da084b3Smrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
47963da084b3Smrg# ---------------------------------------
47973da084b3SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
47983da084b3Smrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
47993da084b3Smrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
48003da084b3Smrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
48013da084b3Smrg
48023da084b3SmrgAC_MSG_CHECKING([for $compiler option to produce PIC])
48033da084b3Smrg ifelse([$1],[CXX],[
48043da084b3Smrg  # C++ specific cases for pic, static, wl, etc.
48053da084b3Smrg  if test "$GXX" = yes; then
48063da084b3Smrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
48073da084b3Smrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
48083da084b3Smrg
48093da084b3Smrg    case $host_os in
48103da084b3Smrg    aix*)
48113da084b3Smrg      # All AIX code is PIC.
48123da084b3Smrg      if test "$host_cpu" = ia64; then
48133da084b3Smrg	# AIX 5 now supports IA64 processor
48143da084b3Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
48153da084b3Smrg      fi
48163da084b3Smrg      ;;
48173da084b3Smrg    amigaos*)
48183da084b3Smrg      # FIXME: we need at least 68020 code to build shared libraries, but
48193da084b3Smrg      # adding the `-m68020' flag to GCC prevents building anything better,
48203da084b3Smrg      # like `-m68040'.
48213da084b3Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
48223da084b3Smrg      ;;
48233da084b3Smrg    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
48243da084b3Smrg      # PIC is the default for these OSes.
48253da084b3Smrg      ;;
48263da084b3Smrg    mingw* | os2* | pw32*)
48273da084b3Smrg      # This hack is so that the source file can tell whether it is being
48283da084b3Smrg      # built for inclusion in a dll (and should export symbols for example).
48293da084b3Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
48303da084b3Smrg      ;;
48313da084b3Smrg    darwin* | rhapsody*)
48323da084b3Smrg      # PIC is the default on this platform
48333da084b3Smrg      # Common symbols not allowed in MH_DYLIB files
48343da084b3Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
48353da084b3Smrg      ;;
48363da084b3Smrg    *djgpp*)
48373da084b3Smrg      # DJGPP does not support shared libraries at all
48383da084b3Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
48393da084b3Smrg      ;;
48403da084b3Smrg    interix3*)
48413da084b3Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
48423da084b3Smrg      # Instead, we relocate shared libraries at runtime.
48433da084b3Smrg      ;;
48443da084b3Smrg    sysv4*MP*)
48453da084b3Smrg      if test -d /usr/nec; then
48463da084b3Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
48473da084b3Smrg      fi
48483da084b3Smrg      ;;
48493da084b3Smrg    hpux*)
48503da084b3Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
48513da084b3Smrg      # not for PA HP-UX.
48523da084b3Smrg      case $host_cpu in
48533da084b3Smrg      hppa*64*|ia64*)
48543da084b3Smrg	;;
48553da084b3Smrg      *)
48563da084b3Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
48573da084b3Smrg	;;
48583da084b3Smrg      esac
48593da084b3Smrg      ;;
48603da084b3Smrg    *)
48613da084b3Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
48623da084b3Smrg      ;;
48633da084b3Smrg    esac
48643da084b3Smrg  else
48653da084b3Smrg    case $host_os in
48663da084b3Smrg      aix4* | aix5*)
48673da084b3Smrg	# All AIX code is PIC.
48683da084b3Smrg	if test "$host_cpu" = ia64; then
48693da084b3Smrg	  # AIX 5 now supports IA64 processor
48703da084b3Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
48713da084b3Smrg	else
48723da084b3Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
48733da084b3Smrg	fi
48743da084b3Smrg	;;
48753da084b3Smrg      chorus*)
48763da084b3Smrg	case $cc_basename in
48773da084b3Smrg	cxch68*)
48783da084b3Smrg	  # Green Hills C++ Compiler
48793da084b3Smrg	  # _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"
48803da084b3Smrg	  ;;
48813da084b3Smrg	esac
48823da084b3Smrg	;;
48833da084b3Smrg       darwin*)
48843da084b3Smrg         # PIC is the default on this platform
48853da084b3Smrg         # Common symbols not allowed in MH_DYLIB files
48863da084b3Smrg         case $cc_basename in
48873da084b3Smrg           xlc*)
48883da084b3Smrg           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
48893da084b3Smrg           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
48903da084b3Smrg           ;;
48913da084b3Smrg         esac
48923da084b3Smrg       ;;
48933da084b3Smrg      dgux*)
48943da084b3Smrg	case $cc_basename in
48953da084b3Smrg	  ec++*)
48963da084b3Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
48973da084b3Smrg	    ;;
48983da084b3Smrg	  ghcx*)
48993da084b3Smrg	    # Green Hills C++ Compiler
49003da084b3Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
49013da084b3Smrg	    ;;
49023da084b3Smrg	  *)
49033da084b3Smrg	    ;;
49043da084b3Smrg	esac
49053da084b3Smrg	;;
49063da084b3Smrg      freebsd* | dragonfly*)
49073da084b3Smrg	# FreeBSD uses GNU C++
49083da084b3Smrg	;;
49093da084b3Smrg      hpux9* | hpux10* | hpux11*)
49103da084b3Smrg	case $cc_basename in
49113da084b3Smrg	  CC*)
49123da084b3Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
49133da084b3Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
49143da084b3Smrg	    if test "$host_cpu" != ia64; then
49153da084b3Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
49163da084b3Smrg	    fi
49173da084b3Smrg	    ;;
49183da084b3Smrg	  aCC*)
49193da084b3Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
49203da084b3Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
49213da084b3Smrg	    case $host_cpu in
49223da084b3Smrg	    hppa*64*|ia64*)
49233da084b3Smrg	      # +Z the default
49243da084b3Smrg	      ;;
49253da084b3Smrg	    *)
49263da084b3Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
49273da084b3Smrg	      ;;
49283da084b3Smrg	    esac
49293da084b3Smrg	    ;;
49303da084b3Smrg	  *)
49313da084b3Smrg	    ;;
49323da084b3Smrg	esac
49333da084b3Smrg	;;
49343da084b3Smrg      interix*)
49353da084b3Smrg	# This is c89, which is MS Visual C++ (no shared libs)
49363da084b3Smrg	# Anyone wants to do a port?
49373da084b3Smrg	;;
49383da084b3Smrg      irix5* | irix6* | nonstopux*)
49393da084b3Smrg	case $cc_basename in
49403da084b3Smrg	  CC*)
49413da084b3Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
49423da084b3Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
49433da084b3Smrg	    # CC pic flag -KPIC is the default.
49443da084b3Smrg	    ;;
49453da084b3Smrg	  *)
49463da084b3Smrg	    ;;
49473da084b3Smrg	esac
49483da084b3Smrg	;;
49493da084b3Smrg      linux* | k*bsd*-gnu)
49503da084b3Smrg	case $cc_basename in
49513da084b3Smrg	  KCC*)
49523da084b3Smrg	    # KAI C++ Compiler
49533da084b3Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
49543da084b3Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
49553da084b3Smrg	    ;;
49563da084b3Smrg	  icpc* | ecpc*)
49573da084b3Smrg	    # Intel C++
49583da084b3Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
49593da084b3Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
49603da084b3Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
49613da084b3Smrg	    ;;
49623da084b3Smrg	  pgCC*)
49633da084b3Smrg	    # Portland Group C++ compiler.
49643da084b3Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
49653da084b3Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
49663da084b3Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
49673da084b3Smrg	    ;;
49683da084b3Smrg	  cxx*)
49693da084b3Smrg	    # Compaq C++
49703da084b3Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
49713da084b3Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
49723da084b3Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
49733da084b3Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
49743da084b3Smrg	    ;;
49753da084b3Smrg	  *)
49763da084b3Smrg	    ;;
49773da084b3Smrg	esac
49783da084b3Smrg	;;
49793da084b3Smrg      lynxos*)
49803da084b3Smrg	;;
49813da084b3Smrg      m88k*)
49823da084b3Smrg	;;
49833da084b3Smrg      mvs*)
49843da084b3Smrg	case $cc_basename in
49853da084b3Smrg	  cxx*)
49863da084b3Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
49873da084b3Smrg	    ;;
49883da084b3Smrg	  *)
49893da084b3Smrg	    ;;
49903da084b3Smrg	esac
49913da084b3Smrg	;;
49923da084b3Smrg      netbsd* | netbsdelf*-gnu)
49933da084b3Smrg	;;
49943da084b3Smrg      osf3* | osf4* | osf5*)
49953da084b3Smrg	case $cc_basename in
49963da084b3Smrg	  KCC*)
49973da084b3Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
49983da084b3Smrg	    ;;
49993da084b3Smrg	  RCC*)
50003da084b3Smrg	    # Rational C++ 2.4.1
50013da084b3Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
50023da084b3Smrg	    ;;
50033da084b3Smrg	  cxx*)
50043da084b3Smrg	    # Digital/Compaq C++
50053da084b3Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
50063da084b3Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
50073da084b3Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
50083da084b3Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
50093da084b3Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
50103da084b3Smrg	    ;;
50113da084b3Smrg	  *)
50123da084b3Smrg	    ;;
50133da084b3Smrg	esac
50143da084b3Smrg	;;
50153da084b3Smrg      psos*)
50163da084b3Smrg	;;
50173da084b3Smrg      solaris*)
50183da084b3Smrg	case $cc_basename in
50193da084b3Smrg	  CC*)
50203da084b3Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
50213da084b3Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
50223da084b3Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
50233da084b3Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
50243da084b3Smrg	    ;;
50253da084b3Smrg	  gcx*)
50263da084b3Smrg	    # Green Hills C++ Compiler
50273da084b3Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
50283da084b3Smrg	    ;;
50293da084b3Smrg	  *)
50303da084b3Smrg	    ;;
50313da084b3Smrg	esac
50323da084b3Smrg	;;
50333da084b3Smrg      sunos4*)
50343da084b3Smrg	case $cc_basename in
50353da084b3Smrg	  CC*)
50363da084b3Smrg	    # Sun C++ 4.x
50373da084b3Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
50383da084b3Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
50393da084b3Smrg	    ;;
50403da084b3Smrg	  lcc*)
50413da084b3Smrg	    # Lucid
50423da084b3Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
50433da084b3Smrg	    ;;
50443da084b3Smrg	  *)
50453da084b3Smrg	    ;;
50463da084b3Smrg	esac
50473da084b3Smrg	;;
50483da084b3Smrg      tandem*)
50493da084b3Smrg	case $cc_basename in
50503da084b3Smrg	  NCC*)
50513da084b3Smrg	    # NonStop-UX NCC 3.20
50523da084b3Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
50533da084b3Smrg	    ;;
50543da084b3Smrg	  *)
50553da084b3Smrg	    ;;
50563da084b3Smrg	esac
50573da084b3Smrg	;;
50583da084b3Smrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
50593da084b3Smrg	case $cc_basename in
50603da084b3Smrg	  CC*)
50613da084b3Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
50623da084b3Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
50633da084b3Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
50643da084b3Smrg	    ;;
50653da084b3Smrg	esac
50663da084b3Smrg	;;
50673da084b3Smrg      vxworks*)
50683da084b3Smrg	;;
50693da084b3Smrg      *)
50703da084b3Smrg	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
50713da084b3Smrg	;;
50723da084b3Smrg    esac
50733da084b3Smrg  fi
50743da084b3Smrg],
50753da084b3Smrg[
50763da084b3Smrg  if test "$GCC" = yes; then
50773da084b3Smrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
50783da084b3Smrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
50793da084b3Smrg
50803da084b3Smrg    case $host_os in
50813da084b3Smrg      aix*)
50823da084b3Smrg      # All AIX code is PIC.
50833da084b3Smrg      if test "$host_cpu" = ia64; then
50843da084b3Smrg	# AIX 5 now supports IA64 processor
50853da084b3Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
50863da084b3Smrg      fi
50873da084b3Smrg      ;;
50883da084b3Smrg
50893da084b3Smrg    amigaos*)
50903da084b3Smrg      # FIXME: we need at least 68020 code to build shared libraries, but
50913da084b3Smrg      # adding the `-m68020' flag to GCC prevents building anything better,
50923da084b3Smrg      # like `-m68040'.
50933da084b3Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
50943da084b3Smrg      ;;
50953da084b3Smrg
50963da084b3Smrg    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
50973da084b3Smrg      # PIC is the default for these OSes.
50983da084b3Smrg      ;;
50993da084b3Smrg
51003da084b3Smrg    mingw* | pw32* | os2*)
51013da084b3Smrg      # This hack is so that the source file can tell whether it is being
51023da084b3Smrg      # built for inclusion in a dll (and should export symbols for example).
51033da084b3Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
51043da084b3Smrg      ;;
51053da084b3Smrg
51063da084b3Smrg    darwin* | rhapsody*)
51073da084b3Smrg      # PIC is the default on this platform
51083da084b3Smrg      # Common symbols not allowed in MH_DYLIB files
51093da084b3Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
51103da084b3Smrg      ;;
51113da084b3Smrg
51123da084b3Smrg    interix3*)
51133da084b3Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
51143da084b3Smrg      # Instead, we relocate shared libraries at runtime.
51153da084b3Smrg      ;;
51163da084b3Smrg
51173da084b3Smrg    msdosdjgpp*)
51183da084b3Smrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
51193da084b3Smrg      # on systems that don't support them.
51203da084b3Smrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
51213da084b3Smrg      enable_shared=no
51223da084b3Smrg      ;;
51233da084b3Smrg
51243da084b3Smrg    sysv4*MP*)
51253da084b3Smrg      if test -d /usr/nec; then
51263da084b3Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
51273da084b3Smrg      fi
51283da084b3Smrg      ;;
51293da084b3Smrg
51303da084b3Smrg    hpux*)
51313da084b3Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
51323da084b3Smrg      # not for PA HP-UX.
51333da084b3Smrg      case $host_cpu in
51343da084b3Smrg      hppa*64*|ia64*)
51353da084b3Smrg	# +Z the default
51363da084b3Smrg	;;
51373da084b3Smrg      *)
51383da084b3Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
51393da084b3Smrg	;;
51403da084b3Smrg      esac
51413da084b3Smrg      ;;
51423da084b3Smrg
51433da084b3Smrg    *)
51443da084b3Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
51453da084b3Smrg      ;;
51463da084b3Smrg    esac
51473da084b3Smrg  else
51483da084b3Smrg    # PORTME Check for flag to pass linker flags through the system compiler.
51493da084b3Smrg    case $host_os in
51503da084b3Smrg    aix*)
51513da084b3Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
51523da084b3Smrg      if test "$host_cpu" = ia64; then
51533da084b3Smrg	# AIX 5 now supports IA64 processor
51543da084b3Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
51553da084b3Smrg      else
51563da084b3Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
51573da084b3Smrg      fi
51583da084b3Smrg      ;;
51593da084b3Smrg      darwin*)
51603da084b3Smrg        # PIC is the default on this platform
51613da084b3Smrg        # Common symbols not allowed in MH_DYLIB files
51623da084b3Smrg       case $cc_basename in
51633da084b3Smrg         xlc*)
51643da084b3Smrg         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
51653da084b3Smrg         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
51663da084b3Smrg         ;;
51673da084b3Smrg       esac
51683da084b3Smrg       ;;
51693da084b3Smrg
51703da084b3Smrg    mingw* | pw32* | os2*)
51713da084b3Smrg      # This hack is so that the source file can tell whether it is being
51723da084b3Smrg      # built for inclusion in a dll (and should export symbols for example).
51733da084b3Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
51743da084b3Smrg      ;;
51753da084b3Smrg
51763da084b3Smrg    hpux9* | hpux10* | hpux11*)
51773da084b3Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
51783da084b3Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
51793da084b3Smrg      # not for PA HP-UX.
51803da084b3Smrg      case $host_cpu in
51813da084b3Smrg      hppa*64*|ia64*)
51823da084b3Smrg	# +Z the default
51833da084b3Smrg	;;
51843da084b3Smrg      *)
51853da084b3Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
51863da084b3Smrg	;;
51873da084b3Smrg      esac
51883da084b3Smrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
51893da084b3Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
51903da084b3Smrg      ;;
51913da084b3Smrg
51923da084b3Smrg    irix5* | irix6* | nonstopux*)
51933da084b3Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
51943da084b3Smrg      # PIC (with -KPIC) is the default.
51953da084b3Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
51963da084b3Smrg      ;;
51973da084b3Smrg
51983da084b3Smrg    newsos6)
51993da084b3Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
52003da084b3Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
52013da084b3Smrg      ;;
52023da084b3Smrg
52033da084b3Smrg    linux* | k*bsd*-gnu)
52043da084b3Smrg      case $cc_basename in
52053da084b3Smrg      icc* | ecc*)
52063da084b3Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
52073da084b3Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
52083da084b3Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
52093da084b3Smrg        ;;
52103da084b3Smrg      pgcc* | pgf77* | pgf90* | pgf95*)
52113da084b3Smrg        # Portland Group compilers (*not* the Pentium gcc compiler,
52123da084b3Smrg	# which looks to be a dead project)
52133da084b3Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
52143da084b3Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
52153da084b3Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
52163da084b3Smrg        ;;
52173da084b3Smrg      ccc*)
52183da084b3Smrg        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
52193da084b3Smrg        # All Alpha code is PIC.
52203da084b3Smrg        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
52213da084b3Smrg        ;;
52223da084b3Smrg      esac
52233da084b3Smrg      ;;
52243da084b3Smrg
52253da084b3Smrg    osf3* | osf4* | osf5*)
52263da084b3Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
52273da084b3Smrg      # All OSF/1 code is PIC.
52283da084b3Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
52293da084b3Smrg      ;;
52303da084b3Smrg
52313da084b3Smrg    solaris*)
52323da084b3Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
52333da084b3Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
52343da084b3Smrg      case $cc_basename in
52353da084b3Smrg      f77* | f90* | f95*)
52363da084b3Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
52373da084b3Smrg      *)
52383da084b3Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
52393da084b3Smrg      esac
52403da084b3Smrg      ;;
52413da084b3Smrg
52423da084b3Smrg    sunos4*)
52433da084b3Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
52443da084b3Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
52453da084b3Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
52463da084b3Smrg      ;;
52473da084b3Smrg
52483da084b3Smrg    sysv4 | sysv4.2uw2* | sysv4.3*)
52493da084b3Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
52503da084b3Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
52513da084b3Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
52523da084b3Smrg      ;;
52533da084b3Smrg
52543da084b3Smrg    sysv4*MP*)
52553da084b3Smrg      if test -d /usr/nec ;then
52563da084b3Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
52573da084b3Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
52583da084b3Smrg      fi
52593da084b3Smrg      ;;
52603da084b3Smrg
52613da084b3Smrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
52623da084b3Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
52633da084b3Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
52643da084b3Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
52653da084b3Smrg      ;;
52663da084b3Smrg
52673da084b3Smrg    unicos*)
52683da084b3Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
52693da084b3Smrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
52703da084b3Smrg      ;;
52713da084b3Smrg
52723da084b3Smrg    uts4*)
52733da084b3Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
52743da084b3Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
52753da084b3Smrg      ;;
52763da084b3Smrg
52773da084b3Smrg    *)
52783da084b3Smrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
52793da084b3Smrg      ;;
52803da084b3Smrg    esac
52813da084b3Smrg  fi
52823da084b3Smrg])
52833da084b3SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
52843da084b3Smrg
52853da084b3Smrg#
52863da084b3Smrg# Check to make sure the PIC flag actually works.
52873da084b3Smrg#
52883da084b3Smrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
52893da084b3Smrg  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
52903da084b3Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
52913da084b3Smrg    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
52923da084b3Smrg    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
52933da084b3Smrg     "" | " "*) ;;
52943da084b3Smrg     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
52953da084b3Smrg     esac],
52963da084b3Smrg    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
52973da084b3Smrg     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
52983da084b3Smrgfi
52993da084b3Smrgcase $host_os in
53003da084b3Smrg  # For platforms which do not support PIC, -DPIC is meaningless:
53013da084b3Smrg  *djgpp*)
53023da084b3Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
53033da084b3Smrg    ;;
53043da084b3Smrg  *)
53053da084b3Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
53063da084b3Smrg    ;;
53073da084b3Smrgesac
53083da084b3Smrg
53093da084b3Smrg#
53103da084b3Smrg# Check to make sure the static flag actually works.
53113da084b3Smrg#
53123da084b3Smrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
53133da084b3SmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
53143da084b3Smrg  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
53153da084b3Smrg  $lt_tmp_static_flag,
53163da084b3Smrg  [],
53173da084b3Smrg  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
53183da084b3Smrg])
53193da084b3Smrg
53203da084b3Smrg
53213da084b3Smrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
53223da084b3Smrg# ------------------------------------
53233da084b3Smrg# See if the linker supports building shared libraries.
53243da084b3SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
53253da084b3Smrg[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
53263da084b3Smrgifelse([$1],[CXX],[
53273da084b3Smrg  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
53283da084b3Smrg  case $host_os in
53293da084b3Smrg  aix4* | aix5*)
53303da084b3Smrg    # If we're using GNU nm, then we don't want the "-C" option.
53313da084b3Smrg    # -C means demangle to AIX nm, but means don't demangle with GNU nm
53323da084b3Smrg    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
53333da084b3Smrg      _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'
53343da084b3Smrg    else
53353da084b3Smrg      _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'
53363da084b3Smrg    fi
53373da084b3Smrg    ;;
53383da084b3Smrg  pw32*)
53393da084b3Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
53403da084b3Smrg  ;;
53413da084b3Smrg  cygwin* | mingw*)
53423da084b3Smrg    _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'
53433da084b3Smrg  ;;
53443da084b3Smrg  linux* | k*bsd*-gnu)
53453da084b3Smrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=no
53463da084b3Smrg  ;;
53473da084b3Smrg  *)
53483da084b3Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
53493da084b3Smrg  ;;
53503da084b3Smrg  esac
53513da084b3Smrg],[
53523da084b3Smrg  runpath_var=
53533da084b3Smrg  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
53543da084b3Smrg  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
53553da084b3Smrg  _LT_AC_TAGVAR(archive_cmds, $1)=
53563da084b3Smrg  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
53573da084b3Smrg  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
53583da084b3Smrg  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
53593da084b3Smrg  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
53603da084b3Smrg  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
53613da084b3Smrg  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
53623da084b3Smrg  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
53633da084b3Smrg  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
53643da084b3Smrg  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
53653da084b3Smrg  _LT_AC_TAGVAR(hardcode_direct, $1)=no
53663da084b3Smrg  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
53673da084b3Smrg  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
53683da084b3Smrg  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
53693da084b3Smrg  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
53703da084b3Smrg  _LT_AC_TAGVAR(module_cmds, $1)=
53713da084b3Smrg  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
53723da084b3Smrg  _LT_AC_TAGVAR(always_export_symbols, $1)=no
53733da084b3Smrg  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
53743da084b3Smrg  # include_expsyms should be a list of space-separated symbols to be *always*
53753da084b3Smrg  # included in the symbol list
53763da084b3Smrg  _LT_AC_TAGVAR(include_expsyms, $1)=
53773da084b3Smrg  # exclude_expsyms can be an extended regexp of symbols to exclude
53783da084b3Smrg  # it will be wrapped by ` (' and `)$', so one must not match beginning or
53793da084b3Smrg  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
53803da084b3Smrg  # as well as any symbol that contains `d'.
53813da084b3Smrg  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
53823da084b3Smrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
53833da084b3Smrg  # platforms (ab)use it in PIC code, but their linkers get confused if
53843da084b3Smrg  # the symbol is explicitly referenced.  Since portable code cannot
53853da084b3Smrg  # rely on this symbol name, it's probably fine to never include it in
53863da084b3Smrg  # preloaded symbol tables.
53873da084b3Smrg  extract_expsyms_cmds=
53883da084b3Smrg  # Just being paranoid about ensuring that cc_basename is set.
53893da084b3Smrg  _LT_CC_BASENAME([$compiler])
53903da084b3Smrg  case $host_os in
53913da084b3Smrg  cygwin* | mingw* | pw32*)
53923da084b3Smrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
53933da084b3Smrg    # When not using gcc, we currently assume that we are using
53943da084b3Smrg    # Microsoft Visual C++.
53953da084b3Smrg    if test "$GCC" != yes; then
53963da084b3Smrg      with_gnu_ld=no
53973da084b3Smrg    fi
53983da084b3Smrg    ;;
53993da084b3Smrg  interix*)
54003da084b3Smrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
54013da084b3Smrg    with_gnu_ld=yes
54023da084b3Smrg    ;;
54033da084b3Smrg  openbsd*)
54043da084b3Smrg    with_gnu_ld=no
54053da084b3Smrg    ;;
54063da084b3Smrg  esac
54073da084b3Smrg
54083da084b3Smrg  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
54093da084b3Smrg  if test "$with_gnu_ld" = yes; then
54103da084b3Smrg    # If archive_cmds runs LD, not CC, wlarc should be empty
54113da084b3Smrg    wlarc='${wl}'
54123da084b3Smrg
54133da084b3Smrg    # Set some defaults for GNU ld with shared library support. These
54143da084b3Smrg    # are reset later if shared libraries are not supported. Putting them
54153da084b3Smrg    # here allows them to be overridden if necessary.
54163da084b3Smrg    runpath_var=LD_RUN_PATH
54173da084b3Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
54183da084b3Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
54193da084b3Smrg    # ancient GNU ld didn't support --whole-archive et. al.
54203da084b3Smrg    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
54213da084b3Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
54223da084b3Smrg      else
54233da084b3Smrg  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
54243da084b3Smrg    fi
54253da084b3Smrg    supports_anon_versioning=no
54263da084b3Smrg    case `$LD -v 2>/dev/null` in
54273da084b3Smrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
54283da084b3Smrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
54293da084b3Smrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
54303da084b3Smrg      *\ 2.11.*) ;; # other 2.11 versions
54313da084b3Smrg      *) supports_anon_versioning=yes ;;
54323da084b3Smrg    esac
54333da084b3Smrg
54343da084b3Smrg    # See if GNU ld supports shared libraries.
54353da084b3Smrg    case $host_os in
54363da084b3Smrg    aix3* | aix4* | aix5*)
54373da084b3Smrg      # On AIX/PPC, the GNU linker is very broken
54383da084b3Smrg      if test "$host_cpu" != ia64; then
54393da084b3Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
54403da084b3Smrg	cat <<EOF 1>&2
54413da084b3Smrg
54423da084b3Smrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported
54433da084b3Smrg*** to be unable to reliably create shared libraries on AIX.
54443da084b3Smrg*** Therefore, libtool is disabling shared libraries support.  If you
54453da084b3Smrg*** really care for shared libraries, you may want to modify your PATH
54463da084b3Smrg*** so that a non-GNU linker is found, and then restart.
54473da084b3Smrg
54483da084b3SmrgEOF
54493da084b3Smrg      fi
54503da084b3Smrg      ;;
54513da084b3Smrg
54523da084b3Smrg    amigaos*)
54533da084b3Smrg      _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)'
54543da084b3Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
54553da084b3Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
54563da084b3Smrg
54573da084b3Smrg      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
54583da084b3Smrg      # that the semantics of dynamic libraries on AmigaOS, at least up
54593da084b3Smrg      # to version 4, is to share data among multiple programs linked
54603da084b3Smrg      # with the same dynamic library.  Since this doesn't match the
54613da084b3Smrg      # behavior of shared libraries on other platforms, we can't use
54623da084b3Smrg      # them.
54633da084b3Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
54643da084b3Smrg      ;;
54653da084b3Smrg
54663da084b3Smrg    beos*)
54673da084b3Smrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
54683da084b3Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
54693da084b3Smrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
54703da084b3Smrg	# support --undefined.  This deserves some investigation.  FIXME
54713da084b3Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
54723da084b3Smrg      else
54733da084b3Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
54743da084b3Smrg      fi
54753da084b3Smrg      ;;
54763da084b3Smrg
54773da084b3Smrg    cygwin* | mingw* | pw32*)
54783da084b3Smrg      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
54793da084b3Smrg      # as there is no search path for DLLs.
54803da084b3Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
54813da084b3Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
54823da084b3Smrg      _LT_AC_TAGVAR(always_export_symbols, $1)=no
54833da084b3Smrg      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
54843da084b3Smrg      _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'
54853da084b3Smrg
54863da084b3Smrg      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
54873da084b3Smrg        _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'
54883da084b3Smrg	# If the export-symbols file already is a .def file (1st line
54893da084b3Smrg	# is EXPORTS), use it as is; otherwise, prepend...
54903da084b3Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
54913da084b3Smrg	  cp $export_symbols $output_objdir/$soname.def;
54923da084b3Smrg	else
54933da084b3Smrg	  echo EXPORTS > $output_objdir/$soname.def;
54943da084b3Smrg	  cat $export_symbols >> $output_objdir/$soname.def;
54953da084b3Smrg	fi~
54963da084b3Smrg	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
54973da084b3Smrg      else
54983da084b3Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
54993da084b3Smrg      fi
55003da084b3Smrg      ;;
55013da084b3Smrg
55023da084b3Smrg    interix3*)
55033da084b3Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
55043da084b3Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
55053da084b3Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
55063da084b3Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
55073da084b3Smrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
55083da084b3Smrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
55093da084b3Smrg      # default) and relocated if they conflict, which is a slow very memory
55103da084b3Smrg      # consuming and fragmenting process.  To avoid this, we pick a random,
55113da084b3Smrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
55123da084b3Smrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
55133da084b3Smrg      _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'
55143da084b3Smrg      _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'
55153da084b3Smrg      ;;
55163da084b3Smrg
55173da084b3Smrg    linux* | k*bsd*-gnu)
55183da084b3Smrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
55193da084b3Smrg	tmp_addflag=
55203da084b3Smrg	case $cc_basename,$host_cpu in
55213da084b3Smrg	pgcc*)				# Portland Group C compiler
55223da084b3Smrg	  _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'
55233da084b3Smrg	  tmp_addflag=' $pic_flag'
55243da084b3Smrg	  ;;
55253da084b3Smrg	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
55263da084b3Smrg	  _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'
55273da084b3Smrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
55283da084b3Smrg	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
55293da084b3Smrg	  tmp_addflag=' -i_dynamic' ;;
55303da084b3Smrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
55313da084b3Smrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
55323da084b3Smrg	ifc* | ifort*)			# Intel Fortran compiler
55333da084b3Smrg	  tmp_addflag=' -nofor_main' ;;
55343da084b3Smrg	esac
55353da084b3Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
55363da084b3Smrg
55373da084b3Smrg	if test $supports_anon_versioning = yes; then
55383da084b3Smrg	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
55393da084b3Smrg  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
55403da084b3Smrg  $echo "local: *; };" >> $output_objdir/$libname.ver~
55413da084b3Smrg	  $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
55423da084b3Smrg	fi
55433da084b3Smrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=no
55443da084b3Smrg      else
55453da084b3Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
55463da084b3Smrg      fi
55473da084b3Smrg      ;;
55483da084b3Smrg
55493da084b3Smrg    netbsd* | netbsdelf*-gnu)
55503da084b3Smrg      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
55513da084b3Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
55523da084b3Smrg	wlarc=
55533da084b3Smrg      else
55543da084b3Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
55553da084b3Smrg	_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'
55563da084b3Smrg      fi
55573da084b3Smrg      ;;
55583da084b3Smrg
55593da084b3Smrg    solaris*)
55603da084b3Smrg      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
55613da084b3Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
55623da084b3Smrg	cat <<EOF 1>&2
55633da084b3Smrg
55643da084b3Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
55653da084b3Smrg*** create shared libraries on Solaris systems.  Therefore, libtool
55663da084b3Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
55673da084b3Smrg*** binutils to release 2.9.1 or newer.  Another option is to modify
55683da084b3Smrg*** your PATH or compiler configuration so that the native linker is
55693da084b3Smrg*** used, and then restart.
55703da084b3Smrg
55713da084b3SmrgEOF
55723da084b3Smrg      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
55733da084b3Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
55743da084b3Smrg	_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'
55753da084b3Smrg      else
55763da084b3Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
55773da084b3Smrg      fi
55783da084b3Smrg      ;;
55793da084b3Smrg
55803da084b3Smrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
55813da084b3Smrg      case `$LD -v 2>&1` in
55823da084b3Smrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 
55833da084b3Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
55843da084b3Smrg	cat <<_LT_EOF 1>&2
55853da084b3Smrg
55863da084b3Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
55873da084b3Smrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
55883da084b3Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
55893da084b3Smrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
55903da084b3Smrg*** your PATH or compiler configuration so that the native linker is
55913da084b3Smrg*** used, and then restart.
55923da084b3Smrg
55933da084b3Smrg_LT_EOF
55943da084b3Smrg	;;
55953da084b3Smrg	*)
55963da084b3Smrg	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
55973da084b3Smrg	    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
55983da084b3Smrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
55993da084b3Smrg	    _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'
56003da084b3Smrg	  else
56013da084b3Smrg	    _LT_AC_TAGVAR(ld_shlibs, $1)=no
56023da084b3Smrg	  fi
56033da084b3Smrg	;;
56043da084b3Smrg      esac
56053da084b3Smrg      ;;
56063da084b3Smrg
56073da084b3Smrg    sunos4*)
56083da084b3Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
56093da084b3Smrg      wlarc=
56103da084b3Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
56113da084b3Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
56123da084b3Smrg      ;;
56133da084b3Smrg
56143da084b3Smrg    *)
56153da084b3Smrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
56163da084b3Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
56173da084b3Smrg	_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'
56183da084b3Smrg      else
56193da084b3Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
56203da084b3Smrg      fi
56213da084b3Smrg      ;;
56223da084b3Smrg    esac
56233da084b3Smrg
56243da084b3Smrg    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
56253da084b3Smrg      runpath_var=
56263da084b3Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
56273da084b3Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
56283da084b3Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
56293da084b3Smrg    fi
56303da084b3Smrg  else
56313da084b3Smrg    # PORTME fill in a description of your system's linker (not GNU ld)
56323da084b3Smrg    case $host_os in
56333da084b3Smrg    aix3*)
56343da084b3Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
56353da084b3Smrg      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
56363da084b3Smrg      _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'
56373da084b3Smrg      # Note: this linker hardcodes the directories in LIBPATH if there
56383da084b3Smrg      # are no directories specified by -L.
56393da084b3Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
56403da084b3Smrg      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
56413da084b3Smrg	# Neither direct hardcoding nor static linking is supported with a
56423da084b3Smrg	# broken collect2.
56433da084b3Smrg	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
56443da084b3Smrg      fi
56453da084b3Smrg      ;;
56463da084b3Smrg
56473da084b3Smrg    aix4* | aix5*)
56483da084b3Smrg      if test "$host_cpu" = ia64; then
56493da084b3Smrg	# On IA64, the linker does run time linking by default, so we don't
56503da084b3Smrg	# have to do anything special.
56513da084b3Smrg	aix_use_runtimelinking=no
56523da084b3Smrg	exp_sym_flag='-Bexport'
56533da084b3Smrg	no_entry_flag=""
56543da084b3Smrg      else
56553da084b3Smrg	# If we're using GNU nm, then we don't want the "-C" option.
56563da084b3Smrg	# -C means demangle to AIX nm, but means don't demangle with GNU nm
56573da084b3Smrg	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
56583da084b3Smrg	  _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'
56593da084b3Smrg	else
56603da084b3Smrg	  _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'
56613da084b3Smrg	fi
56623da084b3Smrg	aix_use_runtimelinking=no
56633da084b3Smrg
56643da084b3Smrg	# Test if we are trying to use run time linking or normal
56653da084b3Smrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
56663da084b3Smrg	# need to do runtime linking.
56673da084b3Smrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
56683da084b3Smrg	  for ld_flag in $LDFLAGS; do
56693da084b3Smrg  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
56703da084b3Smrg  	    aix_use_runtimelinking=yes
56713da084b3Smrg  	    break
56723da084b3Smrg  	  fi
56733da084b3Smrg	  done
56743da084b3Smrg	  ;;
56753da084b3Smrg	esac
56763da084b3Smrg
56773da084b3Smrg	exp_sym_flag='-bexport'
56783da084b3Smrg	no_entry_flag='-bnoentry'
56793da084b3Smrg      fi
56803da084b3Smrg
56813da084b3Smrg      # When large executables or shared objects are built, AIX ld can
56823da084b3Smrg      # have problems creating the table of contents.  If linking a library
56833da084b3Smrg      # or program results in "error TOC overflow" add -mminimal-toc to
56843da084b3Smrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
56853da084b3Smrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
56863da084b3Smrg
56873da084b3Smrg      _LT_AC_TAGVAR(archive_cmds, $1)=''
56883da084b3Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
56893da084b3Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
56903da084b3Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
56913da084b3Smrg
56923da084b3Smrg      if test "$GCC" = yes; then
56933da084b3Smrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
56943da084b3Smrg	# We only want to do this on AIX 4.2 and lower, the check
56953da084b3Smrg	# below for broken collect2 doesn't work under 4.3+
56963da084b3Smrg	  collect2name=`${CC} -print-prog-name=collect2`
56973da084b3Smrg	  if test -f "$collect2name" && \
56983da084b3Smrg  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
56993da084b3Smrg	  then
57003da084b3Smrg  	  # We have reworked collect2
57013da084b3Smrg  	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
57023da084b3Smrg	  else
57033da084b3Smrg  	  # We have old collect2
57043da084b3Smrg  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
57053da084b3Smrg  	  # It fails to find uninstalled libraries when the uninstalled
57063da084b3Smrg  	  # path is not listed in the libpath.  Setting hardcode_minus_L
57073da084b3Smrg  	  # to unsupported forces relinking
57083da084b3Smrg  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
57093da084b3Smrg  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
57103da084b3Smrg  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
57113da084b3Smrg	  fi
57123da084b3Smrg	  ;;
57133da084b3Smrg	esac
57143da084b3Smrg	shared_flag='-shared'
57153da084b3Smrg	if test "$aix_use_runtimelinking" = yes; then
57163da084b3Smrg	  shared_flag="$shared_flag "'${wl}-G'
57173da084b3Smrg	fi
57183da084b3Smrg      else
57193da084b3Smrg	# not using gcc
57203da084b3Smrg	if test "$host_cpu" = ia64; then
57213da084b3Smrg  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
57223da084b3Smrg  	# chokes on -Wl,-G. The following line is correct:
57233da084b3Smrg	  shared_flag='-G'
57243da084b3Smrg	else
57253da084b3Smrg	  if test "$aix_use_runtimelinking" = yes; then
57263da084b3Smrg	    shared_flag='${wl}-G'
57273da084b3Smrg	  else
57283da084b3Smrg	    shared_flag='${wl}-bM:SRE'
57293da084b3Smrg	  fi
57303da084b3Smrg	fi
57313da084b3Smrg      fi
57323da084b3Smrg
57333da084b3Smrg      # It seems that -bexpall does not export symbols beginning with
57343da084b3Smrg      # underscore (_), so it is better to generate a list of symbols to export.
57353da084b3Smrg      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
57363da084b3Smrg      if test "$aix_use_runtimelinking" = yes; then
57373da084b3Smrg	# Warning - without using the other runtime loading flags (-brtl),
57383da084b3Smrg	# -berok will link without error, but may produce a broken library.
57393da084b3Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
57403da084b3Smrg       # Determine the default libpath from the value encoded in an empty executable.
57413da084b3Smrg       _LT_AC_SYS_LIBPATH_AIX
57423da084b3Smrg       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
57433da084b3Smrg	_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"
57443da084b3Smrg       else
57453da084b3Smrg	if test "$host_cpu" = ia64; then
57463da084b3Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
57473da084b3Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
57483da084b3Smrg	  _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"
57493da084b3Smrg	else
57503da084b3Smrg	 # Determine the default libpath from the value encoded in an empty executable.
57513da084b3Smrg	 _LT_AC_SYS_LIBPATH_AIX
57523da084b3Smrg	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
57533da084b3Smrg	  # Warning - without using the other run time loading flags,
57543da084b3Smrg	  # -berok will link without error, but may produce a broken library.
57553da084b3Smrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
57563da084b3Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
57573da084b3Smrg	  # Exported symbols can be pulled into shared objects from archives
57583da084b3Smrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
57593da084b3Smrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
57603da084b3Smrg	  # This is similar to how AIX traditionally builds its shared libraries.
57613da084b3Smrg	  _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'
57623da084b3Smrg	fi
57633da084b3Smrg      fi
57643da084b3Smrg      ;;
57653da084b3Smrg
57663da084b3Smrg    amigaos*)
57673da084b3Smrg      _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)'
57683da084b3Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
57693da084b3Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
57703da084b3Smrg      # see comment about different semantics on the GNU ld section
57713da084b3Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
57723da084b3Smrg      ;;
57733da084b3Smrg
57743da084b3Smrg    bsdi[[45]]*)
57753da084b3Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
57763da084b3Smrg      ;;
57773da084b3Smrg
57783da084b3Smrg    cygwin* | mingw* | pw32*)
57793da084b3Smrg      # When not using gcc, we currently assume that we are using
57803da084b3Smrg      # Microsoft Visual C++.
57813da084b3Smrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
57823da084b3Smrg      # no search path for DLLs.
57833da084b3Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
57843da084b3Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
57853da084b3Smrg      # Tell ltmain to make .lib files, not .a files.
57863da084b3Smrg      libext=lib
57873da084b3Smrg      # Tell ltmain to make .dll files, not .so files.
57883da084b3Smrg      shrext_cmds=".dll"
57893da084b3Smrg      # FIXME: Setting linknames here is a bad hack.
57903da084b3Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
57913da084b3Smrg      # The linker will automatically build a .lib file if we build a DLL.
57923da084b3Smrg      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
57933da084b3Smrg      # FIXME: Should let the user specify the lib program.
57943da084b3Smrg      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
57953da084b3Smrg      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
57963da084b3Smrg      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
57973da084b3Smrg      ;;
57983da084b3Smrg
57993da084b3Smrg    darwin* | rhapsody*)
58003da084b3Smrg      case $host_os in
58013da084b3Smrg        rhapsody* | darwin1.[[012]])
58023da084b3Smrg         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
58033da084b3Smrg         ;;
58043da084b3Smrg       *) # Darwin 1.3 on
58053da084b3Smrg         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
58063da084b3Smrg           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
58073da084b3Smrg         else
58083da084b3Smrg           case ${MACOSX_DEPLOYMENT_TARGET} in
58093da084b3Smrg             10.[[012]])
58103da084b3Smrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
58113da084b3Smrg               ;;
58123da084b3Smrg             10.*)
58133da084b3Smrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
58143da084b3Smrg               ;;
58153da084b3Smrg           esac
58163da084b3Smrg         fi
58173da084b3Smrg         ;;
58183da084b3Smrg      esac
58193da084b3Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
58203da084b3Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
58213da084b3Smrg      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
58223da084b3Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
58233da084b3Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
58243da084b3Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
58253da084b3Smrg    if test "$GCC" = yes ; then
58263da084b3Smrg    	output_verbose_link_cmd='echo'
58273da084b3Smrg        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
58283da084b3Smrg      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
58293da084b3Smrg      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
58303da084b3Smrg      _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}'
58313da084b3Smrg      _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}'
58323da084b3Smrg    else
58333da084b3Smrg      case $cc_basename in
58343da084b3Smrg        xlc*)
58353da084b3Smrg         output_verbose_link_cmd='echo'
58363da084b3Smrg         _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'
58373da084b3Smrg         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
58383da084b3Smrg          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
58393da084b3Smrg         _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}'
58403da084b3Smrg          _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}'
58413da084b3Smrg          ;;
58423da084b3Smrg       *)
58433da084b3Smrg         _LT_AC_TAGVAR(ld_shlibs, $1)=no
58443da084b3Smrg          ;;
58453da084b3Smrg      esac
58463da084b3Smrg    fi
58473da084b3Smrg      ;;
58483da084b3Smrg
58493da084b3Smrg    dgux*)
58503da084b3Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
58513da084b3Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
58523da084b3Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
58533da084b3Smrg      ;;
58543da084b3Smrg
58553da084b3Smrg    freebsd1*)
58563da084b3Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
58573da084b3Smrg      ;;
58583da084b3Smrg
58593da084b3Smrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
58603da084b3Smrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
58613da084b3Smrg    # does not break anything, and helps significantly (at the cost of a little
58623da084b3Smrg    # extra space).
58633da084b3Smrg    freebsd2.2*)
58643da084b3Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
58653da084b3Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
58663da084b3Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
58673da084b3Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
58683da084b3Smrg      ;;
58693da084b3Smrg
58703da084b3Smrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
58713da084b3Smrg    freebsd2*)
58723da084b3Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
58733da084b3Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
58743da084b3Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
58753da084b3Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
58763da084b3Smrg      ;;
58773da084b3Smrg
58783da084b3Smrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
58793da084b3Smrg    freebsd* | dragonfly*)
58803da084b3Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
58813da084b3Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
58823da084b3Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
58833da084b3Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
58843da084b3Smrg      ;;
58853da084b3Smrg
58863da084b3Smrg    hpux9*)
58873da084b3Smrg      if test "$GCC" = yes; then
58883da084b3Smrg	_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'
58893da084b3Smrg      else
58903da084b3Smrg	_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'
58913da084b3Smrg      fi
58923da084b3Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
58933da084b3Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
58943da084b3Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
58953da084b3Smrg
58963da084b3Smrg      # hardcode_minus_L: Not really in the search PATH,
58973da084b3Smrg      # but as the default location of the library.
58983da084b3Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
58993da084b3Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
59003da084b3Smrg      ;;
59013da084b3Smrg
59023da084b3Smrg    hpux10*)
59033da084b3Smrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
59043da084b3Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
59053da084b3Smrg      else
59063da084b3Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
59073da084b3Smrg      fi
59083da084b3Smrg      if test "$with_gnu_ld" = no; then
59093da084b3Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
59103da084b3Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
59113da084b3Smrg
59123da084b3Smrg	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
59133da084b3Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
59143da084b3Smrg
59153da084b3Smrg	# hardcode_minus_L: Not really in the search PATH,
59163da084b3Smrg	# but as the default location of the library.
59173da084b3Smrg	_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
59183da084b3Smrg      fi
59193da084b3Smrg      ;;
59203da084b3Smrg
59213da084b3Smrg    hpux11*)
59223da084b3Smrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
59233da084b3Smrg	case $host_cpu in
59243da084b3Smrg	hppa*64*)
59253da084b3Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
59263da084b3Smrg	  ;;
59273da084b3Smrg	ia64*)
59283da084b3Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
59293da084b3Smrg	  ;;
59303da084b3Smrg	*)
59313da084b3Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
59323da084b3Smrg	  ;;
59333da084b3Smrg	esac
59343da084b3Smrg      else
59353da084b3Smrg	case $host_cpu in
59363da084b3Smrg	hppa*64*)
59373da084b3Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
59383da084b3Smrg	  ;;
59393da084b3Smrg	ia64*)
59403da084b3Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
59413da084b3Smrg	  ;;
59423da084b3Smrg	*)
59433da084b3Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
59443da084b3Smrg	  ;;
59453da084b3Smrg	esac
59463da084b3Smrg      fi
59473da084b3Smrg      if test "$with_gnu_ld" = no; then
59483da084b3Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
59493da084b3Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
59503da084b3Smrg
59513da084b3Smrg	case $host_cpu in
59523da084b3Smrg	hppa*64*|ia64*)
59533da084b3Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
59543da084b3Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
59553da084b3Smrg	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
59563da084b3Smrg	  ;;
59573da084b3Smrg	*)
59583da084b3Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
59593da084b3Smrg	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
59603da084b3Smrg
59613da084b3Smrg	  # hardcode_minus_L: Not really in the search PATH,
59623da084b3Smrg	  # but as the default location of the library.
59633da084b3Smrg	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
59643da084b3Smrg	  ;;
59653da084b3Smrg	esac
59663da084b3Smrg      fi
59673da084b3Smrg      ;;
59683da084b3Smrg
59693da084b3Smrg    irix5* | irix6* | nonstopux*)
59703da084b3Smrg      if test "$GCC" = yes; then
59713da084b3Smrg	_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'
59723da084b3Smrg      else
59733da084b3Smrg	_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'
59743da084b3Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
59753da084b3Smrg      fi
59763da084b3Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
59773da084b3Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
59783da084b3Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
59793da084b3Smrg      ;;
59803da084b3Smrg
59813da084b3Smrg    netbsd* | netbsdelf*-gnu)
59823da084b3Smrg      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
59833da084b3Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
59843da084b3Smrg      else
59853da084b3Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
59863da084b3Smrg      fi
59873da084b3Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
59883da084b3Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
59893da084b3Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
59903da084b3Smrg      ;;
59913da084b3Smrg
59923da084b3Smrg    newsos6)
59933da084b3Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
59943da084b3Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
59953da084b3Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
59963da084b3Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
59973da084b3Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
59983da084b3Smrg      ;;
59993da084b3Smrg
60003da084b3Smrg    openbsd*)
60013da084b3Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
60023da084b3Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
60033da084b3Smrg      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
60043da084b3Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
60053da084b3Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
60063da084b3Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
60073da084b3Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
60083da084b3Smrg      else
60093da084b3Smrg       case $host_os in
60103da084b3Smrg	 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
60113da084b3Smrg	   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
60123da084b3Smrg	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
60133da084b3Smrg	   ;;
60143da084b3Smrg	 *)
60153da084b3Smrg	   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
60163da084b3Smrg	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
60173da084b3Smrg	   ;;
60183da084b3Smrg       esac
60193da084b3Smrg      fi
60203da084b3Smrg      ;;
60213da084b3Smrg
60223da084b3Smrg    os2*)
60233da084b3Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
60243da084b3Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
60253da084b3Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
60263da084b3Smrg      _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'
60273da084b3Smrg      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
60283da084b3Smrg      ;;
60293da084b3Smrg
60303da084b3Smrg    osf3*)
60313da084b3Smrg      if test "$GCC" = yes; then
60323da084b3Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
60333da084b3Smrg	_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'
60343da084b3Smrg      else
60353da084b3Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
60363da084b3Smrg	_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'
60373da084b3Smrg      fi
60383da084b3Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
60393da084b3Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
60403da084b3Smrg      ;;
60413da084b3Smrg
60423da084b3Smrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
60433da084b3Smrg      if test "$GCC" = yes; then
60443da084b3Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
60453da084b3Smrg	_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'
60463da084b3Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
60473da084b3Smrg      else
60483da084b3Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
60493da084b3Smrg	_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'
60503da084b3Smrg	_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~
60513da084b3Smrg	$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'
60523da084b3Smrg
60533da084b3Smrg	# Both c and cxx compiler support -rpath directly
60543da084b3Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
60553da084b3Smrg      fi
60563da084b3Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
60573da084b3Smrg      ;;
60583da084b3Smrg
60593da084b3Smrg    solaris*)
60603da084b3Smrg      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
60613da084b3Smrg      if test "$GCC" = yes; then
60623da084b3Smrg	wlarc='${wl}'
60633da084b3Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
60643da084b3Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
60653da084b3Smrg	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
60663da084b3Smrg      else
60673da084b3Smrg	wlarc=''
60683da084b3Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
60693da084b3Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
60703da084b3Smrg  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
60713da084b3Smrg      fi
60723da084b3Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
60733da084b3Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
60743da084b3Smrg      case $host_os in
60753da084b3Smrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
60763da084b3Smrg      *)
60773da084b3Smrg 	# The compiler driver will combine linker options so we
60783da084b3Smrg 	# cannot just pass the convience library names through
60793da084b3Smrg 	# without $wl, iff we do not link with $LD.
60803da084b3Smrg 	# Luckily, gcc supports the same syntax we need for Sun Studio.
60813da084b3Smrg 	# Supported since Solaris 2.6 (maybe 2.5.1?)
60823da084b3Smrg 	case $wlarc in
60833da084b3Smrg 	'')
60843da084b3Smrg 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
60853da084b3Smrg 	*)
60863da084b3Smrg 	  _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' ;;
60873da084b3Smrg 	esac ;;
60883da084b3Smrg      esac
60893da084b3Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
60903da084b3Smrg      ;;
60913da084b3Smrg
60923da084b3Smrg    sunos4*)
60933da084b3Smrg      if test "x$host_vendor" = xsequent; then
60943da084b3Smrg	# Use $CC to link under sequent, because it throws in some extra .o
60953da084b3Smrg	# files that make .init and .fini sections work.
60963da084b3Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
60973da084b3Smrg      else
60983da084b3Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
60993da084b3Smrg      fi
61003da084b3Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
61013da084b3Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
61023da084b3Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
61033da084b3Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
61043da084b3Smrg      ;;
61053da084b3Smrg
61063da084b3Smrg    sysv4)
61073da084b3Smrg      case $host_vendor in
61083da084b3Smrg	sni)
61093da084b3Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
61103da084b3Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
61113da084b3Smrg	;;
61123da084b3Smrg	siemens)
61133da084b3Smrg	  ## LD is ld it makes a PLAMLIB
61143da084b3Smrg	  ## CC just makes a GrossModule.
61153da084b3Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
61163da084b3Smrg	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
61173da084b3Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
61183da084b3Smrg        ;;
61193da084b3Smrg	motorola)
61203da084b3Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
61213da084b3Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
61223da084b3Smrg	;;
61233da084b3Smrg      esac
61243da084b3Smrg      runpath_var='LD_RUN_PATH'
61253da084b3Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
61263da084b3Smrg      ;;
61273da084b3Smrg
61283da084b3Smrg    sysv4.3*)
61293da084b3Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
61303da084b3Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
61313da084b3Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
61323da084b3Smrg      ;;
61333da084b3Smrg
61343da084b3Smrg    sysv4*MP*)
61353da084b3Smrg      if test -d /usr/nec; then
61363da084b3Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
61373da084b3Smrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
61383da084b3Smrg	runpath_var=LD_RUN_PATH
61393da084b3Smrg	hardcode_runpath_var=yes
61403da084b3Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
61413da084b3Smrg      fi
61423da084b3Smrg      ;;
61433da084b3Smrg
61443da084b3Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
61453da084b3Smrg      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
61463da084b3Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
61473da084b3Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
61483da084b3Smrg      runpath_var='LD_RUN_PATH'
61493da084b3Smrg
61503da084b3Smrg      if test "$GCC" = yes; then
61513da084b3Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
61523da084b3Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
61533da084b3Smrg      else
61543da084b3Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
61553da084b3Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
61563da084b3Smrg      fi
61573da084b3Smrg      ;;
61583da084b3Smrg
61593da084b3Smrg    sysv5* | sco3.2v5* | sco5v6*)
61603da084b3Smrg      # Note: We can NOT use -z defs as we might desire, because we do not
61613da084b3Smrg      # link with -lc, and that would cause any symbols used from libc to
61623da084b3Smrg      # always be unresolved, which means just about no library would
61633da084b3Smrg      # ever link correctly.  If we're not using GNU ld we use -z text
61643da084b3Smrg      # though, which does catch some bad symbols but isn't as heavy-handed
61653da084b3Smrg      # as -z defs.
61663da084b3Smrg      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
61673da084b3Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
61683da084b3Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
61693da084b3Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
61703da084b3Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
61713da084b3Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
61723da084b3Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
61733da084b3Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
61743da084b3Smrg      runpath_var='LD_RUN_PATH'
61753da084b3Smrg
61763da084b3Smrg      if test "$GCC" = yes; then
61773da084b3Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
61783da084b3Smrg	_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'
61793da084b3Smrg      else
61803da084b3Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
61813da084b3Smrg	_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'
61823da084b3Smrg      fi
61833da084b3Smrg      ;;
61843da084b3Smrg
61853da084b3Smrg    uts4*)
61863da084b3Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
61873da084b3Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
61883da084b3Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
61893da084b3Smrg      ;;
61903da084b3Smrg
61913da084b3Smrg    *)
61923da084b3Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
61933da084b3Smrg      ;;
61943da084b3Smrg    esac
61953da084b3Smrg  fi
61963da084b3Smrg])
61973da084b3SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
61983da084b3Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
61993da084b3Smrg
62003da084b3Smrg#
62013da084b3Smrg# Do we need to explicitly link libc?
62023da084b3Smrg#
62033da084b3Smrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
62043da084b3Smrgx|xyes)
62053da084b3Smrg  # Assume -lc should be added
62063da084b3Smrg  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
62073da084b3Smrg
62083da084b3Smrg  if test "$enable_shared" = yes && test "$GCC" = yes; then
62093da084b3Smrg    case $_LT_AC_TAGVAR(archive_cmds, $1) in
62103da084b3Smrg    *'~'*)
62113da084b3Smrg      # FIXME: we may have to deal with multi-command sequences.
62123da084b3Smrg      ;;
62133da084b3Smrg    '$CC '*)
62143da084b3Smrg      # Test whether the compiler implicitly links with -lc since on some
62153da084b3Smrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
62163da084b3Smrg      # to ld, don't add -lc before -lgcc.
62173da084b3Smrg      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
62183da084b3Smrg      $rm conftest*
62193da084b3Smrg      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
62203da084b3Smrg
62213da084b3Smrg      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
62223da084b3Smrg        soname=conftest
62233da084b3Smrg        lib=conftest
62243da084b3Smrg        libobjs=conftest.$ac_objext
62253da084b3Smrg        deplibs=
62263da084b3Smrg        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
62273da084b3Smrg	pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
62283da084b3Smrg        compiler_flags=-v
62293da084b3Smrg        linker_flags=-v
62303da084b3Smrg        verstring=
62313da084b3Smrg        output_objdir=.
62323da084b3Smrg        libname=conftest
62333da084b3Smrg        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
62343da084b3Smrg        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
62353da084b3Smrg        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
62363da084b3Smrg        then
62373da084b3Smrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
62383da084b3Smrg        else
62393da084b3Smrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
62403da084b3Smrg        fi
62413da084b3Smrg        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
62423da084b3Smrg      else
62433da084b3Smrg        cat conftest.err 1>&5
62443da084b3Smrg      fi
62453da084b3Smrg      $rm conftest*
62463da084b3Smrg      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
62473da084b3Smrg      ;;
62483da084b3Smrg    esac
62493da084b3Smrg  fi
62503da084b3Smrg  ;;
62513da084b3Smrgesac
62523da084b3Smrg])# AC_LIBTOOL_PROG_LD_SHLIBS
62533da084b3Smrg
62543da084b3Smrg
62553da084b3Smrg# _LT_AC_FILE_LTDLL_C
62563da084b3Smrg# -------------------
62573da084b3Smrg# Be careful that the start marker always follows a newline.
62583da084b3SmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [
62593da084b3Smrg# /* ltdll.c starts here */
62603da084b3Smrg# #define WIN32_LEAN_AND_MEAN
62613da084b3Smrg# #include <windows.h>
62623da084b3Smrg# #undef WIN32_LEAN_AND_MEAN
62633da084b3Smrg# #include <stdio.h>
62643da084b3Smrg#
62653da084b3Smrg# #ifndef __CYGWIN__
62663da084b3Smrg# #  ifdef __CYGWIN32__
62673da084b3Smrg# #    define __CYGWIN__ __CYGWIN32__
62683da084b3Smrg# #  endif
62693da084b3Smrg# #endif
62703da084b3Smrg#
62713da084b3Smrg# #ifdef __cplusplus
62723da084b3Smrg# extern "C" {
62733da084b3Smrg# #endif
62743da084b3Smrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
62753da084b3Smrg# #ifdef __cplusplus
62763da084b3Smrg# }
62773da084b3Smrg# #endif
62783da084b3Smrg#
62793da084b3Smrg# #ifdef __CYGWIN__
62803da084b3Smrg# #include <cygwin/cygwin_dll.h>
62813da084b3Smrg# DECLARE_CYGWIN_DLL( DllMain );
62823da084b3Smrg# #endif
62833da084b3Smrg# HINSTANCE __hDllInstance_base;
62843da084b3Smrg#
62853da084b3Smrg# BOOL APIENTRY
62863da084b3Smrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
62873da084b3Smrg# {
62883da084b3Smrg#   __hDllInstance_base = hInst;
62893da084b3Smrg#   return TRUE;
62903da084b3Smrg# }
62913da084b3Smrg# /* ltdll.c ends here */
62923da084b3Smrg])# _LT_AC_FILE_LTDLL_C
62933da084b3Smrg
62943da084b3Smrg
62953da084b3Smrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
62963da084b3Smrg# ---------------------------------
62973da084b3SmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
62983da084b3Smrg
62993da084b3Smrg
63003da084b3Smrg# old names
63013da084b3SmrgAC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
63023da084b3SmrgAC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
63033da084b3SmrgAC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
63043da084b3SmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
63053da084b3SmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
63063da084b3SmrgAC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
63073da084b3SmrgAC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
63083da084b3Smrg
63093da084b3Smrg# This is just to silence aclocal about the macro not being used
63103da084b3Smrgifelse([AC_DISABLE_FAST_INSTALL])
63113da084b3Smrg
63123da084b3SmrgAC_DEFUN([LT_AC_PROG_GCJ],
63133da084b3Smrg[AC_CHECK_TOOL(GCJ, gcj, no)
63143da084b3Smrg  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
63153da084b3Smrg  AC_SUBST(GCJFLAGS)
63163da084b3Smrg])
63173da084b3Smrg
63183da084b3SmrgAC_DEFUN([LT_AC_PROG_RC],
63193da084b3Smrg[AC_CHECK_TOOL(RC, windres, no)
63203da084b3Smrg])
63213da084b3Smrg
63223da084b3Smrg# NOTE: This macro has been submitted for inclusion into   #
63233da084b3Smrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
63243da084b3Smrg#  a released version of Autoconf we should remove this    #
63253da084b3Smrg#  macro and use it instead.                               #
63263da084b3Smrg# LT_AC_PROG_SED
63273da084b3Smrg# --------------
63283da084b3Smrg# Check for a fully-functional sed program, that truncates
63293da084b3Smrg# as few characters as possible.  Prefer GNU sed if found.
63303da084b3SmrgAC_DEFUN([LT_AC_PROG_SED],
63313da084b3Smrg[AC_MSG_CHECKING([for a sed that does not truncate output])
63323da084b3SmrgAC_CACHE_VAL(lt_cv_path_SED,
63333da084b3Smrg[# Loop through the user's path and test for sed and gsed.
63343da084b3Smrg# Then use that list of sed's as ones to test for truncation.
63353da084b3Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63363da084b3Smrgfor as_dir in $PATH
63373da084b3Smrgdo
63383da084b3Smrg  IFS=$as_save_IFS
63393da084b3Smrg  test -z "$as_dir" && as_dir=.
63403da084b3Smrg  for lt_ac_prog in sed gsed; do
63413da084b3Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
63423da084b3Smrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
63433da084b3Smrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
63443da084b3Smrg      fi
63453da084b3Smrg    done
63463da084b3Smrg  done
63473da084b3Smrgdone
63483da084b3Smrglt_ac_max=0
63493da084b3Smrglt_ac_count=0
63503da084b3Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
63513da084b3Smrg# along with /bin/sed that truncates output.
63523da084b3Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
63533da084b3Smrg  test ! -f $lt_ac_sed && continue
63543da084b3Smrg  cat /dev/null > conftest.in
63553da084b3Smrg  lt_ac_count=0
63563da084b3Smrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
63573da084b3Smrg  # Check for GNU sed and select it if it is found.
63583da084b3Smrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
63593da084b3Smrg    lt_cv_path_SED=$lt_ac_sed
63603da084b3Smrg    break
63613da084b3Smrg  fi
63623da084b3Smrg  while true; do
63633da084b3Smrg    cat conftest.in conftest.in >conftest.tmp
63643da084b3Smrg    mv conftest.tmp conftest.in
63653da084b3Smrg    cp conftest.in conftest.nl
63663da084b3Smrg    echo >>conftest.nl
63673da084b3Smrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
63683da084b3Smrg    cmp -s conftest.out conftest.nl || break
63693da084b3Smrg    # 10000 chars as input seems more than enough
63703da084b3Smrg    test $lt_ac_count -gt 10 && break
63713da084b3Smrg    lt_ac_count=`expr $lt_ac_count + 1`
63723da084b3Smrg    if test $lt_ac_count -gt $lt_ac_max; then
63733da084b3Smrg      lt_ac_max=$lt_ac_count
63743da084b3Smrg      lt_cv_path_SED=$lt_ac_sed
63753da084b3Smrg    fi
63763da084b3Smrg  done
63773da084b3Smrgdone
63783da084b3Smrg])
63793da084b3SmrgSED=$lt_cv_path_SED
63803da084b3SmrgAC_MSG_RESULT([$SED])
63813da084b3Smrg])
63823da084b3Smrg
63833da084b3Smrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
63843da084b3Smrg# 
63853da084b3Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
63863da084b3Smrg#
63873da084b3Smrg# This program is free software; you can redistribute it and/or modify
63883da084b3Smrg# it under the terms of the GNU General Public License as published by
63893da084b3Smrg# the Free Software Foundation; either version 2 of the License, or
63903da084b3Smrg# (at your option) any later version.
63913da084b3Smrg#
63923da084b3Smrg# This program is distributed in the hope that it will be useful, but
63933da084b3Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
63943da084b3Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
63953da084b3Smrg# General Public License for more details.
63963da084b3Smrg#
63973da084b3Smrg# You should have received a copy of the GNU General Public License
63983da084b3Smrg# along with this program; if not, write to the Free Software
63993da084b3Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
64003da084b3Smrg#
64013da084b3Smrg# As a special exception to the GNU General Public License, if you
64023da084b3Smrg# distribute this file as part of a program that contains a
64033da084b3Smrg# configuration script generated by Autoconf, you may include it under
64043da084b3Smrg# the same distribution terms that you use for the rest of that program.
64053da084b3Smrg
64063da084b3Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
64073da084b3Smrg# ----------------------------------
64083da084b3SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
64093da084b3Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
64103da084b3Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
64113da084b3SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
64123da084b3Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
64133da084b3Smrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
64143da084b3Smrgfi
64153da084b3Smrgif test -n "$PKG_CONFIG"; then
64163da084b3Smrg	_pkg_min_version=m4_default([$1], [0.9.0])
64173da084b3Smrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
64183da084b3Smrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
64193da084b3Smrg		AC_MSG_RESULT([yes])
64203da084b3Smrg	else
64213da084b3Smrg		AC_MSG_RESULT([no])
64223da084b3Smrg		PKG_CONFIG=""
64233da084b3Smrg	fi
64243da084b3Smrg		
64253da084b3Smrgfi[]dnl
64263da084b3Smrg])# PKG_PROG_PKG_CONFIG
64273da084b3Smrg
64283da084b3Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
64293da084b3Smrg#
64303da084b3Smrg# Check to see whether a particular set of modules exists.  Similar
64313da084b3Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
64323da084b3Smrg#
64333da084b3Smrg#
64343da084b3Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
64353da084b3Smrg# this or PKG_CHECK_MODULES is called, or make sure to call
64363da084b3Smrg# PKG_CHECK_EXISTS manually
64373da084b3Smrg# --------------------------------------------------------------
64383da084b3SmrgAC_DEFUN([PKG_CHECK_EXISTS],
64393da084b3Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
64403da084b3Smrgif test -n "$PKG_CONFIG" && \
64413da084b3Smrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
64423da084b3Smrg  m4_ifval([$2], [$2], [:])
64433da084b3Smrgm4_ifvaln([$3], [else
64443da084b3Smrg  $3])dnl
64453da084b3Smrgfi])
64463da084b3Smrg
64473da084b3Smrg
64483da084b3Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
64493da084b3Smrg# ---------------------------------------------
64503da084b3Smrgm4_define([_PKG_CONFIG],
64513da084b3Smrg[if test -n "$PKG_CONFIG"; then
64523da084b3Smrg    if test -n "$$1"; then
64533da084b3Smrg        pkg_cv_[]$1="$$1"
64543da084b3Smrg    else
64553da084b3Smrg        PKG_CHECK_EXISTS([$3],
64563da084b3Smrg                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
64573da084b3Smrg			 [pkg_failed=yes])
64583da084b3Smrg    fi
64593da084b3Smrgelse
64603da084b3Smrg	pkg_failed=untried
64613da084b3Smrgfi[]dnl
64623da084b3Smrg])# _PKG_CONFIG
64633da084b3Smrg
64643da084b3Smrg# _PKG_SHORT_ERRORS_SUPPORTED
64653da084b3Smrg# -----------------------------
64663da084b3SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
64673da084b3Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
64683da084b3Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64693da084b3Smrg        _pkg_short_errors_supported=yes
64703da084b3Smrgelse
64713da084b3Smrg        _pkg_short_errors_supported=no
64723da084b3Smrgfi[]dnl
64733da084b3Smrg])# _PKG_SHORT_ERRORS_SUPPORTED
64743da084b3Smrg
64753da084b3Smrg
64763da084b3Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
64773da084b3Smrg# [ACTION-IF-NOT-FOUND])
64783da084b3Smrg#
64793da084b3Smrg#
64803da084b3Smrg# Note that if there is a possibility the first call to
64813da084b3Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
64823da084b3Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
64833da084b3Smrg#
64843da084b3Smrg#
64853da084b3Smrg# --------------------------------------------------------------
64863da084b3SmrgAC_DEFUN([PKG_CHECK_MODULES],
64873da084b3Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
64883da084b3SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
64893da084b3SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
64903da084b3Smrg
64913da084b3Smrgpkg_failed=no
64923da084b3SmrgAC_MSG_CHECKING([for $1])
64933da084b3Smrg
64943da084b3Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
64953da084b3Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
64963da084b3Smrg
64973da084b3Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
64983da084b3Smrgand $1[]_LIBS to avoid the need to call pkg-config.
64993da084b3SmrgSee the pkg-config man page for more details.])
65003da084b3Smrg
65013da084b3Smrgif test $pkg_failed = yes; then
65023da084b3Smrg        _PKG_SHORT_ERRORS_SUPPORTED
65033da084b3Smrg        if test $_pkg_short_errors_supported = yes; then
65043da084b3Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
65053da084b3Smrg        else 
65063da084b3Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
65073da084b3Smrg        fi
65083da084b3Smrg	# Put the nasty error message in config.log where it belongs
65093da084b3Smrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
65103da084b3Smrg
65113da084b3Smrg	ifelse([$4], , [AC_MSG_ERROR(dnl
65123da084b3Smrg[Package requirements ($2) were not met:
65133da084b3Smrg
65143da084b3Smrg$$1_PKG_ERRORS
65153da084b3Smrg
65163da084b3SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
65173da084b3Smrginstalled software in a non-standard prefix.
65183da084b3Smrg
65193da084b3Smrg_PKG_TEXT
65203da084b3Smrg])],
65213da084b3Smrg		[$4])
65223da084b3Smrgelif test $pkg_failed = untried; then
65233da084b3Smrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
65243da084b3Smrg[The pkg-config script could not be found or is too old.  Make sure it
65253da084b3Smrgis in your PATH or set the PKG_CONFIG environment variable to the full
65263da084b3Smrgpath to pkg-config.
65273da084b3Smrg
65283da084b3Smrg_PKG_TEXT
65293da084b3Smrg
65303da084b3SmrgTo get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
65313da084b3Smrg		[$4])
65323da084b3Smrgelse
65333da084b3Smrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
65343da084b3Smrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
65353da084b3Smrg        AC_MSG_RESULT([yes])
65363da084b3Smrg	ifelse([$3], , :, [$3])
65373da084b3Smrgfi[]dnl
65383da084b3Smrg])# PKG_CHECK_MODULES
65393da084b3Smrg
65403da084b3Smrgdnl
65413da084b3Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
65423da084b3Smrgdnl 
65433da084b3Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a
65443da084b3Smrgdnl copy of this software and associated documentation files (the
65453da084b3Smrgdnl "Software"), to deal in the Software without restriction, including
65463da084b3Smrgdnl without limitation the rights to use, copy, modify, merge, publish,
65473da084b3Smrgdnl distribute, and/or sell copies of the Software, and to permit persons
65483da084b3Smrgdnl to whom the Software is furnished to do so, provided that the above
65493da084b3Smrgdnl copyright notice(s) and this permission notice appear in all copies of
65503da084b3Smrgdnl the Software and that both the above copyright notice(s) and this
65513da084b3Smrgdnl permission notice appear in supporting documentation.
65523da084b3Smrgdnl
65533da084b3Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
65543da084b3Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
65553da084b3Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
65563da084b3Smrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
65573da084b3Smrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
65583da084b3Smrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
65593da084b3Smrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
65603da084b3Smrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
65613da084b3Smrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
65623da084b3Smrgdnl
65633da084b3Smrgdnl Except as contained in this notice, the name of a copyright holder
65643da084b3Smrgdnl shall not be used in advertising or otherwise to promote the sale, use
65653da084b3Smrgdnl or other dealings in this Software without prior written authorization
65663da084b3Smrgdnl of the copyright holder.
65673da084b3Smrg
65683da084b3Smrg# XORG_MACROS_VERSION(required-version)
65693da084b3Smrg# -------------------------------------
65703da084b3Smrg# Minimum version: 1.1.0
65713da084b3Smrg#
65723da084b3Smrg# If you're using a macro added in Version 1.1 or newer, include this in
65733da084b3Smrg# your configure.ac with the minimum required version, such as:
65743da084b3Smrg# XORG_MACROS_VERSION(1.1)
65753da084b3Smrg#
65763da084b3Smrg# To force at least a version with this macro defined, also add:
65773da084b3Smrg# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])])
65783da084b3Smrg#
65793da084b3Smrg#
65803da084b3Smrg# See the "minimum version" comment for each macro you use to see what 
65813da084b3Smrg# version you require.
65823da084b3SmrgAC_DEFUN([XORG_MACROS_VERSION],[
65833da084b3Smrg	[XORG_MACROS_needed_version=$1
65843da084b3Smrg	XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'`
65853da084b3Smrg	XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
65863da084b3Smrg	AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}])
65873da084b3Smrg	[XORG_MACROS_version=1.1.3
65883da084b3Smrg	XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
65893da084b3Smrg	XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
65903da084b3Smrg	if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
65913da084b3Smrg		AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x])
65923da084b3Smrg	fi
65933da084b3Smrg	if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then
65943da084b3Smrg		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])
65953da084b3Smrg	fi
65963da084b3Smrg	AC_MSG_RESULT([yes, $XORG_MACROS_version])
65973da084b3Smrg]) # XORG_MACROS_VERSION
65983da084b3Smrg
65993da084b3Smrg# XORG_PROG_RAWCPP()
66003da084b3Smrg# ------------------
66013da084b3Smrg# Minimum version: 1.0.0
66023da084b3Smrg#
66033da084b3Smrg# Find cpp program and necessary flags for use in pre-processing text files
66043da084b3Smrg# such as man pages and config files
66053da084b3SmrgAC_DEFUN([XORG_PROG_RAWCPP],[
66063da084b3SmrgAC_REQUIRE([AC_PROG_CPP])
66073da084b3SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
66083da084b3Smrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
66093da084b3Smrg
66103da084b3Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
66113da084b3Smrg# which is not the best choice for supporting other OS'es, but covers most
66123da084b3Smrg# of the ones we need for now.
66133da084b3SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
66143da084b3SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?])
66153da084b3Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
66163da084b3Smrg	AC_MSG_RESULT([no])
66173da084b3Smrgelse
66183da084b3Smrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
66193da084b3Smrg		RAWCPPFLAGS=-undef
66203da084b3Smrg		AC_MSG_RESULT([yes])
66213da084b3Smrg	else
66223da084b3Smrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
66233da084b3Smrg	fi
66243da084b3Smrgfi
66253da084b3Smrgrm -f conftest.$ac_ext
66263da084b3Smrg
66273da084b3SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
66283da084b3SmrgAC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
66293da084b3Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
66303da084b3Smrg	AC_MSG_RESULT([no])
66313da084b3Smrgelse
66323da084b3Smrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
66333da084b3Smrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
66343da084b3Smrg		AC_MSG_RESULT([yes])
66353da084b3Smrg	else
66363da084b3Smrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
66373da084b3Smrg	fi
66383da084b3Smrgfi
66393da084b3Smrgrm -f conftest.$ac_ext
66403da084b3SmrgAC_SUBST(RAWCPPFLAGS)
66413da084b3Smrg]) # XORG_PROG_RAWCPP
66423da084b3Smrg
66433da084b3Smrg# XORG_MANPAGE_SECTIONS()
66443da084b3Smrg# -----------------------
66453da084b3Smrg# Minimum version: 1.0.0
66463da084b3Smrg#
66473da084b3Smrg# Determine which sections man pages go in for the different man page types
66483da084b3Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
66493da084b3Smrg# Not sure if there's any better way than just hardcoding by OS name.
66503da084b3Smrg# Override default settings by setting environment variables
66513da084b3Smrg
66523da084b3SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
66533da084b3SmrgAC_REQUIRE([AC_CANONICAL_HOST])
66543da084b3Smrg
66553da084b3Smrgif test x$APP_MAN_SUFFIX = x    ; then
66563da084b3Smrg    APP_MAN_SUFFIX=1
66573da084b3Smrgfi
66583da084b3Smrgif test x$APP_MAN_DIR = x    ; then
66593da084b3Smrg    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
66603da084b3Smrgfi
66613da084b3Smrg
66623da084b3Smrgif test x$LIB_MAN_SUFFIX = x    ; then
66633da084b3Smrg    LIB_MAN_SUFFIX=3
66643da084b3Smrgfi
66653da084b3Smrgif test x$LIB_MAN_DIR = x    ; then
66663da084b3Smrg    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
66673da084b3Smrgfi
66683da084b3Smrg
66693da084b3Smrgif test x$FILE_MAN_SUFFIX = x    ; then
66703da084b3Smrg    case $host_os in
66713da084b3Smrg	solaris*)	FILE_MAN_SUFFIX=4  ;;
66723da084b3Smrg	*)		FILE_MAN_SUFFIX=5  ;;
66733da084b3Smrg    esac
66743da084b3Smrgfi
66753da084b3Smrgif test x$FILE_MAN_DIR = x    ; then
66763da084b3Smrg    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
66773da084b3Smrgfi
66783da084b3Smrg
66793da084b3Smrgif test x$MISC_MAN_SUFFIX = x    ; then
66803da084b3Smrg    case $host_os in
66813da084b3Smrg	solaris*)	MISC_MAN_SUFFIX=5  ;;
66823da084b3Smrg	*)		MISC_MAN_SUFFIX=7  ;;
66833da084b3Smrg    esac
66843da084b3Smrgfi
66853da084b3Smrgif test x$MISC_MAN_DIR = x    ; then
66863da084b3Smrg    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
66873da084b3Smrgfi
66883da084b3Smrg
66893da084b3Smrgif test x$DRIVER_MAN_SUFFIX = x    ; then
66903da084b3Smrg    case $host_os in
66913da084b3Smrg	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
66923da084b3Smrg	*)		DRIVER_MAN_SUFFIX=4  ;;
66933da084b3Smrg    esac
66943da084b3Smrgfi
66953da084b3Smrgif test x$DRIVER_MAN_DIR = x    ; then
66963da084b3Smrg    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
66973da084b3Smrgfi
66983da084b3Smrg
66993da084b3Smrgif test x$ADMIN_MAN_SUFFIX = x    ; then
67003da084b3Smrg    case $host_os in
67013da084b3Smrg	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
67023da084b3Smrg	*)		ADMIN_MAN_SUFFIX=8  ;;
67033da084b3Smrg    esac
67043da084b3Smrgfi
67053da084b3Smrgif test x$ADMIN_MAN_DIR = x    ; then
67063da084b3Smrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
67073da084b3Smrgfi
67083da084b3Smrg
67093da084b3Smrg
67103da084b3SmrgAC_SUBST([APP_MAN_SUFFIX])
67113da084b3SmrgAC_SUBST([LIB_MAN_SUFFIX])
67123da084b3SmrgAC_SUBST([FILE_MAN_SUFFIX])
67133da084b3SmrgAC_SUBST([MISC_MAN_SUFFIX])
67143da084b3SmrgAC_SUBST([DRIVER_MAN_SUFFIX])
67153da084b3SmrgAC_SUBST([ADMIN_MAN_SUFFIX])
67163da084b3SmrgAC_SUBST([APP_MAN_DIR])
67173da084b3SmrgAC_SUBST([LIB_MAN_DIR])
67183da084b3SmrgAC_SUBST([FILE_MAN_DIR])
67193da084b3SmrgAC_SUBST([MISC_MAN_DIR])
67203da084b3SmrgAC_SUBST([DRIVER_MAN_DIR])
67213da084b3SmrgAC_SUBST([ADMIN_MAN_DIR])
67223da084b3Smrg]) # XORG_MANPAGE_SECTIONS
67233da084b3Smrg
67243da084b3Smrg# XORG_CHECK_LINUXDOC
67253da084b3Smrg# -------------------
67263da084b3Smrg# Minimum version: 1.0.0
67273da084b3Smrg#
67283da084b3Smrg# Defines the variable MAKE_TEXT if the necessary tools and
67293da084b3Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
67303da084b3Smrg# Whether or not the necessary tools and files are found can be checked
67313da084b3Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
67323da084b3SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
67333da084b3SmrgXORG_SGML_PATH=$prefix/share/sgml
67343da084b3SmrgHAVE_DEFS_ENT=
67353da084b3Smrg
67363da084b3SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
67373da084b3Smrg
67383da084b3SmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
67393da084b3SmrgAC_PATH_PROG(PS2PDF, ps2pdf)
67403da084b3Smrg
67413da084b3SmrgAC_MSG_CHECKING([Whether to build documentation])
67423da084b3Smrg
67433da084b3Smrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
67443da084b3Smrg   BUILDDOC=yes
67453da084b3Smrgelse
67463da084b3Smrg   BUILDDOC=no
67473da084b3Smrgfi
67483da084b3Smrg
67493da084b3SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
67503da084b3Smrg
67513da084b3SmrgAC_MSG_RESULT([$BUILDDOC])
67523da084b3Smrg
67533da084b3SmrgAC_MSG_CHECKING([Whether to build pdf documentation])
67543da084b3Smrg
67553da084b3Smrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
67563da084b3Smrg   BUILDPDFDOC=yes
67573da084b3Smrgelse
67583da084b3Smrg   BUILDPDFDOC=no
67593da084b3Smrgfi
67603da084b3Smrg
67613da084b3SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
67623da084b3Smrg
67633da084b3SmrgAC_MSG_RESULT([$BUILDPDFDOC])
67643da084b3Smrg
67653da084b3SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
67663da084b3SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
67673da084b3SmrgMAKE_PDF="$PS2PDF"
67683da084b3SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
67693da084b3Smrg
67703da084b3SmrgAC_SUBST(MAKE_TEXT)
67713da084b3SmrgAC_SUBST(MAKE_PS)
67723da084b3SmrgAC_SUBST(MAKE_PDF)
67733da084b3SmrgAC_SUBST(MAKE_HTML)
67743da084b3Smrg]) # XORG_CHECK_LINUXDOC
67753da084b3Smrg
67763da084b3Smrg# XORG_CHECK_DOCBOOK
67773da084b3Smrg# -------------------
67783da084b3Smrg# Minimum version: 1.0.0
67793da084b3Smrg#
67803da084b3Smrg# Checks for the ability to build output formats from SGML DocBook source.
67813da084b3Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
67823da084b3Smrg# indicates whether the necessary tools and files are found and, if set,
67833da084b3Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx.
67843da084b3SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[
67853da084b3SmrgXORG_SGML_PATH=$prefix/share/sgml
67863da084b3SmrgHAVE_DEFS_ENT=
67873da084b3SmrgBUILDTXTDOC=no
67883da084b3SmrgBUILDPDFDOC=no
67893da084b3SmrgBUILDPSDOC=no
67903da084b3SmrgBUILDHTMLDOC=no
67913da084b3Smrg
67923da084b3SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
67933da084b3Smrg
67943da084b3SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps)
67953da084b3SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
67963da084b3SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html)
67973da084b3SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt)
67983da084b3Smrg
67993da084b3SmrgAC_MSG_CHECKING([Whether to build text documentation])
68003da084b3Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
68013da084b3Smrg   test x$BUILD_TXTDOC != xno; then
68023da084b3Smrg	BUILDTXTDOC=yes
68033da084b3Smrgfi
68043da084b3SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
68053da084b3SmrgAC_MSG_RESULT([$BUILDTXTDOC])
68063da084b3Smrg
68073da084b3SmrgAC_MSG_CHECKING([Whether to build PDF documentation])
68083da084b3Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
68093da084b3Smrg   test x$BUILD_PDFDOC != xno; then
68103da084b3Smrg	BUILDPDFDOC=yes
68113da084b3Smrgfi
68123da084b3SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
68133da084b3SmrgAC_MSG_RESULT([$BUILDPDFDOC])
68143da084b3Smrg
68153da084b3SmrgAC_MSG_CHECKING([Whether to build PostScript documentation])
68163da084b3Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
68173da084b3Smrg   test x$BUILD_PSDOC != xno; then
68183da084b3Smrg	BUILDPSDOC=yes
68193da084b3Smrgfi
68203da084b3SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
68213da084b3SmrgAC_MSG_RESULT([$BUILDPSDOC])
68223da084b3Smrg
68233da084b3SmrgAC_MSG_CHECKING([Whether to build HTML documentation])
68243da084b3Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
68253da084b3Smrg   test x$BUILD_HTMLDOC != xno; then
68263da084b3Smrg	BUILDHTMLDOC=yes
68273da084b3Smrgfi
68283da084b3SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
68293da084b3SmrgAC_MSG_RESULT([$BUILDHTMLDOC])
68303da084b3Smrg
68313da084b3SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
68323da084b3SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
68333da084b3SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
68343da084b3SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
68353da084b3Smrg
68363da084b3SmrgAC_SUBST(MAKE_TEXT)
68373da084b3SmrgAC_SUBST(MAKE_PS)
68383da084b3SmrgAC_SUBST(MAKE_PDF)
68393da084b3SmrgAC_SUBST(MAKE_HTML)
68403da084b3Smrg]) # XORG_CHECK_DOCBOOK
68413da084b3Smrg
68423da084b3Smrg# XORG_CHECK_MALLOC_ZERO
68433da084b3Smrg# ----------------------
68443da084b3Smrg# Minimum version: 1.0.0
68453da084b3Smrg#
68463da084b3Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
68473da084b3Smrg# malloc(0) returns NULL.  Packages should add one of these cflags to
68483da084b3Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
68493da084b3SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
68503da084b3SmrgAC_ARG_ENABLE(malloc0returnsnull,
68513da084b3Smrg	AC_HELP_STRING([--enable-malloc0returnsnull],
68523da084b3Smrg		       [malloc(0) returns NULL (default: auto)]),
68533da084b3Smrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
68543da084b3Smrg	[MALLOC_ZERO_RETURNS_NULL=auto])
68553da084b3Smrg
68563da084b3SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
68573da084b3Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
68583da084b3Smrg	AC_RUN_IFELSE([
68593da084b3Smrgchar *malloc();
68603da084b3Smrgchar *realloc();
68613da084b3Smrgchar *calloc();
68623da084b3Smrgmain() {
68633da084b3Smrg    char *m0, *r0, *c0, *p;
68643da084b3Smrg    m0 = malloc(0);
68653da084b3Smrg    p = malloc(10);
68663da084b3Smrg    r0 = realloc(p,0);
68673da084b3Smrg    c0 = calloc(0);
68683da084b3Smrg    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
68693da084b3Smrg}],
68703da084b3Smrg		[MALLOC_ZERO_RETURNS_NULL=yes],
68713da084b3Smrg		[MALLOC_ZERO_RETURNS_NULL=no])
68723da084b3Smrgfi
68733da084b3SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
68743da084b3Smrg
68753da084b3Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
68763da084b3Smrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
68773da084b3Smrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
68783da084b3Smrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
68793da084b3Smrgelse
68803da084b3Smrg	MALLOC_ZERO_CFLAGS=""
68813da084b3Smrg	XMALLOC_ZERO_CFLAGS=""
68823da084b3Smrg	XTMALLOC_ZERO_CFLAGS=""
68833da084b3Smrgfi
68843da084b3Smrg
68853da084b3SmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
68863da084b3SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
68873da084b3SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
68883da084b3Smrg]) # XORG_CHECK_MALLOC_ZERO
68893da084b3Smrg
68903da084b3Smrg# XORG_WITH_LINT()
68913da084b3Smrg# ----------------
68923da084b3Smrg# Minimum version: 1.1.0
68933da084b3Smrg#
68943da084b3Smrg# Sets up flags for source checkers such as lint and sparse if --with-lint
68953da084b3Smrg# is specified.   (Use --with-lint=sparse for sparse.)
68963da084b3Smrg# Sets $LINT to name of source checker passed with --with-lint (default: lint)
68973da084b3Smrg# Sets $LINT_FLAGS to flags to pass to source checker
68983da084b3Smrg# Sets LINT automake conditional if enabled (default: disabled)
68993da084b3Smrg#
69003da084b3SmrgAC_DEFUN([XORG_WITH_LINT],[
69013da084b3Smrg
69023da084b3Smrg# Allow checking code with lint, sparse, etc.
69033da084b3SmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint],
69043da084b3Smrg		[Use a lint-style source code checker (default: disabled)])],
69053da084b3Smrg		[use_lint=$withval], [use_lint=no])
69063da084b3Smrgif test "x$use_lint" = "xyes" ; then
69073da084b3Smrg	LINT="lint"
69083da084b3Smrgelse
69093da084b3Smrg	LINT="$use_lint"
69103da084b3Smrgfi
69113da084b3Smrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
69123da084b3Smrg    case $LINT in
69133da084b3Smrg	lint|*/lint)
69143da084b3Smrg	    case $host_os in
69153da084b3Smrg		solaris*)
69163da084b3Smrg			LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
69173da084b3Smrg			;;
69183da084b3Smrg	    esac
69193da084b3Smrg	    ;;
69203da084b3Smrg    esac
69213da084b3Smrgfi
69223da084b3Smrg
69233da084b3SmrgAC_SUBST(LINT)
69243da084b3SmrgAC_SUBST(LINT_FLAGS)
69253da084b3SmrgAM_CONDITIONAL(LINT, [test x$LINT != xno])
69263da084b3Smrg
69273da084b3Smrg]) # XORG_WITH_LINT
69283da084b3Smrg
69293da084b3Smrg# XORG_LINT_LIBRARY(LIBNAME)
69303da084b3Smrg# --------------------------
69313da084b3Smrg# Minimum version: 1.1.0
69323da084b3Smrg#
69333da084b3Smrg# Sets up flags for building lint libraries for checking programs that call
69343da084b3Smrg# functions in the library.
69353da084b3Smrg# Disabled by default, enable with --enable-lint-library
69363da084b3Smrg# Sets: 
69373da084b3Smrg#	@LINTLIB@		- name of lint library file to make
69383da084b3Smrg#	MAKE_LINT_LIB		- automake conditional
69393da084b3Smrg#
69403da084b3Smrg
69413da084b3SmrgAC_DEFUN([XORG_LINT_LIBRARY],[
69423da084b3SmrgAC_REQUIRE([XORG_WITH_LINT])
69433da084b3Smrg# Build lint "library" for more indepth checks of programs calling this library
69443da084b3SmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library],
69453da084b3Smrg	[Create lint library (default: disabled)])],
69463da084b3Smrg	[make_lint_lib=$enableval], [make_lint_lib=no])
69473da084b3Smrgif test "x$make_lint_lib" != "xno" ; then
69483da084b3Smrg	if test "x$LINT" = "xno" ; then
69493da084b3Smrg		AC_MSG_ERROR([Cannot make lint library without --with-lint])
69503da084b3Smrg	fi
69513da084b3Smrg	if test "x$make_lint_lib" = "xyes" ; then
69523da084b3Smrg		LINTLIB=llib-l$1.ln
69533da084b3Smrg	else
69543da084b3Smrg		LINTLIB=$make_lint_lib
69553da084b3Smrg	fi
69563da084b3Smrgfi
69573da084b3SmrgAC_SUBST(LINTLIB)
69583da084b3SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
69593da084b3Smrg
69603da084b3Smrg]) # XORG_LINT_LIBRARY
69613da084b3Smrg
69623da084b3Smrgdnl Copyright 2005 Red Hat, Inc
69633da084b3Smrgdnl
69643da084b3Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
69653da084b3Smrgdnl documentation for any purpose is hereby granted without fee, provided that
69663da084b3Smrgdnl the above copyright notice appear in all copies and that both that
69673da084b3Smrgdnl copyright notice and this permission notice appear in supporting
69683da084b3Smrgdnl documentation.
69693da084b3Smrgdnl
69703da084b3Smrgdnl The above copyright notice and this permission notice shall be included
69713da084b3Smrgdnl in all copies or substantial portions of the Software.
69723da084b3Smrgdnl
69733da084b3Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
69743da084b3Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
69753da084b3Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
69763da084b3Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
69773da084b3Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
69783da084b3Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
69793da084b3Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
69803da084b3Smrgdnl
69813da084b3Smrgdnl Except as contained in this notice, the name of the copyright holders shall
69823da084b3Smrgdnl not be used in advertising or otherwise to promote the sale, use or
69833da084b3Smrgdnl other dealings in this Software without prior written authorization
69843da084b3Smrgdnl from the copyright holders.
69853da084b3Smrgdnl
69863da084b3Smrg
69873da084b3Smrg# XORG_RELEASE_VERSION
69883da084b3Smrg# --------------------
69893da084b3Smrg# Adds --with/without-release-string and changes the PACKAGE and
69903da084b3Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
69913da084b3Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
69923da084b3Smrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
69933da084b3Smrg 
69943da084b3SmrgAC_DEFUN([XORG_RELEASE_VERSION],[
69953da084b3Smrg	AC_ARG_WITH(release-version,
69963da084b3Smrg			AC_HELP_STRING([--with-release-version=STRING],
69973da084b3Smrg				[Use release version string in package name]),
69983da084b3Smrg			[RELEASE_VERSION="$withval"],
69993da084b3Smrg			[RELEASE_VERSION=""])
70003da084b3Smrg	if test "x$RELEASE_VERSION" != "x"; then
70013da084b3Smrg		PACKAGE="$PACKAGE-$RELEASE_VERSION"
70023da084b3Smrg		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
70033da084b3Smrg		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
70043da084b3Smrg	fi
70053da084b3Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
70063da084b3Smrg		[`echo $PACKAGE_VERSION | sed -ne 's/^\([[^\.]]\+\).*/\1/p'`],
70073da084b3Smrg		[Major version of this package])
70083da084b3Smrg	PVM=`echo $PACKAGE_VERSION | sed -ne 's/^\([[^\.]]\+\)\.\([[^\.]]\+\).*/\2/p'`
70093da084b3Smrg	if test "x$PVM" = "x"; then
70103da084b3Smrg		PVM="0"
70113da084b3Smrg	fi
70123da084b3Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
70133da084b3Smrg		[$PVM],
70143da084b3Smrg		[Minor version of this package])
70153da084b3Smrg	PVP=`echo $PACKAGE_VERSION | sed -ne 's/^\([[^\.]]\+\)\.\([[^\.]]\+\)\.\([[^\.]]\+\).*/\3/p'`
70163da084b3Smrg	if test "x$PVP" = "x"; then
70173da084b3Smrg		PVP="0"
70183da084b3Smrg	fi
70193da084b3Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
70203da084b3Smrg		[$PVP],
70213da084b3Smrg		[Patch version of this package])
70223da084b3Smrg])
70233da084b3Smrg
70243da084b3Smrg# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
70253da084b3Smrg#
70263da084b3Smrg# This file is free software; the Free Software Foundation
70273da084b3Smrg# gives unlimited permission to copy and/or distribute it,
70283da084b3Smrg# with or without modifications, as long as this notice is preserved.
70293da084b3Smrg
70303da084b3Smrg# AM_AUTOMAKE_VERSION(VERSION)
70313da084b3Smrg# ----------------------------
70323da084b3Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
70333da084b3Smrg# generated from the m4 files accompanying Automake X.Y.
70343da084b3SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
70353da084b3Smrg
70363da084b3Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION
70373da084b3Smrg# -------------------------------
70383da084b3Smrg# Call AM_AUTOMAKE_VERSION so it can be traced.
70393da084b3Smrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
70403da084b3SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
70413da084b3Smrg	 [AM_AUTOMAKE_VERSION([1.9.6])])
70423da084b3Smrg
70433da084b3Smrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
70443da084b3Smrg
70453da084b3Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
70463da084b3Smrg#
70473da084b3Smrg# This file is free software; the Free Software Foundation
70483da084b3Smrg# gives unlimited permission to copy and/or distribute it,
70493da084b3Smrg# with or without modifications, as long as this notice is preserved.
70503da084b3Smrg
70513da084b3Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
70523da084b3Smrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
70533da084b3Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
70543da084b3Smrg#
70553da084b3Smrg# Of course, Automake must honor this variable whenever it calls a
70563da084b3Smrg# tool from the auxiliary directory.  The problem is that $srcdir (and
70573da084b3Smrg# therefore $ac_aux_dir as well) can be either absolute or relative,
70583da084b3Smrg# depending on how configure is run.  This is pretty annoying, since
70593da084b3Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
70603da084b3Smrg# source directory, any form will work fine, but in subdirectories a
70613da084b3Smrg# relative path needs to be adjusted first.
70623da084b3Smrg#
70633da084b3Smrg# $ac_aux_dir/missing
70643da084b3Smrg#    fails when called from a subdirectory if $ac_aux_dir is relative
70653da084b3Smrg# $top_srcdir/$ac_aux_dir/missing
70663da084b3Smrg#    fails if $ac_aux_dir is absolute,
70673da084b3Smrg#    fails when called from a subdirectory in a VPATH build with
70683da084b3Smrg#          a relative $ac_aux_dir
70693da084b3Smrg#
70703da084b3Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
70713da084b3Smrg# are both prefixed by $srcdir.  In an in-source build this is usually
70723da084b3Smrg# harmless because $srcdir is `.', but things will broke when you
70733da084b3Smrg# start a VPATH build or use an absolute $srcdir.
70743da084b3Smrg#
70753da084b3Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
70763da084b3Smrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
70773da084b3Smrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
70783da084b3Smrg# and then we would define $MISSING as
70793da084b3Smrg#   MISSING="\${SHELL} $am_aux_dir/missing"
70803da084b3Smrg# This will work as long as MISSING is not called from configure, because
70813da084b3Smrg# unfortunately $(top_srcdir) has no meaning in configure.
70823da084b3Smrg# However there are other variables, like CC, which are often used in
70833da084b3Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
70843da084b3Smrg#
70853da084b3Smrg# Another solution, used here, is to always expand $ac_aux_dir to an
70863da084b3Smrg# absolute PATH.  The drawback is that using absolute paths prevent a
70873da084b3Smrg# configured tree to be moved without reconfiguration.
70883da084b3Smrg
70893da084b3SmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
70903da084b3Smrg[dnl Rely on autoconf to set up CDPATH properly.
70913da084b3SmrgAC_PREREQ([2.50])dnl
70923da084b3Smrg# expand $ac_aux_dir to an absolute path
70933da084b3Smrgam_aux_dir=`cd $ac_aux_dir && pwd`
70943da084b3Smrg])
70953da084b3Smrg
70963da084b3Smrg# AM_CONDITIONAL                                            -*- Autoconf -*-
70973da084b3Smrg
70983da084b3Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
70993da084b3Smrg# Free Software Foundation, Inc.
71003da084b3Smrg#
71013da084b3Smrg# This file is free software; the Free Software Foundation
71023da084b3Smrg# gives unlimited permission to copy and/or distribute it,
71033da084b3Smrg# with or without modifications, as long as this notice is preserved.
71043da084b3Smrg
71053da084b3Smrg# serial 7
71063da084b3Smrg
71073da084b3Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
71083da084b3Smrg# -------------------------------------
71093da084b3Smrg# Define a conditional.
71103da084b3SmrgAC_DEFUN([AM_CONDITIONAL],
71113da084b3Smrg[AC_PREREQ(2.52)dnl
71123da084b3Smrg ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
71133da084b3Smrg	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
71143da084b3SmrgAC_SUBST([$1_TRUE])
71153da084b3SmrgAC_SUBST([$1_FALSE])
71163da084b3Smrgif $2; then
71173da084b3Smrg  $1_TRUE=
71183da084b3Smrg  $1_FALSE='#'
71193da084b3Smrgelse
71203da084b3Smrg  $1_TRUE='#'
71213da084b3Smrg  $1_FALSE=
71223da084b3Smrgfi
71233da084b3SmrgAC_CONFIG_COMMANDS_PRE(
71243da084b3Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
71253da084b3Smrg  AC_MSG_ERROR([[conditional "$1" was never defined.
71263da084b3SmrgUsually this means the macro was only invoked conditionally.]])
71273da084b3Smrgfi])])
71283da084b3Smrg
71293da084b3Smrg
71303da084b3Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
71313da084b3Smrg# Free Software Foundation, Inc.
71323da084b3Smrg#
71333da084b3Smrg# This file is free software; the Free Software Foundation
71343da084b3Smrg# gives unlimited permission to copy and/or distribute it,
71353da084b3Smrg# with or without modifications, as long as this notice is preserved.
71363da084b3Smrg
71373da084b3Smrg# serial 8
71383da084b3Smrg
71393da084b3Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
71403da084b3Smrg# written in clear, in which case automake, when reading aclocal.m4,
71413da084b3Smrg# will think it sees a *use*, and therefore will trigger all it's
71423da084b3Smrg# C support machinery.  Also note that it means that autoscan, seeing
71433da084b3Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
71443da084b3Smrg
71453da084b3Smrg
71463da084b3Smrg# _AM_DEPENDENCIES(NAME)
71473da084b3Smrg# ----------------------
71483da084b3Smrg# See how the compiler implements dependency checking.
71493da084b3Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
71503da084b3Smrg# We try a few techniques and use that to set a single cache variable.
71513da084b3Smrg#
71523da084b3Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
71533da084b3Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
71543da084b3Smrg# dependency, and given that the user is not expected to run this macro,
71553da084b3Smrg# just rely on AC_PROG_CC.
71563da084b3SmrgAC_DEFUN([_AM_DEPENDENCIES],
71573da084b3Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
71583da084b3SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
71593da084b3SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
71603da084b3SmrgAC_REQUIRE([AM_DEP_TRACK])dnl
71613da084b3Smrg
71623da084b3Smrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
71633da084b3Smrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
71643da084b3Smrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
71653da084b3Smrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
71663da084b3Smrg                   [depcc="$$1"   am_compiler_list=])
71673da084b3Smrg
71683da084b3SmrgAC_CACHE_CHECK([dependency style of $depcc],
71693da084b3Smrg               [am_cv_$1_dependencies_compiler_type],
71703da084b3Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
71713da084b3Smrg  # We make a subdir and do the tests there.  Otherwise we can end up
71723da084b3Smrg  # making bogus files that we don't know about and never remove.  For
71733da084b3Smrg  # instance it was reported that on HP-UX the gcc test will end up
71743da084b3Smrg  # making a dummy file named `D' -- because `-MD' means `put the output
71753da084b3Smrg  # in D'.
71763da084b3Smrg  mkdir conftest.dir
71773da084b3Smrg  # Copy depcomp to subdir because otherwise we won't find it if we're
71783da084b3Smrg  # using a relative directory.
71793da084b3Smrg  cp "$am_depcomp" conftest.dir
71803da084b3Smrg  cd conftest.dir
71813da084b3Smrg  # We will build objects and dependencies in a subdirectory because
71823da084b3Smrg  # it helps to detect inapplicable dependency modes.  For instance
71833da084b3Smrg  # both Tru64's cc and ICC support -MD to output dependencies as a
71843da084b3Smrg  # side effect of compilation, but ICC will put the dependencies in
71853da084b3Smrg  # the current directory while Tru64 will put them in the object
71863da084b3Smrg  # directory.
71873da084b3Smrg  mkdir sub
71883da084b3Smrg
71893da084b3Smrg  am_cv_$1_dependencies_compiler_type=none
71903da084b3Smrg  if test "$am_compiler_list" = ""; then
71913da084b3Smrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
71923da084b3Smrg  fi
71933da084b3Smrg  for depmode in $am_compiler_list; do
71943da084b3Smrg    # Setup a source with many dependencies, because some compilers
71953da084b3Smrg    # like to wrap large dependency lists on column 80 (with \), and
71963da084b3Smrg    # we should not choose a depcomp mode which is confused by this.
71973da084b3Smrg    #
71983da084b3Smrg    # We need to recreate these files for each test, as the compiler may
71993da084b3Smrg    # overwrite some of them when testing with obscure command lines.
72003da084b3Smrg    # This happens at least with the AIX C compiler.
72013da084b3Smrg    : > sub/conftest.c
72023da084b3Smrg    for i in 1 2 3 4 5 6; do
72033da084b3Smrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
72043da084b3Smrg      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
72053da084b3Smrg      # Solaris 8's {/usr,}/bin/sh.
72063da084b3Smrg      touch sub/conftst$i.h
72073da084b3Smrg    done
72083da084b3Smrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
72093da084b3Smrg
72103da084b3Smrg    case $depmode in
72113da084b3Smrg    nosideeffect)
72123da084b3Smrg      # after this tag, mechanisms are not by side-effect, so they'll
72133da084b3Smrg      # only be used when explicitly requested
72143da084b3Smrg      if test "x$enable_dependency_tracking" = xyes; then
72153da084b3Smrg	continue
72163da084b3Smrg      else
72173da084b3Smrg	break
72183da084b3Smrg      fi
72193da084b3Smrg      ;;
72203da084b3Smrg    none) break ;;
72213da084b3Smrg    esac
72223da084b3Smrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
72233da084b3Smrg    # mode.  It turns out that the SunPro C++ compiler does not properly
72243da084b3Smrg    # handle `-M -o', and we need to detect this.
72253da084b3Smrg    if depmode=$depmode \
72263da084b3Smrg       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
72273da084b3Smrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
72283da084b3Smrg       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
72293da084b3Smrg         >/dev/null 2>conftest.err &&
72303da084b3Smrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
72313da084b3Smrg       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
72323da084b3Smrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
72333da084b3Smrg      # icc doesn't choke on unknown options, it will just issue warnings
72343da084b3Smrg      # or remarks (even with -Werror).  So we grep stderr for any message
72353da084b3Smrg      # that says an option was ignored or not supported.
72363da084b3Smrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
72373da084b3Smrg      #   icc: Command line warning: ignoring option '-M'; no argument required
72383da084b3Smrg      # The diagnosis changed in icc 8.0:
72393da084b3Smrg      #   icc: Command line remark: option '-MP' not supported
72403da084b3Smrg      if (grep 'ignoring option' conftest.err ||
72413da084b3Smrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
72423da084b3Smrg        am_cv_$1_dependencies_compiler_type=$depmode
72433da084b3Smrg        break
72443da084b3Smrg      fi
72453da084b3Smrg    fi
72463da084b3Smrg  done
72473da084b3Smrg
72483da084b3Smrg  cd ..
72493da084b3Smrg  rm -rf conftest.dir
72503da084b3Smrgelse
72513da084b3Smrg  am_cv_$1_dependencies_compiler_type=none
72523da084b3Smrgfi
72533da084b3Smrg])
72543da084b3SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
72553da084b3SmrgAM_CONDITIONAL([am__fastdep$1], [
72563da084b3Smrg  test "x$enable_dependency_tracking" != xno \
72573da084b3Smrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
72583da084b3Smrg])
72593da084b3Smrg
72603da084b3Smrg
72613da084b3Smrg# AM_SET_DEPDIR
72623da084b3Smrg# -------------
72633da084b3Smrg# Choose a directory name for dependency files.
72643da084b3Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
72653da084b3SmrgAC_DEFUN([AM_SET_DEPDIR],
72663da084b3Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
72673da084b3SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
72683da084b3Smrg])
72693da084b3Smrg
72703da084b3Smrg
72713da084b3Smrg# AM_DEP_TRACK
72723da084b3Smrg# ------------
72733da084b3SmrgAC_DEFUN([AM_DEP_TRACK],
72743da084b3Smrg[AC_ARG_ENABLE(dependency-tracking,
72753da084b3Smrg[  --disable-dependency-tracking  speeds up one-time build
72763da084b3Smrg  --enable-dependency-tracking   do not reject slow dependency extractors])
72773da084b3Smrgif test "x$enable_dependency_tracking" != xno; then
72783da084b3Smrg  am_depcomp="$ac_aux_dir/depcomp"
72793da084b3Smrg  AMDEPBACKSLASH='\'
72803da084b3Smrgfi
72813da084b3SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
72823da084b3SmrgAC_SUBST([AMDEPBACKSLASH])
72833da084b3Smrg])
72843da084b3Smrg
72853da084b3Smrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
72863da084b3Smrg
72873da084b3Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
72883da084b3Smrg# Free Software Foundation, Inc.
72893da084b3Smrg#
72903da084b3Smrg# This file is free software; the Free Software Foundation
72913da084b3Smrg# gives unlimited permission to copy and/or distribute it,
72923da084b3Smrg# with or without modifications, as long as this notice is preserved.
72933da084b3Smrg
72943da084b3Smrg#serial 3
72953da084b3Smrg
72963da084b3Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
72973da084b3Smrg# ------------------------------
72983da084b3SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
72993da084b3Smrg[for mf in $CONFIG_FILES; do
73003da084b3Smrg  # Strip MF so we end up with the name of the file.
73013da084b3Smrg  mf=`echo "$mf" | sed -e 's/:.*$//'`
73023da084b3Smrg  # Check whether this is an Automake generated Makefile or not.
73033da084b3Smrg  # We used to match only the files named `Makefile.in', but
73043da084b3Smrg  # some people rename them; so instead we look at the file content.
73053da084b3Smrg  # Grep'ing the first line is not enough: some people post-process
73063da084b3Smrg  # each Makefile.in and add a new line on top of each file to say so.
73073da084b3Smrg  # So let's grep whole file.
73083da084b3Smrg  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
73093da084b3Smrg    dirpart=`AS_DIRNAME("$mf")`
73103da084b3Smrg  else
73113da084b3Smrg    continue
73123da084b3Smrg  fi
73133da084b3Smrg  # Extract the definition of DEPDIR, am__include, and am__quote
73143da084b3Smrg  # from the Makefile without running `make'.
73153da084b3Smrg  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
73163da084b3Smrg  test -z "$DEPDIR" && continue
73173da084b3Smrg  am__include=`sed -n 's/^am__include = //p' < "$mf"`
73183da084b3Smrg  test -z "am__include" && continue
73193da084b3Smrg  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
73203da084b3Smrg  # When using ansi2knr, U may be empty or an underscore; expand it
73213da084b3Smrg  U=`sed -n 's/^U = //p' < "$mf"`
73223da084b3Smrg  # Find all dependency output files, they are included files with
73233da084b3Smrg  # $(DEPDIR) in their names.  We invoke sed twice because it is the
73243da084b3Smrg  # simplest approach to changing $(DEPDIR) to its actual value in the
73253da084b3Smrg  # expansion.
73263da084b3Smrg  for file in `sed -n "
73273da084b3Smrg    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
73283da084b3Smrg       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
73293da084b3Smrg    # Make sure the directory exists.
73303da084b3Smrg    test -f "$dirpart/$file" && continue
73313da084b3Smrg    fdir=`AS_DIRNAME(["$file"])`
73323da084b3Smrg    AS_MKDIR_P([$dirpart/$fdir])
73333da084b3Smrg    # echo "creating $dirpart/$file"
73343da084b3Smrg    echo '# dummy' > "$dirpart/$file"
73353da084b3Smrg  done
73363da084b3Smrgdone
73373da084b3Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
73383da084b3Smrg
73393da084b3Smrg
73403da084b3Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS
73413da084b3Smrg# -----------------------------
73423da084b3Smrg# This macro should only be invoked once -- use via AC_REQUIRE.
73433da084b3Smrg#
73443da084b3Smrg# This code is only required when automatic dependency tracking
73453da084b3Smrg# is enabled.  FIXME.  This creates each `.P' file that we will
73463da084b3Smrg# need in order to bootstrap the dependency handling code.
73473da084b3SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
73483da084b3Smrg[AC_CONFIG_COMMANDS([depfiles],
73493da084b3Smrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
73503da084b3Smrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
73513da084b3Smrg])
73523da084b3Smrg
73533da084b3Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
73543da084b3Smrg# Free Software Foundation, Inc.
73553da084b3Smrg#
73563da084b3Smrg# This file is free software; the Free Software Foundation
73573da084b3Smrg# gives unlimited permission to copy and/or distribute it,
73583da084b3Smrg# with or without modifications, as long as this notice is preserved.
73593da084b3Smrg
73603da084b3Smrg# serial 8
73613da084b3Smrg
73623da084b3Smrg# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
73633da084b3SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
73643da084b3Smrg
73653da084b3Smrg# Do all the work for Automake.                             -*- Autoconf -*-
73663da084b3Smrg
73673da084b3Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
73683da084b3Smrg# Free Software Foundation, Inc.
73693da084b3Smrg#
73703da084b3Smrg# This file is free software; the Free Software Foundation
73713da084b3Smrg# gives unlimited permission to copy and/or distribute it,
73723da084b3Smrg# with or without modifications, as long as this notice is preserved.
73733da084b3Smrg
73743da084b3Smrg# serial 12
73753da084b3Smrg
73763da084b3Smrg# This macro actually does too much.  Some checks are only needed if
73773da084b3Smrg# your package does certain things.  But this isn't really a big deal.
73783da084b3Smrg
73793da084b3Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
73803da084b3Smrg# AM_INIT_AUTOMAKE([OPTIONS])
73813da084b3Smrg# -----------------------------------------------
73823da084b3Smrg# The call with PACKAGE and VERSION arguments is the old style
73833da084b3Smrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
73843da084b3Smrg# and VERSION should now be passed to AC_INIT and removed from
73853da084b3Smrg# the call to AM_INIT_AUTOMAKE.
73863da084b3Smrg# We support both call styles for the transition.  After
73873da084b3Smrg# the next Automake release, Autoconf can make the AC_INIT
73883da084b3Smrg# arguments mandatory, and then we can depend on a new Autoconf
73893da084b3Smrg# release and drop the old call support.
73903da084b3SmrgAC_DEFUN([AM_INIT_AUTOMAKE],
73913da084b3Smrg[AC_PREREQ([2.58])dnl
73923da084b3Smrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
73933da084b3Smrgdnl the ones we care about.
73943da084b3Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
73953da084b3SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
73963da084b3SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
73973da084b3Smrg# test to see if srcdir already configured
73983da084b3Smrgif test "`cd $srcdir && pwd`" != "`pwd`" &&
73993da084b3Smrg   test -f $srcdir/config.status; then
74003da084b3Smrg  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
74013da084b3Smrgfi
74023da084b3Smrg
74033da084b3Smrg# test whether we have cygpath
74043da084b3Smrgif test -z "$CYGPATH_W"; then
74053da084b3Smrg  if (cygpath --version) >/dev/null 2>/dev/null; then
74063da084b3Smrg    CYGPATH_W='cygpath -w'
74073da084b3Smrg  else
74083da084b3Smrg    CYGPATH_W=echo
74093da084b3Smrg  fi
74103da084b3Smrgfi
74113da084b3SmrgAC_SUBST([CYGPATH_W])
74123da084b3Smrg
74133da084b3Smrg# Define the identity of the package.
74143da084b3Smrgdnl Distinguish between old-style and new-style calls.
74153da084b3Smrgm4_ifval([$2],
74163da084b3Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
74173da084b3Smrg AC_SUBST([PACKAGE], [$1])dnl
74183da084b3Smrg AC_SUBST([VERSION], [$2])],
74193da084b3Smrg[_AM_SET_OPTIONS([$1])dnl
74203da084b3Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
74213da084b3Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
74223da084b3Smrg
74233da084b3Smrg_AM_IF_OPTION([no-define],,
74243da084b3Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
74253da084b3Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
74263da084b3Smrg
74273da084b3Smrg# Some tools Automake needs.
74283da084b3SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
74293da084b3SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
74303da084b3SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
74313da084b3SmrgAM_MISSING_PROG(AUTOCONF, autoconf)
74323da084b3SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
74333da084b3SmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
74343da084b3SmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
74353da084b3SmrgAM_PROG_INSTALL_SH
74363da084b3SmrgAM_PROG_INSTALL_STRIP
74373da084b3SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl
74383da084b3Smrg# We need awk for the "check" target.  The system "awk" is bad on
74393da084b3Smrg# some platforms.
74403da084b3SmrgAC_REQUIRE([AC_PROG_AWK])dnl
74413da084b3SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
74423da084b3SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
74433da084b3Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
74443da084b3Smrg              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
74453da084b3Smrg	      		     [_AM_PROG_TAR([v7])])])
74463da084b3Smrg_AM_IF_OPTION([no-dependencies],,
74473da084b3Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
74483da084b3Smrg                  [_AM_DEPENDENCIES(CC)],
74493da084b3Smrg                  [define([AC_PROG_CC],
74503da084b3Smrg                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
74513da084b3SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
74523da084b3Smrg                  [_AM_DEPENDENCIES(CXX)],
74533da084b3Smrg                  [define([AC_PROG_CXX],
74543da084b3Smrg                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
74553da084b3Smrg])
74563da084b3SmrgAC_REQUIRE([AM_PRETTY_CMDS])
74573da084b3Smrg])
74583da084b3Smrg
74593da084b3Smrg
74603da084b3Smrg# When config.status generates a header, we must update the stamp-h file.
74613da084b3Smrg# This file resides in the same directory as the config header
74623da084b3Smrg# that is generated.  The stamp files are numbered to have different names.
74633da084b3Smrg
74643da084b3Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
74653da084b3Smrg# loop where config.status creates the headers, so we can generate
74663da084b3Smrg# our stamp files there.
74673da084b3SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
74683da084b3Smrg[# Compute $1's index in $config_headers.
74693da084b3Smrg_am_stamp_count=1
74703da084b3Smrgfor _am_header in $config_headers :; do
74713da084b3Smrg  case $_am_header in
74723da084b3Smrg    $1 | $1:* )
74733da084b3Smrg      break ;;
74743da084b3Smrg    * )
74753da084b3Smrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
74763da084b3Smrg  esac
74773da084b3Smrgdone
74783da084b3Smrgecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
74793da084b3Smrg
74803da084b3Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
74813da084b3Smrg#
74823da084b3Smrg# This file is free software; the Free Software Foundation
74833da084b3Smrg# gives unlimited permission to copy and/or distribute it,
74843da084b3Smrg# with or without modifications, as long as this notice is preserved.
74853da084b3Smrg
74863da084b3Smrg# AM_PROG_INSTALL_SH
74873da084b3Smrg# ------------------
74883da084b3Smrg# Define $install_sh.
74893da084b3SmrgAC_DEFUN([AM_PROG_INSTALL_SH],
74903da084b3Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
74913da084b3Smrginstall_sh=${install_sh-"$am_aux_dir/install-sh"}
74923da084b3SmrgAC_SUBST(install_sh)])
74933da084b3Smrg
74943da084b3Smrg# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
74953da084b3Smrg#
74963da084b3Smrg# This file is free software; the Free Software Foundation
74973da084b3Smrg# gives unlimited permission to copy and/or distribute it,
74983da084b3Smrg# with or without modifications, as long as this notice is preserved.
74993da084b3Smrg
75003da084b3Smrg# serial 2
75013da084b3Smrg
75023da084b3Smrg# Check whether the underlying file-system supports filenames
75033da084b3Smrg# with a leading dot.  For instance MS-DOS doesn't.
75043da084b3SmrgAC_DEFUN([AM_SET_LEADING_DOT],
75053da084b3Smrg[rm -rf .tst 2>/dev/null
75063da084b3Smrgmkdir .tst 2>/dev/null
75073da084b3Smrgif test -d .tst; then
75083da084b3Smrg  am__leading_dot=.
75093da084b3Smrgelse
75103da084b3Smrg  am__leading_dot=_
75113da084b3Smrgfi
75123da084b3Smrgrmdir .tst 2>/dev/null
75133da084b3SmrgAC_SUBST([am__leading_dot])])
75143da084b3Smrg
75153da084b3Smrg# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
75163da084b3Smrg# From Jim Meyering
75173da084b3Smrg
75183da084b3Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
75193da084b3Smrg# Free Software Foundation, Inc.
75203da084b3Smrg#
75213da084b3Smrg# This file is free software; the Free Software Foundation
75223da084b3Smrg# gives unlimited permission to copy and/or distribute it,
75233da084b3Smrg# with or without modifications, as long as this notice is preserved.
75243da084b3Smrg
75253da084b3Smrg# serial 4
75263da084b3Smrg
75273da084b3SmrgAC_DEFUN([AM_MAINTAINER_MODE],
75283da084b3Smrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
75293da084b3Smrg  dnl maintainer-mode is disabled by default
75303da084b3Smrg  AC_ARG_ENABLE(maintainer-mode,
75313da084b3Smrg[  --enable-maintainer-mode  enable make rules and dependencies not useful
75323da084b3Smrg			  (and sometimes confusing) to the casual installer],
75333da084b3Smrg      USE_MAINTAINER_MODE=$enableval,
75343da084b3Smrg      USE_MAINTAINER_MODE=no)
75353da084b3Smrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
75363da084b3Smrg  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
75373da084b3Smrg  MAINT=$MAINTAINER_MODE_TRUE
75383da084b3Smrg  AC_SUBST(MAINT)dnl
75393da084b3Smrg]
75403da084b3Smrg)
75413da084b3Smrg
75423da084b3SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
75433da084b3Smrg
75443da084b3Smrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
75453da084b3Smrg
75463da084b3Smrg# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
75473da084b3Smrg#
75483da084b3Smrg# This file is free software; the Free Software Foundation
75493da084b3Smrg# gives unlimited permission to copy and/or distribute it,
75503da084b3Smrg# with or without modifications, as long as this notice is preserved.
75513da084b3Smrg
75523da084b3Smrg# serial 3
75533da084b3Smrg
75543da084b3Smrg# AM_MAKE_INCLUDE()
75553da084b3Smrg# -----------------
75563da084b3Smrg# Check to see how make treats includes.
75573da084b3SmrgAC_DEFUN([AM_MAKE_INCLUDE],
75583da084b3Smrg[am_make=${MAKE-make}
75593da084b3Smrgcat > confinc << 'END'
75603da084b3Smrgam__doit:
75613da084b3Smrg	@echo done
75623da084b3Smrg.PHONY: am__doit
75633da084b3SmrgEND
75643da084b3Smrg# If we don't find an include directive, just comment out the code.
75653da084b3SmrgAC_MSG_CHECKING([for style of include used by $am_make])
75663da084b3Smrgam__include="#"
75673da084b3Smrgam__quote=
75683da084b3Smrg_am_result=none
75693da084b3Smrg# First try GNU make style include.
75703da084b3Smrgecho "include confinc" > confmf
75713da084b3Smrg# We grep out `Entering directory' and `Leaving directory'
75723da084b3Smrg# messages which can occur if `w' ends up in MAKEFLAGS.
75733da084b3Smrg# In particular we don't look at `^make:' because GNU make might
75743da084b3Smrg# be invoked under some other name (usually "gmake"), in which
75753da084b3Smrg# case it prints its new name instead of `make'.
75763da084b3Smrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
75773da084b3Smrg   am__include=include
75783da084b3Smrg   am__quote=
75793da084b3Smrg   _am_result=GNU
75803da084b3Smrgfi
75813da084b3Smrg# Now try BSD make style include.
75823da084b3Smrgif test "$am__include" = "#"; then
75833da084b3Smrg   echo '.include "confinc"' > confmf
75843da084b3Smrg   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
75853da084b3Smrg      am__include=.include
75863da084b3Smrg      am__quote="\""
75873da084b3Smrg      _am_result=BSD
75883da084b3Smrg   fi
75893da084b3Smrgfi
75903da084b3SmrgAC_SUBST([am__include])
75913da084b3SmrgAC_SUBST([am__quote])
75923da084b3SmrgAC_MSG_RESULT([$_am_result])
75933da084b3Smrgrm -f confinc confmf
75943da084b3Smrg])
75953da084b3Smrg
75963da084b3Smrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
75973da084b3Smrg
75983da084b3Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
75993da084b3Smrg# Free Software Foundation, Inc.
76003da084b3Smrg#
76013da084b3Smrg# This file is free software; the Free Software Foundation
76023da084b3Smrg# gives unlimited permission to copy and/or distribute it,
76033da084b3Smrg# with or without modifications, as long as this notice is preserved.
76043da084b3Smrg
76053da084b3Smrg# serial 4
76063da084b3Smrg
76073da084b3Smrg# AM_MISSING_PROG(NAME, PROGRAM)
76083da084b3Smrg# ------------------------------
76093da084b3SmrgAC_DEFUN([AM_MISSING_PROG],
76103da084b3Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
76113da084b3Smrg$1=${$1-"${am_missing_run}$2"}
76123da084b3SmrgAC_SUBST($1)])
76133da084b3Smrg
76143da084b3Smrg
76153da084b3Smrg# AM_MISSING_HAS_RUN
76163da084b3Smrg# ------------------
76173da084b3Smrg# Define MISSING if not defined so far and test if it supports --run.
76183da084b3Smrg# If it does, set am_missing_run to use it, otherwise, to nothing.
76193da084b3SmrgAC_DEFUN([AM_MISSING_HAS_RUN],
76203da084b3Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
76213da084b3Smrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
76223da084b3Smrg# Use eval to expand $SHELL
76233da084b3Smrgif eval "$MISSING --run true"; then
76243da084b3Smrg  am_missing_run="$MISSING --run "
76253da084b3Smrgelse
76263da084b3Smrg  am_missing_run=
76273da084b3Smrg  AC_MSG_WARN([`missing' script is too old or missing])
76283da084b3Smrgfi
76293da084b3Smrg])
76303da084b3Smrg
76313da084b3Smrg# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
76323da084b3Smrg#
76333da084b3Smrg# This file is free software; the Free Software Foundation
76343da084b3Smrg# gives unlimited permission to copy and/or distribute it,
76353da084b3Smrg# with or without modifications, as long as this notice is preserved.
76363da084b3Smrg
76373da084b3Smrg# AM_PROG_MKDIR_P
76383da084b3Smrg# ---------------
76393da084b3Smrg# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
76403da084b3Smrg#
76413da084b3Smrg# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
76423da084b3Smrg# created by `make install' are always world readable, even if the
76433da084b3Smrg# installer happens to have an overly restrictive umask (e.g. 077).
76443da084b3Smrg# This was a mistake.  There are at least two reasons why we must not
76453da084b3Smrg# use `-m 0755':
76463da084b3Smrg#   - it causes special bits like SGID to be ignored,
76473da084b3Smrg#   - it may be too restrictive (some setups expect 775 directories).
76483da084b3Smrg#
76493da084b3Smrg# Do not use -m 0755 and let people choose whatever they expect by
76503da084b3Smrg# setting umask.
76513da084b3Smrg#
76523da084b3Smrg# We cannot accept any implementation of `mkdir' that recognizes `-p'.
76533da084b3Smrg# Some implementations (such as Solaris 8's) are not thread-safe: if a
76543da084b3Smrg# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
76553da084b3Smrg# concurrently, both version can detect that a/ is missing, but only
76563da084b3Smrg# one can create it and the other will error out.  Consequently we
76573da084b3Smrg# restrict ourselves to GNU make (using the --version option ensures
76583da084b3Smrg# this.)
76593da084b3SmrgAC_DEFUN([AM_PROG_MKDIR_P],
76603da084b3Smrg[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
76613da084b3Smrg  # We used to keeping the `.' as first argument, in order to
76623da084b3Smrg  # allow $(mkdir_p) to be used without argument.  As in
76633da084b3Smrg  #   $(mkdir_p) $(somedir)
76643da084b3Smrg  # where $(somedir) is conditionally defined.  However this is wrong
76653da084b3Smrg  # for two reasons:
76663da084b3Smrg  #  1. if the package is installed by a user who cannot write `.'
76673da084b3Smrg  #     make install will fail,
76683da084b3Smrg  #  2. the above comment should most certainly read
76693da084b3Smrg  #     $(mkdir_p) $(DESTDIR)$(somedir)
76703da084b3Smrg  #     so it does not work when $(somedir) is undefined and
76713da084b3Smrg  #     $(DESTDIR) is not.
76723da084b3Smrg  #  To support the latter case, we have to write
76733da084b3Smrg  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
76743da084b3Smrg  #  so the `.' trick is pointless.
76753da084b3Smrg  mkdir_p='mkdir -p --'
76763da084b3Smrgelse
76773da084b3Smrg  # On NextStep and OpenStep, the `mkdir' command does not
76783da084b3Smrg  # recognize any option.  It will interpret all options as
76793da084b3Smrg  # directories to create, and then abort because `.' already
76803da084b3Smrg  # exists.
76813da084b3Smrg  for d in ./-p ./--version;
76823da084b3Smrg  do
76833da084b3Smrg    test -d $d && rmdir $d
76843da084b3Smrg  done
76853da084b3Smrg  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
76863da084b3Smrg  if test -f "$ac_aux_dir/mkinstalldirs"; then
76873da084b3Smrg    mkdir_p='$(mkinstalldirs)'
76883da084b3Smrg  else
76893da084b3Smrg    mkdir_p='$(install_sh) -d'
76903da084b3Smrg  fi
76913da084b3Smrgfi
76923da084b3SmrgAC_SUBST([mkdir_p])])
76933da084b3Smrg
76943da084b3Smrg# Helper functions for option handling.                     -*- Autoconf -*-
76953da084b3Smrg
76963da084b3Smrg# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
76973da084b3Smrg#
76983da084b3Smrg# This file is free software; the Free Software Foundation
76993da084b3Smrg# gives unlimited permission to copy and/or distribute it,
77003da084b3Smrg# with or without modifications, as long as this notice is preserved.
77013da084b3Smrg
77023da084b3Smrg# serial 3
77033da084b3Smrg
77043da084b3Smrg# _AM_MANGLE_OPTION(NAME)
77053da084b3Smrg# -----------------------
77063da084b3SmrgAC_DEFUN([_AM_MANGLE_OPTION],
77073da084b3Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
77083da084b3Smrg
77093da084b3Smrg# _AM_SET_OPTION(NAME)
77103da084b3Smrg# ------------------------------
77113da084b3Smrg# Set option NAME.  Presently that only means defining a flag for this option.
77123da084b3SmrgAC_DEFUN([_AM_SET_OPTION],
77133da084b3Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
77143da084b3Smrg
77153da084b3Smrg# _AM_SET_OPTIONS(OPTIONS)
77163da084b3Smrg# ----------------------------------
77173da084b3Smrg# OPTIONS is a space-separated list of Automake options.
77183da084b3SmrgAC_DEFUN([_AM_SET_OPTIONS],
77193da084b3Smrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
77203da084b3Smrg
77213da084b3Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
77223da084b3Smrg# -------------------------------------------
77233da084b3Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
77243da084b3SmrgAC_DEFUN([_AM_IF_OPTION],
77253da084b3Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
77263da084b3Smrg
77273da084b3Smrg
77283da084b3Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
77293da084b3Smrg# Free Software Foundation, Inc.
77303da084b3Smrg#
77313da084b3Smrg# This file is free software; the Free Software Foundation
77323da084b3Smrg# gives unlimited permission to copy and/or distribute it,
77333da084b3Smrg# with or without modifications, as long as this notice is preserved.
77343da084b3Smrg
77353da084b3Smrg# serial 8
77363da084b3Smrg
77373da084b3Smrg
77383da084b3Smrg# AM_PRETTY_CMDS
77393da084b3Smrg# ------------
77403da084b3SmrgAC_DEFUN([AM_PRETTY_CMDS],
77413da084b3Smrg[AC_ARG_ENABLE(pretty-cmds,
77423da084b3Smrg[  --disable-pretty-cmds          show all commands executed
77433da084b3Smrg  --enable-pretty-cmds           do not output the entire command lines])
77443da084b3SmrgAMSHOWCMDSAT=''
77453da084b3SmrgAMDEPSHOWCMDSAT=''
77463da084b3SmrgAMPRETTYECHO=true
77473da084b3SmrgAMCMDECHO=echo
77483da084b3Smrgif test "x$enable_pretty_cmds" = xyes;
77493da084b3Smrgthen
77503da084b3Smrg  AMSHOWCMDSAT='@'
77513da084b3Smrg  _AM_IF_OPTION([no-dependencies],,test "x$enable_dependency_tracking" = xno &&) AMDEPSHOWCMDSAT='@'
77523da084b3Smrg  AMPRETTYECHO=echo
77533da084b3Smrg  AMCMDECHO=true
77543da084b3Smrg  LT_QUIET='--quiet'
77553da084b3Smrgfi
77563da084b3SmrgAC_SUBST([AMSHOWCMDSAT])
77573da084b3SmrgAC_SUBST([AMDEPSHOWCMDSAT])
77583da084b3SmrgAC_SUBST([AMPRETTYECHO])
77593da084b3SmrgAC_SUBST([AMCMDECHO])
77603da084b3SmrgAC_SUBST([LT_QUIET])
77613da084b3Smrg])
77623da084b3Smrg
77633da084b3Smrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
77643da084b3Smrg
77653da084b3Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
77663da084b3Smrg# Free Software Foundation, Inc.
77673da084b3Smrg#
77683da084b3Smrg# This file is free software; the Free Software Foundation
77693da084b3Smrg# gives unlimited permission to copy and/or distribute it,
77703da084b3Smrg# with or without modifications, as long as this notice is preserved.
77713da084b3Smrg
77723da084b3Smrg# serial 4
77733da084b3Smrg
77743da084b3Smrg# AM_SANITY_CHECK
77753da084b3Smrg# ---------------
77763da084b3SmrgAC_DEFUN([AM_SANITY_CHECK],
77773da084b3Smrg[AC_MSG_CHECKING([whether build environment is sane])
77783da084b3Smrg# Just in case
77793da084b3Smrgsleep 1
77803da084b3Smrgecho timestamp > conftest.file
77813da084b3Smrg# Do `set' in a subshell so we don't clobber the current shell's
77823da084b3Smrg# arguments.  Must try -L first in case configure is actually a
77833da084b3Smrg# symlink; some systems play weird games with the mod time of symlinks
77843da084b3Smrg# (eg FreeBSD returns the mod time of the symlink's containing
77853da084b3Smrg# directory).
77863da084b3Smrgif (
77873da084b3Smrg   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
77883da084b3Smrg   if test "$[*]" = "X"; then
77893da084b3Smrg      # -L didn't work.
77903da084b3Smrg      set X `ls -t $srcdir/configure conftest.file`
77913da084b3Smrg   fi
77923da084b3Smrg   rm -f conftest.file
77933da084b3Smrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
77943da084b3Smrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
77953da084b3Smrg
77963da084b3Smrg      # If neither matched, then we have a broken ls.  This can happen
77973da084b3Smrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
77983da084b3Smrg      # broken ls alias from the environment.  This has actually
77993da084b3Smrg      # happened.  Such a system could not be considered "sane".
78003da084b3Smrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
78013da084b3Smrgalias in your environment])
78023da084b3Smrg   fi
78033da084b3Smrg
78043da084b3Smrg   test "$[2]" = conftest.file
78053da084b3Smrg   )
78063da084b3Smrgthen
78073da084b3Smrg   # Ok.
78083da084b3Smrg   :
78093da084b3Smrgelse
78103da084b3Smrg   AC_MSG_ERROR([newly created file is older than distributed files!
78113da084b3SmrgCheck your system clock])
78123da084b3Smrgfi
78133da084b3SmrgAC_MSG_RESULT(yes)])
78143da084b3Smrg
78153da084b3Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
78163da084b3Smrg#
78173da084b3Smrg# This file is free software; the Free Software Foundation
78183da084b3Smrg# gives unlimited permission to copy and/or distribute it,
78193da084b3Smrg# with or without modifications, as long as this notice is preserved.
78203da084b3Smrg
78213da084b3Smrg# AM_PROG_INSTALL_STRIP
78223da084b3Smrg# ---------------------
78233da084b3Smrg# One issue with vendor `install' (even GNU) is that you can't
78243da084b3Smrg# specify the program used to strip binaries.  This is especially
78253da084b3Smrg# annoying in cross-compiling environments, where the build's strip
78263da084b3Smrg# is unlikely to handle the host's binaries.
78273da084b3Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we
78283da084b3Smrg# always use install-sh in `make install-strip', and initialize
78293da084b3Smrg# STRIPPROG with the value of the STRIP variable (set by the user).
78303da084b3SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
78313da084b3Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
78323da084b3Smrg# Installed binaries are usually stripped using `strip' when the user
78333da084b3Smrg# run `make install-strip'.  However `strip' might not be the right
78343da084b3Smrg# tool to use in cross-compilation environments, therefore Automake
78353da084b3Smrg# will honor the `STRIP' environment variable to overrule this program.
78363da084b3Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
78373da084b3Smrgif test "$cross_compiling" != no; then
78383da084b3Smrg  AC_CHECK_TOOL([STRIP], [strip], :)
78393da084b3Smrgfi
78403da084b3SmrgINSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
78413da084b3SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
78423da084b3Smrg
78433da084b3Smrg# Check how to create a tarball.                            -*- Autoconf -*-
78443da084b3Smrg
78453da084b3Smrg# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
78463da084b3Smrg#
78473da084b3Smrg# This file is free software; the Free Software Foundation
78483da084b3Smrg# gives unlimited permission to copy and/or distribute it,
78493da084b3Smrg# with or without modifications, as long as this notice is preserved.
78503da084b3Smrg
78513da084b3Smrg# serial 2
78523da084b3Smrg
78533da084b3Smrg# _AM_PROG_TAR(FORMAT)
78543da084b3Smrg# --------------------
78553da084b3Smrg# Check how to create a tarball in format FORMAT.
78563da084b3Smrg# FORMAT should be one of `v7', `ustar', or `pax'.
78573da084b3Smrg#
78583da084b3Smrg# Substitute a variable $(am__tar) that is a command
78593da084b3Smrg# writing to stdout a FORMAT-tarball containing the directory
78603da084b3Smrg# $tardir.
78613da084b3Smrg#     tardir=directory && $(am__tar) > result.tar
78623da084b3Smrg#
78633da084b3Smrg# Substitute a variable $(am__untar) that extract such
78643da084b3Smrg# a tarball read from stdin.
78653da084b3Smrg#     $(am__untar) < result.tar
78663da084b3SmrgAC_DEFUN([_AM_PROG_TAR],
78673da084b3Smrg[# Always define AMTAR for backward compatibility.
78683da084b3SmrgAM_MISSING_PROG([AMTAR], [tar])
78693da084b3Smrgm4_if([$1], [v7],
78703da084b3Smrg     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
78713da084b3Smrg     [m4_case([$1], [ustar],, [pax],,
78723da084b3Smrg              [m4_fatal([Unknown tar format])])
78733da084b3SmrgAC_MSG_CHECKING([how to create a $1 tar archive])
78743da084b3Smrg# Loop over all known methods to create a tar archive until one works.
78753da084b3Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
78763da084b3Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools}
78773da084b3Smrg# Do not fold the above two line into one, because Tru64 sh and
78783da084b3Smrg# Solaris sh will not grok spaces in the rhs of `-'.
78793da084b3Smrgfor _am_tool in $_am_tools
78803da084b3Smrgdo
78813da084b3Smrg  case $_am_tool in
78823da084b3Smrg  gnutar)
78833da084b3Smrg    for _am_tar in tar gnutar gtar;
78843da084b3Smrg    do
78853da084b3Smrg      AM_RUN_LOG([$_am_tar --version]) && break
78863da084b3Smrg    done
78873da084b3Smrg    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
78883da084b3Smrg    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
78893da084b3Smrg    am__untar="$_am_tar -xf -"
78903da084b3Smrg    ;;
78913da084b3Smrg  plaintar)
78923da084b3Smrg    # Must skip GNU tar: if it does not support --format= it doesn't create
78933da084b3Smrg    # ustar tarball either.
78943da084b3Smrg    (tar --version) >/dev/null 2>&1 && continue
78953da084b3Smrg    am__tar='tar chf - "$$tardir"'
78963da084b3Smrg    am__tar_='tar chf - "$tardir"'
78973da084b3Smrg    am__untar='tar xf -'
78983da084b3Smrg    ;;
78993da084b3Smrg  pax)
79003da084b3Smrg    am__tar='pax -L -x $1 -w "$$tardir"'
79013da084b3Smrg    am__tar_='pax -L -x $1 -w "$tardir"'
79023da084b3Smrg    am__untar='pax -r'
79033da084b3Smrg    ;;
79043da084b3Smrg  cpio)
79053da084b3Smrg    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
79063da084b3Smrg    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
79073da084b3Smrg    am__untar='cpio -i -H $1 -d'
79083da084b3Smrg    ;;
79093da084b3Smrg  none)
79103da084b3Smrg    am__tar=false
79113da084b3Smrg    am__tar_=false
79123da084b3Smrg    am__untar=false
79133da084b3Smrg    ;;
79143da084b3Smrg  esac
79153da084b3Smrg
79163da084b3Smrg  # If the value was cached, stop now.  We just wanted to have am__tar
79173da084b3Smrg  # and am__untar set.
79183da084b3Smrg  test -n "${am_cv_prog_tar_$1}" && break
79193da084b3Smrg
79203da084b3Smrg  # tar/untar a dummy directory, and stop if the command works
79213da084b3Smrg  rm -rf conftest.dir
79223da084b3Smrg  mkdir conftest.dir
79233da084b3Smrg  echo GrepMe > conftest.dir/file
79243da084b3Smrg  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
79253da084b3Smrg  rm -rf conftest.dir
79263da084b3Smrg  if test -s conftest.tar; then
79273da084b3Smrg    AM_RUN_LOG([$am__untar <conftest.tar])
79283da084b3Smrg    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
79293da084b3Smrg  fi
79303da084b3Smrgdone
79313da084b3Smrgrm -rf conftest.dir
79323da084b3Smrg
79333da084b3SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
79343da084b3SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])])
79353da084b3SmrgAC_SUBST([am__tar])
79363da084b3SmrgAC_SUBST([am__untar])
79373da084b3Smrg]) # _AM_PROG_TAR
79383da084b3Smrg
7939