aclocal.m4 revision 6f03b1f6
16f03b1f6Smrg# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
26f03b1f6Smrg
36f03b1f6Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
46f03b1f6Smrg# 2005  Free Software Foundation, Inc.
56f03b1f6Smrg# This file is free software; the Free Software Foundation
66f03b1f6Smrg# gives unlimited permission to copy and/or distribute it,
76f03b1f6Smrg# with or without modifications, as long as this notice is preserved.
86f03b1f6Smrg
96f03b1f6Smrg# This program is distributed in the hope that it will be useful,
106f03b1f6Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
116f03b1f6Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
126f03b1f6Smrg# PARTICULAR PURPOSE.
136f03b1f6Smrg
146f03b1f6Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
156f03b1f6Smrg
166f03b1f6Smrg# serial 48 Debian 1.5.22-4 AC_PROG_LIBTOOL
176f03b1f6Smrg
186f03b1f6Smrg
196f03b1f6Smrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
206f03b1f6Smrg# -----------------------------------------------------------
216f03b1f6Smrg# If this macro is not defined by Autoconf, define it here.
226f03b1f6Smrgm4_ifdef([AC_PROVIDE_IFELSE],
236f03b1f6Smrg         [],
246f03b1f6Smrg         [m4_define([AC_PROVIDE_IFELSE],
256f03b1f6Smrg	         [m4_ifdef([AC_PROVIDE_$1],
266f03b1f6Smrg		           [$2], [$3])])])
276f03b1f6Smrg
286f03b1f6Smrg
296f03b1f6Smrg# AC_PROG_LIBTOOL
306f03b1f6Smrg# ---------------
316f03b1f6SmrgAC_DEFUN([AC_PROG_LIBTOOL],
326f03b1f6Smrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
336f03b1f6Smrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
346f03b1f6Smrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
356f03b1f6Smrg  AC_PROVIDE_IFELSE([AC_PROG_CXX],
366f03b1f6Smrg    [AC_LIBTOOL_CXX],
376f03b1f6Smrg    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
386f03b1f6Smrg  ])])
396f03b1f6Smrgdnl And a similar setup for Fortran 77 support
406f03b1f6Smrg  AC_PROVIDE_IFELSE([AC_PROG_F77],
416f03b1f6Smrg    [AC_LIBTOOL_F77],
426f03b1f6Smrg    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
436f03b1f6Smrg])])
446f03b1f6Smrg
456f03b1f6Smrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
466f03b1f6Smrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
476f03b1f6Smrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
486f03b1f6Smrg  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
496f03b1f6Smrg    [AC_LIBTOOL_GCJ],
506f03b1f6Smrg    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
516f03b1f6Smrg      [AC_LIBTOOL_GCJ],
526f03b1f6Smrg      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
536f03b1f6Smrg	[AC_LIBTOOL_GCJ],
546f03b1f6Smrg      [ifdef([AC_PROG_GCJ],
556f03b1f6Smrg	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
566f03b1f6Smrg       ifdef([A][M_PROG_GCJ],
576f03b1f6Smrg	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
586f03b1f6Smrg       ifdef([LT_AC_PROG_GCJ],
596f03b1f6Smrg	     [define([LT_AC_PROG_GCJ],
606f03b1f6Smrg		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
616f03b1f6Smrg])])# AC_PROG_LIBTOOL
626f03b1f6Smrg
636f03b1f6Smrg
646f03b1f6Smrg# _AC_PROG_LIBTOOL
656f03b1f6Smrg# ----------------
666f03b1f6SmrgAC_DEFUN([_AC_PROG_LIBTOOL],
676f03b1f6Smrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
686f03b1f6SmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
696f03b1f6SmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
706f03b1f6SmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
716f03b1f6Smrg
726f03b1f6Smrg# This can be used to rebuild libtool when needed
736f03b1f6SmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
746f03b1f6Smrg
756f03b1f6Smrg# Always use our own libtool.
766f03b1f6SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
776f03b1f6SmrgAC_SUBST(LIBTOOL)dnl
786f03b1f6Smrg
796f03b1f6Smrg# Prevent multiple expansion
806f03b1f6Smrgdefine([AC_PROG_LIBTOOL], [])
816f03b1f6Smrg])# _AC_PROG_LIBTOOL
826f03b1f6Smrg
836f03b1f6Smrg
846f03b1f6Smrg# AC_LIBTOOL_SETUP
856f03b1f6Smrg# ----------------
866f03b1f6SmrgAC_DEFUN([AC_LIBTOOL_SETUP],
876f03b1f6Smrg[AC_PREREQ(2.50)dnl
886f03b1f6SmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl
896f03b1f6SmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl
906f03b1f6SmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
916f03b1f6SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
926f03b1f6SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
936f03b1f6SmrgAC_REQUIRE([AC_PROG_CC])dnl
946f03b1f6SmrgAC_REQUIRE([AC_PROG_LD])dnl
956f03b1f6SmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
966f03b1f6SmrgAC_REQUIRE([AC_PROG_NM])dnl
976f03b1f6Smrg
986f03b1f6SmrgAC_REQUIRE([AC_PROG_LN_S])dnl
996f03b1f6SmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
1006f03b1f6Smrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
1016f03b1f6SmrgAC_REQUIRE([AC_OBJEXT])dnl
1026f03b1f6SmrgAC_REQUIRE([AC_EXEEXT])dnl
1036f03b1f6Smrgdnl
1046f03b1f6Smrg
1056f03b1f6SmrgAC_LIBTOOL_SYS_MAX_CMD_LEN
1066f03b1f6SmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1076f03b1f6SmrgAC_LIBTOOL_OBJDIR
1086f03b1f6Smrg
1096f03b1f6SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1106f03b1f6Smrg_LT_AC_PROG_ECHO_BACKSLASH
1116f03b1f6Smrg
1126f03b1f6Smrgcase $host_os in
1136f03b1f6Smrgaix3*)
1146f03b1f6Smrg  # AIX sometimes has problems with the GCC collect2 program.  For some
1156f03b1f6Smrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
1166f03b1f6Smrg  # vanish in a puff of smoke.
1176f03b1f6Smrg  if test "X${COLLECT_NAMES+set}" != Xset; then
1186f03b1f6Smrg    COLLECT_NAMES=
1196f03b1f6Smrg    export COLLECT_NAMES
1206f03b1f6Smrg  fi
1216f03b1f6Smrg  ;;
1226f03b1f6Smrgesac
1236f03b1f6Smrg
1246f03b1f6Smrg# Sed substitution that helps us do robust quoting.  It backslashifies
1256f03b1f6Smrg# metacharacters that are still active within double-quoted strings.
1266f03b1f6SmrgXsed='sed -e 1s/^X//'
1276f03b1f6Smrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
1286f03b1f6Smrg
1296f03b1f6Smrg# Same as above, but do not quote variable references.
1306f03b1f6Smrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
1316f03b1f6Smrg
1326f03b1f6Smrg# Sed substitution to delay expansion of an escaped shell variable in a
1336f03b1f6Smrg# double_quote_subst'ed string.
1346f03b1f6Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1356f03b1f6Smrg
1366f03b1f6Smrg# Sed substitution to avoid accidental globbing in evaled expressions
1376f03b1f6Smrgno_glob_subst='s/\*/\\\*/g'
1386f03b1f6Smrg
1396f03b1f6Smrg# Constants:
1406f03b1f6Smrgrm="rm -f"
1416f03b1f6Smrg
1426f03b1f6Smrg# Global variables:
1436f03b1f6Smrgdefault_ofile=libtool
1446f03b1f6Smrgcan_build_shared=yes
1456f03b1f6Smrg
1466f03b1f6Smrg# All known linkers require a `.a' archive for static linking (except MSVC,
1476f03b1f6Smrg# which needs '.lib').
1486f03b1f6Smrglibext=a
1496f03b1f6Smrgltmain="$ac_aux_dir/ltmain.sh"
1506f03b1f6Smrgofile="$default_ofile"
1516f03b1f6Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld"
1526f03b1f6Smrg
1536f03b1f6SmrgAC_CHECK_TOOL(AR, ar, false)
1546f03b1f6SmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
1556f03b1f6SmrgAC_CHECK_TOOL(STRIP, strip, :)
1566f03b1f6Smrg
1576f03b1f6Smrgold_CC="$CC"
1586f03b1f6Smrgold_CFLAGS="$CFLAGS"
1596f03b1f6Smrg
1606f03b1f6Smrg# Set sane defaults for various variables
1616f03b1f6Smrgtest -z "$AR" && AR=ar
1626f03b1f6Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru
1636f03b1f6Smrgtest -z "$AS" && AS=as
1646f03b1f6Smrgtest -z "$CC" && CC=cc
1656f03b1f6Smrgtest -z "$LTCC" && LTCC=$CC
1666f03b1f6Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1676f03b1f6Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
1686f03b1f6Smrgtest -z "$LD" && LD=ld
1696f03b1f6Smrgtest -z "$LN_S" && LN_S="ln -s"
1706f03b1f6Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
1716f03b1f6Smrgtest -z "$NM" && NM=nm
1726f03b1f6Smrgtest -z "$SED" && SED=sed
1736f03b1f6Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump
1746f03b1f6Smrgtest -z "$RANLIB" && RANLIB=:
1756f03b1f6Smrgtest -z "$STRIP" && STRIP=:
1766f03b1f6Smrgtest -z "$ac_objext" && ac_objext=o
1776f03b1f6Smrg
1786f03b1f6Smrg# Determine commands to create old-style static archives.
1796f03b1f6Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1806f03b1f6Smrgold_postinstall_cmds='chmod 644 $oldlib'
1816f03b1f6Smrgold_postuninstall_cmds=
1826f03b1f6Smrg
1836f03b1f6Smrgif test -n "$RANLIB"; then
1846f03b1f6Smrg  case $host_os in
1856f03b1f6Smrg  openbsd*)
1866f03b1f6Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1876f03b1f6Smrg    ;;
1886f03b1f6Smrg  *)
1896f03b1f6Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1906f03b1f6Smrg    ;;
1916f03b1f6Smrg  esac
1926f03b1f6Smrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1936f03b1f6Smrgfi
1946f03b1f6Smrg
1956f03b1f6Smrg_LT_CC_BASENAME([$compiler])
1966f03b1f6Smrg
1976f03b1f6Smrg# Only perform the check for file, if the check method requires it
1986f03b1f6Smrgcase $deplibs_check_method in
1996f03b1f6Smrgfile_magic*)
2006f03b1f6Smrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
2016f03b1f6Smrg    AC_PATH_MAGIC
2026f03b1f6Smrg  fi
2036f03b1f6Smrg  ;;
2046f03b1f6Smrgesac
2056f03b1f6Smrg
2066f03b1f6SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
2076f03b1f6SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
2086f03b1f6Smrgenable_win32_dll=yes, enable_win32_dll=no)
2096f03b1f6Smrg
2106f03b1f6SmrgAC_ARG_ENABLE([libtool-lock],
2116f03b1f6Smrg    [AC_HELP_STRING([--disable-libtool-lock],
2126f03b1f6Smrg	[avoid locking (might break parallel builds)])])
2136f03b1f6Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2146f03b1f6Smrg
2156f03b1f6SmrgAC_ARG_WITH([pic],
2166f03b1f6Smrg    [AC_HELP_STRING([--with-pic],
2176f03b1f6Smrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
2186f03b1f6Smrg    [pic_mode="$withval"],
2196f03b1f6Smrg    [pic_mode=default])
2206f03b1f6Smrgtest -z "$pic_mode" && pic_mode=default
2216f03b1f6Smrg
2226f03b1f6Smrg# Use C for the default configuration in the libtool script
2236f03b1f6Smrgtagname=
2246f03b1f6SmrgAC_LIBTOOL_LANG_C_CONFIG
2256f03b1f6Smrg_LT_AC_TAGCONFIG
2266f03b1f6Smrg])# AC_LIBTOOL_SETUP
2276f03b1f6Smrg
2286f03b1f6Smrg
2296f03b1f6Smrg# _LT_AC_SYS_COMPILER
2306f03b1f6Smrg# -------------------
2316f03b1f6SmrgAC_DEFUN([_LT_AC_SYS_COMPILER],
2326f03b1f6Smrg[AC_REQUIRE([AC_PROG_CC])dnl
2336f03b1f6Smrg
2346f03b1f6Smrg# If no C compiler was specified, use CC.
2356f03b1f6SmrgLTCC=${LTCC-"$CC"}
2366f03b1f6Smrg
2376f03b1f6Smrg# If no C compiler flags were specified, use CFLAGS.
2386f03b1f6SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
2396f03b1f6Smrg
2406f03b1f6Smrg# Allow CC to be a program name with arguments.
2416f03b1f6Smrgcompiler=$CC
2426f03b1f6Smrg])# _LT_AC_SYS_COMPILER
2436f03b1f6Smrg
2446f03b1f6Smrg
2456f03b1f6Smrg# _LT_CC_BASENAME(CC)
2466f03b1f6Smrg# -------------------
2476f03b1f6Smrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
2486f03b1f6SmrgAC_DEFUN([_LT_CC_BASENAME],
2496f03b1f6Smrg[for cc_temp in $1""; do
2506f03b1f6Smrg  case $cc_temp in
2516f03b1f6Smrg    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
2526f03b1f6Smrg    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
2536f03b1f6Smrg    \-*) ;;
2546f03b1f6Smrg    *) break;;
2556f03b1f6Smrg  esac
2566f03b1f6Smrgdone
2576f03b1f6Smrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
2586f03b1f6Smrg])
2596f03b1f6Smrg
2606f03b1f6Smrg
2616f03b1f6Smrg# _LT_COMPILER_BOILERPLATE
2626f03b1f6Smrg# ------------------------
2636f03b1f6Smrg# Check for compiler boilerplate output or warnings with
2646f03b1f6Smrg# the simple compiler test code.
2656f03b1f6SmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE],
2666f03b1f6Smrg[ac_outfile=conftest.$ac_objext
2676f03b1f6Smrgprintf "$lt_simple_compile_test_code" >conftest.$ac_ext
2686f03b1f6Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2696f03b1f6Smrg_lt_compiler_boilerplate=`cat conftest.err`
2706f03b1f6Smrg$rm conftest*
2716f03b1f6Smrg])# _LT_COMPILER_BOILERPLATE
2726f03b1f6Smrg
2736f03b1f6Smrg
2746f03b1f6Smrg# _LT_LINKER_BOILERPLATE
2756f03b1f6Smrg# ----------------------
2766f03b1f6Smrg# Check for linker boilerplate output or warnings with
2776f03b1f6Smrg# the simple link test code.
2786f03b1f6SmrgAC_DEFUN([_LT_LINKER_BOILERPLATE],
2796f03b1f6Smrg[ac_outfile=conftest.$ac_objext
2806f03b1f6Smrgprintf "$lt_simple_link_test_code" >conftest.$ac_ext
2816f03b1f6Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2826f03b1f6Smrg_lt_linker_boilerplate=`cat conftest.err`
2836f03b1f6Smrg$rm conftest*
2846f03b1f6Smrg])# _LT_LINKER_BOILERPLATE
2856f03b1f6Smrg
2866f03b1f6Smrg
2876f03b1f6Smrg# _LT_AC_SYS_LIBPATH_AIX
2886f03b1f6Smrg# ----------------------
2896f03b1f6Smrg# Links a minimal program and checks the executable
2906f03b1f6Smrg# for the system default hardcoded library path. In most cases,
2916f03b1f6Smrg# this is /usr/lib:/lib, but when the MPI compilers are used
2926f03b1f6Smrg# the location of the communication and MPI libs are included too.
2936f03b1f6Smrg# If we don't find anything, use the default library path according
2946f03b1f6Smrg# to the aix ld manual.
2956f03b1f6SmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
2966f03b1f6Smrg[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
2976f03b1f6Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
2986f03b1f6Smrg}'`
2996f03b1f6Smrg# Check for a 64-bit object if we didn't find anything.
3006f03b1f6Smrgif test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
3016f03b1f6Smrg}'`; fi],[])
3026f03b1f6Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
3036f03b1f6Smrg])# _LT_AC_SYS_LIBPATH_AIX
3046f03b1f6Smrg
3056f03b1f6Smrg
3066f03b1f6Smrg# _LT_AC_SHELL_INIT(ARG)
3076f03b1f6Smrg# ----------------------
3086f03b1f6SmrgAC_DEFUN([_LT_AC_SHELL_INIT],
3096f03b1f6Smrg[ifdef([AC_DIVERSION_NOTICE],
3106f03b1f6Smrg	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
3116f03b1f6Smrg	 [AC_DIVERT_PUSH(NOTICE)])
3126f03b1f6Smrg$1
3136f03b1f6SmrgAC_DIVERT_POP
3146f03b1f6Smrg])# _LT_AC_SHELL_INIT
3156f03b1f6Smrg
3166f03b1f6Smrg
3176f03b1f6Smrg# _LT_AC_PROG_ECHO_BACKSLASH
3186f03b1f6Smrg# --------------------------
3196f03b1f6Smrg# Add some code to the start of the generated configure script which
3206f03b1f6Smrg# will find an echo command which doesn't interpret backslashes.
3216f03b1f6SmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
3226f03b1f6Smrg[_LT_AC_SHELL_INIT([
3236f03b1f6Smrg# Check that we are running under the correct shell.
3246f03b1f6SmrgSHELL=${CONFIG_SHELL-/bin/sh}
3256f03b1f6Smrg
3266f03b1f6Smrgcase X$ECHO in
3276f03b1f6SmrgX*--fallback-echo)
3286f03b1f6Smrg  # Remove one level of quotation (which was required for Make).
3296f03b1f6Smrg  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
3306f03b1f6Smrg  ;;
3316f03b1f6Smrgesac
3326f03b1f6Smrg
3336f03b1f6Smrgecho=${ECHO-echo}
3346f03b1f6Smrgif test "X[$]1" = X--no-reexec; then
3356f03b1f6Smrg  # Discard the --no-reexec flag, and continue.
3366f03b1f6Smrg  shift
3376f03b1f6Smrgelif test "X[$]1" = X--fallback-echo; then
3386f03b1f6Smrg  # Avoid inline document here, it may be left over
3396f03b1f6Smrg  :
3406f03b1f6Smrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
3416f03b1f6Smrg  # Yippee, $echo works!
3426f03b1f6Smrg  :
3436f03b1f6Smrgelse
3446f03b1f6Smrg  # Restart under the correct shell.
3456f03b1f6Smrg  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
3466f03b1f6Smrgfi
3476f03b1f6Smrg
3486f03b1f6Smrgif test "X[$]1" = X--fallback-echo; then
3496f03b1f6Smrg  # used as fallback echo
3506f03b1f6Smrg  shift
3516f03b1f6Smrg  cat <<EOF
3526f03b1f6Smrg[$]*
3536f03b1f6SmrgEOF
3546f03b1f6Smrg  exit 0
3556f03b1f6Smrgfi
3566f03b1f6Smrg
3576f03b1f6Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
3586f03b1f6Smrg# if CDPATH is set.
3596f03b1f6Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
3606f03b1f6Smrg
3616f03b1f6Smrgif test -z "$ECHO"; then
3626f03b1f6Smrgif test "X${echo_test_string+set}" != Xset; then
3636f03b1f6Smrg# find a string as large as possible, as long as the shell can cope with it
3646f03b1f6Smrg  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
3656f03b1f6Smrg    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
3666f03b1f6Smrg    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
3676f03b1f6Smrg       echo_test_string=`eval $cmd` &&
3686f03b1f6Smrg       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
3696f03b1f6Smrg    then
3706f03b1f6Smrg      break
3716f03b1f6Smrg    fi
3726f03b1f6Smrg  done
3736f03b1f6Smrgfi
3746f03b1f6Smrg
3756f03b1f6Smrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
3766f03b1f6Smrg   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
3776f03b1f6Smrg   test "X$echo_testing_string" = "X$echo_test_string"; then
3786f03b1f6Smrg  :
3796f03b1f6Smrgelse
3806f03b1f6Smrg  # The Solaris, AIX, and Digital Unix default echo programs unquote
3816f03b1f6Smrg  # backslashes.  This makes it impossible to quote backslashes using
3826f03b1f6Smrg  #   echo "$something" | sed 's/\\/\\\\/g'
3836f03b1f6Smrg  #
3846f03b1f6Smrg  # So, first we look for a working echo in the user's PATH.
3856f03b1f6Smrg
3866f03b1f6Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3876f03b1f6Smrg  for dir in $PATH /usr/ucb; do
3886f03b1f6Smrg    IFS="$lt_save_ifs"
3896f03b1f6Smrg    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
3906f03b1f6Smrg       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
3916f03b1f6Smrg       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
3926f03b1f6Smrg       test "X$echo_testing_string" = "X$echo_test_string"; then
3936f03b1f6Smrg      echo="$dir/echo"
3946f03b1f6Smrg      break
3956f03b1f6Smrg    fi
3966f03b1f6Smrg  done
3976f03b1f6Smrg  IFS="$lt_save_ifs"
3986f03b1f6Smrg
3996f03b1f6Smrg  if test "X$echo" = Xecho; then
4006f03b1f6Smrg    # We didn't find a better echo, so look for alternatives.
4016f03b1f6Smrg    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
4026f03b1f6Smrg       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
4036f03b1f6Smrg       test "X$echo_testing_string" = "X$echo_test_string"; then
4046f03b1f6Smrg      # This shell has a builtin print -r that does the trick.
4056f03b1f6Smrg      echo='print -r'
4066f03b1f6Smrg    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
4076f03b1f6Smrg	 test "X$CONFIG_SHELL" != X/bin/ksh; then
4086f03b1f6Smrg      # If we have ksh, try running configure again with it.
4096f03b1f6Smrg      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
4106f03b1f6Smrg      export ORIGINAL_CONFIG_SHELL
4116f03b1f6Smrg      CONFIG_SHELL=/bin/ksh
4126f03b1f6Smrg      export CONFIG_SHELL
4136f03b1f6Smrg      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
4146f03b1f6Smrg    else
4156f03b1f6Smrg      # Try using printf.
4166f03b1f6Smrg      echo='printf %s\n'
4176f03b1f6Smrg      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
4186f03b1f6Smrg	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
4196f03b1f6Smrg	 test "X$echo_testing_string" = "X$echo_test_string"; then
4206f03b1f6Smrg	# Cool, printf works
4216f03b1f6Smrg	:
4226f03b1f6Smrg      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
4236f03b1f6Smrg	   test "X$echo_testing_string" = 'X\t' &&
4246f03b1f6Smrg	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
4256f03b1f6Smrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
4266f03b1f6Smrg	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
4276f03b1f6Smrg	export CONFIG_SHELL
4286f03b1f6Smrg	SHELL="$CONFIG_SHELL"
4296f03b1f6Smrg	export SHELL
4306f03b1f6Smrg	echo="$CONFIG_SHELL [$]0 --fallback-echo"
4316f03b1f6Smrg      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
4326f03b1f6Smrg	   test "X$echo_testing_string" = 'X\t' &&
4336f03b1f6Smrg	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
4346f03b1f6Smrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
4356f03b1f6Smrg	echo="$CONFIG_SHELL [$]0 --fallback-echo"
4366f03b1f6Smrg      else
4376f03b1f6Smrg	# maybe with a smaller string...
4386f03b1f6Smrg	prev=:
4396f03b1f6Smrg
4406f03b1f6Smrg	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
4416f03b1f6Smrg	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
4426f03b1f6Smrg	  then
4436f03b1f6Smrg	    break
4446f03b1f6Smrg	  fi
4456f03b1f6Smrg	  prev="$cmd"
4466f03b1f6Smrg	done
4476f03b1f6Smrg
4486f03b1f6Smrg	if test "$prev" != 'sed 50q "[$]0"'; then
4496f03b1f6Smrg	  echo_test_string=`eval $prev`
4506f03b1f6Smrg	  export echo_test_string
4516f03b1f6Smrg	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
4526f03b1f6Smrg	else
4536f03b1f6Smrg	  # Oops.  We lost completely, so just stick with echo.
4546f03b1f6Smrg	  echo=echo
4556f03b1f6Smrg	fi
4566f03b1f6Smrg      fi
4576f03b1f6Smrg    fi
4586f03b1f6Smrg  fi
4596f03b1f6Smrgfi
4606f03b1f6Smrgfi
4616f03b1f6Smrg
4626f03b1f6Smrg# Copy echo and quote the copy suitably for passing to libtool from
4636f03b1f6Smrg# the Makefile, instead of quoting the original, which is used later.
4646f03b1f6SmrgECHO=$echo
4656f03b1f6Smrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
4666f03b1f6Smrg   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
4676f03b1f6Smrgfi
4686f03b1f6Smrg
4696f03b1f6SmrgAC_SUBST(ECHO)
4706f03b1f6Smrg])])# _LT_AC_PROG_ECHO_BACKSLASH
4716f03b1f6Smrg
4726f03b1f6Smrg
4736f03b1f6Smrg# _LT_AC_LOCK
4746f03b1f6Smrg# -----------
4756f03b1f6SmrgAC_DEFUN([_LT_AC_LOCK],
4766f03b1f6Smrg[AC_ARG_ENABLE([libtool-lock],
4776f03b1f6Smrg    [AC_HELP_STRING([--disable-libtool-lock],
4786f03b1f6Smrg	[avoid locking (might break parallel builds)])])
4796f03b1f6Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4806f03b1f6Smrg
4816f03b1f6Smrg# Some flags need to be propagated to the compiler or linker for good
4826f03b1f6Smrg# libtool support.
4836f03b1f6Smrgcase $host in
4846f03b1f6Smrgia64-*-hpux*)
4856f03b1f6Smrg  # Find out which ABI we are using.
4866f03b1f6Smrg  echo 'int i;' > conftest.$ac_ext
4876f03b1f6Smrg  if AC_TRY_EVAL(ac_compile); then
4886f03b1f6Smrg    case `/usr/bin/file conftest.$ac_objext` in
4896f03b1f6Smrg    *ELF-32*)
4906f03b1f6Smrg      HPUX_IA64_MODE="32"
4916f03b1f6Smrg      ;;
4926f03b1f6Smrg    *ELF-64*)
4936f03b1f6Smrg      HPUX_IA64_MODE="64"
4946f03b1f6Smrg      ;;
4956f03b1f6Smrg    esac
4966f03b1f6Smrg  fi
4976f03b1f6Smrg  rm -rf conftest*
4986f03b1f6Smrg  ;;
4996f03b1f6Smrg*-*-irix6*)
5006f03b1f6Smrg  # Find out which ABI we are using.
5016f03b1f6Smrg  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
5026f03b1f6Smrg  if AC_TRY_EVAL(ac_compile); then
5036f03b1f6Smrg   if test "$lt_cv_prog_gnu_ld" = yes; then
5046f03b1f6Smrg    case `/usr/bin/file conftest.$ac_objext` in
5056f03b1f6Smrg    *32-bit*)
5066f03b1f6Smrg      LD="${LD-ld} -melf32bsmip"
5076f03b1f6Smrg      ;;
5086f03b1f6Smrg    *N32*)
5096f03b1f6Smrg      LD="${LD-ld} -melf32bmipn32"
5106f03b1f6Smrg      ;;
5116f03b1f6Smrg    *64-bit*)
5126f03b1f6Smrg      LD="${LD-ld} -melf64bmip"
5136f03b1f6Smrg      ;;
5146f03b1f6Smrg    esac
5156f03b1f6Smrg   else
5166f03b1f6Smrg    case `/usr/bin/file conftest.$ac_objext` in
5176f03b1f6Smrg    *32-bit*)
5186f03b1f6Smrg      LD="${LD-ld} -32"
5196f03b1f6Smrg      ;;
5206f03b1f6Smrg    *N32*)
5216f03b1f6Smrg      LD="${LD-ld} -n32"
5226f03b1f6Smrg      ;;
5236f03b1f6Smrg    *64-bit*)
5246f03b1f6Smrg      LD="${LD-ld} -64"
5256f03b1f6Smrg      ;;
5266f03b1f6Smrg    esac
5276f03b1f6Smrg   fi
5286f03b1f6Smrg  fi
5296f03b1f6Smrg  rm -rf conftest*
5306f03b1f6Smrg  ;;
5316f03b1f6Smrg
5326f03b1f6Smrgx86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
5336f03b1f6Smrg  # Find out which ABI we are using.
5346f03b1f6Smrg  echo 'int i;' > conftest.$ac_ext
5356f03b1f6Smrg  if AC_TRY_EVAL(ac_compile); then
5366f03b1f6Smrg    case `/usr/bin/file conftest.o` in
5376f03b1f6Smrg    *32-bit*)
5386f03b1f6Smrg      case $host in
5396f03b1f6Smrg        x86_64-*linux*)
5406f03b1f6Smrg          LD="${LD-ld} -m elf_i386"
5416f03b1f6Smrg          ;;
5426f03b1f6Smrg        ppc64-*linux*|powerpc64-*linux*)
5436f03b1f6Smrg          LD="${LD-ld} -m elf32ppclinux"
5446f03b1f6Smrg          ;;
5456f03b1f6Smrg        s390x-*linux*)
5466f03b1f6Smrg          LD="${LD-ld} -m elf_s390"
5476f03b1f6Smrg          ;;
5486f03b1f6Smrg        sparc64-*linux*)
5496f03b1f6Smrg          LD="${LD-ld} -m elf32_sparc"
5506f03b1f6Smrg          ;;
5516f03b1f6Smrg      esac
5526f03b1f6Smrg      ;;
5536f03b1f6Smrg    *64-bit*)
5546f03b1f6Smrg      case $host in
5556f03b1f6Smrg        x86_64-*linux*)
5566f03b1f6Smrg          LD="${LD-ld} -m elf_x86_64"
5576f03b1f6Smrg          ;;
5586f03b1f6Smrg        ppc*-*linux*|powerpc*-*linux*)
5596f03b1f6Smrg          LD="${LD-ld} -m elf64ppc"
5606f03b1f6Smrg          ;;
5616f03b1f6Smrg        s390*-*linux*)
5626f03b1f6Smrg          LD="${LD-ld} -m elf64_s390"
5636f03b1f6Smrg          ;;
5646f03b1f6Smrg        sparc*-*linux*)
5656f03b1f6Smrg          LD="${LD-ld} -m elf64_sparc"
5666f03b1f6Smrg          ;;
5676f03b1f6Smrg      esac
5686f03b1f6Smrg      ;;
5696f03b1f6Smrg    esac
5706f03b1f6Smrg  fi
5716f03b1f6Smrg  rm -rf conftest*
5726f03b1f6Smrg  ;;
5736f03b1f6Smrg
5746f03b1f6Smrg*-*-sco3.2v5*)
5756f03b1f6Smrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
5766f03b1f6Smrg  SAVE_CFLAGS="$CFLAGS"
5776f03b1f6Smrg  CFLAGS="$CFLAGS -belf"
5786f03b1f6Smrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
5796f03b1f6Smrg    [AC_LANG_PUSH(C)
5806f03b1f6Smrg     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
5816f03b1f6Smrg     AC_LANG_POP])
5826f03b1f6Smrg  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
5836f03b1f6Smrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
5846f03b1f6Smrg    CFLAGS="$SAVE_CFLAGS"
5856f03b1f6Smrg  fi
5866f03b1f6Smrg  ;;
5876f03b1f6Smrgsparc*-*solaris*)
5886f03b1f6Smrg  # Find out which ABI we are using.
5896f03b1f6Smrg  echo 'int i;' > conftest.$ac_ext
5906f03b1f6Smrg  if AC_TRY_EVAL(ac_compile); then
5916f03b1f6Smrg    case `/usr/bin/file conftest.o` in
5926f03b1f6Smrg    *64-bit*)
5936f03b1f6Smrg      case $lt_cv_prog_gnu_ld in
5946f03b1f6Smrg      yes*) LD="${LD-ld} -m elf64_sparc" ;;
5956f03b1f6Smrg      *)    LD="${LD-ld} -64" ;;
5966f03b1f6Smrg      esac
5976f03b1f6Smrg      ;;
5986f03b1f6Smrg    esac
5996f03b1f6Smrg  fi
6006f03b1f6Smrg  rm -rf conftest*
6016f03b1f6Smrg  ;;
6026f03b1f6Smrg
6036f03b1f6SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
6046f03b1f6Smrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
6056f03b1f6Smrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
6066f03b1f6Smrg  AC_CHECK_TOOL(AS, as, false)
6076f03b1f6Smrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
6086f03b1f6Smrg  ;;
6096f03b1f6Smrg  ])
6106f03b1f6Smrgesac
6116f03b1f6Smrg
6126f03b1f6Smrgneed_locks="$enable_libtool_lock"
6136f03b1f6Smrg
6146f03b1f6Smrg])# _LT_AC_LOCK
6156f03b1f6Smrg
6166f03b1f6Smrg
6176f03b1f6Smrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
6186f03b1f6Smrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
6196f03b1f6Smrg# ----------------------------------------------------------------
6206f03b1f6Smrg# Check whether the given compiler option works
6216f03b1f6SmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
6226f03b1f6Smrg[AC_REQUIRE([LT_AC_PROG_SED])
6236f03b1f6SmrgAC_CACHE_CHECK([$1], [$2],
6246f03b1f6Smrg  [$2=no
6256f03b1f6Smrg  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
6266f03b1f6Smrg   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6276f03b1f6Smrg   lt_compiler_flag="$3"
6286f03b1f6Smrg   # Insert the option either (1) after the last *FLAGS variable, or
6296f03b1f6Smrg   # (2) before a word containing "conftest.", or (3) at the end.
6306f03b1f6Smrg   # Note that $ac_compile itself does not contain backslashes and begins
6316f03b1f6Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
6326f03b1f6Smrg   # The option is referenced via a variable to avoid confusing sed.
6336f03b1f6Smrg   lt_compile=`echo "$ac_compile" | $SED \
6346f03b1f6Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
6356f03b1f6Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
6366f03b1f6Smrg   -e 's:$: $lt_compiler_flag:'`
6376f03b1f6Smrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
6386f03b1f6Smrg   (eval "$lt_compile" 2>conftest.err)
6396f03b1f6Smrg   ac_status=$?
6406f03b1f6Smrg   cat conftest.err >&AS_MESSAGE_LOG_FD
6416f03b1f6Smrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
6426f03b1f6Smrg   if (exit $ac_status) && test -s "$ac_outfile"; then
6436f03b1f6Smrg     # The compiler can only warn and ignore the option if not recognized
6446f03b1f6Smrg     # So say no if there are warnings other than the usual output.
6456f03b1f6Smrg     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
6466f03b1f6Smrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
6476f03b1f6Smrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
6486f03b1f6Smrg       $2=yes
6496f03b1f6Smrg     fi
6506f03b1f6Smrg   fi
6516f03b1f6Smrg   $rm conftest*
6526f03b1f6Smrg])
6536f03b1f6Smrg
6546f03b1f6Smrgif test x"[$]$2" = xyes; then
6556f03b1f6Smrg    ifelse([$5], , :, [$5])
6566f03b1f6Smrgelse
6576f03b1f6Smrg    ifelse([$6], , :, [$6])
6586f03b1f6Smrgfi
6596f03b1f6Smrg])# AC_LIBTOOL_COMPILER_OPTION
6606f03b1f6Smrg
6616f03b1f6Smrg
6626f03b1f6Smrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
6636f03b1f6Smrg#                          [ACTION-SUCCESS], [ACTION-FAILURE])
6646f03b1f6Smrg# ------------------------------------------------------------
6656f03b1f6Smrg# Check whether the given compiler option works
6666f03b1f6SmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
6676f03b1f6Smrg[AC_CACHE_CHECK([$1], [$2],
6686f03b1f6Smrg  [$2=no
6696f03b1f6Smrg   save_LDFLAGS="$LDFLAGS"
6706f03b1f6Smrg   LDFLAGS="$LDFLAGS $3"
6716f03b1f6Smrg   printf "$lt_simple_link_test_code" > conftest.$ac_ext
6726f03b1f6Smrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
6736f03b1f6Smrg     # The linker can only warn and ignore the option if not recognized
6746f03b1f6Smrg     # So say no if there are warnings
6756f03b1f6Smrg     if test -s conftest.err; then
6766f03b1f6Smrg       # Append any errors to the config.log.
6776f03b1f6Smrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
6786f03b1f6Smrg       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
6796f03b1f6Smrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
6806f03b1f6Smrg       if diff conftest.exp conftest.er2 >/dev/null; then
6816f03b1f6Smrg         $2=yes
6826f03b1f6Smrg       fi
6836f03b1f6Smrg     else
6846f03b1f6Smrg       $2=yes
6856f03b1f6Smrg     fi
6866f03b1f6Smrg   fi
6876f03b1f6Smrg   $rm conftest*
6886f03b1f6Smrg   LDFLAGS="$save_LDFLAGS"
6896f03b1f6Smrg])
6906f03b1f6Smrg
6916f03b1f6Smrgif test x"[$]$2" = xyes; then
6926f03b1f6Smrg    ifelse([$4], , :, [$4])
6936f03b1f6Smrgelse
6946f03b1f6Smrg    ifelse([$5], , :, [$5])
6956f03b1f6Smrgfi
6966f03b1f6Smrg])# AC_LIBTOOL_LINKER_OPTION
6976f03b1f6Smrg
6986f03b1f6Smrg
6996f03b1f6Smrg# AC_LIBTOOL_SYS_MAX_CMD_LEN
7006f03b1f6Smrg# --------------------------
7016f03b1f6SmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
7026f03b1f6Smrg[# find the maximum length of command line arguments
7036f03b1f6SmrgAC_MSG_CHECKING([the maximum length of command line arguments])
7046f03b1f6SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
7056f03b1f6Smrg  i=0
7066f03b1f6Smrg  teststring="ABCD"
7076f03b1f6Smrg
7086f03b1f6Smrg  case $build_os in
7096f03b1f6Smrg  msdosdjgpp*)
7106f03b1f6Smrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
7116f03b1f6Smrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
7126f03b1f6Smrg    # during glob expansion).  Even if it were fixed, the result of this
7136f03b1f6Smrg    # check would be larger than it should be.
7146f03b1f6Smrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
7156f03b1f6Smrg    ;;
7166f03b1f6Smrg
7176f03b1f6Smrg  gnu*)
7186f03b1f6Smrg    # Under GNU Hurd, this test is not required because there is
7196f03b1f6Smrg    # no limit to the length of command line arguments.
7206f03b1f6Smrg    # Libtool will interpret -1 as no limit whatsoever
7216f03b1f6Smrg    lt_cv_sys_max_cmd_len=-1;
7226f03b1f6Smrg    ;;
7236f03b1f6Smrg
7246f03b1f6Smrg  cygwin* | mingw*)
7256f03b1f6Smrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
7266f03b1f6Smrg    # about 5 minutes as the teststring grows exponentially.
7276f03b1f6Smrg    # Worse, since 9x/ME are not pre-emptively multitasking,
7286f03b1f6Smrg    # you end up with a "frozen" computer, even though with patience
7296f03b1f6Smrg    # the test eventually succeeds (with a max line length of 256k).
7306f03b1f6Smrg    # Instead, let's just punt: use the minimum linelength reported by
7316f03b1f6Smrg    # all of the supported platforms: 8192 (on NT/2K/XP).
7326f03b1f6Smrg    lt_cv_sys_max_cmd_len=8192;
7336f03b1f6Smrg    ;;
7346f03b1f6Smrg
7356f03b1f6Smrg  amigaos*)
7366f03b1f6Smrg    # On AmigaOS with pdksh, this test takes hours, literally.
7376f03b1f6Smrg    # So we just punt and use a minimum line length of 8192.
7386f03b1f6Smrg    lt_cv_sys_max_cmd_len=8192;
7396f03b1f6Smrg    ;;
7406f03b1f6Smrg
7416f03b1f6Smrg  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
7426f03b1f6Smrg    # This has been around since 386BSD, at least.  Likely further.
7436f03b1f6Smrg    if test -x /sbin/sysctl; then
7446f03b1f6Smrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
7456f03b1f6Smrg    elif test -x /usr/sbin/sysctl; then
7466f03b1f6Smrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
7476f03b1f6Smrg    else
7486f03b1f6Smrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
7496f03b1f6Smrg    fi
7506f03b1f6Smrg    # And add a safety zone
7516f03b1f6Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7526f03b1f6Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7536f03b1f6Smrg    ;;
7546f03b1f6Smrg
7556f03b1f6Smrg  interix*)
7566f03b1f6Smrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
7576f03b1f6Smrg    lt_cv_sys_max_cmd_len=196608
7586f03b1f6Smrg    ;;
7596f03b1f6Smrg
7606f03b1f6Smrg  osf*)
7616f03b1f6Smrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
7626f03b1f6Smrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
7636f03b1f6Smrg    # nice to cause kernel panics so lets avoid the loop below.
7646f03b1f6Smrg    # First set a reasonable default.
7656f03b1f6Smrg    lt_cv_sys_max_cmd_len=16384
7666f03b1f6Smrg    #
7676f03b1f6Smrg    if test -x /sbin/sysconfig; then
7686f03b1f6Smrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
7696f03b1f6Smrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
7706f03b1f6Smrg      esac
7716f03b1f6Smrg    fi
7726f03b1f6Smrg    ;;
7736f03b1f6Smrg  sco3.2v5*)
7746f03b1f6Smrg    lt_cv_sys_max_cmd_len=102400
7756f03b1f6Smrg    ;;
7766f03b1f6Smrg  sysv5* | sco5v6* | sysv4.2uw2*)
7776f03b1f6Smrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
7786f03b1f6Smrg    if test -n "$kargmax"; then
7796f03b1f6Smrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ 	]]//'`
7806f03b1f6Smrg    else
7816f03b1f6Smrg      lt_cv_sys_max_cmd_len=32768
7826f03b1f6Smrg    fi
7836f03b1f6Smrg    ;;
7846f03b1f6Smrg  *)
7856f03b1f6Smrg    # If test is not a shell built-in, we'll probably end up computing a
7866f03b1f6Smrg    # maximum length that is only half of the actual maximum length, but
7876f03b1f6Smrg    # we can't tell.
7886f03b1f6Smrg    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
7896f03b1f6Smrg    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
7906f03b1f6Smrg	       = "XX$teststring") >/dev/null 2>&1 &&
7916f03b1f6Smrg	    new_result=`expr "X$teststring" : ".*" 2>&1` &&
7926f03b1f6Smrg	    lt_cv_sys_max_cmd_len=$new_result &&
7936f03b1f6Smrg	    test $i != 17 # 1/2 MB should be enough
7946f03b1f6Smrg    do
7956f03b1f6Smrg      i=`expr $i + 1`
7966f03b1f6Smrg      teststring=$teststring$teststring
7976f03b1f6Smrg    done
7986f03b1f6Smrg    teststring=
7996f03b1f6Smrg    # Add a significant safety factor because C++ compilers can tack on massive
8006f03b1f6Smrg    # amounts of additional arguments before passing them to the linker.
8016f03b1f6Smrg    # It appears as though 1/2 is a usable value.
8026f03b1f6Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
8036f03b1f6Smrg    ;;
8046f03b1f6Smrg  esac
8056f03b1f6Smrg])
8066f03b1f6Smrgif test -n $lt_cv_sys_max_cmd_len ; then
8076f03b1f6Smrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
8086f03b1f6Smrgelse
8096f03b1f6Smrg  AC_MSG_RESULT(none)
8106f03b1f6Smrgfi
8116f03b1f6Smrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN
8126f03b1f6Smrg
8136f03b1f6Smrg
8146f03b1f6Smrg# _LT_AC_CHECK_DLFCN
8156f03b1f6Smrg# ------------------
8166f03b1f6SmrgAC_DEFUN([_LT_AC_CHECK_DLFCN],
8176f03b1f6Smrg[AC_CHECK_HEADERS(dlfcn.h)dnl
8186f03b1f6Smrg])# _LT_AC_CHECK_DLFCN
8196f03b1f6Smrg
8206f03b1f6Smrg
8216f03b1f6Smrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
8226f03b1f6Smrg#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
8236f03b1f6Smrg# ---------------------------------------------------------------------
8246f03b1f6SmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
8256f03b1f6Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
8266f03b1f6Smrgif test "$cross_compiling" = yes; then :
8276f03b1f6Smrg  [$4]
8286f03b1f6Smrgelse
8296f03b1f6Smrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
8306f03b1f6Smrg  lt_status=$lt_dlunknown
8316f03b1f6Smrg  cat > conftest.$ac_ext <<EOF
8326f03b1f6Smrg[#line __oline__ "configure"
8336f03b1f6Smrg#include "confdefs.h"
8346f03b1f6Smrg
8356f03b1f6Smrg#if HAVE_DLFCN_H
8366f03b1f6Smrg#include <dlfcn.h>
8376f03b1f6Smrg#endif
8386f03b1f6Smrg
8396f03b1f6Smrg#include <stdio.h>
8406f03b1f6Smrg
8416f03b1f6Smrg#ifdef RTLD_GLOBAL
8426f03b1f6Smrg#  define LT_DLGLOBAL		RTLD_GLOBAL
8436f03b1f6Smrg#else
8446f03b1f6Smrg#  ifdef DL_GLOBAL
8456f03b1f6Smrg#    define LT_DLGLOBAL		DL_GLOBAL
8466f03b1f6Smrg#  else
8476f03b1f6Smrg#    define LT_DLGLOBAL		0
8486f03b1f6Smrg#  endif
8496f03b1f6Smrg#endif
8506f03b1f6Smrg
8516f03b1f6Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
8526f03b1f6Smrg   find out it does not work in some platform. */
8536f03b1f6Smrg#ifndef LT_DLLAZY_OR_NOW
8546f03b1f6Smrg#  ifdef RTLD_LAZY
8556f03b1f6Smrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
8566f03b1f6Smrg#  else
8576f03b1f6Smrg#    ifdef DL_LAZY
8586f03b1f6Smrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
8596f03b1f6Smrg#    else
8606f03b1f6Smrg#      ifdef RTLD_NOW
8616f03b1f6Smrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
8626f03b1f6Smrg#      else
8636f03b1f6Smrg#        ifdef DL_NOW
8646f03b1f6Smrg#          define LT_DLLAZY_OR_NOW	DL_NOW
8656f03b1f6Smrg#        else
8666f03b1f6Smrg#          define LT_DLLAZY_OR_NOW	0
8676f03b1f6Smrg#        endif
8686f03b1f6Smrg#      endif
8696f03b1f6Smrg#    endif
8706f03b1f6Smrg#  endif
8716f03b1f6Smrg#endif
8726f03b1f6Smrg
8736f03b1f6Smrg#ifdef __cplusplus
8746f03b1f6Smrgextern "C" void exit (int);
8756f03b1f6Smrg#endif
8766f03b1f6Smrg
8776f03b1f6Smrgvoid fnord() { int i=42;}
8786f03b1f6Smrgint main ()
8796f03b1f6Smrg{
8806f03b1f6Smrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
8816f03b1f6Smrg  int status = $lt_dlunknown;
8826f03b1f6Smrg
8836f03b1f6Smrg  if (self)
8846f03b1f6Smrg    {
8856f03b1f6Smrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
8866f03b1f6Smrg      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
8876f03b1f6Smrg      /* dlclose (self); */
8886f03b1f6Smrg    }
8896f03b1f6Smrg  else
8906f03b1f6Smrg    puts (dlerror ());
8916f03b1f6Smrg
8926f03b1f6Smrg    exit (status);
8936f03b1f6Smrg}]
8946f03b1f6SmrgEOF
8956f03b1f6Smrg  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
8966f03b1f6Smrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
8976f03b1f6Smrg    lt_status=$?
8986f03b1f6Smrg    case x$lt_status in
8996f03b1f6Smrg      x$lt_dlno_uscore) $1 ;;
9006f03b1f6Smrg      x$lt_dlneed_uscore) $2 ;;
9016f03b1f6Smrg      x$lt_dlunknown|x*) $3 ;;
9026f03b1f6Smrg    esac
9036f03b1f6Smrg  else :
9046f03b1f6Smrg    # compilation failed
9056f03b1f6Smrg    $3
9066f03b1f6Smrg  fi
9076f03b1f6Smrgfi
9086f03b1f6Smrgrm -fr conftest*
9096f03b1f6Smrg])# _LT_AC_TRY_DLOPEN_SELF
9106f03b1f6Smrg
9116f03b1f6Smrg
9126f03b1f6Smrg# AC_LIBTOOL_DLOPEN_SELF
9136f03b1f6Smrg# ----------------------
9146f03b1f6SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
9156f03b1f6Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
9166f03b1f6Smrgif test "x$enable_dlopen" != xyes; then
9176f03b1f6Smrg  enable_dlopen=unknown
9186f03b1f6Smrg  enable_dlopen_self=unknown
9196f03b1f6Smrg  enable_dlopen_self_static=unknown
9206f03b1f6Smrgelse
9216f03b1f6Smrg  lt_cv_dlopen=no
9226f03b1f6Smrg  lt_cv_dlopen_libs=
9236f03b1f6Smrg
9246f03b1f6Smrg  case $host_os in
9256f03b1f6Smrg  beos*)
9266f03b1f6Smrg    lt_cv_dlopen="load_add_on"
9276f03b1f6Smrg    lt_cv_dlopen_libs=
9286f03b1f6Smrg    lt_cv_dlopen_self=yes
9296f03b1f6Smrg    ;;
9306f03b1f6Smrg
9316f03b1f6Smrg  mingw* | pw32*)
9326f03b1f6Smrg    lt_cv_dlopen="LoadLibrary"
9336f03b1f6Smrg    lt_cv_dlopen_libs=
9346f03b1f6Smrg   ;;
9356f03b1f6Smrg
9366f03b1f6Smrg  cygwin*)
9376f03b1f6Smrg    lt_cv_dlopen="dlopen"
9386f03b1f6Smrg    lt_cv_dlopen_libs=
9396f03b1f6Smrg   ;;
9406f03b1f6Smrg
9416f03b1f6Smrg  darwin*)
9426f03b1f6Smrg  # if libdl is installed we need to link against it
9436f03b1f6Smrg    AC_CHECK_LIB([dl], [dlopen],
9446f03b1f6Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
9456f03b1f6Smrg    lt_cv_dlopen="dyld"
9466f03b1f6Smrg    lt_cv_dlopen_libs=
9476f03b1f6Smrg    lt_cv_dlopen_self=yes
9486f03b1f6Smrg    ])
9496f03b1f6Smrg   ;;
9506f03b1f6Smrg
9516f03b1f6Smrg  *)
9526f03b1f6Smrg    AC_CHECK_FUNC([shl_load],
9536f03b1f6Smrg	  [lt_cv_dlopen="shl_load"],
9546f03b1f6Smrg      [AC_CHECK_LIB([dld], [shl_load],
9556f03b1f6Smrg	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
9566f03b1f6Smrg	[AC_CHECK_FUNC([dlopen],
9576f03b1f6Smrg	      [lt_cv_dlopen="dlopen"],
9586f03b1f6Smrg	  [AC_CHECK_LIB([dl], [dlopen],
9596f03b1f6Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
9606f03b1f6Smrg	    [AC_CHECK_LIB([svld], [dlopen],
9616f03b1f6Smrg		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
9626f03b1f6Smrg	      [AC_CHECK_LIB([dld], [dld_link],
9636f03b1f6Smrg		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
9646f03b1f6Smrg	      ])
9656f03b1f6Smrg	    ])
9666f03b1f6Smrg	  ])
9676f03b1f6Smrg	])
9686f03b1f6Smrg      ])
9696f03b1f6Smrg    ;;
9706f03b1f6Smrg  esac
9716f03b1f6Smrg
9726f03b1f6Smrg  if test "x$lt_cv_dlopen" != xno; then
9736f03b1f6Smrg    enable_dlopen=yes
9746f03b1f6Smrg  else
9756f03b1f6Smrg    enable_dlopen=no
9766f03b1f6Smrg  fi
9776f03b1f6Smrg
9786f03b1f6Smrg  case $lt_cv_dlopen in
9796f03b1f6Smrg  dlopen)
9806f03b1f6Smrg    save_CPPFLAGS="$CPPFLAGS"
9816f03b1f6Smrg    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
9826f03b1f6Smrg
9836f03b1f6Smrg    save_LDFLAGS="$LDFLAGS"
9846f03b1f6Smrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
9856f03b1f6Smrg
9866f03b1f6Smrg    save_LIBS="$LIBS"
9876f03b1f6Smrg    LIBS="$lt_cv_dlopen_libs $LIBS"
9886f03b1f6Smrg
9896f03b1f6Smrg    AC_CACHE_CHECK([whether a program can dlopen itself],
9906f03b1f6Smrg	  lt_cv_dlopen_self, [dnl
9916f03b1f6Smrg	  _LT_AC_TRY_DLOPEN_SELF(
9926f03b1f6Smrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
9936f03b1f6Smrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
9946f03b1f6Smrg    ])
9956f03b1f6Smrg
9966f03b1f6Smrg    if test "x$lt_cv_dlopen_self" = xyes; then
9976f03b1f6Smrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
9986f03b1f6Smrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
9996f03b1f6Smrg    	  lt_cv_dlopen_self_static, [dnl
10006f03b1f6Smrg	  _LT_AC_TRY_DLOPEN_SELF(
10016f03b1f6Smrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
10026f03b1f6Smrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
10036f03b1f6Smrg      ])
10046f03b1f6Smrg    fi
10056f03b1f6Smrg
10066f03b1f6Smrg    CPPFLAGS="$save_CPPFLAGS"
10076f03b1f6Smrg    LDFLAGS="$save_LDFLAGS"
10086f03b1f6Smrg    LIBS="$save_LIBS"
10096f03b1f6Smrg    ;;
10106f03b1f6Smrg  esac
10116f03b1f6Smrg
10126f03b1f6Smrg  case $lt_cv_dlopen_self in
10136f03b1f6Smrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
10146f03b1f6Smrg  *) enable_dlopen_self=unknown ;;
10156f03b1f6Smrg  esac
10166f03b1f6Smrg
10176f03b1f6Smrg  case $lt_cv_dlopen_self_static in
10186f03b1f6Smrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
10196f03b1f6Smrg  *) enable_dlopen_self_static=unknown ;;
10206f03b1f6Smrg  esac
10216f03b1f6Smrgfi
10226f03b1f6Smrg])# AC_LIBTOOL_DLOPEN_SELF
10236f03b1f6Smrg
10246f03b1f6Smrg
10256f03b1f6Smrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
10266f03b1f6Smrg# ---------------------------------
10276f03b1f6Smrg# Check to see if options -c and -o are simultaneously supported by compiler
10286f03b1f6SmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
10296f03b1f6Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
10306f03b1f6SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
10316f03b1f6Smrg  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
10326f03b1f6Smrg  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
10336f03b1f6Smrg   $rm -r conftest 2>/dev/null
10346f03b1f6Smrg   mkdir conftest
10356f03b1f6Smrg   cd conftest
10366f03b1f6Smrg   mkdir out
10376f03b1f6Smrg   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
10386f03b1f6Smrg
10396f03b1f6Smrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
10406f03b1f6Smrg   # Insert the option either (1) after the last *FLAGS variable, or
10416f03b1f6Smrg   # (2) before a word containing "conftest.", or (3) at the end.
10426f03b1f6Smrg   # Note that $ac_compile itself does not contain backslashes and begins
10436f03b1f6Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
10446f03b1f6Smrg   lt_compile=`echo "$ac_compile" | $SED \
10456f03b1f6Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
10466f03b1f6Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
10476f03b1f6Smrg   -e 's:$: $lt_compiler_flag:'`
10486f03b1f6Smrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
10496f03b1f6Smrg   (eval "$lt_compile" 2>out/conftest.err)
10506f03b1f6Smrg   ac_status=$?
10516f03b1f6Smrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
10526f03b1f6Smrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
10536f03b1f6Smrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
10546f03b1f6Smrg   then
10556f03b1f6Smrg     # The compiler can only warn and ignore the option if not recognized
10566f03b1f6Smrg     # So say no if there are warnings
10576f03b1f6Smrg     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
10586f03b1f6Smrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
10596f03b1f6Smrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
10606f03b1f6Smrg       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
10616f03b1f6Smrg     fi
10626f03b1f6Smrg   fi
10636f03b1f6Smrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
10646f03b1f6Smrg   $rm conftest*
10656f03b1f6Smrg   # SGI C++ compiler will create directory out/ii_files/ for
10666f03b1f6Smrg   # template instantiation
10676f03b1f6Smrg   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
10686f03b1f6Smrg   $rm out/* && rmdir out
10696f03b1f6Smrg   cd ..
10706f03b1f6Smrg   rmdir conftest
10716f03b1f6Smrg   $rm conftest*
10726f03b1f6Smrg])
10736f03b1f6Smrg])# AC_LIBTOOL_PROG_CC_C_O
10746f03b1f6Smrg
10756f03b1f6Smrg
10766f03b1f6Smrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
10776f03b1f6Smrg# -----------------------------------------
10786f03b1f6Smrg# Check to see if we can do hard links to lock some files if needed
10796f03b1f6SmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
10806f03b1f6Smrg[AC_REQUIRE([_LT_AC_LOCK])dnl
10816f03b1f6Smrg
10826f03b1f6Smrghard_links="nottested"
10836f03b1f6Smrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
10846f03b1f6Smrg  # do not overwrite the value of need_locks provided by the user
10856f03b1f6Smrg  AC_MSG_CHECKING([if we can lock with hard links])
10866f03b1f6Smrg  hard_links=yes
10876f03b1f6Smrg  $rm conftest*
10886f03b1f6Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
10896f03b1f6Smrg  touch conftest.a
10906f03b1f6Smrg  ln conftest.a conftest.b 2>&5 || hard_links=no
10916f03b1f6Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
10926f03b1f6Smrg  AC_MSG_RESULT([$hard_links])
10936f03b1f6Smrg  if test "$hard_links" = no; then
10946f03b1f6Smrg    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
10956f03b1f6Smrg    need_locks=warn
10966f03b1f6Smrg  fi
10976f03b1f6Smrgelse
10986f03b1f6Smrg  need_locks=no
10996f03b1f6Smrgfi
11006f03b1f6Smrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
11016f03b1f6Smrg
11026f03b1f6Smrg
11036f03b1f6Smrg# AC_LIBTOOL_OBJDIR
11046f03b1f6Smrg# -----------------
11056f03b1f6SmrgAC_DEFUN([AC_LIBTOOL_OBJDIR],
11066f03b1f6Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
11076f03b1f6Smrg[rm -f .libs 2>/dev/null
11086f03b1f6Smrgmkdir .libs 2>/dev/null
11096f03b1f6Smrgif test -d .libs; then
11106f03b1f6Smrg  lt_cv_objdir=.libs
11116f03b1f6Smrgelse
11126f03b1f6Smrg  # MS-DOS does not allow filenames that begin with a dot.
11136f03b1f6Smrg  lt_cv_objdir=_libs
11146f03b1f6Smrgfi
11156f03b1f6Smrgrmdir .libs 2>/dev/null])
11166f03b1f6Smrgobjdir=$lt_cv_objdir
11176f03b1f6Smrg])# AC_LIBTOOL_OBJDIR
11186f03b1f6Smrg
11196f03b1f6Smrg
11206f03b1f6Smrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
11216f03b1f6Smrg# ----------------------------------------------
11226f03b1f6Smrg# Check hardcoding attributes.
11236f03b1f6SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
11246f03b1f6Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
11256f03b1f6Smrg_LT_AC_TAGVAR(hardcode_action, $1)=
11266f03b1f6Smrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
11276f03b1f6Smrg   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
11286f03b1f6Smrg   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
11296f03b1f6Smrg
11306f03b1f6Smrg  # We can hardcode non-existant directories.
11316f03b1f6Smrg  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
11326f03b1f6Smrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
11336f03b1f6Smrg     # have to relink, otherwise we might link with an installed library
11346f03b1f6Smrg     # when we should be linking with a yet-to-be-installed one
11356f03b1f6Smrg     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
11366f03b1f6Smrg     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
11376f03b1f6Smrg    # Linking always hardcodes the temporary library directory.
11386f03b1f6Smrg    _LT_AC_TAGVAR(hardcode_action, $1)=relink
11396f03b1f6Smrg  else
11406f03b1f6Smrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
11416f03b1f6Smrg    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
11426f03b1f6Smrg  fi
11436f03b1f6Smrgelse
11446f03b1f6Smrg  # We cannot hardcode anything, or else we can only hardcode existing
11456f03b1f6Smrg  # directories.
11466f03b1f6Smrg  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
11476f03b1f6Smrgfi
11486f03b1f6SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
11496f03b1f6Smrg
11506f03b1f6Smrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
11516f03b1f6Smrg  # Fast installation is not supported
11526f03b1f6Smrg  enable_fast_install=no
11536f03b1f6Smrgelif test "$shlibpath_overrides_runpath" = yes ||
11546f03b1f6Smrg     test "$enable_shared" = no; then
11556f03b1f6Smrg  # Fast installation is not necessary
11566f03b1f6Smrg  enable_fast_install=needless
11576f03b1f6Smrgfi
11586f03b1f6Smrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
11596f03b1f6Smrg
11606f03b1f6Smrg
11616f03b1f6Smrg# AC_LIBTOOL_SYS_LIB_STRIP
11626f03b1f6Smrg# ------------------------
11636f03b1f6SmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
11646f03b1f6Smrg[striplib=
11656f03b1f6Smrgold_striplib=
11666f03b1f6SmrgAC_MSG_CHECKING([whether stripping libraries is possible])
11676f03b1f6Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
11686f03b1f6Smrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
11696f03b1f6Smrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
11706f03b1f6Smrg  AC_MSG_RESULT([yes])
11716f03b1f6Smrgelse
11726f03b1f6Smrg# FIXME - insert some real tests, host_os isn't really good enough
11736f03b1f6Smrg  case $host_os in
11746f03b1f6Smrg   darwin*)
11756f03b1f6Smrg       if test -n "$STRIP" ; then
11766f03b1f6Smrg         striplib="$STRIP -x"
11776f03b1f6Smrg         AC_MSG_RESULT([yes])
11786f03b1f6Smrg       else
11796f03b1f6Smrg  AC_MSG_RESULT([no])
11806f03b1f6Smrgfi
11816f03b1f6Smrg       ;;
11826f03b1f6Smrg   *)
11836f03b1f6Smrg  AC_MSG_RESULT([no])
11846f03b1f6Smrg    ;;
11856f03b1f6Smrg  esac
11866f03b1f6Smrgfi
11876f03b1f6Smrg])# AC_LIBTOOL_SYS_LIB_STRIP
11886f03b1f6Smrg
11896f03b1f6Smrg
11906f03b1f6Smrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER
11916f03b1f6Smrg# -----------------------------
11926f03b1f6Smrg# PORTME Fill in your ld.so characteristics
11936f03b1f6SmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
11946f03b1f6Smrg[AC_MSG_CHECKING([dynamic linker characteristics])
11956f03b1f6Smrglibrary_names_spec=
11966f03b1f6Smrglibname_spec='lib$name'
11976f03b1f6Smrgsoname_spec=
11986f03b1f6Smrgshrext_cmds=".so"
11996f03b1f6Smrgpostinstall_cmds=
12006f03b1f6Smrgpostuninstall_cmds=
12016f03b1f6Smrgfinish_cmds=
12026f03b1f6Smrgfinish_eval=
12036f03b1f6Smrgshlibpath_var=
12046f03b1f6Smrgshlibpath_overrides_runpath=unknown
12056f03b1f6Smrgversion_type=none
12066f03b1f6Smrgdynamic_linker="$host_os ld.so"
12076f03b1f6Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
12086f03b1f6Smrgif test "$GCC" = yes; then
12096f03b1f6Smrg  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
12106f03b1f6Smrg  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
12116f03b1f6Smrg    # if the path contains ";" then we assume it to be the separator
12126f03b1f6Smrg    # otherwise default to the standard path separator (i.e. ":") - it is
12136f03b1f6Smrg    # assumed that no part of a normal pathname contains ";" but that should
12146f03b1f6Smrg    # okay in the real world where ";" in dirpaths is itself problematic.
12156f03b1f6Smrg    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
12166f03b1f6Smrg  else
12176f03b1f6Smrg    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
12186f03b1f6Smrg  fi
12196f03b1f6Smrgelse
12206f03b1f6Smrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
12216f03b1f6Smrgfi
12226f03b1f6Smrgneed_lib_prefix=unknown
12236f03b1f6Smrghardcode_into_libs=no
12246f03b1f6Smrg
12256f03b1f6Smrg# when you set need_version to no, make sure it does not cause -set_version
12266f03b1f6Smrg# flags to be left without arguments
12276f03b1f6Smrgneed_version=unknown
12286f03b1f6Smrg
12296f03b1f6Smrgcase $host_os in
12306f03b1f6Smrgaix3*)
12316f03b1f6Smrg  version_type=linux
12326f03b1f6Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
12336f03b1f6Smrg  shlibpath_var=LIBPATH
12346f03b1f6Smrg
12356f03b1f6Smrg  # AIX 3 has no versioning support, so we append a major version to the name.
12366f03b1f6Smrg  soname_spec='${libname}${release}${shared_ext}$major'
12376f03b1f6Smrg  ;;
12386f03b1f6Smrg
12396f03b1f6Smrgaix4* | aix5*)
12406f03b1f6Smrg  version_type=linux
12416f03b1f6Smrg  need_lib_prefix=no
12426f03b1f6Smrg  need_version=no
12436f03b1f6Smrg  hardcode_into_libs=yes
12446f03b1f6Smrg  if test "$host_cpu" = ia64; then
12456f03b1f6Smrg    # AIX 5 supports IA64
12466f03b1f6Smrg    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
12476f03b1f6Smrg    shlibpath_var=LD_LIBRARY_PATH
12486f03b1f6Smrg  else
12496f03b1f6Smrg    # With GCC up to 2.95.x, collect2 would create an import file
12506f03b1f6Smrg    # for dependence libraries.  The import file would start with
12516f03b1f6Smrg    # the line `#! .'.  This would cause the generated library to
12526f03b1f6Smrg    # depend on `.', always an invalid library.  This was fixed in
12536f03b1f6Smrg    # development snapshots of GCC prior to 3.0.
12546f03b1f6Smrg    case $host_os in
12556f03b1f6Smrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
12566f03b1f6Smrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
12576f03b1f6Smrg	   echo ' yes '
12586f03b1f6Smrg	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
12596f03b1f6Smrg	:
12606f03b1f6Smrg      else
12616f03b1f6Smrg	can_build_shared=no
12626f03b1f6Smrg      fi
12636f03b1f6Smrg      ;;
12646f03b1f6Smrg    esac
12656f03b1f6Smrg    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
12666f03b1f6Smrg    # soname into executable. Probably we can add versioning support to
12676f03b1f6Smrg    # collect2, so additional links can be useful in future.
12686f03b1f6Smrg    if test "$aix_use_runtimelinking" = yes; then
12696f03b1f6Smrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
12706f03b1f6Smrg      # instead of lib<name>.a to let people know that these are not
12716f03b1f6Smrg      # typical AIX shared libraries.
12726f03b1f6Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12736f03b1f6Smrg    else
12746f03b1f6Smrg      # We preserve .a as extension for shared libraries through AIX4.2
12756f03b1f6Smrg      # and later when we are not doing run time linking.
12766f03b1f6Smrg      library_names_spec='${libname}${release}.a $libname.a'
12776f03b1f6Smrg      soname_spec='${libname}${release}${shared_ext}$major'
12786f03b1f6Smrg    fi
12796f03b1f6Smrg    shlibpath_var=LIBPATH
12806f03b1f6Smrg  fi
12816f03b1f6Smrg  ;;
12826f03b1f6Smrg
12836f03b1f6Smrgamigaos*)
12846f03b1f6Smrg  library_names_spec='$libname.ixlibrary $libname.a'
12856f03b1f6Smrg  # Create ${libname}_ixlibrary.a entries in /sys/libs.
12866f03b1f6Smrg  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'
12876f03b1f6Smrg  ;;
12886f03b1f6Smrg
12896f03b1f6Smrgbeos*)
12906f03b1f6Smrg  library_names_spec='${libname}${shared_ext}'
12916f03b1f6Smrg  dynamic_linker="$host_os ld.so"
12926f03b1f6Smrg  shlibpath_var=LIBRARY_PATH
12936f03b1f6Smrg  ;;
12946f03b1f6Smrg
12956f03b1f6Smrgbsdi[[45]]*)
12966f03b1f6Smrg  version_type=linux
12976f03b1f6Smrg  need_version=no
12986f03b1f6Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12996f03b1f6Smrg  soname_spec='${libname}${release}${shared_ext}$major'
13006f03b1f6Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
13016f03b1f6Smrg  shlibpath_var=LD_LIBRARY_PATH
13026f03b1f6Smrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
13036f03b1f6Smrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
13046f03b1f6Smrg  # the default ld.so.conf also contains /usr/contrib/lib and
13056f03b1f6Smrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
13066f03b1f6Smrg  # libtool to hard-code these into programs
13076f03b1f6Smrg  ;;
13086f03b1f6Smrg
13096f03b1f6Smrgcygwin* | mingw* | pw32*)
13106f03b1f6Smrg  version_type=windows
13116f03b1f6Smrg  shrext_cmds=".dll"
13126f03b1f6Smrg  need_version=no
13136f03b1f6Smrg  need_lib_prefix=no
13146f03b1f6Smrg
13156f03b1f6Smrg  case $GCC,$host_os in
13166f03b1f6Smrg  yes,cygwin* | yes,mingw* | yes,pw32*)
13176f03b1f6Smrg    library_names_spec='$libname.dll.a'
13186f03b1f6Smrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
13196f03b1f6Smrg    postinstall_cmds='base_file=`basename \${file}`~
13206f03b1f6Smrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
13216f03b1f6Smrg      dldir=$destdir/`dirname \$dlpath`~
13226f03b1f6Smrg      test -d \$dldir || mkdir -p \$dldir~
13236f03b1f6Smrg      $install_prog $dir/$dlname \$dldir/$dlname~
13246f03b1f6Smrg      chmod a+x \$dldir/$dlname'
13256f03b1f6Smrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
13266f03b1f6Smrg      dlpath=$dir/\$dldll~
13276f03b1f6Smrg       $rm \$dlpath'
13286f03b1f6Smrg    shlibpath_overrides_runpath=yes
13296f03b1f6Smrg
13306f03b1f6Smrg    case $host_os in
13316f03b1f6Smrg    cygwin*)
13326f03b1f6Smrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
13336f03b1f6Smrg      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
13346f03b1f6Smrg      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
13356f03b1f6Smrg      ;;
13366f03b1f6Smrg    mingw*)
13376f03b1f6Smrg      # MinGW DLLs use traditional 'lib' prefix
13386f03b1f6Smrg      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
13396f03b1f6Smrg      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
13406f03b1f6Smrg      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
13416f03b1f6Smrg        # It is most probably a Windows format PATH printed by
13426f03b1f6Smrg        # mingw gcc, but we are running on Cygwin. Gcc prints its search
13436f03b1f6Smrg        # path with ; separators, and with drive letters. We can handle the
13446f03b1f6Smrg        # drive letters (cygwin fileutils understands them), so leave them,
13456f03b1f6Smrg        # especially as we might pass files found there to a mingw objdump,
13466f03b1f6Smrg        # which wouldn't understand a cygwinified path. Ahh.
13476f03b1f6Smrg        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
13486f03b1f6Smrg      else
13496f03b1f6Smrg        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
13506f03b1f6Smrg      fi
13516f03b1f6Smrg      ;;
13526f03b1f6Smrg    pw32*)
13536f03b1f6Smrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
13546f03b1f6Smrg      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
13556f03b1f6Smrg      ;;
13566f03b1f6Smrg    esac
13576f03b1f6Smrg    ;;
13586f03b1f6Smrg
13596f03b1f6Smrg  *)
13606f03b1f6Smrg    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
13616f03b1f6Smrg    ;;
13626f03b1f6Smrg  esac
13636f03b1f6Smrg  dynamic_linker='Win32 ld.exe'
13646f03b1f6Smrg  # FIXME: first we should search . and the directory the executable is in
13656f03b1f6Smrg  shlibpath_var=PATH
13666f03b1f6Smrg  ;;
13676f03b1f6Smrg
13686f03b1f6Smrgdarwin* | rhapsody*)
13696f03b1f6Smrg  dynamic_linker="$host_os dyld"
13706f03b1f6Smrg  version_type=darwin
13716f03b1f6Smrg  need_lib_prefix=no
13726f03b1f6Smrg  need_version=no
13736f03b1f6Smrg  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
13746f03b1f6Smrg  soname_spec='${libname}${release}${major}$shared_ext'
13756f03b1f6Smrg  shlibpath_overrides_runpath=yes
13766f03b1f6Smrg  shlibpath_var=DYLD_LIBRARY_PATH
13776f03b1f6Smrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
13786f03b1f6Smrg  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
13796f03b1f6Smrg  if test "$GCC" = yes; then
13806f03b1f6Smrg    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
13816f03b1f6Smrg  else
13826f03b1f6Smrg    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
13836f03b1f6Smrg  fi
13846f03b1f6Smrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
13856f03b1f6Smrg  ;;
13866f03b1f6Smrg
13876f03b1f6Smrgdgux*)
13886f03b1f6Smrg  version_type=linux
13896f03b1f6Smrg  need_lib_prefix=no
13906f03b1f6Smrg  need_version=no
13916f03b1f6Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
13926f03b1f6Smrg  soname_spec='${libname}${release}${shared_ext}$major'
13936f03b1f6Smrg  shlibpath_var=LD_LIBRARY_PATH
13946f03b1f6Smrg  ;;
13956f03b1f6Smrg
13966f03b1f6Smrgfreebsd1*)
13976f03b1f6Smrg  dynamic_linker=no
13986f03b1f6Smrg  ;;
13996f03b1f6Smrg
14006f03b1f6Smrgfreebsd* | dragonfly*)
14016f03b1f6Smrg  # DragonFly does not have aout.  When/if they implement a new
14026f03b1f6Smrg  # versioning mechanism, adjust this.
14036f03b1f6Smrg  if test -x /usr/bin/objformat; then
14046f03b1f6Smrg    objformat=`/usr/bin/objformat`
14056f03b1f6Smrg  else
14066f03b1f6Smrg    case $host_os in
14076f03b1f6Smrg    freebsd[[123]]*) objformat=aout ;;
14086f03b1f6Smrg    *) objformat=elf ;;
14096f03b1f6Smrg    esac
14106f03b1f6Smrg  fi
14116f03b1f6Smrg  version_type=freebsd-$objformat
14126f03b1f6Smrg  case $version_type in
14136f03b1f6Smrg    freebsd-elf*)
14146f03b1f6Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
14156f03b1f6Smrg      need_version=no
14166f03b1f6Smrg      need_lib_prefix=no
14176f03b1f6Smrg      ;;
14186f03b1f6Smrg    freebsd-*)
14196f03b1f6Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
14206f03b1f6Smrg      need_version=yes
14216f03b1f6Smrg      ;;
14226f03b1f6Smrg  esac
14236f03b1f6Smrg  shlibpath_var=LD_LIBRARY_PATH
14246f03b1f6Smrg  case $host_os in
14256f03b1f6Smrg  freebsd2*)
14266f03b1f6Smrg    shlibpath_overrides_runpath=yes
14276f03b1f6Smrg    ;;
14286f03b1f6Smrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
14296f03b1f6Smrg    shlibpath_overrides_runpath=yes
14306f03b1f6Smrg    hardcode_into_libs=yes
14316f03b1f6Smrg    ;;
14326f03b1f6Smrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
14336f03b1f6Smrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
14346f03b1f6Smrg    shlibpath_overrides_runpath=no
14356f03b1f6Smrg    hardcode_into_libs=yes
14366f03b1f6Smrg    ;;
14376f03b1f6Smrg  freebsd*) # from 4.6 on
14386f03b1f6Smrg    shlibpath_overrides_runpath=yes
14396f03b1f6Smrg    hardcode_into_libs=yes
14406f03b1f6Smrg    ;;
14416f03b1f6Smrg  esac
14426f03b1f6Smrg  ;;
14436f03b1f6Smrg
14446f03b1f6Smrggnu*)
14456f03b1f6Smrg  version_type=linux
14466f03b1f6Smrg  need_lib_prefix=no
14476f03b1f6Smrg  need_version=no
14486f03b1f6Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
14496f03b1f6Smrg  soname_spec='${libname}${release}${shared_ext}$major'
14506f03b1f6Smrg  shlibpath_var=LD_LIBRARY_PATH
14516f03b1f6Smrg  hardcode_into_libs=yes
14526f03b1f6Smrg  ;;
14536f03b1f6Smrg
14546f03b1f6Smrghpux9* | hpux10* | hpux11*)
14556f03b1f6Smrg  # Give a soname corresponding to the major version so that dld.sl refuses to
14566f03b1f6Smrg  # link against other versions.
14576f03b1f6Smrg  version_type=sunos
14586f03b1f6Smrg  need_lib_prefix=no
14596f03b1f6Smrg  need_version=no
14606f03b1f6Smrg  case $host_cpu in
14616f03b1f6Smrg  ia64*)
14626f03b1f6Smrg    shrext_cmds='.so'
14636f03b1f6Smrg    hardcode_into_libs=yes
14646f03b1f6Smrg    dynamic_linker="$host_os dld.so"
14656f03b1f6Smrg    shlibpath_var=LD_LIBRARY_PATH
14666f03b1f6Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
14676f03b1f6Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
14686f03b1f6Smrg    soname_spec='${libname}${release}${shared_ext}$major'
14696f03b1f6Smrg    if test "X$HPUX_IA64_MODE" = X32; then
14706f03b1f6Smrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
14716f03b1f6Smrg    else
14726f03b1f6Smrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
14736f03b1f6Smrg    fi
14746f03b1f6Smrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
14756f03b1f6Smrg    ;;
14766f03b1f6Smrg   hppa*64*)
14776f03b1f6Smrg     shrext_cmds='.sl'
14786f03b1f6Smrg     hardcode_into_libs=yes
14796f03b1f6Smrg     dynamic_linker="$host_os dld.sl"
14806f03b1f6Smrg     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
14816f03b1f6Smrg     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
14826f03b1f6Smrg     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
14836f03b1f6Smrg     soname_spec='${libname}${release}${shared_ext}$major'
14846f03b1f6Smrg     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
14856f03b1f6Smrg     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
14866f03b1f6Smrg     ;;
14876f03b1f6Smrg   *)
14886f03b1f6Smrg    shrext_cmds='.sl'
14896f03b1f6Smrg    dynamic_linker="$host_os dld.sl"
14906f03b1f6Smrg    shlibpath_var=SHLIB_PATH
14916f03b1f6Smrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
14926f03b1f6Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
14936f03b1f6Smrg    soname_spec='${libname}${release}${shared_ext}$major'
14946f03b1f6Smrg    ;;
14956f03b1f6Smrg  esac
14966f03b1f6Smrg  # HP-UX runs *really* slowly unless shared libraries are mode 555.
14976f03b1f6Smrg  postinstall_cmds='chmod 555 $lib'
14986f03b1f6Smrg  ;;
14996f03b1f6Smrg
15006f03b1f6Smrginterix3*)
15016f03b1f6Smrg  version_type=linux
15026f03b1f6Smrg  need_lib_prefix=no
15036f03b1f6Smrg  need_version=no
15046f03b1f6Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
15056f03b1f6Smrg  soname_spec='${libname}${release}${shared_ext}$major'
15066f03b1f6Smrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
15076f03b1f6Smrg  shlibpath_var=LD_LIBRARY_PATH
15086f03b1f6Smrg  shlibpath_overrides_runpath=no
15096f03b1f6Smrg  hardcode_into_libs=yes
15106f03b1f6Smrg  ;;
15116f03b1f6Smrg
15126f03b1f6Smrgirix5* | irix6* | nonstopux*)
15136f03b1f6Smrg  case $host_os in
15146f03b1f6Smrg    nonstopux*) version_type=nonstopux ;;
15156f03b1f6Smrg    *)
15166f03b1f6Smrg	if test "$lt_cv_prog_gnu_ld" = yes; then
15176f03b1f6Smrg		version_type=linux
15186f03b1f6Smrg	else
15196f03b1f6Smrg		version_type=irix
15206f03b1f6Smrg	fi ;;
15216f03b1f6Smrg  esac
15226f03b1f6Smrg  need_lib_prefix=no
15236f03b1f6Smrg  need_version=no
15246f03b1f6Smrg  soname_spec='${libname}${release}${shared_ext}$major'
15256f03b1f6Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
15266f03b1f6Smrg  case $host_os in
15276f03b1f6Smrg  irix5* | nonstopux*)
15286f03b1f6Smrg    libsuff= shlibsuff=
15296f03b1f6Smrg    ;;
15306f03b1f6Smrg  *)
15316f03b1f6Smrg    case $LD in # libtool.m4 will add one of these switches to LD
15326f03b1f6Smrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
15336f03b1f6Smrg      libsuff= shlibsuff= libmagic=32-bit;;
15346f03b1f6Smrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
15356f03b1f6Smrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
15366f03b1f6Smrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
15376f03b1f6Smrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
15386f03b1f6Smrg    *) libsuff= shlibsuff= libmagic=never-match;;
15396f03b1f6Smrg    esac
15406f03b1f6Smrg    ;;
15416f03b1f6Smrg  esac
15426f03b1f6Smrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
15436f03b1f6Smrg  shlibpath_overrides_runpath=no
15446f03b1f6Smrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
15456f03b1f6Smrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
15466f03b1f6Smrg  hardcode_into_libs=yes
15476f03b1f6Smrg  ;;
15486f03b1f6Smrg
15496f03b1f6Smrg# No shared lib support for Linux oldld, aout, or coff.
15506f03b1f6Smrglinux*oldld* | linux*aout* | linux*coff*)
15516f03b1f6Smrg  dynamic_linker=no
15526f03b1f6Smrg  ;;
15536f03b1f6Smrg
15546f03b1f6Smrg# This must be Linux ELF.
15556f03b1f6Smrglinux* | k*bsd*-gnu)
15566f03b1f6Smrg  version_type=linux
15576f03b1f6Smrg  need_lib_prefix=no
15586f03b1f6Smrg  need_version=no
15596f03b1f6Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15606f03b1f6Smrg  soname_spec='${libname}${release}${shared_ext}$major'
15616f03b1f6Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
15626f03b1f6Smrg  shlibpath_var=LD_LIBRARY_PATH
15636f03b1f6Smrg  shlibpath_overrides_runpath=no
15646f03b1f6Smrg  # This implies no fast_install, which is unacceptable.
15656f03b1f6Smrg  # Some rework will be needed to allow for fast_install
15666f03b1f6Smrg  # before this can be enabled.
15676f03b1f6Smrg  hardcode_into_libs=yes
15686f03b1f6Smrg
15696f03b1f6Smrg  # Append ld.so.conf contents to the search path
15706f03b1f6Smrg  if test -f /etc/ld.so.conf; then
15716f03b1f6Smrg    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
15726f03b1f6Smrg    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
15736f03b1f6Smrg  fi
15746f03b1f6Smrg
15756f03b1f6Smrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
15766f03b1f6Smrg  # powerpc, because MkLinux only supported shared libraries with the
15776f03b1f6Smrg  # GNU dynamic linker.  Since this was broken with cross compilers,
15786f03b1f6Smrg  # most powerpc-linux boxes support dynamic linking these days and
15796f03b1f6Smrg  # people can always --disable-shared, the test was removed, and we
15806f03b1f6Smrg  # assume the GNU/Linux dynamic linker is in use.
15816f03b1f6Smrg  dynamic_linker='GNU/Linux ld.so'
15826f03b1f6Smrg  ;;
15836f03b1f6Smrg
15846f03b1f6Smrgnetbsdelf*-gnu)
15856f03b1f6Smrg  version_type=linux
15866f03b1f6Smrg  need_lib_prefix=no
15876f03b1f6Smrg  need_version=no
15886f03b1f6Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
15896f03b1f6Smrg  soname_spec='${libname}${release}${shared_ext}$major'
15906f03b1f6Smrg  shlibpath_var=LD_LIBRARY_PATH
15916f03b1f6Smrg  shlibpath_overrides_runpath=no
15926f03b1f6Smrg  hardcode_into_libs=yes
15936f03b1f6Smrg  dynamic_linker='NetBSD ld.elf_so'
15946f03b1f6Smrg  ;;
15956f03b1f6Smrg
15966f03b1f6Smrgnetbsd*)
15976f03b1f6Smrg  version_type=sunos
15986f03b1f6Smrg  need_lib_prefix=no
15996f03b1f6Smrg  need_version=no
16006f03b1f6Smrg  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
16016f03b1f6Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
16026f03b1f6Smrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
16036f03b1f6Smrg    dynamic_linker='NetBSD (a.out) ld.so'
16046f03b1f6Smrg  else
16056f03b1f6Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
16066f03b1f6Smrg    soname_spec='${libname}${release}${shared_ext}$major'
16076f03b1f6Smrg    dynamic_linker='NetBSD ld.elf_so'
16086f03b1f6Smrg  fi
16096f03b1f6Smrg  shlibpath_var=LD_LIBRARY_PATH
16106f03b1f6Smrg  shlibpath_overrides_runpath=yes
16116f03b1f6Smrg  hardcode_into_libs=yes
16126f03b1f6Smrg  ;;
16136f03b1f6Smrg
16146f03b1f6Smrgnewsos6)
16156f03b1f6Smrg  version_type=linux
16166f03b1f6Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16176f03b1f6Smrg  shlibpath_var=LD_LIBRARY_PATH
16186f03b1f6Smrg  shlibpath_overrides_runpath=yes
16196f03b1f6Smrg  ;;
16206f03b1f6Smrg
16216f03b1f6Smrgnto-qnx*)
16226f03b1f6Smrg  version_type=linux
16236f03b1f6Smrg  need_lib_prefix=no
16246f03b1f6Smrg  need_version=no
16256f03b1f6Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16266f03b1f6Smrg  soname_spec='${libname}${release}${shared_ext}$major'
16276f03b1f6Smrg  shlibpath_var=LD_LIBRARY_PATH
16286f03b1f6Smrg  shlibpath_overrides_runpath=yes
16296f03b1f6Smrg  ;;
16306f03b1f6Smrg
16316f03b1f6Smrgopenbsd*)
16326f03b1f6Smrg  version_type=sunos
16336f03b1f6Smrg  sys_lib_dlsearch_path_spec="/usr/lib"
16346f03b1f6Smrg  need_lib_prefix=no
16356f03b1f6Smrg  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
16366f03b1f6Smrg  case $host_os in
16376f03b1f6Smrg    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
16386f03b1f6Smrg    *)                         need_version=no  ;;
16396f03b1f6Smrg  esac
16406f03b1f6Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
16416f03b1f6Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
16426f03b1f6Smrg  shlibpath_var=LD_LIBRARY_PATH
16436f03b1f6Smrg  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
16446f03b1f6Smrg    case $host_os in
16456f03b1f6Smrg      openbsd2.[[89]] | openbsd2.[[89]].*)
16466f03b1f6Smrg	shlibpath_overrides_runpath=no
16476f03b1f6Smrg	;;
16486f03b1f6Smrg      *)
16496f03b1f6Smrg	shlibpath_overrides_runpath=yes
16506f03b1f6Smrg	;;
16516f03b1f6Smrg      esac
16526f03b1f6Smrg  else
16536f03b1f6Smrg    shlibpath_overrides_runpath=yes
16546f03b1f6Smrg  fi
16556f03b1f6Smrg  ;;
16566f03b1f6Smrg
16576f03b1f6Smrgos2*)
16586f03b1f6Smrg  libname_spec='$name'
16596f03b1f6Smrg  shrext_cmds=".dll"
16606f03b1f6Smrg  need_lib_prefix=no
16616f03b1f6Smrg  library_names_spec='$libname${shared_ext} $libname.a'
16626f03b1f6Smrg  dynamic_linker='OS/2 ld.exe'
16636f03b1f6Smrg  shlibpath_var=LIBPATH
16646f03b1f6Smrg  ;;
16656f03b1f6Smrg
16666f03b1f6Smrgosf3* | osf4* | osf5*)
16676f03b1f6Smrg  version_type=osf
16686f03b1f6Smrg  need_lib_prefix=no
16696f03b1f6Smrg  need_version=no
16706f03b1f6Smrg  soname_spec='${libname}${release}${shared_ext}$major'
16716f03b1f6Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16726f03b1f6Smrg  shlibpath_var=LD_LIBRARY_PATH
16736f03b1f6Smrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
16746f03b1f6Smrg  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
16756f03b1f6Smrg  ;;
16766f03b1f6Smrg
16776f03b1f6Smrgsolaris*)
16786f03b1f6Smrg  version_type=linux
16796f03b1f6Smrg  need_lib_prefix=no
16806f03b1f6Smrg  need_version=no
16816f03b1f6Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16826f03b1f6Smrg  soname_spec='${libname}${release}${shared_ext}$major'
16836f03b1f6Smrg  shlibpath_var=LD_LIBRARY_PATH
16846f03b1f6Smrg  shlibpath_overrides_runpath=yes
16856f03b1f6Smrg  hardcode_into_libs=yes
16866f03b1f6Smrg  # ldd complains unless libraries are executable
16876f03b1f6Smrg  postinstall_cmds='chmod +x $lib'
16886f03b1f6Smrg  ;;
16896f03b1f6Smrg
16906f03b1f6Smrgsunos4*)
16916f03b1f6Smrg  version_type=sunos
16926f03b1f6Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
16936f03b1f6Smrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
16946f03b1f6Smrg  shlibpath_var=LD_LIBRARY_PATH
16956f03b1f6Smrg  shlibpath_overrides_runpath=yes
16966f03b1f6Smrg  if test "$with_gnu_ld" = yes; then
16976f03b1f6Smrg    need_lib_prefix=no
16986f03b1f6Smrg  fi
16996f03b1f6Smrg  need_version=yes
17006f03b1f6Smrg  ;;
17016f03b1f6Smrg
17026f03b1f6Smrgsysv4 | sysv4.3*)
17036f03b1f6Smrg  version_type=linux
17046f03b1f6Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
17056f03b1f6Smrg  soname_spec='${libname}${release}${shared_ext}$major'
17066f03b1f6Smrg  shlibpath_var=LD_LIBRARY_PATH
17076f03b1f6Smrg  case $host_vendor in
17086f03b1f6Smrg    sni)
17096f03b1f6Smrg      shlibpath_overrides_runpath=no
17106f03b1f6Smrg      need_lib_prefix=no
17116f03b1f6Smrg      export_dynamic_flag_spec='${wl}-Blargedynsym'
17126f03b1f6Smrg      runpath_var=LD_RUN_PATH
17136f03b1f6Smrg      ;;
17146f03b1f6Smrg    siemens)
17156f03b1f6Smrg      need_lib_prefix=no
17166f03b1f6Smrg      ;;
17176f03b1f6Smrg    motorola)
17186f03b1f6Smrg      need_lib_prefix=no
17196f03b1f6Smrg      need_version=no
17206f03b1f6Smrg      shlibpath_overrides_runpath=no
17216f03b1f6Smrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
17226f03b1f6Smrg      ;;
17236f03b1f6Smrg  esac
17246f03b1f6Smrg  ;;
17256f03b1f6Smrg
17266f03b1f6Smrgsysv4*MP*)
17276f03b1f6Smrg  if test -d /usr/nec ;then
17286f03b1f6Smrg    version_type=linux
17296f03b1f6Smrg    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
17306f03b1f6Smrg    soname_spec='$libname${shared_ext}.$major'
17316f03b1f6Smrg    shlibpath_var=LD_LIBRARY_PATH
17326f03b1f6Smrg  fi
17336f03b1f6Smrg  ;;
17346f03b1f6Smrg
17356f03b1f6Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
17366f03b1f6Smrg  version_type=freebsd-elf
17376f03b1f6Smrg  need_lib_prefix=no
17386f03b1f6Smrg  need_version=no
17396f03b1f6Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
17406f03b1f6Smrg  soname_spec='${libname}${release}${shared_ext}$major'
17416f03b1f6Smrg  shlibpath_var=LD_LIBRARY_PATH
17426f03b1f6Smrg  hardcode_into_libs=yes
17436f03b1f6Smrg  if test "$with_gnu_ld" = yes; then
17446f03b1f6Smrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
17456f03b1f6Smrg    shlibpath_overrides_runpath=no
17466f03b1f6Smrg  else
17476f03b1f6Smrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
17486f03b1f6Smrg    shlibpath_overrides_runpath=yes
17496f03b1f6Smrg    case $host_os in
17506f03b1f6Smrg      sco3.2v5*)
17516f03b1f6Smrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
17526f03b1f6Smrg	;;
17536f03b1f6Smrg    esac
17546f03b1f6Smrg  fi
17556f03b1f6Smrg  sys_lib_dlsearch_path_spec='/usr/lib'
17566f03b1f6Smrg  ;;
17576f03b1f6Smrg
17586f03b1f6Smrguts4*)
17596f03b1f6Smrg  version_type=linux
17606f03b1f6Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
17616f03b1f6Smrg  soname_spec='${libname}${release}${shared_ext}$major'
17626f03b1f6Smrg  shlibpath_var=LD_LIBRARY_PATH
17636f03b1f6Smrg  ;;
17646f03b1f6Smrg
17656f03b1f6Smrg*)
17666f03b1f6Smrg  dynamic_linker=no
17676f03b1f6Smrg  ;;
17686f03b1f6Smrgesac
17696f03b1f6SmrgAC_MSG_RESULT([$dynamic_linker])
17706f03b1f6Smrgtest "$dynamic_linker" = no && can_build_shared=no
17716f03b1f6Smrg
17726f03b1f6Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
17736f03b1f6Smrgif test "$GCC" = yes; then
17746f03b1f6Smrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
17756f03b1f6Smrgfi
17766f03b1f6Smrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
17776f03b1f6Smrg
17786f03b1f6Smrg
17796f03b1f6Smrg# _LT_AC_TAGCONFIG
17806f03b1f6Smrg# ----------------
17816f03b1f6SmrgAC_DEFUN([_LT_AC_TAGCONFIG],
17826f03b1f6Smrg[AC_ARG_WITH([tags],
17836f03b1f6Smrg    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
17846f03b1f6Smrg        [include additional configurations @<:@automatic@:>@])],
17856f03b1f6Smrg    [tagnames="$withval"])
17866f03b1f6Smrg
17876f03b1f6Smrgif test -f "$ltmain" && test -n "$tagnames"; then
17886f03b1f6Smrg  if test ! -f "${ofile}"; then
17896f03b1f6Smrg    AC_MSG_WARN([output file `$ofile' does not exist])
17906f03b1f6Smrg  fi
17916f03b1f6Smrg
17926f03b1f6Smrg  if test -z "$LTCC"; then
17936f03b1f6Smrg    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
17946f03b1f6Smrg    if test -z "$LTCC"; then
17956f03b1f6Smrg      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
17966f03b1f6Smrg    else
17976f03b1f6Smrg      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
17986f03b1f6Smrg    fi
17996f03b1f6Smrg  fi
18006f03b1f6Smrg  if test -z "$LTCFLAGS"; then
18016f03b1f6Smrg    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
18026f03b1f6Smrg  fi
18036f03b1f6Smrg
18046f03b1f6Smrg  # Extract list of available tagged configurations in $ofile.
18056f03b1f6Smrg  # Note that this assumes the entire list is on one line.
18066f03b1f6Smrg  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
18076f03b1f6Smrg
18086f03b1f6Smrg  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
18096f03b1f6Smrg  for tagname in $tagnames; do
18106f03b1f6Smrg    IFS="$lt_save_ifs"
18116f03b1f6Smrg    # Check whether tagname contains only valid characters
18126f03b1f6Smrg    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
18136f03b1f6Smrg    "") ;;
18146f03b1f6Smrg    *)  AC_MSG_ERROR([invalid tag name: $tagname])
18156f03b1f6Smrg	;;
18166f03b1f6Smrg    esac
18176f03b1f6Smrg
18186f03b1f6Smrg    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
18196f03b1f6Smrg    then
18206f03b1f6Smrg      AC_MSG_ERROR([tag name \"$tagname\" already exists])
18216f03b1f6Smrg    fi
18226f03b1f6Smrg
18236f03b1f6Smrg    # Update the list of available tags.
18246f03b1f6Smrg    if test -n "$tagname"; then
18256f03b1f6Smrg      echo appending configuration tag \"$tagname\" to $ofile
18266f03b1f6Smrg
18276f03b1f6Smrg      case $tagname in
18286f03b1f6Smrg      CXX)
18296f03b1f6Smrg	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
18306f03b1f6Smrg	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
18316f03b1f6Smrg	    (test "X$CXX" != "Xg++"))) ; then
18326f03b1f6Smrg	  AC_LIBTOOL_LANG_CXX_CONFIG
18336f03b1f6Smrg	else
18346f03b1f6Smrg	  tagname=""
18356f03b1f6Smrg	fi
18366f03b1f6Smrg	;;
18376f03b1f6Smrg
18386f03b1f6Smrg      F77)
18396f03b1f6Smrg	if test -n "$F77" && test "X$F77" != "Xno"; then
18406f03b1f6Smrg	  AC_LIBTOOL_LANG_F77_CONFIG
18416f03b1f6Smrg	else
18426f03b1f6Smrg	  tagname=""
18436f03b1f6Smrg	fi
18446f03b1f6Smrg	;;
18456f03b1f6Smrg
18466f03b1f6Smrg      GCJ)
18476f03b1f6Smrg	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
18486f03b1f6Smrg	  AC_LIBTOOL_LANG_GCJ_CONFIG
18496f03b1f6Smrg	else
18506f03b1f6Smrg	  tagname=""
18516f03b1f6Smrg	fi
18526f03b1f6Smrg	;;
18536f03b1f6Smrg
18546f03b1f6Smrg      RC)
18556f03b1f6Smrg	AC_LIBTOOL_LANG_RC_CONFIG
18566f03b1f6Smrg	;;
18576f03b1f6Smrg
18586f03b1f6Smrg      *)
18596f03b1f6Smrg	AC_MSG_ERROR([Unsupported tag name: $tagname])
18606f03b1f6Smrg	;;
18616f03b1f6Smrg      esac
18626f03b1f6Smrg
18636f03b1f6Smrg      # Append the new tag name to the list of available tags.
18646f03b1f6Smrg      if test -n "$tagname" ; then
18656f03b1f6Smrg      available_tags="$available_tags $tagname"
18666f03b1f6Smrg    fi
18676f03b1f6Smrg    fi
18686f03b1f6Smrg  done
18696f03b1f6Smrg  IFS="$lt_save_ifs"
18706f03b1f6Smrg
18716f03b1f6Smrg  # Now substitute the updated list of available tags.
18726f03b1f6Smrg  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
18736f03b1f6Smrg    mv "${ofile}T" "$ofile"
18746f03b1f6Smrg    chmod +x "$ofile"
18756f03b1f6Smrg  else
18766f03b1f6Smrg    rm -f "${ofile}T"
18776f03b1f6Smrg    AC_MSG_ERROR([unable to update list of available tagged configurations.])
18786f03b1f6Smrg  fi
18796f03b1f6Smrgfi
18806f03b1f6Smrg])# _LT_AC_TAGCONFIG
18816f03b1f6Smrg
18826f03b1f6Smrg
18836f03b1f6Smrg# AC_LIBTOOL_DLOPEN
18846f03b1f6Smrg# -----------------
18856f03b1f6Smrg# enable checks for dlopen support
18866f03b1f6SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN],
18876f03b1f6Smrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
18886f03b1f6Smrg])# AC_LIBTOOL_DLOPEN
18896f03b1f6Smrg
18906f03b1f6Smrg
18916f03b1f6Smrg# AC_LIBTOOL_WIN32_DLL
18926f03b1f6Smrg# --------------------
18936f03b1f6Smrg# declare package support for building win32 DLLs
18946f03b1f6SmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL],
18956f03b1f6Smrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
18966f03b1f6Smrg])# AC_LIBTOOL_WIN32_DLL
18976f03b1f6Smrg
18986f03b1f6Smrg
18996f03b1f6Smrg# AC_ENABLE_SHARED([DEFAULT])
19006f03b1f6Smrg# ---------------------------
19016f03b1f6Smrg# implement the --enable-shared flag
19026f03b1f6Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
19036f03b1f6SmrgAC_DEFUN([AC_ENABLE_SHARED],
19046f03b1f6Smrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
19056f03b1f6SmrgAC_ARG_ENABLE([shared],
19066f03b1f6Smrg    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
19076f03b1f6Smrg	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
19086f03b1f6Smrg    [p=${PACKAGE-default}
19096f03b1f6Smrg    case $enableval in
19106f03b1f6Smrg    yes) enable_shared=yes ;;
19116f03b1f6Smrg    no) enable_shared=no ;;
19126f03b1f6Smrg    *)
19136f03b1f6Smrg      enable_shared=no
19146f03b1f6Smrg      # Look at the argument we got.  We use all the common list separators.
19156f03b1f6Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
19166f03b1f6Smrg      for pkg in $enableval; do
19176f03b1f6Smrg	IFS="$lt_save_ifs"
19186f03b1f6Smrg	if test "X$pkg" = "X$p"; then
19196f03b1f6Smrg	  enable_shared=yes
19206f03b1f6Smrg	fi
19216f03b1f6Smrg      done
19226f03b1f6Smrg      IFS="$lt_save_ifs"
19236f03b1f6Smrg      ;;
19246f03b1f6Smrg    esac],
19256f03b1f6Smrg    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
19266f03b1f6Smrg])# AC_ENABLE_SHARED
19276f03b1f6Smrg
19286f03b1f6Smrg
19296f03b1f6Smrg# AC_DISABLE_SHARED
19306f03b1f6Smrg# -----------------
19316f03b1f6Smrg# set the default shared flag to --disable-shared
19326f03b1f6SmrgAC_DEFUN([AC_DISABLE_SHARED],
19336f03b1f6Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
19346f03b1f6SmrgAC_ENABLE_SHARED(no)
19356f03b1f6Smrg])# AC_DISABLE_SHARED
19366f03b1f6Smrg
19376f03b1f6Smrg
19386f03b1f6Smrg# AC_ENABLE_STATIC([DEFAULT])
19396f03b1f6Smrg# ---------------------------
19406f03b1f6Smrg# implement the --enable-static flag
19416f03b1f6Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
19426f03b1f6SmrgAC_DEFUN([AC_ENABLE_STATIC],
19436f03b1f6Smrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
19446f03b1f6SmrgAC_ARG_ENABLE([static],
19456f03b1f6Smrg    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
19466f03b1f6Smrg	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
19476f03b1f6Smrg    [p=${PACKAGE-default}
19486f03b1f6Smrg    case $enableval in
19496f03b1f6Smrg    yes) enable_static=yes ;;
19506f03b1f6Smrg    no) enable_static=no ;;
19516f03b1f6Smrg    *)
19526f03b1f6Smrg     enable_static=no
19536f03b1f6Smrg      # Look at the argument we got.  We use all the common list separators.
19546f03b1f6Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
19556f03b1f6Smrg      for pkg in $enableval; do
19566f03b1f6Smrg	IFS="$lt_save_ifs"
19576f03b1f6Smrg	if test "X$pkg" = "X$p"; then
19586f03b1f6Smrg	  enable_static=yes
19596f03b1f6Smrg	fi
19606f03b1f6Smrg      done
19616f03b1f6Smrg      IFS="$lt_save_ifs"
19626f03b1f6Smrg      ;;
19636f03b1f6Smrg    esac],
19646f03b1f6Smrg    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
19656f03b1f6Smrg])# AC_ENABLE_STATIC
19666f03b1f6Smrg
19676f03b1f6Smrg
19686f03b1f6Smrg# AC_DISABLE_STATIC
19696f03b1f6Smrg# -----------------
19706f03b1f6Smrg# set the default static flag to --disable-static
19716f03b1f6SmrgAC_DEFUN([AC_DISABLE_STATIC],
19726f03b1f6Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
19736f03b1f6SmrgAC_ENABLE_STATIC(no)
19746f03b1f6Smrg])# AC_DISABLE_STATIC
19756f03b1f6Smrg
19766f03b1f6Smrg
19776f03b1f6Smrg# AC_ENABLE_FAST_INSTALL([DEFAULT])
19786f03b1f6Smrg# ---------------------------------
19796f03b1f6Smrg# implement the --enable-fast-install flag
19806f03b1f6Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
19816f03b1f6SmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL],
19826f03b1f6Smrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
19836f03b1f6SmrgAC_ARG_ENABLE([fast-install],
19846f03b1f6Smrg    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
19856f03b1f6Smrg    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
19866f03b1f6Smrg    [p=${PACKAGE-default}
19876f03b1f6Smrg    case $enableval in
19886f03b1f6Smrg    yes) enable_fast_install=yes ;;
19896f03b1f6Smrg    no) enable_fast_install=no ;;
19906f03b1f6Smrg    *)
19916f03b1f6Smrg      enable_fast_install=no
19926f03b1f6Smrg      # Look at the argument we got.  We use all the common list separators.
19936f03b1f6Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
19946f03b1f6Smrg      for pkg in $enableval; do
19956f03b1f6Smrg	IFS="$lt_save_ifs"
19966f03b1f6Smrg	if test "X$pkg" = "X$p"; then
19976f03b1f6Smrg	  enable_fast_install=yes
19986f03b1f6Smrg	fi
19996f03b1f6Smrg      done
20006f03b1f6Smrg      IFS="$lt_save_ifs"
20016f03b1f6Smrg      ;;
20026f03b1f6Smrg    esac],
20036f03b1f6Smrg    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
20046f03b1f6Smrg])# AC_ENABLE_FAST_INSTALL
20056f03b1f6Smrg
20066f03b1f6Smrg
20076f03b1f6Smrg# AC_DISABLE_FAST_INSTALL
20086f03b1f6Smrg# -----------------------
20096f03b1f6Smrg# set the default to --disable-fast-install
20106f03b1f6SmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL],
20116f03b1f6Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
20126f03b1f6SmrgAC_ENABLE_FAST_INSTALL(no)
20136f03b1f6Smrg])# AC_DISABLE_FAST_INSTALL
20146f03b1f6Smrg
20156f03b1f6Smrg
20166f03b1f6Smrg# AC_LIBTOOL_PICMODE([MODE])
20176f03b1f6Smrg# --------------------------
20186f03b1f6Smrg# implement the --with-pic flag
20196f03b1f6Smrg# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
20206f03b1f6SmrgAC_DEFUN([AC_LIBTOOL_PICMODE],
20216f03b1f6Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
20226f03b1f6Smrgpic_mode=ifelse($#,1,$1,default)
20236f03b1f6Smrg])# AC_LIBTOOL_PICMODE
20246f03b1f6Smrg
20256f03b1f6Smrg
20266f03b1f6Smrg# AC_PROG_EGREP
20276f03b1f6Smrg# -------------
20286f03b1f6Smrg# This is predefined starting with Autoconf 2.54, so this conditional
20296f03b1f6Smrg# definition can be removed once we require Autoconf 2.54 or later.
20306f03b1f6Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
20316f03b1f6Smrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
20326f03b1f6Smrg   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
20336f03b1f6Smrg    then ac_cv_prog_egrep='grep -E'
20346f03b1f6Smrg    else ac_cv_prog_egrep='egrep'
20356f03b1f6Smrg    fi])
20366f03b1f6Smrg EGREP=$ac_cv_prog_egrep
20376f03b1f6Smrg AC_SUBST([EGREP])
20386f03b1f6Smrg])])
20396f03b1f6Smrg
20406f03b1f6Smrg
20416f03b1f6Smrg# AC_PATH_TOOL_PREFIX
20426f03b1f6Smrg# -------------------
20436f03b1f6Smrg# find a file program which can recognise shared library
20446f03b1f6SmrgAC_DEFUN([AC_PATH_TOOL_PREFIX],
20456f03b1f6Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl
20466f03b1f6SmrgAC_MSG_CHECKING([for $1])
20476f03b1f6SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
20486f03b1f6Smrg[case $MAGIC_CMD in
20496f03b1f6Smrg[[\\/*] |  ?:[\\/]*])
20506f03b1f6Smrg  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
20516f03b1f6Smrg  ;;
20526f03b1f6Smrg*)
20536f03b1f6Smrg  lt_save_MAGIC_CMD="$MAGIC_CMD"
20546f03b1f6Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
20556f03b1f6Smrgdnl $ac_dummy forces splitting on constant user-supplied paths.
20566f03b1f6Smrgdnl POSIX.2 word splitting is done only on the output of word expansions,
20576f03b1f6Smrgdnl not every word.  This closes a longstanding sh security hole.
20586f03b1f6Smrg  ac_dummy="ifelse([$2], , $PATH, [$2])"
20596f03b1f6Smrg  for ac_dir in $ac_dummy; do
20606f03b1f6Smrg    IFS="$lt_save_ifs"
20616f03b1f6Smrg    test -z "$ac_dir" && ac_dir=.
20626f03b1f6Smrg    if test -f $ac_dir/$1; then
20636f03b1f6Smrg      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
20646f03b1f6Smrg      if test -n "$file_magic_test_file"; then
20656f03b1f6Smrg	case $deplibs_check_method in
20666f03b1f6Smrg	"file_magic "*)
20676f03b1f6Smrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
20686f03b1f6Smrg	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
20696f03b1f6Smrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
20706f03b1f6Smrg	    $EGREP "$file_magic_regex" > /dev/null; then
20716f03b1f6Smrg	    :
20726f03b1f6Smrg	  else
20736f03b1f6Smrg	    cat <<EOF 1>&2
20746f03b1f6Smrg
20756f03b1f6Smrg*** Warning: the command libtool uses to detect shared libraries,
20766f03b1f6Smrg*** $file_magic_cmd, produces output that libtool cannot recognize.
20776f03b1f6Smrg*** The result is that libtool may fail to recognize shared libraries
20786f03b1f6Smrg*** as such.  This will affect the creation of libtool libraries that
20796f03b1f6Smrg*** depend on shared libraries, but programs linked with such libtool
20806f03b1f6Smrg*** libraries will work regardless of this problem.  Nevertheless, you
20816f03b1f6Smrg*** may want to report the problem to your system manager and/or to
20826f03b1f6Smrg*** bug-libtool@gnu.org
20836f03b1f6Smrg
20846f03b1f6SmrgEOF
20856f03b1f6Smrg	  fi ;;
20866f03b1f6Smrg	esac
20876f03b1f6Smrg      fi
20886f03b1f6Smrg      break
20896f03b1f6Smrg    fi
20906f03b1f6Smrg  done
20916f03b1f6Smrg  IFS="$lt_save_ifs"
20926f03b1f6Smrg  MAGIC_CMD="$lt_save_MAGIC_CMD"
20936f03b1f6Smrg  ;;
20946f03b1f6Smrgesac])
20956f03b1f6SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
20966f03b1f6Smrgif test -n "$MAGIC_CMD"; then
20976f03b1f6Smrg  AC_MSG_RESULT($MAGIC_CMD)
20986f03b1f6Smrgelse
20996f03b1f6Smrg  AC_MSG_RESULT(no)
21006f03b1f6Smrgfi
21016f03b1f6Smrg])# AC_PATH_TOOL_PREFIX
21026f03b1f6Smrg
21036f03b1f6Smrg
21046f03b1f6Smrg# AC_PATH_MAGIC
21056f03b1f6Smrg# -------------
21066f03b1f6Smrg# find a file program which can recognise a shared library
21076f03b1f6SmrgAC_DEFUN([AC_PATH_MAGIC],
21086f03b1f6Smrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
21096f03b1f6Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then
21106f03b1f6Smrg  if test -n "$ac_tool_prefix"; then
21116f03b1f6Smrg    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
21126f03b1f6Smrg  else
21136f03b1f6Smrg    MAGIC_CMD=:
21146f03b1f6Smrg  fi
21156f03b1f6Smrgfi
21166f03b1f6Smrg])# AC_PATH_MAGIC
21176f03b1f6Smrg
21186f03b1f6Smrg
21196f03b1f6Smrg# AC_PROG_LD
21206f03b1f6Smrg# ----------
21216f03b1f6Smrg# find the pathname to the GNU or non-GNU linker
21226f03b1f6SmrgAC_DEFUN([AC_PROG_LD],
21236f03b1f6Smrg[AC_ARG_WITH([gnu-ld],
21246f03b1f6Smrg    [AC_HELP_STRING([--with-gnu-ld],
21256f03b1f6Smrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
21266f03b1f6Smrg    [test "$withval" = no || with_gnu_ld=yes],
21276f03b1f6Smrg    [with_gnu_ld=no])
21286f03b1f6SmrgAC_REQUIRE([LT_AC_PROG_SED])dnl
21296f03b1f6SmrgAC_REQUIRE([AC_PROG_CC])dnl
21306f03b1f6SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
21316f03b1f6SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
21326f03b1f6Smrgac_prog=ld
21336f03b1f6Smrgif test "$GCC" = yes; then
21346f03b1f6Smrg  # Check if gcc -print-prog-name=ld gives a path.
21356f03b1f6Smrg  AC_MSG_CHECKING([for ld used by $CC])
21366f03b1f6Smrg  case $host in
21376f03b1f6Smrg  *-*-mingw*)
21386f03b1f6Smrg    # gcc leaves a trailing carriage return which upsets mingw
21396f03b1f6Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
21406f03b1f6Smrg  *)
21416f03b1f6Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
21426f03b1f6Smrg  esac
21436f03b1f6Smrg  case $ac_prog in
21446f03b1f6Smrg    # Accept absolute paths.
21456f03b1f6Smrg    [[\\/]]* | ?:[[\\/]]*)
21466f03b1f6Smrg      re_direlt='/[[^/]][[^/]]*/\.\./'
21476f03b1f6Smrg      # Canonicalize the pathname of ld
21486f03b1f6Smrg      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
21496f03b1f6Smrg      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
21506f03b1f6Smrg	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
21516f03b1f6Smrg      done
21526f03b1f6Smrg      test -z "$LD" && LD="$ac_prog"
21536f03b1f6Smrg      ;;
21546f03b1f6Smrg  "")
21556f03b1f6Smrg    # If it fails, then pretend we aren't using GCC.
21566f03b1f6Smrg    ac_prog=ld
21576f03b1f6Smrg    ;;
21586f03b1f6Smrg  *)
21596f03b1f6Smrg    # If it is relative, then search for the first ld in PATH.
21606f03b1f6Smrg    with_gnu_ld=unknown
21616f03b1f6Smrg    ;;
21626f03b1f6Smrg  esac
21636f03b1f6Smrgelif test "$with_gnu_ld" = yes; then
21646f03b1f6Smrg  AC_MSG_CHECKING([for GNU ld])
21656f03b1f6Smrgelse
21666f03b1f6Smrg  AC_MSG_CHECKING([for non-GNU ld])
21676f03b1f6Smrgfi
21686f03b1f6SmrgAC_CACHE_VAL(lt_cv_path_LD,
21696f03b1f6Smrg[if test -z "$LD"; then
21706f03b1f6Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
21716f03b1f6Smrg  for ac_dir in $PATH; do
21726f03b1f6Smrg    IFS="$lt_save_ifs"
21736f03b1f6Smrg    test -z "$ac_dir" && ac_dir=.
21746f03b1f6Smrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
21756f03b1f6Smrg      lt_cv_path_LD="$ac_dir/$ac_prog"
21766f03b1f6Smrg      # Check to see if the program is GNU ld.  I'd rather use --version,
21776f03b1f6Smrg      # but apparently some variants of GNU ld only accept -v.
21786f03b1f6Smrg      # Break only if it was the GNU/non-GNU ld that we prefer.
21796f03b1f6Smrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
21806f03b1f6Smrg      *GNU* | *'with BFD'*)
21816f03b1f6Smrg	test "$with_gnu_ld" != no && break
21826f03b1f6Smrg	;;
21836f03b1f6Smrg      *)
21846f03b1f6Smrg	test "$with_gnu_ld" != yes && break
21856f03b1f6Smrg	;;
21866f03b1f6Smrg      esac
21876f03b1f6Smrg    fi
21886f03b1f6Smrg  done
21896f03b1f6Smrg  IFS="$lt_save_ifs"
21906f03b1f6Smrgelse
21916f03b1f6Smrg  lt_cv_path_LD="$LD" # Let the user override the test with a path.
21926f03b1f6Smrgfi])
21936f03b1f6SmrgLD="$lt_cv_path_LD"
21946f03b1f6Smrgif test -n "$LD"; then
21956f03b1f6Smrg  AC_MSG_RESULT($LD)
21966f03b1f6Smrgelse
21976f03b1f6Smrg  AC_MSG_RESULT(no)
21986f03b1f6Smrgfi
21996f03b1f6Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
22006f03b1f6SmrgAC_PROG_LD_GNU
22016f03b1f6Smrg])# AC_PROG_LD
22026f03b1f6Smrg
22036f03b1f6Smrg
22046f03b1f6Smrg# AC_PROG_LD_GNU
22056f03b1f6Smrg# --------------
22066f03b1f6SmrgAC_DEFUN([AC_PROG_LD_GNU],
22076f03b1f6Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl
22086f03b1f6SmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
22096f03b1f6Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
22106f03b1f6Smrgcase `$LD -v 2>&1 </dev/null` in
22116f03b1f6Smrg*GNU* | *'with BFD'*)
22126f03b1f6Smrg  lt_cv_prog_gnu_ld=yes
22136f03b1f6Smrg  ;;
22146f03b1f6Smrg*)
22156f03b1f6Smrg  lt_cv_prog_gnu_ld=no
22166f03b1f6Smrg  ;;
22176f03b1f6Smrgesac])
22186f03b1f6Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld
22196f03b1f6Smrg])# AC_PROG_LD_GNU
22206f03b1f6Smrg
22216f03b1f6Smrg
22226f03b1f6Smrg# AC_PROG_LD_RELOAD_FLAG
22236f03b1f6Smrg# ----------------------
22246f03b1f6Smrg# find reload flag for linker
22256f03b1f6Smrg#   -- PORTME Some linkers may need a different reload flag.
22266f03b1f6SmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
22276f03b1f6Smrg[AC_CACHE_CHECK([for $LD option to reload object files],
22286f03b1f6Smrg  lt_cv_ld_reload_flag,
22296f03b1f6Smrg  [lt_cv_ld_reload_flag='-r'])
22306f03b1f6Smrgreload_flag=$lt_cv_ld_reload_flag
22316f03b1f6Smrgcase $reload_flag in
22326f03b1f6Smrg"" | " "*) ;;
22336f03b1f6Smrg*) reload_flag=" $reload_flag" ;;
22346f03b1f6Smrgesac
22356f03b1f6Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
22366f03b1f6Smrgcase $host_os in
22376f03b1f6Smrg  darwin*)
22386f03b1f6Smrg    if test "$GCC" = yes; then
22396f03b1f6Smrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
22406f03b1f6Smrg    else
22416f03b1f6Smrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
22426f03b1f6Smrg    fi
22436f03b1f6Smrg    ;;
22446f03b1f6Smrgesac
22456f03b1f6Smrg])# AC_PROG_LD_RELOAD_FLAG
22466f03b1f6Smrg
22476f03b1f6Smrg
22486f03b1f6Smrg# AC_DEPLIBS_CHECK_METHOD
22496f03b1f6Smrg# -----------------------
22506f03b1f6Smrg# how to check for library dependencies
22516f03b1f6Smrg#  -- PORTME fill in with the dynamic library characteristics
22526f03b1f6SmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
22536f03b1f6Smrg[AC_CACHE_CHECK([how to recognise dependent libraries],
22546f03b1f6Smrglt_cv_deplibs_check_method,
22556f03b1f6Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
22566f03b1f6Smrglt_cv_file_magic_test_file=
22576f03b1f6Smrglt_cv_deplibs_check_method='unknown'
22586f03b1f6Smrg# Need to set the preceding variable on all platforms that support
22596f03b1f6Smrg# interlibrary dependencies.
22606f03b1f6Smrg# 'none' -- dependencies not supported.
22616f03b1f6Smrg# `unknown' -- same as none, but documents that we really don't know.
22626f03b1f6Smrg# 'pass_all' -- all dependencies passed with no checks.
22636f03b1f6Smrg# 'test_compile' -- check by making test program.
22646f03b1f6Smrg# 'file_magic [[regex]]' -- check by looking for files in library path
22656f03b1f6Smrg# which responds to the $file_magic_cmd with a given extended regex.
22666f03b1f6Smrg# If you have `file' or equivalent on your system and you're not sure
22676f03b1f6Smrg# whether `pass_all' will *always* work, you probably want this one.
22686f03b1f6Smrg
22696f03b1f6Smrgcase $host_os in
22706f03b1f6Smrgaix4* | aix5*)
22716f03b1f6Smrg  lt_cv_deplibs_check_method=pass_all
22726f03b1f6Smrg  ;;
22736f03b1f6Smrg
22746f03b1f6Smrgbeos*)
22756f03b1f6Smrg  lt_cv_deplibs_check_method=pass_all
22766f03b1f6Smrg  ;;
22776f03b1f6Smrg
22786f03b1f6Smrgbsdi[[45]]*)
22796f03b1f6Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
22806f03b1f6Smrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
22816f03b1f6Smrg  lt_cv_file_magic_test_file=/shlib/libc.so
22826f03b1f6Smrg  ;;
22836f03b1f6Smrg
22846f03b1f6Smrgcygwin*)
22856f03b1f6Smrg  # func_win32_libid is a shell function defined in ltmain.sh
22866f03b1f6Smrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
22876f03b1f6Smrg  lt_cv_file_magic_cmd='func_win32_libid'
22886f03b1f6Smrg  ;;
22896f03b1f6Smrg
22906f03b1f6Smrgmingw* | pw32*)
22916f03b1f6Smrg  # Base MSYS/MinGW do not provide the 'file' command needed by
22926f03b1f6Smrg  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
22936f03b1f6Smrg  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
22946f03b1f6Smrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
22956f03b1f6Smrg  ;;
22966f03b1f6Smrg
22976f03b1f6Smrgdarwin* | rhapsody*)
22986f03b1f6Smrg  lt_cv_deplibs_check_method=pass_all
22996f03b1f6Smrg  ;;
23006f03b1f6Smrg
23016f03b1f6Smrgfreebsd* | dragonfly*)
23026f03b1f6Smrg  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
23036f03b1f6Smrg    case $host_cpu in
23046f03b1f6Smrg    i*86 )
23056f03b1f6Smrg      # Not sure whether the presence of OpenBSD here was a mistake.
23066f03b1f6Smrg      # Let's accept both of them until this is cleared up.
23076f03b1f6Smrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
23086f03b1f6Smrg      lt_cv_file_magic_cmd=/usr/bin/file
23096f03b1f6Smrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
23106f03b1f6Smrg      ;;
23116f03b1f6Smrg    esac
23126f03b1f6Smrg  else
23136f03b1f6Smrg    lt_cv_deplibs_check_method=pass_all
23146f03b1f6Smrg  fi
23156f03b1f6Smrg  ;;
23166f03b1f6Smrg
23176f03b1f6Smrggnu*)
23186f03b1f6Smrg  lt_cv_deplibs_check_method=pass_all
23196f03b1f6Smrg  ;;
23206f03b1f6Smrg
23216f03b1f6Smrghpux10.20* | hpux11*)
23226f03b1f6Smrg  lt_cv_file_magic_cmd=/usr/bin/file
23236f03b1f6Smrg  case $host_cpu in
23246f03b1f6Smrg  ia64*)
23256f03b1f6Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
23266f03b1f6Smrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
23276f03b1f6Smrg    ;;
23286f03b1f6Smrg  hppa*64*)
23296f03b1f6Smrg    [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]']
23306f03b1f6Smrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
23316f03b1f6Smrg    ;;
23326f03b1f6Smrg  *)
23336f03b1f6Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
23346f03b1f6Smrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
23356f03b1f6Smrg    ;;
23366f03b1f6Smrg  esac
23376f03b1f6Smrg  ;;
23386f03b1f6Smrg
23396f03b1f6Smrginterix3*)
23406f03b1f6Smrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
23416f03b1f6Smrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
23426f03b1f6Smrg  ;;
23436f03b1f6Smrg
23446f03b1f6Smrgirix5* | irix6* | nonstopux*)
23456f03b1f6Smrg  case $LD in
23466f03b1f6Smrg  *-32|*"-32 ") libmagic=32-bit;;
23476f03b1f6Smrg  *-n32|*"-n32 ") libmagic=N32;;
23486f03b1f6Smrg  *-64|*"-64 ") libmagic=64-bit;;
23496f03b1f6Smrg  *) libmagic=never-match;;
23506f03b1f6Smrg  esac
23516f03b1f6Smrg  lt_cv_deplibs_check_method=pass_all
23526f03b1f6Smrg  ;;
23536f03b1f6Smrg
23546f03b1f6Smrg# This must be Linux ELF.
23556f03b1f6Smrglinux* | k*bsd*-gnu)
23566f03b1f6Smrg  lt_cv_deplibs_check_method=pass_all
23576f03b1f6Smrg  ;;
23586f03b1f6Smrg
23596f03b1f6Smrgnetbsd* | netbsdelf*-gnu)
23606f03b1f6Smrg  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
23616f03b1f6Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
23626f03b1f6Smrg  else
23636f03b1f6Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
23646f03b1f6Smrg  fi
23656f03b1f6Smrg  ;;
23666f03b1f6Smrg
23676f03b1f6Smrgnewos6*)
23686f03b1f6Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
23696f03b1f6Smrg  lt_cv_file_magic_cmd=/usr/bin/file
23706f03b1f6Smrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
23716f03b1f6Smrg  ;;
23726f03b1f6Smrg
23736f03b1f6Smrgnto-qnx*)
23746f03b1f6Smrg  lt_cv_deplibs_check_method=unknown
23756f03b1f6Smrg  ;;
23766f03b1f6Smrg
23776f03b1f6Smrgopenbsd*)
23786f03b1f6Smrg  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
23796f03b1f6Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
23806f03b1f6Smrg  else
23816f03b1f6Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
23826f03b1f6Smrg  fi
23836f03b1f6Smrg  ;;
23846f03b1f6Smrg
23856f03b1f6Smrgosf3* | osf4* | osf5*)
23866f03b1f6Smrg  lt_cv_deplibs_check_method=pass_all
23876f03b1f6Smrg  ;;
23886f03b1f6Smrg
23896f03b1f6Smrgsolaris*)
23906f03b1f6Smrg  lt_cv_deplibs_check_method=pass_all
23916f03b1f6Smrg  ;;
23926f03b1f6Smrg
23936f03b1f6Smrgsysv4 | sysv4.3*)
23946f03b1f6Smrg  case $host_vendor in
23956f03b1f6Smrg  motorola)
23966f03b1f6Smrg    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]]'
23976f03b1f6Smrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
23986f03b1f6Smrg    ;;
23996f03b1f6Smrg  ncr)
24006f03b1f6Smrg    lt_cv_deplibs_check_method=pass_all
24016f03b1f6Smrg    ;;
24026f03b1f6Smrg  sequent)
24036f03b1f6Smrg    lt_cv_file_magic_cmd='/bin/file'
24046f03b1f6Smrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
24056f03b1f6Smrg    ;;
24066f03b1f6Smrg  sni)
24076f03b1f6Smrg    lt_cv_file_magic_cmd='/bin/file'
24086f03b1f6Smrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
24096f03b1f6Smrg    lt_cv_file_magic_test_file=/lib/libc.so
24106f03b1f6Smrg    ;;
24116f03b1f6Smrg  siemens)
24126f03b1f6Smrg    lt_cv_deplibs_check_method=pass_all
24136f03b1f6Smrg    ;;
24146f03b1f6Smrg  pc)
24156f03b1f6Smrg    lt_cv_deplibs_check_method=pass_all
24166f03b1f6Smrg    ;;
24176f03b1f6Smrg  esac
24186f03b1f6Smrg  ;;
24196f03b1f6Smrg
24206f03b1f6Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
24216f03b1f6Smrg  lt_cv_deplibs_check_method=pass_all
24226f03b1f6Smrg  ;;
24236f03b1f6Smrgesac
24246f03b1f6Smrg])
24256f03b1f6Smrgfile_magic_cmd=$lt_cv_file_magic_cmd
24266f03b1f6Smrgdeplibs_check_method=$lt_cv_deplibs_check_method
24276f03b1f6Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
24286f03b1f6Smrg])# AC_DEPLIBS_CHECK_METHOD
24296f03b1f6Smrg
24306f03b1f6Smrg
24316f03b1f6Smrg# AC_PROG_NM
24326f03b1f6Smrg# ----------
24336f03b1f6Smrg# find the pathname to a BSD-compatible name lister
24346f03b1f6SmrgAC_DEFUN([AC_PROG_NM],
24356f03b1f6Smrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
24366f03b1f6Smrg[if test -n "$NM"; then
24376f03b1f6Smrg  # Let the user override the test.
24386f03b1f6Smrg  lt_cv_path_NM="$NM"
24396f03b1f6Smrgelse
24406f03b1f6Smrg  lt_nm_to_check="${ac_tool_prefix}nm"
24416f03b1f6Smrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 
24426f03b1f6Smrg    lt_nm_to_check="$lt_nm_to_check nm"
24436f03b1f6Smrg  fi
24446f03b1f6Smrg  for lt_tmp_nm in $lt_nm_to_check; do
24456f03b1f6Smrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
24466f03b1f6Smrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
24476f03b1f6Smrg      IFS="$lt_save_ifs"
24486f03b1f6Smrg      test -z "$ac_dir" && ac_dir=.
24496f03b1f6Smrg      tmp_nm="$ac_dir/$lt_tmp_nm"
24506f03b1f6Smrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
24516f03b1f6Smrg	# Check to see if the nm accepts a BSD-compat flag.
24526f03b1f6Smrg	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
24536f03b1f6Smrg	#   nm: unknown option "B" ignored
24546f03b1f6Smrg	# Tru64's nm complains that /dev/null is an invalid object file
24556f03b1f6Smrg	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
24566f03b1f6Smrg	*/dev/null* | *'Invalid file or object type'*)
24576f03b1f6Smrg	  lt_cv_path_NM="$tmp_nm -B"
24586f03b1f6Smrg	  break
24596f03b1f6Smrg	  ;;
24606f03b1f6Smrg	*)
24616f03b1f6Smrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
24626f03b1f6Smrg	  */dev/null*)
24636f03b1f6Smrg	    lt_cv_path_NM="$tmp_nm -p"
24646f03b1f6Smrg	    break
24656f03b1f6Smrg	    ;;
24666f03b1f6Smrg	  *)
24676f03b1f6Smrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
24686f03b1f6Smrg	    continue # so that we can try to find one that supports BSD flags
24696f03b1f6Smrg	    ;;
24706f03b1f6Smrg	  esac
24716f03b1f6Smrg	  ;;
24726f03b1f6Smrg	esac
24736f03b1f6Smrg      fi
24746f03b1f6Smrg    done
24756f03b1f6Smrg    IFS="$lt_save_ifs"
24766f03b1f6Smrg  done
24776f03b1f6Smrg  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
24786f03b1f6Smrgfi])
24796f03b1f6SmrgNM="$lt_cv_path_NM"
24806f03b1f6Smrg])# AC_PROG_NM
24816f03b1f6Smrg
24826f03b1f6Smrg
24836f03b1f6Smrg# AC_CHECK_LIBM
24846f03b1f6Smrg# -------------
24856f03b1f6Smrg# check for math library
24866f03b1f6SmrgAC_DEFUN([AC_CHECK_LIBM],
24876f03b1f6Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
24886f03b1f6SmrgLIBM=
24896f03b1f6Smrgcase $host in
24906f03b1f6Smrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
24916f03b1f6Smrg  # These system don't have libm, or don't need it
24926f03b1f6Smrg  ;;
24936f03b1f6Smrg*-ncr-sysv4.3*)
24946f03b1f6Smrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
24956f03b1f6Smrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
24966f03b1f6Smrg  ;;
24976f03b1f6Smrg*)
24986f03b1f6Smrg  AC_CHECK_LIB(m, cos, LIBM="-lm")
24996f03b1f6Smrg  ;;
25006f03b1f6Smrgesac
25016f03b1f6Smrg])# AC_CHECK_LIBM
25026f03b1f6Smrg
25036f03b1f6Smrg
25046f03b1f6Smrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
25056f03b1f6Smrg# -----------------------------------
25066f03b1f6Smrg# sets LIBLTDL to the link flags for the libltdl convenience library and
25076f03b1f6Smrg# LTDLINCL to the include flags for the libltdl header and adds
25086f03b1f6Smrg# --enable-ltdl-convenience to the configure arguments.  Note that
25096f03b1f6Smrg# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
25106f03b1f6Smrg# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
25116f03b1f6Smrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
25126f03b1f6Smrg# (note the single quotes!).  If your package is not flat and you're not
25136f03b1f6Smrg# using automake, define top_builddir and top_srcdir appropriately in
25146f03b1f6Smrg# the Makefiles.
25156f03b1f6SmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE],
25166f03b1f6Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
25176f03b1f6Smrg  case $enable_ltdl_convenience in
25186f03b1f6Smrg  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
25196f03b1f6Smrg  "") enable_ltdl_convenience=yes
25206f03b1f6Smrg      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
25216f03b1f6Smrg  esac
25226f03b1f6Smrg  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
25236f03b1f6Smrg  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
25246f03b1f6Smrg  # For backwards non-gettext consistent compatibility...
25256f03b1f6Smrg  INCLTDL="$LTDLINCL"
25266f03b1f6Smrg])# AC_LIBLTDL_CONVENIENCE
25276f03b1f6Smrg
25286f03b1f6Smrg
25296f03b1f6Smrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
25306f03b1f6Smrg# -----------------------------------
25316f03b1f6Smrg# sets LIBLTDL to the link flags for the libltdl installable library and
25326f03b1f6Smrg# LTDLINCL to the include flags for the libltdl header and adds
25336f03b1f6Smrg# --enable-ltdl-install to the configure arguments.  Note that
25346f03b1f6Smrg# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
25356f03b1f6Smrg# and an installed libltdl is not found, it is assumed to be `libltdl'.
25366f03b1f6Smrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
25376f03b1f6Smrg# '${top_srcdir}/' (note the single quotes!).  If your package is not
25386f03b1f6Smrg# flat and you're not using automake, define top_builddir and top_srcdir
25396f03b1f6Smrg# appropriately in the Makefiles.
25406f03b1f6Smrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
25416f03b1f6SmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE],
25426f03b1f6Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
25436f03b1f6Smrg  AC_CHECK_LIB(ltdl, lt_dlinit,
25446f03b1f6Smrg  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
25456f03b1f6Smrg  [if test x"$enable_ltdl_install" = xno; then
25466f03b1f6Smrg     AC_MSG_WARN([libltdl not installed, but installation disabled])
25476f03b1f6Smrg   else
25486f03b1f6Smrg     enable_ltdl_install=yes
25496f03b1f6Smrg   fi
25506f03b1f6Smrg  ])
25516f03b1f6Smrg  if test x"$enable_ltdl_install" = x"yes"; then
25526f03b1f6Smrg    ac_configure_args="$ac_configure_args --enable-ltdl-install"
25536f03b1f6Smrg    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
25546f03b1f6Smrg    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
25556f03b1f6Smrg  else
25566f03b1f6Smrg    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
25576f03b1f6Smrg    LIBLTDL="-lltdl"
25586f03b1f6Smrg    LTDLINCL=
25596f03b1f6Smrg  fi
25606f03b1f6Smrg  # For backwards non-gettext consistent compatibility...
25616f03b1f6Smrg  INCLTDL="$LTDLINCL"
25626f03b1f6Smrg])# AC_LIBLTDL_INSTALLABLE
25636f03b1f6Smrg
25646f03b1f6Smrg
25656f03b1f6Smrg# AC_LIBTOOL_CXX
25666f03b1f6Smrg# --------------
25676f03b1f6Smrg# enable support for C++ libraries
25686f03b1f6SmrgAC_DEFUN([AC_LIBTOOL_CXX],
25696f03b1f6Smrg[AC_REQUIRE([_LT_AC_LANG_CXX])
25706f03b1f6Smrg])# AC_LIBTOOL_CXX
25716f03b1f6Smrg
25726f03b1f6Smrg
25736f03b1f6Smrg# _LT_AC_LANG_CXX
25746f03b1f6Smrg# ---------------
25756f03b1f6SmrgAC_DEFUN([_LT_AC_LANG_CXX],
25766f03b1f6Smrg[AC_REQUIRE([AC_PROG_CXX])
25776f03b1f6SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP])
25786f03b1f6Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
25796f03b1f6Smrg])# _LT_AC_LANG_CXX
25806f03b1f6Smrg
25816f03b1f6Smrg# _LT_AC_PROG_CXXCPP
25826f03b1f6Smrg# ------------------
25836f03b1f6SmrgAC_DEFUN([_LT_AC_PROG_CXXCPP],
25846f03b1f6Smrg[
25856f03b1f6SmrgAC_REQUIRE([AC_PROG_CXX])
25866f03b1f6Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
25876f03b1f6Smrg    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
25886f03b1f6Smrg    (test "X$CXX" != "Xg++"))) ; then
25896f03b1f6Smrg  AC_PROG_CXXCPP
25906f03b1f6Smrgfi
25916f03b1f6Smrg])# _LT_AC_PROG_CXXCPP
25926f03b1f6Smrg
25936f03b1f6Smrg# AC_LIBTOOL_F77
25946f03b1f6Smrg# --------------
25956f03b1f6Smrg# enable support for Fortran 77 libraries
25966f03b1f6SmrgAC_DEFUN([AC_LIBTOOL_F77],
25976f03b1f6Smrg[AC_REQUIRE([_LT_AC_LANG_F77])
25986f03b1f6Smrg])# AC_LIBTOOL_F77
25996f03b1f6Smrg
26006f03b1f6Smrg
26016f03b1f6Smrg# _LT_AC_LANG_F77
26026f03b1f6Smrg# ---------------
26036f03b1f6SmrgAC_DEFUN([_LT_AC_LANG_F77],
26046f03b1f6Smrg[AC_REQUIRE([AC_PROG_F77])
26056f03b1f6Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
26066f03b1f6Smrg])# _LT_AC_LANG_F77
26076f03b1f6Smrg
26086f03b1f6Smrg
26096f03b1f6Smrg# AC_LIBTOOL_GCJ
26106f03b1f6Smrg# --------------
26116f03b1f6Smrg# enable support for GCJ libraries
26126f03b1f6SmrgAC_DEFUN([AC_LIBTOOL_GCJ],
26136f03b1f6Smrg[AC_REQUIRE([_LT_AC_LANG_GCJ])
26146f03b1f6Smrg])# AC_LIBTOOL_GCJ
26156f03b1f6Smrg
26166f03b1f6Smrg
26176f03b1f6Smrg# _LT_AC_LANG_GCJ
26186f03b1f6Smrg# ---------------
26196f03b1f6SmrgAC_DEFUN([_LT_AC_LANG_GCJ],
26206f03b1f6Smrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
26216f03b1f6Smrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
26226f03b1f6Smrg    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
26236f03b1f6Smrg      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
26246f03b1f6Smrg	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
26256f03b1f6Smrg	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
26266f03b1f6Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
26276f03b1f6Smrg])# _LT_AC_LANG_GCJ
26286f03b1f6Smrg
26296f03b1f6Smrg
26306f03b1f6Smrg# AC_LIBTOOL_RC
26316f03b1f6Smrg# -------------
26326f03b1f6Smrg# enable support for Windows resource files
26336f03b1f6SmrgAC_DEFUN([AC_LIBTOOL_RC],
26346f03b1f6Smrg[AC_REQUIRE([LT_AC_PROG_RC])
26356f03b1f6Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
26366f03b1f6Smrg])# AC_LIBTOOL_RC
26376f03b1f6Smrg
26386f03b1f6Smrg
26396f03b1f6Smrg# AC_LIBTOOL_LANG_C_CONFIG
26406f03b1f6Smrg# ------------------------
26416f03b1f6Smrg# Ensure that the configuration vars for the C compiler are
26426f03b1f6Smrg# suitably defined.  Those variables are subsequently used by
26436f03b1f6Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
26446f03b1f6SmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
26456f03b1f6SmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG],
26466f03b1f6Smrg[lt_save_CC="$CC"
26476f03b1f6SmrgAC_LANG_PUSH(C)
26486f03b1f6Smrg
26496f03b1f6Smrg# Source file extension for C test sources.
26506f03b1f6Smrgac_ext=c
26516f03b1f6Smrg
26526f03b1f6Smrg# Object file extension for compiled C test sources.
26536f03b1f6Smrgobjext=o
26546f03b1f6Smrg_LT_AC_TAGVAR(objext, $1)=$objext
26556f03b1f6Smrg
26566f03b1f6Smrg# Code to be used in simple compile tests
26576f03b1f6Smrglt_simple_compile_test_code="int some_variable = 0;\n"
26586f03b1f6Smrg
26596f03b1f6Smrg# Code to be used in simple link tests
26606f03b1f6Smrglt_simple_link_test_code='int main(){return(0);}\n'
26616f03b1f6Smrg
26626f03b1f6Smrg_LT_AC_SYS_COMPILER
26636f03b1f6Smrg
26646f03b1f6Smrg# save warnings/boilerplate of simple test code
26656f03b1f6Smrg_LT_COMPILER_BOILERPLATE
26666f03b1f6Smrg_LT_LINKER_BOILERPLATE
26676f03b1f6Smrg
26686f03b1f6SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
26696f03b1f6SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
26706f03b1f6SmrgAC_LIBTOOL_PROG_CC_C_O($1)
26716f03b1f6SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
26726f03b1f6SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
26736f03b1f6SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
26746f03b1f6SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
26756f03b1f6SmrgAC_LIBTOOL_SYS_LIB_STRIP
26766f03b1f6SmrgAC_LIBTOOL_DLOPEN_SELF
26776f03b1f6Smrg
26786f03b1f6Smrg# Report which library types will actually be built
26796f03b1f6SmrgAC_MSG_CHECKING([if libtool supports shared libraries])
26806f03b1f6SmrgAC_MSG_RESULT([$can_build_shared])
26816f03b1f6Smrg
26826f03b1f6SmrgAC_MSG_CHECKING([whether to build shared libraries])
26836f03b1f6Smrgtest "$can_build_shared" = "no" && enable_shared=no
26846f03b1f6Smrg
26856f03b1f6Smrg# On AIX, shared libraries and static libraries use the same namespace, and
26866f03b1f6Smrg# are all built from PIC.
26876f03b1f6Smrgcase $host_os in
26886f03b1f6Smrgaix3*)
26896f03b1f6Smrg  test "$enable_shared" = yes && enable_static=no
26906f03b1f6Smrg  if test -n "$RANLIB"; then
26916f03b1f6Smrg    archive_cmds="$archive_cmds~\$RANLIB \$lib"
26926f03b1f6Smrg    postinstall_cmds='$RANLIB $lib'
26936f03b1f6Smrg  fi
26946f03b1f6Smrg  ;;
26956f03b1f6Smrg
26966f03b1f6Smrgaix4* | aix5*)
26976f03b1f6Smrg  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
26986f03b1f6Smrg    test "$enable_shared" = yes && enable_static=no
26996f03b1f6Smrg  fi
27006f03b1f6Smrg    ;;
27016f03b1f6Smrgesac
27026f03b1f6SmrgAC_MSG_RESULT([$enable_shared])
27036f03b1f6Smrg
27046f03b1f6SmrgAC_MSG_CHECKING([whether to build static libraries])
27056f03b1f6Smrg# Make sure either enable_shared or enable_static is yes.
27066f03b1f6Smrgtest "$enable_shared" = yes || enable_static=yes
27076f03b1f6SmrgAC_MSG_RESULT([$enable_static])
27086f03b1f6Smrg
27096f03b1f6SmrgAC_LIBTOOL_CONFIG($1)
27106f03b1f6Smrg
27116f03b1f6SmrgAC_LANG_POP
27126f03b1f6SmrgCC="$lt_save_CC"
27136f03b1f6Smrg])# AC_LIBTOOL_LANG_C_CONFIG
27146f03b1f6Smrg
27156f03b1f6Smrg
27166f03b1f6Smrg# AC_LIBTOOL_LANG_CXX_CONFIG
27176f03b1f6Smrg# --------------------------
27186f03b1f6Smrg# Ensure that the configuration vars for the C compiler are
27196f03b1f6Smrg# suitably defined.  Those variables are subsequently used by
27206f03b1f6Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
27216f03b1f6SmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
27226f03b1f6SmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
27236f03b1f6Smrg[AC_LANG_PUSH(C++)
27246f03b1f6SmrgAC_REQUIRE([AC_PROG_CXX])
27256f03b1f6SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP])
27266f03b1f6Smrg
27276f03b1f6Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
27286f03b1f6Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)=
27296f03b1f6Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no
27306f03b1f6Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
27316f03b1f6Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
27326f03b1f6Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no
27336f03b1f6Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
27346f03b1f6Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
27356f03b1f6Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
27366f03b1f6Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
27376f03b1f6Smrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
27386f03b1f6Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no
27396f03b1f6Smrg_LT_AC_TAGVAR(module_cmds, $1)=
27406f03b1f6Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)=
27416f03b1f6Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
27426f03b1f6Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
27436f03b1f6Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)=
27446f03b1f6Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
27456f03b1f6Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
27466f03b1f6Smrg
27476f03b1f6Smrg# Dependencies to place before and after the object being linked:
27486f03b1f6Smrg_LT_AC_TAGVAR(predep_objects, $1)=
27496f03b1f6Smrg_LT_AC_TAGVAR(postdep_objects, $1)=
27506f03b1f6Smrg_LT_AC_TAGVAR(predeps, $1)=
27516f03b1f6Smrg_LT_AC_TAGVAR(postdeps, $1)=
27526f03b1f6Smrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
27536f03b1f6Smrg
27546f03b1f6Smrg# Source file extension for C++ test sources.
27556f03b1f6Smrgac_ext=cpp
27566f03b1f6Smrg
27576f03b1f6Smrg# Object file extension for compiled C++ test sources.
27586f03b1f6Smrgobjext=o
27596f03b1f6Smrg_LT_AC_TAGVAR(objext, $1)=$objext
27606f03b1f6Smrg
27616f03b1f6Smrg# Code to be used in simple compile tests
27626f03b1f6Smrglt_simple_compile_test_code="int some_variable = 0;\n"
27636f03b1f6Smrg
27646f03b1f6Smrg# Code to be used in simple link tests
27656f03b1f6Smrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
27666f03b1f6Smrg
27676f03b1f6Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
27686f03b1f6Smrg_LT_AC_SYS_COMPILER
27696f03b1f6Smrg
27706f03b1f6Smrg# save warnings/boilerplate of simple test code
27716f03b1f6Smrg_LT_COMPILER_BOILERPLATE
27726f03b1f6Smrg_LT_LINKER_BOILERPLATE
27736f03b1f6Smrg
27746f03b1f6Smrg# Allow CC to be a program name with arguments.
27756f03b1f6Smrglt_save_CC=$CC
27766f03b1f6Smrglt_save_LD=$LD
27776f03b1f6Smrglt_save_GCC=$GCC
27786f03b1f6SmrgGCC=$GXX
27796f03b1f6Smrglt_save_with_gnu_ld=$with_gnu_ld
27806f03b1f6Smrglt_save_path_LD=$lt_cv_path_LD
27816f03b1f6Smrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
27826f03b1f6Smrg  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
27836f03b1f6Smrgelse
27846f03b1f6Smrg  $as_unset lt_cv_prog_gnu_ld
27856f03b1f6Smrgfi
27866f03b1f6Smrgif test -n "${lt_cv_path_LDCXX+set}"; then
27876f03b1f6Smrg  lt_cv_path_LD=$lt_cv_path_LDCXX
27886f03b1f6Smrgelse
27896f03b1f6Smrg  $as_unset lt_cv_path_LD
27906f03b1f6Smrgfi
27916f03b1f6Smrgtest -z "${LDCXX+set}" || LD=$LDCXX
27926f03b1f6SmrgCC=${CXX-"c++"}
27936f03b1f6Smrgcompiler=$CC
27946f03b1f6Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
27956f03b1f6Smrg_LT_CC_BASENAME([$compiler])
27966f03b1f6Smrg
27976f03b1f6Smrg# We don't want -fno-exception wen compiling C++ code, so set the
27986f03b1f6Smrg# no_builtin_flag separately
27996f03b1f6Smrgif test "$GXX" = yes; then
28006f03b1f6Smrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
28016f03b1f6Smrgelse
28026f03b1f6Smrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
28036f03b1f6Smrgfi
28046f03b1f6Smrg
28056f03b1f6Smrgif test "$GXX" = yes; then
28066f03b1f6Smrg  # Set up default GNU C++ configuration
28076f03b1f6Smrg
28086f03b1f6Smrg  AC_PROG_LD
28096f03b1f6Smrg
28106f03b1f6Smrg  # Check if GNU C++ uses GNU ld as the underlying linker, since the
28116f03b1f6Smrg  # archiving commands below assume that GNU ld is being used.
28126f03b1f6Smrg  if test "$with_gnu_ld" = yes; then
28136f03b1f6Smrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
28146f03b1f6Smrg    _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'
28156f03b1f6Smrg
28166f03b1f6Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
28176f03b1f6Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
28186f03b1f6Smrg
28196f03b1f6Smrg    # If archive_cmds runs LD, not CC, wlarc should be empty
28206f03b1f6Smrg    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
28216f03b1f6Smrg    #     investigate it a little bit more. (MM)
28226f03b1f6Smrg    wlarc='${wl}'
28236f03b1f6Smrg
28246f03b1f6Smrg    # ancient GNU ld didn't support --whole-archive et. al.
28256f03b1f6Smrg    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
28266f03b1f6Smrg	grep 'no-whole-archive' > /dev/null; then
28276f03b1f6Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
28286f03b1f6Smrg    else
28296f03b1f6Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
28306f03b1f6Smrg    fi
28316f03b1f6Smrg  else
28326f03b1f6Smrg    with_gnu_ld=no
28336f03b1f6Smrg    wlarc=
28346f03b1f6Smrg
28356f03b1f6Smrg    # A generic and very simple default shared library creation
28366f03b1f6Smrg    # command for GNU C++ for the case where it uses the native
28376f03b1f6Smrg    # linker, instead of GNU ld.  If possible, this setting should
28386f03b1f6Smrg    # overridden to take advantage of the native linker features on
28396f03b1f6Smrg    # the platform it is being used on.
28406f03b1f6Smrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
28416f03b1f6Smrg  fi
28426f03b1f6Smrg
28436f03b1f6Smrg  # Commands to make compiler produce verbose output that lists
28446f03b1f6Smrg  # what "hidden" libraries, object files and flags are used when
28456f03b1f6Smrg  # linking a shared library.
28466f03b1f6Smrg  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
28476f03b1f6Smrg
28486f03b1f6Smrgelse
28496f03b1f6Smrg  GXX=no
28506f03b1f6Smrg  with_gnu_ld=no
28516f03b1f6Smrg  wlarc=
28526f03b1f6Smrgfi
28536f03b1f6Smrg
28546f03b1f6Smrg# PORTME: fill in a description of your system's C++ link characteristics
28556f03b1f6SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
28566f03b1f6Smrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes
28576f03b1f6Smrgcase $host_os in
28586f03b1f6Smrg  aix3*)
28596f03b1f6Smrg    # FIXME: insert proper C++ library support
28606f03b1f6Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
28616f03b1f6Smrg    ;;
28626f03b1f6Smrg  aix4* | aix5*)
28636f03b1f6Smrg    if test "$host_cpu" = ia64; then
28646f03b1f6Smrg      # On IA64, the linker does run time linking by default, so we don't
28656f03b1f6Smrg      # have to do anything special.
28666f03b1f6Smrg      aix_use_runtimelinking=no
28676f03b1f6Smrg      exp_sym_flag='-Bexport'
28686f03b1f6Smrg      no_entry_flag=""
28696f03b1f6Smrg    else
28706f03b1f6Smrg      aix_use_runtimelinking=no
28716f03b1f6Smrg
28726f03b1f6Smrg      # Test if we are trying to use run time linking or normal
28736f03b1f6Smrg      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
28746f03b1f6Smrg      # need to do runtime linking.
28756f03b1f6Smrg      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
28766f03b1f6Smrg	for ld_flag in $LDFLAGS; do
28776f03b1f6Smrg	  case $ld_flag in
28786f03b1f6Smrg	  *-brtl*)
28796f03b1f6Smrg	    aix_use_runtimelinking=yes
28806f03b1f6Smrg	    break
28816f03b1f6Smrg	    ;;
28826f03b1f6Smrg	  esac
28836f03b1f6Smrg	done
28846f03b1f6Smrg	;;
28856f03b1f6Smrg      esac
28866f03b1f6Smrg
28876f03b1f6Smrg      exp_sym_flag='-bexport'
28886f03b1f6Smrg      no_entry_flag='-bnoentry'
28896f03b1f6Smrg    fi
28906f03b1f6Smrg
28916f03b1f6Smrg    # When large executables or shared objects are built, AIX ld can
28926f03b1f6Smrg    # have problems creating the table of contents.  If linking a library
28936f03b1f6Smrg    # or program results in "error TOC overflow" add -mminimal-toc to
28946f03b1f6Smrg    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
28956f03b1f6Smrg    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
28966f03b1f6Smrg
28976f03b1f6Smrg    _LT_AC_TAGVAR(archive_cmds, $1)=''
28986f03b1f6Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
28996f03b1f6Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
29006f03b1f6Smrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
29016f03b1f6Smrg
29026f03b1f6Smrg    if test "$GXX" = yes; then
29036f03b1f6Smrg      case $host_os in aix4.[[012]]|aix4.[[012]].*)
29046f03b1f6Smrg      # We only want to do this on AIX 4.2 and lower, the check
29056f03b1f6Smrg      # below for broken collect2 doesn't work under 4.3+
29066f03b1f6Smrg	collect2name=`${CC} -print-prog-name=collect2`
29076f03b1f6Smrg	if test -f "$collect2name" && \
29086f03b1f6Smrg	   strings "$collect2name" | grep resolve_lib_name >/dev/null
29096f03b1f6Smrg	then
29106f03b1f6Smrg	  # We have reworked collect2
29116f03b1f6Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
29126f03b1f6Smrg	else
29136f03b1f6Smrg	  # We have old collect2
29146f03b1f6Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
29156f03b1f6Smrg	  # It fails to find uninstalled libraries when the uninstalled
29166f03b1f6Smrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
29176f03b1f6Smrg	  # to unsupported forces relinking
29186f03b1f6Smrg	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
29196f03b1f6Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
29206f03b1f6Smrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
29216f03b1f6Smrg	fi
29226f03b1f6Smrg	;;
29236f03b1f6Smrg      esac
29246f03b1f6Smrg      shared_flag='-shared'
29256f03b1f6Smrg      if test "$aix_use_runtimelinking" = yes; then
29266f03b1f6Smrg	shared_flag="$shared_flag "'${wl}-G'
29276f03b1f6Smrg      fi
29286f03b1f6Smrg    else
29296f03b1f6Smrg      # not using gcc
29306f03b1f6Smrg      if test "$host_cpu" = ia64; then
29316f03b1f6Smrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
29326f03b1f6Smrg	# chokes on -Wl,-G. The following line is correct:
29336f03b1f6Smrg	shared_flag='-G'
29346f03b1f6Smrg      else
29356f03b1f6Smrg	if test "$aix_use_runtimelinking" = yes; then
29366f03b1f6Smrg	  shared_flag='${wl}-G'
29376f03b1f6Smrg	else
29386f03b1f6Smrg	  shared_flag='${wl}-bM:SRE'
29396f03b1f6Smrg	fi
29406f03b1f6Smrg      fi
29416f03b1f6Smrg    fi
29426f03b1f6Smrg
29436f03b1f6Smrg    # It seems that -bexpall does not export symbols beginning with
29446f03b1f6Smrg    # underscore (_), so it is better to generate a list of symbols to export.
29456f03b1f6Smrg    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
29466f03b1f6Smrg    if test "$aix_use_runtimelinking" = yes; then
29476f03b1f6Smrg      # Warning - without using the other runtime loading flags (-brtl),
29486f03b1f6Smrg      # -berok will link without error, but may produce a broken library.
29496f03b1f6Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
29506f03b1f6Smrg      # Determine the default libpath from the value encoded in an empty executable.
29516f03b1f6Smrg      _LT_AC_SYS_LIBPATH_AIX
29526f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
29536f03b1f6Smrg
29546f03b1f6Smrg      _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"
29556f03b1f6Smrg     else
29566f03b1f6Smrg      if test "$host_cpu" = ia64; then
29576f03b1f6Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
29586f03b1f6Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
29596f03b1f6Smrg	_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"
29606f03b1f6Smrg      else
29616f03b1f6Smrg	# Determine the default libpath from the value encoded in an empty executable.
29626f03b1f6Smrg	_LT_AC_SYS_LIBPATH_AIX
29636f03b1f6Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
29646f03b1f6Smrg	# Warning - without using the other run time loading flags,
29656f03b1f6Smrg	# -berok will link without error, but may produce a broken library.
29666f03b1f6Smrg	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
29676f03b1f6Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
29686f03b1f6Smrg	# Exported symbols can be pulled into shared objects from archives
29696f03b1f6Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
29706f03b1f6Smrg	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
29716f03b1f6Smrg	# This is similar to how AIX traditionally builds its shared libraries.
29726f03b1f6Smrg	_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'
29736f03b1f6Smrg      fi
29746f03b1f6Smrg    fi
29756f03b1f6Smrg    ;;
29766f03b1f6Smrg
29776f03b1f6Smrg  beos*)
29786f03b1f6Smrg    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
29796f03b1f6Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
29806f03b1f6Smrg      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
29816f03b1f6Smrg      # support --undefined.  This deserves some investigation.  FIXME
29826f03b1f6Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
29836f03b1f6Smrg    else
29846f03b1f6Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
29856f03b1f6Smrg    fi
29866f03b1f6Smrg    ;;
29876f03b1f6Smrg
29886f03b1f6Smrg  chorus*)
29896f03b1f6Smrg    case $cc_basename in
29906f03b1f6Smrg      *)
29916f03b1f6Smrg	# FIXME: insert proper C++ library support
29926f03b1f6Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
29936f03b1f6Smrg	;;
29946f03b1f6Smrg    esac
29956f03b1f6Smrg    ;;
29966f03b1f6Smrg
29976f03b1f6Smrg  cygwin* | mingw* | pw32*)
29986f03b1f6Smrg    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
29996f03b1f6Smrg    # as there is no search path for DLLs.
30006f03b1f6Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
30016f03b1f6Smrg    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
30026f03b1f6Smrg    _LT_AC_TAGVAR(always_export_symbols, $1)=no
30036f03b1f6Smrg    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
30046f03b1f6Smrg
30056f03b1f6Smrg    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
30066f03b1f6Smrg      _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'
30076f03b1f6Smrg      # If the export-symbols file already is a .def file (1st line
30086f03b1f6Smrg      # is EXPORTS), use it as is; otherwise, prepend...
30096f03b1f6Smrg      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
30106f03b1f6Smrg	cp $export_symbols $output_objdir/$soname.def;
30116f03b1f6Smrg      else
30126f03b1f6Smrg	echo EXPORTS > $output_objdir/$soname.def;
30136f03b1f6Smrg	cat $export_symbols >> $output_objdir/$soname.def;
30146f03b1f6Smrg      fi~
30156f03b1f6Smrg      $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'
30166f03b1f6Smrg    else
30176f03b1f6Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
30186f03b1f6Smrg    fi
30196f03b1f6Smrg  ;;
30206f03b1f6Smrg      darwin* | rhapsody*)
30216f03b1f6Smrg        case $host_os in
30226f03b1f6Smrg        rhapsody* | darwin1.[[012]])
30236f03b1f6Smrg         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
30246f03b1f6Smrg         ;;
30256f03b1f6Smrg       *) # Darwin 1.3 on
30266f03b1f6Smrg         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
30276f03b1f6Smrg           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
30286f03b1f6Smrg         else
30296f03b1f6Smrg           case ${MACOSX_DEPLOYMENT_TARGET} in
30306f03b1f6Smrg             10.[[012]])
30316f03b1f6Smrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
30326f03b1f6Smrg               ;;
30336f03b1f6Smrg             10.*)
30346f03b1f6Smrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
30356f03b1f6Smrg               ;;
30366f03b1f6Smrg           esac
30376f03b1f6Smrg         fi
30386f03b1f6Smrg         ;;
30396f03b1f6Smrg        esac
30406f03b1f6Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
30416f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
30426f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
30436f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
30446f03b1f6Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
30456f03b1f6Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
30466f03b1f6Smrg
30476f03b1f6Smrg    if test "$GXX" = yes ; then
30486f03b1f6Smrg      lt_int_apple_cc_single_mod=no
30496f03b1f6Smrg      output_verbose_link_cmd='echo'
30506f03b1f6Smrg      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
30516f03b1f6Smrg       lt_int_apple_cc_single_mod=yes
30526f03b1f6Smrg      fi
30536f03b1f6Smrg      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
30546f03b1f6Smrg       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
30556f03b1f6Smrg      else
30566f03b1f6Smrg          _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'
30576f03b1f6Smrg        fi
30586f03b1f6Smrg        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
30596f03b1f6Smrg        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
30606f03b1f6Smrg          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
30616f03b1f6Smrg            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
30626f03b1f6Smrg          else
30636f03b1f6Smrg            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
30646f03b1f6Smrg          fi
30656f03b1f6Smrg            _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}'
30666f03b1f6Smrg      else
30676f03b1f6Smrg      case $cc_basename in
30686f03b1f6Smrg        xlc*)
30696f03b1f6Smrg         output_verbose_link_cmd='echo'
30706f03b1f6Smrg          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
30716f03b1f6Smrg          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
30726f03b1f6Smrg          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
30736f03b1f6Smrg          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
30746f03b1f6Smrg          _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}'
30756f03b1f6Smrg          ;;
30766f03b1f6Smrg       *)
30776f03b1f6Smrg         _LT_AC_TAGVAR(ld_shlibs, $1)=no
30786f03b1f6Smrg          ;;
30796f03b1f6Smrg      esac
30806f03b1f6Smrg      fi
30816f03b1f6Smrg        ;;
30826f03b1f6Smrg
30836f03b1f6Smrg  dgux*)
30846f03b1f6Smrg    case $cc_basename in
30856f03b1f6Smrg      ec++*)
30866f03b1f6Smrg	# FIXME: insert proper C++ library support
30876f03b1f6Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
30886f03b1f6Smrg	;;
30896f03b1f6Smrg      ghcx*)
30906f03b1f6Smrg	# Green Hills C++ Compiler
30916f03b1f6Smrg	# FIXME: insert proper C++ library support
30926f03b1f6Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
30936f03b1f6Smrg	;;
30946f03b1f6Smrg      *)
30956f03b1f6Smrg	# FIXME: insert proper C++ library support
30966f03b1f6Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
30976f03b1f6Smrg	;;
30986f03b1f6Smrg    esac
30996f03b1f6Smrg    ;;
31006f03b1f6Smrg  freebsd[[12]]*)
31016f03b1f6Smrg    # C++ shared libraries reported to be fairly broken before switch to ELF
31026f03b1f6Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
31036f03b1f6Smrg    ;;
31046f03b1f6Smrg  freebsd-elf*)
31056f03b1f6Smrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
31066f03b1f6Smrg    ;;
31076f03b1f6Smrg  freebsd* | dragonfly*)
31086f03b1f6Smrg    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
31096f03b1f6Smrg    # conventions
31106f03b1f6Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
31116f03b1f6Smrg    ;;
31126f03b1f6Smrg  gnu*)
31136f03b1f6Smrg    ;;
31146f03b1f6Smrg  hpux9*)
31156f03b1f6Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
31166f03b1f6Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
31176f03b1f6Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
31186f03b1f6Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
31196f03b1f6Smrg    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
31206f03b1f6Smrg				# but as the default
31216f03b1f6Smrg				# location of the library.
31226f03b1f6Smrg
31236f03b1f6Smrg    case $cc_basename in
31246f03b1f6Smrg    CC*)
31256f03b1f6Smrg      # FIXME: insert proper C++ library support
31266f03b1f6Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
31276f03b1f6Smrg      ;;
31286f03b1f6Smrg    aCC*)
31296f03b1f6Smrg      _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'
31306f03b1f6Smrg      # Commands to make compiler produce verbose output that lists
31316f03b1f6Smrg      # what "hidden" libraries, object files and flags are used when
31326f03b1f6Smrg      # linking a shared library.
31336f03b1f6Smrg      #
31346f03b1f6Smrg      # There doesn't appear to be a way to prevent this compiler from
31356f03b1f6Smrg      # explicitly linking system object files so we need to strip them
31366f03b1f6Smrg      # from the output so that they don't get included in the library
31376f03b1f6Smrg      # dependencies.
31386f03b1f6Smrg      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'
31396f03b1f6Smrg      ;;
31406f03b1f6Smrg    *)
31416f03b1f6Smrg      if test "$GXX" = yes; then
31426f03b1f6Smrg        _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'
31436f03b1f6Smrg      else
31446f03b1f6Smrg        # FIXME: insert proper C++ library support
31456f03b1f6Smrg        _LT_AC_TAGVAR(ld_shlibs, $1)=no
31466f03b1f6Smrg      fi
31476f03b1f6Smrg      ;;
31486f03b1f6Smrg    esac
31496f03b1f6Smrg    ;;
31506f03b1f6Smrg  hpux10*|hpux11*)
31516f03b1f6Smrg    if test $with_gnu_ld = no; then
31526f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
31536f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
31546f03b1f6Smrg
31556f03b1f6Smrg      case $host_cpu in
31566f03b1f6Smrg      hppa*64*|ia64*)
31576f03b1f6Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
31586f03b1f6Smrg        ;;
31596f03b1f6Smrg      *)
31606f03b1f6Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
31616f03b1f6Smrg        ;;
31626f03b1f6Smrg      esac
31636f03b1f6Smrg    fi
31646f03b1f6Smrg    case $host_cpu in
31656f03b1f6Smrg    hppa*64*|ia64*)
31666f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
31676f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
31686f03b1f6Smrg      ;;
31696f03b1f6Smrg    *)
31706f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
31716f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
31726f03b1f6Smrg					      # but as the default
31736f03b1f6Smrg					      # location of the library.
31746f03b1f6Smrg      ;;
31756f03b1f6Smrg    esac
31766f03b1f6Smrg
31776f03b1f6Smrg    case $cc_basename in
31786f03b1f6Smrg      CC*)
31796f03b1f6Smrg	# FIXME: insert proper C++ library support
31806f03b1f6Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
31816f03b1f6Smrg	;;
31826f03b1f6Smrg      aCC*)
31836f03b1f6Smrg	case $host_cpu in
31846f03b1f6Smrg	hppa*64*)
31856f03b1f6Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
31866f03b1f6Smrg	  ;;
31876f03b1f6Smrg	ia64*)
31886f03b1f6Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
31896f03b1f6Smrg	  ;;
31906f03b1f6Smrg	*)
31916f03b1f6Smrg	  _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'
31926f03b1f6Smrg	  ;;
31936f03b1f6Smrg	esac
31946f03b1f6Smrg	# Commands to make compiler produce verbose output that lists
31956f03b1f6Smrg	# what "hidden" libraries, object files and flags are used when
31966f03b1f6Smrg	# linking a shared library.
31976f03b1f6Smrg	#
31986f03b1f6Smrg	# There doesn't appear to be a way to prevent this compiler from
31996f03b1f6Smrg	# explicitly linking system object files so we need to strip them
32006f03b1f6Smrg	# from the output so that they don't get included in the library
32016f03b1f6Smrg	# dependencies.
32026f03b1f6Smrg	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'
32036f03b1f6Smrg	;;
32046f03b1f6Smrg      *)
32056f03b1f6Smrg	if test "$GXX" = yes; then
32066f03b1f6Smrg	  if test $with_gnu_ld = no; then
32076f03b1f6Smrg	    case $host_cpu in
32086f03b1f6Smrg	    hppa*64*)
32096f03b1f6Smrg	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
32106f03b1f6Smrg	      ;;
32116f03b1f6Smrg	    ia64*)
32126f03b1f6Smrg	      _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'
32136f03b1f6Smrg	      ;;
32146f03b1f6Smrg	    *)
32156f03b1f6Smrg	      _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'
32166f03b1f6Smrg	      ;;
32176f03b1f6Smrg	    esac
32186f03b1f6Smrg	  fi
32196f03b1f6Smrg	else
32206f03b1f6Smrg	  # FIXME: insert proper C++ library support
32216f03b1f6Smrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
32226f03b1f6Smrg	fi
32236f03b1f6Smrg	;;
32246f03b1f6Smrg    esac
32256f03b1f6Smrg    ;;
32266f03b1f6Smrg  interix3*)
32276f03b1f6Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=no
32286f03b1f6Smrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
32296f03b1f6Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
32306f03b1f6Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
32316f03b1f6Smrg    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
32326f03b1f6Smrg    # Instead, shared libraries are loaded at an image base (0x10000000 by
32336f03b1f6Smrg    # default) and relocated if they conflict, which is a slow very memory
32346f03b1f6Smrg    # consuming and fragmenting process.  To avoid this, we pick a random,
32356f03b1f6Smrg    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
32366f03b1f6Smrg    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
32376f03b1f6Smrg    _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'
32386f03b1f6Smrg    _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'
32396f03b1f6Smrg    ;;
32406f03b1f6Smrg  irix5* | irix6*)
32416f03b1f6Smrg    case $cc_basename in
32426f03b1f6Smrg      CC*)
32436f03b1f6Smrg	# SGI C++
32446f03b1f6Smrg	_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'
32456f03b1f6Smrg
32466f03b1f6Smrg	# Archives containing C++ object files must be created using
32476f03b1f6Smrg	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
32486f03b1f6Smrg	# necessary to make sure instantiated templates are included
32496f03b1f6Smrg	# in the archive.
32506f03b1f6Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
32516f03b1f6Smrg	;;
32526f03b1f6Smrg      *)
32536f03b1f6Smrg	if test "$GXX" = yes; then
32546f03b1f6Smrg	  if test "$with_gnu_ld" = no; then
32556f03b1f6Smrg	    _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'
32566f03b1f6Smrg	  else
32576f03b1f6Smrg	    _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'
32586f03b1f6Smrg	  fi
32596f03b1f6Smrg	fi
32606f03b1f6Smrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
32616f03b1f6Smrg	;;
32626f03b1f6Smrg    esac
32636f03b1f6Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
32646f03b1f6Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
32656f03b1f6Smrg    ;;
32666f03b1f6Smrg  linux* | k*bsd*-gnu)
32676f03b1f6Smrg    case $cc_basename in
32686f03b1f6Smrg      KCC*)
32696f03b1f6Smrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
32706f03b1f6Smrg
32716f03b1f6Smrg	# KCC will only create a shared library if the output file
32726f03b1f6Smrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
32736f03b1f6Smrg	# to its proper name (with version) after linking.
32746f03b1f6Smrg	_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'
32756f03b1f6Smrg	_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'
32766f03b1f6Smrg	# Commands to make compiler produce verbose output that lists
32776f03b1f6Smrg	# what "hidden" libraries, object files and flags are used when
32786f03b1f6Smrg	# linking a shared library.
32796f03b1f6Smrg	#
32806f03b1f6Smrg	# There doesn't appear to be a way to prevent this compiler from
32816f03b1f6Smrg	# explicitly linking system object files so we need to strip them
32826f03b1f6Smrg	# from the output so that they don't get included in the library
32836f03b1f6Smrg	# dependencies.
32846f03b1f6Smrg	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'
32856f03b1f6Smrg
32866f03b1f6Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
32876f03b1f6Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
32886f03b1f6Smrg
32896f03b1f6Smrg	# Archives containing C++ object files must be created using
32906f03b1f6Smrg	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
32916f03b1f6Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
32926f03b1f6Smrg	;;
32936f03b1f6Smrg      icpc*)
32946f03b1f6Smrg	# Intel C++
32956f03b1f6Smrg	with_gnu_ld=yes
32966f03b1f6Smrg	# version 8.0 and above of icpc choke on multiply defined symbols
32976f03b1f6Smrg	# if we add $predep_objects and $postdep_objects, however 7.1 and
32986f03b1f6Smrg	# earlier do not add the objects themselves.
32996f03b1f6Smrg	case `$CC -V 2>&1` in
33006f03b1f6Smrg	*"Version 7."*)
33016f03b1f6Smrg  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
33026f03b1f6Smrg  	  _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'
33036f03b1f6Smrg	  ;;
33046f03b1f6Smrg	*)  # Version 8.0 or newer
33056f03b1f6Smrg	  tmp_idyn=
33066f03b1f6Smrg	  case $host_cpu in
33076f03b1f6Smrg	    ia64*) tmp_idyn=' -i_dynamic';;
33086f03b1f6Smrg	  esac
33096f03b1f6Smrg  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
33106f03b1f6Smrg	  _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'
33116f03b1f6Smrg	  ;;
33126f03b1f6Smrg	esac
33136f03b1f6Smrg	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
33146f03b1f6Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
33156f03b1f6Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
33166f03b1f6Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
33176f03b1f6Smrg	;;
33186f03b1f6Smrg      pgCC*)
33196f03b1f6Smrg        # Portland Group C++ compiler
33206f03b1f6Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
33216f03b1f6Smrg  	_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'
33226f03b1f6Smrg
33236f03b1f6Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
33246f03b1f6Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
33256f03b1f6Smrg	_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'
33266f03b1f6Smrg        ;;
33276f03b1f6Smrg      cxx*)
33286f03b1f6Smrg	# Compaq C++
33296f03b1f6Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
33306f03b1f6Smrg	_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'
33316f03b1f6Smrg
33326f03b1f6Smrg	runpath_var=LD_RUN_PATH
33336f03b1f6Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
33346f03b1f6Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
33356f03b1f6Smrg
33366f03b1f6Smrg	# Commands to make compiler produce verbose output that lists
33376f03b1f6Smrg	# what "hidden" libraries, object files and flags are used when
33386f03b1f6Smrg	# linking a shared library.
33396f03b1f6Smrg	#
33406f03b1f6Smrg	# There doesn't appear to be a way to prevent this compiler from
33416f03b1f6Smrg	# explicitly linking system object files so we need to strip them
33426f03b1f6Smrg	# from the output so that they don't get included in the library
33436f03b1f6Smrg	# dependencies.
33446f03b1f6Smrg	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'
33456f03b1f6Smrg	;;
33466f03b1f6Smrg    esac
33476f03b1f6Smrg    ;;
33486f03b1f6Smrg  lynxos*)
33496f03b1f6Smrg    # FIXME: insert proper C++ library support
33506f03b1f6Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
33516f03b1f6Smrg    ;;
33526f03b1f6Smrg  m88k*)
33536f03b1f6Smrg    # FIXME: insert proper C++ library support
33546f03b1f6Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
33556f03b1f6Smrg    ;;
33566f03b1f6Smrg  mvs*)
33576f03b1f6Smrg    case $cc_basename in
33586f03b1f6Smrg      cxx*)
33596f03b1f6Smrg	# FIXME: insert proper C++ library support
33606f03b1f6Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
33616f03b1f6Smrg	;;
33626f03b1f6Smrg      *)
33636f03b1f6Smrg	# FIXME: insert proper C++ library support
33646f03b1f6Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
33656f03b1f6Smrg	;;
33666f03b1f6Smrg    esac
33676f03b1f6Smrg    ;;
33686f03b1f6Smrg  netbsd* | netbsdelf*-gnu)
33696f03b1f6Smrg    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
33706f03b1f6Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
33716f03b1f6Smrg      wlarc=
33726f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
33736f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
33746f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
33756f03b1f6Smrg    fi
33766f03b1f6Smrg    # Workaround some broken pre-1.5 toolchains
33776f03b1f6Smrg    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
33786f03b1f6Smrg    ;;
33796f03b1f6Smrg  openbsd2*)
33806f03b1f6Smrg    # C++ shared libraries are fairly broken
33816f03b1f6Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
33826f03b1f6Smrg    ;;
33836f03b1f6Smrg  openbsd*)
33846f03b1f6Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
33856f03b1f6Smrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
33866f03b1f6Smrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
33876f03b1f6Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
33886f03b1f6Smrg    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
33896f03b1f6Smrg      _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'
33906f03b1f6Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
33916f03b1f6Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
33926f03b1f6Smrg    fi
33936f03b1f6Smrg    output_verbose_link_cmd='echo'
33946f03b1f6Smrg    ;;
33956f03b1f6Smrg  osf3*)
33966f03b1f6Smrg    case $cc_basename in
33976f03b1f6Smrg      KCC*)
33986f03b1f6Smrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
33996f03b1f6Smrg
34006f03b1f6Smrg	# KCC will only create a shared library if the output file
34016f03b1f6Smrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
34026f03b1f6Smrg	# to its proper name (with version) after linking.
34036f03b1f6Smrg	_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'
34046f03b1f6Smrg
34056f03b1f6Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
34066f03b1f6Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
34076f03b1f6Smrg
34086f03b1f6Smrg	# Archives containing C++ object files must be created using
34096f03b1f6Smrg	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
34106f03b1f6Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
34116f03b1f6Smrg
34126f03b1f6Smrg	;;
34136f03b1f6Smrg      RCC*)
34146f03b1f6Smrg	# Rational C++ 2.4.1
34156f03b1f6Smrg	# FIXME: insert proper C++ library support
34166f03b1f6Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
34176f03b1f6Smrg	;;
34186f03b1f6Smrg      cxx*)
34196f03b1f6Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
34206f03b1f6Smrg	_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'
34216f03b1f6Smrg
34226f03b1f6Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
34236f03b1f6Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
34246f03b1f6Smrg
34256f03b1f6Smrg	# Commands to make compiler produce verbose output that lists
34266f03b1f6Smrg	# what "hidden" libraries, object files and flags are used when
34276f03b1f6Smrg	# linking a shared library.
34286f03b1f6Smrg	#
34296f03b1f6Smrg	# There doesn't appear to be a way to prevent this compiler from
34306f03b1f6Smrg	# explicitly linking system object files so we need to strip them
34316f03b1f6Smrg	# from the output so that they don't get included in the library
34326f03b1f6Smrg	# dependencies.
34336f03b1f6Smrg	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'
34346f03b1f6Smrg	;;
34356f03b1f6Smrg      *)
34366f03b1f6Smrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
34376f03b1f6Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
34386f03b1f6Smrg	  _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'
34396f03b1f6Smrg
34406f03b1f6Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
34416f03b1f6Smrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
34426f03b1f6Smrg
34436f03b1f6Smrg	  # Commands to make compiler produce verbose output that lists
34446f03b1f6Smrg	  # what "hidden" libraries, object files and flags are used when
34456f03b1f6Smrg	  # linking a shared library.
34466f03b1f6Smrg	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
34476f03b1f6Smrg
34486f03b1f6Smrg	else
34496f03b1f6Smrg	  # FIXME: insert proper C++ library support
34506f03b1f6Smrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
34516f03b1f6Smrg	fi
34526f03b1f6Smrg	;;
34536f03b1f6Smrg    esac
34546f03b1f6Smrg    ;;
34556f03b1f6Smrg  osf4* | osf5*)
34566f03b1f6Smrg    case $cc_basename in
34576f03b1f6Smrg      KCC*)
34586f03b1f6Smrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
34596f03b1f6Smrg
34606f03b1f6Smrg	# KCC will only create a shared library if the output file
34616f03b1f6Smrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
34626f03b1f6Smrg	# to its proper name (with version) after linking.
34636f03b1f6Smrg	_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'
34646f03b1f6Smrg
34656f03b1f6Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
34666f03b1f6Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
34676f03b1f6Smrg
34686f03b1f6Smrg	# Archives containing C++ object files must be created using
34696f03b1f6Smrg	# the KAI C++ compiler.
34706f03b1f6Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
34716f03b1f6Smrg	;;
34726f03b1f6Smrg      RCC*)
34736f03b1f6Smrg	# Rational C++ 2.4.1
34746f03b1f6Smrg	# FIXME: insert proper C++ library support
34756f03b1f6Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
34766f03b1f6Smrg	;;
34776f03b1f6Smrg      cxx*)
34786f03b1f6Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
34796f03b1f6Smrg	_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'
34806f03b1f6Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
34816f03b1f6Smrg	  echo "-hidden">> $lib.exp~
34826f03b1f6Smrg	  $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~
34836f03b1f6Smrg	  $rm $lib.exp'
34846f03b1f6Smrg
34856f03b1f6Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
34866f03b1f6Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
34876f03b1f6Smrg
34886f03b1f6Smrg	# Commands to make compiler produce verbose output that lists
34896f03b1f6Smrg	# what "hidden" libraries, object files and flags are used when
34906f03b1f6Smrg	# linking a shared library.
34916f03b1f6Smrg	#
34926f03b1f6Smrg	# There doesn't appear to be a way to prevent this compiler from
34936f03b1f6Smrg	# explicitly linking system object files so we need to strip them
34946f03b1f6Smrg	# from the output so that they don't get included in the library
34956f03b1f6Smrg	# dependencies.
34966f03b1f6Smrg	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'
34976f03b1f6Smrg	;;
34986f03b1f6Smrg      *)
34996f03b1f6Smrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
35006f03b1f6Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
35016f03b1f6Smrg	 _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'
35026f03b1f6Smrg
35036f03b1f6Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
35046f03b1f6Smrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
35056f03b1f6Smrg
35066f03b1f6Smrg	  # Commands to make compiler produce verbose output that lists
35076f03b1f6Smrg	  # what "hidden" libraries, object files and flags are used when
35086f03b1f6Smrg	  # linking a shared library.
35096f03b1f6Smrg	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
35106f03b1f6Smrg
35116f03b1f6Smrg	else
35126f03b1f6Smrg	  # FIXME: insert proper C++ library support
35136f03b1f6Smrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
35146f03b1f6Smrg	fi
35156f03b1f6Smrg	;;
35166f03b1f6Smrg    esac
35176f03b1f6Smrg    ;;
35186f03b1f6Smrg  psos*)
35196f03b1f6Smrg    # FIXME: insert proper C++ library support
35206f03b1f6Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
35216f03b1f6Smrg    ;;
35226f03b1f6Smrg  sunos4*)
35236f03b1f6Smrg    case $cc_basename in
35246f03b1f6Smrg      CC*)
35256f03b1f6Smrg	# Sun C++ 4.x
35266f03b1f6Smrg	# FIXME: insert proper C++ library support
35276f03b1f6Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
35286f03b1f6Smrg	;;
35296f03b1f6Smrg      lcc*)
35306f03b1f6Smrg	# Lucid
35316f03b1f6Smrg	# FIXME: insert proper C++ library support
35326f03b1f6Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
35336f03b1f6Smrg	;;
35346f03b1f6Smrg      *)
35356f03b1f6Smrg	# FIXME: insert proper C++ library support
35366f03b1f6Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
35376f03b1f6Smrg	;;
35386f03b1f6Smrg    esac
35396f03b1f6Smrg    ;;
35406f03b1f6Smrg  solaris*)
35416f03b1f6Smrg    case $cc_basename in
35426f03b1f6Smrg      CC*)
35436f03b1f6Smrg	# Sun C++ 4.2, 5.x and Centerline C++
35446f03b1f6Smrg        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
35456f03b1f6Smrg	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
35466f03b1f6Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
35476f03b1f6Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
35486f03b1f6Smrg	$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'
35496f03b1f6Smrg
35506f03b1f6Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
35516f03b1f6Smrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
35526f03b1f6Smrg	case $host_os in
35536f03b1f6Smrg	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
35546f03b1f6Smrg	  *)
35556f03b1f6Smrg	    # The C++ compiler is used as linker so we must use $wl
35566f03b1f6Smrg	    # flag to pass the commands to the underlying system
35576f03b1f6Smrg	    # linker. We must also pass each convience library through
35586f03b1f6Smrg	    # to the system linker between allextract/defaultextract.
35596f03b1f6Smrg	    # The C++ compiler will combine linker options so we
35606f03b1f6Smrg	    # cannot just pass the convience library names through
35616f03b1f6Smrg	    # without $wl.
35626f03b1f6Smrg	    # Supported since Solaris 2.6 (maybe 2.5.1?)
35636f03b1f6Smrg	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
35646f03b1f6Smrg	    ;;
35656f03b1f6Smrg	esac
35666f03b1f6Smrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
35676f03b1f6Smrg
35686f03b1f6Smrg	output_verbose_link_cmd='echo'
35696f03b1f6Smrg
35706f03b1f6Smrg	# Archives containing C++ object files must be created using
35716f03b1f6Smrg	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
35726f03b1f6Smrg	# necessary to make sure instantiated templates are included
35736f03b1f6Smrg	# in the archive.
35746f03b1f6Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
35756f03b1f6Smrg	;;
35766f03b1f6Smrg      gcx*)
35776f03b1f6Smrg	# Green Hills C++ Compiler
35786f03b1f6Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
35796f03b1f6Smrg
35806f03b1f6Smrg	# The C++ compiler must be used to create the archive.
35816f03b1f6Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
35826f03b1f6Smrg	;;
35836f03b1f6Smrg      *)
35846f03b1f6Smrg	# GNU C++ compiler with Solaris linker
35856f03b1f6Smrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
35866f03b1f6Smrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
35876f03b1f6Smrg	  if $CC --version | grep -v '^2\.7' > /dev/null; then
35886f03b1f6Smrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
35896f03b1f6Smrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
35906f03b1f6Smrg		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
35916f03b1f6Smrg
35926f03b1f6Smrg	    # Commands to make compiler produce verbose output that lists
35936f03b1f6Smrg	    # what "hidden" libraries, object files and flags are used when
35946f03b1f6Smrg	    # linking a shared library.
35956f03b1f6Smrg	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
35966f03b1f6Smrg	  else
35976f03b1f6Smrg	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
35986f03b1f6Smrg	    # platform.
35996f03b1f6Smrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
36006f03b1f6Smrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
36016f03b1f6Smrg		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
36026f03b1f6Smrg
36036f03b1f6Smrg	    # Commands to make compiler produce verbose output that lists
36046f03b1f6Smrg	    # what "hidden" libraries, object files and flags are used when
36056f03b1f6Smrg	    # linking a shared library.
36066f03b1f6Smrg	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
36076f03b1f6Smrg	  fi
36086f03b1f6Smrg
36096f03b1f6Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
36106f03b1f6Smrg	fi
36116f03b1f6Smrg	;;
36126f03b1f6Smrg    esac
36136f03b1f6Smrg    ;;
36146f03b1f6Smrg  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
36156f03b1f6Smrg    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
36166f03b1f6Smrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
36176f03b1f6Smrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
36186f03b1f6Smrg    runpath_var='LD_RUN_PATH'
36196f03b1f6Smrg
36206f03b1f6Smrg    case $cc_basename in
36216f03b1f6Smrg      CC*)
36226f03b1f6Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
36236f03b1f6Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
36246f03b1f6Smrg	;;
36256f03b1f6Smrg      *)
36266f03b1f6Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
36276f03b1f6Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
36286f03b1f6Smrg	;;
36296f03b1f6Smrg    esac
36306f03b1f6Smrg    ;;
36316f03b1f6Smrg  sysv5* | sco3.2v5* | sco5v6*)
36326f03b1f6Smrg    # Note: We can NOT use -z defs as we might desire, because we do not
36336f03b1f6Smrg    # link with -lc, and that would cause any symbols used from libc to
36346f03b1f6Smrg    # always be unresolved, which means just about no library would
36356f03b1f6Smrg    # ever link correctly.  If we're not using GNU ld we use -z text
36366f03b1f6Smrg    # though, which does catch some bad symbols but isn't as heavy-handed
36376f03b1f6Smrg    # as -z defs.
36386f03b1f6Smrg    # For security reasons, it is highly recommended that you always
36396f03b1f6Smrg    # use absolute paths for naming shared libraries, and exclude the
36406f03b1f6Smrg    # DT_RUNPATH tag from executables and libraries.  But doing so
36416f03b1f6Smrg    # requires that you compile everything twice, which is a pain.
36426f03b1f6Smrg    # So that behaviour is only enabled if SCOABSPATH is set to a
36436f03b1f6Smrg    # non-empty value in the environment.  Most likely only useful for
36446f03b1f6Smrg    # creating official distributions of packages.
36456f03b1f6Smrg    # This is a hack until libtool officially supports absolute path
36466f03b1f6Smrg    # names for shared libraries.
36476f03b1f6Smrg    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
36486f03b1f6Smrg    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
36496f03b1f6Smrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
36506f03b1f6Smrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
36516f03b1f6Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
36526f03b1f6Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
36536f03b1f6Smrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
36546f03b1f6Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
36556f03b1f6Smrg    runpath_var='LD_RUN_PATH'
36566f03b1f6Smrg
36576f03b1f6Smrg    case $cc_basename in
36586f03b1f6Smrg      CC*)
36596f03b1f6Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
36606f03b1f6Smrg	_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'
36616f03b1f6Smrg	;;
36626f03b1f6Smrg      *)
36636f03b1f6Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
36646f03b1f6Smrg	_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'
36656f03b1f6Smrg	;;
36666f03b1f6Smrg    esac
36676f03b1f6Smrg    ;;
36686f03b1f6Smrg  tandem*)
36696f03b1f6Smrg    case $cc_basename in
36706f03b1f6Smrg      NCC*)
36716f03b1f6Smrg	# NonStop-UX NCC 3.20
36726f03b1f6Smrg	# FIXME: insert proper C++ library support
36736f03b1f6Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
36746f03b1f6Smrg	;;
36756f03b1f6Smrg      *)
36766f03b1f6Smrg	# FIXME: insert proper C++ library support
36776f03b1f6Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
36786f03b1f6Smrg	;;
36796f03b1f6Smrg    esac
36806f03b1f6Smrg    ;;
36816f03b1f6Smrg  vxworks*)
36826f03b1f6Smrg    # FIXME: insert proper C++ library support
36836f03b1f6Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
36846f03b1f6Smrg    ;;
36856f03b1f6Smrg  *)
36866f03b1f6Smrg    # FIXME: insert proper C++ library support
36876f03b1f6Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
36886f03b1f6Smrg    ;;
36896f03b1f6Smrgesac
36906f03b1f6SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
36916f03b1f6Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
36926f03b1f6Smrg
36936f03b1f6Smrg_LT_AC_TAGVAR(GCC, $1)="$GXX"
36946f03b1f6Smrg_LT_AC_TAGVAR(LD, $1)="$LD"
36956f03b1f6Smrg
36966f03b1f6SmrgAC_LIBTOOL_POSTDEP_PREDEP($1)
36976f03b1f6SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
36986f03b1f6SmrgAC_LIBTOOL_PROG_CC_C_O($1)
36996f03b1f6SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
37006f03b1f6SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
37016f03b1f6SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
37026f03b1f6SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
37036f03b1f6Smrg
37046f03b1f6SmrgAC_LIBTOOL_CONFIG($1)
37056f03b1f6Smrg
37066f03b1f6SmrgAC_LANG_POP
37076f03b1f6SmrgCC=$lt_save_CC
37086f03b1f6SmrgLDCXX=$LD
37096f03b1f6SmrgLD=$lt_save_LD
37106f03b1f6SmrgGCC=$lt_save_GCC
37116f03b1f6Smrgwith_gnu_ldcxx=$with_gnu_ld
37126f03b1f6Smrgwith_gnu_ld=$lt_save_with_gnu_ld
37136f03b1f6Smrglt_cv_path_LDCXX=$lt_cv_path_LD
37146f03b1f6Smrglt_cv_path_LD=$lt_save_path_LD
37156f03b1f6Smrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
37166f03b1f6Smrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
37176f03b1f6Smrg])# AC_LIBTOOL_LANG_CXX_CONFIG
37186f03b1f6Smrg
37196f03b1f6Smrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
37206f03b1f6Smrg# ------------------------------------
37216f03b1f6Smrg# Figure out "hidden" library dependencies from verbose
37226f03b1f6Smrg# compiler output when linking a shared library.
37236f03b1f6Smrg# Parse the compiler output and extract the necessary
37246f03b1f6Smrg# objects, libraries and library flags.
37256f03b1f6SmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
37266f03b1f6Smrgdnl we can't use the lt_simple_compile_test_code here,
37276f03b1f6Smrgdnl because it contains code intended for an executable,
37286f03b1f6Smrgdnl not a library.  It's possible we should let each
37296f03b1f6Smrgdnl tag define a new lt_????_link_test_code variable,
37306f03b1f6Smrgdnl but it's only used here...
37316f03b1f6Smrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF
37326f03b1f6Smrgint a;
37336f03b1f6Smrgvoid foo (void) { a = 0; }
37346f03b1f6SmrgEOF
37356f03b1f6Smrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
37366f03b1f6Smrgclass Foo
37376f03b1f6Smrg{
37386f03b1f6Smrgpublic:
37396f03b1f6Smrg  Foo (void) { a = 0; }
37406f03b1f6Smrgprivate:
37416f03b1f6Smrg  int a;
37426f03b1f6Smrg};
37436f03b1f6SmrgEOF
37446f03b1f6Smrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF
37456f03b1f6Smrg      subroutine foo
37466f03b1f6Smrg      implicit none
37476f03b1f6Smrg      integer*4 a
37486f03b1f6Smrg      a=0
37496f03b1f6Smrg      return
37506f03b1f6Smrg      end
37516f03b1f6SmrgEOF
37526f03b1f6Smrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
37536f03b1f6Smrgpublic class foo {
37546f03b1f6Smrg  private int a;
37556f03b1f6Smrg  public void bar (void) {
37566f03b1f6Smrg    a = 0;
37576f03b1f6Smrg  }
37586f03b1f6Smrg};
37596f03b1f6SmrgEOF
37606f03b1f6Smrg])
37616f03b1f6Smrgdnl Parse the compiler output and extract the necessary
37626f03b1f6Smrgdnl objects, libraries and library flags.
37636f03b1f6Smrgif AC_TRY_EVAL(ac_compile); then
37646f03b1f6Smrg  # Parse the compiler output and extract the necessary
37656f03b1f6Smrg  # objects, libraries and library flags.
37666f03b1f6Smrg
37676f03b1f6Smrg  # Sentinel used to keep track of whether or not we are before
37686f03b1f6Smrg  # the conftest object file.
37696f03b1f6Smrg  pre_test_object_deps_done=no
37706f03b1f6Smrg
37716f03b1f6Smrg  # The `*' in the case matches for architectures that use `case' in
37726f03b1f6Smrg  # $output_verbose_cmd can trigger glob expansion during the loop
37736f03b1f6Smrg  # eval without this substitution.
37746f03b1f6Smrg  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
37756f03b1f6Smrg
37766f03b1f6Smrg  for p in `eval $output_verbose_link_cmd`; do
37776f03b1f6Smrg    case $p in
37786f03b1f6Smrg
37796f03b1f6Smrg    -L* | -R* | -l*)
37806f03b1f6Smrg       # Some compilers place space between "-{L,R}" and the path.
37816f03b1f6Smrg       # Remove the space.
37826f03b1f6Smrg       if test $p = "-L" \
37836f03b1f6Smrg	  || test $p = "-R"; then
37846f03b1f6Smrg	 prev=$p
37856f03b1f6Smrg	 continue
37866f03b1f6Smrg       else
37876f03b1f6Smrg	 prev=
37886f03b1f6Smrg       fi
37896f03b1f6Smrg
37906f03b1f6Smrg       if test "$pre_test_object_deps_done" = no; then
37916f03b1f6Smrg	 case $p in
37926f03b1f6Smrg	 -L* | -R*)
37936f03b1f6Smrg	   # Internal compiler library paths should come after those
37946f03b1f6Smrg	   # provided the user.  The postdeps already come after the
37956f03b1f6Smrg	   # user supplied libs so there is no need to process them.
37966f03b1f6Smrg	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
37976f03b1f6Smrg	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
37986f03b1f6Smrg	   else
37996f03b1f6Smrg	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
38006f03b1f6Smrg	   fi
38016f03b1f6Smrg	   ;;
38026f03b1f6Smrg	 # The "-l" case would never come before the object being
38036f03b1f6Smrg	 # linked, so don't bother handling this case.
38046f03b1f6Smrg	 esac
38056f03b1f6Smrg       else
38066f03b1f6Smrg	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
38076f03b1f6Smrg	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
38086f03b1f6Smrg	 else
38096f03b1f6Smrg	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
38106f03b1f6Smrg	 fi
38116f03b1f6Smrg       fi
38126f03b1f6Smrg       ;;
38136f03b1f6Smrg
38146f03b1f6Smrg    *.$objext)
38156f03b1f6Smrg       # This assumes that the test object file only shows up
38166f03b1f6Smrg       # once in the compiler output.
38176f03b1f6Smrg       if test "$p" = "conftest.$objext"; then
38186f03b1f6Smrg	 pre_test_object_deps_done=yes
38196f03b1f6Smrg	 continue
38206f03b1f6Smrg       fi
38216f03b1f6Smrg
38226f03b1f6Smrg       if test "$pre_test_object_deps_done" = no; then
38236f03b1f6Smrg	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
38246f03b1f6Smrg	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
38256f03b1f6Smrg	 else
38266f03b1f6Smrg	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
38276f03b1f6Smrg	 fi
38286f03b1f6Smrg       else
38296f03b1f6Smrg	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
38306f03b1f6Smrg	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
38316f03b1f6Smrg	 else
38326f03b1f6Smrg	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
38336f03b1f6Smrg	 fi
38346f03b1f6Smrg       fi
38356f03b1f6Smrg       ;;
38366f03b1f6Smrg
38376f03b1f6Smrg    *) ;; # Ignore the rest.
38386f03b1f6Smrg
38396f03b1f6Smrg    esac
38406f03b1f6Smrg  done
38416f03b1f6Smrg
38426f03b1f6Smrg  # Clean up.
38436f03b1f6Smrg  rm -f a.out a.exe
38446f03b1f6Smrgelse
38456f03b1f6Smrg  echo "libtool.m4: error: problem compiling $1 test program"
38466f03b1f6Smrgfi
38476f03b1f6Smrg
38486f03b1f6Smrg$rm -f confest.$objext
38496f03b1f6Smrg
38506f03b1f6Smrg# PORTME: override above test on systems where it is broken
38516f03b1f6Smrgifelse([$1],[CXX],
38526f03b1f6Smrg[case $host_os in
38536f03b1f6Smrginterix3*)
38546f03b1f6Smrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
38556f03b1f6Smrg  # hack all around it, let's just trust "g++" to DTRT.
38566f03b1f6Smrg  _LT_AC_TAGVAR(predep_objects,$1)=
38576f03b1f6Smrg  _LT_AC_TAGVAR(postdep_objects,$1)=
38586f03b1f6Smrg  _LT_AC_TAGVAR(postdeps,$1)=
38596f03b1f6Smrg  ;;
38606f03b1f6Smrg
38616f03b1f6Smrgsolaris*)
38626f03b1f6Smrg  case $cc_basename in
38636f03b1f6Smrg  CC*)
38646f03b1f6Smrg    # Adding this requires a known-good setup of shared libraries for
38656f03b1f6Smrg    # Sun compiler versions before 5.6, else PIC objects from an old
38666f03b1f6Smrg    # archive will be linked into the output, leading to subtle bugs.
38676f03b1f6Smrg    _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
38686f03b1f6Smrg    ;;
38696f03b1f6Smrg  esac
38706f03b1f6Smrg  ;;
38716f03b1f6Smrgesac
38726f03b1f6Smrg])
38736f03b1f6Smrg
38746f03b1f6Smrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in
38756f03b1f6Smrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
38766f03b1f6Smrgesac
38776f03b1f6Smrg])# AC_LIBTOOL_POSTDEP_PREDEP
38786f03b1f6Smrg
38796f03b1f6Smrg# AC_LIBTOOL_LANG_F77_CONFIG
38806f03b1f6Smrg# --------------------------
38816f03b1f6Smrg# Ensure that the configuration vars for the C compiler are
38826f03b1f6Smrg# suitably defined.  Those variables are subsequently used by
38836f03b1f6Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
38846f03b1f6SmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
38856f03b1f6SmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG],
38866f03b1f6Smrg[AC_REQUIRE([AC_PROG_F77])
38876f03b1f6SmrgAC_LANG_PUSH(Fortran 77)
38886f03b1f6Smrg
38896f03b1f6Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
38906f03b1f6Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)=
38916f03b1f6Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no
38926f03b1f6Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
38936f03b1f6Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
38946f03b1f6Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no
38956f03b1f6Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
38966f03b1f6Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
38976f03b1f6Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
38986f03b1f6Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
38996f03b1f6Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no
39006f03b1f6Smrg_LT_AC_TAGVAR(module_cmds, $1)=
39016f03b1f6Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)=
39026f03b1f6Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
39036f03b1f6Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
39046f03b1f6Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)=
39056f03b1f6Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
39066f03b1f6Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
39076f03b1f6Smrg
39086f03b1f6Smrg# Source file extension for f77 test sources.
39096f03b1f6Smrgac_ext=f
39106f03b1f6Smrg
39116f03b1f6Smrg# Object file extension for compiled f77 test sources.
39126f03b1f6Smrgobjext=o
39136f03b1f6Smrg_LT_AC_TAGVAR(objext, $1)=$objext
39146f03b1f6Smrg
39156f03b1f6Smrg# Code to be used in simple compile tests
39166f03b1f6Smrglt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
39176f03b1f6Smrg
39186f03b1f6Smrg# Code to be used in simple link tests
39196f03b1f6Smrglt_simple_link_test_code="      program t\n      end\n"
39206f03b1f6Smrg
39216f03b1f6Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
39226f03b1f6Smrg_LT_AC_SYS_COMPILER
39236f03b1f6Smrg
39246f03b1f6Smrg# save warnings/boilerplate of simple test code
39256f03b1f6Smrg_LT_COMPILER_BOILERPLATE
39266f03b1f6Smrg_LT_LINKER_BOILERPLATE
39276f03b1f6Smrg
39286f03b1f6Smrg# Allow CC to be a program name with arguments.
39296f03b1f6Smrglt_save_CC="$CC"
39306f03b1f6SmrgCC=${F77-"f77"}
39316f03b1f6Smrgcompiler=$CC
39326f03b1f6Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
39336f03b1f6Smrg_LT_CC_BASENAME([$compiler])
39346f03b1f6Smrg
39356f03b1f6SmrgAC_MSG_CHECKING([if libtool supports shared libraries])
39366f03b1f6SmrgAC_MSG_RESULT([$can_build_shared])
39376f03b1f6Smrg
39386f03b1f6SmrgAC_MSG_CHECKING([whether to build shared libraries])
39396f03b1f6Smrgtest "$can_build_shared" = "no" && enable_shared=no
39406f03b1f6Smrg
39416f03b1f6Smrg# On AIX, shared libraries and static libraries use the same namespace, and
39426f03b1f6Smrg# are all built from PIC.
39436f03b1f6Smrgcase $host_os in
39446f03b1f6Smrgaix3*)
39456f03b1f6Smrg  test "$enable_shared" = yes && enable_static=no
39466f03b1f6Smrg  if test -n "$RANLIB"; then
39476f03b1f6Smrg    archive_cmds="$archive_cmds~\$RANLIB \$lib"
39486f03b1f6Smrg    postinstall_cmds='$RANLIB $lib'
39496f03b1f6Smrg  fi
39506f03b1f6Smrg  ;;
39516f03b1f6Smrgaix4* | aix5*)
39526f03b1f6Smrg  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
39536f03b1f6Smrg    test "$enable_shared" = yes && enable_static=no
39546f03b1f6Smrg  fi
39556f03b1f6Smrg  ;;
39566f03b1f6Smrgesac
39576f03b1f6SmrgAC_MSG_RESULT([$enable_shared])
39586f03b1f6Smrg
39596f03b1f6SmrgAC_MSG_CHECKING([whether to build static libraries])
39606f03b1f6Smrg# Make sure either enable_shared or enable_static is yes.
39616f03b1f6Smrgtest "$enable_shared" = yes || enable_static=yes
39626f03b1f6SmrgAC_MSG_RESULT([$enable_static])
39636f03b1f6Smrg
39646f03b1f6Smrg_LT_AC_TAGVAR(GCC, $1)="$G77"
39656f03b1f6Smrg_LT_AC_TAGVAR(LD, $1)="$LD"
39666f03b1f6Smrg
39676f03b1f6SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
39686f03b1f6SmrgAC_LIBTOOL_PROG_CC_C_O($1)
39696f03b1f6SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
39706f03b1f6SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
39716f03b1f6SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
39726f03b1f6SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
39736f03b1f6Smrg
39746f03b1f6SmrgAC_LIBTOOL_CONFIG($1)
39756f03b1f6Smrg
39766f03b1f6SmrgAC_LANG_POP
39776f03b1f6SmrgCC="$lt_save_CC"
39786f03b1f6Smrg])# AC_LIBTOOL_LANG_F77_CONFIG
39796f03b1f6Smrg
39806f03b1f6Smrg
39816f03b1f6Smrg# AC_LIBTOOL_LANG_GCJ_CONFIG
39826f03b1f6Smrg# --------------------------
39836f03b1f6Smrg# Ensure that the configuration vars for the C compiler are
39846f03b1f6Smrg# suitably defined.  Those variables are subsequently used by
39856f03b1f6Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
39866f03b1f6SmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
39876f03b1f6SmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
39886f03b1f6Smrg[AC_LANG_SAVE
39896f03b1f6Smrg
39906f03b1f6Smrg# Source file extension for Java test sources.
39916f03b1f6Smrgac_ext=java
39926f03b1f6Smrg
39936f03b1f6Smrg# Object file extension for compiled Java test sources.
39946f03b1f6Smrgobjext=o
39956f03b1f6Smrg_LT_AC_TAGVAR(objext, $1)=$objext
39966f03b1f6Smrg
39976f03b1f6Smrg# Code to be used in simple compile tests
39986f03b1f6Smrglt_simple_compile_test_code="class foo {}\n"
39996f03b1f6Smrg
40006f03b1f6Smrg# Code to be used in simple link tests
40016f03b1f6Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
40026f03b1f6Smrg
40036f03b1f6Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
40046f03b1f6Smrg_LT_AC_SYS_COMPILER
40056f03b1f6Smrg
40066f03b1f6Smrg# save warnings/boilerplate of simple test code
40076f03b1f6Smrg_LT_COMPILER_BOILERPLATE
40086f03b1f6Smrg_LT_LINKER_BOILERPLATE
40096f03b1f6Smrg
40106f03b1f6Smrg# Allow CC to be a program name with arguments.
40116f03b1f6Smrglt_save_CC="$CC"
40126f03b1f6SmrgCC=${GCJ-"gcj"}
40136f03b1f6Smrgcompiler=$CC
40146f03b1f6Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
40156f03b1f6Smrg_LT_CC_BASENAME([$compiler])
40166f03b1f6Smrg
40176f03b1f6Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
40186f03b1f6Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
40196f03b1f6Smrg
40206f03b1f6Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
40216f03b1f6Smrg
40226f03b1f6SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
40236f03b1f6SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
40246f03b1f6SmrgAC_LIBTOOL_PROG_CC_C_O($1)
40256f03b1f6SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
40266f03b1f6SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
40276f03b1f6SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
40286f03b1f6SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
40296f03b1f6Smrg
40306f03b1f6SmrgAC_LIBTOOL_CONFIG($1)
40316f03b1f6Smrg
40326f03b1f6SmrgAC_LANG_RESTORE
40336f03b1f6SmrgCC="$lt_save_CC"
40346f03b1f6Smrg])# AC_LIBTOOL_LANG_GCJ_CONFIG
40356f03b1f6Smrg
40366f03b1f6Smrg
40376f03b1f6Smrg# AC_LIBTOOL_LANG_RC_CONFIG
40386f03b1f6Smrg# -------------------------
40396f03b1f6Smrg# Ensure that the configuration vars for the Windows resource compiler are
40406f03b1f6Smrg# suitably defined.  Those variables are subsequently used by
40416f03b1f6Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
40426f03b1f6SmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
40436f03b1f6SmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG],
40446f03b1f6Smrg[AC_LANG_SAVE
40456f03b1f6Smrg
40466f03b1f6Smrg# Source file extension for RC test sources.
40476f03b1f6Smrgac_ext=rc
40486f03b1f6Smrg
40496f03b1f6Smrg# Object file extension for compiled RC test sources.
40506f03b1f6Smrgobjext=o
40516f03b1f6Smrg_LT_AC_TAGVAR(objext, $1)=$objext
40526f03b1f6Smrg
40536f03b1f6Smrg# Code to be used in simple compile tests
40546f03b1f6Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
40556f03b1f6Smrg
40566f03b1f6Smrg# Code to be used in simple link tests
40576f03b1f6Smrglt_simple_link_test_code="$lt_simple_compile_test_code"
40586f03b1f6Smrg
40596f03b1f6Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
40606f03b1f6Smrg_LT_AC_SYS_COMPILER
40616f03b1f6Smrg
40626f03b1f6Smrg# save warnings/boilerplate of simple test code
40636f03b1f6Smrg_LT_COMPILER_BOILERPLATE
40646f03b1f6Smrg_LT_LINKER_BOILERPLATE
40656f03b1f6Smrg
40666f03b1f6Smrg# Allow CC to be a program name with arguments.
40676f03b1f6Smrglt_save_CC="$CC"
40686f03b1f6SmrgCC=${RC-"windres"}
40696f03b1f6Smrgcompiler=$CC
40706f03b1f6Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
40716f03b1f6Smrg_LT_CC_BASENAME([$compiler])
40726f03b1f6Smrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
40736f03b1f6Smrg
40746f03b1f6SmrgAC_LIBTOOL_CONFIG($1)
40756f03b1f6Smrg
40766f03b1f6SmrgAC_LANG_RESTORE
40776f03b1f6SmrgCC="$lt_save_CC"
40786f03b1f6Smrg])# AC_LIBTOOL_LANG_RC_CONFIG
40796f03b1f6Smrg
40806f03b1f6Smrg
40816f03b1f6Smrg# AC_LIBTOOL_CONFIG([TAGNAME])
40826f03b1f6Smrg# ----------------------------
40836f03b1f6Smrg# If TAGNAME is not passed, then create an initial libtool script
40846f03b1f6Smrg# with a default configuration from the untagged config vars.  Otherwise
40856f03b1f6Smrg# add code to config.status for appending the configuration named by
40866f03b1f6Smrg# TAGNAME from the matching tagged config vars.
40876f03b1f6SmrgAC_DEFUN([AC_LIBTOOL_CONFIG],
40886f03b1f6Smrg[# The else clause should only fire when bootstrapping the
40896f03b1f6Smrg# libtool distribution, otherwise you forgot to ship ltmain.sh
40906f03b1f6Smrg# with your package, and you will get complaints that there are
40916f03b1f6Smrg# no rules to generate ltmain.sh.
40926f03b1f6Smrgif test -f "$ltmain"; then
40936f03b1f6Smrg  # See if we are running on zsh, and set the options which allow our commands through
40946f03b1f6Smrg  # without removal of \ escapes.
40956f03b1f6Smrg  if test -n "${ZSH_VERSION+set}" ; then
40966f03b1f6Smrg    setopt NO_GLOB_SUBST
40976f03b1f6Smrg  fi
40986f03b1f6Smrg  # Now quote all the things that may contain metacharacters while being
40996f03b1f6Smrg  # careful not to overquote the AC_SUBSTed values.  We take copies of the
41006f03b1f6Smrg  # variables and quote the copies for generation of the libtool script.
41016f03b1f6Smrg  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
41026f03b1f6Smrg    SED SHELL STRIP \
41036f03b1f6Smrg    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
41046f03b1f6Smrg    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
41056f03b1f6Smrg    deplibs_check_method reload_flag reload_cmds need_locks \
41066f03b1f6Smrg    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
41076f03b1f6Smrg    lt_cv_sys_global_symbol_to_c_name_address \
41086f03b1f6Smrg    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
41096f03b1f6Smrg    old_postinstall_cmds old_postuninstall_cmds \
41106f03b1f6Smrg    _LT_AC_TAGVAR(compiler, $1) \
41116f03b1f6Smrg    _LT_AC_TAGVAR(CC, $1) \
41126f03b1f6Smrg    _LT_AC_TAGVAR(LD, $1) \
41136f03b1f6Smrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
41146f03b1f6Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
41156f03b1f6Smrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
41166f03b1f6Smrg    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
41176f03b1f6Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
41186f03b1f6Smrg    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
41196f03b1f6Smrg    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
41206f03b1f6Smrg    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
41216f03b1f6Smrg    _LT_AC_TAGVAR(old_archive_cmds, $1) \
41226f03b1f6Smrg    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
41236f03b1f6Smrg    _LT_AC_TAGVAR(predep_objects, $1) \
41246f03b1f6Smrg    _LT_AC_TAGVAR(postdep_objects, $1) \
41256f03b1f6Smrg    _LT_AC_TAGVAR(predeps, $1) \
41266f03b1f6Smrg    _LT_AC_TAGVAR(postdeps, $1) \
41276f03b1f6Smrg    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
41286f03b1f6Smrg    _LT_AC_TAGVAR(archive_cmds, $1) \
41296f03b1f6Smrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
41306f03b1f6Smrg    _LT_AC_TAGVAR(postinstall_cmds, $1) \
41316f03b1f6Smrg    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
41326f03b1f6Smrg    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
41336f03b1f6Smrg    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
41346f03b1f6Smrg    _LT_AC_TAGVAR(no_undefined_flag, $1) \
41356f03b1f6Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
41366f03b1f6Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
41376f03b1f6Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
41386f03b1f6Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
41396f03b1f6Smrg    _LT_AC_TAGVAR(hardcode_automatic, $1) \
41406f03b1f6Smrg    _LT_AC_TAGVAR(module_cmds, $1) \
41416f03b1f6Smrg    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
41426f03b1f6Smrg    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
41436f03b1f6Smrg    _LT_AC_TAGVAR(exclude_expsyms, $1) \
41446f03b1f6Smrg    _LT_AC_TAGVAR(include_expsyms, $1); do
41456f03b1f6Smrg
41466f03b1f6Smrg    case $var in
41476f03b1f6Smrg    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
41486f03b1f6Smrg    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
41496f03b1f6Smrg    _LT_AC_TAGVAR(archive_cmds, $1) | \
41506f03b1f6Smrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
41516f03b1f6Smrg    _LT_AC_TAGVAR(module_cmds, $1) | \
41526f03b1f6Smrg    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
41536f03b1f6Smrg    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
41546f03b1f6Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
41556f03b1f6Smrg    extract_expsyms_cmds | reload_cmds | finish_cmds | \
41566f03b1f6Smrg    postinstall_cmds | postuninstall_cmds | \
41576f03b1f6Smrg    old_postinstall_cmds | old_postuninstall_cmds | \
41586f03b1f6Smrg    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
41596f03b1f6Smrg      # Double-quote double-evaled strings.
41606f03b1f6Smrg      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
41616f03b1f6Smrg      ;;
41626f03b1f6Smrg    *)
41636f03b1f6Smrg      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
41646f03b1f6Smrg      ;;
41656f03b1f6Smrg    esac
41666f03b1f6Smrg  done
41676f03b1f6Smrg
41686f03b1f6Smrg  case $lt_echo in
41696f03b1f6Smrg  *'\[$]0 --fallback-echo"')
41706f03b1f6Smrg    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
41716f03b1f6Smrg    ;;
41726f03b1f6Smrg  esac
41736f03b1f6Smrg
41746f03b1f6Smrgifelse([$1], [],
41756f03b1f6Smrg  [cfgfile="${ofile}T"
41766f03b1f6Smrg  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
41776f03b1f6Smrg  $rm -f "$cfgfile"
41786f03b1f6Smrg  AC_MSG_NOTICE([creating $ofile])],
41796f03b1f6Smrg  [cfgfile="$ofile"])
41806f03b1f6Smrg
41816f03b1f6Smrg  cat <<__EOF__ >> "$cfgfile"
41826f03b1f6Smrgifelse([$1], [],
41836f03b1f6Smrg[#! $SHELL
41846f03b1f6Smrg
41856f03b1f6Smrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
41866f03b1f6Smrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
41876f03b1f6Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
41886f03b1f6Smrg#
41896f03b1f6Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
41906f03b1f6Smrg# Free Software Foundation, Inc.
41916f03b1f6Smrg#
41926f03b1f6Smrg# This file is part of GNU Libtool:
41936f03b1f6Smrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
41946f03b1f6Smrg#
41956f03b1f6Smrg# This program is free software; you can redistribute it and/or modify
41966f03b1f6Smrg# it under the terms of the GNU General Public License as published by
41976f03b1f6Smrg# the Free Software Foundation; either version 2 of the License, or
41986f03b1f6Smrg# (at your option) any later version.
41996f03b1f6Smrg#
42006f03b1f6Smrg# This program is distributed in the hope that it will be useful, but
42016f03b1f6Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
42026f03b1f6Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
42036f03b1f6Smrg# General Public License for more details.
42046f03b1f6Smrg#
42056f03b1f6Smrg# You should have received a copy of the GNU General Public License
42066f03b1f6Smrg# along with this program; if not, write to the Free Software
42076f03b1f6Smrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
42086f03b1f6Smrg#
42096f03b1f6Smrg# As a special exception to the GNU General Public License, if you
42106f03b1f6Smrg# distribute this file as part of a program that contains a
42116f03b1f6Smrg# configuration script generated by Autoconf, you may include it under
42126f03b1f6Smrg# the same distribution terms that you use for the rest of that program.
42136f03b1f6Smrg
42146f03b1f6Smrg# A sed program that does not truncate output.
42156f03b1f6SmrgSED=$lt_SED
42166f03b1f6Smrg
42176f03b1f6Smrg# Sed that helps us avoid accidentally triggering echo(1) options like -n.
42186f03b1f6SmrgXsed="$SED -e 1s/^X//"
42196f03b1f6Smrg
42206f03b1f6Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
42216f03b1f6Smrg# if CDPATH is set.
42226f03b1f6Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
42236f03b1f6Smrg
42246f03b1f6Smrg# The names of the tagged configurations supported by this script.
42256f03b1f6Smrgavailable_tags=
42266f03b1f6Smrg
42276f03b1f6Smrg# ### BEGIN LIBTOOL CONFIG],
42286f03b1f6Smrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
42296f03b1f6Smrg
42306f03b1f6Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
42316f03b1f6Smrg
42326f03b1f6Smrg# Shell to use when invoking shell scripts.
42336f03b1f6SmrgSHELL=$lt_SHELL
42346f03b1f6Smrg
42356f03b1f6Smrg# Whether or not to build shared libraries.
42366f03b1f6Smrgbuild_libtool_libs=$enable_shared
42376f03b1f6Smrg
42386f03b1f6Smrg# Whether or not to build static libraries.
42396f03b1f6Smrgbuild_old_libs=$enable_static
42406f03b1f6Smrg
42416f03b1f6Smrg# Whether or not to add -lc for building shared libraries.
42426f03b1f6Smrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
42436f03b1f6Smrg
42446f03b1f6Smrg# Whether or not to disallow shared libs when runtime libs are static
42456f03b1f6Smrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
42466f03b1f6Smrg
42476f03b1f6Smrg# Whether or not to optimize for fast installation.
42486f03b1f6Smrgfast_install=$enable_fast_install
42496f03b1f6Smrg
42506f03b1f6Smrg# The host system.
42516f03b1f6Smrghost_alias=$host_alias
42526f03b1f6Smrghost=$host
42536f03b1f6Smrghost_os=$host_os
42546f03b1f6Smrg
42556f03b1f6Smrg# The build system.
42566f03b1f6Smrgbuild_alias=$build_alias
42576f03b1f6Smrgbuild=$build
42586f03b1f6Smrgbuild_os=$build_os
42596f03b1f6Smrg
42606f03b1f6Smrg# An echo program that does not interpret backslashes.
42616f03b1f6Smrgecho=$lt_echo
42626f03b1f6Smrg
42636f03b1f6Smrg# The archiver.
42646f03b1f6SmrgAR=$lt_AR
42656f03b1f6SmrgAR_FLAGS=$lt_AR_FLAGS
42666f03b1f6Smrg
42676f03b1f6Smrg# A C compiler.
42686f03b1f6SmrgLTCC=$lt_LTCC
42696f03b1f6Smrg
42706f03b1f6Smrg# LTCC compiler flags.
42716f03b1f6SmrgLTCFLAGS=$lt_LTCFLAGS
42726f03b1f6Smrg
42736f03b1f6Smrg# A language-specific compiler.
42746f03b1f6SmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
42756f03b1f6Smrg
42766f03b1f6Smrg# Is the compiler the GNU C compiler?
42776f03b1f6Smrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1)
42786f03b1f6Smrg
42796f03b1f6Smrg# An ERE matcher.
42806f03b1f6SmrgEGREP=$lt_EGREP
42816f03b1f6Smrg
42826f03b1f6Smrg# The linker used to build libraries.
42836f03b1f6SmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1)
42846f03b1f6Smrg
42856f03b1f6Smrg# Whether we need hard or soft links.
42866f03b1f6SmrgLN_S=$lt_LN_S
42876f03b1f6Smrg
42886f03b1f6Smrg# A BSD-compatible nm program.
42896f03b1f6SmrgNM=$lt_NM
42906f03b1f6Smrg
42916f03b1f6Smrg# A symbol stripping program
42926f03b1f6SmrgSTRIP=$lt_STRIP
42936f03b1f6Smrg
42946f03b1f6Smrg# Used to examine libraries when file_magic_cmd begins "file"
42956f03b1f6SmrgMAGIC_CMD=$MAGIC_CMD
42966f03b1f6Smrg
42976f03b1f6Smrg# Used on cygwin: DLL creation program.
42986f03b1f6SmrgDLLTOOL="$DLLTOOL"
42996f03b1f6Smrg
43006f03b1f6Smrg# Used on cygwin: object dumper.
43016f03b1f6SmrgOBJDUMP="$OBJDUMP"
43026f03b1f6Smrg
43036f03b1f6Smrg# Used on cygwin: assembler.
43046f03b1f6SmrgAS="$AS"
43056f03b1f6Smrg
43066f03b1f6Smrg# The name of the directory that contains temporary libtool files.
43076f03b1f6Smrgobjdir=$objdir
43086f03b1f6Smrg
43096f03b1f6Smrg# How to create reloadable object files.
43106f03b1f6Smrgreload_flag=$lt_reload_flag
43116f03b1f6Smrgreload_cmds=$lt_reload_cmds
43126f03b1f6Smrg
43136f03b1f6Smrg# How to pass a linker flag through the compiler.
43146f03b1f6Smrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
43156f03b1f6Smrg
43166f03b1f6Smrg# Object file suffix (normally "o").
43176f03b1f6Smrgobjext="$ac_objext"
43186f03b1f6Smrg
43196f03b1f6Smrg# Old archive suffix (normally "a").
43206f03b1f6Smrglibext="$libext"
43216f03b1f6Smrg
43226f03b1f6Smrg# Shared library suffix (normally ".so").
43236f03b1f6Smrgshrext_cmds='$shrext_cmds'
43246f03b1f6Smrg
43256f03b1f6Smrg# Executable file suffix (normally "").
43266f03b1f6Smrgexeext="$exeext"
43276f03b1f6Smrg
43286f03b1f6Smrg# Additional compiler flags for building library objects.
43296f03b1f6Smrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
43306f03b1f6Smrgpic_mode=$pic_mode
43316f03b1f6Smrg
43326f03b1f6Smrg# What is the maximum length of a command?
43336f03b1f6Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len
43346f03b1f6Smrg
43356f03b1f6Smrg# Does compiler simultaneously support -c and -o options?
43366f03b1f6Smrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
43376f03b1f6Smrg
43386f03b1f6Smrg# Must we lock files when doing compilation?
43396f03b1f6Smrgneed_locks=$lt_need_locks
43406f03b1f6Smrg
43416f03b1f6Smrg# Do we need the lib prefix for modules?
43426f03b1f6Smrgneed_lib_prefix=$need_lib_prefix
43436f03b1f6Smrg
43446f03b1f6Smrg# Do we need a version for libraries?
43456f03b1f6Smrgneed_version=$need_version
43466f03b1f6Smrg
43476f03b1f6Smrg# Whether dlopen is supported.
43486f03b1f6Smrgdlopen_support=$enable_dlopen
43496f03b1f6Smrg
43506f03b1f6Smrg# Whether dlopen of programs is supported.
43516f03b1f6Smrgdlopen_self=$enable_dlopen_self
43526f03b1f6Smrg
43536f03b1f6Smrg# Whether dlopen of statically linked programs is supported.
43546f03b1f6Smrgdlopen_self_static=$enable_dlopen_self_static
43556f03b1f6Smrg
43566f03b1f6Smrg# Compiler flag to prevent dynamic linking.
43576f03b1f6Smrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
43586f03b1f6Smrg
43596f03b1f6Smrg# Compiler flag to turn off builtin functions.
43606f03b1f6Smrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
43616f03b1f6Smrg
43626f03b1f6Smrg# Compiler flag to allow reflexive dlopens.
43636f03b1f6Smrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
43646f03b1f6Smrg
43656f03b1f6Smrg# Compiler flag to generate shared objects directly from archives.
43666f03b1f6Smrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
43676f03b1f6Smrg
43686f03b1f6Smrg# Compiler flag to generate thread-safe objects.
43696f03b1f6Smrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
43706f03b1f6Smrg
43716f03b1f6Smrg# Library versioning type.
43726f03b1f6Smrgversion_type=$version_type
43736f03b1f6Smrg
43746f03b1f6Smrg# Format of library name prefix.
43756f03b1f6Smrglibname_spec=$lt_libname_spec
43766f03b1f6Smrg
43776f03b1f6Smrg# List of archive names.  First name is the real one, the rest are links.
43786f03b1f6Smrg# The last name is the one that the linker finds with -lNAME.
43796f03b1f6Smrglibrary_names_spec=$lt_library_names_spec
43806f03b1f6Smrg
43816f03b1f6Smrg# The coded name of the library, if different from the real name.
43826f03b1f6Smrgsoname_spec=$lt_soname_spec
43836f03b1f6Smrg
43846f03b1f6Smrg# Commands used to build and install an old-style archive.
43856f03b1f6SmrgRANLIB=$lt_RANLIB
43866f03b1f6Smrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
43876f03b1f6Smrgold_postinstall_cmds=$lt_old_postinstall_cmds
43886f03b1f6Smrgold_postuninstall_cmds=$lt_old_postuninstall_cmds
43896f03b1f6Smrg
43906f03b1f6Smrg# Create an old-style archive from a shared archive.
43916f03b1f6Smrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
43926f03b1f6Smrg
43936f03b1f6Smrg# Create a temporary old-style archive to link instead of a shared archive.
43946f03b1f6Smrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
43956f03b1f6Smrg
43966f03b1f6Smrg# Commands used to build and install a shared archive.
43976f03b1f6Smrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
43986f03b1f6Smrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
43996f03b1f6Smrgpostinstall_cmds=$lt_postinstall_cmds
44006f03b1f6Smrgpostuninstall_cmds=$lt_postuninstall_cmds
44016f03b1f6Smrg
44026f03b1f6Smrg# Commands used to build a loadable module (assumed same as above if empty)
44036f03b1f6Smrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
44046f03b1f6Smrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
44056f03b1f6Smrg
44066f03b1f6Smrg# Commands to strip libraries.
44076f03b1f6Smrgold_striplib=$lt_old_striplib
44086f03b1f6Smrgstriplib=$lt_striplib
44096f03b1f6Smrg
44106f03b1f6Smrg# Dependencies to place before the objects being linked to create a
44116f03b1f6Smrg# shared library.
44126f03b1f6Smrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
44136f03b1f6Smrg
44146f03b1f6Smrg# Dependencies to place after the objects being linked to create a
44156f03b1f6Smrg# shared library.
44166f03b1f6Smrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
44176f03b1f6Smrg
44186f03b1f6Smrg# Dependencies to place before the objects being linked to create a
44196f03b1f6Smrg# shared library.
44206f03b1f6Smrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
44216f03b1f6Smrg
44226f03b1f6Smrg# Dependencies to place after the objects being linked to create a
44236f03b1f6Smrg# shared library.
44246f03b1f6Smrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
44256f03b1f6Smrg
44266f03b1f6Smrg# The library search path used internally by the compiler when linking
44276f03b1f6Smrg# a shared library.
44286f03b1f6Smrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
44296f03b1f6Smrg
44306f03b1f6Smrg# Method to check whether dependent libraries are shared objects.
44316f03b1f6Smrgdeplibs_check_method=$lt_deplibs_check_method
44326f03b1f6Smrg
44336f03b1f6Smrg# Command to use when deplibs_check_method == file_magic.
44346f03b1f6Smrgfile_magic_cmd=$lt_file_magic_cmd
44356f03b1f6Smrg
44366f03b1f6Smrg# Flag that allows shared libraries with undefined symbols to be built.
44376f03b1f6Smrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
44386f03b1f6Smrg
44396f03b1f6Smrg# Flag that forces no undefined symbols.
44406f03b1f6Smrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
44416f03b1f6Smrg
44426f03b1f6Smrg# Commands used to finish a libtool library installation in a directory.
44436f03b1f6Smrgfinish_cmds=$lt_finish_cmds
44446f03b1f6Smrg
44456f03b1f6Smrg# Same as above, but a single script fragment to be evaled but not shown.
44466f03b1f6Smrgfinish_eval=$lt_finish_eval
44476f03b1f6Smrg
44486f03b1f6Smrg# Take the output of nm and produce a listing of raw symbols and C names.
44496f03b1f6Smrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
44506f03b1f6Smrg
44516f03b1f6Smrg# Transform the output of nm in a proper C declaration
44526f03b1f6Smrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
44536f03b1f6Smrg
44546f03b1f6Smrg# Transform the output of nm in a C name address pair
44556f03b1f6Smrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
44566f03b1f6Smrg
44576f03b1f6Smrg# This is the shared library runtime path variable.
44586f03b1f6Smrgrunpath_var=$runpath_var
44596f03b1f6Smrg
44606f03b1f6Smrg# This is the shared library path variable.
44616f03b1f6Smrgshlibpath_var=$shlibpath_var
44626f03b1f6Smrg
44636f03b1f6Smrg# Is shlibpath searched before the hard-coded library search path?
44646f03b1f6Smrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath
44656f03b1f6Smrg
44666f03b1f6Smrg# How to hardcode a shared library path into an executable.
44676f03b1f6Smrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
44686f03b1f6Smrg
44696f03b1f6Smrg# Whether we should hardcode library paths into libraries.
44706f03b1f6Smrghardcode_into_libs=$hardcode_into_libs
44716f03b1f6Smrg
44726f03b1f6Smrg# Flag to hardcode \$libdir into a binary during linking.
44736f03b1f6Smrg# This must work even if \$libdir does not exist.
44746f03b1f6Smrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
44756f03b1f6Smrg
44766f03b1f6Smrg# If ld is used when linking, flag to hardcode \$libdir into
44776f03b1f6Smrg# a binary during linking. This must work even if \$libdir does
44786f03b1f6Smrg# not exist.
44796f03b1f6Smrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
44806f03b1f6Smrg
44816f03b1f6Smrg# Whether we need a single -rpath flag with a separated argument.
44826f03b1f6Smrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
44836f03b1f6Smrg
44846f03b1f6Smrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
44856f03b1f6Smrg# resulting binary.
44866f03b1f6Smrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
44876f03b1f6Smrg
44886f03b1f6Smrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
44896f03b1f6Smrg# resulting binary.
44906f03b1f6Smrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
44916f03b1f6Smrg
44926f03b1f6Smrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
44936f03b1f6Smrg# the resulting binary.
44946f03b1f6Smrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
44956f03b1f6Smrg
44966f03b1f6Smrg# Set to yes if building a shared library automatically hardcodes DIR into the library
44976f03b1f6Smrg# and all subsequent libraries and executables linked against it.
44986f03b1f6Smrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
44996f03b1f6Smrg
45006f03b1f6Smrg# Variables whose values should be saved in libtool wrapper scripts and
45016f03b1f6Smrg# restored at relink time.
45026f03b1f6Smrgvariables_saved_for_relink="$variables_saved_for_relink"
45036f03b1f6Smrg
45046f03b1f6Smrg# Whether libtool must link a program against all its dependency libraries.
45056f03b1f6Smrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
45066f03b1f6Smrg
45076f03b1f6Smrg# Compile-time system search path for libraries
45086f03b1f6Smrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec
45096f03b1f6Smrg
45106f03b1f6Smrg# Run-time system search path for libraries
45116f03b1f6Smrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
45126f03b1f6Smrg
45136f03b1f6Smrg# Fix the shell variable \$srcfile for the compiler.
45146f03b1f6Smrgfix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
45156f03b1f6Smrg
45166f03b1f6Smrg# Set to yes if exported symbols are required.
45176f03b1f6Smrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
45186f03b1f6Smrg
45196f03b1f6Smrg# The commands to list exported symbols.
45206f03b1f6Smrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
45216f03b1f6Smrg
45226f03b1f6Smrg# The commands to extract the exported symbol list from a shared archive.
45236f03b1f6Smrgextract_expsyms_cmds=$lt_extract_expsyms_cmds
45246f03b1f6Smrg
45256f03b1f6Smrg# Symbols that should not be listed in the preloaded symbols.
45266f03b1f6Smrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
45276f03b1f6Smrg
45286f03b1f6Smrg# Symbols that must always be exported.
45296f03b1f6Smrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
45306f03b1f6Smrg
45316f03b1f6Smrgifelse([$1],[],
45326f03b1f6Smrg[# ### END LIBTOOL CONFIG],
45336f03b1f6Smrg[# ### END LIBTOOL TAG CONFIG: $tagname])
45346f03b1f6Smrg
45356f03b1f6Smrg__EOF__
45366f03b1f6Smrg
45376f03b1f6Smrgifelse([$1],[], [
45386f03b1f6Smrg  case $host_os in
45396f03b1f6Smrg  aix3*)
45406f03b1f6Smrg    cat <<\EOF >> "$cfgfile"
45416f03b1f6Smrg
45426f03b1f6Smrg# AIX sometimes has problems with the GCC collect2 program.  For some
45436f03b1f6Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems
45446f03b1f6Smrg# vanish in a puff of smoke.
45456f03b1f6Smrgif test "X${COLLECT_NAMES+set}" != Xset; then
45466f03b1f6Smrg  COLLECT_NAMES=
45476f03b1f6Smrg  export COLLECT_NAMES
45486f03b1f6Smrgfi
45496f03b1f6SmrgEOF
45506f03b1f6Smrg    ;;
45516f03b1f6Smrg  esac
45526f03b1f6Smrg
45536f03b1f6Smrg  # We use sed instead of cat because bash on DJGPP gets confused if
45546f03b1f6Smrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
45556f03b1f6Smrg  # text mode, it properly converts lines to CR/LF.  This bash problem
45566f03b1f6Smrg  # is reportedly fixed, but why not run on old versions too?
45576f03b1f6Smrg  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
45586f03b1f6Smrg
45596f03b1f6Smrg  mv -f "$cfgfile" "$ofile" || \
45606f03b1f6Smrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
45616f03b1f6Smrg  chmod +x "$ofile"
45626f03b1f6Smrg])
45636f03b1f6Smrgelse
45646f03b1f6Smrg  # If there is no Makefile yet, we rely on a make rule to execute
45656f03b1f6Smrg  # `config.status --recheck' to rerun these tests and create the
45666f03b1f6Smrg  # libtool script then.
45676f03b1f6Smrg  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
45686f03b1f6Smrg  if test -f "$ltmain_in"; then
45696f03b1f6Smrg    test -f Makefile && make "$ltmain"
45706f03b1f6Smrg  fi
45716f03b1f6Smrgfi
45726f03b1f6Smrg])# AC_LIBTOOL_CONFIG
45736f03b1f6Smrg
45746f03b1f6Smrg
45756f03b1f6Smrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
45766f03b1f6Smrg# -------------------------------------------
45776f03b1f6SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
45786f03b1f6Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
45796f03b1f6Smrg
45806f03b1f6Smrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
45816f03b1f6Smrg
45826f03b1f6Smrgif test "$GCC" = yes; then
45836f03b1f6Smrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
45846f03b1f6Smrg
45856f03b1f6Smrg  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
45866f03b1f6Smrg    lt_cv_prog_compiler_rtti_exceptions,
45876f03b1f6Smrg    [-fno-rtti -fno-exceptions], [],
45886f03b1f6Smrg    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
45896f03b1f6Smrgfi
45906f03b1f6Smrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
45916f03b1f6Smrg
45926f03b1f6Smrg
45936f03b1f6Smrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
45946f03b1f6Smrg# ---------------------------------
45956f03b1f6SmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
45966f03b1f6Smrg[AC_REQUIRE([AC_CANONICAL_HOST])
45976f03b1f6SmrgAC_REQUIRE([AC_PROG_NM])
45986f03b1f6SmrgAC_REQUIRE([AC_OBJEXT])
45996f03b1f6Smrg# Check for command to grab the raw symbol name followed by C symbol from nm.
46006f03b1f6SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
46016f03b1f6SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
46026f03b1f6Smrg[
46036f03b1f6Smrg# These are sane defaults that work on at least a few old systems.
46046f03b1f6Smrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
46056f03b1f6Smrg
46066f03b1f6Smrg# Character class describing NM global symbol codes.
46076f03b1f6Smrgsymcode='[[BCDEGRST]]'
46086f03b1f6Smrg
46096f03b1f6Smrg# Regexp to match symbols that can be accessed directly from C.
46106f03b1f6Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
46116f03b1f6Smrg
46126f03b1f6Smrg# Transform an extracted symbol line into a proper C declaration
46136f03b1f6Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
46146f03b1f6Smrg
46156f03b1f6Smrg# Transform an extracted symbol line into symbol name and symbol address
46166f03b1f6Smrglt_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'"
46176f03b1f6Smrg
46186f03b1f6Smrg# Define system-specific variables.
46196f03b1f6Smrgcase $host_os in
46206f03b1f6Smrgaix*)
46216f03b1f6Smrg  symcode='[[BCDT]]'
46226f03b1f6Smrg  ;;
46236f03b1f6Smrgcygwin* | mingw* | pw32*)
46246f03b1f6Smrg  symcode='[[ABCDGISTW]]'
46256f03b1f6Smrg  ;;
46266f03b1f6Smrghpux*) # Its linker distinguishes data from code symbols
46276f03b1f6Smrg  if test "$host_cpu" = ia64; then
46286f03b1f6Smrg    symcode='[[ABCDEGRST]]'
46296f03b1f6Smrg  fi
46306f03b1f6Smrg  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
46316f03b1f6Smrg  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'"
46326f03b1f6Smrg  ;;
46336f03b1f6Smrglinux* | k*bsd*-gnu)
46346f03b1f6Smrg  if test "$host_cpu" = ia64; then
46356f03b1f6Smrg    symcode='[[ABCDGIRSTW]]'
46366f03b1f6Smrg    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
46376f03b1f6Smrg    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'"
46386f03b1f6Smrg  fi
46396f03b1f6Smrg  ;;
46406f03b1f6Smrgirix* | nonstopux*)
46416f03b1f6Smrg  symcode='[[BCDEGRST]]'
46426f03b1f6Smrg  ;;
46436f03b1f6Smrgosf*)
46446f03b1f6Smrg  symcode='[[BCDEGQRST]]'
46456f03b1f6Smrg  ;;
46466f03b1f6Smrgsolaris*)
46476f03b1f6Smrg  symcode='[[BDRT]]'
46486f03b1f6Smrg  ;;
46496f03b1f6Smrgsco3.2v5*)
46506f03b1f6Smrg  symcode='[[DT]]'
46516f03b1f6Smrg  ;;
46526f03b1f6Smrgsysv4.2uw2*)
46536f03b1f6Smrg  symcode='[[DT]]'
46546f03b1f6Smrg  ;;
46556f03b1f6Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
46566f03b1f6Smrg  symcode='[[ABDT]]'
46576f03b1f6Smrg  ;;
46586f03b1f6Smrgsysv4)
46596f03b1f6Smrg  symcode='[[DFNSTU]]'
46606f03b1f6Smrg  ;;
46616f03b1f6Smrgesac
46626f03b1f6Smrg
46636f03b1f6Smrg# Handle CRLF in mingw tool chain
46646f03b1f6Smrgopt_cr=
46656f03b1f6Smrgcase $build_os in
46666f03b1f6Smrgmingw*)
46676f03b1f6Smrg  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
46686f03b1f6Smrg  ;;
46696f03b1f6Smrgesac
46706f03b1f6Smrg
46716f03b1f6Smrg# If we're using GNU nm, then use its standard symbol codes.
46726f03b1f6Smrgcase `$NM -V 2>&1` in
46736f03b1f6Smrg*GNU* | *'with BFD'*)
46746f03b1f6Smrg  symcode='[[ABCDGIRSTW]]' ;;
46756f03b1f6Smrgesac
46766f03b1f6Smrg
46776f03b1f6Smrg# Try without a prefix undercore, then with it.
46786f03b1f6Smrgfor ac_symprfx in "" "_"; do
46796f03b1f6Smrg
46806f03b1f6Smrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
46816f03b1f6Smrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
46826f03b1f6Smrg
46836f03b1f6Smrg  # Write the raw and C identifiers.
46846f03b1f6Smrg  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
46856f03b1f6Smrg
46866f03b1f6Smrg  # Check to see that the pipe works correctly.
46876f03b1f6Smrg  pipe_works=no
46886f03b1f6Smrg
46896f03b1f6Smrg  rm -f conftest*
46906f03b1f6Smrg  cat > conftest.$ac_ext <<EOF
46916f03b1f6Smrg#ifdef __cplusplus
46926f03b1f6Smrgextern "C" {
46936f03b1f6Smrg#endif
46946f03b1f6Smrgchar nm_test_var;
46956f03b1f6Smrgvoid nm_test_func(){}
46966f03b1f6Smrg#ifdef __cplusplus
46976f03b1f6Smrg}
46986f03b1f6Smrg#endif
46996f03b1f6Smrgint main(){nm_test_var='a';nm_test_func();return(0);}
47006f03b1f6SmrgEOF
47016f03b1f6Smrg
47026f03b1f6Smrg  if AC_TRY_EVAL(ac_compile); then
47036f03b1f6Smrg    # Now try to grab the symbols.
47046f03b1f6Smrg    nlist=conftest.nm
47056f03b1f6Smrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
47066f03b1f6Smrg      # Try sorting and uniquifying the output.
47076f03b1f6Smrg      if sort "$nlist" | uniq > "$nlist"T; then
47086f03b1f6Smrg	mv -f "$nlist"T "$nlist"
47096f03b1f6Smrg      else
47106f03b1f6Smrg	rm -f "$nlist"T
47116f03b1f6Smrg      fi
47126f03b1f6Smrg
47136f03b1f6Smrg      # Make sure that we snagged all the symbols we need.
47146f03b1f6Smrg      if grep ' nm_test_var$' "$nlist" >/dev/null; then
47156f03b1f6Smrg	if grep ' nm_test_func$' "$nlist" >/dev/null; then
47166f03b1f6Smrg	  cat <<EOF > conftest.$ac_ext
47176f03b1f6Smrg#ifdef __cplusplus
47186f03b1f6Smrgextern "C" {
47196f03b1f6Smrg#endif
47206f03b1f6Smrg
47216f03b1f6SmrgEOF
47226f03b1f6Smrg	  # Now generate the symbol file.
47236f03b1f6Smrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
47246f03b1f6Smrg
47256f03b1f6Smrg	  cat <<EOF >> conftest.$ac_ext
47266f03b1f6Smrg#if defined (__STDC__) && __STDC__
47276f03b1f6Smrg# define lt_ptr_t void *
47286f03b1f6Smrg#else
47296f03b1f6Smrg# define lt_ptr_t char *
47306f03b1f6Smrg# define const
47316f03b1f6Smrg#endif
47326f03b1f6Smrg
47336f03b1f6Smrg/* The mapping between symbol names and symbols. */
47346f03b1f6Smrgconst struct {
47356f03b1f6Smrg  const char *name;
47366f03b1f6Smrg  lt_ptr_t address;
47376f03b1f6Smrg}
47386f03b1f6Smrglt_preloaded_symbols[[]] =
47396f03b1f6Smrg{
47406f03b1f6SmrgEOF
47416f03b1f6Smrg	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
47426f03b1f6Smrg	  cat <<\EOF >> conftest.$ac_ext
47436f03b1f6Smrg  {0, (lt_ptr_t) 0}
47446f03b1f6Smrg};
47456f03b1f6Smrg
47466f03b1f6Smrg#ifdef __cplusplus
47476f03b1f6Smrg}
47486f03b1f6Smrg#endif
47496f03b1f6SmrgEOF
47506f03b1f6Smrg	  # Now try linking the two files.
47516f03b1f6Smrg	  mv conftest.$ac_objext conftstm.$ac_objext
47526f03b1f6Smrg	  lt_save_LIBS="$LIBS"
47536f03b1f6Smrg	  lt_save_CFLAGS="$CFLAGS"
47546f03b1f6Smrg	  LIBS="conftstm.$ac_objext"
47556f03b1f6Smrg	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
47566f03b1f6Smrg	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
47576f03b1f6Smrg	    pipe_works=yes
47586f03b1f6Smrg	  fi
47596f03b1f6Smrg	  LIBS="$lt_save_LIBS"
47606f03b1f6Smrg	  CFLAGS="$lt_save_CFLAGS"
47616f03b1f6Smrg	else
47626f03b1f6Smrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
47636f03b1f6Smrg	fi
47646f03b1f6Smrg      else
47656f03b1f6Smrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
47666f03b1f6Smrg      fi
47676f03b1f6Smrg    else
47686f03b1f6Smrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
47696f03b1f6Smrg    fi
47706f03b1f6Smrg  else
47716f03b1f6Smrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
47726f03b1f6Smrg    cat conftest.$ac_ext >&5
47736f03b1f6Smrg  fi
47746f03b1f6Smrg  rm -f conftest* conftst*
47756f03b1f6Smrg
47766f03b1f6Smrg  # Do not use the global_symbol_pipe unless it works.
47776f03b1f6Smrg  if test "$pipe_works" = yes; then
47786f03b1f6Smrg    break
47796f03b1f6Smrg  else
47806f03b1f6Smrg    lt_cv_sys_global_symbol_pipe=
47816f03b1f6Smrg  fi
47826f03b1f6Smrgdone
47836f03b1f6Smrg])
47846f03b1f6Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
47856f03b1f6Smrg  lt_cv_sys_global_symbol_to_cdecl=
47866f03b1f6Smrgfi
47876f03b1f6Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
47886f03b1f6Smrg  AC_MSG_RESULT(failed)
47896f03b1f6Smrgelse
47906f03b1f6Smrg  AC_MSG_RESULT(ok)
47916f03b1f6Smrgfi
47926f03b1f6Smrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
47936f03b1f6Smrg
47946f03b1f6Smrg
47956f03b1f6Smrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
47966f03b1f6Smrg# ---------------------------------------
47976f03b1f6SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
47986f03b1f6Smrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
47996f03b1f6Smrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
48006f03b1f6Smrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
48016f03b1f6Smrg
48026f03b1f6SmrgAC_MSG_CHECKING([for $compiler option to produce PIC])
48036f03b1f6Smrg ifelse([$1],[CXX],[
48046f03b1f6Smrg  # C++ specific cases for pic, static, wl, etc.
48056f03b1f6Smrg  if test "$GXX" = yes; then
48066f03b1f6Smrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
48076f03b1f6Smrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
48086f03b1f6Smrg
48096f03b1f6Smrg    case $host_os in
48106f03b1f6Smrg    aix*)
48116f03b1f6Smrg      # All AIX code is PIC.
48126f03b1f6Smrg      if test "$host_cpu" = ia64; then
48136f03b1f6Smrg	# AIX 5 now supports IA64 processor
48146f03b1f6Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
48156f03b1f6Smrg      fi
48166f03b1f6Smrg      ;;
48176f03b1f6Smrg    amigaos*)
48186f03b1f6Smrg      # FIXME: we need at least 68020 code to build shared libraries, but
48196f03b1f6Smrg      # adding the `-m68020' flag to GCC prevents building anything better,
48206f03b1f6Smrg      # like `-m68040'.
48216f03b1f6Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
48226f03b1f6Smrg      ;;
48236f03b1f6Smrg    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
48246f03b1f6Smrg      # PIC is the default for these OSes.
48256f03b1f6Smrg      ;;
48266f03b1f6Smrg    mingw* | os2* | pw32*)
48276f03b1f6Smrg      # This hack is so that the source file can tell whether it is being
48286f03b1f6Smrg      # built for inclusion in a dll (and should export symbols for example).
48296f03b1f6Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
48306f03b1f6Smrg      ;;
48316f03b1f6Smrg    darwin* | rhapsody*)
48326f03b1f6Smrg      # PIC is the default on this platform
48336f03b1f6Smrg      # Common symbols not allowed in MH_DYLIB files
48346f03b1f6Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
48356f03b1f6Smrg      ;;
48366f03b1f6Smrg    *djgpp*)
48376f03b1f6Smrg      # DJGPP does not support shared libraries at all
48386f03b1f6Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
48396f03b1f6Smrg      ;;
48406f03b1f6Smrg    interix3*)
48416f03b1f6Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
48426f03b1f6Smrg      # Instead, we relocate shared libraries at runtime.
48436f03b1f6Smrg      ;;
48446f03b1f6Smrg    sysv4*MP*)
48456f03b1f6Smrg      if test -d /usr/nec; then
48466f03b1f6Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
48476f03b1f6Smrg      fi
48486f03b1f6Smrg      ;;
48496f03b1f6Smrg    hpux*)
48506f03b1f6Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
48516f03b1f6Smrg      # not for PA HP-UX.
48526f03b1f6Smrg      case $host_cpu in
48536f03b1f6Smrg      hppa*64*|ia64*)
48546f03b1f6Smrg	;;
48556f03b1f6Smrg      *)
48566f03b1f6Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
48576f03b1f6Smrg	;;
48586f03b1f6Smrg      esac
48596f03b1f6Smrg      ;;
48606f03b1f6Smrg    *)
48616f03b1f6Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
48626f03b1f6Smrg      ;;
48636f03b1f6Smrg    esac
48646f03b1f6Smrg  else
48656f03b1f6Smrg    case $host_os in
48666f03b1f6Smrg      aix4* | aix5*)
48676f03b1f6Smrg	# All AIX code is PIC.
48686f03b1f6Smrg	if test "$host_cpu" = ia64; then
48696f03b1f6Smrg	  # AIX 5 now supports IA64 processor
48706f03b1f6Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
48716f03b1f6Smrg	else
48726f03b1f6Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
48736f03b1f6Smrg	fi
48746f03b1f6Smrg	;;
48756f03b1f6Smrg      chorus*)
48766f03b1f6Smrg	case $cc_basename in
48776f03b1f6Smrg	cxch68*)
48786f03b1f6Smrg	  # Green Hills C++ Compiler
48796f03b1f6Smrg	  # _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"
48806f03b1f6Smrg	  ;;
48816f03b1f6Smrg	esac
48826f03b1f6Smrg	;;
48836f03b1f6Smrg       darwin*)
48846f03b1f6Smrg         # PIC is the default on this platform
48856f03b1f6Smrg         # Common symbols not allowed in MH_DYLIB files
48866f03b1f6Smrg         case $cc_basename in
48876f03b1f6Smrg           xlc*)
48886f03b1f6Smrg           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
48896f03b1f6Smrg           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
48906f03b1f6Smrg           ;;
48916f03b1f6Smrg         esac
48926f03b1f6Smrg       ;;
48936f03b1f6Smrg      dgux*)
48946f03b1f6Smrg	case $cc_basename in
48956f03b1f6Smrg	  ec++*)
48966f03b1f6Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
48976f03b1f6Smrg	    ;;
48986f03b1f6Smrg	  ghcx*)
48996f03b1f6Smrg	    # Green Hills C++ Compiler
49006f03b1f6Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
49016f03b1f6Smrg	    ;;
49026f03b1f6Smrg	  *)
49036f03b1f6Smrg	    ;;
49046f03b1f6Smrg	esac
49056f03b1f6Smrg	;;
49066f03b1f6Smrg      freebsd* | dragonfly*)
49076f03b1f6Smrg	# FreeBSD uses GNU C++
49086f03b1f6Smrg	;;
49096f03b1f6Smrg      hpux9* | hpux10* | hpux11*)
49106f03b1f6Smrg	case $cc_basename in
49116f03b1f6Smrg	  CC*)
49126f03b1f6Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
49136f03b1f6Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
49146f03b1f6Smrg	    if test "$host_cpu" != ia64; then
49156f03b1f6Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
49166f03b1f6Smrg	    fi
49176f03b1f6Smrg	    ;;
49186f03b1f6Smrg	  aCC*)
49196f03b1f6Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
49206f03b1f6Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
49216f03b1f6Smrg	    case $host_cpu in
49226f03b1f6Smrg	    hppa*64*|ia64*)
49236f03b1f6Smrg	      # +Z the default
49246f03b1f6Smrg	      ;;
49256f03b1f6Smrg	    *)
49266f03b1f6Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
49276f03b1f6Smrg	      ;;
49286f03b1f6Smrg	    esac
49296f03b1f6Smrg	    ;;
49306f03b1f6Smrg	  *)
49316f03b1f6Smrg	    ;;
49326f03b1f6Smrg	esac
49336f03b1f6Smrg	;;
49346f03b1f6Smrg      interix*)
49356f03b1f6Smrg	# This is c89, which is MS Visual C++ (no shared libs)
49366f03b1f6Smrg	# Anyone wants to do a port?
49376f03b1f6Smrg	;;
49386f03b1f6Smrg      irix5* | irix6* | nonstopux*)
49396f03b1f6Smrg	case $cc_basename in
49406f03b1f6Smrg	  CC*)
49416f03b1f6Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
49426f03b1f6Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
49436f03b1f6Smrg	    # CC pic flag -KPIC is the default.
49446f03b1f6Smrg	    ;;
49456f03b1f6Smrg	  *)
49466f03b1f6Smrg	    ;;
49476f03b1f6Smrg	esac
49486f03b1f6Smrg	;;
49496f03b1f6Smrg      linux* | k*bsd*-gnu)
49506f03b1f6Smrg	case $cc_basename in
49516f03b1f6Smrg	  KCC*)
49526f03b1f6Smrg	    # KAI C++ Compiler
49536f03b1f6Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
49546f03b1f6Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
49556f03b1f6Smrg	    ;;
49566f03b1f6Smrg	  icpc* | ecpc*)
49576f03b1f6Smrg	    # Intel C++
49586f03b1f6Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
49596f03b1f6Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
49606f03b1f6Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
49616f03b1f6Smrg	    ;;
49626f03b1f6Smrg	  pgCC*)
49636f03b1f6Smrg	    # Portland Group C++ compiler.
49646f03b1f6Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
49656f03b1f6Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
49666f03b1f6Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
49676f03b1f6Smrg	    ;;
49686f03b1f6Smrg	  cxx*)
49696f03b1f6Smrg	    # Compaq C++
49706f03b1f6Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
49716f03b1f6Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
49726f03b1f6Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
49736f03b1f6Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
49746f03b1f6Smrg	    ;;
49756f03b1f6Smrg	  *)
49766f03b1f6Smrg	    ;;
49776f03b1f6Smrg	esac
49786f03b1f6Smrg	;;
49796f03b1f6Smrg      lynxos*)
49806f03b1f6Smrg	;;
49816f03b1f6Smrg      m88k*)
49826f03b1f6Smrg	;;
49836f03b1f6Smrg      mvs*)
49846f03b1f6Smrg	case $cc_basename in
49856f03b1f6Smrg	  cxx*)
49866f03b1f6Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
49876f03b1f6Smrg	    ;;
49886f03b1f6Smrg	  *)
49896f03b1f6Smrg	    ;;
49906f03b1f6Smrg	esac
49916f03b1f6Smrg	;;
49926f03b1f6Smrg      netbsd* | netbsdelf*-gnu)
49936f03b1f6Smrg	;;
49946f03b1f6Smrg      osf3* | osf4* | osf5*)
49956f03b1f6Smrg	case $cc_basename in
49966f03b1f6Smrg	  KCC*)
49976f03b1f6Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
49986f03b1f6Smrg	    ;;
49996f03b1f6Smrg	  RCC*)
50006f03b1f6Smrg	    # Rational C++ 2.4.1
50016f03b1f6Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
50026f03b1f6Smrg	    ;;
50036f03b1f6Smrg	  cxx*)
50046f03b1f6Smrg	    # Digital/Compaq C++
50056f03b1f6Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
50066f03b1f6Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
50076f03b1f6Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
50086f03b1f6Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
50096f03b1f6Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
50106f03b1f6Smrg	    ;;
50116f03b1f6Smrg	  *)
50126f03b1f6Smrg	    ;;
50136f03b1f6Smrg	esac
50146f03b1f6Smrg	;;
50156f03b1f6Smrg      psos*)
50166f03b1f6Smrg	;;
50176f03b1f6Smrg      solaris*)
50186f03b1f6Smrg	case $cc_basename in
50196f03b1f6Smrg	  CC*)
50206f03b1f6Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
50216f03b1f6Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
50226f03b1f6Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
50236f03b1f6Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
50246f03b1f6Smrg	    ;;
50256f03b1f6Smrg	  gcx*)
50266f03b1f6Smrg	    # Green Hills C++ Compiler
50276f03b1f6Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
50286f03b1f6Smrg	    ;;
50296f03b1f6Smrg	  *)
50306f03b1f6Smrg	    ;;
50316f03b1f6Smrg	esac
50326f03b1f6Smrg	;;
50336f03b1f6Smrg      sunos4*)
50346f03b1f6Smrg	case $cc_basename in
50356f03b1f6Smrg	  CC*)
50366f03b1f6Smrg	    # Sun C++ 4.x
50376f03b1f6Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
50386f03b1f6Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
50396f03b1f6Smrg	    ;;
50406f03b1f6Smrg	  lcc*)
50416f03b1f6Smrg	    # Lucid
50426f03b1f6Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
50436f03b1f6Smrg	    ;;
50446f03b1f6Smrg	  *)
50456f03b1f6Smrg	    ;;
50466f03b1f6Smrg	esac
50476f03b1f6Smrg	;;
50486f03b1f6Smrg      tandem*)
50496f03b1f6Smrg	case $cc_basename in
50506f03b1f6Smrg	  NCC*)
50516f03b1f6Smrg	    # NonStop-UX NCC 3.20
50526f03b1f6Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
50536f03b1f6Smrg	    ;;
50546f03b1f6Smrg	  *)
50556f03b1f6Smrg	    ;;
50566f03b1f6Smrg	esac
50576f03b1f6Smrg	;;
50586f03b1f6Smrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
50596f03b1f6Smrg	case $cc_basename in
50606f03b1f6Smrg	  CC*)
50616f03b1f6Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
50626f03b1f6Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
50636f03b1f6Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
50646f03b1f6Smrg	    ;;
50656f03b1f6Smrg	esac
50666f03b1f6Smrg	;;
50676f03b1f6Smrg      vxworks*)
50686f03b1f6Smrg	;;
50696f03b1f6Smrg      *)
50706f03b1f6Smrg	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
50716f03b1f6Smrg	;;
50726f03b1f6Smrg    esac
50736f03b1f6Smrg  fi
50746f03b1f6Smrg],
50756f03b1f6Smrg[
50766f03b1f6Smrg  if test "$GCC" = yes; then
50776f03b1f6Smrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
50786f03b1f6Smrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
50796f03b1f6Smrg
50806f03b1f6Smrg    case $host_os in
50816f03b1f6Smrg      aix*)
50826f03b1f6Smrg      # All AIX code is PIC.
50836f03b1f6Smrg      if test "$host_cpu" = ia64; then
50846f03b1f6Smrg	# AIX 5 now supports IA64 processor
50856f03b1f6Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
50866f03b1f6Smrg      fi
50876f03b1f6Smrg      ;;
50886f03b1f6Smrg
50896f03b1f6Smrg    amigaos*)
50906f03b1f6Smrg      # FIXME: we need at least 68020 code to build shared libraries, but
50916f03b1f6Smrg      # adding the `-m68020' flag to GCC prevents building anything better,
50926f03b1f6Smrg      # like `-m68040'.
50936f03b1f6Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
50946f03b1f6Smrg      ;;
50956f03b1f6Smrg
50966f03b1f6Smrg    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
50976f03b1f6Smrg      # PIC is the default for these OSes.
50986f03b1f6Smrg      ;;
50996f03b1f6Smrg
51006f03b1f6Smrg    mingw* | pw32* | os2*)
51016f03b1f6Smrg      # This hack is so that the source file can tell whether it is being
51026f03b1f6Smrg      # built for inclusion in a dll (and should export symbols for example).
51036f03b1f6Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
51046f03b1f6Smrg      ;;
51056f03b1f6Smrg
51066f03b1f6Smrg    darwin* | rhapsody*)
51076f03b1f6Smrg      # PIC is the default on this platform
51086f03b1f6Smrg      # Common symbols not allowed in MH_DYLIB files
51096f03b1f6Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
51106f03b1f6Smrg      ;;
51116f03b1f6Smrg
51126f03b1f6Smrg    interix3*)
51136f03b1f6Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
51146f03b1f6Smrg      # Instead, we relocate shared libraries at runtime.
51156f03b1f6Smrg      ;;
51166f03b1f6Smrg
51176f03b1f6Smrg    msdosdjgpp*)
51186f03b1f6Smrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
51196f03b1f6Smrg      # on systems that don't support them.
51206f03b1f6Smrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
51216f03b1f6Smrg      enable_shared=no
51226f03b1f6Smrg      ;;
51236f03b1f6Smrg
51246f03b1f6Smrg    sysv4*MP*)
51256f03b1f6Smrg      if test -d /usr/nec; then
51266f03b1f6Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
51276f03b1f6Smrg      fi
51286f03b1f6Smrg      ;;
51296f03b1f6Smrg
51306f03b1f6Smrg    hpux*)
51316f03b1f6Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
51326f03b1f6Smrg      # not for PA HP-UX.
51336f03b1f6Smrg      case $host_cpu in
51346f03b1f6Smrg      hppa*64*|ia64*)
51356f03b1f6Smrg	# +Z the default
51366f03b1f6Smrg	;;
51376f03b1f6Smrg      *)
51386f03b1f6Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
51396f03b1f6Smrg	;;
51406f03b1f6Smrg      esac
51416f03b1f6Smrg      ;;
51426f03b1f6Smrg
51436f03b1f6Smrg    *)
51446f03b1f6Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
51456f03b1f6Smrg      ;;
51466f03b1f6Smrg    esac
51476f03b1f6Smrg  else
51486f03b1f6Smrg    # PORTME Check for flag to pass linker flags through the system compiler.
51496f03b1f6Smrg    case $host_os in
51506f03b1f6Smrg    aix*)
51516f03b1f6Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
51526f03b1f6Smrg      if test "$host_cpu" = ia64; then
51536f03b1f6Smrg	# AIX 5 now supports IA64 processor
51546f03b1f6Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
51556f03b1f6Smrg      else
51566f03b1f6Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
51576f03b1f6Smrg      fi
51586f03b1f6Smrg      ;;
51596f03b1f6Smrg      darwin*)
51606f03b1f6Smrg        # PIC is the default on this platform
51616f03b1f6Smrg        # Common symbols not allowed in MH_DYLIB files
51626f03b1f6Smrg       case $cc_basename in
51636f03b1f6Smrg         xlc*)
51646f03b1f6Smrg         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
51656f03b1f6Smrg         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
51666f03b1f6Smrg         ;;
51676f03b1f6Smrg       esac
51686f03b1f6Smrg       ;;
51696f03b1f6Smrg
51706f03b1f6Smrg    mingw* | pw32* | os2*)
51716f03b1f6Smrg      # This hack is so that the source file can tell whether it is being
51726f03b1f6Smrg      # built for inclusion in a dll (and should export symbols for example).
51736f03b1f6Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
51746f03b1f6Smrg      ;;
51756f03b1f6Smrg
51766f03b1f6Smrg    hpux9* | hpux10* | hpux11*)
51776f03b1f6Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
51786f03b1f6Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
51796f03b1f6Smrg      # not for PA HP-UX.
51806f03b1f6Smrg      case $host_cpu in
51816f03b1f6Smrg      hppa*64*|ia64*)
51826f03b1f6Smrg	# +Z the default
51836f03b1f6Smrg	;;
51846f03b1f6Smrg      *)
51856f03b1f6Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
51866f03b1f6Smrg	;;
51876f03b1f6Smrg      esac
51886f03b1f6Smrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
51896f03b1f6Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
51906f03b1f6Smrg      ;;
51916f03b1f6Smrg
51926f03b1f6Smrg    irix5* | irix6* | nonstopux*)
51936f03b1f6Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
51946f03b1f6Smrg      # PIC (with -KPIC) is the default.
51956f03b1f6Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
51966f03b1f6Smrg      ;;
51976f03b1f6Smrg
51986f03b1f6Smrg    newsos6)
51996f03b1f6Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
52006f03b1f6Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
52016f03b1f6Smrg      ;;
52026f03b1f6Smrg
52036f03b1f6Smrg    linux* | k*bsd*-gnu)
52046f03b1f6Smrg      case $cc_basename in
52056f03b1f6Smrg      icc* | ecc*)
52066f03b1f6Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
52076f03b1f6Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
52086f03b1f6Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
52096f03b1f6Smrg        ;;
52106f03b1f6Smrg      pgcc* | pgf77* | pgf90* | pgf95*)
52116f03b1f6Smrg        # Portland Group compilers (*not* the Pentium gcc compiler,
52126f03b1f6Smrg	# which looks to be a dead project)
52136f03b1f6Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
52146f03b1f6Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
52156f03b1f6Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
52166f03b1f6Smrg        ;;
52176f03b1f6Smrg      ccc*)
52186f03b1f6Smrg        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
52196f03b1f6Smrg        # All Alpha code is PIC.
52206f03b1f6Smrg        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
52216f03b1f6Smrg        ;;
52226f03b1f6Smrg      esac
52236f03b1f6Smrg      ;;
52246f03b1f6Smrg
52256f03b1f6Smrg    osf3* | osf4* | osf5*)
52266f03b1f6Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
52276f03b1f6Smrg      # All OSF/1 code is PIC.
52286f03b1f6Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
52296f03b1f6Smrg      ;;
52306f03b1f6Smrg
52316f03b1f6Smrg    solaris*)
52326f03b1f6Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
52336f03b1f6Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
52346f03b1f6Smrg      case $cc_basename in
52356f03b1f6Smrg      f77* | f90* | f95*)
52366f03b1f6Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
52376f03b1f6Smrg      *)
52386f03b1f6Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
52396f03b1f6Smrg      esac
52406f03b1f6Smrg      ;;
52416f03b1f6Smrg
52426f03b1f6Smrg    sunos4*)
52436f03b1f6Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
52446f03b1f6Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
52456f03b1f6Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
52466f03b1f6Smrg      ;;
52476f03b1f6Smrg
52486f03b1f6Smrg    sysv4 | sysv4.2uw2* | sysv4.3*)
52496f03b1f6Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
52506f03b1f6Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
52516f03b1f6Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
52526f03b1f6Smrg      ;;
52536f03b1f6Smrg
52546f03b1f6Smrg    sysv4*MP*)
52556f03b1f6Smrg      if test -d /usr/nec ;then
52566f03b1f6Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
52576f03b1f6Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
52586f03b1f6Smrg      fi
52596f03b1f6Smrg      ;;
52606f03b1f6Smrg
52616f03b1f6Smrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
52626f03b1f6Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
52636f03b1f6Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
52646f03b1f6Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
52656f03b1f6Smrg      ;;
52666f03b1f6Smrg
52676f03b1f6Smrg    unicos*)
52686f03b1f6Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
52696f03b1f6Smrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
52706f03b1f6Smrg      ;;
52716f03b1f6Smrg
52726f03b1f6Smrg    uts4*)
52736f03b1f6Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
52746f03b1f6Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
52756f03b1f6Smrg      ;;
52766f03b1f6Smrg
52776f03b1f6Smrg    *)
52786f03b1f6Smrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
52796f03b1f6Smrg      ;;
52806f03b1f6Smrg    esac
52816f03b1f6Smrg  fi
52826f03b1f6Smrg])
52836f03b1f6SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
52846f03b1f6Smrg
52856f03b1f6Smrg#
52866f03b1f6Smrg# Check to make sure the PIC flag actually works.
52876f03b1f6Smrg#
52886f03b1f6Smrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
52896f03b1f6Smrg  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
52906f03b1f6Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
52916f03b1f6Smrg    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
52926f03b1f6Smrg    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
52936f03b1f6Smrg     "" | " "*) ;;
52946f03b1f6Smrg     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
52956f03b1f6Smrg     esac],
52966f03b1f6Smrg    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
52976f03b1f6Smrg     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
52986f03b1f6Smrgfi
52996f03b1f6Smrgcase $host_os in
53006f03b1f6Smrg  # For platforms which do not support PIC, -DPIC is meaningless:
53016f03b1f6Smrg  *djgpp*)
53026f03b1f6Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
53036f03b1f6Smrg    ;;
53046f03b1f6Smrg  *)
53056f03b1f6Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
53066f03b1f6Smrg    ;;
53076f03b1f6Smrgesac
53086f03b1f6Smrg
53096f03b1f6Smrg#
53106f03b1f6Smrg# Check to make sure the static flag actually works.
53116f03b1f6Smrg#
53126f03b1f6Smrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
53136f03b1f6SmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
53146f03b1f6Smrg  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
53156f03b1f6Smrg  $lt_tmp_static_flag,
53166f03b1f6Smrg  [],
53176f03b1f6Smrg  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
53186f03b1f6Smrg])
53196f03b1f6Smrg
53206f03b1f6Smrg
53216f03b1f6Smrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
53226f03b1f6Smrg# ------------------------------------
53236f03b1f6Smrg# See if the linker supports building shared libraries.
53246f03b1f6SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
53256f03b1f6Smrg[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
53266f03b1f6Smrgifelse([$1],[CXX],[
53276f03b1f6Smrg  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
53286f03b1f6Smrg  case $host_os in
53296f03b1f6Smrg  aix4* | aix5*)
53306f03b1f6Smrg    # If we're using GNU nm, then we don't want the "-C" option.
53316f03b1f6Smrg    # -C means demangle to AIX nm, but means don't demangle with GNU nm
53326f03b1f6Smrg    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
53336f03b1f6Smrg      _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'
53346f03b1f6Smrg    else
53356f03b1f6Smrg      _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'
53366f03b1f6Smrg    fi
53376f03b1f6Smrg    ;;
53386f03b1f6Smrg  pw32*)
53396f03b1f6Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
53406f03b1f6Smrg  ;;
53416f03b1f6Smrg  cygwin* | mingw*)
53426f03b1f6Smrg    _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'
53436f03b1f6Smrg  ;;
53446f03b1f6Smrg  linux* | k*bsd*-gnu)
53456f03b1f6Smrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=no
53466f03b1f6Smrg  ;;
53476f03b1f6Smrg  *)
53486f03b1f6Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
53496f03b1f6Smrg  ;;
53506f03b1f6Smrg  esac
53516f03b1f6Smrg],[
53526f03b1f6Smrg  runpath_var=
53536f03b1f6Smrg  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
53546f03b1f6Smrg  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
53556f03b1f6Smrg  _LT_AC_TAGVAR(archive_cmds, $1)=
53566f03b1f6Smrg  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
53576f03b1f6Smrg  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
53586f03b1f6Smrg  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
53596f03b1f6Smrg  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
53606f03b1f6Smrg  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
53616f03b1f6Smrg  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
53626f03b1f6Smrg  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
53636f03b1f6Smrg  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
53646f03b1f6Smrg  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
53656f03b1f6Smrg  _LT_AC_TAGVAR(hardcode_direct, $1)=no
53666f03b1f6Smrg  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
53676f03b1f6Smrg  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
53686f03b1f6Smrg  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
53696f03b1f6Smrg  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
53706f03b1f6Smrg  _LT_AC_TAGVAR(module_cmds, $1)=
53716f03b1f6Smrg  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
53726f03b1f6Smrg  _LT_AC_TAGVAR(always_export_symbols, $1)=no
53736f03b1f6Smrg  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
53746f03b1f6Smrg  # include_expsyms should be a list of space-separated symbols to be *always*
53756f03b1f6Smrg  # included in the symbol list
53766f03b1f6Smrg  _LT_AC_TAGVAR(include_expsyms, $1)=
53776f03b1f6Smrg  # exclude_expsyms can be an extended regexp of symbols to exclude
53786f03b1f6Smrg  # it will be wrapped by ` (' and `)$', so one must not match beginning or
53796f03b1f6Smrg  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
53806f03b1f6Smrg  # as well as any symbol that contains `d'.
53816f03b1f6Smrg  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
53826f03b1f6Smrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
53836f03b1f6Smrg  # platforms (ab)use it in PIC code, but their linkers get confused if
53846f03b1f6Smrg  # the symbol is explicitly referenced.  Since portable code cannot
53856f03b1f6Smrg  # rely on this symbol name, it's probably fine to never include it in
53866f03b1f6Smrg  # preloaded symbol tables.
53876f03b1f6Smrg  extract_expsyms_cmds=
53886f03b1f6Smrg  # Just being paranoid about ensuring that cc_basename is set.
53896f03b1f6Smrg  _LT_CC_BASENAME([$compiler])
53906f03b1f6Smrg  case $host_os in
53916f03b1f6Smrg  cygwin* | mingw* | pw32*)
53926f03b1f6Smrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
53936f03b1f6Smrg    # When not using gcc, we currently assume that we are using
53946f03b1f6Smrg    # Microsoft Visual C++.
53956f03b1f6Smrg    if test "$GCC" != yes; then
53966f03b1f6Smrg      with_gnu_ld=no
53976f03b1f6Smrg    fi
53986f03b1f6Smrg    ;;
53996f03b1f6Smrg  interix*)
54006f03b1f6Smrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
54016f03b1f6Smrg    with_gnu_ld=yes
54026f03b1f6Smrg    ;;
54036f03b1f6Smrg  openbsd*)
54046f03b1f6Smrg    with_gnu_ld=no
54056f03b1f6Smrg    ;;
54066f03b1f6Smrg  esac
54076f03b1f6Smrg
54086f03b1f6Smrg  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
54096f03b1f6Smrg  if test "$with_gnu_ld" = yes; then
54106f03b1f6Smrg    # If archive_cmds runs LD, not CC, wlarc should be empty
54116f03b1f6Smrg    wlarc='${wl}'
54126f03b1f6Smrg
54136f03b1f6Smrg    # Set some defaults for GNU ld with shared library support. These
54146f03b1f6Smrg    # are reset later if shared libraries are not supported. Putting them
54156f03b1f6Smrg    # here allows them to be overridden if necessary.
54166f03b1f6Smrg    runpath_var=LD_RUN_PATH
54176f03b1f6Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
54186f03b1f6Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
54196f03b1f6Smrg    # ancient GNU ld didn't support --whole-archive et. al.
54206f03b1f6Smrg    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
54216f03b1f6Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
54226f03b1f6Smrg      else
54236f03b1f6Smrg  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
54246f03b1f6Smrg    fi
54256f03b1f6Smrg    supports_anon_versioning=no
54266f03b1f6Smrg    case `$LD -v 2>/dev/null` in
54276f03b1f6Smrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
54286f03b1f6Smrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
54296f03b1f6Smrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
54306f03b1f6Smrg      *\ 2.11.*) ;; # other 2.11 versions
54316f03b1f6Smrg      *) supports_anon_versioning=yes ;;
54326f03b1f6Smrg    esac
54336f03b1f6Smrg
54346f03b1f6Smrg    # See if GNU ld supports shared libraries.
54356f03b1f6Smrg    case $host_os in
54366f03b1f6Smrg    aix3* | aix4* | aix5*)
54376f03b1f6Smrg      # On AIX/PPC, the GNU linker is very broken
54386f03b1f6Smrg      if test "$host_cpu" != ia64; then
54396f03b1f6Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
54406f03b1f6Smrg	cat <<EOF 1>&2
54416f03b1f6Smrg
54426f03b1f6Smrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported
54436f03b1f6Smrg*** to be unable to reliably create shared libraries on AIX.
54446f03b1f6Smrg*** Therefore, libtool is disabling shared libraries support.  If you
54456f03b1f6Smrg*** really care for shared libraries, you may want to modify your PATH
54466f03b1f6Smrg*** so that a non-GNU linker is found, and then restart.
54476f03b1f6Smrg
54486f03b1f6SmrgEOF
54496f03b1f6Smrg      fi
54506f03b1f6Smrg      ;;
54516f03b1f6Smrg
54526f03b1f6Smrg    amigaos*)
54536f03b1f6Smrg      _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)'
54546f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
54556f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
54566f03b1f6Smrg
54576f03b1f6Smrg      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
54586f03b1f6Smrg      # that the semantics of dynamic libraries on AmigaOS, at least up
54596f03b1f6Smrg      # to version 4, is to share data among multiple programs linked
54606f03b1f6Smrg      # with the same dynamic library.  Since this doesn't match the
54616f03b1f6Smrg      # behavior of shared libraries on other platforms, we can't use
54626f03b1f6Smrg      # them.
54636f03b1f6Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
54646f03b1f6Smrg      ;;
54656f03b1f6Smrg
54666f03b1f6Smrg    beos*)
54676f03b1f6Smrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
54686f03b1f6Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
54696f03b1f6Smrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
54706f03b1f6Smrg	# support --undefined.  This deserves some investigation.  FIXME
54716f03b1f6Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
54726f03b1f6Smrg      else
54736f03b1f6Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
54746f03b1f6Smrg      fi
54756f03b1f6Smrg      ;;
54766f03b1f6Smrg
54776f03b1f6Smrg    cygwin* | mingw* | pw32*)
54786f03b1f6Smrg      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
54796f03b1f6Smrg      # as there is no search path for DLLs.
54806f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
54816f03b1f6Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
54826f03b1f6Smrg      _LT_AC_TAGVAR(always_export_symbols, $1)=no
54836f03b1f6Smrg      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
54846f03b1f6Smrg      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
54856f03b1f6Smrg
54866f03b1f6Smrg      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
54876f03b1f6Smrg        _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'
54886f03b1f6Smrg	# If the export-symbols file already is a .def file (1st line
54896f03b1f6Smrg	# is EXPORTS), use it as is; otherwise, prepend...
54906f03b1f6Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
54916f03b1f6Smrg	  cp $export_symbols $output_objdir/$soname.def;
54926f03b1f6Smrg	else
54936f03b1f6Smrg	  echo EXPORTS > $output_objdir/$soname.def;
54946f03b1f6Smrg	  cat $export_symbols >> $output_objdir/$soname.def;
54956f03b1f6Smrg	fi~
54966f03b1f6Smrg	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
54976f03b1f6Smrg      else
54986f03b1f6Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
54996f03b1f6Smrg      fi
55006f03b1f6Smrg      ;;
55016f03b1f6Smrg
55026f03b1f6Smrg    interix3*)
55036f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
55046f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
55056f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
55066f03b1f6Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
55076f03b1f6Smrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
55086f03b1f6Smrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
55096f03b1f6Smrg      # default) and relocated if they conflict, which is a slow very memory
55106f03b1f6Smrg      # consuming and fragmenting process.  To avoid this, we pick a random,
55116f03b1f6Smrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
55126f03b1f6Smrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
55136f03b1f6Smrg      _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'
55146f03b1f6Smrg      _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'
55156f03b1f6Smrg      ;;
55166f03b1f6Smrg
55176f03b1f6Smrg    linux* | k*bsd*-gnu)
55186f03b1f6Smrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
55196f03b1f6Smrg	tmp_addflag=
55206f03b1f6Smrg	case $cc_basename,$host_cpu in
55216f03b1f6Smrg	pgcc*)				# Portland Group C compiler
55226f03b1f6Smrg	  _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'
55236f03b1f6Smrg	  tmp_addflag=' $pic_flag'
55246f03b1f6Smrg	  ;;
55256f03b1f6Smrg	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
55266f03b1f6Smrg	  _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'
55276f03b1f6Smrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
55286f03b1f6Smrg	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
55296f03b1f6Smrg	  tmp_addflag=' -i_dynamic' ;;
55306f03b1f6Smrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
55316f03b1f6Smrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
55326f03b1f6Smrg	ifc* | ifort*)			# Intel Fortran compiler
55336f03b1f6Smrg	  tmp_addflag=' -nofor_main' ;;
55346f03b1f6Smrg	esac
55356f03b1f6Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
55366f03b1f6Smrg
55376f03b1f6Smrg	if test $supports_anon_versioning = yes; then
55386f03b1f6Smrg	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
55396f03b1f6Smrg  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
55406f03b1f6Smrg  $echo "local: *; };" >> $output_objdir/$libname.ver~
55416f03b1f6Smrg	  $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
55426f03b1f6Smrg	fi
55436f03b1f6Smrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=no
55446f03b1f6Smrg      else
55456f03b1f6Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
55466f03b1f6Smrg      fi
55476f03b1f6Smrg      ;;
55486f03b1f6Smrg
55496f03b1f6Smrg    netbsd* | netbsdelf*-gnu)
55506f03b1f6Smrg      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
55516f03b1f6Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
55526f03b1f6Smrg	wlarc=
55536f03b1f6Smrg      else
55546f03b1f6Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
55556f03b1f6Smrg	_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'
55566f03b1f6Smrg      fi
55576f03b1f6Smrg      ;;
55586f03b1f6Smrg
55596f03b1f6Smrg    solaris*)
55606f03b1f6Smrg      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
55616f03b1f6Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
55626f03b1f6Smrg	cat <<EOF 1>&2
55636f03b1f6Smrg
55646f03b1f6Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
55656f03b1f6Smrg*** create shared libraries on Solaris systems.  Therefore, libtool
55666f03b1f6Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
55676f03b1f6Smrg*** binutils to release 2.9.1 or newer.  Another option is to modify
55686f03b1f6Smrg*** your PATH or compiler configuration so that the native linker is
55696f03b1f6Smrg*** used, and then restart.
55706f03b1f6Smrg
55716f03b1f6SmrgEOF
55726f03b1f6Smrg      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
55736f03b1f6Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
55746f03b1f6Smrg	_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'
55756f03b1f6Smrg      else
55766f03b1f6Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
55776f03b1f6Smrg      fi
55786f03b1f6Smrg      ;;
55796f03b1f6Smrg
55806f03b1f6Smrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
55816f03b1f6Smrg      case `$LD -v 2>&1` in
55826f03b1f6Smrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 
55836f03b1f6Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
55846f03b1f6Smrg	cat <<_LT_EOF 1>&2
55856f03b1f6Smrg
55866f03b1f6Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
55876f03b1f6Smrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
55886f03b1f6Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
55896f03b1f6Smrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
55906f03b1f6Smrg*** your PATH or compiler configuration so that the native linker is
55916f03b1f6Smrg*** used, and then restart.
55926f03b1f6Smrg
55936f03b1f6Smrg_LT_EOF
55946f03b1f6Smrg	;;
55956f03b1f6Smrg	*)
55966f03b1f6Smrg	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
55976f03b1f6Smrg	    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
55986f03b1f6Smrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
55996f03b1f6Smrg	    _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'
56006f03b1f6Smrg	  else
56016f03b1f6Smrg	    _LT_AC_TAGVAR(ld_shlibs, $1)=no
56026f03b1f6Smrg	  fi
56036f03b1f6Smrg	;;
56046f03b1f6Smrg      esac
56056f03b1f6Smrg      ;;
56066f03b1f6Smrg
56076f03b1f6Smrg    sunos4*)
56086f03b1f6Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
56096f03b1f6Smrg      wlarc=
56106f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
56116f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
56126f03b1f6Smrg      ;;
56136f03b1f6Smrg
56146f03b1f6Smrg    *)
56156f03b1f6Smrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
56166f03b1f6Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
56176f03b1f6Smrg	_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'
56186f03b1f6Smrg      else
56196f03b1f6Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
56206f03b1f6Smrg      fi
56216f03b1f6Smrg      ;;
56226f03b1f6Smrg    esac
56236f03b1f6Smrg
56246f03b1f6Smrg    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
56256f03b1f6Smrg      runpath_var=
56266f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
56276f03b1f6Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
56286f03b1f6Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
56296f03b1f6Smrg    fi
56306f03b1f6Smrg  else
56316f03b1f6Smrg    # PORTME fill in a description of your system's linker (not GNU ld)
56326f03b1f6Smrg    case $host_os in
56336f03b1f6Smrg    aix3*)
56346f03b1f6Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
56356f03b1f6Smrg      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
56366f03b1f6Smrg      _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'
56376f03b1f6Smrg      # Note: this linker hardcodes the directories in LIBPATH if there
56386f03b1f6Smrg      # are no directories specified by -L.
56396f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
56406f03b1f6Smrg      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
56416f03b1f6Smrg	# Neither direct hardcoding nor static linking is supported with a
56426f03b1f6Smrg	# broken collect2.
56436f03b1f6Smrg	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
56446f03b1f6Smrg      fi
56456f03b1f6Smrg      ;;
56466f03b1f6Smrg
56476f03b1f6Smrg    aix4* | aix5*)
56486f03b1f6Smrg      if test "$host_cpu" = ia64; then
56496f03b1f6Smrg	# On IA64, the linker does run time linking by default, so we don't
56506f03b1f6Smrg	# have to do anything special.
56516f03b1f6Smrg	aix_use_runtimelinking=no
56526f03b1f6Smrg	exp_sym_flag='-Bexport'
56536f03b1f6Smrg	no_entry_flag=""
56546f03b1f6Smrg      else
56556f03b1f6Smrg	# If we're using GNU nm, then we don't want the "-C" option.
56566f03b1f6Smrg	# -C means demangle to AIX nm, but means don't demangle with GNU nm
56576f03b1f6Smrg	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
56586f03b1f6Smrg	  _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'
56596f03b1f6Smrg	else
56606f03b1f6Smrg	  _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'
56616f03b1f6Smrg	fi
56626f03b1f6Smrg	aix_use_runtimelinking=no
56636f03b1f6Smrg
56646f03b1f6Smrg	# Test if we are trying to use run time linking or normal
56656f03b1f6Smrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
56666f03b1f6Smrg	# need to do runtime linking.
56676f03b1f6Smrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
56686f03b1f6Smrg	  for ld_flag in $LDFLAGS; do
56696f03b1f6Smrg  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
56706f03b1f6Smrg  	    aix_use_runtimelinking=yes
56716f03b1f6Smrg  	    break
56726f03b1f6Smrg  	  fi
56736f03b1f6Smrg	  done
56746f03b1f6Smrg	  ;;
56756f03b1f6Smrg	esac
56766f03b1f6Smrg
56776f03b1f6Smrg	exp_sym_flag='-bexport'
56786f03b1f6Smrg	no_entry_flag='-bnoentry'
56796f03b1f6Smrg      fi
56806f03b1f6Smrg
56816f03b1f6Smrg      # When large executables or shared objects are built, AIX ld can
56826f03b1f6Smrg      # have problems creating the table of contents.  If linking a library
56836f03b1f6Smrg      # or program results in "error TOC overflow" add -mminimal-toc to
56846f03b1f6Smrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
56856f03b1f6Smrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
56866f03b1f6Smrg
56876f03b1f6Smrg      _LT_AC_TAGVAR(archive_cmds, $1)=''
56886f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
56896f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
56906f03b1f6Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
56916f03b1f6Smrg
56926f03b1f6Smrg      if test "$GCC" = yes; then
56936f03b1f6Smrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
56946f03b1f6Smrg	# We only want to do this on AIX 4.2 and lower, the check
56956f03b1f6Smrg	# below for broken collect2 doesn't work under 4.3+
56966f03b1f6Smrg	  collect2name=`${CC} -print-prog-name=collect2`
56976f03b1f6Smrg	  if test -f "$collect2name" && \
56986f03b1f6Smrg  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
56996f03b1f6Smrg	  then
57006f03b1f6Smrg  	  # We have reworked collect2
57016f03b1f6Smrg  	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
57026f03b1f6Smrg	  else
57036f03b1f6Smrg  	  # We have old collect2
57046f03b1f6Smrg  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
57056f03b1f6Smrg  	  # It fails to find uninstalled libraries when the uninstalled
57066f03b1f6Smrg  	  # path is not listed in the libpath.  Setting hardcode_minus_L
57076f03b1f6Smrg  	  # to unsupported forces relinking
57086f03b1f6Smrg  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
57096f03b1f6Smrg  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
57106f03b1f6Smrg  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
57116f03b1f6Smrg	  fi
57126f03b1f6Smrg	  ;;
57136f03b1f6Smrg	esac
57146f03b1f6Smrg	shared_flag='-shared'
57156f03b1f6Smrg	if test "$aix_use_runtimelinking" = yes; then
57166f03b1f6Smrg	  shared_flag="$shared_flag "'${wl}-G'
57176f03b1f6Smrg	fi
57186f03b1f6Smrg      else
57196f03b1f6Smrg	# not using gcc
57206f03b1f6Smrg	if test "$host_cpu" = ia64; then
57216f03b1f6Smrg  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
57226f03b1f6Smrg  	# chokes on -Wl,-G. The following line is correct:
57236f03b1f6Smrg	  shared_flag='-G'
57246f03b1f6Smrg	else
57256f03b1f6Smrg	  if test "$aix_use_runtimelinking" = yes; then
57266f03b1f6Smrg	    shared_flag='${wl}-G'
57276f03b1f6Smrg	  else
57286f03b1f6Smrg	    shared_flag='${wl}-bM:SRE'
57296f03b1f6Smrg	  fi
57306f03b1f6Smrg	fi
57316f03b1f6Smrg      fi
57326f03b1f6Smrg
57336f03b1f6Smrg      # It seems that -bexpall does not export symbols beginning with
57346f03b1f6Smrg      # underscore (_), so it is better to generate a list of symbols to export.
57356f03b1f6Smrg      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
57366f03b1f6Smrg      if test "$aix_use_runtimelinking" = yes; then
57376f03b1f6Smrg	# Warning - without using the other runtime loading flags (-brtl),
57386f03b1f6Smrg	# -berok will link without error, but may produce a broken library.
57396f03b1f6Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
57406f03b1f6Smrg       # Determine the default libpath from the value encoded in an empty executable.
57416f03b1f6Smrg       _LT_AC_SYS_LIBPATH_AIX
57426f03b1f6Smrg       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
57436f03b1f6Smrg	_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"
57446f03b1f6Smrg       else
57456f03b1f6Smrg	if test "$host_cpu" = ia64; then
57466f03b1f6Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
57476f03b1f6Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
57486f03b1f6Smrg	  _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"
57496f03b1f6Smrg	else
57506f03b1f6Smrg	 # Determine the default libpath from the value encoded in an empty executable.
57516f03b1f6Smrg	 _LT_AC_SYS_LIBPATH_AIX
57526f03b1f6Smrg	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
57536f03b1f6Smrg	  # Warning - without using the other run time loading flags,
57546f03b1f6Smrg	  # -berok will link without error, but may produce a broken library.
57556f03b1f6Smrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
57566f03b1f6Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
57576f03b1f6Smrg	  # Exported symbols can be pulled into shared objects from archives
57586f03b1f6Smrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
57596f03b1f6Smrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
57606f03b1f6Smrg	  # This is similar to how AIX traditionally builds its shared libraries.
57616f03b1f6Smrg	  _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'
57626f03b1f6Smrg	fi
57636f03b1f6Smrg      fi
57646f03b1f6Smrg      ;;
57656f03b1f6Smrg
57666f03b1f6Smrg    amigaos*)
57676f03b1f6Smrg      _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)'
57686f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
57696f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
57706f03b1f6Smrg      # see comment about different semantics on the GNU ld section
57716f03b1f6Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
57726f03b1f6Smrg      ;;
57736f03b1f6Smrg
57746f03b1f6Smrg    bsdi[[45]]*)
57756f03b1f6Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
57766f03b1f6Smrg      ;;
57776f03b1f6Smrg
57786f03b1f6Smrg    cygwin* | mingw* | pw32*)
57796f03b1f6Smrg      # When not using gcc, we currently assume that we are using
57806f03b1f6Smrg      # Microsoft Visual C++.
57816f03b1f6Smrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
57826f03b1f6Smrg      # no search path for DLLs.
57836f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
57846f03b1f6Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
57856f03b1f6Smrg      # Tell ltmain to make .lib files, not .a files.
57866f03b1f6Smrg      libext=lib
57876f03b1f6Smrg      # Tell ltmain to make .dll files, not .so files.
57886f03b1f6Smrg      shrext_cmds=".dll"
57896f03b1f6Smrg      # FIXME: Setting linknames here is a bad hack.
57906f03b1f6Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
57916f03b1f6Smrg      # The linker will automatically build a .lib file if we build a DLL.
57926f03b1f6Smrg      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
57936f03b1f6Smrg      # FIXME: Should let the user specify the lib program.
57946f03b1f6Smrg      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
57956f03b1f6Smrg      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
57966f03b1f6Smrg      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
57976f03b1f6Smrg      ;;
57986f03b1f6Smrg
57996f03b1f6Smrg    darwin* | rhapsody*)
58006f03b1f6Smrg      case $host_os in
58016f03b1f6Smrg        rhapsody* | darwin1.[[012]])
58026f03b1f6Smrg         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
58036f03b1f6Smrg         ;;
58046f03b1f6Smrg       *) # Darwin 1.3 on
58056f03b1f6Smrg         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
58066f03b1f6Smrg           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
58076f03b1f6Smrg         else
58086f03b1f6Smrg           case ${MACOSX_DEPLOYMENT_TARGET} in
58096f03b1f6Smrg             10.[[012]])
58106f03b1f6Smrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
58116f03b1f6Smrg               ;;
58126f03b1f6Smrg             10.*)
58136f03b1f6Smrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
58146f03b1f6Smrg               ;;
58156f03b1f6Smrg           esac
58166f03b1f6Smrg         fi
58176f03b1f6Smrg         ;;
58186f03b1f6Smrg      esac
58196f03b1f6Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
58206f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
58216f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
58226f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
58236f03b1f6Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
58246f03b1f6Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
58256f03b1f6Smrg    if test "$GCC" = yes ; then
58266f03b1f6Smrg    	output_verbose_link_cmd='echo'
58276f03b1f6Smrg        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
58286f03b1f6Smrg      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
58296f03b1f6Smrg      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
58306f03b1f6Smrg      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
58316f03b1f6Smrg      _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}'
58326f03b1f6Smrg    else
58336f03b1f6Smrg      case $cc_basename in
58346f03b1f6Smrg        xlc*)
58356f03b1f6Smrg         output_verbose_link_cmd='echo'
58366f03b1f6Smrg         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
58376f03b1f6Smrg         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
58386f03b1f6Smrg          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
58396f03b1f6Smrg         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
58406f03b1f6Smrg          _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}'
58416f03b1f6Smrg          ;;
58426f03b1f6Smrg       *)
58436f03b1f6Smrg         _LT_AC_TAGVAR(ld_shlibs, $1)=no
58446f03b1f6Smrg          ;;
58456f03b1f6Smrg      esac
58466f03b1f6Smrg    fi
58476f03b1f6Smrg      ;;
58486f03b1f6Smrg
58496f03b1f6Smrg    dgux*)
58506f03b1f6Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
58516f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
58526f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
58536f03b1f6Smrg      ;;
58546f03b1f6Smrg
58556f03b1f6Smrg    freebsd1*)
58566f03b1f6Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
58576f03b1f6Smrg      ;;
58586f03b1f6Smrg
58596f03b1f6Smrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
58606f03b1f6Smrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
58616f03b1f6Smrg    # does not break anything, and helps significantly (at the cost of a little
58626f03b1f6Smrg    # extra space).
58636f03b1f6Smrg    freebsd2.2*)
58646f03b1f6Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
58656f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
58666f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
58676f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
58686f03b1f6Smrg      ;;
58696f03b1f6Smrg
58706f03b1f6Smrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
58716f03b1f6Smrg    freebsd2*)
58726f03b1f6Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
58736f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
58746f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
58756f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
58766f03b1f6Smrg      ;;
58776f03b1f6Smrg
58786f03b1f6Smrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
58796f03b1f6Smrg    freebsd* | dragonfly*)
58806f03b1f6Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
58816f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
58826f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
58836f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
58846f03b1f6Smrg      ;;
58856f03b1f6Smrg
58866f03b1f6Smrg    hpux9*)
58876f03b1f6Smrg      if test "$GCC" = yes; then
58886f03b1f6Smrg	_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'
58896f03b1f6Smrg      else
58906f03b1f6Smrg	_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'
58916f03b1f6Smrg      fi
58926f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
58936f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
58946f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
58956f03b1f6Smrg
58966f03b1f6Smrg      # hardcode_minus_L: Not really in the search PATH,
58976f03b1f6Smrg      # but as the default location of the library.
58986f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
58996f03b1f6Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
59006f03b1f6Smrg      ;;
59016f03b1f6Smrg
59026f03b1f6Smrg    hpux10*)
59036f03b1f6Smrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
59046f03b1f6Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
59056f03b1f6Smrg      else
59066f03b1f6Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
59076f03b1f6Smrg      fi
59086f03b1f6Smrg      if test "$with_gnu_ld" = no; then
59096f03b1f6Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
59106f03b1f6Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
59116f03b1f6Smrg
59126f03b1f6Smrg	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
59136f03b1f6Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
59146f03b1f6Smrg
59156f03b1f6Smrg	# hardcode_minus_L: Not really in the search PATH,
59166f03b1f6Smrg	# but as the default location of the library.
59176f03b1f6Smrg	_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
59186f03b1f6Smrg      fi
59196f03b1f6Smrg      ;;
59206f03b1f6Smrg
59216f03b1f6Smrg    hpux11*)
59226f03b1f6Smrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
59236f03b1f6Smrg	case $host_cpu in
59246f03b1f6Smrg	hppa*64*)
59256f03b1f6Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
59266f03b1f6Smrg	  ;;
59276f03b1f6Smrg	ia64*)
59286f03b1f6Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
59296f03b1f6Smrg	  ;;
59306f03b1f6Smrg	*)
59316f03b1f6Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
59326f03b1f6Smrg	  ;;
59336f03b1f6Smrg	esac
59346f03b1f6Smrg      else
59356f03b1f6Smrg	case $host_cpu in
59366f03b1f6Smrg	hppa*64*)
59376f03b1f6Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
59386f03b1f6Smrg	  ;;
59396f03b1f6Smrg	ia64*)
59406f03b1f6Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
59416f03b1f6Smrg	  ;;
59426f03b1f6Smrg	*)
59436f03b1f6Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
59446f03b1f6Smrg	  ;;
59456f03b1f6Smrg	esac
59466f03b1f6Smrg      fi
59476f03b1f6Smrg      if test "$with_gnu_ld" = no; then
59486f03b1f6Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
59496f03b1f6Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
59506f03b1f6Smrg
59516f03b1f6Smrg	case $host_cpu in
59526f03b1f6Smrg	hppa*64*|ia64*)
59536f03b1f6Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
59546f03b1f6Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
59556f03b1f6Smrg	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
59566f03b1f6Smrg	  ;;
59576f03b1f6Smrg	*)
59586f03b1f6Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
59596f03b1f6Smrg	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
59606f03b1f6Smrg
59616f03b1f6Smrg	  # hardcode_minus_L: Not really in the search PATH,
59626f03b1f6Smrg	  # but as the default location of the library.
59636f03b1f6Smrg	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
59646f03b1f6Smrg	  ;;
59656f03b1f6Smrg	esac
59666f03b1f6Smrg      fi
59676f03b1f6Smrg      ;;
59686f03b1f6Smrg
59696f03b1f6Smrg    irix5* | irix6* | nonstopux*)
59706f03b1f6Smrg      if test "$GCC" = yes; then
59716f03b1f6Smrg	_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'
59726f03b1f6Smrg      else
59736f03b1f6Smrg	_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'
59746f03b1f6Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
59756f03b1f6Smrg      fi
59766f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
59776f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
59786f03b1f6Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
59796f03b1f6Smrg      ;;
59806f03b1f6Smrg
59816f03b1f6Smrg    netbsd* | netbsdelf*-gnu)
59826f03b1f6Smrg      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
59836f03b1f6Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
59846f03b1f6Smrg      else
59856f03b1f6Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
59866f03b1f6Smrg      fi
59876f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
59886f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
59896f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
59906f03b1f6Smrg      ;;
59916f03b1f6Smrg
59926f03b1f6Smrg    newsos6)
59936f03b1f6Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
59946f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
59956f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
59966f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
59976f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
59986f03b1f6Smrg      ;;
59996f03b1f6Smrg
60006f03b1f6Smrg    openbsd*)
60016f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
60026f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
60036f03b1f6Smrg      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
60046f03b1f6Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
60056f03b1f6Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
60066f03b1f6Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
60076f03b1f6Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
60086f03b1f6Smrg      else
60096f03b1f6Smrg       case $host_os in
60106f03b1f6Smrg	 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
60116f03b1f6Smrg	   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
60126f03b1f6Smrg	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
60136f03b1f6Smrg	   ;;
60146f03b1f6Smrg	 *)
60156f03b1f6Smrg	   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
60166f03b1f6Smrg	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
60176f03b1f6Smrg	   ;;
60186f03b1f6Smrg       esac
60196f03b1f6Smrg      fi
60206f03b1f6Smrg      ;;
60216f03b1f6Smrg
60226f03b1f6Smrg    os2*)
60236f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
60246f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
60256f03b1f6Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
60266f03b1f6Smrg      _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'
60276f03b1f6Smrg      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
60286f03b1f6Smrg      ;;
60296f03b1f6Smrg
60306f03b1f6Smrg    osf3*)
60316f03b1f6Smrg      if test "$GCC" = yes; then
60326f03b1f6Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
60336f03b1f6Smrg	_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'
60346f03b1f6Smrg      else
60356f03b1f6Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
60366f03b1f6Smrg	_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'
60376f03b1f6Smrg      fi
60386f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
60396f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
60406f03b1f6Smrg      ;;
60416f03b1f6Smrg
60426f03b1f6Smrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
60436f03b1f6Smrg      if test "$GCC" = yes; then
60446f03b1f6Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
60456f03b1f6Smrg	_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'
60466f03b1f6Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
60476f03b1f6Smrg      else
60486f03b1f6Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
60496f03b1f6Smrg	_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'
60506f03b1f6Smrg	_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~
60516f03b1f6Smrg	$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'
60526f03b1f6Smrg
60536f03b1f6Smrg	# Both c and cxx compiler support -rpath directly
60546f03b1f6Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
60556f03b1f6Smrg      fi
60566f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
60576f03b1f6Smrg      ;;
60586f03b1f6Smrg
60596f03b1f6Smrg    solaris*)
60606f03b1f6Smrg      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
60616f03b1f6Smrg      if test "$GCC" = yes; then
60626f03b1f6Smrg	wlarc='${wl}'
60636f03b1f6Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
60646f03b1f6Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
60656f03b1f6Smrg	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
60666f03b1f6Smrg      else
60676f03b1f6Smrg	wlarc=''
60686f03b1f6Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
60696f03b1f6Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
60706f03b1f6Smrg  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
60716f03b1f6Smrg      fi
60726f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
60736f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
60746f03b1f6Smrg      case $host_os in
60756f03b1f6Smrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
60766f03b1f6Smrg      *)
60776f03b1f6Smrg 	# The compiler driver will combine linker options so we
60786f03b1f6Smrg 	# cannot just pass the convience library names through
60796f03b1f6Smrg 	# without $wl, iff we do not link with $LD.
60806f03b1f6Smrg 	# Luckily, gcc supports the same syntax we need for Sun Studio.
60816f03b1f6Smrg 	# Supported since Solaris 2.6 (maybe 2.5.1?)
60826f03b1f6Smrg 	case $wlarc in
60836f03b1f6Smrg 	'')
60846f03b1f6Smrg 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
60856f03b1f6Smrg 	*)
60866f03b1f6Smrg 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
60876f03b1f6Smrg 	esac ;;
60886f03b1f6Smrg      esac
60896f03b1f6Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
60906f03b1f6Smrg      ;;
60916f03b1f6Smrg
60926f03b1f6Smrg    sunos4*)
60936f03b1f6Smrg      if test "x$host_vendor" = xsequent; then
60946f03b1f6Smrg	# Use $CC to link under sequent, because it throws in some extra .o
60956f03b1f6Smrg	# files that make .init and .fini sections work.
60966f03b1f6Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
60976f03b1f6Smrg      else
60986f03b1f6Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
60996f03b1f6Smrg      fi
61006f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
61016f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
61026f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
61036f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
61046f03b1f6Smrg      ;;
61056f03b1f6Smrg
61066f03b1f6Smrg    sysv4)
61076f03b1f6Smrg      case $host_vendor in
61086f03b1f6Smrg	sni)
61096f03b1f6Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
61106f03b1f6Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
61116f03b1f6Smrg	;;
61126f03b1f6Smrg	siemens)
61136f03b1f6Smrg	  ## LD is ld it makes a PLAMLIB
61146f03b1f6Smrg	  ## CC just makes a GrossModule.
61156f03b1f6Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
61166f03b1f6Smrg	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
61176f03b1f6Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
61186f03b1f6Smrg        ;;
61196f03b1f6Smrg	motorola)
61206f03b1f6Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
61216f03b1f6Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
61226f03b1f6Smrg	;;
61236f03b1f6Smrg      esac
61246f03b1f6Smrg      runpath_var='LD_RUN_PATH'
61256f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
61266f03b1f6Smrg      ;;
61276f03b1f6Smrg
61286f03b1f6Smrg    sysv4.3*)
61296f03b1f6Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
61306f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
61316f03b1f6Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
61326f03b1f6Smrg      ;;
61336f03b1f6Smrg
61346f03b1f6Smrg    sysv4*MP*)
61356f03b1f6Smrg      if test -d /usr/nec; then
61366f03b1f6Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
61376f03b1f6Smrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
61386f03b1f6Smrg	runpath_var=LD_RUN_PATH
61396f03b1f6Smrg	hardcode_runpath_var=yes
61406f03b1f6Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
61416f03b1f6Smrg      fi
61426f03b1f6Smrg      ;;
61436f03b1f6Smrg
61446f03b1f6Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
61456f03b1f6Smrg      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
61466f03b1f6Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
61476f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
61486f03b1f6Smrg      runpath_var='LD_RUN_PATH'
61496f03b1f6Smrg
61506f03b1f6Smrg      if test "$GCC" = yes; then
61516f03b1f6Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
61526f03b1f6Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
61536f03b1f6Smrg      else
61546f03b1f6Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
61556f03b1f6Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
61566f03b1f6Smrg      fi
61576f03b1f6Smrg      ;;
61586f03b1f6Smrg
61596f03b1f6Smrg    sysv5* | sco3.2v5* | sco5v6*)
61606f03b1f6Smrg      # Note: We can NOT use -z defs as we might desire, because we do not
61616f03b1f6Smrg      # link with -lc, and that would cause any symbols used from libc to
61626f03b1f6Smrg      # always be unresolved, which means just about no library would
61636f03b1f6Smrg      # ever link correctly.  If we're not using GNU ld we use -z text
61646f03b1f6Smrg      # though, which does catch some bad symbols but isn't as heavy-handed
61656f03b1f6Smrg      # as -z defs.
61666f03b1f6Smrg      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
61676f03b1f6Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
61686f03b1f6Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
61696f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
61706f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
61716f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
61726f03b1f6Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
61736f03b1f6Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
61746f03b1f6Smrg      runpath_var='LD_RUN_PATH'
61756f03b1f6Smrg
61766f03b1f6Smrg      if test "$GCC" = yes; then
61776f03b1f6Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
61786f03b1f6Smrg	_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'
61796f03b1f6Smrg      else
61806f03b1f6Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
61816f03b1f6Smrg	_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'
61826f03b1f6Smrg      fi
61836f03b1f6Smrg      ;;
61846f03b1f6Smrg
61856f03b1f6Smrg    uts4*)
61866f03b1f6Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
61876f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
61886f03b1f6Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
61896f03b1f6Smrg      ;;
61906f03b1f6Smrg
61916f03b1f6Smrg    *)
61926f03b1f6Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
61936f03b1f6Smrg      ;;
61946f03b1f6Smrg    esac
61956f03b1f6Smrg  fi
61966f03b1f6Smrg])
61976f03b1f6SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
61986f03b1f6Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
61996f03b1f6Smrg
62006f03b1f6Smrg#
62016f03b1f6Smrg# Do we need to explicitly link libc?
62026f03b1f6Smrg#
62036f03b1f6Smrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
62046f03b1f6Smrgx|xyes)
62056f03b1f6Smrg  # Assume -lc should be added
62066f03b1f6Smrg  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
62076f03b1f6Smrg
62086f03b1f6Smrg  if test "$enable_shared" = yes && test "$GCC" = yes; then
62096f03b1f6Smrg    case $_LT_AC_TAGVAR(archive_cmds, $1) in
62106f03b1f6Smrg    *'~'*)
62116f03b1f6Smrg      # FIXME: we may have to deal with multi-command sequences.
62126f03b1f6Smrg      ;;
62136f03b1f6Smrg    '$CC '*)
62146f03b1f6Smrg      # Test whether the compiler implicitly links with -lc since on some
62156f03b1f6Smrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
62166f03b1f6Smrg      # to ld, don't add -lc before -lgcc.
62176f03b1f6Smrg      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
62186f03b1f6Smrg      $rm conftest*
62196f03b1f6Smrg      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
62206f03b1f6Smrg
62216f03b1f6Smrg      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
62226f03b1f6Smrg        soname=conftest
62236f03b1f6Smrg        lib=conftest
62246f03b1f6Smrg        libobjs=conftest.$ac_objext
62256f03b1f6Smrg        deplibs=
62266f03b1f6Smrg        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
62276f03b1f6Smrg	pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
62286f03b1f6Smrg        compiler_flags=-v
62296f03b1f6Smrg        linker_flags=-v
62306f03b1f6Smrg        verstring=
62316f03b1f6Smrg        output_objdir=.
62326f03b1f6Smrg        libname=conftest
62336f03b1f6Smrg        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
62346f03b1f6Smrg        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
62356f03b1f6Smrg        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
62366f03b1f6Smrg        then
62376f03b1f6Smrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
62386f03b1f6Smrg        else
62396f03b1f6Smrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
62406f03b1f6Smrg        fi
62416f03b1f6Smrg        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
62426f03b1f6Smrg      else
62436f03b1f6Smrg        cat conftest.err 1>&5
62446f03b1f6Smrg      fi
62456f03b1f6Smrg      $rm conftest*
62466f03b1f6Smrg      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
62476f03b1f6Smrg      ;;
62486f03b1f6Smrg    esac
62496f03b1f6Smrg  fi
62506f03b1f6Smrg  ;;
62516f03b1f6Smrgesac
62526f03b1f6Smrg])# AC_LIBTOOL_PROG_LD_SHLIBS
62536f03b1f6Smrg
62546f03b1f6Smrg
62556f03b1f6Smrg# _LT_AC_FILE_LTDLL_C
62566f03b1f6Smrg# -------------------
62576f03b1f6Smrg# Be careful that the start marker always follows a newline.
62586f03b1f6SmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [
62596f03b1f6Smrg# /* ltdll.c starts here */
62606f03b1f6Smrg# #define WIN32_LEAN_AND_MEAN
62616f03b1f6Smrg# #include <windows.h>
62626f03b1f6Smrg# #undef WIN32_LEAN_AND_MEAN
62636f03b1f6Smrg# #include <stdio.h>
62646f03b1f6Smrg#
62656f03b1f6Smrg# #ifndef __CYGWIN__
62666f03b1f6Smrg# #  ifdef __CYGWIN32__
62676f03b1f6Smrg# #    define __CYGWIN__ __CYGWIN32__
62686f03b1f6Smrg# #  endif
62696f03b1f6Smrg# #endif
62706f03b1f6Smrg#
62716f03b1f6Smrg# #ifdef __cplusplus
62726f03b1f6Smrg# extern "C" {
62736f03b1f6Smrg# #endif
62746f03b1f6Smrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
62756f03b1f6Smrg# #ifdef __cplusplus
62766f03b1f6Smrg# }
62776f03b1f6Smrg# #endif
62786f03b1f6Smrg#
62796f03b1f6Smrg# #ifdef __CYGWIN__
62806f03b1f6Smrg# #include <cygwin/cygwin_dll.h>
62816f03b1f6Smrg# DECLARE_CYGWIN_DLL( DllMain );
62826f03b1f6Smrg# #endif
62836f03b1f6Smrg# HINSTANCE __hDllInstance_base;
62846f03b1f6Smrg#
62856f03b1f6Smrg# BOOL APIENTRY
62866f03b1f6Smrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
62876f03b1f6Smrg# {
62886f03b1f6Smrg#   __hDllInstance_base = hInst;
62896f03b1f6Smrg#   return TRUE;
62906f03b1f6Smrg# }
62916f03b1f6Smrg# /* ltdll.c ends here */
62926f03b1f6Smrg])# _LT_AC_FILE_LTDLL_C
62936f03b1f6Smrg
62946f03b1f6Smrg
62956f03b1f6Smrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
62966f03b1f6Smrg# ---------------------------------
62976f03b1f6SmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
62986f03b1f6Smrg
62996f03b1f6Smrg
63006f03b1f6Smrg# old names
63016f03b1f6SmrgAC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
63026f03b1f6SmrgAC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
63036f03b1f6SmrgAC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
63046f03b1f6SmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
63056f03b1f6SmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
63066f03b1f6SmrgAC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
63076f03b1f6SmrgAC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
63086f03b1f6Smrg
63096f03b1f6Smrg# This is just to silence aclocal about the macro not being used
63106f03b1f6Smrgifelse([AC_DISABLE_FAST_INSTALL])
63116f03b1f6Smrg
63126f03b1f6SmrgAC_DEFUN([LT_AC_PROG_GCJ],
63136f03b1f6Smrg[AC_CHECK_TOOL(GCJ, gcj, no)
63146f03b1f6Smrg  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
63156f03b1f6Smrg  AC_SUBST(GCJFLAGS)
63166f03b1f6Smrg])
63176f03b1f6Smrg
63186f03b1f6SmrgAC_DEFUN([LT_AC_PROG_RC],
63196f03b1f6Smrg[AC_CHECK_TOOL(RC, windres, no)
63206f03b1f6Smrg])
63216f03b1f6Smrg
63226f03b1f6Smrg# NOTE: This macro has been submitted for inclusion into   #
63236f03b1f6Smrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
63246f03b1f6Smrg#  a released version of Autoconf we should remove this    #
63256f03b1f6Smrg#  macro and use it instead.                               #
63266f03b1f6Smrg# LT_AC_PROG_SED
63276f03b1f6Smrg# --------------
63286f03b1f6Smrg# Check for a fully-functional sed program, that truncates
63296f03b1f6Smrg# as few characters as possible.  Prefer GNU sed if found.
63306f03b1f6SmrgAC_DEFUN([LT_AC_PROG_SED],
63316f03b1f6Smrg[AC_MSG_CHECKING([for a sed that does not truncate output])
63326f03b1f6SmrgAC_CACHE_VAL(lt_cv_path_SED,
63336f03b1f6Smrg[# Loop through the user's path and test for sed and gsed.
63346f03b1f6Smrg# Then use that list of sed's as ones to test for truncation.
63356f03b1f6Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63366f03b1f6Smrgfor as_dir in $PATH
63376f03b1f6Smrgdo
63386f03b1f6Smrg  IFS=$as_save_IFS
63396f03b1f6Smrg  test -z "$as_dir" && as_dir=.
63406f03b1f6Smrg  for lt_ac_prog in sed gsed; do
63416f03b1f6Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
63426f03b1f6Smrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
63436f03b1f6Smrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
63446f03b1f6Smrg      fi
63456f03b1f6Smrg    done
63466f03b1f6Smrg  done
63476f03b1f6Smrgdone
63486f03b1f6Smrglt_ac_max=0
63496f03b1f6Smrglt_ac_count=0
63506f03b1f6Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
63516f03b1f6Smrg# along with /bin/sed that truncates output.
63526f03b1f6Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
63536f03b1f6Smrg  test ! -f $lt_ac_sed && continue
63546f03b1f6Smrg  cat /dev/null > conftest.in
63556f03b1f6Smrg  lt_ac_count=0
63566f03b1f6Smrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
63576f03b1f6Smrg  # Check for GNU sed and select it if it is found.
63586f03b1f6Smrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
63596f03b1f6Smrg    lt_cv_path_SED=$lt_ac_sed
63606f03b1f6Smrg    break
63616f03b1f6Smrg  fi
63626f03b1f6Smrg  while true; do
63636f03b1f6Smrg    cat conftest.in conftest.in >conftest.tmp
63646f03b1f6Smrg    mv conftest.tmp conftest.in
63656f03b1f6Smrg    cp conftest.in conftest.nl
63666f03b1f6Smrg    echo >>conftest.nl
63676f03b1f6Smrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
63686f03b1f6Smrg    cmp -s conftest.out conftest.nl || break
63696f03b1f6Smrg    # 10000 chars as input seems more than enough
63706f03b1f6Smrg    test $lt_ac_count -gt 10 && break
63716f03b1f6Smrg    lt_ac_count=`expr $lt_ac_count + 1`
63726f03b1f6Smrg    if test $lt_ac_count -gt $lt_ac_max; then
63736f03b1f6Smrg      lt_ac_max=$lt_ac_count
63746f03b1f6Smrg      lt_cv_path_SED=$lt_ac_sed
63756f03b1f6Smrg    fi
63766f03b1f6Smrg  done
63776f03b1f6Smrgdone
63786f03b1f6Smrg])
63796f03b1f6SmrgSED=$lt_cv_path_SED
63806f03b1f6SmrgAC_MSG_RESULT([$SED])
63816f03b1f6Smrg])
63826f03b1f6Smrg
63836f03b1f6Smrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
63846f03b1f6Smrg# 
63856f03b1f6Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
63866f03b1f6Smrg#
63876f03b1f6Smrg# This program is free software; you can redistribute it and/or modify
63886f03b1f6Smrg# it under the terms of the GNU General Public License as published by
63896f03b1f6Smrg# the Free Software Foundation; either version 2 of the License, or
63906f03b1f6Smrg# (at your option) any later version.
63916f03b1f6Smrg#
63926f03b1f6Smrg# This program is distributed in the hope that it will be useful, but
63936f03b1f6Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
63946f03b1f6Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
63956f03b1f6Smrg# General Public License for more details.
63966f03b1f6Smrg#
63976f03b1f6Smrg# You should have received a copy of the GNU General Public License
63986f03b1f6Smrg# along with this program; if not, write to the Free Software
63996f03b1f6Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
64006f03b1f6Smrg#
64016f03b1f6Smrg# As a special exception to the GNU General Public License, if you
64026f03b1f6Smrg# distribute this file as part of a program that contains a
64036f03b1f6Smrg# configuration script generated by Autoconf, you may include it under
64046f03b1f6Smrg# the same distribution terms that you use for the rest of that program.
64056f03b1f6Smrg
64066f03b1f6Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
64076f03b1f6Smrg# ----------------------------------
64086f03b1f6SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
64096f03b1f6Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
64106f03b1f6Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
64116f03b1f6SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
64126f03b1f6Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
64136f03b1f6Smrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
64146f03b1f6Smrgfi
64156f03b1f6Smrgif test -n "$PKG_CONFIG"; then
64166f03b1f6Smrg	_pkg_min_version=m4_default([$1], [0.9.0])
64176f03b1f6Smrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
64186f03b1f6Smrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
64196f03b1f6Smrg		AC_MSG_RESULT([yes])
64206f03b1f6Smrg	else
64216f03b1f6Smrg		AC_MSG_RESULT([no])
64226f03b1f6Smrg		PKG_CONFIG=""
64236f03b1f6Smrg	fi
64246f03b1f6Smrg		
64256f03b1f6Smrgfi[]dnl
64266f03b1f6Smrg])# PKG_PROG_PKG_CONFIG
64276f03b1f6Smrg
64286f03b1f6Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
64296f03b1f6Smrg#
64306f03b1f6Smrg# Check to see whether a particular set of modules exists.  Similar
64316f03b1f6Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
64326f03b1f6Smrg#
64336f03b1f6Smrg#
64346f03b1f6Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
64356f03b1f6Smrg# this or PKG_CHECK_MODULES is called, or make sure to call
64366f03b1f6Smrg# PKG_CHECK_EXISTS manually
64376f03b1f6Smrg# --------------------------------------------------------------
64386f03b1f6SmrgAC_DEFUN([PKG_CHECK_EXISTS],
64396f03b1f6Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
64406f03b1f6Smrgif test -n "$PKG_CONFIG" && \
64416f03b1f6Smrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
64426f03b1f6Smrg  m4_ifval([$2], [$2], [:])
64436f03b1f6Smrgm4_ifvaln([$3], [else
64446f03b1f6Smrg  $3])dnl
64456f03b1f6Smrgfi])
64466f03b1f6Smrg
64476f03b1f6Smrg
64486f03b1f6Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
64496f03b1f6Smrg# ---------------------------------------------
64506f03b1f6Smrgm4_define([_PKG_CONFIG],
64516f03b1f6Smrg[if test -n "$PKG_CONFIG"; then
64526f03b1f6Smrg    if test -n "$$1"; then
64536f03b1f6Smrg        pkg_cv_[]$1="$$1"
64546f03b1f6Smrg    else
64556f03b1f6Smrg        PKG_CHECK_EXISTS([$3],
64566f03b1f6Smrg                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
64576f03b1f6Smrg			 [pkg_failed=yes])
64586f03b1f6Smrg    fi
64596f03b1f6Smrgelse
64606f03b1f6Smrg	pkg_failed=untried
64616f03b1f6Smrgfi[]dnl
64626f03b1f6Smrg])# _PKG_CONFIG
64636f03b1f6Smrg
64646f03b1f6Smrg# _PKG_SHORT_ERRORS_SUPPORTED
64656f03b1f6Smrg# -----------------------------
64666f03b1f6SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
64676f03b1f6Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
64686f03b1f6Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64696f03b1f6Smrg        _pkg_short_errors_supported=yes
64706f03b1f6Smrgelse
64716f03b1f6Smrg        _pkg_short_errors_supported=no
64726f03b1f6Smrgfi[]dnl
64736f03b1f6Smrg])# _PKG_SHORT_ERRORS_SUPPORTED
64746f03b1f6Smrg
64756f03b1f6Smrg
64766f03b1f6Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
64776f03b1f6Smrg# [ACTION-IF-NOT-FOUND])
64786f03b1f6Smrg#
64796f03b1f6Smrg#
64806f03b1f6Smrg# Note that if there is a possibility the first call to
64816f03b1f6Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
64826f03b1f6Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
64836f03b1f6Smrg#
64846f03b1f6Smrg#
64856f03b1f6Smrg# --------------------------------------------------------------
64866f03b1f6SmrgAC_DEFUN([PKG_CHECK_MODULES],
64876f03b1f6Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
64886f03b1f6SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
64896f03b1f6SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
64906f03b1f6Smrg
64916f03b1f6Smrgpkg_failed=no
64926f03b1f6SmrgAC_MSG_CHECKING([for $1])
64936f03b1f6Smrg
64946f03b1f6Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
64956f03b1f6Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
64966f03b1f6Smrg
64976f03b1f6Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
64986f03b1f6Smrgand $1[]_LIBS to avoid the need to call pkg-config.
64996f03b1f6SmrgSee the pkg-config man page for more details.])
65006f03b1f6Smrg
65016f03b1f6Smrgif test $pkg_failed = yes; then
65026f03b1f6Smrg        _PKG_SHORT_ERRORS_SUPPORTED
65036f03b1f6Smrg        if test $_pkg_short_errors_supported = yes; then
65046f03b1f6Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
65056f03b1f6Smrg        else 
65066f03b1f6Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
65076f03b1f6Smrg        fi
65086f03b1f6Smrg	# Put the nasty error message in config.log where it belongs
65096f03b1f6Smrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
65106f03b1f6Smrg
65116f03b1f6Smrg	ifelse([$4], , [AC_MSG_ERROR(dnl
65126f03b1f6Smrg[Package requirements ($2) were not met:
65136f03b1f6Smrg
65146f03b1f6Smrg$$1_PKG_ERRORS
65156f03b1f6Smrg
65166f03b1f6SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
65176f03b1f6Smrginstalled software in a non-standard prefix.
65186f03b1f6Smrg
65196f03b1f6Smrg_PKG_TEXT
65206f03b1f6Smrg])],
65216f03b1f6Smrg		[$4])
65226f03b1f6Smrgelif test $pkg_failed = untried; then
65236f03b1f6Smrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
65246f03b1f6Smrg[The pkg-config script could not be found or is too old.  Make sure it
65256f03b1f6Smrgis in your PATH or set the PKG_CONFIG environment variable to the full
65266f03b1f6Smrgpath to pkg-config.
65276f03b1f6Smrg
65286f03b1f6Smrg_PKG_TEXT
65296f03b1f6Smrg
65306f03b1f6SmrgTo get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
65316f03b1f6Smrg		[$4])
65326f03b1f6Smrgelse
65336f03b1f6Smrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
65346f03b1f6Smrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
65356f03b1f6Smrg        AC_MSG_RESULT([yes])
65366f03b1f6Smrg	ifelse([$3], , :, [$3])
65376f03b1f6Smrgfi[]dnl
65386f03b1f6Smrg])# PKG_CHECK_MODULES
65396f03b1f6Smrg
65406f03b1f6Smrgdnl
65416f03b1f6Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
65426f03b1f6Smrgdnl 
65436f03b1f6Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a
65446f03b1f6Smrgdnl copy of this software and associated documentation files (the
65456f03b1f6Smrgdnl "Software"), to deal in the Software without restriction, including
65466f03b1f6Smrgdnl without limitation the rights to use, copy, modify, merge, publish,
65476f03b1f6Smrgdnl distribute, and/or sell copies of the Software, and to permit persons
65486f03b1f6Smrgdnl to whom the Software is furnished to do so, provided that the above
65496f03b1f6Smrgdnl copyright notice(s) and this permission notice appear in all copies of
65506f03b1f6Smrgdnl the Software and that both the above copyright notice(s) and this
65516f03b1f6Smrgdnl permission notice appear in supporting documentation.
65526f03b1f6Smrgdnl
65536f03b1f6Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
65546f03b1f6Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
65556f03b1f6Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
65566f03b1f6Smrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
65576f03b1f6Smrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
65586f03b1f6Smrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
65596f03b1f6Smrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
65606f03b1f6Smrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
65616f03b1f6Smrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
65626f03b1f6Smrgdnl
65636f03b1f6Smrgdnl Except as contained in this notice, the name of a copyright holder
65646f03b1f6Smrgdnl shall not be used in advertising or otherwise to promote the sale, use
65656f03b1f6Smrgdnl or other dealings in this Software without prior written authorization
65666f03b1f6Smrgdnl of the copyright holder.
65676f03b1f6Smrg
65686f03b1f6Smrg# XORG_MACROS_VERSION(required-version)
65696f03b1f6Smrg# -------------------------------------
65706f03b1f6Smrg# Minimum version: 1.1.0
65716f03b1f6Smrg#
65726f03b1f6Smrg# If you're using a macro added in Version 1.1 or newer, include this in
65736f03b1f6Smrg# your configure.ac with the minimum required version, such as:
65746f03b1f6Smrg# XORG_MACROS_VERSION(1.1)
65756f03b1f6Smrg#
65766f03b1f6Smrg# To force at least a version with this macro defined, also add:
65776f03b1f6Smrg# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])])
65786f03b1f6Smrg#
65796f03b1f6Smrg#
65806f03b1f6Smrg# See the "minimum version" comment for each macro you use to see what 
65816f03b1f6Smrg# version you require.
65826f03b1f6SmrgAC_DEFUN([XORG_MACROS_VERSION],[
65836f03b1f6Smrg	[XORG_MACROS_needed_version=$1
65846f03b1f6Smrg	XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'`
65856f03b1f6Smrg	XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
65866f03b1f6Smrg	AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}])
65876f03b1f6Smrg	[XORG_MACROS_version=1.1.3
65886f03b1f6Smrg	XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
65896f03b1f6Smrg	XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
65906f03b1f6Smrg	if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
65916f03b1f6Smrg		AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x])
65926f03b1f6Smrg	fi
65936f03b1f6Smrg	if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then
65946f03b1f6Smrg		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])
65956f03b1f6Smrg	fi
65966f03b1f6Smrg	AC_MSG_RESULT([yes, $XORG_MACROS_version])
65976f03b1f6Smrg]) # XORG_MACROS_VERSION
65986f03b1f6Smrg
65996f03b1f6Smrg# XORG_PROG_RAWCPP()
66006f03b1f6Smrg# ------------------
66016f03b1f6Smrg# Minimum version: 1.0.0
66026f03b1f6Smrg#
66036f03b1f6Smrg# Find cpp program and necessary flags for use in pre-processing text files
66046f03b1f6Smrg# such as man pages and config files
66056f03b1f6SmrgAC_DEFUN([XORG_PROG_RAWCPP],[
66066f03b1f6SmrgAC_REQUIRE([AC_PROG_CPP])
66076f03b1f6SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
66086f03b1f6Smrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
66096f03b1f6Smrg
66106f03b1f6Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
66116f03b1f6Smrg# which is not the best choice for supporting other OS'es, but covers most
66126f03b1f6Smrg# of the ones we need for now.
66136f03b1f6SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
66146f03b1f6SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?])
66156f03b1f6Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
66166f03b1f6Smrg	AC_MSG_RESULT([no])
66176f03b1f6Smrgelse
66186f03b1f6Smrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
66196f03b1f6Smrg		RAWCPPFLAGS=-undef
66206f03b1f6Smrg		AC_MSG_RESULT([yes])
66216f03b1f6Smrg	else
66226f03b1f6Smrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
66236f03b1f6Smrg	fi
66246f03b1f6Smrgfi
66256f03b1f6Smrgrm -f conftest.$ac_ext
66266f03b1f6Smrg
66276f03b1f6SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
66286f03b1f6SmrgAC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
66296f03b1f6Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
66306f03b1f6Smrg	AC_MSG_RESULT([no])
66316f03b1f6Smrgelse
66326f03b1f6Smrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
66336f03b1f6Smrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
66346f03b1f6Smrg		AC_MSG_RESULT([yes])
66356f03b1f6Smrg	else
66366f03b1f6Smrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
66376f03b1f6Smrg	fi
66386f03b1f6Smrgfi
66396f03b1f6Smrgrm -f conftest.$ac_ext
66406f03b1f6SmrgAC_SUBST(RAWCPPFLAGS)
66416f03b1f6Smrg]) # XORG_PROG_RAWCPP
66426f03b1f6Smrg
66436f03b1f6Smrg# XORG_MANPAGE_SECTIONS()
66446f03b1f6Smrg# -----------------------
66456f03b1f6Smrg# Minimum version: 1.0.0
66466f03b1f6Smrg#
66476f03b1f6Smrg# Determine which sections man pages go in for the different man page types
66486f03b1f6Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
66496f03b1f6Smrg# Not sure if there's any better way than just hardcoding by OS name.
66506f03b1f6Smrg# Override default settings by setting environment variables
66516f03b1f6Smrg
66526f03b1f6SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
66536f03b1f6SmrgAC_REQUIRE([AC_CANONICAL_HOST])
66546f03b1f6Smrg
66556f03b1f6Smrgif test x$APP_MAN_SUFFIX = x    ; then
66566f03b1f6Smrg    APP_MAN_SUFFIX=1
66576f03b1f6Smrgfi
66586f03b1f6Smrgif test x$APP_MAN_DIR = x    ; then
66596f03b1f6Smrg    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
66606f03b1f6Smrgfi
66616f03b1f6Smrg
66626f03b1f6Smrgif test x$LIB_MAN_SUFFIX = x    ; then
66636f03b1f6Smrg    LIB_MAN_SUFFIX=3
66646f03b1f6Smrgfi
66656f03b1f6Smrgif test x$LIB_MAN_DIR = x    ; then
66666f03b1f6Smrg    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
66676f03b1f6Smrgfi
66686f03b1f6Smrg
66696f03b1f6Smrgif test x$FILE_MAN_SUFFIX = x    ; then
66706f03b1f6Smrg    case $host_os in
66716f03b1f6Smrg	solaris*)	FILE_MAN_SUFFIX=4  ;;
66726f03b1f6Smrg	*)		FILE_MAN_SUFFIX=5  ;;
66736f03b1f6Smrg    esac
66746f03b1f6Smrgfi
66756f03b1f6Smrgif test x$FILE_MAN_DIR = x    ; then
66766f03b1f6Smrg    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
66776f03b1f6Smrgfi
66786f03b1f6Smrg
66796f03b1f6Smrgif test x$MISC_MAN_SUFFIX = x    ; then
66806f03b1f6Smrg    case $host_os in
66816f03b1f6Smrg	solaris*)	MISC_MAN_SUFFIX=5  ;;
66826f03b1f6Smrg	*)		MISC_MAN_SUFFIX=7  ;;
66836f03b1f6Smrg    esac
66846f03b1f6Smrgfi
66856f03b1f6Smrgif test x$MISC_MAN_DIR = x    ; then
66866f03b1f6Smrg    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
66876f03b1f6Smrgfi
66886f03b1f6Smrg
66896f03b1f6Smrgif test x$DRIVER_MAN_SUFFIX = x    ; then
66906f03b1f6Smrg    case $host_os in
66916f03b1f6Smrg	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
66926f03b1f6Smrg	*)		DRIVER_MAN_SUFFIX=4  ;;
66936f03b1f6Smrg    esac
66946f03b1f6Smrgfi
66956f03b1f6Smrgif test x$DRIVER_MAN_DIR = x    ; then
66966f03b1f6Smrg    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
66976f03b1f6Smrgfi
66986f03b1f6Smrg
66996f03b1f6Smrgif test x$ADMIN_MAN_SUFFIX = x    ; then
67006f03b1f6Smrg    case $host_os in
67016f03b1f6Smrg	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
67026f03b1f6Smrg	*)		ADMIN_MAN_SUFFIX=8  ;;
67036f03b1f6Smrg    esac
67046f03b1f6Smrgfi
67056f03b1f6Smrgif test x$ADMIN_MAN_DIR = x    ; then
67066f03b1f6Smrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
67076f03b1f6Smrgfi
67086f03b1f6Smrg
67096f03b1f6Smrg
67106f03b1f6SmrgAC_SUBST([APP_MAN_SUFFIX])
67116f03b1f6SmrgAC_SUBST([LIB_MAN_SUFFIX])
67126f03b1f6SmrgAC_SUBST([FILE_MAN_SUFFIX])
67136f03b1f6SmrgAC_SUBST([MISC_MAN_SUFFIX])
67146f03b1f6SmrgAC_SUBST([DRIVER_MAN_SUFFIX])
67156f03b1f6SmrgAC_SUBST([ADMIN_MAN_SUFFIX])
67166f03b1f6SmrgAC_SUBST([APP_MAN_DIR])
67176f03b1f6SmrgAC_SUBST([LIB_MAN_DIR])
67186f03b1f6SmrgAC_SUBST([FILE_MAN_DIR])
67196f03b1f6SmrgAC_SUBST([MISC_MAN_DIR])
67206f03b1f6SmrgAC_SUBST([DRIVER_MAN_DIR])
67216f03b1f6SmrgAC_SUBST([ADMIN_MAN_DIR])
67226f03b1f6Smrg]) # XORG_MANPAGE_SECTIONS
67236f03b1f6Smrg
67246f03b1f6Smrg# XORG_CHECK_LINUXDOC
67256f03b1f6Smrg# -------------------
67266f03b1f6Smrg# Minimum version: 1.0.0
67276f03b1f6Smrg#
67286f03b1f6Smrg# Defines the variable MAKE_TEXT if the necessary tools and
67296f03b1f6Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
67306f03b1f6Smrg# Whether or not the necessary tools and files are found can be checked
67316f03b1f6Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
67326f03b1f6SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
67336f03b1f6SmrgXORG_SGML_PATH=$prefix/share/sgml
67346f03b1f6SmrgHAVE_DEFS_ENT=
67356f03b1f6Smrg
67366f03b1f6SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
67376f03b1f6Smrg
67386f03b1f6SmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
67396f03b1f6SmrgAC_PATH_PROG(PS2PDF, ps2pdf)
67406f03b1f6Smrg
67416f03b1f6SmrgAC_MSG_CHECKING([Whether to build documentation])
67426f03b1f6Smrg
67436f03b1f6Smrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
67446f03b1f6Smrg   BUILDDOC=yes
67456f03b1f6Smrgelse
67466f03b1f6Smrg   BUILDDOC=no
67476f03b1f6Smrgfi
67486f03b1f6Smrg
67496f03b1f6SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
67506f03b1f6Smrg
67516f03b1f6SmrgAC_MSG_RESULT([$BUILDDOC])
67526f03b1f6Smrg
67536f03b1f6SmrgAC_MSG_CHECKING([Whether to build pdf documentation])
67546f03b1f6Smrg
67556f03b1f6Smrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
67566f03b1f6Smrg   BUILDPDFDOC=yes
67576f03b1f6Smrgelse
67586f03b1f6Smrg   BUILDPDFDOC=no
67596f03b1f6Smrgfi
67606f03b1f6Smrg
67616f03b1f6SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
67626f03b1f6Smrg
67636f03b1f6SmrgAC_MSG_RESULT([$BUILDPDFDOC])
67646f03b1f6Smrg
67656f03b1f6SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
67666f03b1f6SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
67676f03b1f6SmrgMAKE_PDF="$PS2PDF"
67686f03b1f6SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
67696f03b1f6Smrg
67706f03b1f6SmrgAC_SUBST(MAKE_TEXT)
67716f03b1f6SmrgAC_SUBST(MAKE_PS)
67726f03b1f6SmrgAC_SUBST(MAKE_PDF)
67736f03b1f6SmrgAC_SUBST(MAKE_HTML)
67746f03b1f6Smrg]) # XORG_CHECK_LINUXDOC
67756f03b1f6Smrg
67766f03b1f6Smrg# XORG_CHECK_DOCBOOK
67776f03b1f6Smrg# -------------------
67786f03b1f6Smrg# Minimum version: 1.0.0
67796f03b1f6Smrg#
67806f03b1f6Smrg# Checks for the ability to build output formats from SGML DocBook source.
67816f03b1f6Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
67826f03b1f6Smrg# indicates whether the necessary tools and files are found and, if set,
67836f03b1f6Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx.
67846f03b1f6SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[
67856f03b1f6SmrgXORG_SGML_PATH=$prefix/share/sgml
67866f03b1f6SmrgHAVE_DEFS_ENT=
67876f03b1f6SmrgBUILDTXTDOC=no
67886f03b1f6SmrgBUILDPDFDOC=no
67896f03b1f6SmrgBUILDPSDOC=no
67906f03b1f6SmrgBUILDHTMLDOC=no
67916f03b1f6Smrg
67926f03b1f6SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
67936f03b1f6Smrg
67946f03b1f6SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps)
67956f03b1f6SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
67966f03b1f6SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html)
67976f03b1f6SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt)
67986f03b1f6Smrg
67996f03b1f6SmrgAC_MSG_CHECKING([Whether to build text documentation])
68006f03b1f6Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
68016f03b1f6Smrg   test x$BUILD_TXTDOC != xno; then
68026f03b1f6Smrg	BUILDTXTDOC=yes
68036f03b1f6Smrgfi
68046f03b1f6SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
68056f03b1f6SmrgAC_MSG_RESULT([$BUILDTXTDOC])
68066f03b1f6Smrg
68076f03b1f6SmrgAC_MSG_CHECKING([Whether to build PDF documentation])
68086f03b1f6Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
68096f03b1f6Smrg   test x$BUILD_PDFDOC != xno; then
68106f03b1f6Smrg	BUILDPDFDOC=yes
68116f03b1f6Smrgfi
68126f03b1f6SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
68136f03b1f6SmrgAC_MSG_RESULT([$BUILDPDFDOC])
68146f03b1f6Smrg
68156f03b1f6SmrgAC_MSG_CHECKING([Whether to build PostScript documentation])
68166f03b1f6Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
68176f03b1f6Smrg   test x$BUILD_PSDOC != xno; then
68186f03b1f6Smrg	BUILDPSDOC=yes
68196f03b1f6Smrgfi
68206f03b1f6SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
68216f03b1f6SmrgAC_MSG_RESULT([$BUILDPSDOC])
68226f03b1f6Smrg
68236f03b1f6SmrgAC_MSG_CHECKING([Whether to build HTML documentation])
68246f03b1f6Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
68256f03b1f6Smrg   test x$BUILD_HTMLDOC != xno; then
68266f03b1f6Smrg	BUILDHTMLDOC=yes
68276f03b1f6Smrgfi
68286f03b1f6SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
68296f03b1f6SmrgAC_MSG_RESULT([$BUILDHTMLDOC])
68306f03b1f6Smrg
68316f03b1f6SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
68326f03b1f6SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
68336f03b1f6SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
68346f03b1f6SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
68356f03b1f6Smrg
68366f03b1f6SmrgAC_SUBST(MAKE_TEXT)
68376f03b1f6SmrgAC_SUBST(MAKE_PS)
68386f03b1f6SmrgAC_SUBST(MAKE_PDF)
68396f03b1f6SmrgAC_SUBST(MAKE_HTML)
68406f03b1f6Smrg]) # XORG_CHECK_DOCBOOK
68416f03b1f6Smrg
68426f03b1f6Smrg# XORG_CHECK_MALLOC_ZERO
68436f03b1f6Smrg# ----------------------
68446f03b1f6Smrg# Minimum version: 1.0.0
68456f03b1f6Smrg#
68466f03b1f6Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
68476f03b1f6Smrg# malloc(0) returns NULL.  Packages should add one of these cflags to
68486f03b1f6Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
68496f03b1f6SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
68506f03b1f6SmrgAC_ARG_ENABLE(malloc0returnsnull,
68516f03b1f6Smrg	AC_HELP_STRING([--enable-malloc0returnsnull],
68526f03b1f6Smrg		       [malloc(0) returns NULL (default: auto)]),
68536f03b1f6Smrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
68546f03b1f6Smrg	[MALLOC_ZERO_RETURNS_NULL=auto])
68556f03b1f6Smrg
68566f03b1f6SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
68576f03b1f6Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
68586f03b1f6Smrg	AC_RUN_IFELSE([
68596f03b1f6Smrgchar *malloc();
68606f03b1f6Smrgchar *realloc();
68616f03b1f6Smrgchar *calloc();
68626f03b1f6Smrgmain() {
68636f03b1f6Smrg    char *m0, *r0, *c0, *p;
68646f03b1f6Smrg    m0 = malloc(0);
68656f03b1f6Smrg    p = malloc(10);
68666f03b1f6Smrg    r0 = realloc(p,0);
68676f03b1f6Smrg    c0 = calloc(0);
68686f03b1f6Smrg    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
68696f03b1f6Smrg}],
68706f03b1f6Smrg		[MALLOC_ZERO_RETURNS_NULL=yes],
68716f03b1f6Smrg		[MALLOC_ZERO_RETURNS_NULL=no])
68726f03b1f6Smrgfi
68736f03b1f6SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
68746f03b1f6Smrg
68756f03b1f6Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
68766f03b1f6Smrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
68776f03b1f6Smrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
68786f03b1f6Smrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
68796f03b1f6Smrgelse
68806f03b1f6Smrg	MALLOC_ZERO_CFLAGS=""
68816f03b1f6Smrg	XMALLOC_ZERO_CFLAGS=""
68826f03b1f6Smrg	XTMALLOC_ZERO_CFLAGS=""
68836f03b1f6Smrgfi
68846f03b1f6Smrg
68856f03b1f6SmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
68866f03b1f6SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
68876f03b1f6SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
68886f03b1f6Smrg]) # XORG_CHECK_MALLOC_ZERO
68896f03b1f6Smrg
68906f03b1f6Smrg# XORG_WITH_LINT()
68916f03b1f6Smrg# ----------------
68926f03b1f6Smrg# Minimum version: 1.1.0
68936f03b1f6Smrg#
68946f03b1f6Smrg# Sets up flags for source checkers such as lint and sparse if --with-lint
68956f03b1f6Smrg# is specified.   (Use --with-lint=sparse for sparse.)
68966f03b1f6Smrg# Sets $LINT to name of source checker passed with --with-lint (default: lint)
68976f03b1f6Smrg# Sets $LINT_FLAGS to flags to pass to source checker
68986f03b1f6Smrg# Sets LINT automake conditional if enabled (default: disabled)
68996f03b1f6Smrg#
69006f03b1f6SmrgAC_DEFUN([XORG_WITH_LINT],[
69016f03b1f6Smrg
69026f03b1f6Smrg# Allow checking code with lint, sparse, etc.
69036f03b1f6SmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint],
69046f03b1f6Smrg		[Use a lint-style source code checker (default: disabled)])],
69056f03b1f6Smrg		[use_lint=$withval], [use_lint=no])
69066f03b1f6Smrgif test "x$use_lint" = "xyes" ; then
69076f03b1f6Smrg	LINT="lint"
69086f03b1f6Smrgelse
69096f03b1f6Smrg	LINT="$use_lint"
69106f03b1f6Smrgfi
69116f03b1f6Smrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
69126f03b1f6Smrg    case $LINT in
69136f03b1f6Smrg	lint|*/lint)
69146f03b1f6Smrg	    case $host_os in
69156f03b1f6Smrg		solaris*)
69166f03b1f6Smrg			LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
69176f03b1f6Smrg			;;
69186f03b1f6Smrg	    esac
69196f03b1f6Smrg	    ;;
69206f03b1f6Smrg    esac
69216f03b1f6Smrgfi
69226f03b1f6Smrg
69236f03b1f6SmrgAC_SUBST(LINT)
69246f03b1f6SmrgAC_SUBST(LINT_FLAGS)
69256f03b1f6SmrgAM_CONDITIONAL(LINT, [test x$LINT != xno])
69266f03b1f6Smrg
69276f03b1f6Smrg]) # XORG_WITH_LINT
69286f03b1f6Smrg
69296f03b1f6Smrg# XORG_LINT_LIBRARY(LIBNAME)
69306f03b1f6Smrg# --------------------------
69316f03b1f6Smrg# Minimum version: 1.1.0
69326f03b1f6Smrg#
69336f03b1f6Smrg# Sets up flags for building lint libraries for checking programs that call
69346f03b1f6Smrg# functions in the library.
69356f03b1f6Smrg# Disabled by default, enable with --enable-lint-library
69366f03b1f6Smrg# Sets: 
69376f03b1f6Smrg#	@LINTLIB@		- name of lint library file to make
69386f03b1f6Smrg#	MAKE_LINT_LIB		- automake conditional
69396f03b1f6Smrg#
69406f03b1f6Smrg
69416f03b1f6SmrgAC_DEFUN([XORG_LINT_LIBRARY],[
69426f03b1f6SmrgAC_REQUIRE([XORG_WITH_LINT])
69436f03b1f6Smrg# Build lint "library" for more indepth checks of programs calling this library
69446f03b1f6SmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library],
69456f03b1f6Smrg	[Create lint library (default: disabled)])],
69466f03b1f6Smrg	[make_lint_lib=$enableval], [make_lint_lib=no])
69476f03b1f6Smrgif test "x$make_lint_lib" != "xno" ; then
69486f03b1f6Smrg	if test "x$LINT" = "xno" ; then
69496f03b1f6Smrg		AC_MSG_ERROR([Cannot make lint library without --with-lint])
69506f03b1f6Smrg	fi
69516f03b1f6Smrg	if test "x$make_lint_lib" = "xyes" ; then
69526f03b1f6Smrg		LINTLIB=llib-l$1.ln
69536f03b1f6Smrg	else
69546f03b1f6Smrg		LINTLIB=$make_lint_lib
69556f03b1f6Smrg	fi
69566f03b1f6Smrgfi
69576f03b1f6SmrgAC_SUBST(LINTLIB)
69586f03b1f6SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
69596f03b1f6Smrg
69606f03b1f6Smrg]) # XORG_LINT_LIBRARY
69616f03b1f6Smrg
69626f03b1f6Smrgdnl Copyright 2005 Red Hat, Inc
69636f03b1f6Smrgdnl
69646f03b1f6Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
69656f03b1f6Smrgdnl documentation for any purpose is hereby granted without fee, provided that
69666f03b1f6Smrgdnl the above copyright notice appear in all copies and that both that
69676f03b1f6Smrgdnl copyright notice and this permission notice appear in supporting
69686f03b1f6Smrgdnl documentation.
69696f03b1f6Smrgdnl
69706f03b1f6Smrgdnl The above copyright notice and this permission notice shall be included
69716f03b1f6Smrgdnl in all copies or substantial portions of the Software.
69726f03b1f6Smrgdnl
69736f03b1f6Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
69746f03b1f6Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
69756f03b1f6Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
69766f03b1f6Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
69776f03b1f6Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
69786f03b1f6Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
69796f03b1f6Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
69806f03b1f6Smrgdnl
69816f03b1f6Smrgdnl Except as contained in this notice, the name of the copyright holders shall
69826f03b1f6Smrgdnl not be used in advertising or otherwise to promote the sale, use or
69836f03b1f6Smrgdnl other dealings in this Software without prior written authorization
69846f03b1f6Smrgdnl from the copyright holders.
69856f03b1f6Smrgdnl
69866f03b1f6Smrg
69876f03b1f6Smrg# XORG_RELEASE_VERSION
69886f03b1f6Smrg# --------------------
69896f03b1f6Smrg# Adds --with/without-release-string and changes the PACKAGE and
69906f03b1f6Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
69916f03b1f6Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
69926f03b1f6Smrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
69936f03b1f6Smrg 
69946f03b1f6SmrgAC_DEFUN([XORG_RELEASE_VERSION],[
69956f03b1f6Smrg	AC_ARG_WITH(release-version,
69966f03b1f6Smrg			AC_HELP_STRING([--with-release-version=STRING],
69976f03b1f6Smrg				[Use release version string in package name]),
69986f03b1f6Smrg			[RELEASE_VERSION="$withval"],
69996f03b1f6Smrg			[RELEASE_VERSION=""])
70006f03b1f6Smrg	if test "x$RELEASE_VERSION" != "x"; then
70016f03b1f6Smrg		PACKAGE="$PACKAGE-$RELEASE_VERSION"
70026f03b1f6Smrg		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
70036f03b1f6Smrg		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
70046f03b1f6Smrg	fi
70056f03b1f6Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
70066f03b1f6Smrg		[`echo $PACKAGE_VERSION | sed -ne 's/^\([[^\.]]\+\).*/\1/p'`],
70076f03b1f6Smrg		[Major version of this package])
70086f03b1f6Smrg	PVM=`echo $PACKAGE_VERSION | sed -ne 's/^\([[^\.]]\+\)\.\([[^\.]]\+\).*/\2/p'`
70096f03b1f6Smrg	if test "x$PVM" = "x"; then
70106f03b1f6Smrg		PVM="0"
70116f03b1f6Smrg	fi
70126f03b1f6Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
70136f03b1f6Smrg		[$PVM],
70146f03b1f6Smrg		[Minor version of this package])
70156f03b1f6Smrg	PVP=`echo $PACKAGE_VERSION | sed -ne 's/^\([[^\.]]\+\)\.\([[^\.]]\+\)\.\([[^\.]]\+\).*/\3/p'`
70166f03b1f6Smrg	if test "x$PVP" = "x"; then
70176f03b1f6Smrg		PVP="0"
70186f03b1f6Smrg	fi
70196f03b1f6Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
70206f03b1f6Smrg		[$PVP],
70216f03b1f6Smrg		[Patch version of this package])
70226f03b1f6Smrg])
70236f03b1f6Smrg
70246f03b1f6Smrg# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
70256f03b1f6Smrg#
70266f03b1f6Smrg# This file is free software; the Free Software Foundation
70276f03b1f6Smrg# gives unlimited permission to copy and/or distribute it,
70286f03b1f6Smrg# with or without modifications, as long as this notice is preserved.
70296f03b1f6Smrg
70306f03b1f6Smrg# AM_AUTOMAKE_VERSION(VERSION)
70316f03b1f6Smrg# ----------------------------
70326f03b1f6Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
70336f03b1f6Smrg# generated from the m4 files accompanying Automake X.Y.
70346f03b1f6SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
70356f03b1f6Smrg
70366f03b1f6Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION
70376f03b1f6Smrg# -------------------------------
70386f03b1f6Smrg# Call AM_AUTOMAKE_VERSION so it can be traced.
70396f03b1f6Smrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
70406f03b1f6SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
70416f03b1f6Smrg	 [AM_AUTOMAKE_VERSION([1.9.6])])
70426f03b1f6Smrg
70436f03b1f6Smrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
70446f03b1f6Smrg
70456f03b1f6Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
70466f03b1f6Smrg#
70476f03b1f6Smrg# This file is free software; the Free Software Foundation
70486f03b1f6Smrg# gives unlimited permission to copy and/or distribute it,
70496f03b1f6Smrg# with or without modifications, as long as this notice is preserved.
70506f03b1f6Smrg
70516f03b1f6Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
70526f03b1f6Smrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
70536f03b1f6Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
70546f03b1f6Smrg#
70556f03b1f6Smrg# Of course, Automake must honor this variable whenever it calls a
70566f03b1f6Smrg# tool from the auxiliary directory.  The problem is that $srcdir (and
70576f03b1f6Smrg# therefore $ac_aux_dir as well) can be either absolute or relative,
70586f03b1f6Smrg# depending on how configure is run.  This is pretty annoying, since
70596f03b1f6Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
70606f03b1f6Smrg# source directory, any form will work fine, but in subdirectories a
70616f03b1f6Smrg# relative path needs to be adjusted first.
70626f03b1f6Smrg#
70636f03b1f6Smrg# $ac_aux_dir/missing
70646f03b1f6Smrg#    fails when called from a subdirectory if $ac_aux_dir is relative
70656f03b1f6Smrg# $top_srcdir/$ac_aux_dir/missing
70666f03b1f6Smrg#    fails if $ac_aux_dir is absolute,
70676f03b1f6Smrg#    fails when called from a subdirectory in a VPATH build with
70686f03b1f6Smrg#          a relative $ac_aux_dir
70696f03b1f6Smrg#
70706f03b1f6Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
70716f03b1f6Smrg# are both prefixed by $srcdir.  In an in-source build this is usually
70726f03b1f6Smrg# harmless because $srcdir is `.', but things will broke when you
70736f03b1f6Smrg# start a VPATH build or use an absolute $srcdir.
70746f03b1f6Smrg#
70756f03b1f6Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
70766f03b1f6Smrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
70776f03b1f6Smrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
70786f03b1f6Smrg# and then we would define $MISSING as
70796f03b1f6Smrg#   MISSING="\${SHELL} $am_aux_dir/missing"
70806f03b1f6Smrg# This will work as long as MISSING is not called from configure, because
70816f03b1f6Smrg# unfortunately $(top_srcdir) has no meaning in configure.
70826f03b1f6Smrg# However there are other variables, like CC, which are often used in
70836f03b1f6Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
70846f03b1f6Smrg#
70856f03b1f6Smrg# Another solution, used here, is to always expand $ac_aux_dir to an
70866f03b1f6Smrg# absolute PATH.  The drawback is that using absolute paths prevent a
70876f03b1f6Smrg# configured tree to be moved without reconfiguration.
70886f03b1f6Smrg
70896f03b1f6SmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
70906f03b1f6Smrg[dnl Rely on autoconf to set up CDPATH properly.
70916f03b1f6SmrgAC_PREREQ([2.50])dnl
70926f03b1f6Smrg# expand $ac_aux_dir to an absolute path
70936f03b1f6Smrgam_aux_dir=`cd $ac_aux_dir && pwd`
70946f03b1f6Smrg])
70956f03b1f6Smrg
70966f03b1f6Smrg# AM_CONDITIONAL                                            -*- Autoconf -*-
70976f03b1f6Smrg
70986f03b1f6Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
70996f03b1f6Smrg# Free Software Foundation, Inc.
71006f03b1f6Smrg#
71016f03b1f6Smrg# This file is free software; the Free Software Foundation
71026f03b1f6Smrg# gives unlimited permission to copy and/or distribute it,
71036f03b1f6Smrg# with or without modifications, as long as this notice is preserved.
71046f03b1f6Smrg
71056f03b1f6Smrg# serial 7
71066f03b1f6Smrg
71076f03b1f6Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
71086f03b1f6Smrg# -------------------------------------
71096f03b1f6Smrg# Define a conditional.
71106f03b1f6SmrgAC_DEFUN([AM_CONDITIONAL],
71116f03b1f6Smrg[AC_PREREQ(2.52)dnl
71126f03b1f6Smrg ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
71136f03b1f6Smrg	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
71146f03b1f6SmrgAC_SUBST([$1_TRUE])
71156f03b1f6SmrgAC_SUBST([$1_FALSE])
71166f03b1f6Smrgif $2; then
71176f03b1f6Smrg  $1_TRUE=
71186f03b1f6Smrg  $1_FALSE='#'
71196f03b1f6Smrgelse
71206f03b1f6Smrg  $1_TRUE='#'
71216f03b1f6Smrg  $1_FALSE=
71226f03b1f6Smrgfi
71236f03b1f6SmrgAC_CONFIG_COMMANDS_PRE(
71246f03b1f6Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
71256f03b1f6Smrg  AC_MSG_ERROR([[conditional "$1" was never defined.
71266f03b1f6SmrgUsually this means the macro was only invoked conditionally.]])
71276f03b1f6Smrgfi])])
71286f03b1f6Smrg
71296f03b1f6Smrg
71306f03b1f6Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
71316f03b1f6Smrg# Free Software Foundation, Inc.
71326f03b1f6Smrg#
71336f03b1f6Smrg# This file is free software; the Free Software Foundation
71346f03b1f6Smrg# gives unlimited permission to copy and/or distribute it,
71356f03b1f6Smrg# with or without modifications, as long as this notice is preserved.
71366f03b1f6Smrg
71376f03b1f6Smrg# serial 8
71386f03b1f6Smrg
71396f03b1f6Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
71406f03b1f6Smrg# written in clear, in which case automake, when reading aclocal.m4,
71416f03b1f6Smrg# will think it sees a *use*, and therefore will trigger all it's
71426f03b1f6Smrg# C support machinery.  Also note that it means that autoscan, seeing
71436f03b1f6Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
71446f03b1f6Smrg
71456f03b1f6Smrg
71466f03b1f6Smrg# _AM_DEPENDENCIES(NAME)
71476f03b1f6Smrg# ----------------------
71486f03b1f6Smrg# See how the compiler implements dependency checking.
71496f03b1f6Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
71506f03b1f6Smrg# We try a few techniques and use that to set a single cache variable.
71516f03b1f6Smrg#
71526f03b1f6Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
71536f03b1f6Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
71546f03b1f6Smrg# dependency, and given that the user is not expected to run this macro,
71556f03b1f6Smrg# just rely on AC_PROG_CC.
71566f03b1f6SmrgAC_DEFUN([_AM_DEPENDENCIES],
71576f03b1f6Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
71586f03b1f6SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
71596f03b1f6SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
71606f03b1f6SmrgAC_REQUIRE([AM_DEP_TRACK])dnl
71616f03b1f6Smrg
71626f03b1f6Smrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
71636f03b1f6Smrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
71646f03b1f6Smrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
71656f03b1f6Smrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
71666f03b1f6Smrg                   [depcc="$$1"   am_compiler_list=])
71676f03b1f6Smrg
71686f03b1f6SmrgAC_CACHE_CHECK([dependency style of $depcc],
71696f03b1f6Smrg               [am_cv_$1_dependencies_compiler_type],
71706f03b1f6Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
71716f03b1f6Smrg  # We make a subdir and do the tests there.  Otherwise we can end up
71726f03b1f6Smrg  # making bogus files that we don't know about and never remove.  For
71736f03b1f6Smrg  # instance it was reported that on HP-UX the gcc test will end up
71746f03b1f6Smrg  # making a dummy file named `D' -- because `-MD' means `put the output
71756f03b1f6Smrg  # in D'.
71766f03b1f6Smrg  mkdir conftest.dir
71776f03b1f6Smrg  # Copy depcomp to subdir because otherwise we won't find it if we're
71786f03b1f6Smrg  # using a relative directory.
71796f03b1f6Smrg  cp "$am_depcomp" conftest.dir
71806f03b1f6Smrg  cd conftest.dir
71816f03b1f6Smrg  # We will build objects and dependencies in a subdirectory because
71826f03b1f6Smrg  # it helps to detect inapplicable dependency modes.  For instance
71836f03b1f6Smrg  # both Tru64's cc and ICC support -MD to output dependencies as a
71846f03b1f6Smrg  # side effect of compilation, but ICC will put the dependencies in
71856f03b1f6Smrg  # the current directory while Tru64 will put them in the object
71866f03b1f6Smrg  # directory.
71876f03b1f6Smrg  mkdir sub
71886f03b1f6Smrg
71896f03b1f6Smrg  am_cv_$1_dependencies_compiler_type=none
71906f03b1f6Smrg  if test "$am_compiler_list" = ""; then
71916f03b1f6Smrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
71926f03b1f6Smrg  fi
71936f03b1f6Smrg  for depmode in $am_compiler_list; do
71946f03b1f6Smrg    # Setup a source with many dependencies, because some compilers
71956f03b1f6Smrg    # like to wrap large dependency lists on column 80 (with \), and
71966f03b1f6Smrg    # we should not choose a depcomp mode which is confused by this.
71976f03b1f6Smrg    #
71986f03b1f6Smrg    # We need to recreate these files for each test, as the compiler may
71996f03b1f6Smrg    # overwrite some of them when testing with obscure command lines.
72006f03b1f6Smrg    # This happens at least with the AIX C compiler.
72016f03b1f6Smrg    : > sub/conftest.c
72026f03b1f6Smrg    for i in 1 2 3 4 5 6; do
72036f03b1f6Smrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
72046f03b1f6Smrg      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
72056f03b1f6Smrg      # Solaris 8's {/usr,}/bin/sh.
72066f03b1f6Smrg      touch sub/conftst$i.h
72076f03b1f6Smrg    done
72086f03b1f6Smrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
72096f03b1f6Smrg
72106f03b1f6Smrg    case $depmode in
72116f03b1f6Smrg    nosideeffect)
72126f03b1f6Smrg      # after this tag, mechanisms are not by side-effect, so they'll
72136f03b1f6Smrg      # only be used when explicitly requested
72146f03b1f6Smrg      if test "x$enable_dependency_tracking" = xyes; then
72156f03b1f6Smrg	continue
72166f03b1f6Smrg      else
72176f03b1f6Smrg	break
72186f03b1f6Smrg      fi
72196f03b1f6Smrg      ;;
72206f03b1f6Smrg    none) break ;;
72216f03b1f6Smrg    esac
72226f03b1f6Smrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
72236f03b1f6Smrg    # mode.  It turns out that the SunPro C++ compiler does not properly
72246f03b1f6Smrg    # handle `-M -o', and we need to detect this.
72256f03b1f6Smrg    if depmode=$depmode \
72266f03b1f6Smrg       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
72276f03b1f6Smrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
72286f03b1f6Smrg       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
72296f03b1f6Smrg         >/dev/null 2>conftest.err &&
72306f03b1f6Smrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
72316f03b1f6Smrg       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
72326f03b1f6Smrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
72336f03b1f6Smrg      # icc doesn't choke on unknown options, it will just issue warnings
72346f03b1f6Smrg      # or remarks (even with -Werror).  So we grep stderr for any message
72356f03b1f6Smrg      # that says an option was ignored or not supported.
72366f03b1f6Smrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
72376f03b1f6Smrg      #   icc: Command line warning: ignoring option '-M'; no argument required
72386f03b1f6Smrg      # The diagnosis changed in icc 8.0:
72396f03b1f6Smrg      #   icc: Command line remark: option '-MP' not supported
72406f03b1f6Smrg      if (grep 'ignoring option' conftest.err ||
72416f03b1f6Smrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
72426f03b1f6Smrg        am_cv_$1_dependencies_compiler_type=$depmode
72436f03b1f6Smrg        break
72446f03b1f6Smrg      fi
72456f03b1f6Smrg    fi
72466f03b1f6Smrg  done
72476f03b1f6Smrg
72486f03b1f6Smrg  cd ..
72496f03b1f6Smrg  rm -rf conftest.dir
72506f03b1f6Smrgelse
72516f03b1f6Smrg  am_cv_$1_dependencies_compiler_type=none
72526f03b1f6Smrgfi
72536f03b1f6Smrg])
72546f03b1f6SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
72556f03b1f6SmrgAM_CONDITIONAL([am__fastdep$1], [
72566f03b1f6Smrg  test "x$enable_dependency_tracking" != xno \
72576f03b1f6Smrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
72586f03b1f6Smrg])
72596f03b1f6Smrg
72606f03b1f6Smrg
72616f03b1f6Smrg# AM_SET_DEPDIR
72626f03b1f6Smrg# -------------
72636f03b1f6Smrg# Choose a directory name for dependency files.
72646f03b1f6Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
72656f03b1f6SmrgAC_DEFUN([AM_SET_DEPDIR],
72666f03b1f6Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
72676f03b1f6SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
72686f03b1f6Smrg])
72696f03b1f6Smrg
72706f03b1f6Smrg
72716f03b1f6Smrg# AM_DEP_TRACK
72726f03b1f6Smrg# ------------
72736f03b1f6SmrgAC_DEFUN([AM_DEP_TRACK],
72746f03b1f6Smrg[AC_ARG_ENABLE(dependency-tracking,
72756f03b1f6Smrg[  --disable-dependency-tracking  speeds up one-time build
72766f03b1f6Smrg  --enable-dependency-tracking   do not reject slow dependency extractors])
72776f03b1f6Smrgif test "x$enable_dependency_tracking" != xno; then
72786f03b1f6Smrg  am_depcomp="$ac_aux_dir/depcomp"
72796f03b1f6Smrg  AMDEPBACKSLASH='\'
72806f03b1f6Smrgfi
72816f03b1f6SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
72826f03b1f6SmrgAC_SUBST([AMDEPBACKSLASH])
72836f03b1f6Smrg])
72846f03b1f6Smrg
72856f03b1f6Smrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
72866f03b1f6Smrg
72876f03b1f6Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
72886f03b1f6Smrg# Free Software Foundation, Inc.
72896f03b1f6Smrg#
72906f03b1f6Smrg# This file is free software; the Free Software Foundation
72916f03b1f6Smrg# gives unlimited permission to copy and/or distribute it,
72926f03b1f6Smrg# with or without modifications, as long as this notice is preserved.
72936f03b1f6Smrg
72946f03b1f6Smrg#serial 3
72956f03b1f6Smrg
72966f03b1f6Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
72976f03b1f6Smrg# ------------------------------
72986f03b1f6SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
72996f03b1f6Smrg[for mf in $CONFIG_FILES; do
73006f03b1f6Smrg  # Strip MF so we end up with the name of the file.
73016f03b1f6Smrg  mf=`echo "$mf" | sed -e 's/:.*$//'`
73026f03b1f6Smrg  # Check whether this is an Automake generated Makefile or not.
73036f03b1f6Smrg  # We used to match only the files named `Makefile.in', but
73046f03b1f6Smrg  # some people rename them; so instead we look at the file content.
73056f03b1f6Smrg  # Grep'ing the first line is not enough: some people post-process
73066f03b1f6Smrg  # each Makefile.in and add a new line on top of each file to say so.
73076f03b1f6Smrg  # So let's grep whole file.
73086f03b1f6Smrg  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
73096f03b1f6Smrg    dirpart=`AS_DIRNAME("$mf")`
73106f03b1f6Smrg  else
73116f03b1f6Smrg    continue
73126f03b1f6Smrg  fi
73136f03b1f6Smrg  # Extract the definition of DEPDIR, am__include, and am__quote
73146f03b1f6Smrg  # from the Makefile without running `make'.
73156f03b1f6Smrg  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
73166f03b1f6Smrg  test -z "$DEPDIR" && continue
73176f03b1f6Smrg  am__include=`sed -n 's/^am__include = //p' < "$mf"`
73186f03b1f6Smrg  test -z "am__include" && continue
73196f03b1f6Smrg  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
73206f03b1f6Smrg  # When using ansi2knr, U may be empty or an underscore; expand it
73216f03b1f6Smrg  U=`sed -n 's/^U = //p' < "$mf"`
73226f03b1f6Smrg  # Find all dependency output files, they are included files with
73236f03b1f6Smrg  # $(DEPDIR) in their names.  We invoke sed twice because it is the
73246f03b1f6Smrg  # simplest approach to changing $(DEPDIR) to its actual value in the
73256f03b1f6Smrg  # expansion.
73266f03b1f6Smrg  for file in `sed -n "
73276f03b1f6Smrg    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
73286f03b1f6Smrg       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
73296f03b1f6Smrg    # Make sure the directory exists.
73306f03b1f6Smrg    test -f "$dirpart/$file" && continue
73316f03b1f6Smrg    fdir=`AS_DIRNAME(["$file"])`
73326f03b1f6Smrg    AS_MKDIR_P([$dirpart/$fdir])
73336f03b1f6Smrg    # echo "creating $dirpart/$file"
73346f03b1f6Smrg    echo '# dummy' > "$dirpart/$file"
73356f03b1f6Smrg  done
73366f03b1f6Smrgdone
73376f03b1f6Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
73386f03b1f6Smrg
73396f03b1f6Smrg
73406f03b1f6Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS
73416f03b1f6Smrg# -----------------------------
73426f03b1f6Smrg# This macro should only be invoked once -- use via AC_REQUIRE.
73436f03b1f6Smrg#
73446f03b1f6Smrg# This code is only required when automatic dependency tracking
73456f03b1f6Smrg# is enabled.  FIXME.  This creates each `.P' file that we will
73466f03b1f6Smrg# need in order to bootstrap the dependency handling code.
73476f03b1f6SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
73486f03b1f6Smrg[AC_CONFIG_COMMANDS([depfiles],
73496f03b1f6Smrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
73506f03b1f6Smrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
73516f03b1f6Smrg])
73526f03b1f6Smrg
73536f03b1f6Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
73546f03b1f6Smrg# Free Software Foundation, Inc.
73556f03b1f6Smrg#
73566f03b1f6Smrg# This file is free software; the Free Software Foundation
73576f03b1f6Smrg# gives unlimited permission to copy and/or distribute it,
73586f03b1f6Smrg# with or without modifications, as long as this notice is preserved.
73596f03b1f6Smrg
73606f03b1f6Smrg# serial 8
73616f03b1f6Smrg
73626f03b1f6Smrg# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
73636f03b1f6SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
73646f03b1f6Smrg
73656f03b1f6Smrg# Do all the work for Automake.                             -*- Autoconf -*-
73666f03b1f6Smrg
73676f03b1f6Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
73686f03b1f6Smrg# Free Software Foundation, Inc.
73696f03b1f6Smrg#
73706f03b1f6Smrg# This file is free software; the Free Software Foundation
73716f03b1f6Smrg# gives unlimited permission to copy and/or distribute it,
73726f03b1f6Smrg# with or without modifications, as long as this notice is preserved.
73736f03b1f6Smrg
73746f03b1f6Smrg# serial 12
73756f03b1f6Smrg
73766f03b1f6Smrg# This macro actually does too much.  Some checks are only needed if
73776f03b1f6Smrg# your package does certain things.  But this isn't really a big deal.
73786f03b1f6Smrg
73796f03b1f6Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
73806f03b1f6Smrg# AM_INIT_AUTOMAKE([OPTIONS])
73816f03b1f6Smrg# -----------------------------------------------
73826f03b1f6Smrg# The call with PACKAGE and VERSION arguments is the old style
73836f03b1f6Smrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
73846f03b1f6Smrg# and VERSION should now be passed to AC_INIT and removed from
73856f03b1f6Smrg# the call to AM_INIT_AUTOMAKE.
73866f03b1f6Smrg# We support both call styles for the transition.  After
73876f03b1f6Smrg# the next Automake release, Autoconf can make the AC_INIT
73886f03b1f6Smrg# arguments mandatory, and then we can depend on a new Autoconf
73896f03b1f6Smrg# release and drop the old call support.
73906f03b1f6SmrgAC_DEFUN([AM_INIT_AUTOMAKE],
73916f03b1f6Smrg[AC_PREREQ([2.58])dnl
73926f03b1f6Smrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
73936f03b1f6Smrgdnl the ones we care about.
73946f03b1f6Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
73956f03b1f6SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
73966f03b1f6SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
73976f03b1f6Smrg# test to see if srcdir already configured
73986f03b1f6Smrgif test "`cd $srcdir && pwd`" != "`pwd`" &&
73996f03b1f6Smrg   test -f $srcdir/config.status; then
74006f03b1f6Smrg  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
74016f03b1f6Smrgfi
74026f03b1f6Smrg
74036f03b1f6Smrg# test whether we have cygpath
74046f03b1f6Smrgif test -z "$CYGPATH_W"; then
74056f03b1f6Smrg  if (cygpath --version) >/dev/null 2>/dev/null; then
74066f03b1f6Smrg    CYGPATH_W='cygpath -w'
74076f03b1f6Smrg  else
74086f03b1f6Smrg    CYGPATH_W=echo
74096f03b1f6Smrg  fi
74106f03b1f6Smrgfi
74116f03b1f6SmrgAC_SUBST([CYGPATH_W])
74126f03b1f6Smrg
74136f03b1f6Smrg# Define the identity of the package.
74146f03b1f6Smrgdnl Distinguish between old-style and new-style calls.
74156f03b1f6Smrgm4_ifval([$2],
74166f03b1f6Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
74176f03b1f6Smrg AC_SUBST([PACKAGE], [$1])dnl
74186f03b1f6Smrg AC_SUBST([VERSION], [$2])],
74196f03b1f6Smrg[_AM_SET_OPTIONS([$1])dnl
74206f03b1f6Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
74216f03b1f6Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
74226f03b1f6Smrg
74236f03b1f6Smrg_AM_IF_OPTION([no-define],,
74246f03b1f6Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
74256f03b1f6Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
74266f03b1f6Smrg
74276f03b1f6Smrg# Some tools Automake needs.
74286f03b1f6SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
74296f03b1f6SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
74306f03b1f6SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
74316f03b1f6SmrgAM_MISSING_PROG(AUTOCONF, autoconf)
74326f03b1f6SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
74336f03b1f6SmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
74346f03b1f6SmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
74356f03b1f6SmrgAM_PROG_INSTALL_SH
74366f03b1f6SmrgAM_PROG_INSTALL_STRIP
74376f03b1f6SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl
74386f03b1f6Smrg# We need awk for the "check" target.  The system "awk" is bad on
74396f03b1f6Smrg# some platforms.
74406f03b1f6SmrgAC_REQUIRE([AC_PROG_AWK])dnl
74416f03b1f6SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
74426f03b1f6SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
74436f03b1f6Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
74446f03b1f6Smrg              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
74456f03b1f6Smrg	      		     [_AM_PROG_TAR([v7])])])
74466f03b1f6Smrg_AM_IF_OPTION([no-dependencies],,
74476f03b1f6Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
74486f03b1f6Smrg                  [_AM_DEPENDENCIES(CC)],
74496f03b1f6Smrg                  [define([AC_PROG_CC],
74506f03b1f6Smrg                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
74516f03b1f6SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
74526f03b1f6Smrg                  [_AM_DEPENDENCIES(CXX)],
74536f03b1f6Smrg                  [define([AC_PROG_CXX],
74546f03b1f6Smrg                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
74556f03b1f6Smrg])
74566f03b1f6SmrgAC_REQUIRE([AM_PRETTY_CMDS])
74576f03b1f6Smrg])
74586f03b1f6Smrg
74596f03b1f6Smrg
74606f03b1f6Smrg# When config.status generates a header, we must update the stamp-h file.
74616f03b1f6Smrg# This file resides in the same directory as the config header
74626f03b1f6Smrg# that is generated.  The stamp files are numbered to have different names.
74636f03b1f6Smrg
74646f03b1f6Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
74656f03b1f6Smrg# loop where config.status creates the headers, so we can generate
74666f03b1f6Smrg# our stamp files there.
74676f03b1f6SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
74686f03b1f6Smrg[# Compute $1's index in $config_headers.
74696f03b1f6Smrg_am_stamp_count=1
74706f03b1f6Smrgfor _am_header in $config_headers :; do
74716f03b1f6Smrg  case $_am_header in
74726f03b1f6Smrg    $1 | $1:* )
74736f03b1f6Smrg      break ;;
74746f03b1f6Smrg    * )
74756f03b1f6Smrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
74766f03b1f6Smrg  esac
74776f03b1f6Smrgdone
74786f03b1f6Smrgecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
74796f03b1f6Smrg
74806f03b1f6Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
74816f03b1f6Smrg#
74826f03b1f6Smrg# This file is free software; the Free Software Foundation
74836f03b1f6Smrg# gives unlimited permission to copy and/or distribute it,
74846f03b1f6Smrg# with or without modifications, as long as this notice is preserved.
74856f03b1f6Smrg
74866f03b1f6Smrg# AM_PROG_INSTALL_SH
74876f03b1f6Smrg# ------------------
74886f03b1f6Smrg# Define $install_sh.
74896f03b1f6SmrgAC_DEFUN([AM_PROG_INSTALL_SH],
74906f03b1f6Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
74916f03b1f6Smrginstall_sh=${install_sh-"$am_aux_dir/install-sh"}
74926f03b1f6SmrgAC_SUBST(install_sh)])
74936f03b1f6Smrg
74946f03b1f6Smrg# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
74956f03b1f6Smrg#
74966f03b1f6Smrg# This file is free software; the Free Software Foundation
74976f03b1f6Smrg# gives unlimited permission to copy and/or distribute it,
74986f03b1f6Smrg# with or without modifications, as long as this notice is preserved.
74996f03b1f6Smrg
75006f03b1f6Smrg# serial 2
75016f03b1f6Smrg
75026f03b1f6Smrg# Check whether the underlying file-system supports filenames
75036f03b1f6Smrg# with a leading dot.  For instance MS-DOS doesn't.
75046f03b1f6SmrgAC_DEFUN([AM_SET_LEADING_DOT],
75056f03b1f6Smrg[rm -rf .tst 2>/dev/null
75066f03b1f6Smrgmkdir .tst 2>/dev/null
75076f03b1f6Smrgif test -d .tst; then
75086f03b1f6Smrg  am__leading_dot=.
75096f03b1f6Smrgelse
75106f03b1f6Smrg  am__leading_dot=_
75116f03b1f6Smrgfi
75126f03b1f6Smrgrmdir .tst 2>/dev/null
75136f03b1f6SmrgAC_SUBST([am__leading_dot])])
75146f03b1f6Smrg
75156f03b1f6Smrg# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
75166f03b1f6Smrg# From Jim Meyering
75176f03b1f6Smrg
75186f03b1f6Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
75196f03b1f6Smrg# Free Software Foundation, Inc.
75206f03b1f6Smrg#
75216f03b1f6Smrg# This file is free software; the Free Software Foundation
75226f03b1f6Smrg# gives unlimited permission to copy and/or distribute it,
75236f03b1f6Smrg# with or without modifications, as long as this notice is preserved.
75246f03b1f6Smrg
75256f03b1f6Smrg# serial 4
75266f03b1f6Smrg
75276f03b1f6SmrgAC_DEFUN([AM_MAINTAINER_MODE],
75286f03b1f6Smrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
75296f03b1f6Smrg  dnl maintainer-mode is disabled by default
75306f03b1f6Smrg  AC_ARG_ENABLE(maintainer-mode,
75316f03b1f6Smrg[  --enable-maintainer-mode  enable make rules and dependencies not useful
75326f03b1f6Smrg			  (and sometimes confusing) to the casual installer],
75336f03b1f6Smrg      USE_MAINTAINER_MODE=$enableval,
75346f03b1f6Smrg      USE_MAINTAINER_MODE=no)
75356f03b1f6Smrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
75366f03b1f6Smrg  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
75376f03b1f6Smrg  MAINT=$MAINTAINER_MODE_TRUE
75386f03b1f6Smrg  AC_SUBST(MAINT)dnl
75396f03b1f6Smrg]
75406f03b1f6Smrg)
75416f03b1f6Smrg
75426f03b1f6SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
75436f03b1f6Smrg
75446f03b1f6Smrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
75456f03b1f6Smrg
75466f03b1f6Smrg# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
75476f03b1f6Smrg#
75486f03b1f6Smrg# This file is free software; the Free Software Foundation
75496f03b1f6Smrg# gives unlimited permission to copy and/or distribute it,
75506f03b1f6Smrg# with or without modifications, as long as this notice is preserved.
75516f03b1f6Smrg
75526f03b1f6Smrg# serial 3
75536f03b1f6Smrg
75546f03b1f6Smrg# AM_MAKE_INCLUDE()
75556f03b1f6Smrg# -----------------
75566f03b1f6Smrg# Check to see how make treats includes.
75576f03b1f6SmrgAC_DEFUN([AM_MAKE_INCLUDE],
75586f03b1f6Smrg[am_make=${MAKE-make}
75596f03b1f6Smrgcat > confinc << 'END'
75606f03b1f6Smrgam__doit:
75616f03b1f6Smrg	@echo done
75626f03b1f6Smrg.PHONY: am__doit
75636f03b1f6SmrgEND
75646f03b1f6Smrg# If we don't find an include directive, just comment out the code.
75656f03b1f6SmrgAC_MSG_CHECKING([for style of include used by $am_make])
75666f03b1f6Smrgam__include="#"
75676f03b1f6Smrgam__quote=
75686f03b1f6Smrg_am_result=none
75696f03b1f6Smrg# First try GNU make style include.
75706f03b1f6Smrgecho "include confinc" > confmf
75716f03b1f6Smrg# We grep out `Entering directory' and `Leaving directory'
75726f03b1f6Smrg# messages which can occur if `w' ends up in MAKEFLAGS.
75736f03b1f6Smrg# In particular we don't look at `^make:' because GNU make might
75746f03b1f6Smrg# be invoked under some other name (usually "gmake"), in which
75756f03b1f6Smrg# case it prints its new name instead of `make'.
75766f03b1f6Smrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
75776f03b1f6Smrg   am__include=include
75786f03b1f6Smrg   am__quote=
75796f03b1f6Smrg   _am_result=GNU
75806f03b1f6Smrgfi
75816f03b1f6Smrg# Now try BSD make style include.
75826f03b1f6Smrgif test "$am__include" = "#"; then
75836f03b1f6Smrg   echo '.include "confinc"' > confmf
75846f03b1f6Smrg   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
75856f03b1f6Smrg      am__include=.include
75866f03b1f6Smrg      am__quote="\""
75876f03b1f6Smrg      _am_result=BSD
75886f03b1f6Smrg   fi
75896f03b1f6Smrgfi
75906f03b1f6SmrgAC_SUBST([am__include])
75916f03b1f6SmrgAC_SUBST([am__quote])
75926f03b1f6SmrgAC_MSG_RESULT([$_am_result])
75936f03b1f6Smrgrm -f confinc confmf
75946f03b1f6Smrg])
75956f03b1f6Smrg
75966f03b1f6Smrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
75976f03b1f6Smrg
75986f03b1f6Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
75996f03b1f6Smrg# Free Software Foundation, Inc.
76006f03b1f6Smrg#
76016f03b1f6Smrg# This file is free software; the Free Software Foundation
76026f03b1f6Smrg# gives unlimited permission to copy and/or distribute it,
76036f03b1f6Smrg# with or without modifications, as long as this notice is preserved.
76046f03b1f6Smrg
76056f03b1f6Smrg# serial 4
76066f03b1f6Smrg
76076f03b1f6Smrg# AM_MISSING_PROG(NAME, PROGRAM)
76086f03b1f6Smrg# ------------------------------
76096f03b1f6SmrgAC_DEFUN([AM_MISSING_PROG],
76106f03b1f6Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
76116f03b1f6Smrg$1=${$1-"${am_missing_run}$2"}
76126f03b1f6SmrgAC_SUBST($1)])
76136f03b1f6Smrg
76146f03b1f6Smrg
76156f03b1f6Smrg# AM_MISSING_HAS_RUN
76166f03b1f6Smrg# ------------------
76176f03b1f6Smrg# Define MISSING if not defined so far and test if it supports --run.
76186f03b1f6Smrg# If it does, set am_missing_run to use it, otherwise, to nothing.
76196f03b1f6SmrgAC_DEFUN([AM_MISSING_HAS_RUN],
76206f03b1f6Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
76216f03b1f6Smrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
76226f03b1f6Smrg# Use eval to expand $SHELL
76236f03b1f6Smrgif eval "$MISSING --run true"; then
76246f03b1f6Smrg  am_missing_run="$MISSING --run "
76256f03b1f6Smrgelse
76266f03b1f6Smrg  am_missing_run=
76276f03b1f6Smrg  AC_MSG_WARN([`missing' script is too old or missing])
76286f03b1f6Smrgfi
76296f03b1f6Smrg])
76306f03b1f6Smrg
76316f03b1f6Smrg# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
76326f03b1f6Smrg#
76336f03b1f6Smrg# This file is free software; the Free Software Foundation
76346f03b1f6Smrg# gives unlimited permission to copy and/or distribute it,
76356f03b1f6Smrg# with or without modifications, as long as this notice is preserved.
76366f03b1f6Smrg
76376f03b1f6Smrg# AM_PROG_MKDIR_P
76386f03b1f6Smrg# ---------------
76396f03b1f6Smrg# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
76406f03b1f6Smrg#
76416f03b1f6Smrg# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
76426f03b1f6Smrg# created by `make install' are always world readable, even if the
76436f03b1f6Smrg# installer happens to have an overly restrictive umask (e.g. 077).
76446f03b1f6Smrg# This was a mistake.  There are at least two reasons why we must not
76456f03b1f6Smrg# use `-m 0755':
76466f03b1f6Smrg#   - it causes special bits like SGID to be ignored,
76476f03b1f6Smrg#   - it may be too restrictive (some setups expect 775 directories).
76486f03b1f6Smrg#
76496f03b1f6Smrg# Do not use -m 0755 and let people choose whatever they expect by
76506f03b1f6Smrg# setting umask.
76516f03b1f6Smrg#
76526f03b1f6Smrg# We cannot accept any implementation of `mkdir' that recognizes `-p'.
76536f03b1f6Smrg# Some implementations (such as Solaris 8's) are not thread-safe: if a
76546f03b1f6Smrg# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
76556f03b1f6Smrg# concurrently, both version can detect that a/ is missing, but only
76566f03b1f6Smrg# one can create it and the other will error out.  Consequently we
76576f03b1f6Smrg# restrict ourselves to GNU make (using the --version option ensures
76586f03b1f6Smrg# this.)
76596f03b1f6SmrgAC_DEFUN([AM_PROG_MKDIR_P],
76606f03b1f6Smrg[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
76616f03b1f6Smrg  # We used to keeping the `.' as first argument, in order to
76626f03b1f6Smrg  # allow $(mkdir_p) to be used without argument.  As in
76636f03b1f6Smrg  #   $(mkdir_p) $(somedir)
76646f03b1f6Smrg  # where $(somedir) is conditionally defined.  However this is wrong
76656f03b1f6Smrg  # for two reasons:
76666f03b1f6Smrg  #  1. if the package is installed by a user who cannot write `.'
76676f03b1f6Smrg  #     make install will fail,
76686f03b1f6Smrg  #  2. the above comment should most certainly read
76696f03b1f6Smrg  #     $(mkdir_p) $(DESTDIR)$(somedir)
76706f03b1f6Smrg  #     so it does not work when $(somedir) is undefined and
76716f03b1f6Smrg  #     $(DESTDIR) is not.
76726f03b1f6Smrg  #  To support the latter case, we have to write
76736f03b1f6Smrg  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
76746f03b1f6Smrg  #  so the `.' trick is pointless.
76756f03b1f6Smrg  mkdir_p='mkdir -p --'
76766f03b1f6Smrgelse
76776f03b1f6Smrg  # On NextStep and OpenStep, the `mkdir' command does not
76786f03b1f6Smrg  # recognize any option.  It will interpret all options as
76796f03b1f6Smrg  # directories to create, and then abort because `.' already
76806f03b1f6Smrg  # exists.
76816f03b1f6Smrg  for d in ./-p ./--version;
76826f03b1f6Smrg  do
76836f03b1f6Smrg    test -d $d && rmdir $d
76846f03b1f6Smrg  done
76856f03b1f6Smrg  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
76866f03b1f6Smrg  if test -f "$ac_aux_dir/mkinstalldirs"; then
76876f03b1f6Smrg    mkdir_p='$(mkinstalldirs)'
76886f03b1f6Smrg  else
76896f03b1f6Smrg    mkdir_p='$(install_sh) -d'
76906f03b1f6Smrg  fi
76916f03b1f6Smrgfi
76926f03b1f6SmrgAC_SUBST([mkdir_p])])
76936f03b1f6Smrg
76946f03b1f6Smrg# Helper functions for option handling.                     -*- Autoconf -*-
76956f03b1f6Smrg
76966f03b1f6Smrg# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
76976f03b1f6Smrg#
76986f03b1f6Smrg# This file is free software; the Free Software Foundation
76996f03b1f6Smrg# gives unlimited permission to copy and/or distribute it,
77006f03b1f6Smrg# with or without modifications, as long as this notice is preserved.
77016f03b1f6Smrg
77026f03b1f6Smrg# serial 3
77036f03b1f6Smrg
77046f03b1f6Smrg# _AM_MANGLE_OPTION(NAME)
77056f03b1f6Smrg# -----------------------
77066f03b1f6SmrgAC_DEFUN([_AM_MANGLE_OPTION],
77076f03b1f6Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
77086f03b1f6Smrg
77096f03b1f6Smrg# _AM_SET_OPTION(NAME)
77106f03b1f6Smrg# ------------------------------
77116f03b1f6Smrg# Set option NAME.  Presently that only means defining a flag for this option.
77126f03b1f6SmrgAC_DEFUN([_AM_SET_OPTION],
77136f03b1f6Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
77146f03b1f6Smrg
77156f03b1f6Smrg# _AM_SET_OPTIONS(OPTIONS)
77166f03b1f6Smrg# ----------------------------------
77176f03b1f6Smrg# OPTIONS is a space-separated list of Automake options.
77186f03b1f6SmrgAC_DEFUN([_AM_SET_OPTIONS],
77196f03b1f6Smrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
77206f03b1f6Smrg
77216f03b1f6Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
77226f03b1f6Smrg# -------------------------------------------
77236f03b1f6Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
77246f03b1f6SmrgAC_DEFUN([_AM_IF_OPTION],
77256f03b1f6Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
77266f03b1f6Smrg
77276f03b1f6Smrg
77286f03b1f6Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
77296f03b1f6Smrg# Free Software Foundation, Inc.
77306f03b1f6Smrg#
77316f03b1f6Smrg# This file is free software; the Free Software Foundation
77326f03b1f6Smrg# gives unlimited permission to copy and/or distribute it,
77336f03b1f6Smrg# with or without modifications, as long as this notice is preserved.
77346f03b1f6Smrg
77356f03b1f6Smrg# serial 8
77366f03b1f6Smrg
77376f03b1f6Smrg
77386f03b1f6Smrg# AM_PRETTY_CMDS
77396f03b1f6Smrg# ------------
77406f03b1f6SmrgAC_DEFUN([AM_PRETTY_CMDS],
77416f03b1f6Smrg[AC_ARG_ENABLE(pretty-cmds,
77426f03b1f6Smrg[  --disable-pretty-cmds          show all commands executed
77436f03b1f6Smrg  --enable-pretty-cmds           do not output the entire command lines])
77446f03b1f6SmrgAMSHOWCMDSAT=''
77456f03b1f6SmrgAMDEPSHOWCMDSAT=''
77466f03b1f6SmrgAMPRETTYECHO=true
77476f03b1f6SmrgAMCMDECHO=echo
77486f03b1f6Smrgif test "x$enable_pretty_cmds" = xyes;
77496f03b1f6Smrgthen
77506f03b1f6Smrg  AMSHOWCMDSAT='@'
77516f03b1f6Smrg  _AM_IF_OPTION([no-dependencies],,test "x$enable_dependency_tracking" = xno &&) AMDEPSHOWCMDSAT='@'
77526f03b1f6Smrg  AMPRETTYECHO=echo
77536f03b1f6Smrg  AMCMDECHO=true
77546f03b1f6Smrg  LT_QUIET='--quiet'
77556f03b1f6Smrgfi
77566f03b1f6SmrgAC_SUBST([AMSHOWCMDSAT])
77576f03b1f6SmrgAC_SUBST([AMDEPSHOWCMDSAT])
77586f03b1f6SmrgAC_SUBST([AMPRETTYECHO])
77596f03b1f6SmrgAC_SUBST([AMCMDECHO])
77606f03b1f6SmrgAC_SUBST([LT_QUIET])
77616f03b1f6Smrg])
77626f03b1f6Smrg
77636f03b1f6Smrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
77646f03b1f6Smrg
77656f03b1f6Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
77666f03b1f6Smrg# Free Software Foundation, Inc.
77676f03b1f6Smrg#
77686f03b1f6Smrg# This file is free software; the Free Software Foundation
77696f03b1f6Smrg# gives unlimited permission to copy and/or distribute it,
77706f03b1f6Smrg# with or without modifications, as long as this notice is preserved.
77716f03b1f6Smrg
77726f03b1f6Smrg# serial 4
77736f03b1f6Smrg
77746f03b1f6Smrg# AM_SANITY_CHECK
77756f03b1f6Smrg# ---------------
77766f03b1f6SmrgAC_DEFUN([AM_SANITY_CHECK],
77776f03b1f6Smrg[AC_MSG_CHECKING([whether build environment is sane])
77786f03b1f6Smrg# Just in case
77796f03b1f6Smrgsleep 1
77806f03b1f6Smrgecho timestamp > conftest.file
77816f03b1f6Smrg# Do `set' in a subshell so we don't clobber the current shell's
77826f03b1f6Smrg# arguments.  Must try -L first in case configure is actually a
77836f03b1f6Smrg# symlink; some systems play weird games with the mod time of symlinks
77846f03b1f6Smrg# (eg FreeBSD returns the mod time of the symlink's containing
77856f03b1f6Smrg# directory).
77866f03b1f6Smrgif (
77876f03b1f6Smrg   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
77886f03b1f6Smrg   if test "$[*]" = "X"; then
77896f03b1f6Smrg      # -L didn't work.
77906f03b1f6Smrg      set X `ls -t $srcdir/configure conftest.file`
77916f03b1f6Smrg   fi
77926f03b1f6Smrg   rm -f conftest.file
77936f03b1f6Smrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
77946f03b1f6Smrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
77956f03b1f6Smrg
77966f03b1f6Smrg      # If neither matched, then we have a broken ls.  This can happen
77976f03b1f6Smrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
77986f03b1f6Smrg      # broken ls alias from the environment.  This has actually
77996f03b1f6Smrg      # happened.  Such a system could not be considered "sane".
78006f03b1f6Smrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
78016f03b1f6Smrgalias in your environment])
78026f03b1f6Smrg   fi
78036f03b1f6Smrg
78046f03b1f6Smrg   test "$[2]" = conftest.file
78056f03b1f6Smrg   )
78066f03b1f6Smrgthen
78076f03b1f6Smrg   # Ok.
78086f03b1f6Smrg   :
78096f03b1f6Smrgelse
78106f03b1f6Smrg   AC_MSG_ERROR([newly created file is older than distributed files!
78116f03b1f6SmrgCheck your system clock])
78126f03b1f6Smrgfi
78136f03b1f6SmrgAC_MSG_RESULT(yes)])
78146f03b1f6Smrg
78156f03b1f6Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
78166f03b1f6Smrg#
78176f03b1f6Smrg# This file is free software; the Free Software Foundation
78186f03b1f6Smrg# gives unlimited permission to copy and/or distribute it,
78196f03b1f6Smrg# with or without modifications, as long as this notice is preserved.
78206f03b1f6Smrg
78216f03b1f6Smrg# AM_PROG_INSTALL_STRIP
78226f03b1f6Smrg# ---------------------
78236f03b1f6Smrg# One issue with vendor `install' (even GNU) is that you can't
78246f03b1f6Smrg# specify the program used to strip binaries.  This is especially
78256f03b1f6Smrg# annoying in cross-compiling environments, where the build's strip
78266f03b1f6Smrg# is unlikely to handle the host's binaries.
78276f03b1f6Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we
78286f03b1f6Smrg# always use install-sh in `make install-strip', and initialize
78296f03b1f6Smrg# STRIPPROG with the value of the STRIP variable (set by the user).
78306f03b1f6SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
78316f03b1f6Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
78326f03b1f6Smrg# Installed binaries are usually stripped using `strip' when the user
78336f03b1f6Smrg# run `make install-strip'.  However `strip' might not be the right
78346f03b1f6Smrg# tool to use in cross-compilation environments, therefore Automake
78356f03b1f6Smrg# will honor the `STRIP' environment variable to overrule this program.
78366f03b1f6Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
78376f03b1f6Smrgif test "$cross_compiling" != no; then
78386f03b1f6Smrg  AC_CHECK_TOOL([STRIP], [strip], :)
78396f03b1f6Smrgfi
78406f03b1f6SmrgINSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
78416f03b1f6SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
78426f03b1f6Smrg
78436f03b1f6Smrg# Check how to create a tarball.                            -*- Autoconf -*-
78446f03b1f6Smrg
78456f03b1f6Smrg# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
78466f03b1f6Smrg#
78476f03b1f6Smrg# This file is free software; the Free Software Foundation
78486f03b1f6Smrg# gives unlimited permission to copy and/or distribute it,
78496f03b1f6Smrg# with or without modifications, as long as this notice is preserved.
78506f03b1f6Smrg
78516f03b1f6Smrg# serial 2
78526f03b1f6Smrg
78536f03b1f6Smrg# _AM_PROG_TAR(FORMAT)
78546f03b1f6Smrg# --------------------
78556f03b1f6Smrg# Check how to create a tarball in format FORMAT.
78566f03b1f6Smrg# FORMAT should be one of `v7', `ustar', or `pax'.
78576f03b1f6Smrg#
78586f03b1f6Smrg# Substitute a variable $(am__tar) that is a command
78596f03b1f6Smrg# writing to stdout a FORMAT-tarball containing the directory
78606f03b1f6Smrg# $tardir.
78616f03b1f6Smrg#     tardir=directory && $(am__tar) > result.tar
78626f03b1f6Smrg#
78636f03b1f6Smrg# Substitute a variable $(am__untar) that extract such
78646f03b1f6Smrg# a tarball read from stdin.
78656f03b1f6Smrg#     $(am__untar) < result.tar
78666f03b1f6SmrgAC_DEFUN([_AM_PROG_TAR],
78676f03b1f6Smrg[# Always define AMTAR for backward compatibility.
78686f03b1f6SmrgAM_MISSING_PROG([AMTAR], [tar])
78696f03b1f6Smrgm4_if([$1], [v7],
78706f03b1f6Smrg     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
78716f03b1f6Smrg     [m4_case([$1], [ustar],, [pax],,
78726f03b1f6Smrg              [m4_fatal([Unknown tar format])])
78736f03b1f6SmrgAC_MSG_CHECKING([how to create a $1 tar archive])
78746f03b1f6Smrg# Loop over all known methods to create a tar archive until one works.
78756f03b1f6Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
78766f03b1f6Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools}
78776f03b1f6Smrg# Do not fold the above two line into one, because Tru64 sh and
78786f03b1f6Smrg# Solaris sh will not grok spaces in the rhs of `-'.
78796f03b1f6Smrgfor _am_tool in $_am_tools
78806f03b1f6Smrgdo
78816f03b1f6Smrg  case $_am_tool in
78826f03b1f6Smrg  gnutar)
78836f03b1f6Smrg    for _am_tar in tar gnutar gtar;
78846f03b1f6Smrg    do
78856f03b1f6Smrg      AM_RUN_LOG([$_am_tar --version]) && break
78866f03b1f6Smrg    done
78876f03b1f6Smrg    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
78886f03b1f6Smrg    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
78896f03b1f6Smrg    am__untar="$_am_tar -xf -"
78906f03b1f6Smrg    ;;
78916f03b1f6Smrg  plaintar)
78926f03b1f6Smrg    # Must skip GNU tar: if it does not support --format= it doesn't create
78936f03b1f6Smrg    # ustar tarball either.
78946f03b1f6Smrg    (tar --version) >/dev/null 2>&1 && continue
78956f03b1f6Smrg    am__tar='tar chf - "$$tardir"'
78966f03b1f6Smrg    am__tar_='tar chf - "$tardir"'
78976f03b1f6Smrg    am__untar='tar xf -'
78986f03b1f6Smrg    ;;
78996f03b1f6Smrg  pax)
79006f03b1f6Smrg    am__tar='pax -L -x $1 -w "$$tardir"'
79016f03b1f6Smrg    am__tar_='pax -L -x $1 -w "$tardir"'
79026f03b1f6Smrg    am__untar='pax -r'
79036f03b1f6Smrg    ;;
79046f03b1f6Smrg  cpio)
79056f03b1f6Smrg    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
79066f03b1f6Smrg    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
79076f03b1f6Smrg    am__untar='cpio -i -H $1 -d'
79086f03b1f6Smrg    ;;
79096f03b1f6Smrg  none)
79106f03b1f6Smrg    am__tar=false
79116f03b1f6Smrg    am__tar_=false
79126f03b1f6Smrg    am__untar=false
79136f03b1f6Smrg    ;;
79146f03b1f6Smrg  esac
79156f03b1f6Smrg
79166f03b1f6Smrg  # If the value was cached, stop now.  We just wanted to have am__tar
79176f03b1f6Smrg  # and am__untar set.
79186f03b1f6Smrg  test -n "${am_cv_prog_tar_$1}" && break
79196f03b1f6Smrg
79206f03b1f6Smrg  # tar/untar a dummy directory, and stop if the command works
79216f03b1f6Smrg  rm -rf conftest.dir
79226f03b1f6Smrg  mkdir conftest.dir
79236f03b1f6Smrg  echo GrepMe > conftest.dir/file
79246f03b1f6Smrg  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
79256f03b1f6Smrg  rm -rf conftest.dir
79266f03b1f6Smrg  if test -s conftest.tar; then
79276f03b1f6Smrg    AM_RUN_LOG([$am__untar <conftest.tar])
79286f03b1f6Smrg    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
79296f03b1f6Smrg  fi
79306f03b1f6Smrgdone
79316f03b1f6Smrgrm -rf conftest.dir
79326f03b1f6Smrg
79336f03b1f6SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
79346f03b1f6SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])])
79356f03b1f6SmrgAC_SUBST([am__tar])
79366f03b1f6SmrgAC_SUBST([am__untar])
79376f03b1f6Smrg]) # _AM_PROG_TAR
79386f03b1f6Smrg
7939