aclocal.m4 revision 047944f3
1047944f3Smrg# generated automatically by aclocal 1.10.1 -*- Autoconf -*-
27706df26Smrg
37706df26Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4047944f3Smrg# 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
57706df26Smrg# This file is free software; the Free Software Foundation
67706df26Smrg# gives unlimited permission to copy and/or distribute it,
77706df26Smrg# with or without modifications, as long as this notice is preserved.
87706df26Smrg
97706df26Smrg# This program is distributed in the hope that it will be useful,
107706df26Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
117706df26Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
127706df26Smrg# PARTICULAR PURPOSE.
137706df26Smrg
14047944f3Smrgm4_ifndef([AC_AUTOCONF_VERSION],
15047944f3Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16047944f3Smrgm4_if(AC_AUTOCONF_VERSION, [2.62],,
17047944f3Smrg[m4_warning([this file was generated for autoconf 2.62.
18047944f3SmrgYou have another version of autoconf.  It may work, but is not guaranteed to.
19047944f3SmrgIf you have problems, you may need to regenerate the build system entirely.
20047944f3SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])])
21047944f3Smrg
227706df26Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
237706df26Smrg
24047944f3Smrg# serial 52 AC_PROG_LIBTOOL
257706df26Smrg
267706df26Smrg
277706df26Smrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
287706df26Smrg# -----------------------------------------------------------
297706df26Smrg# If this macro is not defined by Autoconf, define it here.
307706df26Smrgm4_ifdef([AC_PROVIDE_IFELSE],
317706df26Smrg         [],
327706df26Smrg         [m4_define([AC_PROVIDE_IFELSE],
337706df26Smrg	         [m4_ifdef([AC_PROVIDE_$1],
347706df26Smrg		           [$2], [$3])])])
357706df26Smrg
367706df26Smrg
377706df26Smrg# AC_PROG_LIBTOOL
387706df26Smrg# ---------------
397706df26SmrgAC_DEFUN([AC_PROG_LIBTOOL],
407706df26Smrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
417706df26Smrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
427706df26Smrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
437706df26Smrg  AC_PROVIDE_IFELSE([AC_PROG_CXX],
447706df26Smrg    [AC_LIBTOOL_CXX],
457706df26Smrg    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
467706df26Smrg  ])])
477706df26Smrgdnl And a similar setup for Fortran 77 support
487706df26Smrg  AC_PROVIDE_IFELSE([AC_PROG_F77],
497706df26Smrg    [AC_LIBTOOL_F77],
507706df26Smrg    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
517706df26Smrg])])
527706df26Smrg
537706df26Smrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
547706df26Smrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
557706df26Smrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
567706df26Smrg  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
577706df26Smrg    [AC_LIBTOOL_GCJ],
587706df26Smrg    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
597706df26Smrg      [AC_LIBTOOL_GCJ],
607706df26Smrg      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
617706df26Smrg	[AC_LIBTOOL_GCJ],
627706df26Smrg      [ifdef([AC_PROG_GCJ],
637706df26Smrg	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
647706df26Smrg       ifdef([A][M_PROG_GCJ],
657706df26Smrg	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
667706df26Smrg       ifdef([LT_AC_PROG_GCJ],
677706df26Smrg	     [define([LT_AC_PROG_GCJ],
687706df26Smrg		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
697706df26Smrg])])# AC_PROG_LIBTOOL
707706df26Smrg
717706df26Smrg
727706df26Smrg# _AC_PROG_LIBTOOL
737706df26Smrg# ----------------
747706df26SmrgAC_DEFUN([_AC_PROG_LIBTOOL],
757706df26Smrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
767706df26SmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
777706df26SmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
787706df26SmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
797706df26Smrg
807706df26Smrg# This can be used to rebuild libtool when needed
817706df26SmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
827706df26Smrg
837706df26Smrg# Always use our own libtool.
847706df26SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
857706df26SmrgAC_SUBST(LIBTOOL)dnl
867706df26Smrg
877706df26Smrg# Prevent multiple expansion
887706df26Smrgdefine([AC_PROG_LIBTOOL], [])
897706df26Smrg])# _AC_PROG_LIBTOOL
907706df26Smrg
917706df26Smrg
927706df26Smrg# AC_LIBTOOL_SETUP
937706df26Smrg# ----------------
947706df26SmrgAC_DEFUN([AC_LIBTOOL_SETUP],
957706df26Smrg[AC_PREREQ(2.50)dnl
967706df26SmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl
977706df26SmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl
987706df26SmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
997706df26SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
1007706df26SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
1017706df26SmrgAC_REQUIRE([AC_PROG_CC])dnl
1027706df26SmrgAC_REQUIRE([AC_PROG_LD])dnl
1037706df26SmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
1047706df26SmrgAC_REQUIRE([AC_PROG_NM])dnl
1057706df26Smrg
1067706df26SmrgAC_REQUIRE([AC_PROG_LN_S])dnl
1077706df26SmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
1087706df26Smrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
1097706df26SmrgAC_REQUIRE([AC_OBJEXT])dnl
1107706df26SmrgAC_REQUIRE([AC_EXEEXT])dnl
1117706df26Smrgdnl
1127706df26SmrgAC_LIBTOOL_SYS_MAX_CMD_LEN
1137706df26SmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1147706df26SmrgAC_LIBTOOL_OBJDIR
1157706df26Smrg
1167706df26SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1177706df26Smrg_LT_AC_PROG_ECHO_BACKSLASH
1187706df26Smrg
1197706df26Smrgcase $host_os in
1207706df26Smrgaix3*)
1217706df26Smrg  # AIX sometimes has problems with the GCC collect2 program.  For some
1227706df26Smrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
1237706df26Smrg  # vanish in a puff of smoke.
1247706df26Smrg  if test "X${COLLECT_NAMES+set}" != Xset; then
1257706df26Smrg    COLLECT_NAMES=
1267706df26Smrg    export COLLECT_NAMES
1277706df26Smrg  fi
1287706df26Smrg  ;;
1297706df26Smrgesac
1307706df26Smrg
1317706df26Smrg# Sed substitution that helps us do robust quoting.  It backslashifies
1327706df26Smrg# metacharacters that are still active within double-quoted strings.
1337706df26SmrgXsed='sed -e 1s/^X//'
1347706df26Smrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
1357706df26Smrg
1367706df26Smrg# Same as above, but do not quote variable references.
1377706df26Smrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
1387706df26Smrg
1397706df26Smrg# Sed substitution to delay expansion of an escaped shell variable in a
1407706df26Smrg# double_quote_subst'ed string.
1417706df26Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1427706df26Smrg
1437706df26Smrg# Sed substitution to avoid accidental globbing in evaled expressions
1447706df26Smrgno_glob_subst='s/\*/\\\*/g'
1457706df26Smrg
1467706df26Smrg# Constants:
1477706df26Smrgrm="rm -f"
1487706df26Smrg
1497706df26Smrg# Global variables:
1507706df26Smrgdefault_ofile=libtool
1517706df26Smrgcan_build_shared=yes
1527706df26Smrg
1537706df26Smrg# All known linkers require a `.a' archive for static linking (except MSVC,
1547706df26Smrg# which needs '.lib').
1557706df26Smrglibext=a
1567706df26Smrgltmain="$ac_aux_dir/ltmain.sh"
1577706df26Smrgofile="$default_ofile"
1587706df26Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld"
1597706df26Smrg
1607706df26SmrgAC_CHECK_TOOL(AR, ar, false)
1617706df26SmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
1627706df26SmrgAC_CHECK_TOOL(STRIP, strip, :)
1637706df26Smrg
1647706df26Smrgold_CC="$CC"
1657706df26Smrgold_CFLAGS="$CFLAGS"
1667706df26Smrg
1677706df26Smrg# Set sane defaults for various variables
1687706df26Smrgtest -z "$AR" && AR=ar
1697706df26Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru
1707706df26Smrgtest -z "$AS" && AS=as
1717706df26Smrgtest -z "$CC" && CC=cc
1727706df26Smrgtest -z "$LTCC" && LTCC=$CC
1737706df26Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1747706df26Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
1757706df26Smrgtest -z "$LD" && LD=ld
1767706df26Smrgtest -z "$LN_S" && LN_S="ln -s"
1777706df26Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
1787706df26Smrgtest -z "$NM" && NM=nm
1797706df26Smrgtest -z "$SED" && SED=sed
1807706df26Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump
1817706df26Smrgtest -z "$RANLIB" && RANLIB=:
1827706df26Smrgtest -z "$STRIP" && STRIP=:
1837706df26Smrgtest -z "$ac_objext" && ac_objext=o
1847706df26Smrg
1857706df26Smrg# Determine commands to create old-style static archives.
186047944f3Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1877706df26Smrgold_postinstall_cmds='chmod 644 $oldlib'
1887706df26Smrgold_postuninstall_cmds=
1897706df26Smrg
1907706df26Smrgif test -n "$RANLIB"; then
1917706df26Smrg  case $host_os in
1927706df26Smrg  openbsd*)
1937706df26Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1947706df26Smrg    ;;
1957706df26Smrg  *)
1967706df26Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1977706df26Smrg    ;;
1987706df26Smrg  esac
1997706df26Smrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
2007706df26Smrgfi
2017706df26Smrg
2027706df26Smrg_LT_CC_BASENAME([$compiler])
2037706df26Smrg
2047706df26Smrg# Only perform the check for file, if the check method requires it
2057706df26Smrgcase $deplibs_check_method in
2067706df26Smrgfile_magic*)
2077706df26Smrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
2087706df26Smrg    AC_PATH_MAGIC
2097706df26Smrg  fi
2107706df26Smrg  ;;
2117706df26Smrgesac
2127706df26Smrg
213047944f3Smrg_LT_REQUIRED_DARWIN_CHECKS
214047944f3Smrg
2157706df26SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
2167706df26SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
2177706df26Smrgenable_win32_dll=yes, enable_win32_dll=no)
2187706df26Smrg
2197706df26SmrgAC_ARG_ENABLE([libtool-lock],
2207706df26Smrg    [AC_HELP_STRING([--disable-libtool-lock],
2217706df26Smrg	[avoid locking (might break parallel builds)])])
2227706df26Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2237706df26Smrg
2247706df26SmrgAC_ARG_WITH([pic],
2257706df26Smrg    [AC_HELP_STRING([--with-pic],
2267706df26Smrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
2277706df26Smrg    [pic_mode="$withval"],
2287706df26Smrg    [pic_mode=default])
2297706df26Smrgtest -z "$pic_mode" && pic_mode=default
2307706df26Smrg
2317706df26Smrg# Use C for the default configuration in the libtool script
2327706df26Smrgtagname=
2337706df26SmrgAC_LIBTOOL_LANG_C_CONFIG
2347706df26Smrg_LT_AC_TAGCONFIG
2357706df26Smrg])# AC_LIBTOOL_SETUP
2367706df26Smrg
2377706df26Smrg
2387706df26Smrg# _LT_AC_SYS_COMPILER
2397706df26Smrg# -------------------
2407706df26SmrgAC_DEFUN([_LT_AC_SYS_COMPILER],
2417706df26Smrg[AC_REQUIRE([AC_PROG_CC])dnl
2427706df26Smrg
2437706df26Smrg# If no C compiler was specified, use CC.
2447706df26SmrgLTCC=${LTCC-"$CC"}
2457706df26Smrg
2467706df26Smrg# If no C compiler flags were specified, use CFLAGS.
2477706df26SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
2487706df26Smrg
2497706df26Smrg# Allow CC to be a program name with arguments.
2507706df26Smrgcompiler=$CC
2517706df26Smrg])# _LT_AC_SYS_COMPILER
2527706df26Smrg
2537706df26Smrg
2547706df26Smrg# _LT_CC_BASENAME(CC)
2557706df26Smrg# -------------------
2567706df26Smrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
2577706df26SmrgAC_DEFUN([_LT_CC_BASENAME],
2587706df26Smrg[for cc_temp in $1""; do
2597706df26Smrg  case $cc_temp in
2607706df26Smrg    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
2617706df26Smrg    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
2627706df26Smrg    \-*) ;;
2637706df26Smrg    *) break;;
2647706df26Smrg  esac
2657706df26Smrgdone
2667706df26Smrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
2677706df26Smrg])
2687706df26Smrg
2697706df26Smrg
2707706df26Smrg# _LT_COMPILER_BOILERPLATE
2717706df26Smrg# ------------------------
2727706df26Smrg# Check for compiler boilerplate output or warnings with
2737706df26Smrg# the simple compiler test code.
2747706df26SmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE],
275047944f3Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
276047944f3Smrgac_outfile=conftest.$ac_objext
277047944f3Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
2787706df26Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2797706df26Smrg_lt_compiler_boilerplate=`cat conftest.err`
2807706df26Smrg$rm conftest*
2817706df26Smrg])# _LT_COMPILER_BOILERPLATE
2827706df26Smrg
2837706df26Smrg
2847706df26Smrg# _LT_LINKER_BOILERPLATE
2857706df26Smrg# ----------------------
2867706df26Smrg# Check for linker boilerplate output or warnings with
2877706df26Smrg# the simple link test code.
2887706df26SmrgAC_DEFUN([_LT_LINKER_BOILERPLATE],
289047944f3Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
290047944f3Smrgac_outfile=conftest.$ac_objext
291047944f3Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
2927706df26Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2937706df26Smrg_lt_linker_boilerplate=`cat conftest.err`
294047944f3Smrg$rm -r conftest*
2957706df26Smrg])# _LT_LINKER_BOILERPLATE
2967706df26Smrg
297047944f3Smrg# _LT_REQUIRED_DARWIN_CHECKS
298047944f3Smrg# --------------------------
299047944f3Smrg# Check for some things on darwin
300047944f3SmrgAC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[
301047944f3Smrg  case $host_os in
302047944f3Smrg    rhapsody* | darwin*)
303047944f3Smrg    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
304047944f3Smrg    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
305047944f3Smrg
306047944f3Smrg    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
307047944f3Smrg      [lt_cv_apple_cc_single_mod=no
308047944f3Smrg      if test -z "${LT_MULTI_MODULE}"; then
309047944f3Smrg   # By default we will add the -single_module flag. You can override
310047944f3Smrg   # by either setting the environment variable LT_MULTI_MODULE
311047944f3Smrg   # non-empty at configure time, or by adding -multi_module to the
312047944f3Smrg   # link flags.
313047944f3Smrg   echo "int foo(void){return 1;}" > conftest.c
314047944f3Smrg   $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
315047944f3Smrg     -dynamiclib ${wl}-single_module conftest.c
316047944f3Smrg   if test -f libconftest.dylib; then
317047944f3Smrg     lt_cv_apple_cc_single_mod=yes
318047944f3Smrg     rm -rf libconftest.dylib*
319047944f3Smrg   fi
320047944f3Smrg   rm conftest.c
321047944f3Smrg      fi])
322047944f3Smrg    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
323047944f3Smrg      [lt_cv_ld_exported_symbols_list],
324047944f3Smrg      [lt_cv_ld_exported_symbols_list=no
325047944f3Smrg      save_LDFLAGS=$LDFLAGS
326047944f3Smrg      echo "_main" > conftest.sym
327047944f3Smrg      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
328047944f3Smrg      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
329047944f3Smrg   [lt_cv_ld_exported_symbols_list=yes],
330047944f3Smrg   [lt_cv_ld_exported_symbols_list=no])
331047944f3Smrg   LDFLAGS="$save_LDFLAGS"
332047944f3Smrg    ])
333047944f3Smrg    case $host_os in
334047944f3Smrg    rhapsody* | darwin1.[[0123]])
335047944f3Smrg      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
336047944f3Smrg    darwin1.*)
337047944f3Smrg     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
338047944f3Smrg    darwin*)
339047944f3Smrg      # if running on 10.5 or later, the deployment target defaults
340047944f3Smrg      # to the OS version, if on x86, and 10.4, the deployment
341047944f3Smrg      # target defaults to 10.4. Don't you love it?
342047944f3Smrg      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
343047944f3Smrg   10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
344047944f3Smrg     _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
345047944f3Smrg   10.[[012]]*)
346047944f3Smrg     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
347047944f3Smrg   10.*)
348047944f3Smrg     _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
349047944f3Smrg      esac
350047944f3Smrg    ;;
351047944f3Smrg  esac
352047944f3Smrg    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
353047944f3Smrg      _lt_dar_single_mod='$single_module'
354047944f3Smrg    fi
355047944f3Smrg    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
356047944f3Smrg      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
357047944f3Smrg    else
358047944f3Smrg      _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}"
359047944f3Smrg    fi
360047944f3Smrg    if test "$DSYMUTIL" != ":"; then
361047944f3Smrg      _lt_dsymutil="~$DSYMUTIL \$lib || :"
362047944f3Smrg    else
363047944f3Smrg      _lt_dsymutil=
364047944f3Smrg    fi
365047944f3Smrg    ;;
366047944f3Smrg  esac
367047944f3Smrg])
3687706df26Smrg
3697706df26Smrg# _LT_AC_SYS_LIBPATH_AIX
3707706df26Smrg# ----------------------
3717706df26Smrg# Links a minimal program and checks the executable
3727706df26Smrg# for the system default hardcoded library path. In most cases,
3737706df26Smrg# this is /usr/lib:/lib, but when the MPI compilers are used
3747706df26Smrg# the location of the communication and MPI libs are included too.
3757706df26Smrg# If we don't find anything, use the default library path according
3767706df26Smrg# to the aix ld manual.
3777706df26SmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
378047944f3Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
379047944f3SmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[
380047944f3Smrglt_aix_libpath_sed='
381047944f3Smrg    /Import File Strings/,/^$/ {
382047944f3Smrg	/^0/ {
383047944f3Smrg	    s/^0  *\(.*\)$/\1/
384047944f3Smrg	    p
385047944f3Smrg	}
386047944f3Smrg    }'
387047944f3Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
3887706df26Smrg# Check for a 64-bit object if we didn't find anything.
389047944f3Smrgif test -z "$aix_libpath"; then
390047944f3Smrg  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
391047944f3Smrgfi],[])
3927706df26Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
3937706df26Smrg])# _LT_AC_SYS_LIBPATH_AIX
3947706df26Smrg
3957706df26Smrg
3967706df26Smrg# _LT_AC_SHELL_INIT(ARG)
3977706df26Smrg# ----------------------
3987706df26SmrgAC_DEFUN([_LT_AC_SHELL_INIT],
3997706df26Smrg[ifdef([AC_DIVERSION_NOTICE],
4007706df26Smrg	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
4017706df26Smrg	 [AC_DIVERT_PUSH(NOTICE)])
4027706df26Smrg$1
4037706df26SmrgAC_DIVERT_POP
4047706df26Smrg])# _LT_AC_SHELL_INIT
4057706df26Smrg
4067706df26Smrg
4077706df26Smrg# _LT_AC_PROG_ECHO_BACKSLASH
4087706df26Smrg# --------------------------
4097706df26Smrg# Add some code to the start of the generated configure script which
4107706df26Smrg# will find an echo command which doesn't interpret backslashes.
4117706df26SmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
4127706df26Smrg[_LT_AC_SHELL_INIT([
4137706df26Smrg# Check that we are running under the correct shell.
4147706df26SmrgSHELL=${CONFIG_SHELL-/bin/sh}
4157706df26Smrg
4167706df26Smrgcase X$ECHO in
4177706df26SmrgX*--fallback-echo)
4187706df26Smrg  # Remove one level of quotation (which was required for Make).
4197706df26Smrg  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
4207706df26Smrg  ;;
4217706df26Smrgesac
4227706df26Smrg
4237706df26Smrgecho=${ECHO-echo}
4247706df26Smrgif test "X[$]1" = X--no-reexec; then
4257706df26Smrg  # Discard the --no-reexec flag, and continue.
4267706df26Smrg  shift
4277706df26Smrgelif test "X[$]1" = X--fallback-echo; then
4287706df26Smrg  # Avoid inline document here, it may be left over
4297706df26Smrg  :
4307706df26Smrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
4317706df26Smrg  # Yippee, $echo works!
4327706df26Smrg  :
4337706df26Smrgelse
4347706df26Smrg  # Restart under the correct shell.
4357706df26Smrg  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
4367706df26Smrgfi
4377706df26Smrg
4387706df26Smrgif test "X[$]1" = X--fallback-echo; then
4397706df26Smrg  # used as fallback echo
4407706df26Smrg  shift
4417706df26Smrg  cat <<EOF
4427706df26Smrg[$]*
4437706df26SmrgEOF
4447706df26Smrg  exit 0
4457706df26Smrgfi
4467706df26Smrg
4477706df26Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
4487706df26Smrg# if CDPATH is set.
4497706df26Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
4507706df26Smrg
4517706df26Smrgif test -z "$ECHO"; then
4527706df26Smrgif test "X${echo_test_string+set}" != Xset; then
4537706df26Smrg# find a string as large as possible, as long as the shell can cope with it
4547706df26Smrg  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
4557706df26Smrg    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
4567706df26Smrg    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
4577706df26Smrg       echo_test_string=`eval $cmd` &&
4587706df26Smrg       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
4597706df26Smrg    then
4607706df26Smrg      break
4617706df26Smrg    fi
4627706df26Smrg  done
4637706df26Smrgfi
4647706df26Smrg
4657706df26Smrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
4667706df26Smrg   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
4677706df26Smrg   test "X$echo_testing_string" = "X$echo_test_string"; then
4687706df26Smrg  :
4697706df26Smrgelse
4707706df26Smrg  # The Solaris, AIX, and Digital Unix default echo programs unquote
4717706df26Smrg  # backslashes.  This makes it impossible to quote backslashes using
4727706df26Smrg  #   echo "$something" | sed 's/\\/\\\\/g'
4737706df26Smrg  #
4747706df26Smrg  # So, first we look for a working echo in the user's PATH.
4757706df26Smrg
4767706df26Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4777706df26Smrg  for dir in $PATH /usr/ucb; do
4787706df26Smrg    IFS="$lt_save_ifs"
4797706df26Smrg    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
4807706df26Smrg       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
4817706df26Smrg       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
4827706df26Smrg       test "X$echo_testing_string" = "X$echo_test_string"; then
4837706df26Smrg      echo="$dir/echo"
4847706df26Smrg      break
4857706df26Smrg    fi
4867706df26Smrg  done
4877706df26Smrg  IFS="$lt_save_ifs"
4887706df26Smrg
4897706df26Smrg  if test "X$echo" = Xecho; then
4907706df26Smrg    # We didn't find a better echo, so look for alternatives.
4917706df26Smrg    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
4927706df26Smrg       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
4937706df26Smrg       test "X$echo_testing_string" = "X$echo_test_string"; then
4947706df26Smrg      # This shell has a builtin print -r that does the trick.
4957706df26Smrg      echo='print -r'
4967706df26Smrg    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
4977706df26Smrg	 test "X$CONFIG_SHELL" != X/bin/ksh; then
4987706df26Smrg      # If we have ksh, try running configure again with it.
4997706df26Smrg      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
5007706df26Smrg      export ORIGINAL_CONFIG_SHELL
5017706df26Smrg      CONFIG_SHELL=/bin/ksh
5027706df26Smrg      export CONFIG_SHELL
5037706df26Smrg      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
5047706df26Smrg    else
5057706df26Smrg      # Try using printf.
5067706df26Smrg      echo='printf %s\n'
5077706df26Smrg      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
5087706df26Smrg	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
5097706df26Smrg	 test "X$echo_testing_string" = "X$echo_test_string"; then
5107706df26Smrg	# Cool, printf works
5117706df26Smrg	:
5127706df26Smrg      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
5137706df26Smrg	   test "X$echo_testing_string" = 'X\t' &&
5147706df26Smrg	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
5157706df26Smrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
5167706df26Smrg	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
5177706df26Smrg	export CONFIG_SHELL
5187706df26Smrg	SHELL="$CONFIG_SHELL"
5197706df26Smrg	export SHELL
5207706df26Smrg	echo="$CONFIG_SHELL [$]0 --fallback-echo"
5217706df26Smrg      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
5227706df26Smrg	   test "X$echo_testing_string" = 'X\t' &&
5237706df26Smrg	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
5247706df26Smrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
5257706df26Smrg	echo="$CONFIG_SHELL [$]0 --fallback-echo"
5267706df26Smrg      else
5277706df26Smrg	# maybe with a smaller string...
5287706df26Smrg	prev=:
5297706df26Smrg
5307706df26Smrg	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
5317706df26Smrg	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
5327706df26Smrg	  then
5337706df26Smrg	    break
5347706df26Smrg	  fi
5357706df26Smrg	  prev="$cmd"
5367706df26Smrg	done
5377706df26Smrg
5387706df26Smrg	if test "$prev" != 'sed 50q "[$]0"'; then
5397706df26Smrg	  echo_test_string=`eval $prev`
5407706df26Smrg	  export echo_test_string
5417706df26Smrg	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
5427706df26Smrg	else
5437706df26Smrg	  # Oops.  We lost completely, so just stick with echo.
5447706df26Smrg	  echo=echo
5457706df26Smrg	fi
5467706df26Smrg      fi
5477706df26Smrg    fi
5487706df26Smrg  fi
5497706df26Smrgfi
5507706df26Smrgfi
5517706df26Smrg
5527706df26Smrg# Copy echo and quote the copy suitably for passing to libtool from
5537706df26Smrg# the Makefile, instead of quoting the original, which is used later.
5547706df26SmrgECHO=$echo
5557706df26Smrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
5567706df26Smrg   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
5577706df26Smrgfi
5587706df26Smrg
5597706df26SmrgAC_SUBST(ECHO)
5607706df26Smrg])])# _LT_AC_PROG_ECHO_BACKSLASH
5617706df26Smrg
5627706df26Smrg
5637706df26Smrg# _LT_AC_LOCK
5647706df26Smrg# -----------
5657706df26SmrgAC_DEFUN([_LT_AC_LOCK],
5667706df26Smrg[AC_ARG_ENABLE([libtool-lock],
5677706df26Smrg    [AC_HELP_STRING([--disable-libtool-lock],
5687706df26Smrg	[avoid locking (might break parallel builds)])])
5697706df26Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
5707706df26Smrg
5717706df26Smrg# Some flags need to be propagated to the compiler or linker for good
5727706df26Smrg# libtool support.
5737706df26Smrgcase $host in
5747706df26Smrgia64-*-hpux*)
5757706df26Smrg  # Find out which ABI we are using.
5767706df26Smrg  echo 'int i;' > conftest.$ac_ext
5777706df26Smrg  if AC_TRY_EVAL(ac_compile); then
5787706df26Smrg    case `/usr/bin/file conftest.$ac_objext` in
5797706df26Smrg    *ELF-32*)
5807706df26Smrg      HPUX_IA64_MODE="32"
5817706df26Smrg      ;;
5827706df26Smrg    *ELF-64*)
5837706df26Smrg      HPUX_IA64_MODE="64"
5847706df26Smrg      ;;
5857706df26Smrg    esac
5867706df26Smrg  fi
5877706df26Smrg  rm -rf conftest*
5887706df26Smrg  ;;
5897706df26Smrg*-*-irix6*)
5907706df26Smrg  # Find out which ABI we are using.
5917706df26Smrg  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
5927706df26Smrg  if AC_TRY_EVAL(ac_compile); then
5937706df26Smrg   if test "$lt_cv_prog_gnu_ld" = yes; then
5947706df26Smrg    case `/usr/bin/file conftest.$ac_objext` in
5957706df26Smrg    *32-bit*)
5967706df26Smrg      LD="${LD-ld} -melf32bsmip"
5977706df26Smrg      ;;
5987706df26Smrg    *N32*)
5997706df26Smrg      LD="${LD-ld} -melf32bmipn32"
6007706df26Smrg      ;;
6017706df26Smrg    *64-bit*)
6027706df26Smrg      LD="${LD-ld} -melf64bmip"
6037706df26Smrg      ;;
6047706df26Smrg    esac
6057706df26Smrg   else
6067706df26Smrg    case `/usr/bin/file conftest.$ac_objext` in
6077706df26Smrg    *32-bit*)
6087706df26Smrg      LD="${LD-ld} -32"
6097706df26Smrg      ;;
6107706df26Smrg    *N32*)
6117706df26Smrg      LD="${LD-ld} -n32"
6127706df26Smrg      ;;
6137706df26Smrg    *64-bit*)
6147706df26Smrg      LD="${LD-ld} -64"
6157706df26Smrg      ;;
6167706df26Smrg    esac
6177706df26Smrg   fi
6187706df26Smrg  fi
6197706df26Smrg  rm -rf conftest*
6207706df26Smrg  ;;
6217706df26Smrg
622047944f3Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
623047944f3Smrgs390*-*linux*|sparc*-*linux*)
6247706df26Smrg  # Find out which ABI we are using.
6257706df26Smrg  echo 'int i;' > conftest.$ac_ext
6267706df26Smrg  if AC_TRY_EVAL(ac_compile); then
6277706df26Smrg    case `/usr/bin/file conftest.o` in
6287706df26Smrg    *32-bit*)
6297706df26Smrg      case $host in
630047944f3Smrg        x86_64-*kfreebsd*-gnu)
631047944f3Smrg          LD="${LD-ld} -m elf_i386_fbsd"
632047944f3Smrg          ;;
6337706df26Smrg        x86_64-*linux*)
6347706df26Smrg          LD="${LD-ld} -m elf_i386"
6357706df26Smrg          ;;
6367706df26Smrg        ppc64-*linux*|powerpc64-*linux*)
6377706df26Smrg          LD="${LD-ld} -m elf32ppclinux"
6387706df26Smrg          ;;
6397706df26Smrg        s390x-*linux*)
6407706df26Smrg          LD="${LD-ld} -m elf_s390"
6417706df26Smrg          ;;
6427706df26Smrg        sparc64-*linux*)
6437706df26Smrg          LD="${LD-ld} -m elf32_sparc"
6447706df26Smrg          ;;
6457706df26Smrg      esac
6467706df26Smrg      ;;
6477706df26Smrg    *64-bit*)
648047944f3Smrg      libsuff=64
6497706df26Smrg      case $host in
650047944f3Smrg        x86_64-*kfreebsd*-gnu)
651047944f3Smrg          LD="${LD-ld} -m elf_x86_64_fbsd"
652047944f3Smrg          ;;
6537706df26Smrg        x86_64-*linux*)
6547706df26Smrg          LD="${LD-ld} -m elf_x86_64"
6557706df26Smrg          ;;
6567706df26Smrg        ppc*-*linux*|powerpc*-*linux*)
6577706df26Smrg          LD="${LD-ld} -m elf64ppc"
6587706df26Smrg          ;;
6597706df26Smrg        s390*-*linux*)
6607706df26Smrg          LD="${LD-ld} -m elf64_s390"
6617706df26Smrg          ;;
6627706df26Smrg        sparc*-*linux*)
6637706df26Smrg          LD="${LD-ld} -m elf64_sparc"
6647706df26Smrg          ;;
6657706df26Smrg      esac
6667706df26Smrg      ;;
6677706df26Smrg    esac
6687706df26Smrg  fi
6697706df26Smrg  rm -rf conftest*
6707706df26Smrg  ;;
6717706df26Smrg
6727706df26Smrg*-*-sco3.2v5*)
6737706df26Smrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
6747706df26Smrg  SAVE_CFLAGS="$CFLAGS"
6757706df26Smrg  CFLAGS="$CFLAGS -belf"
6767706df26Smrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
6777706df26Smrg    [AC_LANG_PUSH(C)
6787706df26Smrg     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
6797706df26Smrg     AC_LANG_POP])
6807706df26Smrg  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
6817706df26Smrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
6827706df26Smrg    CFLAGS="$SAVE_CFLAGS"
6837706df26Smrg  fi
6847706df26Smrg  ;;
6857706df26Smrgsparc*-*solaris*)
6867706df26Smrg  # Find out which ABI we are using.
6877706df26Smrg  echo 'int i;' > conftest.$ac_ext
6887706df26Smrg  if AC_TRY_EVAL(ac_compile); then
6897706df26Smrg    case `/usr/bin/file conftest.o` in
6907706df26Smrg    *64-bit*)
6917706df26Smrg      case $lt_cv_prog_gnu_ld in
6927706df26Smrg      yes*) LD="${LD-ld} -m elf64_sparc" ;;
693047944f3Smrg      *)
694047944f3Smrg        if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
695047944f3Smrg	  LD="${LD-ld} -64"
696047944f3Smrg	fi
697047944f3Smrg	;;
6987706df26Smrg      esac
6997706df26Smrg      ;;
7007706df26Smrg    esac
7017706df26Smrg  fi
7027706df26Smrg  rm -rf conftest*
7037706df26Smrg  ;;
7047706df26Smrg
7057706df26SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
7067706df26Smrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
7077706df26Smrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
7087706df26Smrg  AC_CHECK_TOOL(AS, as, false)
7097706df26Smrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
7107706df26Smrg  ;;
7117706df26Smrg  ])
7127706df26Smrgesac
7137706df26Smrg
7147706df26Smrgneed_locks="$enable_libtool_lock"
7157706df26Smrg
7167706df26Smrg])# _LT_AC_LOCK
7177706df26Smrg
7187706df26Smrg
7197706df26Smrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
7207706df26Smrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
7217706df26Smrg# ----------------------------------------------------------------
7227706df26Smrg# Check whether the given compiler option works
7237706df26SmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
7247706df26Smrg[AC_REQUIRE([LT_AC_PROG_SED])
7257706df26SmrgAC_CACHE_CHECK([$1], [$2],
7267706df26Smrg  [$2=no
7277706df26Smrg  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
728047944f3Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
7297706df26Smrg   lt_compiler_flag="$3"
7307706df26Smrg   # Insert the option either (1) after the last *FLAGS variable, or
7317706df26Smrg   # (2) before a word containing "conftest.", or (3) at the end.
7327706df26Smrg   # Note that $ac_compile itself does not contain backslashes and begins
7337706df26Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
7347706df26Smrg   # The option is referenced via a variable to avoid confusing sed.
7357706df26Smrg   lt_compile=`echo "$ac_compile" | $SED \
7367706df26Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7377706df26Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
7387706df26Smrg   -e 's:$: $lt_compiler_flag:'`
7397706df26Smrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
7407706df26Smrg   (eval "$lt_compile" 2>conftest.err)
7417706df26Smrg   ac_status=$?
7427706df26Smrg   cat conftest.err >&AS_MESSAGE_LOG_FD
7437706df26Smrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
7447706df26Smrg   if (exit $ac_status) && test -s "$ac_outfile"; then
7457706df26Smrg     # The compiler can only warn and ignore the option if not recognized
7467706df26Smrg     # So say no if there are warnings other than the usual output.
7477706df26Smrg     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
7487706df26Smrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
7497706df26Smrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
7507706df26Smrg       $2=yes
7517706df26Smrg     fi
7527706df26Smrg   fi
7537706df26Smrg   $rm conftest*
7547706df26Smrg])
7557706df26Smrg
7567706df26Smrgif test x"[$]$2" = xyes; then
7577706df26Smrg    ifelse([$5], , :, [$5])
7587706df26Smrgelse
7597706df26Smrg    ifelse([$6], , :, [$6])
7607706df26Smrgfi
7617706df26Smrg])# AC_LIBTOOL_COMPILER_OPTION
7627706df26Smrg
7637706df26Smrg
7647706df26Smrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
7657706df26Smrg#                          [ACTION-SUCCESS], [ACTION-FAILURE])
7667706df26Smrg# ------------------------------------------------------------
7677706df26Smrg# Check whether the given compiler option works
7687706df26SmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
769047944f3Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
770047944f3SmrgAC_CACHE_CHECK([$1], [$2],
7717706df26Smrg  [$2=no
7727706df26Smrg   save_LDFLAGS="$LDFLAGS"
7737706df26Smrg   LDFLAGS="$LDFLAGS $3"
774047944f3Smrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
7757706df26Smrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
7767706df26Smrg     # The linker can only warn and ignore the option if not recognized
7777706df26Smrg     # So say no if there are warnings
7787706df26Smrg     if test -s conftest.err; then
7797706df26Smrg       # Append any errors to the config.log.
7807706df26Smrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
7817706df26Smrg       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
7827706df26Smrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
7837706df26Smrg       if diff conftest.exp conftest.er2 >/dev/null; then
7847706df26Smrg         $2=yes
7857706df26Smrg       fi
7867706df26Smrg     else
7877706df26Smrg       $2=yes
7887706df26Smrg     fi
7897706df26Smrg   fi
790047944f3Smrg   $rm -r conftest*
7917706df26Smrg   LDFLAGS="$save_LDFLAGS"
7927706df26Smrg])
7937706df26Smrg
7947706df26Smrgif test x"[$]$2" = xyes; then
7957706df26Smrg    ifelse([$4], , :, [$4])
7967706df26Smrgelse
7977706df26Smrg    ifelse([$5], , :, [$5])
7987706df26Smrgfi
7997706df26Smrg])# AC_LIBTOOL_LINKER_OPTION
8007706df26Smrg
8017706df26Smrg
8027706df26Smrg# AC_LIBTOOL_SYS_MAX_CMD_LEN
8037706df26Smrg# --------------------------
8047706df26SmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
8057706df26Smrg[# find the maximum length of command line arguments
8067706df26SmrgAC_MSG_CHECKING([the maximum length of command line arguments])
8077706df26SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
8087706df26Smrg  i=0
8097706df26Smrg  teststring="ABCD"
8107706df26Smrg
8117706df26Smrg  case $build_os in
8127706df26Smrg  msdosdjgpp*)
8137706df26Smrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
8147706df26Smrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
8157706df26Smrg    # during glob expansion).  Even if it were fixed, the result of this
8167706df26Smrg    # check would be larger than it should be.
8177706df26Smrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
8187706df26Smrg    ;;
8197706df26Smrg
8207706df26Smrg  gnu*)
8217706df26Smrg    # Under GNU Hurd, this test is not required because there is
8227706df26Smrg    # no limit to the length of command line arguments.
8237706df26Smrg    # Libtool will interpret -1 as no limit whatsoever
8247706df26Smrg    lt_cv_sys_max_cmd_len=-1;
8257706df26Smrg    ;;
8267706df26Smrg
8277706df26Smrg  cygwin* | mingw*)
8287706df26Smrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
8297706df26Smrg    # about 5 minutes as the teststring grows exponentially.
8307706df26Smrg    # Worse, since 9x/ME are not pre-emptively multitasking,
8317706df26Smrg    # you end up with a "frozen" computer, even though with patience
8327706df26Smrg    # the test eventually succeeds (with a max line length of 256k).
8337706df26Smrg    # Instead, let's just punt: use the minimum linelength reported by
8347706df26Smrg    # all of the supported platforms: 8192 (on NT/2K/XP).
8357706df26Smrg    lt_cv_sys_max_cmd_len=8192;
8367706df26Smrg    ;;
8377706df26Smrg
8387706df26Smrg  amigaos*)
8397706df26Smrg    # On AmigaOS with pdksh, this test takes hours, literally.
8407706df26Smrg    # So we just punt and use a minimum line length of 8192.
8417706df26Smrg    lt_cv_sys_max_cmd_len=8192;
8427706df26Smrg    ;;
8437706df26Smrg
8447706df26Smrg  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
8457706df26Smrg    # This has been around since 386BSD, at least.  Likely further.
8467706df26Smrg    if test -x /sbin/sysctl; then
8477706df26Smrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
8487706df26Smrg    elif test -x /usr/sbin/sysctl; then
8497706df26Smrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
8507706df26Smrg    else
8517706df26Smrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
8527706df26Smrg    fi
8537706df26Smrg    # And add a safety zone
8547706df26Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
8557706df26Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
8567706df26Smrg    ;;
8577706df26Smrg
8587706df26Smrg  interix*)
8597706df26Smrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
8607706df26Smrg    lt_cv_sys_max_cmd_len=196608
8617706df26Smrg    ;;
8627706df26Smrg
8637706df26Smrg  osf*)
8647706df26Smrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
8657706df26Smrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
8667706df26Smrg    # nice to cause kernel panics so lets avoid the loop below.
8677706df26Smrg    # First set a reasonable default.
8687706df26Smrg    lt_cv_sys_max_cmd_len=16384
8697706df26Smrg    #
8707706df26Smrg    if test -x /sbin/sysconfig; then
8717706df26Smrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
8727706df26Smrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
8737706df26Smrg      esac
8747706df26Smrg    fi
8757706df26Smrg    ;;
8767706df26Smrg  sco3.2v5*)
8777706df26Smrg    lt_cv_sys_max_cmd_len=102400
8787706df26Smrg    ;;
8797706df26Smrg  sysv5* | sco5v6* | sysv4.2uw2*)
8807706df26Smrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
8817706df26Smrg    if test -n "$kargmax"; then
8827706df26Smrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ 	]]//'`
8837706df26Smrg    else
8847706df26Smrg      lt_cv_sys_max_cmd_len=32768
8857706df26Smrg    fi
8867706df26Smrg    ;;
8877706df26Smrg  *)
888047944f3Smrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
889047944f3Smrg    if test -n "$lt_cv_sys_max_cmd_len"; then
890047944f3Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
891047944f3Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
892047944f3Smrg    else
893047944f3Smrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
894047944f3Smrg      while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
8957706df26Smrg	       = "XX$teststring") >/dev/null 2>&1 &&
896047944f3Smrg	      new_result=`expr "X$teststring" : ".*" 2>&1` &&
897047944f3Smrg	      lt_cv_sys_max_cmd_len=$new_result &&
898047944f3Smrg	      test $i != 17 # 1/2 MB should be enough
899047944f3Smrg      do
900047944f3Smrg        i=`expr $i + 1`
901047944f3Smrg        teststring=$teststring$teststring
902047944f3Smrg      done
903047944f3Smrg      teststring=
904047944f3Smrg      # Add a significant safety factor because C++ compilers can tack on massive
905047944f3Smrg      # amounts of additional arguments before passing them to the linker.
906047944f3Smrg      # It appears as though 1/2 is a usable value.
907047944f3Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
908047944f3Smrg    fi
9097706df26Smrg    ;;
9107706df26Smrg  esac
9117706df26Smrg])
9127706df26Smrgif test -n $lt_cv_sys_max_cmd_len ; then
9137706df26Smrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
9147706df26Smrgelse
9157706df26Smrg  AC_MSG_RESULT(none)
9167706df26Smrgfi
9177706df26Smrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN
9187706df26Smrg
9197706df26Smrg
9207706df26Smrg# _LT_AC_CHECK_DLFCN
9217706df26Smrg# ------------------
9227706df26SmrgAC_DEFUN([_LT_AC_CHECK_DLFCN],
9237706df26Smrg[AC_CHECK_HEADERS(dlfcn.h)dnl
9247706df26Smrg])# _LT_AC_CHECK_DLFCN
9257706df26Smrg
9267706df26Smrg
9277706df26Smrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
9287706df26Smrg#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
9297706df26Smrg# ---------------------------------------------------------------------
9307706df26SmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
9317706df26Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
9327706df26Smrgif test "$cross_compiling" = yes; then :
9337706df26Smrg  [$4]
9347706df26Smrgelse
9357706df26Smrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
9367706df26Smrg  lt_status=$lt_dlunknown
9377706df26Smrg  cat > conftest.$ac_ext <<EOF
9387706df26Smrg[#line __oline__ "configure"
9397706df26Smrg#include "confdefs.h"
9407706df26Smrg
9417706df26Smrg#if HAVE_DLFCN_H
9427706df26Smrg#include <dlfcn.h>
9437706df26Smrg#endif
9447706df26Smrg
9457706df26Smrg#include <stdio.h>
9467706df26Smrg
9477706df26Smrg#ifdef RTLD_GLOBAL
9487706df26Smrg#  define LT_DLGLOBAL		RTLD_GLOBAL
9497706df26Smrg#else
9507706df26Smrg#  ifdef DL_GLOBAL
9517706df26Smrg#    define LT_DLGLOBAL		DL_GLOBAL
9527706df26Smrg#  else
9537706df26Smrg#    define LT_DLGLOBAL		0
9547706df26Smrg#  endif
9557706df26Smrg#endif
9567706df26Smrg
9577706df26Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
9587706df26Smrg   find out it does not work in some platform. */
9597706df26Smrg#ifndef LT_DLLAZY_OR_NOW
9607706df26Smrg#  ifdef RTLD_LAZY
9617706df26Smrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
9627706df26Smrg#  else
9637706df26Smrg#    ifdef DL_LAZY
9647706df26Smrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
9657706df26Smrg#    else
9667706df26Smrg#      ifdef RTLD_NOW
9677706df26Smrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
9687706df26Smrg#      else
9697706df26Smrg#        ifdef DL_NOW
9707706df26Smrg#          define LT_DLLAZY_OR_NOW	DL_NOW
9717706df26Smrg#        else
9727706df26Smrg#          define LT_DLLAZY_OR_NOW	0
9737706df26Smrg#        endif
9747706df26Smrg#      endif
9757706df26Smrg#    endif
9767706df26Smrg#  endif
9777706df26Smrg#endif
9787706df26Smrg
9797706df26Smrg#ifdef __cplusplus
9807706df26Smrgextern "C" void exit (int);
9817706df26Smrg#endif
9827706df26Smrg
9837706df26Smrgvoid fnord() { int i=42;}
9847706df26Smrgint main ()
9857706df26Smrg{
9867706df26Smrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
9877706df26Smrg  int status = $lt_dlunknown;
9887706df26Smrg
9897706df26Smrg  if (self)
9907706df26Smrg    {
9917706df26Smrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
9927706df26Smrg      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
9937706df26Smrg      /* dlclose (self); */
9947706df26Smrg    }
9957706df26Smrg  else
9967706df26Smrg    puts (dlerror ());
9977706df26Smrg
9987706df26Smrg    exit (status);
9997706df26Smrg}]
10007706df26SmrgEOF
10017706df26Smrg  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
10027706df26Smrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
10037706df26Smrg    lt_status=$?
10047706df26Smrg    case x$lt_status in
10057706df26Smrg      x$lt_dlno_uscore) $1 ;;
10067706df26Smrg      x$lt_dlneed_uscore) $2 ;;
10077706df26Smrg      x$lt_dlunknown|x*) $3 ;;
10087706df26Smrg    esac
10097706df26Smrg  else :
10107706df26Smrg    # compilation failed
10117706df26Smrg    $3
10127706df26Smrg  fi
10137706df26Smrgfi
10147706df26Smrgrm -fr conftest*
10157706df26Smrg])# _LT_AC_TRY_DLOPEN_SELF
10167706df26Smrg
10177706df26Smrg
10187706df26Smrg# AC_LIBTOOL_DLOPEN_SELF
10197706df26Smrg# ----------------------
10207706df26SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
10217706df26Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
10227706df26Smrgif test "x$enable_dlopen" != xyes; then
10237706df26Smrg  enable_dlopen=unknown
10247706df26Smrg  enable_dlopen_self=unknown
10257706df26Smrg  enable_dlopen_self_static=unknown
10267706df26Smrgelse
10277706df26Smrg  lt_cv_dlopen=no
10287706df26Smrg  lt_cv_dlopen_libs=
10297706df26Smrg
10307706df26Smrg  case $host_os in
10317706df26Smrg  beos*)
10327706df26Smrg    lt_cv_dlopen="load_add_on"
10337706df26Smrg    lt_cv_dlopen_libs=
10347706df26Smrg    lt_cv_dlopen_self=yes
10357706df26Smrg    ;;
10367706df26Smrg
10377706df26Smrg  mingw* | pw32*)
10387706df26Smrg    lt_cv_dlopen="LoadLibrary"
10397706df26Smrg    lt_cv_dlopen_libs=
10407706df26Smrg   ;;
10417706df26Smrg
10427706df26Smrg  cygwin*)
10437706df26Smrg    lt_cv_dlopen="dlopen"
10447706df26Smrg    lt_cv_dlopen_libs=
10457706df26Smrg   ;;
10467706df26Smrg
10477706df26Smrg  darwin*)
10487706df26Smrg  # if libdl is installed we need to link against it
10497706df26Smrg    AC_CHECK_LIB([dl], [dlopen],
10507706df26Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
10517706df26Smrg    lt_cv_dlopen="dyld"
10527706df26Smrg    lt_cv_dlopen_libs=
10537706df26Smrg    lt_cv_dlopen_self=yes
10547706df26Smrg    ])
10557706df26Smrg   ;;
10567706df26Smrg
10577706df26Smrg  *)
10587706df26Smrg    AC_CHECK_FUNC([shl_load],
10597706df26Smrg	  [lt_cv_dlopen="shl_load"],
10607706df26Smrg      [AC_CHECK_LIB([dld], [shl_load],
1061047944f3Smrg	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
10627706df26Smrg	[AC_CHECK_FUNC([dlopen],
10637706df26Smrg	      [lt_cv_dlopen="dlopen"],
10647706df26Smrg	  [AC_CHECK_LIB([dl], [dlopen],
10657706df26Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
10667706df26Smrg	    [AC_CHECK_LIB([svld], [dlopen],
10677706df26Smrg		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
10687706df26Smrg	      [AC_CHECK_LIB([dld], [dld_link],
1069047944f3Smrg		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
10707706df26Smrg	      ])
10717706df26Smrg	    ])
10727706df26Smrg	  ])
10737706df26Smrg	])
10747706df26Smrg      ])
10757706df26Smrg    ;;
10767706df26Smrg  esac
10777706df26Smrg
10787706df26Smrg  if test "x$lt_cv_dlopen" != xno; then
10797706df26Smrg    enable_dlopen=yes
10807706df26Smrg  else
10817706df26Smrg    enable_dlopen=no
10827706df26Smrg  fi
10837706df26Smrg
10847706df26Smrg  case $lt_cv_dlopen in
10857706df26Smrg  dlopen)
10867706df26Smrg    save_CPPFLAGS="$CPPFLAGS"
10877706df26Smrg    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
10887706df26Smrg
10897706df26Smrg    save_LDFLAGS="$LDFLAGS"
10907706df26Smrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
10917706df26Smrg
10927706df26Smrg    save_LIBS="$LIBS"
10937706df26Smrg    LIBS="$lt_cv_dlopen_libs $LIBS"
10947706df26Smrg
10957706df26Smrg    AC_CACHE_CHECK([whether a program can dlopen itself],
10967706df26Smrg	  lt_cv_dlopen_self, [dnl
10977706df26Smrg	  _LT_AC_TRY_DLOPEN_SELF(
10987706df26Smrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
10997706df26Smrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
11007706df26Smrg    ])
11017706df26Smrg
11027706df26Smrg    if test "x$lt_cv_dlopen_self" = xyes; then
11037706df26Smrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
11047706df26Smrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
11057706df26Smrg    	  lt_cv_dlopen_self_static, [dnl
11067706df26Smrg	  _LT_AC_TRY_DLOPEN_SELF(
11077706df26Smrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
11087706df26Smrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
11097706df26Smrg      ])
11107706df26Smrg    fi
11117706df26Smrg
11127706df26Smrg    CPPFLAGS="$save_CPPFLAGS"
11137706df26Smrg    LDFLAGS="$save_LDFLAGS"
11147706df26Smrg    LIBS="$save_LIBS"
11157706df26Smrg    ;;
11167706df26Smrg  esac
11177706df26Smrg
11187706df26Smrg  case $lt_cv_dlopen_self in
11197706df26Smrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
11207706df26Smrg  *) enable_dlopen_self=unknown ;;
11217706df26Smrg  esac
11227706df26Smrg
11237706df26Smrg  case $lt_cv_dlopen_self_static in
11247706df26Smrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
11257706df26Smrg  *) enable_dlopen_self_static=unknown ;;
11267706df26Smrg  esac
11277706df26Smrgfi
11287706df26Smrg])# AC_LIBTOOL_DLOPEN_SELF
11297706df26Smrg
11307706df26Smrg
11317706df26Smrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
11327706df26Smrg# ---------------------------------
11337706df26Smrg# Check to see if options -c and -o are simultaneously supported by compiler
11347706df26SmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1135047944f3Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
1136047944f3SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
11377706df26SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
11387706df26Smrg  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
11397706df26Smrg  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
11407706df26Smrg   $rm -r conftest 2>/dev/null
11417706df26Smrg   mkdir conftest
11427706df26Smrg   cd conftest
11437706df26Smrg   mkdir out
1144047944f3Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11457706df26Smrg
11467706df26Smrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
11477706df26Smrg   # Insert the option either (1) after the last *FLAGS variable, or
11487706df26Smrg   # (2) before a word containing "conftest.", or (3) at the end.
11497706df26Smrg   # Note that $ac_compile itself does not contain backslashes and begins
11507706df26Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
11517706df26Smrg   lt_compile=`echo "$ac_compile" | $SED \
11527706df26Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11537706df26Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
11547706df26Smrg   -e 's:$: $lt_compiler_flag:'`
11557706df26Smrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
11567706df26Smrg   (eval "$lt_compile" 2>out/conftest.err)
11577706df26Smrg   ac_status=$?
11587706df26Smrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
11597706df26Smrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
11607706df26Smrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
11617706df26Smrg   then
11627706df26Smrg     # The compiler can only warn and ignore the option if not recognized
11637706df26Smrg     # So say no if there are warnings
11647706df26Smrg     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
11657706df26Smrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
11667706df26Smrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
11677706df26Smrg       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
11687706df26Smrg     fi
11697706df26Smrg   fi
11707706df26Smrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
11717706df26Smrg   $rm conftest*
11727706df26Smrg   # SGI C++ compiler will create directory out/ii_files/ for
11737706df26Smrg   # template instantiation
11747706df26Smrg   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
11757706df26Smrg   $rm out/* && rmdir out
11767706df26Smrg   cd ..
11777706df26Smrg   rmdir conftest
11787706df26Smrg   $rm conftest*
11797706df26Smrg])
11807706df26Smrg])# AC_LIBTOOL_PROG_CC_C_O
11817706df26Smrg
11827706df26Smrg
11837706df26Smrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
11847706df26Smrg# -----------------------------------------
11857706df26Smrg# Check to see if we can do hard links to lock some files if needed
11867706df26SmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
11877706df26Smrg[AC_REQUIRE([_LT_AC_LOCK])dnl
11887706df26Smrg
11897706df26Smrghard_links="nottested"
11907706df26Smrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
11917706df26Smrg  # do not overwrite the value of need_locks provided by the user
11927706df26Smrg  AC_MSG_CHECKING([if we can lock with hard links])
11937706df26Smrg  hard_links=yes
11947706df26Smrg  $rm conftest*
11957706df26Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
11967706df26Smrg  touch conftest.a
11977706df26Smrg  ln conftest.a conftest.b 2>&5 || hard_links=no
11987706df26Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
11997706df26Smrg  AC_MSG_RESULT([$hard_links])
12007706df26Smrg  if test "$hard_links" = no; then
12017706df26Smrg    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
12027706df26Smrg    need_locks=warn
12037706df26Smrg  fi
12047706df26Smrgelse
12057706df26Smrg  need_locks=no
12067706df26Smrgfi
12077706df26Smrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
12087706df26Smrg
12097706df26Smrg
12107706df26Smrg# AC_LIBTOOL_OBJDIR
12117706df26Smrg# -----------------
12127706df26SmrgAC_DEFUN([AC_LIBTOOL_OBJDIR],
12137706df26Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
12147706df26Smrg[rm -f .libs 2>/dev/null
12157706df26Smrgmkdir .libs 2>/dev/null
12167706df26Smrgif test -d .libs; then
12177706df26Smrg  lt_cv_objdir=.libs
12187706df26Smrgelse
12197706df26Smrg  # MS-DOS does not allow filenames that begin with a dot.
12207706df26Smrg  lt_cv_objdir=_libs
12217706df26Smrgfi
12227706df26Smrgrmdir .libs 2>/dev/null])
12237706df26Smrgobjdir=$lt_cv_objdir
12247706df26Smrg])# AC_LIBTOOL_OBJDIR
12257706df26Smrg
12267706df26Smrg
12277706df26Smrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
12287706df26Smrg# ----------------------------------------------
12297706df26Smrg# Check hardcoding attributes.
12307706df26SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
12317706df26Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
12327706df26Smrg_LT_AC_TAGVAR(hardcode_action, $1)=
12337706df26Smrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
12347706df26Smrg   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
12357706df26Smrg   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
12367706df26Smrg
12377706df26Smrg  # We can hardcode non-existant directories.
12387706df26Smrg  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
12397706df26Smrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
12407706df26Smrg     # have to relink, otherwise we might link with an installed library
12417706df26Smrg     # when we should be linking with a yet-to-be-installed one
12427706df26Smrg     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
12437706df26Smrg     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
12447706df26Smrg    # Linking always hardcodes the temporary library directory.
12457706df26Smrg    _LT_AC_TAGVAR(hardcode_action, $1)=relink
12467706df26Smrg  else
12477706df26Smrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
12487706df26Smrg    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
12497706df26Smrg  fi
12507706df26Smrgelse
12517706df26Smrg  # We cannot hardcode anything, or else we can only hardcode existing
12527706df26Smrg  # directories.
12537706df26Smrg  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
12547706df26Smrgfi
12557706df26SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
12567706df26Smrg
12577706df26Smrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
12587706df26Smrg  # Fast installation is not supported
12597706df26Smrg  enable_fast_install=no
12607706df26Smrgelif test "$shlibpath_overrides_runpath" = yes ||
12617706df26Smrg     test "$enable_shared" = no; then
12627706df26Smrg  # Fast installation is not necessary
12637706df26Smrg  enable_fast_install=needless
12647706df26Smrgfi
12657706df26Smrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
12667706df26Smrg
12677706df26Smrg
12687706df26Smrg# AC_LIBTOOL_SYS_LIB_STRIP
12697706df26Smrg# ------------------------
12707706df26SmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
12717706df26Smrg[striplib=
12727706df26Smrgold_striplib=
12737706df26SmrgAC_MSG_CHECKING([whether stripping libraries is possible])
12747706df26Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
12757706df26Smrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
12767706df26Smrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
12777706df26Smrg  AC_MSG_RESULT([yes])
12787706df26Smrgelse
12797706df26Smrg# FIXME - insert some real tests, host_os isn't really good enough
12807706df26Smrg  case $host_os in
12817706df26Smrg   darwin*)
12827706df26Smrg       if test -n "$STRIP" ; then
12837706df26Smrg         striplib="$STRIP -x"
1284047944f3Smrg         old_striplib="$STRIP -S"
12857706df26Smrg         AC_MSG_RESULT([yes])
12867706df26Smrg       else
12877706df26Smrg  AC_MSG_RESULT([no])
12887706df26Smrgfi
12897706df26Smrg       ;;
12907706df26Smrg   *)
12917706df26Smrg  AC_MSG_RESULT([no])
12927706df26Smrg    ;;
12937706df26Smrg  esac
12947706df26Smrgfi
12957706df26Smrg])# AC_LIBTOOL_SYS_LIB_STRIP
12967706df26Smrg
12977706df26Smrg
12987706df26Smrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER
12997706df26Smrg# -----------------------------
13007706df26Smrg# PORTME Fill in your ld.so characteristics
13017706df26SmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1302047944f3Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
1303047944f3SmrgAC_MSG_CHECKING([dynamic linker characteristics])
13047706df26Smrglibrary_names_spec=
13057706df26Smrglibname_spec='lib$name'
13067706df26Smrgsoname_spec=
13077706df26Smrgshrext_cmds=".so"
13087706df26Smrgpostinstall_cmds=
13097706df26Smrgpostuninstall_cmds=
13107706df26Smrgfinish_cmds=
13117706df26Smrgfinish_eval=
13127706df26Smrgshlibpath_var=
13137706df26Smrgshlibpath_overrides_runpath=unknown
13147706df26Smrgversion_type=none
13157706df26Smrgdynamic_linker="$host_os ld.so"
13167706df26Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
1317047944f3Smrgm4_if($1,[],[
13187706df26Smrgif test "$GCC" = yes; then
1319047944f3Smrg  case $host_os in
1320047944f3Smrg    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
1321047944f3Smrg    *) lt_awk_arg="/^libraries:/" ;;
1322047944f3Smrg  esac
1323047944f3Smrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1324047944f3Smrg  if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
13257706df26Smrg    # if the path contains ";" then we assume it to be the separator
13267706df26Smrg    # otherwise default to the standard path separator (i.e. ":") - it is
13277706df26Smrg    # assumed that no part of a normal pathname contains ";" but that should
13287706df26Smrg    # okay in the real world where ";" in dirpaths is itself problematic.
1329047944f3Smrg    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
13307706df26Smrg  else
1331047944f3Smrg    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
13327706df26Smrg  fi
1333047944f3Smrg  # Ok, now we have the path, separated by spaces, we can step through it
1334047944f3Smrg  # and add multilib dir if necessary.
1335047944f3Smrg  lt_tmp_lt_search_path_spec=
1336047944f3Smrg  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
1337047944f3Smrg  for lt_sys_path in $lt_search_path_spec; do
1338047944f3Smrg    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
1339047944f3Smrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
1340047944f3Smrg    else
1341047944f3Smrg      test -d "$lt_sys_path" && \
1342047944f3Smrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
1343047944f3Smrg    fi
1344047944f3Smrg  done
1345047944f3Smrg  lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
1346047944f3SmrgBEGIN {RS=" "; FS="/|\n";} {
1347047944f3Smrg  lt_foo="";
1348047944f3Smrg  lt_count=0;
1349047944f3Smrg  for (lt_i = NF; lt_i > 0; lt_i--) {
1350047944f3Smrg    if ($lt_i != "" && $lt_i != ".") {
1351047944f3Smrg      if ($lt_i == "..") {
1352047944f3Smrg        lt_count++;
1353047944f3Smrg      } else {
1354047944f3Smrg        if (lt_count == 0) {
1355047944f3Smrg          lt_foo="/" $lt_i lt_foo;
1356047944f3Smrg        } else {
1357047944f3Smrg          lt_count--;
1358047944f3Smrg        }
1359047944f3Smrg      }
1360047944f3Smrg    }
1361047944f3Smrg  }
1362047944f3Smrg  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
1363047944f3Smrg  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
1364047944f3Smrg}'`
1365047944f3Smrg  sys_lib_search_path_spec=`echo $lt_search_path_spec`
13667706df26Smrgelse
13677706df26Smrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1368047944f3Smrgfi])
13697706df26Smrgneed_lib_prefix=unknown
13707706df26Smrghardcode_into_libs=no
13717706df26Smrg
13727706df26Smrg# when you set need_version to no, make sure it does not cause -set_version
13737706df26Smrg# flags to be left without arguments
13747706df26Smrgneed_version=unknown
13757706df26Smrg
13767706df26Smrgcase $host_os in
13777706df26Smrgaix3*)
13787706df26Smrg  version_type=linux
13797706df26Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
13807706df26Smrg  shlibpath_var=LIBPATH
13817706df26Smrg
13827706df26Smrg  # AIX 3 has no versioning support, so we append a major version to the name.
13837706df26Smrg  soname_spec='${libname}${release}${shared_ext}$major'
13847706df26Smrg  ;;
13857706df26Smrg
1386047944f3Smrgaix[[4-9]]*)
13877706df26Smrg  version_type=linux
13887706df26Smrg  need_lib_prefix=no
13897706df26Smrg  need_version=no
13907706df26Smrg  hardcode_into_libs=yes
13917706df26Smrg  if test "$host_cpu" = ia64; then
13927706df26Smrg    # AIX 5 supports IA64
13937706df26Smrg    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
13947706df26Smrg    shlibpath_var=LD_LIBRARY_PATH
13957706df26Smrg  else
13967706df26Smrg    # With GCC up to 2.95.x, collect2 would create an import file
13977706df26Smrg    # for dependence libraries.  The import file would start with
13987706df26Smrg    # the line `#! .'.  This would cause the generated library to
13997706df26Smrg    # depend on `.', always an invalid library.  This was fixed in
14007706df26Smrg    # development snapshots of GCC prior to 3.0.
14017706df26Smrg    case $host_os in
14027706df26Smrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
14037706df26Smrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
14047706df26Smrg	   echo ' yes '
14057706df26Smrg	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
14067706df26Smrg	:
14077706df26Smrg      else
14087706df26Smrg	can_build_shared=no
14097706df26Smrg      fi
14107706df26Smrg      ;;
14117706df26Smrg    esac
14127706df26Smrg    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
14137706df26Smrg    # soname into executable. Probably we can add versioning support to
14147706df26Smrg    # collect2, so additional links can be useful in future.
14157706df26Smrg    if test "$aix_use_runtimelinking" = yes; then
14167706df26Smrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
14177706df26Smrg      # instead of lib<name>.a to let people know that these are not
14187706df26Smrg      # typical AIX shared libraries.
14197706df26Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
14207706df26Smrg    else
14217706df26Smrg      # We preserve .a as extension for shared libraries through AIX4.2
14227706df26Smrg      # and later when we are not doing run time linking.
14237706df26Smrg      library_names_spec='${libname}${release}.a $libname.a'
14247706df26Smrg      soname_spec='${libname}${release}${shared_ext}$major'
14257706df26Smrg    fi
14267706df26Smrg    shlibpath_var=LIBPATH
14277706df26Smrg  fi
14287706df26Smrg  ;;
14297706df26Smrg
14307706df26Smrgamigaos*)
14317706df26Smrg  library_names_spec='$libname.ixlibrary $libname.a'
14327706df26Smrg  # Create ${libname}_ixlibrary.a entries in /sys/libs.
14337706df26Smrg  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'
14347706df26Smrg  ;;
14357706df26Smrg
14367706df26Smrgbeos*)
14377706df26Smrg  library_names_spec='${libname}${shared_ext}'
14387706df26Smrg  dynamic_linker="$host_os ld.so"
14397706df26Smrg  shlibpath_var=LIBRARY_PATH
14407706df26Smrg  ;;
14417706df26Smrg
14427706df26Smrgbsdi[[45]]*)
14437706df26Smrg  version_type=linux
14447706df26Smrg  need_version=no
14457706df26Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
14467706df26Smrg  soname_spec='${libname}${release}${shared_ext}$major'
14477706df26Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
14487706df26Smrg  shlibpath_var=LD_LIBRARY_PATH
14497706df26Smrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
14507706df26Smrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
14517706df26Smrg  # the default ld.so.conf also contains /usr/contrib/lib and
14527706df26Smrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
14537706df26Smrg  # libtool to hard-code these into programs
14547706df26Smrg  ;;
14557706df26Smrg
14567706df26Smrgcygwin* | mingw* | pw32*)
14577706df26Smrg  version_type=windows
14587706df26Smrg  shrext_cmds=".dll"
14597706df26Smrg  need_version=no
14607706df26Smrg  need_lib_prefix=no
14617706df26Smrg
14627706df26Smrg  case $GCC,$host_os in
14637706df26Smrg  yes,cygwin* | yes,mingw* | yes,pw32*)
14647706df26Smrg    library_names_spec='$libname.dll.a'
14657706df26Smrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
14667706df26Smrg    postinstall_cmds='base_file=`basename \${file}`~
14677706df26Smrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
14687706df26Smrg      dldir=$destdir/`dirname \$dlpath`~
14697706df26Smrg      test -d \$dldir || mkdir -p \$dldir~
14707706df26Smrg      $install_prog $dir/$dlname \$dldir/$dlname~
14717706df26Smrg      chmod a+x \$dldir/$dlname'
14727706df26Smrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
14737706df26Smrg      dlpath=$dir/\$dldll~
14747706df26Smrg       $rm \$dlpath'
14757706df26Smrg    shlibpath_overrides_runpath=yes
14767706df26Smrg
14777706df26Smrg    case $host_os in
14787706df26Smrg    cygwin*)
14797706df26Smrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
14807706df26Smrg      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
14817706df26Smrg      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
14827706df26Smrg      ;;
14837706df26Smrg    mingw*)
14847706df26Smrg      # MinGW DLLs use traditional 'lib' prefix
14857706df26Smrg      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
14867706df26Smrg      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
14877706df26Smrg      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
14887706df26Smrg        # It is most probably a Windows format PATH printed by
14897706df26Smrg        # mingw gcc, but we are running on Cygwin. Gcc prints its search
14907706df26Smrg        # path with ; separators, and with drive letters. We can handle the
14917706df26Smrg        # drive letters (cygwin fileutils understands them), so leave them,
14927706df26Smrg        # especially as we might pass files found there to a mingw objdump,
14937706df26Smrg        # which wouldn't understand a cygwinified path. Ahh.
14947706df26Smrg        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
14957706df26Smrg      else
14967706df26Smrg        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
14977706df26Smrg      fi
14987706df26Smrg      ;;
14997706df26Smrg    pw32*)
15007706df26Smrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
15017706df26Smrg      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
15027706df26Smrg      ;;
15037706df26Smrg    esac
15047706df26Smrg    ;;
15057706df26Smrg
15067706df26Smrg  *)
15077706df26Smrg    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
15087706df26Smrg    ;;
15097706df26Smrg  esac
15107706df26Smrg  dynamic_linker='Win32 ld.exe'
15117706df26Smrg  # FIXME: first we should search . and the directory the executable is in
15127706df26Smrg  shlibpath_var=PATH
15137706df26Smrg  ;;
15147706df26Smrg
15157706df26Smrgdarwin* | rhapsody*)
15167706df26Smrg  dynamic_linker="$host_os dyld"
15177706df26Smrg  version_type=darwin
15187706df26Smrg  need_lib_prefix=no
15197706df26Smrg  need_version=no
15207706df26Smrg  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
15217706df26Smrg  soname_spec='${libname}${release}${major}$shared_ext'
15227706df26Smrg  shlibpath_overrides_runpath=yes
15237706df26Smrg  shlibpath_var=DYLD_LIBRARY_PATH
15247706df26Smrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
1525047944f3Smrg  m4_if([$1], [],[
1526047944f3Smrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 
15277706df26Smrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
15287706df26Smrg  ;;
15297706df26Smrg
15307706df26Smrgdgux*)
15317706df26Smrg  version_type=linux
15327706df26Smrg  need_lib_prefix=no
15337706df26Smrg  need_version=no
15347706df26Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
15357706df26Smrg  soname_spec='${libname}${release}${shared_ext}$major'
15367706df26Smrg  shlibpath_var=LD_LIBRARY_PATH
15377706df26Smrg  ;;
15387706df26Smrg
15397706df26Smrgfreebsd1*)
15407706df26Smrg  dynamic_linker=no
15417706df26Smrg  ;;
15427706df26Smrg
15437706df26Smrgfreebsd* | dragonfly*)
15447706df26Smrg  # DragonFly does not have aout.  When/if they implement a new
15457706df26Smrg  # versioning mechanism, adjust this.
15467706df26Smrg  if test -x /usr/bin/objformat; then
15477706df26Smrg    objformat=`/usr/bin/objformat`
15487706df26Smrg  else
15497706df26Smrg    case $host_os in
15507706df26Smrg    freebsd[[123]]*) objformat=aout ;;
15517706df26Smrg    *) objformat=elf ;;
15527706df26Smrg    esac
15537706df26Smrg  fi
15547706df26Smrg  version_type=freebsd-$objformat
15557706df26Smrg  case $version_type in
15567706df26Smrg    freebsd-elf*)
15577706df26Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
15587706df26Smrg      need_version=no
15597706df26Smrg      need_lib_prefix=no
15607706df26Smrg      ;;
15617706df26Smrg    freebsd-*)
15627706df26Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
15637706df26Smrg      need_version=yes
15647706df26Smrg      ;;
15657706df26Smrg  esac
15667706df26Smrg  shlibpath_var=LD_LIBRARY_PATH
15677706df26Smrg  case $host_os in
15687706df26Smrg  freebsd2*)
15697706df26Smrg    shlibpath_overrides_runpath=yes
15707706df26Smrg    ;;
15717706df26Smrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
15727706df26Smrg    shlibpath_overrides_runpath=yes
15737706df26Smrg    hardcode_into_libs=yes
15747706df26Smrg    ;;
15757706df26Smrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
15767706df26Smrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
15777706df26Smrg    shlibpath_overrides_runpath=no
15787706df26Smrg    hardcode_into_libs=yes
15797706df26Smrg    ;;
1580047944f3Smrg  *) # from 4.6 on, and DragonFly
15817706df26Smrg    shlibpath_overrides_runpath=yes
15827706df26Smrg    hardcode_into_libs=yes
15837706df26Smrg    ;;
15847706df26Smrg  esac
15857706df26Smrg  ;;
15867706df26Smrg
15877706df26Smrggnu*)
15887706df26Smrg  version_type=linux
15897706df26Smrg  need_lib_prefix=no
15907706df26Smrg  need_version=no
15917706df26Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
15927706df26Smrg  soname_spec='${libname}${release}${shared_ext}$major'
15937706df26Smrg  shlibpath_var=LD_LIBRARY_PATH
15947706df26Smrg  hardcode_into_libs=yes
15957706df26Smrg  ;;
15967706df26Smrg
15977706df26Smrghpux9* | hpux10* | hpux11*)
15987706df26Smrg  # Give a soname corresponding to the major version so that dld.sl refuses to
15997706df26Smrg  # link against other versions.
16007706df26Smrg  version_type=sunos
16017706df26Smrg  need_lib_prefix=no
16027706df26Smrg  need_version=no
16037706df26Smrg  case $host_cpu in
16047706df26Smrg  ia64*)
16057706df26Smrg    shrext_cmds='.so'
16067706df26Smrg    hardcode_into_libs=yes
16077706df26Smrg    dynamic_linker="$host_os dld.so"
16087706df26Smrg    shlibpath_var=LD_LIBRARY_PATH
16097706df26Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
16107706df26Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16117706df26Smrg    soname_spec='${libname}${release}${shared_ext}$major'
16127706df26Smrg    if test "X$HPUX_IA64_MODE" = X32; then
16137706df26Smrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
16147706df26Smrg    else
16157706df26Smrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
16167706df26Smrg    fi
16177706df26Smrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
16187706df26Smrg    ;;
16197706df26Smrg   hppa*64*)
16207706df26Smrg     shrext_cmds='.sl'
16217706df26Smrg     hardcode_into_libs=yes
16227706df26Smrg     dynamic_linker="$host_os dld.sl"
16237706df26Smrg     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
16247706df26Smrg     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
16257706df26Smrg     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16267706df26Smrg     soname_spec='${libname}${release}${shared_ext}$major'
16277706df26Smrg     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
16287706df26Smrg     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
16297706df26Smrg     ;;
16307706df26Smrg   *)
16317706df26Smrg    shrext_cmds='.sl'
16327706df26Smrg    dynamic_linker="$host_os dld.sl"
16337706df26Smrg    shlibpath_var=SHLIB_PATH
16347706df26Smrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
16357706df26Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16367706df26Smrg    soname_spec='${libname}${release}${shared_ext}$major'
16377706df26Smrg    ;;
16387706df26Smrg  esac
16397706df26Smrg  # HP-UX runs *really* slowly unless shared libraries are mode 555.
16407706df26Smrg  postinstall_cmds='chmod 555 $lib'
16417706df26Smrg  ;;
16427706df26Smrg
1643047944f3Smrginterix[[3-9]]*)
16447706df26Smrg  version_type=linux
16457706df26Smrg  need_lib_prefix=no
16467706df26Smrg  need_version=no
16477706df26Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
16487706df26Smrg  soname_spec='${libname}${release}${shared_ext}$major'
16497706df26Smrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
16507706df26Smrg  shlibpath_var=LD_LIBRARY_PATH
16517706df26Smrg  shlibpath_overrides_runpath=no
16527706df26Smrg  hardcode_into_libs=yes
16537706df26Smrg  ;;
16547706df26Smrg
16557706df26Smrgirix5* | irix6* | nonstopux*)
16567706df26Smrg  case $host_os in
16577706df26Smrg    nonstopux*) version_type=nonstopux ;;
16587706df26Smrg    *)
16597706df26Smrg	if test "$lt_cv_prog_gnu_ld" = yes; then
16607706df26Smrg		version_type=linux
16617706df26Smrg	else
16627706df26Smrg		version_type=irix
16637706df26Smrg	fi ;;
16647706df26Smrg  esac
16657706df26Smrg  need_lib_prefix=no
16667706df26Smrg  need_version=no
16677706df26Smrg  soname_spec='${libname}${release}${shared_ext}$major'
16687706df26Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
16697706df26Smrg  case $host_os in
16707706df26Smrg  irix5* | nonstopux*)
16717706df26Smrg    libsuff= shlibsuff=
16727706df26Smrg    ;;
16737706df26Smrg  *)
16747706df26Smrg    case $LD in # libtool.m4 will add one of these switches to LD
16757706df26Smrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
16767706df26Smrg      libsuff= shlibsuff= libmagic=32-bit;;
16777706df26Smrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
16787706df26Smrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
16797706df26Smrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
16807706df26Smrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
16817706df26Smrg    *) libsuff= shlibsuff= libmagic=never-match;;
16827706df26Smrg    esac
16837706df26Smrg    ;;
16847706df26Smrg  esac
16857706df26Smrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
16867706df26Smrg  shlibpath_overrides_runpath=no
16877706df26Smrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
16887706df26Smrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
16897706df26Smrg  hardcode_into_libs=yes
16907706df26Smrg  ;;
16917706df26Smrg
16927706df26Smrg# No shared lib support for Linux oldld, aout, or coff.
16937706df26Smrglinux*oldld* | linux*aout* | linux*coff*)
16947706df26Smrg  dynamic_linker=no
16957706df26Smrg  ;;
16967706df26Smrg
16977706df26Smrg# This must be Linux ELF.
1698047944f3Smrglinux* | k*bsd*-gnu)
16997706df26Smrg  version_type=linux
17007706df26Smrg  need_lib_prefix=no
17017706df26Smrg  need_version=no
17027706df26Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
17037706df26Smrg  soname_spec='${libname}${release}${shared_ext}$major'
17047706df26Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
17057706df26Smrg  shlibpath_var=LD_LIBRARY_PATH
17067706df26Smrg  shlibpath_overrides_runpath=no
17077706df26Smrg  # This implies no fast_install, which is unacceptable.
17087706df26Smrg  # Some rework will be needed to allow for fast_install
17097706df26Smrg  # before this can be enabled.
17107706df26Smrg  hardcode_into_libs=yes
1711047944f3Smrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1712047944f3Smrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
17137706df26Smrg
17147706df26Smrg  # Append ld.so.conf contents to the search path
17157706df26Smrg  if test -f /etc/ld.so.conf; then
1716047944f3Smrg    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ 	]*hwcap[ 	]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
1717047944f3Smrg    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
17187706df26Smrg  fi
17197706df26Smrg
17207706df26Smrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
17217706df26Smrg  # powerpc, because MkLinux only supported shared libraries with the
17227706df26Smrg  # GNU dynamic linker.  Since this was broken with cross compilers,
17237706df26Smrg  # most powerpc-linux boxes support dynamic linking these days and
17247706df26Smrg  # people can always --disable-shared, the test was removed, and we
17257706df26Smrg  # assume the GNU/Linux dynamic linker is in use.
17267706df26Smrg  dynamic_linker='GNU/Linux ld.so'
17277706df26Smrg  ;;
17287706df26Smrg
17297706df26Smrgnetbsd*)
17307706df26Smrg  version_type=sunos
17317706df26Smrg  need_lib_prefix=no
17327706df26Smrg  need_version=no
17337706df26Smrg  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
17347706df26Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
17357706df26Smrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
17367706df26Smrg    dynamic_linker='NetBSD (a.out) ld.so'
17377706df26Smrg  else
17387706df26Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
17397706df26Smrg    soname_spec='${libname}${release}${shared_ext}$major'
17407706df26Smrg    dynamic_linker='NetBSD ld.elf_so'
17417706df26Smrg  fi
17427706df26Smrg  shlibpath_var=LD_LIBRARY_PATH
17437706df26Smrg  shlibpath_overrides_runpath=yes
17447706df26Smrg  hardcode_into_libs=yes
17457706df26Smrg  ;;
17467706df26Smrg
17477706df26Smrgnewsos6)
17487706df26Smrg  version_type=linux
17497706df26Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
17507706df26Smrg  shlibpath_var=LD_LIBRARY_PATH
17517706df26Smrg  shlibpath_overrides_runpath=yes
17527706df26Smrg  ;;
17537706df26Smrg
17547706df26Smrgnto-qnx*)
17557706df26Smrg  version_type=linux
17567706df26Smrg  need_lib_prefix=no
17577706df26Smrg  need_version=no
17587706df26Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
17597706df26Smrg  soname_spec='${libname}${release}${shared_ext}$major'
17607706df26Smrg  shlibpath_var=LD_LIBRARY_PATH
17617706df26Smrg  shlibpath_overrides_runpath=yes
17627706df26Smrg  ;;
17637706df26Smrg
17647706df26Smrgopenbsd*)
17657706df26Smrg  version_type=sunos
17667706df26Smrg  sys_lib_dlsearch_path_spec="/usr/lib"
17677706df26Smrg  need_lib_prefix=no
17687706df26Smrg  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
17697706df26Smrg  case $host_os in
17707706df26Smrg    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
17717706df26Smrg    *)                         need_version=no  ;;
17727706df26Smrg  esac
17737706df26Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
17747706df26Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
17757706df26Smrg  shlibpath_var=LD_LIBRARY_PATH
17767706df26Smrg  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
17777706df26Smrg    case $host_os in
17787706df26Smrg      openbsd2.[[89]] | openbsd2.[[89]].*)
17797706df26Smrg	shlibpath_overrides_runpath=no
17807706df26Smrg	;;
17817706df26Smrg      *)
17827706df26Smrg	shlibpath_overrides_runpath=yes
17837706df26Smrg	;;
17847706df26Smrg      esac
17857706df26Smrg  else
17867706df26Smrg    shlibpath_overrides_runpath=yes
17877706df26Smrg  fi
17887706df26Smrg  ;;
17897706df26Smrg
17907706df26Smrgos2*)
17917706df26Smrg  libname_spec='$name'
17927706df26Smrg  shrext_cmds=".dll"
17937706df26Smrg  need_lib_prefix=no
17947706df26Smrg  library_names_spec='$libname${shared_ext} $libname.a'
17957706df26Smrg  dynamic_linker='OS/2 ld.exe'
17967706df26Smrg  shlibpath_var=LIBPATH
17977706df26Smrg  ;;
17987706df26Smrg
17997706df26Smrgosf3* | osf4* | osf5*)
18007706df26Smrg  version_type=osf
18017706df26Smrg  need_lib_prefix=no
18027706df26Smrg  need_version=no
18037706df26Smrg  soname_spec='${libname}${release}${shared_ext}$major'
18047706df26Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18057706df26Smrg  shlibpath_var=LD_LIBRARY_PATH
18067706df26Smrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
18077706df26Smrg  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
18087706df26Smrg  ;;
18097706df26Smrg
1810047944f3Smrgrdos*)
1811047944f3Smrg  dynamic_linker=no
1812047944f3Smrg  ;;
1813047944f3Smrg
18147706df26Smrgsolaris*)
18157706df26Smrg  version_type=linux
18167706df26Smrg  need_lib_prefix=no
18177706df26Smrg  need_version=no
18187706df26Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18197706df26Smrg  soname_spec='${libname}${release}${shared_ext}$major'
18207706df26Smrg  shlibpath_var=LD_LIBRARY_PATH
18217706df26Smrg  shlibpath_overrides_runpath=yes
18227706df26Smrg  hardcode_into_libs=yes
18237706df26Smrg  # ldd complains unless libraries are executable
18247706df26Smrg  postinstall_cmds='chmod +x $lib'
18257706df26Smrg  ;;
18267706df26Smrg
18277706df26Smrgsunos4*)
18287706df26Smrg  version_type=sunos
18297706df26Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
18307706df26Smrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
18317706df26Smrg  shlibpath_var=LD_LIBRARY_PATH
18327706df26Smrg  shlibpath_overrides_runpath=yes
18337706df26Smrg  if test "$with_gnu_ld" = yes; then
18347706df26Smrg    need_lib_prefix=no
18357706df26Smrg  fi
18367706df26Smrg  need_version=yes
18377706df26Smrg  ;;
18387706df26Smrg
18397706df26Smrgsysv4 | sysv4.3*)
18407706df26Smrg  version_type=linux
18417706df26Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18427706df26Smrg  soname_spec='${libname}${release}${shared_ext}$major'
18437706df26Smrg  shlibpath_var=LD_LIBRARY_PATH
18447706df26Smrg  case $host_vendor in
18457706df26Smrg    sni)
18467706df26Smrg      shlibpath_overrides_runpath=no
18477706df26Smrg      need_lib_prefix=no
18487706df26Smrg      export_dynamic_flag_spec='${wl}-Blargedynsym'
18497706df26Smrg      runpath_var=LD_RUN_PATH
18507706df26Smrg      ;;
18517706df26Smrg    siemens)
18527706df26Smrg      need_lib_prefix=no
18537706df26Smrg      ;;
18547706df26Smrg    motorola)
18557706df26Smrg      need_lib_prefix=no
18567706df26Smrg      need_version=no
18577706df26Smrg      shlibpath_overrides_runpath=no
18587706df26Smrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
18597706df26Smrg      ;;
18607706df26Smrg  esac
18617706df26Smrg  ;;
18627706df26Smrg
18637706df26Smrgsysv4*MP*)
18647706df26Smrg  if test -d /usr/nec ;then
18657706df26Smrg    version_type=linux
18667706df26Smrg    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
18677706df26Smrg    soname_spec='$libname${shared_ext}.$major'
18687706df26Smrg    shlibpath_var=LD_LIBRARY_PATH
18697706df26Smrg  fi
18707706df26Smrg  ;;
18717706df26Smrg
18727706df26Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
18737706df26Smrg  version_type=freebsd-elf
18747706df26Smrg  need_lib_prefix=no
18757706df26Smrg  need_version=no
18767706df26Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
18777706df26Smrg  soname_spec='${libname}${release}${shared_ext}$major'
18787706df26Smrg  shlibpath_var=LD_LIBRARY_PATH
18797706df26Smrg  hardcode_into_libs=yes
18807706df26Smrg  if test "$with_gnu_ld" = yes; then
18817706df26Smrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
18827706df26Smrg    shlibpath_overrides_runpath=no
18837706df26Smrg  else
18847706df26Smrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
18857706df26Smrg    shlibpath_overrides_runpath=yes
18867706df26Smrg    case $host_os in
18877706df26Smrg      sco3.2v5*)
18887706df26Smrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
18897706df26Smrg	;;
18907706df26Smrg    esac
18917706df26Smrg  fi
18927706df26Smrg  sys_lib_dlsearch_path_spec='/usr/lib'
18937706df26Smrg  ;;
18947706df26Smrg
18957706df26Smrguts4*)
18967706df26Smrg  version_type=linux
18977706df26Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18987706df26Smrg  soname_spec='${libname}${release}${shared_ext}$major'
18997706df26Smrg  shlibpath_var=LD_LIBRARY_PATH
19007706df26Smrg  ;;
19017706df26Smrg
19027706df26Smrg*)
19037706df26Smrg  dynamic_linker=no
19047706df26Smrg  ;;
19057706df26Smrgesac
19067706df26SmrgAC_MSG_RESULT([$dynamic_linker])
19077706df26Smrgtest "$dynamic_linker" = no && can_build_shared=no
19087706df26Smrg
1909047944f3SmrgAC_CACHE_VAL([lt_cv_sys_lib_search_path_spec],
1910047944f3Smrg[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"])
1911047944f3Smrgsys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
1912047944f3SmrgAC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec],
1913047944f3Smrg[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"])
1914047944f3Smrgsys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
1915047944f3Smrg
19167706df26Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
19177706df26Smrgif test "$GCC" = yes; then
19187706df26Smrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
19197706df26Smrgfi
19207706df26Smrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
19217706df26Smrg
19227706df26Smrg
19237706df26Smrg# _LT_AC_TAGCONFIG
19247706df26Smrg# ----------------
19257706df26SmrgAC_DEFUN([_LT_AC_TAGCONFIG],
1926047944f3Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
1927047944f3SmrgAC_ARG_WITH([tags],
19287706df26Smrg    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
19297706df26Smrg        [include additional configurations @<:@automatic@:>@])],
19307706df26Smrg    [tagnames="$withval"])
19317706df26Smrg
19327706df26Smrgif test -f "$ltmain" && test -n "$tagnames"; then
19337706df26Smrg  if test ! -f "${ofile}"; then
19347706df26Smrg    AC_MSG_WARN([output file `$ofile' does not exist])
19357706df26Smrg  fi
19367706df26Smrg
19377706df26Smrg  if test -z "$LTCC"; then
19387706df26Smrg    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
19397706df26Smrg    if test -z "$LTCC"; then
19407706df26Smrg      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
19417706df26Smrg    else
19427706df26Smrg      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
19437706df26Smrg    fi
19447706df26Smrg  fi
19457706df26Smrg  if test -z "$LTCFLAGS"; then
19467706df26Smrg    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
19477706df26Smrg  fi
19487706df26Smrg
19497706df26Smrg  # Extract list of available tagged configurations in $ofile.
19507706df26Smrg  # Note that this assumes the entire list is on one line.
19517706df26Smrg  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
19527706df26Smrg
19537706df26Smrg  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
19547706df26Smrg  for tagname in $tagnames; do
19557706df26Smrg    IFS="$lt_save_ifs"
19567706df26Smrg    # Check whether tagname contains only valid characters
19577706df26Smrg    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
19587706df26Smrg    "") ;;
19597706df26Smrg    *)  AC_MSG_ERROR([invalid tag name: $tagname])
19607706df26Smrg	;;
19617706df26Smrg    esac
19627706df26Smrg
19637706df26Smrg    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
19647706df26Smrg    then
19657706df26Smrg      AC_MSG_ERROR([tag name \"$tagname\" already exists])
19667706df26Smrg    fi
19677706df26Smrg
19687706df26Smrg    # Update the list of available tags.
19697706df26Smrg    if test -n "$tagname"; then
19707706df26Smrg      echo appending configuration tag \"$tagname\" to $ofile
19717706df26Smrg
19727706df26Smrg      case $tagname in
19737706df26Smrg      CXX)
19747706df26Smrg	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
19757706df26Smrg	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
19767706df26Smrg	    (test "X$CXX" != "Xg++"))) ; then
19777706df26Smrg	  AC_LIBTOOL_LANG_CXX_CONFIG
19787706df26Smrg	else
19797706df26Smrg	  tagname=""
19807706df26Smrg	fi
19817706df26Smrg	;;
19827706df26Smrg
19837706df26Smrg      F77)
19847706df26Smrg	if test -n "$F77" && test "X$F77" != "Xno"; then
19857706df26Smrg	  AC_LIBTOOL_LANG_F77_CONFIG
19867706df26Smrg	else
19877706df26Smrg	  tagname=""
19887706df26Smrg	fi
19897706df26Smrg	;;
19907706df26Smrg
19917706df26Smrg      GCJ)
19927706df26Smrg	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
19937706df26Smrg	  AC_LIBTOOL_LANG_GCJ_CONFIG
19947706df26Smrg	else
19957706df26Smrg	  tagname=""
19967706df26Smrg	fi
19977706df26Smrg	;;
19987706df26Smrg
19997706df26Smrg      RC)
20007706df26Smrg	AC_LIBTOOL_LANG_RC_CONFIG
20017706df26Smrg	;;
20027706df26Smrg
20037706df26Smrg      *)
20047706df26Smrg	AC_MSG_ERROR([Unsupported tag name: $tagname])
20057706df26Smrg	;;
20067706df26Smrg      esac
20077706df26Smrg
20087706df26Smrg      # Append the new tag name to the list of available tags.
20097706df26Smrg      if test -n "$tagname" ; then
20107706df26Smrg      available_tags="$available_tags $tagname"
20117706df26Smrg    fi
20127706df26Smrg    fi
20137706df26Smrg  done
20147706df26Smrg  IFS="$lt_save_ifs"
20157706df26Smrg
20167706df26Smrg  # Now substitute the updated list of available tags.
20177706df26Smrg  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
20187706df26Smrg    mv "${ofile}T" "$ofile"
20197706df26Smrg    chmod +x "$ofile"
20207706df26Smrg  else
20217706df26Smrg    rm -f "${ofile}T"
20227706df26Smrg    AC_MSG_ERROR([unable to update list of available tagged configurations.])
20237706df26Smrg  fi
20247706df26Smrgfi
20257706df26Smrg])# _LT_AC_TAGCONFIG
20267706df26Smrg
20277706df26Smrg
20287706df26Smrg# AC_LIBTOOL_DLOPEN
20297706df26Smrg# -----------------
20307706df26Smrg# enable checks for dlopen support
20317706df26SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN],
20327706df26Smrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
20337706df26Smrg])# AC_LIBTOOL_DLOPEN
20347706df26Smrg
20357706df26Smrg
20367706df26Smrg# AC_LIBTOOL_WIN32_DLL
20377706df26Smrg# --------------------
20387706df26Smrg# declare package support for building win32 DLLs
20397706df26SmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL],
20407706df26Smrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
20417706df26Smrg])# AC_LIBTOOL_WIN32_DLL
20427706df26Smrg
20437706df26Smrg
20447706df26Smrg# AC_ENABLE_SHARED([DEFAULT])
20457706df26Smrg# ---------------------------
20467706df26Smrg# implement the --enable-shared flag
20477706df26Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
20487706df26SmrgAC_DEFUN([AC_ENABLE_SHARED],
20497706df26Smrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
20507706df26SmrgAC_ARG_ENABLE([shared],
20517706df26Smrg    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
20527706df26Smrg	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
20537706df26Smrg    [p=${PACKAGE-default}
20547706df26Smrg    case $enableval in
20557706df26Smrg    yes) enable_shared=yes ;;
20567706df26Smrg    no) enable_shared=no ;;
20577706df26Smrg    *)
20587706df26Smrg      enable_shared=no
20597706df26Smrg      # Look at the argument we got.  We use all the common list separators.
20607706df26Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
20617706df26Smrg      for pkg in $enableval; do
20627706df26Smrg	IFS="$lt_save_ifs"
20637706df26Smrg	if test "X$pkg" = "X$p"; then
20647706df26Smrg	  enable_shared=yes
20657706df26Smrg	fi
20667706df26Smrg      done
20677706df26Smrg      IFS="$lt_save_ifs"
20687706df26Smrg      ;;
20697706df26Smrg    esac],
20707706df26Smrg    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
20717706df26Smrg])# AC_ENABLE_SHARED
20727706df26Smrg
20737706df26Smrg
20747706df26Smrg# AC_DISABLE_SHARED
20757706df26Smrg# -----------------
20767706df26Smrg# set the default shared flag to --disable-shared
20777706df26SmrgAC_DEFUN([AC_DISABLE_SHARED],
20787706df26Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
20797706df26SmrgAC_ENABLE_SHARED(no)
20807706df26Smrg])# AC_DISABLE_SHARED
20817706df26Smrg
20827706df26Smrg
20837706df26Smrg# AC_ENABLE_STATIC([DEFAULT])
20847706df26Smrg# ---------------------------
20857706df26Smrg# implement the --enable-static flag
20867706df26Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
20877706df26SmrgAC_DEFUN([AC_ENABLE_STATIC],
20887706df26Smrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
20897706df26SmrgAC_ARG_ENABLE([static],
20907706df26Smrg    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
20917706df26Smrg	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
20927706df26Smrg    [p=${PACKAGE-default}
20937706df26Smrg    case $enableval in
20947706df26Smrg    yes) enable_static=yes ;;
20957706df26Smrg    no) enable_static=no ;;
20967706df26Smrg    *)
20977706df26Smrg     enable_static=no
20987706df26Smrg      # Look at the argument we got.  We use all the common list separators.
20997706df26Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
21007706df26Smrg      for pkg in $enableval; do
21017706df26Smrg	IFS="$lt_save_ifs"
21027706df26Smrg	if test "X$pkg" = "X$p"; then
21037706df26Smrg	  enable_static=yes
21047706df26Smrg	fi
21057706df26Smrg      done
21067706df26Smrg      IFS="$lt_save_ifs"
21077706df26Smrg      ;;
21087706df26Smrg    esac],
21097706df26Smrg    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
21107706df26Smrg])# AC_ENABLE_STATIC
21117706df26Smrg
21127706df26Smrg
21137706df26Smrg# AC_DISABLE_STATIC
21147706df26Smrg# -----------------
21157706df26Smrg# set the default static flag to --disable-static
21167706df26SmrgAC_DEFUN([AC_DISABLE_STATIC],
21177706df26Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
21187706df26SmrgAC_ENABLE_STATIC(no)
21197706df26Smrg])# AC_DISABLE_STATIC
21207706df26Smrg
21217706df26Smrg
21227706df26Smrg# AC_ENABLE_FAST_INSTALL([DEFAULT])
21237706df26Smrg# ---------------------------------
21247706df26Smrg# implement the --enable-fast-install flag
21257706df26Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
21267706df26SmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL],
21277706df26Smrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
21287706df26SmrgAC_ARG_ENABLE([fast-install],
21297706df26Smrg    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
21307706df26Smrg    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
21317706df26Smrg    [p=${PACKAGE-default}
21327706df26Smrg    case $enableval in
21337706df26Smrg    yes) enable_fast_install=yes ;;
21347706df26Smrg    no) enable_fast_install=no ;;
21357706df26Smrg    *)
21367706df26Smrg      enable_fast_install=no
21377706df26Smrg      # Look at the argument we got.  We use all the common list separators.
21387706df26Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
21397706df26Smrg      for pkg in $enableval; do
21407706df26Smrg	IFS="$lt_save_ifs"
21417706df26Smrg	if test "X$pkg" = "X$p"; then
21427706df26Smrg	  enable_fast_install=yes
21437706df26Smrg	fi
21447706df26Smrg      done
21457706df26Smrg      IFS="$lt_save_ifs"
21467706df26Smrg      ;;
21477706df26Smrg    esac],
21487706df26Smrg    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
21497706df26Smrg])# AC_ENABLE_FAST_INSTALL
21507706df26Smrg
21517706df26Smrg
21527706df26Smrg# AC_DISABLE_FAST_INSTALL
21537706df26Smrg# -----------------------
21547706df26Smrg# set the default to --disable-fast-install
21557706df26SmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL],
21567706df26Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
21577706df26SmrgAC_ENABLE_FAST_INSTALL(no)
21587706df26Smrg])# AC_DISABLE_FAST_INSTALL
21597706df26Smrg
21607706df26Smrg
21617706df26Smrg# AC_LIBTOOL_PICMODE([MODE])
21627706df26Smrg# --------------------------
21637706df26Smrg# implement the --with-pic flag
21647706df26Smrg# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
21657706df26SmrgAC_DEFUN([AC_LIBTOOL_PICMODE],
21667706df26Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
21677706df26Smrgpic_mode=ifelse($#,1,$1,default)
21687706df26Smrg])# AC_LIBTOOL_PICMODE
21697706df26Smrg
21707706df26Smrg
21717706df26Smrg# AC_PROG_EGREP
21727706df26Smrg# -------------
21737706df26Smrg# This is predefined starting with Autoconf 2.54, so this conditional
21747706df26Smrg# definition can be removed once we require Autoconf 2.54 or later.
21757706df26Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
21767706df26Smrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
21777706df26Smrg   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
21787706df26Smrg    then ac_cv_prog_egrep='grep -E'
21797706df26Smrg    else ac_cv_prog_egrep='egrep'
21807706df26Smrg    fi])
21817706df26Smrg EGREP=$ac_cv_prog_egrep
21827706df26Smrg AC_SUBST([EGREP])
21837706df26Smrg])])
21847706df26Smrg
21857706df26Smrg
21867706df26Smrg# AC_PATH_TOOL_PREFIX
21877706df26Smrg# -------------------
2188047944f3Smrg# find a file program which can recognize shared library
21897706df26SmrgAC_DEFUN([AC_PATH_TOOL_PREFIX],
21907706df26Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl
21917706df26SmrgAC_MSG_CHECKING([for $1])
21927706df26SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
21937706df26Smrg[case $MAGIC_CMD in
21947706df26Smrg[[\\/*] |  ?:[\\/]*])
21957706df26Smrg  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
21967706df26Smrg  ;;
21977706df26Smrg*)
21987706df26Smrg  lt_save_MAGIC_CMD="$MAGIC_CMD"
21997706df26Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
22007706df26Smrgdnl $ac_dummy forces splitting on constant user-supplied paths.
22017706df26Smrgdnl POSIX.2 word splitting is done only on the output of word expansions,
22027706df26Smrgdnl not every word.  This closes a longstanding sh security hole.
22037706df26Smrg  ac_dummy="ifelse([$2], , $PATH, [$2])"
22047706df26Smrg  for ac_dir in $ac_dummy; do
22057706df26Smrg    IFS="$lt_save_ifs"
22067706df26Smrg    test -z "$ac_dir" && ac_dir=.
22077706df26Smrg    if test -f $ac_dir/$1; then
22087706df26Smrg      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
22097706df26Smrg      if test -n "$file_magic_test_file"; then
22107706df26Smrg	case $deplibs_check_method in
22117706df26Smrg	"file_magic "*)
22127706df26Smrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
22137706df26Smrg	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
22147706df26Smrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
22157706df26Smrg	    $EGREP "$file_magic_regex" > /dev/null; then
22167706df26Smrg	    :
22177706df26Smrg	  else
22187706df26Smrg	    cat <<EOF 1>&2
22197706df26Smrg
22207706df26Smrg*** Warning: the command libtool uses to detect shared libraries,
22217706df26Smrg*** $file_magic_cmd, produces output that libtool cannot recognize.
22227706df26Smrg*** The result is that libtool may fail to recognize shared libraries
22237706df26Smrg*** as such.  This will affect the creation of libtool libraries that
22247706df26Smrg*** depend on shared libraries, but programs linked with such libtool
22257706df26Smrg*** libraries will work regardless of this problem.  Nevertheless, you
22267706df26Smrg*** may want to report the problem to your system manager and/or to
22277706df26Smrg*** bug-libtool@gnu.org
22287706df26Smrg
22297706df26SmrgEOF
22307706df26Smrg	  fi ;;
22317706df26Smrg	esac
22327706df26Smrg      fi
22337706df26Smrg      break
22347706df26Smrg    fi
22357706df26Smrg  done
22367706df26Smrg  IFS="$lt_save_ifs"
22377706df26Smrg  MAGIC_CMD="$lt_save_MAGIC_CMD"
22387706df26Smrg  ;;
22397706df26Smrgesac])
22407706df26SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
22417706df26Smrgif test -n "$MAGIC_CMD"; then
22427706df26Smrg  AC_MSG_RESULT($MAGIC_CMD)
22437706df26Smrgelse
22447706df26Smrg  AC_MSG_RESULT(no)
22457706df26Smrgfi
22467706df26Smrg])# AC_PATH_TOOL_PREFIX
22477706df26Smrg
22487706df26Smrg
22497706df26Smrg# AC_PATH_MAGIC
22507706df26Smrg# -------------
2251047944f3Smrg# find a file program which can recognize a shared library
22527706df26SmrgAC_DEFUN([AC_PATH_MAGIC],
22537706df26Smrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
22547706df26Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then
22557706df26Smrg  if test -n "$ac_tool_prefix"; then
22567706df26Smrg    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
22577706df26Smrg  else
22587706df26Smrg    MAGIC_CMD=:
22597706df26Smrg  fi
22607706df26Smrgfi
22617706df26Smrg])# AC_PATH_MAGIC
22627706df26Smrg
22637706df26Smrg
22647706df26Smrg# AC_PROG_LD
22657706df26Smrg# ----------
22667706df26Smrg# find the pathname to the GNU or non-GNU linker
22677706df26SmrgAC_DEFUN([AC_PROG_LD],
22687706df26Smrg[AC_ARG_WITH([gnu-ld],
22697706df26Smrg    [AC_HELP_STRING([--with-gnu-ld],
22707706df26Smrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
22717706df26Smrg    [test "$withval" = no || with_gnu_ld=yes],
22727706df26Smrg    [with_gnu_ld=no])
22737706df26SmrgAC_REQUIRE([LT_AC_PROG_SED])dnl
22747706df26SmrgAC_REQUIRE([AC_PROG_CC])dnl
22757706df26SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
22767706df26SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
22777706df26Smrgac_prog=ld
22787706df26Smrgif test "$GCC" = yes; then
22797706df26Smrg  # Check if gcc -print-prog-name=ld gives a path.
22807706df26Smrg  AC_MSG_CHECKING([for ld used by $CC])
22817706df26Smrg  case $host in
22827706df26Smrg  *-*-mingw*)
22837706df26Smrg    # gcc leaves a trailing carriage return which upsets mingw
22847706df26Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
22857706df26Smrg  *)
22867706df26Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
22877706df26Smrg  esac
22887706df26Smrg  case $ac_prog in
22897706df26Smrg    # Accept absolute paths.
22907706df26Smrg    [[\\/]]* | ?:[[\\/]]*)
22917706df26Smrg      re_direlt='/[[^/]][[^/]]*/\.\./'
22927706df26Smrg      # Canonicalize the pathname of ld
22937706df26Smrg      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
22947706df26Smrg      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
22957706df26Smrg	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
22967706df26Smrg      done
22977706df26Smrg      test -z "$LD" && LD="$ac_prog"
22987706df26Smrg      ;;
22997706df26Smrg  "")
23007706df26Smrg    # If it fails, then pretend we aren't using GCC.
23017706df26Smrg    ac_prog=ld
23027706df26Smrg    ;;
23037706df26Smrg  *)
23047706df26Smrg    # If it is relative, then search for the first ld in PATH.
23057706df26Smrg    with_gnu_ld=unknown
23067706df26Smrg    ;;
23077706df26Smrg  esac
23087706df26Smrgelif test "$with_gnu_ld" = yes; then
23097706df26Smrg  AC_MSG_CHECKING([for GNU ld])
23107706df26Smrgelse
23117706df26Smrg  AC_MSG_CHECKING([for non-GNU ld])
23127706df26Smrgfi
23137706df26SmrgAC_CACHE_VAL(lt_cv_path_LD,
23147706df26Smrg[if test -z "$LD"; then
23157706df26Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
23167706df26Smrg  for ac_dir in $PATH; do
23177706df26Smrg    IFS="$lt_save_ifs"
23187706df26Smrg    test -z "$ac_dir" && ac_dir=.
23197706df26Smrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
23207706df26Smrg      lt_cv_path_LD="$ac_dir/$ac_prog"
23217706df26Smrg      # Check to see if the program is GNU ld.  I'd rather use --version,
23227706df26Smrg      # but apparently some variants of GNU ld only accept -v.
23237706df26Smrg      # Break only if it was the GNU/non-GNU ld that we prefer.
23247706df26Smrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
23257706df26Smrg      *GNU* | *'with BFD'*)
23267706df26Smrg	test "$with_gnu_ld" != no && break
23277706df26Smrg	;;
23287706df26Smrg      *)
23297706df26Smrg	test "$with_gnu_ld" != yes && break
23307706df26Smrg	;;
23317706df26Smrg      esac
23327706df26Smrg    fi
23337706df26Smrg  done
23347706df26Smrg  IFS="$lt_save_ifs"
23357706df26Smrgelse
23367706df26Smrg  lt_cv_path_LD="$LD" # Let the user override the test with a path.
23377706df26Smrgfi])
23387706df26SmrgLD="$lt_cv_path_LD"
23397706df26Smrgif test -n "$LD"; then
23407706df26Smrg  AC_MSG_RESULT($LD)
23417706df26Smrgelse
23427706df26Smrg  AC_MSG_RESULT(no)
23437706df26Smrgfi
23447706df26Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
23457706df26SmrgAC_PROG_LD_GNU
23467706df26Smrg])# AC_PROG_LD
23477706df26Smrg
23487706df26Smrg
23497706df26Smrg# AC_PROG_LD_GNU
23507706df26Smrg# --------------
23517706df26SmrgAC_DEFUN([AC_PROG_LD_GNU],
23527706df26Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl
23537706df26SmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
23547706df26Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
23557706df26Smrgcase `$LD -v 2>&1 </dev/null` in
23567706df26Smrg*GNU* | *'with BFD'*)
23577706df26Smrg  lt_cv_prog_gnu_ld=yes
23587706df26Smrg  ;;
23597706df26Smrg*)
23607706df26Smrg  lt_cv_prog_gnu_ld=no
23617706df26Smrg  ;;
23627706df26Smrgesac])
23637706df26Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld
23647706df26Smrg])# AC_PROG_LD_GNU
23657706df26Smrg
23667706df26Smrg
23677706df26Smrg# AC_PROG_LD_RELOAD_FLAG
23687706df26Smrg# ----------------------
23697706df26Smrg# find reload flag for linker
23707706df26Smrg#   -- PORTME Some linkers may need a different reload flag.
23717706df26SmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
23727706df26Smrg[AC_CACHE_CHECK([for $LD option to reload object files],
23737706df26Smrg  lt_cv_ld_reload_flag,
23747706df26Smrg  [lt_cv_ld_reload_flag='-r'])
23757706df26Smrgreload_flag=$lt_cv_ld_reload_flag
23767706df26Smrgcase $reload_flag in
23777706df26Smrg"" | " "*) ;;
23787706df26Smrg*) reload_flag=" $reload_flag" ;;
23797706df26Smrgesac
23807706df26Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
23817706df26Smrgcase $host_os in
23827706df26Smrg  darwin*)
23837706df26Smrg    if test "$GCC" = yes; then
23847706df26Smrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
23857706df26Smrg    else
23867706df26Smrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
23877706df26Smrg    fi
23887706df26Smrg    ;;
23897706df26Smrgesac
23907706df26Smrg])# AC_PROG_LD_RELOAD_FLAG
23917706df26Smrg
23927706df26Smrg
23937706df26Smrg# AC_DEPLIBS_CHECK_METHOD
23947706df26Smrg# -----------------------
23957706df26Smrg# how to check for library dependencies
23967706df26Smrg#  -- PORTME fill in with the dynamic library characteristics
23977706df26SmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2398047944f3Smrg[AC_CACHE_CHECK([how to recognize dependent libraries],
23997706df26Smrglt_cv_deplibs_check_method,
24007706df26Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
24017706df26Smrglt_cv_file_magic_test_file=
24027706df26Smrglt_cv_deplibs_check_method='unknown'
24037706df26Smrg# Need to set the preceding variable on all platforms that support
24047706df26Smrg# interlibrary dependencies.
24057706df26Smrg# 'none' -- dependencies not supported.
24067706df26Smrg# `unknown' -- same as none, but documents that we really don't know.
24077706df26Smrg# 'pass_all' -- all dependencies passed with no checks.
24087706df26Smrg# 'test_compile' -- check by making test program.
24097706df26Smrg# 'file_magic [[regex]]' -- check by looking for files in library path
24107706df26Smrg# which responds to the $file_magic_cmd with a given extended regex.
24117706df26Smrg# If you have `file' or equivalent on your system and you're not sure
24127706df26Smrg# whether `pass_all' will *always* work, you probably want this one.
24137706df26Smrg
24147706df26Smrgcase $host_os in
2415047944f3Smrgaix[[4-9]]*)
24167706df26Smrg  lt_cv_deplibs_check_method=pass_all
24177706df26Smrg  ;;
24187706df26Smrg
24197706df26Smrgbeos*)
24207706df26Smrg  lt_cv_deplibs_check_method=pass_all
24217706df26Smrg  ;;
24227706df26Smrg
24237706df26Smrgbsdi[[45]]*)
24247706df26Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
24257706df26Smrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
24267706df26Smrg  lt_cv_file_magic_test_file=/shlib/libc.so
24277706df26Smrg  ;;
24287706df26Smrg
24297706df26Smrgcygwin*)
24307706df26Smrg  # func_win32_libid is a shell function defined in ltmain.sh
24317706df26Smrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
24327706df26Smrg  lt_cv_file_magic_cmd='func_win32_libid'
24337706df26Smrg  ;;
24347706df26Smrg
24357706df26Smrgmingw* | pw32*)
24367706df26Smrg  # Base MSYS/MinGW do not provide the 'file' command needed by
2437047944f3Smrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
2438047944f3Smrg  # unless we find 'file', for example because we are cross-compiling.
2439047944f3Smrg  if ( file / ) >/dev/null 2>&1; then
2440047944f3Smrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2441047944f3Smrg    lt_cv_file_magic_cmd='func_win32_libid'
2442047944f3Smrg  else
2443047944f3Smrg    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2444047944f3Smrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
2445047944f3Smrg  fi
24467706df26Smrg  ;;
24477706df26Smrg
24487706df26Smrgdarwin* | rhapsody*)
24497706df26Smrg  lt_cv_deplibs_check_method=pass_all
24507706df26Smrg  ;;
24517706df26Smrg
2452047944f3Smrgfreebsd* | dragonfly*)
24537706df26Smrg  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
24547706df26Smrg    case $host_cpu in
24557706df26Smrg    i*86 )
24567706df26Smrg      # Not sure whether the presence of OpenBSD here was a mistake.
24577706df26Smrg      # Let's accept both of them until this is cleared up.
24587706df26Smrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
24597706df26Smrg      lt_cv_file_magic_cmd=/usr/bin/file
24607706df26Smrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
24617706df26Smrg      ;;
24627706df26Smrg    esac
24637706df26Smrg  else
24647706df26Smrg    lt_cv_deplibs_check_method=pass_all
24657706df26Smrg  fi
24667706df26Smrg  ;;
24677706df26Smrg
24687706df26Smrggnu*)
24697706df26Smrg  lt_cv_deplibs_check_method=pass_all
24707706df26Smrg  ;;
24717706df26Smrg
24727706df26Smrghpux10.20* | hpux11*)
24737706df26Smrg  lt_cv_file_magic_cmd=/usr/bin/file
24747706df26Smrg  case $host_cpu in
24757706df26Smrg  ia64*)
24767706df26Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
24777706df26Smrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
24787706df26Smrg    ;;
24797706df26Smrg  hppa*64*)
24807706df26Smrg    [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]']
24817706df26Smrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
24827706df26Smrg    ;;
24837706df26Smrg  *)
24847706df26Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
24857706df26Smrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
24867706df26Smrg    ;;
24877706df26Smrg  esac
24887706df26Smrg  ;;
24897706df26Smrg
2490047944f3Smrginterix[[3-9]]*)
24917706df26Smrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
24927706df26Smrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
24937706df26Smrg  ;;
24947706df26Smrg
24957706df26Smrgirix5* | irix6* | nonstopux*)
24967706df26Smrg  case $LD in
24977706df26Smrg  *-32|*"-32 ") libmagic=32-bit;;
24987706df26Smrg  *-n32|*"-n32 ") libmagic=N32;;
24997706df26Smrg  *-64|*"-64 ") libmagic=64-bit;;
25007706df26Smrg  *) libmagic=never-match;;
25017706df26Smrg  esac
25027706df26Smrg  lt_cv_deplibs_check_method=pass_all
25037706df26Smrg  ;;
25047706df26Smrg
25057706df26Smrg# This must be Linux ELF.
2506047944f3Smrglinux* | k*bsd*-gnu)
25077706df26Smrg  lt_cv_deplibs_check_method=pass_all
25087706df26Smrg  ;;
25097706df26Smrg
25107706df26Smrgnetbsd*)
25117706df26Smrg  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
25127706df26Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
25137706df26Smrg  else
25147706df26Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
25157706df26Smrg  fi
25167706df26Smrg  ;;
25177706df26Smrg
25187706df26Smrgnewos6*)
25197706df26Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
25207706df26Smrg  lt_cv_file_magic_cmd=/usr/bin/file
25217706df26Smrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
25227706df26Smrg  ;;
25237706df26Smrg
25247706df26Smrgnto-qnx*)
25257706df26Smrg  lt_cv_deplibs_check_method=unknown
25267706df26Smrg  ;;
25277706df26Smrg
25287706df26Smrgopenbsd*)
25297706df26Smrg  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
25307706df26Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
25317706df26Smrg  else
25327706df26Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
25337706df26Smrg  fi
25347706df26Smrg  ;;
25357706df26Smrg
25367706df26Smrgosf3* | osf4* | osf5*)
25377706df26Smrg  lt_cv_deplibs_check_method=pass_all
25387706df26Smrg  ;;
25397706df26Smrg
2540047944f3Smrgrdos*)
2541047944f3Smrg  lt_cv_deplibs_check_method=pass_all
2542047944f3Smrg  ;;
2543047944f3Smrg
25447706df26Smrgsolaris*)
25457706df26Smrg  lt_cv_deplibs_check_method=pass_all
25467706df26Smrg  ;;
25477706df26Smrg
25487706df26Smrgsysv4 | sysv4.3*)
25497706df26Smrg  case $host_vendor in
25507706df26Smrg  motorola)
25517706df26Smrg    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]]'
25527706df26Smrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
25537706df26Smrg    ;;
25547706df26Smrg  ncr)
25557706df26Smrg    lt_cv_deplibs_check_method=pass_all
25567706df26Smrg    ;;
25577706df26Smrg  sequent)
25587706df26Smrg    lt_cv_file_magic_cmd='/bin/file'
25597706df26Smrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
25607706df26Smrg    ;;
25617706df26Smrg  sni)
25627706df26Smrg    lt_cv_file_magic_cmd='/bin/file'
25637706df26Smrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
25647706df26Smrg    lt_cv_file_magic_test_file=/lib/libc.so
25657706df26Smrg    ;;
25667706df26Smrg  siemens)
25677706df26Smrg    lt_cv_deplibs_check_method=pass_all
25687706df26Smrg    ;;
25697706df26Smrg  pc)
25707706df26Smrg    lt_cv_deplibs_check_method=pass_all
25717706df26Smrg    ;;
25727706df26Smrg  esac
25737706df26Smrg  ;;
25747706df26Smrg
25757706df26Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
25767706df26Smrg  lt_cv_deplibs_check_method=pass_all
25777706df26Smrg  ;;
25787706df26Smrgesac
25797706df26Smrg])
25807706df26Smrgfile_magic_cmd=$lt_cv_file_magic_cmd
25817706df26Smrgdeplibs_check_method=$lt_cv_deplibs_check_method
25827706df26Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
25837706df26Smrg])# AC_DEPLIBS_CHECK_METHOD
25847706df26Smrg
25857706df26Smrg
25867706df26Smrg# AC_PROG_NM
25877706df26Smrg# ----------
25887706df26Smrg# find the pathname to a BSD-compatible name lister
25897706df26SmrgAC_DEFUN([AC_PROG_NM],
25907706df26Smrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
25917706df26Smrg[if test -n "$NM"; then
25927706df26Smrg  # Let the user override the test.
25937706df26Smrg  lt_cv_path_NM="$NM"
25947706df26Smrgelse
25957706df26Smrg  lt_nm_to_check="${ac_tool_prefix}nm"
2596047944f3Smrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
25977706df26Smrg    lt_nm_to_check="$lt_nm_to_check nm"
25987706df26Smrg  fi
25997706df26Smrg  for lt_tmp_nm in $lt_nm_to_check; do
26007706df26Smrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
26017706df26Smrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
26027706df26Smrg      IFS="$lt_save_ifs"
26037706df26Smrg      test -z "$ac_dir" && ac_dir=.
26047706df26Smrg      tmp_nm="$ac_dir/$lt_tmp_nm"
26057706df26Smrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
26067706df26Smrg	# Check to see if the nm accepts a BSD-compat flag.
26077706df26Smrg	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
26087706df26Smrg	#   nm: unknown option "B" ignored
26097706df26Smrg	# Tru64's nm complains that /dev/null is an invalid object file
26107706df26Smrg	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
26117706df26Smrg	*/dev/null* | *'Invalid file or object type'*)
26127706df26Smrg	  lt_cv_path_NM="$tmp_nm -B"
26137706df26Smrg	  break
26147706df26Smrg	  ;;
26157706df26Smrg	*)
26167706df26Smrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
26177706df26Smrg	  */dev/null*)
26187706df26Smrg	    lt_cv_path_NM="$tmp_nm -p"
26197706df26Smrg	    break
26207706df26Smrg	    ;;
26217706df26Smrg	  *)
26227706df26Smrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
26237706df26Smrg	    continue # so that we can try to find one that supports BSD flags
26247706df26Smrg	    ;;
26257706df26Smrg	  esac
26267706df26Smrg	  ;;
26277706df26Smrg	esac
26287706df26Smrg      fi
26297706df26Smrg    done
26307706df26Smrg    IFS="$lt_save_ifs"
26317706df26Smrg  done
26327706df26Smrg  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
26337706df26Smrgfi])
26347706df26SmrgNM="$lt_cv_path_NM"
26357706df26Smrg])# AC_PROG_NM
26367706df26Smrg
26377706df26Smrg
26387706df26Smrg# AC_CHECK_LIBM
26397706df26Smrg# -------------
26407706df26Smrg# check for math library
26417706df26SmrgAC_DEFUN([AC_CHECK_LIBM],
26427706df26Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
26437706df26SmrgLIBM=
26447706df26Smrgcase $host in
26457706df26Smrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
26467706df26Smrg  # These system don't have libm, or don't need it
26477706df26Smrg  ;;
26487706df26Smrg*-ncr-sysv4.3*)
26497706df26Smrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
26507706df26Smrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
26517706df26Smrg  ;;
26527706df26Smrg*)
26537706df26Smrg  AC_CHECK_LIB(m, cos, LIBM="-lm")
26547706df26Smrg  ;;
26557706df26Smrgesac
26567706df26Smrg])# AC_CHECK_LIBM
26577706df26Smrg
26587706df26Smrg
26597706df26Smrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
26607706df26Smrg# -----------------------------------
26617706df26Smrg# sets LIBLTDL to the link flags for the libltdl convenience library and
26627706df26Smrg# LTDLINCL to the include flags for the libltdl header and adds
26637706df26Smrg# --enable-ltdl-convenience to the configure arguments.  Note that
26647706df26Smrg# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
26657706df26Smrg# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
26667706df26Smrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
26677706df26Smrg# (note the single quotes!).  If your package is not flat and you're not
26687706df26Smrg# using automake, define top_builddir and top_srcdir appropriately in
26697706df26Smrg# the Makefiles.
26707706df26SmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE],
26717706df26Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
26727706df26Smrg  case $enable_ltdl_convenience in
26737706df26Smrg  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
26747706df26Smrg  "") enable_ltdl_convenience=yes
26757706df26Smrg      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
26767706df26Smrg  esac
26777706df26Smrg  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
26787706df26Smrg  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
26797706df26Smrg  # For backwards non-gettext consistent compatibility...
26807706df26Smrg  INCLTDL="$LTDLINCL"
26817706df26Smrg])# AC_LIBLTDL_CONVENIENCE
26827706df26Smrg
26837706df26Smrg
26847706df26Smrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
26857706df26Smrg# -----------------------------------
26867706df26Smrg# sets LIBLTDL to the link flags for the libltdl installable library and
26877706df26Smrg# LTDLINCL to the include flags for the libltdl header and adds
26887706df26Smrg# --enable-ltdl-install to the configure arguments.  Note that
26897706df26Smrg# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
26907706df26Smrg# and an installed libltdl is not found, it is assumed to be `libltdl'.
26917706df26Smrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
26927706df26Smrg# '${top_srcdir}/' (note the single quotes!).  If your package is not
26937706df26Smrg# flat and you're not using automake, define top_builddir and top_srcdir
26947706df26Smrg# appropriately in the Makefiles.
26957706df26Smrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
26967706df26SmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE],
26977706df26Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
26987706df26Smrg  AC_CHECK_LIB(ltdl, lt_dlinit,
26997706df26Smrg  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
27007706df26Smrg  [if test x"$enable_ltdl_install" = xno; then
27017706df26Smrg     AC_MSG_WARN([libltdl not installed, but installation disabled])
27027706df26Smrg   else
27037706df26Smrg     enable_ltdl_install=yes
27047706df26Smrg   fi
27057706df26Smrg  ])
27067706df26Smrg  if test x"$enable_ltdl_install" = x"yes"; then
27077706df26Smrg    ac_configure_args="$ac_configure_args --enable-ltdl-install"
27087706df26Smrg    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
27097706df26Smrg    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
27107706df26Smrg  else
27117706df26Smrg    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
27127706df26Smrg    LIBLTDL="-lltdl"
27137706df26Smrg    LTDLINCL=
27147706df26Smrg  fi
27157706df26Smrg  # For backwards non-gettext consistent compatibility...
27167706df26Smrg  INCLTDL="$LTDLINCL"
27177706df26Smrg])# AC_LIBLTDL_INSTALLABLE
27187706df26Smrg
27197706df26Smrg
27207706df26Smrg# AC_LIBTOOL_CXX
27217706df26Smrg# --------------
27227706df26Smrg# enable support for C++ libraries
27237706df26SmrgAC_DEFUN([AC_LIBTOOL_CXX],
27247706df26Smrg[AC_REQUIRE([_LT_AC_LANG_CXX])
27257706df26Smrg])# AC_LIBTOOL_CXX
27267706df26Smrg
27277706df26Smrg
27287706df26Smrg# _LT_AC_LANG_CXX
27297706df26Smrg# ---------------
27307706df26SmrgAC_DEFUN([_LT_AC_LANG_CXX],
27317706df26Smrg[AC_REQUIRE([AC_PROG_CXX])
27327706df26SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP])
27337706df26Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
27347706df26Smrg])# _LT_AC_LANG_CXX
27357706df26Smrg
27367706df26Smrg# _LT_AC_PROG_CXXCPP
27377706df26Smrg# ------------------
27387706df26SmrgAC_DEFUN([_LT_AC_PROG_CXXCPP],
27397706df26Smrg[
27407706df26SmrgAC_REQUIRE([AC_PROG_CXX])
27417706df26Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
27427706df26Smrg    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
27437706df26Smrg    (test "X$CXX" != "Xg++"))) ; then
27447706df26Smrg  AC_PROG_CXXCPP
27457706df26Smrgfi
27467706df26Smrg])# _LT_AC_PROG_CXXCPP
27477706df26Smrg
27487706df26Smrg# AC_LIBTOOL_F77
27497706df26Smrg# --------------
27507706df26Smrg# enable support for Fortran 77 libraries
27517706df26SmrgAC_DEFUN([AC_LIBTOOL_F77],
27527706df26Smrg[AC_REQUIRE([_LT_AC_LANG_F77])
27537706df26Smrg])# AC_LIBTOOL_F77
27547706df26Smrg
27557706df26Smrg
27567706df26Smrg# _LT_AC_LANG_F77
27577706df26Smrg# ---------------
27587706df26SmrgAC_DEFUN([_LT_AC_LANG_F77],
27597706df26Smrg[AC_REQUIRE([AC_PROG_F77])
27607706df26Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
27617706df26Smrg])# _LT_AC_LANG_F77
27627706df26Smrg
27637706df26Smrg
27647706df26Smrg# AC_LIBTOOL_GCJ
27657706df26Smrg# --------------
27667706df26Smrg# enable support for GCJ libraries
27677706df26SmrgAC_DEFUN([AC_LIBTOOL_GCJ],
27687706df26Smrg[AC_REQUIRE([_LT_AC_LANG_GCJ])
27697706df26Smrg])# AC_LIBTOOL_GCJ
27707706df26Smrg
27717706df26Smrg
27727706df26Smrg# _LT_AC_LANG_GCJ
27737706df26Smrg# ---------------
27747706df26SmrgAC_DEFUN([_LT_AC_LANG_GCJ],
27757706df26Smrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
27767706df26Smrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
27777706df26Smrg    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
27787706df26Smrg      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
27797706df26Smrg	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
27807706df26Smrg	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
27817706df26Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
27827706df26Smrg])# _LT_AC_LANG_GCJ
27837706df26Smrg
27847706df26Smrg
27857706df26Smrg# AC_LIBTOOL_RC
27867706df26Smrg# -------------
27877706df26Smrg# enable support for Windows resource files
27887706df26SmrgAC_DEFUN([AC_LIBTOOL_RC],
27897706df26Smrg[AC_REQUIRE([LT_AC_PROG_RC])
27907706df26Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
27917706df26Smrg])# AC_LIBTOOL_RC
27927706df26Smrg
27937706df26Smrg
27947706df26Smrg# AC_LIBTOOL_LANG_C_CONFIG
27957706df26Smrg# ------------------------
27967706df26Smrg# Ensure that the configuration vars for the C compiler are
27977706df26Smrg# suitably defined.  Those variables are subsequently used by
27987706df26Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
27997706df26SmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
28007706df26SmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG],
28017706df26Smrg[lt_save_CC="$CC"
28027706df26SmrgAC_LANG_PUSH(C)
28037706df26Smrg
28047706df26Smrg# Source file extension for C test sources.
28057706df26Smrgac_ext=c
28067706df26Smrg
28077706df26Smrg# Object file extension for compiled C test sources.
28087706df26Smrgobjext=o
28097706df26Smrg_LT_AC_TAGVAR(objext, $1)=$objext
28107706df26Smrg
28117706df26Smrg# Code to be used in simple compile tests
2812047944f3Smrglt_simple_compile_test_code="int some_variable = 0;"
28137706df26Smrg
28147706df26Smrg# Code to be used in simple link tests
2815047944f3Smrglt_simple_link_test_code='int main(){return(0);}'
28167706df26Smrg
28177706df26Smrg_LT_AC_SYS_COMPILER
28187706df26Smrg
28197706df26Smrg# save warnings/boilerplate of simple test code
28207706df26Smrg_LT_COMPILER_BOILERPLATE
28217706df26Smrg_LT_LINKER_BOILERPLATE
28227706df26Smrg
28237706df26SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
28247706df26SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
28257706df26SmrgAC_LIBTOOL_PROG_CC_C_O($1)
28267706df26SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
28277706df26SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
28287706df26SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
28297706df26SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
28307706df26SmrgAC_LIBTOOL_SYS_LIB_STRIP
28317706df26SmrgAC_LIBTOOL_DLOPEN_SELF
28327706df26Smrg
28337706df26Smrg# Report which library types will actually be built
28347706df26SmrgAC_MSG_CHECKING([if libtool supports shared libraries])
28357706df26SmrgAC_MSG_RESULT([$can_build_shared])
28367706df26Smrg
28377706df26SmrgAC_MSG_CHECKING([whether to build shared libraries])
28387706df26Smrgtest "$can_build_shared" = "no" && enable_shared=no
28397706df26Smrg
28407706df26Smrg# On AIX, shared libraries and static libraries use the same namespace, and
28417706df26Smrg# are all built from PIC.
28427706df26Smrgcase $host_os in
28437706df26Smrgaix3*)
28447706df26Smrg  test "$enable_shared" = yes && enable_static=no
28457706df26Smrg  if test -n "$RANLIB"; then
28467706df26Smrg    archive_cmds="$archive_cmds~\$RANLIB \$lib"
28477706df26Smrg    postinstall_cmds='$RANLIB $lib'
28487706df26Smrg  fi
28497706df26Smrg  ;;
28507706df26Smrg
2851047944f3Smrgaix[[4-9]]*)
28527706df26Smrg  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
28537706df26Smrg    test "$enable_shared" = yes && enable_static=no
28547706df26Smrg  fi
28557706df26Smrg    ;;
28567706df26Smrgesac
28577706df26SmrgAC_MSG_RESULT([$enable_shared])
28587706df26Smrg
28597706df26SmrgAC_MSG_CHECKING([whether to build static libraries])
28607706df26Smrg# Make sure either enable_shared or enable_static is yes.
28617706df26Smrgtest "$enable_shared" = yes || enable_static=yes
28627706df26SmrgAC_MSG_RESULT([$enable_static])
28637706df26Smrg
28647706df26SmrgAC_LIBTOOL_CONFIG($1)
28657706df26Smrg
28667706df26SmrgAC_LANG_POP
28677706df26SmrgCC="$lt_save_CC"
28687706df26Smrg])# AC_LIBTOOL_LANG_C_CONFIG
28697706df26Smrg
28707706df26Smrg
28717706df26Smrg# AC_LIBTOOL_LANG_CXX_CONFIG
28727706df26Smrg# --------------------------
28737706df26Smrg# Ensure that the configuration vars for the C compiler are
28747706df26Smrg# suitably defined.  Those variables are subsequently used by
28757706df26Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
28767706df26SmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
28777706df26SmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
28787706df26Smrg[AC_LANG_PUSH(C++)
28797706df26SmrgAC_REQUIRE([AC_PROG_CXX])
28807706df26SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP])
28817706df26Smrg
28827706df26Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
28837706df26Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)=
28847706df26Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no
28857706df26Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
28867706df26Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
28877706df26Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no
28887706df26Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
28897706df26Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
28907706df26Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
28917706df26Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
28927706df26Smrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
28937706df26Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no
28947706df26Smrg_LT_AC_TAGVAR(module_cmds, $1)=
28957706df26Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)=
28967706df26Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
28977706df26Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
28987706df26Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)=
28997706df26Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
29007706df26Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
29017706df26Smrg
29027706df26Smrg# Dependencies to place before and after the object being linked:
29037706df26Smrg_LT_AC_TAGVAR(predep_objects, $1)=
29047706df26Smrg_LT_AC_TAGVAR(postdep_objects, $1)=
29057706df26Smrg_LT_AC_TAGVAR(predeps, $1)=
29067706df26Smrg_LT_AC_TAGVAR(postdeps, $1)=
29077706df26Smrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
2908047944f3Smrg_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
29097706df26Smrg
29107706df26Smrg# Source file extension for C++ test sources.
29117706df26Smrgac_ext=cpp
29127706df26Smrg
29137706df26Smrg# Object file extension for compiled C++ test sources.
29147706df26Smrgobjext=o
29157706df26Smrg_LT_AC_TAGVAR(objext, $1)=$objext
29167706df26Smrg
29177706df26Smrg# Code to be used in simple compile tests
2918047944f3Smrglt_simple_compile_test_code="int some_variable = 0;"
29197706df26Smrg
29207706df26Smrg# Code to be used in simple link tests
2921047944f3Smrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
29227706df26Smrg
29237706df26Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
29247706df26Smrg_LT_AC_SYS_COMPILER
29257706df26Smrg
29267706df26Smrg# save warnings/boilerplate of simple test code
29277706df26Smrg_LT_COMPILER_BOILERPLATE
29287706df26Smrg_LT_LINKER_BOILERPLATE
29297706df26Smrg
29307706df26Smrg# Allow CC to be a program name with arguments.
29317706df26Smrglt_save_CC=$CC
29327706df26Smrglt_save_LD=$LD
29337706df26Smrglt_save_GCC=$GCC
29347706df26SmrgGCC=$GXX
29357706df26Smrglt_save_with_gnu_ld=$with_gnu_ld
29367706df26Smrglt_save_path_LD=$lt_cv_path_LD
29377706df26Smrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
29387706df26Smrg  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
29397706df26Smrgelse
29407706df26Smrg  $as_unset lt_cv_prog_gnu_ld
29417706df26Smrgfi
29427706df26Smrgif test -n "${lt_cv_path_LDCXX+set}"; then
29437706df26Smrg  lt_cv_path_LD=$lt_cv_path_LDCXX
29447706df26Smrgelse
29457706df26Smrg  $as_unset lt_cv_path_LD
29467706df26Smrgfi
29477706df26Smrgtest -z "${LDCXX+set}" || LD=$LDCXX
29487706df26SmrgCC=${CXX-"c++"}
29497706df26Smrgcompiler=$CC
29507706df26Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
29517706df26Smrg_LT_CC_BASENAME([$compiler])
29527706df26Smrg
29537706df26Smrg# We don't want -fno-exception wen compiling C++ code, so set the
29547706df26Smrg# no_builtin_flag separately
29557706df26Smrgif test "$GXX" = yes; then
29567706df26Smrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
29577706df26Smrgelse
29587706df26Smrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
29597706df26Smrgfi
29607706df26Smrg
29617706df26Smrgif test "$GXX" = yes; then
29627706df26Smrg  # Set up default GNU C++ configuration
29637706df26Smrg
29647706df26Smrg  AC_PROG_LD
29657706df26Smrg
29667706df26Smrg  # Check if GNU C++ uses GNU ld as the underlying linker, since the
29677706df26Smrg  # archiving commands below assume that GNU ld is being used.
29687706df26Smrg  if test "$with_gnu_ld" = yes; then
29697706df26Smrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
29707706df26Smrg    _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'
29717706df26Smrg
29727706df26Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
29737706df26Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
29747706df26Smrg
29757706df26Smrg    # If archive_cmds runs LD, not CC, wlarc should be empty
29767706df26Smrg    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
29777706df26Smrg    #     investigate it a little bit more. (MM)
29787706df26Smrg    wlarc='${wl}'
29797706df26Smrg
29807706df26Smrg    # ancient GNU ld didn't support --whole-archive et. al.
29817706df26Smrg    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
29827706df26Smrg	grep 'no-whole-archive' > /dev/null; then
29837706df26Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
29847706df26Smrg    else
29857706df26Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
29867706df26Smrg    fi
29877706df26Smrg  else
29887706df26Smrg    with_gnu_ld=no
29897706df26Smrg    wlarc=
29907706df26Smrg
29917706df26Smrg    # A generic and very simple default shared library creation
29927706df26Smrg    # command for GNU C++ for the case where it uses the native
29937706df26Smrg    # linker, instead of GNU ld.  If possible, this setting should
29947706df26Smrg    # overridden to take advantage of the native linker features on
29957706df26Smrg    # the platform it is being used on.
29967706df26Smrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
29977706df26Smrg  fi
29987706df26Smrg
29997706df26Smrg  # Commands to make compiler produce verbose output that lists
30007706df26Smrg  # what "hidden" libraries, object files and flags are used when
30017706df26Smrg  # linking a shared library.
30027706df26Smrg  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
30037706df26Smrg
30047706df26Smrgelse
30057706df26Smrg  GXX=no
30067706df26Smrg  with_gnu_ld=no
30077706df26Smrg  wlarc=
30087706df26Smrgfi
30097706df26Smrg
30107706df26Smrg# PORTME: fill in a description of your system's C++ link characteristics
30117706df26SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
30127706df26Smrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes
30137706df26Smrgcase $host_os in
30147706df26Smrg  aix3*)
30157706df26Smrg    # FIXME: insert proper C++ library support
30167706df26Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
30177706df26Smrg    ;;
3018047944f3Smrg  aix[[4-9]]*)
30197706df26Smrg    if test "$host_cpu" = ia64; then
30207706df26Smrg      # On IA64, the linker does run time linking by default, so we don't
30217706df26Smrg      # have to do anything special.
30227706df26Smrg      aix_use_runtimelinking=no
30237706df26Smrg      exp_sym_flag='-Bexport'
30247706df26Smrg      no_entry_flag=""
30257706df26Smrg    else
30267706df26Smrg      aix_use_runtimelinking=no
30277706df26Smrg
30287706df26Smrg      # Test if we are trying to use run time linking or normal
30297706df26Smrg      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
30307706df26Smrg      # need to do runtime linking.
3031047944f3Smrg      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
30327706df26Smrg	for ld_flag in $LDFLAGS; do
30337706df26Smrg	  case $ld_flag in
30347706df26Smrg	  *-brtl*)
30357706df26Smrg	    aix_use_runtimelinking=yes
30367706df26Smrg	    break
30377706df26Smrg	    ;;
30387706df26Smrg	  esac
30397706df26Smrg	done
30407706df26Smrg	;;
30417706df26Smrg      esac
30427706df26Smrg
30437706df26Smrg      exp_sym_flag='-bexport'
30447706df26Smrg      no_entry_flag='-bnoentry'
30457706df26Smrg    fi
30467706df26Smrg
30477706df26Smrg    # When large executables or shared objects are built, AIX ld can
30487706df26Smrg    # have problems creating the table of contents.  If linking a library
30497706df26Smrg    # or program results in "error TOC overflow" add -mminimal-toc to
30507706df26Smrg    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
30517706df26Smrg    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
30527706df26Smrg
30537706df26Smrg    _LT_AC_TAGVAR(archive_cmds, $1)=''
30547706df26Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
30557706df26Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
30567706df26Smrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
30577706df26Smrg
30587706df26Smrg    if test "$GXX" = yes; then
30597706df26Smrg      case $host_os in aix4.[[012]]|aix4.[[012]].*)
30607706df26Smrg      # We only want to do this on AIX 4.2 and lower, the check
30617706df26Smrg      # below for broken collect2 doesn't work under 4.3+
30627706df26Smrg	collect2name=`${CC} -print-prog-name=collect2`
30637706df26Smrg	if test -f "$collect2name" && \
30647706df26Smrg	   strings "$collect2name" | grep resolve_lib_name >/dev/null
30657706df26Smrg	then
30667706df26Smrg	  # We have reworked collect2
3067047944f3Smrg	  :
30687706df26Smrg	else
30697706df26Smrg	  # We have old collect2
30707706df26Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
30717706df26Smrg	  # It fails to find uninstalled libraries when the uninstalled
30727706df26Smrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
30737706df26Smrg	  # to unsupported forces relinking
30747706df26Smrg	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
30757706df26Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
30767706df26Smrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
30777706df26Smrg	fi
30787706df26Smrg	;;
30797706df26Smrg      esac
30807706df26Smrg      shared_flag='-shared'
30817706df26Smrg      if test "$aix_use_runtimelinking" = yes; then
30827706df26Smrg	shared_flag="$shared_flag "'${wl}-G'
30837706df26Smrg      fi
30847706df26Smrg    else
30857706df26Smrg      # not using gcc
30867706df26Smrg      if test "$host_cpu" = ia64; then
30877706df26Smrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
30887706df26Smrg	# chokes on -Wl,-G. The following line is correct:
30897706df26Smrg	shared_flag='-G'
30907706df26Smrg      else
30917706df26Smrg	if test "$aix_use_runtimelinking" = yes; then
30927706df26Smrg	  shared_flag='${wl}-G'
30937706df26Smrg	else
30947706df26Smrg	  shared_flag='${wl}-bM:SRE'
30957706df26Smrg	fi
30967706df26Smrg      fi
30977706df26Smrg    fi
30987706df26Smrg
30997706df26Smrg    # It seems that -bexpall does not export symbols beginning with
31007706df26Smrg    # underscore (_), so it is better to generate a list of symbols to export.
31017706df26Smrg    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
31027706df26Smrg    if test "$aix_use_runtimelinking" = yes; then
31037706df26Smrg      # Warning - without using the other runtime loading flags (-brtl),
31047706df26Smrg      # -berok will link without error, but may produce a broken library.
31057706df26Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
31067706df26Smrg      # Determine the default libpath from the value encoded in an empty executable.
31077706df26Smrg      _LT_AC_SYS_LIBPATH_AIX
31087706df26Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
31097706df26Smrg
31107706df26Smrg      _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"
31117706df26Smrg     else
31127706df26Smrg      if test "$host_cpu" = ia64; then
31137706df26Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
31147706df26Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
31157706df26Smrg	_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"
31167706df26Smrg      else
31177706df26Smrg	# Determine the default libpath from the value encoded in an empty executable.
31187706df26Smrg	_LT_AC_SYS_LIBPATH_AIX
31197706df26Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
31207706df26Smrg	# Warning - without using the other run time loading flags,
31217706df26Smrg	# -berok will link without error, but may produce a broken library.
31227706df26Smrg	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
31237706df26Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
31247706df26Smrg	# Exported symbols can be pulled into shared objects from archives
31257706df26Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
31267706df26Smrg	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
31277706df26Smrg	# This is similar to how AIX traditionally builds its shared libraries.
31287706df26Smrg	_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'
31297706df26Smrg      fi
31307706df26Smrg    fi
31317706df26Smrg    ;;
31327706df26Smrg
31337706df26Smrg  beos*)
31347706df26Smrg    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
31357706df26Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
31367706df26Smrg      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
31377706df26Smrg      # support --undefined.  This deserves some investigation.  FIXME
31387706df26Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
31397706df26Smrg    else
31407706df26Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
31417706df26Smrg    fi
31427706df26Smrg    ;;
31437706df26Smrg
31447706df26Smrg  chorus*)
31457706df26Smrg    case $cc_basename in
31467706df26Smrg      *)
31477706df26Smrg	# FIXME: insert proper C++ library support
31487706df26Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
31497706df26Smrg	;;
31507706df26Smrg    esac
31517706df26Smrg    ;;
31527706df26Smrg
31537706df26Smrg  cygwin* | mingw* | pw32*)
31547706df26Smrg    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
31557706df26Smrg    # as there is no search path for DLLs.
31567706df26Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
31577706df26Smrg    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
31587706df26Smrg    _LT_AC_TAGVAR(always_export_symbols, $1)=no
31597706df26Smrg    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
31607706df26Smrg
31617706df26Smrg    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
31627706df26Smrg      _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'
31637706df26Smrg      # If the export-symbols file already is a .def file (1st line
31647706df26Smrg      # is EXPORTS), use it as is; otherwise, prepend...
31657706df26Smrg      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
31667706df26Smrg	cp $export_symbols $output_objdir/$soname.def;
31677706df26Smrg      else
31687706df26Smrg	echo EXPORTS > $output_objdir/$soname.def;
31697706df26Smrg	cat $export_symbols >> $output_objdir/$soname.def;
31707706df26Smrg      fi~
31717706df26Smrg      $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'
31727706df26Smrg    else
31737706df26Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
31747706df26Smrg    fi
31757706df26Smrg  ;;
31767706df26Smrg      darwin* | rhapsody*)
31777706df26Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
31787706df26Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
31797706df26Smrg      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
31807706df26Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
31817706df26Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
31827706df26Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3183047944f3Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
3184047944f3Smrg      if test "$GXX" = yes ; then
31857706df26Smrg      output_verbose_link_cmd='echo'
3186047944f3Smrg      _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
3187047944f3Smrg      _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
3188047944f3Smrg      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
3189047944f3Smrg      _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
3190047944f3Smrg      if test "$lt_cv_apple_cc_single_mod" != "yes"; then
3191047944f3Smrg        _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
3192047944f3Smrg        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
31937706df26Smrg      fi
31947706df26Smrg      else
31957706df26Smrg      case $cc_basename in
31967706df26Smrg        xlc*)
31977706df26Smrg         output_verbose_link_cmd='echo'
3198047944f3Smrg          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
31997706df26Smrg          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
32007706df26Smrg          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3201047944f3Smrg          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
32027706df26Smrg          _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}'
32037706df26Smrg          ;;
32047706df26Smrg       *)
32057706df26Smrg         _LT_AC_TAGVAR(ld_shlibs, $1)=no
32067706df26Smrg          ;;
32077706df26Smrg      esac
32087706df26Smrg      fi
32097706df26Smrg        ;;
32107706df26Smrg
32117706df26Smrg  dgux*)
32127706df26Smrg    case $cc_basename in
32137706df26Smrg      ec++*)
32147706df26Smrg	# FIXME: insert proper C++ library support
32157706df26Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
32167706df26Smrg	;;
32177706df26Smrg      ghcx*)
32187706df26Smrg	# Green Hills C++ Compiler
32197706df26Smrg	# FIXME: insert proper C++ library support
32207706df26Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
32217706df26Smrg	;;
32227706df26Smrg      *)
32237706df26Smrg	# FIXME: insert proper C++ library support
32247706df26Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
32257706df26Smrg	;;
32267706df26Smrg    esac
32277706df26Smrg    ;;
32287706df26Smrg  freebsd[[12]]*)
32297706df26Smrg    # C++ shared libraries reported to be fairly broken before switch to ELF
32307706df26Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
32317706df26Smrg    ;;
32327706df26Smrg  freebsd-elf*)
32337706df26Smrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
32347706df26Smrg    ;;
3235047944f3Smrg  freebsd* | dragonfly*)
32367706df26Smrg    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
32377706df26Smrg    # conventions
32387706df26Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
32397706df26Smrg    ;;
32407706df26Smrg  gnu*)
32417706df26Smrg    ;;
32427706df26Smrg  hpux9*)
32437706df26Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
32447706df26Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
32457706df26Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
32467706df26Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
32477706df26Smrg    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
32487706df26Smrg				# but as the default
32497706df26Smrg				# location of the library.
32507706df26Smrg
32517706df26Smrg    case $cc_basename in
32527706df26Smrg    CC*)
32537706df26Smrg      # FIXME: insert proper C++ library support
32547706df26Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
32557706df26Smrg      ;;
32567706df26Smrg    aCC*)
32577706df26Smrg      _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'
32587706df26Smrg      # Commands to make compiler produce verbose output that lists
32597706df26Smrg      # what "hidden" libraries, object files and flags are used when
32607706df26Smrg      # linking a shared library.
32617706df26Smrg      #
32627706df26Smrg      # There doesn't appear to be a way to prevent this compiler from
32637706df26Smrg      # explicitly linking system object files so we need to strip them
32647706df26Smrg      # from the output so that they don't get included in the library
32657706df26Smrg      # dependencies.
32667706df26Smrg      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'
32677706df26Smrg      ;;
32687706df26Smrg    *)
32697706df26Smrg      if test "$GXX" = yes; then
32707706df26Smrg        _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'
32717706df26Smrg      else
32727706df26Smrg        # FIXME: insert proper C++ library support
32737706df26Smrg        _LT_AC_TAGVAR(ld_shlibs, $1)=no
32747706df26Smrg      fi
32757706df26Smrg      ;;
32767706df26Smrg    esac
32777706df26Smrg    ;;
32787706df26Smrg  hpux10*|hpux11*)
32797706df26Smrg    if test $with_gnu_ld = no; then
32807706df26Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
32817706df26Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
32827706df26Smrg
32837706df26Smrg      case $host_cpu in
3284047944f3Smrg      hppa*64*|ia64*) ;;
32857706df26Smrg      *)
32867706df26Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
32877706df26Smrg        ;;
32887706df26Smrg      esac
32897706df26Smrg    fi
32907706df26Smrg    case $host_cpu in
32917706df26Smrg    hppa*64*|ia64*)
32927706df26Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
32937706df26Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
32947706df26Smrg      ;;
32957706df26Smrg    *)
32967706df26Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
32977706df26Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
32987706df26Smrg					      # but as the default
32997706df26Smrg					      # location of the library.
33007706df26Smrg      ;;
33017706df26Smrg    esac
33027706df26Smrg
33037706df26Smrg    case $cc_basename in
33047706df26Smrg      CC*)
33057706df26Smrg	# FIXME: insert proper C++ library support
33067706df26Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
33077706df26Smrg	;;
33087706df26Smrg      aCC*)
33097706df26Smrg	case $host_cpu in
33107706df26Smrg	hppa*64*)
33117706df26Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
33127706df26Smrg	  ;;
33137706df26Smrg	ia64*)
33147706df26Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
33157706df26Smrg	  ;;
33167706df26Smrg	*)
33177706df26Smrg	  _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'
33187706df26Smrg	  ;;
33197706df26Smrg	esac
33207706df26Smrg	# Commands to make compiler produce verbose output that lists
33217706df26Smrg	# what "hidden" libraries, object files and flags are used when
33227706df26Smrg	# linking a shared library.
33237706df26Smrg	#
33247706df26Smrg	# There doesn't appear to be a way to prevent this compiler from
33257706df26Smrg	# explicitly linking system object files so we need to strip them
33267706df26Smrg	# from the output so that they don't get included in the library
33277706df26Smrg	# dependencies.
33287706df26Smrg	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'
33297706df26Smrg	;;
33307706df26Smrg      *)
33317706df26Smrg	if test "$GXX" = yes; then
33327706df26Smrg	  if test $with_gnu_ld = no; then
33337706df26Smrg	    case $host_cpu in
33347706df26Smrg	    hppa*64*)
33357706df26Smrg	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
33367706df26Smrg	      ;;
33377706df26Smrg	    ia64*)
33387706df26Smrg	      _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'
33397706df26Smrg	      ;;
33407706df26Smrg	    *)
33417706df26Smrg	      _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'
33427706df26Smrg	      ;;
33437706df26Smrg	    esac
33447706df26Smrg	  fi
33457706df26Smrg	else
33467706df26Smrg	  # FIXME: insert proper C++ library support
33477706df26Smrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
33487706df26Smrg	fi
33497706df26Smrg	;;
33507706df26Smrg    esac
33517706df26Smrg    ;;
3352047944f3Smrg  interix[[3-9]]*)
33537706df26Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=no
33547706df26Smrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
33557706df26Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
33567706df26Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
33577706df26Smrg    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
33587706df26Smrg    # Instead, shared libraries are loaded at an image base (0x10000000 by
33597706df26Smrg    # default) and relocated if they conflict, which is a slow very memory
33607706df26Smrg    # consuming and fragmenting process.  To avoid this, we pick a random,
33617706df26Smrg    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
33627706df26Smrg    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
33637706df26Smrg    _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'
33647706df26Smrg    _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'
33657706df26Smrg    ;;
33667706df26Smrg  irix5* | irix6*)
33677706df26Smrg    case $cc_basename in
33687706df26Smrg      CC*)
33697706df26Smrg	# SGI C++
33707706df26Smrg	_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'
33717706df26Smrg
33727706df26Smrg	# Archives containing C++ object files must be created using
33737706df26Smrg	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
33747706df26Smrg	# necessary to make sure instantiated templates are included
33757706df26Smrg	# in the archive.
33767706df26Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
33777706df26Smrg	;;
33787706df26Smrg      *)
33797706df26Smrg	if test "$GXX" = yes; then
33807706df26Smrg	  if test "$with_gnu_ld" = no; then
33817706df26Smrg	    _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'
33827706df26Smrg	  else
33837706df26Smrg	    _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'
33847706df26Smrg	  fi
33857706df26Smrg	fi
33867706df26Smrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
33877706df26Smrg	;;
33887706df26Smrg    esac
33897706df26Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
33907706df26Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
33917706df26Smrg    ;;
3392047944f3Smrg  linux* | k*bsd*-gnu)
33937706df26Smrg    case $cc_basename in
33947706df26Smrg      KCC*)
33957706df26Smrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
33967706df26Smrg
33977706df26Smrg	# KCC will only create a shared library if the output file
33987706df26Smrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
33997706df26Smrg	# to its proper name (with version) after linking.
34007706df26Smrg	_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'
34017706df26Smrg	_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'
34027706df26Smrg	# Commands to make compiler produce verbose output that lists
34037706df26Smrg	# what "hidden" libraries, object files and flags are used when
34047706df26Smrg	# linking a shared library.
34057706df26Smrg	#
34067706df26Smrg	# There doesn't appear to be a way to prevent this compiler from
34077706df26Smrg	# explicitly linking system object files so we need to strip them
34087706df26Smrg	# from the output so that they don't get included in the library
34097706df26Smrg	# dependencies.
34107706df26Smrg	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'
34117706df26Smrg
34127706df26Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
34137706df26Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
34147706df26Smrg
34157706df26Smrg	# Archives containing C++ object files must be created using
34167706df26Smrg	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
34177706df26Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
34187706df26Smrg	;;
34197706df26Smrg      icpc*)
34207706df26Smrg	# Intel C++
34217706df26Smrg	with_gnu_ld=yes
34227706df26Smrg	# version 8.0 and above of icpc choke on multiply defined symbols
34237706df26Smrg	# if we add $predep_objects and $postdep_objects, however 7.1 and
34247706df26Smrg	# earlier do not add the objects themselves.
34257706df26Smrg	case `$CC -V 2>&1` in
34267706df26Smrg	*"Version 7."*)
34277706df26Smrg  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
34287706df26Smrg  	  _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'
34297706df26Smrg	  ;;
34307706df26Smrg	*)  # Version 8.0 or newer
34317706df26Smrg	  tmp_idyn=
34327706df26Smrg	  case $host_cpu in
34337706df26Smrg	    ia64*) tmp_idyn=' -i_dynamic';;
34347706df26Smrg	  esac
34357706df26Smrg  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
34367706df26Smrg	  _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'
34377706df26Smrg	  ;;
34387706df26Smrg	esac
34397706df26Smrg	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
34407706df26Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
34417706df26Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
34427706df26Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
34437706df26Smrg	;;
3444047944f3Smrg      pgCC* | pgcpp*)
34457706df26Smrg        # Portland Group C++ compiler
34467706df26Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
34477706df26Smrg  	_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'
34487706df26Smrg
34497706df26Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
34507706df26Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
34517706df26Smrg	_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'
34527706df26Smrg        ;;
34537706df26Smrg      cxx*)
34547706df26Smrg	# Compaq C++
34557706df26Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
34567706df26Smrg	_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'
34577706df26Smrg
34587706df26Smrg	runpath_var=LD_RUN_PATH
34597706df26Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
34607706df26Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
34617706df26Smrg
34627706df26Smrg	# Commands to make compiler produce verbose output that lists
34637706df26Smrg	# what "hidden" libraries, object files and flags are used when
34647706df26Smrg	# linking a shared library.
34657706df26Smrg	#
34667706df26Smrg	# There doesn't appear to be a way to prevent this compiler from
34677706df26Smrg	# explicitly linking system object files so we need to strip them
34687706df26Smrg	# from the output so that they don't get included in the library
34697706df26Smrg	# dependencies.
34707706df26Smrg	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'
34717706df26Smrg	;;
3472047944f3Smrg      *)
3473047944f3Smrg	case `$CC -V 2>&1 | sed 5q` in
3474047944f3Smrg	*Sun\ C*)
3475047944f3Smrg	  # Sun C++ 5.9
3476047944f3Smrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3477047944f3Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3478047944f3Smrg	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
3479047944f3Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3480047944f3Smrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
3481047944f3Smrg
3482047944f3Smrg	  # Not sure whether something based on
3483047944f3Smrg	  # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
3484047944f3Smrg	  # would be better.
3485047944f3Smrg	  output_verbose_link_cmd='echo'
3486047944f3Smrg
3487047944f3Smrg	  # Archives containing C++ object files must be created using
3488047944f3Smrg	  # "CC -xar", where "CC" is the Sun C++ compiler.  This is
3489047944f3Smrg	  # necessary to make sure instantiated templates are included
3490047944f3Smrg	  # in the archive.
3491047944f3Smrg	  _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3492047944f3Smrg	  ;;
3493047944f3Smrg	esac
3494047944f3Smrg	;;
34957706df26Smrg    esac
34967706df26Smrg    ;;
34977706df26Smrg  lynxos*)
34987706df26Smrg    # FIXME: insert proper C++ library support
34997706df26Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
35007706df26Smrg    ;;
35017706df26Smrg  m88k*)
35027706df26Smrg    # FIXME: insert proper C++ library support
35037706df26Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
35047706df26Smrg    ;;
35057706df26Smrg  mvs*)
35067706df26Smrg    case $cc_basename in
35077706df26Smrg      cxx*)
35087706df26Smrg	# FIXME: insert proper C++ library support
35097706df26Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
35107706df26Smrg	;;
35117706df26Smrg      *)
35127706df26Smrg	# FIXME: insert proper C++ library support
35137706df26Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
35147706df26Smrg	;;
35157706df26Smrg    esac
35167706df26Smrg    ;;
35177706df26Smrg  netbsd*)
35187706df26Smrg    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
35197706df26Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
35207706df26Smrg      wlarc=
35217706df26Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
35227706df26Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
35237706df26Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
35247706df26Smrg    fi
35257706df26Smrg    # Workaround some broken pre-1.5 toolchains
35267706df26Smrg    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
35277706df26Smrg    ;;
35287706df26Smrg  openbsd2*)
35297706df26Smrg    # C++ shared libraries are fairly broken
35307706df26Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
35317706df26Smrg    ;;
35327706df26Smrg  openbsd*)
3533047944f3Smrg    if test -f /usr/libexec/ld.so; then
3534047944f3Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3535047944f3Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3536047944f3Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3537047944f3Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3538047944f3Smrg      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3539047944f3Smrg	_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'
3540047944f3Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3541047944f3Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3542047944f3Smrg      fi
3543047944f3Smrg      output_verbose_link_cmd='echo'
3544047944f3Smrg    else
3545047944f3Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
35467706df26Smrg    fi
35477706df26Smrg    ;;
35487706df26Smrg  osf3*)
35497706df26Smrg    case $cc_basename in
35507706df26Smrg      KCC*)
35517706df26Smrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
35527706df26Smrg
35537706df26Smrg	# KCC will only create a shared library if the output file
35547706df26Smrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
35557706df26Smrg	# to its proper name (with version) after linking.
35567706df26Smrg	_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'
35577706df26Smrg
35587706df26Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
35597706df26Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
35607706df26Smrg
35617706df26Smrg	# Archives containing C++ object files must be created using
35627706df26Smrg	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
35637706df26Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
35647706df26Smrg
35657706df26Smrg	;;
35667706df26Smrg      RCC*)
35677706df26Smrg	# Rational C++ 2.4.1
35687706df26Smrg	# FIXME: insert proper C++ library support
35697706df26Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
35707706df26Smrg	;;
35717706df26Smrg      cxx*)
35727706df26Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
35737706df26Smrg	_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'
35747706df26Smrg
35757706df26Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
35767706df26Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
35777706df26Smrg
35787706df26Smrg	# Commands to make compiler produce verbose output that lists
35797706df26Smrg	# what "hidden" libraries, object files and flags are used when
35807706df26Smrg	# linking a shared library.
35817706df26Smrg	#
35827706df26Smrg	# There doesn't appear to be a way to prevent this compiler from
35837706df26Smrg	# explicitly linking system object files so we need to strip them
35847706df26Smrg	# from the output so that they don't get included in the library
35857706df26Smrg	# dependencies.
35867706df26Smrg	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'
35877706df26Smrg	;;
35887706df26Smrg      *)
35897706df26Smrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
35907706df26Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
35917706df26Smrg	  _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'
35927706df26Smrg
35937706df26Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
35947706df26Smrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
35957706df26Smrg
35967706df26Smrg	  # Commands to make compiler produce verbose output that lists
35977706df26Smrg	  # what "hidden" libraries, object files and flags are used when
35987706df26Smrg	  # linking a shared library.
35997706df26Smrg	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
36007706df26Smrg
36017706df26Smrg	else
36027706df26Smrg	  # FIXME: insert proper C++ library support
36037706df26Smrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
36047706df26Smrg	fi
36057706df26Smrg	;;
36067706df26Smrg    esac
36077706df26Smrg    ;;
36087706df26Smrg  osf4* | osf5*)
36097706df26Smrg    case $cc_basename in
36107706df26Smrg      KCC*)
36117706df26Smrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
36127706df26Smrg
36137706df26Smrg	# KCC will only create a shared library if the output file
36147706df26Smrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
36157706df26Smrg	# to its proper name (with version) after linking.
36167706df26Smrg	_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'
36177706df26Smrg
36187706df26Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
36197706df26Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
36207706df26Smrg
36217706df26Smrg	# Archives containing C++ object files must be created using
36227706df26Smrg	# the KAI C++ compiler.
36237706df26Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
36247706df26Smrg	;;
36257706df26Smrg      RCC*)
36267706df26Smrg	# Rational C++ 2.4.1
36277706df26Smrg	# FIXME: insert proper C++ library support
36287706df26Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
36297706df26Smrg	;;
36307706df26Smrg      cxx*)
36317706df26Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
36327706df26Smrg	_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'
36337706df26Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
36347706df26Smrg	  echo "-hidden">> $lib.exp~
36357706df26Smrg	  $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~
36367706df26Smrg	  $rm $lib.exp'
36377706df26Smrg
36387706df26Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
36397706df26Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
36407706df26Smrg
36417706df26Smrg	# Commands to make compiler produce verbose output that lists
36427706df26Smrg	# what "hidden" libraries, object files and flags are used when
36437706df26Smrg	# linking a shared library.
36447706df26Smrg	#
36457706df26Smrg	# There doesn't appear to be a way to prevent this compiler from
36467706df26Smrg	# explicitly linking system object files so we need to strip them
36477706df26Smrg	# from the output so that they don't get included in the library
36487706df26Smrg	# dependencies.
36497706df26Smrg	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'
36507706df26Smrg	;;
36517706df26Smrg      *)
36527706df26Smrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
36537706df26Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
36547706df26Smrg	 _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'
36557706df26Smrg
36567706df26Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
36577706df26Smrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
36587706df26Smrg
36597706df26Smrg	  # Commands to make compiler produce verbose output that lists
36607706df26Smrg	  # what "hidden" libraries, object files and flags are used when
36617706df26Smrg	  # linking a shared library.
36627706df26Smrg	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
36637706df26Smrg
36647706df26Smrg	else
36657706df26Smrg	  # FIXME: insert proper C++ library support
36667706df26Smrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
36677706df26Smrg	fi
36687706df26Smrg	;;
36697706df26Smrg    esac
36707706df26Smrg    ;;
36717706df26Smrg  psos*)
36727706df26Smrg    # FIXME: insert proper C++ library support
36737706df26Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
36747706df26Smrg    ;;
36757706df26Smrg  sunos4*)
36767706df26Smrg    case $cc_basename in
36777706df26Smrg      CC*)
36787706df26Smrg	# Sun C++ 4.x
36797706df26Smrg	# FIXME: insert proper C++ library support
36807706df26Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
36817706df26Smrg	;;
36827706df26Smrg      lcc*)
36837706df26Smrg	# Lucid
36847706df26Smrg	# FIXME: insert proper C++ library support
36857706df26Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
36867706df26Smrg	;;
36877706df26Smrg      *)
36887706df26Smrg	# FIXME: insert proper C++ library support
36897706df26Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
36907706df26Smrg	;;
36917706df26Smrg    esac
36927706df26Smrg    ;;
36937706df26Smrg  solaris*)
36947706df26Smrg    case $cc_basename in
36957706df26Smrg      CC*)
36967706df26Smrg	# Sun C++ 4.2, 5.x and Centerline C++
36977706df26Smrg        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
36987706df26Smrg	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
36997706df26Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
37007706df26Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
37017706df26Smrg	$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'
37027706df26Smrg
37037706df26Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
37047706df26Smrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
37057706df26Smrg	case $host_os in
37067706df26Smrg	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
37077706df26Smrg	  *)
3708047944f3Smrg	    # The compiler driver will combine and reorder linker options,
3709047944f3Smrg	    # but understands `-z linker_flag'.
37107706df26Smrg	    # Supported since Solaris 2.6 (maybe 2.5.1?)
3711047944f3Smrg	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
37127706df26Smrg	    ;;
37137706df26Smrg	esac
37147706df26Smrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
37157706df26Smrg
37167706df26Smrg	output_verbose_link_cmd='echo'
37177706df26Smrg
37187706df26Smrg	# Archives containing C++ object files must be created using
37197706df26Smrg	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
37207706df26Smrg	# necessary to make sure instantiated templates are included
37217706df26Smrg	# in the archive.
37227706df26Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
37237706df26Smrg	;;
37247706df26Smrg      gcx*)
37257706df26Smrg	# Green Hills C++ Compiler
37267706df26Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
37277706df26Smrg
37287706df26Smrg	# The C++ compiler must be used to create the archive.
37297706df26Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
37307706df26Smrg	;;
37317706df26Smrg      *)
37327706df26Smrg	# GNU C++ compiler with Solaris linker
37337706df26Smrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
37347706df26Smrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
37357706df26Smrg	  if $CC --version | grep -v '^2\.7' > /dev/null; then
37367706df26Smrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
37377706df26Smrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
37387706df26Smrg		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
37397706df26Smrg
37407706df26Smrg	    # Commands to make compiler produce verbose output that lists
37417706df26Smrg	    # what "hidden" libraries, object files and flags are used when
37427706df26Smrg	    # linking a shared library.
37437706df26Smrg	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
37447706df26Smrg	  else
37457706df26Smrg	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
37467706df26Smrg	    # platform.
37477706df26Smrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
37487706df26Smrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
37497706df26Smrg		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
37507706df26Smrg
37517706df26Smrg	    # Commands to make compiler produce verbose output that lists
37527706df26Smrg	    # what "hidden" libraries, object files and flags are used when
37537706df26Smrg	    # linking a shared library.
37547706df26Smrg	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
37557706df26Smrg	  fi
37567706df26Smrg
37577706df26Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
3758047944f3Smrg	  case $host_os in
3759047944f3Smrg	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
3760047944f3Smrg	  *)
3761047944f3Smrg	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
3762047944f3Smrg	    ;;
3763047944f3Smrg	  esac
37647706df26Smrg	fi
37657706df26Smrg	;;
37667706df26Smrg    esac
37677706df26Smrg    ;;
37687706df26Smrg  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
37697706df26Smrg    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
37707706df26Smrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
37717706df26Smrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
37727706df26Smrg    runpath_var='LD_RUN_PATH'
37737706df26Smrg
37747706df26Smrg    case $cc_basename in
37757706df26Smrg      CC*)
37767706df26Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
37777706df26Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
37787706df26Smrg	;;
37797706df26Smrg      *)
37807706df26Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
37817706df26Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
37827706df26Smrg	;;
37837706df26Smrg    esac
37847706df26Smrg    ;;
37857706df26Smrg  sysv5* | sco3.2v5* | sco5v6*)
37867706df26Smrg    # Note: We can NOT use -z defs as we might desire, because we do not
37877706df26Smrg    # link with -lc, and that would cause any symbols used from libc to
37887706df26Smrg    # always be unresolved, which means just about no library would
37897706df26Smrg    # ever link correctly.  If we're not using GNU ld we use -z text
37907706df26Smrg    # though, which does catch some bad symbols but isn't as heavy-handed
37917706df26Smrg    # as -z defs.
37927706df26Smrg    # For security reasons, it is highly recommended that you always
37937706df26Smrg    # use absolute paths for naming shared libraries, and exclude the
37947706df26Smrg    # DT_RUNPATH tag from executables and libraries.  But doing so
37957706df26Smrg    # requires that you compile everything twice, which is a pain.
37967706df26Smrg    # So that behaviour is only enabled if SCOABSPATH is set to a
37977706df26Smrg    # non-empty value in the environment.  Most likely only useful for
37987706df26Smrg    # creating official distributions of packages.
37997706df26Smrg    # This is a hack until libtool officially supports absolute path
38007706df26Smrg    # names for shared libraries.
38017706df26Smrg    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
38027706df26Smrg    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
38037706df26Smrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
38047706df26Smrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
38057706df26Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
38067706df26Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
38077706df26Smrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
38087706df26Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
38097706df26Smrg    runpath_var='LD_RUN_PATH'
38107706df26Smrg
38117706df26Smrg    case $cc_basename in
38127706df26Smrg      CC*)
38137706df26Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
38147706df26Smrg	_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'
38157706df26Smrg	;;
38167706df26Smrg      *)
38177706df26Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
38187706df26Smrg	_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'
38197706df26Smrg	;;
38207706df26Smrg    esac
38217706df26Smrg    ;;
38227706df26Smrg  tandem*)
38237706df26Smrg    case $cc_basename in
38247706df26Smrg      NCC*)
38257706df26Smrg	# NonStop-UX NCC 3.20
38267706df26Smrg	# FIXME: insert proper C++ library support
38277706df26Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
38287706df26Smrg	;;
38297706df26Smrg      *)
38307706df26Smrg	# FIXME: insert proper C++ library support
38317706df26Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
38327706df26Smrg	;;
38337706df26Smrg    esac
38347706df26Smrg    ;;
38357706df26Smrg  vxworks*)
38367706df26Smrg    # FIXME: insert proper C++ library support
38377706df26Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
38387706df26Smrg    ;;
38397706df26Smrg  *)
38407706df26Smrg    # FIXME: insert proper C++ library support
38417706df26Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
38427706df26Smrg    ;;
38437706df26Smrgesac
38447706df26SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
38457706df26Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
38467706df26Smrg
38477706df26Smrg_LT_AC_TAGVAR(GCC, $1)="$GXX"
38487706df26Smrg_LT_AC_TAGVAR(LD, $1)="$LD"
38497706df26Smrg
38507706df26SmrgAC_LIBTOOL_POSTDEP_PREDEP($1)
38517706df26SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
38527706df26SmrgAC_LIBTOOL_PROG_CC_C_O($1)
38537706df26SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
38547706df26SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
38557706df26SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
38567706df26SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
38577706df26Smrg
38587706df26SmrgAC_LIBTOOL_CONFIG($1)
38597706df26Smrg
38607706df26SmrgAC_LANG_POP
38617706df26SmrgCC=$lt_save_CC
38627706df26SmrgLDCXX=$LD
38637706df26SmrgLD=$lt_save_LD
38647706df26SmrgGCC=$lt_save_GCC
38657706df26Smrgwith_gnu_ldcxx=$with_gnu_ld
38667706df26Smrgwith_gnu_ld=$lt_save_with_gnu_ld
38677706df26Smrglt_cv_path_LDCXX=$lt_cv_path_LD
38687706df26Smrglt_cv_path_LD=$lt_save_path_LD
38697706df26Smrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
38707706df26Smrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
38717706df26Smrg])# AC_LIBTOOL_LANG_CXX_CONFIG
38727706df26Smrg
38737706df26Smrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
38747706df26Smrg# ------------------------------------
38757706df26Smrg# Figure out "hidden" library dependencies from verbose
38767706df26Smrg# compiler output when linking a shared library.
38777706df26Smrg# Parse the compiler output and extract the necessary
38787706df26Smrg# objects, libraries and library flags.
3879047944f3SmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],
3880047944f3Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
38817706df26Smrgdnl we can't use the lt_simple_compile_test_code here,
38827706df26Smrgdnl because it contains code intended for an executable,
38837706df26Smrgdnl not a library.  It's possible we should let each
38847706df26Smrgdnl tag define a new lt_????_link_test_code variable,
38857706df26Smrgdnl but it's only used here...
38867706df26Smrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF
38877706df26Smrgint a;
38887706df26Smrgvoid foo (void) { a = 0; }
38897706df26SmrgEOF
38907706df26Smrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
38917706df26Smrgclass Foo
38927706df26Smrg{
38937706df26Smrgpublic:
38947706df26Smrg  Foo (void) { a = 0; }
38957706df26Smrgprivate:
38967706df26Smrg  int a;
38977706df26Smrg};
38987706df26SmrgEOF
38997706df26Smrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF
39007706df26Smrg      subroutine foo
39017706df26Smrg      implicit none
39027706df26Smrg      integer*4 a
39037706df26Smrg      a=0
39047706df26Smrg      return
39057706df26Smrg      end
39067706df26SmrgEOF
39077706df26Smrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
39087706df26Smrgpublic class foo {
39097706df26Smrg  private int a;
39107706df26Smrg  public void bar (void) {
39117706df26Smrg    a = 0;
39127706df26Smrg  }
39137706df26Smrg};
39147706df26SmrgEOF
39157706df26Smrg])
39167706df26Smrgdnl Parse the compiler output and extract the necessary
39177706df26Smrgdnl objects, libraries and library flags.
39187706df26Smrgif AC_TRY_EVAL(ac_compile); then
39197706df26Smrg  # Parse the compiler output and extract the necessary
39207706df26Smrg  # objects, libraries and library flags.
39217706df26Smrg
39227706df26Smrg  # Sentinel used to keep track of whether or not we are before
39237706df26Smrg  # the conftest object file.
39247706df26Smrg  pre_test_object_deps_done=no
39257706df26Smrg
39267706df26Smrg  # The `*' in the case matches for architectures that use `case' in
39277706df26Smrg  # $output_verbose_cmd can trigger glob expansion during the loop
39287706df26Smrg  # eval without this substitution.
39297706df26Smrg  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
39307706df26Smrg
39317706df26Smrg  for p in `eval $output_verbose_link_cmd`; do
39327706df26Smrg    case $p in
39337706df26Smrg
39347706df26Smrg    -L* | -R* | -l*)
39357706df26Smrg       # Some compilers place space between "-{L,R}" and the path.
39367706df26Smrg       # Remove the space.
39377706df26Smrg       if test $p = "-L" \
39387706df26Smrg	  || test $p = "-R"; then
39397706df26Smrg	 prev=$p
39407706df26Smrg	 continue
39417706df26Smrg       else
39427706df26Smrg	 prev=
39437706df26Smrg       fi
39447706df26Smrg
39457706df26Smrg       if test "$pre_test_object_deps_done" = no; then
39467706df26Smrg	 case $p in
39477706df26Smrg	 -L* | -R*)
39487706df26Smrg	   # Internal compiler library paths should come after those
39497706df26Smrg	   # provided the user.  The postdeps already come after the
39507706df26Smrg	   # user supplied libs so there is no need to process them.
39517706df26Smrg	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
39527706df26Smrg	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
39537706df26Smrg	   else
39547706df26Smrg	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
39557706df26Smrg	   fi
39567706df26Smrg	   ;;
39577706df26Smrg	 # The "-l" case would never come before the object being
39587706df26Smrg	 # linked, so don't bother handling this case.
39597706df26Smrg	 esac
39607706df26Smrg       else
39617706df26Smrg	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
39627706df26Smrg	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
39637706df26Smrg	 else
39647706df26Smrg	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
39657706df26Smrg	 fi
39667706df26Smrg       fi
39677706df26Smrg       ;;
39687706df26Smrg
39697706df26Smrg    *.$objext)
39707706df26Smrg       # This assumes that the test object file only shows up
39717706df26Smrg       # once in the compiler output.
39727706df26Smrg       if test "$p" = "conftest.$objext"; then
39737706df26Smrg	 pre_test_object_deps_done=yes
39747706df26Smrg	 continue
39757706df26Smrg       fi
39767706df26Smrg
39777706df26Smrg       if test "$pre_test_object_deps_done" = no; then
39787706df26Smrg	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
39797706df26Smrg	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
39807706df26Smrg	 else
39817706df26Smrg	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
39827706df26Smrg	 fi
39837706df26Smrg       else
39847706df26Smrg	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
39857706df26Smrg	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
39867706df26Smrg	 else
39877706df26Smrg	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
39887706df26Smrg	 fi
39897706df26Smrg       fi
39907706df26Smrg       ;;
39917706df26Smrg
39927706df26Smrg    *) ;; # Ignore the rest.
39937706df26Smrg
39947706df26Smrg    esac
39957706df26Smrg  done
39967706df26Smrg
39977706df26Smrg  # Clean up.
39987706df26Smrg  rm -f a.out a.exe
39997706df26Smrgelse
40007706df26Smrg  echo "libtool.m4: error: problem compiling $1 test program"
40017706df26Smrgfi
40027706df26Smrg
40037706df26Smrg$rm -f confest.$objext
40047706df26Smrg
4005047944f3Smrg_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
4006047944f3Smrgif test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
4007047944f3Smrg  _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
4008047944f3Smrgfi
4009047944f3Smrg
40107706df26Smrg# PORTME: override above test on systems where it is broken
40117706df26Smrgifelse([$1],[CXX],
40127706df26Smrg[case $host_os in
4013047944f3Smrginterix[[3-9]]*)
40147706df26Smrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
40157706df26Smrg  # hack all around it, let's just trust "g++" to DTRT.
40167706df26Smrg  _LT_AC_TAGVAR(predep_objects,$1)=
40177706df26Smrg  _LT_AC_TAGVAR(postdep_objects,$1)=
40187706df26Smrg  _LT_AC_TAGVAR(postdeps,$1)=
40197706df26Smrg  ;;
40207706df26Smrg
4021047944f3Smrglinux*)
4022047944f3Smrg  case `$CC -V 2>&1 | sed 5q` in
4023047944f3Smrg  *Sun\ C*)
4024047944f3Smrg    # Sun C++ 5.9
4025047944f3Smrg    #
4026047944f3Smrg    # The more standards-conforming stlport4 library is
4027047944f3Smrg    # incompatible with the Cstd library. Avoid specifying
4028047944f3Smrg    # it if it's in CXXFLAGS. Ignore libCrun as
4029047944f3Smrg    # -library=stlport4 depends on it.
4030047944f3Smrg    case " $CXX $CXXFLAGS " in
4031047944f3Smrg    *" -library=stlport4 "*)
4032047944f3Smrg      solaris_use_stlport4=yes
4033047944f3Smrg      ;;
4034047944f3Smrg    esac
4035047944f3Smrg    if test "$solaris_use_stlport4" != yes; then
4036047944f3Smrg      _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
4037047944f3Smrg    fi
4038047944f3Smrg    ;;
4039047944f3Smrg  esac
4040047944f3Smrg  ;;
4041047944f3Smrg
40427706df26Smrgsolaris*)
40437706df26Smrg  case $cc_basename in
40447706df26Smrg  CC*)
4045047944f3Smrg    # The more standards-conforming stlport4 library is
4046047944f3Smrg    # incompatible with the Cstd library. Avoid specifying
4047047944f3Smrg    # it if it's in CXXFLAGS. Ignore libCrun as
4048047944f3Smrg    # -library=stlport4 depends on it.
4049047944f3Smrg    case " $CXX $CXXFLAGS " in
4050047944f3Smrg    *" -library=stlport4 "*)
4051047944f3Smrg      solaris_use_stlport4=yes
4052047944f3Smrg      ;;
4053047944f3Smrg    esac
4054047944f3Smrg
40557706df26Smrg    # Adding this requires a known-good setup of shared libraries for
40567706df26Smrg    # Sun compiler versions before 5.6, else PIC objects from an old
40577706df26Smrg    # archive will be linked into the output, leading to subtle bugs.
4058047944f3Smrg    if test "$solaris_use_stlport4" != yes; then
4059047944f3Smrg      _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
4060047944f3Smrg    fi
40617706df26Smrg    ;;
40627706df26Smrg  esac
40637706df26Smrg  ;;
40647706df26Smrgesac
40657706df26Smrg])
40667706df26Smrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in
40677706df26Smrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
40687706df26Smrgesac
40697706df26Smrg])# AC_LIBTOOL_POSTDEP_PREDEP
40707706df26Smrg
40717706df26Smrg# AC_LIBTOOL_LANG_F77_CONFIG
40727706df26Smrg# --------------------------
40737706df26Smrg# Ensure that the configuration vars for the C compiler are
40747706df26Smrg# suitably defined.  Those variables are subsequently used by
40757706df26Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
40767706df26SmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
40777706df26SmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG],
40787706df26Smrg[AC_REQUIRE([AC_PROG_F77])
40797706df26SmrgAC_LANG_PUSH(Fortran 77)
40807706df26Smrg
40817706df26Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
40827706df26Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)=
40837706df26Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no
40847706df26Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
40857706df26Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
40867706df26Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no
40877706df26Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
40887706df26Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
40897706df26Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
40907706df26Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
40917706df26Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no
40927706df26Smrg_LT_AC_TAGVAR(module_cmds, $1)=
40937706df26Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)=
40947706df26Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
40957706df26Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
40967706df26Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)=
40977706df26Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
40987706df26Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
40997706df26Smrg
41007706df26Smrg# Source file extension for f77 test sources.
41017706df26Smrgac_ext=f
41027706df26Smrg
41037706df26Smrg# Object file extension for compiled f77 test sources.
41047706df26Smrgobjext=o
41057706df26Smrg_LT_AC_TAGVAR(objext, $1)=$objext
41067706df26Smrg
41077706df26Smrg# Code to be used in simple compile tests
4108047944f3Smrglt_simple_compile_test_code="\
4109047944f3Smrg      subroutine t
4110047944f3Smrg      return
4111047944f3Smrg      end
4112047944f3Smrg"
41137706df26Smrg
41147706df26Smrg# Code to be used in simple link tests
4115047944f3Smrglt_simple_link_test_code="\
4116047944f3Smrg      program t
4117047944f3Smrg      end
4118047944f3Smrg"
41197706df26Smrg
41207706df26Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
41217706df26Smrg_LT_AC_SYS_COMPILER
41227706df26Smrg
41237706df26Smrg# save warnings/boilerplate of simple test code
41247706df26Smrg_LT_COMPILER_BOILERPLATE
41257706df26Smrg_LT_LINKER_BOILERPLATE
41267706df26Smrg
41277706df26Smrg# Allow CC to be a program name with arguments.
41287706df26Smrglt_save_CC="$CC"
41297706df26SmrgCC=${F77-"f77"}
41307706df26Smrgcompiler=$CC
41317706df26Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
41327706df26Smrg_LT_CC_BASENAME([$compiler])
41337706df26Smrg
41347706df26SmrgAC_MSG_CHECKING([if libtool supports shared libraries])
41357706df26SmrgAC_MSG_RESULT([$can_build_shared])
41367706df26Smrg
41377706df26SmrgAC_MSG_CHECKING([whether to build shared libraries])
41387706df26Smrgtest "$can_build_shared" = "no" && enable_shared=no
41397706df26Smrg
41407706df26Smrg# On AIX, shared libraries and static libraries use the same namespace, and
41417706df26Smrg# are all built from PIC.
41427706df26Smrgcase $host_os in
41437706df26Smrgaix3*)
41447706df26Smrg  test "$enable_shared" = yes && enable_static=no
41457706df26Smrg  if test -n "$RANLIB"; then
41467706df26Smrg    archive_cmds="$archive_cmds~\$RANLIB \$lib"
41477706df26Smrg    postinstall_cmds='$RANLIB $lib'
41487706df26Smrg  fi
41497706df26Smrg  ;;
4150047944f3Smrgaix[[4-9]]*)
41517706df26Smrg  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
41527706df26Smrg    test "$enable_shared" = yes && enable_static=no
41537706df26Smrg  fi
41547706df26Smrg  ;;
41557706df26Smrgesac
41567706df26SmrgAC_MSG_RESULT([$enable_shared])
41577706df26Smrg
41587706df26SmrgAC_MSG_CHECKING([whether to build static libraries])
41597706df26Smrg# Make sure either enable_shared or enable_static is yes.
41607706df26Smrgtest "$enable_shared" = yes || enable_static=yes
41617706df26SmrgAC_MSG_RESULT([$enable_static])
41627706df26Smrg
41637706df26Smrg_LT_AC_TAGVAR(GCC, $1)="$G77"
41647706df26Smrg_LT_AC_TAGVAR(LD, $1)="$LD"
41657706df26Smrg
41667706df26SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
41677706df26SmrgAC_LIBTOOL_PROG_CC_C_O($1)
41687706df26SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
41697706df26SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
41707706df26SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
41717706df26SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
41727706df26Smrg
41737706df26SmrgAC_LIBTOOL_CONFIG($1)
41747706df26Smrg
41757706df26SmrgAC_LANG_POP
41767706df26SmrgCC="$lt_save_CC"
41777706df26Smrg])# AC_LIBTOOL_LANG_F77_CONFIG
41787706df26Smrg
41797706df26Smrg
41807706df26Smrg# AC_LIBTOOL_LANG_GCJ_CONFIG
41817706df26Smrg# --------------------------
41827706df26Smrg# Ensure that the configuration vars for the C compiler are
41837706df26Smrg# suitably defined.  Those variables are subsequently used by
41847706df26Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
41857706df26SmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
41867706df26SmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
41877706df26Smrg[AC_LANG_SAVE
41887706df26Smrg
41897706df26Smrg# Source file extension for Java test sources.
41907706df26Smrgac_ext=java
41917706df26Smrg
41927706df26Smrg# Object file extension for compiled Java test sources.
41937706df26Smrgobjext=o
41947706df26Smrg_LT_AC_TAGVAR(objext, $1)=$objext
41957706df26Smrg
41967706df26Smrg# Code to be used in simple compile tests
4197047944f3Smrglt_simple_compile_test_code="class foo {}"
41987706df26Smrg
41997706df26Smrg# Code to be used in simple link tests
4200047944f3Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
42017706df26Smrg
42027706df26Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
42037706df26Smrg_LT_AC_SYS_COMPILER
42047706df26Smrg
42057706df26Smrg# save warnings/boilerplate of simple test code
42067706df26Smrg_LT_COMPILER_BOILERPLATE
42077706df26Smrg_LT_LINKER_BOILERPLATE
42087706df26Smrg
42097706df26Smrg# Allow CC to be a program name with arguments.
42107706df26Smrglt_save_CC="$CC"
42117706df26SmrgCC=${GCJ-"gcj"}
42127706df26Smrgcompiler=$CC
42137706df26Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
42147706df26Smrg_LT_CC_BASENAME([$compiler])
42157706df26Smrg
42167706df26Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
42177706df26Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
42187706df26Smrg
42197706df26Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
42207706df26Smrg
42217706df26SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
42227706df26SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
42237706df26SmrgAC_LIBTOOL_PROG_CC_C_O($1)
42247706df26SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
42257706df26SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
42267706df26SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
42277706df26SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
42287706df26Smrg
42297706df26SmrgAC_LIBTOOL_CONFIG($1)
42307706df26Smrg
42317706df26SmrgAC_LANG_RESTORE
42327706df26SmrgCC="$lt_save_CC"
42337706df26Smrg])# AC_LIBTOOL_LANG_GCJ_CONFIG
42347706df26Smrg
42357706df26Smrg
42367706df26Smrg# AC_LIBTOOL_LANG_RC_CONFIG
42377706df26Smrg# -------------------------
42387706df26Smrg# Ensure that the configuration vars for the Windows resource compiler are
42397706df26Smrg# suitably defined.  Those variables are subsequently used by
42407706df26Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
42417706df26SmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
42427706df26SmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG],
42437706df26Smrg[AC_LANG_SAVE
42447706df26Smrg
42457706df26Smrg# Source file extension for RC test sources.
42467706df26Smrgac_ext=rc
42477706df26Smrg
42487706df26Smrg# Object file extension for compiled RC test sources.
42497706df26Smrgobjext=o
42507706df26Smrg_LT_AC_TAGVAR(objext, $1)=$objext
42517706df26Smrg
42527706df26Smrg# Code to be used in simple compile tests
4253047944f3Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
42547706df26Smrg
42557706df26Smrg# Code to be used in simple link tests
42567706df26Smrglt_simple_link_test_code="$lt_simple_compile_test_code"
42577706df26Smrg
42587706df26Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
42597706df26Smrg_LT_AC_SYS_COMPILER
42607706df26Smrg
42617706df26Smrg# save warnings/boilerplate of simple test code
42627706df26Smrg_LT_COMPILER_BOILERPLATE
42637706df26Smrg_LT_LINKER_BOILERPLATE
42647706df26Smrg
42657706df26Smrg# Allow CC to be a program name with arguments.
42667706df26Smrglt_save_CC="$CC"
42677706df26SmrgCC=${RC-"windres"}
42687706df26Smrgcompiler=$CC
42697706df26Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
42707706df26Smrg_LT_CC_BASENAME([$compiler])
42717706df26Smrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
42727706df26Smrg
42737706df26SmrgAC_LIBTOOL_CONFIG($1)
42747706df26Smrg
42757706df26SmrgAC_LANG_RESTORE
42767706df26SmrgCC="$lt_save_CC"
42777706df26Smrg])# AC_LIBTOOL_LANG_RC_CONFIG
42787706df26Smrg
42797706df26Smrg
42807706df26Smrg# AC_LIBTOOL_CONFIG([TAGNAME])
42817706df26Smrg# ----------------------------
42827706df26Smrg# If TAGNAME is not passed, then create an initial libtool script
42837706df26Smrg# with a default configuration from the untagged config vars.  Otherwise
42847706df26Smrg# add code to config.status for appending the configuration named by
42857706df26Smrg# TAGNAME from the matching tagged config vars.
42867706df26SmrgAC_DEFUN([AC_LIBTOOL_CONFIG],
42877706df26Smrg[# The else clause should only fire when bootstrapping the
42887706df26Smrg# libtool distribution, otherwise you forgot to ship ltmain.sh
42897706df26Smrg# with your package, and you will get complaints that there are
42907706df26Smrg# no rules to generate ltmain.sh.
42917706df26Smrgif test -f "$ltmain"; then
42927706df26Smrg  # See if we are running on zsh, and set the options which allow our commands through
42937706df26Smrg  # without removal of \ escapes.
42947706df26Smrg  if test -n "${ZSH_VERSION+set}" ; then
42957706df26Smrg    setopt NO_GLOB_SUBST
42967706df26Smrg  fi
42977706df26Smrg  # Now quote all the things that may contain metacharacters while being
42987706df26Smrg  # careful not to overquote the AC_SUBSTed values.  We take copies of the
42997706df26Smrg  # variables and quote the copies for generation of the libtool script.
43007706df26Smrg  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
43017706df26Smrg    SED SHELL STRIP \
43027706df26Smrg    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
43037706df26Smrg    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
43047706df26Smrg    deplibs_check_method reload_flag reload_cmds need_locks \
43057706df26Smrg    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
43067706df26Smrg    lt_cv_sys_global_symbol_to_c_name_address \
43077706df26Smrg    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
43087706df26Smrg    old_postinstall_cmds old_postuninstall_cmds \
43097706df26Smrg    _LT_AC_TAGVAR(compiler, $1) \
43107706df26Smrg    _LT_AC_TAGVAR(CC, $1) \
43117706df26Smrg    _LT_AC_TAGVAR(LD, $1) \
43127706df26Smrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
43137706df26Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
43147706df26Smrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
43157706df26Smrg    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
43167706df26Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
43177706df26Smrg    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
43187706df26Smrg    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
43197706df26Smrg    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
43207706df26Smrg    _LT_AC_TAGVAR(old_archive_cmds, $1) \
43217706df26Smrg    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
43227706df26Smrg    _LT_AC_TAGVAR(predep_objects, $1) \
43237706df26Smrg    _LT_AC_TAGVAR(postdep_objects, $1) \
43247706df26Smrg    _LT_AC_TAGVAR(predeps, $1) \
43257706df26Smrg    _LT_AC_TAGVAR(postdeps, $1) \
43267706df26Smrg    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4327047944f3Smrg    _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \
43287706df26Smrg    _LT_AC_TAGVAR(archive_cmds, $1) \
43297706df26Smrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
43307706df26Smrg    _LT_AC_TAGVAR(postinstall_cmds, $1) \
43317706df26Smrg    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
43327706df26Smrg    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
43337706df26Smrg    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
43347706df26Smrg    _LT_AC_TAGVAR(no_undefined_flag, $1) \
43357706df26Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
43367706df26Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
43377706df26Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
43387706df26Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
43397706df26Smrg    _LT_AC_TAGVAR(hardcode_automatic, $1) \
43407706df26Smrg    _LT_AC_TAGVAR(module_cmds, $1) \
43417706df26Smrg    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
43427706df26Smrg    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4343047944f3Smrg    _LT_AC_TAGVAR(fix_srcfile_path, $1) \
43447706df26Smrg    _LT_AC_TAGVAR(exclude_expsyms, $1) \
43457706df26Smrg    _LT_AC_TAGVAR(include_expsyms, $1); do
43467706df26Smrg
43477706df26Smrg    case $var in
43487706df26Smrg    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
43497706df26Smrg    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
43507706df26Smrg    _LT_AC_TAGVAR(archive_cmds, $1) | \
43517706df26Smrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
43527706df26Smrg    _LT_AC_TAGVAR(module_cmds, $1) | \
43537706df26Smrg    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
43547706df26Smrg    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
43557706df26Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
43567706df26Smrg    extract_expsyms_cmds | reload_cmds | finish_cmds | \
43577706df26Smrg    postinstall_cmds | postuninstall_cmds | \
43587706df26Smrg    old_postinstall_cmds | old_postuninstall_cmds | \
43597706df26Smrg    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
43607706df26Smrg      # Double-quote double-evaled strings.
43617706df26Smrg      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
43627706df26Smrg      ;;
43637706df26Smrg    *)
43647706df26Smrg      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
43657706df26Smrg      ;;
43667706df26Smrg    esac
43677706df26Smrg  done
43687706df26Smrg
43697706df26Smrg  case $lt_echo in
43707706df26Smrg  *'\[$]0 --fallback-echo"')
43717706df26Smrg    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
43727706df26Smrg    ;;
43737706df26Smrg  esac
43747706df26Smrg
43757706df26Smrgifelse([$1], [],
43767706df26Smrg  [cfgfile="${ofile}T"
43777706df26Smrg  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
43787706df26Smrg  $rm -f "$cfgfile"
43797706df26Smrg  AC_MSG_NOTICE([creating $ofile])],
43807706df26Smrg  [cfgfile="$ofile"])
43817706df26Smrg
43827706df26Smrg  cat <<__EOF__ >> "$cfgfile"
43837706df26Smrgifelse([$1], [],
43847706df26Smrg[#! $SHELL
43857706df26Smrg
43867706df26Smrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
43877706df26Smrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
43887706df26Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
43897706df26Smrg#
4390047944f3Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
43917706df26Smrg# Free Software Foundation, Inc.
43927706df26Smrg#
43937706df26Smrg# This file is part of GNU Libtool:
43947706df26Smrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
43957706df26Smrg#
43967706df26Smrg# This program is free software; you can redistribute it and/or modify
43977706df26Smrg# it under the terms of the GNU General Public License as published by
43987706df26Smrg# the Free Software Foundation; either version 2 of the License, or
43997706df26Smrg# (at your option) any later version.
44007706df26Smrg#
44017706df26Smrg# This program is distributed in the hope that it will be useful, but
44027706df26Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
44037706df26Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
44047706df26Smrg# General Public License for more details.
44057706df26Smrg#
44067706df26Smrg# You should have received a copy of the GNU General Public License
44077706df26Smrg# along with this program; if not, write to the Free Software
44087706df26Smrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
44097706df26Smrg#
44107706df26Smrg# As a special exception to the GNU General Public License, if you
44117706df26Smrg# distribute this file as part of a program that contains a
44127706df26Smrg# configuration script generated by Autoconf, you may include it under
44137706df26Smrg# the same distribution terms that you use for the rest of that program.
44147706df26Smrg
44157706df26Smrg# A sed program that does not truncate output.
44167706df26SmrgSED=$lt_SED
44177706df26Smrg
44187706df26Smrg# Sed that helps us avoid accidentally triggering echo(1) options like -n.
44197706df26SmrgXsed="$SED -e 1s/^X//"
44207706df26Smrg
44217706df26Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
44227706df26Smrg# if CDPATH is set.
44237706df26Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
44247706df26Smrg
44257706df26Smrg# The names of the tagged configurations supported by this script.
44267706df26Smrgavailable_tags=
44277706df26Smrg
44287706df26Smrg# ### BEGIN LIBTOOL CONFIG],
44297706df26Smrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
44307706df26Smrg
44317706df26Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
44327706df26Smrg
44337706df26Smrg# Shell to use when invoking shell scripts.
44347706df26SmrgSHELL=$lt_SHELL
44357706df26Smrg
44367706df26Smrg# Whether or not to build shared libraries.
44377706df26Smrgbuild_libtool_libs=$enable_shared
44387706df26Smrg
44397706df26Smrg# Whether or not to build static libraries.
44407706df26Smrgbuild_old_libs=$enable_static
44417706df26Smrg
44427706df26Smrg# Whether or not to add -lc for building shared libraries.
44437706df26Smrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
44447706df26Smrg
44457706df26Smrg# Whether or not to disallow shared libs when runtime libs are static
44467706df26Smrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
44477706df26Smrg
44487706df26Smrg# Whether or not to optimize for fast installation.
44497706df26Smrgfast_install=$enable_fast_install
44507706df26Smrg
44517706df26Smrg# The host system.
44527706df26Smrghost_alias=$host_alias
44537706df26Smrghost=$host
44547706df26Smrghost_os=$host_os
44557706df26Smrg
44567706df26Smrg# The build system.
44577706df26Smrgbuild_alias=$build_alias
44587706df26Smrgbuild=$build
44597706df26Smrgbuild_os=$build_os
44607706df26Smrg
44617706df26Smrg# An echo program that does not interpret backslashes.
44627706df26Smrgecho=$lt_echo
44637706df26Smrg
44647706df26Smrg# The archiver.
44657706df26SmrgAR=$lt_AR
44667706df26SmrgAR_FLAGS=$lt_AR_FLAGS
44677706df26Smrg
44687706df26Smrg# A C compiler.
44697706df26SmrgLTCC=$lt_LTCC
44707706df26Smrg
44717706df26Smrg# LTCC compiler flags.
44727706df26SmrgLTCFLAGS=$lt_LTCFLAGS
44737706df26Smrg
44747706df26Smrg# A language-specific compiler.
44757706df26SmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
44767706df26Smrg
44777706df26Smrg# Is the compiler the GNU C compiler?
44787706df26Smrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1)
44797706df26Smrg
44807706df26Smrg# An ERE matcher.
44817706df26SmrgEGREP=$lt_EGREP
44827706df26Smrg
44837706df26Smrg# The linker used to build libraries.
44847706df26SmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1)
44857706df26Smrg
44867706df26Smrg# Whether we need hard or soft links.
44877706df26SmrgLN_S=$lt_LN_S
44887706df26Smrg
44897706df26Smrg# A BSD-compatible nm program.
44907706df26SmrgNM=$lt_NM
44917706df26Smrg
44927706df26Smrg# A symbol stripping program
44937706df26SmrgSTRIP=$lt_STRIP
44947706df26Smrg
44957706df26Smrg# Used to examine libraries when file_magic_cmd begins "file"
44967706df26SmrgMAGIC_CMD=$MAGIC_CMD
44977706df26Smrg
44987706df26Smrg# Used on cygwin: DLL creation program.
44997706df26SmrgDLLTOOL="$DLLTOOL"
45007706df26Smrg
45017706df26Smrg# Used on cygwin: object dumper.
45027706df26SmrgOBJDUMP="$OBJDUMP"
45037706df26Smrg
45047706df26Smrg# Used on cygwin: assembler.
45057706df26SmrgAS="$AS"
45067706df26Smrg
45077706df26Smrg# The name of the directory that contains temporary libtool files.
45087706df26Smrgobjdir=$objdir
45097706df26Smrg
45107706df26Smrg# How to create reloadable object files.
45117706df26Smrgreload_flag=$lt_reload_flag
45127706df26Smrgreload_cmds=$lt_reload_cmds
45137706df26Smrg
45147706df26Smrg# How to pass a linker flag through the compiler.
45157706df26Smrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
45167706df26Smrg
45177706df26Smrg# Object file suffix (normally "o").
45187706df26Smrgobjext="$ac_objext"
45197706df26Smrg
45207706df26Smrg# Old archive suffix (normally "a").
45217706df26Smrglibext="$libext"
45227706df26Smrg
45237706df26Smrg# Shared library suffix (normally ".so").
45247706df26Smrgshrext_cmds='$shrext_cmds'
45257706df26Smrg
45267706df26Smrg# Executable file suffix (normally "").
45277706df26Smrgexeext="$exeext"
45287706df26Smrg
45297706df26Smrg# Additional compiler flags for building library objects.
45307706df26Smrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
45317706df26Smrgpic_mode=$pic_mode
45327706df26Smrg
45337706df26Smrg# What is the maximum length of a command?
45347706df26Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len
45357706df26Smrg
45367706df26Smrg# Does compiler simultaneously support -c and -o options?
45377706df26Smrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
45387706df26Smrg
45397706df26Smrg# Must we lock files when doing compilation?
45407706df26Smrgneed_locks=$lt_need_locks
45417706df26Smrg
45427706df26Smrg# Do we need the lib prefix for modules?
45437706df26Smrgneed_lib_prefix=$need_lib_prefix
45447706df26Smrg
45457706df26Smrg# Do we need a version for libraries?
45467706df26Smrgneed_version=$need_version
45477706df26Smrg
45487706df26Smrg# Whether dlopen is supported.
45497706df26Smrgdlopen_support=$enable_dlopen
45507706df26Smrg
45517706df26Smrg# Whether dlopen of programs is supported.
45527706df26Smrgdlopen_self=$enable_dlopen_self
45537706df26Smrg
45547706df26Smrg# Whether dlopen of statically linked programs is supported.
45557706df26Smrgdlopen_self_static=$enable_dlopen_self_static
45567706df26Smrg
45577706df26Smrg# Compiler flag to prevent dynamic linking.
45587706df26Smrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
45597706df26Smrg
45607706df26Smrg# Compiler flag to turn off builtin functions.
45617706df26Smrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
45627706df26Smrg
45637706df26Smrg# Compiler flag to allow reflexive dlopens.
45647706df26Smrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
45657706df26Smrg
45667706df26Smrg# Compiler flag to generate shared objects directly from archives.
45677706df26Smrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
45687706df26Smrg
45697706df26Smrg# Compiler flag to generate thread-safe objects.
45707706df26Smrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
45717706df26Smrg
45727706df26Smrg# Library versioning type.
45737706df26Smrgversion_type=$version_type
45747706df26Smrg
45757706df26Smrg# Format of library name prefix.
45767706df26Smrglibname_spec=$lt_libname_spec
45777706df26Smrg
45787706df26Smrg# List of archive names.  First name is the real one, the rest are links.
45797706df26Smrg# The last name is the one that the linker finds with -lNAME.
45807706df26Smrglibrary_names_spec=$lt_library_names_spec
45817706df26Smrg
45827706df26Smrg# The coded name of the library, if different from the real name.
45837706df26Smrgsoname_spec=$lt_soname_spec
45847706df26Smrg
45857706df26Smrg# Commands used to build and install an old-style archive.
45867706df26SmrgRANLIB=$lt_RANLIB
45877706df26Smrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
45887706df26Smrgold_postinstall_cmds=$lt_old_postinstall_cmds
45897706df26Smrgold_postuninstall_cmds=$lt_old_postuninstall_cmds
45907706df26Smrg
45917706df26Smrg# Create an old-style archive from a shared archive.
45927706df26Smrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
45937706df26Smrg
45947706df26Smrg# Create a temporary old-style archive to link instead of a shared archive.
45957706df26Smrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
45967706df26Smrg
45977706df26Smrg# Commands used to build and install a shared archive.
45987706df26Smrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
45997706df26Smrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
46007706df26Smrgpostinstall_cmds=$lt_postinstall_cmds
46017706df26Smrgpostuninstall_cmds=$lt_postuninstall_cmds
46027706df26Smrg
46037706df26Smrg# Commands used to build a loadable module (assumed same as above if empty)
46047706df26Smrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
46057706df26Smrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
46067706df26Smrg
46077706df26Smrg# Commands to strip libraries.
46087706df26Smrgold_striplib=$lt_old_striplib
46097706df26Smrgstriplib=$lt_striplib
46107706df26Smrg
46117706df26Smrg# Dependencies to place before the objects being linked to create a
46127706df26Smrg# shared library.
46137706df26Smrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
46147706df26Smrg
46157706df26Smrg# Dependencies to place after the objects being linked to create a
46167706df26Smrg# shared library.
46177706df26Smrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
46187706df26Smrg
46197706df26Smrg# Dependencies to place before the objects being linked to create a
46207706df26Smrg# shared library.
46217706df26Smrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
46227706df26Smrg
46237706df26Smrg# Dependencies to place after the objects being linked to create a
46247706df26Smrg# shared library.
46257706df26Smrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
46267706df26Smrg
4627047944f3Smrg# The directories searched by this compiler when creating a shared
4628047944f3Smrg# library
4629047944f3Smrgcompiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)
4630047944f3Smrg
46317706df26Smrg# The library search path used internally by the compiler when linking
46327706df26Smrg# a shared library.
46337706df26Smrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
46347706df26Smrg
46357706df26Smrg# Method to check whether dependent libraries are shared objects.
46367706df26Smrgdeplibs_check_method=$lt_deplibs_check_method
46377706df26Smrg
46387706df26Smrg# Command to use when deplibs_check_method == file_magic.
46397706df26Smrgfile_magic_cmd=$lt_file_magic_cmd
46407706df26Smrg
46417706df26Smrg# Flag that allows shared libraries with undefined symbols to be built.
46427706df26Smrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
46437706df26Smrg
46447706df26Smrg# Flag that forces no undefined symbols.
46457706df26Smrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
46467706df26Smrg
46477706df26Smrg# Commands used to finish a libtool library installation in a directory.
46487706df26Smrgfinish_cmds=$lt_finish_cmds
46497706df26Smrg
46507706df26Smrg# Same as above, but a single script fragment to be evaled but not shown.
46517706df26Smrgfinish_eval=$lt_finish_eval
46527706df26Smrg
46537706df26Smrg# Take the output of nm and produce a listing of raw symbols and C names.
46547706df26Smrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
46557706df26Smrg
46567706df26Smrg# Transform the output of nm in a proper C declaration
46577706df26Smrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
46587706df26Smrg
46597706df26Smrg# Transform the output of nm in a C name address pair
46607706df26Smrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
46617706df26Smrg
46627706df26Smrg# This is the shared library runtime path variable.
46637706df26Smrgrunpath_var=$runpath_var
46647706df26Smrg
46657706df26Smrg# This is the shared library path variable.
46667706df26Smrgshlibpath_var=$shlibpath_var
46677706df26Smrg
46687706df26Smrg# Is shlibpath searched before the hard-coded library search path?
46697706df26Smrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath
46707706df26Smrg
46717706df26Smrg# How to hardcode a shared library path into an executable.
46727706df26Smrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
46737706df26Smrg
46747706df26Smrg# Whether we should hardcode library paths into libraries.
46757706df26Smrghardcode_into_libs=$hardcode_into_libs
46767706df26Smrg
46777706df26Smrg# Flag to hardcode \$libdir into a binary during linking.
46787706df26Smrg# This must work even if \$libdir does not exist.
46797706df26Smrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
46807706df26Smrg
46817706df26Smrg# If ld is used when linking, flag to hardcode \$libdir into
46827706df26Smrg# a binary during linking. This must work even if \$libdir does
46837706df26Smrg# not exist.
46847706df26Smrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
46857706df26Smrg
46867706df26Smrg# Whether we need a single -rpath flag with a separated argument.
46877706df26Smrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
46887706df26Smrg
46897706df26Smrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
46907706df26Smrg# resulting binary.
46917706df26Smrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
46927706df26Smrg
46937706df26Smrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
46947706df26Smrg# resulting binary.
46957706df26Smrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
46967706df26Smrg
46977706df26Smrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
46987706df26Smrg# the resulting binary.
46997706df26Smrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
47007706df26Smrg
47017706df26Smrg# Set to yes if building a shared library automatically hardcodes DIR into the library
47027706df26Smrg# and all subsequent libraries and executables linked against it.
47037706df26Smrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
47047706df26Smrg
47057706df26Smrg# Variables whose values should be saved in libtool wrapper scripts and
47067706df26Smrg# restored at relink time.
47077706df26Smrgvariables_saved_for_relink="$variables_saved_for_relink"
47087706df26Smrg
47097706df26Smrg# Whether libtool must link a program against all its dependency libraries.
47107706df26Smrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
47117706df26Smrg
47127706df26Smrg# Compile-time system search path for libraries
47137706df26Smrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec
47147706df26Smrg
47157706df26Smrg# Run-time system search path for libraries
47167706df26Smrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
47177706df26Smrg
47187706df26Smrg# Fix the shell variable \$srcfile for the compiler.
4719047944f3Smrgfix_srcfile_path=$lt_fix_srcfile_path
47207706df26Smrg
47217706df26Smrg# Set to yes if exported symbols are required.
47227706df26Smrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
47237706df26Smrg
47247706df26Smrg# The commands to list exported symbols.
47257706df26Smrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
47267706df26Smrg
47277706df26Smrg# The commands to extract the exported symbol list from a shared archive.
47287706df26Smrgextract_expsyms_cmds=$lt_extract_expsyms_cmds
47297706df26Smrg
47307706df26Smrg# Symbols that should not be listed in the preloaded symbols.
47317706df26Smrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
47327706df26Smrg
47337706df26Smrg# Symbols that must always be exported.
47347706df26Smrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
47357706df26Smrg
47367706df26Smrgifelse([$1],[],
47377706df26Smrg[# ### END LIBTOOL CONFIG],
47387706df26Smrg[# ### END LIBTOOL TAG CONFIG: $tagname])
47397706df26Smrg
47407706df26Smrg__EOF__
47417706df26Smrg
47427706df26Smrgifelse([$1],[], [
47437706df26Smrg  case $host_os in
47447706df26Smrg  aix3*)
47457706df26Smrg    cat <<\EOF >> "$cfgfile"
47467706df26Smrg
47477706df26Smrg# AIX sometimes has problems with the GCC collect2 program.  For some
47487706df26Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems
47497706df26Smrg# vanish in a puff of smoke.
47507706df26Smrgif test "X${COLLECT_NAMES+set}" != Xset; then
47517706df26Smrg  COLLECT_NAMES=
47527706df26Smrg  export COLLECT_NAMES
47537706df26Smrgfi
47547706df26SmrgEOF
47557706df26Smrg    ;;
47567706df26Smrg  esac
47577706df26Smrg
47587706df26Smrg  # We use sed instead of cat because bash on DJGPP gets confused if
47597706df26Smrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
47607706df26Smrg  # text mode, it properly converts lines to CR/LF.  This bash problem
47617706df26Smrg  # is reportedly fixed, but why not run on old versions too?
47627706df26Smrg  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
47637706df26Smrg
47647706df26Smrg  mv -f "$cfgfile" "$ofile" || \
47657706df26Smrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
47667706df26Smrg  chmod +x "$ofile"
47677706df26Smrg])
47687706df26Smrgelse
47697706df26Smrg  # If there is no Makefile yet, we rely on a make rule to execute
47707706df26Smrg  # `config.status --recheck' to rerun these tests and create the
47717706df26Smrg  # libtool script then.
47727706df26Smrg  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
47737706df26Smrg  if test -f "$ltmain_in"; then
47747706df26Smrg    test -f Makefile && make "$ltmain"
47757706df26Smrg  fi
47767706df26Smrgfi
47777706df26Smrg])# AC_LIBTOOL_CONFIG
47787706df26Smrg
47797706df26Smrg
47807706df26Smrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
47817706df26Smrg# -------------------------------------------
47827706df26SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
47837706df26Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
47847706df26Smrg
47857706df26Smrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
47867706df26Smrg
47877706df26Smrgif test "$GCC" = yes; then
47887706df26Smrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
47897706df26Smrg
47907706df26Smrg  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
47917706df26Smrg    lt_cv_prog_compiler_rtti_exceptions,
47927706df26Smrg    [-fno-rtti -fno-exceptions], [],
47937706df26Smrg    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
47947706df26Smrgfi
47957706df26Smrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
47967706df26Smrg
47977706df26Smrg
47987706df26Smrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
47997706df26Smrg# ---------------------------------
48007706df26SmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
48017706df26Smrg[AC_REQUIRE([AC_CANONICAL_HOST])
4802047944f3SmrgAC_REQUIRE([LT_AC_PROG_SED])
48037706df26SmrgAC_REQUIRE([AC_PROG_NM])
48047706df26SmrgAC_REQUIRE([AC_OBJEXT])
48057706df26Smrg# Check for command to grab the raw symbol name followed by C symbol from nm.
48067706df26SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
48077706df26SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
48087706df26Smrg[
48097706df26Smrg# These are sane defaults that work on at least a few old systems.
48107706df26Smrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
48117706df26Smrg
48127706df26Smrg# Character class describing NM global symbol codes.
48137706df26Smrgsymcode='[[BCDEGRST]]'
48147706df26Smrg
48157706df26Smrg# Regexp to match symbols that can be accessed directly from C.
48167706df26Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
48177706df26Smrg
48187706df26Smrg# Transform an extracted symbol line into a proper C declaration
48197706df26Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
48207706df26Smrg
48217706df26Smrg# Transform an extracted symbol line into symbol name and symbol address
48227706df26Smrglt_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'"
48237706df26Smrg
48247706df26Smrg# Define system-specific variables.
48257706df26Smrgcase $host_os in
48267706df26Smrgaix*)
48277706df26Smrg  symcode='[[BCDT]]'
48287706df26Smrg  ;;
48297706df26Smrgcygwin* | mingw* | pw32*)
48307706df26Smrg  symcode='[[ABCDGISTW]]'
48317706df26Smrg  ;;
48327706df26Smrghpux*) # Its linker distinguishes data from code symbols
48337706df26Smrg  if test "$host_cpu" = ia64; then
48347706df26Smrg    symcode='[[ABCDEGRST]]'
48357706df26Smrg  fi
48367706df26Smrg  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
48377706df26Smrg  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'"
48387706df26Smrg  ;;
4839047944f3Smrglinux* | k*bsd*-gnu)
48407706df26Smrg  if test "$host_cpu" = ia64; then
48417706df26Smrg    symcode='[[ABCDGIRSTW]]'
48427706df26Smrg    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
48437706df26Smrg    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'"
48447706df26Smrg  fi
48457706df26Smrg  ;;
48467706df26Smrgirix* | nonstopux*)
48477706df26Smrg  symcode='[[BCDEGRST]]'
48487706df26Smrg  ;;
48497706df26Smrgosf*)
48507706df26Smrg  symcode='[[BCDEGQRST]]'
48517706df26Smrg  ;;
48527706df26Smrgsolaris*)
48537706df26Smrg  symcode='[[BDRT]]'
48547706df26Smrg  ;;
48557706df26Smrgsco3.2v5*)
48567706df26Smrg  symcode='[[DT]]'
48577706df26Smrg  ;;
48587706df26Smrgsysv4.2uw2*)
48597706df26Smrg  symcode='[[DT]]'
48607706df26Smrg  ;;
48617706df26Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
48627706df26Smrg  symcode='[[ABDT]]'
48637706df26Smrg  ;;
48647706df26Smrgsysv4)
48657706df26Smrg  symcode='[[DFNSTU]]'
48667706df26Smrg  ;;
48677706df26Smrgesac
48687706df26Smrg
48697706df26Smrg# Handle CRLF in mingw tool chain
48707706df26Smrgopt_cr=
48717706df26Smrgcase $build_os in
48727706df26Smrgmingw*)
48737706df26Smrg  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
48747706df26Smrg  ;;
48757706df26Smrgesac
48767706df26Smrg
48777706df26Smrg# If we're using GNU nm, then use its standard symbol codes.
48787706df26Smrgcase `$NM -V 2>&1` in
48797706df26Smrg*GNU* | *'with BFD'*)
48807706df26Smrg  symcode='[[ABCDGIRSTW]]' ;;
48817706df26Smrgesac
48827706df26Smrg
48837706df26Smrg# Try without a prefix undercore, then with it.
48847706df26Smrgfor ac_symprfx in "" "_"; do
48857706df26Smrg
48867706df26Smrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
48877706df26Smrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
48887706df26Smrg
48897706df26Smrg  # Write the raw and C identifiers.
48907706df26Smrg  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
48917706df26Smrg
48927706df26Smrg  # Check to see that the pipe works correctly.
48937706df26Smrg  pipe_works=no
48947706df26Smrg
48957706df26Smrg  rm -f conftest*
48967706df26Smrg  cat > conftest.$ac_ext <<EOF
48977706df26Smrg#ifdef __cplusplus
48987706df26Smrgextern "C" {
48997706df26Smrg#endif
49007706df26Smrgchar nm_test_var;
49017706df26Smrgvoid nm_test_func(){}
49027706df26Smrg#ifdef __cplusplus
49037706df26Smrg}
49047706df26Smrg#endif
49057706df26Smrgint main(){nm_test_var='a';nm_test_func();return(0);}
49067706df26SmrgEOF
49077706df26Smrg
49087706df26Smrg  if AC_TRY_EVAL(ac_compile); then
49097706df26Smrg    # Now try to grab the symbols.
49107706df26Smrg    nlist=conftest.nm
49117706df26Smrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
49127706df26Smrg      # Try sorting and uniquifying the output.
49137706df26Smrg      if sort "$nlist" | uniq > "$nlist"T; then
49147706df26Smrg	mv -f "$nlist"T "$nlist"
49157706df26Smrg      else
49167706df26Smrg	rm -f "$nlist"T
49177706df26Smrg      fi
49187706df26Smrg
49197706df26Smrg      # Make sure that we snagged all the symbols we need.
49207706df26Smrg      if grep ' nm_test_var$' "$nlist" >/dev/null; then
49217706df26Smrg	if grep ' nm_test_func$' "$nlist" >/dev/null; then
49227706df26Smrg	  cat <<EOF > conftest.$ac_ext
49237706df26Smrg#ifdef __cplusplus
49247706df26Smrgextern "C" {
49257706df26Smrg#endif
49267706df26Smrg
49277706df26SmrgEOF
49287706df26Smrg	  # Now generate the symbol file.
49297706df26Smrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
49307706df26Smrg
49317706df26Smrg	  cat <<EOF >> conftest.$ac_ext
49327706df26Smrg#if defined (__STDC__) && __STDC__
49337706df26Smrg# define lt_ptr_t void *
49347706df26Smrg#else
49357706df26Smrg# define lt_ptr_t char *
49367706df26Smrg# define const
49377706df26Smrg#endif
49387706df26Smrg
49397706df26Smrg/* The mapping between symbol names and symbols. */
49407706df26Smrgconst struct {
49417706df26Smrg  const char *name;
49427706df26Smrg  lt_ptr_t address;
49437706df26Smrg}
49447706df26Smrglt_preloaded_symbols[[]] =
49457706df26Smrg{
49467706df26SmrgEOF
49477706df26Smrg	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
49487706df26Smrg	  cat <<\EOF >> conftest.$ac_ext
49497706df26Smrg  {0, (lt_ptr_t) 0}
49507706df26Smrg};
49517706df26Smrg
49527706df26Smrg#ifdef __cplusplus
49537706df26Smrg}
49547706df26Smrg#endif
49557706df26SmrgEOF
49567706df26Smrg	  # Now try linking the two files.
49577706df26Smrg	  mv conftest.$ac_objext conftstm.$ac_objext
49587706df26Smrg	  lt_save_LIBS="$LIBS"
49597706df26Smrg	  lt_save_CFLAGS="$CFLAGS"
49607706df26Smrg	  LIBS="conftstm.$ac_objext"
49617706df26Smrg	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
49627706df26Smrg	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
49637706df26Smrg	    pipe_works=yes
49647706df26Smrg	  fi
49657706df26Smrg	  LIBS="$lt_save_LIBS"
49667706df26Smrg	  CFLAGS="$lt_save_CFLAGS"
49677706df26Smrg	else
49687706df26Smrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
49697706df26Smrg	fi
49707706df26Smrg      else
49717706df26Smrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
49727706df26Smrg      fi
49737706df26Smrg    else
49747706df26Smrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
49757706df26Smrg    fi
49767706df26Smrg  else
49777706df26Smrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
49787706df26Smrg    cat conftest.$ac_ext >&5
49797706df26Smrg  fi
4980047944f3Smrg  rm -rf conftest* conftst*
49817706df26Smrg
49827706df26Smrg  # Do not use the global_symbol_pipe unless it works.
49837706df26Smrg  if test "$pipe_works" = yes; then
49847706df26Smrg    break
49857706df26Smrg  else
49867706df26Smrg    lt_cv_sys_global_symbol_pipe=
49877706df26Smrg  fi
49887706df26Smrgdone
49897706df26Smrg])
49907706df26Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
49917706df26Smrg  lt_cv_sys_global_symbol_to_cdecl=
49927706df26Smrgfi
49937706df26Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
49947706df26Smrg  AC_MSG_RESULT(failed)
49957706df26Smrgelse
49967706df26Smrg  AC_MSG_RESULT(ok)
49977706df26Smrgfi
49987706df26Smrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
49997706df26Smrg
50007706df26Smrg
50017706df26Smrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
50027706df26Smrg# ---------------------------------------
50037706df26SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
50047706df26Smrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
50057706df26Smrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
50067706df26Smrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
50077706df26Smrg
50087706df26SmrgAC_MSG_CHECKING([for $compiler option to produce PIC])
50097706df26Smrg ifelse([$1],[CXX],[
50107706df26Smrg  # C++ specific cases for pic, static, wl, etc.
50117706df26Smrg  if test "$GXX" = yes; then
50127706df26Smrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
50137706df26Smrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
50147706df26Smrg
50157706df26Smrg    case $host_os in
50167706df26Smrg    aix*)
50177706df26Smrg      # All AIX code is PIC.
50187706df26Smrg      if test "$host_cpu" = ia64; then
50197706df26Smrg	# AIX 5 now supports IA64 processor
50207706df26Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
50217706df26Smrg      fi
50227706df26Smrg      ;;
50237706df26Smrg    amigaos*)
50247706df26Smrg      # FIXME: we need at least 68020 code to build shared libraries, but
50257706df26Smrg      # adding the `-m68020' flag to GCC prevents building anything better,
50267706df26Smrg      # like `-m68040'.
50277706df26Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
50287706df26Smrg      ;;
5029047944f3Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
50307706df26Smrg      # PIC is the default for these OSes.
50317706df26Smrg      ;;
5032047944f3Smrg    mingw* | cygwin* | os2* | pw32*)
50337706df26Smrg      # This hack is so that the source file can tell whether it is being
50347706df26Smrg      # built for inclusion in a dll (and should export symbols for example).
5035047944f3Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
5036047944f3Smrg      # (--disable-auto-import) libraries
5037047944f3Smrg      m4_if([$1], [GCJ], [],
5038047944f3Smrg	[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
50397706df26Smrg      ;;
50407706df26Smrg    darwin* | rhapsody*)
50417706df26Smrg      # PIC is the default on this platform
50427706df26Smrg      # Common symbols not allowed in MH_DYLIB files
50437706df26Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
50447706df26Smrg      ;;
50457706df26Smrg    *djgpp*)
50467706df26Smrg      # DJGPP does not support shared libraries at all
50477706df26Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
50487706df26Smrg      ;;
5049047944f3Smrg    interix[[3-9]]*)
50507706df26Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
50517706df26Smrg      # Instead, we relocate shared libraries at runtime.
50527706df26Smrg      ;;
50537706df26Smrg    sysv4*MP*)
50547706df26Smrg      if test -d /usr/nec; then
50557706df26Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
50567706df26Smrg      fi
50577706df26Smrg      ;;
50587706df26Smrg    hpux*)
50597706df26Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
50607706df26Smrg      # not for PA HP-UX.
50617706df26Smrg      case $host_cpu in
50627706df26Smrg      hppa*64*|ia64*)
50637706df26Smrg	;;
50647706df26Smrg      *)
50657706df26Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
50667706df26Smrg	;;
50677706df26Smrg      esac
50687706df26Smrg      ;;
50697706df26Smrg    *)
50707706df26Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
50717706df26Smrg      ;;
50727706df26Smrg    esac
50737706df26Smrg  else
50747706df26Smrg    case $host_os in
5075047944f3Smrg      aix[[4-9]]*)
50767706df26Smrg	# All AIX code is PIC.
50777706df26Smrg	if test "$host_cpu" = ia64; then
50787706df26Smrg	  # AIX 5 now supports IA64 processor
50797706df26Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
50807706df26Smrg	else
50817706df26Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
50827706df26Smrg	fi
50837706df26Smrg	;;
50847706df26Smrg      chorus*)
50857706df26Smrg	case $cc_basename in
50867706df26Smrg	cxch68*)
50877706df26Smrg	  # Green Hills C++ Compiler
50887706df26Smrg	  # _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"
50897706df26Smrg	  ;;
50907706df26Smrg	esac
50917706df26Smrg	;;
50927706df26Smrg       darwin*)
50937706df26Smrg         # PIC is the default on this platform
50947706df26Smrg         # Common symbols not allowed in MH_DYLIB files
50957706df26Smrg         case $cc_basename in
50967706df26Smrg           xlc*)
50977706df26Smrg           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
50987706df26Smrg           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
50997706df26Smrg           ;;
51007706df26Smrg         esac
51017706df26Smrg       ;;
51027706df26Smrg      dgux*)
51037706df26Smrg	case $cc_basename in
51047706df26Smrg	  ec++*)
51057706df26Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
51067706df26Smrg	    ;;
51077706df26Smrg	  ghcx*)
51087706df26Smrg	    # Green Hills C++ Compiler
51097706df26Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
51107706df26Smrg	    ;;
51117706df26Smrg	  *)
51127706df26Smrg	    ;;
51137706df26Smrg	esac
51147706df26Smrg	;;
5115047944f3Smrg      freebsd* | dragonfly*)
51167706df26Smrg	# FreeBSD uses GNU C++
51177706df26Smrg	;;
51187706df26Smrg      hpux9* | hpux10* | hpux11*)
51197706df26Smrg	case $cc_basename in
51207706df26Smrg	  CC*)
51217706df26Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
51227706df26Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
51237706df26Smrg	    if test "$host_cpu" != ia64; then
51247706df26Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
51257706df26Smrg	    fi
51267706df26Smrg	    ;;
51277706df26Smrg	  aCC*)
51287706df26Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
51297706df26Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
51307706df26Smrg	    case $host_cpu in
51317706df26Smrg	    hppa*64*|ia64*)
51327706df26Smrg	      # +Z the default
51337706df26Smrg	      ;;
51347706df26Smrg	    *)
51357706df26Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
51367706df26Smrg	      ;;
51377706df26Smrg	    esac
51387706df26Smrg	    ;;
51397706df26Smrg	  *)
51407706df26Smrg	    ;;
51417706df26Smrg	esac
51427706df26Smrg	;;
51437706df26Smrg      interix*)
51447706df26Smrg	# This is c89, which is MS Visual C++ (no shared libs)
51457706df26Smrg	# Anyone wants to do a port?
51467706df26Smrg	;;
51477706df26Smrg      irix5* | irix6* | nonstopux*)
51487706df26Smrg	case $cc_basename in
51497706df26Smrg	  CC*)
51507706df26Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
51517706df26Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
51527706df26Smrg	    # CC pic flag -KPIC is the default.
51537706df26Smrg	    ;;
51547706df26Smrg	  *)
51557706df26Smrg	    ;;
51567706df26Smrg	esac
51577706df26Smrg	;;
5158047944f3Smrg      linux* | k*bsd*-gnu)
51597706df26Smrg	case $cc_basename in
51607706df26Smrg	  KCC*)
51617706df26Smrg	    # KAI C++ Compiler
51627706df26Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
51637706df26Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
51647706df26Smrg	    ;;
51657706df26Smrg	  icpc* | ecpc*)
51667706df26Smrg	    # Intel C++
51677706df26Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
51687706df26Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
51697706df26Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
51707706df26Smrg	    ;;
5171047944f3Smrg	  pgCC* | pgcpp*)
51727706df26Smrg	    # Portland Group C++ compiler.
51737706df26Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
51747706df26Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
51757706df26Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
51767706df26Smrg	    ;;
51777706df26Smrg	  cxx*)
51787706df26Smrg	    # Compaq C++
51797706df26Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
51807706df26Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
51817706df26Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
51827706df26Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
51837706df26Smrg	    ;;
51847706df26Smrg	  *)
5185047944f3Smrg	    case `$CC -V 2>&1 | sed 5q` in
5186047944f3Smrg	    *Sun\ C*)
5187047944f3Smrg	      # Sun C++ 5.9
5188047944f3Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5189047944f3Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5190047944f3Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5191047944f3Smrg	      ;;
5192047944f3Smrg	    esac
51937706df26Smrg	    ;;
51947706df26Smrg	esac
51957706df26Smrg	;;
51967706df26Smrg      lynxos*)
51977706df26Smrg	;;
51987706df26Smrg      m88k*)
51997706df26Smrg	;;
52007706df26Smrg      mvs*)
52017706df26Smrg	case $cc_basename in
52027706df26Smrg	  cxx*)
52037706df26Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
52047706df26Smrg	    ;;
52057706df26Smrg	  *)
52067706df26Smrg	    ;;
52077706df26Smrg	esac
52087706df26Smrg	;;
52097706df26Smrg      netbsd*)
52107706df26Smrg	;;
52117706df26Smrg      osf3* | osf4* | osf5*)
52127706df26Smrg	case $cc_basename in
52137706df26Smrg	  KCC*)
52147706df26Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
52157706df26Smrg	    ;;
52167706df26Smrg	  RCC*)
52177706df26Smrg	    # Rational C++ 2.4.1
52187706df26Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
52197706df26Smrg	    ;;
52207706df26Smrg	  cxx*)
52217706df26Smrg	    # Digital/Compaq C++
52227706df26Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
52237706df26Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
52247706df26Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
52257706df26Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
52267706df26Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
52277706df26Smrg	    ;;
52287706df26Smrg	  *)
52297706df26Smrg	    ;;
52307706df26Smrg	esac
52317706df26Smrg	;;
52327706df26Smrg      psos*)
52337706df26Smrg	;;
52347706df26Smrg      solaris*)
52357706df26Smrg	case $cc_basename in
52367706df26Smrg	  CC*)
52377706df26Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
52387706df26Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
52397706df26Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
52407706df26Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
52417706df26Smrg	    ;;
52427706df26Smrg	  gcx*)
52437706df26Smrg	    # Green Hills C++ Compiler
52447706df26Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
52457706df26Smrg	    ;;
52467706df26Smrg	  *)
52477706df26Smrg	    ;;
52487706df26Smrg	esac
52497706df26Smrg	;;
52507706df26Smrg      sunos4*)
52517706df26Smrg	case $cc_basename in
52527706df26Smrg	  CC*)
52537706df26Smrg	    # Sun C++ 4.x
52547706df26Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
52557706df26Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
52567706df26Smrg	    ;;
52577706df26Smrg	  lcc*)
52587706df26Smrg	    # Lucid
52597706df26Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
52607706df26Smrg	    ;;
52617706df26Smrg	  *)
52627706df26Smrg	    ;;
52637706df26Smrg	esac
52647706df26Smrg	;;
52657706df26Smrg      tandem*)
52667706df26Smrg	case $cc_basename in
52677706df26Smrg	  NCC*)
52687706df26Smrg	    # NonStop-UX NCC 3.20
52697706df26Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
52707706df26Smrg	    ;;
52717706df26Smrg	  *)
52727706df26Smrg	    ;;
52737706df26Smrg	esac
52747706df26Smrg	;;
52757706df26Smrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
52767706df26Smrg	case $cc_basename in
52777706df26Smrg	  CC*)
52787706df26Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
52797706df26Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
52807706df26Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
52817706df26Smrg	    ;;
52827706df26Smrg	esac
52837706df26Smrg	;;
52847706df26Smrg      vxworks*)
52857706df26Smrg	;;
52867706df26Smrg      *)
52877706df26Smrg	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
52887706df26Smrg	;;
52897706df26Smrg    esac
52907706df26Smrg  fi
52917706df26Smrg],
52927706df26Smrg[
52937706df26Smrg  if test "$GCC" = yes; then
52947706df26Smrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
52957706df26Smrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
52967706df26Smrg
52977706df26Smrg    case $host_os in
52987706df26Smrg      aix*)
52997706df26Smrg      # All AIX code is PIC.
53007706df26Smrg      if test "$host_cpu" = ia64; then
53017706df26Smrg	# AIX 5 now supports IA64 processor
53027706df26Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
53037706df26Smrg      fi
53047706df26Smrg      ;;
53057706df26Smrg
53067706df26Smrg    amigaos*)
53077706df26Smrg      # FIXME: we need at least 68020 code to build shared libraries, but
53087706df26Smrg      # adding the `-m68020' flag to GCC prevents building anything better,
53097706df26Smrg      # like `-m68040'.
53107706df26Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
53117706df26Smrg      ;;
53127706df26Smrg
5313047944f3Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
53147706df26Smrg      # PIC is the default for these OSes.
53157706df26Smrg      ;;
53167706df26Smrg
5317047944f3Smrg    mingw* | cygwin* | pw32* | os2*)
53187706df26Smrg      # This hack is so that the source file can tell whether it is being
53197706df26Smrg      # built for inclusion in a dll (and should export symbols for example).
5320047944f3Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
5321047944f3Smrg      # (--disable-auto-import) libraries
5322047944f3Smrg      m4_if([$1], [GCJ], [],
5323047944f3Smrg	[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
53247706df26Smrg      ;;
53257706df26Smrg
53267706df26Smrg    darwin* | rhapsody*)
53277706df26Smrg      # PIC is the default on this platform
53287706df26Smrg      # Common symbols not allowed in MH_DYLIB files
53297706df26Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
53307706df26Smrg      ;;
53317706df26Smrg
5332047944f3Smrg    interix[[3-9]]*)
53337706df26Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
53347706df26Smrg      # Instead, we relocate shared libraries at runtime.
53357706df26Smrg      ;;
53367706df26Smrg
53377706df26Smrg    msdosdjgpp*)
53387706df26Smrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
53397706df26Smrg      # on systems that don't support them.
53407706df26Smrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
53417706df26Smrg      enable_shared=no
53427706df26Smrg      ;;
53437706df26Smrg
53447706df26Smrg    sysv4*MP*)
53457706df26Smrg      if test -d /usr/nec; then
53467706df26Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
53477706df26Smrg      fi
53487706df26Smrg      ;;
53497706df26Smrg
53507706df26Smrg    hpux*)
53517706df26Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
53527706df26Smrg      # not for PA HP-UX.
53537706df26Smrg      case $host_cpu in
53547706df26Smrg      hppa*64*|ia64*)
53557706df26Smrg	# +Z the default
53567706df26Smrg	;;
53577706df26Smrg      *)
53587706df26Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
53597706df26Smrg	;;
53607706df26Smrg      esac
53617706df26Smrg      ;;
53627706df26Smrg
53637706df26Smrg    *)
53647706df26Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
53657706df26Smrg      ;;
53667706df26Smrg    esac
53677706df26Smrg  else
53687706df26Smrg    # PORTME Check for flag to pass linker flags through the system compiler.
53697706df26Smrg    case $host_os in
53707706df26Smrg    aix*)
53717706df26Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
53727706df26Smrg      if test "$host_cpu" = ia64; then
53737706df26Smrg	# AIX 5 now supports IA64 processor
53747706df26Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
53757706df26Smrg      else
53767706df26Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
53777706df26Smrg      fi
53787706df26Smrg      ;;
53797706df26Smrg      darwin*)
53807706df26Smrg        # PIC is the default on this platform
53817706df26Smrg        # Common symbols not allowed in MH_DYLIB files
53827706df26Smrg       case $cc_basename in
53837706df26Smrg         xlc*)
53847706df26Smrg         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
53857706df26Smrg         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
53867706df26Smrg         ;;
53877706df26Smrg       esac
53887706df26Smrg       ;;
53897706df26Smrg
5390047944f3Smrg    mingw* | cygwin* | pw32* | os2*)
53917706df26Smrg      # This hack is so that the source file can tell whether it is being
53927706df26Smrg      # built for inclusion in a dll (and should export symbols for example).
5393047944f3Smrg      m4_if([$1], [GCJ], [],
5394047944f3Smrg	[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
53957706df26Smrg      ;;
53967706df26Smrg
53977706df26Smrg    hpux9* | hpux10* | hpux11*)
53987706df26Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
53997706df26Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
54007706df26Smrg      # not for PA HP-UX.
54017706df26Smrg      case $host_cpu in
54027706df26Smrg      hppa*64*|ia64*)
54037706df26Smrg	# +Z the default
54047706df26Smrg	;;
54057706df26Smrg      *)
54067706df26Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
54077706df26Smrg	;;
54087706df26Smrg      esac
54097706df26Smrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
54107706df26Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
54117706df26Smrg      ;;
54127706df26Smrg
54137706df26Smrg    irix5* | irix6* | nonstopux*)
54147706df26Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
54157706df26Smrg      # PIC (with -KPIC) is the default.
54167706df26Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
54177706df26Smrg      ;;
54187706df26Smrg
54197706df26Smrg    newsos6)
54207706df26Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
54217706df26Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
54227706df26Smrg      ;;
54237706df26Smrg
5424047944f3Smrg    linux* | k*bsd*-gnu)
54257706df26Smrg      case $cc_basename in
54267706df26Smrg      icc* | ecc*)
54277706df26Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
54287706df26Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
54297706df26Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
54307706df26Smrg        ;;
54317706df26Smrg      pgcc* | pgf77* | pgf90* | pgf95*)
54327706df26Smrg        # Portland Group compilers (*not* the Pentium gcc compiler,
54337706df26Smrg	# which looks to be a dead project)
54347706df26Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
54357706df26Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
54367706df26Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
54377706df26Smrg        ;;
54387706df26Smrg      ccc*)
54397706df26Smrg        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
54407706df26Smrg        # All Alpha code is PIC.
54417706df26Smrg        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
54427706df26Smrg        ;;
5443047944f3Smrg      *)
5444047944f3Smrg        case `$CC -V 2>&1 | sed 5q` in
5445047944f3Smrg	*Sun\ C*)
5446047944f3Smrg	  # Sun C 5.9
5447047944f3Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5448047944f3Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5449047944f3Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5450047944f3Smrg	  ;;
5451047944f3Smrg	*Sun\ F*)
5452047944f3Smrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
5453047944f3Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5454047944f3Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5455047944f3Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=''
5456047944f3Smrg	  ;;
5457047944f3Smrg	esac
5458047944f3Smrg	;;
54597706df26Smrg      esac
54607706df26Smrg      ;;
54617706df26Smrg
54627706df26Smrg    osf3* | osf4* | osf5*)
54637706df26Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
54647706df26Smrg      # All OSF/1 code is PIC.
54657706df26Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
54667706df26Smrg      ;;
54677706df26Smrg
5468047944f3Smrg    rdos*)
5469047944f3Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5470047944f3Smrg      ;;
5471047944f3Smrg
54727706df26Smrg    solaris*)
54737706df26Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
54747706df26Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
54757706df26Smrg      case $cc_basename in
54767706df26Smrg      f77* | f90* | f95*)
54777706df26Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
54787706df26Smrg      *)
54797706df26Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
54807706df26Smrg      esac
54817706df26Smrg      ;;
54827706df26Smrg
54837706df26Smrg    sunos4*)
54847706df26Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
54857706df26Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
54867706df26Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
54877706df26Smrg      ;;
54887706df26Smrg
54897706df26Smrg    sysv4 | sysv4.2uw2* | sysv4.3*)
54907706df26Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
54917706df26Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
54927706df26Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
54937706df26Smrg      ;;
54947706df26Smrg
54957706df26Smrg    sysv4*MP*)
54967706df26Smrg      if test -d /usr/nec ;then
54977706df26Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
54987706df26Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
54997706df26Smrg      fi
55007706df26Smrg      ;;
55017706df26Smrg
55027706df26Smrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
55037706df26Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
55047706df26Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
55057706df26Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
55067706df26Smrg      ;;
55077706df26Smrg
55087706df26Smrg    unicos*)
55097706df26Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
55107706df26Smrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
55117706df26Smrg      ;;
55127706df26Smrg
55137706df26Smrg    uts4*)
55147706df26Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
55157706df26Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
55167706df26Smrg      ;;
55177706df26Smrg
55187706df26Smrg    *)
55197706df26Smrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
55207706df26Smrg      ;;
55217706df26Smrg    esac
55227706df26Smrg  fi
55237706df26Smrg])
55247706df26SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
55257706df26Smrg
55267706df26Smrg#
55277706df26Smrg# Check to make sure the PIC flag actually works.
55287706df26Smrg#
55297706df26Smrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
55307706df26Smrg  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5531047944f3Smrg    _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1),
55327706df26Smrg    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
55337706df26Smrg    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
55347706df26Smrg     "" | " "*) ;;
55357706df26Smrg     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
55367706df26Smrg     esac],
55377706df26Smrg    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
55387706df26Smrg     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
55397706df26Smrgfi
55407706df26Smrgcase $host_os in
55417706df26Smrg  # For platforms which do not support PIC, -DPIC is meaningless:
55427706df26Smrg  *djgpp*)
55437706df26Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
55447706df26Smrg    ;;
55457706df26Smrg  *)
55467706df26Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
55477706df26Smrg    ;;
55487706df26Smrgesac
55497706df26Smrg
55507706df26Smrg#
55517706df26Smrg# Check to make sure the static flag actually works.
55527706df26Smrg#
55537706df26Smrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
55547706df26SmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5555047944f3Smrg  _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1),
55567706df26Smrg  $lt_tmp_static_flag,
55577706df26Smrg  [],
55587706df26Smrg  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
55597706df26Smrg])
55607706df26Smrg
55617706df26Smrg
55627706df26Smrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
55637706df26Smrg# ------------------------------------
55647706df26Smrg# See if the linker supports building shared libraries.
55657706df26SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
5566047944f3Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
5567047944f3SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
55687706df26Smrgifelse([$1],[CXX],[
55697706df26Smrg  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
55707706df26Smrg  case $host_os in
5571047944f3Smrg  aix[[4-9]]*)
55727706df26Smrg    # If we're using GNU nm, then we don't want the "-C" option.
55737706df26Smrg    # -C means demangle to AIX nm, but means don't demangle with GNU nm
55747706df26Smrg    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
55757706df26Smrg      _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'
55767706df26Smrg    else
55777706df26Smrg      _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'
55787706df26Smrg    fi
55797706df26Smrg    ;;
55807706df26Smrg  pw32*)
55817706df26Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
55827706df26Smrg  ;;
55837706df26Smrg  cygwin* | mingw*)
5584047944f3Smrg    _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'
55857706df26Smrg  ;;
55867706df26Smrg  *)
55877706df26Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
55887706df26Smrg  ;;
55897706df26Smrg  esac
5590047944f3Smrg  _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
55917706df26Smrg],[
55927706df26Smrg  runpath_var=
55937706df26Smrg  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
55947706df26Smrg  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
55957706df26Smrg  _LT_AC_TAGVAR(archive_cmds, $1)=
55967706df26Smrg  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
55977706df26Smrg  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
55987706df26Smrg  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
55997706df26Smrg  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
56007706df26Smrg  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
56017706df26Smrg  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
56027706df26Smrg  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
56037706df26Smrg  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
56047706df26Smrg  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
56057706df26Smrg  _LT_AC_TAGVAR(hardcode_direct, $1)=no
56067706df26Smrg  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
56077706df26Smrg  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
56087706df26Smrg  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
56097706df26Smrg  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
56107706df26Smrg  _LT_AC_TAGVAR(module_cmds, $1)=
56117706df26Smrg  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
56127706df26Smrg  _LT_AC_TAGVAR(always_export_symbols, $1)=no
56137706df26Smrg  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
56147706df26Smrg  # include_expsyms should be a list of space-separated symbols to be *always*
56157706df26Smrg  # included in the symbol list
56167706df26Smrg  _LT_AC_TAGVAR(include_expsyms, $1)=
56177706df26Smrg  # exclude_expsyms can be an extended regexp of symbols to exclude
56187706df26Smrg  # it will be wrapped by ` (' and `)$', so one must not match beginning or
56197706df26Smrg  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
56207706df26Smrg  # as well as any symbol that contains `d'.
5621047944f3Smrg  _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
56227706df26Smrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
56237706df26Smrg  # platforms (ab)use it in PIC code, but their linkers get confused if
56247706df26Smrg  # the symbol is explicitly referenced.  Since portable code cannot
56257706df26Smrg  # rely on this symbol name, it's probably fine to never include it in
56267706df26Smrg  # preloaded symbol tables.
5627047944f3Smrg  # Exclude shared library initialization/finalization symbols.
5628047944f3Smrgdnl Note also adjust exclude_expsyms for C++ above.
56297706df26Smrg  extract_expsyms_cmds=
56307706df26Smrg  # Just being paranoid about ensuring that cc_basename is set.
56317706df26Smrg  _LT_CC_BASENAME([$compiler])
56327706df26Smrg  case $host_os in
56337706df26Smrg  cygwin* | mingw* | pw32*)
56347706df26Smrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
56357706df26Smrg    # When not using gcc, we currently assume that we are using
56367706df26Smrg    # Microsoft Visual C++.
56377706df26Smrg    if test "$GCC" != yes; then
56387706df26Smrg      with_gnu_ld=no
56397706df26Smrg    fi
56407706df26Smrg    ;;
56417706df26Smrg  interix*)
56427706df26Smrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
56437706df26Smrg    with_gnu_ld=yes
56447706df26Smrg    ;;
56457706df26Smrg  openbsd*)
56467706df26Smrg    with_gnu_ld=no
56477706df26Smrg    ;;
56487706df26Smrg  esac
56497706df26Smrg
56507706df26Smrg  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
56517706df26Smrg  if test "$with_gnu_ld" = yes; then
56527706df26Smrg    # If archive_cmds runs LD, not CC, wlarc should be empty
56537706df26Smrg    wlarc='${wl}'
56547706df26Smrg
56557706df26Smrg    # Set some defaults for GNU ld with shared library support. These
56567706df26Smrg    # are reset later if shared libraries are not supported. Putting them
56577706df26Smrg    # here allows them to be overridden if necessary.
56587706df26Smrg    runpath_var=LD_RUN_PATH
56597706df26Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
56607706df26Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
56617706df26Smrg    # ancient GNU ld didn't support --whole-archive et. al.
56627706df26Smrg    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
56637706df26Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
56647706df26Smrg      else
56657706df26Smrg  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
56667706df26Smrg    fi
56677706df26Smrg    supports_anon_versioning=no
56687706df26Smrg    case `$LD -v 2>/dev/null` in
56697706df26Smrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
56707706df26Smrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
56717706df26Smrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
56727706df26Smrg      *\ 2.11.*) ;; # other 2.11 versions
56737706df26Smrg      *) supports_anon_versioning=yes ;;
56747706df26Smrg    esac
56757706df26Smrg
56767706df26Smrg    # See if GNU ld supports shared libraries.
56777706df26Smrg    case $host_os in
5678047944f3Smrg    aix[[3-9]]*)
56797706df26Smrg      # On AIX/PPC, the GNU linker is very broken
56807706df26Smrg      if test "$host_cpu" != ia64; then
56817706df26Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
56827706df26Smrg	cat <<EOF 1>&2
56837706df26Smrg
56847706df26Smrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported
56857706df26Smrg*** to be unable to reliably create shared libraries on AIX.
56867706df26Smrg*** Therefore, libtool is disabling shared libraries support.  If you
56877706df26Smrg*** really care for shared libraries, you may want to modify your PATH
56887706df26Smrg*** so that a non-GNU linker is found, and then restart.
56897706df26Smrg
56907706df26SmrgEOF
56917706df26Smrg      fi
56927706df26Smrg      ;;
56937706df26Smrg
56947706df26Smrg    amigaos*)
56957706df26Smrg      _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)'
56967706df26Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
56977706df26Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
56987706df26Smrg
56997706df26Smrg      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
57007706df26Smrg      # that the semantics of dynamic libraries on AmigaOS, at least up
57017706df26Smrg      # to version 4, is to share data among multiple programs linked
57027706df26Smrg      # with the same dynamic library.  Since this doesn't match the
57037706df26Smrg      # behavior of shared libraries on other platforms, we can't use
57047706df26Smrg      # them.
57057706df26Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
57067706df26Smrg      ;;
57077706df26Smrg
57087706df26Smrg    beos*)
57097706df26Smrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
57107706df26Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
57117706df26Smrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
57127706df26Smrg	# support --undefined.  This deserves some investigation.  FIXME
57137706df26Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
57147706df26Smrg      else
57157706df26Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
57167706df26Smrg      fi
57177706df26Smrg      ;;
57187706df26Smrg
57197706df26Smrg    cygwin* | mingw* | pw32*)
57207706df26Smrg      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
57217706df26Smrg      # as there is no search path for DLLs.
57227706df26Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
57237706df26Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
57247706df26Smrg      _LT_AC_TAGVAR(always_export_symbols, $1)=no
57257706df26Smrg      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5726047944f3Smrg      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
57277706df26Smrg
57287706df26Smrg      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
57297706df26Smrg        _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'
57307706df26Smrg	# If the export-symbols file already is a .def file (1st line
57317706df26Smrg	# is EXPORTS), use it as is; otherwise, prepend...
57327706df26Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
57337706df26Smrg	  cp $export_symbols $output_objdir/$soname.def;
57347706df26Smrg	else
57357706df26Smrg	  echo EXPORTS > $output_objdir/$soname.def;
57367706df26Smrg	  cat $export_symbols >> $output_objdir/$soname.def;
57377706df26Smrg	fi~
57387706df26Smrg	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
57397706df26Smrg      else
57407706df26Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
57417706df26Smrg      fi
57427706df26Smrg      ;;
57437706df26Smrg
5744047944f3Smrg    interix[[3-9]]*)
57457706df26Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
57467706df26Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
57477706df26Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
57487706df26Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
57497706df26Smrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
57507706df26Smrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
57517706df26Smrg      # default) and relocated if they conflict, which is a slow very memory
57527706df26Smrg      # consuming and fragmenting process.  To avoid this, we pick a random,
57537706df26Smrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
57547706df26Smrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
57557706df26Smrg      _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'
57567706df26Smrg      _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'
57577706df26Smrg      ;;
57587706df26Smrg
5759047944f3Smrg    gnu* | linux* | k*bsd*-gnu)
57607706df26Smrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
57617706df26Smrg	tmp_addflag=
57627706df26Smrg	case $cc_basename,$host_cpu in
57637706df26Smrg	pgcc*)				# Portland Group C compiler
57647706df26Smrg	  _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'
57657706df26Smrg	  tmp_addflag=' $pic_flag'
57667706df26Smrg	  ;;
57677706df26Smrg	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
57687706df26Smrg	  _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'
57697706df26Smrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
57707706df26Smrg	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
57717706df26Smrg	  tmp_addflag=' -i_dynamic' ;;
57727706df26Smrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
57737706df26Smrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
57747706df26Smrg	ifc* | ifort*)			# Intel Fortran compiler
57757706df26Smrg	  tmp_addflag=' -nofor_main' ;;
57767706df26Smrg	esac
5777047944f3Smrg	case `$CC -V 2>&1 | sed 5q` in
5778047944f3Smrg	*Sun\ C*)			# Sun C 5.9
5779047944f3Smrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
5780047944f3Smrg	  tmp_sharedflag='-G' ;;
5781047944f3Smrg	*Sun\ F*)			# Sun Fortran 8.3
5782047944f3Smrg	  tmp_sharedflag='-G' ;;
5783047944f3Smrg	*)
5784047944f3Smrg	  tmp_sharedflag='-shared' ;;
5785047944f3Smrg	esac
5786047944f3Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
57877706df26Smrg
57887706df26Smrg	if test $supports_anon_versioning = yes; then
57897706df26Smrg	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
57907706df26Smrg  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
57917706df26Smrg  $echo "local: *; };" >> $output_objdir/$libname.ver~
5792047944f3Smrg	  $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
57937706df26Smrg	fi
57947706df26Smrg      else
57957706df26Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
57967706df26Smrg      fi
57977706df26Smrg      ;;
57987706df26Smrg
57997706df26Smrg    netbsd*)
58007706df26Smrg      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
58017706df26Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
58027706df26Smrg	wlarc=
58037706df26Smrg      else
58047706df26Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
58057706df26Smrg	_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'
58067706df26Smrg      fi
58077706df26Smrg      ;;
58087706df26Smrg
58097706df26Smrg    solaris*)
58107706df26Smrg      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
58117706df26Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
58127706df26Smrg	cat <<EOF 1>&2
58137706df26Smrg
58147706df26Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
58157706df26Smrg*** create shared libraries on Solaris systems.  Therefore, libtool
58167706df26Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
58177706df26Smrg*** binutils to release 2.9.1 or newer.  Another option is to modify
58187706df26Smrg*** your PATH or compiler configuration so that the native linker is
58197706df26Smrg*** used, and then restart.
58207706df26Smrg
58217706df26SmrgEOF
58227706df26Smrg      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
58237706df26Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
58247706df26Smrg	_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'
58257706df26Smrg      else
58267706df26Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
58277706df26Smrg      fi
58287706df26Smrg      ;;
58297706df26Smrg
58307706df26Smrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
58317706df26Smrg      case `$LD -v 2>&1` in
5832047944f3Smrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
58337706df26Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
58347706df26Smrg	cat <<_LT_EOF 1>&2
58357706df26Smrg
58367706df26Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
58377706df26Smrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
58387706df26Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
58397706df26Smrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
58407706df26Smrg*** your PATH or compiler configuration so that the native linker is
58417706df26Smrg*** used, and then restart.
58427706df26Smrg
58437706df26Smrg_LT_EOF
58447706df26Smrg	;;
58457706df26Smrg	*)
58467706df26Smrg	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
58477706df26Smrg	    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
58487706df26Smrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
58497706df26Smrg	    _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'
58507706df26Smrg	  else
58517706df26Smrg	    _LT_AC_TAGVAR(ld_shlibs, $1)=no
58527706df26Smrg	  fi
58537706df26Smrg	;;
58547706df26Smrg      esac
58557706df26Smrg      ;;
58567706df26Smrg
58577706df26Smrg    sunos4*)
58587706df26Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
58597706df26Smrg      wlarc=
58607706df26Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
58617706df26Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
58627706df26Smrg      ;;
58637706df26Smrg
58647706df26Smrg    *)
58657706df26Smrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
58667706df26Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
58677706df26Smrg	_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'
58687706df26Smrg      else
58697706df26Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
58707706df26Smrg      fi
58717706df26Smrg      ;;
58727706df26Smrg    esac
58737706df26Smrg
58747706df26Smrg    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
58757706df26Smrg      runpath_var=
58767706df26Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
58777706df26Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
58787706df26Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
58797706df26Smrg    fi
58807706df26Smrg  else
58817706df26Smrg    # PORTME fill in a description of your system's linker (not GNU ld)
58827706df26Smrg    case $host_os in
58837706df26Smrg    aix3*)
58847706df26Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
58857706df26Smrg      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
58867706df26Smrg      _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'
58877706df26Smrg      # Note: this linker hardcodes the directories in LIBPATH if there
58887706df26Smrg      # are no directories specified by -L.
58897706df26Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
58907706df26Smrg      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
58917706df26Smrg	# Neither direct hardcoding nor static linking is supported with a
58927706df26Smrg	# broken collect2.
58937706df26Smrg	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
58947706df26Smrg      fi
58957706df26Smrg      ;;
58967706df26Smrg
5897047944f3Smrg    aix[[4-9]]*)
58987706df26Smrg      if test "$host_cpu" = ia64; then
58997706df26Smrg	# On IA64, the linker does run time linking by default, so we don't
59007706df26Smrg	# have to do anything special.
59017706df26Smrg	aix_use_runtimelinking=no
59027706df26Smrg	exp_sym_flag='-Bexport'
59037706df26Smrg	no_entry_flag=""
59047706df26Smrg      else
59057706df26Smrg	# If we're using GNU nm, then we don't want the "-C" option.
59067706df26Smrg	# -C means demangle to AIX nm, but means don't demangle with GNU nm
59077706df26Smrg	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
59087706df26Smrg	  _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'
59097706df26Smrg	else
59107706df26Smrg	  _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'
59117706df26Smrg	fi
59127706df26Smrg	aix_use_runtimelinking=no
59137706df26Smrg
59147706df26Smrg	# Test if we are trying to use run time linking or normal
59157706df26Smrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
59167706df26Smrg	# need to do runtime linking.
5917047944f3Smrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
59187706df26Smrg	  for ld_flag in $LDFLAGS; do
59197706df26Smrg  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
59207706df26Smrg  	    aix_use_runtimelinking=yes
59217706df26Smrg  	    break
59227706df26Smrg  	  fi
59237706df26Smrg	  done
59247706df26Smrg	  ;;
59257706df26Smrg	esac
59267706df26Smrg
59277706df26Smrg	exp_sym_flag='-bexport'
59287706df26Smrg	no_entry_flag='-bnoentry'
59297706df26Smrg      fi
59307706df26Smrg
59317706df26Smrg      # When large executables or shared objects are built, AIX ld can
59327706df26Smrg      # have problems creating the table of contents.  If linking a library
59337706df26Smrg      # or program results in "error TOC overflow" add -mminimal-toc to
59347706df26Smrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
59357706df26Smrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
59367706df26Smrg
59377706df26Smrg      _LT_AC_TAGVAR(archive_cmds, $1)=''
59387706df26Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
59397706df26Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
59407706df26Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
59417706df26Smrg
59427706df26Smrg      if test "$GCC" = yes; then
59437706df26Smrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
59447706df26Smrg	# We only want to do this on AIX 4.2 and lower, the check
59457706df26Smrg	# below for broken collect2 doesn't work under 4.3+
59467706df26Smrg	  collect2name=`${CC} -print-prog-name=collect2`
59477706df26Smrg	  if test -f "$collect2name" && \
59487706df26Smrg  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
59497706df26Smrg	  then
59507706df26Smrg  	  # We have reworked collect2
5951047944f3Smrg  	  :
59527706df26Smrg	  else
59537706df26Smrg  	  # We have old collect2
59547706df26Smrg  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
59557706df26Smrg  	  # It fails to find uninstalled libraries when the uninstalled
59567706df26Smrg  	  # path is not listed in the libpath.  Setting hardcode_minus_L
59577706df26Smrg  	  # to unsupported forces relinking
59587706df26Smrg  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
59597706df26Smrg  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
59607706df26Smrg  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
59617706df26Smrg	  fi
59627706df26Smrg	  ;;
59637706df26Smrg	esac
59647706df26Smrg	shared_flag='-shared'
59657706df26Smrg	if test "$aix_use_runtimelinking" = yes; then
59667706df26Smrg	  shared_flag="$shared_flag "'${wl}-G'
59677706df26Smrg	fi
59687706df26Smrg      else
59697706df26Smrg	# not using gcc
59707706df26Smrg	if test "$host_cpu" = ia64; then
59717706df26Smrg  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
59727706df26Smrg  	# chokes on -Wl,-G. The following line is correct:
59737706df26Smrg	  shared_flag='-G'
59747706df26Smrg	else
59757706df26Smrg	  if test "$aix_use_runtimelinking" = yes; then
59767706df26Smrg	    shared_flag='${wl}-G'
59777706df26Smrg	  else
59787706df26Smrg	    shared_flag='${wl}-bM:SRE'
59797706df26Smrg	  fi
59807706df26Smrg	fi
59817706df26Smrg      fi
59827706df26Smrg
59837706df26Smrg      # It seems that -bexpall does not export symbols beginning with
59847706df26Smrg      # underscore (_), so it is better to generate a list of symbols to export.
59857706df26Smrg      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
59867706df26Smrg      if test "$aix_use_runtimelinking" = yes; then
59877706df26Smrg	# Warning - without using the other runtime loading flags (-brtl),
59887706df26Smrg	# -berok will link without error, but may produce a broken library.
59897706df26Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
59907706df26Smrg       # Determine the default libpath from the value encoded in an empty executable.
59917706df26Smrg       _LT_AC_SYS_LIBPATH_AIX
59927706df26Smrg       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
59937706df26Smrg	_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"
59947706df26Smrg       else
59957706df26Smrg	if test "$host_cpu" = ia64; then
59967706df26Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
59977706df26Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
59987706df26Smrg	  _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"
59997706df26Smrg	else
60007706df26Smrg	 # Determine the default libpath from the value encoded in an empty executable.
60017706df26Smrg	 _LT_AC_SYS_LIBPATH_AIX
60027706df26Smrg	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
60037706df26Smrg	  # Warning - without using the other run time loading flags,
60047706df26Smrg	  # -berok will link without error, but may produce a broken library.
60057706df26Smrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
60067706df26Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
60077706df26Smrg	  # Exported symbols can be pulled into shared objects from archives
60087706df26Smrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
60097706df26Smrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
60107706df26Smrg	  # This is similar to how AIX traditionally builds its shared libraries.
60117706df26Smrg	  _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'
60127706df26Smrg	fi
60137706df26Smrg      fi
60147706df26Smrg      ;;
60157706df26Smrg
60167706df26Smrg    amigaos*)
60177706df26Smrg      _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)'
60187706df26Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
60197706df26Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
60207706df26Smrg      # see comment about different semantics on the GNU ld section
60217706df26Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
60227706df26Smrg      ;;
60237706df26Smrg
60247706df26Smrg    bsdi[[45]]*)
60257706df26Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
60267706df26Smrg      ;;
60277706df26Smrg
60287706df26Smrg    cygwin* | mingw* | pw32*)
60297706df26Smrg      # When not using gcc, we currently assume that we are using
60307706df26Smrg      # Microsoft Visual C++.
60317706df26Smrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
60327706df26Smrg      # no search path for DLLs.
60337706df26Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
60347706df26Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
60357706df26Smrg      # Tell ltmain to make .lib files, not .a files.
60367706df26Smrg      libext=lib
60377706df26Smrg      # Tell ltmain to make .dll files, not .so files.
60387706df26Smrg      shrext_cmds=".dll"
60397706df26Smrg      # FIXME: Setting linknames here is a bad hack.
60407706df26Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
60417706df26Smrg      # The linker will automatically build a .lib file if we build a DLL.
60427706df26Smrg      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
60437706df26Smrg      # FIXME: Should let the user specify the lib program.
6044047944f3Smrg      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
60457706df26Smrg      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
60467706df26Smrg      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
60477706df26Smrg      ;;
60487706df26Smrg
60497706df26Smrg    darwin* | rhapsody*)
60507706df26Smrg      case $host_os in
60517706df26Smrg        rhapsody* | darwin1.[[012]])
60527706df26Smrg         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
60537706df26Smrg         ;;
60547706df26Smrg       *) # Darwin 1.3 on
60557706df26Smrg         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
60567706df26Smrg           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
60577706df26Smrg         else
60587706df26Smrg           case ${MACOSX_DEPLOYMENT_TARGET} in
60597706df26Smrg             10.[[012]])
60607706df26Smrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
60617706df26Smrg               ;;
60627706df26Smrg             10.*)
60637706df26Smrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
60647706df26Smrg               ;;
60657706df26Smrg           esac
60667706df26Smrg         fi
60677706df26Smrg         ;;
60687706df26Smrg      esac
60697706df26Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
60707706df26Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
60717706df26Smrg      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
60727706df26Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
60737706df26Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
60747706df26Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
60757706df26Smrg    if test "$GCC" = yes ; then
60767706df26Smrg    	output_verbose_link_cmd='echo'
6077047944f3Smrg        _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
6078047944f3Smrg        _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
6079047944f3Smrg        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
6080047944f3Smrg        _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
60817706df26Smrg    else
60827706df26Smrg      case $cc_basename in
60837706df26Smrg        xlc*)
60847706df26Smrg         output_verbose_link_cmd='echo'
6085047944f3Smrg         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
60867706df26Smrg         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
60877706df26Smrg          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
6088047944f3Smrg         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
60897706df26Smrg          _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}'
60907706df26Smrg          ;;
60917706df26Smrg       *)
60927706df26Smrg         _LT_AC_TAGVAR(ld_shlibs, $1)=no
60937706df26Smrg          ;;
60947706df26Smrg      esac
60957706df26Smrg    fi
60967706df26Smrg      ;;
60977706df26Smrg
60987706df26Smrg    dgux*)
60997706df26Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
61007706df26Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
61017706df26Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
61027706df26Smrg      ;;
61037706df26Smrg
61047706df26Smrg    freebsd1*)
61057706df26Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
61067706df26Smrg      ;;
61077706df26Smrg
61087706df26Smrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
61097706df26Smrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
61107706df26Smrg    # does not break anything, and helps significantly (at the cost of a little
61117706df26Smrg    # extra space).
61127706df26Smrg    freebsd2.2*)
61137706df26Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
61147706df26Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
61157706df26Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
61167706df26Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
61177706df26Smrg      ;;
61187706df26Smrg
61197706df26Smrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
61207706df26Smrg    freebsd2*)
61217706df26Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
61227706df26Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
61237706df26Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
61247706df26Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
61257706df26Smrg      ;;
61267706df26Smrg
61277706df26Smrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6128047944f3Smrg    freebsd* | dragonfly*)
61297706df26Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
61307706df26Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
61317706df26Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
61327706df26Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
61337706df26Smrg      ;;
61347706df26Smrg
61357706df26Smrg    hpux9*)
61367706df26Smrg      if test "$GCC" = yes; then
61377706df26Smrg	_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'
61387706df26Smrg      else
61397706df26Smrg	_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'
61407706df26Smrg      fi
61417706df26Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
61427706df26Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
61437706df26Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
61447706df26Smrg
61457706df26Smrg      # hardcode_minus_L: Not really in the search PATH,
61467706df26Smrg      # but as the default location of the library.
61477706df26Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
61487706df26Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
61497706df26Smrg      ;;
61507706df26Smrg
61517706df26Smrg    hpux10*)
61527706df26Smrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
61537706df26Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
61547706df26Smrg      else
61557706df26Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
61567706df26Smrg      fi
61577706df26Smrg      if test "$with_gnu_ld" = no; then
61587706df26Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
61597706df26Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
61607706df26Smrg
61617706df26Smrg	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
61627706df26Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
61637706df26Smrg
61647706df26Smrg	# hardcode_minus_L: Not really in the search PATH,
61657706df26Smrg	# but as the default location of the library.
61667706df26Smrg	_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
61677706df26Smrg      fi
61687706df26Smrg      ;;
61697706df26Smrg
61707706df26Smrg    hpux11*)
61717706df26Smrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
61727706df26Smrg	case $host_cpu in
61737706df26Smrg	hppa*64*)
61747706df26Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
61757706df26Smrg	  ;;
61767706df26Smrg	ia64*)
61777706df26Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
61787706df26Smrg	  ;;
61797706df26Smrg	*)
61807706df26Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
61817706df26Smrg	  ;;
61827706df26Smrg	esac
61837706df26Smrg      else
61847706df26Smrg	case $host_cpu in
61857706df26Smrg	hppa*64*)
61867706df26Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
61877706df26Smrg	  ;;
61887706df26Smrg	ia64*)
61897706df26Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
61907706df26Smrg	  ;;
61917706df26Smrg	*)
61927706df26Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
61937706df26Smrg	  ;;
61947706df26Smrg	esac
61957706df26Smrg      fi
61967706df26Smrg      if test "$with_gnu_ld" = no; then
61977706df26Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
61987706df26Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
61997706df26Smrg
62007706df26Smrg	case $host_cpu in
62017706df26Smrg	hppa*64*|ia64*)
62027706df26Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
62037706df26Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
62047706df26Smrg	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
62057706df26Smrg	  ;;
62067706df26Smrg	*)
62077706df26Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
62087706df26Smrg	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
62097706df26Smrg
62107706df26Smrg	  # hardcode_minus_L: Not really in the search PATH,
62117706df26Smrg	  # but as the default location of the library.
62127706df26Smrg	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
62137706df26Smrg	  ;;
62147706df26Smrg	esac
62157706df26Smrg      fi
62167706df26Smrg      ;;
62177706df26Smrg
62187706df26Smrg    irix5* | irix6* | nonstopux*)
62197706df26Smrg      if test "$GCC" = yes; then
62207706df26Smrg	_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'
62217706df26Smrg      else
62227706df26Smrg	_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'
62237706df26Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
62247706df26Smrg      fi
62257706df26Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
62267706df26Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
62277706df26Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
62287706df26Smrg      ;;
62297706df26Smrg
62307706df26Smrg    netbsd*)
62317706df26Smrg      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
62327706df26Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
62337706df26Smrg      else
62347706df26Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
62357706df26Smrg      fi
62367706df26Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
62377706df26Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
62387706df26Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
62397706df26Smrg      ;;
62407706df26Smrg
62417706df26Smrg    newsos6)
62427706df26Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
62437706df26Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
62447706df26Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
62457706df26Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
62467706df26Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
62477706df26Smrg      ;;
62487706df26Smrg
62497706df26Smrg    openbsd*)
6250047944f3Smrg      if test -f /usr/libexec/ld.so; then
6251047944f3Smrg	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6252047944f3Smrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6253047944f3Smrg	if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6254047944f3Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6255047944f3Smrg	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6256047944f3Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6257047944f3Smrg	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6258047944f3Smrg	else
6259047944f3Smrg	  case $host_os in
6260047944f3Smrg	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6261047944f3Smrg	     _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6262047944f3Smrg	     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6263047944f3Smrg	     ;;
6264047944f3Smrg	   *)
6265047944f3Smrg	     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6266047944f3Smrg	     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6267047944f3Smrg	     ;;
6268047944f3Smrg	  esac
6269047944f3Smrg        fi
62707706df26Smrg      else
6271047944f3Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
62727706df26Smrg      fi
62737706df26Smrg      ;;
62747706df26Smrg
62757706df26Smrg    os2*)
62767706df26Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
62777706df26Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
62787706df26Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
62797706df26Smrg      _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'
62807706df26Smrg      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
62817706df26Smrg      ;;
62827706df26Smrg
62837706df26Smrg    osf3*)
62847706df26Smrg      if test "$GCC" = yes; then
62857706df26Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
62867706df26Smrg	_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'
62877706df26Smrg      else
62887706df26Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
62897706df26Smrg	_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'
62907706df26Smrg      fi
62917706df26Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
62927706df26Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
62937706df26Smrg      ;;
62947706df26Smrg
62957706df26Smrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
62967706df26Smrg      if test "$GCC" = yes; then
62977706df26Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
62987706df26Smrg	_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'
62997706df26Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
63007706df26Smrg      else
63017706df26Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
63027706df26Smrg	_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'
63037706df26Smrg	_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~
63047706df26Smrg	$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'
63057706df26Smrg
63067706df26Smrg	# Both c and cxx compiler support -rpath directly
63077706df26Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
63087706df26Smrg      fi
63097706df26Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
63107706df26Smrg      ;;
63117706df26Smrg
63127706df26Smrg    solaris*)
63137706df26Smrg      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
63147706df26Smrg      if test "$GCC" = yes; then
63157706df26Smrg	wlarc='${wl}'
63167706df26Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
63177706df26Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
63187706df26Smrg	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
63197706df26Smrg      else
63207706df26Smrg	wlarc=''
63217706df26Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
63227706df26Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
63237706df26Smrg  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
63247706df26Smrg      fi
63257706df26Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
63267706df26Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
63277706df26Smrg      case $host_os in
63287706df26Smrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
63297706df26Smrg      *)
6330047944f3Smrg	# The compiler driver will combine and reorder linker options,
6331047944f3Smrg	# but understands `-z linker_flag'.  GCC discards it without `$wl',
6332047944f3Smrg	# but is careful enough not to reorder.
63337706df26Smrg 	# Supported since Solaris 2.6 (maybe 2.5.1?)
6334047944f3Smrg	if test "$GCC" = yes; then
6335047944f3Smrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6336047944f3Smrg	else
6337047944f3Smrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6338047944f3Smrg	fi
6339047944f3Smrg	;;
63407706df26Smrg      esac
63417706df26Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
63427706df26Smrg      ;;
63437706df26Smrg
63447706df26Smrg    sunos4*)
63457706df26Smrg      if test "x$host_vendor" = xsequent; then
63467706df26Smrg	# Use $CC to link under sequent, because it throws in some extra .o
63477706df26Smrg	# files that make .init and .fini sections work.
63487706df26Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
63497706df26Smrg      else
63507706df26Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
63517706df26Smrg      fi
63527706df26Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
63537706df26Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
63547706df26Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
63557706df26Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
63567706df26Smrg      ;;
63577706df26Smrg
63587706df26Smrg    sysv4)
63597706df26Smrg      case $host_vendor in
63607706df26Smrg	sni)
63617706df26Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
63627706df26Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
63637706df26Smrg	;;
63647706df26Smrg	siemens)
63657706df26Smrg	  ## LD is ld it makes a PLAMLIB
63667706df26Smrg	  ## CC just makes a GrossModule.
63677706df26Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
63687706df26Smrg	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
63697706df26Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
63707706df26Smrg        ;;
63717706df26Smrg	motorola)
63727706df26Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
63737706df26Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
63747706df26Smrg	;;
63757706df26Smrg      esac
63767706df26Smrg      runpath_var='LD_RUN_PATH'
63777706df26Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
63787706df26Smrg      ;;
63797706df26Smrg
63807706df26Smrg    sysv4.3*)
63817706df26Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
63827706df26Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
63837706df26Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
63847706df26Smrg      ;;
63857706df26Smrg
63867706df26Smrg    sysv4*MP*)
63877706df26Smrg      if test -d /usr/nec; then
63887706df26Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
63897706df26Smrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
63907706df26Smrg	runpath_var=LD_RUN_PATH
63917706df26Smrg	hardcode_runpath_var=yes
63927706df26Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
63937706df26Smrg      fi
63947706df26Smrg      ;;
63957706df26Smrg
6396047944f3Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
63977706df26Smrg      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
63987706df26Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
63997706df26Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
64007706df26Smrg      runpath_var='LD_RUN_PATH'
64017706df26Smrg
64027706df26Smrg      if test "$GCC" = yes; then
64037706df26Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
64047706df26Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
64057706df26Smrg      else
64067706df26Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
64077706df26Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
64087706df26Smrg      fi
64097706df26Smrg      ;;
64107706df26Smrg
64117706df26Smrg    sysv5* | sco3.2v5* | sco5v6*)
64127706df26Smrg      # Note: We can NOT use -z defs as we might desire, because we do not
64137706df26Smrg      # link with -lc, and that would cause any symbols used from libc to
64147706df26Smrg      # always be unresolved, which means just about no library would
64157706df26Smrg      # ever link correctly.  If we're not using GNU ld we use -z text
64167706df26Smrg      # though, which does catch some bad symbols but isn't as heavy-handed
64177706df26Smrg      # as -z defs.
64187706df26Smrg      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
64197706df26Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
64207706df26Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
64217706df26Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
64227706df26Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
64237706df26Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
64247706df26Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
64257706df26Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
64267706df26Smrg      runpath_var='LD_RUN_PATH'
64277706df26Smrg
64287706df26Smrg      if test "$GCC" = yes; then
64297706df26Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
64307706df26Smrg	_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'
64317706df26Smrg      else
64327706df26Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
64337706df26Smrg	_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'
64347706df26Smrg      fi
64357706df26Smrg      ;;
64367706df26Smrg
64377706df26Smrg    uts4*)
64387706df26Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
64397706df26Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
64407706df26Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
64417706df26Smrg      ;;
64427706df26Smrg
64437706df26Smrg    *)
64447706df26Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
64457706df26Smrg      ;;
64467706df26Smrg    esac
64477706df26Smrg  fi
64487706df26Smrg])
64497706df26SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
64507706df26Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
64517706df26Smrg
64527706df26Smrg#
64537706df26Smrg# Do we need to explicitly link libc?
64547706df26Smrg#
64557706df26Smrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
64567706df26Smrgx|xyes)
64577706df26Smrg  # Assume -lc should be added
64587706df26Smrg  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
64597706df26Smrg
64607706df26Smrg  if test "$enable_shared" = yes && test "$GCC" = yes; then
64617706df26Smrg    case $_LT_AC_TAGVAR(archive_cmds, $1) in
64627706df26Smrg    *'~'*)
64637706df26Smrg      # FIXME: we may have to deal with multi-command sequences.
64647706df26Smrg      ;;
64657706df26Smrg    '$CC '*)
64667706df26Smrg      # Test whether the compiler implicitly links with -lc since on some
64677706df26Smrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
64687706df26Smrg      # to ld, don't add -lc before -lgcc.
64697706df26Smrg      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
64707706df26Smrg      $rm conftest*
6471047944f3Smrg      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
64727706df26Smrg
64737706df26Smrg      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
64747706df26Smrg        soname=conftest
64757706df26Smrg        lib=conftest
64767706df26Smrg        libobjs=conftest.$ac_objext
64777706df26Smrg        deplibs=
64787706df26Smrg        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
64797706df26Smrg	pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
64807706df26Smrg        compiler_flags=-v
64817706df26Smrg        linker_flags=-v
64827706df26Smrg        verstring=
64837706df26Smrg        output_objdir=.
64847706df26Smrg        libname=conftest
64857706df26Smrg        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
64867706df26Smrg        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
64877706df26Smrg        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
64887706df26Smrg        then
64897706df26Smrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
64907706df26Smrg        else
64917706df26Smrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
64927706df26Smrg        fi
64937706df26Smrg        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
64947706df26Smrg      else
64957706df26Smrg        cat conftest.err 1>&5
64967706df26Smrg      fi
64977706df26Smrg      $rm conftest*
64987706df26Smrg      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
64997706df26Smrg      ;;
65007706df26Smrg    esac
65017706df26Smrg  fi
65027706df26Smrg  ;;
65037706df26Smrgesac
65047706df26Smrg])# AC_LIBTOOL_PROG_LD_SHLIBS
65057706df26Smrg
65067706df26Smrg
65077706df26Smrg# _LT_AC_FILE_LTDLL_C
65087706df26Smrg# -------------------
65097706df26Smrg# Be careful that the start marker always follows a newline.
65107706df26SmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [
65117706df26Smrg# /* ltdll.c starts here */
65127706df26Smrg# #define WIN32_LEAN_AND_MEAN
65137706df26Smrg# #include <windows.h>
65147706df26Smrg# #undef WIN32_LEAN_AND_MEAN
65157706df26Smrg# #include <stdio.h>
65167706df26Smrg#
65177706df26Smrg# #ifndef __CYGWIN__
65187706df26Smrg# #  ifdef __CYGWIN32__
65197706df26Smrg# #    define __CYGWIN__ __CYGWIN32__
65207706df26Smrg# #  endif
65217706df26Smrg# #endif
65227706df26Smrg#
65237706df26Smrg# #ifdef __cplusplus
65247706df26Smrg# extern "C" {
65257706df26Smrg# #endif
65267706df26Smrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
65277706df26Smrg# #ifdef __cplusplus
65287706df26Smrg# }
65297706df26Smrg# #endif
65307706df26Smrg#
65317706df26Smrg# #ifdef __CYGWIN__
65327706df26Smrg# #include <cygwin/cygwin_dll.h>
65337706df26Smrg# DECLARE_CYGWIN_DLL( DllMain );
65347706df26Smrg# #endif
65357706df26Smrg# HINSTANCE __hDllInstance_base;
65367706df26Smrg#
65377706df26Smrg# BOOL APIENTRY
65387706df26Smrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
65397706df26Smrg# {
65407706df26Smrg#   __hDllInstance_base = hInst;
65417706df26Smrg#   return TRUE;
65427706df26Smrg# }
65437706df26Smrg# /* ltdll.c ends here */
65447706df26Smrg])# _LT_AC_FILE_LTDLL_C
65457706df26Smrg
65467706df26Smrg
65477706df26Smrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
65487706df26Smrg# ---------------------------------
65497706df26SmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
65507706df26Smrg
65517706df26Smrg
65527706df26Smrg# old names
65537706df26SmrgAC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
65547706df26SmrgAC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
65557706df26SmrgAC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
65567706df26SmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
65577706df26SmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
65587706df26SmrgAC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
65597706df26SmrgAC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
65607706df26Smrg
65617706df26Smrg# This is just to silence aclocal about the macro not being used
65627706df26Smrgifelse([AC_DISABLE_FAST_INSTALL])
65637706df26Smrg
65647706df26SmrgAC_DEFUN([LT_AC_PROG_GCJ],
65657706df26Smrg[AC_CHECK_TOOL(GCJ, gcj, no)
65667706df26Smrg  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
65677706df26Smrg  AC_SUBST(GCJFLAGS)
65687706df26Smrg])
65697706df26Smrg
65707706df26SmrgAC_DEFUN([LT_AC_PROG_RC],
65717706df26Smrg[AC_CHECK_TOOL(RC, windres, no)
65727706df26Smrg])
65737706df26Smrg
6574047944f3Smrg
6575047944f3Smrg# Cheap backport of AS_EXECUTABLE_P and required macros
6576047944f3Smrg# from Autoconf 2.59; we should not use $as_executable_p directly.
6577047944f3Smrg
6578047944f3Smrg# _AS_TEST_PREPARE
6579047944f3Smrg# ----------------
6580047944f3Smrgm4_ifndef([_AS_TEST_PREPARE],
6581047944f3Smrg[m4_defun([_AS_TEST_PREPARE],
6582047944f3Smrg[if test -x / >/dev/null 2>&1; then
6583047944f3Smrg  as_executable_p='test -x'
6584047944f3Smrgelse
6585047944f3Smrg  as_executable_p='test -f'
6586047944f3Smrgfi
6587047944f3Smrg])])# _AS_TEST_PREPARE
6588047944f3Smrg
6589047944f3Smrg# AS_EXECUTABLE_P
6590047944f3Smrg# ---------------
6591047944f3Smrg# Check whether a file is executable.
6592047944f3Smrgm4_ifndef([AS_EXECUTABLE_P],
6593047944f3Smrg[m4_defun([AS_EXECUTABLE_P],
6594047944f3Smrg[AS_REQUIRE([_AS_TEST_PREPARE])dnl
6595047944f3Smrg$as_executable_p $1[]dnl
6596047944f3Smrg])])# AS_EXECUTABLE_P
6597047944f3Smrg
65987706df26Smrg# NOTE: This macro has been submitted for inclusion into   #
65997706df26Smrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
66007706df26Smrg#  a released version of Autoconf we should remove this    #
66017706df26Smrg#  macro and use it instead.                               #
66027706df26Smrg# LT_AC_PROG_SED
66037706df26Smrg# --------------
66047706df26Smrg# Check for a fully-functional sed program, that truncates
66057706df26Smrg# as few characters as possible.  Prefer GNU sed if found.
66067706df26SmrgAC_DEFUN([LT_AC_PROG_SED],
66077706df26Smrg[AC_MSG_CHECKING([for a sed that does not truncate output])
66087706df26SmrgAC_CACHE_VAL(lt_cv_path_SED,
66097706df26Smrg[# Loop through the user's path and test for sed and gsed.
66107706df26Smrg# Then use that list of sed's as ones to test for truncation.
66117706df26Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66127706df26Smrgfor as_dir in $PATH
66137706df26Smrgdo
66147706df26Smrg  IFS=$as_save_IFS
66157706df26Smrg  test -z "$as_dir" && as_dir=.
66167706df26Smrg  for lt_ac_prog in sed gsed; do
66177706df26Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
6618047944f3Smrg      if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then
66197706df26Smrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
66207706df26Smrg      fi
66217706df26Smrg    done
66227706df26Smrg  done
66237706df26Smrgdone
6624047944f3SmrgIFS=$as_save_IFS
66257706df26Smrglt_ac_max=0
66267706df26Smrglt_ac_count=0
66277706df26Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
66287706df26Smrg# along with /bin/sed that truncates output.
66297706df26Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
66307706df26Smrg  test ! -f $lt_ac_sed && continue
66317706df26Smrg  cat /dev/null > conftest.in
66327706df26Smrg  lt_ac_count=0
66337706df26Smrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
66347706df26Smrg  # Check for GNU sed and select it if it is found.
66357706df26Smrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
66367706df26Smrg    lt_cv_path_SED=$lt_ac_sed
66377706df26Smrg    break
66387706df26Smrg  fi
66397706df26Smrg  while true; do
66407706df26Smrg    cat conftest.in conftest.in >conftest.tmp
66417706df26Smrg    mv conftest.tmp conftest.in
66427706df26Smrg    cp conftest.in conftest.nl
66437706df26Smrg    echo >>conftest.nl
66447706df26Smrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
66457706df26Smrg    cmp -s conftest.out conftest.nl || break
66467706df26Smrg    # 10000 chars as input seems more than enough
66477706df26Smrg    test $lt_ac_count -gt 10 && break
66487706df26Smrg    lt_ac_count=`expr $lt_ac_count + 1`
66497706df26Smrg    if test $lt_ac_count -gt $lt_ac_max; then
66507706df26Smrg      lt_ac_max=$lt_ac_count
66517706df26Smrg      lt_cv_path_SED=$lt_ac_sed
66527706df26Smrg    fi
66537706df26Smrg  done
66547706df26Smrgdone
66557706df26Smrg])
66567706df26SmrgSED=$lt_cv_path_SED
6657047944f3SmrgAC_SUBST([SED])
66587706df26SmrgAC_MSG_RESULT([$SED])
66597706df26Smrg])
66607706df26Smrg
66617706df26Smrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
66627706df26Smrg# 
66637706df26Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
66647706df26Smrg#
66657706df26Smrg# This program is free software; you can redistribute it and/or modify
66667706df26Smrg# it under the terms of the GNU General Public License as published by
66677706df26Smrg# the Free Software Foundation; either version 2 of the License, or
66687706df26Smrg# (at your option) any later version.
66697706df26Smrg#
66707706df26Smrg# This program is distributed in the hope that it will be useful, but
66717706df26Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
66727706df26Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
66737706df26Smrg# General Public License for more details.
66747706df26Smrg#
66757706df26Smrg# You should have received a copy of the GNU General Public License
66767706df26Smrg# along with this program; if not, write to the Free Software
66777706df26Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
66787706df26Smrg#
66797706df26Smrg# As a special exception to the GNU General Public License, if you
66807706df26Smrg# distribute this file as part of a program that contains a
66817706df26Smrg# configuration script generated by Autoconf, you may include it under
66827706df26Smrg# the same distribution terms that you use for the rest of that program.
66837706df26Smrg
66847706df26Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
66857706df26Smrg# ----------------------------------
66867706df26SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
66877706df26Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
66887706df26Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
66897706df26SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
66907706df26Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
66917706df26Smrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
66927706df26Smrgfi
66937706df26Smrgif test -n "$PKG_CONFIG"; then
66947706df26Smrg	_pkg_min_version=m4_default([$1], [0.9.0])
66957706df26Smrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
66967706df26Smrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
66977706df26Smrg		AC_MSG_RESULT([yes])
66987706df26Smrg	else
66997706df26Smrg		AC_MSG_RESULT([no])
67007706df26Smrg		PKG_CONFIG=""
67017706df26Smrg	fi
67027706df26Smrg		
67037706df26Smrgfi[]dnl
67047706df26Smrg])# PKG_PROG_PKG_CONFIG
67057706df26Smrg
67067706df26Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
67077706df26Smrg#
67087706df26Smrg# Check to see whether a particular set of modules exists.  Similar
67097706df26Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
67107706df26Smrg#
67117706df26Smrg#
67127706df26Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
67137706df26Smrg# this or PKG_CHECK_MODULES is called, or make sure to call
67147706df26Smrg# PKG_CHECK_EXISTS manually
67157706df26Smrg# --------------------------------------------------------------
67167706df26SmrgAC_DEFUN([PKG_CHECK_EXISTS],
67177706df26Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
67187706df26Smrgif test -n "$PKG_CONFIG" && \
67197706df26Smrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
67207706df26Smrg  m4_ifval([$2], [$2], [:])
67217706df26Smrgm4_ifvaln([$3], [else
67227706df26Smrg  $3])dnl
67237706df26Smrgfi])
67247706df26Smrg
67257706df26Smrg
67267706df26Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
67277706df26Smrg# ---------------------------------------------
67287706df26Smrgm4_define([_PKG_CONFIG],
6729047944f3Smrg[if test -n "$$1"; then
6730047944f3Smrg    pkg_cv_[]$1="$$1"
6731047944f3Smrg elif test -n "$PKG_CONFIG"; then
6732047944f3Smrg    PKG_CHECK_EXISTS([$3],
6733047944f3Smrg                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
6734047944f3Smrg		     [pkg_failed=yes])
6735047944f3Smrg else
6736047944f3Smrg    pkg_failed=untried
67377706df26Smrgfi[]dnl
67387706df26Smrg])# _PKG_CONFIG
67397706df26Smrg
67407706df26Smrg# _PKG_SHORT_ERRORS_SUPPORTED
67417706df26Smrg# -----------------------------
67427706df26SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
67437706df26Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
67447706df26Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
67457706df26Smrg        _pkg_short_errors_supported=yes
67467706df26Smrgelse
67477706df26Smrg        _pkg_short_errors_supported=no
67487706df26Smrgfi[]dnl
67497706df26Smrg])# _PKG_SHORT_ERRORS_SUPPORTED
67507706df26Smrg
67517706df26Smrg
67527706df26Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
67537706df26Smrg# [ACTION-IF-NOT-FOUND])
67547706df26Smrg#
67557706df26Smrg#
67567706df26Smrg# Note that if there is a possibility the first call to
67577706df26Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
67587706df26Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
67597706df26Smrg#
67607706df26Smrg#
67617706df26Smrg# --------------------------------------------------------------
67627706df26SmrgAC_DEFUN([PKG_CHECK_MODULES],
67637706df26Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
67647706df26SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
67657706df26SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
67667706df26Smrg
67677706df26Smrgpkg_failed=no
67687706df26SmrgAC_MSG_CHECKING([for $1])
67697706df26Smrg
67707706df26Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
67717706df26Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
67727706df26Smrg
67737706df26Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
67747706df26Smrgand $1[]_LIBS to avoid the need to call pkg-config.
67757706df26SmrgSee the pkg-config man page for more details.])
67767706df26Smrg
67777706df26Smrgif test $pkg_failed = yes; then
67787706df26Smrg        _PKG_SHORT_ERRORS_SUPPORTED
67797706df26Smrg        if test $_pkg_short_errors_supported = yes; then
6780047944f3Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
67817706df26Smrg        else 
6782047944f3Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
67837706df26Smrg        fi
67847706df26Smrg	# Put the nasty error message in config.log where it belongs
67857706df26Smrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
67867706df26Smrg
67877706df26Smrg	ifelse([$4], , [AC_MSG_ERROR(dnl
67887706df26Smrg[Package requirements ($2) were not met:
67897706df26Smrg
67907706df26Smrg$$1_PKG_ERRORS
67917706df26Smrg
67927706df26SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
67937706df26Smrginstalled software in a non-standard prefix.
67947706df26Smrg
67957706df26Smrg_PKG_TEXT
67967706df26Smrg])],
6797047944f3Smrg		[AC_MSG_RESULT([no])
6798047944f3Smrg                $4])
67997706df26Smrgelif test $pkg_failed = untried; then
68007706df26Smrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
68017706df26Smrg[The pkg-config script could not be found or is too old.  Make sure it
68027706df26Smrgis in your PATH or set the PKG_CONFIG environment variable to the full
68037706df26Smrgpath to pkg-config.
68047706df26Smrg
68057706df26Smrg_PKG_TEXT
68067706df26Smrg
6807047944f3SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
68087706df26Smrg		[$4])
68097706df26Smrgelse
68107706df26Smrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
68117706df26Smrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
68127706df26Smrg        AC_MSG_RESULT([yes])
68137706df26Smrg	ifelse([$3], , :, [$3])
68147706df26Smrgfi[]dnl
68157706df26Smrg])# PKG_CHECK_MODULES
68167706df26Smrg
68177706df26Smrgdnl
6818047944f3Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
68197706df26Smrgdnl 
6820047944f3Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a
6821047944f3Smrgdnl copy of this software and associated documentation files (the
6822047944f3Smrgdnl "Software"), to deal in the Software without restriction, including
6823047944f3Smrgdnl without limitation the rights to use, copy, modify, merge, publish,
6824047944f3Smrgdnl distribute, and/or sell copies of the Software, and to permit persons
6825047944f3Smrgdnl to whom the Software is furnished to do so, provided that the above
6826047944f3Smrgdnl copyright notice(s) and this permission notice appear in all copies of
6827047944f3Smrgdnl the Software and that both the above copyright notice(s) and this
6828047944f3Smrgdnl permission notice appear in supporting documentation.
6829047944f3Smrgdnl
68307706df26Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
68317706df26Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
6832047944f3Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
6833047944f3Smrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
6834047944f3Smrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
6835047944f3Smrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
6836047944f3Smrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
6837047944f3Smrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
6838047944f3Smrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
6839047944f3Smrgdnl
6840047944f3Smrgdnl Except as contained in this notice, the name of a copyright holder
6841047944f3Smrgdnl shall not be used in advertising or otherwise to promote the sale, use
6842047944f3Smrgdnl or other dealings in this Software without prior written authorization
6843047944f3Smrgdnl of the copyright holder.
6844047944f3Smrg
6845047944f3Smrg# XORG_MACROS_VERSION(required-version)
6846047944f3Smrg# -------------------------------------
6847047944f3Smrg# Minimum version: 1.1.0
6848047944f3Smrg#
6849047944f3Smrg# If you're using a macro added in Version 1.1 or newer, include this in
6850047944f3Smrg# your configure.ac with the minimum required version, such as:
6851047944f3Smrg# XORG_MACROS_VERSION(1.1)
6852047944f3Smrg#
6853047944f3Smrg# To force at least a version with this macro defined, also add:
6854047944f3Smrg# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])])
6855047944f3Smrg#
6856047944f3Smrg#
6857047944f3Smrg# See the "minimum version" comment for each macro you use to see what 
6858047944f3Smrg# version you require.
6859047944f3SmrgAC_DEFUN([XORG_MACROS_VERSION],[
6860047944f3Smrg	[XORG_MACROS_needed_version=$1
6861047944f3Smrg	XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'`
6862047944f3Smrg	XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
6863047944f3Smrg	AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}])
6864047944f3Smrg	[XORG_MACROS_version=1.1.6
6865047944f3Smrg	XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
6866047944f3Smrg	XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
6867047944f3Smrg	if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
6868047944f3Smrg		AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x])
6869047944f3Smrg	fi
6870047944f3Smrg	if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then
6871047944f3Smrg		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])
6872047944f3Smrg	fi
6873047944f3Smrg	AC_MSG_RESULT([yes, $XORG_MACROS_version])
6874047944f3Smrg]) # XORG_MACROS_VERSION
68757706df26Smrg
68767706df26Smrg# XORG_PROG_RAWCPP()
68777706df26Smrg# ------------------
6878047944f3Smrg# Minimum version: 1.0.0
6879047944f3Smrg#
68807706df26Smrg# Find cpp program and necessary flags for use in pre-processing text files
68817706df26Smrg# such as man pages and config files
68827706df26SmrgAC_DEFUN([XORG_PROG_RAWCPP],[
68837706df26SmrgAC_REQUIRE([AC_PROG_CPP])
68847706df26SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
68857706df26Smrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
68867706df26Smrg
68877706df26Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
68887706df26Smrg# which is not the best choice for supporting other OS'es, but covers most
68897706df26Smrg# of the ones we need for now.
68907706df26SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
68917706df26SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?])
68927706df26Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
68937706df26Smrg	AC_MSG_RESULT([no])
68947706df26Smrgelse
68957706df26Smrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
68967706df26Smrg		RAWCPPFLAGS=-undef
68977706df26Smrg		AC_MSG_RESULT([yes])
68987706df26Smrg	else
68997706df26Smrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
69007706df26Smrg	fi
69017706df26Smrgfi
69027706df26Smrgrm -f conftest.$ac_ext
69037706df26Smrg
69047706df26SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
69057706df26SmrgAC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
69067706df26Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
69077706df26Smrg	AC_MSG_RESULT([no])
69087706df26Smrgelse
69097706df26Smrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
69107706df26Smrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
69117706df26Smrg		AC_MSG_RESULT([yes])
69127706df26Smrg	else
69137706df26Smrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
69147706df26Smrg	fi
69157706df26Smrgfi
69167706df26Smrgrm -f conftest.$ac_ext
69177706df26SmrgAC_SUBST(RAWCPPFLAGS)
69187706df26Smrg]) # XORG_PROG_RAWCPP
69197706df26Smrg
69207706df26Smrg# XORG_MANPAGE_SECTIONS()
69217706df26Smrg# -----------------------
6922047944f3Smrg# Minimum version: 1.0.0
6923047944f3Smrg#
69247706df26Smrg# Determine which sections man pages go in for the different man page types
69257706df26Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
69267706df26Smrg# Not sure if there's any better way than just hardcoding by OS name.
69277706df26Smrg# Override default settings by setting environment variables
69287706df26Smrg
69297706df26SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
69307706df26SmrgAC_REQUIRE([AC_CANONICAL_HOST])
69317706df26Smrg
69327706df26Smrgif test x$APP_MAN_SUFFIX = x    ; then
6933047944f3Smrg    APP_MAN_SUFFIX=1
69347706df26Smrgfi
69357706df26Smrgif test x$APP_MAN_DIR = x    ; then
6936047944f3Smrg    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
69377706df26Smrgfi
69387706df26Smrg
69397706df26Smrgif test x$LIB_MAN_SUFFIX = x    ; then
6940047944f3Smrg    LIB_MAN_SUFFIX=3
69417706df26Smrgfi
69427706df26Smrgif test x$LIB_MAN_DIR = x    ; then
6943047944f3Smrg    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
69447706df26Smrgfi
69457706df26Smrg
69467706df26Smrgif test x$FILE_MAN_SUFFIX = x    ; then
69477706df26Smrg    case $host_os in
69487706df26Smrg	solaris*)	FILE_MAN_SUFFIX=4  ;;
69497706df26Smrg	*)		FILE_MAN_SUFFIX=5  ;;
69507706df26Smrg    esac
69517706df26Smrgfi
69527706df26Smrgif test x$FILE_MAN_DIR = x    ; then
6953047944f3Smrg    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
69547706df26Smrgfi
69557706df26Smrg
69567706df26Smrgif test x$MISC_MAN_SUFFIX = x    ; then
69577706df26Smrg    case $host_os in
69587706df26Smrg	solaris*)	MISC_MAN_SUFFIX=5  ;;
69597706df26Smrg	*)		MISC_MAN_SUFFIX=7  ;;
69607706df26Smrg    esac
69617706df26Smrgfi
69627706df26Smrgif test x$MISC_MAN_DIR = x    ; then
6963047944f3Smrg    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
69647706df26Smrgfi
69657706df26Smrg
69667706df26Smrgif test x$DRIVER_MAN_SUFFIX = x    ; then
69677706df26Smrg    case $host_os in
69687706df26Smrg	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
69697706df26Smrg	*)		DRIVER_MAN_SUFFIX=4  ;;
69707706df26Smrg    esac
69717706df26Smrgfi
69727706df26Smrgif test x$DRIVER_MAN_DIR = x    ; then
6973047944f3Smrg    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
69747706df26Smrgfi
69757706df26Smrg
69767706df26Smrgif test x$ADMIN_MAN_SUFFIX = x    ; then
69777706df26Smrg    case $host_os in
69787706df26Smrg	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
69797706df26Smrg	*)		ADMIN_MAN_SUFFIX=8  ;;
69807706df26Smrg    esac
69817706df26Smrgfi
69827706df26Smrgif test x$ADMIN_MAN_DIR = x    ; then
69837706df26Smrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
69847706df26Smrgfi
69857706df26Smrg
69867706df26Smrg
69877706df26SmrgAC_SUBST([APP_MAN_SUFFIX])
69887706df26SmrgAC_SUBST([LIB_MAN_SUFFIX])
69897706df26SmrgAC_SUBST([FILE_MAN_SUFFIX])
69907706df26SmrgAC_SUBST([MISC_MAN_SUFFIX])
69917706df26SmrgAC_SUBST([DRIVER_MAN_SUFFIX])
69927706df26SmrgAC_SUBST([ADMIN_MAN_SUFFIX])
69937706df26SmrgAC_SUBST([APP_MAN_DIR])
69947706df26SmrgAC_SUBST([LIB_MAN_DIR])
69957706df26SmrgAC_SUBST([FILE_MAN_DIR])
69967706df26SmrgAC_SUBST([MISC_MAN_DIR])
69977706df26SmrgAC_SUBST([DRIVER_MAN_DIR])
69987706df26SmrgAC_SUBST([ADMIN_MAN_DIR])
69997706df26Smrg]) # XORG_MANPAGE_SECTIONS
70007706df26Smrg
70017706df26Smrg# XORG_CHECK_LINUXDOC
70027706df26Smrg# -------------------
7003047944f3Smrg# Minimum version: 1.0.0
7004047944f3Smrg#
70057706df26Smrg# Defines the variable MAKE_TEXT if the necessary tools and
70067706df26Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
70077706df26Smrg# Whether or not the necessary tools and files are found can be checked
70087706df26Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
70097706df26SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
7010047944f3SmrgXORG_SGML_PATH=$prefix/share/sgml
7011047944f3SmrgHAVE_DEFS_ENT=
7012047944f3Smrg
7013047944f3Smrgif test x"$cross_compiling" = x"yes" ; then
7014047944f3Smrg  HAVE_DEFS_ENT=no
7015047944f3Smrgelse
7016047944f3Smrg  AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
7017047944f3Smrgfi
70187706df26Smrg
70197706df26SmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
70207706df26SmrgAC_PATH_PROG(PS2PDF, ps2pdf)
70217706df26Smrg
70227706df26SmrgAC_MSG_CHECKING([Whether to build documentation])
70237706df26Smrg
7024047944f3Smrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
70257706df26Smrg   BUILDDOC=yes
70267706df26Smrgelse
70277706df26Smrg   BUILDDOC=no
70287706df26Smrgfi
70297706df26Smrg
70307706df26SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
70317706df26Smrg
70327706df26SmrgAC_MSG_RESULT([$BUILDDOC])
70337706df26Smrg
70347706df26SmrgAC_MSG_CHECKING([Whether to build pdf documentation])
70357706df26Smrg
7036047944f3Smrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
70377706df26Smrg   BUILDPDFDOC=yes
70387706df26Smrgelse
70397706df26Smrg   BUILDPDFDOC=no
70407706df26Smrgfi
70417706df26Smrg
70427706df26SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
70437706df26Smrg
70447706df26SmrgAC_MSG_RESULT([$BUILDPDFDOC])
70457706df26Smrg
7046047944f3SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
7047047944f3SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
70487706df26SmrgMAKE_PDF="$PS2PDF"
7049047944f3SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
70507706df26Smrg
70517706df26SmrgAC_SUBST(MAKE_TEXT)
70527706df26SmrgAC_SUBST(MAKE_PS)
70537706df26SmrgAC_SUBST(MAKE_PDF)
70547706df26SmrgAC_SUBST(MAKE_HTML)
70557706df26Smrg]) # XORG_CHECK_LINUXDOC
70567706df26Smrg
7057047944f3Smrg# XORG_CHECK_DOCBOOK
7058047944f3Smrg# -------------------
7059047944f3Smrg# Minimum version: 1.0.0
7060047944f3Smrg#
7061047944f3Smrg# Checks for the ability to build output formats from SGML DocBook source.
7062047944f3Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
7063047944f3Smrg# indicates whether the necessary tools and files are found and, if set,
7064047944f3Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx.
7065047944f3SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[
7066047944f3SmrgXORG_SGML_PATH=$prefix/share/sgml
7067047944f3SmrgHAVE_DEFS_ENT=
7068047944f3SmrgBUILDTXTDOC=no
7069047944f3SmrgBUILDPDFDOC=no
7070047944f3SmrgBUILDPSDOC=no
7071047944f3SmrgBUILDHTMLDOC=no
7072047944f3Smrg
7073047944f3SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
7074047944f3Smrg
7075047944f3SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps)
7076047944f3SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
7077047944f3SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html)
7078047944f3SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt)
7079047944f3Smrg
7080047944f3SmrgAC_MSG_CHECKING([Whether to build text documentation])
7081047944f3Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
7082047944f3Smrg   test x$BUILD_TXTDOC != xno; then
7083047944f3Smrg	BUILDTXTDOC=yes
7084047944f3Smrgfi
7085047944f3SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
7086047944f3SmrgAC_MSG_RESULT([$BUILDTXTDOC])
7087047944f3Smrg
7088047944f3SmrgAC_MSG_CHECKING([Whether to build PDF documentation])
7089047944f3Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
7090047944f3Smrg   test x$BUILD_PDFDOC != xno; then
7091047944f3Smrg	BUILDPDFDOC=yes
7092047944f3Smrgfi
7093047944f3SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
7094047944f3SmrgAC_MSG_RESULT([$BUILDPDFDOC])
7095047944f3Smrg
7096047944f3SmrgAC_MSG_CHECKING([Whether to build PostScript documentation])
7097047944f3Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
7098047944f3Smrg   test x$BUILD_PSDOC != xno; then
7099047944f3Smrg	BUILDPSDOC=yes
7100047944f3Smrgfi
7101047944f3SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
7102047944f3SmrgAC_MSG_RESULT([$BUILDPSDOC])
7103047944f3Smrg
7104047944f3SmrgAC_MSG_CHECKING([Whether to build HTML documentation])
7105047944f3Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
7106047944f3Smrg   test x$BUILD_HTMLDOC != xno; then
7107047944f3Smrg	BUILDHTMLDOC=yes
7108047944f3Smrgfi
7109047944f3SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
7110047944f3SmrgAC_MSG_RESULT([$BUILDHTMLDOC])
7111047944f3Smrg
7112047944f3SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
7113047944f3SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
7114047944f3SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
7115047944f3SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
7116047944f3Smrg
7117047944f3SmrgAC_SUBST(MAKE_TEXT)
7118047944f3SmrgAC_SUBST(MAKE_PS)
7119047944f3SmrgAC_SUBST(MAKE_PDF)
7120047944f3SmrgAC_SUBST(MAKE_HTML)
7121047944f3Smrg]) # XORG_CHECK_DOCBOOK
7122047944f3Smrg
71237706df26Smrg# XORG_CHECK_MALLOC_ZERO
71247706df26Smrg# ----------------------
7125047944f3Smrg# Minimum version: 1.0.0
7126047944f3Smrg#
71277706df26Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
71287706df26Smrg# malloc(0) returns NULL.  Packages should add one of these cflags to
71297706df26Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
71307706df26SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
71317706df26SmrgAC_ARG_ENABLE(malloc0returnsnull,
71327706df26Smrg	AC_HELP_STRING([--enable-malloc0returnsnull],
71337706df26Smrg		       [malloc(0) returns NULL (default: auto)]),
71347706df26Smrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
71357706df26Smrg	[MALLOC_ZERO_RETURNS_NULL=auto])
71367706df26Smrg
71377706df26SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
71387706df26Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
71397706df26Smrg	AC_RUN_IFELSE([
71407706df26Smrgchar *malloc();
71417706df26Smrgchar *realloc();
71427706df26Smrgchar *calloc();
71437706df26Smrgmain() {
71447706df26Smrg    char *m0, *r0, *c0, *p;
71457706df26Smrg    m0 = malloc(0);
71467706df26Smrg    p = malloc(10);
71477706df26Smrg    r0 = realloc(p,0);
71487706df26Smrg    c0 = calloc(0);
71497706df26Smrg    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
71507706df26Smrg}],
71517706df26Smrg		[MALLOC_ZERO_RETURNS_NULL=yes],
71527706df26Smrg		[MALLOC_ZERO_RETURNS_NULL=no])
71537706df26Smrgfi
71547706df26SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
71557706df26Smrg
71567706df26Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
71577706df26Smrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
71587706df26Smrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
71597706df26Smrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
71607706df26Smrgelse
71617706df26Smrg	MALLOC_ZERO_CFLAGS=""
71627706df26Smrg	XMALLOC_ZERO_CFLAGS=""
71637706df26Smrg	XTMALLOC_ZERO_CFLAGS=""
71647706df26Smrgfi
71657706df26Smrg
71667706df26SmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
71677706df26SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
71687706df26SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
71697706df26Smrg]) # XORG_CHECK_MALLOC_ZERO
71707706df26Smrg
7171047944f3Smrg# XORG_WITH_LINT()
7172047944f3Smrg# ----------------
7173047944f3Smrg# Minimum version: 1.1.0
7174047944f3Smrg#
7175047944f3Smrg# Sets up flags for source checkers such as lint and sparse if --with-lint
7176047944f3Smrg# is specified.   (Use --with-lint=sparse for sparse.)
7177047944f3Smrg# Sets $LINT to name of source checker passed with --with-lint (default: lint)
7178047944f3Smrg# Sets $LINT_FLAGS to flags to pass to source checker
7179047944f3Smrg# Sets LINT automake conditional if enabled (default: disabled)
7180047944f3Smrg#
7181047944f3SmrgAC_DEFUN([XORG_WITH_LINT],[
7182047944f3Smrg
7183047944f3Smrg# Allow checking code with lint, sparse, etc.
7184047944f3SmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint],
7185047944f3Smrg		[Use a lint-style source code checker (default: disabled)])],
7186047944f3Smrg		[use_lint=$withval], [use_lint=no])
7187047944f3Smrgif test "x$use_lint" = "xyes" ; then
7188047944f3Smrg	LINT="lint"
7189047944f3Smrgelse
7190047944f3Smrg	LINT="$use_lint"
7191047944f3Smrgfi
7192047944f3Smrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
7193047944f3Smrg    case $LINT in
7194047944f3Smrg	lint|*/lint)
7195047944f3Smrg	    case $host_os in
7196047944f3Smrg		solaris*)
7197047944f3Smrg			LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
7198047944f3Smrg			;;
7199047944f3Smrg	    esac
7200047944f3Smrg	    ;;
7201047944f3Smrg    esac
7202047944f3Smrgfi
7203047944f3Smrg
7204047944f3SmrgAC_SUBST(LINT)
7205047944f3SmrgAC_SUBST(LINT_FLAGS)
7206047944f3SmrgAM_CONDITIONAL(LINT, [test x$LINT != xno])
7207047944f3Smrg
7208047944f3Smrg]) # XORG_WITH_LINT
7209047944f3Smrg
7210047944f3Smrg# XORG_LINT_LIBRARY(LIBNAME)
7211047944f3Smrg# --------------------------
7212047944f3Smrg# Minimum version: 1.1.0
7213047944f3Smrg#
7214047944f3Smrg# Sets up flags for building lint libraries for checking programs that call
7215047944f3Smrg# functions in the library.
7216047944f3Smrg# Disabled by default, enable with --enable-lint-library
7217047944f3Smrg# Sets: 
7218047944f3Smrg#	@LINTLIB@		- name of lint library file to make
7219047944f3Smrg#	MAKE_LINT_LIB		- automake conditional
7220047944f3Smrg#
7221047944f3Smrg
7222047944f3SmrgAC_DEFUN([XORG_LINT_LIBRARY],[
7223047944f3SmrgAC_REQUIRE([XORG_WITH_LINT])
7224047944f3Smrg# Build lint "library" for more indepth checks of programs calling this library
7225047944f3SmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library],
7226047944f3Smrg	[Create lint library (default: disabled)])],
7227047944f3Smrg	[make_lint_lib=$enableval], [make_lint_lib=no])
7228047944f3Smrgif test "x$make_lint_lib" != "xno" ; then
7229047944f3Smrg	if test "x$LINT" = "xno" ; then
7230047944f3Smrg		AC_MSG_ERROR([Cannot make lint library without --with-lint])
7231047944f3Smrg	fi
7232047944f3Smrg	if test "x$make_lint_lib" = "xyes" ; then
7233047944f3Smrg		LINTLIB=llib-l$1.ln
7234047944f3Smrg	else
7235047944f3Smrg		LINTLIB=$make_lint_lib
7236047944f3Smrg	fi
7237047944f3Smrgfi
7238047944f3SmrgAC_SUBST(LINTLIB)
7239047944f3SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
7240047944f3Smrg
7241047944f3Smrg]) # XORG_LINT_LIBRARY
7242047944f3Smrg
72437706df26Smrgdnl Copyright 2005 Red Hat, Inc
72447706df26Smrgdnl 
72457706df26Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
72467706df26Smrgdnl documentation for any purpose is hereby granted without fee, provided that
72477706df26Smrgdnl the above copyright notice appear in all copies and that both that
72487706df26Smrgdnl copyright notice and this permission notice appear in supporting
72497706df26Smrgdnl documentation.
72507706df26Smrgdnl 
72517706df26Smrgdnl The above copyright notice and this permission notice shall be included
72527706df26Smrgdnl in all copies or substantial portions of the Software.
72537706df26Smrgdnl 
72547706df26Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
72557706df26Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
72567706df26Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
72577706df26Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
72587706df26Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
72597706df26Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
72607706df26Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
72617706df26Smrgdnl 
72627706df26Smrgdnl Except as contained in this notice, the name of the copyright holders shall
72637706df26Smrgdnl not be used in advertising or otherwise to promote the sale, use or
72647706df26Smrgdnl other dealings in this Software without prior written authorization
72657706df26Smrgdnl from the copyright holders.
72667706df26Smrgdnl 
72677706df26Smrg
72687706df26Smrg# XORG_DRIVER_CHECK_EXT()
72697706df26Smrg# --------------------------
72707706df26Smrg# Checks for the $1 define in xorg-server.h (from the sdk).  If it
72717706df26Smrg# is defined, then add $1 to $REQUIRED_MODULES.
72727706df26Smrg
72737706df26SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[
72747706df26Smrg	SAVE_CFLAGS="$CFLAGS"
72757706df26Smrg	CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`"
72767706df26Smrg	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
72777706df26Smrg#include "xorg-server.h"
72787706df26Smrg#if !defined $1
72797706df26Smrg#error $1 not defined
72807706df26Smrg#endif
72817706df26Smrg		]])],
72827706df26Smrg		[_EXT_CHECK=yes],
72837706df26Smrg		[_EXT_CHECK=no])
72847706df26Smrg	CFLAGS="$SAVE_CFLAGS"
72857706df26Smrg	AC_MSG_CHECKING([if $1 is defined])
72867706df26Smrg	AC_MSG_RESULT([$_EXT_CHECK])
72877706df26Smrg	if test "$_EXT_CHECK" != no; then
72887706df26Smrg		REQUIRED_MODULES="$REQUIRED_MODULES $2"
72897706df26Smrg	fi
72907706df26Smrg])
72917706df26Smrg
72927706df26Smrgdnl Copyright 2005 Red Hat, Inc
72937706df26Smrgdnl
72947706df26Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
72957706df26Smrgdnl documentation for any purpose is hereby granted without fee, provided that
72967706df26Smrgdnl the above copyright notice appear in all copies and that both that
72977706df26Smrgdnl copyright notice and this permission notice appear in supporting
72987706df26Smrgdnl documentation.
72997706df26Smrgdnl
73007706df26Smrgdnl The above copyright notice and this permission notice shall be included
73017706df26Smrgdnl in all copies or substantial portions of the Software.
73027706df26Smrgdnl
73037706df26Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
73047706df26Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
73057706df26Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
73067706df26Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
73077706df26Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
73087706df26Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
73097706df26Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
73107706df26Smrgdnl
73117706df26Smrgdnl Except as contained in this notice, the name of the copyright holders shall
73127706df26Smrgdnl not be used in advertising or otherwise to promote the sale, use or
73137706df26Smrgdnl other dealings in this Software without prior written authorization
73147706df26Smrgdnl from the copyright holders.
73157706df26Smrgdnl
73167706df26Smrg
73177706df26Smrg# XORG_RELEASE_VERSION
73187706df26Smrg# --------------------
73197706df26Smrg# Adds --with/without-release-string and changes the PACKAGE and
73207706df26Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
7321047944f3Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
7322047944f3Smrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
73237706df26Smrg 
73247706df26SmrgAC_DEFUN([XORG_RELEASE_VERSION],[
73257706df26Smrg	AC_ARG_WITH(release-version,
73267706df26Smrg			AC_HELP_STRING([--with-release-version=STRING],
73277706df26Smrg				[Use release version string in package name]),
73287706df26Smrg			[RELEASE_VERSION="$withval"],
73297706df26Smrg			[RELEASE_VERSION=""])
73307706df26Smrg	if test "x$RELEASE_VERSION" != "x"; then
73317706df26Smrg		PACKAGE="$PACKAGE-$RELEASE_VERSION"
73327706df26Smrg		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
73337706df26Smrg		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
73347706df26Smrg	fi
7335047944f3Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
7336047944f3Smrg		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
7337047944f3Smrg		[Major version of this package])
7338047944f3Smrg	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
7339047944f3Smrg	if test "x$PVM" = "x"; then
7340047944f3Smrg		PVM="0"
7341047944f3Smrg	fi
7342047944f3Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
7343047944f3Smrg		[$PVM],
7344047944f3Smrg		[Minor version of this package])
7345047944f3Smrg	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
7346047944f3Smrg	if test "x$PVP" = "x"; then
7347047944f3Smrg		PVP="0"
7348047944f3Smrg	fi
7349047944f3Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
7350047944f3Smrg		[$PVP],
7351047944f3Smrg		[Patch version of this package])
73527706df26Smrg])
73537706df26Smrg
7354047944f3Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007  Free Software Foundation, Inc.
73557706df26Smrg#
73567706df26Smrg# This file is free software; the Free Software Foundation
73577706df26Smrg# gives unlimited permission to copy and/or distribute it,
73587706df26Smrg# with or without modifications, as long as this notice is preserved.
73597706df26Smrg
73607706df26Smrg# AM_AUTOMAKE_VERSION(VERSION)
73617706df26Smrg# ----------------------------
73627706df26Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
73637706df26Smrg# generated from the m4 files accompanying Automake X.Y.
7364047944f3Smrg# (This private macro should not be called outside this file.)
7365047944f3SmrgAC_DEFUN([AM_AUTOMAKE_VERSION],
7366047944f3Smrg[am__api_version='1.10'
7367047944f3Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
7368047944f3Smrgdnl require some minimum version.  Point them to the right macro.
7369047944f3Smrgm4_if([$1], [1.10.1], [],
7370047944f3Smrg      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
7371047944f3Smrg])
7372047944f3Smrg
7373047944f3Smrg# _AM_AUTOCONF_VERSION(VERSION)
7374047944f3Smrg# -----------------------------
7375047944f3Smrg# aclocal traces this macro to find the Autoconf version.
7376047944f3Smrg# This is a private macro too.  Using m4_define simplifies
7377047944f3Smrg# the logic in aclocal, which can simply ignore this definition.
7378047944f3Smrgm4_define([_AM_AUTOCONF_VERSION], [])
73797706df26Smrg
73807706df26Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION
73817706df26Smrg# -------------------------------
7382047944f3Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
73837706df26Smrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
73847706df26SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
7385047944f3Smrg[AM_AUTOMAKE_VERSION([1.10.1])dnl
7386047944f3Smrgm4_ifndef([AC_AUTOCONF_VERSION],
7387047944f3Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
7388047944f3Smrg_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)])
73897706df26Smrg
73907706df26Smrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
73917706df26Smrg
73927706df26Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
73937706df26Smrg#
73947706df26Smrg# This file is free software; the Free Software Foundation
73957706df26Smrg# gives unlimited permission to copy and/or distribute it,
73967706df26Smrg# with or without modifications, as long as this notice is preserved.
73977706df26Smrg
73987706df26Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
73997706df26Smrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
74007706df26Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
74017706df26Smrg#
74027706df26Smrg# Of course, Automake must honor this variable whenever it calls a
74037706df26Smrg# tool from the auxiliary directory.  The problem is that $srcdir (and
74047706df26Smrg# therefore $ac_aux_dir as well) can be either absolute or relative,
74057706df26Smrg# depending on how configure is run.  This is pretty annoying, since
74067706df26Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
74077706df26Smrg# source directory, any form will work fine, but in subdirectories a
74087706df26Smrg# relative path needs to be adjusted first.
74097706df26Smrg#
74107706df26Smrg# $ac_aux_dir/missing
74117706df26Smrg#    fails when called from a subdirectory if $ac_aux_dir is relative
74127706df26Smrg# $top_srcdir/$ac_aux_dir/missing
74137706df26Smrg#    fails if $ac_aux_dir is absolute,
74147706df26Smrg#    fails when called from a subdirectory in a VPATH build with
74157706df26Smrg#          a relative $ac_aux_dir
74167706df26Smrg#
74177706df26Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
74187706df26Smrg# are both prefixed by $srcdir.  In an in-source build this is usually
74197706df26Smrg# harmless because $srcdir is `.', but things will broke when you
74207706df26Smrg# start a VPATH build or use an absolute $srcdir.
74217706df26Smrg#
74227706df26Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
74237706df26Smrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
74247706df26Smrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
74257706df26Smrg# and then we would define $MISSING as
74267706df26Smrg#   MISSING="\${SHELL} $am_aux_dir/missing"
74277706df26Smrg# This will work as long as MISSING is not called from configure, because
74287706df26Smrg# unfortunately $(top_srcdir) has no meaning in configure.
74297706df26Smrg# However there are other variables, like CC, which are often used in
74307706df26Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
74317706df26Smrg#
74327706df26Smrg# Another solution, used here, is to always expand $ac_aux_dir to an
74337706df26Smrg# absolute PATH.  The drawback is that using absolute paths prevent a
74347706df26Smrg# configured tree to be moved without reconfiguration.
74357706df26Smrg
74367706df26SmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
74377706df26Smrg[dnl Rely on autoconf to set up CDPATH properly.
74387706df26SmrgAC_PREREQ([2.50])dnl
74397706df26Smrg# expand $ac_aux_dir to an absolute path
74407706df26Smrgam_aux_dir=`cd $ac_aux_dir && pwd`
74417706df26Smrg])
74427706df26Smrg
74437706df26Smrg# AM_CONDITIONAL                                            -*- Autoconf -*-
74447706df26Smrg
7445047944f3Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
74467706df26Smrg# Free Software Foundation, Inc.
74477706df26Smrg#
74487706df26Smrg# This file is free software; the Free Software Foundation
74497706df26Smrg# gives unlimited permission to copy and/or distribute it,
74507706df26Smrg# with or without modifications, as long as this notice is preserved.
74517706df26Smrg
7452047944f3Smrg# serial 8
74537706df26Smrg
74547706df26Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
74557706df26Smrg# -------------------------------------
74567706df26Smrg# Define a conditional.
74577706df26SmrgAC_DEFUN([AM_CONDITIONAL],
74587706df26Smrg[AC_PREREQ(2.52)dnl
74597706df26Smrg ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
74607706df26Smrg	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
7461047944f3SmrgAC_SUBST([$1_TRUE])dnl
7462047944f3SmrgAC_SUBST([$1_FALSE])dnl
7463047944f3Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl
7464047944f3Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl
74657706df26Smrgif $2; then
74667706df26Smrg  $1_TRUE=
74677706df26Smrg  $1_FALSE='#'
74687706df26Smrgelse
74697706df26Smrg  $1_TRUE='#'
74707706df26Smrg  $1_FALSE=
74717706df26Smrgfi
74727706df26SmrgAC_CONFIG_COMMANDS_PRE(
74737706df26Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
74747706df26Smrg  AC_MSG_ERROR([[conditional "$1" was never defined.
74757706df26SmrgUsually this means the macro was only invoked conditionally.]])
74767706df26Smrgfi])])
74777706df26Smrg
7478047944f3Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
74797706df26Smrg# Free Software Foundation, Inc.
74807706df26Smrg#
74817706df26Smrg# This file is free software; the Free Software Foundation
74827706df26Smrg# gives unlimited permission to copy and/or distribute it,
74837706df26Smrg# with or without modifications, as long as this notice is preserved.
74847706df26Smrg
7485047944f3Smrg# serial 9
74867706df26Smrg
74877706df26Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
74887706df26Smrg# written in clear, in which case automake, when reading aclocal.m4,
74897706df26Smrg# will think it sees a *use*, and therefore will trigger all it's
74907706df26Smrg# C support machinery.  Also note that it means that autoscan, seeing
74917706df26Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
74927706df26Smrg
74937706df26Smrg
74947706df26Smrg# _AM_DEPENDENCIES(NAME)
74957706df26Smrg# ----------------------
74967706df26Smrg# See how the compiler implements dependency checking.
74977706df26Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
74987706df26Smrg# We try a few techniques and use that to set a single cache variable.
74997706df26Smrg#
75007706df26Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
75017706df26Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
75027706df26Smrg# dependency, and given that the user is not expected to run this macro,
75037706df26Smrg# just rely on AC_PROG_CC.
75047706df26SmrgAC_DEFUN([_AM_DEPENDENCIES],
75057706df26Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
75067706df26SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
75077706df26SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
75087706df26SmrgAC_REQUIRE([AM_DEP_TRACK])dnl
75097706df26Smrg
75107706df26Smrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
75117706df26Smrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
75127706df26Smrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
7513047944f3Smrg       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
75147706df26Smrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
75157706df26Smrg                   [depcc="$$1"   am_compiler_list=])
75167706df26Smrg
75177706df26SmrgAC_CACHE_CHECK([dependency style of $depcc],
75187706df26Smrg               [am_cv_$1_dependencies_compiler_type],
75197706df26Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
75207706df26Smrg  # We make a subdir and do the tests there.  Otherwise we can end up
75217706df26Smrg  # making bogus files that we don't know about and never remove.  For
75227706df26Smrg  # instance it was reported that on HP-UX the gcc test will end up
75237706df26Smrg  # making a dummy file named `D' -- because `-MD' means `put the output
75247706df26Smrg  # in D'.
75257706df26Smrg  mkdir conftest.dir
75267706df26Smrg  # Copy depcomp to subdir because otherwise we won't find it if we're
75277706df26Smrg  # using a relative directory.
75287706df26Smrg  cp "$am_depcomp" conftest.dir
75297706df26Smrg  cd conftest.dir
75307706df26Smrg  # We will build objects and dependencies in a subdirectory because
75317706df26Smrg  # it helps to detect inapplicable dependency modes.  For instance
75327706df26Smrg  # both Tru64's cc and ICC support -MD to output dependencies as a
75337706df26Smrg  # side effect of compilation, but ICC will put the dependencies in
75347706df26Smrg  # the current directory while Tru64 will put them in the object
75357706df26Smrg  # directory.
75367706df26Smrg  mkdir sub
75377706df26Smrg
75387706df26Smrg  am_cv_$1_dependencies_compiler_type=none
75397706df26Smrg  if test "$am_compiler_list" = ""; then
75407706df26Smrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
75417706df26Smrg  fi
75427706df26Smrg  for depmode in $am_compiler_list; do
75437706df26Smrg    # Setup a source with many dependencies, because some compilers
75447706df26Smrg    # like to wrap large dependency lists on column 80 (with \), and
75457706df26Smrg    # we should not choose a depcomp mode which is confused by this.
75467706df26Smrg    #
75477706df26Smrg    # We need to recreate these files for each test, as the compiler may
75487706df26Smrg    # overwrite some of them when testing with obscure command lines.
75497706df26Smrg    # This happens at least with the AIX C compiler.
75507706df26Smrg    : > sub/conftest.c
75517706df26Smrg    for i in 1 2 3 4 5 6; do
75527706df26Smrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
75537706df26Smrg      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
75547706df26Smrg      # Solaris 8's {/usr,}/bin/sh.
75557706df26Smrg      touch sub/conftst$i.h
75567706df26Smrg    done
75577706df26Smrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
75587706df26Smrg
75597706df26Smrg    case $depmode in
75607706df26Smrg    nosideeffect)
75617706df26Smrg      # after this tag, mechanisms are not by side-effect, so they'll
75627706df26Smrg      # only be used when explicitly requested
75637706df26Smrg      if test "x$enable_dependency_tracking" = xyes; then
75647706df26Smrg	continue
75657706df26Smrg      else
75667706df26Smrg	break
75677706df26Smrg      fi
75687706df26Smrg      ;;
75697706df26Smrg    none) break ;;
75707706df26Smrg    esac
75717706df26Smrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
75727706df26Smrg    # mode.  It turns out that the SunPro C++ compiler does not properly
75737706df26Smrg    # handle `-M -o', and we need to detect this.
75747706df26Smrg    if depmode=$depmode \
75757706df26Smrg       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
75767706df26Smrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
75777706df26Smrg       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
75787706df26Smrg         >/dev/null 2>conftest.err &&
7579047944f3Smrg       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
75807706df26Smrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
75817706df26Smrg       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
75827706df26Smrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
75837706df26Smrg      # icc doesn't choke on unknown options, it will just issue warnings
75847706df26Smrg      # or remarks (even with -Werror).  So we grep stderr for any message
75857706df26Smrg      # that says an option was ignored or not supported.
75867706df26Smrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
75877706df26Smrg      #   icc: Command line warning: ignoring option '-M'; no argument required
75887706df26Smrg      # The diagnosis changed in icc 8.0:
75897706df26Smrg      #   icc: Command line remark: option '-MP' not supported
75907706df26Smrg      if (grep 'ignoring option' conftest.err ||
75917706df26Smrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
75927706df26Smrg        am_cv_$1_dependencies_compiler_type=$depmode
75937706df26Smrg        break
75947706df26Smrg      fi
75957706df26Smrg    fi
75967706df26Smrg  done
75977706df26Smrg
75987706df26Smrg  cd ..
75997706df26Smrg  rm -rf conftest.dir
76007706df26Smrgelse
76017706df26Smrg  am_cv_$1_dependencies_compiler_type=none
76027706df26Smrgfi
76037706df26Smrg])
76047706df26SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
76057706df26SmrgAM_CONDITIONAL([am__fastdep$1], [
76067706df26Smrg  test "x$enable_dependency_tracking" != xno \
76077706df26Smrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
76087706df26Smrg])
76097706df26Smrg
76107706df26Smrg
76117706df26Smrg# AM_SET_DEPDIR
76127706df26Smrg# -------------
76137706df26Smrg# Choose a directory name for dependency files.
76147706df26Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
76157706df26SmrgAC_DEFUN([AM_SET_DEPDIR],
76167706df26Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
76177706df26SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
76187706df26Smrg])
76197706df26Smrg
76207706df26Smrg
76217706df26Smrg# AM_DEP_TRACK
76227706df26Smrg# ------------
76237706df26SmrgAC_DEFUN([AM_DEP_TRACK],
76247706df26Smrg[AC_ARG_ENABLE(dependency-tracking,
76257706df26Smrg[  --disable-dependency-tracking  speeds up one-time build
76267706df26Smrg  --enable-dependency-tracking   do not reject slow dependency extractors])
76277706df26Smrgif test "x$enable_dependency_tracking" != xno; then
76287706df26Smrg  am_depcomp="$ac_aux_dir/depcomp"
76297706df26Smrg  AMDEPBACKSLASH='\'
76307706df26Smrgfi
76317706df26SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
7632047944f3SmrgAC_SUBST([AMDEPBACKSLASH])dnl
7633047944f3Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
76347706df26Smrg])
76357706df26Smrg
76367706df26Smrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
76377706df26Smrg
76387706df26Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
76397706df26Smrg# Free Software Foundation, Inc.
76407706df26Smrg#
76417706df26Smrg# This file is free software; the Free Software Foundation
76427706df26Smrg# gives unlimited permission to copy and/or distribute it,
76437706df26Smrg# with or without modifications, as long as this notice is preserved.
76447706df26Smrg
76457706df26Smrg#serial 3
76467706df26Smrg
76477706df26Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
76487706df26Smrg# ------------------------------
76497706df26SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
76507706df26Smrg[for mf in $CONFIG_FILES; do
76517706df26Smrg  # Strip MF so we end up with the name of the file.
76527706df26Smrg  mf=`echo "$mf" | sed -e 's/:.*$//'`
76537706df26Smrg  # Check whether this is an Automake generated Makefile or not.
76547706df26Smrg  # We used to match only the files named `Makefile.in', but
76557706df26Smrg  # some people rename them; so instead we look at the file content.
76567706df26Smrg  # Grep'ing the first line is not enough: some people post-process
76577706df26Smrg  # each Makefile.in and add a new line on top of each file to say so.
7658047944f3Smrg  # Grep'ing the whole file is not good either: AIX grep has a line
7659047944f3Smrg  # limit of 2048, but all sed's we know have understand at least 4000.
7660047944f3Smrg  if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
76617706df26Smrg    dirpart=`AS_DIRNAME("$mf")`
76627706df26Smrg  else
76637706df26Smrg    continue
76647706df26Smrg  fi
76657706df26Smrg  # Extract the definition of DEPDIR, am__include, and am__quote
76667706df26Smrg  # from the Makefile without running `make'.
76677706df26Smrg  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
76687706df26Smrg  test -z "$DEPDIR" && continue
76697706df26Smrg  am__include=`sed -n 's/^am__include = //p' < "$mf"`
76707706df26Smrg  test -z "am__include" && continue
76717706df26Smrg  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
76727706df26Smrg  # When using ansi2knr, U may be empty or an underscore; expand it
76737706df26Smrg  U=`sed -n 's/^U = //p' < "$mf"`
76747706df26Smrg  # Find all dependency output files, they are included files with
76757706df26Smrg  # $(DEPDIR) in their names.  We invoke sed twice because it is the
76767706df26Smrg  # simplest approach to changing $(DEPDIR) to its actual value in the
76777706df26Smrg  # expansion.
76787706df26Smrg  for file in `sed -n "
76797706df26Smrg    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
76807706df26Smrg       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
76817706df26Smrg    # Make sure the directory exists.
76827706df26Smrg    test -f "$dirpart/$file" && continue
76837706df26Smrg    fdir=`AS_DIRNAME(["$file"])`
76847706df26Smrg    AS_MKDIR_P([$dirpart/$fdir])
76857706df26Smrg    # echo "creating $dirpart/$file"
76867706df26Smrg    echo '# dummy' > "$dirpart/$file"
76877706df26Smrg  done
76887706df26Smrgdone
76897706df26Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
76907706df26Smrg
76917706df26Smrg
76927706df26Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS
76937706df26Smrg# -----------------------------
76947706df26Smrg# This macro should only be invoked once -- use via AC_REQUIRE.
76957706df26Smrg#
76967706df26Smrg# This code is only required when automatic dependency tracking
76977706df26Smrg# is enabled.  FIXME.  This creates each `.P' file that we will
76987706df26Smrg# need in order to bootstrap the dependency handling code.
76997706df26SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
77007706df26Smrg[AC_CONFIG_COMMANDS([depfiles],
77017706df26Smrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
77027706df26Smrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
77037706df26Smrg])
77047706df26Smrg
77057706df26Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
77067706df26Smrg# Free Software Foundation, Inc.
77077706df26Smrg#
77087706df26Smrg# This file is free software; the Free Software Foundation
77097706df26Smrg# gives unlimited permission to copy and/or distribute it,
77107706df26Smrg# with or without modifications, as long as this notice is preserved.
77117706df26Smrg
77127706df26Smrg# serial 8
77137706df26Smrg
77147706df26Smrg# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
77157706df26SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
77167706df26Smrg
77177706df26Smrg# Do all the work for Automake.                             -*- Autoconf -*-
77187706df26Smrg
7719047944f3Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
7720047944f3Smrg# 2005, 2006, 2008 Free Software Foundation, Inc.
77217706df26Smrg#
77227706df26Smrg# This file is free software; the Free Software Foundation
77237706df26Smrg# gives unlimited permission to copy and/or distribute it,
77247706df26Smrg# with or without modifications, as long as this notice is preserved.
77257706df26Smrg
7726047944f3Smrg# serial 13
77277706df26Smrg
77287706df26Smrg# This macro actually does too much.  Some checks are only needed if
77297706df26Smrg# your package does certain things.  But this isn't really a big deal.
77307706df26Smrg
77317706df26Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
77327706df26Smrg# AM_INIT_AUTOMAKE([OPTIONS])
77337706df26Smrg# -----------------------------------------------
77347706df26Smrg# The call with PACKAGE and VERSION arguments is the old style
77357706df26Smrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
77367706df26Smrg# and VERSION should now be passed to AC_INIT and removed from
77377706df26Smrg# the call to AM_INIT_AUTOMAKE.
77387706df26Smrg# We support both call styles for the transition.  After
77397706df26Smrg# the next Automake release, Autoconf can make the AC_INIT
77407706df26Smrg# arguments mandatory, and then we can depend on a new Autoconf
77417706df26Smrg# release and drop the old call support.
77427706df26SmrgAC_DEFUN([AM_INIT_AUTOMAKE],
7743047944f3Smrg[AC_PREREQ([2.60])dnl
77447706df26Smrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
77457706df26Smrgdnl the ones we care about.
77467706df26Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
77477706df26SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
77487706df26SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
7749047944f3Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
7750047944f3Smrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
7751047944f3Smrg  # is not polluted with repeated "-I."
7752047944f3Smrg  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
7753047944f3Smrg  # test to see if srcdir already configured
7754047944f3Smrg  if test -f $srcdir/config.status; then
7755047944f3Smrg    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
7756047944f3Smrg  fi
77577706df26Smrgfi
77587706df26Smrg
77597706df26Smrg# test whether we have cygpath
77607706df26Smrgif test -z "$CYGPATH_W"; then
77617706df26Smrg  if (cygpath --version) >/dev/null 2>/dev/null; then
77627706df26Smrg    CYGPATH_W='cygpath -w'
77637706df26Smrg  else
77647706df26Smrg    CYGPATH_W=echo
77657706df26Smrg  fi
77667706df26Smrgfi
77677706df26SmrgAC_SUBST([CYGPATH_W])
77687706df26Smrg
77697706df26Smrg# Define the identity of the package.
77707706df26Smrgdnl Distinguish between old-style and new-style calls.
77717706df26Smrgm4_ifval([$2],
77727706df26Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
77737706df26Smrg AC_SUBST([PACKAGE], [$1])dnl
77747706df26Smrg AC_SUBST([VERSION], [$2])],
77757706df26Smrg[_AM_SET_OPTIONS([$1])dnl
7776047944f3Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
7777047944f3Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
7778047944f3Smrg  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
77797706df26Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
77807706df26Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
77817706df26Smrg
77827706df26Smrg_AM_IF_OPTION([no-define],,
77837706df26Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
77847706df26Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
77857706df26Smrg
77867706df26Smrg# Some tools Automake needs.
77877706df26SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
77887706df26SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
77897706df26SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
77907706df26SmrgAM_MISSING_PROG(AUTOCONF, autoconf)
77917706df26SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
77927706df26SmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
77937706df26SmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
77947706df26SmrgAM_PROG_INSTALL_SH
77957706df26SmrgAM_PROG_INSTALL_STRIP
77967706df26SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl
77977706df26Smrg# We need awk for the "check" target.  The system "awk" is bad on
77987706df26Smrg# some platforms.
77997706df26SmrgAC_REQUIRE([AC_PROG_AWK])dnl
78007706df26SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
78017706df26SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
78027706df26Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
78037706df26Smrg              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
78047706df26Smrg	      		     [_AM_PROG_TAR([v7])])])
78057706df26Smrg_AM_IF_OPTION([no-dependencies],,
78067706df26Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
78077706df26Smrg                  [_AM_DEPENDENCIES(CC)],
78087706df26Smrg                  [define([AC_PROG_CC],
78097706df26Smrg                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
78107706df26SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
78117706df26Smrg                  [_AM_DEPENDENCIES(CXX)],
78127706df26Smrg                  [define([AC_PROG_CXX],
78137706df26Smrg                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
7814047944f3SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC],
7815047944f3Smrg                  [_AM_DEPENDENCIES(OBJC)],
7816047944f3Smrg                  [define([AC_PROG_OBJC],
7817047944f3Smrg                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
78187706df26Smrg])
78197706df26Smrg])
78207706df26Smrg
78217706df26Smrg
78227706df26Smrg# When config.status generates a header, we must update the stamp-h file.
78237706df26Smrg# This file resides in the same directory as the config header
78247706df26Smrg# that is generated.  The stamp files are numbered to have different names.
78257706df26Smrg
78267706df26Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
78277706df26Smrg# loop where config.status creates the headers, so we can generate
78287706df26Smrg# our stamp files there.
78297706df26SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
78307706df26Smrg[# Compute $1's index in $config_headers.
7831047944f3Smrg_am_arg=$1
78327706df26Smrg_am_stamp_count=1
78337706df26Smrgfor _am_header in $config_headers :; do
78347706df26Smrg  case $_am_header in
7835047944f3Smrg    $_am_arg | $_am_arg:* )
78367706df26Smrg      break ;;
78377706df26Smrg    * )
78387706df26Smrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
78397706df26Smrg  esac
78407706df26Smrgdone
7841047944f3Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
78427706df26Smrg
78437706df26Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
78447706df26Smrg#
78457706df26Smrg# This file is free software; the Free Software Foundation
78467706df26Smrg# gives unlimited permission to copy and/or distribute it,
78477706df26Smrg# with or without modifications, as long as this notice is preserved.
78487706df26Smrg
78497706df26Smrg# AM_PROG_INSTALL_SH
78507706df26Smrg# ------------------
78517706df26Smrg# Define $install_sh.
78527706df26SmrgAC_DEFUN([AM_PROG_INSTALL_SH],
78537706df26Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7854047944f3Smrginstall_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
78557706df26SmrgAC_SUBST(install_sh)])
78567706df26Smrg
78577706df26Smrg# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
78587706df26Smrg#
78597706df26Smrg# This file is free software; the Free Software Foundation
78607706df26Smrg# gives unlimited permission to copy and/or distribute it,
78617706df26Smrg# with or without modifications, as long as this notice is preserved.
78627706df26Smrg
78637706df26Smrg# serial 2
78647706df26Smrg
78657706df26Smrg# Check whether the underlying file-system supports filenames
78667706df26Smrg# with a leading dot.  For instance MS-DOS doesn't.
78677706df26SmrgAC_DEFUN([AM_SET_LEADING_DOT],
78687706df26Smrg[rm -rf .tst 2>/dev/null
78697706df26Smrgmkdir .tst 2>/dev/null
78707706df26Smrgif test -d .tst; then
78717706df26Smrg  am__leading_dot=.
78727706df26Smrgelse
78737706df26Smrg  am__leading_dot=_
78747706df26Smrgfi
78757706df26Smrgrmdir .tst 2>/dev/null
78767706df26SmrgAC_SUBST([am__leading_dot])])
78777706df26Smrg
78787706df26Smrg# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
78797706df26Smrg# From Jim Meyering
78807706df26Smrg
78817706df26Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
78827706df26Smrg# Free Software Foundation, Inc.
78837706df26Smrg#
78847706df26Smrg# This file is free software; the Free Software Foundation
78857706df26Smrg# gives unlimited permission to copy and/or distribute it,
78867706df26Smrg# with or without modifications, as long as this notice is preserved.
78877706df26Smrg
78887706df26Smrg# serial 4
78897706df26Smrg
78907706df26SmrgAC_DEFUN([AM_MAINTAINER_MODE],
78917706df26Smrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
78927706df26Smrg  dnl maintainer-mode is disabled by default
78937706df26Smrg  AC_ARG_ENABLE(maintainer-mode,
78947706df26Smrg[  --enable-maintainer-mode  enable make rules and dependencies not useful
78957706df26Smrg			  (and sometimes confusing) to the casual installer],
78967706df26Smrg      USE_MAINTAINER_MODE=$enableval,
78977706df26Smrg      USE_MAINTAINER_MODE=no)
78987706df26Smrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
78997706df26Smrg  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
79007706df26Smrg  MAINT=$MAINTAINER_MODE_TRUE
79017706df26Smrg  AC_SUBST(MAINT)dnl
79027706df26Smrg]
79037706df26Smrg)
79047706df26Smrg
79057706df26SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
79067706df26Smrg
79077706df26Smrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
79087706df26Smrg
79097706df26Smrg# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
79107706df26Smrg#
79117706df26Smrg# This file is free software; the Free Software Foundation
79127706df26Smrg# gives unlimited permission to copy and/or distribute it,
79137706df26Smrg# with or without modifications, as long as this notice is preserved.
79147706df26Smrg
79157706df26Smrg# serial 3
79167706df26Smrg
79177706df26Smrg# AM_MAKE_INCLUDE()
79187706df26Smrg# -----------------
79197706df26Smrg# Check to see how make treats includes.
79207706df26SmrgAC_DEFUN([AM_MAKE_INCLUDE],
79217706df26Smrg[am_make=${MAKE-make}
79227706df26Smrgcat > confinc << 'END'
79237706df26Smrgam__doit:
79247706df26Smrg	@echo done
79257706df26Smrg.PHONY: am__doit
79267706df26SmrgEND
79277706df26Smrg# If we don't find an include directive, just comment out the code.
79287706df26SmrgAC_MSG_CHECKING([for style of include used by $am_make])
79297706df26Smrgam__include="#"
79307706df26Smrgam__quote=
79317706df26Smrg_am_result=none
79327706df26Smrg# First try GNU make style include.
79337706df26Smrgecho "include confinc" > confmf
79347706df26Smrg# We grep out `Entering directory' and `Leaving directory'
79357706df26Smrg# messages which can occur if `w' ends up in MAKEFLAGS.
79367706df26Smrg# In particular we don't look at `^make:' because GNU make might
79377706df26Smrg# be invoked under some other name (usually "gmake"), in which
79387706df26Smrg# case it prints its new name instead of `make'.
79397706df26Smrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
79407706df26Smrg   am__include=include
79417706df26Smrg   am__quote=
79427706df26Smrg   _am_result=GNU
79437706df26Smrgfi
79447706df26Smrg# Now try BSD make style include.
79457706df26Smrgif test "$am__include" = "#"; then
79467706df26Smrg   echo '.include "confinc"' > confmf
79477706df26Smrg   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
79487706df26Smrg      am__include=.include
79497706df26Smrg      am__quote="\""
79507706df26Smrg      _am_result=BSD
79517706df26Smrg   fi
79527706df26Smrgfi
79537706df26SmrgAC_SUBST([am__include])
79547706df26SmrgAC_SUBST([am__quote])
79557706df26SmrgAC_MSG_RESULT([$_am_result])
79567706df26Smrgrm -f confinc confmf
79577706df26Smrg])
79587706df26Smrg
79597706df26Smrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
79607706df26Smrg
7961047944f3Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
79627706df26Smrg# Free Software Foundation, Inc.
79637706df26Smrg#
79647706df26Smrg# This file is free software; the Free Software Foundation
79657706df26Smrg# gives unlimited permission to copy and/or distribute it,
79667706df26Smrg# with or without modifications, as long as this notice is preserved.
79677706df26Smrg
7968047944f3Smrg# serial 5
79697706df26Smrg
79707706df26Smrg# AM_MISSING_PROG(NAME, PROGRAM)
79717706df26Smrg# ------------------------------
79727706df26SmrgAC_DEFUN([AM_MISSING_PROG],
79737706df26Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
79747706df26Smrg$1=${$1-"${am_missing_run}$2"}
79757706df26SmrgAC_SUBST($1)])
79767706df26Smrg
79777706df26Smrg
79787706df26Smrg# AM_MISSING_HAS_RUN
79797706df26Smrg# ------------------
79807706df26Smrg# Define MISSING if not defined so far and test if it supports --run.
79817706df26Smrg# If it does, set am_missing_run to use it, otherwise, to nothing.
79827706df26SmrgAC_DEFUN([AM_MISSING_HAS_RUN],
79837706df26Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7984047944f3SmrgAC_REQUIRE_AUX_FILE([missing])dnl
79857706df26Smrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
79867706df26Smrg# Use eval to expand $SHELL
79877706df26Smrgif eval "$MISSING --run true"; then
79887706df26Smrg  am_missing_run="$MISSING --run "
79897706df26Smrgelse
79907706df26Smrg  am_missing_run=
79917706df26Smrg  AC_MSG_WARN([`missing' script is too old or missing])
79927706df26Smrgfi
79937706df26Smrg])
79947706df26Smrg
7995047944f3Smrg# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
79967706df26Smrg#
79977706df26Smrg# This file is free software; the Free Software Foundation
79987706df26Smrg# gives unlimited permission to copy and/or distribute it,
79997706df26Smrg# with or without modifications, as long as this notice is preserved.
80007706df26Smrg
80017706df26Smrg# AM_PROG_MKDIR_P
80027706df26Smrg# ---------------
8003047944f3Smrg# Check for `mkdir -p'.
80047706df26SmrgAC_DEFUN([AM_PROG_MKDIR_P],
8005047944f3Smrg[AC_PREREQ([2.60])dnl
8006047944f3SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl
8007047944f3Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
8008047944f3Smrgdnl while keeping a definition of mkdir_p for backward compatibility.
8009047944f3Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
8010047944f3Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
8011047944f3Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own
8012047944f3Smrgdnl adjustment using top_builddir (which is defined more often than
8013047944f3Smrgdnl MKDIR_P).
8014047944f3SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
8015047944f3Smrgcase $mkdir_p in
8016047944f3Smrg  [[\\/$]]* | ?:[[\\/]]*) ;;
8017047944f3Smrg  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
8018047944f3Smrgesac
8019047944f3Smrg])
80207706df26Smrg
80217706df26Smrg# Helper functions for option handling.                     -*- Autoconf -*-
80227706df26Smrg
80237706df26Smrg# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
80247706df26Smrg#
80257706df26Smrg# This file is free software; the Free Software Foundation
80267706df26Smrg# gives unlimited permission to copy and/or distribute it,
80277706df26Smrg# with or without modifications, as long as this notice is preserved.
80287706df26Smrg
80297706df26Smrg# serial 3
80307706df26Smrg
80317706df26Smrg# _AM_MANGLE_OPTION(NAME)
80327706df26Smrg# -----------------------
80337706df26SmrgAC_DEFUN([_AM_MANGLE_OPTION],
80347706df26Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
80357706df26Smrg
80367706df26Smrg# _AM_SET_OPTION(NAME)
80377706df26Smrg# ------------------------------
80387706df26Smrg# Set option NAME.  Presently that only means defining a flag for this option.
80397706df26SmrgAC_DEFUN([_AM_SET_OPTION],
80407706df26Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
80417706df26Smrg
80427706df26Smrg# _AM_SET_OPTIONS(OPTIONS)
80437706df26Smrg# ----------------------------------
80447706df26Smrg# OPTIONS is a space-separated list of Automake options.
80457706df26SmrgAC_DEFUN([_AM_SET_OPTIONS],
80467706df26Smrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
80477706df26Smrg
80487706df26Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
80497706df26Smrg# -------------------------------------------
80507706df26Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
80517706df26SmrgAC_DEFUN([_AM_IF_OPTION],
80527706df26Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
80537706df26Smrg
80547706df26Smrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
80557706df26Smrg
80567706df26Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
80577706df26Smrg# Free Software Foundation, Inc.
80587706df26Smrg#
80597706df26Smrg# This file is free software; the Free Software Foundation
80607706df26Smrg# gives unlimited permission to copy and/or distribute it,
80617706df26Smrg# with or without modifications, as long as this notice is preserved.
80627706df26Smrg
80637706df26Smrg# serial 4
80647706df26Smrg
80657706df26Smrg# AM_SANITY_CHECK
80667706df26Smrg# ---------------
80677706df26SmrgAC_DEFUN([AM_SANITY_CHECK],
80687706df26Smrg[AC_MSG_CHECKING([whether build environment is sane])
80697706df26Smrg# Just in case
80707706df26Smrgsleep 1
80717706df26Smrgecho timestamp > conftest.file
80727706df26Smrg# Do `set' in a subshell so we don't clobber the current shell's
80737706df26Smrg# arguments.  Must try -L first in case configure is actually a
80747706df26Smrg# symlink; some systems play weird games with the mod time of symlinks
80757706df26Smrg# (eg FreeBSD returns the mod time of the symlink's containing
80767706df26Smrg# directory).
80777706df26Smrgif (
80787706df26Smrg   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
80797706df26Smrg   if test "$[*]" = "X"; then
80807706df26Smrg      # -L didn't work.
80817706df26Smrg      set X `ls -t $srcdir/configure conftest.file`
80827706df26Smrg   fi
80837706df26Smrg   rm -f conftest.file
80847706df26Smrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
80857706df26Smrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
80867706df26Smrg
80877706df26Smrg      # If neither matched, then we have a broken ls.  This can happen
80887706df26Smrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
80897706df26Smrg      # broken ls alias from the environment.  This has actually
80907706df26Smrg      # happened.  Such a system could not be considered "sane".
80917706df26Smrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
80927706df26Smrgalias in your environment])
80937706df26Smrg   fi
80947706df26Smrg
80957706df26Smrg   test "$[2]" = conftest.file
80967706df26Smrg   )
80977706df26Smrgthen
80987706df26Smrg   # Ok.
80997706df26Smrg   :
81007706df26Smrgelse
81017706df26Smrg   AC_MSG_ERROR([newly created file is older than distributed files!
81027706df26SmrgCheck your system clock])
81037706df26Smrgfi
81047706df26SmrgAC_MSG_RESULT(yes)])
81057706df26Smrg
81067706df26Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
81077706df26Smrg#
81087706df26Smrg# This file is free software; the Free Software Foundation
81097706df26Smrg# gives unlimited permission to copy and/or distribute it,
81107706df26Smrg# with or without modifications, as long as this notice is preserved.
81117706df26Smrg
81127706df26Smrg# AM_PROG_INSTALL_STRIP
81137706df26Smrg# ---------------------
81147706df26Smrg# One issue with vendor `install' (even GNU) is that you can't
81157706df26Smrg# specify the program used to strip binaries.  This is especially
81167706df26Smrg# annoying in cross-compiling environments, where the build's strip
81177706df26Smrg# is unlikely to handle the host's binaries.
81187706df26Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we
81197706df26Smrg# always use install-sh in `make install-strip', and initialize
81207706df26Smrg# STRIPPROG with the value of the STRIP variable (set by the user).
81217706df26SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
81227706df26Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
81237706df26Smrg# Installed binaries are usually stripped using `strip' when the user
81247706df26Smrg# run `make install-strip'.  However `strip' might not be the right
81257706df26Smrg# tool to use in cross-compilation environments, therefore Automake
81267706df26Smrg# will honor the `STRIP' environment variable to overrule this program.
81277706df26Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
81287706df26Smrgif test "$cross_compiling" != no; then
81297706df26Smrg  AC_CHECK_TOOL([STRIP], [strip], :)
81307706df26Smrgfi
8131047944f3SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
81327706df26SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
81337706df26Smrg
8134047944f3Smrg# Copyright (C) 2006  Free Software Foundation, Inc.
8135047944f3Smrg#
8136047944f3Smrg# This file is free software; the Free Software Foundation
8137047944f3Smrg# gives unlimited permission to copy and/or distribute it,
8138047944f3Smrg# with or without modifications, as long as this notice is preserved.
8139047944f3Smrg
8140047944f3Smrg# _AM_SUBST_NOTMAKE(VARIABLE)
8141047944f3Smrg# ---------------------------
8142047944f3Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
8143047944f3Smrg# This macro is traced by Automake.
8144047944f3SmrgAC_DEFUN([_AM_SUBST_NOTMAKE])
8145047944f3Smrg
81467706df26Smrg# Check how to create a tarball.                            -*- Autoconf -*-
81477706df26Smrg
81487706df26Smrg# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
81497706df26Smrg#
81507706df26Smrg# This file is free software; the Free Software Foundation
81517706df26Smrg# gives unlimited permission to copy and/or distribute it,
81527706df26Smrg# with or without modifications, as long as this notice is preserved.
81537706df26Smrg
81547706df26Smrg# serial 2
81557706df26Smrg
81567706df26Smrg# _AM_PROG_TAR(FORMAT)
81577706df26Smrg# --------------------
81587706df26Smrg# Check how to create a tarball in format FORMAT.
81597706df26Smrg# FORMAT should be one of `v7', `ustar', or `pax'.
81607706df26Smrg#
81617706df26Smrg# Substitute a variable $(am__tar) that is a command
81627706df26Smrg# writing to stdout a FORMAT-tarball containing the directory
81637706df26Smrg# $tardir.
81647706df26Smrg#     tardir=directory && $(am__tar) > result.tar
81657706df26Smrg#
81667706df26Smrg# Substitute a variable $(am__untar) that extract such
81677706df26Smrg# a tarball read from stdin.
81687706df26Smrg#     $(am__untar) < result.tar
81697706df26SmrgAC_DEFUN([_AM_PROG_TAR],
81707706df26Smrg[# Always define AMTAR for backward compatibility.
81717706df26SmrgAM_MISSING_PROG([AMTAR], [tar])
81727706df26Smrgm4_if([$1], [v7],
81737706df26Smrg     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
81747706df26Smrg     [m4_case([$1], [ustar],, [pax],,
81757706df26Smrg              [m4_fatal([Unknown tar format])])
81767706df26SmrgAC_MSG_CHECKING([how to create a $1 tar archive])
81777706df26Smrg# Loop over all known methods to create a tar archive until one works.
81787706df26Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
81797706df26Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools}
81807706df26Smrg# Do not fold the above two line into one, because Tru64 sh and
81817706df26Smrg# Solaris sh will not grok spaces in the rhs of `-'.
81827706df26Smrgfor _am_tool in $_am_tools
81837706df26Smrgdo
81847706df26Smrg  case $_am_tool in
81857706df26Smrg  gnutar)
81867706df26Smrg    for _am_tar in tar gnutar gtar;
81877706df26Smrg    do
81887706df26Smrg      AM_RUN_LOG([$_am_tar --version]) && break
81897706df26Smrg    done
81907706df26Smrg    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
81917706df26Smrg    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
81927706df26Smrg    am__untar="$_am_tar -xf -"
81937706df26Smrg    ;;
81947706df26Smrg  plaintar)
81957706df26Smrg    # Must skip GNU tar: if it does not support --format= it doesn't create
81967706df26Smrg    # ustar tarball either.
81977706df26Smrg    (tar --version) >/dev/null 2>&1 && continue
81987706df26Smrg    am__tar='tar chf - "$$tardir"'
81997706df26Smrg    am__tar_='tar chf - "$tardir"'
82007706df26Smrg    am__untar='tar xf -'
82017706df26Smrg    ;;
82027706df26Smrg  pax)
82037706df26Smrg    am__tar='pax -L -x $1 -w "$$tardir"'
82047706df26Smrg    am__tar_='pax -L -x $1 -w "$tardir"'
82057706df26Smrg    am__untar='pax -r'
82067706df26Smrg    ;;
82077706df26Smrg  cpio)
82087706df26Smrg    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
82097706df26Smrg    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
82107706df26Smrg    am__untar='cpio -i -H $1 -d'
82117706df26Smrg    ;;
82127706df26Smrg  none)
82137706df26Smrg    am__tar=false
82147706df26Smrg    am__tar_=false
82157706df26Smrg    am__untar=false
82167706df26Smrg    ;;
82177706df26Smrg  esac
82187706df26Smrg
82197706df26Smrg  # If the value was cached, stop now.  We just wanted to have am__tar
82207706df26Smrg  # and am__untar set.
82217706df26Smrg  test -n "${am_cv_prog_tar_$1}" && break
82227706df26Smrg
82237706df26Smrg  # tar/untar a dummy directory, and stop if the command works
82247706df26Smrg  rm -rf conftest.dir
82257706df26Smrg  mkdir conftest.dir
82267706df26Smrg  echo GrepMe > conftest.dir/file
82277706df26Smrg  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
82287706df26Smrg  rm -rf conftest.dir
82297706df26Smrg  if test -s conftest.tar; then
82307706df26Smrg    AM_RUN_LOG([$am__untar <conftest.tar])
82317706df26Smrg    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
82327706df26Smrg  fi
82337706df26Smrgdone
82347706df26Smrgrm -rf conftest.dir
82357706df26Smrg
82367706df26SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
82377706df26SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])])
82387706df26SmrgAC_SUBST([am__tar])
82397706df26SmrgAC_SUBST([am__untar])
82407706df26Smrg]) # _AM_PROG_TAR
82417706df26Smrg
8242