aclocal.m4 revision 43d802fa
12a53b785Smrg# generated automatically by aclocal 1.16.5 -*- Autoconf -*-
2e1c0d025Smrg
32a53b785Smrg# Copyright (C) 1996-2021 Free Software Foundation, Inc.
43da084b3Smrg
53da084b3Smrg# This file is free software; the Free Software Foundation
63da084b3Smrg# gives unlimited permission to copy and/or distribute it,
73da084b3Smrg# with or without modifications, as long as this notice is preserved.
83da084b3Smrg
93da084b3Smrg# This program is distributed in the hope that it will be useful,
103da084b3Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
113da084b3Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
123da084b3Smrg# PARTICULAR PURPOSE.
133da084b3Smrg
14e1c0d025Smrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15d63fdb69Smrgm4_ifndef([AC_AUTOCONF_VERSION],
16d63fdb69Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
172a53b785Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],,
182a53b785Smrg[m4_warning([this file was generated for autoconf 2.71.
19d63fdb69SmrgYou have another version of autoconf.  It may work, but is not guaranteed to.
20d63fdb69SmrgIf you have problems, you may need to regenerate the build system entirely.
21e1c0d025SmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])])
22d63fdb69Smrg
2343d802faSmrgdnl fontutil.m4.  Generated from fontutil.m4.in by configure.
2443d802faSmrgdnl
2543d802faSmrgdnl This file comes from X.Org's font-util 1.3.3
2643d802faSmrgdnl
2743d802faSmrgdnl Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
2843d802faSmrgdnl
2943d802faSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a
3043d802faSmrgdnl copy of this software and associated documentation files (the "Software"),
3143d802faSmrgdnl to deal in the Software without restriction, including without limitation
3243d802faSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
3343d802faSmrgdnl and/or sell copies of the Software, and to permit persons to whom the
3443d802faSmrgdnl Software is furnished to do so, subject to the following conditions:
3543d802faSmrgdnl
3643d802faSmrgdnl The above copyright notice and this permission notice (including the next
3743d802faSmrgdnl paragraph) shall be included in all copies or substantial portions of the
3843d802faSmrgdnl Software.
3943d802faSmrgdnl
4043d802faSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
4143d802faSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
4243d802faSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
4343d802faSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
4443d802faSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
4543d802faSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
4643d802faSmrgdnl DEALINGS IN THE SOFTWARE.
4743d802faSmrgdnl
4843d802faSmrgdnl --------------------------------------------------------------------
4943d802faSmrgdnl
5043d802faSmrgdnl Copyright 2005 Red Hat, Inc
5143d802faSmrgdnl
5243d802faSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its
5343d802faSmrgdnl documentation for any purpose is hereby granted without fee, provided that
5443d802faSmrgdnl the above copyright notice appear in all copies and that both that
5543d802faSmrgdnl copyright notice and this permission notice appear in supporting
5643d802faSmrgdnl documentation.
5743d802faSmrgdnl
5843d802faSmrgdnl The above copyright notice and this permission notice shall be included
5943d802faSmrgdnl in all copies or substantial portions of the Software.
6043d802faSmrgdnl
6143d802faSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
6243d802faSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
6343d802faSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
6443d802faSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
6543d802faSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
6643d802faSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
6743d802faSmrgdnl OTHER DEALINGS IN THE SOFTWARE.
6843d802faSmrgdnl
6943d802faSmrgdnl Except as contained in this notice, the name of the copyright holders shall
7043d802faSmrgdnl not be used in advertising or otherwise to promote the sale, use or
7143d802faSmrgdnl other dealings in this Software without prior written authorization
7243d802faSmrgdnl from the copyright holders.
7343d802faSmrg
7443d802faSmrg# XORG_FONT_MACROS_VERSION(required-version)
7543d802faSmrg# ------------------------------------------
7643d802faSmrg# Minimum version: 1.1.0
7752fd71cdSmrg#
7843d802faSmrg# If you're using a macro added in Version 1.1 or newer, include this in
7943d802faSmrg# your configure.ac with the minimum required version, such as:
8043d802faSmrg# XORG_FONT_MACROS_VERSION(1.1)
8143d802faSmrg#
8243d802faSmrg# To ensure that this macro is defined, also add:
8343d802faSmrg# m4_ifndef([XORG_FONT_MACROS_VERSION],
8443d802faSmrg#     [m4_fatal([must install X.Org font-util 1.1 or later before running autoconf/autogen])])
8543d802faSmrg#
8643d802faSmrg#
8743d802faSmrg# See the "minimum version" comment for each macro you use to see what
8843d802faSmrg# version you require.
8943d802faSmrgm4_defun([XORG_FONT_MACROS_VERSION],[
9043d802faSmrgm4_define([vers_have], [1.3.3])
9143d802faSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
9243d802faSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
9343d802faSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,,
9443d802faSmrg    [m4_fatal([font-util major version ]maj_needed[ is required but ]vers_have[ found])])
9543d802faSmrgm4_if(m4_version_compare(vers_have, [$1]), -1,
9643d802faSmrg    [m4_fatal([font-util version $1 or higher is required but ]vers_have[ found])])
9743d802faSmrgm4_undefine([vers_have])
9843d802faSmrgm4_undefine([maj_have])
9943d802faSmrgm4_undefine([maj_needed])
10043d802faSmrg]) # XORG_FONT_MACROS_VERSION
10155acc8fcSmrg
10243d802faSmrg# XORG_FONT_CHECK_{maps}()
10343d802faSmrg# ------------------------
10443d802faSmrg# Minimum version: 1.0.0
10543d802faSmrg# These macros add --enable/disable-{maps} where {maps} are ISO8859-*,
10643d802faSmrg# JISX0201 or KOI8_R.  By default, they are all enabled.
10755acc8fcSmrg
10843d802faSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_1], [XORG_FONT_CHECK_ENCODING(ISO8859-1)])
10943d802faSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_2], [XORG_FONT_CHECK_ENCODING(ISO8859-2)])
11043d802faSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_3], [XORG_FONT_CHECK_ENCODING(ISO8859-3)])
11143d802faSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_4], [XORG_FONT_CHECK_ENCODING(ISO8859-4)])
11243d802faSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_5], [XORG_FONT_CHECK_ENCODING(ISO8859-5)])
11343d802faSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_6], [XORG_FONT_CHECK_ENCODING(ISO8859-6)])
11443d802faSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_7], [XORG_FONT_CHECK_ENCODING(ISO8859-7)])
11543d802faSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_8], [XORG_FONT_CHECK_ENCODING(ISO8859-8)])
11643d802faSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_9], [XORG_FONT_CHECK_ENCODING(ISO8859-9)])
11743d802faSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_10],[XORG_FONT_CHECK_ENCODING(ISO8859-10)])
11843d802faSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_11],[XORG_FONT_CHECK_ENCODING(ISO8859-11)])
11943d802faSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_12],[XORG_FONT_CHECK_ENCODING(ISO8859-12)])
12043d802faSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_13],[XORG_FONT_CHECK_ENCODING(ISO8859-13)])
12143d802faSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_14],[XORG_FONT_CHECK_ENCODING(ISO8859-14)])
12243d802faSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_15],[XORG_FONT_CHECK_ENCODING(ISO8859-15)])
12343d802faSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_16],[XORG_FONT_CHECK_ENCODING(ISO8859-16)])
12443d802faSmrgAC_DEFUN([XORG_FONT_CHECK_JISX0201],  [XORG_FONT_CHECK_ENCODING(JISX0201)])
12543d802faSmrgAC_DEFUN([XORG_FONT_CHECK_KOI8_R],    [XORG_FONT_CHECK_ENCODING(KOI8-R)])
12655acc8fcSmrg
12743d802faSmrg# XORG_FONT_CHECK_ENCODING(encoding)
12843d802faSmrg# ----------------------------------
12943d802faSmrg# Minimum version: 1.1.0
13043d802faSmrg# This macro adds --enable/disable-<encoding>, enabled by default.
13143d802faSmrg# It replaced individual copies of this code in the above macros in 1.1.
13243d802faSmrg# Currently assumes encoding names will be all upper-case - add m4_toupper
13343d802faSmrg# calls if this is not true in the future.
134d63fdb69Smrg
13543d802faSmrgAC_DEFUN([XORG_FONT_CHECK_ENCODING],[
13643d802faSmrg	AC_ARG_ENABLE(m4_tolower($1),
13743d802faSmrg		AS_HELP_STRING(m4_join([-], [--disable], m4_tolower($1)),
13843d802faSmrg				[Build $1 fonts (default: yes)]),
13943d802faSmrg		[AS_TR_SH($1)=$enableval])
14043d802faSmrg	AC_MSG_CHECKING([whether to build $1 fonts])
14143d802faSmrg	AC_MSG_RESULT($[AS_TR_SH($1)])
14243d802faSmrg	AM_CONDITIONAL(AS_TR_SH($1), [test "x$AS_TR_SH($1)" = xyes])
14343d802faSmrg]) # XORG_FONT_CHECK_ENCODING
14452fd71cdSmrg
14543d802faSmrg# XORG_FONT_CHECK_ENCODING_LIST(encoding1 encoding2....)
14643d802faSmrg# -----------------------------------------------------
14743d802faSmrg# Minimum version: 1.1.0
14843d802faSmrg# Call XORG_FONT_CHECK_ENCODING for multiple encodings at once.
14943d802faSmrg# Add a shorthand --enable/disable-all-encodings option.
150d63fdb69Smrg
15143d802faSmrgAC_DEFUN([XORG_FONT_CHECK_ENCODING_LIST],[
15243d802faSmrg	AC_ARG_ENABLE([all-encodings],
15343d802faSmrg		AS_HELP_STRING([--disable-all-encodings],
15443d802faSmrg				[Disable building of all font encodings]),
15543d802faSmrg		[m4_foreach_w([enc], [$1], [
15643d802faSmrg			AS_TR_SH(enc)=$enableval
15743d802faSmrg		])],
15843d802faSmrg		[m4_foreach_w([enc], [$1], [
15943d802faSmrg			AS_TR_SH(enc)=yes
16043d802faSmrg		])])
16143d802faSmrg	m4_foreach_w([enc], [$1], [XORG_FONT_CHECK_ENCODING(enc)])
16243d802faSmrg]) # XORG_FONT_CHECK_ENCODING_LIST
16343d802faSmrg
16443d802faSmrg# XORG_FONT_REQUIRED_PROG(VARNAME, progname)
16543d802faSmrg# ------------------------------------------
16643d802faSmrg# Minimum version: 1.1.0
16752fd71cdSmrg#
16843d802faSmrg# Simple wrapper around AC_PATH_PROG that errors if not found
16952fd71cdSmrg#
1703da084b3Smrg
17143d802faSmrgAC_DEFUN([XORG_FONT_REQUIRED_PROG],[
17243d802faSmrg	AC_PATH_PROG($1, $2)
17343d802faSmrg	if test x"$$1" = x; then
17443d802faSmrg		AC_MSG_ERROR([$2 is required to build $PACKAGE_NAME.])
17543d802faSmrg	fi
17652fd71cdSmrg])
1773da084b3Smrg
1783da084b3Smrg
17943d802faSmrg# XORG_FONT_FCCACHE()
18043d802faSmrg# -------------------
18143d802faSmrg# Minimum version: 1.1.0
18252fd71cdSmrg#
18343d802faSmrg# Set FCCACHE to path to fc-cache (fontconfig cache builder) if found
18443d802faSmrg# Set RUN_FCCACHE to a rule suitable for substituting into a makefile
18543d802faSmrg# to run fc-cache if found and not installing to $DESTDIR and not
18643d802faSmrg# cross-compiling
18752fd71cdSmrg#
18843d802faSmrg# fc-cache is optional, not required, and should be skipped when making
18943d802faSmrg# packages (installing to $DESTDIR) or cross-compiling
19052fd71cdSmrg#
19143d802faSmrgAC_DEFUN([XORG_FONT_FCCACHE],[
19243d802faSmrg	AC_PATH_PROG(FCCACHE, fc-cache)
19343d802faSmrg	FCCACHE_WARN='echo "** Warning: fonts.cache not built" ; echo "** Generate this file manually on host system using fc-cache"'
19443d802faSmrg	if test x"$FCCACHE" = x || test x"$cross_compiling" != x"no" ; then
19543d802faSmrg		RUN_FCCACHE="${FCCACHE_WARN}"
19643d802faSmrg	else
19743d802faSmrg		RUN_FCCACHE='@(if test -z "$(DESTDIR)"; then echo $(FCCACHE) $(fontdir); $(FCCACHE) $(fontdir); else'
19843d802faSmrg		RUN_FCCACHE="${RUN_FCCACHE} ${FCCACHE_WARN} ; fi)"
19943d802faSmrg	fi
20043d802faSmrg	AC_SUBST([RUN_FCCACHE])
20143d802faSmrg])
20252fd71cdSmrg
20343d802faSmrg# XORG_FONT_MKFONTDIR()
20443d802faSmrg# -------------------
20543d802faSmrg# Minimum version: 1.3.0
20643d802faSmrg#
20743d802faSmrg# Set MKFONTDIR to path to mkfontdir.
20843d802faSmrg#
20943d802faSmrg# If cross-compiling, and if mkdir is not found, use a shell command
21043d802faSmrg# which warns mkfontdir needs to be run on the target
21143d802faSmrg#
21243d802faSmrg# If not cross-compiling, mkfontdir must be found
21343d802faSmrg#
21443d802faSmrgAC_DEFUN([XORG_FONT_MKFONTDIR],[
21543d802faSmrg	if test x"$cross_compiling" != x"no" ; then
21643d802faSmrg		AC_PATH_PROG(MKFONTDIR, mkfontdir, "")
21743d802faSmrg		MKFONTDIR_WARN='echo "** Warning: mkfontdir not run" ; echo "** Run mkfontdir manually on host system"'
21852fd71cdSmrg
21943d802faSmrg		if test x"$MKFONTDIR" = x; then
22043d802faSmrg			MKFONTDIR="${MKFONTDIR_WARN} ; echo '** mkfontdir'"
22143d802faSmrg		fi
22243d802faSmrg	else
22343d802faSmrg		XORG_FONT_REQUIRED_PROG(MKFONTDIR, mkfontdir)
22443d802faSmrg	fi
22552fd71cdSmrg
22643d802faSmrg	AC_SUBST([MKFONTDIR])
22743d802faSmrg])
22852fd71cdSmrg
22943d802faSmrg# XORG_FONT_COMMON_UTILS()
23043d802faSmrg# ------------------------
23143d802faSmrg# Minimum version: 1.1.0
23243d802faSmrg#
23343d802faSmrg# Call XORG_FONT_REQUIRED_PROG for programs needed for all font types
23452fd71cdSmrg
23543d802faSmrgAC_DEFUN([XORG_FONT_COMMON_UTILS],[
23643d802faSmrg	XORG_FONT_FCCACHE
23743d802faSmrg	XORG_FONT_MKFONTDIR
2383da084b3Smrg])
2393da084b3Smrg
24043d802faSmrg# XORG_FONT_SCALED_UTILS()
24143d802faSmrg# ------------------------
24243d802faSmrg# Minimum version: 1.1.0
24343d802faSmrg#
24443d802faSmrg# Call XORG_FONT_REQUIRED_PROG for programs needed for scalable fonts
24543d802faSmrg# (TrueType, OpenType, Type1)
246d63fdb69Smrg
24743d802faSmrgAC_DEFUN([XORG_FONT_SCALED_UTILS],[
24843d802faSmrg	XORG_FONT_COMMON_UTILS
24943d802faSmrg	XORG_FONT_REQUIRED_PROG(MKFONTSCALE, mkfontscale)
250e1c0d025Smrg])
251e1c0d025Smrg
25243d802faSmrg# XORG_FONT_BDF_UTILS()
25343d802faSmrg# ---------------------
25443d802faSmrg# Minimum version: 1.1.0
25543d802faSmrg#
25643d802faSmrg# Call XORG_FONT_REQUIRED_PROG for programs needed for BDF format bitmap fonts
25743d802faSmrg# Also call XORG_FONT_CHECK_COMPRESSION to determine how to compress the
25843d802faSmrg# PCF output files created by bdftopcf
2593da084b3Smrg
26043d802faSmrgAC_DEFUN([XORG_FONT_BDF_UTILS],[
26143d802faSmrg	XORG_FONT_COMMON_UTILS
26243d802faSmrg	XORG_FONT_REQUIRED_PROG(BDFTOPCF, bdftopcf)
26343d802faSmrg	XORG_FONT_CHECK_COMPRESSION
2642a53b785Smrg])
2653da084b3Smrg
26643d802faSmrg# XORG_FONT_CHECK_COMPRESSION()
26743d802faSmrg# -----------------------------
26843d802faSmrg# Minimum version: 1.1.0
26952fd71cdSmrg#
27043d802faSmrg# Offer a --with-compression flag to control what compression method is
27143d802faSmrg# used for pcf font files.   Offers all the methods currently supported
27243d802faSmrg# by libXfont, including no compression.
273e1c0d025Smrg
27443d802faSmrgAC_DEFUN([XORG_FONT_CHECK_COMPRESSION],[
27543d802faSmrg	AC_MSG_CHECKING([font compression method])
27643d802faSmrg	AC_ARG_WITH(compression,
27743d802faSmrg	 [AS_HELP_STRING([--with-compression=<no|compress|gzip|bzip2>],
27843d802faSmrg			 [compression method to use on pcf fonts])],
27943d802faSmrg         [compression="$withval"], [compression="yes"])
28043d802faSmrg	if test x"$compression" = "xyes" ; then
28143d802faSmrg		compression="gzip"
28243d802faSmrg	fi
28343d802faSmrg	AC_MSG_RESULT([${compression}])
28443d802faSmrg	case ${compression} in
28543d802faSmrg	 *compress)	COMPRESS_SUFFIX=".Z" ;;
28643d802faSmrg	 *gzip)		COMPRESS_SUFFIX=".gz" ;;
28743d802faSmrg	 *bzip2)	COMPRESS_SUFFIX=".bz2" ;;
28843d802faSmrg	 no|none)	COMPRESS_SUFFIX="" ; COMPRESS="cat" ;;
28943d802faSmrg	 *) AC_MSG_ERROR([${compression} is not a supported compression method]) ;;
29043d802faSmrg	esac
29143d802faSmrg	if test x"$COMPRESS_SUFFIX" != "x" ; then
29243d802faSmrg	   XORG_FONT_REQUIRED_PROG(COMPRESS, ${compression})
29343d802faSmrg	fi
29443d802faSmrg	AC_SUBST([COMPRESS_SUFFIX])
29543d802faSmrg])
296e1c0d025Smrg
29743d802faSmrg# XORG_FONT_UCS2ANY()
29843d802faSmrg# -------------------
29943d802faSmrg# Minimum version: 1.1.0
30052fd71cdSmrg#
30143d802faSmrg# Call XORG_FONT_REQUIRED_PROG for ucs2any program needed for splitting
30243d802faSmrg# Unicode-encoded BDF format bitmap fonts into subsets for older encodings.
30343d802faSmrg# Also call pkg-config to find the directory with the encoding files needed
30443d802faSmrg# by ucs2any, and export it as MAPFILES_PATH to the Makefiles
3053da084b3Smrg
30643d802faSmrgAC_DEFUN([XORG_FONT_UCS2ANY],[
30743d802faSmrg	AC_REQUIRE([PKG_PROG_PKG_CONFIG])
30843d802faSmrg	XORG_FONT_REQUIRED_PROG(UCS2ANY, ucs2any)
30943d802faSmrg	PKG_CHECK_MODULES(MAPS, [fontutil])
31043d802faSmrg	AC_MSG_CHECKING([for ucs2any encoding data files])
31143d802faSmrg	MAPFILES_PATH=`$PKG_CONFIG --variable=mapdir fontutil`
31243d802faSmrg	AC_SUBST(MAPFILES_PATH)
31343d802faSmrg	AC_MSG_RESULT([${MAPFILES_PATH}])
31443d802faSmrg])
3153da084b3Smrg
31643d802faSmrg
31743d802faSmrg
31843d802faSmrg# XORG_FONT_FC_CONFDIR()
31943d802faSmrg# --------------------
32043d802faSmrg# Minimum version: 1.2.0
3212a53b785Smrg#
32243d802faSmrg# Sets FC_CONFDIR to the fontconfig config directory
32343d802faSmrg# (which should be --with-confdir=... when building fontconfig)
32443d802faSmrg# found from:
32543d802faSmrg#	--with-fc-confdir=...
32643d802faSmrg#	pkg-config --variable=confdir fontconfig
32743d802faSmrg#	${sysconfdir}/fonts
3283da084b3Smrg
32943d802faSmrgAC_DEFUN([XORG_FONT_FC_CONFDIR],[
33043d802faSmrg	dnl Ensure $PKG_CONFIG is set first
33143d802faSmrg	AC_REQUIRE([PKG_PROG_PKG_CONFIG])
3323da084b3Smrg
33343d802faSmrg	AC_MSG_CHECKING([for fontconfig's configuration directory])
33443d802faSmrg	AC_ARG_WITH(fc-confdir,
33543d802faSmrg		    AS_HELP_STRING([--with-fc-confdir=DIR],
33643d802faSmrg			   [Path to fontconfig's configuration directory]),
33743d802faSmrg		    [FC_CONFDIR="$withval"])
33843d802faSmrg	# if --with-fc-confdir was not specified
33943d802faSmrg	if test "x${FC_CONFDIR}" = "x"; then
34043d802faSmrg		FC_CONFDIR=`$PKG_CONFIG --variable=confdir fontconfig`
34143d802faSmrg	fi
34243d802faSmrg	# ...and if pkg-config didn't find confdir in fontconfig.pc...
34343d802faSmrg	if test "x${FC_CONFDIR}" = "x"; then
34443d802faSmrg		FC_CONFDIR="${sysconfdir}/fonts"
34543d802faSmrg	fi
34643d802faSmrg	AC_SUBST(FC_CONFDIR)
34743d802faSmrg	AC_MSG_RESULT([${FC_CONFDIR}])
34852fd71cdSmrg])
3493da084b3Smrg
3503da084b3Smrg
3513da084b3Smrg
35243d802faSmrg# XORG_FONTROOTDIR()
35343d802faSmrg# --------------------
35443d802faSmrg# Minimum version: 1.1.0
35543d802faSmrg#
35643d802faSmrg# Sets FONTROOTDIR to the root directory for font files.  Uses the first
35743d802faSmrg# found from:
35843d802faSmrg#	--with-fontrootdir
35943d802faSmrg#	pkg-config --variable=fontrootdir fontutil
36043d802faSmrg#	${datadir}/fonts/X11
36155acc8fcSmrg
36243d802faSmrgAC_DEFUN([XORG_FONTROOTDIR],[
36343d802faSmrg	dnl Ensure $PKG_CONFIG is set first
36443d802faSmrg	AC_REQUIRE([PKG_PROG_PKG_CONFIG])
3653da084b3Smrg
36643d802faSmrg	AC_MSG_CHECKING([for root directory for font files])
36743d802faSmrg	AC_ARG_WITH(fontrootdir,
36843d802faSmrg		    AS_HELP_STRING([--with-fontrootdir=DIR],
36943d802faSmrg			   [Path to root directory for font files]),
37043d802faSmrg		    [FONTROOTDIR="$withval"])
37143d802faSmrg	# if --with-fontrootdir not specified...
37243d802faSmrg	if test "x${FONTROOTDIR}" = "x"; then
37343d802faSmrg		FONTROOTDIR=`$PKG_CONFIG --variable=fontrootdir fontutil`
37443d802faSmrg	fi
37543d802faSmrg	# ...and if pkg-config didn't find fontdir in fontutil.pc...
37643d802faSmrg	if test "x${FONTROOTDIR}" = "x"; then
37743d802faSmrg		FONTROOTDIR="${datadir}/fonts/X11"
37843d802faSmrg	fi
37943d802faSmrg	AC_SUBST(FONTROOTDIR)
38043d802faSmrg	AC_MSG_RESULT([${FONTROOTDIR}])
3812a53b785Smrg])
382d63fdb69Smrg
38343d802faSmrg# XORG_FONTSUBDIR(variable, flag, subdir)
38443d802faSmrg# ---------------------------------------
38543d802faSmrg# Minimum version: 1.1.0
38643d802faSmrg#
38743d802faSmrg# Offer a --with-<flag> flag to control directory for font installation
38843d802faSmrg# Default is the specified <subdir> of the font root directory.
38943d802faSmrg# Sets <variable> to the selected directory
390d63fdb69Smrg
39143d802faSmrgAC_DEFUN([XORG_FONTSUBDIR],[
39243d802faSmrg	AC_REQUIRE([XORG_FONTROOTDIR])
393d63fdb69Smrg
39443d802faSmrg	AC_MSG_CHECKING([for directory for $3 files])
39543d802faSmrg	AC_ARG_WITH($2,
39643d802faSmrg		    [AS_HELP_STRING([--with-$2=DIR],
39743d802faSmrg				    [Path to $3 files [FONTROOTDIR/$3]])],
39843d802faSmrg		    [$1="${withval}"], [$1='${FONTROOTDIR}/$3'])
39943d802faSmrg	AC_SUBST($1)
40043d802faSmrg	AC_MSG_RESULT([${$1}])
40143d802faSmrg]) # XORG_FONTSUBDIR
402d63fdb69Smrg
40343d802faSmrg# XORG_FONTDIR(subdir)
40443d802faSmrg# --------------------
40543d802faSmrg# Minimum version: 1.1.0
40643d802faSmrg#
40743d802faSmrg# Offer a --with-fontdir flag to control directory for font installation
40843d802faSmrg# Default is the specified subdir of the font root directory.
40943d802faSmrg# Sets FONTDIR to the selected directory
4103da084b3Smrg
41143d802faSmrgAC_DEFUN([XORG_FONTDIR],[XORG_FONTSUBDIR([FONTDIR], [fontdir], [$1])])
412d63fdb69Smrg
41343d802faSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
41443d802faSmrg#
41543d802faSmrg#   Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software
41643d802faSmrg#   Foundation, Inc.
41743d802faSmrg#   Written by Gordon Matzigkeit, 1996
41843d802faSmrg#
41943d802faSmrg# This file is free software; the Free Software Foundation gives
42043d802faSmrg# unlimited permission to copy and/or distribute it, with or without
42143d802faSmrg# modifications, as long as this notice is preserved.
4223da084b3Smrg
42343d802faSmrgm4_define([_LT_COPYING], [dnl
42443d802faSmrg# Copyright (C) 2014 Free Software Foundation, Inc.
42543d802faSmrg# This is free software; see the source for copying conditions.  There is NO
42643d802faSmrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
4273da084b3Smrg
42843d802faSmrg# GNU Libtool is free software; you can redistribute it and/or modify
42943d802faSmrg# it under the terms of the GNU General Public License as published by
43043d802faSmrg# the Free Software Foundation; either version 2 of of the License, or
43143d802faSmrg# (at your option) any later version.
43243d802faSmrg#
43343d802faSmrg# As a special exception to the GNU General Public License, if you
43443d802faSmrg# distribute this file as part of a program or library that is built
43543d802faSmrg# using GNU Libtool, you may include this file under the  same
43643d802faSmrg# distribution terms that you use for the rest of that program.
43743d802faSmrg#
43843d802faSmrg# GNU Libtool is distributed in the hope that it will be useful, but
43943d802faSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of
44043d802faSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
44143d802faSmrg# GNU General Public License for more details.
44243d802faSmrg#
44343d802faSmrg# You should have received a copy of the GNU General Public License
44443d802faSmrg# along with this program.  If not, see <http://www.gnu.org/licenses/>.
44552fd71cdSmrg])
4463da084b3Smrg
44743d802faSmrg# serial 59 LT_INIT
4483da084b3Smrg
449e1c0d025Smrg
45043d802faSmrg# LT_PREREQ(VERSION)
45143d802faSmrg# ------------------
45243d802faSmrg# Complain and exit if this libtool version is less that VERSION.
45343d802faSmrgm4_defun([LT_PREREQ],
45443d802faSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
45543d802faSmrg       [m4_default([$3],
45643d802faSmrg		   [m4_fatal([Libtool version $1 or higher is required],
45743d802faSmrg		             63)])],
45843d802faSmrg       [$2])])
459e1c0d025Smrg
4603da084b3Smrg
46143d802faSmrg# _LT_CHECK_BUILDDIR
4622a53b785Smrg# ------------------
46343d802faSmrg# Complain if the absolute build directory name contains unusual characters
46443d802faSmrgm4_defun([_LT_CHECK_BUILDDIR],
46543d802faSmrg[case `pwd` in
4662a53b785Smrg  *\ * | *\	*)
46743d802faSmrg    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
46843d802faSmrgesac
46943d802faSmrg])
4702a53b785Smrg
4712a53b785Smrg
47243d802faSmrg# LT_INIT([OPTIONS])
47343d802faSmrg# ------------------
47443d802faSmrgAC_DEFUN([LT_INIT],
47543d802faSmrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
47643d802faSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
47743d802faSmrgAC_BEFORE([$0], [LT_LANG])dnl
47843d802faSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl
47943d802faSmrgAC_BEFORE([$0], [LTDL_INIT])dnl
48043d802faSmrgm4_require([_LT_CHECK_BUILDDIR])dnl
481e1c0d025Smrg
48243d802faSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default:
48343d802faSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
48443d802faSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
48543d802faSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
48643d802faSmrgdnl unless we require an AC_DEFUNed macro:
48743d802faSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl
48843d802faSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl
48943d802faSmrgAC_REQUIRE([LTVERSION_VERSION])dnl
49043d802faSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl
49143d802faSmrgm4_require([_LT_PROG_LTMAIN])dnl
492e1c0d025Smrg
49343d802faSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
4943da084b3Smrg
49543d802faSmrgdnl Parse OPTIONS
49643d802faSmrg_LT_SET_OPTIONS([$0], [$1])
4973da084b3Smrg
49843d802faSmrg# This can be used to rebuild libtool when needed
49943d802faSmrgLIBTOOL_DEPS=$ltmain
5003da084b3Smrg
50143d802faSmrg# Always use our own libtool.
50243d802faSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
50343d802faSmrgAC_SUBST(LIBTOOL)dnl
5043da084b3Smrg
50543d802faSmrg_LT_SETUP
5063da084b3Smrg
50743d802faSmrg# Only expand once:
50843d802faSmrgm4_define([LT_INIT])
50943d802faSmrg])# LT_INIT
5103da084b3Smrg
51143d802faSmrg# Old names:
51243d802faSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
51343d802faSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
51443d802faSmrgdnl aclocal-1.4 backwards compatibility:
51543d802faSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], [])
51643d802faSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], [])
5173da084b3Smrg
51852fd71cdSmrg
51943d802faSmrg# _LT_PREPARE_CC_BASENAME
5202a53b785Smrg# -----------------------
52143d802faSmrgm4_defun([_LT_PREPARE_CC_BASENAME], [
52243d802faSmrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
52343d802faSmrgfunc_cc_basename ()
52443d802faSmrg{
52543d802faSmrg    for cc_temp in @S|@*""; do
52643d802faSmrg      case $cc_temp in
52743d802faSmrg        compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
52843d802faSmrg        distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
52943d802faSmrg        \-*) ;;
53043d802faSmrg        *) break;;
53143d802faSmrg      esac
53243d802faSmrg    done
53343d802faSmrg    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
53443d802faSmrg}
53543d802faSmrg])# _LT_PREPARE_CC_BASENAME
5363da084b3Smrg
5373da084b3Smrg
53843d802faSmrg# _LT_CC_BASENAME(CC)
53943d802faSmrg# -------------------
54043d802faSmrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
54143d802faSmrg# but that macro is also expanded into generated libtool script, which
54243d802faSmrg# arranges for $SED and $ECHO to be set by different means.
54343d802faSmrgm4_defun([_LT_CC_BASENAME],
54443d802faSmrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl
54543d802faSmrgAC_REQUIRE([_LT_DECL_SED])dnl
54643d802faSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
54743d802faSmrgfunc_cc_basename $1
54843d802faSmrgcc_basename=$func_cc_basename_result
54943d802faSmrg])
5503da084b3Smrg
551e1c0d025Smrg
55243d802faSmrg# _LT_FILEUTILS_DEFAULTS
55343d802faSmrg# ----------------------
55443d802faSmrg# It is okay to use these file commands and assume they have been set
55543d802faSmrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
55643d802faSmrgm4_defun([_LT_FILEUTILS_DEFAULTS],
55743d802faSmrg[: ${CP="cp -f"}
55843d802faSmrg: ${MV="mv -f"}
55943d802faSmrg: ${RM="rm -f"}
56043d802faSmrg])# _LT_FILEUTILS_DEFAULTS
561d63fdb69Smrg
562e1c0d025Smrg
56343d802faSmrg# _LT_SETUP
56443d802faSmrg# ---------
56543d802faSmrgm4_defun([_LT_SETUP],
56643d802faSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
56743d802faSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
56843d802faSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
56943d802faSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
570e1c0d025Smrg
57143d802faSmrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
57243d802faSmrgdnl
57343d802faSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl
57443d802faSmrg_LT_DECL([], [host], [0])dnl
57543d802faSmrg_LT_DECL([], [host_os], [0])dnl
57643d802faSmrgdnl
57743d802faSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl
57843d802faSmrg_LT_DECL([], [build], [0])dnl
57943d802faSmrg_LT_DECL([], [build_os], [0])dnl
58043d802faSmrgdnl
58143d802faSmrgAC_REQUIRE([AC_PROG_CC])dnl
58243d802faSmrgAC_REQUIRE([LT_PATH_LD])dnl
58343d802faSmrgAC_REQUIRE([LT_PATH_NM])dnl
58443d802faSmrgdnl
58543d802faSmrgAC_REQUIRE([AC_PROG_LN_S])dnl
58643d802faSmrgtest -z "$LN_S" && LN_S="ln -s"
58743d802faSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
58843d802faSmrgdnl
58943d802faSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl
59043d802faSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
59143d802faSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
59243d802faSmrgdnl
59343d802faSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
59443d802faSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
59543d802faSmrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
59643d802faSmrgm4_require([_LT_CMD_RELOAD])dnl
59743d802faSmrgm4_require([_LT_DECL_FILECMD])dnl
59843d802faSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl
59943d802faSmrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
60043d802faSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl
60143d802faSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
60243d802faSmrgm4_require([_LT_WITH_SYSROOT])dnl
60343d802faSmrgm4_require([_LT_CMD_TRUNCATE])dnl
6043da084b3Smrg
60543d802faSmrg_LT_CONFIG_LIBTOOL_INIT([
60643d802faSmrg# See if we are running on zsh, and set the options that allow our
60743d802faSmrg# commands through without removal of \ escapes INIT.
60843d802faSmrgif test -n "\${ZSH_VERSION+set}"; then
60943d802faSmrg   setopt NO_GLOB_SUBST
61043d802faSmrgfi
61143d802faSmrg])
61243d802faSmrgif test -n "${ZSH_VERSION+set}"; then
61343d802faSmrg   setopt NO_GLOB_SUBST
61443d802faSmrgfi
615e1c0d025Smrg
61643d802faSmrg_LT_CHECK_OBJDIR
6173da084b3Smrg
61843d802faSmrgm4_require([_LT_TAG_COMPILER])dnl
619d63fdb69Smrg
62043d802faSmrgcase $host_os in
62143d802faSmrgaix3*)
62243d802faSmrg  # AIX sometimes has problems with the GCC collect2 program.  For some
62343d802faSmrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
62443d802faSmrg  # vanish in a puff of smoke.
62543d802faSmrg  if test set != "${COLLECT_NAMES+set}"; then
62643d802faSmrg    COLLECT_NAMES=
62743d802faSmrg    export COLLECT_NAMES
62843d802faSmrg  fi
62943d802faSmrg  ;;
6302a53b785Smrgesac
631d63fdb69Smrg
63243d802faSmrg# Global variables:
63343d802faSmrgofile=libtool
63443d802faSmrgcan_build_shared=yes
63555acc8fcSmrg
63643d802faSmrg# All known linkers require a '.a' archive for static linking (except MSVC and
63743d802faSmrg# ICC, which need '.lib').
63843d802faSmrglibext=a
63955acc8fcSmrg
64043d802faSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld
64155acc8fcSmrg
64243d802faSmrgold_CC=$CC
64343d802faSmrgold_CFLAGS=$CFLAGS
64455acc8fcSmrg
64543d802faSmrg# Set sane defaults for various variables
64643d802faSmrgtest -z "$CC" && CC=cc
64743d802faSmrgtest -z "$LTCC" && LTCC=$CC
64843d802faSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
64943d802faSmrgtest -z "$LD" && LD=ld
65043d802faSmrgtest -z "$ac_objext" && ac_objext=o
651d63fdb69Smrg
65243d802faSmrg_LT_CC_BASENAME([$compiler])
653d63fdb69Smrg
65443d802faSmrg# Only perform the check for file, if the check method requires it
65543d802faSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
65643d802faSmrgcase $deplibs_check_method in
65743d802faSmrgfile_magic*)
65843d802faSmrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
65943d802faSmrg    _LT_PATH_MAGIC
66043d802faSmrg  fi
66143d802faSmrg  ;;
66243d802faSmrgesac
663d63fdb69Smrg
66443d802faSmrg# Use C for the default configuration in the libtool script
66543d802faSmrgLT_SUPPORTED_TAG([CC])
66643d802faSmrg_LT_LANG_C_CONFIG
66743d802faSmrg_LT_LANG_DEFAULT_CONFIG
66843d802faSmrg_LT_CONFIG_COMMANDS
66943d802faSmrg])# _LT_SETUP
670d63fdb69Smrg
67143d802faSmrg
67243d802faSmrg# _LT_PREPARE_SED_QUOTE_VARS
6732a53b785Smrg# --------------------------
67443d802faSmrg# Define a few sed substitution that help us do robust quoting.
67543d802faSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS],
67643d802faSmrg[# Backslashify metacharacters that are still active within
67743d802faSmrg# double-quoted strings.
67843d802faSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
679d63fdb69Smrg
68043d802faSmrg# Same as above, but do not quote variable references.
68143d802faSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g'
6823da084b3Smrg
68343d802faSmrg# Sed substitution to delay expansion of an escaped shell variable in a
68443d802faSmrg# double_quote_subst'ed string.
68543d802faSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
6863da084b3Smrg
68743d802faSmrg# Sed substitution to delay expansion of an escaped single quote.
68843d802faSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
6893da084b3Smrg
69043d802faSmrg# Sed substitution to avoid accidental globbing in evaled expressions
69143d802faSmrgno_glob_subst='s/\*/\\\*/g'
69243d802faSmrg])
6933da084b3Smrg
69443d802faSmrg# _LT_PROG_LTMAIN
69543d802faSmrg# ---------------
69643d802faSmrg# Note that this code is called both from 'configure', and 'config.status'
69743d802faSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
69843d802faSmrg# 'config.status' has no value for ac_aux_dir unless we are using Automake,
69943d802faSmrg# so we pass a copy along to make sure it has a sensible value anyway.
70043d802faSmrgm4_defun([_LT_PROG_LTMAIN],
70143d802faSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
70243d802faSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
70343d802faSmrgltmain=$ac_aux_dir/ltmain.sh
70443d802faSmrg])# _LT_PROG_LTMAIN
70555acc8fcSmrg
7063da084b3Smrg
70755acc8fcSmrg
70843d802faSmrg# So that we can recreate a full libtool script including additional
70943d802faSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
71043d802faSmrg# in macros and then make a single call at the end using the 'libtool'
71143d802faSmrg# label.
71255acc8fcSmrg
713d63fdb69Smrg
71443d802faSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
71543d802faSmrg# ----------------------------------------
71643d802faSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
71743d802faSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT],
71843d802faSmrg[m4_ifval([$1],
71943d802faSmrg          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
72043d802faSmrg                     [$1
72143d802faSmrg])])])
722d63fdb69Smrg
72343d802faSmrg# Initialize.
72443d802faSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT])
725d63fdb69Smrg
72648c85eb7Smrg
72743d802faSmrg# _LT_CONFIG_LIBTOOL([COMMANDS])
72843d802faSmrg# ------------------------------
72943d802faSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
73043d802faSmrgm4_define([_LT_CONFIG_LIBTOOL],
73143d802faSmrg[m4_ifval([$1],
73243d802faSmrg          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
73343d802faSmrg                     [$1
73443d802faSmrg])])])
73548c85eb7Smrg
73643d802faSmrg# Initialize.
73743d802faSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
73848c85eb7Smrg
7393da084b3Smrg
74043d802faSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
74143d802faSmrg# -----------------------------------------------------
74243d802faSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS],
74343d802faSmrg[_LT_CONFIG_LIBTOOL([$1])
74443d802faSmrg_LT_CONFIG_LIBTOOL_INIT([$2])
74543d802faSmrg])
7463da084b3Smrg
74755acc8fcSmrg
74843d802faSmrg# _LT_FORMAT_COMMENT([COMMENT])
74943d802faSmrg# -----------------------------
75043d802faSmrg# Add leading comment marks to the start of each line, and a trailing
75143d802faSmrg# full-stop to the whole comment if one is not present already.
75243d802faSmrgm4_define([_LT_FORMAT_COMMENT],
75343d802faSmrg[m4_ifval([$1], [
75443d802faSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
75543d802faSmrg              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
75643d802faSmrg)])
75755acc8fcSmrg
7583da084b3Smrg
75955acc8fcSmrg
7603da084b3Smrg
76155acc8fcSmrg
76243d802faSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
76343d802faSmrg# -------------------------------------------------------------------
76443d802faSmrg# CONFIGNAME is the name given to the value in the libtool script.
76543d802faSmrg# VARNAME is the (base) name used in the configure script.
76643d802faSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
76743d802faSmrg# VARNAME.  Any other value will be used directly.
76843d802faSmrgm4_define([_LT_DECL],
76943d802faSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
77043d802faSmrg    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
77143d802faSmrg	[m4_ifval([$1], [$1], [$2])])
77243d802faSmrg    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
77343d802faSmrg    m4_ifval([$4],
77443d802faSmrg	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
77543d802faSmrg    lt_dict_add_subkey([lt_decl_dict], [$2],
77643d802faSmrg	[tagged?], [m4_ifval([$5], [yes], [no])])])
77743d802faSmrg])
7783da084b3Smrg
7793da084b3Smrg
78043d802faSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
78143d802faSmrg# --------------------------------------------------------
78243d802faSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
78355acc8fcSmrg
7843da084b3Smrg
78543d802faSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
78643d802faSmrg# ------------------------------------------------
78743d802faSmrgm4_define([lt_decl_tag_varnames],
78843d802faSmrg[_lt_decl_filter([tagged?], [yes], $@)])
78955acc8fcSmrg
7903da084b3Smrg
79143d802faSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
79243d802faSmrg# ---------------------------------------------------------
79343d802faSmrgm4_define([_lt_decl_filter],
79443d802faSmrg[m4_case([$#],
79543d802faSmrg  [0], [m4_fatal([$0: too few arguments: $#])],
79643d802faSmrg  [1], [m4_fatal([$0: too few arguments: $#: $1])],
79743d802faSmrg  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
79843d802faSmrg  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
79943d802faSmrg  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
80043d802faSmrg])
80155acc8fcSmrg
80255acc8fcSmrg
80343d802faSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
80443d802faSmrg# --------------------------------------------------
80543d802faSmrgm4_define([lt_decl_quote_varnames],
80643d802faSmrg[_lt_decl_filter([value], [1], $@)])
8073da084b3Smrg
8083da084b3Smrg
80943d802faSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
81043d802faSmrg# ---------------------------------------------------
81143d802faSmrgm4_define([lt_decl_dquote_varnames],
81243d802faSmrg[_lt_decl_filter([value], [2], $@)])
8133da084b3Smrg
8143da084b3Smrg
81543d802faSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
81643d802faSmrg# ---------------------------------------------------
81743d802faSmrgm4_define([lt_decl_varnames_tagged],
81843d802faSmrg[m4_assert([$# <= 2])dnl
81943d802faSmrg_$0(m4_quote(m4_default([$1], [[, ]])),
82043d802faSmrg    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
82143d802faSmrg    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
82243d802faSmrgm4_define([_lt_decl_varnames_tagged],
82343d802faSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
8243da084b3Smrg
8253da084b3Smrg
82643d802faSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
82743d802faSmrg# ------------------------------------------------
82843d802faSmrgm4_define([lt_decl_all_varnames],
82943d802faSmrg[_$0(m4_quote(m4_default([$1], [[, ]])),
83043d802faSmrg     m4_if([$2], [],
83143d802faSmrg	   m4_quote(lt_decl_varnames),
83243d802faSmrg	m4_quote(m4_shift($@))))[]dnl
83343d802faSmrg])
83443d802faSmrgm4_define([_lt_decl_all_varnames],
83543d802faSmrg[lt_join($@, lt_decl_varnames_tagged([$1],
83643d802faSmrg			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
83743d802faSmrg])
8383da084b3Smrg
8393da084b3Smrg
84043d802faSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME])
84143d802faSmrg# ------------------------------------
84243d802faSmrg# Quote a variable value, and forward it to 'config.status' so that its
84343d802faSmrg# declaration there will have the same value as in 'configure'.  VARNAME
84443d802faSmrg# must have a single quote delimited value for this to work.
84543d802faSmrgm4_define([_LT_CONFIG_STATUS_DECLARE],
84643d802faSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
8473da084b3Smrg
8483da084b3Smrg
84943d802faSmrg# _LT_CONFIG_STATUS_DECLARATIONS
85043d802faSmrg# ------------------------------
85143d802faSmrg# We delimit libtool config variables with single quotes, so when
85243d802faSmrg# we write them to config.status, we have to be sure to quote all
85343d802faSmrg# embedded single quotes properly.  In configure, this macro expands
85443d802faSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
85543d802faSmrg#
85643d802faSmrg#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
85743d802faSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
85843d802faSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
85943d802faSmrg    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
8603da084b3Smrg
8613da084b3Smrg
86243d802faSmrg# _LT_LIBTOOL_TAGS
86343d802faSmrg# ----------------
86443d802faSmrg# Output comment and list of tags supported by the script
86543d802faSmrgm4_defun([_LT_LIBTOOL_TAGS],
86643d802faSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
86743d802faSmrgavailable_tags='_LT_TAGS'dnl
86843d802faSmrg])
8693da084b3Smrg
87055acc8fcSmrg
87143d802faSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
87243d802faSmrg# -----------------------------------
87343d802faSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and
87443d802faSmrg# expand to a commented shell variable setting:
8752a53b785Smrg#
87643d802faSmrg#    # Some comment about what VAR is for.
87743d802faSmrg#    visible_name=$lt_internal_name
87843d802faSmrgm4_define([_LT_LIBTOOL_DECLARE],
87943d802faSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
88043d802faSmrg					   [description])))[]dnl
88143d802faSmrgm4_pushdef([_libtool_name],
88243d802faSmrg    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
88343d802faSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
88443d802faSmrg    [0], [_libtool_name=[$]$1],
88543d802faSmrg    [1], [_libtool_name=$lt_[]$1],
88643d802faSmrg    [2], [_libtool_name=$lt_[]$1],
88743d802faSmrg    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
88843d802faSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
88943d802faSmrg])
89052fd71cdSmrg
8913da084b3Smrg
89243d802faSmrg# _LT_LIBTOOL_CONFIG_VARS
89343d802faSmrg# -----------------------
89443d802faSmrg# Produce commented declarations of non-tagged libtool config variables
89543d802faSmrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
89643d802faSmrg# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
89743d802faSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS.
89843d802faSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS],
89943d802faSmrg[m4_foreach([_lt_var],
90043d802faSmrg    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
90143d802faSmrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
90252fd71cdSmrg
90352fd71cdSmrg
90443d802faSmrg# _LT_LIBTOOL_TAG_VARS(TAG)
90543d802faSmrg# -------------------------
90643d802faSmrgm4_define([_LT_LIBTOOL_TAG_VARS],
90743d802faSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
90843d802faSmrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
90952fd71cdSmrg
91052fd71cdSmrg
91143d802faSmrg# _LT_TAGVAR(VARNAME, [TAGNAME])
91243d802faSmrg# ------------------------------
91343d802faSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
91452fd71cdSmrg
9153da084b3Smrg
91643d802faSmrg# _LT_CONFIG_COMMANDS
9172a53b785Smrg# -------------------
91843d802faSmrg# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
91943d802faSmrg# variables for single and double quote escaping we saved from calls
92043d802faSmrg# to _LT_DECL, we can put quote escaped variables declarations
92143d802faSmrg# into 'config.status', and then the shell code to quote escape them in
92243d802faSmrg# for loops in 'config.status'.  Finally, any additional code accumulated
92343d802faSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
92443d802faSmrgm4_defun([_LT_CONFIG_COMMANDS],
92543d802faSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT],
92643d802faSmrg	dnl If the libtool generation code has been placed in $CONFIG_LT,
92743d802faSmrg	dnl instead of duplicating it all over again into config.status,
92843d802faSmrg	dnl then we will have config.status run $CONFIG_LT later, so it
92943d802faSmrg	dnl needs to know what name is stored there:
93043d802faSmrg        [AC_CONFIG_COMMANDS([libtool],
93143d802faSmrg            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
93243d802faSmrg    dnl If the libtool generation code is destined for config.status,
93343d802faSmrg    dnl expand the accumulated commands and init code now:
93443d802faSmrg    [AC_CONFIG_COMMANDS([libtool],
93543d802faSmrg        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
93643d802faSmrg])#_LT_CONFIG_COMMANDS
9373da084b3Smrg
9383da084b3Smrg
93943d802faSmrg# Initialize.
94043d802faSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
94143d802faSmrg[
9423da084b3Smrg
94343d802faSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout
94443d802faSmrg# if CDPATH is set.
94543d802faSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
9463da084b3Smrg
94743d802faSmrgsed_quote_subst='$sed_quote_subst'
94843d802faSmrgdouble_quote_subst='$double_quote_subst'
94943d802faSmrgdelay_variable_subst='$delay_variable_subst'
95043d802faSmrg_LT_CONFIG_STATUS_DECLARATIONS
95143d802faSmrgLTCC='$LTCC'
95243d802faSmrgLTCFLAGS='$LTCFLAGS'
95343d802faSmrgcompiler='$compiler_DEFAULT'
954d63fdb69Smrg
95543d802faSmrg# A function that is used when there is no print builtin or printf.
95643d802faSmrgfunc_fallback_echo ()
95743d802faSmrg{
95843d802faSmrg  eval 'cat <<_LTECHO_EOF
95943d802faSmrg\$[]1
96043d802faSmrg_LTECHO_EOF'
96143d802faSmrg}
9623da084b3Smrg
96343d802faSmrg# Quote evaled strings.
96443d802faSmrgfor var in lt_decl_all_varnames([[ \
96543d802faSmrg]], lt_decl_quote_varnames); do
96643d802faSmrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
96743d802faSmrg    *[[\\\\\\\`\\"\\\$]]*)
96843d802faSmrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
96943d802faSmrg      ;;
97043d802faSmrg    *)
97143d802faSmrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
97243d802faSmrg      ;;
97343d802faSmrg    esac
97443d802faSmrgdone
9752a53b785Smrg
97643d802faSmrg# Double-quote double-evaled strings.
97743d802faSmrgfor var in lt_decl_all_varnames([[ \
97843d802faSmrg]], lt_decl_dquote_varnames); do
97943d802faSmrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
98043d802faSmrg    *[[\\\\\\\`\\"\\\$]]*)
98143d802faSmrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
98243d802faSmrg      ;;
98343d802faSmrg    *)
98443d802faSmrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
98543d802faSmrg      ;;
98643d802faSmrg    esac
98743d802faSmrgdone
9883da084b3Smrg
98943d802faSmrg_LT_OUTPUT_LIBTOOL_INIT
9902a53b785Smrg])
991d63fdb69Smrg
99243d802faSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
99343d802faSmrg# ------------------------------------
99443d802faSmrg# Generate a child script FILE with all initialization necessary to
99543d802faSmrg# reuse the environment learned by the parent script, and make the
99643d802faSmrg# file executable.  If COMMENT is supplied, it is inserted after the
99743d802faSmrg# '#!' sequence but before initialization text begins.  After this
99843d802faSmrg# macro, additional text can be appended to FILE to form the body of
99943d802faSmrg# the child script.  The macro ends with non-zero status if the
100043d802faSmrg# file could not be fully written (such as if the disk is full).
100143d802faSmrgm4_ifdef([AS_INIT_GENERATED],
100243d802faSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
100343d802faSmrg[m4_defun([_LT_GENERATED_FILE_INIT],
100443d802faSmrg[m4_require([AS_PREPARE])]dnl
100543d802faSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
100643d802faSmrg[lt_write_fail=0
100743d802faSmrgcat >$1 <<_ASEOF || lt_write_fail=1
100843d802faSmrg#! $SHELL
100943d802faSmrg# Generated by $as_me.
101043d802faSmrg$2
101143d802faSmrgSHELL=\${CONFIG_SHELL-$SHELL}
101243d802faSmrgexport SHELL
101343d802faSmrg_ASEOF
101443d802faSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1
101543d802faSmrgAS_SHELL_SANITIZE
101643d802faSmrg_AS_PREPARE
101743d802faSmrgexec AS_MESSAGE_FD>&1
101843d802faSmrg_ASEOF
101943d802faSmrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl
102043d802faSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
10213da084b3Smrg
102243d802faSmrg# LT_OUTPUT
102343d802faSmrg# ---------
102443d802faSmrg# This macro allows early generation of the libtool script (before
102543d802faSmrg# AC_OUTPUT is called), incase it is used in configure for compilation
102643d802faSmrg# tests.
102743d802faSmrgAC_DEFUN([LT_OUTPUT],
102843d802faSmrg[: ${CONFIG_LT=./config.lt}
102943d802faSmrgAC_MSG_NOTICE([creating $CONFIG_LT])
103043d802faSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
103143d802faSmrg[# Run this file to recreate a libtool stub with the current configuration.])
10323da084b3Smrg
103343d802faSmrgcat >>"$CONFIG_LT" <<\_LTEOF
103443d802faSmrglt_cl_silent=false
103543d802faSmrgexec AS_MESSAGE_LOG_FD>>config.log
103643d802faSmrg{
103743d802faSmrg  echo
103843d802faSmrg  AS_BOX([Running $as_me.])
103943d802faSmrg} >&AS_MESSAGE_LOG_FD
10403da084b3Smrg
104143d802faSmrglt_cl_help="\
104243d802faSmrg'$as_me' creates a local libtool stub from the current configuration,
104343d802faSmrgfor use in further configure time tests before the real libtool is
104443d802faSmrggenerated.
10453da084b3Smrg
104643d802faSmrgUsage: $[0] [[OPTIONS]]
10473da084b3Smrg
104843d802faSmrg  -h, --help      print this help, then exit
104943d802faSmrg  -V, --version   print version number, then exit
105043d802faSmrg  -q, --quiet     do not print progress messages
105143d802faSmrg  -d, --debug     don't remove temporary files
10523da084b3Smrg
105343d802faSmrgReport bugs to <bug-libtool@gnu.org>."
10543da084b3Smrg
105543d802faSmrglt_cl_version="\
105643d802faSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
105743d802faSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
105843d802faSmrgconfigured by $[0], generated by m4_PACKAGE_STRING.
10593da084b3Smrg
106043d802faSmrgCopyright (C) 2011 Free Software Foundation, Inc.
106143d802faSmrgThis config.lt script is free software; the Free Software Foundation
106243d802faSmrggives unlimited permision to copy, distribute and modify it."
10633da084b3Smrg
106443d802faSmrgwhile test 0 != $[#]
106543d802faSmrgdo
106643d802faSmrg  case $[1] in
106743d802faSmrg    --version | --v* | -V )
106843d802faSmrg      echo "$lt_cl_version"; exit 0 ;;
106943d802faSmrg    --help | --h* | -h )
107043d802faSmrg      echo "$lt_cl_help"; exit 0 ;;
107143d802faSmrg    --debug | --d* | -d )
107243d802faSmrg      debug=: ;;
107343d802faSmrg    --quiet | --q* | --silent | --s* | -q )
107443d802faSmrg      lt_cl_silent=: ;;
10753da084b3Smrg
107643d802faSmrg    -*) AC_MSG_ERROR([unrecognized option: $[1]
107743d802faSmrgTry '$[0] --help' for more information.]) ;;
10783da084b3Smrg
107943d802faSmrg    *) AC_MSG_ERROR([unrecognized argument: $[1]
108043d802faSmrgTry '$[0] --help' for more information.]) ;;
108143d802faSmrg  esac
108243d802faSmrg  shift
108343d802faSmrgdone
10843da084b3Smrg
108543d802faSmrgif $lt_cl_silent; then
108643d802faSmrg  exec AS_MESSAGE_FD>/dev/null
108743d802faSmrgfi
108843d802faSmrg_LTEOF
10893da084b3Smrg
109043d802faSmrgcat >>"$CONFIG_LT" <<_LTEOF
109143d802faSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
109243d802faSmrg_LTEOF
10933da084b3Smrg
109443d802faSmrgcat >>"$CONFIG_LT" <<\_LTEOF
109543d802faSmrgAC_MSG_NOTICE([creating $ofile])
109643d802faSmrg_LT_OUTPUT_LIBTOOL_COMMANDS
109743d802faSmrgAS_EXIT(0)
109843d802faSmrg_LTEOF
109943d802faSmrgchmod +x "$CONFIG_LT"
11003da084b3Smrg
110143d802faSmrg# configure is writing to config.log, but config.lt does its own redirection,
110243d802faSmrg# appending to config.log, which fails on DOS, as config.log is still kept
110343d802faSmrg# open by configure.  Here we exec the FD to /dev/null, effectively closing
110443d802faSmrg# config.log, so it can be properly (re)opened and appended to by config.lt.
110543d802faSmrglt_cl_success=:
110643d802faSmrgtest yes = "$silent" &&
110743d802faSmrg  lt_config_lt_args="$lt_config_lt_args --quiet"
110843d802faSmrgexec AS_MESSAGE_LOG_FD>/dev/null
110943d802faSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
111043d802faSmrgexec AS_MESSAGE_LOG_FD>>config.log
111143d802faSmrg$lt_cl_success || AS_EXIT(1)
111243d802faSmrg])# LT_OUTPUT
11133da084b3Smrg
11143da084b3Smrg
111543d802faSmrg# _LT_CONFIG(TAG)
111643d802faSmrg# ---------------
111743d802faSmrg# If TAG is the built-in tag, create an initial libtool script with a
111843d802faSmrg# default configuration from the untagged config vars.  Otherwise add code
111943d802faSmrg# to config.status for appending the configuration named by TAG from the
112043d802faSmrg# matching tagged config vars.
112143d802faSmrgm4_defun([_LT_CONFIG],
112243d802faSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
112343d802faSmrg_LT_CONFIG_SAVE_COMMANDS([
112443d802faSmrg  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
112543d802faSmrg  m4_if(_LT_TAG, [C], [
112643d802faSmrg    # See if we are running on zsh, and set the options that allow our
112743d802faSmrg    # commands through without removal of \ escapes.
112843d802faSmrg    if test -n "${ZSH_VERSION+set}"; then
112943d802faSmrg      setopt NO_GLOB_SUBST
113043d802faSmrg    fi
11313da084b3Smrg
113243d802faSmrg    cfgfile=${ofile}T
113343d802faSmrg    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
113443d802faSmrg    $RM "$cfgfile"
11353da084b3Smrg
113643d802faSmrg    cat <<_LT_EOF >> "$cfgfile"
113743d802faSmrg#! $SHELL
113843d802faSmrg# Generated automatically by $as_me ($PACKAGE) $VERSION
113943d802faSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
114043d802faSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
11413da084b3Smrg
114243d802faSmrg# Provide generalized library-building support services.
114343d802faSmrg# Written by Gordon Matzigkeit, 1996
1144d63fdb69Smrg
114543d802faSmrg_LT_COPYING
114643d802faSmrg_LT_LIBTOOL_TAGS
1147d63fdb69Smrg
114843d802faSmrg# Configured defaults for sys_lib_dlsearch_path munging.
114943d802faSmrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
1150d63fdb69Smrg
115143d802faSmrg# ### BEGIN LIBTOOL CONFIG
115243d802faSmrg_LT_LIBTOOL_CONFIG_VARS
115343d802faSmrg_LT_LIBTOOL_TAG_VARS
115443d802faSmrg# ### END LIBTOOL CONFIG
11553da084b3Smrg
115643d802faSmrg_LT_EOF
11573da084b3Smrg
115843d802faSmrg    cat <<'_LT_EOF' >> "$cfgfile"
11593da084b3Smrg
116043d802faSmrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
11613da084b3Smrg
116243d802faSmrg_LT_PREPARE_MUNGE_PATH_LIST
116343d802faSmrg_LT_PREPARE_CC_BASENAME
11643da084b3Smrg
116543d802faSmrg# ### END FUNCTIONS SHARED WITH CONFIGURE
11663da084b3Smrg
116743d802faSmrg_LT_EOF
11683da084b3Smrg
116943d802faSmrg  case $host_os in
117043d802faSmrg  aix3*)
117143d802faSmrg    cat <<\_LT_EOF >> "$cfgfile"
117243d802faSmrg# AIX sometimes has problems with the GCC collect2 program.  For some
117343d802faSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems
117443d802faSmrg# vanish in a puff of smoke.
117543d802faSmrgif test set != "${COLLECT_NAMES+set}"; then
117643d802faSmrg  COLLECT_NAMES=
117743d802faSmrg  export COLLECT_NAMES
117848c85eb7Smrgfi
117943d802faSmrg_LT_EOF
118043d802faSmrg    ;;
118143d802faSmrg  esac
11823da084b3Smrg
118343d802faSmrg  _LT_PROG_LTMAIN
118455acc8fcSmrg
118543d802faSmrg  # We use sed instead of cat because bash on DJGPP gets confused if
118643d802faSmrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
118743d802faSmrg  # text mode, it properly converts lines to CR/LF.  This bash problem
118843d802faSmrg  # is reportedly fixed, but why not run on old versions too?
118943d802faSmrg  $SED '$q' "$ltmain" >> "$cfgfile" \
119043d802faSmrg     || (rm -f "$cfgfile"; exit 1)
11913da084b3Smrg
119243d802faSmrg   mv -f "$cfgfile" "$ofile" ||
119343d802faSmrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
119443d802faSmrg  chmod +x "$ofile"
119543d802faSmrg],
119643d802faSmrg[cat <<_LT_EOF >> "$ofile"
11973da084b3Smrg
119843d802faSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
119943d802faSmrgdnl in a comment (ie after a #).
120043d802faSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1
120143d802faSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG)
120243d802faSmrg# ### END LIBTOOL TAG CONFIG: $1
120343d802faSmrg_LT_EOF
120443d802faSmrg])dnl /m4_if
120543d802faSmrg],
120643d802faSmrg[m4_if([$1], [], [
120743d802faSmrg    PACKAGE='$PACKAGE'
120843d802faSmrg    VERSION='$VERSION'
120943d802faSmrg    RM='$RM'
121043d802faSmrg    ofile='$ofile'], [])
121143d802faSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS
121243d802faSmrg])# _LT_CONFIG
12133da084b3Smrg
12143da084b3Smrg
121543d802faSmrg# LT_SUPPORTED_TAG(TAG)
121643d802faSmrg# ---------------------
121743d802faSmrg# Trace this macro to discover what tags are supported by the libtool
121843d802faSmrg# --tag option, using:
121943d802faSmrg#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
122043d802faSmrgAC_DEFUN([LT_SUPPORTED_TAG], [])
12213da084b3Smrg
12223da084b3Smrg
122343d802faSmrg# C support is built-in for now
122443d802faSmrgm4_define([_LT_LANG_C_enabled], [])
122543d802faSmrgm4_define([_LT_TAGS], [])
12263da084b3Smrg
1227d63fdb69Smrg
122843d802faSmrg# LT_LANG(LANG)
122943d802faSmrg# -------------
123043d802faSmrg# Enable libtool support for the given language if not already enabled.
123143d802faSmrgAC_DEFUN([LT_LANG],
123243d802faSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl
123343d802faSmrgm4_case([$1],
123443d802faSmrg  [C],			[_LT_LANG(C)],
123543d802faSmrg  [C++],		[_LT_LANG(CXX)],
123643d802faSmrg  [Go],			[_LT_LANG(GO)],
123743d802faSmrg  [Java],		[_LT_LANG(GCJ)],
123843d802faSmrg  [Fortran 77],		[_LT_LANG(F77)],
123943d802faSmrg  [Fortran],		[_LT_LANG(FC)],
124043d802faSmrg  [Windows Resource],	[_LT_LANG(RC)],
124143d802faSmrg  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
124243d802faSmrg    [_LT_LANG($1)],
124343d802faSmrg    [m4_fatal([$0: unsupported language: "$1"])])])dnl
124443d802faSmrg])# LT_LANG
124552fd71cdSmrg
12463da084b3Smrg
124743d802faSmrg# _LT_LANG(LANGNAME)
124843d802faSmrg# ------------------
124943d802faSmrgm4_defun([_LT_LANG],
125043d802faSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [],
125143d802faSmrg  [LT_SUPPORTED_TAG([$1])dnl
125243d802faSmrg  m4_append([_LT_TAGS], [$1 ])dnl
125343d802faSmrg  m4_define([_LT_LANG_]$1[_enabled], [])dnl
125443d802faSmrg  _LT_LANG_$1_CONFIG($1)])dnl
125543d802faSmrg])# _LT_LANG
125648c85eb7Smrg
12573da084b3Smrg
125843d802faSmrgm4_ifndef([AC_PROG_GO], [
125943d802faSmrg# NOTE: This macro has been submitted for inclusion into   #
126043d802faSmrg#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
126143d802faSmrg#  a released version of Autoconf we should remove this    #
126243d802faSmrg#  macro and use it instead.                               #
126343d802faSmrgm4_defun([AC_PROG_GO],
126443d802faSmrg[AC_LANG_PUSH(Go)dnl
126543d802faSmrgAC_ARG_VAR([GOC],     [Go compiler command])dnl
126643d802faSmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
126743d802faSmrg_AC_ARG_VAR_LDFLAGS()dnl
126843d802faSmrgAC_CHECK_TOOL(GOC, gccgo)
126943d802faSmrgif test -z "$GOC"; then
127043d802faSmrg  if test -n "$ac_tool_prefix"; then
127143d802faSmrg    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
127243d802faSmrg  fi
127343d802faSmrgfi
127443d802faSmrgif test -z "$GOC"; then
127543d802faSmrg  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
127648c85eb7Smrgfi
127743d802faSmrg])#m4_defun
127843d802faSmrg])#m4_ifndef
12793da084b3Smrg
12803da084b3Smrg
128143d802faSmrg# _LT_LANG_DEFAULT_CONFIG
128243d802faSmrg# -----------------------
128343d802faSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG],
128443d802faSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX],
128543d802faSmrg  [LT_LANG(CXX)],
128643d802faSmrg  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
1287d63fdb69Smrg
128843d802faSmrgAC_PROVIDE_IFELSE([AC_PROG_F77],
128943d802faSmrg  [LT_LANG(F77)],
129043d802faSmrg  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
1291d63fdb69Smrg
129243d802faSmrgAC_PROVIDE_IFELSE([AC_PROG_FC],
129343d802faSmrg  [LT_LANG(FC)],
129443d802faSmrg  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
1295d63fdb69Smrg
129643d802faSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
129743d802faSmrgdnl pulling things in needlessly.
129843d802faSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ],
129943d802faSmrg  [LT_LANG(GCJ)],
130043d802faSmrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
130143d802faSmrg    [LT_LANG(GCJ)],
130243d802faSmrg    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
130343d802faSmrg      [LT_LANG(GCJ)],
130443d802faSmrg      [m4_ifdef([AC_PROG_GCJ],
130543d802faSmrg	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
130643d802faSmrg       m4_ifdef([A][M_PROG_GCJ],
130743d802faSmrg	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
130843d802faSmrg       m4_ifdef([LT_PROG_GCJ],
130943d802faSmrg	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
1310d63fdb69Smrg
131143d802faSmrgAC_PROVIDE_IFELSE([AC_PROG_GO],
131243d802faSmrg  [LT_LANG(GO)],
131343d802faSmrg  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
13143da084b3Smrg
131543d802faSmrgAC_PROVIDE_IFELSE([LT_PROG_RC],
131643d802faSmrg  [LT_LANG(RC)],
131743d802faSmrg  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
131843d802faSmrg])# _LT_LANG_DEFAULT_CONFIG
13193da084b3Smrg
132043d802faSmrg# Obsolete macros:
132143d802faSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
132243d802faSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
132343d802faSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
132443d802faSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
132543d802faSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
132643d802faSmrgdnl aclocal-1.4 backwards compatibility:
132743d802faSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], [])
132843d802faSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], [])
132943d802faSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], [])
133043d802faSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
133143d802faSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], [])
13323da084b3Smrg
13333da084b3Smrg
133443d802faSmrg# _LT_TAG_COMPILER
133543d802faSmrg# ----------------
133643d802faSmrgm4_defun([_LT_TAG_COMPILER],
133743d802faSmrg[AC_REQUIRE([AC_PROG_CC])dnl
13383da084b3Smrg
133943d802faSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
134043d802faSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
134143d802faSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
134243d802faSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
13433da084b3Smrg
134443d802faSmrg# If no C compiler was specified, use CC.
134543d802faSmrgLTCC=${LTCC-"$CC"}
13463da084b3Smrg
134743d802faSmrg# If no C compiler flags were specified, use CFLAGS.
134843d802faSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
13493da084b3Smrg
135043d802faSmrg# Allow CC to be a program name with arguments.
135143d802faSmrgcompiler=$CC
135243d802faSmrg])# _LT_TAG_COMPILER
1353d63fdb69Smrg
13543da084b3Smrg
135543d802faSmrg# _LT_COMPILER_BOILERPLATE
135643d802faSmrg# ------------------------
135743d802faSmrg# Check for compiler boilerplate output or warnings with
135843d802faSmrg# the simple compiler test code.
135943d802faSmrgm4_defun([_LT_COMPILER_BOILERPLATE],
136043d802faSmrg[m4_require([_LT_DECL_SED])dnl
136143d802faSmrgac_outfile=conftest.$ac_objext
136243d802faSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
136343d802faSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
136443d802faSmrg_lt_compiler_boilerplate=`cat conftest.err`
136543d802faSmrg$RM conftest*
136643d802faSmrg])# _LT_COMPILER_BOILERPLATE
13673da084b3Smrg
1368d63fdb69Smrg
136943d802faSmrg# _LT_LINKER_BOILERPLATE
137043d802faSmrg# ----------------------
137143d802faSmrg# Check for linker boilerplate output or warnings with
137243d802faSmrg# the simple link test code.
137343d802faSmrgm4_defun([_LT_LINKER_BOILERPLATE],
137443d802faSmrg[m4_require([_LT_DECL_SED])dnl
137543d802faSmrgac_outfile=conftest.$ac_objext
137643d802faSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
137743d802faSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
137843d802faSmrg_lt_linker_boilerplate=`cat conftest.err`
137943d802faSmrg$RM -r conftest*
138043d802faSmrg])# _LT_LINKER_BOILERPLATE
13813da084b3Smrg
138243d802faSmrg# _LT_REQUIRED_DARWIN_CHECKS
138343d802faSmrg# -------------------------
138443d802faSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
138543d802faSmrg  case $host_os in
138643d802faSmrg    rhapsody* | darwin*)
138743d802faSmrg    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
138843d802faSmrg    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
138943d802faSmrg    AC_CHECK_TOOL([LIPO], [lipo], [:])
139043d802faSmrg    AC_CHECK_TOOL([OTOOL], [otool], [:])
139143d802faSmrg    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
139243d802faSmrg    _LT_DECL([], [DSYMUTIL], [1],
139343d802faSmrg      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
139443d802faSmrg    _LT_DECL([], [NMEDIT], [1],
139543d802faSmrg      [Tool to change global to local symbols on Mac OS X])
139643d802faSmrg    _LT_DECL([], [LIPO], [1],
139743d802faSmrg      [Tool to manipulate fat objects and archives on Mac OS X])
139843d802faSmrg    _LT_DECL([], [OTOOL], [1],
139943d802faSmrg      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
140043d802faSmrg    _LT_DECL([], [OTOOL64], [1],
140143d802faSmrg      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
14023da084b3Smrg
140343d802faSmrg    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
140443d802faSmrg      [lt_cv_apple_cc_single_mod=no
140543d802faSmrg      if test -z "$LT_MULTI_MODULE"; then
140643d802faSmrg	# By default we will add the -single_module flag. You can override
140743d802faSmrg	# by either setting the environment variable LT_MULTI_MODULE
140843d802faSmrg	# non-empty at configure time, or by adding -multi_module to the
140943d802faSmrg	# link flags.
141043d802faSmrg	rm -rf libconftest.dylib*
141143d802faSmrg	echo "int foo(void){return 1;}" > conftest.c
141243d802faSmrg	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
141343d802faSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
141443d802faSmrg	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
141543d802faSmrg	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
141643d802faSmrg        _lt_result=$?
141743d802faSmrg	# If there is a non-empty error log, and "single_module"
141843d802faSmrg	# appears in it, assume the flag caused a linker warning
141943d802faSmrg        if test -s conftest.err && $GREP single_module conftest.err; then
142043d802faSmrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
142143d802faSmrg	# Otherwise, if the output was created with a 0 exit code from
142243d802faSmrg	# the compiler, it worked.
142343d802faSmrg	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
142443d802faSmrg	  lt_cv_apple_cc_single_mod=yes
142543d802faSmrg	else
142643d802faSmrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
142743d802faSmrg	fi
142843d802faSmrg	rm -rf libconftest.dylib*
142943d802faSmrg	rm -f conftest.*
143043d802faSmrg      fi])
14313da084b3Smrg
143243d802faSmrg    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
143343d802faSmrg      [lt_cv_ld_exported_symbols_list],
143443d802faSmrg      [lt_cv_ld_exported_symbols_list=no
143543d802faSmrg      save_LDFLAGS=$LDFLAGS
143643d802faSmrg      echo "_main" > conftest.sym
143743d802faSmrg      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
143843d802faSmrg      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
143943d802faSmrg	[lt_cv_ld_exported_symbols_list=yes],
144043d802faSmrg	[lt_cv_ld_exported_symbols_list=no])
144143d802faSmrg	LDFLAGS=$save_LDFLAGS
144243d802faSmrg    ])
14433da084b3Smrg
144443d802faSmrg    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
144543d802faSmrg      [lt_cv_ld_force_load=no
144643d802faSmrg      cat > conftest.c << _LT_EOF
144743d802faSmrgint forced_loaded() { return 2;}
144843d802faSmrg_LT_EOF
144943d802faSmrg      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
145043d802faSmrg      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
145143d802faSmrg      echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
145243d802faSmrg      $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
145343d802faSmrg      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
145443d802faSmrg      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
145543d802faSmrg      cat > conftest.c << _LT_EOF
145643d802faSmrgint main() { return 0;}
145743d802faSmrg_LT_EOF
145843d802faSmrg      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
145943d802faSmrg      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
146043d802faSmrg      _lt_result=$?
146143d802faSmrg      if test -s conftest.err && $GREP force_load conftest.err; then
146243d802faSmrg	cat conftest.err >&AS_MESSAGE_LOG_FD
146343d802faSmrg      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
146443d802faSmrg	lt_cv_ld_force_load=yes
146543d802faSmrg      else
146643d802faSmrg	cat conftest.err >&AS_MESSAGE_LOG_FD
146743d802faSmrg      fi
146843d802faSmrg        rm -f conftest.err libconftest.a conftest conftest.c
146943d802faSmrg        rm -rf conftest.dSYM
147043d802faSmrg    ])
147143d802faSmrg    case $host_os in
147243d802faSmrg    rhapsody* | darwin1.[[012]])
147343d802faSmrg      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
147443d802faSmrg    darwin1.*)
147543d802faSmrg      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
147643d802faSmrg    darwin*)
147743d802faSmrg      case $MACOSX_DEPLOYMENT_TARGET,$host in
147843d802faSmrg        10.[[012]],*|,*powerpc*-darwin[[5-8]]*)
147943d802faSmrg          _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
148043d802faSmrg        *)
148143d802faSmrg          _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
148243d802faSmrg      esac
148343d802faSmrg    ;;
148443d802faSmrg  esac
148543d802faSmrg    if test yes = "$lt_cv_apple_cc_single_mod"; then
148643d802faSmrg      _lt_dar_single_mod='$single_module'
148743d802faSmrg    fi
148843d802faSmrg    if test yes = "$lt_cv_ld_exported_symbols_list"; then
148943d802faSmrg      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
149043d802faSmrg    else
149143d802faSmrg      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
149243d802faSmrg    fi
149343d802faSmrg    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
149443d802faSmrg      _lt_dsymutil='~$DSYMUTIL $lib || :'
149543d802faSmrg    else
149643d802faSmrg      _lt_dsymutil=
149743d802faSmrg    fi
149843d802faSmrg    ;;
149943d802faSmrg  esac
150043d802faSmrg])
15013da084b3Smrg
15023da084b3Smrg
150343d802faSmrg# _LT_DARWIN_LINKER_FEATURES([TAG])
150443d802faSmrg# ---------------------------------
150543d802faSmrg# Checks for linker and compiler features on darwin
150643d802faSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES],
150743d802faSmrg[
150843d802faSmrg  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
150943d802faSmrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
151043d802faSmrg  _LT_TAGVAR(hardcode_direct, $1)=no
151143d802faSmrg  _LT_TAGVAR(hardcode_automatic, $1)=yes
151243d802faSmrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
151343d802faSmrg  if test yes = "$lt_cv_ld_force_load"; then
151443d802faSmrg    _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
151543d802faSmrg    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
151643d802faSmrg                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
151743d802faSmrg  else
151843d802faSmrg    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
151943d802faSmrg  fi
152043d802faSmrg  _LT_TAGVAR(link_all_deplibs, $1)=yes
152143d802faSmrg  _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
152243d802faSmrg  case $cc_basename in
152343d802faSmrg     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
152443d802faSmrg     *) _lt_dar_can_shared=$GCC ;;
152543d802faSmrg  esac
152643d802faSmrg  if test yes = "$_lt_dar_can_shared"; then
152743d802faSmrg    output_verbose_link_cmd=func_echo_all
152843d802faSmrg    _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
152943d802faSmrg    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
153043d802faSmrg    _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
153143d802faSmrg    _LT_TAGVAR(module_expsym_cmds, $1)="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
153243d802faSmrg    m4_if([$1], [CXX],
153343d802faSmrg[   if test yes != "$lt_cv_apple_cc_single_mod"; then
153443d802faSmrg      _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
153543d802faSmrg      _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
153643d802faSmrg    fi
153743d802faSmrg],[])
153843d802faSmrg  else
153943d802faSmrg  _LT_TAGVAR(ld_shlibs, $1)=no
154043d802faSmrg  fi
154143d802faSmrg])
15423da084b3Smrg
154343d802faSmrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
154443d802faSmrg# ----------------------------------
154543d802faSmrg# Links a minimal program and checks the executable
154643d802faSmrg# for the system default hardcoded library path. In most cases,
154743d802faSmrg# this is /usr/lib:/lib, but when the MPI compilers are used
154843d802faSmrg# the location of the communication and MPI libs are included too.
154943d802faSmrg# If we don't find anything, use the default library path according
155043d802faSmrg# to the aix ld manual.
155143d802faSmrg# Store the results from the different compilers for each TAGNAME.
155243d802faSmrg# Allow to override them for all tags through lt_cv_aix_libpath.
155343d802faSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX],
155443d802faSmrg[m4_require([_LT_DECL_SED])dnl
155543d802faSmrgif test set = "${lt_cv_aix_libpath+set}"; then
155643d802faSmrg  aix_libpath=$lt_cv_aix_libpath
15572a53b785Smrgelse
155843d802faSmrg  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
155943d802faSmrg  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
156043d802faSmrg  lt_aix_libpath_sed='[
156143d802faSmrg      /Import File Strings/,/^$/ {
156243d802faSmrg	  /^0/ {
156343d802faSmrg	      s/^0  *\([^ ]*\) *$/\1/
156443d802faSmrg	      p
156543d802faSmrg	  }
156643d802faSmrg      }]'
156743d802faSmrg  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
156843d802faSmrg  # Check for a 64-bit object if we didn't find anything.
156943d802faSmrg  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
157043d802faSmrg    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
157143d802faSmrg  fi],[])
157243d802faSmrg  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
157343d802faSmrg    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
157443d802faSmrg  fi
157543d802faSmrg  ])
157643d802faSmrg  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
15772a53b785Smrgfi
157843d802faSmrg])# _LT_SYS_MODULE_PATH_AIX
15793da084b3Smrg
15803da084b3Smrg
158143d802faSmrg# _LT_SHELL_INIT(ARG)
158243d802faSmrg# -------------------
158343d802faSmrgm4_define([_LT_SHELL_INIT],
158443d802faSmrg[m4_divert_text([M4SH-INIT], [$1
158543d802faSmrg])])# _LT_SHELL_INIT
15863da084b3Smrg
15873da084b3Smrg
158843d802faSmrg
158943d802faSmrg# _LT_PROG_ECHO_BACKSLASH
159043d802faSmrg# -----------------------
159143d802faSmrg# Find how we can fake an echo command that does not interpret backslash.
159243d802faSmrg# In particular, with Autoconf 2.60 or later we add some code to the start
159343d802faSmrg# of the generated configure script that will find a shell with a builtin
159443d802faSmrg# printf (that we can use as an echo command).
159543d802faSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH],
159643d802faSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
159743d802faSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
159843d802faSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
159943d802faSmrg
160043d802faSmrgAC_MSG_CHECKING([how to print strings])
160143d802faSmrg# Test print first, because it will be a builtin if present.
160243d802faSmrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
160343d802faSmrg   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
160443d802faSmrg  ECHO='print -r --'
160543d802faSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
160643d802faSmrg  ECHO='printf %s\n'
16072a53b785Smrgelse
160843d802faSmrg  # Use this function as a fallback that always works.
160943d802faSmrg  func_fallback_echo ()
161043d802faSmrg  {
161143d802faSmrg    eval 'cat <<_LTECHO_EOF
161243d802faSmrg$[]1
161343d802faSmrg_LTECHO_EOF'
161443d802faSmrg  }
161543d802faSmrg  ECHO='func_fallback_echo'
16162a53b785Smrgfi
16173da084b3Smrg
161843d802faSmrg# func_echo_all arg...
161943d802faSmrg# Invoke $ECHO with all args, space-separated.
162043d802faSmrgfunc_echo_all ()
162143d802faSmrg{
162243d802faSmrg    $ECHO "$*"
162343d802faSmrg}
16243da084b3Smrg
162543d802faSmrgcase $ECHO in
162643d802faSmrg  printf*) AC_MSG_RESULT([printf]) ;;
162743d802faSmrg  print*) AC_MSG_RESULT([print -r]) ;;
162843d802faSmrg  *) AC_MSG_RESULT([cat]) ;;
162943d802faSmrgesac
16303da084b3Smrg
163143d802faSmrgm4_ifdef([_AS_DETECT_SUGGESTED],
163243d802faSmrg[_AS_DETECT_SUGGESTED([
163343d802faSmrg  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
163443d802faSmrg    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
163543d802faSmrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
163643d802faSmrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
163743d802faSmrg    PATH=/empty FPATH=/empty; export PATH FPATH
163843d802faSmrg    test "X`printf %s $ECHO`" = "X$ECHO" \
163943d802faSmrg      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
16403da084b3Smrg
164143d802faSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
164243d802faSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
164343d802faSmrg])# _LT_PROG_ECHO_BACKSLASH
16443da084b3Smrg
16453da084b3Smrg
164643d802faSmrg# _LT_WITH_SYSROOT
164743d802faSmrg# ----------------
164843d802faSmrgAC_DEFUN([_LT_WITH_SYSROOT],
164943d802faSmrg[m4_require([_LT_DECL_SED])dnl
165043d802faSmrgAC_MSG_CHECKING([for sysroot])
165143d802faSmrgAC_ARG_WITH([sysroot],
165243d802faSmrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
165343d802faSmrg  [Search for dependent libraries within DIR (or the compiler's sysroot
165443d802faSmrg   if not specified).])],
165543d802faSmrg[], [with_sysroot=no])
16563da084b3Smrg
165743d802faSmrgdnl lt_sysroot will always be passed unquoted.  We quote it here
165843d802faSmrgdnl in case the user passed a directory name.
165943d802faSmrglt_sysroot=
166043d802faSmrgcase $with_sysroot in #(
166143d802faSmrg yes)
166243d802faSmrg   if test yes = "$GCC"; then
166343d802faSmrg     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
16642a53b785Smrg   fi
166543d802faSmrg   ;; #(
166643d802faSmrg /*)
166743d802faSmrg   lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"`
166843d802faSmrg   ;; #(
166943d802faSmrg no|'')
167043d802faSmrg   ;; #(
167143d802faSmrg *)
167243d802faSmrg   AC_MSG_RESULT([$with_sysroot])
167343d802faSmrg   AC_MSG_ERROR([The sysroot must be an absolute path.])
167443d802faSmrg   ;;
167543d802faSmrgesac
167648c85eb7Smrg
167743d802faSmrg AC_MSG_RESULT([${lt_sysroot:-no}])
167843d802faSmrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
167943d802faSmrg[dependent libraries, and where our libraries should be installed.])])
168055acc8fcSmrg
168143d802faSmrg# _LT_ENABLE_LOCK
168243d802faSmrg# ---------------
168343d802faSmrgm4_defun([_LT_ENABLE_LOCK],
168443d802faSmrg[AC_ARG_ENABLE([libtool-lock],
168543d802faSmrg  [AS_HELP_STRING([--disable-libtool-lock],
168643d802faSmrg    [avoid locking (might break parallel builds)])])
168743d802faSmrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes
168855acc8fcSmrg
168943d802faSmrg# Some flags need to be propagated to the compiler or linker for good
169043d802faSmrg# libtool support.
169143d802faSmrgcase $host in
169243d802faSmrgia64-*-hpux*)
169343d802faSmrg  # Find out what ABI is being produced by ac_compile, and set mode
169443d802faSmrg  # options accordingly.
169543d802faSmrg  echo 'int i;' > conftest.$ac_ext
169643d802faSmrg  if AC_TRY_EVAL(ac_compile); then
169743d802faSmrg    case `$FILECMD conftest.$ac_objext` in
169843d802faSmrg      *ELF-32*)
169943d802faSmrg	HPUX_IA64_MODE=32
170043d802faSmrg	;;
170143d802faSmrg      *ELF-64*)
170243d802faSmrg	HPUX_IA64_MODE=64
170343d802faSmrg	;;
170443d802faSmrg    esac
170543d802faSmrg  fi
170643d802faSmrg  rm -rf conftest*
170743d802faSmrg  ;;
170843d802faSmrg*-*-irix6*)
170943d802faSmrg  # Find out what ABI is being produced by ac_compile, and set linker
171043d802faSmrg  # options accordingly.
171143d802faSmrg  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
171243d802faSmrg  if AC_TRY_EVAL(ac_compile); then
171343d802faSmrg    if test yes = "$lt_cv_prog_gnu_ld"; then
171443d802faSmrg      case `$FILECMD conftest.$ac_objext` in
171543d802faSmrg	*32-bit*)
171643d802faSmrg	  LD="${LD-ld} -melf32bsmip"
171743d802faSmrg	  ;;
171843d802faSmrg	*N32*)
171943d802faSmrg	  LD="${LD-ld} -melf32bmipn32"
172043d802faSmrg	  ;;
172143d802faSmrg	*64-bit*)
172243d802faSmrg	  LD="${LD-ld} -melf64bmip"
172343d802faSmrg	;;
172443d802faSmrg      esac
172543d802faSmrg    else
172643d802faSmrg      case `$FILECMD conftest.$ac_objext` in
172743d802faSmrg	*32-bit*)
172843d802faSmrg	  LD="${LD-ld} -32"
172943d802faSmrg	  ;;
173043d802faSmrg	*N32*)
173143d802faSmrg	  LD="${LD-ld} -n32"
173243d802faSmrg	  ;;
173343d802faSmrg	*64-bit*)
173443d802faSmrg	  LD="${LD-ld} -64"
173543d802faSmrg	  ;;
173643d802faSmrg      esac
173743d802faSmrg    fi
173843d802faSmrg  fi
173943d802faSmrg  rm -rf conftest*
174043d802faSmrg  ;;
174155acc8fcSmrg
174243d802faSmrgmips64*-*linux*)
174343d802faSmrg  # Find out what ABI is being produced by ac_compile, and set linker
174443d802faSmrg  # options accordingly.
174543d802faSmrg  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
174643d802faSmrg  if AC_TRY_EVAL(ac_compile); then
174743d802faSmrg    emul=elf
174843d802faSmrg    case `$FILECMD conftest.$ac_objext` in
174943d802faSmrg      *32-bit*)
175043d802faSmrg	emul="${emul}32"
175143d802faSmrg	;;
175243d802faSmrg      *64-bit*)
175343d802faSmrg	emul="${emul}64"
175443d802faSmrg	;;
175543d802faSmrg    esac
175643d802faSmrg    case `$FILECMD conftest.$ac_objext` in
175743d802faSmrg      *MSB*)
175843d802faSmrg	emul="${emul}btsmip"
175943d802faSmrg	;;
176043d802faSmrg      *LSB*)
176143d802faSmrg	emul="${emul}ltsmip"
176243d802faSmrg	;;
176343d802faSmrg    esac
176443d802faSmrg    case `$FILECMD conftest.$ac_objext` in
176543d802faSmrg      *N32*)
176643d802faSmrg	emul="${emul}n32"
176743d802faSmrg	;;
176843d802faSmrg    esac
176943d802faSmrg    LD="${LD-ld} -m $emul"
177048c85eb7Smrg  fi
177143d802faSmrg  rm -rf conftest*
177243d802faSmrg  ;;
177355acc8fcSmrg
177443d802faSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
177543d802faSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*)
177643d802faSmrg  # Find out what ABI is being produced by ac_compile, and set linker
177743d802faSmrg  # options accordingly.  Note that the listed cases only cover the
177843d802faSmrg  # situations where additional linker options are needed (such as when
177943d802faSmrg  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
178043d802faSmrg  # vice versa); the common cases where no linker options are needed do
178143d802faSmrg  # not appear in the list.
178243d802faSmrg  echo 'int i;' > conftest.$ac_ext
178343d802faSmrg  if AC_TRY_EVAL(ac_compile); then
178443d802faSmrg    case `$FILECMD conftest.o` in
178543d802faSmrg      *32-bit*)
178643d802faSmrg	case $host in
178743d802faSmrg	  x86_64-*kfreebsd*-gnu)
178843d802faSmrg	    LD="${LD-ld} -m elf_i386_fbsd"
178943d802faSmrg	    ;;
179043d802faSmrg	  x86_64-*linux*)
179143d802faSmrg	    case `$FILECMD conftest.o` in
179243d802faSmrg	      *x86-64*)
179343d802faSmrg		LD="${LD-ld} -m elf32_x86_64"
179443d802faSmrg		;;
179543d802faSmrg	      *)
179643d802faSmrg		LD="${LD-ld} -m elf_i386"
179743d802faSmrg		;;
179843d802faSmrg	    esac
179943d802faSmrg	    ;;
180043d802faSmrg	  powerpc64le-*linux*)
180143d802faSmrg	    LD="${LD-ld} -m elf32lppclinux"
180243d802faSmrg	    ;;
180343d802faSmrg	  powerpc64-*linux*)
180443d802faSmrg	    LD="${LD-ld} -m elf32ppclinux"
180543d802faSmrg	    ;;
180643d802faSmrg	  s390x-*linux*)
180743d802faSmrg	    LD="${LD-ld} -m elf_s390"
180843d802faSmrg	    ;;
180943d802faSmrg	  sparc64-*linux*)
181043d802faSmrg	    LD="${LD-ld} -m elf32_sparc"
181143d802faSmrg	    ;;
181243d802faSmrg	esac
181343d802faSmrg	;;
181443d802faSmrg      *64-bit*)
181543d802faSmrg	case $host in
181643d802faSmrg	  x86_64-*kfreebsd*-gnu)
181743d802faSmrg	    LD="${LD-ld} -m elf_x86_64_fbsd"
181843d802faSmrg	    ;;
181943d802faSmrg	  x86_64-*linux*)
182043d802faSmrg	    LD="${LD-ld} -m elf_x86_64"
182143d802faSmrg	    ;;
182243d802faSmrg	  powerpcle-*linux*|powerpc64le-*linux*)
182343d802faSmrg	    LD="${LD-ld} -m elf64lppc"
182443d802faSmrg	    ;;
182543d802faSmrg	  powerpc-*linux*|powerpc64-*linux*)
182643d802faSmrg	    LD="${LD-ld} -m elf64ppc"
182743d802faSmrg	    ;;
182843d802faSmrg	  s390*-*linux*|s390*-*tpf*)
182943d802faSmrg	    LD="${LD-ld} -m elf64_s390"
183043d802faSmrg	    ;;
183143d802faSmrg	  sparc*-*linux*)
183243d802faSmrg	    LD="${LD-ld} -m elf64_sparc"
183343d802faSmrg	    ;;
183443d802faSmrg	esac
183543d802faSmrg	;;
183643d802faSmrg    esac
18372a53b785Smrg  fi
183843d802faSmrg  rm -rf conftest*
183943d802faSmrg  ;;
184055acc8fcSmrg
184143d802faSmrg*-*-sco3.2v5*)
184243d802faSmrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
184343d802faSmrg  SAVE_CFLAGS=$CFLAGS
184443d802faSmrg  CFLAGS="$CFLAGS -belf"
184543d802faSmrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
184643d802faSmrg    [AC_LANG_PUSH(C)
184743d802faSmrg     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
184843d802faSmrg     AC_LANG_POP])
184943d802faSmrg  if test yes != "$lt_cv_cc_needs_belf"; then
185043d802faSmrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
185143d802faSmrg    CFLAGS=$SAVE_CFLAGS
18522a53b785Smrg  fi
185343d802faSmrg  ;;
185443d802faSmrg*-*solaris*)
185543d802faSmrg  # Find out what ABI is being produced by ac_compile, and set linker
185643d802faSmrg  # options accordingly.
185743d802faSmrg  echo 'int i;' > conftest.$ac_ext
185843d802faSmrg  if AC_TRY_EVAL(ac_compile); then
185943d802faSmrg    case `$FILECMD conftest.o` in
186043d802faSmrg    *64-bit*)
186143d802faSmrg      case $lt_cv_prog_gnu_ld in
186243d802faSmrg      yes*)
186343d802faSmrg        case $host in
186443d802faSmrg        i?86-*-solaris*|x86_64-*-solaris*)
186543d802faSmrg          LD="${LD-ld} -m elf_x86_64"
186643d802faSmrg          ;;
186743d802faSmrg        sparc*-*-solaris*)
186843d802faSmrg          LD="${LD-ld} -m elf64_sparc"
186943d802faSmrg          ;;
187043d802faSmrg        esac
187143d802faSmrg        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
187243d802faSmrg        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
187343d802faSmrg          LD=${LD-ld}_sol2
187443d802faSmrg        fi
187543d802faSmrg        ;;
187643d802faSmrg      *)
187743d802faSmrg	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
187843d802faSmrg	  LD="${LD-ld} -64"
187943d802faSmrg	fi
188043d802faSmrg	;;
188143d802faSmrg      esac
188243d802faSmrg      ;;
188343d802faSmrg    esac
18842a53b785Smrg  fi
188543d802faSmrg  rm -rf conftest*
188643d802faSmrg  ;;
188743d802faSmrgesac
18882a53b785Smrg
188943d802faSmrgneed_locks=$enable_libtool_lock
189043d802faSmrg])# _LT_ENABLE_LOCK
189155acc8fcSmrg
18922a53b785Smrg
189343d802faSmrg# _LT_PROG_AR
189443d802faSmrg# -----------
189543d802faSmrgm4_defun([_LT_PROG_AR],
189643d802faSmrg[AC_CHECK_TOOLS(AR, [ar], false)
189743d802faSmrg: ${AR=ar}
189843d802faSmrg_LT_DECL([], [AR], [1], [The archiver])
189952fd71cdSmrg
190043d802faSmrg# Use ARFLAGS variable as AR's operation code to sync the variable naming with
190143d802faSmrg# Automake.  If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
190243d802faSmrg# higher priority because thats what people were doing historically (setting
190343d802faSmrg# ARFLAGS for automake and AR_FLAGS for libtool).  FIXME: Make the AR_FLAGS
190443d802faSmrg# variable obsoleted/removed.
190552fd71cdSmrg
190643d802faSmrgtest ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
190743d802faSmrglt_ar_flags=$AR_FLAGS
190843d802faSmrg_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)])
19092a53b785Smrg
191043d802faSmrg# Make AR_FLAGS overridable by 'make ARFLAGS='.  Don't try to run-time override
191143d802faSmrg# by AR_FLAGS because that was never working and AR_FLAGS is about to die.
191243d802faSmrg_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}],
191343d802faSmrg         [Flags to create an archive])
19142a53b785Smrg
191543d802faSmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
191643d802faSmrg  [lt_cv_ar_at_file=no
191743d802faSmrg   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
191843d802faSmrg     [echo conftest.$ac_objext > conftest.lst
191943d802faSmrg      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
192043d802faSmrg      AC_TRY_EVAL([lt_ar_try])
192143d802faSmrg      if test 0 -eq "$ac_status"; then
192243d802faSmrg	# Ensure the archiver fails upon bogus file names.
192343d802faSmrg	rm -f conftest.$ac_objext libconftest.a
192443d802faSmrg	AC_TRY_EVAL([lt_ar_try])
192543d802faSmrg	if test 0 -ne "$ac_status"; then
192643d802faSmrg          lt_cv_ar_at_file=@
192743d802faSmrg        fi
192843d802faSmrg      fi
192943d802faSmrg      rm -f conftest.* libconftest.a
193043d802faSmrg     ])
193143d802faSmrg  ])
19322a53b785Smrg
193343d802faSmrgif test no = "$lt_cv_ar_at_file"; then
193443d802faSmrg  archiver_list_spec=
193548c85eb7Smrgelse
193643d802faSmrg  archiver_list_spec=$lt_cv_ar_at_file
19372a53b785Smrgfi
193843d802faSmrg_LT_DECL([], [archiver_list_spec], [1],
193943d802faSmrg  [How to feed a file listing to the archiver])
194043d802faSmrg])# _LT_PROG_AR
194155acc8fcSmrg
194255acc8fcSmrg
194343d802faSmrg# _LT_CMD_OLD_ARCHIVE
194443d802faSmrg# -------------------
194543d802faSmrgm4_defun([_LT_CMD_OLD_ARCHIVE],
194643d802faSmrg[_LT_PROG_AR
19472a53b785Smrg
194843d802faSmrgAC_CHECK_TOOL(STRIP, strip, :)
194943d802faSmrgtest -z "$STRIP" && STRIP=:
195043d802faSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program])
195143d802faSmrg
195243d802faSmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
195343d802faSmrgtest -z "$RANLIB" && RANLIB=:
195443d802faSmrg_LT_DECL([], [RANLIB], [1],
195543d802faSmrg    [Commands used to install an old-style archive])
195643d802faSmrg
195743d802faSmrg# Determine commands to create old-style static archives.
195843d802faSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
195943d802faSmrgold_postinstall_cmds='chmod 644 $oldlib'
196043d802faSmrgold_postuninstall_cmds=
196143d802faSmrg
196243d802faSmrgif test -n "$RANLIB"; then
196343d802faSmrg  case $host_os in
196443d802faSmrg  bitrig* | openbsd*)
196543d802faSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
196643d802faSmrg    ;;
196743d802faSmrg  *)
196843d802faSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
196943d802faSmrg    ;;
197043d802faSmrg  esac
197143d802faSmrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
197243d802faSmrgfi
197352fd71cdSmrg
197448c85eb7Smrgcase $host_os in
197543d802faSmrg  darwin*)
197643d802faSmrg    lock_old_archive_extraction=yes ;;
197743d802faSmrg  *)
197843d802faSmrg    lock_old_archive_extraction=no ;;
19792a53b785Smrgesac
198043d802faSmrg_LT_DECL([], [old_postinstall_cmds], [2])
198143d802faSmrg_LT_DECL([], [old_postuninstall_cmds], [2])
198243d802faSmrg_LT_TAGDECL([], [old_archive_cmds], [2],
198343d802faSmrg    [Commands used to build an old-style archive])
198443d802faSmrg_LT_DECL([], [lock_old_archive_extraction], [0],
198543d802faSmrg    [Whether to use a lock for old archive extraction])
198643d802faSmrg])# _LT_CMD_OLD_ARCHIVE
198755acc8fcSmrg
198843d802faSmrg
198943d802faSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
199043d802faSmrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
199143d802faSmrg# ----------------------------------------------------------------
199243d802faSmrg# Check whether the given compiler option works
199343d802faSmrgAC_DEFUN([_LT_COMPILER_OPTION],
199443d802faSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
199543d802faSmrgm4_require([_LT_DECL_SED])dnl
199643d802faSmrgAC_CACHE_CHECK([$1], [$2],
199743d802faSmrg  [$2=no
199843d802faSmrg   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
199943d802faSmrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
200043d802faSmrg   lt_compiler_flag="$3"  ## exclude from sc_useless_quotes_in_assignment
200143d802faSmrg   # Insert the option either (1) after the last *FLAGS variable, or
200243d802faSmrg   # (2) before a word containing "conftest.", or (3) at the end.
200343d802faSmrg   # Note that $ac_compile itself does not contain backslashes and begins
200443d802faSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
200543d802faSmrg   # The option is referenced via a variable to avoid confusing sed.
200643d802faSmrg   lt_compile=`echo "$ac_compile" | $SED \
200743d802faSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
200843d802faSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
200943d802faSmrg   -e 's:$: $lt_compiler_flag:'`
201043d802faSmrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
201143d802faSmrg   (eval "$lt_compile" 2>conftest.err)
201243d802faSmrg   ac_status=$?
201343d802faSmrg   cat conftest.err >&AS_MESSAGE_LOG_FD
201443d802faSmrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
201543d802faSmrg   if (exit $ac_status) && test -s "$ac_outfile"; then
201643d802faSmrg     # The compiler can only warn and ignore the option if not recognized
201743d802faSmrg     # So say no if there are warnings other than the usual output.
201843d802faSmrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
201943d802faSmrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
202043d802faSmrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
202143d802faSmrg       $2=yes
202243d802faSmrg     fi
20232a53b785Smrg   fi
202443d802faSmrg   $RM conftest*
202543d802faSmrg])
202655acc8fcSmrg
202743d802faSmrgif test yes = "[$]$2"; then
202843d802faSmrg    m4_if([$5], , :, [$5])
202943d802faSmrgelse
203043d802faSmrg    m4_if([$6], , :, [$6])
20312a53b785Smrgfi
203243d802faSmrg])# _LT_COMPILER_OPTION
203352fd71cdSmrg
203443d802faSmrg# Old name:
203543d802faSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
203643d802faSmrgdnl aclocal-1.4 backwards compatibility:
203743d802faSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
203855acc8fcSmrg
203955acc8fcSmrg
204043d802faSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
204143d802faSmrg#                  [ACTION-SUCCESS], [ACTION-FAILURE])
204243d802faSmrg# ----------------------------------------------------
204343d802faSmrg# Check whether the given linker option works
204443d802faSmrgAC_DEFUN([_LT_LINKER_OPTION],
204543d802faSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
204643d802faSmrgm4_require([_LT_DECL_SED])dnl
204743d802faSmrgAC_CACHE_CHECK([$1], [$2],
204843d802faSmrg  [$2=no
204943d802faSmrg   save_LDFLAGS=$LDFLAGS
205043d802faSmrg   LDFLAGS="$LDFLAGS $3"
205143d802faSmrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
205243d802faSmrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
205343d802faSmrg     # The linker can only warn and ignore the option if not recognized
205443d802faSmrg     # So say no if there are warnings
205543d802faSmrg     if test -s conftest.err; then
205643d802faSmrg       # Append any errors to the config.log.
205743d802faSmrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
205843d802faSmrg       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
205943d802faSmrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
206043d802faSmrg       if diff conftest.exp conftest.er2 >/dev/null; then
206143d802faSmrg         $2=yes
206243d802faSmrg       fi
206343d802faSmrg     else
206443d802faSmrg       $2=yes
206543d802faSmrg     fi
20662a53b785Smrg   fi
206743d802faSmrg   $RM -r conftest*
206843d802faSmrg   LDFLAGS=$save_LDFLAGS
206943d802faSmrg])
207043d802faSmrg
207143d802faSmrgif test yes = "[$]$2"; then
207243d802faSmrg    m4_if([$4], , :, [$4])
207343d802faSmrgelse
207443d802faSmrg    m4_if([$5], , :, [$5])
20752a53b785Smrgfi
207643d802faSmrg])# _LT_LINKER_OPTION
207755acc8fcSmrg
207843d802faSmrg# Old name:
207943d802faSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
208043d802faSmrgdnl aclocal-1.4 backwards compatibility:
208143d802faSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
208255acc8fcSmrg
208355acc8fcSmrg
208443d802faSmrg# LT_CMD_MAX_LEN
208543d802faSmrg#---------------
208643d802faSmrgAC_DEFUN([LT_CMD_MAX_LEN],
208743d802faSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
208843d802faSmrg# find the maximum length of command line arguments
208943d802faSmrgAC_MSG_CHECKING([the maximum length of command line arguments])
209043d802faSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
209143d802faSmrg  i=0
209243d802faSmrg  teststring=ABCD
209348c85eb7Smrg
209443d802faSmrg  case $build_os in
209543d802faSmrg  msdosdjgpp*)
209643d802faSmrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
209743d802faSmrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
209843d802faSmrg    # during glob expansion).  Even if it were fixed, the result of this
209943d802faSmrg    # check would be larger than it should be.
210043d802faSmrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
210143d802faSmrg    ;;
210255acc8fcSmrg
210343d802faSmrg  gnu*)
210443d802faSmrg    # Under GNU Hurd, this test is not required because there is
210543d802faSmrg    # no limit to the length of command line arguments.
210643d802faSmrg    # Libtool will interpret -1 as no limit whatsoever
210743d802faSmrg    lt_cv_sys_max_cmd_len=-1;
210843d802faSmrg    ;;
210955acc8fcSmrg
211043d802faSmrg  cygwin* | mingw* | cegcc*)
211143d802faSmrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
211243d802faSmrg    # about 5 minutes as the teststring grows exponentially.
211343d802faSmrg    # Worse, since 9x/ME are not pre-emptively multitasking,
211443d802faSmrg    # you end up with a "frozen" computer, even though with patience
211543d802faSmrg    # the test eventually succeeds (with a max line length of 256k).
211643d802faSmrg    # Instead, let's just punt: use the minimum linelength reported by
211743d802faSmrg    # all of the supported platforms: 8192 (on NT/2K/XP).
211843d802faSmrg    lt_cv_sys_max_cmd_len=8192;
211943d802faSmrg    ;;
212055acc8fcSmrg
212143d802faSmrg  mint*)
212243d802faSmrg    # On MiNT this can take a long time and run out of memory.
212343d802faSmrg    lt_cv_sys_max_cmd_len=8192;
212443d802faSmrg    ;;
212555acc8fcSmrg
212643d802faSmrg  mint*)
212743d802faSmrg    # On MiNT this can take a long time and run out of memory.
212843d802faSmrg    lt_cv_sys_max_cmd_len=8192;
212943d802faSmrg    ;;
213055acc8fcSmrg
213143d802faSmrg  amigaos*)
213243d802faSmrg    # On AmigaOS with pdksh, this test takes hours, literally.
213343d802faSmrg    # So we just punt and use a minimum line length of 8192.
213443d802faSmrg    lt_cv_sys_max_cmd_len=8192;
213543d802faSmrg    ;;
213655acc8fcSmrg
213743d802faSmrg  bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
213843d802faSmrg    # This has been around since 386BSD, at least.  Likely further.
213943d802faSmrg    if test -x /sbin/sysctl; then
214043d802faSmrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
214143d802faSmrg    elif test -x /usr/sbin/sysctl; then
214243d802faSmrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
214343d802faSmrg    else
214443d802faSmrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
214543d802faSmrg    fi
214643d802faSmrg    # And add a safety zone
214743d802faSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
214843d802faSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
214943d802faSmrg    ;;
215055acc8fcSmrg
215143d802faSmrg  interix*)
215243d802faSmrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
215343d802faSmrg    lt_cv_sys_max_cmd_len=196608
215443d802faSmrg    ;;
215555acc8fcSmrg
215643d802faSmrg  os2*)
215743d802faSmrg    # The test takes a long time on OS/2.
215843d802faSmrg    lt_cv_sys_max_cmd_len=8192
215943d802faSmrg    ;;
216055acc8fcSmrg
216143d802faSmrg  osf*)
216243d802faSmrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
216343d802faSmrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
216443d802faSmrg    # nice to cause kernel panics so lets avoid the loop below.
216543d802faSmrg    # First set a reasonable default.
216643d802faSmrg    lt_cv_sys_max_cmd_len=16384
216743d802faSmrg    #
216843d802faSmrg    if test -x /sbin/sysconfig; then
216943d802faSmrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
217043d802faSmrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
217143d802faSmrg      esac
217243d802faSmrg    fi
217343d802faSmrg    ;;
217443d802faSmrg  sco3.2v5*)
217543d802faSmrg    lt_cv_sys_max_cmd_len=102400
217643d802faSmrg    ;;
217743d802faSmrg  sysv5* | sco5v6* | sysv4.2uw2*)
217843d802faSmrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
217943d802faSmrg    if test -n "$kargmax"; then
218043d802faSmrg      lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[	 ]]//'`
218143d802faSmrg    else
218243d802faSmrg      lt_cv_sys_max_cmd_len=32768
218343d802faSmrg    fi
218443d802faSmrg    ;;
218543d802faSmrg  *)
218643d802faSmrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
218743d802faSmrg    if test -n "$lt_cv_sys_max_cmd_len" && \
218843d802faSmrg       test undefined != "$lt_cv_sys_max_cmd_len"; then
218943d802faSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
219043d802faSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
219143d802faSmrg    else
219243d802faSmrg      # Make teststring a little bigger before we do anything with it.
219343d802faSmrg      # a 1K string should be a reasonable start.
219443d802faSmrg      for i in 1 2 3 4 5 6 7 8; do
219543d802faSmrg        teststring=$teststring$teststring
219643d802faSmrg      done
219743d802faSmrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
219843d802faSmrg      # If test is not a shell built-in, we'll probably end up computing a
219943d802faSmrg      # maximum length that is only half of the actual maximum length, but
220043d802faSmrg      # we can't tell.
220143d802faSmrg      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
220243d802faSmrg	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
220343d802faSmrg	      test 17 != "$i" # 1/2 MB should be enough
220443d802faSmrg      do
220543d802faSmrg        i=`expr $i + 1`
220643d802faSmrg        teststring=$teststring$teststring
220743d802faSmrg      done
220843d802faSmrg      # Only check the string length outside the loop.
220943d802faSmrg      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
221043d802faSmrg      teststring=
221143d802faSmrg      # Add a significant safety factor because C++ compilers can tack on
221243d802faSmrg      # massive amounts of additional arguments before passing them to the
221343d802faSmrg      # linker.  It appears as though 1/2 is a usable value.
221443d802faSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
221543d802faSmrg    fi
221643d802faSmrg    ;;
221743d802faSmrg  esac
22182a53b785Smrg])
221943d802faSmrgif test -n "$lt_cv_sys_max_cmd_len"; then
222043d802faSmrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
22212a53b785Smrgelse
222243d802faSmrg  AC_MSG_RESULT(none)
22232a53b785Smrgfi
222443d802faSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len
222543d802faSmrg_LT_DECL([], [max_cmd_len], [0],
222643d802faSmrg    [What is the maximum length of a command?])
222743d802faSmrg])# LT_CMD_MAX_LEN
222855acc8fcSmrg
222943d802faSmrg# Old name:
223043d802faSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
223143d802faSmrgdnl aclocal-1.4 backwards compatibility:
223243d802faSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
223355acc8fcSmrg
223455acc8fcSmrg
223543d802faSmrg# _LT_HEADER_DLFCN
223643d802faSmrg# ----------------
223743d802faSmrgm4_defun([_LT_HEADER_DLFCN],
223843d802faSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
223943d802faSmrg])# _LT_HEADER_DLFCN
224055acc8fcSmrg
224148c85eb7Smrg
224243d802faSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
224343d802faSmrg#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
224443d802faSmrg# ----------------------------------------------------------------
224543d802faSmrgm4_defun([_LT_TRY_DLOPEN_SELF],
224643d802faSmrg[m4_require([_LT_HEADER_DLFCN])dnl
224743d802faSmrgif test yes = "$cross_compiling"; then :
224843d802faSmrg  [$4]
224943d802faSmrgelse
225043d802faSmrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
225143d802faSmrg  lt_status=$lt_dlunknown
225243d802faSmrg  cat > conftest.$ac_ext <<_LT_EOF
225343d802faSmrg[#line $LINENO "configure"
225443d802faSmrg#include "confdefs.h"
225555acc8fcSmrg
225643d802faSmrg#if HAVE_DLFCN_H
225743d802faSmrg#include <dlfcn.h>
225843d802faSmrg#endif
225948c85eb7Smrg
226043d802faSmrg#include <stdio.h>
22613da084b3Smrg
226243d802faSmrg#ifdef RTLD_GLOBAL
226343d802faSmrg#  define LT_DLGLOBAL		RTLD_GLOBAL
226443d802faSmrg#else
226543d802faSmrg#  ifdef DL_GLOBAL
226643d802faSmrg#    define LT_DLGLOBAL		DL_GLOBAL
226743d802faSmrg#  else
226843d802faSmrg#    define LT_DLGLOBAL		0
226943d802faSmrg#  endif
227043d802faSmrg#endif
22713da084b3Smrg
227243d802faSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
227343d802faSmrg   find out it does not work in some platform. */
227443d802faSmrg#ifndef LT_DLLAZY_OR_NOW
227543d802faSmrg#  ifdef RTLD_LAZY
227643d802faSmrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
227743d802faSmrg#  else
227843d802faSmrg#    ifdef DL_LAZY
227943d802faSmrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
228043d802faSmrg#    else
228143d802faSmrg#      ifdef RTLD_NOW
228243d802faSmrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
228343d802faSmrg#      else
228443d802faSmrg#        ifdef DL_NOW
228543d802faSmrg#          define LT_DLLAZY_OR_NOW	DL_NOW
228643d802faSmrg#        else
228743d802faSmrg#          define LT_DLLAZY_OR_NOW	0
228843d802faSmrg#        endif
228943d802faSmrg#      endif
229043d802faSmrg#    endif
229143d802faSmrg#  endif
229243d802faSmrg#endif
22933da084b3Smrg
229443d802faSmrg/* When -fvisibility=hidden is used, assume the code has been annotated
229543d802faSmrg   correspondingly for the symbols needed.  */
229643d802faSmrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
229743d802faSmrgint fnord () __attribute__((visibility("default")));
229843d802faSmrg#endif
229955acc8fcSmrg
230043d802faSmrgint fnord () { return 42; }
230143d802faSmrgint main ()
230243d802faSmrg{
230343d802faSmrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
230443d802faSmrg  int status = $lt_dlunknown;
230555acc8fcSmrg
230643d802faSmrg  if (self)
230743d802faSmrg    {
230843d802faSmrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
230943d802faSmrg      else
231043d802faSmrg        {
231143d802faSmrg	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
231243d802faSmrg          else puts (dlerror ());
231343d802faSmrg	}
231443d802faSmrg      /* dlclose (self); */
231543d802faSmrg    }
231643d802faSmrg  else
231743d802faSmrg    puts (dlerror ());
231855acc8fcSmrg
231943d802faSmrg  return status;
232043d802faSmrg}]
232143d802faSmrg_LT_EOF
232243d802faSmrg  if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
232343d802faSmrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
232443d802faSmrg    lt_status=$?
232543d802faSmrg    case x$lt_status in
232643d802faSmrg      x$lt_dlno_uscore) $1 ;;
232743d802faSmrg      x$lt_dlneed_uscore) $2 ;;
232843d802faSmrg      x$lt_dlunknown|x*) $3 ;;
232943d802faSmrg    esac
233043d802faSmrg  else :
233143d802faSmrg    # compilation failed
233243d802faSmrg    $3
233343d802faSmrg  fi
23342a53b785Smrgfi
233543d802faSmrgrm -fr conftest*
233643d802faSmrg])# _LT_TRY_DLOPEN_SELF
233755acc8fcSmrg
233855acc8fcSmrg
233943d802faSmrg# LT_SYS_DLOPEN_SELF
234043d802faSmrg# ------------------
234143d802faSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF],
234243d802faSmrg[m4_require([_LT_HEADER_DLFCN])dnl
234343d802faSmrgif test yes != "$enable_dlopen"; then
234443d802faSmrg  enable_dlopen=unknown
234543d802faSmrg  enable_dlopen_self=unknown
234643d802faSmrg  enable_dlopen_self_static=unknown
234743d802faSmrgelse
234843d802faSmrg  lt_cv_dlopen=no
234943d802faSmrg  lt_cv_dlopen_libs=
235055acc8fcSmrg
235143d802faSmrg  case $host_os in
235243d802faSmrg  beos*)
235343d802faSmrg    lt_cv_dlopen=load_add_on
235443d802faSmrg    lt_cv_dlopen_libs=
235543d802faSmrg    lt_cv_dlopen_self=yes
235643d802faSmrg    ;;
235755acc8fcSmrg
235843d802faSmrg  mingw* | pw32* | cegcc*)
235943d802faSmrg    lt_cv_dlopen=LoadLibrary
236043d802faSmrg    lt_cv_dlopen_libs=
236143d802faSmrg    ;;
236252fd71cdSmrg
236343d802faSmrg  cygwin*)
236443d802faSmrg    lt_cv_dlopen=dlopen
236543d802faSmrg    lt_cv_dlopen_libs=
236643d802faSmrg    ;;
236752fd71cdSmrg
236843d802faSmrg  darwin*)
236943d802faSmrg    # if libdl is installed we need to link against it
237043d802faSmrg    AC_CHECK_LIB([dl], [dlopen],
237143d802faSmrg		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
237243d802faSmrg    lt_cv_dlopen=dyld
237343d802faSmrg    lt_cv_dlopen_libs=
237443d802faSmrg    lt_cv_dlopen_self=yes
237543d802faSmrg    ])
237643d802faSmrg    ;;
237752fd71cdSmrg
237843d802faSmrg  tpf*)
237943d802faSmrg    # Don't try to run any link tests for TPF.  We know it's impossible
238043d802faSmrg    # because TPF is a cross-compiler, and we know how we open DSOs.
238143d802faSmrg    lt_cv_dlopen=dlopen
238243d802faSmrg    lt_cv_dlopen_libs=
238343d802faSmrg    lt_cv_dlopen_self=no
238443d802faSmrg    ;;
23853da084b3Smrg
238643d802faSmrg  *)
238743d802faSmrg    AC_CHECK_FUNC([shl_load],
238843d802faSmrg	  [lt_cv_dlopen=shl_load],
238943d802faSmrg      [AC_CHECK_LIB([dld], [shl_load],
239043d802faSmrg	    [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
239143d802faSmrg	[AC_CHECK_FUNC([dlopen],
239243d802faSmrg	      [lt_cv_dlopen=dlopen],
239343d802faSmrg	  [AC_CHECK_LIB([dl], [dlopen],
239443d802faSmrg		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
239543d802faSmrg	    [AC_CHECK_LIB([svld], [dlopen],
239643d802faSmrg		  [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
239743d802faSmrg	      [AC_CHECK_LIB([dld], [dld_link],
239843d802faSmrg		    [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
239943d802faSmrg	      ])
240043d802faSmrg	    ])
240143d802faSmrg	  ])
240243d802faSmrg	])
240343d802faSmrg      ])
240443d802faSmrg    ;;
240543d802faSmrg  esac
240655acc8fcSmrg
240743d802faSmrg  if test no = "$lt_cv_dlopen"; then
240843d802faSmrg    enable_dlopen=no
240943d802faSmrg  else
241043d802faSmrg    enable_dlopen=yes
241143d802faSmrg  fi
24123da084b3Smrg
241343d802faSmrg  case $lt_cv_dlopen in
241443d802faSmrg  dlopen)
241543d802faSmrg    save_CPPFLAGS=$CPPFLAGS
241643d802faSmrg    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
24173da084b3Smrg
241843d802faSmrg    save_LDFLAGS=$LDFLAGS
241943d802faSmrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
24203da084b3Smrg
242143d802faSmrg    save_LIBS=$LIBS
242243d802faSmrg    LIBS="$lt_cv_dlopen_libs $LIBS"
24233da084b3Smrg
242443d802faSmrg    AC_CACHE_CHECK([whether a program can dlopen itself],
242543d802faSmrg	  lt_cv_dlopen_self, [dnl
242643d802faSmrg	  _LT_TRY_DLOPEN_SELF(
242743d802faSmrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
242843d802faSmrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
242943d802faSmrg    ])
24303da084b3Smrg
243143d802faSmrg    if test yes = "$lt_cv_dlopen_self"; then
243243d802faSmrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
243343d802faSmrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
243443d802faSmrg	  lt_cv_dlopen_self_static, [dnl
243543d802faSmrg	  _LT_TRY_DLOPEN_SELF(
243643d802faSmrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
243743d802faSmrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
243843d802faSmrg      ])
243943d802faSmrg    fi
24403da084b3Smrg
244143d802faSmrg    CPPFLAGS=$save_CPPFLAGS
244243d802faSmrg    LDFLAGS=$save_LDFLAGS
244343d802faSmrg    LIBS=$save_LIBS
244443d802faSmrg    ;;
244543d802faSmrg  esac
24463da084b3Smrg
244743d802faSmrg  case $lt_cv_dlopen_self in
244843d802faSmrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
244943d802faSmrg  *) enable_dlopen_self=unknown ;;
245043d802faSmrg  esac
24513da084b3Smrg
245243d802faSmrg  case $lt_cv_dlopen_self_static in
245343d802faSmrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
245443d802faSmrg  *) enable_dlopen_self_static=unknown ;;
245543d802faSmrg  esac
245643d802faSmrgfi
245743d802faSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0],
245843d802faSmrg	 [Whether dlopen is supported])
245943d802faSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
246043d802faSmrg	 [Whether dlopen of programs is supported])
246143d802faSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
246243d802faSmrg	 [Whether dlopen of statically linked programs is supported])
246343d802faSmrg])# LT_SYS_DLOPEN_SELF
24643da084b3Smrg
246543d802faSmrg# Old name:
246643d802faSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
246748c85eb7Smrgdnl aclocal-1.4 backwards compatibility:
246843d802faSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
24693da084b3Smrg
24703da084b3Smrg
247143d802faSmrg# _LT_COMPILER_C_O([TAGNAME])
247243d802faSmrg# ---------------------------
247343d802faSmrg# Check to see if options -c and -o are simultaneously supported by compiler.
247443d802faSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O.
247543d802faSmrgm4_defun([_LT_COMPILER_C_O],
247643d802faSmrg[m4_require([_LT_DECL_SED])dnl
247743d802faSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
247843d802faSmrgm4_require([_LT_TAG_COMPILER])dnl
247943d802faSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
248043d802faSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
248143d802faSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
248243d802faSmrg   $RM -r conftest 2>/dev/null
248343d802faSmrg   mkdir conftest
248443d802faSmrg   cd conftest
248543d802faSmrg   mkdir out
248643d802faSmrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
24873da084b3Smrg
248843d802faSmrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
248943d802faSmrg   # Insert the option either (1) after the last *FLAGS variable, or
249043d802faSmrg   # (2) before a word containing "conftest.", or (3) at the end.
249143d802faSmrg   # Note that $ac_compile itself does not contain backslashes and begins
249243d802faSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
249343d802faSmrg   lt_compile=`echo "$ac_compile" | $SED \
249443d802faSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
249543d802faSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
249643d802faSmrg   -e 's:$: $lt_compiler_flag:'`
249743d802faSmrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
249843d802faSmrg   (eval "$lt_compile" 2>out/conftest.err)
249943d802faSmrg   ac_status=$?
250043d802faSmrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
250143d802faSmrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
250243d802faSmrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
250343d802faSmrg   then
250443d802faSmrg     # The compiler can only warn and ignore the option if not recognized
250543d802faSmrg     # So say no if there are warnings
250643d802faSmrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
250743d802faSmrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
250843d802faSmrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
250943d802faSmrg       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
251043d802faSmrg     fi
251143d802faSmrg   fi
251243d802faSmrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
251343d802faSmrg   $RM conftest*
251443d802faSmrg   # SGI C++ compiler will create directory out/ii_files/ for
251543d802faSmrg   # template instantiation
251643d802faSmrg   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
251743d802faSmrg   $RM out/* && rmdir out
251843d802faSmrg   cd ..
251943d802faSmrg   $RM -r conftest
252043d802faSmrg   $RM conftest*
25212a53b785Smrg])
252243d802faSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
252343d802faSmrg	[Does compiler simultaneously support -c and -o options?])
252443d802faSmrg])# _LT_COMPILER_C_O
252552fd71cdSmrg
252652fd71cdSmrg
252743d802faSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME])
252843d802faSmrg# ----------------------------------
252943d802faSmrg# Check to see if we can do hard links to lock some files if needed
253043d802faSmrgm4_defun([_LT_COMPILER_FILE_LOCKS],
253143d802faSmrg[m4_require([_LT_ENABLE_LOCK])dnl
25322a53b785Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
253343d802faSmrg_LT_COMPILER_C_O([$1])
25342a53b785Smrg
253543d802faSmrghard_links=nottested
253643d802faSmrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
253743d802faSmrg  # do not overwrite the value of need_locks provided by the user
253843d802faSmrg  AC_MSG_CHECKING([if we can lock with hard links])
253943d802faSmrg  hard_links=yes
254043d802faSmrg  $RM conftest*
254143d802faSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
254243d802faSmrg  touch conftest.a
254343d802faSmrg  ln conftest.a conftest.b 2>&5 || hard_links=no
254443d802faSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
254543d802faSmrg  AC_MSG_RESULT([$hard_links])
254643d802faSmrg  if test no = "$hard_links"; then
254743d802faSmrg    AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
254843d802faSmrg    need_locks=warn
254943d802faSmrg  fi
255043d802faSmrgelse
255143d802faSmrg  need_locks=no
255252fd71cdSmrgfi
255343d802faSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
255443d802faSmrg])# _LT_COMPILER_FILE_LOCKS
255552fd71cdSmrg
255652fd71cdSmrg
255743d802faSmrg# _LT_CHECK_OBJDIR
255843d802faSmrg# ----------------
255943d802faSmrgm4_defun([_LT_CHECK_OBJDIR],
256043d802faSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
256143d802faSmrg[rm -f .libs 2>/dev/null
256243d802faSmrgmkdir .libs 2>/dev/null
256343d802faSmrgif test -d .libs; then
256443d802faSmrg  lt_cv_objdir=.libs
256543d802faSmrgelse
256643d802faSmrg  # MS-DOS does not allow filenames that begin with a dot.
256743d802faSmrg  lt_cv_objdir=_libs
256843d802faSmrgfi
256943d802faSmrgrmdir .libs 2>/dev/null])
257043d802faSmrgobjdir=$lt_cv_objdir
257143d802faSmrg_LT_DECL([], [objdir], [0],
257243d802faSmrg         [The name of the directory that contains temporary libtool files])dnl
257343d802faSmrgm4_pattern_allow([LT_OBJDIR])dnl
257443d802faSmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
257543d802faSmrg  [Define to the sub-directory where libtool stores uninstalled libraries.])
257643d802faSmrg])# _LT_CHECK_OBJDIR
257755acc8fcSmrg
25783da084b3Smrg
257943d802faSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
258043d802faSmrg# --------------------------------------
258143d802faSmrg# Check hardcoding attributes.
258243d802faSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH],
258343d802faSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
258443d802faSmrg_LT_TAGVAR(hardcode_action, $1)=
258543d802faSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
258643d802faSmrg   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
258743d802faSmrg   test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
258855acc8fcSmrg
258943d802faSmrg  # We can hardcode non-existent directories.
259043d802faSmrg  if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
259143d802faSmrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
259243d802faSmrg     # have to relink, otherwise we might link with an installed library
259343d802faSmrg     # when we should be linking with a yet-to-be-installed one
259443d802faSmrg     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
259543d802faSmrg     test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
259643d802faSmrg    # Linking always hardcodes the temporary library directory.
259743d802faSmrg    _LT_TAGVAR(hardcode_action, $1)=relink
259843d802faSmrg  else
259943d802faSmrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
260043d802faSmrg    _LT_TAGVAR(hardcode_action, $1)=immediate
260143d802faSmrg  fi
260243d802faSmrgelse
260343d802faSmrg  # We cannot hardcode anything, or else we can only hardcode existing
260443d802faSmrg  # directories.
260543d802faSmrg  _LT_TAGVAR(hardcode_action, $1)=unsupported
260643d802faSmrgfi
260743d802faSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
260855acc8fcSmrg
260943d802faSmrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
261043d802faSmrg   test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
261143d802faSmrg  # Fast installation is not supported
261243d802faSmrg  enable_fast_install=no
261343d802faSmrgelif test yes = "$shlibpath_overrides_runpath" ||
261443d802faSmrg     test no = "$enable_shared"; then
261543d802faSmrg  # Fast installation is not necessary
261643d802faSmrg  enable_fast_install=needless
261743d802faSmrgfi
261843d802faSmrg_LT_TAGDECL([], [hardcode_action], [0],
261943d802faSmrg    [How to hardcode a shared library path into an executable])
262043d802faSmrg])# _LT_LINKER_HARDCODE_LIBPATH
26213da084b3Smrg
26223da084b3Smrg
262343d802faSmrg# _LT_CMD_STRIPLIB
262443d802faSmrg# ----------------
262543d802faSmrgm4_defun([_LT_CMD_STRIPLIB],
262643d802faSmrg[m4_require([_LT_DECL_EGREP])
262743d802faSmrgstriplib=
262843d802faSmrgold_striplib=
262943d802faSmrgAC_MSG_CHECKING([whether stripping libraries is possible])
263043d802faSmrgif test -z "$STRIP"; then
263143d802faSmrg  AC_MSG_RESULT([no])
263243d802faSmrgelse
263343d802faSmrg  if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
263443d802faSmrg    old_striplib="$STRIP --strip-debug"
263543d802faSmrg    striplib="$STRIP --strip-unneeded"
263643d802faSmrg    AC_MSG_RESULT([yes])
263743d802faSmrg  else
263843d802faSmrg    case $host_os in
263943d802faSmrg    darwin*)
264043d802faSmrg      # FIXME - insert some real tests, host_os isn't really good enough
264143d802faSmrg      striplib="$STRIP -x"
264243d802faSmrg      old_striplib="$STRIP -S"
264343d802faSmrg      AC_MSG_RESULT([yes])
264443d802faSmrg      ;;
264543d802faSmrg    freebsd*)
264643d802faSmrg      if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
264743d802faSmrg        old_striplib="$STRIP --strip-debug"
264843d802faSmrg        striplib="$STRIP --strip-unneeded"
264943d802faSmrg        AC_MSG_RESULT([yes])
265043d802faSmrg      else
265143d802faSmrg        AC_MSG_RESULT([no])
265243d802faSmrg      fi
265343d802faSmrg      ;;
265443d802faSmrg    *)
265543d802faSmrg      AC_MSG_RESULT([no])
265643d802faSmrg      ;;
265743d802faSmrg    esac
265843d802faSmrg  fi
265943d802faSmrgfi
266043d802faSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
266143d802faSmrg_LT_DECL([], [striplib], [1])
266243d802faSmrg])# _LT_CMD_STRIPLIB
266355acc8fcSmrg
266455acc8fcSmrg
266543d802faSmrg# _LT_PREPARE_MUNGE_PATH_LIST
266643d802faSmrg# ---------------------------
266743d802faSmrg# Make sure func_munge_path_list() is defined correctly.
266843d802faSmrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
266943d802faSmrg[[# func_munge_path_list VARIABLE PATH
267043d802faSmrg# -----------------------------------
267143d802faSmrg# VARIABLE is name of variable containing _space_ separated list of
267243d802faSmrg# directories to be munged by the contents of PATH, which is string
267343d802faSmrg# having a format:
267443d802faSmrg# "DIR[:DIR]:"
267543d802faSmrg#       string "DIR[ DIR]" will be prepended to VARIABLE
267643d802faSmrg# ":DIR[:DIR]"
267743d802faSmrg#       string "DIR[ DIR]" will be appended to VARIABLE
267843d802faSmrg# "DIRP[:DIRP]::[DIRA:]DIRA"
267943d802faSmrg#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
268043d802faSmrg#       "DIRA[ DIRA]" will be appended to VARIABLE
268143d802faSmrg# "DIR[:DIR]"
268243d802faSmrg#       VARIABLE will be replaced by "DIR[ DIR]"
268343d802faSmrgfunc_munge_path_list ()
268443d802faSmrg{
268543d802faSmrg    case x@S|@2 in
268643d802faSmrg    x)
268743d802faSmrg        ;;
268843d802faSmrg    *:)
268943d802faSmrg        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
269043d802faSmrg        ;;
269143d802faSmrg    x:*)
269243d802faSmrg        eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
269343d802faSmrg        ;;
269443d802faSmrg    *::*)
269543d802faSmrg        eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
269643d802faSmrg        eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
269743d802faSmrg        ;;
269843d802faSmrg    *)
269943d802faSmrg        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
270043d802faSmrg        ;;
270143d802faSmrg    esac
270243d802faSmrg}
270343d802faSmrg]])# _LT_PREPARE_PATH_LIST
270448c85eb7Smrg
27053da084b3Smrg
270643d802faSmrg# _LT_SYS_DYNAMIC_LINKER([TAG])
27072a53b785Smrg# -----------------------------
270843d802faSmrg# PORTME Fill in your ld.so characteristics
270943d802faSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER],
271043d802faSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
271143d802faSmrgm4_require([_LT_DECL_EGREP])dnl
271243d802faSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
271343d802faSmrgm4_require([_LT_DECL_OBJDUMP])dnl
271443d802faSmrgm4_require([_LT_DECL_SED])dnl
271543d802faSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
271643d802faSmrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
271743d802faSmrgAC_MSG_CHECKING([dynamic linker characteristics])
271843d802faSmrgm4_if([$1],
271943d802faSmrg	[], [
272043d802faSmrgif test yes = "$GCC"; then
272143d802faSmrg  case $host_os in
272243d802faSmrg    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
272343d802faSmrg    *) lt_awk_arg='/^libraries:/' ;;
272443d802faSmrg  esac
272543d802faSmrg  case $host_os in
272643d802faSmrg    mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
272743d802faSmrg    *) lt_sed_strip_eq='s|=/|/|g' ;;
272843d802faSmrg  esac
272943d802faSmrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
273043d802faSmrg  case $lt_search_path_spec in
273143d802faSmrg  *\;*)
273243d802faSmrg    # if the path contains ";" then we assume it to be the separator
273343d802faSmrg    # otherwise default to the standard path separator (i.e. ":") - it is
273443d802faSmrg    # assumed that no part of a normal pathname contains ";" but that should
273543d802faSmrg    # okay in the real world where ";" in dirpaths is itself problematic.
273643d802faSmrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
273743d802faSmrg    ;;
273843d802faSmrg  *)
273943d802faSmrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
274043d802faSmrg    ;;
274143d802faSmrg  esac
274243d802faSmrg  # Ok, now we have the path, separated by spaces, we can step through it
274343d802faSmrg  # and add multilib dir if necessary...
274443d802faSmrg  lt_tmp_lt_search_path_spec=
274543d802faSmrg  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
274643d802faSmrg  # ...but if some path component already ends with the multilib dir we assume
274743d802faSmrg  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
274843d802faSmrg  case "$lt_multi_os_dir; $lt_search_path_spec " in
274943d802faSmrg  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
275043d802faSmrg    lt_multi_os_dir=
275143d802faSmrg    ;;
275243d802faSmrg  esac
275343d802faSmrg  for lt_sys_path in $lt_search_path_spec; do
275443d802faSmrg    if test -d "$lt_sys_path$lt_multi_os_dir"; then
275543d802faSmrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
275643d802faSmrg    elif test -n "$lt_multi_os_dir"; then
275743d802faSmrg      test -d "$lt_sys_path" && \
275843d802faSmrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
275943d802faSmrg    fi
276043d802faSmrg  done
276143d802faSmrg  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
276243d802faSmrgBEGIN {RS = " "; FS = "/|\n";} {
276343d802faSmrg  lt_foo = "";
276443d802faSmrg  lt_count = 0;
276543d802faSmrg  for (lt_i = NF; lt_i > 0; lt_i--) {
276643d802faSmrg    if ($lt_i != "" && $lt_i != ".") {
276743d802faSmrg      if ($lt_i == "..") {
276843d802faSmrg        lt_count++;
276943d802faSmrg      } else {
277043d802faSmrg        if (lt_count == 0) {
277143d802faSmrg          lt_foo = "/" $lt_i lt_foo;
277243d802faSmrg        } else {
277343d802faSmrg          lt_count--;
277443d802faSmrg        }
277543d802faSmrg      }
277643d802faSmrg    }
277743d802faSmrg  }
277843d802faSmrg  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
277943d802faSmrg  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
278043d802faSmrg}'`
278143d802faSmrg  # AWK program above erroneously prepends '/' to C:/dos/paths
278243d802faSmrg  # for these hosts.
278343d802faSmrg  case $host_os in
278443d802faSmrg    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
278543d802faSmrg      $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
278643d802faSmrg  esac
278743d802faSmrg  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
278843d802faSmrgelse
278943d802faSmrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
279043d802faSmrgfi])
279143d802faSmrglibrary_names_spec=
279243d802faSmrglibname_spec='lib$name'
279343d802faSmrgsoname_spec=
279443d802faSmrgshrext_cmds=.so
279543d802faSmrgpostinstall_cmds=
279643d802faSmrgpostuninstall_cmds=
279743d802faSmrgfinish_cmds=
279843d802faSmrgfinish_eval=
279943d802faSmrgshlibpath_var=
280043d802faSmrgshlibpath_overrides_runpath=unknown
280143d802faSmrgversion_type=none
280243d802faSmrgdynamic_linker="$host_os ld.so"
280343d802faSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
280443d802faSmrgneed_lib_prefix=unknown
280543d802faSmrghardcode_into_libs=no
28063da084b3Smrg
280743d802faSmrg# when you set need_version to no, make sure it does not cause -set_version
280843d802faSmrg# flags to be left without arguments
280943d802faSmrgneed_version=unknown
28103da084b3Smrg
281143d802faSmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH],
281243d802faSmrg[User-defined run-time library search path.])
281348c85eb7Smrg
281443d802faSmrgcase $host_os in
281543d802faSmrgaix3*)
281643d802faSmrg  version_type=linux # correct to gnu/linux during the next big refactor
281743d802faSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
281843d802faSmrg  shlibpath_var=LIBPATH
28193da084b3Smrg
282043d802faSmrg  # AIX 3 has no versioning support, so we append a major version to the name.
282143d802faSmrg  soname_spec='$libname$release$shared_ext$major'
282243d802faSmrg  ;;
28233da084b3Smrg
282443d802faSmrgaix[[4-9]]*)
282543d802faSmrg  version_type=linux # correct to gnu/linux during the next big refactor
282643d802faSmrg  need_lib_prefix=no
282743d802faSmrg  need_version=no
282843d802faSmrg  hardcode_into_libs=yes
282943d802faSmrg  if test ia64 = "$host_cpu"; then
283043d802faSmrg    # AIX 5 supports IA64
283143d802faSmrg    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
283243d802faSmrg    shlibpath_var=LD_LIBRARY_PATH
283343d802faSmrg  else
283443d802faSmrg    # With GCC up to 2.95.x, collect2 would create an import file
283543d802faSmrg    # for dependence libraries.  The import file would start with
283643d802faSmrg    # the line '#! .'.  This would cause the generated library to
283743d802faSmrg    # depend on '.', always an invalid library.  This was fixed in
283843d802faSmrg    # development snapshots of GCC prior to 3.0.
283943d802faSmrg    case $host_os in
284043d802faSmrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
284143d802faSmrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
284243d802faSmrg	   echo ' yes '
284343d802faSmrg	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
284443d802faSmrg	:
284543d802faSmrg      else
284643d802faSmrg	can_build_shared=no
284743d802faSmrg      fi
284843d802faSmrg      ;;
284943d802faSmrg    esac
285043d802faSmrg    # Using Import Files as archive members, it is possible to support
285143d802faSmrg    # filename-based versioning of shared library archives on AIX. While
285243d802faSmrg    # this would work for both with and without runtime linking, it will
285343d802faSmrg    # prevent static linking of such archives. So we do filename-based
285443d802faSmrg    # shared library versioning with .so extension only, which is used
285543d802faSmrg    # when both runtime linking and shared linking is enabled.
285643d802faSmrg    # Unfortunately, runtime linking may impact performance, so we do
285743d802faSmrg    # not want this to be the default eventually. Also, we use the
285843d802faSmrg    # versioned .so libs for executables only if there is the -brtl
285943d802faSmrg    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
286043d802faSmrg    # To allow for filename-based versioning support, we need to create
286143d802faSmrg    # libNAME.so.V as an archive file, containing:
286243d802faSmrg    # *) an Import File, referring to the versioned filename of the
286343d802faSmrg    #    archive as well as the shared archive member, telling the
286443d802faSmrg    #    bitwidth (32 or 64) of that shared object, and providing the
286543d802faSmrg    #    list of exported symbols of that shared object, eventually
286643d802faSmrg    #    decorated with the 'weak' keyword
286743d802faSmrg    # *) the shared object with the F_LOADONLY flag set, to really avoid
286843d802faSmrg    #    it being seen by the linker.
286943d802faSmrg    # At run time we better use the real file rather than another symlink,
287043d802faSmrg    # but for link time we create the symlink libNAME.so -> libNAME.so.V
287148c85eb7Smrg
287243d802faSmrg    case $with_aix_soname,$aix_use_runtimelinking in
287343d802faSmrg    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
287443d802faSmrg    # soname into executable. Probably we can add versioning support to
287543d802faSmrg    # collect2, so additional links can be useful in future.
287643d802faSmrg    aix,yes) # traditional libtool
287743d802faSmrg      dynamic_linker='AIX unversionable lib.so'
287843d802faSmrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
287943d802faSmrg      # instead of lib<name>.a to let people know that these are not
288043d802faSmrg      # typical AIX shared libraries.
288143d802faSmrg      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
288243d802faSmrg      ;;
288343d802faSmrg    aix,no) # traditional AIX only
288443d802faSmrg      dynamic_linker='AIX lib.a[(]lib.so.V[)]'
288543d802faSmrg      # We preserve .a as extension for shared libraries through AIX4.2
288643d802faSmrg      # and later when we are not doing run time linking.
288743d802faSmrg      library_names_spec='$libname$release.a $libname.a'
288843d802faSmrg      soname_spec='$libname$release$shared_ext$major'
288943d802faSmrg      ;;
289043d802faSmrg    svr4,*) # full svr4 only
289143d802faSmrg      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
289243d802faSmrg      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
289343d802faSmrg      # We do not specify a path in Import Files, so LIBPATH fires.
289443d802faSmrg      shlibpath_overrides_runpath=yes
289543d802faSmrg      ;;
289643d802faSmrg    *,yes) # both, prefer svr4
289743d802faSmrg      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
289843d802faSmrg      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
289943d802faSmrg      # unpreferred sharedlib libNAME.a needs extra handling
290043d802faSmrg      postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
290143d802faSmrg      postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
290243d802faSmrg      # We do not specify a path in Import Files, so LIBPATH fires.
290343d802faSmrg      shlibpath_overrides_runpath=yes
290443d802faSmrg      ;;
290543d802faSmrg    *,no) # both, prefer aix
290643d802faSmrg      dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
290743d802faSmrg      library_names_spec='$libname$release.a $libname.a'
290843d802faSmrg      soname_spec='$libname$release$shared_ext$major'
290943d802faSmrg      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
291043d802faSmrg      postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
291143d802faSmrg      postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
291243d802faSmrg      ;;
291343d802faSmrg    esac
291443d802faSmrg    shlibpath_var=LIBPATH
291543d802faSmrg  fi
291643d802faSmrg  ;;
291748c85eb7Smrg
291843d802faSmrgamigaos*)
291943d802faSmrg  case $host_cpu in
292043d802faSmrg  powerpc)
292143d802faSmrg    # Since July 2007 AmigaOS4 officially supports .so libraries.
292243d802faSmrg    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
292343d802faSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
292443d802faSmrg    ;;
292543d802faSmrg  m68k)
292643d802faSmrg    library_names_spec='$libname.ixlibrary $libname.a'
292743d802faSmrg    # Create ${libname}_ixlibrary.a entries in /sys/libs.
292843d802faSmrg    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $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'
292943d802faSmrg    ;;
293043d802faSmrg  esac
293143d802faSmrg  ;;
293248c85eb7Smrg
293343d802faSmrgbeos*)
293443d802faSmrg  library_names_spec='$libname$shared_ext'
293543d802faSmrg  dynamic_linker="$host_os ld.so"
293643d802faSmrg  shlibpath_var=LIBRARY_PATH
293743d802faSmrg  ;;
293848c85eb7Smrg
293943d802faSmrgbsdi[[45]]*)
294043d802faSmrg  version_type=linux # correct to gnu/linux during the next big refactor
294143d802faSmrg  need_version=no
294243d802faSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
294343d802faSmrg  soname_spec='$libname$release$shared_ext$major'
294443d802faSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
294543d802faSmrg  shlibpath_var=LD_LIBRARY_PATH
294643d802faSmrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
294743d802faSmrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
294843d802faSmrg  # the default ld.so.conf also contains /usr/contrib/lib and
294943d802faSmrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
295043d802faSmrg  # libtool to hard-code these into programs
295143d802faSmrg  ;;
29523da084b3Smrg
295343d802faSmrgcygwin* | mingw* | pw32* | cegcc*)
295443d802faSmrg  version_type=windows
295543d802faSmrg  shrext_cmds=.dll
295643d802faSmrg  need_version=no
295743d802faSmrg  need_lib_prefix=no
29583da084b3Smrg
295943d802faSmrg  case $GCC,$cc_basename in
296043d802faSmrg  yes,*)
296143d802faSmrg    # gcc
296243d802faSmrg    library_names_spec='$libname.dll.a'
296343d802faSmrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
296443d802faSmrg    postinstall_cmds='base_file=`basename \$file`~
296543d802faSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
296643d802faSmrg      dldir=$destdir/`dirname \$dlpath`~
296743d802faSmrg      test -d \$dldir || mkdir -p \$dldir~
296843d802faSmrg      $install_prog $dir/$dlname \$dldir/$dlname~
296943d802faSmrg      chmod a+x \$dldir/$dlname~
297043d802faSmrg      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
297143d802faSmrg        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
297243d802faSmrg      fi'
297343d802faSmrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
297443d802faSmrg      dlpath=$dir/\$dldll~
297543d802faSmrg       $RM \$dlpath'
297643d802faSmrg    shlibpath_overrides_runpath=yes
297752fd71cdSmrg
297843d802faSmrg    case $host_os in
297943d802faSmrg    cygwin*)
298043d802faSmrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
298143d802faSmrg      soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
298243d802faSmrgm4_if([$1], [],[
298343d802faSmrg      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
298443d802faSmrg      ;;
298543d802faSmrg    mingw* | cegcc*)
298643d802faSmrg      # MinGW DLLs use traditional 'lib' prefix
298743d802faSmrg      soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
298843d802faSmrg      ;;
298943d802faSmrg    pw32*)
299043d802faSmrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
299143d802faSmrg      library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
299243d802faSmrg      ;;
299343d802faSmrg    esac
299443d802faSmrg    dynamic_linker='Win32 ld.exe'
299543d802faSmrg    ;;
299652fd71cdSmrg
299743d802faSmrg  *,cl* | *,icl*)
299843d802faSmrg    # Native MSVC or ICC
299943d802faSmrg    libname_spec='$name'
300043d802faSmrg    soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
300143d802faSmrg    library_names_spec='$libname.dll.lib'
300248c85eb7Smrg
300343d802faSmrg    case $build_os in
300443d802faSmrg    mingw*)
300543d802faSmrg      sys_lib_search_path_spec=
300643d802faSmrg      lt_save_ifs=$IFS
300743d802faSmrg      IFS=';'
300843d802faSmrg      for lt_path in $LIB
300943d802faSmrg      do
301043d802faSmrg        IFS=$lt_save_ifs
301143d802faSmrg        # Let DOS variable expansion print the short 8.3 style file name.
301243d802faSmrg        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
301343d802faSmrg        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
301443d802faSmrg      done
301543d802faSmrg      IFS=$lt_save_ifs
301643d802faSmrg      # Convert to MSYS style.
301743d802faSmrg      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
301843d802faSmrg      ;;
301943d802faSmrg    cygwin*)
302043d802faSmrg      # Convert to unix form, then to dos form, then back to unix form
302143d802faSmrg      # but this time dos style (no spaces!) so that the unix form looks
302243d802faSmrg      # like /cygdrive/c/PROGRA~1:/cygdr...
302343d802faSmrg      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
302443d802faSmrg      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
302543d802faSmrg      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
302643d802faSmrg      ;;
302743d802faSmrg    *)
302843d802faSmrg      sys_lib_search_path_spec=$LIB
302943d802faSmrg      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
303043d802faSmrg        # It is most probably a Windows format PATH.
303143d802faSmrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
303243d802faSmrg      else
303343d802faSmrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
303443d802faSmrg      fi
303543d802faSmrg      # FIXME: find the short name or the path components, as spaces are
303643d802faSmrg      # common. (e.g. "Program Files" -> "PROGRA~1")
303743d802faSmrg      ;;
303843d802faSmrg    esac
303948c85eb7Smrg
304043d802faSmrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
304143d802faSmrg    postinstall_cmds='base_file=`basename \$file`~
304243d802faSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
304343d802faSmrg      dldir=$destdir/`dirname \$dlpath`~
304443d802faSmrg      test -d \$dldir || mkdir -p \$dldir~
304543d802faSmrg      $install_prog $dir/$dlname \$dldir/$dlname'
304643d802faSmrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
304743d802faSmrg      dlpath=$dir/\$dldll~
304843d802faSmrg       $RM \$dlpath'
304943d802faSmrg    shlibpath_overrides_runpath=yes
305043d802faSmrg    dynamic_linker='Win32 link.exe'
305143d802faSmrg    ;;
305248c85eb7Smrg
305343d802faSmrg  *)
305443d802faSmrg    # Assume MSVC and ICC wrapper
305543d802faSmrg    library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
305643d802faSmrg    dynamic_linker='Win32 ld.exe'
305743d802faSmrg    ;;
305843d802faSmrg  esac
305943d802faSmrg  # FIXME: first we should search . and the directory the executable is in
306043d802faSmrg  shlibpath_var=PATH
306143d802faSmrg  ;;
306255acc8fcSmrg
306343d802faSmrgdarwin* | rhapsody*)
306443d802faSmrg  dynamic_linker="$host_os dyld"
306543d802faSmrg  version_type=darwin
306643d802faSmrg  need_lib_prefix=no
306743d802faSmrg  need_version=no
306843d802faSmrg  library_names_spec='$libname$release$versuffix$shared_ext $libname$release$major$shared_ext $libname$shared_ext'
306943d802faSmrg  soname_spec='$libname$release$major$shared_ext'
307043d802faSmrg  shlibpath_overrides_runpath=yes
307143d802faSmrg  shlibpath_var=DYLD_LIBRARY_PATH
307243d802faSmrg  shrext_cmds='`test .$module = .yes && echo .bundle || echo .dylib`'
307343d802faSmrgm4_if([$1], [],[
307443d802faSmrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
307543d802faSmrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
307643d802faSmrg  ;;
30773da084b3Smrg
307843d802faSmrgdgux*)
307943d802faSmrg  version_type=linux # correct to gnu/linux during the next big refactor
308043d802faSmrg  need_lib_prefix=no
308143d802faSmrg  need_version=no
308243d802faSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
308343d802faSmrg  soname_spec='$libname$release$shared_ext$major'
308443d802faSmrg  shlibpath_var=LD_LIBRARY_PATH
308543d802faSmrg  ;;
30863da084b3Smrg
308743d802faSmrgfreebsd* | dragonfly* | midnightbsd*)
308843d802faSmrg  # DragonFly does not have aout.  When/if they implement a new
308943d802faSmrg  # versioning mechanism, adjust this.
309043d802faSmrg  if test -x /usr/bin/objformat; then
309143d802faSmrg    objformat=`/usr/bin/objformat`
309243d802faSmrg  else
309343d802faSmrg    case $host_os in
309443d802faSmrg    freebsd[[23]].*) objformat=aout ;;
309543d802faSmrg    *) objformat=elf ;;
309643d802faSmrg    esac
309743d802faSmrg  fi
309843d802faSmrg  # Handle Gentoo/FreeBSD as it was Linux
309943d802faSmrg  case $host_vendor in
310043d802faSmrg    gentoo)
310143d802faSmrg      version_type=linux ;;
310243d802faSmrg    *)
310343d802faSmrg      version_type=freebsd-$objformat ;;
310443d802faSmrg  esac
31053da084b3Smrg
310643d802faSmrg  case $version_type in
310743d802faSmrg    freebsd-elf*)
310843d802faSmrg      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
310943d802faSmrg      soname_spec='$libname$release$shared_ext$major'
311043d802faSmrg      need_version=no
311143d802faSmrg      need_lib_prefix=no
311243d802faSmrg      ;;
311343d802faSmrg    freebsd-*)
311443d802faSmrg      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
311543d802faSmrg      need_version=yes
311643d802faSmrg      ;;
311743d802faSmrg    linux)
311843d802faSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
311943d802faSmrg      soname_spec='${libname}${release}${shared_ext}$major'
312043d802faSmrg      need_lib_prefix=no
312143d802faSmrg      need_version=no
312243d802faSmrg      ;;
312343d802faSmrg  esac
312443d802faSmrg  shlibpath_var=LD_LIBRARY_PATH
312543d802faSmrg  case $host_os in
312643d802faSmrg  freebsd2.*)
312743d802faSmrg    shlibpath_overrides_runpath=yes
312843d802faSmrg    ;;
312943d802faSmrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
313043d802faSmrg    shlibpath_overrides_runpath=yes
313143d802faSmrg    hardcode_into_libs=yes
313243d802faSmrg    ;;
313343d802faSmrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
313443d802faSmrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
313543d802faSmrg    shlibpath_overrides_runpath=no
313643d802faSmrg    hardcode_into_libs=yes
313743d802faSmrg    ;;
313843d802faSmrg  *) # from 4.6 on, and DragonFly
313943d802faSmrg    shlibpath_overrides_runpath=yes
314043d802faSmrg    hardcode_into_libs=yes
314143d802faSmrg    ;;
314243d802faSmrg  esac
314343d802faSmrg  ;;
314448c85eb7Smrg
314543d802faSmrghaiku*)
314643d802faSmrg  version_type=linux # correct to gnu/linux during the next big refactor
314743d802faSmrg  need_lib_prefix=no
314843d802faSmrg  need_version=no
314943d802faSmrg  dynamic_linker="$host_os runtime_loader"
315043d802faSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
315143d802faSmrg  soname_spec='$libname$release$shared_ext$major'
315243d802faSmrg  shlibpath_var=LIBRARY_PATH
315343d802faSmrg  shlibpath_overrides_runpath=no
315443d802faSmrg  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
315543d802faSmrg  hardcode_into_libs=yes
315643d802faSmrg  ;;
315748c85eb7Smrg
315843d802faSmrghpux9* | hpux10* | hpux11*)
315943d802faSmrg  # Give a soname corresponding to the major version so that dld.sl refuses to
316043d802faSmrg  # link against other versions.
316143d802faSmrg  version_type=sunos
316243d802faSmrg  need_lib_prefix=no
316343d802faSmrg  need_version=no
316443d802faSmrg  case $host_cpu in
316543d802faSmrg  ia64*)
316643d802faSmrg    shrext_cmds='.so'
316743d802faSmrg    hardcode_into_libs=yes
316843d802faSmrg    dynamic_linker="$host_os dld.so"
316943d802faSmrg    shlibpath_var=LD_LIBRARY_PATH
317043d802faSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
317143d802faSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
317243d802faSmrg    soname_spec='$libname$release$shared_ext$major'
317343d802faSmrg    if test 32 = "$HPUX_IA64_MODE"; then
317443d802faSmrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
317543d802faSmrg      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
317643d802faSmrg    else
317743d802faSmrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
317843d802faSmrg      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
317943d802faSmrg    fi
318043d802faSmrg    ;;
318143d802faSmrg  hppa*64*)
318243d802faSmrg    shrext_cmds='.sl'
318343d802faSmrg    hardcode_into_libs=yes
318443d802faSmrg    dynamic_linker="$host_os dld.sl"
318543d802faSmrg    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
318643d802faSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
318743d802faSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
318843d802faSmrg    soname_spec='$libname$release$shared_ext$major'
318943d802faSmrg    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
319043d802faSmrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
319143d802faSmrg    ;;
319243d802faSmrg  *)
319343d802faSmrg    shrext_cmds='.sl'
319443d802faSmrg    dynamic_linker="$host_os dld.sl"
319543d802faSmrg    shlibpath_var=SHLIB_PATH
319643d802faSmrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
319743d802faSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
319843d802faSmrg    soname_spec='$libname$release$shared_ext$major'
319943d802faSmrg    ;;
320043d802faSmrg  esac
320143d802faSmrg  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
320243d802faSmrg  postinstall_cmds='chmod 555 $lib'
320343d802faSmrg  # or fails outright, so override atomically:
320443d802faSmrg  install_override_mode=555
320543d802faSmrg  ;;
320648c85eb7Smrg
320743d802faSmrginterix[[3-9]]*)
320843d802faSmrg  version_type=linux # correct to gnu/linux during the next big refactor
320943d802faSmrg  need_lib_prefix=no
321043d802faSmrg  need_version=no
321143d802faSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
321243d802faSmrg  soname_spec='$libname$release$shared_ext$major'
321343d802faSmrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
321443d802faSmrg  shlibpath_var=LD_LIBRARY_PATH
321543d802faSmrg  shlibpath_overrides_runpath=no
321643d802faSmrg  hardcode_into_libs=yes
321743d802faSmrg  ;;
321852fd71cdSmrg
321943d802faSmrgirix5* | irix6* | nonstopux*)
322043d802faSmrg  case $host_os in
322143d802faSmrg    nonstopux*) version_type=nonstopux ;;
322243d802faSmrg    *)
322343d802faSmrg	if test yes = "$lt_cv_prog_gnu_ld"; then
322443d802faSmrg		version_type=linux # correct to gnu/linux during the next big refactor
322543d802faSmrg	else
322643d802faSmrg		version_type=irix
322743d802faSmrg	fi ;;
322843d802faSmrg  esac
322943d802faSmrg  need_lib_prefix=no
323043d802faSmrg  need_version=no
323143d802faSmrg  soname_spec='$libname$release$shared_ext$major'
323243d802faSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
323343d802faSmrg  case $host_os in
323443d802faSmrg  irix5* | nonstopux*)
323543d802faSmrg    libsuff= shlibsuff=
323643d802faSmrg    ;;
323743d802faSmrg  *)
323843d802faSmrg    case $LD in # libtool.m4 will add one of these switches to LD
323943d802faSmrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
324043d802faSmrg      libsuff= shlibsuff= libmagic=32-bit;;
324143d802faSmrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
324243d802faSmrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
324343d802faSmrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
324443d802faSmrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
324543d802faSmrg    *) libsuff= shlibsuff= libmagic=never-match;;
324643d802faSmrg    esac
324743d802faSmrg    ;;
324843d802faSmrg  esac
324943d802faSmrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
325043d802faSmrg  shlibpath_overrides_runpath=no
325143d802faSmrg  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
325243d802faSmrg  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
325343d802faSmrg  hardcode_into_libs=yes
325443d802faSmrg  ;;
325552fd71cdSmrg
325643d802faSmrg# No shared lib support for Linux oldld, aout, or coff.
325743d802faSmrglinux*oldld* | linux*aout* | linux*coff*)
325843d802faSmrg  dynamic_linker=no
325943d802faSmrg  ;;
32603da084b3Smrg
326143d802faSmrglinux*android*)
326243d802faSmrg  version_type=none # Android doesn't support versioned libraries.
326343d802faSmrg  need_lib_prefix=no
326443d802faSmrg  need_version=no
326543d802faSmrg  library_names_spec='$libname$release$shared_ext'
326643d802faSmrg  soname_spec='$libname$release$shared_ext'
326743d802faSmrg  finish_cmds=
326843d802faSmrg  shlibpath_var=LD_LIBRARY_PATH
326943d802faSmrg  shlibpath_overrides_runpath=yes
32703da084b3Smrg
327143d802faSmrg  # This implies no fast_install, which is unacceptable.
327243d802faSmrg  # Some rework will be needed to allow for fast_install
327343d802faSmrg  # before this can be enabled.
327443d802faSmrg  hardcode_into_libs=yes
32753da084b3Smrg
327643d802faSmrg  dynamic_linker='Android linker'
327743d802faSmrg  # Don't embed -rpath directories since the linker doesn't support them.
327843d802faSmrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
327943d802faSmrg  ;;
32803da084b3Smrg
328143d802faSmrg# This must be glibc/ELF.
328243d802faSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
328343d802faSmrg  version_type=linux # correct to gnu/linux during the next big refactor
328443d802faSmrg  need_lib_prefix=no
328543d802faSmrg  need_version=no
328643d802faSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
328743d802faSmrg  soname_spec='$libname$release$shared_ext$major'
328843d802faSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
328943d802faSmrg  shlibpath_var=LD_LIBRARY_PATH
329043d802faSmrg  shlibpath_overrides_runpath=no
329155acc8fcSmrg
329243d802faSmrg  # Some binutils ld are patched to set DT_RUNPATH
329343d802faSmrg  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
329443d802faSmrg    [lt_cv_shlibpath_overrides_runpath=no
329543d802faSmrg    save_LDFLAGS=$LDFLAGS
329643d802faSmrg    save_libdir=$libdir
329743d802faSmrg    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
329843d802faSmrg	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
329943d802faSmrg    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
330043d802faSmrg      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
330143d802faSmrg	 [lt_cv_shlibpath_overrides_runpath=yes])])
330243d802faSmrg    LDFLAGS=$save_LDFLAGS
330343d802faSmrg    libdir=$save_libdir
330443d802faSmrg    ])
330543d802faSmrg  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
330655acc8fcSmrg
330743d802faSmrg  # This implies no fast_install, which is unacceptable.
330843d802faSmrg  # Some rework will be needed to allow for fast_install
330943d802faSmrg  # before this can be enabled.
331043d802faSmrg  hardcode_into_libs=yes
33113da084b3Smrg
331243d802faSmrg  # Ideally, we could use ldconfig to report *all* directores which are
331343d802faSmrg  # searched for libraries, however this is still not possible.  Aside from not
331443d802faSmrg  # being certain /sbin/ldconfig is available, command
331543d802faSmrg  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
331643d802faSmrg  # even though it is searched at run-time.  Try to do the best guess by
331743d802faSmrg  # appending ld.so.conf contents (and includes) to the search path.
331843d802faSmrg  if test -f /etc/ld.so.conf; then
331943d802faSmrg    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
332043d802faSmrg    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
332143d802faSmrg  fi
33223da084b3Smrg
332343d802faSmrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
332443d802faSmrg  # powerpc, because MkLinux only supported shared libraries with the
332543d802faSmrg  # GNU dynamic linker.  Since this was broken with cross compilers,
332643d802faSmrg  # most powerpc-linux boxes support dynamic linking these days and
332743d802faSmrg  # people can always --disable-shared, the test was removed, and we
332843d802faSmrg  # assume the GNU/Linux dynamic linker is in use.
332943d802faSmrg  dynamic_linker='GNU/Linux ld.so'
333043d802faSmrg  ;;
33313da084b3Smrg
333243d802faSmrgnetbsd*)
333343d802faSmrg  version_type=sunos
333443d802faSmrg  need_lib_prefix=no
333543d802faSmrg  need_version=no
333643d802faSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
333743d802faSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
333843d802faSmrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
333943d802faSmrg    dynamic_linker='NetBSD (a.out) ld.so'
334043d802faSmrg  else
334143d802faSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
334243d802faSmrg    soname_spec='$libname$release$shared_ext$major'
334343d802faSmrg    dynamic_linker='NetBSD ld.elf_so'
334443d802faSmrg  fi
334543d802faSmrg  shlibpath_var=LD_LIBRARY_PATH
334643d802faSmrg  shlibpath_overrides_runpath=yes
334743d802faSmrg  hardcode_into_libs=yes
334843d802faSmrg  ;;
33493da084b3Smrg
335043d802faSmrgnewsos6)
335143d802faSmrg  version_type=linux # correct to gnu/linux during the next big refactor
335243d802faSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
335343d802faSmrg  shlibpath_var=LD_LIBRARY_PATH
335443d802faSmrg  shlibpath_overrides_runpath=yes
335543d802faSmrg  ;;
33563da084b3Smrg
335743d802faSmrg*nto* | *qnx*)
335843d802faSmrg  version_type=qnx
335943d802faSmrg  need_lib_prefix=no
336043d802faSmrg  need_version=no
336143d802faSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
336243d802faSmrg  soname_spec='$libname$release$shared_ext$major'
336343d802faSmrg  shlibpath_var=LD_LIBRARY_PATH
336443d802faSmrg  shlibpath_overrides_runpath=no
336543d802faSmrg  hardcode_into_libs=yes
336643d802faSmrg  dynamic_linker='ldqnx.so'
336743d802faSmrg  ;;
33683da084b3Smrg
336943d802faSmrgopenbsd* | bitrig*)
337043d802faSmrg  version_type=sunos
337143d802faSmrg  sys_lib_dlsearch_path_spec=/usr/lib
337243d802faSmrg  need_lib_prefix=no
337343d802faSmrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
337443d802faSmrg    need_version=no
337543d802faSmrg  else
337643d802faSmrg    need_version=yes
337743d802faSmrg  fi
337843d802faSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
337943d802faSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
338043d802faSmrg  shlibpath_var=LD_LIBRARY_PATH
338143d802faSmrg  shlibpath_overrides_runpath=yes
338243d802faSmrg  ;;
33833da084b3Smrg
338443d802faSmrgos2*)
338543d802faSmrg  libname_spec='$name'
338643d802faSmrg  version_type=windows
338743d802faSmrg  shrext_cmds=.dll
338843d802faSmrg  need_version=no
338943d802faSmrg  need_lib_prefix=no
339043d802faSmrg  # OS/2 can only load a DLL with a base name of 8 characters or less.
339143d802faSmrg  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
339243d802faSmrg    v=$($ECHO $release$versuffix | tr -d .-);
339343d802faSmrg    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
339443d802faSmrg    $ECHO $n$v`$shared_ext'
339543d802faSmrg  library_names_spec='${libname}_dll.$libext'
339643d802faSmrg  dynamic_linker='OS/2 ld.exe'
339743d802faSmrg  shlibpath_var=BEGINLIBPATH
339843d802faSmrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
339943d802faSmrg  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
340043d802faSmrg  postinstall_cmds='base_file=`basename \$file`~
340143d802faSmrg    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
340243d802faSmrg    dldir=$destdir/`dirname \$dlpath`~
340343d802faSmrg    test -d \$dldir || mkdir -p \$dldir~
340443d802faSmrg    $install_prog $dir/$dlname \$dldir/$dlname~
340543d802faSmrg    chmod a+x \$dldir/$dlname~
340643d802faSmrg    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
340743d802faSmrg      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
340843d802faSmrg    fi'
340943d802faSmrg  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
341043d802faSmrg    dlpath=$dir/\$dldll~
341143d802faSmrg    $RM \$dlpath'
341243d802faSmrg  ;;
34133da084b3Smrg
341443d802faSmrgosf3* | osf4* | osf5*)
341543d802faSmrg  version_type=osf
341643d802faSmrg  need_lib_prefix=no
341743d802faSmrg  need_version=no
341843d802faSmrg  soname_spec='$libname$release$shared_ext$major'
341943d802faSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
342043d802faSmrg  shlibpath_var=LD_LIBRARY_PATH
342143d802faSmrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
342243d802faSmrg  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
342343d802faSmrg  ;;
34242a53b785Smrg
342543d802faSmrgrdos*)
342643d802faSmrg  dynamic_linker=no
342743d802faSmrg  ;;
34283da084b3Smrg
342943d802faSmrgsolaris*)
343043d802faSmrg  version_type=linux # correct to gnu/linux during the next big refactor
343143d802faSmrg  need_lib_prefix=no
343243d802faSmrg  need_version=no
343343d802faSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
343443d802faSmrg  soname_spec='$libname$release$shared_ext$major'
343543d802faSmrg  shlibpath_var=LD_LIBRARY_PATH
343643d802faSmrg  shlibpath_overrides_runpath=yes
343743d802faSmrg  hardcode_into_libs=yes
343843d802faSmrg  # ldd complains unless libraries are executable
343943d802faSmrg  postinstall_cmds='chmod +x $lib'
344043d802faSmrg  ;;
34412a53b785Smrg
344243d802faSmrgsunos4*)
344343d802faSmrg  version_type=sunos
344443d802faSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
344543d802faSmrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
344643d802faSmrg  shlibpath_var=LD_LIBRARY_PATH
344743d802faSmrg  shlibpath_overrides_runpath=yes
344843d802faSmrg  if test yes = "$with_gnu_ld"; then
344943d802faSmrg    need_lib_prefix=no
345043d802faSmrg  fi
345143d802faSmrg  need_version=yes
345243d802faSmrg  ;;
34532a53b785Smrg
345443d802faSmrgsysv4 | sysv4.3*)
345543d802faSmrg  version_type=linux # correct to gnu/linux during the next big refactor
345643d802faSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
345743d802faSmrg  soname_spec='$libname$release$shared_ext$major'
345843d802faSmrg  shlibpath_var=LD_LIBRARY_PATH
345943d802faSmrg  case $host_vendor in
346043d802faSmrg    sni)
346143d802faSmrg      shlibpath_overrides_runpath=no
346243d802faSmrg      need_lib_prefix=no
346343d802faSmrg      runpath_var=LD_RUN_PATH
346443d802faSmrg      ;;
346543d802faSmrg    siemens)
346643d802faSmrg      need_lib_prefix=no
346743d802faSmrg      ;;
346843d802faSmrg    motorola)
346943d802faSmrg      need_lib_prefix=no
347043d802faSmrg      need_version=no
347143d802faSmrg      shlibpath_overrides_runpath=no
347243d802faSmrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
347343d802faSmrg      ;;
347443d802faSmrg  esac
347543d802faSmrg  ;;
34762a53b785Smrg
347743d802faSmrgsysv4*MP*)
347843d802faSmrg  if test -d /usr/nec; then
347943d802faSmrg    version_type=linux # correct to gnu/linux during the next big refactor
348043d802faSmrg    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
348143d802faSmrg    soname_spec='$libname$shared_ext.$major'
348243d802faSmrg    shlibpath_var=LD_LIBRARY_PATH
348343d802faSmrg  fi
348443d802faSmrg  ;;
34852a53b785Smrg
348643d802faSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
348743d802faSmrg  version_type=sco
348843d802faSmrg  need_lib_prefix=no
348943d802faSmrg  need_version=no
349043d802faSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
349143d802faSmrg  soname_spec='$libname$release$shared_ext$major'
349243d802faSmrg  shlibpath_var=LD_LIBRARY_PATH
349343d802faSmrg  shlibpath_overrides_runpath=yes
349443d802faSmrg  hardcode_into_libs=yes
349543d802faSmrg  if test yes = "$with_gnu_ld"; then
349643d802faSmrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
349743d802faSmrg  else
349843d802faSmrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
349943d802faSmrg    case $host_os in
350043d802faSmrg      sco3.2v5*)
350143d802faSmrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
350243d802faSmrg	;;
350343d802faSmrg    esac
350443d802faSmrg  fi
350543d802faSmrg  sys_lib_dlsearch_path_spec='/usr/lib'
350643d802faSmrg  ;;
35072a53b785Smrg
350843d802faSmrgtpf*)
350943d802faSmrg  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
351043d802faSmrg  version_type=linux # correct to gnu/linux during the next big refactor
351143d802faSmrg  need_lib_prefix=no
351243d802faSmrg  need_version=no
351343d802faSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
351443d802faSmrg  shlibpath_var=LD_LIBRARY_PATH
351543d802faSmrg  shlibpath_overrides_runpath=no
351643d802faSmrg  hardcode_into_libs=yes
351743d802faSmrg  ;;
35182a53b785Smrg
351943d802faSmrguts4*)
352043d802faSmrg  version_type=linux # correct to gnu/linux during the next big refactor
352143d802faSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
352243d802faSmrg  soname_spec='$libname$release$shared_ext$major'
352343d802faSmrg  shlibpath_var=LD_LIBRARY_PATH
352443d802faSmrg  ;;
35252a53b785Smrg
352643d802faSmrg*)
352743d802faSmrg  dynamic_linker=no
352843d802faSmrg  ;;
352943d802faSmrgesac
353043d802faSmrgAC_MSG_RESULT([$dynamic_linker])
353143d802faSmrgtest no = "$dynamic_linker" && can_build_shared=no
35322a53b785Smrg
353343d802faSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
353443d802faSmrgif test yes = "$GCC"; then
353543d802faSmrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
353643d802faSmrgfi
35372a53b785Smrg
353843d802faSmrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
353943d802faSmrg  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
354048c85eb7Smrgfi
35413da084b3Smrg
354243d802faSmrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
354343d802faSmrg  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
354443d802faSmrgfi
35453da084b3Smrg
354643d802faSmrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
354743d802faSmrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
35483da084b3Smrg
354943d802faSmrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
355043d802faSmrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
35513da084b3Smrg
355243d802faSmrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
355343d802faSmrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
35543da084b3Smrg
355543d802faSmrg_LT_DECL([], [variables_saved_for_relink], [1],
355643d802faSmrg    [Variables whose values should be saved in libtool wrapper scripts and
355743d802faSmrg    restored at link time])
355843d802faSmrg_LT_DECL([], [need_lib_prefix], [0],
355943d802faSmrg    [Do we need the "lib" prefix for modules?])
356043d802faSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
356143d802faSmrg_LT_DECL([], [version_type], [0], [Library versioning type])
356243d802faSmrg_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
356343d802faSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
356443d802faSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0],
356543d802faSmrg    [Is shlibpath searched before the hard-coded library search path?])
356643d802faSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
356743d802faSmrg_LT_DECL([], [library_names_spec], [1],
356843d802faSmrg    [[List of archive names.  First name is the real one, the rest are links.
356943d802faSmrg    The last name is the one that the linker finds with -lNAME]])
357043d802faSmrg_LT_DECL([], [soname_spec], [1],
357143d802faSmrg    [[The coded name of the library, if different from the real name]])
357243d802faSmrg_LT_DECL([], [install_override_mode], [1],
357343d802faSmrg    [Permission mode override for installation of shared libraries])
357443d802faSmrg_LT_DECL([], [postinstall_cmds], [2],
357543d802faSmrg    [Command to use after installation of a shared archive])
357643d802faSmrg_LT_DECL([], [postuninstall_cmds], [2],
357743d802faSmrg    [Command to use after uninstallation of a shared archive])
357843d802faSmrg_LT_DECL([], [finish_cmds], [2],
357943d802faSmrg    [Commands used to finish a libtool library installation in a directory])
358043d802faSmrg_LT_DECL([], [finish_eval], [1],
358143d802faSmrg    [[As "finish_cmds", except a single script fragment to be evaled but
358243d802faSmrg    not shown]])
358343d802faSmrg_LT_DECL([], [hardcode_into_libs], [0],
358443d802faSmrg    [Whether we should hardcode library paths into libraries])
358543d802faSmrg_LT_DECL([], [sys_lib_search_path_spec], [2],
358643d802faSmrg    [Compile-time system search path for libraries])
358743d802faSmrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
358843d802faSmrg    [Detected run-time system search path for libraries])
358943d802faSmrg_LT_DECL([], [configure_time_lt_sys_library_path], [2],
359043d802faSmrg    [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
359143d802faSmrg])# _LT_SYS_DYNAMIC_LINKER
35923da084b3Smrg
359355acc8fcSmrg
359443d802faSmrg# _LT_PATH_TOOL_PREFIX(TOOL)
359543d802faSmrg# --------------------------
359643d802faSmrg# find a file program that can recognize shared library
359743d802faSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX],
359843d802faSmrg[m4_require([_LT_DECL_EGREP])dnl
359943d802faSmrgAC_MSG_CHECKING([for $1])
360043d802faSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
360143d802faSmrg[case $MAGIC_CMD in
360243d802faSmrg[[\\/*] |  ?:[\\/]*])
360343d802faSmrg  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
360443d802faSmrg  ;;
360543d802faSmrg*)
360643d802faSmrg  lt_save_MAGIC_CMD=$MAGIC_CMD
360743d802faSmrg  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
360843d802faSmrgdnl $ac_dummy forces splitting on constant user-supplied paths.
360943d802faSmrgdnl POSIX.2 word splitting is done only on the output of word expansions,
361043d802faSmrgdnl not every word.  This closes a longstanding sh security hole.
361143d802faSmrg  ac_dummy="m4_if([$2], , $PATH, [$2])"
361243d802faSmrg  for ac_dir in $ac_dummy; do
361343d802faSmrg    IFS=$lt_save_ifs
361443d802faSmrg    test -z "$ac_dir" && ac_dir=.
361543d802faSmrg    if test -f "$ac_dir/$1"; then
361643d802faSmrg      lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
361743d802faSmrg      if test -n "$file_magic_test_file"; then
361843d802faSmrg	case $deplibs_check_method in
361943d802faSmrg	"file_magic "*)
362043d802faSmrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
362143d802faSmrg	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
362243d802faSmrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
362343d802faSmrg	    $EGREP "$file_magic_regex" > /dev/null; then
362443d802faSmrg	    :
362543d802faSmrg	  else
362643d802faSmrg	    cat <<_LT_EOF 1>&2
3627d63fdb69Smrg
362843d802faSmrg*** Warning: the command libtool uses to detect shared libraries,
362943d802faSmrg*** $file_magic_cmd, produces output that libtool cannot recognize.
363043d802faSmrg*** The result is that libtool may fail to recognize shared libraries
363143d802faSmrg*** as such.  This will affect the creation of libtool libraries that
363243d802faSmrg*** depend on shared libraries, but programs linked with such libtool
363343d802faSmrg*** libraries will work regardless of this problem.  Nevertheless, you
363443d802faSmrg*** may want to report the problem to your system manager and/or to
363543d802faSmrg*** bug-libtool@gnu.org
3636d63fdb69Smrg
363748c85eb7Smrg_LT_EOF
363843d802faSmrg	  fi ;;
363943d802faSmrg	esac
364043d802faSmrg      fi
364143d802faSmrg      break
364243d802faSmrg    fi
364343d802faSmrg  done
364443d802faSmrg  IFS=$lt_save_ifs
364543d802faSmrg  MAGIC_CMD=$lt_save_MAGIC_CMD
364643d802faSmrg  ;;
364743d802faSmrgesac])
364843d802faSmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD
364943d802faSmrgif test -n "$MAGIC_CMD"; then
365043d802faSmrg  AC_MSG_RESULT($MAGIC_CMD)
365143d802faSmrgelse
365243d802faSmrg  AC_MSG_RESULT(no)
365343d802faSmrgfi
365443d802faSmrg_LT_DECL([], [MAGIC_CMD], [0],
365543d802faSmrg	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
365643d802faSmrg])# _LT_PATH_TOOL_PREFIX
365748c85eb7Smrg
365843d802faSmrg# Old name:
365943d802faSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
366043d802faSmrgdnl aclocal-1.4 backwards compatibility:
366143d802faSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
366255acc8fcSmrg
366355acc8fcSmrg
366443d802faSmrg# _LT_PATH_MAGIC
366543d802faSmrg# --------------
366643d802faSmrg# find a file program that can recognize a shared library
366743d802faSmrgm4_defun([_LT_PATH_MAGIC],
366843d802faSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
366943d802faSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then
367043d802faSmrg  if test -n "$ac_tool_prefix"; then
367143d802faSmrg    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
367243d802faSmrg  else
367343d802faSmrg    MAGIC_CMD=:
367443d802faSmrg  fi
36752a53b785Smrgfi
367643d802faSmrg])# _LT_PATH_MAGIC
3677d63fdb69Smrg
3678d63fdb69Smrg
367943d802faSmrg# LT_PATH_LD
368043d802faSmrg# ----------
368143d802faSmrg# find the pathname to the GNU or non-GNU linker
368243d802faSmrgAC_DEFUN([LT_PATH_LD],
368343d802faSmrg[AC_REQUIRE([AC_PROG_CC])dnl
368443d802faSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
368543d802faSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
368643d802faSmrgm4_require([_LT_DECL_SED])dnl
368743d802faSmrgm4_require([_LT_DECL_EGREP])dnl
368843d802faSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl
3689d63fdb69Smrg
369043d802faSmrgAC_ARG_WITH([gnu-ld],
369143d802faSmrg    [AS_HELP_STRING([--with-gnu-ld],
369243d802faSmrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
369343d802faSmrg    [test no = "$withval" || with_gnu_ld=yes],
369443d802faSmrg    [with_gnu_ld=no])dnl
3695d63fdb69Smrg
369643d802faSmrgac_prog=ld
369743d802faSmrgif test yes = "$GCC"; then
369843d802faSmrg  # Check if gcc -print-prog-name=ld gives a path.
369943d802faSmrg  AC_MSG_CHECKING([for ld used by $CC])
370043d802faSmrg  case $host in
370143d802faSmrg  *-*-mingw*)
370243d802faSmrg    # gcc leaves a trailing carriage return, which upsets mingw
370343d802faSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
370443d802faSmrg  *)
370543d802faSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
370643d802faSmrg  esac
370743d802faSmrg  case $ac_prog in
370843d802faSmrg    # Accept absolute paths.
370943d802faSmrg    [[\\/]]* | ?:[[\\/]]*)
371043d802faSmrg      re_direlt='/[[^/]][[^/]]*/\.\./'
371143d802faSmrg      # Canonicalize the pathname of ld
371243d802faSmrg      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
371343d802faSmrg      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
371443d802faSmrg	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
371543d802faSmrg      done
371643d802faSmrg      test -z "$LD" && LD=$ac_prog
371743d802faSmrg      ;;
371843d802faSmrg  "")
371943d802faSmrg    # If it fails, then pretend we aren't using GCC.
372043d802faSmrg    ac_prog=ld
372143d802faSmrg    ;;
372243d802faSmrg  *)
372343d802faSmrg    # If it is relative, then search for the first ld in PATH.
372443d802faSmrg    with_gnu_ld=unknown
372543d802faSmrg    ;;
372643d802faSmrg  esac
372743d802faSmrgelif test yes = "$with_gnu_ld"; then
372843d802faSmrg  AC_MSG_CHECKING([for GNU ld])
372943d802faSmrgelse
373043d802faSmrg  AC_MSG_CHECKING([for non-GNU ld])
373143d802faSmrgfi
373243d802faSmrgAC_CACHE_VAL(lt_cv_path_LD,
373343d802faSmrg[if test -z "$LD"; then
373443d802faSmrg  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
373543d802faSmrg  for ac_dir in $PATH; do
373643d802faSmrg    IFS=$lt_save_ifs
373743d802faSmrg    test -z "$ac_dir" && ac_dir=.
373843d802faSmrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
373943d802faSmrg      lt_cv_path_LD=$ac_dir/$ac_prog
374043d802faSmrg      # Check to see if the program is GNU ld.  I'd rather use --version,
374143d802faSmrg      # but apparently some variants of GNU ld only accept -v.
374243d802faSmrg      # Break only if it was the GNU/non-GNU ld that we prefer.
374343d802faSmrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
374443d802faSmrg      *GNU* | *'with BFD'*)
374543d802faSmrg	test no != "$with_gnu_ld" && break
374643d802faSmrg	;;
374743d802faSmrg      *)
374843d802faSmrg	test yes != "$with_gnu_ld" && break
374943d802faSmrg	;;
375043d802faSmrg      esac
375143d802faSmrg    fi
375243d802faSmrg  done
375343d802faSmrg  IFS=$lt_save_ifs
375443d802faSmrgelse
375543d802faSmrg  lt_cv_path_LD=$LD # Let the user override the test with a path.
375643d802faSmrgfi])
375743d802faSmrgLD=$lt_cv_path_LD
375843d802faSmrgif test -n "$LD"; then
375943d802faSmrg  AC_MSG_RESULT($LD)
376043d802faSmrgelse
376143d802faSmrg  AC_MSG_RESULT(no)
376243d802faSmrgfi
376343d802faSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
376443d802faSmrg_LT_PATH_LD_GNU
376543d802faSmrgAC_SUBST([LD])
3766d63fdb69Smrg
376743d802faSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
376843d802faSmrg])# LT_PATH_LD
3769d63fdb69Smrg
377043d802faSmrg# Old names:
377143d802faSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
377243d802faSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
377343d802faSmrgdnl aclocal-1.4 backwards compatibility:
377443d802faSmrgdnl AC_DEFUN([AM_PROG_LD], [])
377543d802faSmrgdnl AC_DEFUN([AC_PROG_LD], [])
3776d63fdb69Smrg
3777d63fdb69Smrg
377843d802faSmrg# _LT_PATH_LD_GNU
377943d802faSmrg#- --------------
378043d802faSmrgm4_defun([_LT_PATH_LD_GNU],
378143d802faSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
378243d802faSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
378343d802faSmrgcase `$LD -v 2>&1 </dev/null` in
378443d802faSmrg*GNU* | *'with BFD'*)
378543d802faSmrg  lt_cv_prog_gnu_ld=yes
378643d802faSmrg  ;;
378743d802faSmrg*)
378843d802faSmrg  lt_cv_prog_gnu_ld=no
378943d802faSmrg  ;;
379043d802faSmrgesac])
379143d802faSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld
379243d802faSmrg])# _LT_PATH_LD_GNU
379348c85eb7Smrg
379448c85eb7Smrg
379543d802faSmrg# _LT_CMD_RELOAD
379643d802faSmrg# --------------
379743d802faSmrg# find reload flag for linker
379843d802faSmrg#   -- PORTME Some linkers may need a different reload flag.
379943d802faSmrgm4_defun([_LT_CMD_RELOAD],
380043d802faSmrg[AC_CACHE_CHECK([for $LD option to reload object files],
380143d802faSmrg  lt_cv_ld_reload_flag,
380243d802faSmrg  [lt_cv_ld_reload_flag='-r'])
380343d802faSmrgreload_flag=$lt_cv_ld_reload_flag
380443d802faSmrgcase $reload_flag in
380543d802faSmrg"" | " "*) ;;
380643d802faSmrg*) reload_flag=" $reload_flag" ;;
380743d802faSmrgesac
380843d802faSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
380943d802faSmrgcase $host_os in
381043d802faSmrg  cygwin* | mingw* | pw32* | cegcc*)
381143d802faSmrg    if test yes != "$GCC"; then
381243d802faSmrg      reload_cmds=false
381343d802faSmrg    fi
381443d802faSmrg    ;;
381543d802faSmrg  darwin*)
381643d802faSmrg    if test yes = "$GCC"; then
381743d802faSmrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
381843d802faSmrg    else
381943d802faSmrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
382043d802faSmrg    fi
382143d802faSmrg    ;;
382243d802faSmrgesac
382343d802faSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
382443d802faSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl
382543d802faSmrg])# _LT_CMD_RELOAD
38262a53b785Smrg
38272a53b785Smrg
382843d802faSmrg# _LT_PATH_DD
382943d802faSmrg# -----------
383043d802faSmrg# find a working dd
383143d802faSmrgm4_defun([_LT_PATH_DD],
383243d802faSmrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
383343d802faSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i
383443d802faSmrgcat conftest.i conftest.i >conftest2.i
383543d802faSmrg: ${lt_DD:=$DD}
383643d802faSmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
383743d802faSmrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
383843d802faSmrg  cmp -s conftest.i conftest.out \
383943d802faSmrg  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
384043d802faSmrgfi])
384143d802faSmrgrm -f conftest.i conftest2.i conftest.out])
384243d802faSmrg])# _LT_PATH_DD
38432a53b785Smrg
384448c85eb7Smrg
384543d802faSmrg# _LT_CMD_TRUNCATE
384643d802faSmrg# ----------------
384743d802faSmrg# find command to truncate a binary pipe
384843d802faSmrgm4_defun([_LT_CMD_TRUNCATE],
384943d802faSmrg[m4_require([_LT_PATH_DD])
385043d802faSmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
385143d802faSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i
385243d802faSmrgcat conftest.i conftest.i >conftest2.i
385343d802faSmrglt_cv_truncate_bin=
385443d802faSmrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
385543d802faSmrg  cmp -s conftest.i conftest.out \
385643d802faSmrg  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
38572a53b785Smrgfi
385843d802faSmrgrm -f conftest.i conftest2.i conftest.out
385943d802faSmrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
386043d802faSmrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
386143d802faSmrg  [Command to truncate a binary pipe])
386243d802faSmrg])# _LT_CMD_TRUNCATE
386348c85eb7Smrg
386448c85eb7Smrg
386543d802faSmrg# _LT_CHECK_MAGIC_METHOD
386643d802faSmrg# ----------------------
386743d802faSmrg# how to check for library dependencies
386843d802faSmrg#  -- PORTME fill in with the dynamic library characteristics
386943d802faSmrgm4_defun([_LT_CHECK_MAGIC_METHOD],
387043d802faSmrg[m4_require([_LT_DECL_EGREP])
387143d802faSmrgm4_require([_LT_DECL_OBJDUMP])
387243d802faSmrgAC_CACHE_CHECK([how to recognize dependent libraries],
387343d802faSmrglt_cv_deplibs_check_method,
387443d802faSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
387543d802faSmrglt_cv_file_magic_test_file=
387643d802faSmrglt_cv_deplibs_check_method='unknown'
387743d802faSmrg# Need to set the preceding variable on all platforms that support
387843d802faSmrg# interlibrary dependencies.
387943d802faSmrg# 'none' -- dependencies not supported.
388043d802faSmrg# 'unknown' -- same as none, but documents that we really don't know.
388143d802faSmrg# 'pass_all' -- all dependencies passed with no checks.
388243d802faSmrg# 'test_compile' -- check by making test program.
388343d802faSmrg# 'file_magic [[regex]]' -- check by looking for files in library path
388443d802faSmrg# that responds to the $file_magic_cmd with a given extended regex.
388543d802faSmrg# If you have 'file' or equivalent on your system and you're not sure
388643d802faSmrg# whether 'pass_all' will *always* work, you probably want this one.
388748c85eb7Smrg
388843d802faSmrgcase $host_os in
388943d802faSmrgaix[[4-9]]*)
389043d802faSmrg  lt_cv_deplibs_check_method=pass_all
389143d802faSmrg  ;;
389248c85eb7Smrg
389343d802faSmrgbeos*)
389443d802faSmrg  lt_cv_deplibs_check_method=pass_all
389543d802faSmrg  ;;
389648c85eb7Smrg
389743d802faSmrgbsdi[[45]]*)
389843d802faSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
389943d802faSmrg  lt_cv_file_magic_cmd='$FILECMD -L'
390043d802faSmrg  lt_cv_file_magic_test_file=/shlib/libc.so
390143d802faSmrg  ;;
390248c85eb7Smrg
390343d802faSmrgcygwin*)
390443d802faSmrg  # func_win32_libid is a shell function defined in ltmain.sh
390543d802faSmrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
390643d802faSmrg  lt_cv_file_magic_cmd='func_win32_libid'
390743d802faSmrg  ;;
390848c85eb7Smrg
390943d802faSmrgmingw* | pw32*)
391043d802faSmrg  # Base MSYS/MinGW do not provide the 'file' command needed by
391143d802faSmrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
391243d802faSmrg  # unless we find 'file', for example because we are cross-compiling.
391343d802faSmrg  if ( file / ) >/dev/null 2>&1; then
391443d802faSmrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
391543d802faSmrg    lt_cv_file_magic_cmd='func_win32_libid'
391643d802faSmrg  else
391743d802faSmrg    # Keep this pattern in sync with the one in func_win32_libid.
391843d802faSmrg    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
391943d802faSmrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
392043d802faSmrg  fi
392143d802faSmrg  ;;
39222a53b785Smrg
392343d802faSmrgcegcc*)
392443d802faSmrg  # use the weaker test based on 'objdump'. See mingw*.
392543d802faSmrg  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
392643d802faSmrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
392743d802faSmrg  ;;
39282a53b785Smrg
392943d802faSmrgdarwin* | rhapsody*)
393043d802faSmrg  lt_cv_deplibs_check_method=pass_all
393143d802faSmrg  ;;
39322a53b785Smrg
393343d802faSmrgfreebsd* | dragonfly* | midnightbsd*)
393443d802faSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
393543d802faSmrg    case $host_cpu in
393643d802faSmrg    i*86 )
393743d802faSmrg      # Not sure whether the presence of OpenBSD here was a mistake.
393843d802faSmrg      # Let's accept both of them until this is cleared up.
393943d802faSmrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
394043d802faSmrg      lt_cv_file_magic_cmd=$FILECMD
394143d802faSmrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
394243d802faSmrg      ;;
394343d802faSmrg    esac
394443d802faSmrg  else
394543d802faSmrg    lt_cv_deplibs_check_method=pass_all
394643d802faSmrg  fi
394743d802faSmrg  ;;
39482a53b785Smrg
394943d802faSmrghaiku*)
395043d802faSmrg  lt_cv_deplibs_check_method=pass_all
395143d802faSmrg  ;;
39522a53b785Smrg
395343d802faSmrghpux10.20* | hpux11*)
395443d802faSmrg  lt_cv_file_magic_cmd=$FILECMD
395543d802faSmrg  case $host_cpu in
395643d802faSmrg  ia64*)
395743d802faSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
395843d802faSmrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
395943d802faSmrg    ;;
396043d802faSmrg  hppa*64*)
396143d802faSmrg    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
396243d802faSmrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
396343d802faSmrg    ;;
396443d802faSmrg  *)
396543d802faSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
396643d802faSmrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
396743d802faSmrg    ;;
396843d802faSmrg  esac
396943d802faSmrg  ;;
397052fd71cdSmrg
397143d802faSmrginterix[[3-9]]*)
397243d802faSmrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
397343d802faSmrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
397443d802faSmrg  ;;
397548c85eb7Smrg
397643d802faSmrgirix5* | irix6* | nonstopux*)
397743d802faSmrg  case $LD in
397843d802faSmrg  *-32|*"-32 ") libmagic=32-bit;;
397943d802faSmrg  *-n32|*"-n32 ") libmagic=N32;;
398043d802faSmrg  *-64|*"-64 ") libmagic=64-bit;;
398143d802faSmrg  *) libmagic=never-match;;
398243d802faSmrg  esac
398343d802faSmrg  lt_cv_deplibs_check_method=pass_all
398443d802faSmrg  ;;
398548c85eb7Smrg
398643d802faSmrg# This must be glibc/ELF.
398743d802faSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
398843d802faSmrg  lt_cv_deplibs_check_method=pass_all
398943d802faSmrg  ;;
399048c85eb7Smrg
399143d802faSmrgnetbsd*)
399243d802faSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
399343d802faSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
399443d802faSmrg  else
399543d802faSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
399643d802faSmrg  fi
399743d802faSmrg  ;;
39982a53b785Smrg
399943d802faSmrgnewos6*)
400043d802faSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
400143d802faSmrg  lt_cv_file_magic_cmd=$FILECMD
400243d802faSmrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
400343d802faSmrg  ;;
40042a53b785Smrg
400543d802faSmrg*nto* | *qnx*)
400643d802faSmrg  lt_cv_deplibs_check_method=pass_all
400743d802faSmrg  ;;
400843d802faSmrg
400943d802faSmrgopenbsd* | bitrig*)
401043d802faSmrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
401143d802faSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
401243d802faSmrg  else
401343d802faSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
401443d802faSmrg  fi
401543d802faSmrg  ;;
401643d802faSmrg
401743d802faSmrgosf3* | osf4* | osf5*)
401843d802faSmrg  lt_cv_deplibs_check_method=pass_all
401943d802faSmrg  ;;
402043d802faSmrg
402143d802faSmrgrdos*)
402243d802faSmrg  lt_cv_deplibs_check_method=pass_all
402343d802faSmrg  ;;
402443d802faSmrg
402543d802faSmrgsolaris*)
402643d802faSmrg  lt_cv_deplibs_check_method=pass_all
402743d802faSmrg  ;;
402843d802faSmrg
402943d802faSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
403043d802faSmrg  lt_cv_deplibs_check_method=pass_all
403143d802faSmrg  ;;
403243d802faSmrg
403343d802faSmrgsysv4 | sysv4.3*)
403443d802faSmrg  case $host_vendor in
403543d802faSmrg  motorola)
403643d802faSmrg    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]]'
403743d802faSmrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
403843d802faSmrg    ;;
403943d802faSmrg  ncr)
404043d802faSmrg    lt_cv_deplibs_check_method=pass_all
404143d802faSmrg    ;;
404243d802faSmrg  sequent)
404343d802faSmrg    lt_cv_file_magic_cmd='/bin/file'
404443d802faSmrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
404543d802faSmrg    ;;
404643d802faSmrg  sni)
404743d802faSmrg    lt_cv_file_magic_cmd='/bin/file'
404843d802faSmrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
404943d802faSmrg    lt_cv_file_magic_test_file=/lib/libc.so
405043d802faSmrg    ;;
405143d802faSmrg  siemens)
405243d802faSmrg    lt_cv_deplibs_check_method=pass_all
405343d802faSmrg    ;;
405443d802faSmrg  pc)
405543d802faSmrg    lt_cv_deplibs_check_method=pass_all
40562a53b785Smrg    ;;
40572a53b785Smrg  esac
405843d802faSmrg  ;;
405943d802faSmrg
406043d802faSmrgtpf*)
406143d802faSmrg  lt_cv_deplibs_check_method=pass_all
406243d802faSmrg  ;;
406343d802faSmrgos2*)
406443d802faSmrg  lt_cv_deplibs_check_method=pass_all
406543d802faSmrg  ;;
406643d802faSmrgesac
406743d802faSmrg])
406843d802faSmrg
406943d802faSmrgfile_magic_glob=
407043d802faSmrgwant_nocaseglob=no
407143d802faSmrgif test "$build" = "$host"; then
407243d802faSmrg  case $host_os in
407343d802faSmrg  mingw* | pw32*)
407443d802faSmrg    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
407543d802faSmrg      want_nocaseglob=yes
40762a53b785Smrg    else
407743d802faSmrg      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
40782a53b785Smrg    fi
40792a53b785Smrg    ;;
40802a53b785Smrg  esac
408143d802faSmrgfi
408248c85eb7Smrg
408343d802faSmrgfile_magic_cmd=$lt_cv_file_magic_cmd
408443d802faSmrgdeplibs_check_method=$lt_cv_deplibs_check_method
408543d802faSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
408648c85eb7Smrg
408743d802faSmrg_LT_DECL([], [deplibs_check_method], [1],
408843d802faSmrg    [Method to check whether dependent libraries are shared objects])
408943d802faSmrg_LT_DECL([], [file_magic_cmd], [1],
409043d802faSmrg    [Command to use when deplibs_check_method = "file_magic"])
409143d802faSmrg_LT_DECL([], [file_magic_glob], [1],
409243d802faSmrg    [How to find potential files when deplibs_check_method = "file_magic"])
409343d802faSmrg_LT_DECL([], [want_nocaseglob], [1],
409443d802faSmrg    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
409543d802faSmrg])# _LT_CHECK_MAGIC_METHOD
409643d802faSmrg
409743d802faSmrg
409843d802faSmrg# LT_PATH_NM
409943d802faSmrg# ----------
410043d802faSmrg# find the pathname to a BSD- or MS-compatible name lister
410143d802faSmrgAC_DEFUN([LT_PATH_NM],
410243d802faSmrg[AC_REQUIRE([AC_PROG_CC])dnl
410343d802faSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
410443d802faSmrg[if test -n "$NM"; then
410543d802faSmrg  # Let the user override the test.
410643d802faSmrg  lt_cv_path_NM=$NM
410743d802faSmrgelse
410843d802faSmrg  lt_nm_to_check=${ac_tool_prefix}nm
410943d802faSmrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
411043d802faSmrg    lt_nm_to_check="$lt_nm_to_check nm"
41112a53b785Smrg  fi
411243d802faSmrg  for lt_tmp_nm in $lt_nm_to_check; do
411343d802faSmrg    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
411443d802faSmrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
411543d802faSmrg      IFS=$lt_save_ifs
411643d802faSmrg      test -z "$ac_dir" && ac_dir=.
411743d802faSmrg      tmp_nm=$ac_dir/$lt_tmp_nm
411843d802faSmrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
411943d802faSmrg	# Check to see if the nm accepts a BSD-compat flag.
412043d802faSmrg	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
412143d802faSmrg	#   nm: unknown option "B" ignored
412243d802faSmrg	# Tru64's nm complains that /dev/null is an invalid object file
412343d802faSmrg	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
412443d802faSmrg	case $build_os in
412543d802faSmrg	mingw*) lt_bad_file=conftest.nm/nofile ;;
412643d802faSmrg	*) lt_bad_file=/dev/null ;;
412743d802faSmrg	esac
412843d802faSmrg	case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in
412943d802faSmrg	*$lt_bad_file* | *'Invalid file or object type'*)
413043d802faSmrg	  lt_cv_path_NM="$tmp_nm -B"
413143d802faSmrg	  break 2
413243d802faSmrg	  ;;
413343d802faSmrg	*)
413443d802faSmrg	  case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in
413543d802faSmrg	  */dev/null*)
413643d802faSmrg	    lt_cv_path_NM="$tmp_nm -p"
413743d802faSmrg	    break 2
413843d802faSmrg	    ;;
413943d802faSmrg	  *)
414043d802faSmrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
414143d802faSmrg	    continue # so that we can try to find one that supports BSD flags
414243d802faSmrg	    ;;
414343d802faSmrg	  esac
414443d802faSmrg	  ;;
414543d802faSmrg	esac
414643d802faSmrg      fi
414743d802faSmrg    done
414843d802faSmrg    IFS=$lt_save_ifs
414943d802faSmrg  done
415043d802faSmrg  : ${lt_cv_path_NM=no}
415143d802faSmrgfi])
415243d802faSmrgif test no != "$lt_cv_path_NM"; then
415343d802faSmrg  NM=$lt_cv_path_NM
415443d802faSmrgelse
415543d802faSmrg  # Didn't find any BSD compatible name lister, look for dumpbin.
415643d802faSmrg  if test -n "$DUMPBIN"; then :
415743d802faSmrg    # Let the user override the test.
41582a53b785Smrg  else
415943d802faSmrg    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
416043d802faSmrg    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in
416143d802faSmrg    *COFF*)
416243d802faSmrg      DUMPBIN="$DUMPBIN -symbols -headers"
416343d802faSmrg      ;;
416443d802faSmrg    *)
416543d802faSmrg      DUMPBIN=:
416643d802faSmrg      ;;
416743d802faSmrg    esac
41682a53b785Smrg  fi
416943d802faSmrg  AC_SUBST([DUMPBIN])
417043d802faSmrg  if test : != "$DUMPBIN"; then
417143d802faSmrg    NM=$DUMPBIN
41722a53b785Smrg  fi
41732a53b785Smrgfi
417443d802faSmrgtest -z "$NM" && NM=nm
417543d802faSmrgAC_SUBST([NM])
417643d802faSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
417748c85eb7Smrg
417843d802faSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
417943d802faSmrg  [lt_cv_nm_interface="BSD nm"
418043d802faSmrg  echo "int some_variable = 0;" > conftest.$ac_ext
418143d802faSmrg  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
418243d802faSmrg  (eval "$ac_compile" 2>conftest.err)
418343d802faSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
418443d802faSmrg  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
418543d802faSmrg  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
418643d802faSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
418743d802faSmrg  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
418843d802faSmrg  cat conftest.out >&AS_MESSAGE_LOG_FD
418943d802faSmrg  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
419043d802faSmrg    lt_cv_nm_interface="MS dumpbin"
419143d802faSmrg  fi
419243d802faSmrg  rm -f conftest*])
419343d802faSmrg])# LT_PATH_NM
419448c85eb7Smrg
419543d802faSmrg# Old names:
419643d802faSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
419743d802faSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
419843d802faSmrgdnl aclocal-1.4 backwards compatibility:
419943d802faSmrgdnl AC_DEFUN([AM_PROG_NM], [])
420043d802faSmrgdnl AC_DEFUN([AC_PROG_NM], [])
420148c85eb7Smrg
420243d802faSmrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
420343d802faSmrg# --------------------------------
420443d802faSmrg# how to determine the name of the shared library
420543d802faSmrg# associated with a specific link library.
420643d802faSmrg#  -- PORTME fill in with the dynamic library characteristics
420743d802faSmrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
420843d802faSmrg[m4_require([_LT_DECL_EGREP])
420943d802faSmrgm4_require([_LT_DECL_OBJDUMP])
421043d802faSmrgm4_require([_LT_DECL_DLLTOOL])
421143d802faSmrgAC_CACHE_CHECK([how to associate runtime and link libraries],
421243d802faSmrglt_cv_sharedlib_from_linklib_cmd,
421343d802faSmrg[lt_cv_sharedlib_from_linklib_cmd='unknown'
421448c85eb7Smrg
421543d802faSmrgcase $host_os in
421643d802faSmrgcygwin* | mingw* | pw32* | cegcc*)
421743d802faSmrg  # two different shell functions defined in ltmain.sh;
421843d802faSmrg  # decide which one to use based on capabilities of $DLLTOOL
421943d802faSmrg  case `$DLLTOOL --help 2>&1` in
422043d802faSmrg  *--identify-strict*)
422143d802faSmrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
422243d802faSmrg    ;;
422343d802faSmrg  *)
422443d802faSmrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
422543d802faSmrg    ;;
422643d802faSmrg  esac
422743d802faSmrg  ;;
422843d802faSmrg*)
422943d802faSmrg  # fallback: assume linklib IS sharedlib
423043d802faSmrg  lt_cv_sharedlib_from_linklib_cmd=$ECHO
423143d802faSmrg  ;;
423243d802faSmrgesac
423343d802faSmrg])
423443d802faSmrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
423543d802faSmrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
42363da084b3Smrg
423743d802faSmrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
423843d802faSmrg    [Command to associate shared and link libraries])
423943d802faSmrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
42403da084b3Smrg
4241d63fdb69Smrg
424243d802faSmrg# _LT_PATH_MANIFEST_TOOL
424343d802faSmrg# ----------------------
424443d802faSmrg# locate the manifest tool
424543d802faSmrgm4_defun([_LT_PATH_MANIFEST_TOOL],
424643d802faSmrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
424743d802faSmrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
424843d802faSmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
424943d802faSmrg  [lt_cv_path_mainfest_tool=no
425043d802faSmrg  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
425143d802faSmrg  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
425243d802faSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
425343d802faSmrg  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
425443d802faSmrg    lt_cv_path_mainfest_tool=yes
425543d802faSmrg  fi
425643d802faSmrg  rm -f conftest*])
425743d802faSmrgif test yes != "$lt_cv_path_mainfest_tool"; then
425843d802faSmrg  MANIFEST_TOOL=:
425943d802faSmrgfi
426043d802faSmrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
426143d802faSmrg])# _LT_PATH_MANIFEST_TOOL
426248c85eb7Smrg
42633da084b3Smrg
426443d802faSmrg# _LT_DLL_DEF_P([FILE])
426543d802faSmrg# ---------------------
426643d802faSmrg# True iff FILE is a Windows DLL '.def' file.
426743d802faSmrg# Keep in sync with func_dll_def_p in the libtool script
426843d802faSmrgAC_DEFUN([_LT_DLL_DEF_P],
426943d802faSmrg[dnl
427043d802faSmrg  test DEF = "`$SED -n dnl
427143d802faSmrg    -e '\''s/^[[	 ]]*//'\'' dnl Strip leading whitespace
427243d802faSmrg    -e '\''/^\(;.*\)*$/d'\'' dnl      Delete empty lines and comments
427343d802faSmrg    -e '\''s/^\(EXPORTS\|LIBRARY\)\([[	 ]].*\)*$/DEF/p'\'' dnl
427443d802faSmrg    -e q dnl                          Only consider the first "real" line
427543d802faSmrg    $1`" dnl
427643d802faSmrg])# _LT_DLL_DEF_P
427748c85eb7Smrg
42783da084b3Smrg
427943d802faSmrg# LT_LIB_M
428043d802faSmrg# --------
428143d802faSmrg# check for math library
428243d802faSmrgAC_DEFUN([LT_LIB_M],
428343d802faSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
428443d802faSmrgLIBM=
428543d802faSmrgcase $host in
428643d802faSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
428743d802faSmrg  # These system don't have libm, or don't need it
428843d802faSmrg  ;;
428943d802faSmrg*-ncr-sysv4.3*)
429043d802faSmrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
429143d802faSmrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
429243d802faSmrg  ;;
429343d802faSmrg*)
429443d802faSmrg  AC_CHECK_LIB(m, cos, LIBM=-lm)
429543d802faSmrg  ;;
42962a53b785Smrgesac
429743d802faSmrgAC_SUBST([LIBM])
429843d802faSmrg])# LT_LIB_M
42992a53b785Smrg
430043d802faSmrg# Old name:
430143d802faSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
430243d802faSmrgdnl aclocal-1.4 backwards compatibility:
430343d802faSmrgdnl AC_DEFUN([AC_CHECK_LIBM], [])
43042a53b785Smrg
43053da084b3Smrg
430643d802faSmrg# _LT_COMPILER_NO_RTTI([TAGNAME])
430743d802faSmrg# -------------------------------
430843d802faSmrgm4_defun([_LT_COMPILER_NO_RTTI],
430943d802faSmrg[m4_require([_LT_TAG_COMPILER])dnl
431043d802faSmrg
431143d802faSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
431243d802faSmrg
431343d802faSmrgif test yes = "$GCC"; then
431443d802faSmrg  case $cc_basename in
431543d802faSmrg  nvcc*)
431643d802faSmrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
431743d802faSmrg  *)
431843d802faSmrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
431943d802faSmrg  esac
432043d802faSmrg
432143d802faSmrg  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
432243d802faSmrg    lt_cv_prog_compiler_rtti_exceptions,
432343d802faSmrg    [-fno-rtti -fno-exceptions], [],
432443d802faSmrg    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
432543d802faSmrgfi
432643d802faSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
432743d802faSmrg	[Compiler flag to turn off builtin functions])
432843d802faSmrg])# _LT_COMPILER_NO_RTTI
432943d802faSmrg
433043d802faSmrg
433143d802faSmrg# _LT_CMD_GLOBAL_SYMBOLS
433243d802faSmrg# ----------------------
433343d802faSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS],
433443d802faSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
433543d802faSmrgAC_REQUIRE([AC_PROG_CC])dnl
433643d802faSmrgAC_REQUIRE([AC_PROG_AWK])dnl
433743d802faSmrgAC_REQUIRE([LT_PATH_NM])dnl
433843d802faSmrgAC_REQUIRE([LT_PATH_LD])dnl
433943d802faSmrgm4_require([_LT_DECL_SED])dnl
434043d802faSmrgm4_require([_LT_DECL_EGREP])dnl
434143d802faSmrgm4_require([_LT_TAG_COMPILER])dnl
434243d802faSmrg
434343d802faSmrg# Check for command to grab the raw symbol name followed by C symbol from nm.
434443d802faSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
434543d802faSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
434643d802faSmrg[
434743d802faSmrg# These are sane defaults that work on at least a few old systems.
434843d802faSmrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
434943d802faSmrg
435043d802faSmrg# Character class describing NM global symbol codes.
435143d802faSmrgsymcode='[[BCDEGRST]]'
435243d802faSmrg
435343d802faSmrg# Regexp to match symbols that can be accessed directly from C.
435443d802faSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
435543d802faSmrg
435643d802faSmrg# Define system-specific variables.
435743d802faSmrgcase $host_os in
435843d802faSmrgaix*)
435943d802faSmrg  symcode='[[BCDT]]'
43602a53b785Smrg  ;;
436143d802faSmrgcygwin* | mingw* | pw32* | cegcc*)
436243d802faSmrg  symcode='[[ABCDGISTW]]'
43632a53b785Smrg  ;;
436443d802faSmrghpux*)
436543d802faSmrg  if test ia64 = "$host_cpu"; then
436643d802faSmrg    symcode='[[ABCDEGRST]]'
436748c85eb7Smrg  fi
436848c85eb7Smrg  ;;
436943d802faSmrgirix* | nonstopux*)
437043d802faSmrg  symcode='[[BCDEGRST]]'
43712a53b785Smrg  ;;
437243d802faSmrgosf*)
437343d802faSmrg  symcode='[[BCDEGQRST]]'
43742a53b785Smrg  ;;
437543d802faSmrgsolaris*)
437643d802faSmrg  symcode='[[BDRT]]'
437743d802faSmrg  ;;
437843d802faSmrgsco3.2v5*)
437943d802faSmrg  symcode='[[DT]]'
438043d802faSmrg  ;;
438143d802faSmrgsysv4.2uw2*)
438243d802faSmrg  symcode='[[DT]]'
438343d802faSmrg  ;;
438443d802faSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
438543d802faSmrg  symcode='[[ABDT]]'
438643d802faSmrg  ;;
438743d802faSmrgsysv4)
438843d802faSmrg  symcode='[[DFNSTU]]'
43892a53b785Smrg  ;;
43902a53b785Smrgesac
439148c85eb7Smrg
439243d802faSmrg# If we're using GNU nm, then use its standard symbol codes.
439343d802faSmrgcase `$NM -V 2>&1` in
439443d802faSmrg*GNU* | *'with BFD'*)
439543d802faSmrg  symcode='[[ABCDGIRSTW]]' ;;
439643d802faSmrgesac
43973da084b3Smrg
439843d802faSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then
439943d802faSmrg  # Gets list of data symbols to import.
440043d802faSmrg  lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'"
440143d802faSmrg  # Adjust the below global symbol transforms to fixup imported variables.
440243d802faSmrg  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
440343d802faSmrg  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
440443d802faSmrg  lt_c_name_lib_hook="\
440543d802faSmrg  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
440643d802faSmrg  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
440743d802faSmrgelse
440843d802faSmrg  # Disable hooks by default.
440943d802faSmrg  lt_cv_sys_global_symbol_to_import=
441043d802faSmrg  lt_cdecl_hook=
441143d802faSmrg  lt_c_name_hook=
441243d802faSmrg  lt_c_name_lib_hook=
441343d802faSmrgfi
44143da084b3Smrg
441543d802faSmrg# Transform an extracted symbol line into a proper C declaration.
441643d802faSmrg# Some systems (esp. on ia64) link data and code symbols differently,
441743d802faSmrg# so use this general approach.
441843d802faSmrglt_cv_sys_global_symbol_to_cdecl="$SED -n"\
441943d802faSmrg$lt_cdecl_hook\
442043d802faSmrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
442143d802faSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
4422d63fdb69Smrg
442343d802faSmrg# Transform an extracted symbol line into symbol name and symbol address
442443d802faSmrglt_cv_sys_global_symbol_to_c_name_address="$SED -n"\
442543d802faSmrg$lt_c_name_hook\
442643d802faSmrg" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
442743d802faSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
44283da084b3Smrg
442943d802faSmrg# Transform an extracted symbol line into symbol name with lib prefix and
443043d802faSmrg# symbol address.
443143d802faSmrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\
443243d802faSmrg$lt_c_name_lib_hook\
443343d802faSmrg" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
443443d802faSmrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
443543d802faSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
44363da084b3Smrg
443743d802faSmrg# Handle CRLF in mingw tool chain
443843d802faSmrgopt_cr=
443943d802faSmrgcase $build_os in
444043d802faSmrgmingw*)
444143d802faSmrg  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
444243d802faSmrg  ;;
444343d802faSmrgesac
44443da084b3Smrg
444543d802faSmrg# Try without a prefix underscore, then with it.
444643d802faSmrgfor ac_symprfx in "" "_"; do
44473da084b3Smrg
444843d802faSmrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
444943d802faSmrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
4450d63fdb69Smrg
445143d802faSmrg  # Write the raw and C identifiers.
445243d802faSmrg  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
445343d802faSmrg    # Fake it for dumpbin and say T for any non-static function,
445443d802faSmrg    # D for any global variable and I for any imported variable.
445543d802faSmrg    # Also find C++ and __fastcall symbols from MSVC++ or ICC,
445643d802faSmrg    # which start with @ or ?.
445743d802faSmrg    lt_cv_sys_global_symbol_pipe="$AWK ['"\
445843d802faSmrg"     {last_section=section; section=\$ 3};"\
445943d802faSmrg"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
446043d802faSmrg"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
446143d802faSmrg"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
446243d802faSmrg"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
446343d802faSmrg"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
446443d802faSmrg"     \$ 0!~/External *\|/{next};"\
446543d802faSmrg"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
446643d802faSmrg"     {if(hide[section]) next};"\
446743d802faSmrg"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
446843d802faSmrg"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
446943d802faSmrg"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
447043d802faSmrg"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
447143d802faSmrg"     ' prfx=^$ac_symprfx]"
447243d802faSmrg  else
447343d802faSmrg    lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
447443d802faSmrg  fi
447543d802faSmrg  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'"
4476d63fdb69Smrg
447743d802faSmrg  # Check to see that the pipe works correctly.
447843d802faSmrg  pipe_works=no
44793da084b3Smrg
448043d802faSmrg  rm -f conftest*
448143d802faSmrg  cat > conftest.$ac_ext <<_LT_EOF
448243d802faSmrg#ifdef __cplusplus
448343d802faSmrgextern "C" {
448443d802faSmrg#endif
448543d802faSmrgchar nm_test_var;
448643d802faSmrgvoid nm_test_func(void);
448743d802faSmrgvoid nm_test_func(void){}
448843d802faSmrg#ifdef __cplusplus
448943d802faSmrg}
449043d802faSmrg#endif
449143d802faSmrgint main(){nm_test_var='a';nm_test_func();return(0);}
449243d802faSmrg_LT_EOF
44932a53b785Smrg
449443d802faSmrg  if AC_TRY_EVAL(ac_compile); then
449543d802faSmrg    # Now try to grab the symbols.
449643d802faSmrg    nlist=conftest.nm
449743d802faSmrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
449843d802faSmrg      # Try sorting and uniquifying the output.
449943d802faSmrg      if sort "$nlist" | uniq > "$nlist"T; then
450043d802faSmrg	mv -f "$nlist"T "$nlist"
450143d802faSmrg      else
450243d802faSmrg	rm -f "$nlist"T
450343d802faSmrg      fi
45042a53b785Smrg
450543d802faSmrg      # Make sure that we snagged all the symbols we need.
450643d802faSmrg      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
450743d802faSmrg	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
450843d802faSmrg	  cat <<_LT_EOF > conftest.$ac_ext
450943d802faSmrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
451043d802faSmrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
451143d802faSmrg/* DATA imports from DLLs on WIN32 can't be const, because runtime
451243d802faSmrg   relocations are performed -- see ld's documentation on pseudo-relocs.  */
451343d802faSmrg# define LT@&t@_DLSYM_CONST
451443d802faSmrg#elif defined __osf__
451543d802faSmrg/* This system does not cope well with relocations in const data.  */
451643d802faSmrg# define LT@&t@_DLSYM_CONST
451743d802faSmrg#else
451843d802faSmrg# define LT@&t@_DLSYM_CONST const
451943d802faSmrg#endif
45203da084b3Smrg
452143d802faSmrg#ifdef __cplusplus
452243d802faSmrgextern "C" {
452343d802faSmrg#endif
45243da084b3Smrg
452543d802faSmrg_LT_EOF
452643d802faSmrg	  # Now generate the symbol file.
452743d802faSmrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
45283da084b3Smrg
452943d802faSmrg	  cat <<_LT_EOF >> conftest.$ac_ext
45302a53b785Smrg
453143d802faSmrg/* The mapping between symbol names and symbols.  */
453243d802faSmrgLT@&t@_DLSYM_CONST struct {
453343d802faSmrg  const char *name;
453443d802faSmrg  void       *address;
453543d802faSmrg}
453643d802faSmrglt__PROGRAM__LTX_preloaded_symbols[[]] =
453743d802faSmrg{
453843d802faSmrg  { "@PROGRAM@", (void *) 0 },
453943d802faSmrg_LT_EOF
454043d802faSmrg	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
454143d802faSmrg	  cat <<\_LT_EOF >> conftest.$ac_ext
454243d802faSmrg  {0, (void *) 0}
454343d802faSmrg};
45443da084b3Smrg
454543d802faSmrg/* This works around a problem in FreeBSD linker */
454643d802faSmrg#ifdef FREEBSD_WORKAROUND
454743d802faSmrgstatic const void *lt_preloaded_setup() {
454843d802faSmrg  return lt__PROGRAM__LTX_preloaded_symbols;
454943d802faSmrg}
455043d802faSmrg#endif
45512a53b785Smrg
455243d802faSmrg#ifdef __cplusplus
455343d802faSmrg}
455443d802faSmrg#endif
455543d802faSmrg_LT_EOF
455643d802faSmrg	  # Now try linking the two files.
455743d802faSmrg	  mv conftest.$ac_objext conftstm.$ac_objext
455843d802faSmrg	  lt_globsym_save_LIBS=$LIBS
455943d802faSmrg	  lt_globsym_save_CFLAGS=$CFLAGS
456043d802faSmrg	  LIBS=conftstm.$ac_objext
456143d802faSmrg	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
456243d802faSmrg	  if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
456343d802faSmrg	    pipe_works=yes
456443d802faSmrg	  fi
456543d802faSmrg	  LIBS=$lt_globsym_save_LIBS
456643d802faSmrg	  CFLAGS=$lt_globsym_save_CFLAGS
456743d802faSmrg	else
456843d802faSmrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
456943d802faSmrg	fi
457043d802faSmrg      else
457143d802faSmrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
457243d802faSmrg      fi
457343d802faSmrg    else
457443d802faSmrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
457543d802faSmrg    fi
457643d802faSmrg  else
457743d802faSmrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
457843d802faSmrg    cat conftest.$ac_ext >&5
457943d802faSmrg  fi
458043d802faSmrg  rm -rf conftest* conftst*
45812a53b785Smrg
458243d802faSmrg  # Do not use the global_symbol_pipe unless it works.
458343d802faSmrg  if test yes = "$pipe_works"; then
458443d802faSmrg    break
458543d802faSmrg  else
458643d802faSmrg    lt_cv_sys_global_symbol_pipe=
458743d802faSmrg  fi
458843d802faSmrgdone
45892a53b785Smrg])
459043d802faSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
459143d802faSmrg  lt_cv_sys_global_symbol_to_cdecl=
459243d802faSmrgfi
459343d802faSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
459443d802faSmrg  AC_MSG_RESULT(failed)
459548c85eb7Smrgelse
459643d802faSmrg  AC_MSG_RESULT(ok)
459748c85eb7Smrgfi
4598d63fdb69Smrg
459943d802faSmrg# Response file support.
460043d802faSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then
460143d802faSmrg  nm_file_list_spec='@'
460243d802faSmrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
460343d802faSmrg  nm_file_list_spec='@'
460443d802faSmrgfi
46053da084b3Smrg
460643d802faSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
460743d802faSmrg    [Take the output of nm and produce a listing of raw symbols and C names])
460843d802faSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
460943d802faSmrg    [Transform the output of nm in a proper C declaration])
461043d802faSmrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
461143d802faSmrg    [Transform the output of nm into a list of symbols to manually relocate])
461243d802faSmrg_LT_DECL([global_symbol_to_c_name_address],
461343d802faSmrg    [lt_cv_sys_global_symbol_to_c_name_address], [1],
461443d802faSmrg    [Transform the output of nm in a C name address pair])
461543d802faSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
461643d802faSmrg    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
461743d802faSmrg    [Transform the output of nm in a C name address pair when lib prefix is needed])
461843d802faSmrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
461943d802faSmrg    [The name lister interface])
462043d802faSmrg_LT_DECL([], [nm_file_list_spec], [1],
462143d802faSmrg    [Specify filename containing input files for $NM])
462243d802faSmrg]) # _LT_CMD_GLOBAL_SYMBOLS
46233da084b3Smrg
4624d63fdb69Smrg
462543d802faSmrg# _LT_COMPILER_PIC([TAGNAME])
462643d802faSmrg# ---------------------------
462743d802faSmrgm4_defun([_LT_COMPILER_PIC],
462843d802faSmrg[m4_require([_LT_TAG_COMPILER])dnl
462943d802faSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)=
463043d802faSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=
463143d802faSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)=
4632d63fdb69Smrg
463343d802faSmrgm4_if([$1], [CXX], [
463443d802faSmrg  # C++ specific cases for pic, static, wl, etc.
463543d802faSmrg  if test yes = "$GXX"; then
463643d802faSmrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
463743d802faSmrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4638d63fdb69Smrg
463943d802faSmrg    case $host_os in
464043d802faSmrg    aix*)
464143d802faSmrg      # All AIX code is PIC.
464243d802faSmrg      if test ia64 = "$host_cpu"; then
464343d802faSmrg	# AIX 5 now supports IA64 processor
464443d802faSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
464543d802faSmrg      fi
464643d802faSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
464743d802faSmrg      ;;
4648d63fdb69Smrg
464943d802faSmrg    amigaos*)
465043d802faSmrg      case $host_cpu in
465143d802faSmrg      powerpc)
465243d802faSmrg            # see comment about AmigaOS4 .so support
465343d802faSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
465443d802faSmrg        ;;
465543d802faSmrg      m68k)
465643d802faSmrg            # FIXME: we need at least 68020 code to build shared libraries, but
465743d802faSmrg            # adding the '-m68020' flag to GCC prevents building anything better,
465843d802faSmrg            # like '-m68040'.
465943d802faSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
466043d802faSmrg        ;;
46612a53b785Smrg      esac
466243d802faSmrg      ;;
466348c85eb7Smrg
466443d802faSmrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
466543d802faSmrg      # PIC is the default for these OSes.
466643d802faSmrg      ;;
466743d802faSmrg    mingw* | cygwin* | os2* | pw32* | cegcc*)
466843d802faSmrg      # This hack is so that the source file can tell whether it is being
466943d802faSmrg      # built for inclusion in a dll (and should export symbols for example).
467043d802faSmrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
467143d802faSmrg      # (--disable-auto-import) libraries
467243d802faSmrg      m4_if([$1], [GCJ], [],
467343d802faSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
467443d802faSmrg      case $host_os in
467543d802faSmrg      os2*)
467643d802faSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
467743d802faSmrg	;;
467843d802faSmrg      esac
467943d802faSmrg      ;;
468043d802faSmrg    darwin* | rhapsody*)
468143d802faSmrg      # PIC is the default on this platform
468243d802faSmrg      # Common symbols not allowed in MH_DYLIB files
468343d802faSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
468443d802faSmrg      ;;
468543d802faSmrg    *djgpp*)
468643d802faSmrg      # DJGPP does not support shared libraries at all
468743d802faSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
468843d802faSmrg      ;;
468943d802faSmrg    haiku*)
469043d802faSmrg      # PIC is the default for Haiku.
469143d802faSmrg      # The "-static" flag exists, but is broken.
469243d802faSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
469343d802faSmrg      ;;
469443d802faSmrg    interix[[3-9]]*)
469543d802faSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
469643d802faSmrg      # Instead, we relocate shared libraries at runtime.
469743d802faSmrg      ;;
469843d802faSmrg    sysv4*MP*)
469943d802faSmrg      if test -d /usr/nec; then
470043d802faSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
470143d802faSmrg      fi
470243d802faSmrg      ;;
470343d802faSmrg    hpux*)
470443d802faSmrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
470543d802faSmrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
470643d802faSmrg      # sets the default TLS model and affects inlining.
470743d802faSmrg      case $host_cpu in
470843d802faSmrg      hppa*64*)
470943d802faSmrg	;;
471043d802faSmrg      *)
471143d802faSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
471243d802faSmrg	;;
471343d802faSmrg      esac
471443d802faSmrg      ;;
471543d802faSmrg    *qnx* | *nto*)
471643d802faSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
471743d802faSmrg      # it will coredump.
471843d802faSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
471943d802faSmrg      ;;
472043d802faSmrg    *)
472143d802faSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
472243d802faSmrg      ;;
472343d802faSmrg    esac
472443d802faSmrg  else
472543d802faSmrg    case $host_os in
472643d802faSmrg      aix[[4-9]]*)
472743d802faSmrg	# All AIX code is PIC.
472843d802faSmrg	if test ia64 = "$host_cpu"; then
472943d802faSmrg	  # AIX 5 now supports IA64 processor
473043d802faSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
473143d802faSmrg	else
473243d802faSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
473343d802faSmrg	fi
473443d802faSmrg	;;
473543d802faSmrg      chorus*)
473643d802faSmrg	case $cc_basename in
473743d802faSmrg	cxch68*)
473843d802faSmrg	  # Green Hills C++ Compiler
473943d802faSmrg	  # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
474043d802faSmrg	  ;;
474143d802faSmrg	esac
474243d802faSmrg	;;
474343d802faSmrg      mingw* | cygwin* | os2* | pw32* | cegcc*)
474443d802faSmrg	# This hack is so that the source file can tell whether it is being
474543d802faSmrg	# built for inclusion in a dll (and should export symbols for example).
474643d802faSmrg	m4_if([$1], [GCJ], [],
474743d802faSmrg	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
474843d802faSmrg	;;
474943d802faSmrg      dgux*)
475043d802faSmrg	case $cc_basename in
475143d802faSmrg	  ec++*)
475243d802faSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
475343d802faSmrg	    ;;
475443d802faSmrg	  ghcx*)
475543d802faSmrg	    # Green Hills C++ Compiler
475643d802faSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
475743d802faSmrg	    ;;
475843d802faSmrg	  *)
475943d802faSmrg	    ;;
476043d802faSmrg	esac
476143d802faSmrg	;;
476243d802faSmrg      freebsd* | dragonfly* | midnightbsd*)
476343d802faSmrg	# FreeBSD uses GNU C++
476443d802faSmrg	;;
476543d802faSmrg      hpux9* | hpux10* | hpux11*)
476643d802faSmrg	case $cc_basename in
476743d802faSmrg	  CC*)
476843d802faSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
476943d802faSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
477043d802faSmrg	    if test ia64 != "$host_cpu"; then
477143d802faSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
477243d802faSmrg	    fi
477343d802faSmrg	    ;;
477443d802faSmrg	  aCC*)
477543d802faSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
477643d802faSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
477743d802faSmrg	    case $host_cpu in
477843d802faSmrg	    hppa*64*|ia64*)
477943d802faSmrg	      # +Z the default
478043d802faSmrg	      ;;
478143d802faSmrg	    *)
478243d802faSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
478343d802faSmrg	      ;;
478443d802faSmrg	    esac
478543d802faSmrg	    ;;
478643d802faSmrg	  *)
478743d802faSmrg	    ;;
478843d802faSmrg	esac
478943d802faSmrg	;;
479043d802faSmrg      interix*)
479143d802faSmrg	# This is c89, which is MS Visual C++ (no shared libs)
479243d802faSmrg	# Anyone wants to do a port?
479343d802faSmrg	;;
479443d802faSmrg      irix5* | irix6* | nonstopux*)
479543d802faSmrg	case $cc_basename in
479643d802faSmrg	  CC*)
479743d802faSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
479843d802faSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
479943d802faSmrg	    # CC pic flag -KPIC is the default.
480043d802faSmrg	    ;;
480143d802faSmrg	  *)
480243d802faSmrg	    ;;
480343d802faSmrg	esac
480443d802faSmrg	;;
480543d802faSmrg      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
480643d802faSmrg	case $cc_basename in
480743d802faSmrg	  KCC*)
480843d802faSmrg	    # KAI C++ Compiler
480943d802faSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
481043d802faSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
481143d802faSmrg	    ;;
481243d802faSmrg	  ecpc* )
481343d802faSmrg	    # old Intel C++ for x86_64, which still supported -KPIC.
481443d802faSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
481543d802faSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
481643d802faSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
481743d802faSmrg	    ;;
481843d802faSmrg	  icpc* )
481943d802faSmrg	    # Intel C++, used to be incompatible with GCC.
482043d802faSmrg	    # ICC 10 doesn't accept -KPIC any more.
482143d802faSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
482243d802faSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
482343d802faSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
482443d802faSmrg	    ;;
482543d802faSmrg	  pgCC* | pgcpp*)
482643d802faSmrg	    # Portland Group C++ compiler
482743d802faSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
482843d802faSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
482943d802faSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
483043d802faSmrg	    ;;
483143d802faSmrg	  cxx*)
483243d802faSmrg	    # Compaq C++
483343d802faSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
483443d802faSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
483543d802faSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
483643d802faSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
483743d802faSmrg	    ;;
483843d802faSmrg	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
483943d802faSmrg	    # IBM XL 8.0, 9.0 on PPC and BlueGene
484043d802faSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
484143d802faSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
484243d802faSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
484343d802faSmrg	    ;;
484443d802faSmrg	  *)
484543d802faSmrg	    case `$CC -V 2>&1 | $SED 5q` in
484643d802faSmrg	    *Sun\ C*)
484743d802faSmrg	      # Sun C++ 5.9
484843d802faSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
484943d802faSmrg	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
485043d802faSmrg	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
485143d802faSmrg	      ;;
485243d802faSmrg	    esac
485343d802faSmrg	    ;;
485443d802faSmrg	esac
485543d802faSmrg	;;
485643d802faSmrg      lynxos*)
485743d802faSmrg	;;
485843d802faSmrg      m88k*)
485943d802faSmrg	;;
486043d802faSmrg      mvs*)
486143d802faSmrg	case $cc_basename in
486243d802faSmrg	  cxx*)
486343d802faSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
486443d802faSmrg	    ;;
486543d802faSmrg	  *)
486643d802faSmrg	    ;;
486743d802faSmrg	esac
486843d802faSmrg	;;
486943d802faSmrg      netbsd*)
487043d802faSmrg	;;
487143d802faSmrg      *qnx* | *nto*)
487243d802faSmrg        # QNX uses GNU C++, but need to define -shared option too, otherwise
487343d802faSmrg        # it will coredump.
487443d802faSmrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
487543d802faSmrg        ;;
487643d802faSmrg      osf3* | osf4* | osf5*)
487743d802faSmrg	case $cc_basename in
487843d802faSmrg	  KCC*)
487943d802faSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
488043d802faSmrg	    ;;
488143d802faSmrg	  RCC*)
488243d802faSmrg	    # Rational C++ 2.4.1
488343d802faSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
488443d802faSmrg	    ;;
488543d802faSmrg	  cxx*)
488643d802faSmrg	    # Digital/Compaq C++
488743d802faSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
488843d802faSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
488943d802faSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
489043d802faSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
489143d802faSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
489243d802faSmrg	    ;;
489343d802faSmrg	  *)
489443d802faSmrg	    ;;
489543d802faSmrg	esac
489643d802faSmrg	;;
489743d802faSmrg      psos*)
489843d802faSmrg	;;
489943d802faSmrg      solaris*)
490043d802faSmrg	case $cc_basename in
490143d802faSmrg	  CC* | sunCC*)
490243d802faSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
490343d802faSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
490443d802faSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
490543d802faSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
490643d802faSmrg	    ;;
490743d802faSmrg	  gcx*)
490843d802faSmrg	    # Green Hills C++ Compiler
490943d802faSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
491043d802faSmrg	    ;;
491143d802faSmrg	  *)
491243d802faSmrg	    ;;
491343d802faSmrg	esac
491443d802faSmrg	;;
491543d802faSmrg      sunos4*)
491643d802faSmrg	case $cc_basename in
491743d802faSmrg	  CC*)
491843d802faSmrg	    # Sun C++ 4.x
491943d802faSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
492043d802faSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
492143d802faSmrg	    ;;
492243d802faSmrg	  lcc*)
492343d802faSmrg	    # Lucid
492443d802faSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
492543d802faSmrg	    ;;
492643d802faSmrg	  *)
492743d802faSmrg	    ;;
492843d802faSmrg	esac
492943d802faSmrg	;;
493043d802faSmrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
493143d802faSmrg	case $cc_basename in
493243d802faSmrg	  CC*)
493343d802faSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
493443d802faSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
493543d802faSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
493643d802faSmrg	    ;;
493743d802faSmrg	esac
493843d802faSmrg	;;
493943d802faSmrg      tandem*)
494043d802faSmrg	case $cc_basename in
494143d802faSmrg	  NCC*)
494243d802faSmrg	    # NonStop-UX NCC 3.20
494343d802faSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
494443d802faSmrg	    ;;
494543d802faSmrg	  *)
494643d802faSmrg	    ;;
494743d802faSmrg	esac
494843d802faSmrg	;;
494943d802faSmrg      vxworks*)
495043d802faSmrg	;;
495143d802faSmrg      *)
495243d802faSmrg	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
495343d802faSmrg	;;
495443d802faSmrg    esac
495543d802faSmrg  fi
495643d802faSmrg],
495743d802faSmrg[
495843d802faSmrg  if test yes = "$GCC"; then
495943d802faSmrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
496043d802faSmrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
496143d802faSmrg
496243d802faSmrg    case $host_os in
496343d802faSmrg      aix*)
496443d802faSmrg      # All AIX code is PIC.
496543d802faSmrg      if test ia64 = "$host_cpu"; then
496643d802faSmrg	# AIX 5 now supports IA64 processor
496743d802faSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
496843d802faSmrg      fi
496943d802faSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
497043d802faSmrg      ;;
497143d802faSmrg
497243d802faSmrg    amigaos*)
497343d802faSmrg      case $host_cpu in
497443d802faSmrg      powerpc)
497543d802faSmrg            # see comment about AmigaOS4 .so support
497643d802faSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
497743d802faSmrg        ;;
497843d802faSmrg      m68k)
497943d802faSmrg            # FIXME: we need at least 68020 code to build shared libraries, but
498043d802faSmrg            # adding the '-m68020' flag to GCC prevents building anything better,
498143d802faSmrg            # like '-m68040'.
498243d802faSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
498343d802faSmrg        ;;
498443d802faSmrg      esac
498543d802faSmrg      ;;
498643d802faSmrg
498743d802faSmrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
498843d802faSmrg      # PIC is the default for these OSes.
498943d802faSmrg      ;;
499043d802faSmrg
499143d802faSmrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
499243d802faSmrg      # This hack is so that the source file can tell whether it is being
499343d802faSmrg      # built for inclusion in a dll (and should export symbols for example).
499443d802faSmrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
499543d802faSmrg      # (--disable-auto-import) libraries
499643d802faSmrg      m4_if([$1], [GCJ], [],
499743d802faSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
499843d802faSmrg      case $host_os in
499943d802faSmrg      os2*)
500043d802faSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
500143d802faSmrg	;;
500243d802faSmrg      esac
500343d802faSmrg      ;;
500443d802faSmrg
500543d802faSmrg    darwin* | rhapsody*)
500643d802faSmrg      # PIC is the default on this platform
500743d802faSmrg      # Common symbols not allowed in MH_DYLIB files
500843d802faSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
500943d802faSmrg      ;;
501043d802faSmrg
501143d802faSmrg    haiku*)
501243d802faSmrg      # PIC is the default for Haiku.
501343d802faSmrg      # The "-static" flag exists, but is broken.
501443d802faSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
501543d802faSmrg      ;;
501643d802faSmrg
501743d802faSmrg    hpux*)
501843d802faSmrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
501943d802faSmrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
502043d802faSmrg      # sets the default TLS model and affects inlining.
502143d802faSmrg      case $host_cpu in
502243d802faSmrg      hppa*64*)
502343d802faSmrg	# +Z the default
502443d802faSmrg	;;
502543d802faSmrg      *)
502643d802faSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
502743d802faSmrg	;;
502843d802faSmrg      esac
502943d802faSmrg      ;;
503043d802faSmrg
503143d802faSmrg    interix[[3-9]]*)
503243d802faSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
503343d802faSmrg      # Instead, we relocate shared libraries at runtime.
503443d802faSmrg      ;;
503543d802faSmrg
503643d802faSmrg    msdosdjgpp*)
503743d802faSmrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
503843d802faSmrg      # on systems that don't support them.
503943d802faSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
504043d802faSmrg      enable_shared=no
504143d802faSmrg      ;;
504243d802faSmrg
504343d802faSmrg    *nto* | *qnx*)
504443d802faSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
504543d802faSmrg      # it will coredump.
504643d802faSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
504743d802faSmrg      ;;
504848c85eb7Smrg
504943d802faSmrg    sysv4*MP*)
505043d802faSmrg      if test -d /usr/nec; then
505143d802faSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
505243d802faSmrg      fi
505343d802faSmrg      ;;
505448c85eb7Smrg
505543d802faSmrg    *)
505643d802faSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
505743d802faSmrg      ;;
505843d802faSmrg    esac
505948c85eb7Smrg
506043d802faSmrg    case $cc_basename in
506143d802faSmrg    nvcc*) # Cuda Compiler Driver 2.2
506243d802faSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
506343d802faSmrg      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
506443d802faSmrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
506543d802faSmrg      fi
506643d802faSmrg      ;;
506743d802faSmrg    esac
506843d802faSmrg  else
506943d802faSmrg    # PORTME Check for flag to pass linker flags through the system compiler.
507043d802faSmrg    case $host_os in
507143d802faSmrg    aix*)
507243d802faSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
507343d802faSmrg      if test ia64 = "$host_cpu"; then
507443d802faSmrg	# AIX 5 now supports IA64 processor
507543d802faSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
507643d802faSmrg      else
507743d802faSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
507843d802faSmrg      fi
507943d802faSmrg      ;;
508048c85eb7Smrg
508143d802faSmrg    darwin* | rhapsody*)
508243d802faSmrg      # PIC is the default on this platform
508343d802faSmrg      # Common symbols not allowed in MH_DYLIB files
508443d802faSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
508543d802faSmrg      case $cc_basename in
508643d802faSmrg      nagfor*)
508743d802faSmrg        # NAG Fortran compiler
508843d802faSmrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
508943d802faSmrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
509043d802faSmrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
509143d802faSmrg        ;;
509243d802faSmrg      esac
509343d802faSmrg      ;;
509452fd71cdSmrg
509543d802faSmrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
509643d802faSmrg      # This hack is so that the source file can tell whether it is being
509743d802faSmrg      # built for inclusion in a dll (and should export symbols for example).
509843d802faSmrg      m4_if([$1], [GCJ], [],
509943d802faSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
510043d802faSmrg      case $host_os in
510143d802faSmrg      os2*)
510243d802faSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
510343d802faSmrg	;;
510443d802faSmrg      esac
510543d802faSmrg      ;;
510648c85eb7Smrg
510743d802faSmrg    hpux9* | hpux10* | hpux11*)
510843d802faSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
510943d802faSmrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
511043d802faSmrg      # not for PA HP-UX.
511143d802faSmrg      case $host_cpu in
511243d802faSmrg      hppa*64*|ia64*)
511343d802faSmrg	# +Z the default
511443d802faSmrg	;;
511543d802faSmrg      *)
511643d802faSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
511743d802faSmrg	;;
511843d802faSmrg      esac
511943d802faSmrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
512043d802faSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
512143d802faSmrg      ;;
5122d63fdb69Smrg
512343d802faSmrg    irix5* | irix6* | nonstopux*)
512443d802faSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
512543d802faSmrg      # PIC (with -KPIC) is the default.
512643d802faSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
512743d802faSmrg      ;;
51282a53b785Smrg
512943d802faSmrg    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
513043d802faSmrg      case $cc_basename in
513143d802faSmrg      # old Intel for x86_64, which still supported -KPIC.
513243d802faSmrg      ecc*)
513343d802faSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
513443d802faSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
513543d802faSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
513643d802faSmrg        ;;
513743d802faSmrg      # icc used to be incompatible with GCC.
513843d802faSmrg      # ICC 10 doesn't accept -KPIC any more.
513943d802faSmrg      icc* | ifort*)
514043d802faSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
514143d802faSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
514243d802faSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
514343d802faSmrg        ;;
514443d802faSmrg      # Lahey Fortran 8.1.
514543d802faSmrg      lf95*)
514643d802faSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
514743d802faSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
514843d802faSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
514943d802faSmrg	;;
515043d802faSmrg      nagfor*)
515143d802faSmrg	# NAG Fortran compiler
515243d802faSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
515343d802faSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
515443d802faSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
515543d802faSmrg	;;
515643d802faSmrg      tcc*)
515743d802faSmrg	# Fabrice Bellard et al's Tiny C Compiler
515843d802faSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
515943d802faSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
516043d802faSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
516143d802faSmrg	;;
516243d802faSmrg      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
516343d802faSmrg        # Portland Group compilers (*not* the Pentium gcc compiler,
516443d802faSmrg	# which looks to be a dead project)
516543d802faSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
516643d802faSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
516743d802faSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
516843d802faSmrg        ;;
516943d802faSmrg      ccc*)
517043d802faSmrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
517143d802faSmrg        # All Alpha code is PIC.
517243d802faSmrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
517343d802faSmrg        ;;
517443d802faSmrg      xl* | bgxl* | bgf* | mpixl*)
517543d802faSmrg	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
517643d802faSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
517743d802faSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
517843d802faSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
517943d802faSmrg	;;
518043d802faSmrg      *)
518143d802faSmrg	case `$CC -V 2>&1 | $SED 5q` in
518243d802faSmrg	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
518343d802faSmrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
518443d802faSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
518543d802faSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
518643d802faSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
518743d802faSmrg	  ;;
518843d802faSmrg	*Sun\ F* | *Sun*Fortran*)
518943d802faSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
519043d802faSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
519143d802faSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
519243d802faSmrg	  ;;
519343d802faSmrg	*Sun\ C*)
519443d802faSmrg	  # Sun C 5.9
519543d802faSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
519643d802faSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
519743d802faSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
519843d802faSmrg	  ;;
519943d802faSmrg        *Intel*\ [[CF]]*Compiler*)
520043d802faSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
520143d802faSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
520243d802faSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
520343d802faSmrg	  ;;
520443d802faSmrg	*Portland\ Group*)
520543d802faSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
520643d802faSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
520743d802faSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
520843d802faSmrg	  ;;
520943d802faSmrg	esac
521043d802faSmrg	;;
521143d802faSmrg      esac
521243d802faSmrg      ;;
521343d802faSmrg
521443d802faSmrg    newsos6)
521543d802faSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
521643d802faSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
521743d802faSmrg      ;;
521843d802faSmrg
521943d802faSmrg    *nto* | *qnx*)
522043d802faSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
522143d802faSmrg      # it will coredump.
522243d802faSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
522343d802faSmrg      ;;
522443d802faSmrg
522543d802faSmrg    osf3* | osf4* | osf5*)
522643d802faSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
522743d802faSmrg      # All OSF/1 code is PIC.
522843d802faSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
522943d802faSmrg      ;;
523043d802faSmrg
523143d802faSmrg    rdos*)
523243d802faSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
523343d802faSmrg      ;;
523443d802faSmrg
523543d802faSmrg    solaris*)
523643d802faSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
523743d802faSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
523843d802faSmrg      case $cc_basename in
523943d802faSmrg      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
524043d802faSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
524143d802faSmrg      *)
524243d802faSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
524343d802faSmrg      esac
524443d802faSmrg      ;;
524543d802faSmrg
524643d802faSmrg    sunos4*)
524743d802faSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
524843d802faSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
524943d802faSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
525043d802faSmrg      ;;
525143d802faSmrg
525243d802faSmrg    sysv4 | sysv4.2uw2* | sysv4.3*)
525343d802faSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
525443d802faSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
525543d802faSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
525643d802faSmrg      ;;
5257d63fdb69Smrg
525843d802faSmrg    sysv4*MP*)
525943d802faSmrg      if test -d /usr/nec; then
526043d802faSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
526143d802faSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
526243d802faSmrg      fi
526343d802faSmrg      ;;
5264d63fdb69Smrg
526543d802faSmrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
526643d802faSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
526743d802faSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
526843d802faSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
526943d802faSmrg      ;;
52703da084b3Smrg
527143d802faSmrg    unicos*)
527243d802faSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
527343d802faSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
527443d802faSmrg      ;;
52753da084b3Smrg
527643d802faSmrg    uts4*)
527743d802faSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
527843d802faSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
527943d802faSmrg      ;;
52803da084b3Smrg
528143d802faSmrg    *)
528243d802faSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
528343d802faSmrg      ;;
528443d802faSmrg    esac
528543d802faSmrg  fi
528643d802faSmrg])
528743d802faSmrgcase $host_os in
528843d802faSmrg  # For platforms that do not support PIC, -DPIC is meaningless:
528943d802faSmrg  *djgpp*)
529043d802faSmrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
52912a53b785Smrg    ;;
529243d802faSmrg  *)
529343d802faSmrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
529443d802faSmrg    ;;
529543d802faSmrgesac
529648c85eb7Smrg
529743d802faSmrgAC_CACHE_CHECK([for $compiler option to produce PIC],
529843d802faSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
529943d802faSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
530043d802faSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
530155acc8fcSmrg
530243d802faSmrg#
530343d802faSmrg# Check to make sure the PIC flag actually works.
530443d802faSmrg#
530543d802faSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
530643d802faSmrg  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
530743d802faSmrg    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
530843d802faSmrg    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
530943d802faSmrg    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
531043d802faSmrg     "" | " "*) ;;
531143d802faSmrg     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
531243d802faSmrg     esac],
531343d802faSmrg    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
531443d802faSmrg     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
53152a53b785Smrgfi
531643d802faSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
531743d802faSmrg	[Additional compiler flags for building library objects])
53183da084b3Smrg
531943d802faSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
532043d802faSmrg	[How to pass a linker flag through the compiler])
532143d802faSmrg#
532243d802faSmrg# Check to make sure the static flag actually works.
532343d802faSmrg#
532443d802faSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
532543d802faSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
532643d802faSmrg  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
532743d802faSmrg  $lt_tmp_static_flag,
532843d802faSmrg  [],
532943d802faSmrg  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
533043d802faSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
533143d802faSmrg	[Compiler flag to prevent dynamic linking])
533243d802faSmrg])# _LT_COMPILER_PIC
53333da084b3Smrg
53343da084b3Smrg
533543d802faSmrg# _LT_LINKER_SHLIBS([TAGNAME])
533643d802faSmrg# ----------------------------
533743d802faSmrg# See if the linker supports building shared libraries.
533843d802faSmrgm4_defun([_LT_LINKER_SHLIBS],
533943d802faSmrg[AC_REQUIRE([LT_PATH_LD])dnl
534043d802faSmrgAC_REQUIRE([LT_PATH_NM])dnl
534143d802faSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl
53422a53b785Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
534343d802faSmrgm4_require([_LT_DECL_EGREP])dnl
534443d802faSmrgm4_require([_LT_DECL_SED])dnl
534543d802faSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
53462a53b785Smrgm4_require([_LT_TAG_COMPILER])dnl
534743d802faSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
534843d802faSmrgm4_if([$1], [CXX], [
534943d802faSmrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
535043d802faSmrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
535143d802faSmrg  case $host_os in
535243d802faSmrg  aix[[4-9]]*)
535343d802faSmrg    # If we're using GNU nm, then we don't want the "-C" option.
535443d802faSmrg    # -C means demangle to GNU nm, but means don't demangle to AIX nm.
535543d802faSmrg    # Without the "-l" option, or with the "-B" option, AIX nm treats
535643d802faSmrg    # weak defined symbols like other global defined symbols, whereas
535743d802faSmrg    # GNU nm marks them as "W".
535843d802faSmrg    # While the 'weak' keyword is ignored in the Export File, we need
535943d802faSmrg    # it in the Import File for the 'aix-soname' feature, so we have
536043d802faSmrg    # to replace the "-B" option with "-P" for AIX nm.
536143d802faSmrg    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
536243d802faSmrg      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
536343d802faSmrg    else
536443d802faSmrg      _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
536543d802faSmrg    fi
536643d802faSmrg    ;;
536743d802faSmrg  pw32*)
536843d802faSmrg    _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
536943d802faSmrg    ;;
537043d802faSmrg  cygwin* | mingw* | cegcc*)
537143d802faSmrg    case $cc_basename in
537243d802faSmrg    cl* | icl*)
537343d802faSmrg      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
537443d802faSmrg      ;;
537543d802faSmrg    *)
537643d802faSmrg      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
537743d802faSmrg      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
537843d802faSmrg      ;;
537943d802faSmrg    esac
538043d802faSmrg    ;;
538143d802faSmrg  *)
538243d802faSmrg    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
538343d802faSmrg    ;;
538443d802faSmrg  esac
538543d802faSmrg], [
538643d802faSmrg  runpath_var=
538743d802faSmrg  _LT_TAGVAR(allow_undefined_flag, $1)=
538843d802faSmrg  _LT_TAGVAR(always_export_symbols, $1)=no
538943d802faSmrg  _LT_TAGVAR(archive_cmds, $1)=
539043d802faSmrg  _LT_TAGVAR(archive_expsym_cmds, $1)=
539143d802faSmrg  _LT_TAGVAR(compiler_needs_object, $1)=no
539243d802faSmrg  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
539343d802faSmrg  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
539443d802faSmrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
539543d802faSmrg  _LT_TAGVAR(hardcode_automatic, $1)=no
539643d802faSmrg  _LT_TAGVAR(hardcode_direct, $1)=no
539743d802faSmrg  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
539843d802faSmrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
539943d802faSmrg  _LT_TAGVAR(hardcode_libdir_separator, $1)=
540043d802faSmrg  _LT_TAGVAR(hardcode_minus_L, $1)=no
540143d802faSmrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
540243d802faSmrg  _LT_TAGVAR(inherit_rpath, $1)=no
540343d802faSmrg  _LT_TAGVAR(link_all_deplibs, $1)=unknown
540443d802faSmrg  _LT_TAGVAR(module_cmds, $1)=
540543d802faSmrg  _LT_TAGVAR(module_expsym_cmds, $1)=
540643d802faSmrg  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
540743d802faSmrg  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
540843d802faSmrg  _LT_TAGVAR(thread_safe_flag_spec, $1)=
540943d802faSmrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=
541043d802faSmrg  # include_expsyms should be a list of space-separated symbols to be *always*
541143d802faSmrg  # included in the symbol list
541243d802faSmrg  _LT_TAGVAR(include_expsyms, $1)=
541343d802faSmrg  # exclude_expsyms can be an extended regexp of symbols to exclude
541443d802faSmrg  # it will be wrapped by ' (' and ')$', so one must not match beginning or
541543d802faSmrg  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
541643d802faSmrg  # as well as any symbol that contains 'd'.
541743d802faSmrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
541843d802faSmrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
541943d802faSmrg  # platforms (ab)use it in PIC code, but their linkers get confused if
542043d802faSmrg  # the symbol is explicitly referenced.  Since portable code cannot
542143d802faSmrg  # rely on this symbol name, it's probably fine to never include it in
542243d802faSmrg  # preloaded symbol tables.
542343d802faSmrg  # Exclude shared library initialization/finalization symbols.
542443d802faSmrgdnl Note also adjust exclude_expsyms for C++ above.
542543d802faSmrg  extract_expsyms_cmds=
5426d63fdb69Smrg
542743d802faSmrg  case $host_os in
542843d802faSmrg  cygwin* | mingw* | pw32* | cegcc*)
542943d802faSmrg    # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
543043d802faSmrg    # When not using gcc, we currently assume that we are using
543143d802faSmrg    # Microsoft Visual C++ or Intel C++ Compiler.
543243d802faSmrg    if test yes != "$GCC"; then
543343d802faSmrg      with_gnu_ld=no
543443d802faSmrg    fi
543543d802faSmrg    ;;
543643d802faSmrg  interix*)
543743d802faSmrg    # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
543843d802faSmrg    with_gnu_ld=yes
543943d802faSmrg    ;;
544043d802faSmrg  openbsd* | bitrig*)
544143d802faSmrg    with_gnu_ld=no
544243d802faSmrg    ;;
544343d802faSmrg  esac
5444d63fdb69Smrg
544543d802faSmrg  _LT_TAGVAR(ld_shlibs, $1)=yes
5446d63fdb69Smrg
544743d802faSmrg  # On some targets, GNU ld is compatible enough with the native linker
544843d802faSmrg  # that we're better off using the native interface for both.
544943d802faSmrg  lt_use_gnu_ld_interface=no
545043d802faSmrg  if test yes = "$with_gnu_ld"; then
545143d802faSmrg    case $host_os in
545243d802faSmrg      aix*)
545343d802faSmrg	# The AIX port of GNU ld has always aspired to compatibility
545443d802faSmrg	# with the native linker.  However, as the warning in the GNU ld
545543d802faSmrg	# block says, versions before 2.19.5* couldn't really create working
545643d802faSmrg	# shared libraries, regardless of the interface used.
545743d802faSmrg	case `$LD -v 2>&1` in
545843d802faSmrg	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
545943d802faSmrg	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
546043d802faSmrg	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
546143d802faSmrg	  *)
546243d802faSmrg	    lt_use_gnu_ld_interface=yes
546343d802faSmrg	    ;;
546443d802faSmrg	esac
546543d802faSmrg	;;
546643d802faSmrg      *)
546743d802faSmrg	lt_use_gnu_ld_interface=yes
546843d802faSmrg	;;
546943d802faSmrg    esac
54702a53b785Smrg  fi
5471d63fdb69Smrg
547243d802faSmrg  if test yes = "$lt_use_gnu_ld_interface"; then
547343d802faSmrg    # If archive_cmds runs LD, not CC, wlarc should be empty
547443d802faSmrg    wlarc='$wl'
5475d63fdb69Smrg
547643d802faSmrg    # Set some defaults for GNU ld with shared library support. These
547743d802faSmrg    # are reset later if shared libraries are not supported. Putting them
547843d802faSmrg    # here allows them to be overridden if necessary.
547943d802faSmrg    runpath_var=LD_RUN_PATH
548043d802faSmrg    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
548143d802faSmrg    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
548243d802faSmrg    # ancient GNU ld didn't support --whole-archive et. al.
548343d802faSmrg    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
548443d802faSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
548543d802faSmrg    else
548643d802faSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
548743d802faSmrg    fi
548843d802faSmrg    supports_anon_versioning=no
548943d802faSmrg    case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in
549043d802faSmrg      *GNU\ gold*) supports_anon_versioning=yes ;;
549143d802faSmrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
549243d802faSmrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
549343d802faSmrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
549443d802faSmrg      *\ 2.11.*) ;; # other 2.11 versions
549543d802faSmrg      *) supports_anon_versioning=yes ;;
549643d802faSmrg    esac
54973da084b3Smrg
549843d802faSmrg    # See if GNU ld supports shared libraries.
549943d802faSmrg    case $host_os in
550043d802faSmrg    aix[[3-9]]*)
550143d802faSmrg      # On AIX/PPC, the GNU linker is very broken
550243d802faSmrg      if test ia64 != "$host_cpu"; then
550343d802faSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
550443d802faSmrg	cat <<_LT_EOF 1>&2
55053da084b3Smrg
550643d802faSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported
550743d802faSmrg*** to be unable to reliably create shared libraries on AIX.
550843d802faSmrg*** Therefore, libtool is disabling shared libraries support.  If you
550943d802faSmrg*** really care for shared libraries, you may want to install binutils
551043d802faSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
551143d802faSmrg*** You will then need to restart the configuration process.
551248c85eb7Smrg
551343d802faSmrg_LT_EOF
551443d802faSmrg      fi
551543d802faSmrg      ;;
551648c85eb7Smrg
551743d802faSmrg    amigaos*)
551843d802faSmrg      case $host_cpu in
551943d802faSmrg      powerpc)
552043d802faSmrg            # see comment about AmigaOS4 .so support
552143d802faSmrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
552243d802faSmrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
552343d802faSmrg        ;;
552443d802faSmrg      m68k)
552543d802faSmrg            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
552643d802faSmrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
552743d802faSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
552843d802faSmrg        ;;
552943d802faSmrg      esac
553043d802faSmrg      ;;
55313da084b3Smrg
553243d802faSmrg    beos*)
553343d802faSmrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
553443d802faSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
553543d802faSmrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
553643d802faSmrg	# support --undefined.  This deserves some investigation.  FIXME
553743d802faSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
553843d802faSmrg      else
553943d802faSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
554043d802faSmrg      fi
55412a53b785Smrg      ;;
554243d802faSmrg
554343d802faSmrg    cygwin* | mingw* | pw32* | cegcc*)
554443d802faSmrg      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
554543d802faSmrg      # as there is no search path for DLLs.
554643d802faSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
554743d802faSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
554843d802faSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
554943d802faSmrg      _LT_TAGVAR(always_export_symbols, $1)=no
555043d802faSmrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
555143d802faSmrg      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
555243d802faSmrg      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
555343d802faSmrg
555443d802faSmrg      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
555543d802faSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
555643d802faSmrg	# If the export-symbols file already is a .def file, use it as
555743d802faSmrg	# is; otherwise, prepend EXPORTS...
555843d802faSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
555943d802faSmrg          cp $export_symbols $output_objdir/$soname.def;
556043d802faSmrg        else
556143d802faSmrg          echo EXPORTS > $output_objdir/$soname.def;
556243d802faSmrg          cat $export_symbols >> $output_objdir/$soname.def;
556343d802faSmrg        fi~
556443d802faSmrg        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
55652a53b785Smrg      else
556643d802faSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
55672a53b785Smrg      fi
55682a53b785Smrg      ;;
556943d802faSmrg
557043d802faSmrg    haiku*)
557143d802faSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
557243d802faSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
557343d802faSmrg      ;;
557443d802faSmrg
557543d802faSmrg    os2*)
557643d802faSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
557743d802faSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
557843d802faSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
557943d802faSmrg      shrext_cmds=.dll
558043d802faSmrg      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
558143d802faSmrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
558243d802faSmrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
558343d802faSmrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
558443d802faSmrg	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
558543d802faSmrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
558643d802faSmrg	emximp -o $lib $output_objdir/$libname.def'
558743d802faSmrg      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
558843d802faSmrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
558943d802faSmrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
559043d802faSmrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
559143d802faSmrg	prefix_cmds="$SED"~
559243d802faSmrg	if test EXPORTS = "`$SED 1q $export_symbols`"; then
559343d802faSmrg	  prefix_cmds="$prefix_cmds -e 1d";
559443d802faSmrg	fi~
559543d802faSmrg	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
559643d802faSmrg	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
559743d802faSmrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
559843d802faSmrg	emximp -o $lib $output_objdir/$libname.def'
559943d802faSmrg      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
560043d802faSmrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
560143d802faSmrg      _LT_TAGVAR(file_list_spec, $1)='@'
560243d802faSmrg      ;;
560343d802faSmrg
560443d802faSmrg    interix[[3-9]]*)
560543d802faSmrg      _LT_TAGVAR(hardcode_direct, $1)=no
560643d802faSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
560743d802faSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
560843d802faSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
560943d802faSmrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
561043d802faSmrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
561143d802faSmrg      # default) and relocated if they conflict, which is a slow very memory
561243d802faSmrg      # consuming and fragmenting process.  To avoid this, we pick a random,
561343d802faSmrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
561443d802faSmrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
561543d802faSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
561643d802faSmrg      _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
56172a53b785Smrg      ;;
56183da084b3Smrg
561943d802faSmrg    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
562043d802faSmrg      tmp_diet=no
562143d802faSmrg      if test linux-dietlibc = "$host_os"; then
562243d802faSmrg	case $cc_basename in
562343d802faSmrg	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
562443d802faSmrg	esac
562543d802faSmrg      fi
562643d802faSmrg      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
562743d802faSmrg	 && test no = "$tmp_diet"
562843d802faSmrg      then
562943d802faSmrg	tmp_addflag=' $pic_flag'
563043d802faSmrg	tmp_sharedflag='-shared'
563143d802faSmrg	case $cc_basename,$host_cpu in
563243d802faSmrg        pgcc*)				# Portland Group C compiler
563343d802faSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
563443d802faSmrg	  tmp_addflag=' $pic_flag'
563543d802faSmrg	  ;;
563643d802faSmrg	pgf77* | pgf90* | pgf95* | pgfortran*)
563743d802faSmrg					# Portland Group f77 and f90 compilers
563843d802faSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
563943d802faSmrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
564043d802faSmrg	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
564143d802faSmrg	  tmp_addflag=' -i_dynamic' ;;
564243d802faSmrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
564343d802faSmrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
564443d802faSmrg	ifc* | ifort*)			# Intel Fortran compiler
564543d802faSmrg	  tmp_addflag=' -nofor_main' ;;
564643d802faSmrg	lf95*)				# Lahey Fortran 8.1
564743d802faSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
564843d802faSmrg	  tmp_sharedflag='--shared' ;;
564943d802faSmrg        nagfor*)                        # NAGFOR 5.3
565043d802faSmrg          tmp_sharedflag='-Wl,-shared' ;;
565143d802faSmrg	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
565243d802faSmrg	  tmp_sharedflag='-qmkshrobj'
565343d802faSmrg	  tmp_addflag= ;;
565443d802faSmrg	nvcc*)	# Cuda Compiler Driver 2.2
565543d802faSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
565643d802faSmrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
565743d802faSmrg	  ;;
565843d802faSmrg	esac
565943d802faSmrg	case `$CC -V 2>&1 | $SED 5q` in
566043d802faSmrg	*Sun\ C*)			# Sun C 5.9
566143d802faSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
566243d802faSmrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
566343d802faSmrg	  tmp_sharedflag='-G' ;;
566443d802faSmrg	*Sun\ F*)			# Sun Fortran 8.3
566543d802faSmrg	  tmp_sharedflag='-G' ;;
566643d802faSmrg	esac
566743d802faSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
56683da084b3Smrg
566943d802faSmrg        if test yes = "$supports_anon_versioning"; then
567043d802faSmrg          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
567143d802faSmrg            cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
567243d802faSmrg            echo "local: *; };" >> $output_objdir/$libname.ver~
567343d802faSmrg            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
567443d802faSmrg        fi
56753da084b3Smrg
567643d802faSmrg	case $cc_basename in
567743d802faSmrg	tcc*)
567843d802faSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
567943d802faSmrg	  ;;
568043d802faSmrg	xlf* | bgf* | bgxlf* | mpixlf*)
568143d802faSmrg	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
568243d802faSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
568343d802faSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
568443d802faSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
568543d802faSmrg	  if test yes = "$supports_anon_versioning"; then
568643d802faSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
568743d802faSmrg              cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
568843d802faSmrg              echo "local: *; };" >> $output_objdir/$libname.ver~
568943d802faSmrg              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
569043d802faSmrg	  fi
569143d802faSmrg	  ;;
569243d802faSmrg	esac
569343d802faSmrg      else
569443d802faSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
569543d802faSmrg      fi
569643d802faSmrg      ;;
56973da084b3Smrg
569843d802faSmrg    netbsd*)
569943d802faSmrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
570043d802faSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
570143d802faSmrg	wlarc=
570243d802faSmrg      else
570343d802faSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
570443d802faSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
570543d802faSmrg      fi
570643d802faSmrg      ;;
570748c85eb7Smrg
570843d802faSmrg    solaris*)
570943d802faSmrg      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
571043d802faSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
571143d802faSmrg	cat <<_LT_EOF 1>&2
571248c85eb7Smrg
571343d802faSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
571443d802faSmrg*** create shared libraries on Solaris systems.  Therefore, libtool
571543d802faSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
571643d802faSmrg*** binutils to release 2.9.1 or newer.  Another option is to modify
571743d802faSmrg*** your PATH or compiler configuration so that the native linker is
571843d802faSmrg*** used, and then restart.
571948c85eb7Smrg
572043d802faSmrg_LT_EOF
572143d802faSmrg      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
572243d802faSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
572343d802faSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
572443d802faSmrg      else
572543d802faSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
572643d802faSmrg      fi
572743d802faSmrg      ;;
572848c85eb7Smrg
572943d802faSmrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
573043d802faSmrg      case `$LD -v 2>&1` in
573143d802faSmrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
573243d802faSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
573343d802faSmrg	cat <<_LT_EOF 1>&2
573448c85eb7Smrg
573543d802faSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
573643d802faSmrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
573743d802faSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
573843d802faSmrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
573943d802faSmrg*** your PATH or compiler configuration so that the native linker is
574043d802faSmrg*** used, and then restart.
574143d802faSmrg
574243d802faSmrg_LT_EOF
574343d802faSmrg	;;
574443d802faSmrg	*)
574543d802faSmrg	  # For security reasons, it is highly recommended that you always
574643d802faSmrg	  # use absolute paths for naming shared libraries, and exclude the
574743d802faSmrg	  # DT_RUNPATH tag from executables and libraries.  But doing so
574843d802faSmrg	  # requires that you compile everything twice, which is a pain.
574943d802faSmrg	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
575043d802faSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
575143d802faSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
575243d802faSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
575343d802faSmrg	  else
575443d802faSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
575543d802faSmrg	  fi
575643d802faSmrg	;;
575743d802faSmrg      esac
575843d802faSmrg      ;;
575943d802faSmrg
576043d802faSmrg    sunos4*)
576143d802faSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
576243d802faSmrg      wlarc=
576343d802faSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
576443d802faSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
576543d802faSmrg      ;;
576643d802faSmrg
576743d802faSmrg    *)
576843d802faSmrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
576943d802faSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
577043d802faSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
577143d802faSmrg      else
577243d802faSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
577343d802faSmrg      fi
577443d802faSmrg      ;;
577543d802faSmrg    esac
577643d802faSmrg
577743d802faSmrg    if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
577843d802faSmrg      runpath_var=
577943d802faSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
578043d802faSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
578143d802faSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
578243d802faSmrg    fi
57832a53b785Smrg  else
578443d802faSmrg    # PORTME fill in a description of your system's linker (not GNU ld)
57852a53b785Smrg    case $host_os in
578643d802faSmrg    aix3*)
578743d802faSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
578843d802faSmrg      _LT_TAGVAR(always_export_symbols, $1)=yes
578943d802faSmrg      _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
579043d802faSmrg      # Note: this linker hardcodes the directories in LIBPATH if there
579143d802faSmrg      # are no directories specified by -L.
579243d802faSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
579343d802faSmrg      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
579443d802faSmrg	# Neither direct hardcoding nor static linking is supported with a
579543d802faSmrg	# broken collect2.
579643d802faSmrg	_LT_TAGVAR(hardcode_direct, $1)=unsupported
579743d802faSmrg      fi
579843d802faSmrg      ;;
579943d802faSmrg
580043d802faSmrg    aix[[4-9]]*)
580143d802faSmrg      if test ia64 = "$host_cpu"; then
580243d802faSmrg	# On IA64, the linker does run time linking by default, so we don't
580343d802faSmrg	# have to do anything special.
580443d802faSmrg	aix_use_runtimelinking=no
580543d802faSmrg	exp_sym_flag='-Bexport'
580643d802faSmrg	no_entry_flag=
580743d802faSmrg      else
580843d802faSmrg	# If we're using GNU nm, then we don't want the "-C" option.
580943d802faSmrg	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
581043d802faSmrg	# Without the "-l" option, or with the "-B" option, AIX nm treats
581143d802faSmrg	# weak defined symbols like other global defined symbols, whereas
581243d802faSmrg	# GNU nm marks them as "W".
581343d802faSmrg	# While the 'weak' keyword is ignored in the Export File, we need
581443d802faSmrg	# it in the Import File for the 'aix-soname' feature, so we have
581543d802faSmrg	# to replace the "-B" option with "-P" for AIX nm.
581643d802faSmrg	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
581743d802faSmrg	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
581843d802faSmrg	else
581943d802faSmrg	  _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
582043d802faSmrg	fi
582143d802faSmrg	aix_use_runtimelinking=no
582243d802faSmrg
582343d802faSmrg	# Test if we are trying to use run time linking or normal
582443d802faSmrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
582543d802faSmrg	# have runtime linking enabled, and use it for executables.
582643d802faSmrg	# For shared libraries, we enable/disable runtime linking
582743d802faSmrg	# depending on the kind of the shared library created -
582843d802faSmrg	# when "with_aix_soname,aix_use_runtimelinking" is:
582943d802faSmrg	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
583043d802faSmrg	# "aix,yes"  lib.so          shared, rtl:yes, for executables
583143d802faSmrg	#            lib.a           static archive
583243d802faSmrg	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
583343d802faSmrg	#            lib.a(lib.so.V) shared, rtl:no,  for executables
583443d802faSmrg	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
583543d802faSmrg	#            lib.a(lib.so.V) shared, rtl:no
583643d802faSmrg	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
583743d802faSmrg	#            lib.a           static archive
583843d802faSmrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
583943d802faSmrg	  for ld_flag in $LDFLAGS; do
584043d802faSmrg	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
584143d802faSmrg	    aix_use_runtimelinking=yes
584243d802faSmrg	    break
584343d802faSmrg	  fi
584443d802faSmrg	  done
584543d802faSmrg	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
584643d802faSmrg	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
584743d802faSmrg	    # so we don't have lib.a shared libs to link our executables.
584843d802faSmrg	    # We have to force runtime linking in this case.
584943d802faSmrg	    aix_use_runtimelinking=yes
585043d802faSmrg	    LDFLAGS="$LDFLAGS -Wl,-brtl"
585143d802faSmrg	  fi
585243d802faSmrg	  ;;
585343d802faSmrg	esac
585443d802faSmrg
585543d802faSmrg	exp_sym_flag='-bexport'
585643d802faSmrg	no_entry_flag='-bnoentry'
585743d802faSmrg      fi
585843d802faSmrg
585943d802faSmrg      # When large executables or shared objects are built, AIX ld can
586043d802faSmrg      # have problems creating the table of contents.  If linking a library
586143d802faSmrg      # or program results in "error TOC overflow" add -mminimal-toc to
586243d802faSmrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
586343d802faSmrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
586443d802faSmrg
586543d802faSmrg      _LT_TAGVAR(archive_cmds, $1)=''
586643d802faSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
586743d802faSmrg      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
586843d802faSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
586943d802faSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
587043d802faSmrg      _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
587143d802faSmrg      case $with_aix_soname,$aix_use_runtimelinking in
587243d802faSmrg      aix,*) ;; # traditional, no import file
587343d802faSmrg      svr4,* | *,yes) # use import file
587443d802faSmrg	# The Import File defines what to hardcode.
587543d802faSmrg	_LT_TAGVAR(hardcode_direct, $1)=no
587643d802faSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=no
587743d802faSmrg	;;
587843d802faSmrg      esac
587943d802faSmrg
588043d802faSmrg      if test yes = "$GCC"; then
588143d802faSmrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
588243d802faSmrg	# We only want to do this on AIX 4.2 and lower, the check
588343d802faSmrg	# below for broken collect2 doesn't work under 4.3+
588443d802faSmrg	  collect2name=`$CC -print-prog-name=collect2`
588543d802faSmrg	  if test -f "$collect2name" &&
588643d802faSmrg	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
588743d802faSmrg	  then
588843d802faSmrg	  # We have reworked collect2
588943d802faSmrg	  :
589043d802faSmrg	  else
589143d802faSmrg	  # We have old collect2
589243d802faSmrg	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
589343d802faSmrg	  # It fails to find uninstalled libraries when the uninstalled
589443d802faSmrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
589543d802faSmrg	  # to unsupported forces relinking
589643d802faSmrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
589743d802faSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
589843d802faSmrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
589943d802faSmrg	  fi
590043d802faSmrg	  ;;
590143d802faSmrg	esac
590243d802faSmrg	shared_flag='-shared'
590343d802faSmrg	if test yes = "$aix_use_runtimelinking"; then
590443d802faSmrg	  shared_flag="$shared_flag "'$wl-G'
590543d802faSmrg	fi
590643d802faSmrg	# Need to ensure runtime linking is disabled for the traditional
590743d802faSmrg	# shared library, or the linker may eventually find shared libraries
590843d802faSmrg	# /with/ Import File - we do not want to mix them.
590943d802faSmrg	shared_flag_aix='-shared'
591043d802faSmrg	shared_flag_svr4='-shared $wl-G'
591143d802faSmrg      else
591243d802faSmrg	# not using gcc
591343d802faSmrg	if test ia64 = "$host_cpu"; then
591443d802faSmrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
591543d802faSmrg	# chokes on -Wl,-G. The following line is correct:
591643d802faSmrg	  shared_flag='-G'
591743d802faSmrg	else
591843d802faSmrg	  if test yes = "$aix_use_runtimelinking"; then
591943d802faSmrg	    shared_flag='$wl-G'
592043d802faSmrg	  else
592143d802faSmrg	    shared_flag='$wl-bM:SRE'
592243d802faSmrg	  fi
592343d802faSmrg	  shared_flag_aix='$wl-bM:SRE'
592443d802faSmrg	  shared_flag_svr4='$wl-G'
592543d802faSmrg	fi
592643d802faSmrg      fi
592743d802faSmrg
592843d802faSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
592943d802faSmrg      # It seems that -bexpall does not export symbols beginning with
593043d802faSmrg      # underscore (_), so it is better to generate a list of symbols to export.
593143d802faSmrg      _LT_TAGVAR(always_export_symbols, $1)=yes
593243d802faSmrg      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
593343d802faSmrg	# Warning - without using the other runtime loading flags (-brtl),
593443d802faSmrg	# -berok will link without error, but may produce a broken library.
593543d802faSmrg	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
593643d802faSmrg        # Determine the default libpath from the value encoded in an
593743d802faSmrg        # empty executable.
593843d802faSmrg        _LT_SYS_MODULE_PATH_AIX([$1])
593943d802faSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
594043d802faSmrg        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
59412a53b785Smrg      else
594243d802faSmrg	if test ia64 = "$host_cpu"; then
594343d802faSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
594443d802faSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
594543d802faSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
594643d802faSmrg	else
594743d802faSmrg	 # Determine the default libpath from the value encoded in an
594843d802faSmrg	 # empty executable.
594943d802faSmrg	 _LT_SYS_MODULE_PATH_AIX([$1])
595043d802faSmrg	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
595143d802faSmrg	  # Warning - without using the other run time loading flags,
595243d802faSmrg	  # -berok will link without error, but may produce a broken library.
595343d802faSmrg	  _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
595443d802faSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
595543d802faSmrg	  if test yes = "$with_gnu_ld"; then
595643d802faSmrg	    # We only use this code for GNU lds that support --whole-archive.
595743d802faSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
595843d802faSmrg	  else
595943d802faSmrg	    # Exported symbols can be pulled into shared objects from archives
596043d802faSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
596143d802faSmrg	  fi
596243d802faSmrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
596343d802faSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
596443d802faSmrg	  # -brtl affects multiple linker settings, -berok does not and is overridden later
596543d802faSmrg	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
596643d802faSmrg	  if test svr4 != "$with_aix_soname"; then
596743d802faSmrg	    # This is similar to how AIX traditionally builds its shared libraries.
596843d802faSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
596943d802faSmrg	  fi
597043d802faSmrg	  if test aix != "$with_aix_soname"; then
597143d802faSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
597243d802faSmrg	  else
597343d802faSmrg	    # used by -dlpreopen to get the symbols
597443d802faSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
597543d802faSmrg	  fi
597643d802faSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
597743d802faSmrg	fi
59782a53b785Smrg      fi
59792a53b785Smrg      ;;
598048c85eb7Smrg
598143d802faSmrg    amigaos*)
598243d802faSmrg      case $host_cpu in
598343d802faSmrg      powerpc)
598443d802faSmrg            # see comment about AmigaOS4 .so support
598543d802faSmrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
598643d802faSmrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
598743d802faSmrg        ;;
598843d802faSmrg      m68k)
598943d802faSmrg            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
599043d802faSmrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
599143d802faSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
599243d802faSmrg        ;;
599343d802faSmrg      esac
59942a53b785Smrg      ;;
59953da084b3Smrg
599643d802faSmrg    bsdi[[45]]*)
599743d802faSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
599843d802faSmrg      ;;
59993da084b3Smrg
600043d802faSmrg    cygwin* | mingw* | pw32* | cegcc*)
600143d802faSmrg      # When not using gcc, we currently assume that we are using
600243d802faSmrg      # Microsoft Visual C++ or Intel C++ Compiler.
600343d802faSmrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
600443d802faSmrg      # no search path for DLLs.
600543d802faSmrg      case $cc_basename in
600643d802faSmrg      cl* | icl*)
600743d802faSmrg	# Native MSVC or ICC
600843d802faSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
600943d802faSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
601043d802faSmrg	_LT_TAGVAR(always_export_symbols, $1)=yes
601143d802faSmrg	_LT_TAGVAR(file_list_spec, $1)='@'
601243d802faSmrg	# Tell ltmain to make .lib files, not .a files.
601343d802faSmrg	libext=lib
601443d802faSmrg	# Tell ltmain to make .dll files, not .so files.
601543d802faSmrg	shrext_cmds=.dll
601643d802faSmrg	# FIXME: Setting linknames here is a bad hack.
601743d802faSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
601843d802faSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
601943d802faSmrg            cp "$export_symbols" "$output_objdir/$soname.def";
602043d802faSmrg            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
602143d802faSmrg          else
602243d802faSmrg            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
602343d802faSmrg          fi~
602443d802faSmrg          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
602543d802faSmrg          linknames='
602643d802faSmrg	# The linker will not automatically build a static lib if we build a DLL.
602743d802faSmrg	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
602843d802faSmrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
602943d802faSmrg	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
603043d802faSmrg	_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
603143d802faSmrg	# Don't use ranlib
603243d802faSmrg	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
603343d802faSmrg	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
603443d802faSmrg          lt_tool_outputfile="@TOOL_OUTPUT@"~
603543d802faSmrg          case $lt_outputfile in
603643d802faSmrg            *.exe|*.EXE) ;;
603743d802faSmrg            *)
603843d802faSmrg              lt_outputfile=$lt_outputfile.exe
603943d802faSmrg              lt_tool_outputfile=$lt_tool_outputfile.exe
604043d802faSmrg              ;;
604143d802faSmrg          esac~
604243d802faSmrg          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
604343d802faSmrg            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
604443d802faSmrg            $RM "$lt_outputfile.manifest";
604543d802faSmrg          fi'
604643d802faSmrg	;;
604743d802faSmrg      *)
604843d802faSmrg	# Assume MSVC and ICC wrapper
604943d802faSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
605043d802faSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
605143d802faSmrg	# Tell ltmain to make .lib files, not .a files.
605243d802faSmrg	libext=lib
605343d802faSmrg	# Tell ltmain to make .dll files, not .so files.
605443d802faSmrg	shrext_cmds=.dll
605543d802faSmrg	# FIXME: Setting linknames here is a bad hack.
605643d802faSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
605743d802faSmrg	# The linker will automatically build a .lib file if we build a DLL.
605843d802faSmrg	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
605943d802faSmrg	# FIXME: Should let the user specify the lib program.
606043d802faSmrg	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
606143d802faSmrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
606243d802faSmrg	;;
606343d802faSmrg      esac
60642a53b785Smrg      ;;
606543d802faSmrg
606643d802faSmrg    darwin* | rhapsody*)
606743d802faSmrg      _LT_DARWIN_LINKER_FEATURES($1)
60682a53b785Smrg      ;;
606943d802faSmrg
607043d802faSmrg    dgux*)
607143d802faSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
607243d802faSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
607343d802faSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
60742a53b785Smrg      ;;
60753da084b3Smrg
607643d802faSmrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
607743d802faSmrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
607843d802faSmrg    # does not break anything, and helps significantly (at the cost of a little
607943d802faSmrg    # extra space).
608043d802faSmrg    freebsd2.2*)
608143d802faSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
608243d802faSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
608343d802faSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
608443d802faSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
608543d802faSmrg      ;;
60863da084b3Smrg
608743d802faSmrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
608843d802faSmrg    freebsd2.*)
608943d802faSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
609043d802faSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
609143d802faSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
609243d802faSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
60932a53b785Smrg      ;;
609443d802faSmrg
609543d802faSmrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
609643d802faSmrg    freebsd* | dragonfly* | midnightbsd*)
609743d802faSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
609843d802faSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
609943d802faSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
610043d802faSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
61012a53b785Smrg      ;;
610243d802faSmrg
610343d802faSmrg    hpux9*)
610443d802faSmrg      if test yes = "$GCC"; then
610543d802faSmrg	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
61062a53b785Smrg      else
610743d802faSmrg	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
61082a53b785Smrg      fi
610943d802faSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
611043d802faSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
611143d802faSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
61123da084b3Smrg
611343d802faSmrg      # hardcode_minus_L: Not really in the search PATH,
611443d802faSmrg      # but as the default location of the library.
611543d802faSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
611643d802faSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
611748c85eb7Smrg      ;;
611848c85eb7Smrg
611943d802faSmrg    hpux10*)
612043d802faSmrg      if test yes,no = "$GCC,$with_gnu_ld"; then
612143d802faSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
612243d802faSmrg      else
612343d802faSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
612443d802faSmrg      fi
612543d802faSmrg      if test no = "$with_gnu_ld"; then
612643d802faSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
612743d802faSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
612843d802faSmrg	_LT_TAGVAR(hardcode_direct, $1)=yes
612943d802faSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
613043d802faSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
613143d802faSmrg	# hardcode_minus_L: Not really in the search PATH,
613243d802faSmrg	# but as the default location of the library.
613343d802faSmrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
613443d802faSmrg      fi
613543d802faSmrg      ;;
61362a53b785Smrg
613743d802faSmrg    hpux11*)
613843d802faSmrg      if test yes,no = "$GCC,$with_gnu_ld"; then
613943d802faSmrg	case $host_cpu in
614043d802faSmrg	hppa*64*)
614143d802faSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
614243d802faSmrg	  ;;
614343d802faSmrg	ia64*)
614443d802faSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
614543d802faSmrg	  ;;
614643d802faSmrg	*)
614743d802faSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
614843d802faSmrg	  ;;
614943d802faSmrg	esac
615043d802faSmrg      else
615143d802faSmrg	case $host_cpu in
615243d802faSmrg	hppa*64*)
615343d802faSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
615443d802faSmrg	  ;;
615543d802faSmrg	ia64*)
615643d802faSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
615743d802faSmrg	  ;;
615843d802faSmrg	*)
615943d802faSmrg	m4_if($1, [], [
616043d802faSmrg	  # Older versions of the 11.00 compiler do not understand -b yet
616143d802faSmrg	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
616243d802faSmrg	  _LT_LINKER_OPTION([if $CC understands -b],
616343d802faSmrg	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
616443d802faSmrg	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
616543d802faSmrg	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
616643d802faSmrg	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
616743d802faSmrg	  ;;
616843d802faSmrg	esac
616943d802faSmrg      fi
617043d802faSmrg      if test no = "$with_gnu_ld"; then
617143d802faSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
617243d802faSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
61733da084b3Smrg
617443d802faSmrg	case $host_cpu in
617543d802faSmrg	hppa*64*|ia64*)
617643d802faSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no
617743d802faSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
617843d802faSmrg	  ;;
617943d802faSmrg	*)
618043d802faSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
618143d802faSmrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
618243d802faSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
61833da084b3Smrg
618443d802faSmrg	  # hardcode_minus_L: Not really in the search PATH,
618543d802faSmrg	  # but as the default location of the library.
618643d802faSmrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
618743d802faSmrg	  ;;
618843d802faSmrg	esac
618943d802faSmrg      fi
619043d802faSmrg      ;;
61913da084b3Smrg
619243d802faSmrg    irix5* | irix6* | nonstopux*)
619343d802faSmrg      if test yes = "$GCC"; then
619443d802faSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
619543d802faSmrg	# Try to use the -exported_symbol ld option, if it does not
619643d802faSmrg	# work, assume that -exports_file does not work either and
619743d802faSmrg	# implicitly export all symbols.
619843d802faSmrg	# This should be the same for all languages, so no per-tag cache variable.
619943d802faSmrg	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
620043d802faSmrg	  [lt_cv_irix_exported_symbol],
620143d802faSmrg	  [save_LDFLAGS=$LDFLAGS
620243d802faSmrg	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
620343d802faSmrg	   AC_LINK_IFELSE(
620443d802faSmrg	     [AC_LANG_SOURCE(
620543d802faSmrg	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
620643d802faSmrg			      [C++], [[int foo (void) { return 0; }]],
620743d802faSmrg			      [Fortran 77], [[
620843d802faSmrg      subroutine foo
620943d802faSmrg      end]],
621043d802faSmrg			      [Fortran], [[
621143d802faSmrg      subroutine foo
621243d802faSmrg      end]])])],
621343d802faSmrg	      [lt_cv_irix_exported_symbol=yes],
621443d802faSmrg	      [lt_cv_irix_exported_symbol=no])
621543d802faSmrg           LDFLAGS=$save_LDFLAGS])
621643d802faSmrg	if test yes = "$lt_cv_irix_exported_symbol"; then
621743d802faSmrg          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
621843d802faSmrg	fi
621943d802faSmrg      else
622043d802faSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
622143d802faSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
622243d802faSmrg      fi
622343d802faSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
622443d802faSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
622543d802faSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
622643d802faSmrg      _LT_TAGVAR(inherit_rpath, $1)=yes
622743d802faSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
622843d802faSmrg      ;;
62293da084b3Smrg
623043d802faSmrg    linux*)
623143d802faSmrg      case $cc_basename in
623243d802faSmrg      tcc*)
623343d802faSmrg	# Fabrice Bellard et al's Tiny C Compiler
623443d802faSmrg	_LT_TAGVAR(ld_shlibs, $1)=yes
623543d802faSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
623643d802faSmrg	;;
623743d802faSmrg      esac
623843d802faSmrg      ;;
62393da084b3Smrg
624043d802faSmrg    netbsd*)
624143d802faSmrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
624243d802faSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
624343d802faSmrg      else
624443d802faSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
624543d802faSmrg      fi
624643d802faSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
624743d802faSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
624843d802faSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
624943d802faSmrg      ;;
62503da084b3Smrg
625143d802faSmrg    newsos6)
625243d802faSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
625343d802faSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
625443d802faSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
625543d802faSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
625643d802faSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
625743d802faSmrg      ;;
62583da084b3Smrg
625943d802faSmrg    *nto* | *qnx*)
626043d802faSmrg      ;;
62613da084b3Smrg
626243d802faSmrg    openbsd* | bitrig*)
626343d802faSmrg      if test -f /usr/libexec/ld.so; then
626443d802faSmrg	_LT_TAGVAR(hardcode_direct, $1)=yes
626543d802faSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
626643d802faSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
626743d802faSmrg	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
626843d802faSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
626943d802faSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
627043d802faSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
627143d802faSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
627243d802faSmrg	else
627343d802faSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
627443d802faSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
627543d802faSmrg	fi
627643d802faSmrg      else
627743d802faSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
627843d802faSmrg      fi
627943d802faSmrg      ;;
62803da084b3Smrg
628143d802faSmrg    os2*)
628243d802faSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
628343d802faSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
628443d802faSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
628543d802faSmrg      shrext_cmds=.dll
628643d802faSmrg      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
628743d802faSmrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
628843d802faSmrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
628943d802faSmrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
629043d802faSmrg	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
629143d802faSmrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
629243d802faSmrg	emximp -o $lib $output_objdir/$libname.def'
629343d802faSmrg      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
629443d802faSmrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
629543d802faSmrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
629643d802faSmrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
629743d802faSmrg	prefix_cmds="$SED"~
629843d802faSmrg	if test EXPORTS = "`$SED 1q $export_symbols`"; then
629943d802faSmrg	  prefix_cmds="$prefix_cmds -e 1d";
630043d802faSmrg	fi~
630143d802faSmrg	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
630243d802faSmrg	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
630343d802faSmrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
630443d802faSmrg	emximp -o $lib $output_objdir/$libname.def'
630543d802faSmrg      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
630643d802faSmrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
630743d802faSmrg      _LT_TAGVAR(file_list_spec, $1)='@'
630843d802faSmrg      ;;
630952fd71cdSmrg
631043d802faSmrg    osf3*)
631143d802faSmrg      if test yes = "$GCC"; then
631243d802faSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
631343d802faSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
631443d802faSmrg      else
631543d802faSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
631643d802faSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
631743d802faSmrg      fi
631843d802faSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
631943d802faSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
632043d802faSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
632143d802faSmrg      ;;
63223da084b3Smrg
632343d802faSmrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
632443d802faSmrg      if test yes = "$GCC"; then
632543d802faSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
632643d802faSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
632743d802faSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
632843d802faSmrg      else
632943d802faSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
633043d802faSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
633143d802faSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
633243d802faSmrg          $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
63333da084b3Smrg
633443d802faSmrg	# Both c and cxx compiler support -rpath directly
633543d802faSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
633643d802faSmrg      fi
633743d802faSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
633843d802faSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
633943d802faSmrg      ;;
63403da084b3Smrg
634143d802faSmrg    solaris*)
634243d802faSmrg      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
634343d802faSmrg      if test yes = "$GCC"; then
634443d802faSmrg	wlarc='$wl'
634543d802faSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
634643d802faSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
634743d802faSmrg          $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
634843d802faSmrg      else
634943d802faSmrg	case `$CC -V 2>&1` in
635043d802faSmrg	*"Compilers 5.0"*)
635143d802faSmrg	  wlarc=''
635243d802faSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
635343d802faSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
635443d802faSmrg            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
635543d802faSmrg	  ;;
635643d802faSmrg	*)
635743d802faSmrg	  wlarc='$wl'
635843d802faSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
635943d802faSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
636043d802faSmrg            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
636143d802faSmrg	  ;;
636243d802faSmrg	esac
636343d802faSmrg      fi
636443d802faSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
636543d802faSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
636643d802faSmrg      case $host_os in
636743d802faSmrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
636843d802faSmrg      *)
636943d802faSmrg	# The compiler driver will combine and reorder linker options,
637043d802faSmrg	# but understands '-z linker_flag'.  GCC discards it without '$wl',
637143d802faSmrg	# but is careful enough not to reorder.
637243d802faSmrg	# Supported since Solaris 2.6 (maybe 2.5.1?)
637343d802faSmrg	if test yes = "$GCC"; then
637443d802faSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
637543d802faSmrg	else
637643d802faSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
637743d802faSmrg	fi
637843d802faSmrg	;;
637943d802faSmrg      esac
638043d802faSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
638143d802faSmrg      ;;
63823da084b3Smrg
638343d802faSmrg    sunos4*)
638443d802faSmrg      if test sequent = "$host_vendor"; then
638543d802faSmrg	# Use $CC to link under sequent, because it throws in some extra .o
638643d802faSmrg	# files that make .init and .fini sections work.
638743d802faSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
638843d802faSmrg      else
638943d802faSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
639043d802faSmrg      fi
639143d802faSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
639243d802faSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
639343d802faSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
639443d802faSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
639543d802faSmrg      ;;
63963da084b3Smrg
639743d802faSmrg    sysv4)
639843d802faSmrg      case $host_vendor in
639943d802faSmrg	sni)
640043d802faSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
640143d802faSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
640243d802faSmrg	;;
640343d802faSmrg	siemens)
640443d802faSmrg	  ## LD is ld it makes a PLAMLIB
640543d802faSmrg	  ## CC just makes a GrossModule.
640643d802faSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
640743d802faSmrg	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
640843d802faSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no
640943d802faSmrg        ;;
641043d802faSmrg	motorola)
641143d802faSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
641243d802faSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
641343d802faSmrg	;;
641443d802faSmrg      esac
641543d802faSmrg      runpath_var='LD_RUN_PATH'
641643d802faSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
641743d802faSmrg      ;;
64183da084b3Smrg
641943d802faSmrg    sysv4.3*)
642043d802faSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
642143d802faSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
642243d802faSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
642343d802faSmrg      ;;
64243da084b3Smrg
642543d802faSmrg    sysv4*MP*)
642643d802faSmrg      if test -d /usr/nec; then
642743d802faSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
642843d802faSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
642943d802faSmrg	runpath_var=LD_RUN_PATH
643043d802faSmrg	hardcode_runpath_var=yes
643143d802faSmrg	_LT_TAGVAR(ld_shlibs, $1)=yes
643243d802faSmrg      fi
643343d802faSmrg      ;;
64343da084b3Smrg
643543d802faSmrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
643643d802faSmrg      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
643743d802faSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
643843d802faSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
643943d802faSmrg      runpath_var='LD_RUN_PATH'
64403da084b3Smrg
644143d802faSmrg      if test yes = "$GCC"; then
644243d802faSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
644343d802faSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
644443d802faSmrg      else
644543d802faSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
644643d802faSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
644743d802faSmrg      fi
644843d802faSmrg      ;;
64493da084b3Smrg
645043d802faSmrg    sysv5* | sco3.2v5* | sco5v6*)
645143d802faSmrg      # Note: We CANNOT use -z defs as we might desire, because we do not
645243d802faSmrg      # link with -lc, and that would cause any symbols used from libc to
645343d802faSmrg      # always be unresolved, which means just about no library would
645443d802faSmrg      # ever link correctly.  If we're not using GNU ld we use -z text
645543d802faSmrg      # though, which does catch some bad symbols but isn't as heavy-handed
645643d802faSmrg      # as -z defs.
645743d802faSmrg      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
645843d802faSmrg      _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
645943d802faSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
646043d802faSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
646143d802faSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
646243d802faSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
646343d802faSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
646443d802faSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
646543d802faSmrg      runpath_var='LD_RUN_PATH'
646643d802faSmrg
646743d802faSmrg      if test yes = "$GCC"; then
646843d802faSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
646943d802faSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
647043d802faSmrg      else
647143d802faSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
647243d802faSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
647343d802faSmrg      fi
64742a53b785Smrg      ;;
647543d802faSmrg
647643d802faSmrg    uts4*)
647743d802faSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
647843d802faSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
647943d802faSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
64802a53b785Smrg      ;;
648143d802faSmrg
648243d802faSmrg    *)
648343d802faSmrg      _LT_TAGVAR(ld_shlibs, $1)=no
64842a53b785Smrg      ;;
648543d802faSmrg    esac
64863da084b3Smrg
648743d802faSmrg    if test sni = "$host_vendor"; then
648843d802faSmrg      case $host in
648943d802faSmrg      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
649043d802faSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
649143d802faSmrg	;;
649243d802faSmrg      esac
649343d802faSmrg    fi
64942a53b785Smrg  fi
649543d802faSmrg])
649643d802faSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
649743d802faSmrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
64982a53b785Smrg
649943d802faSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
650043d802faSmrg
650143d802faSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
650243d802faSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
650343d802faSmrg_LT_DECL([], [extract_expsyms_cmds], [2],
650443d802faSmrg    [The commands to extract the exported symbol list from a shared archive])
650543d802faSmrg
650643d802faSmrg#
650743d802faSmrg# Do we need to explicitly link libc?
650843d802faSmrg#
650943d802faSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
651043d802faSmrgx|xyes)
651143d802faSmrg  # Assume -lc should be added
651243d802faSmrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
651343d802faSmrg
651443d802faSmrg  if test yes,yes = "$GCC,$enable_shared"; then
651543d802faSmrg    case $_LT_TAGVAR(archive_cmds, $1) in
651643d802faSmrg    *'~'*)
651743d802faSmrg      # FIXME: we may have to deal with multi-command sequences.
651843d802faSmrg      ;;
651943d802faSmrg    '$CC '*)
652043d802faSmrg      # Test whether the compiler implicitly links with -lc since on some
652143d802faSmrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
652243d802faSmrg      # to ld, don't add -lc before -lgcc.
652343d802faSmrg      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
652443d802faSmrg	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
652543d802faSmrg	[$RM conftest*
652643d802faSmrg	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
652743d802faSmrg
652843d802faSmrg	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
652943d802faSmrg	  soname=conftest
653043d802faSmrg	  lib=conftest
653143d802faSmrg	  libobjs=conftest.$ac_objext
653243d802faSmrg	  deplibs=
653343d802faSmrg	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
653443d802faSmrg	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
653543d802faSmrg	  compiler_flags=-v
653643d802faSmrg	  linker_flags=-v
653743d802faSmrg	  verstring=
653843d802faSmrg	  output_objdir=.
653943d802faSmrg	  libname=conftest
654043d802faSmrg	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
654143d802faSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=
654243d802faSmrg	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
654343d802faSmrg	  then
654443d802faSmrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
654543d802faSmrg	  else
654643d802faSmrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
654743d802faSmrg	  fi
654843d802faSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
654943d802faSmrg	else
655043d802faSmrg	  cat conftest.err 1>&5
655143d802faSmrg	fi
655243d802faSmrg	$RM conftest*
655343d802faSmrg	])
655443d802faSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
655543d802faSmrg      ;;
655655acc8fcSmrg    esac
65572a53b785Smrg  fi
65582a53b785Smrg  ;;
655943d802faSmrgesac
6560d63fdb69Smrg
656143d802faSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
656243d802faSmrg    [Whether or not to add -lc for building shared libraries])
656343d802faSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
656443d802faSmrg    [enable_shared_with_static_runtimes], [0],
656543d802faSmrg    [Whether or not to disallow shared libs when runtime libs are static])
656643d802faSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
656743d802faSmrg    [Compiler flag to allow reflexive dlopens])
656843d802faSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1],
656943d802faSmrg    [Compiler flag to generate shared objects directly from archives])
657043d802faSmrg_LT_TAGDECL([], [compiler_needs_object], [1],
657143d802faSmrg    [Whether the compiler copes with passing no objects directly])
657243d802faSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
657343d802faSmrg    [Create an old-style archive from a shared archive])
657443d802faSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
657543d802faSmrg    [Create a temporary old-style archive to link instead of a shared archive])
657643d802faSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
657743d802faSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2])
657843d802faSmrg_LT_TAGDECL([], [module_cmds], [2],
657943d802faSmrg    [Commands used to build a loadable module if different from building
658043d802faSmrg    a shared archive.])
658143d802faSmrg_LT_TAGDECL([], [module_expsym_cmds], [2])
658243d802faSmrg_LT_TAGDECL([], [with_gnu_ld], [1],
658343d802faSmrg    [Whether we are building with GNU ld or not])
658443d802faSmrg_LT_TAGDECL([], [allow_undefined_flag], [1],
658543d802faSmrg    [Flag that allows shared libraries with undefined symbols to be built])
658643d802faSmrg_LT_TAGDECL([], [no_undefined_flag], [1],
658743d802faSmrg    [Flag that enforces no undefined symbols])
658843d802faSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
658943d802faSmrg    [Flag to hardcode $libdir into a binary during linking.
659043d802faSmrg    This must work even if $libdir does not exist])
659143d802faSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1],
659243d802faSmrg    [Whether we need a single "-rpath" flag with a separated argument])
659343d802faSmrg_LT_TAGDECL([], [hardcode_direct], [0],
659443d802faSmrg    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
659543d802faSmrg    DIR into the resulting binary])
659643d802faSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0],
659743d802faSmrg    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
659843d802faSmrg    DIR into the resulting binary and the resulting library dependency is
659943d802faSmrg    "absolute", i.e impossible to change by setting $shlibpath_var if the
660043d802faSmrg    library is relocated])
660143d802faSmrg_LT_TAGDECL([], [hardcode_minus_L], [0],
660243d802faSmrg    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
660343d802faSmrg    into the resulting binary])
660443d802faSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
660543d802faSmrg    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
660643d802faSmrg    into the resulting binary])
660743d802faSmrg_LT_TAGDECL([], [hardcode_automatic], [0],
660843d802faSmrg    [Set to "yes" if building a shared library automatically hardcodes DIR
660943d802faSmrg    into the library and all subsequent libraries and executables linked
661043d802faSmrg    against it])
661143d802faSmrg_LT_TAGDECL([], [inherit_rpath], [0],
661243d802faSmrg    [Set to yes if linker adds runtime paths of dependent libraries
661343d802faSmrg    to runtime path list])
661443d802faSmrg_LT_TAGDECL([], [link_all_deplibs], [0],
661543d802faSmrg    [Whether libtool must link a program against all its dependency libraries])
661643d802faSmrg_LT_TAGDECL([], [always_export_symbols], [0],
661743d802faSmrg    [Set to "yes" if exported symbols are required])
661843d802faSmrg_LT_TAGDECL([], [export_symbols_cmds], [2],
661943d802faSmrg    [The commands to list exported symbols])
662043d802faSmrg_LT_TAGDECL([], [exclude_expsyms], [1],
662143d802faSmrg    [Symbols that should not be listed in the preloaded symbols])
662243d802faSmrg_LT_TAGDECL([], [include_expsyms], [1],
662343d802faSmrg    [Symbols that must always be exported])
662443d802faSmrg_LT_TAGDECL([], [prelink_cmds], [2],
662543d802faSmrg    [Commands necessary for linking programs (against libraries) with templates])
662643d802faSmrg_LT_TAGDECL([], [postlink_cmds], [2],
662743d802faSmrg    [Commands necessary for finishing linking programs])
662843d802faSmrg_LT_TAGDECL([], [file_list_spec], [1],
662943d802faSmrg    [Specify filename containing input files])
663043d802faSmrgdnl FIXME: Not yet implemented
663143d802faSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
663243d802faSmrgdnl    [Compiler flag to generate thread safe objects])
663343d802faSmrg])# _LT_LINKER_SHLIBS
6634d63fdb69Smrg
6635d63fdb69Smrg
663643d802faSmrg# _LT_LANG_C_CONFIG([TAG])
663743d802faSmrg# ------------------------
663843d802faSmrg# Ensure that the configuration variables for a C compiler are suitably
663943d802faSmrg# defined.  These variables are subsequently used by _LT_CONFIG to write
664043d802faSmrg# the compiler configuration to 'libtool'.
664143d802faSmrgm4_defun([_LT_LANG_C_CONFIG],
664243d802faSmrg[m4_require([_LT_DECL_EGREP])dnl
664343d802faSmrglt_save_CC=$CC
664443d802faSmrgAC_LANG_PUSH(C)
66453da084b3Smrg
664643d802faSmrg# Source file extension for C test sources.
664743d802faSmrgac_ext=c
66483da084b3Smrg
664943d802faSmrg# Object file extension for compiled C test sources.
665043d802faSmrgobjext=o
665143d802faSmrg_LT_TAGVAR(objext, $1)=$objext
6652d63fdb69Smrg
665343d802faSmrg# Code to be used in simple compile tests
665443d802faSmrglt_simple_compile_test_code="int some_variable = 0;"
66553da084b3Smrg
665643d802faSmrg# Code to be used in simple link tests
665743d802faSmrglt_simple_link_test_code='int main(){return(0);}'
66583da084b3Smrg
665943d802faSmrg_LT_TAG_COMPILER
666043d802faSmrg# Save the default compiler, since it gets overwritten when the other
666143d802faSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
666243d802faSmrgcompiler_DEFAULT=$CC
666348c85eb7Smrg
666443d802faSmrg# save warnings/boilerplate of simple test code
666543d802faSmrg_LT_COMPILER_BOILERPLATE
666643d802faSmrg_LT_LINKER_BOILERPLATE
66673da084b3Smrg
666843d802faSmrgif test -n "$compiler"; then
666943d802faSmrg  _LT_COMPILER_NO_RTTI($1)
667043d802faSmrg  _LT_COMPILER_PIC($1)
667143d802faSmrg  _LT_COMPILER_C_O($1)
667243d802faSmrg  _LT_COMPILER_FILE_LOCKS($1)
667343d802faSmrg  _LT_LINKER_SHLIBS($1)
667443d802faSmrg  _LT_SYS_DYNAMIC_LINKER($1)
667543d802faSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
667643d802faSmrg  LT_SYS_DLOPEN_SELF
667743d802faSmrg  _LT_CMD_STRIPLIB
66783da084b3Smrg
667943d802faSmrg  # Report what library types will actually be built
668043d802faSmrg  AC_MSG_CHECKING([if libtool supports shared libraries])
668143d802faSmrg  AC_MSG_RESULT([$can_build_shared])
66823da084b3Smrg
668343d802faSmrg  AC_MSG_CHECKING([whether to build shared libraries])
668443d802faSmrg  test no = "$can_build_shared" && enable_shared=no
66853da084b3Smrg
668643d802faSmrg  # On AIX, shared libraries and static libraries use the same namespace, and
668743d802faSmrg  # are all built from PIC.
668843d802faSmrg  case $host_os in
668943d802faSmrg  aix3*)
669043d802faSmrg    test yes = "$enable_shared" && enable_static=no
669143d802faSmrg    if test -n "$RANLIB"; then
669243d802faSmrg      archive_cmds="$archive_cmds~\$RANLIB \$lib"
669343d802faSmrg      postinstall_cmds='$RANLIB $lib'
669443d802faSmrg    fi
669543d802faSmrg    ;;
66963da084b3Smrg
669743d802faSmrg  aix[[4-9]]*)
669843d802faSmrg    if test ia64 != "$host_cpu"; then
669943d802faSmrg      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
670043d802faSmrg      yes,aix,yes) ;;			# shared object as lib.so file only
670143d802faSmrg      yes,svr4,*) ;;			# shared object as lib.so archive member only
670243d802faSmrg      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
670343d802faSmrg      esac
67042a53b785Smrg    fi
670543d802faSmrg    ;;
670643d802faSmrg  esac
670743d802faSmrg  AC_MSG_RESULT([$enable_shared])
670843d802faSmrg
670943d802faSmrg  AC_MSG_CHECKING([whether to build static libraries])
671043d802faSmrg  # Make sure either enable_shared or enable_static is yes.
671143d802faSmrg  test yes = "$enable_shared" || enable_static=yes
671243d802faSmrg  AC_MSG_RESULT([$enable_static])
671343d802faSmrg
671443d802faSmrg  _LT_CONFIG($1)
671543d802faSmrgfi
671643d802faSmrgAC_LANG_POP
671743d802faSmrgCC=$lt_save_CC
671843d802faSmrg])# _LT_LANG_C_CONFIG
671943d802faSmrg
672043d802faSmrg
672143d802faSmrg# _LT_LANG_CXX_CONFIG([TAG])
672243d802faSmrg# --------------------------
672343d802faSmrg# Ensure that the configuration variables for a C++ compiler are suitably
672443d802faSmrg# defined.  These variables are subsequently used by _LT_CONFIG to write
672543d802faSmrg# the compiler configuration to 'libtool'.
672643d802faSmrgm4_defun([_LT_LANG_CXX_CONFIG],
672743d802faSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
672843d802faSmrgm4_require([_LT_DECL_EGREP])dnl
672943d802faSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl
673043d802faSmrgif test -n "$CXX" && ( test no != "$CXX" &&
673143d802faSmrg    ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
673243d802faSmrg    (test g++ != "$CXX"))); then
673343d802faSmrg  AC_PROG_CXXCPP
67342a53b785Smrgelse
673543d802faSmrg  _lt_caught_CXX_error=yes
67362a53b785Smrgfi
67373da084b3Smrg
673843d802faSmrgAC_LANG_PUSH(C++)
673943d802faSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
674043d802faSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
674143d802faSmrg_LT_TAGVAR(always_export_symbols, $1)=no
674243d802faSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
674343d802faSmrg_LT_TAGVAR(compiler_needs_object, $1)=no
674443d802faSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
674543d802faSmrg_LT_TAGVAR(hardcode_direct, $1)=no
674643d802faSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
674743d802faSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
674843d802faSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
674943d802faSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
675043d802faSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
675143d802faSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
675243d802faSmrg_LT_TAGVAR(inherit_rpath, $1)=no
675343d802faSmrg_LT_TAGVAR(module_cmds, $1)=
675443d802faSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
675543d802faSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
675643d802faSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
675743d802faSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
675843d802faSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
675943d802faSmrg_LT_TAGVAR(no_undefined_flag, $1)=
676043d802faSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
676143d802faSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
67623da084b3Smrg
676343d802faSmrg# Source file extension for C++ test sources.
676443d802faSmrgac_ext=cpp
676555acc8fcSmrg
676643d802faSmrg# Object file extension for compiled C++ test sources.
676743d802faSmrgobjext=o
676843d802faSmrg_LT_TAGVAR(objext, $1)=$objext
676943d802faSmrg
677043d802faSmrg# No sense in running all these tests if we already determined that
677143d802faSmrg# the CXX compiler isn't working.  Some variables (like enable_shared)
677243d802faSmrg# are currently assumed to apply to all compilers on this platform,
677343d802faSmrg# and will be corrupted by setting them based on a non-working compiler.
677443d802faSmrgif test yes != "$_lt_caught_CXX_error"; then
677543d802faSmrg  # Code to be used in simple compile tests
677643d802faSmrg  lt_simple_compile_test_code="int some_variable = 0;"
677743d802faSmrg
677843d802faSmrg  # Code to be used in simple link tests
677943d802faSmrg  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
678043d802faSmrg
678143d802faSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
678243d802faSmrg  _LT_TAG_COMPILER
678343d802faSmrg
678443d802faSmrg  # save warnings/boilerplate of simple test code
678543d802faSmrg  _LT_COMPILER_BOILERPLATE
678643d802faSmrg  _LT_LINKER_BOILERPLATE
678743d802faSmrg
678843d802faSmrg  # Allow CC to be a program name with arguments.
678943d802faSmrg  lt_save_CC=$CC
679043d802faSmrg  lt_save_CFLAGS=$CFLAGS
679143d802faSmrg  lt_save_LD=$LD
679243d802faSmrg  lt_save_GCC=$GCC
679343d802faSmrg  GCC=$GXX
679443d802faSmrg  lt_save_with_gnu_ld=$with_gnu_ld
679543d802faSmrg  lt_save_path_LD=$lt_cv_path_LD
679643d802faSmrg  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
679743d802faSmrg    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
67982a53b785Smrg  else
679943d802faSmrg    $as_unset lt_cv_prog_gnu_ld
68002a53b785Smrg  fi
680143d802faSmrg  if test -n "${lt_cv_path_LDCXX+set}"; then
680243d802faSmrg    lt_cv_path_LD=$lt_cv_path_LDCXX
680343d802faSmrg  else
680443d802faSmrg    $as_unset lt_cv_path_LD
680543d802faSmrg  fi
680643d802faSmrg  test -z "${LDCXX+set}" || LD=$LDCXX
680743d802faSmrg  CC=${CXX-"c++"}
680843d802faSmrg  CFLAGS=$CXXFLAGS
680943d802faSmrg  compiler=$CC
681043d802faSmrg  _LT_TAGVAR(compiler, $1)=$CC
681143d802faSmrg  _LT_CC_BASENAME([$compiler])
68122a53b785Smrg
681343d802faSmrg  if test -n "$compiler"; then
681443d802faSmrg    # We don't want -fno-exception when compiling C++ code, so set the
681543d802faSmrg    # no_builtin_flag separately
681643d802faSmrg    if test yes = "$GXX"; then
681743d802faSmrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
681843d802faSmrg    else
681943d802faSmrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
682043d802faSmrg    fi
68212a53b785Smrg
682243d802faSmrg    if test yes = "$GXX"; then
682343d802faSmrg      # Set up default GNU C++ configuration
68243da084b3Smrg
682543d802faSmrg      LT_PATH_LD
68263da084b3Smrg
682743d802faSmrg      # Check if GNU C++ uses GNU ld as the underlying linker, since the
682843d802faSmrg      # archiving commands below assume that GNU ld is being used.
682943d802faSmrg      if test yes = "$with_gnu_ld"; then
683043d802faSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
683143d802faSmrg        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
683248c85eb7Smrg
683343d802faSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
683443d802faSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
683548c85eb7Smrg
683643d802faSmrg        # If archive_cmds runs LD, not CC, wlarc should be empty
683743d802faSmrg        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
683843d802faSmrg        #     investigate it a little bit more. (MM)
683943d802faSmrg        wlarc='$wl'
68403da084b3Smrg
684143d802faSmrg        # ancient GNU ld didn't support --whole-archive et. al.
684243d802faSmrg        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
684343d802faSmrg	  $GREP 'no-whole-archive' > /dev/null; then
684443d802faSmrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
684543d802faSmrg        else
684643d802faSmrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=
684743d802faSmrg        fi
684843d802faSmrg      else
684943d802faSmrg        with_gnu_ld=no
685043d802faSmrg        wlarc=
6851d63fdb69Smrg
685243d802faSmrg        # A generic and very simple default shared library creation
685343d802faSmrg        # command for GNU C++ for the case where it uses the native
685443d802faSmrg        # linker, instead of GNU ld.  If possible, this setting should
685543d802faSmrg        # overridden to take advantage of the native linker features on
685643d802faSmrg        # the platform it is being used on.
685743d802faSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
685843d802faSmrg      fi
68593da084b3Smrg
686043d802faSmrg      # Commands to make compiler produce verbose output that lists
686143d802faSmrg      # what "hidden" libraries, object files and flags are used when
686243d802faSmrg      # linking a shared library.
686343d802faSmrg      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
686448c85eb7Smrg
68652a53b785Smrg    else
686643d802faSmrg      GXX=no
686743d802faSmrg      with_gnu_ld=no
686843d802faSmrg      wlarc=
68692a53b785Smrg    fi
68703da084b3Smrg
687143d802faSmrg    # PORTME: fill in a description of your system's C++ link characteristics
687243d802faSmrg    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
687343d802faSmrg    _LT_TAGVAR(ld_shlibs, $1)=yes
687443d802faSmrg    case $host_os in
687543d802faSmrg      aix3*)
687643d802faSmrg        # FIXME: insert proper C++ library support
687743d802faSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
687843d802faSmrg        ;;
687943d802faSmrg      aix[[4-9]]*)
688043d802faSmrg        if test ia64 = "$host_cpu"; then
688143d802faSmrg          # On IA64, the linker does run time linking by default, so we don't
688243d802faSmrg          # have to do anything special.
688343d802faSmrg          aix_use_runtimelinking=no
688443d802faSmrg          exp_sym_flag='-Bexport'
688543d802faSmrg          no_entry_flag=
688643d802faSmrg        else
688743d802faSmrg          aix_use_runtimelinking=no
688843d802faSmrg
688943d802faSmrg          # Test if we are trying to use run time linking or normal
689043d802faSmrg          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
689143d802faSmrg          # have runtime linking enabled, and use it for executables.
689243d802faSmrg          # For shared libraries, we enable/disable runtime linking
689343d802faSmrg          # depending on the kind of the shared library created -
689443d802faSmrg          # when "with_aix_soname,aix_use_runtimelinking" is:
689543d802faSmrg          # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
689643d802faSmrg          # "aix,yes"  lib.so          shared, rtl:yes, for executables
689743d802faSmrg          #            lib.a           static archive
689843d802faSmrg          # "both,no"  lib.so.V(shr.o) shared, rtl:yes
689943d802faSmrg          #            lib.a(lib.so.V) shared, rtl:no,  for executables
690043d802faSmrg          # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
690143d802faSmrg          #            lib.a(lib.so.V) shared, rtl:no
690243d802faSmrg          # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
690343d802faSmrg          #            lib.a           static archive
690443d802faSmrg          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
690543d802faSmrg	    for ld_flag in $LDFLAGS; do
690643d802faSmrg	      case $ld_flag in
690743d802faSmrg	      *-brtl*)
690843d802faSmrg	        aix_use_runtimelinking=yes
690943d802faSmrg	        break
691043d802faSmrg	        ;;
691143d802faSmrg	      esac
691243d802faSmrg	    done
691343d802faSmrg	    if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
691443d802faSmrg	      # With aix-soname=svr4, we create the lib.so.V shared archives only,
691543d802faSmrg	      # so we don't have lib.a shared libs to link our executables.
691643d802faSmrg	      # We have to force runtime linking in this case.
691743d802faSmrg	      aix_use_runtimelinking=yes
691843d802faSmrg	      LDFLAGS="$LDFLAGS -Wl,-brtl"
691943d802faSmrg	    fi
692043d802faSmrg	    ;;
692143d802faSmrg          esac
692243d802faSmrg
692343d802faSmrg          exp_sym_flag='-bexport'
692443d802faSmrg          no_entry_flag='-bnoentry'
692543d802faSmrg        fi
69263da084b3Smrg
692743d802faSmrg        # When large executables or shared objects are built, AIX ld can
692843d802faSmrg        # have problems creating the table of contents.  If linking a library
692943d802faSmrg        # or program results in "error TOC overflow" add -mminimal-toc to
693043d802faSmrg        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
693143d802faSmrg        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
69323da084b3Smrg
693343d802faSmrg        _LT_TAGVAR(archive_cmds, $1)=''
693443d802faSmrg        _LT_TAGVAR(hardcode_direct, $1)=yes
693543d802faSmrg        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
693643d802faSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
693743d802faSmrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
693843d802faSmrg        _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
693943d802faSmrg        case $with_aix_soname,$aix_use_runtimelinking in
694043d802faSmrg        aix,*) ;;	# no import file
694143d802faSmrg        svr4,* | *,yes) # use import file
694243d802faSmrg          # The Import File defines what to hardcode.
694343d802faSmrg          _LT_TAGVAR(hardcode_direct, $1)=no
694443d802faSmrg          _LT_TAGVAR(hardcode_direct_absolute, $1)=no
694543d802faSmrg          ;;
694643d802faSmrg        esac
69473da084b3Smrg
694843d802faSmrg        if test yes = "$GXX"; then
694943d802faSmrg          case $host_os in aix4.[[012]]|aix4.[[012]].*)
695043d802faSmrg          # We only want to do this on AIX 4.2 and lower, the check
695143d802faSmrg          # below for broken collect2 doesn't work under 4.3+
695243d802faSmrg	  collect2name=`$CC -print-prog-name=collect2`
695343d802faSmrg	  if test -f "$collect2name" &&
695443d802faSmrg	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
695543d802faSmrg	  then
695643d802faSmrg	    # We have reworked collect2
695743d802faSmrg	    :
695843d802faSmrg	  else
695943d802faSmrg	    # We have old collect2
696043d802faSmrg	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
696143d802faSmrg	    # It fails to find uninstalled libraries when the uninstalled
696243d802faSmrg	    # path is not listed in the libpath.  Setting hardcode_minus_L
696343d802faSmrg	    # to unsupported forces relinking
696443d802faSmrg	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
696543d802faSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
696643d802faSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
696743d802faSmrg	  fi
696843d802faSmrg          esac
696943d802faSmrg          shared_flag='-shared'
697043d802faSmrg	  if test yes = "$aix_use_runtimelinking"; then
697143d802faSmrg	    shared_flag=$shared_flag' $wl-G'
697243d802faSmrg	  fi
697343d802faSmrg	  # Need to ensure runtime linking is disabled for the traditional
697443d802faSmrg	  # shared library, or the linker may eventually find shared libraries
697543d802faSmrg	  # /with/ Import File - we do not want to mix them.
697643d802faSmrg	  shared_flag_aix='-shared'
697743d802faSmrg	  shared_flag_svr4='-shared $wl-G'
697843d802faSmrg        else
697943d802faSmrg          # not using gcc
698043d802faSmrg          if test ia64 = "$host_cpu"; then
698143d802faSmrg	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
698243d802faSmrg	  # chokes on -Wl,-G. The following line is correct:
698343d802faSmrg	  shared_flag='-G'
698443d802faSmrg          else
698543d802faSmrg	    if test yes = "$aix_use_runtimelinking"; then
698643d802faSmrg	      shared_flag='$wl-G'
698743d802faSmrg	    else
698843d802faSmrg	      shared_flag='$wl-bM:SRE'
698943d802faSmrg	    fi
699043d802faSmrg	    shared_flag_aix='$wl-bM:SRE'
699143d802faSmrg	    shared_flag_svr4='$wl-G'
699243d802faSmrg          fi
699343d802faSmrg        fi
69943da084b3Smrg
699543d802faSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
699643d802faSmrg        # It seems that -bexpall does not export symbols beginning with
699743d802faSmrg        # underscore (_), so it is better to generate a list of symbols to
699843d802faSmrg	# export.
699943d802faSmrg        _LT_TAGVAR(always_export_symbols, $1)=yes
700043d802faSmrg	if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
700143d802faSmrg          # Warning - without using the other runtime loading flags (-brtl),
700243d802faSmrg          # -berok will link without error, but may produce a broken library.
700343d802faSmrg          # The "-G" linker flag allows undefined symbols.
700443d802faSmrg          _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
700543d802faSmrg          # Determine the default libpath from the value encoded in an empty
700643d802faSmrg          # executable.
700743d802faSmrg          _LT_SYS_MODULE_PATH_AIX([$1])
700843d802faSmrg          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
70093da084b3Smrg
701043d802faSmrg          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
701143d802faSmrg        else
701243d802faSmrg          if test ia64 = "$host_cpu"; then
701343d802faSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
701443d802faSmrg	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
701543d802faSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
701643d802faSmrg          else
701743d802faSmrg	    # Determine the default libpath from the value encoded in an
701843d802faSmrg	    # empty executable.
701943d802faSmrg	    _LT_SYS_MODULE_PATH_AIX([$1])
702043d802faSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
702143d802faSmrg	    # Warning - without using the other run time loading flags,
702243d802faSmrg	    # -berok will link without error, but may produce a broken library.
702343d802faSmrg	    _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
702443d802faSmrg	    _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
702543d802faSmrg	    if test yes = "$with_gnu_ld"; then
702643d802faSmrg	      # We only use this code for GNU lds that support --whole-archive.
702743d802faSmrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
702843d802faSmrg	    else
702943d802faSmrg	      # Exported symbols can be pulled into shared objects from archives
703043d802faSmrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
703143d802faSmrg	    fi
703243d802faSmrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
703343d802faSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
703443d802faSmrg	    # -brtl affects multiple linker settings, -berok does not and is overridden later
703543d802faSmrg	    compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
703643d802faSmrg	    if test svr4 != "$with_aix_soname"; then
703743d802faSmrg	      # This is similar to how AIX traditionally builds its shared
703843d802faSmrg	      # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
703943d802faSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
704043d802faSmrg	    fi
704143d802faSmrg	    if test aix != "$with_aix_soname"; then
704243d802faSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
704343d802faSmrg	    else
704443d802faSmrg	      # used by -dlpreopen to get the symbols
704543d802faSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
704643d802faSmrg	    fi
704743d802faSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
704843d802faSmrg          fi
704943d802faSmrg        fi
705043d802faSmrg        ;;
70512a53b785Smrg
705243d802faSmrg      beos*)
705343d802faSmrg	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
705443d802faSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
705543d802faSmrg	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
705643d802faSmrg	  # support --undefined.  This deserves some investigation.  FIXME
705743d802faSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
705843d802faSmrg	else
705943d802faSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
706043d802faSmrg	fi
706143d802faSmrg	;;
70623da084b3Smrg
706343d802faSmrg      chorus*)
706443d802faSmrg        case $cc_basename in
706543d802faSmrg          *)
706643d802faSmrg	  # FIXME: insert proper C++ library support
706743d802faSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
706843d802faSmrg	  ;;
706943d802faSmrg        esac
707043d802faSmrg        ;;
707155acc8fcSmrg
707243d802faSmrg      cygwin* | mingw* | pw32* | cegcc*)
707343d802faSmrg	case $GXX,$cc_basename in
707443d802faSmrg	,cl* | no,cl* | ,icl* | no,icl*)
707543d802faSmrg	  # Native MSVC or ICC
707643d802faSmrg	  # hardcode_libdir_flag_spec is actually meaningless, as there is
707743d802faSmrg	  # no search path for DLLs.
707843d802faSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
707943d802faSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
708043d802faSmrg	  _LT_TAGVAR(always_export_symbols, $1)=yes
708143d802faSmrg	  _LT_TAGVAR(file_list_spec, $1)='@'
708243d802faSmrg	  # Tell ltmain to make .lib files, not .a files.
708343d802faSmrg	  libext=lib
708443d802faSmrg	  # Tell ltmain to make .dll files, not .so files.
708543d802faSmrg	  shrext_cmds=.dll
708643d802faSmrg	  # FIXME: Setting linknames here is a bad hack.
708743d802faSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
708843d802faSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
708943d802faSmrg              cp "$export_symbols" "$output_objdir/$soname.def";
709043d802faSmrg              echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
709143d802faSmrg            else
709243d802faSmrg              $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
709343d802faSmrg            fi~
709443d802faSmrg            $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
709543d802faSmrg            linknames='
709643d802faSmrg	  # The linker will not automatically build a static lib if we build a DLL.
709743d802faSmrg	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
709843d802faSmrg	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
709943d802faSmrg	  # Don't use ranlib
710043d802faSmrg	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
710143d802faSmrg	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
710243d802faSmrg            lt_tool_outputfile="@TOOL_OUTPUT@"~
710343d802faSmrg            case $lt_outputfile in
710443d802faSmrg              *.exe|*.EXE) ;;
710543d802faSmrg              *)
710643d802faSmrg                lt_outputfile=$lt_outputfile.exe
710743d802faSmrg                lt_tool_outputfile=$lt_tool_outputfile.exe
710843d802faSmrg                ;;
710943d802faSmrg            esac~
711043d802faSmrg            func_to_tool_file "$lt_outputfile"~
711143d802faSmrg            if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
711243d802faSmrg              $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
711343d802faSmrg              $RM "$lt_outputfile.manifest";
711443d802faSmrg            fi'
711543d802faSmrg	  ;;
711643d802faSmrg	*)
711743d802faSmrg	  # g++
711843d802faSmrg	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
711943d802faSmrg	  # as there is no search path for DLLs.
712043d802faSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
712143d802faSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
712243d802faSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
712343d802faSmrg	  _LT_TAGVAR(always_export_symbols, $1)=no
712443d802faSmrg	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
712548c85eb7Smrg
712643d802faSmrg	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
712743d802faSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
712843d802faSmrg	    # If the export-symbols file already is a .def file, use it as
712943d802faSmrg	    # is; otherwise, prepend EXPORTS...
713043d802faSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
713143d802faSmrg              cp $export_symbols $output_objdir/$soname.def;
713243d802faSmrg            else
713343d802faSmrg              echo EXPORTS > $output_objdir/$soname.def;
713443d802faSmrg              cat $export_symbols >> $output_objdir/$soname.def;
713543d802faSmrg            fi~
713643d802faSmrg            $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'
713743d802faSmrg	  else
713843d802faSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
713943d802faSmrg	  fi
714043d802faSmrg	  ;;
714143d802faSmrg	esac
714243d802faSmrg	;;
714343d802faSmrg      darwin* | rhapsody*)
714443d802faSmrg        _LT_DARWIN_LINKER_FEATURES($1)
714543d802faSmrg	;;
71463da084b3Smrg
714743d802faSmrg      os2*)
714843d802faSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
714943d802faSmrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
715043d802faSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
715143d802faSmrg	shrext_cmds=.dll
715243d802faSmrg	_LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
715343d802faSmrg	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
715443d802faSmrg	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
715543d802faSmrg	  $ECHO EXPORTS >> $output_objdir/$libname.def~
715643d802faSmrg	  emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
715743d802faSmrg	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
715843d802faSmrg	  emximp -o $lib $output_objdir/$libname.def'
715943d802faSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
716043d802faSmrg	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
716143d802faSmrg	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
716243d802faSmrg	  $ECHO EXPORTS >> $output_objdir/$libname.def~
716343d802faSmrg	  prefix_cmds="$SED"~
716443d802faSmrg	  if test EXPORTS = "`$SED 1q $export_symbols`"; then
716543d802faSmrg	    prefix_cmds="$prefix_cmds -e 1d";
716643d802faSmrg	  fi~
716743d802faSmrg	  prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
716843d802faSmrg	  cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
716943d802faSmrg	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
717043d802faSmrg	  emximp -o $lib $output_objdir/$libname.def'
717143d802faSmrg	_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
717243d802faSmrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
717343d802faSmrg	_LT_TAGVAR(file_list_spec, $1)='@'
717443d802faSmrg	;;
71753da084b3Smrg
717643d802faSmrg      dgux*)
717743d802faSmrg        case $cc_basename in
717843d802faSmrg          ec++*)
717943d802faSmrg	    # FIXME: insert proper C++ library support
718043d802faSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
718143d802faSmrg	    ;;
718243d802faSmrg          ghcx*)
718343d802faSmrg	    # Green Hills C++ Compiler
718443d802faSmrg	    # FIXME: insert proper C++ library support
718543d802faSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
718643d802faSmrg	    ;;
718743d802faSmrg          *)
718843d802faSmrg	    # FIXME: insert proper C++ library support
718943d802faSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
719043d802faSmrg	    ;;
719143d802faSmrg        esac
719243d802faSmrg        ;;
71933da084b3Smrg
719443d802faSmrg      freebsd2.*)
719543d802faSmrg        # C++ shared libraries reported to be fairly broken before
719643d802faSmrg	# switch to ELF
719743d802faSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
719843d802faSmrg        ;;
71993da084b3Smrg
720043d802faSmrg      freebsd-elf*)
720143d802faSmrg        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
720243d802faSmrg        ;;
72033da084b3Smrg
720443d802faSmrg      freebsd* | dragonfly* | midnightbsd*)
720543d802faSmrg        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
720643d802faSmrg        # conventions
720743d802faSmrg        _LT_TAGVAR(ld_shlibs, $1)=yes
720843d802faSmrg        ;;
720948c85eb7Smrg
721043d802faSmrg      haiku*)
721143d802faSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
721243d802faSmrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
721343d802faSmrg        ;;
721448c85eb7Smrg
721543d802faSmrg      hpux9*)
721643d802faSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
721743d802faSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
721843d802faSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
721943d802faSmrg        _LT_TAGVAR(hardcode_direct, $1)=yes
722043d802faSmrg        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
722143d802faSmrg				             # but as the default
722243d802faSmrg				             # location of the library.
722348c85eb7Smrg
722443d802faSmrg        case $cc_basename in
722543d802faSmrg          CC*)
722643d802faSmrg            # FIXME: insert proper C++ library support
722743d802faSmrg            _LT_TAGVAR(ld_shlibs, $1)=no
722843d802faSmrg            ;;
722943d802faSmrg          aCC*)
723043d802faSmrg            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
723143d802faSmrg            # Commands to make compiler produce verbose output that lists
723243d802faSmrg            # what "hidden" libraries, object files and flags are used when
723343d802faSmrg            # linking a shared library.
723443d802faSmrg            #
723543d802faSmrg            # There doesn't appear to be a way to prevent this compiler from
723643d802faSmrg            # explicitly linking system object files so we need to strip them
723743d802faSmrg            # from the output so that they don't get included in the library
723843d802faSmrg            # dependencies.
723943d802faSmrg            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
724043d802faSmrg            ;;
724143d802faSmrg          *)
724243d802faSmrg            if test yes = "$GXX"; then
724343d802faSmrg              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
724443d802faSmrg            else
724543d802faSmrg              # FIXME: insert proper C++ library support
724643d802faSmrg              _LT_TAGVAR(ld_shlibs, $1)=no
724743d802faSmrg            fi
724843d802faSmrg            ;;
724943d802faSmrg        esac
725043d802faSmrg        ;;
725148c85eb7Smrg
725243d802faSmrg      hpux10*|hpux11*)
725343d802faSmrg        if test no = "$with_gnu_ld"; then
725443d802faSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
725543d802faSmrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
725648c85eb7Smrg
725743d802faSmrg          case $host_cpu in
725843d802faSmrg            hppa*64*|ia64*)
725943d802faSmrg              ;;
726043d802faSmrg            *)
726143d802faSmrg	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
726243d802faSmrg              ;;
726343d802faSmrg          esac
726443d802faSmrg        fi
726543d802faSmrg        case $host_cpu in
726643d802faSmrg          hppa*64*|ia64*)
726743d802faSmrg            _LT_TAGVAR(hardcode_direct, $1)=no
726843d802faSmrg            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
726943d802faSmrg            ;;
727043d802faSmrg          *)
727143d802faSmrg            _LT_TAGVAR(hardcode_direct, $1)=yes
727243d802faSmrg            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
727343d802faSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
727443d802faSmrg					         # but as the default
727543d802faSmrg					         # location of the library.
727643d802faSmrg            ;;
727743d802faSmrg        esac
727848c85eb7Smrg
727943d802faSmrg        case $cc_basename in
728043d802faSmrg          CC*)
728143d802faSmrg	    # FIXME: insert proper C++ library support
728243d802faSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
728343d802faSmrg	    ;;
728443d802faSmrg          aCC*)
728543d802faSmrg	    case $host_cpu in
728643d802faSmrg	      hppa*64*)
728743d802faSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
728843d802faSmrg	        ;;
728943d802faSmrg	      ia64*)
729043d802faSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
729143d802faSmrg	        ;;
729243d802faSmrg	      *)
729343d802faSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
729443d802faSmrg	        ;;
729543d802faSmrg	    esac
729643d802faSmrg	    # Commands to make compiler produce verbose output that lists
729743d802faSmrg	    # what "hidden" libraries, object files and flags are used when
729843d802faSmrg	    # linking a shared library.
729943d802faSmrg	    #
730043d802faSmrg	    # There doesn't appear to be a way to prevent this compiler from
730143d802faSmrg	    # explicitly linking system object files so we need to strip them
730243d802faSmrg	    # from the output so that they don't get included in the library
730343d802faSmrg	    # dependencies.
730443d802faSmrg	    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
730543d802faSmrg	    ;;
730643d802faSmrg          *)
730743d802faSmrg	    if test yes = "$GXX"; then
730843d802faSmrg	      if test no = "$with_gnu_ld"; then
730943d802faSmrg	        case $host_cpu in
731043d802faSmrg	          hppa*64*)
731143d802faSmrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
731243d802faSmrg	            ;;
731343d802faSmrg	          ia64*)
731443d802faSmrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
731543d802faSmrg	            ;;
731643d802faSmrg	          *)
731743d802faSmrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
731843d802faSmrg	            ;;
731943d802faSmrg	        esac
732043d802faSmrg	      fi
732143d802faSmrg	    else
732243d802faSmrg	      # FIXME: insert proper C++ library support
732343d802faSmrg	      _LT_TAGVAR(ld_shlibs, $1)=no
732443d802faSmrg	    fi
732543d802faSmrg	    ;;
732643d802faSmrg        esac
732743d802faSmrg        ;;
732848c85eb7Smrg
732943d802faSmrg      interix[[3-9]]*)
733043d802faSmrg	_LT_TAGVAR(hardcode_direct, $1)=no
733143d802faSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
733243d802faSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
733343d802faSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
733443d802faSmrg	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
733543d802faSmrg	# Instead, shared libraries are loaded at an image base (0x10000000 by
733643d802faSmrg	# default) and relocated if they conflict, which is a slow very memory
733743d802faSmrg	# consuming and fragmenting process.  To avoid this, we pick a random,
733843d802faSmrg	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
733943d802faSmrg	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
734043d802faSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
734143d802faSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
734243d802faSmrg	;;
734343d802faSmrg      irix5* | irix6*)
734443d802faSmrg        case $cc_basename in
734543d802faSmrg          CC*)
734643d802faSmrg	    # SGI C++
734743d802faSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
734848c85eb7Smrg
734943d802faSmrg	    # Archives containing C++ object files must be created using
735043d802faSmrg	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
735143d802faSmrg	    # necessary to make sure instantiated templates are included
735243d802faSmrg	    # in the archive.
735343d802faSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
735443d802faSmrg	    ;;
735543d802faSmrg          *)
735643d802faSmrg	    if test yes = "$GXX"; then
735743d802faSmrg	      if test no = "$with_gnu_ld"; then
735843d802faSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
735943d802faSmrg	      else
736043d802faSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib'
736143d802faSmrg	      fi
736243d802faSmrg	    fi
736343d802faSmrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
736443d802faSmrg	    ;;
736543d802faSmrg        esac
736643d802faSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
736743d802faSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
736843d802faSmrg        _LT_TAGVAR(inherit_rpath, $1)=yes
736943d802faSmrg        ;;
737048c85eb7Smrg
737143d802faSmrg      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
737243d802faSmrg        case $cc_basename in
737343d802faSmrg          KCC*)
737443d802faSmrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
737548c85eb7Smrg
737643d802faSmrg	    # KCC will only create a shared library if the output file
737743d802faSmrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
737843d802faSmrg	    # to its proper name (with version) after linking.
737943d802faSmrg	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
738043d802faSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib'
738143d802faSmrg	    # Commands to make compiler produce verbose output that lists
738243d802faSmrg	    # what "hidden" libraries, object files and flags are used when
738343d802faSmrg	    # linking a shared library.
738443d802faSmrg	    #
738543d802faSmrg	    # There doesn't appear to be a way to prevent this compiler from
738643d802faSmrg	    # explicitly linking system object files so we need to strip them
738743d802faSmrg	    # from the output so that they don't get included in the library
738843d802faSmrg	    # dependencies.
738943d802faSmrg	    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
739048c85eb7Smrg
739143d802faSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
739243d802faSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
739348c85eb7Smrg
739443d802faSmrg	    # Archives containing C++ object files must be created using
739543d802faSmrg	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
739643d802faSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
739743d802faSmrg	    ;;
739843d802faSmrg	  icpc* | ecpc* )
739943d802faSmrg	    # Intel C++
740043d802faSmrg	    with_gnu_ld=yes
740143d802faSmrg	    # version 8.0 and above of icpc choke on multiply defined symbols
740243d802faSmrg	    # if we add $predep_objects and $postdep_objects, however 7.1 and
740343d802faSmrg	    # earlier do not add the objects themselves.
740443d802faSmrg	    case `$CC -V 2>&1` in
740543d802faSmrg	      *"Version 7."*)
740643d802faSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
740743d802faSmrg		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
740843d802faSmrg		;;
740943d802faSmrg	      *)  # Version 8.0 or newer
741043d802faSmrg	        tmp_idyn=
741143d802faSmrg	        case $host_cpu in
741243d802faSmrg		  ia64*) tmp_idyn=' -i_dynamic';;
741343d802faSmrg		esac
741443d802faSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
741543d802faSmrg		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
741643d802faSmrg		;;
741743d802faSmrg	    esac
741843d802faSmrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
741943d802faSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
742043d802faSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
742143d802faSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
742243d802faSmrg	    ;;
742343d802faSmrg          pgCC* | pgcpp*)
742443d802faSmrg            # Portland Group C++ compiler
742543d802faSmrg	    case `$CC -V` in
742643d802faSmrg	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
742743d802faSmrg	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
742843d802faSmrg               rm -rf $tpldir~
742943d802faSmrg               $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
743043d802faSmrg               compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
743143d802faSmrg	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
743243d802faSmrg                rm -rf $tpldir~
743343d802faSmrg                $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
743443d802faSmrg                $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
743543d802faSmrg                $RANLIB $oldlib'
743643d802faSmrg	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
743743d802faSmrg                rm -rf $tpldir~
743843d802faSmrg                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
743943d802faSmrg                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
744043d802faSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
744143d802faSmrg                rm -rf $tpldir~
744243d802faSmrg                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
744343d802faSmrg                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
744443d802faSmrg	      ;;
744543d802faSmrg	    *) # Version 6 and above use weak symbols
744643d802faSmrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
744743d802faSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
744843d802faSmrg	      ;;
744943d802faSmrg	    esac
745048c85eb7Smrg
745143d802faSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
745243d802faSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
745343d802faSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
745443d802faSmrg            ;;
745543d802faSmrg	  cxx*)
745643d802faSmrg	    # Compaq C++
745743d802faSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
745843d802faSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname  -o $lib $wl-retain-symbols-file $wl$export_symbols'
745948c85eb7Smrg
746043d802faSmrg	    runpath_var=LD_RUN_PATH
746143d802faSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
746243d802faSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
746348c85eb7Smrg
746443d802faSmrg	    # Commands to make compiler produce verbose output that lists
746543d802faSmrg	    # what "hidden" libraries, object files and flags are used when
746643d802faSmrg	    # linking a shared library.
746743d802faSmrg	    #
746843d802faSmrg	    # There doesn't appear to be a way to prevent this compiler from
746943d802faSmrg	    # explicitly linking system object files so we need to strip them
747043d802faSmrg	    # from the output so that they don't get included in the library
747143d802faSmrg	    # dependencies.
747243d802faSmrg	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
747343d802faSmrg	    ;;
747443d802faSmrg	  xl* | mpixl* | bgxl*)
747543d802faSmrg	    # IBM XL 8.0 on PPC, with GNU ld
747643d802faSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
747743d802faSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
747843d802faSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
747943d802faSmrg	    if test yes = "$supports_anon_versioning"; then
748043d802faSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
748143d802faSmrg                cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
748243d802faSmrg                echo "local: *; };" >> $output_objdir/$libname.ver~
748343d802faSmrg                $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
748443d802faSmrg	    fi
748543d802faSmrg	    ;;
748643d802faSmrg	  *)
748743d802faSmrg	    case `$CC -V 2>&1 | $SED 5q` in
748843d802faSmrg	    *Sun\ C*)
748943d802faSmrg	      # Sun C++ 5.9
749043d802faSmrg	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
749143d802faSmrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
749243d802faSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols'
749343d802faSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
749443d802faSmrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
749543d802faSmrg	      _LT_TAGVAR(compiler_needs_object, $1)=yes
749648c85eb7Smrg
749743d802faSmrg	      # Not sure whether something based on
749843d802faSmrg	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
749943d802faSmrg	      # would be better.
750043d802faSmrg	      output_verbose_link_cmd='func_echo_all'
750148c85eb7Smrg
750243d802faSmrg	      # Archives containing C++ object files must be created using
750343d802faSmrg	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
750443d802faSmrg	      # necessary to make sure instantiated templates are included
750543d802faSmrg	      # in the archive.
750643d802faSmrg	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
750743d802faSmrg	      ;;
750843d802faSmrg	    esac
750943d802faSmrg	    ;;
751043d802faSmrg	esac
751143d802faSmrg	;;
751248c85eb7Smrg
751343d802faSmrg      lynxos*)
751443d802faSmrg        # FIXME: insert proper C++ library support
751543d802faSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
751643d802faSmrg	;;
751748c85eb7Smrg
751843d802faSmrg      m88k*)
751943d802faSmrg        # FIXME: insert proper C++ library support
752043d802faSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
752143d802faSmrg	;;
752243d802faSmrg
752343d802faSmrg      mvs*)
752443d802faSmrg        case $cc_basename in
752543d802faSmrg          cxx*)
752643d802faSmrg	    # FIXME: insert proper C++ library support
752743d802faSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
75282a53b785Smrg	    ;;
75292a53b785Smrg	  *)
753043d802faSmrg	    # FIXME: insert proper C++ library support
753143d802faSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
75322a53b785Smrg	    ;;
75332a53b785Smrg	esac
753443d802faSmrg	;;
753548c85eb7Smrg
753643d802faSmrg      netbsd*)
753743d802faSmrg        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
753843d802faSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
753943d802faSmrg	  wlarc=
754043d802faSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
754143d802faSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
754243d802faSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
754343d802faSmrg	fi
754443d802faSmrg	# Workaround some broken pre-1.5 toolchains
754543d802faSmrg	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
754643d802faSmrg	;;
754748c85eb7Smrg
754843d802faSmrg      *nto* | *qnx*)
754943d802faSmrg        _LT_TAGVAR(ld_shlibs, $1)=yes
755043d802faSmrg	;;
755148c85eb7Smrg
755243d802faSmrg      openbsd* | bitrig*)
755343d802faSmrg	if test -f /usr/libexec/ld.so; then
755443d802faSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
755543d802faSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
755643d802faSmrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
755743d802faSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
755843d802faSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
755943d802faSmrg	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
756043d802faSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib'
756143d802faSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
756243d802faSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
756343d802faSmrg	  fi
756443d802faSmrg	  output_verbose_link_cmd=func_echo_all
756543d802faSmrg	else
756643d802faSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
756743d802faSmrg	fi
756843d802faSmrg	;;
756948c85eb7Smrg
757043d802faSmrg      osf3* | osf4* | osf5*)
757143d802faSmrg        case $cc_basename in
757243d802faSmrg          KCC*)
757343d802faSmrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
757443d802faSmrg
757543d802faSmrg	    # KCC will only create a shared library if the output file
757643d802faSmrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
757743d802faSmrg	    # to its proper name (with version) after linking.
757843d802faSmrg	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
757943d802faSmrg
758043d802faSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
758143d802faSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
758243d802faSmrg
758343d802faSmrg	    # Archives containing C++ object files must be created using
758443d802faSmrg	    # the KAI C++ compiler.
758543d802faSmrg	    case $host in
758643d802faSmrg	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
758743d802faSmrg	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
758843d802faSmrg	    esac
758943d802faSmrg	    ;;
759043d802faSmrg          RCC*)
759143d802faSmrg	    # Rational C++ 2.4.1
759243d802faSmrg	    # FIXME: insert proper C++ library support
759343d802faSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
759443d802faSmrg	    ;;
759543d802faSmrg          cxx*)
759643d802faSmrg	    case $host in
759743d802faSmrg	      osf3*)
759843d802faSmrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
759943d802faSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
760043d802faSmrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
760143d802faSmrg		;;
760243d802faSmrg	      *)
760343d802faSmrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
760443d802faSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
760543d802faSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
760643d802faSmrg                  echo "-hidden">> $lib.exp~
760743d802faSmrg                  $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~
760843d802faSmrg                  $RM $lib.exp'
760943d802faSmrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
761043d802faSmrg		;;
761143d802faSmrg	    esac
761243d802faSmrg
761343d802faSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
761443d802faSmrg
761543d802faSmrg	    # Commands to make compiler produce verbose output that lists
761643d802faSmrg	    # what "hidden" libraries, object files and flags are used when
761743d802faSmrg	    # linking a shared library.
761843d802faSmrg	    #
761943d802faSmrg	    # There doesn't appear to be a way to prevent this compiler from
762043d802faSmrg	    # explicitly linking system object files so we need to strip them
762143d802faSmrg	    # from the output so that they don't get included in the library
762243d802faSmrg	    # dependencies.
762343d802faSmrg	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
762443d802faSmrg	    ;;
762543d802faSmrg	  *)
762643d802faSmrg	    if test yes,no = "$GXX,$with_gnu_ld"; then
762743d802faSmrg	      _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
762843d802faSmrg	      case $host in
762943d802faSmrg	        osf3*)
763043d802faSmrg	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
763143d802faSmrg		  ;;
763243d802faSmrg	        *)
763343d802faSmrg	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
763443d802faSmrg		  ;;
763543d802faSmrg	      esac
763648c85eb7Smrg
763743d802faSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
763843d802faSmrg	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
763948c85eb7Smrg
764043d802faSmrg	      # Commands to make compiler produce verbose output that lists
764143d802faSmrg	      # what "hidden" libraries, object files and flags are used when
764243d802faSmrg	      # linking a shared library.
764343d802faSmrg	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
764448c85eb7Smrg
764543d802faSmrg	    else
764643d802faSmrg	      # FIXME: insert proper C++ library support
764743d802faSmrg	      _LT_TAGVAR(ld_shlibs, $1)=no
764843d802faSmrg	    fi
764943d802faSmrg	    ;;
765043d802faSmrg        esac
765143d802faSmrg        ;;
765248c85eb7Smrg
765343d802faSmrg      psos*)
765443d802faSmrg        # FIXME: insert proper C++ library support
765543d802faSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
765643d802faSmrg        ;;
765748c85eb7Smrg
765843d802faSmrg      sunos4*)
765943d802faSmrg        case $cc_basename in
766043d802faSmrg          CC*)
766143d802faSmrg	    # Sun C++ 4.x
766243d802faSmrg	    # FIXME: insert proper C++ library support
766343d802faSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
766443d802faSmrg	    ;;
766543d802faSmrg          lcc*)
766643d802faSmrg	    # Lucid
766743d802faSmrg	    # FIXME: insert proper C++ library support
766843d802faSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
766943d802faSmrg	    ;;
767043d802faSmrg          *)
767143d802faSmrg	    # FIXME: insert proper C++ library support
767243d802faSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
767343d802faSmrg	    ;;
767443d802faSmrg        esac
767543d802faSmrg        ;;
767648c85eb7Smrg
767743d802faSmrg      solaris*)
767843d802faSmrg        case $cc_basename in
767943d802faSmrg          CC* | sunCC*)
768043d802faSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
768143d802faSmrg            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
768243d802faSmrg	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
768343d802faSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
768443d802faSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
768543d802faSmrg              $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'
768648c85eb7Smrg
768743d802faSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
768843d802faSmrg	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
768943d802faSmrg	    case $host_os in
769043d802faSmrg	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
769143d802faSmrg	      *)
769243d802faSmrg		# The compiler driver will combine and reorder linker options,
769343d802faSmrg		# but understands '-z linker_flag'.
769443d802faSmrg	        # Supported since Solaris 2.6 (maybe 2.5.1?)
769543d802faSmrg		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
769643d802faSmrg	        ;;
769743d802faSmrg	    esac
769843d802faSmrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
769948c85eb7Smrg
770043d802faSmrg	    output_verbose_link_cmd='func_echo_all'
770148c85eb7Smrg
770243d802faSmrg	    # Archives containing C++ object files must be created using
770343d802faSmrg	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
770443d802faSmrg	    # necessary to make sure instantiated templates are included
770543d802faSmrg	    # in the archive.
770643d802faSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
770743d802faSmrg	    ;;
770843d802faSmrg          gcx*)
770943d802faSmrg	    # Green Hills C++ Compiler
771043d802faSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
771148c85eb7Smrg
771243d802faSmrg	    # The C++ compiler must be used to create the archive.
771343d802faSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
771443d802faSmrg	    ;;
771543d802faSmrg          *)
771643d802faSmrg	    # GNU C++ compiler with Solaris linker
771743d802faSmrg	    if test yes,no = "$GXX,$with_gnu_ld"; then
771843d802faSmrg	      _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
771943d802faSmrg	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
772043d802faSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
772143d802faSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
772243d802faSmrg                  $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
772348c85eb7Smrg
772443d802faSmrg	        # Commands to make compiler produce verbose output that lists
772543d802faSmrg	        # what "hidden" libraries, object files and flags are used when
772643d802faSmrg	        # linking a shared library.
772743d802faSmrg	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
772843d802faSmrg	      else
772943d802faSmrg	        # g++ 2.7 appears to require '-G' NOT '-shared' on this
773043d802faSmrg	        # platform.
773143d802faSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
773243d802faSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
773343d802faSmrg                  $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
77343da084b3Smrg
773543d802faSmrg	        # Commands to make compiler produce verbose output that lists
773643d802faSmrg	        # what "hidden" libraries, object files and flags are used when
773743d802faSmrg	        # linking a shared library.
773843d802faSmrg	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
773943d802faSmrg	      fi
77403da084b3Smrg
774143d802faSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
774243d802faSmrg	      case $host_os in
774343d802faSmrg		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
774443d802faSmrg		*)
774543d802faSmrg		  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
774643d802faSmrg		  ;;
774743d802faSmrg	      esac
774843d802faSmrg	    fi
774943d802faSmrg	    ;;
775043d802faSmrg        esac
775143d802faSmrg        ;;
77523da084b3Smrg
775343d802faSmrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
775443d802faSmrg      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
775543d802faSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
775643d802faSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
775743d802faSmrg      runpath_var='LD_RUN_PATH'
77583da084b3Smrg
775943d802faSmrg      case $cc_basename in
776043d802faSmrg        CC*)
776143d802faSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
776243d802faSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
776343d802faSmrg	  ;;
776443d802faSmrg	*)
776543d802faSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
776643d802faSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
776743d802faSmrg	  ;;
776843d802faSmrg      esac
776943d802faSmrg      ;;
77703da084b3Smrg
777143d802faSmrg      sysv5* | sco3.2v5* | sco5v6*)
777243d802faSmrg	# Note: We CANNOT use -z defs as we might desire, because we do not
777343d802faSmrg	# link with -lc, and that would cause any symbols used from libc to
777443d802faSmrg	# always be unresolved, which means just about no library would
777543d802faSmrg	# ever link correctly.  If we're not using GNU ld we use -z text
777643d802faSmrg	# though, which does catch some bad symbols but isn't as heavy-handed
777743d802faSmrg	# as -z defs.
777843d802faSmrg	_LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
777943d802faSmrg	_LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
778043d802faSmrg	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
778143d802faSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
778243d802faSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
778343d802faSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
778443d802faSmrg	_LT_TAGVAR(link_all_deplibs, $1)=yes
778543d802faSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
778643d802faSmrg	runpath_var='LD_RUN_PATH'
778743d802faSmrg
778843d802faSmrg	case $cc_basename in
778943d802faSmrg          CC*)
779043d802faSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
779143d802faSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
779243d802faSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
779343d802faSmrg              '"$_LT_TAGVAR(old_archive_cmds, $1)"
779443d802faSmrg	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
779543d802faSmrg              '"$_LT_TAGVAR(reload_cmds, $1)"
779643d802faSmrg	    ;;
779743d802faSmrg	  *)
779843d802faSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
779943d802faSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
780043d802faSmrg	    ;;
780143d802faSmrg	esac
780243d802faSmrg      ;;
78033da084b3Smrg
780443d802faSmrg      tandem*)
780543d802faSmrg        case $cc_basename in
780643d802faSmrg          NCC*)
780743d802faSmrg	    # NonStop-UX NCC 3.20
780843d802faSmrg	    # FIXME: insert proper C++ library support
780943d802faSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
781043d802faSmrg	    ;;
781143d802faSmrg          *)
781243d802faSmrg	    # FIXME: insert proper C++ library support
781343d802faSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
781443d802faSmrg	    ;;
781543d802faSmrg        esac
781643d802faSmrg        ;;
78173da084b3Smrg
781843d802faSmrg      vxworks*)
781943d802faSmrg        # FIXME: insert proper C++ library support
782043d802faSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
782143d802faSmrg        ;;
7822d63fdb69Smrg
782343d802faSmrg      *)
782443d802faSmrg        # FIXME: insert proper C++ library support
782543d802faSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
782643d802faSmrg        ;;
782743d802faSmrg    esac
7828d63fdb69Smrg
782943d802faSmrg    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
783043d802faSmrg    test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
78313da084b3Smrg
783243d802faSmrg    _LT_TAGVAR(GCC, $1)=$GXX
783343d802faSmrg    _LT_TAGVAR(LD, $1)=$LD
78343da084b3Smrg
783543d802faSmrg    ## CAVEAT EMPTOR:
783643d802faSmrg    ## There is no encapsulation within the following macros, do not change
783743d802faSmrg    ## the running order or otherwise move them around unless you know exactly
783843d802faSmrg    ## what you are doing...
783943d802faSmrg    _LT_SYS_HIDDEN_LIBDEPS($1)
784043d802faSmrg    _LT_COMPILER_PIC($1)
784143d802faSmrg    _LT_COMPILER_C_O($1)
784243d802faSmrg    _LT_COMPILER_FILE_LOCKS($1)
784343d802faSmrg    _LT_LINKER_SHLIBS($1)
784443d802faSmrg    _LT_SYS_DYNAMIC_LINKER($1)
784543d802faSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
7846d63fdb69Smrg
784743d802faSmrg    _LT_CONFIG($1)
784843d802faSmrg  fi # test -n "$compiler"
78493da084b3Smrg
785043d802faSmrg  CC=$lt_save_CC
785143d802faSmrg  CFLAGS=$lt_save_CFLAGS
785243d802faSmrg  LDCXX=$LD
785343d802faSmrg  LD=$lt_save_LD
785443d802faSmrg  GCC=$lt_save_GCC
785543d802faSmrg  with_gnu_ld=$lt_save_with_gnu_ld
785643d802faSmrg  lt_cv_path_LDCXX=$lt_cv_path_LD
785743d802faSmrg  lt_cv_path_LD=$lt_save_path_LD
785843d802faSmrg  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
785943d802faSmrg  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
786043d802faSmrgfi # test yes != "$_lt_caught_CXX_error"
78613da084b3Smrg
786243d802faSmrgAC_LANG_POP
786343d802faSmrg])# _LT_LANG_CXX_CONFIG
78643da084b3Smrg
78653da084b3Smrg
786643d802faSmrg# _LT_FUNC_STRIPNAME_CNF
786743d802faSmrg# ----------------------
786843d802faSmrg# func_stripname_cnf prefix suffix name
786943d802faSmrg# strip PREFIX and SUFFIX off of NAME.
787043d802faSmrg# PREFIX and SUFFIX must not contain globbing or regex special
787143d802faSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading
787243d802faSmrg# dot (in which case that matches only a dot).
787343d802faSmrg#
787443d802faSmrg# This function is identical to the (non-XSI) version of func_stripname,
787543d802faSmrg# except this one can be used by m4 code that may be executed by configure,
787643d802faSmrg# rather than the libtool script.
787743d802faSmrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
787843d802faSmrgAC_REQUIRE([_LT_DECL_SED])
787943d802faSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
788043d802faSmrgfunc_stripname_cnf ()
788143d802faSmrg{
788243d802faSmrg  case @S|@2 in
788343d802faSmrg  .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
788443d802faSmrg  *)  func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
788543d802faSmrg  esac
788643d802faSmrg} # func_stripname_cnf
788743d802faSmrg])# _LT_FUNC_STRIPNAME_CNF
78883da084b3Smrg
78893da084b3Smrg
789043d802faSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
789143d802faSmrg# ---------------------------------
789243d802faSmrg# Figure out "hidden" library dependencies from verbose
789343d802faSmrg# compiler output when linking a shared library.
789443d802faSmrg# Parse the compiler output and extract the necessary
789543d802faSmrg# objects, libraries and library flags.
789643d802faSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS],
789743d802faSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
789843d802faSmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
789943d802faSmrg# Dependencies to place before and after the object being linked:
790043d802faSmrg_LT_TAGVAR(predep_objects, $1)=
790143d802faSmrg_LT_TAGVAR(postdep_objects, $1)=
790243d802faSmrg_LT_TAGVAR(predeps, $1)=
790343d802faSmrg_LT_TAGVAR(postdeps, $1)=
790443d802faSmrg_LT_TAGVAR(compiler_lib_search_path, $1)=
790548c85eb7Smrg
790643d802faSmrgdnl we can't use the lt_simple_compile_test_code here,
790743d802faSmrgdnl because it contains code intended for an executable,
790843d802faSmrgdnl not a library.  It's possible we should let each
790943d802faSmrgdnl tag define a new lt_????_link_test_code variable,
791043d802faSmrgdnl but it's only used here...
791143d802faSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
791243d802faSmrgint a;
791343d802faSmrgvoid foo (void) { a = 0; }
791443d802faSmrg_LT_EOF
791543d802faSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
791643d802faSmrgclass Foo
791743d802faSmrg{
791843d802faSmrgpublic:
791943d802faSmrg  Foo (void) { a = 0; }
792043d802faSmrgprivate:
792143d802faSmrg  int a;
792243d802faSmrg};
792343d802faSmrg_LT_EOF
792443d802faSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
792543d802faSmrg      subroutine foo
792643d802faSmrg      implicit none
792743d802faSmrg      integer*4 a
792843d802faSmrg      a=0
792943d802faSmrg      return
793043d802faSmrg      end
793143d802faSmrg_LT_EOF
793243d802faSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
793343d802faSmrg      subroutine foo
793443d802faSmrg      implicit none
793543d802faSmrg      integer a
793643d802faSmrg      a=0
793743d802faSmrg      return
793843d802faSmrg      end
793943d802faSmrg_LT_EOF
794043d802faSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
794143d802faSmrgpublic class foo {
794243d802faSmrg  private int a;
794343d802faSmrg  public void bar (void) {
794443d802faSmrg    a = 0;
794543d802faSmrg  }
794643d802faSmrg};
794743d802faSmrg_LT_EOF
794843d802faSmrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
794943d802faSmrgpackage foo
795043d802faSmrgfunc foo() {
79512a53b785Smrg}
79522a53b785Smrg_LT_EOF
795343d802faSmrg])
79543da084b3Smrg
795543d802faSmrg_lt_libdeps_save_CFLAGS=$CFLAGS
795643d802faSmrgcase "$CC $CFLAGS " in #(
795743d802faSmrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
795843d802faSmrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
795943d802faSmrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
796043d802faSmrgesac
79613da084b3Smrg
796243d802faSmrgdnl Parse the compiler output and extract the necessary
796343d802faSmrgdnl objects, libraries and library flags.
796443d802faSmrgif AC_TRY_EVAL(ac_compile); then
796543d802faSmrg  # Parse the compiler output and extract the necessary
796643d802faSmrg  # objects, libraries and library flags.
79673da084b3Smrg
796843d802faSmrg  # Sentinel used to keep track of whether or not we are before
796943d802faSmrg  # the conftest object file.
797043d802faSmrg  pre_test_object_deps_done=no
79713da084b3Smrg
797243d802faSmrg  for p in `eval "$output_verbose_link_cmd"`; do
797343d802faSmrg    case $prev$p in
79743da084b3Smrg
797543d802faSmrg    -L* | -R* | -l*)
797643d802faSmrg       # Some compilers place space between "-{L,R}" and the path.
797743d802faSmrg       # Remove the space.
797843d802faSmrg       if test x-L = "$p" ||
797943d802faSmrg          test x-R = "$p"; then
798043d802faSmrg	 prev=$p
798143d802faSmrg	 continue
798243d802faSmrg       fi
79833da084b3Smrg
798443d802faSmrg       # Expand the sysroot to ease extracting the directories later.
798543d802faSmrg       if test -z "$prev"; then
798643d802faSmrg         case $p in
798743d802faSmrg         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
798843d802faSmrg         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
798943d802faSmrg         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
799043d802faSmrg         esac
799143d802faSmrg       fi
799243d802faSmrg       case $p in
799343d802faSmrg       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
799443d802faSmrg       esac
799543d802faSmrg       if test no = "$pre_test_object_deps_done"; then
799643d802faSmrg	 case $prev in
799743d802faSmrg	 -L | -R)
799843d802faSmrg	   # Internal compiler library paths should come after those
799943d802faSmrg	   # provided the user.  The postdeps already come after the
800043d802faSmrg	   # user supplied libs so there is no need to process them.
800143d802faSmrg	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
800243d802faSmrg	     _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
800343d802faSmrg	   else
800443d802faSmrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
800543d802faSmrg	   fi
800643d802faSmrg	   ;;
800743d802faSmrg	 # The "-l" case would never come before the object being
800843d802faSmrg	 # linked, so don't bother handling this case.
800943d802faSmrg	 esac
801043d802faSmrg       else
801143d802faSmrg	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
801243d802faSmrg	   _LT_TAGVAR(postdeps, $1)=$prev$p
801343d802faSmrg	 else
801443d802faSmrg	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
801543d802faSmrg	 fi
801643d802faSmrg       fi
801743d802faSmrg       prev=
801843d802faSmrg       ;;
80193da084b3Smrg
802043d802faSmrg    *.lto.$objext) ;; # Ignore GCC LTO objects
802143d802faSmrg    *.$objext)
802243d802faSmrg       # This assumes that the test object file only shows up
802343d802faSmrg       # once in the compiler output.
802443d802faSmrg       if test "$p" = "conftest.$objext"; then
802543d802faSmrg	 pre_test_object_deps_done=yes
802643d802faSmrg	 continue
802743d802faSmrg       fi
80283da084b3Smrg
802943d802faSmrg       if test no = "$pre_test_object_deps_done"; then
803043d802faSmrg	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
803143d802faSmrg	   _LT_TAGVAR(predep_objects, $1)=$p
803243d802faSmrg	 else
803343d802faSmrg	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
803443d802faSmrg	 fi
803543d802faSmrg       else
803643d802faSmrg	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
803743d802faSmrg	   _LT_TAGVAR(postdep_objects, $1)=$p
803843d802faSmrg	 else
803943d802faSmrg	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
804043d802faSmrg	 fi
804143d802faSmrg       fi
804243d802faSmrg       ;;
80432a53b785Smrg
804443d802faSmrg    *) ;; # Ignore the rest.
80453da084b3Smrg
804643d802faSmrg    esac
804743d802faSmrg  done
80483da084b3Smrg
804943d802faSmrg  # Clean up.
805043d802faSmrg  rm -f a.out a.exe
805143d802faSmrgelse
805243d802faSmrg  echo "libtool.m4: error: problem compiling $1 test program"
805343d802faSmrgfi
80543da084b3Smrg
805543d802faSmrg$RM -f confest.$objext
805643d802faSmrgCFLAGS=$_lt_libdeps_save_CFLAGS
80573da084b3Smrg
805843d802faSmrg# PORTME: override above test on systems where it is broken
805943d802faSmrgm4_if([$1], [CXX],
806043d802faSmrg[case $host_os in
806143d802faSmrginterix[[3-9]]*)
806243d802faSmrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
806343d802faSmrg  # hack all around it, let's just trust "g++" to DTRT.
806443d802faSmrg  _LT_TAGVAR(predep_objects,$1)=
806543d802faSmrg  _LT_TAGVAR(postdep_objects,$1)=
806643d802faSmrg  _LT_TAGVAR(postdeps,$1)=
806743d802faSmrg  ;;
806843d802faSmrgesac
806943d802faSmrg])
80702a53b785Smrg
807143d802faSmrgcase " $_LT_TAGVAR(postdeps, $1) " in
807243d802faSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
807343d802faSmrgesac
807443d802faSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=
807543d802faSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
807643d802faSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
807743d802faSmrgfi
807843d802faSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
807943d802faSmrg    [The directories searched by this compiler when creating a shared library])
808043d802faSmrg_LT_TAGDECL([], [predep_objects], [1],
808143d802faSmrg    [Dependencies to place before and after the objects being linked to
808243d802faSmrg    create a shared library])
808343d802faSmrg_LT_TAGDECL([], [postdep_objects], [1])
808443d802faSmrg_LT_TAGDECL([], [predeps], [1])
808543d802faSmrg_LT_TAGDECL([], [postdeps], [1])
808643d802faSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1],
808743d802faSmrg    [The library search path used internally by the compiler when linking
808843d802faSmrg    a shared library])
808943d802faSmrg])# _LT_SYS_HIDDEN_LIBDEPS
80903da084b3Smrg
80913da084b3Smrg
809243d802faSmrg# _LT_LANG_F77_CONFIG([TAG])
809343d802faSmrg# --------------------------
809443d802faSmrg# Ensure that the configuration variables for a Fortran 77 compiler are
809543d802faSmrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
809643d802faSmrg# to write the compiler configuration to 'libtool'.
809743d802faSmrgm4_defun([_LT_LANG_F77_CONFIG],
809843d802faSmrg[AC_LANG_PUSH(Fortran 77)
809943d802faSmrgif test -z "$F77" || test no = "$F77"; then
810043d802faSmrg  _lt_disable_F77=yes
810143d802faSmrgfi
81022a53b785Smrg
810343d802faSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
810443d802faSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
810543d802faSmrg_LT_TAGVAR(always_export_symbols, $1)=no
810643d802faSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
810743d802faSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
810843d802faSmrg_LT_TAGVAR(hardcode_direct, $1)=no
810943d802faSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
811043d802faSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
811143d802faSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
811243d802faSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
811343d802faSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
811443d802faSmrg_LT_TAGVAR(inherit_rpath, $1)=no
811543d802faSmrg_LT_TAGVAR(module_cmds, $1)=
811643d802faSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
811743d802faSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
811843d802faSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
811943d802faSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
812043d802faSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
812143d802faSmrg_LT_TAGVAR(no_undefined_flag, $1)=
812243d802faSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
812343d802faSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
812443d802faSmrg
812543d802faSmrg# Source file extension for f77 test sources.
812643d802faSmrgac_ext=f
812743d802faSmrg
812843d802faSmrg# Object file extension for compiled f77 test sources.
812943d802faSmrgobjext=o
813043d802faSmrg_LT_TAGVAR(objext, $1)=$objext
813143d802faSmrg
813243d802faSmrg# No sense in running all these tests if we already determined that
813343d802faSmrg# the F77 compiler isn't working.  Some variables (like enable_shared)
813443d802faSmrg# are currently assumed to apply to all compilers on this platform,
813543d802faSmrg# and will be corrupted by setting them based on a non-working compiler.
813643d802faSmrgif test yes != "$_lt_disable_F77"; then
813743d802faSmrg  # Code to be used in simple compile tests
813843d802faSmrg  lt_simple_compile_test_code="\
813943d802faSmrg      subroutine t
814043d802faSmrg      return
814143d802faSmrg      end
814243d802faSmrg"
814343d802faSmrg
814443d802faSmrg  # Code to be used in simple link tests
814543d802faSmrg  lt_simple_link_test_code="\
814643d802faSmrg      program t
814743d802faSmrg      end
814843d802faSmrg"
814943d802faSmrg
815043d802faSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
815143d802faSmrg  _LT_TAG_COMPILER
815243d802faSmrg
815343d802faSmrg  # save warnings/boilerplate of simple test code
815443d802faSmrg  _LT_COMPILER_BOILERPLATE
815543d802faSmrg  _LT_LINKER_BOILERPLATE
815643d802faSmrg
815743d802faSmrg  # Allow CC to be a program name with arguments.
815843d802faSmrg  lt_save_CC=$CC
815943d802faSmrg  lt_save_GCC=$GCC
816043d802faSmrg  lt_save_CFLAGS=$CFLAGS
816143d802faSmrg  CC=${F77-"f77"}
816243d802faSmrg  CFLAGS=$FFLAGS
816343d802faSmrg  compiler=$CC
816443d802faSmrg  _LT_TAGVAR(compiler, $1)=$CC
816543d802faSmrg  _LT_CC_BASENAME([$compiler])
816643d802faSmrg  GCC=$G77
816743d802faSmrg  if test -n "$compiler"; then
816843d802faSmrg    AC_MSG_CHECKING([if libtool supports shared libraries])
816943d802faSmrg    AC_MSG_RESULT([$can_build_shared])
817043d802faSmrg
817143d802faSmrg    AC_MSG_CHECKING([whether to build shared libraries])
817243d802faSmrg    test no = "$can_build_shared" && enable_shared=no
817343d802faSmrg
817443d802faSmrg    # On AIX, shared libraries and static libraries use the same namespace, and
817543d802faSmrg    # are all built from PIC.
817643d802faSmrg    case $host_os in
817743d802faSmrg      aix3*)
817843d802faSmrg        test yes = "$enable_shared" && enable_static=no
817943d802faSmrg        if test -n "$RANLIB"; then
818043d802faSmrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
818143d802faSmrg          postinstall_cmds='$RANLIB $lib'
818243d802faSmrg        fi
818343d802faSmrg        ;;
818443d802faSmrg      aix[[4-9]]*)
818543d802faSmrg	if test ia64 != "$host_cpu"; then
818643d802faSmrg	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
818743d802faSmrg	  yes,aix,yes) ;;		# shared object as lib.so file only
818843d802faSmrg	  yes,svr4,*) ;;		# shared object as lib.so archive member only
818943d802faSmrg	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
819043d802faSmrg	  esac
819143d802faSmrg	fi
819248c85eb7Smrg        ;;
819348c85eb7Smrg    esac
819443d802faSmrg    AC_MSG_RESULT([$enable_shared])
819543d802faSmrg
819643d802faSmrg    AC_MSG_CHECKING([whether to build static libraries])
819743d802faSmrg    # Make sure either enable_shared or enable_static is yes.
819843d802faSmrg    test yes = "$enable_shared" || enable_static=yes
819943d802faSmrg    AC_MSG_RESULT([$enable_static])
820043d802faSmrg
820143d802faSmrg    _LT_TAGVAR(GCC, $1)=$G77
820243d802faSmrg    _LT_TAGVAR(LD, $1)=$LD
820343d802faSmrg
820443d802faSmrg    ## CAVEAT EMPTOR:
820543d802faSmrg    ## There is no encapsulation within the following macros, do not change
820643d802faSmrg    ## the running order or otherwise move them around unless you know exactly
820743d802faSmrg    ## what you are doing...
820843d802faSmrg    _LT_COMPILER_PIC($1)
820943d802faSmrg    _LT_COMPILER_C_O($1)
821043d802faSmrg    _LT_COMPILER_FILE_LOCKS($1)
821143d802faSmrg    _LT_LINKER_SHLIBS($1)
821243d802faSmrg    _LT_SYS_DYNAMIC_LINKER($1)
821343d802faSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
821443d802faSmrg
821543d802faSmrg    _LT_CONFIG($1)
821643d802faSmrg  fi # test -n "$compiler"
821743d802faSmrg
821843d802faSmrg  GCC=$lt_save_GCC
821943d802faSmrg  CC=$lt_save_CC
822043d802faSmrg  CFLAGS=$lt_save_CFLAGS
822143d802faSmrgfi # test yes != "$_lt_disable_F77"
822243d802faSmrg
822343d802faSmrgAC_LANG_POP
822443d802faSmrg])# _LT_LANG_F77_CONFIG
822543d802faSmrg
822643d802faSmrg
822743d802faSmrg# _LT_LANG_FC_CONFIG([TAG])
822843d802faSmrg# -------------------------
822943d802faSmrg# Ensure that the configuration variables for a Fortran compiler are
823043d802faSmrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
823143d802faSmrg# to write the compiler configuration to 'libtool'.
823243d802faSmrgm4_defun([_LT_LANG_FC_CONFIG],
823343d802faSmrg[AC_LANG_PUSH(Fortran)
823443d802faSmrg
823543d802faSmrgif test -z "$FC" || test no = "$FC"; then
823643d802faSmrg  _lt_disable_FC=yes
823743d802faSmrgfi
823843d802faSmrg
823943d802faSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
824043d802faSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
824143d802faSmrg_LT_TAGVAR(always_export_symbols, $1)=no
824243d802faSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
824343d802faSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
824443d802faSmrg_LT_TAGVAR(hardcode_direct, $1)=no
824543d802faSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
824643d802faSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
824743d802faSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
824843d802faSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
824943d802faSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
825043d802faSmrg_LT_TAGVAR(inherit_rpath, $1)=no
825143d802faSmrg_LT_TAGVAR(module_cmds, $1)=
825243d802faSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
825343d802faSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
825443d802faSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
825543d802faSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
825643d802faSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
825743d802faSmrg_LT_TAGVAR(no_undefined_flag, $1)=
825843d802faSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
825943d802faSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
826043d802faSmrg
826143d802faSmrg# Source file extension for fc test sources.
826243d802faSmrgac_ext=${ac_fc_srcext-f}
826343d802faSmrg
826443d802faSmrg# Object file extension for compiled fc test sources.
826543d802faSmrgobjext=o
826643d802faSmrg_LT_TAGVAR(objext, $1)=$objext
826743d802faSmrg
826843d802faSmrg# No sense in running all these tests if we already determined that
826943d802faSmrg# the FC compiler isn't working.  Some variables (like enable_shared)
827043d802faSmrg# are currently assumed to apply to all compilers on this platform,
827143d802faSmrg# and will be corrupted by setting them based on a non-working compiler.
827243d802faSmrgif test yes != "$_lt_disable_FC"; then
827343d802faSmrg  # Code to be used in simple compile tests
827443d802faSmrg  lt_simple_compile_test_code="\
827543d802faSmrg      subroutine t
827643d802faSmrg      return
827743d802faSmrg      end
827843d802faSmrg"
827948c85eb7Smrg
828043d802faSmrg  # Code to be used in simple link tests
828143d802faSmrg  lt_simple_link_test_code="\
828243d802faSmrg      program t
828343d802faSmrg      end
828443d802faSmrg"
82852a53b785Smrg
828643d802faSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
828743d802faSmrg  _LT_TAG_COMPILER
828843d802faSmrg
828943d802faSmrg  # save warnings/boilerplate of simple test code
829043d802faSmrg  _LT_COMPILER_BOILERPLATE
829143d802faSmrg  _LT_LINKER_BOILERPLATE
829243d802faSmrg
829343d802faSmrg  # Allow CC to be a program name with arguments.
829443d802faSmrg  lt_save_CC=$CC
829543d802faSmrg  lt_save_GCC=$GCC
829643d802faSmrg  lt_save_CFLAGS=$CFLAGS
829743d802faSmrg  CC=${FC-"f95"}
829843d802faSmrg  CFLAGS=$FCFLAGS
829943d802faSmrg  compiler=$CC
830043d802faSmrg  GCC=$ac_cv_fc_compiler_gnu
830143d802faSmrg
830243d802faSmrg  _LT_TAGVAR(compiler, $1)=$CC
830343d802faSmrg  _LT_CC_BASENAME([$compiler])
830443d802faSmrg
830543d802faSmrg  if test -n "$compiler"; then
830643d802faSmrg    AC_MSG_CHECKING([if libtool supports shared libraries])
830743d802faSmrg    AC_MSG_RESULT([$can_build_shared])
830843d802faSmrg
830943d802faSmrg    AC_MSG_CHECKING([whether to build shared libraries])
831043d802faSmrg    test no = "$can_build_shared" && enable_shared=no
831143d802faSmrg
831243d802faSmrg    # On AIX, shared libraries and static libraries use the same namespace, and
831343d802faSmrg    # are all built from PIC.
831443d802faSmrg    case $host_os in
831543d802faSmrg      aix3*)
831643d802faSmrg        test yes = "$enable_shared" && enable_static=no
831743d802faSmrg        if test -n "$RANLIB"; then
831843d802faSmrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
831943d802faSmrg          postinstall_cmds='$RANLIB $lib'
832043d802faSmrg        fi
832148c85eb7Smrg        ;;
832243d802faSmrg      aix[[4-9]]*)
832343d802faSmrg	if test ia64 != "$host_cpu"; then
832443d802faSmrg	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
832543d802faSmrg	  yes,aix,yes) ;;		# shared object as lib.so file only
832643d802faSmrg	  yes,svr4,*) ;;		# shared object as lib.so archive member only
832743d802faSmrg	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
832843d802faSmrg	  esac
832943d802faSmrg	fi
83302a53b785Smrg        ;;
833143d802faSmrg    esac
833243d802faSmrg    AC_MSG_RESULT([$enable_shared])
8333d63fdb69Smrg
833443d802faSmrg    AC_MSG_CHECKING([whether to build static libraries])
833543d802faSmrg    # Make sure either enable_shared or enable_static is yes.
833643d802faSmrg    test yes = "$enable_shared" || enable_static=yes
833743d802faSmrg    AC_MSG_RESULT([$enable_static])
8338d63fdb69Smrg
833943d802faSmrg    _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
834043d802faSmrg    _LT_TAGVAR(LD, $1)=$LD
8341d63fdb69Smrg
834243d802faSmrg    ## CAVEAT EMPTOR:
834343d802faSmrg    ## There is no encapsulation within the following macros, do not change
834443d802faSmrg    ## the running order or otherwise move them around unless you know exactly
834543d802faSmrg    ## what you are doing...
834643d802faSmrg    _LT_SYS_HIDDEN_LIBDEPS($1)
834743d802faSmrg    _LT_COMPILER_PIC($1)
834843d802faSmrg    _LT_COMPILER_C_O($1)
834943d802faSmrg    _LT_COMPILER_FILE_LOCKS($1)
835043d802faSmrg    _LT_LINKER_SHLIBS($1)
835143d802faSmrg    _LT_SYS_DYNAMIC_LINKER($1)
835243d802faSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
8353d63fdb69Smrg
835443d802faSmrg    _LT_CONFIG($1)
835543d802faSmrg  fi # test -n "$compiler"
8356d63fdb69Smrg
835743d802faSmrg  GCC=$lt_save_GCC
835843d802faSmrg  CC=$lt_save_CC
835943d802faSmrg  CFLAGS=$lt_save_CFLAGS
836043d802faSmrgfi # test yes != "$_lt_disable_FC"
8361d63fdb69Smrg
836243d802faSmrgAC_LANG_POP
836343d802faSmrg])# _LT_LANG_FC_CONFIG
8364d63fdb69Smrg
8365d63fdb69Smrg
836643d802faSmrg# _LT_LANG_GCJ_CONFIG([TAG])
836743d802faSmrg# --------------------------
836843d802faSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler
836943d802faSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
837043d802faSmrg# to write the compiler configuration to 'libtool'.
837143d802faSmrgm4_defun([_LT_LANG_GCJ_CONFIG],
837243d802faSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl
837343d802faSmrgAC_LANG_SAVE
8374d63fdb69Smrg
837543d802faSmrg# Source file extension for Java test sources.
837643d802faSmrgac_ext=java
8377d63fdb69Smrg
837843d802faSmrg# Object file extension for compiled Java test sources.
837943d802faSmrgobjext=o
838043d802faSmrg_LT_TAGVAR(objext, $1)=$objext
8381d63fdb69Smrg
838243d802faSmrg# Code to be used in simple compile tests
838343d802faSmrglt_simple_compile_test_code="class foo {}"
8384d63fdb69Smrg
838543d802faSmrg# Code to be used in simple link tests
838643d802faSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
8387d63fdb69Smrg
838843d802faSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
838943d802faSmrg_LT_TAG_COMPILER
8390d63fdb69Smrg
839143d802faSmrg# save warnings/boilerplate of simple test code
839243d802faSmrg_LT_COMPILER_BOILERPLATE
839343d802faSmrg_LT_LINKER_BOILERPLATE
839443d802faSmrg
839543d802faSmrg# Allow CC to be a program name with arguments.
839643d802faSmrglt_save_CC=$CC
839743d802faSmrglt_save_CFLAGS=$CFLAGS
839843d802faSmrglt_save_GCC=$GCC
839943d802faSmrgGCC=yes
840043d802faSmrgCC=${GCJ-"gcj"}
840143d802faSmrgCFLAGS=$GCJFLAGS
840243d802faSmrgcompiler=$CC
840343d802faSmrg_LT_TAGVAR(compiler, $1)=$CC
840443d802faSmrg_LT_TAGVAR(LD, $1)=$LD
840543d802faSmrg_LT_CC_BASENAME([$compiler])
840643d802faSmrg
840743d802faSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
840843d802faSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
840943d802faSmrg
841043d802faSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
841143d802faSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
841243d802faSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8413d63fdb69Smrg
841443d802faSmrgif test -n "$compiler"; then
841543d802faSmrg  _LT_COMPILER_NO_RTTI($1)
841643d802faSmrg  _LT_COMPILER_PIC($1)
841743d802faSmrg  _LT_COMPILER_C_O($1)
841843d802faSmrg  _LT_COMPILER_FILE_LOCKS($1)
841943d802faSmrg  _LT_LINKER_SHLIBS($1)
842043d802faSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
8421d63fdb69Smrg
842243d802faSmrg  _LT_CONFIG($1)
842343d802faSmrgfi
8424d63fdb69Smrg
842543d802faSmrgAC_LANG_RESTORE
8426d63fdb69Smrg
842743d802faSmrgGCC=$lt_save_GCC
842843d802faSmrgCC=$lt_save_CC
842943d802faSmrgCFLAGS=$lt_save_CFLAGS
843043d802faSmrg])# _LT_LANG_GCJ_CONFIG
8431d63fdb69Smrg
8432d63fdb69Smrg
843343d802faSmrg# _LT_LANG_GO_CONFIG([TAG])
843443d802faSmrg# --------------------------
843543d802faSmrg# Ensure that the configuration variables for the GNU Go compiler
843643d802faSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
843743d802faSmrg# to write the compiler configuration to 'libtool'.
843843d802faSmrgm4_defun([_LT_LANG_GO_CONFIG],
843943d802faSmrg[AC_REQUIRE([LT_PROG_GO])dnl
844043d802faSmrgAC_LANG_SAVE
8441d63fdb69Smrg
844243d802faSmrg# Source file extension for Go test sources.
844343d802faSmrgac_ext=go
8444d63fdb69Smrg
844543d802faSmrg# Object file extension for compiled Go test sources.
844643d802faSmrgobjext=o
844743d802faSmrg_LT_TAGVAR(objext, $1)=$objext
8448d63fdb69Smrg
844943d802faSmrg# Code to be used in simple compile tests
845043d802faSmrglt_simple_compile_test_code="package main; func main() { }"
8451d63fdb69Smrg
845243d802faSmrg# Code to be used in simple link tests
845343d802faSmrglt_simple_link_test_code='package main; func main() { }'
8454d63fdb69Smrg
845543d802faSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
845643d802faSmrg_LT_TAG_COMPILER
8457d63fdb69Smrg
845843d802faSmrg# save warnings/boilerplate of simple test code
845943d802faSmrg_LT_COMPILER_BOILERPLATE
846043d802faSmrg_LT_LINKER_BOILERPLATE
8461d63fdb69Smrg
846243d802faSmrg# Allow CC to be a program name with arguments.
846343d802faSmrglt_save_CC=$CC
846443d802faSmrglt_save_CFLAGS=$CFLAGS
846543d802faSmrglt_save_GCC=$GCC
846643d802faSmrgGCC=yes
846743d802faSmrgCC=${GOC-"gccgo"}
846843d802faSmrgCFLAGS=$GOFLAGS
846943d802faSmrgcompiler=$CC
847043d802faSmrg_LT_TAGVAR(compiler, $1)=$CC
847143d802faSmrg_LT_TAGVAR(LD, $1)=$LD
847243d802faSmrg_LT_CC_BASENAME([$compiler])
8473d63fdb69Smrg
847443d802faSmrg# Go did not exist at the time GCC didn't implicitly link libc in.
847543d802faSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8476d63fdb69Smrg
847743d802faSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
847843d802faSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
847943d802faSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8480d63fdb69Smrg
848143d802faSmrgif test -n "$compiler"; then
848243d802faSmrg  _LT_COMPILER_NO_RTTI($1)
848343d802faSmrg  _LT_COMPILER_PIC($1)
848443d802faSmrg  _LT_COMPILER_C_O($1)
848543d802faSmrg  _LT_COMPILER_FILE_LOCKS($1)
848643d802faSmrg  _LT_LINKER_SHLIBS($1)
848743d802faSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
8488d63fdb69Smrg
848943d802faSmrg  _LT_CONFIG($1)
849043d802faSmrgfi
8491d63fdb69Smrg
849243d802faSmrgAC_LANG_RESTORE
8493d63fdb69Smrg
849443d802faSmrgGCC=$lt_save_GCC
849543d802faSmrgCC=$lt_save_CC
849643d802faSmrgCFLAGS=$lt_save_CFLAGS
849743d802faSmrg])# _LT_LANG_GO_CONFIG
849848c85eb7Smrg
849948c85eb7Smrg
850043d802faSmrg# _LT_LANG_RC_CONFIG([TAG])
850143d802faSmrg# -------------------------
850243d802faSmrg# Ensure that the configuration variables for the Windows resource compiler
850343d802faSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
850443d802faSmrg# to write the compiler configuration to 'libtool'.
850543d802faSmrgm4_defun([_LT_LANG_RC_CONFIG],
850643d802faSmrg[AC_REQUIRE([LT_PROG_RC])dnl
850743d802faSmrgAC_LANG_SAVE
850848c85eb7Smrg
850943d802faSmrg# Source file extension for RC test sources.
851043d802faSmrgac_ext=rc
8511d63fdb69Smrg
851243d802faSmrg# Object file extension for compiled RC test sources.
851343d802faSmrgobjext=o
851443d802faSmrg_LT_TAGVAR(objext, $1)=$objext
851548c85eb7Smrg
851643d802faSmrg# Code to be used in simple compile tests
851743d802faSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
851848c85eb7Smrg
851943d802faSmrg# Code to be used in simple link tests
852043d802faSmrglt_simple_link_test_code=$lt_simple_compile_test_code
8521d63fdb69Smrg
852243d802faSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
852343d802faSmrg_LT_TAG_COMPILER
8524d63fdb69Smrg
852543d802faSmrg# save warnings/boilerplate of simple test code
852643d802faSmrg_LT_COMPILER_BOILERPLATE
852743d802faSmrg_LT_LINKER_BOILERPLATE
8528d63fdb69Smrg
852943d802faSmrg# Allow CC to be a program name with arguments.
853043d802faSmrglt_save_CC=$CC
853143d802faSmrglt_save_CFLAGS=$CFLAGS
853243d802faSmrglt_save_GCC=$GCC
853343d802faSmrgGCC=
853443d802faSmrgCC=${RC-"windres"}
853543d802faSmrgCFLAGS=
853643d802faSmrgcompiler=$CC
853743d802faSmrg_LT_TAGVAR(compiler, $1)=$CC
853843d802faSmrg_LT_CC_BASENAME([$compiler])
853943d802faSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8540d63fdb69Smrg
854143d802faSmrgif test -n "$compiler"; then
854243d802faSmrg  :
854343d802faSmrg  _LT_CONFIG($1)
854443d802faSmrgfi
854543d802faSmrg
854643d802faSmrgGCC=$lt_save_GCC
854743d802faSmrgAC_LANG_RESTORE
854843d802faSmrgCC=$lt_save_CC
854943d802faSmrgCFLAGS=$lt_save_CFLAGS
855043d802faSmrg])# _LT_LANG_RC_CONFIG
855143d802faSmrg
855243d802faSmrg
855343d802faSmrg# LT_PROG_GCJ
855443d802faSmrg# -----------
855543d802faSmrgAC_DEFUN([LT_PROG_GCJ],
855643d802faSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
855743d802faSmrg  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
855843d802faSmrg    [AC_CHECK_TOOL(GCJ, gcj,)
855943d802faSmrg      test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
856043d802faSmrg      AC_SUBST(GCJFLAGS)])])[]dnl
856143d802faSmrg])
8562d63fdb69Smrg
856343d802faSmrg# Old name:
856443d802faSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
856543d802faSmrgdnl aclocal-1.4 backwards compatibility:
856643d802faSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8567d63fdb69Smrg
8568d63fdb69Smrg
856943d802faSmrg# LT_PROG_GO
857043d802faSmrg# ----------
857143d802faSmrgAC_DEFUN([LT_PROG_GO],
857243d802faSmrg[AC_CHECK_TOOL(GOC, gccgo,)
857343d802faSmrg])
8574d63fdb69Smrg
8575d63fdb69Smrg
857643d802faSmrg# LT_PROG_RC
857743d802faSmrg# ----------
857843d802faSmrgAC_DEFUN([LT_PROG_RC],
857943d802faSmrg[AC_CHECK_TOOL(RC, windres,)
858043d802faSmrg])
85812a53b785Smrg
858243d802faSmrg# Old name:
858343d802faSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
858443d802faSmrgdnl aclocal-1.4 backwards compatibility:
858543d802faSmrgdnl AC_DEFUN([LT_AC_PROG_RC], [])
8586d63fdb69Smrg
8587d63fdb69Smrg
858843d802faSmrg# _LT_DECL_EGREP
858943d802faSmrg# --------------
859043d802faSmrg# If we don't have a new enough Autoconf to choose the best grep
859143d802faSmrg# available, choose the one first in the user's PATH.
859243d802faSmrgm4_defun([_LT_DECL_EGREP],
859343d802faSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl
859443d802faSmrgAC_REQUIRE([AC_PROG_FGREP])dnl
859543d802faSmrgtest -z "$GREP" && GREP=grep
859643d802faSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
859743d802faSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher])
859843d802faSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher])
859943d802faSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
860043d802faSmrgAC_SUBST([GREP])
860143d802faSmrg])
8602d63fdb69Smrg
8603d63fdb69Smrg
860443d802faSmrg# _LT_DECL_OBJDUMP
860543d802faSmrg# --------------
860643d802faSmrg# If we don't have a new enough Autoconf to choose the best objdump
860743d802faSmrg# available, choose the one first in the user's PATH.
860843d802faSmrgm4_defun([_LT_DECL_OBJDUMP],
860943d802faSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false)
861043d802faSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump
861143d802faSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
861243d802faSmrgAC_SUBST([OBJDUMP])
861343d802faSmrg])
8614d63fdb69Smrg
861543d802faSmrg# _LT_DECL_DLLTOOL
861643d802faSmrg# ----------------
861743d802faSmrg# Ensure DLLTOOL variable is set.
861843d802faSmrgm4_defun([_LT_DECL_DLLTOOL],
861943d802faSmrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
862043d802faSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
862143d802faSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
862243d802faSmrgAC_SUBST([DLLTOOL])
862343d802faSmrg])
8624d63fdb69Smrg
862543d802faSmrg# _LT_DECL_FILECMD
862643d802faSmrg# ----------------
862743d802faSmrg# Check for a file(cmd) program that can be used to detect file type and magic
862843d802faSmrgm4_defun([_LT_DECL_FILECMD],
862943d802faSmrg[AC_CHECK_TOOL([FILECMD], [file], [:])
863043d802faSmrg_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types])
863143d802faSmrg])# _LD_DECL_FILECMD
863243d802faSmrg
863343d802faSmrg# _LT_DECL_SED
863443d802faSmrg# ------------
863543d802faSmrg# Check for a fully-functional sed program, that truncates
863643d802faSmrg# as few characters as possible.  Prefer GNU sed if found.
863743d802faSmrgm4_defun([_LT_DECL_SED],
863843d802faSmrg[AC_PROG_SED
863943d802faSmrgtest -z "$SED" && SED=sed
864043d802faSmrgXsed="$SED -e 1s/^X//"
864143d802faSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
864243d802faSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
864343d802faSmrg    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
864443d802faSmrg])# _LT_DECL_SED
864543d802faSmrg
864643d802faSmrgm4_ifndef([AC_PROG_SED], [
864743d802faSmrg# NOTE: This macro has been submitted for inclusion into   #
864843d802faSmrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
864943d802faSmrg#  a released version of Autoconf we should remove this    #
865043d802faSmrg#  macro and use it instead.                               #
865143d802faSmrg
865243d802faSmrgm4_defun([AC_PROG_SED],
865343d802faSmrg[AC_MSG_CHECKING([for a sed that does not truncate output])
865443d802faSmrgAC_CACHE_VAL(lt_cv_path_SED,
865543d802faSmrg[# Loop through the user's path and test for sed and gsed.
865643d802faSmrg# Then use that list of sed's as ones to test for truncation.
865743d802faSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
865843d802faSmrgfor as_dir in $PATH
865943d802faSmrgdo
866043d802faSmrg  IFS=$as_save_IFS
866143d802faSmrg  test -z "$as_dir" && as_dir=.
866243d802faSmrg  for lt_ac_prog in sed gsed; do
866343d802faSmrg    for ac_exec_ext in '' $ac_executable_extensions; do
866443d802faSmrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
866543d802faSmrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
86662a53b785Smrg      fi
866743d802faSmrg    done
866843d802faSmrg  done
866943d802faSmrgdone
867043d802faSmrgIFS=$as_save_IFS
867143d802faSmrglt_ac_max=0
867243d802faSmrglt_ac_count=0
867343d802faSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
867443d802faSmrg# along with /bin/sed that truncates output.
867543d802faSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
867643d802faSmrg  test ! -f "$lt_ac_sed" && continue
867743d802faSmrg  cat /dev/null > conftest.in
867843d802faSmrg  lt_ac_count=0
867943d802faSmrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
868043d802faSmrg  # Check for GNU sed and select it if it is found.
868143d802faSmrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
868243d802faSmrg    lt_cv_path_SED=$lt_ac_sed
868343d802faSmrg    break
868443d802faSmrg  fi
868543d802faSmrg  while true; do
868643d802faSmrg    cat conftest.in conftest.in >conftest.tmp
868743d802faSmrg    mv conftest.tmp conftest.in
868843d802faSmrg    cp conftest.in conftest.nl
868943d802faSmrg    echo >>conftest.nl
869043d802faSmrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
869143d802faSmrg    cmp -s conftest.out conftest.nl || break
869243d802faSmrg    # 10000 chars as input seems more than enough
869343d802faSmrg    test 10 -lt "$lt_ac_count" && break
869443d802faSmrg    lt_ac_count=`expr $lt_ac_count + 1`
869543d802faSmrg    if test "$lt_ac_count" -gt "$lt_ac_max"; then
869643d802faSmrg      lt_ac_max=$lt_ac_count
869743d802faSmrg      lt_cv_path_SED=$lt_ac_sed
869843d802faSmrg    fi
869943d802faSmrg  done
870043d802faSmrgdone
870143d802faSmrg])
870243d802faSmrgSED=$lt_cv_path_SED
870343d802faSmrgAC_SUBST([SED])
870443d802faSmrgAC_MSG_RESULT([$SED])
870543d802faSmrg])#AC_PROG_SED
870643d802faSmrg])#m4_ifndef
870748c85eb7Smrg
870843d802faSmrg# Old name:
870943d802faSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
871043d802faSmrgdnl aclocal-1.4 backwards compatibility:
871143d802faSmrgdnl AC_DEFUN([LT_AC_PROG_SED], [])
871248c85eb7Smrg
8713d63fdb69Smrg
871443d802faSmrg# _LT_CHECK_SHELL_FEATURES
871543d802faSmrg# ------------------------
871643d802faSmrg# Find out whether the shell is Bourne or XSI compatible,
871743d802faSmrg# or has some other useful features.
871843d802faSmrgm4_defun([_LT_CHECK_SHELL_FEATURES],
871943d802faSmrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
872043d802faSmrg  lt_unset=unset
872143d802faSmrgelse
872243d802faSmrg  lt_unset=false
872343d802faSmrgfi
872443d802faSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
87252a53b785Smrg
872643d802faSmrg# test EBCDIC or ASCII
872743d802faSmrgcase `echo X|tr X '\101'` in
872843d802faSmrg A) # ASCII based system
872943d802faSmrg    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
873043d802faSmrg  lt_SP2NL='tr \040 \012'
873143d802faSmrg  lt_NL2SP='tr \015\012 \040\040'
873243d802faSmrg  ;;
873343d802faSmrg *) # EBCDIC based system
873443d802faSmrg  lt_SP2NL='tr \100 \n'
873543d802faSmrg  lt_NL2SP='tr \r\n \100\100'
873643d802faSmrg  ;;
873743d802faSmrgesac
873843d802faSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
873943d802faSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
874043d802faSmrg])# _LT_CHECK_SHELL_FEATURES
874152fd71cdSmrg
8742d63fdb69Smrg
874343d802faSmrg# _LT_PATH_CONVERSION_FUNCTIONS
874443d802faSmrg# -----------------------------
874543d802faSmrg# Determine what file name conversion functions should be used by
874643d802faSmrg# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
874743d802faSmrg# for certain cross-compile configurations and native mingw.
874843d802faSmrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
874943d802faSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
875043d802faSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
875143d802faSmrgAC_MSG_CHECKING([how to convert $build file names to $host format])
875243d802faSmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd,
875343d802faSmrg[case $host in
875443d802faSmrg  *-*-mingw* )
875543d802faSmrg    case $build in
875643d802faSmrg      *-*-mingw* ) # actually msys
875743d802faSmrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
875843d802faSmrg        ;;
875943d802faSmrg      *-*-cygwin* )
876043d802faSmrg        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
876143d802faSmrg        ;;
876243d802faSmrg      * ) # otherwise, assume *nix
876343d802faSmrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
876443d802faSmrg        ;;
876543d802faSmrg    esac
876643d802faSmrg    ;;
876743d802faSmrg  *-*-cygwin* )
876843d802faSmrg    case $build in
876943d802faSmrg      *-*-mingw* ) # actually msys
877043d802faSmrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
877143d802faSmrg        ;;
877243d802faSmrg      *-*-cygwin* )
877343d802faSmrg        lt_cv_to_host_file_cmd=func_convert_file_noop
877443d802faSmrg        ;;
877543d802faSmrg      * ) # otherwise, assume *nix
877643d802faSmrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
877743d802faSmrg        ;;
877843d802faSmrg    esac
877943d802faSmrg    ;;
878043d802faSmrg  * ) # unhandled hosts (and "normal" native builds)
878143d802faSmrg    lt_cv_to_host_file_cmd=func_convert_file_noop
878243d802faSmrg    ;;
878343d802faSmrgesac
878443d802faSmrg])
878543d802faSmrgto_host_file_cmd=$lt_cv_to_host_file_cmd
878643d802faSmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd])
878743d802faSmrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
878843d802faSmrg         [0], [convert $build file names to $host format])dnl
8789d63fdb69Smrg
879043d802faSmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format])
879143d802faSmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd,
879243d802faSmrg[#assume ordinary cross tools, or native build.
879343d802faSmrglt_cv_to_tool_file_cmd=func_convert_file_noop
879443d802faSmrgcase $host in
879543d802faSmrg  *-*-mingw* )
879643d802faSmrg    case $build in
879743d802faSmrg      *-*-mingw* ) # actually msys
879843d802faSmrg        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
879943d802faSmrg        ;;
880043d802faSmrg    esac
880143d802faSmrg    ;;
880243d802faSmrgesac
880343d802faSmrg])
880443d802faSmrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd
880543d802faSmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
880643d802faSmrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
880743d802faSmrg         [0], [convert $build files to toolchain format])dnl
880843d802faSmrg])# _LT_PATH_CONVERSION_FUNCTIONS
8809d63fdb69Smrg
881043d802faSmrg# Helper functions for option handling.                    -*- Autoconf -*-
881143d802faSmrg#
881243d802faSmrg#   Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free
881343d802faSmrg#   Software Foundation, Inc.
881443d802faSmrg#   Written by Gary V. Vaughan, 2004
881543d802faSmrg#
881643d802faSmrg# This file is free software; the Free Software Foundation gives
881743d802faSmrg# unlimited permission to copy and/or distribute it, with or without
881843d802faSmrg# modifications, as long as this notice is preserved.
8819d63fdb69Smrg
882043d802faSmrg# serial 8 ltoptions.m4
8821d63fdb69Smrg
882243d802faSmrg# This is to help aclocal find these macros, as it can't see m4_define.
882343d802faSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
8824d63fdb69Smrg
8825d63fdb69Smrg
882643d802faSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
882743d802faSmrg# ------------------------------------------
882843d802faSmrgm4_define([_LT_MANGLE_OPTION],
882943d802faSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
8830d63fdb69Smrg
8831d63fdb69Smrg
883243d802faSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
883343d802faSmrg# ---------------------------------------
883443d802faSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
883543d802faSmrg# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
883643d802faSmrg# saved as a flag.
883743d802faSmrgm4_define([_LT_SET_OPTION],
883843d802faSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
883943d802faSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
884043d802faSmrg        _LT_MANGLE_DEFUN([$1], [$2]),
884143d802faSmrg    [m4_warning([Unknown $1 option '$2'])])[]dnl
884243d802faSmrg])
88432a53b785Smrg
8844d63fdb69Smrg
884543d802faSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
884643d802faSmrg# ------------------------------------------------------------
884743d802faSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
884843d802faSmrgm4_define([_LT_IF_OPTION],
884943d802faSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
885043d802faSmrg
885143d802faSmrg
885243d802faSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
885343d802faSmrg# -------------------------------------------------------
885443d802faSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
885543d802faSmrg# are set.
885643d802faSmrgm4_define([_LT_UNLESS_OPTIONS],
885743d802faSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
885843d802faSmrg	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
885943d802faSmrg		      [m4_define([$0_found])])])[]dnl
886043d802faSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
886143d802faSmrg])[]dnl
886243d802faSmrg])
886343d802faSmrg
8864d63fdb69Smrg
886543d802faSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
886643d802faSmrg# ----------------------------------------
886743d802faSmrg# OPTION-LIST is a space-separated list of Libtool options associated
886843d802faSmrg# with MACRO-NAME.  If any OPTION has a matching handler declared with
886943d802faSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
887043d802faSmrg# the unknown option and exit.
887143d802faSmrgm4_defun([_LT_SET_OPTIONS],
887243d802faSmrg[# Set options
887343d802faSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
887443d802faSmrg    [_LT_SET_OPTION([$1], _LT_Option)])
8875d63fdb69Smrg
887643d802faSmrgm4_if([$1],[LT_INIT],[
887743d802faSmrg  dnl
887843d802faSmrg  dnl Simply set some default values (i.e off) if boolean options were not
887943d802faSmrg  dnl specified:
888043d802faSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
888143d802faSmrg  ])
888243d802faSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
888343d802faSmrg  ])
888443d802faSmrg  dnl
888543d802faSmrg  dnl If no reference was made to various pairs of opposing options, then
888643d802faSmrg  dnl we run the default mode handler for the pair.  For example, if neither
888743d802faSmrg  dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
888843d802faSmrg  dnl archives by default:
888943d802faSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
889043d802faSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
889143d802faSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
889243d802faSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
889343d802faSmrg		   [_LT_ENABLE_FAST_INSTALL])
889443d802faSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
889543d802faSmrg		   [_LT_WITH_AIX_SONAME([aix])])
889643d802faSmrg  ])
889743d802faSmrg])# _LT_SET_OPTIONS
889855acc8fcSmrg
889955acc8fcSmrg
890055acc8fcSmrg
890143d802faSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
890243d802faSmrg# -----------------------------------------
890343d802faSmrgm4_define([_LT_MANGLE_DEFUN],
890443d802faSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
890555acc8fcSmrg
890655acc8fcSmrg
890743d802faSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
890843d802faSmrg# -----------------------------------------------
890943d802faSmrgm4_define([LT_OPTION_DEFINE],
891043d802faSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
891143d802faSmrg])# LT_OPTION_DEFINE
891255acc8fcSmrg
891355acc8fcSmrg
891443d802faSmrg# dlopen
891543d802faSmrg# ------
891643d802faSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
891743d802faSmrg])
891855acc8fcSmrg
891943d802faSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN],
892043d802faSmrg[_LT_SET_OPTION([LT_INIT], [dlopen])
892143d802faSmrgAC_DIAGNOSE([obsolete],
892243d802faSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
892343d802faSmrgput the 'dlopen' option into LT_INIT's first parameter.])
892443d802faSmrg])
892555acc8fcSmrg
892643d802faSmrgdnl aclocal-1.4 backwards compatibility:
892743d802faSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
8928d63fdb69Smrg
8929d63fdb69Smrg
893043d802faSmrg# win32-dll
893143d802faSmrg# ---------
893243d802faSmrg# Declare package support for building win32 dll's.
893343d802faSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll],
893443d802faSmrg[enable_win32_dll=yes
893543d802faSmrg
893643d802faSmrgcase $host in
893743d802faSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
893843d802faSmrg  AC_CHECK_TOOL(AS, as, false)
893943d802faSmrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
894043d802faSmrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
894143d802faSmrg  ;;
894243d802faSmrgesac
894343d802faSmrg
894443d802faSmrgtest -z "$AS" && AS=as
894543d802faSmrg_LT_DECL([], [AS],      [1], [Assembler program])dnl
894643d802faSmrg
894743d802faSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
894843d802faSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
894943d802faSmrg
895043d802faSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump
895143d802faSmrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
895243d802faSmrg])# win32-dll
895343d802faSmrg
895443d802faSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL],
895543d802faSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
895643d802faSmrg_LT_SET_OPTION([LT_INIT], [win32-dll])
895743d802faSmrgAC_DIAGNOSE([obsolete],
895843d802faSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
895943d802faSmrgput the 'win32-dll' option into LT_INIT's first parameter.])
896043d802faSmrg])
8961d63fdb69Smrg
896243d802faSmrgdnl aclocal-1.4 backwards compatibility:
896343d802faSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
8964d63fdb69Smrg
8965d63fdb69Smrg
896643d802faSmrg# _LT_ENABLE_SHARED([DEFAULT])
896743d802faSmrg# ----------------------------
896843d802faSmrg# implement the --enable-shared flag, and supports the 'shared' and
896943d802faSmrg# 'disable-shared' LT_INIT options.
897043d802faSmrg# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
897143d802faSmrgm4_define([_LT_ENABLE_SHARED],
897243d802faSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
897343d802faSmrgAC_ARG_ENABLE([shared],
897443d802faSmrg    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
897543d802faSmrg	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
897643d802faSmrg    [p=${PACKAGE-default}
897743d802faSmrg    case $enableval in
897843d802faSmrg    yes) enable_shared=yes ;;
897943d802faSmrg    no) enable_shared=no ;;
898043d802faSmrg    *)
898143d802faSmrg      enable_shared=no
898243d802faSmrg      # Look at the argument we got.  We use all the common list separators.
898343d802faSmrg      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
898443d802faSmrg      for pkg in $enableval; do
898543d802faSmrg	IFS=$lt_save_ifs
898643d802faSmrg	if test "X$pkg" = "X$p"; then
898743d802faSmrg	  enable_shared=yes
89882a53b785Smrg	fi
898943d802faSmrg      done
899043d802faSmrg      IFS=$lt_save_ifs
89912a53b785Smrg      ;;
899243d802faSmrg    esac],
899343d802faSmrg    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
8994d63fdb69Smrg
899543d802faSmrg    _LT_DECL([build_libtool_libs], [enable_shared], [0],
899643d802faSmrg	[Whether or not to build shared libraries])
899743d802faSmrg])# _LT_ENABLE_SHARED
89983da084b3Smrg
899943d802faSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
900043d802faSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
9001d63fdb69Smrg
900243d802faSmrg# Old names:
900343d802faSmrgAC_DEFUN([AC_ENABLE_SHARED],
900443d802faSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
900543d802faSmrg])
90063da084b3Smrg
900743d802faSmrgAC_DEFUN([AC_DISABLE_SHARED],
900843d802faSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared])
900943d802faSmrg])
90103da084b3Smrg
901143d802faSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
901243d802faSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
90133da084b3Smrg
901443d802faSmrgdnl aclocal-1.4 backwards compatibility:
901543d802faSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], [])
901643d802faSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], [])
90173da084b3Smrg
90183da084b3Smrg
90193da084b3Smrg
902043d802faSmrg# _LT_ENABLE_STATIC([DEFAULT])
902143d802faSmrg# ----------------------------
902243d802faSmrg# implement the --enable-static flag, and support the 'static' and
902343d802faSmrg# 'disable-static' LT_INIT options.
902443d802faSmrg# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
902543d802faSmrgm4_define([_LT_ENABLE_STATIC],
902643d802faSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
902743d802faSmrgAC_ARG_ENABLE([static],
902843d802faSmrg    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
902943d802faSmrg	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
903043d802faSmrg    [p=${PACKAGE-default}
903143d802faSmrg    case $enableval in
903243d802faSmrg    yes) enable_static=yes ;;
903343d802faSmrg    no) enable_static=no ;;
903443d802faSmrg    *)
903543d802faSmrg     enable_static=no
903643d802faSmrg      # Look at the argument we got.  We use all the common list separators.
903743d802faSmrg      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
903843d802faSmrg      for pkg in $enableval; do
903943d802faSmrg	IFS=$lt_save_ifs
904043d802faSmrg	if test "X$pkg" = "X$p"; then
904143d802faSmrg	  enable_static=yes
904243d802faSmrg	fi
904343d802faSmrg      done
904443d802faSmrg      IFS=$lt_save_ifs
90452a53b785Smrg      ;;
904643d802faSmrg    esac],
904743d802faSmrg    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
90483da084b3Smrg
904943d802faSmrg    _LT_DECL([build_old_libs], [enable_static], [0],
905043d802faSmrg	[Whether or not to build static libraries])
905143d802faSmrg])# _LT_ENABLE_STATIC
905243d802faSmrg
905343d802faSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
905443d802faSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
905543d802faSmrg
905643d802faSmrg# Old names:
905743d802faSmrgAC_DEFUN([AC_ENABLE_STATIC],
905843d802faSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
905943d802faSmrg])
90603da084b3Smrg
906143d802faSmrgAC_DEFUN([AC_DISABLE_STATIC],
906243d802faSmrg[_LT_SET_OPTION([LT_INIT], [disable-static])
906343d802faSmrg])
90643da084b3Smrg
906543d802faSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
906643d802faSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
906743d802faSmrg
906843d802faSmrgdnl aclocal-1.4 backwards compatibility:
906943d802faSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], [])
907043d802faSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], [])
90713da084b3Smrg
907252fd71cdSmrg
907352fd71cdSmrg
907443d802faSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT])
907543d802faSmrg# ----------------------------------
907643d802faSmrg# implement the --enable-fast-install flag, and support the 'fast-install'
907743d802faSmrg# and 'disable-fast-install' LT_INIT options.
907843d802faSmrg# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
907943d802faSmrgm4_define([_LT_ENABLE_FAST_INSTALL],
908043d802faSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
908143d802faSmrgAC_ARG_ENABLE([fast-install],
908243d802faSmrg    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
908343d802faSmrg    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
908443d802faSmrg    [p=${PACKAGE-default}
908543d802faSmrg    case $enableval in
908643d802faSmrg    yes) enable_fast_install=yes ;;
908743d802faSmrg    no) enable_fast_install=no ;;
90882a53b785Smrg    *)
908943d802faSmrg      enable_fast_install=no
909043d802faSmrg      # Look at the argument we got.  We use all the common list separators.
909143d802faSmrg      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
909243d802faSmrg      for pkg in $enableval; do
909343d802faSmrg	IFS=$lt_save_ifs
909443d802faSmrg	if test "X$pkg" = "X$p"; then
909543d802faSmrg	  enable_fast_install=yes
909643d802faSmrg	fi
909743d802faSmrg      done
909843d802faSmrg      IFS=$lt_save_ifs
90992a53b785Smrg      ;;
910043d802faSmrg    esac],
910143d802faSmrg    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
910252fd71cdSmrg
910343d802faSmrg_LT_DECL([fast_install], [enable_fast_install], [0],
910443d802faSmrg	 [Whether or not to optimize for fast installation])dnl
910543d802faSmrg])# _LT_ENABLE_FAST_INSTALL
91062a53b785Smrg
910743d802faSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
910843d802faSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
91092a53b785Smrg
911043d802faSmrg# Old names:
911143d802faSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL],
911243d802faSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
911343d802faSmrgAC_DIAGNOSE([obsolete],
911443d802faSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
911543d802faSmrgthe 'fast-install' option into LT_INIT's first parameter.])
911643d802faSmrg])
91172a53b785Smrg
911843d802faSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL],
911943d802faSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
912043d802faSmrgAC_DIAGNOSE([obsolete],
912143d802faSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
912243d802faSmrgthe 'disable-fast-install' option into LT_INIT's first parameter.])
912343d802faSmrg])
91242a53b785Smrg
912543d802faSmrgdnl aclocal-1.4 backwards compatibility:
912643d802faSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
912743d802faSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
91282a53b785Smrg
91292a53b785Smrg
913043d802faSmrg# _LT_WITH_AIX_SONAME([DEFAULT])
913143d802faSmrg# ----------------------------------
913243d802faSmrg# implement the --with-aix-soname flag, and support the `aix-soname=aix'
913343d802faSmrg# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
913443d802faSmrg# is either `aix', `both' or `svr4'.  If omitted, it defaults to `aix'.
913543d802faSmrgm4_define([_LT_WITH_AIX_SONAME],
913643d802faSmrg[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
913743d802faSmrgshared_archive_member_spec=
913843d802faSmrgcase $host,$enable_shared in
913943d802faSmrgpower*-*-aix[[5-9]]*,yes)
914043d802faSmrg  AC_MSG_CHECKING([which variant of shared library versioning to provide])
914143d802faSmrg  AC_ARG_WITH([aix-soname],
914243d802faSmrg    [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
914343d802faSmrg      [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
914443d802faSmrg    [case $withval in
914543d802faSmrg    aix|svr4|both)
914643d802faSmrg      ;;
914743d802faSmrg    *)
914843d802faSmrg      AC_MSG_ERROR([Unknown argument to --with-aix-soname])
914943d802faSmrg      ;;
915043d802faSmrg    esac
915143d802faSmrg    lt_cv_with_aix_soname=$with_aix_soname],
915243d802faSmrg    [AC_CACHE_VAL([lt_cv_with_aix_soname],
915343d802faSmrg      [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
915443d802faSmrg    with_aix_soname=$lt_cv_with_aix_soname])
915543d802faSmrg  AC_MSG_RESULT([$with_aix_soname])
915643d802faSmrg  if test aix != "$with_aix_soname"; then
915743d802faSmrg    # For the AIX way of multilib, we name the shared archive member
915843d802faSmrg    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
915943d802faSmrg    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
916043d802faSmrg    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
916143d802faSmrg    # the AIX toolchain works better with OBJECT_MODE set (default 32).
916243d802faSmrg    if test 64 = "${OBJECT_MODE-32}"; then
916343d802faSmrg      shared_archive_member_spec=shr_64
916443d802faSmrg    else
916543d802faSmrg      shared_archive_member_spec=shr
916643d802faSmrg    fi
916743d802faSmrg  fi
916843d802faSmrg  ;;
916943d802faSmrg*)
917043d802faSmrg  with_aix_soname=aix
917143d802faSmrg  ;;
917243d802faSmrgesac
91732a53b785Smrg
917443d802faSmrg_LT_DECL([], [shared_archive_member_spec], [0],
917543d802faSmrg    [Shared archive member basename, for filename based shared library versioning on AIX])dnl
917643d802faSmrg])# _LT_WITH_AIX_SONAME
91772a53b785Smrg
917843d802faSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
917943d802faSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
918043d802faSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
91813da084b3Smrg
91823da084b3Smrg
918343d802faSmrg# _LT_WITH_PIC([MODE])
918443d802faSmrg# --------------------
918543d802faSmrg# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
918643d802faSmrg# LT_INIT options.
918743d802faSmrg# MODE is either 'yes' or 'no'.  If omitted, it defaults to 'both'.
918843d802faSmrgm4_define([_LT_WITH_PIC],
918943d802faSmrg[AC_ARG_WITH([pic],
919043d802faSmrg    [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
919143d802faSmrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
919243d802faSmrg    [lt_p=${PACKAGE-default}
919343d802faSmrg    case $withval in
919443d802faSmrg    yes|no) pic_mode=$withval ;;
919543d802faSmrg    *)
919643d802faSmrg      pic_mode=default
919743d802faSmrg      # Look at the argument we got.  We use all the common list separators.
919843d802faSmrg      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
919943d802faSmrg      for lt_pkg in $withval; do
920043d802faSmrg	IFS=$lt_save_ifs
920143d802faSmrg	if test "X$lt_pkg" = "X$lt_p"; then
920243d802faSmrg	  pic_mode=yes
920343d802faSmrg	fi
920443d802faSmrg      done
920543d802faSmrg      IFS=$lt_save_ifs
920643d802faSmrg      ;;
920743d802faSmrg    esac],
920843d802faSmrg    [pic_mode=m4_default([$1], [default])])
92093da084b3Smrg
921043d802faSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
921143d802faSmrg])# _LT_WITH_PIC
92123da084b3Smrg
921343d802faSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
921443d802faSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
92153da084b3Smrg
921643d802faSmrg# Old name:
921743d802faSmrgAU_DEFUN([AC_LIBTOOL_PICMODE],
921843d802faSmrg[_LT_SET_OPTION([LT_INIT], [pic-only])
921943d802faSmrgAC_DIAGNOSE([obsolete],
922043d802faSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
922143d802faSmrgput the 'pic-only' option into LT_INIT's first parameter.])
922243d802faSmrg])
9223d63fdb69Smrg
922443d802faSmrgdnl aclocal-1.4 backwards compatibility:
922543d802faSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
92263da084b3Smrg
92273da084b3Smrg
922843d802faSmrgm4_define([_LTDL_MODE], [])
922943d802faSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
923043d802faSmrg		 [m4_define([_LTDL_MODE], [nonrecursive])])
923143d802faSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive],
923243d802faSmrg		 [m4_define([_LTDL_MODE], [recursive])])
923343d802faSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject],
923443d802faSmrg		 [m4_define([_LTDL_MODE], [subproject])])
923555acc8fcSmrg
923643d802faSmrgm4_define([_LTDL_TYPE], [])
923743d802faSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable],
923843d802faSmrg		 [m4_define([_LTDL_TYPE], [installable])])
923943d802faSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience],
924043d802faSmrg		 [m4_define([_LTDL_TYPE], [convenience])])
924155acc8fcSmrg
924243d802faSmrg# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
924343d802faSmrg#
924443d802faSmrg# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software
924543d802faSmrg# Foundation, Inc.
924643d802faSmrg# Written by Gary V. Vaughan, 2004
924743d802faSmrg#
924843d802faSmrg# This file is free software; the Free Software Foundation gives
924943d802faSmrg# unlimited permission to copy and/or distribute it, with or without
925043d802faSmrg# modifications, as long as this notice is preserved.
92513da084b3Smrg
925243d802faSmrg# serial 6 ltsugar.m4
92533da084b3Smrg
925443d802faSmrg# This is to help aclocal find these macros, as it can't see m4_define.
925543d802faSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
92563da084b3Smrg
92573da084b3Smrg
925843d802faSmrg# lt_join(SEP, ARG1, [ARG2...])
925943d802faSmrg# -----------------------------
926043d802faSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
926143d802faSmrg# associated separator.
926243d802faSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
926343d802faSmrg# versions in m4sugar had bugs.
926443d802faSmrgm4_define([lt_join],
926543d802faSmrg[m4_if([$#], [1], [],
926643d802faSmrg       [$#], [2], [[$2]],
926743d802faSmrg       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
926843d802faSmrgm4_define([_lt_join],
926943d802faSmrg[m4_if([$#$2], [2], [],
927043d802faSmrg       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
92713da084b3Smrg
92722a53b785Smrg
927343d802faSmrg# lt_car(LIST)
927443d802faSmrg# lt_cdr(LIST)
927543d802faSmrg# ------------
927643d802faSmrg# Manipulate m4 lists.
927743d802faSmrg# These macros are necessary as long as will still need to support
927843d802faSmrg# Autoconf-2.59, which quotes differently.
927943d802faSmrgm4_define([lt_car], [[$1]])
928043d802faSmrgm4_define([lt_cdr],
928143d802faSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
928243d802faSmrg       [$#], 1, [],
928343d802faSmrg       [m4_dquote(m4_shift($@))])])
928443d802faSmrgm4_define([lt_unquote], $1)
928543d802faSmrg
928643d802faSmrg
928743d802faSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR])
928843d802faSmrg# ------------------------------------------
928943d802faSmrg# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
929043d802faSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended
929143d802faSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
929243d802faSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different
929343d802faSmrg# than defined and empty).
929443d802faSmrg#
929543d802faSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier
929643d802faSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
929743d802faSmrgm4_define([lt_append],
929843d802faSmrg[m4_define([$1],
929943d802faSmrg	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
930043d802faSmrg
930143d802faSmrg
930243d802faSmrg
930343d802faSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
930443d802faSmrg# ----------------------------------------------------------
930543d802faSmrg# Produce a SEP delimited list of all paired combinations of elements of
930643d802faSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
930743d802faSmrg# has the form PREFIXmINFIXSUFFIXn.
930843d802faSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62.
930943d802faSmrgm4_define([lt_combine],
931043d802faSmrg[m4_if(m4_eval([$# > 3]), [1],
931143d802faSmrg       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
931243d802faSmrg[[m4_foreach([_Lt_prefix], [$2],
931343d802faSmrg	     [m4_foreach([_Lt_suffix],
931443d802faSmrg		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
931543d802faSmrg	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
93163da084b3Smrg
931752fd71cdSmrg
931843d802faSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
931943d802faSmrg# -----------------------------------------------------------------------
932043d802faSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
932143d802faSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
932243d802faSmrgm4_define([lt_if_append_uniq],
932343d802faSmrg[m4_ifdef([$1],
932443d802faSmrg	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
932543d802faSmrg		 [lt_append([$1], [$2], [$3])$4],
932643d802faSmrg		 [$5])],
932743d802faSmrg	  [lt_append([$1], [$2], [$3])$4])])
93282a53b785Smrg
93292a53b785Smrg
933043d802faSmrg# lt_dict_add(DICT, KEY, VALUE)
933143d802faSmrg# -----------------------------
933243d802faSmrgm4_define([lt_dict_add],
933343d802faSmrg[m4_define([$1($2)], [$3])])
93342a53b785Smrg
93352a53b785Smrg
933643d802faSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
933743d802faSmrg# --------------------------------------------
933843d802faSmrgm4_define([lt_dict_add_subkey],
933943d802faSmrg[m4_define([$1($2:$3)], [$4])])
934052fd71cdSmrg
934152fd71cdSmrg
934243d802faSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY])
934343d802faSmrg# ----------------------------------
934443d802faSmrgm4_define([lt_dict_fetch],
934543d802faSmrg[m4_ifval([$3],
934643d802faSmrg	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
934743d802faSmrg    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
934852fd71cdSmrg
934952fd71cdSmrg
935043d802faSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
935143d802faSmrg# -----------------------------------------------------------------
935243d802faSmrgm4_define([lt_if_dict_fetch],
935343d802faSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
935443d802faSmrg	[$5],
935543d802faSmrg    [$6])])
935652fd71cdSmrg
935752fd71cdSmrg
935843d802faSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
935943d802faSmrg# --------------------------------------------------------------
936043d802faSmrgm4_define([lt_dict_filter],
936143d802faSmrg[m4_if([$5], [], [],
936243d802faSmrg  [lt_join(m4_quote(m4_default([$4], [[, ]])),
936343d802faSmrg           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
936443d802faSmrg		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
936543d802faSmrg])
936652fd71cdSmrg
936743d802faSmrg# ltversion.m4 -- version numbers			-*- Autoconf -*-
936843d802faSmrg#
936943d802faSmrg#   Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation,
937043d802faSmrg#   Inc.
937143d802faSmrg#   Written by Scott James Remnant, 2004
937243d802faSmrg#
937343d802faSmrg# This file is free software; the Free Software Foundation gives
937443d802faSmrg# unlimited permission to copy and/or distribute it, with or without
937543d802faSmrg# modifications, as long as this notice is preserved.
937652fd71cdSmrg
937743d802faSmrg# @configure_input@
937852fd71cdSmrg
937943d802faSmrg# serial 4245 ltversion.m4
938043d802faSmrg# This file is part of GNU Libtool
93813da084b3Smrg
938243d802faSmrgm4_define([LT_PACKAGE_VERSION], [2.4.7])
938343d802faSmrgm4_define([LT_PACKAGE_REVISION], [2.4.7])
93843da084b3Smrg
938543d802faSmrgAC_DEFUN([LTVERSION_VERSION],
938643d802faSmrg[macro_version='2.4.7'
938743d802faSmrgmacro_revision='2.4.7'
938843d802faSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
938943d802faSmrg_LT_DECL(, macro_revision, 0)
939043d802faSmrg])
939155acc8fcSmrg
939243d802faSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
939343d802faSmrg#
939443d802faSmrg#   Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free
939543d802faSmrg#   Software Foundation, Inc.
939643d802faSmrg#   Written by Scott James Remnant, 2004.
939743d802faSmrg#
939843d802faSmrg# This file is free software; the Free Software Foundation gives
939943d802faSmrg# unlimited permission to copy and/or distribute it, with or without
940043d802faSmrg# modifications, as long as this notice is preserved.
94013da084b3Smrg
940243d802faSmrg# serial 5 lt~obsolete.m4
94033da084b3Smrg
940443d802faSmrg# These exist entirely to fool aclocal when bootstrapping libtool.
940543d802faSmrg#
940643d802faSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
940743d802faSmrg# which have later been changed to m4_define as they aren't part of the
940843d802faSmrg# exported API, or moved to Autoconf or Automake where they belong.
940943d802faSmrg#
941043d802faSmrg# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
941143d802faSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
941243d802faSmrg# using a macro with the same name in our local m4/libtool.m4 it'll
941343d802faSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
941443d802faSmrg# and doesn't know about Autoconf macros at all.)
941543d802faSmrg#
941643d802faSmrg# So we provide this file, which has a silly filename so it's always
941743d802faSmrg# included after everything else.  This provides aclocal with the
941843d802faSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
941943d802faSmrg# because those macros already exist, or will be overwritten later.
942043d802faSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
942143d802faSmrg#
942243d802faSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
942343d802faSmrg# Yes, that means every name once taken will need to remain here until
942443d802faSmrg# we give up compatibility with versions before 1.7, at which point
942543d802faSmrg# we need to keep only those names which we still refer to.
94263da084b3Smrg
942743d802faSmrg# This is to help aclocal find these macros, as it can't see m4_define.
942843d802faSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
942943d802faSmrg
943043d802faSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
943143d802faSmrgm4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
943243d802faSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
943343d802faSmrgm4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
943443d802faSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
943543d802faSmrgm4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
943643d802faSmrgm4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
943743d802faSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
943843d802faSmrgm4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
943943d802faSmrgm4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
944043d802faSmrgm4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
944143d802faSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
944243d802faSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
944343d802faSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
944443d802faSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
944543d802faSmrgm4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
944643d802faSmrgm4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
944743d802faSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
944843d802faSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
944943d802faSmrgm4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
945043d802faSmrgm4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
945143d802faSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
945243d802faSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
945343d802faSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
945443d802faSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
945543d802faSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
945643d802faSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
945743d802faSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
945843d802faSmrgm4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
945943d802faSmrgm4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
946043d802faSmrgm4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
946143d802faSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
946243d802faSmrgm4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
946343d802faSmrgm4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
946443d802faSmrgm4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
946543d802faSmrgm4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
946643d802faSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
946743d802faSmrgm4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
946843d802faSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
946943d802faSmrgm4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
947043d802faSmrgm4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
947143d802faSmrgm4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
947243d802faSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
947343d802faSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
947443d802faSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
947543d802faSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
947643d802faSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
947743d802faSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
947843d802faSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
947943d802faSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
948043d802faSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
948143d802faSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
948243d802faSmrgm4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
948343d802faSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
948443d802faSmrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],	[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
948543d802faSmrgm4_ifndef([_LT_AC_PROG_CXXCPP],		[AC_DEFUN([_LT_AC_PROG_CXXCPP])])
948643d802faSmrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],	[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
948743d802faSmrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
948843d802faSmrgm4_ifndef([_LT_PROG_F77],		[AC_DEFUN([_LT_PROG_F77])])
948943d802faSmrgm4_ifndef([_LT_PROG_FC],		[AC_DEFUN([_LT_PROG_FC])])
949043d802faSmrgm4_ifndef([_LT_PROG_CXX],		[AC_DEFUN([_LT_PROG_CXX])])
94913da084b3Smrg
949243d802faSmrg# pkg.m4 - Macros to locate and utilise pkg-config.   -*- Autoconf -*-
949343d802faSmrg# serial 11 (pkg-config-0.29.1)
94943da084b3Smrg
949543d802faSmrgdnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
949643d802faSmrgdnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
949743d802faSmrgdnl
949843d802faSmrgdnl This program is free software; you can redistribute it and/or modify
949943d802faSmrgdnl it under the terms of the GNU General Public License as published by
950043d802faSmrgdnl the Free Software Foundation; either version 2 of the License, or
950143d802faSmrgdnl (at your option) any later version.
950243d802faSmrgdnl
950343d802faSmrgdnl This program is distributed in the hope that it will be useful, but
950443d802faSmrgdnl WITHOUT ANY WARRANTY; without even the implied warranty of
950543d802faSmrgdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
950643d802faSmrgdnl General Public License for more details.
950743d802faSmrgdnl
950843d802faSmrgdnl You should have received a copy of the GNU General Public License
950943d802faSmrgdnl along with this program; if not, write to the Free Software
951043d802faSmrgdnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
951143d802faSmrgdnl 02111-1307, USA.
951243d802faSmrgdnl
951343d802faSmrgdnl As a special exception to the GNU General Public License, if you
951443d802faSmrgdnl distribute this file as part of a program that contains a
951543d802faSmrgdnl configuration script generated by Autoconf, you may include it under
951643d802faSmrgdnl the same distribution terms that you use for the rest of that
951743d802faSmrgdnl program.
95183da084b3Smrg
951943d802faSmrgdnl PKG_PREREQ(MIN-VERSION)
952043d802faSmrgdnl -----------------------
952143d802faSmrgdnl Since: 0.29
952243d802faSmrgdnl
952343d802faSmrgdnl Verify that the version of the pkg-config macros are at least
952443d802faSmrgdnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
952543d802faSmrgdnl installed version of pkg-config, this checks the developer's version
952643d802faSmrgdnl of pkg.m4 when generating configure.
952743d802faSmrgdnl
952843d802faSmrgdnl To ensure that this macro is defined, also add:
952943d802faSmrgdnl m4_ifndef([PKG_PREREQ],
953043d802faSmrgdnl     [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
953143d802faSmrgdnl
953243d802faSmrgdnl See the "Since" comment for each macro you use to see what version
953343d802faSmrgdnl of the macros you require.
953443d802faSmrgm4_defun([PKG_PREREQ],
953543d802faSmrg[m4_define([PKG_MACROS_VERSION], [0.29.1])
953643d802faSmrgm4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
953743d802faSmrg    [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
953843d802faSmrg])dnl PKG_PREREQ
95393da084b3Smrg
954043d802faSmrgdnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
954143d802faSmrgdnl ----------------------------------
954243d802faSmrgdnl Since: 0.16
954343d802faSmrgdnl
954443d802faSmrgdnl Search for the pkg-config tool and set the PKG_CONFIG variable to
954543d802faSmrgdnl first found in the path. Checks that the version of pkg-config found
954643d802faSmrgdnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
954743d802faSmrgdnl used since that's the first version where most current features of
954843d802faSmrgdnl pkg-config existed.
954943d802faSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
955043d802faSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
955143d802faSmrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
955243d802faSmrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
955343d802faSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
955443d802faSmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
955543d802faSmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
95563da084b3Smrg
955743d802faSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
955843d802faSmrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
955943d802faSmrgfi
956043d802faSmrgif test -n "$PKG_CONFIG"; then
956143d802faSmrg	_pkg_min_version=m4_default([$1], [0.9.0])
956243d802faSmrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
956343d802faSmrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
956443d802faSmrg		AC_MSG_RESULT([yes])
95652a53b785Smrg	else
956643d802faSmrg		AC_MSG_RESULT([no])
956743d802faSmrg		PKG_CONFIG=""
95682a53b785Smrg	fi
956943d802faSmrgfi[]dnl
957043d802faSmrg])dnl PKG_PROG_PKG_CONFIG
957143d802faSmrg
957243d802faSmrgdnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
957343d802faSmrgdnl -------------------------------------------------------------------
957443d802faSmrgdnl Since: 0.18
957543d802faSmrgdnl
957643d802faSmrgdnl Check to see whether a particular set of modules exists. Similar to
957743d802faSmrgdnl PKG_CHECK_MODULES(), but does not set variables or print errors.
957843d802faSmrgdnl
957943d802faSmrgdnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
958043d802faSmrgdnl only at the first occurence in configure.ac, so if the first place
958143d802faSmrgdnl it's called might be skipped (such as if it is within an "if", you
958243d802faSmrgdnl have to call PKG_CHECK_EXISTS manually
958343d802faSmrgAC_DEFUN([PKG_CHECK_EXISTS],
958443d802faSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
958543d802faSmrgif test -n "$PKG_CONFIG" && \
958643d802faSmrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
958743d802faSmrg  m4_default([$2], [:])
958843d802faSmrgm4_ifvaln([$3], [else
958943d802faSmrg  $3])dnl
959043d802faSmrgfi])
95913da084b3Smrg
959243d802faSmrgdnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
959343d802faSmrgdnl ---------------------------------------------
959443d802faSmrgdnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
959543d802faSmrgdnl pkg_failed based on the result.
959643d802faSmrgm4_define([_PKG_CONFIG],
959743d802faSmrg[if test -n "$$1"; then
959843d802faSmrg    pkg_cv_[]$1="$$1"
959943d802faSmrg elif test -n "$PKG_CONFIG"; then
960043d802faSmrg    PKG_CHECK_EXISTS([$3],
960143d802faSmrg                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
960243d802faSmrg		      test "x$?" != "x0" && pkg_failed=yes ],
960343d802faSmrg		     [pkg_failed=yes])
960443d802faSmrg else
960543d802faSmrg    pkg_failed=untried
960643d802faSmrgfi[]dnl
960743d802faSmrg])dnl _PKG_CONFIG
96082a53b785Smrg
960943d802faSmrgdnl _PKG_SHORT_ERRORS_SUPPORTED
961043d802faSmrgdnl ---------------------------
961143d802faSmrgdnl Internal check to see if pkg-config supports short errors.
961243d802faSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
961343d802faSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
961443d802faSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
961543d802faSmrg        _pkg_short_errors_supported=yes
961643d802faSmrgelse
961743d802faSmrg        _pkg_short_errors_supported=no
961843d802faSmrgfi[]dnl
961943d802faSmrg])dnl _PKG_SHORT_ERRORS_SUPPORTED
96202a53b785Smrg
96213da084b3Smrg
962243d802faSmrgdnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
962343d802faSmrgdnl   [ACTION-IF-NOT-FOUND])
962443d802faSmrgdnl --------------------------------------------------------------
962543d802faSmrgdnl Since: 0.4.0
962643d802faSmrgdnl
962743d802faSmrgdnl Note that if there is a possibility the first call to
962843d802faSmrgdnl PKG_CHECK_MODULES might not happen, you should be sure to include an
962943d802faSmrgdnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
963043d802faSmrgAC_DEFUN([PKG_CHECK_MODULES],
963143d802faSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
963243d802faSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
963343d802faSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
96343da084b3Smrg
963543d802faSmrgpkg_failed=no
963643d802faSmrgAC_MSG_CHECKING([for $1])
96373da084b3Smrg
963843d802faSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
963943d802faSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
96403da084b3Smrg
964143d802faSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
964243d802faSmrgand $1[]_LIBS to avoid the need to call pkg-config.
964343d802faSmrgSee the pkg-config man page for more details.])
964455acc8fcSmrg
964543d802faSmrgif test $pkg_failed = yes; then
964643d802faSmrg   	AC_MSG_RESULT([no])
964743d802faSmrg        _PKG_SHORT_ERRORS_SUPPORTED
964843d802faSmrg        if test $_pkg_short_errors_supported = yes; then
964943d802faSmrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
965043d802faSmrg        else 
965143d802faSmrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
965243d802faSmrg        fi
965343d802faSmrg	# Put the nasty error message in config.log where it belongs
965443d802faSmrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
9655d63fdb69Smrg
965643d802faSmrg	m4_default([$4], [AC_MSG_ERROR(
965743d802faSmrg[Package requirements ($2) were not met:
96583da084b3Smrg
965943d802faSmrg$$1_PKG_ERRORS
96603da084b3Smrg
966143d802faSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
966243d802faSmrginstalled software in a non-standard prefix.
966355acc8fcSmrg
966443d802faSmrg_PKG_TEXT])[]dnl
966543d802faSmrg        ])
966643d802faSmrgelif test $pkg_failed = untried; then
966743d802faSmrg     	AC_MSG_RESULT([no])
966843d802faSmrg	m4_default([$4], [AC_MSG_FAILURE(
966943d802faSmrg[The pkg-config script could not be found or is too old.  Make sure it
967043d802faSmrgis in your PATH or set the PKG_CONFIG environment variable to the full
967143d802faSmrgpath to pkg-config.
967255acc8fcSmrg
967343d802faSmrg_PKG_TEXT
967455acc8fcSmrg
967543d802faSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
967643d802faSmrg        ])
967743d802faSmrgelse
967843d802faSmrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
967943d802faSmrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
968043d802faSmrg        AC_MSG_RESULT([yes])
968143d802faSmrg	$3
968243d802faSmrgfi[]dnl
968343d802faSmrg])dnl PKG_CHECK_MODULES
968455acc8fcSmrg
96853da084b3Smrg
968643d802faSmrgdnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
968743d802faSmrgdnl   [ACTION-IF-NOT-FOUND])
968843d802faSmrgdnl ---------------------------------------------------------------------
968943d802faSmrgdnl Since: 0.29
969043d802faSmrgdnl
969143d802faSmrgdnl Checks for existence of MODULES and gathers its build flags with
969243d802faSmrgdnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
969343d802faSmrgdnl and VARIABLE-PREFIX_LIBS from --libs.
969443d802faSmrgdnl
969543d802faSmrgdnl Note that if there is a possibility the first call to
969643d802faSmrgdnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
969743d802faSmrgdnl include an explicit call to PKG_PROG_PKG_CONFIG in your
969843d802faSmrgdnl configure.ac.
969943d802faSmrgAC_DEFUN([PKG_CHECK_MODULES_STATIC],
970043d802faSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
970143d802faSmrg_save_PKG_CONFIG=$PKG_CONFIG
970243d802faSmrgPKG_CONFIG="$PKG_CONFIG --static"
970343d802faSmrgPKG_CHECK_MODULES($@)
970443d802faSmrgPKG_CONFIG=$_save_PKG_CONFIG[]dnl
970543d802faSmrg])dnl PKG_CHECK_MODULES_STATIC
97063da084b3Smrg
97073da084b3Smrg
970843d802faSmrgdnl PKG_INSTALLDIR([DIRECTORY])
970943d802faSmrgdnl -------------------------
971043d802faSmrgdnl Since: 0.27
971143d802faSmrgdnl
971243d802faSmrgdnl Substitutes the variable pkgconfigdir as the location where a module
971343d802faSmrgdnl should install pkg-config .pc files. By default the directory is
971443d802faSmrgdnl $libdir/pkgconfig, but the default can be changed by passing
971543d802faSmrgdnl DIRECTORY. The user can override through the --with-pkgconfigdir
971643d802faSmrgdnl parameter.
971743d802faSmrgAC_DEFUN([PKG_INSTALLDIR],
971843d802faSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
971943d802faSmrgm4_pushdef([pkg_description],
972043d802faSmrg    [pkg-config installation directory @<:@]pkg_default[@:>@])
972143d802faSmrgAC_ARG_WITH([pkgconfigdir],
972243d802faSmrg    [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
972343d802faSmrg    [with_pkgconfigdir=]pkg_default)
972443d802faSmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
972543d802faSmrgm4_popdef([pkg_default])
972643d802faSmrgm4_popdef([pkg_description])
972743d802faSmrg])dnl PKG_INSTALLDIR
97283da084b3Smrg
97293da084b3Smrg
973043d802faSmrgdnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
973143d802faSmrgdnl --------------------------------
973243d802faSmrgdnl Since: 0.27
973343d802faSmrgdnl
973443d802faSmrgdnl Substitutes the variable noarch_pkgconfigdir as the location where a
973543d802faSmrgdnl module should install arch-independent pkg-config .pc files. By
973643d802faSmrgdnl default the directory is $datadir/pkgconfig, but the default can be
973743d802faSmrgdnl changed by passing DIRECTORY. The user can override through the
973843d802faSmrgdnl --with-noarch-pkgconfigdir parameter.
973943d802faSmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR],
974043d802faSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
974143d802faSmrgm4_pushdef([pkg_description],
974243d802faSmrg    [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
974343d802faSmrgAC_ARG_WITH([noarch-pkgconfigdir],
974443d802faSmrg    [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
974543d802faSmrg    [with_noarch_pkgconfigdir=]pkg_default)
974643d802faSmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
974743d802faSmrgm4_popdef([pkg_default])
974843d802faSmrgm4_popdef([pkg_description])
974943d802faSmrg])dnl PKG_NOARCH_INSTALLDIR
97503da084b3Smrg
97513da084b3Smrg
975243d802faSmrgdnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
975343d802faSmrgdnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
975443d802faSmrgdnl -------------------------------------------
975543d802faSmrgdnl Since: 0.28
975643d802faSmrgdnl
975743d802faSmrgdnl Retrieves the value of the pkg-config variable for the given module.
975843d802faSmrgAC_DEFUN([PKG_CHECK_VAR],
975943d802faSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
976043d802faSmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
97613da084b3Smrg
976243d802faSmrg_PKG_CONFIG([$1], [variable="][$3]["], [$2])
976343d802faSmrgAS_VAR_COPY([$1], [pkg_cv_][$1])
97643da084b3Smrg
976543d802faSmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl
976643d802faSmrg])dnl PKG_CHECK_VAR
976755acc8fcSmrg
976843d802faSmrgdnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES,
976943d802faSmrgdnl   [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND],
977043d802faSmrgdnl   [DESCRIPTION], [DEFAULT])
977143d802faSmrgdnl ------------------------------------------
977243d802faSmrgdnl
977343d802faSmrgdnl Prepare a "--with-" configure option using the lowercase
977443d802faSmrgdnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and
977543d802faSmrgdnl PKG_CHECK_MODULES in a single macro.
977643d802faSmrgAC_DEFUN([PKG_WITH_MODULES],
977743d802faSmrg[
977843d802faSmrgm4_pushdef([with_arg], m4_tolower([$1]))
977955acc8fcSmrg
978043d802faSmrgm4_pushdef([description],
978143d802faSmrg           [m4_default([$5], [build with ]with_arg[ support])])
97823da084b3Smrg
978343d802faSmrgm4_pushdef([def_arg], [m4_default([$6], [auto])])
978443d802faSmrgm4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes])
978543d802faSmrgm4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no])
97863da084b3Smrg
978743d802faSmrgm4_case(def_arg,
978843d802faSmrg            [yes],[m4_pushdef([with_without], [--without-]with_arg)],
978943d802faSmrg            [m4_pushdef([with_without],[--with-]with_arg)])
97903da084b3Smrg
979143d802faSmrgAC_ARG_WITH(with_arg,
979243d802faSmrg     AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),,
979343d802faSmrg    [AS_TR_SH([with_]with_arg)=def_arg])
979452fd71cdSmrg
979543d802faSmrgAS_CASE([$AS_TR_SH([with_]with_arg)],
979643d802faSmrg            [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)],
979743d802faSmrg            [auto],[PKG_CHECK_MODULES([$1],[$2],
979843d802faSmrg                                        [m4_n([def_action_if_found]) $3],
979943d802faSmrg                                        [m4_n([def_action_if_not_found]) $4])])
980052fd71cdSmrg
980143d802faSmrgm4_popdef([with_arg])
980243d802faSmrgm4_popdef([description])
980343d802faSmrgm4_popdef([def_arg])
980443d802faSmrg
980543d802faSmrg])dnl PKG_WITH_MODULES
980643d802faSmrg
980743d802faSmrgdnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
980843d802faSmrgdnl   [DESCRIPTION], [DEFAULT])
980943d802faSmrgdnl -----------------------------------------------
981043d802faSmrgdnl
981143d802faSmrgdnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES
981243d802faSmrgdnl check._[VARIABLE-PREFIX] is exported as make variable.
981343d802faSmrgAC_DEFUN([PKG_HAVE_WITH_MODULES],
981443d802faSmrg[
981543d802faSmrgPKG_WITH_MODULES([$1],[$2],,,[$3],[$4])
981643d802faSmrg
981743d802faSmrgAM_CONDITIONAL([HAVE_][$1],
981843d802faSmrg               [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"])
981943d802faSmrg])dnl PKG_HAVE_WITH_MODULES
982043d802faSmrg
982143d802faSmrgdnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
982243d802faSmrgdnl   [DESCRIPTION], [DEFAULT])
982343d802faSmrgdnl ------------------------------------------------------
982443d802faSmrgdnl
982543d802faSmrgdnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after
982643d802faSmrgdnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make
982743d802faSmrgdnl and preprocessor variable.
982843d802faSmrgAC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES],
982943d802faSmrg[
983043d802faSmrgPKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4])
983143d802faSmrg
983243d802faSmrgAS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"],
983343d802faSmrg        [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])])
983443d802faSmrg])dnl PKG_HAVE_DEFINE_WITH_MODULES
983543d802faSmrg
983643d802faSmrgdnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
983743d802faSmrgdnl
983843d802faSmrgdnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
983943d802faSmrgdnl
984043d802faSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a
984143d802faSmrgdnl copy of this software and associated documentation files (the "Software"),
984243d802faSmrgdnl to deal in the Software without restriction, including without limitation
984343d802faSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
984443d802faSmrgdnl and/or sell copies of the Software, and to permit persons to whom the
984543d802faSmrgdnl Software is furnished to do so, subject to the following conditions:
984643d802faSmrgdnl
984743d802faSmrgdnl The above copyright notice and this permission notice (including the next
984843d802faSmrgdnl paragraph) shall be included in all copies or substantial portions of the
984943d802faSmrgdnl Software.
985043d802faSmrgdnl
985143d802faSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
985243d802faSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
985343d802faSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
985443d802faSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
985543d802faSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
985643d802faSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
985743d802faSmrgdnl DEALINGS IN THE SOFTWARE.
985843d802faSmrg
985943d802faSmrg# XORG_MACROS_VERSION(required-version)
986043d802faSmrg# -------------------------------------
986143d802faSmrg# Minimum version: 1.1.0
986243d802faSmrg#
986343d802faSmrg# If you're using a macro added in Version 1.1 or newer, include this in
986443d802faSmrg# your configure.ac with the minimum required version, such as:
986543d802faSmrg# XORG_MACROS_VERSION(1.1)
986643d802faSmrg#
986743d802faSmrg# To ensure that this macro is defined, also add:
986843d802faSmrg# m4_ifndef([XORG_MACROS_VERSION],
986943d802faSmrg#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
987043d802faSmrg#
987143d802faSmrg#
987243d802faSmrg# See the "minimum version" comment for each macro you use to see what
987343d802faSmrg# version you require.
987443d802faSmrgm4_defun([XORG_MACROS_VERSION],[
987543d802faSmrgm4_define([vers_have], [1.19.3])
987643d802faSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
987743d802faSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
987843d802faSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,,
987943d802faSmrg    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
988043d802faSmrgm4_if(m4_version_compare(vers_have, [$1]), -1,
988143d802faSmrg    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
988243d802faSmrgm4_undefine([vers_have])
988343d802faSmrgm4_undefine([maj_have])
988443d802faSmrgm4_undefine([maj_needed])
988543d802faSmrg]) # XORG_MACROS_VERSION
988643d802faSmrg
988743d802faSmrg# XORG_PROG_RAWCPP()
988843d802faSmrg# ------------------
988943d802faSmrg# Minimum version: 1.0.0
989043d802faSmrg#
989143d802faSmrg# Find cpp program and necessary flags for use in pre-processing text files
989243d802faSmrg# such as man pages and config files
989343d802faSmrgAC_DEFUN([XORG_PROG_RAWCPP],[
989443d802faSmrgAC_REQUIRE([AC_PROG_CPP])
989543d802faSmrgAC_PATH_TOOL(RAWCPP, [cpp], [${CPP}],
989643d802faSmrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
989743d802faSmrg
989843d802faSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
989943d802faSmrg# which is not the best choice for supporting other OS'es, but covers most
990043d802faSmrg# of the ones we need for now.
990143d802faSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
990243d802faSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])])
990343d802faSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
990443d802faSmrg	AC_MSG_RESULT([no])
990543d802faSmrgelse
990643d802faSmrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
990743d802faSmrg		RAWCPPFLAGS=-undef
990843d802faSmrg		AC_MSG_RESULT([yes])
990943d802faSmrg	# under Cygwin unix is still defined even with -undef
991043d802faSmrg	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
991143d802faSmrg		RAWCPPFLAGS="-undef -ansi"
991243d802faSmrg		AC_MSG_RESULT([yes, with -ansi])
99132a53b785Smrg	else
991443d802faSmrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
99152a53b785Smrg	fi
991643d802faSmrgfi
991743d802faSmrgrm -f conftest.$ac_ext
991843d802faSmrg
991943d802faSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
992043d802faSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve   "whitespace"?]])])
992143d802faSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
992243d802faSmrg	AC_MSG_RESULT([no])
992343d802faSmrgelse
992443d802faSmrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
992543d802faSmrg		TRADITIONALCPPFLAGS="-traditional"
992643d802faSmrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
992743d802faSmrg		AC_MSG_RESULT([yes])
992843d802faSmrg	else
992943d802faSmrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
993043d802faSmrg	fi
993143d802faSmrgfi
993243d802faSmrgrm -f conftest.$ac_ext
993343d802faSmrgAC_SUBST(RAWCPPFLAGS)
993443d802faSmrgAC_SUBST(TRADITIONALCPPFLAGS)
993543d802faSmrg]) # XORG_PROG_RAWCPP
993643d802faSmrg
993743d802faSmrg# XORG_MANPAGE_SECTIONS()
993843d802faSmrg# -----------------------
993943d802faSmrg# Minimum version: 1.0.0
994043d802faSmrg#
994143d802faSmrg# Determine which sections man pages go in for the different man page types
994243d802faSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
994343d802faSmrg# Not sure if there's any better way than just hardcoding by OS name.
994443d802faSmrg# Override default settings by setting environment variables
994543d802faSmrg# Added MAN_SUBSTS in version 1.8
994643d802faSmrg# Added AC_PROG_SED in version 1.8
994743d802faSmrg
994843d802faSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
994943d802faSmrgAC_REQUIRE([AC_CANONICAL_HOST])
995043d802faSmrgAC_REQUIRE([AC_PROG_SED])
995143d802faSmrg
995243d802faSmrgcase $host_os in
995343d802faSmrg    solaris*)
995443d802faSmrg        # Solaris 2.0 - 11.3 use SysV man page section numbers, so we
995543d802faSmrg        # check for a man page file found in later versions that use
995643d802faSmrg        # traditional section numbers instead
995743d802faSmrg        AC_CHECK_FILE([/usr/share/man/man7/attributes.7],
995843d802faSmrg                [SYSV_MAN_SECTIONS=false], [SYSV_MAN_SECTIONS=true])
995943d802faSmrg        ;;
996043d802faSmrg    *) SYSV_MAN_SECTIONS=false ;;
996143d802faSmrgesac
996252fd71cdSmrg
996343d802faSmrgif test x$APP_MAN_SUFFIX = x    ; then
996443d802faSmrg    APP_MAN_SUFFIX=1
996543d802faSmrgfi
996643d802faSmrgif test x$APP_MAN_DIR = x    ; then
996743d802faSmrg    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
996843d802faSmrgfi
99693da084b3Smrg
997043d802faSmrgif test x$LIB_MAN_SUFFIX = x    ; then
997143d802faSmrg    LIB_MAN_SUFFIX=3
997243d802faSmrgfi
997343d802faSmrgif test x$LIB_MAN_DIR = x    ; then
997443d802faSmrg    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
997543d802faSmrgfi
99763da084b3Smrg
997743d802faSmrgif test x$FILE_MAN_SUFFIX = x    ; then
997843d802faSmrg    case $SYSV_MAN_SECTIONS in
997943d802faSmrg	true)				FILE_MAN_SUFFIX=4  ;;
998043d802faSmrg	*)				FILE_MAN_SUFFIX=5  ;;
998143d802faSmrg    esac
998243d802faSmrgfi
998343d802faSmrgif test x$FILE_MAN_DIR = x    ; then
998443d802faSmrg    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
998543d802faSmrgfi
998655acc8fcSmrg
998743d802faSmrgif test x$MISC_MAN_SUFFIX = x    ; then
998843d802faSmrg    case $SYSV_MAN_SECTIONS in
998943d802faSmrg	true)				MISC_MAN_SUFFIX=5  ;;
999043d802faSmrg	*)				MISC_MAN_SUFFIX=7  ;;
999143d802faSmrg    esac
999243d802faSmrgfi
999343d802faSmrgif test x$MISC_MAN_DIR = x    ; then
999443d802faSmrg    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
999543d802faSmrgfi
999655acc8fcSmrg
999743d802faSmrgif test x$DRIVER_MAN_SUFFIX = x    ; then
999843d802faSmrg    case $SYSV_MAN_SECTIONS in
999943d802faSmrg	true)				DRIVER_MAN_SUFFIX=7  ;;
1000043d802faSmrg	*)				DRIVER_MAN_SUFFIX=4  ;;
1000143d802faSmrg    esac
1000243d802faSmrgfi
1000343d802faSmrgif test x$DRIVER_MAN_DIR = x    ; then
1000443d802faSmrg    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
1000543d802faSmrgfi
100063da084b3Smrg
1000743d802faSmrgif test x$ADMIN_MAN_SUFFIX = x    ; then
1000843d802faSmrg    case $SYSV_MAN_SECTIONS in
1000943d802faSmrg	true)				ADMIN_MAN_SUFFIX=1m ;;
1001043d802faSmrg	*)				ADMIN_MAN_SUFFIX=8  ;;
1001143d802faSmrg    esac
1001243d802faSmrgfi
1001343d802faSmrgif test x$ADMIN_MAN_DIR = x    ; then
1001443d802faSmrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
1001543d802faSmrgfi
100163da084b3Smrg
100173da084b3Smrg
1001843d802faSmrgAC_SUBST([APP_MAN_SUFFIX])
1001943d802faSmrgAC_SUBST([LIB_MAN_SUFFIX])
1002043d802faSmrgAC_SUBST([FILE_MAN_SUFFIX])
1002143d802faSmrgAC_SUBST([MISC_MAN_SUFFIX])
1002243d802faSmrgAC_SUBST([DRIVER_MAN_SUFFIX])
1002343d802faSmrgAC_SUBST([ADMIN_MAN_SUFFIX])
1002443d802faSmrgAC_SUBST([APP_MAN_DIR])
1002543d802faSmrgAC_SUBST([LIB_MAN_DIR])
1002643d802faSmrgAC_SUBST([FILE_MAN_DIR])
1002743d802faSmrgAC_SUBST([MISC_MAN_DIR])
1002843d802faSmrgAC_SUBST([DRIVER_MAN_DIR])
1002943d802faSmrgAC_SUBST([ADMIN_MAN_DIR])
100303da084b3Smrg
1003143d802faSmrgXORG_MAN_PAGE="X Version 11"
1003243d802faSmrgAC_SUBST([XORG_MAN_PAGE])
1003343d802faSmrgMAN_SUBSTS="\
1003443d802faSmrg	-e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
1003543d802faSmrg	-e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
1003643d802faSmrg	-e 's|__xservername__|Xorg|g' \
1003743d802faSmrg	-e 's|__xconfigfile__|xorg.conf|g' \
1003843d802faSmrg	-e 's|__projectroot__|\$(prefix)|g' \
1003943d802faSmrg	-e 's|__apploaddir__|\$(appdefaultdir)|g' \
1004043d802faSmrg	-e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
1004143d802faSmrg	-e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
1004243d802faSmrg	-e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
1004343d802faSmrg	-e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
1004443d802faSmrg	-e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
1004543d802faSmrg	-e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
1004643d802faSmrgAC_SUBST([MAN_SUBSTS])
100473da084b3Smrg
1004843d802faSmrg]) # XORG_MANPAGE_SECTIONS
100493da084b3Smrg
1005043d802faSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
1005143d802faSmrg# ------------------------
1005243d802faSmrg# Minimum version: 1.7.0
1005343d802faSmrg#
1005443d802faSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
1005543d802faSmrg# provided by xorg-sgml-doctools, if installed.
1005643d802faSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
1005743d802faSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
1005843d802faSmrgXORG_SGML_PATH=
1005943d802faSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
1006043d802faSmrg    [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
1006143d802faSmrg    [m4_ifval([$1],[:],
1006243d802faSmrg        [if test x"$cross_compiling" != x"yes" ; then
1006343d802faSmrg            AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
1006443d802faSmrg                          [XORG_SGML_PATH=$prefix/share/sgml])
1006543d802faSmrg         fi])
1006643d802faSmrg    ])
100673da084b3Smrg
1006843d802faSmrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
1006943d802faSmrg# the path and the name of the doc stylesheet
1007043d802faSmrgif test "x$XORG_SGML_PATH" != "x" ; then
1007143d802faSmrg   AC_MSG_RESULT([$XORG_SGML_PATH])
1007243d802faSmrg   STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
1007343d802faSmrg   XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
1007443d802faSmrgelse
1007543d802faSmrg   AC_MSG_RESULT([no])
1007643d802faSmrgfi
100773da084b3Smrg
1007843d802faSmrgAC_SUBST(XORG_SGML_PATH)
1007943d802faSmrgAC_SUBST(STYLESHEET_SRCDIR)
1008043d802faSmrgAC_SUBST(XSL_STYLESHEET)
1008143d802faSmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
1008243d802faSmrg]) # XORG_CHECK_SGML_DOCTOOLS
10083d63fdb69Smrg
1008443d802faSmrg# XORG_CHECK_LINUXDOC
1008543d802faSmrg# -------------------
1008643d802faSmrg# Minimum version: 1.0.0
1008743d802faSmrg#
1008843d802faSmrg# Defines the variable MAKE_TEXT if the necessary tools and
1008943d802faSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
1009043d802faSmrg# Whether or not the necessary tools and files are found can be checked
1009143d802faSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
1009243d802faSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
1009343d802faSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
1009443d802faSmrgAC_REQUIRE([XORG_WITH_PS2PDF])
100952a53b785Smrg
1009643d802faSmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
1009743d802faSmrg
1009843d802faSmrgAC_MSG_CHECKING([whether to build documentation])
1009943d802faSmrg
1010043d802faSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
1010143d802faSmrg   BUILDDOC=yes
1010243d802faSmrgelse
1010343d802faSmrg   BUILDDOC=no
1010443d802faSmrgfi
10105e1c0d025Smrg
1010643d802faSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
10107e1c0d025Smrg
1010843d802faSmrgAC_MSG_RESULT([$BUILDDOC])
1010955acc8fcSmrg
1011043d802faSmrgAC_MSG_CHECKING([whether to build pdf documentation])
10111d63fdb69Smrg
1011243d802faSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
1011343d802faSmrg   BUILDPDFDOC=yes
1011443d802faSmrgelse
1011543d802faSmrg   BUILDPDFDOC=no
1011643d802faSmrgfi
10117d63fdb69Smrg
1011843d802faSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
10119d63fdb69Smrg
1012043d802faSmrgAC_MSG_RESULT([$BUILDPDFDOC])
10121d63fdb69Smrg
1012243d802faSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
1012343d802faSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
1012443d802faSmrgMAKE_PDF="$PS2PDF"
1012543d802faSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
10126d63fdb69Smrg
1012743d802faSmrgAC_SUBST(MAKE_TEXT)
1012843d802faSmrgAC_SUBST(MAKE_PS)
1012943d802faSmrgAC_SUBST(MAKE_PDF)
1013043d802faSmrgAC_SUBST(MAKE_HTML)
1013143d802faSmrg]) # XORG_CHECK_LINUXDOC
101322a53b785Smrg
1013343d802faSmrg# XORG_CHECK_DOCBOOK
1013443d802faSmrg# -------------------
1013543d802faSmrg# Minimum version: 1.0.0
1013643d802faSmrg#
1013743d802faSmrg# Checks for the ability to build output formats from SGML DocBook source.
1013843d802faSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
1013943d802faSmrg# indicates whether the necessary tools and files are found and, if set,
1014043d802faSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx.
1014143d802faSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[
1014243d802faSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
101432a53b785Smrg
1014443d802faSmrgBUILDTXTDOC=no
1014543d802faSmrgBUILDPDFDOC=no
1014643d802faSmrgBUILDPSDOC=no
1014743d802faSmrgBUILDHTMLDOC=no
101482a53b785Smrg
1014943d802faSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps)
1015043d802faSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
1015143d802faSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html)
1015243d802faSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt)
10153d63fdb69Smrg
1015443d802faSmrgAC_MSG_CHECKING([whether to build text documentation])
1015543d802faSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
1015643d802faSmrg   test x$BUILD_TXTDOC != xno; then
1015743d802faSmrg	BUILDTXTDOC=yes
1015843d802faSmrgfi
1015943d802faSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
1016043d802faSmrgAC_MSG_RESULT([$BUILDTXTDOC])
10161d63fdb69Smrg
1016243d802faSmrgAC_MSG_CHECKING([whether to build PDF documentation])
1016343d802faSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
1016443d802faSmrg   test x$BUILD_PDFDOC != xno; then
1016543d802faSmrg	BUILDPDFDOC=yes
1016643d802faSmrgfi
1016743d802faSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
1016843d802faSmrgAC_MSG_RESULT([$BUILDPDFDOC])
10169d63fdb69Smrg
1017043d802faSmrgAC_MSG_CHECKING([whether to build PostScript documentation])
1017143d802faSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
1017243d802faSmrg   test x$BUILD_PSDOC != xno; then
1017343d802faSmrg	BUILDPSDOC=yes
1017443d802faSmrgfi
1017543d802faSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
1017643d802faSmrgAC_MSG_RESULT([$BUILDPSDOC])
10177e1c0d025Smrg
1017843d802faSmrgAC_MSG_CHECKING([whether to build HTML documentation])
1017943d802faSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
1018043d802faSmrg   test x$BUILD_HTMLDOC != xno; then
1018143d802faSmrg	BUILDHTMLDOC=yes
1018243d802faSmrgfi
1018343d802faSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
1018443d802faSmrgAC_MSG_RESULT([$BUILDHTMLDOC])
10185e1c0d025Smrg
1018643d802faSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
1018743d802faSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
1018843d802faSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
1018943d802faSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
10190d63fdb69Smrg
1019143d802faSmrgAC_SUBST(MAKE_TEXT)
1019243d802faSmrgAC_SUBST(MAKE_PS)
1019343d802faSmrgAC_SUBST(MAKE_PDF)
1019443d802faSmrgAC_SUBST(MAKE_HTML)
1019543d802faSmrg]) # XORG_CHECK_DOCBOOK
1019643d802faSmrg
1019743d802faSmrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT])
1019843d802faSmrg# ----------------
1019943d802faSmrg# Minimum version: 1.5.0
1020043d802faSmrg# Minimum version for optional DEFAULT argument: 1.11.0
1020143d802faSmrg#
1020243d802faSmrg# Documentation tools are not always available on all platforms and sometimes
1020343d802faSmrg# not at the appropriate level. This macro enables a module to test for the
1020443d802faSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
1020543d802faSmrg# the --with-xmlto option, it allows maximum flexibilty in making decisions
1020643d802faSmrg# as whether or not to use the xmlto package. When DEFAULT is not specified,
1020743d802faSmrg# --with-xmlto assumes 'auto'.
1020843d802faSmrg#
1020943d802faSmrg# Interface to module:
1021043d802faSmrg# HAVE_XMLTO: 	used in makefiles to conditionally generate documentation
1021143d802faSmrg# XMLTO:	returns the path of the xmlto program found
1021243d802faSmrg#		returns the path set by the user in the environment
1021343d802faSmrg# --with-xmlto:	'yes' user instructs the module to use xmlto
1021443d802faSmrg#		'no' user instructs the module not to use xmlto
1021543d802faSmrg#
1021643d802faSmrg# Added in version 1.10.0
1021743d802faSmrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
1021843d802faSmrg#                  xmlto for text output requires either lynx, links, or w3m browsers
1021943d802faSmrg#
1022043d802faSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
1022143d802faSmrg#
1022243d802faSmrgAC_DEFUN([XORG_WITH_XMLTO],[
1022343d802faSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command])
1022443d802faSmrgm4_define([_defopt], m4_default([$2], [auto]))
1022543d802faSmrgAC_ARG_WITH(xmlto,
1022643d802faSmrg	AS_HELP_STRING([--with-xmlto],
1022743d802faSmrg	   [Use xmlto to regenerate documentation (default: ]_defopt[)]),
1022843d802faSmrg	   [use_xmlto=$withval], [use_xmlto=]_defopt)
1022943d802faSmrgm4_undefine([_defopt])
1023043d802faSmrg
1023143d802faSmrgif test "x$use_xmlto" = x"auto"; then
1023243d802faSmrg   AC_PATH_PROG([XMLTO], [xmlto])
1023343d802faSmrg   if test "x$XMLTO" = "x"; then
1023443d802faSmrg        AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
1023543d802faSmrg	have_xmlto=no
1023643d802faSmrg   else
1023743d802faSmrg        have_xmlto=yes
1023843d802faSmrg   fi
1023943d802faSmrgelif test "x$use_xmlto" = x"yes" ; then
1024043d802faSmrg   AC_PATH_PROG([XMLTO], [xmlto])
1024143d802faSmrg   if test "x$XMLTO" = "x"; then
1024243d802faSmrg        AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
1024343d802faSmrg   fi
1024443d802faSmrg   have_xmlto=yes
1024543d802faSmrgelif test "x$use_xmlto" = x"no" ; then
1024643d802faSmrg   if test "x$XMLTO" != "x"; then
1024743d802faSmrg      AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
1024843d802faSmrg   fi
1024943d802faSmrg   have_xmlto=no
1025043d802faSmrgelse
1025143d802faSmrg   AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
1025243d802faSmrgfi
1025355acc8fcSmrg
1025443d802faSmrg# Test for a minimum version of xmlto, if provided.
1025543d802faSmrgm4_ifval([$1],
1025643d802faSmrg[if test "$have_xmlto" = yes; then
1025743d802faSmrg    # scrape the xmlto version
1025843d802faSmrg    AC_MSG_CHECKING([the xmlto version])
1025943d802faSmrg    xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
1026043d802faSmrg    AC_MSG_RESULT([$xmlto_version])
1026143d802faSmrg    AS_VERSION_COMPARE([$xmlto_version], [$1],
1026243d802faSmrg        [if test "x$use_xmlto" = xauto; then
1026343d802faSmrg            AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
1026443d802faSmrg            have_xmlto=no
1026543d802faSmrg        else
1026643d802faSmrg            AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
1026743d802faSmrg        fi])
1026843d802faSmrgfi])
102692a53b785Smrg
1027043d802faSmrg# Test for the ability of xmlto to generate a text target
1027148c85eb7Smrg#
1027243d802faSmrg# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the
1027343d802faSmrg# following test for empty XML docbook files.
1027443d802faSmrg# For compatibility reasons use the following empty XML docbook file and if
1027543d802faSmrg# it fails try it again with a non-empty XML file.
1027643d802faSmrghave_xmlto_text=no
1027743d802faSmrgcat > conftest.xml << "EOF"
1027843d802faSmrgEOF
1027943d802faSmrgAS_IF([test "$have_xmlto" = yes],
1028043d802faSmrg      [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
1028143d802faSmrg             [have_xmlto_text=yes],
1028243d802faSmrg             [# Try it again with a non-empty XML file.
1028343d802faSmrg              cat > conftest.xml << "EOF"
1028443d802faSmrg<x></x>
1028543d802faSmrgEOF
1028643d802faSmrg              AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
1028743d802faSmrg                    [have_xmlto_text=yes],
1028843d802faSmrg                    [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])])
1028943d802faSmrgrm -f conftest.xml
1029043d802faSmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
1029143d802faSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
1029243d802faSmrg]) # XORG_WITH_XMLTO
102932a53b785Smrg
1029443d802faSmrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT])
1029543d802faSmrg# --------------------------------------------
1029643d802faSmrg# Minimum version: 1.12.0
1029743d802faSmrg# Minimum version for optional DEFAULT argument: 1.12.0
1029843d802faSmrg#
1029943d802faSmrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative,
1030043d802faSmrg# XML-based language used for the transformation of XML documents.
1030143d802faSmrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents.
1030243d802faSmrg# It is used under the cover by xmlto to generate html files from DocBook/XML.
1030343d802faSmrg# The XSLT processor is often used as a standalone tool for transformations.
1030443d802faSmrg# It should not be assumed that this tool is used only to work with documnetation.
1030543d802faSmrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'.
1030643d802faSmrg#
1030743d802faSmrg# Interface to module:
1030843d802faSmrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation
1030943d802faSmrg# XSLTPROC:	 returns the path of the xsltproc program found
1031043d802faSmrg#		 returns the path set by the user in the environment
1031143d802faSmrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc
1031243d802faSmrg#		  'no' user instructs the module not to use xsltproc
1031343d802faSmrg# have_xsltproc: returns yes if xsltproc found in PATH or no
1031443d802faSmrg#
1031543d802faSmrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path.
1031643d802faSmrg#
1031743d802faSmrgAC_DEFUN([XORG_WITH_XSLTPROC],[
1031843d802faSmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command])
1031943d802faSmrg# Preserves the interface, should it be implemented later
1032043d802faSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])])
1032143d802faSmrgm4_define([_defopt], m4_default([$2], [auto]))
1032243d802faSmrgAC_ARG_WITH(xsltproc,
1032343d802faSmrg	AS_HELP_STRING([--with-xsltproc],
1032443d802faSmrg	   [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]),
1032543d802faSmrg	   [use_xsltproc=$withval], [use_xsltproc=]_defopt)
1032643d802faSmrgm4_undefine([_defopt])
103272a53b785Smrg
1032843d802faSmrgif test "x$use_xsltproc" = x"auto"; then
1032943d802faSmrg   AC_PATH_PROG([XSLTPROC], [xsltproc])
1033043d802faSmrg   if test "x$XSLTPROC" = "x"; then
1033143d802faSmrg        AC_MSG_WARN([xsltproc not found - cannot transform XML documents])
1033243d802faSmrg	have_xsltproc=no
1033343d802faSmrg   else
1033443d802faSmrg        have_xsltproc=yes
1033543d802faSmrg   fi
1033643d802faSmrgelif test "x$use_xsltproc" = x"yes" ; then
1033743d802faSmrg   AC_PATH_PROG([XSLTPROC], [xsltproc])
1033843d802faSmrg   if test "x$XSLTPROC" = "x"; then
1033943d802faSmrg        AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH])
1034043d802faSmrg   fi
1034143d802faSmrg   have_xsltproc=yes
1034243d802faSmrgelif test "x$use_xsltproc" = x"no" ; then
1034343d802faSmrg   if test "x$XSLTPROC" != "x"; then
1034443d802faSmrg      AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified])
1034543d802faSmrg   fi
1034643d802faSmrg   have_xsltproc=no
1034743d802faSmrgelse
1034843d802faSmrg   AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no'])
1034943d802faSmrgfi
103502a53b785Smrg
1035143d802faSmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes])
1035243d802faSmrg]) # XORG_WITH_XSLTPROC
10353d63fdb69Smrg
1035443d802faSmrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT])
1035543d802faSmrg# ----------------------------------------
1035643d802faSmrg# Minimum version: 1.15.0
1035743d802faSmrg#
1035843d802faSmrg# PERL (Practical Extraction and Report Language) is a language optimized for
1035943d802faSmrg# scanning arbitrary text files, extracting information from those text files,
1036043d802faSmrg# and printing reports based on that information.
1036143d802faSmrg#
1036243d802faSmrg# When DEFAULT is not specified, --with-perl assumes 'auto'.
1036343d802faSmrg#
1036443d802faSmrg# Interface to module:
1036543d802faSmrg# HAVE_PERL: used in makefiles to conditionally scan text files
1036643d802faSmrg# PERL:	     returns the path of the perl program found
1036743d802faSmrg#	     returns the path set by the user in the environment
1036843d802faSmrg# --with-perl: 'yes' user instructs the module to use perl
1036943d802faSmrg#	       'no' user instructs the module not to use perl
1037043d802faSmrg# have_perl: returns yes if perl found in PATH or no
1037143d802faSmrg#
1037243d802faSmrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path.
1037343d802faSmrg#
1037443d802faSmrgAC_DEFUN([XORG_WITH_PERL],[
1037543d802faSmrgAC_ARG_VAR([PERL], [Path to perl command])
1037643d802faSmrg# Preserves the interface, should it be implemented later
1037743d802faSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])])
1037843d802faSmrgm4_define([_defopt], m4_default([$2], [auto]))
1037943d802faSmrgAC_ARG_WITH(perl,
1038043d802faSmrg	AS_HELP_STRING([--with-perl],
1038143d802faSmrg	   [Use perl for extracting information from files (default: ]_defopt[)]),
1038243d802faSmrg	   [use_perl=$withval], [use_perl=]_defopt)
1038343d802faSmrgm4_undefine([_defopt])
10384d63fdb69Smrg
1038543d802faSmrgif test "x$use_perl" = x"auto"; then
1038643d802faSmrg   AC_PATH_PROG([PERL], [perl])
1038743d802faSmrg   if test "x$PERL" = "x"; then
1038843d802faSmrg        AC_MSG_WARN([perl not found - cannot extract information and report])
1038943d802faSmrg	have_perl=no
1039043d802faSmrg   else
1039143d802faSmrg        have_perl=yes
1039243d802faSmrg   fi
1039343d802faSmrgelif test "x$use_perl" = x"yes" ; then
1039443d802faSmrg   AC_PATH_PROG([PERL], [perl])
1039543d802faSmrg   if test "x$PERL" = "x"; then
1039643d802faSmrg        AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH])
1039743d802faSmrg   fi
1039843d802faSmrg   have_perl=yes
1039943d802faSmrgelif test "x$use_perl" = x"no" ; then
1040043d802faSmrg   if test "x$PERL" != "x"; then
1040143d802faSmrg      AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified])
1040243d802faSmrg   fi
1040343d802faSmrg   have_perl=no
1040443d802faSmrgelse
1040543d802faSmrg   AC_MSG_ERROR([--with-perl expects 'yes' or 'no'])
1040643d802faSmrgfi
10407d63fdb69Smrg
1040843d802faSmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes])
1040943d802faSmrg]) # XORG_WITH_PERL
1041048c85eb7Smrg
1041143d802faSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
1041243d802faSmrg# ----------------
1041343d802faSmrg# Minimum version: 1.5.0
1041443d802faSmrg# Minimum version for optional DEFAULT argument: 1.11.0
1041543d802faSmrg#
1041643d802faSmrg# Documentation tools are not always available on all platforms and sometimes
1041743d802faSmrg# not at the appropriate level. This macro enables a module to test for the
1041843d802faSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
1041943d802faSmrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions
1042043d802faSmrg# as whether or not to use the asciidoc package. When DEFAULT is not specified,
1042143d802faSmrg# --with-asciidoc assumes 'auto'.
1042243d802faSmrg#
1042343d802faSmrg# Interface to module:
1042443d802faSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
1042543d802faSmrg# ASCIIDOC:	 returns the path of the asciidoc program found
1042643d802faSmrg#		 returns the path set by the user in the environment
1042743d802faSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc
1042843d802faSmrg#		  'no' user instructs the module not to use asciidoc
1042943d802faSmrg#
1043043d802faSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
1043143d802faSmrg#
1043243d802faSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[
1043343d802faSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
1043443d802faSmrgm4_define([_defopt], m4_default([$2], [auto]))
1043543d802faSmrgAC_ARG_WITH(asciidoc,
1043643d802faSmrg	AS_HELP_STRING([--with-asciidoc],
1043743d802faSmrg	   [Use asciidoc to regenerate documentation (default: ]_defopt[)]),
1043843d802faSmrg	   [use_asciidoc=$withval], [use_asciidoc=]_defopt)
1043943d802faSmrgm4_undefine([_defopt])
1044048c85eb7Smrg
1044143d802faSmrgif test "x$use_asciidoc" = x"auto"; then
1044243d802faSmrg   AC_PATH_PROG([ASCIIDOC], [asciidoc])
1044343d802faSmrg   if test "x$ASCIIDOC" = "x"; then
1044443d802faSmrg        AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
1044543d802faSmrg	have_asciidoc=no
1044643d802faSmrg   else
1044743d802faSmrg        have_asciidoc=yes
1044843d802faSmrg   fi
1044943d802faSmrgelif test "x$use_asciidoc" = x"yes" ; then
1045043d802faSmrg   AC_PATH_PROG([ASCIIDOC], [asciidoc])
1045143d802faSmrg   if test "x$ASCIIDOC" = "x"; then
1045243d802faSmrg        AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
1045343d802faSmrg   fi
1045443d802faSmrg   have_asciidoc=yes
1045543d802faSmrgelif test "x$use_asciidoc" = x"no" ; then
1045643d802faSmrg   if test "x$ASCIIDOC" != "x"; then
1045743d802faSmrg      AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
1045843d802faSmrg   fi
1045943d802faSmrg   have_asciidoc=no
1046043d802faSmrgelse
1046143d802faSmrg   AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
1046243d802faSmrgfi
1046343d802faSmrgm4_ifval([$1],
1046443d802faSmrg[if test "$have_asciidoc" = yes; then
1046543d802faSmrg    # scrape the asciidoc version
1046643d802faSmrg    AC_MSG_CHECKING([the asciidoc version])
1046743d802faSmrg    asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
1046843d802faSmrg    AC_MSG_RESULT([$asciidoc_version])
1046943d802faSmrg    AS_VERSION_COMPARE([$asciidoc_version], [$1],
1047043d802faSmrg        [if test "x$use_asciidoc" = xauto; then
1047143d802faSmrg            AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
1047243d802faSmrg            have_asciidoc=no
1047343d802faSmrg        else
1047443d802faSmrg            AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
1047543d802faSmrg        fi])
1047643d802faSmrgfi])
1047743d802faSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
1047843d802faSmrg]) # XORG_WITH_ASCIIDOC
1047948c85eb7Smrg
1048043d802faSmrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
1048143d802faSmrg# -------------------------------------------
1048243d802faSmrg# Minimum version: 1.5.0
1048343d802faSmrg# Minimum version for optional DEFAULT argument: 1.11.0
1048443d802faSmrg# Minimum version for optional DOT checking: 1.18.0
1048543d802faSmrg#
1048643d802faSmrg# Documentation tools are not always available on all platforms and sometimes
1048743d802faSmrg# not at the appropriate level. This macro enables a module to test for the
1048843d802faSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
1048943d802faSmrg# the --with-doxygen option, it allows maximum flexibilty in making decisions
1049043d802faSmrg# as whether or not to use the doxygen package. When DEFAULT is not specified,
1049143d802faSmrg# --with-doxygen assumes 'auto'.
1049243d802faSmrg#
1049343d802faSmrg# Interface to module:
1049443d802faSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
1049543d802faSmrg# DOXYGEN:	 returns the path of the doxygen program found
1049643d802faSmrg#		 returns the path set by the user in the environment
1049743d802faSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen
1049843d802faSmrg#		  'no' user instructs the module not to use doxygen
1049943d802faSmrg#
1050043d802faSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
1050143d802faSmrg#
1050243d802faSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[
1050343d802faSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command])
1050443d802faSmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility])
1050543d802faSmrgm4_define([_defopt], m4_default([$2], [auto]))
1050643d802faSmrgAC_ARG_WITH(doxygen,
1050743d802faSmrg	AS_HELP_STRING([--with-doxygen],
1050843d802faSmrg	   [Use doxygen to regenerate documentation (default: ]_defopt[)]),
1050943d802faSmrg	   [use_doxygen=$withval], [use_doxygen=]_defopt)
1051043d802faSmrgm4_undefine([_defopt])
105112a53b785Smrg
1051243d802faSmrgif test "x$use_doxygen" = x"auto"; then
1051343d802faSmrg   AC_PATH_PROG([DOXYGEN], [doxygen])
1051443d802faSmrg   if test "x$DOXYGEN" = "x"; then
1051543d802faSmrg        AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
1051643d802faSmrg	have_doxygen=no
1051743d802faSmrg   else
1051843d802faSmrg        have_doxygen=yes
1051943d802faSmrg   fi
1052043d802faSmrgelif test "x$use_doxygen" = x"yes" ; then
1052143d802faSmrg   AC_PATH_PROG([DOXYGEN], [doxygen])
1052243d802faSmrg   if test "x$DOXYGEN" = "x"; then
1052343d802faSmrg        AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
1052443d802faSmrg   fi
1052543d802faSmrg   have_doxygen=yes
1052643d802faSmrgelif test "x$use_doxygen" = x"no" ; then
1052743d802faSmrg   if test "x$DOXYGEN" != "x"; then
1052843d802faSmrg      AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
1052943d802faSmrg   fi
1053043d802faSmrg   have_doxygen=no
1053143d802faSmrgelse
1053243d802faSmrg   AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
1053343d802faSmrgfi
1053443d802faSmrgm4_ifval([$1],
1053543d802faSmrg[if test "$have_doxygen" = yes; then
1053643d802faSmrg    # scrape the doxygen version
1053743d802faSmrg    AC_MSG_CHECKING([the doxygen version])
1053843d802faSmrg    doxygen_version=`$DOXYGEN --version 2>/dev/null`
1053943d802faSmrg    AC_MSG_RESULT([$doxygen_version])
1054043d802faSmrg    AS_VERSION_COMPARE([$doxygen_version], [$1],
1054143d802faSmrg        [if test "x$use_doxygen" = xauto; then
1054243d802faSmrg            AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
1054343d802faSmrg            have_doxygen=no
1054443d802faSmrg        else
1054543d802faSmrg            AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
1054643d802faSmrg        fi])
1054743d802faSmrgfi])
105482a53b785Smrg
1054943d802faSmrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory
1055043d802faSmrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file:
1055143d802faSmrgdnl 	HAVE_DOT = @HAVE_DOT@
1055243d802faSmrgHAVE_DOT=no
1055343d802faSmrgif test "x$have_doxygen" = "xyes"; then
1055443d802faSmrg  AC_PATH_PROG([DOT], [dot])
1055543d802faSmrg    if test "x$DOT" != "x"; then
1055643d802faSmrg      HAVE_DOT=yes
1055743d802faSmrg    fi
1055843d802faSmrgfi
10559d63fdb69Smrg
1056043d802faSmrgAC_SUBST([HAVE_DOT])
1056143d802faSmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"])
1056243d802faSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
1056343d802faSmrg]) # XORG_WITH_DOXYGEN
10564d63fdb69Smrg
1056543d802faSmrg# XORG_WITH_GROFF([DEFAULT])
1056643d802faSmrg# ----------------
1056743d802faSmrg# Minimum version: 1.6.0
1056843d802faSmrg# Minimum version for optional DEFAULT argument: 1.11.0
1056943d802faSmrg#
1057043d802faSmrg# Documentation tools are not always available on all platforms and sometimes
1057143d802faSmrg# not at the appropriate level. This macro enables a module to test for the
1057243d802faSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
1057343d802faSmrg# the --with-groff option, it allows maximum flexibilty in making decisions
1057443d802faSmrg# as whether or not to use the groff package. When DEFAULT is not specified,
1057543d802faSmrg# --with-groff assumes 'auto'.
1057643d802faSmrg#
1057743d802faSmrg# Interface to module:
1057843d802faSmrg# HAVE_GROFF:	 used in makefiles to conditionally generate documentation
1057943d802faSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package
1058043d802faSmrg# HAVE_GROFF_MS: the -ms macros package
1058143d802faSmrg# GROFF:	 returns the path of the groff program found
1058243d802faSmrg#		 returns the path set by the user in the environment
1058343d802faSmrg# --with-groff:	 'yes' user instructs the module to use groff
1058443d802faSmrg#		 'no' user instructs the module not to use groff
1058543d802faSmrg#
1058643d802faSmrg# Added in version 1.9.0:
1058743d802faSmrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format:
1058843d802faSmrg#		   pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
1058943d802faSmrg#		   psselect from the psutils package.
1059043d802faSmrg#		   the ghostcript package. Refer to the grohtml man pages
1059143d802faSmrg#
1059243d802faSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
1059343d802faSmrg#
1059443d802faSmrg# OS and distros often splits groff in a basic and full package, the former
1059543d802faSmrg# having the groff program and the later having devices, fonts and macros
1059643d802faSmrg# Checking for the groff executable is not enough.
1059743d802faSmrg#
1059843d802faSmrg# If macros are missing, we cannot assume that groff is useless, so we don't
1059943d802faSmrg# unset HAVE_GROFF or GROFF env variables.
1060043d802faSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
1060143d802faSmrg#
1060243d802faSmrgAC_DEFUN([XORG_WITH_GROFF],[
1060343d802faSmrgAC_ARG_VAR([GROFF], [Path to groff command])
1060443d802faSmrgm4_define([_defopt], m4_default([$1], [auto]))
1060543d802faSmrgAC_ARG_WITH(groff,
1060643d802faSmrg	AS_HELP_STRING([--with-groff],
1060743d802faSmrg	   [Use groff to regenerate documentation (default: ]_defopt[)]),
1060843d802faSmrg	   [use_groff=$withval], [use_groff=]_defopt)
1060943d802faSmrgm4_undefine([_defopt])
10610d63fdb69Smrg
1061143d802faSmrgif test "x$use_groff" = x"auto"; then
1061243d802faSmrg   AC_PATH_PROG([GROFF], [groff])
1061343d802faSmrg   if test "x$GROFF" = "x"; then
1061443d802faSmrg        AC_MSG_WARN([groff not found - documentation targets will be skipped])
1061543d802faSmrg	have_groff=no
1061643d802faSmrg   else
1061743d802faSmrg        have_groff=yes
1061843d802faSmrg   fi
1061943d802faSmrgelif test "x$use_groff" = x"yes" ; then
1062043d802faSmrg   AC_PATH_PROG([GROFF], [groff])
1062143d802faSmrg   if test "x$GROFF" = "x"; then
1062243d802faSmrg        AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
1062343d802faSmrg   fi
1062443d802faSmrg   have_groff=yes
1062543d802faSmrgelif test "x$use_groff" = x"no" ; then
1062643d802faSmrg   if test "x$GROFF" != "x"; then
1062743d802faSmrg      AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
1062843d802faSmrg   fi
1062943d802faSmrg   have_groff=no
106302a53b785Smrgelse
1063143d802faSmrg   AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
1063248c85eb7Smrgfi
10633d63fdb69Smrg
1063443d802faSmrg# We have groff, test for the presence of the macro packages
1063543d802faSmrgif test "x$have_groff" = x"yes"; then
1063643d802faSmrg    AC_MSG_CHECKING([for ${GROFF} -ms macros])
1063743d802faSmrg    if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
1063843d802faSmrg        groff_ms_works=yes
1063943d802faSmrg    else
1064043d802faSmrg        groff_ms_works=no
1064143d802faSmrg    fi
1064243d802faSmrg    AC_MSG_RESULT([$groff_ms_works])
1064343d802faSmrg    AC_MSG_CHECKING([for ${GROFF} -mm macros])
1064443d802faSmrg    if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
1064543d802faSmrg        groff_mm_works=yes
1064643d802faSmrg    else
1064743d802faSmrg        groff_mm_works=no
1064843d802faSmrg    fi
1064943d802faSmrg    AC_MSG_RESULT([$groff_mm_works])
1065048c85eb7Smrgfi
10651d63fdb69Smrg
1065243d802faSmrg# We have groff, test for HTML dependencies, one command per package
1065343d802faSmrgif test "x$have_groff" = x"yes"; then
1065443d802faSmrg   AC_PATH_PROGS(GS_PATH, [gs gswin32c])
1065543d802faSmrg   AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
1065643d802faSmrg   AC_PATH_PROG(PSSELECT_PATH, [psselect])
1065743d802faSmrg   if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
1065843d802faSmrg      have_groff_html=yes
1065943d802faSmrg   else
1066043d802faSmrg      have_groff_html=no
1066143d802faSmrg      AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
1066243d802faSmrg   fi
1066348c85eb7Smrgfi
10664d63fdb69Smrg
1066543d802faSmrg# Set Automake conditionals for Makefiles
1066643d802faSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
1066743d802faSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
1066843d802faSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
1066943d802faSmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
1067043d802faSmrg]) # XORG_WITH_GROFF
106712a53b785Smrg
1067243d802faSmrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT])
1067343d802faSmrg# ---------------------------------------
1067443d802faSmrg# Minimum version: 1.6.0
1067543d802faSmrg# Minimum version for optional DEFAULT argument: 1.11.0
1067643d802faSmrg# Minimum version for optional MIN-VERSION argument: 1.15.0
1067743d802faSmrg#
1067843d802faSmrg# Documentation tools are not always available on all platforms and sometimes
1067943d802faSmrg# not at the appropriate level. This macro enables a module to test for the
1068043d802faSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
1068143d802faSmrg# the --with-fop option, it allows maximum flexibilty in making decisions
1068243d802faSmrg# as whether or not to use the fop package. When DEFAULT is not specified,
1068343d802faSmrg# --with-fop assumes 'auto'.
1068443d802faSmrg#
1068543d802faSmrg# Interface to module:
1068643d802faSmrg# HAVE_FOP: 	used in makefiles to conditionally generate documentation
1068743d802faSmrg# FOP:	 	returns the path of the fop program found
1068843d802faSmrg#		returns the path set by the user in the environment
1068943d802faSmrg# --with-fop: 	'yes' user instructs the module to use fop
1069043d802faSmrg#		'no' user instructs the module not to use fop
1069143d802faSmrg#
1069243d802faSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
1069343d802faSmrg#
1069443d802faSmrgAC_DEFUN([XORG_WITH_FOP],[
1069543d802faSmrgAC_ARG_VAR([FOP], [Path to fop command])
1069643d802faSmrgm4_define([_defopt], m4_default([$2], [auto]))
1069743d802faSmrgAC_ARG_WITH(fop,
1069843d802faSmrg	AS_HELP_STRING([--with-fop],
1069943d802faSmrg	   [Use fop to regenerate documentation (default: ]_defopt[)]),
1070043d802faSmrg	   [use_fop=$withval], [use_fop=]_defopt)
1070143d802faSmrgm4_undefine([_defopt])
107022a53b785Smrg
1070343d802faSmrgif test "x$use_fop" = x"auto"; then
1070443d802faSmrg   AC_PATH_PROG([FOP], [fop])
1070543d802faSmrg   if test "x$FOP" = "x"; then
1070643d802faSmrg        AC_MSG_WARN([fop not found - documentation targets will be skipped])
1070743d802faSmrg	have_fop=no
1070843d802faSmrg   else
1070943d802faSmrg        have_fop=yes
1071043d802faSmrg   fi
1071143d802faSmrgelif test "x$use_fop" = x"yes" ; then
1071243d802faSmrg   AC_PATH_PROG([FOP], [fop])
1071343d802faSmrg   if test "x$FOP" = "x"; then
1071443d802faSmrg        AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
1071543d802faSmrg   fi
1071643d802faSmrg   have_fop=yes
1071743d802faSmrgelif test "x$use_fop" = x"no" ; then
1071843d802faSmrg   if test "x$FOP" != "x"; then
1071943d802faSmrg      AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
1072043d802faSmrg   fi
1072143d802faSmrg   have_fop=no
1072243d802faSmrgelse
1072343d802faSmrg   AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
1072443d802faSmrgfi
107252a53b785Smrg
1072643d802faSmrg# Test for a minimum version of fop, if provided.
1072743d802faSmrgm4_ifval([$1],
1072843d802faSmrg[if test "$have_fop" = yes; then
1072943d802faSmrg    # scrape the fop version
1073043d802faSmrg    AC_MSG_CHECKING([for fop minimum version])
1073143d802faSmrg    fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3`
1073243d802faSmrg    AC_MSG_RESULT([$fop_version])
1073343d802faSmrg    AS_VERSION_COMPARE([$fop_version], [$1],
1073443d802faSmrg        [if test "x$use_fop" = xauto; then
1073543d802faSmrg            AC_MSG_WARN([fop version $fop_version found, but $1 needed])
1073643d802faSmrg            have_fop=no
1073743d802faSmrg        else
1073843d802faSmrg            AC_MSG_ERROR([fop version $fop_version found, but $1 needed])
1073943d802faSmrg        fi])
1074043d802faSmrgfi])
1074143d802faSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
1074243d802faSmrg]) # XORG_WITH_FOP
10743d63fdb69Smrg
1074443d802faSmrg# XORG_WITH_M4([MIN-VERSION])
1074543d802faSmrg# ---------------------------
1074643d802faSmrg# Minimum version: 1.19.0
1074743d802faSmrg#
1074843d802faSmrg# This macro attempts to locate an m4 macro processor which supports
1074943d802faSmrg# -I option and is only useful for modules relying on M4 in order to
1075043d802faSmrg# expand macros in source code files.
1075143d802faSmrg#
1075243d802faSmrg# Interface to module:
1075343d802faSmrg# M4:	 	returns the path of the m4 program found
1075443d802faSmrg#		returns the path set by the user in the environment
1075543d802faSmrg#
1075643d802faSmrgAC_DEFUN([XORG_WITH_M4], [
1075743d802faSmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4],
1075843d802faSmrg   [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4],
1075943d802faSmrg       [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \
1076043d802faSmrg         ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]],
1076143d802faSmrg   [AC_MSG_ERROR([could not find m4 that supports -I option])],
1076243d802faSmrg   [$PATH:/usr/gnu/bin])])
10763d63fdb69Smrg
1076443d802faSmrgAC_SUBST([M4], [$ac_cv_path_M4])
1076543d802faSmrg]) # XORG_WITH_M4
10766d63fdb69Smrg
1076743d802faSmrg# XORG_WITH_PS2PDF([DEFAULT])
1076843d802faSmrg# ----------------
1076943d802faSmrg# Minimum version: 1.6.0
1077043d802faSmrg# Minimum version for optional DEFAULT argument: 1.11.0
1077143d802faSmrg#
1077243d802faSmrg# Documentation tools are not always available on all platforms and sometimes
1077343d802faSmrg# not at the appropriate level. This macro enables a module to test for the
1077443d802faSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
1077543d802faSmrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
1077643d802faSmrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified,
1077743d802faSmrg# --with-ps2pdf assumes 'auto'.
1077843d802faSmrg#
1077943d802faSmrg# Interface to module:
1078043d802faSmrg# HAVE_PS2PDF: 	used in makefiles to conditionally generate documentation
1078143d802faSmrg# PS2PDF:	returns the path of the ps2pdf program found
1078243d802faSmrg#		returns the path set by the user in the environment
1078343d802faSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
1078443d802faSmrg#		 'no' user instructs the module not to use ps2pdf
1078543d802faSmrg#
1078643d802faSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
1078743d802faSmrg#
1078843d802faSmrgAC_DEFUN([XORG_WITH_PS2PDF],[
1078943d802faSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
1079043d802faSmrgm4_define([_defopt], m4_default([$1], [auto]))
1079143d802faSmrgAC_ARG_WITH(ps2pdf,
1079243d802faSmrg	AS_HELP_STRING([--with-ps2pdf],
1079343d802faSmrg	   [Use ps2pdf to regenerate documentation (default: ]_defopt[)]),
1079443d802faSmrg	   [use_ps2pdf=$withval], [use_ps2pdf=]_defopt)
1079543d802faSmrgm4_undefine([_defopt])
10796d63fdb69Smrg
1079743d802faSmrgif test "x$use_ps2pdf" = x"auto"; then
1079843d802faSmrg   AC_PATH_PROG([PS2PDF], [ps2pdf])
1079943d802faSmrg   if test "x$PS2PDF" = "x"; then
1080043d802faSmrg        AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
1080143d802faSmrg	have_ps2pdf=no
1080243d802faSmrg   else
1080343d802faSmrg        have_ps2pdf=yes
1080443d802faSmrg   fi
1080543d802faSmrgelif test "x$use_ps2pdf" = x"yes" ; then
1080643d802faSmrg   AC_PATH_PROG([PS2PDF], [ps2pdf])
1080743d802faSmrg   if test "x$PS2PDF" = "x"; then
1080843d802faSmrg        AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
1080943d802faSmrg   fi
1081043d802faSmrg   have_ps2pdf=yes
1081143d802faSmrgelif test "x$use_ps2pdf" = x"no" ; then
1081243d802faSmrg   if test "x$PS2PDF" != "x"; then
1081343d802faSmrg      AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
1081443d802faSmrg   fi
1081543d802faSmrg   have_ps2pdf=no
1081643d802faSmrgelse
1081743d802faSmrg   AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
1081843d802faSmrgfi
1081943d802faSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
1082043d802faSmrg]) # XORG_WITH_PS2PDF
10821d63fdb69Smrg
1082243d802faSmrg# XORG_ENABLE_DOCS (enable_docs=yes)
1082343d802faSmrg# ----------------
1082443d802faSmrg# Minimum version: 1.6.0
1082543d802faSmrg#
1082643d802faSmrg# Documentation tools are not always available on all platforms and sometimes
1082743d802faSmrg# not at the appropriate level. This macro enables a builder to skip all
1082843d802faSmrg# documentation targets except traditional man pages.
1082943d802faSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides
1083043d802faSmrg# maximum flexibilty in controlling documentation building.
1083143d802faSmrg# Refer to:
1083243d802faSmrg# XORG_WITH_XMLTO         --with-xmlto
1083343d802faSmrg# XORG_WITH_ASCIIDOC      --with-asciidoc
1083443d802faSmrg# XORG_WITH_DOXYGEN       --with-doxygen
1083543d802faSmrg# XORG_WITH_FOP           --with-fop
1083643d802faSmrg# XORG_WITH_GROFF         --with-groff
1083743d802faSmrg# XORG_WITH_PS2PDF        --with-ps2pdf
1083843d802faSmrg#
1083943d802faSmrg# Interface to module:
1084043d802faSmrg# ENABLE_DOCS: 	  used in makefiles to conditionally generate documentation
1084143d802faSmrg# --enable-docs: 'yes' user instructs the module to generate docs
1084243d802faSmrg#		 'no' user instructs the module not to generate docs
1084343d802faSmrg# parm1:	specify the default value, yes or no.
1084443d802faSmrg#
1084543d802faSmrgAC_DEFUN([XORG_ENABLE_DOCS],[
1084643d802faSmrgm4_define([docs_default], m4_default([$1], [yes]))
1084743d802faSmrgAC_ARG_ENABLE(docs,
1084843d802faSmrg	AS_HELP_STRING([--enable-docs],
1084943d802faSmrg	   [Enable building the documentation (default: ]docs_default[)]),
1085043d802faSmrg	   [build_docs=$enableval], [build_docs=]docs_default)
1085143d802faSmrgm4_undefine([docs_default])
1085243d802faSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
1085343d802faSmrgAC_MSG_CHECKING([whether to build documentation])
1085443d802faSmrgAC_MSG_RESULT([$build_docs])
1085543d802faSmrg]) # XORG_ENABLE_DOCS
10856d63fdb69Smrg
1085743d802faSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
1085843d802faSmrg# ----------------
1085943d802faSmrg# Minimum version: 1.6.0
1086043d802faSmrg#
1086143d802faSmrg# This macro enables a builder to skip all developer documentation.
1086243d802faSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides
1086343d802faSmrg# maximum flexibilty in controlling documentation building.
1086443d802faSmrg# Refer to:
1086543d802faSmrg# XORG_WITH_XMLTO         --with-xmlto
1086643d802faSmrg# XORG_WITH_ASCIIDOC      --with-asciidoc
1086743d802faSmrg# XORG_WITH_DOXYGEN       --with-doxygen
1086843d802faSmrg# XORG_WITH_FOP           --with-fop
1086943d802faSmrg# XORG_WITH_GROFF         --with-groff
1087043d802faSmrg# XORG_WITH_PS2PDF        --with-ps2pdf
1087143d802faSmrg#
1087243d802faSmrg# Interface to module:
1087343d802faSmrg# ENABLE_DEVEL_DOCS:	used in makefiles to conditionally generate developer docs
1087443d802faSmrg# --enable-devel-docs:	'yes' user instructs the module to generate developer docs
1087543d802faSmrg#			'no' user instructs the module not to generate developer docs
1087643d802faSmrg# parm1:		specify the default value, yes or no.
1087743d802faSmrg#
1087843d802faSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
1087943d802faSmrgm4_define([devel_default], m4_default([$1], [yes]))
1088043d802faSmrgAC_ARG_ENABLE(devel-docs,
1088143d802faSmrg	AS_HELP_STRING([--enable-devel-docs],
1088243d802faSmrg	   [Enable building the developer documentation (default: ]devel_default[)]),
1088343d802faSmrg	   [build_devel_docs=$enableval], [build_devel_docs=]devel_default)
1088443d802faSmrgm4_undefine([devel_default])
1088543d802faSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
1088643d802faSmrgAC_MSG_CHECKING([whether to build developer documentation])
1088743d802faSmrgAC_MSG_RESULT([$build_devel_docs])
1088843d802faSmrg]) # XORG_ENABLE_DEVEL_DOCS
10889d63fdb69Smrg
1089043d802faSmrg# XORG_ENABLE_SPECS (enable_specs=yes)
1089143d802faSmrg# ----------------
1089243d802faSmrg# Minimum version: 1.6.0
1089343d802faSmrg#
1089443d802faSmrg# This macro enables a builder to skip all functional specification targets.
1089543d802faSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides
1089643d802faSmrg# maximum flexibilty in controlling documentation building.
1089743d802faSmrg# Refer to:
1089843d802faSmrg# XORG_WITH_XMLTO         --with-xmlto
1089943d802faSmrg# XORG_WITH_ASCIIDOC      --with-asciidoc
1090043d802faSmrg# XORG_WITH_DOXYGEN       --with-doxygen
1090143d802faSmrg# XORG_WITH_FOP           --with-fop
1090243d802faSmrg# XORG_WITH_GROFF         --with-groff
1090343d802faSmrg# XORG_WITH_PS2PDF        --with-ps2pdf
1090443d802faSmrg#
1090543d802faSmrg# Interface to module:
1090643d802faSmrg# ENABLE_SPECS:		used in makefiles to conditionally generate specs
1090743d802faSmrg# --enable-specs:	'yes' user instructs the module to generate specs
1090843d802faSmrg#			'no' user instructs the module not to generate specs
1090943d802faSmrg# parm1:		specify the default value, yes or no.
1091043d802faSmrg#
1091143d802faSmrgAC_DEFUN([XORG_ENABLE_SPECS],[
1091243d802faSmrgm4_define([spec_default], m4_default([$1], [yes]))
1091343d802faSmrgAC_ARG_ENABLE(specs,
1091443d802faSmrg	AS_HELP_STRING([--enable-specs],
1091543d802faSmrg	   [Enable building the specs (default: ]spec_default[)]),
1091643d802faSmrg	   [build_specs=$enableval], [build_specs=]spec_default)
1091743d802faSmrgm4_undefine([spec_default])
1091843d802faSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
1091943d802faSmrgAC_MSG_CHECKING([whether to build functional specifications])
1092043d802faSmrgAC_MSG_RESULT([$build_specs])
1092143d802faSmrg]) # XORG_ENABLE_SPECS
109222a53b785Smrg
1092343d802faSmrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto)
1092443d802faSmrg# ----------------------------------------------
1092543d802faSmrg# Minimum version: 1.13.0
1092643d802faSmrg#
1092743d802faSmrg# This macro enables a builder to enable/disable unit testing
1092843d802faSmrg# It makes no assumption about the test cases implementation
1092943d802faSmrg# Test cases may or may not use Automake "Support for test suites"
1093043d802faSmrg# They may or may not use the software utility library GLib
1093143d802faSmrg#
1093243d802faSmrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL
1093343d802faSmrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib.
1093443d802faSmrg# The variable enable_unit_tests is used by other macros in this file.
1093543d802faSmrg#
1093643d802faSmrg# Interface to module:
1093743d802faSmrg# ENABLE_UNIT_TESTS:	used in makefiles to conditionally build tests
1093843d802faSmrg# enable_unit_tests:    used in configure.ac for additional configuration
1093943d802faSmrg# --enable-unit-tests:	'yes' user instructs the module to build tests
1094043d802faSmrg#			'no' user instructs the module not to build tests
1094143d802faSmrg# parm1:		specify the default value, yes or no.
1094243d802faSmrg#
1094343d802faSmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[
1094443d802faSmrgAC_BEFORE([$0], [XORG_WITH_GLIB])
1094543d802faSmrgAC_BEFORE([$0], [XORG_LD_WRAP])
1094643d802faSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS])
1094743d802faSmrgm4_define([_defopt], m4_default([$1], [auto]))
1094843d802faSmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests],
1094943d802faSmrg	[Enable building unit test cases (default: ]_defopt[)]),
1095043d802faSmrg	[enable_unit_tests=$enableval], [enable_unit_tests=]_defopt)
1095143d802faSmrgm4_undefine([_defopt])
1095243d802faSmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno])
1095343d802faSmrgAC_MSG_CHECKING([whether to build unit test cases])
1095443d802faSmrgAC_MSG_RESULT([$enable_unit_tests])
1095543d802faSmrg]) # XORG_ENABLE_UNIT_TESTS
109562a53b785Smrg
1095743d802faSmrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto)
1095843d802faSmrg# ------------------------------------------------------
1095943d802faSmrg# Minimum version: 1.17.0
1096043d802faSmrg#
1096143d802faSmrg# This macro enables a builder to enable/disable integration testing
1096243d802faSmrg# It makes no assumption about the test cases' implementation
1096343d802faSmrg# Test cases may or may not use Automake "Support for test suites"
1096443d802faSmrg#
1096543d802faSmrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support
1096643d802faSmrg# usually requires less dependencies and may be built and run under less
1096743d802faSmrg# stringent environments than integration tests.
1096843d802faSmrg#
1096943d802faSmrg# Interface to module:
1097043d802faSmrg# ENABLE_INTEGRATION_TESTS:   used in makefiles to conditionally build tests
1097143d802faSmrg# enable_integration_tests:   used in configure.ac for additional configuration
1097243d802faSmrg# --enable-integration-tests: 'yes' user instructs the module to build tests
1097343d802faSmrg#                             'no' user instructs the module not to build tests
1097443d802faSmrg# parm1:                      specify the default value, yes or no.
1097543d802faSmrg#
1097643d802faSmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[
1097743d802faSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS])
1097843d802faSmrgm4_define([_defopt], m4_default([$1], [auto]))
1097943d802faSmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests],
1098043d802faSmrg	[Enable building integration test cases (default: ]_defopt[)]),
1098143d802faSmrg	[enable_integration_tests=$enableval],
1098243d802faSmrg	[enable_integration_tests=]_defopt)
1098343d802faSmrgm4_undefine([_defopt])
1098443d802faSmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS],
1098543d802faSmrg	[test "x$enable_integration_tests" != xno])
1098643d802faSmrgAC_MSG_CHECKING([whether to build unit test cases])
1098743d802faSmrgAC_MSG_RESULT([$enable_integration_tests])
1098843d802faSmrg]) # XORG_ENABLE_INTEGRATION_TESTS
109892a53b785Smrg
1099043d802faSmrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT])
1099143d802faSmrg# ----------------------------------------
1099243d802faSmrg# Minimum version: 1.13.0
1099343d802faSmrg#
1099443d802faSmrg# GLib is a library which provides advanced data structures and functions.
1099543d802faSmrg# This macro enables a module to test for the presence of Glib.
1099643d802faSmrg#
1099743d802faSmrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing.
1099843d802faSmrg# Otherwise the value of $enable_unit_tests is blank.
1099943d802faSmrg#
1100043d802faSmrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit
1100143d802faSmrg# test support usually requires less dependencies and may be built and run under
1100243d802faSmrg# less stringent environments than integration tests.
1100343d802faSmrg#
1100443d802faSmrg# Interface to module:
1100543d802faSmrg# HAVE_GLIB: used in makefiles to conditionally build targets
1100643d802faSmrg# with_glib: used in configure.ac to know if GLib has been found
1100743d802faSmrg# --with-glib:	'yes' user instructs the module to use glib
1100843d802faSmrg#		'no' user instructs the module not to use glib
1100943d802faSmrg#
1101043d802faSmrgAC_DEFUN([XORG_WITH_GLIB],[
1101143d802faSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG])
1101243d802faSmrgm4_define([_defopt], m4_default([$2], [auto]))
1101343d802faSmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib],
1101443d802faSmrg	[Use GLib library for unit testing (default: ]_defopt[)]),
1101543d802faSmrg	[with_glib=$withval], [with_glib=]_defopt)
1101643d802faSmrgm4_undefine([_defopt])
110172a53b785Smrg
1101843d802faSmrghave_glib=no
1101943d802faSmrg# Do not probe GLib if user explicitly disabled unit testing
1102043d802faSmrgif test "x$enable_unit_tests" != x"no"; then
1102143d802faSmrg  # Do not probe GLib if user explicitly disabled it
1102243d802faSmrg  if test "x$with_glib" != x"no"; then
1102343d802faSmrg    m4_ifval(
1102443d802faSmrg      [$1],
1102543d802faSmrg      [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])],
1102643d802faSmrg      [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])]
1102743d802faSmrg    )
1102843d802faSmrg  fi
1102948c85eb7Smrgfi
11030d63fdb69Smrg
1103143d802faSmrg# Not having GLib when unit testing has been explicitly requested is an error
1103243d802faSmrgif test "x$enable_unit_tests" = x"yes"; then
1103343d802faSmrg  if test "x$have_glib" = x"no"; then
1103443d802faSmrg    AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
1103543d802faSmrg  fi
1103643d802faSmrgfi
11037d63fdb69Smrg
1103843d802faSmrg# Having unit testing disabled when GLib has been explicitly requested is an error
1103943d802faSmrgif test "x$enable_unit_tests" = x"no"; then
1104043d802faSmrg  if test "x$with_glib" = x"yes"; then
1104143d802faSmrg    AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
1104243d802faSmrg  fi
1104343d802faSmrgfi
11044d63fdb69Smrg
1104543d802faSmrg# Not having GLib when it has been explicitly requested is an error
1104643d802faSmrgif test "x$with_glib" = x"yes"; then
1104743d802faSmrg  if test "x$have_glib" = x"no"; then
1104843d802faSmrg    AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found])
1104943d802faSmrg  fi
1105043d802faSmrgfi
11051d63fdb69Smrg
1105243d802faSmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes])
1105343d802faSmrg]) # XORG_WITH_GLIB
11054d63fdb69Smrg
1105543d802faSmrg# XORG_LD_WRAP([required|optional])
1105643d802faSmrg# ---------------------------------
1105743d802faSmrg# Minimum version: 1.13.0
1105843d802faSmrg#
1105943d802faSmrg# Check if linker supports -wrap, passed via compiler flags
1106043d802faSmrg#
1106143d802faSmrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing.
1106243d802faSmrg# Otherwise the value of $enable_unit_tests is blank.
1106343d802faSmrg#
1106443d802faSmrg# Argument added in 1.16.0 - default is "required", to match existing behavior
1106543d802faSmrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not
1106643d802faSmrg# available, an argument of "optional" allows use when some unit tests require
1106743d802faSmrg# ld -wrap and others do not.
1106843d802faSmrg#
1106943d802faSmrgAC_DEFUN([XORG_LD_WRAP],[
1107043d802faSmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no],
1107143d802faSmrg    [AC_LANG_PROGRAM([#include <stdlib.h>
1107243d802faSmrg                      void __wrap_exit(int status) { return; }],
1107343d802faSmrg                     [exit(0);])])
1107443d802faSmrg# Not having ld wrap when unit testing has been explicitly requested is an error
1107543d802faSmrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then
1107643d802faSmrg  if test "x$have_ld_wrap" = x"no"; then
1107743d802faSmrg    AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available])
1107843d802faSmrg  fi
1107943d802faSmrgfi
1108043d802faSmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes])
1108143d802faSmrg#
1108243d802faSmrg]) # XORG_LD_WRAP
11083d63fdb69Smrg
1108443d802faSmrg# XORG_CHECK_LINKER_FLAGS
1108543d802faSmrg# -----------------------
1108643d802faSmrg# SYNOPSIS
1108743d802faSmrg#
1108843d802faSmrg#   XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE])
1108943d802faSmrg#
1109043d802faSmrg# DESCRIPTION
1109143d802faSmrg#
1109243d802faSmrg#   Check whether the given linker FLAGS work with the current language's
1109343d802faSmrg#   linker, or whether they give an error.
1109443d802faSmrg#
1109543d802faSmrg#   ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
1109643d802faSmrg#   success/failure.
1109743d802faSmrg#
1109843d802faSmrg#   PROGRAM-SOURCE is the program source to link with, if needed
1109943d802faSmrg#
1110043d802faSmrg#   NOTE: Based on AX_CHECK_COMPILER_FLAGS.
1110143d802faSmrg#
1110243d802faSmrg# LICENSE
1110343d802faSmrg#
1110443d802faSmrg#   Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org>
1110543d802faSmrg#   Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu>
1110643d802faSmrg#   Copyright (c) 2009 Matteo Frigo
1110743d802faSmrg#
1110843d802faSmrg#   This program is free software: you can redistribute it and/or modify it
1110943d802faSmrg#   under the terms of the GNU General Public License as published by the
1111043d802faSmrg#   Free Software Foundation, either version 3 of the License, or (at your
1111143d802faSmrg#   option) any later version.
1111243d802faSmrg#
1111343d802faSmrg#   This program is distributed in the hope that it will be useful, but
1111443d802faSmrg#   WITHOUT ANY WARRANTY; without even the implied warranty of
1111543d802faSmrg#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
1111643d802faSmrg#   Public License for more details.
1111743d802faSmrg#
1111843d802faSmrg#   You should have received a copy of the GNU General Public License along
1111943d802faSmrg#   with this program. If not, see <http://www.gnu.org/licenses/>.
1112043d802faSmrg#
1112143d802faSmrg#   As a special exception, the respective Autoconf Macro's copyright owner
1112243d802faSmrg#   gives unlimited permission to copy, distribute and modify the configure
1112343d802faSmrg#   scripts that are the output of Autoconf when processing the Macro. You
1112443d802faSmrg#   need not follow the terms of the GNU General Public License when using
1112543d802faSmrg#   or distributing such scripts, even though portions of the text of the
1112643d802faSmrg#   Macro appear in them. The GNU General Public License (GPL) does govern
1112743d802faSmrg#   all other use of the material that constitutes the Autoconf Macro.
1112843d802faSmrg#
1112943d802faSmrg#   This special exception to the GPL applies to versions of the Autoconf
1113043d802faSmrg#   Macro released by the Autoconf Archive. When you make and distribute a
1113143d802faSmrg#   modified version of the Autoconf Macro, you may extend this special
1113243d802faSmrg#   exception to the GPL to apply to your modified version as well.#
1113343d802faSmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS],
1113443d802faSmrg[AC_MSG_CHECKING([whether the linker accepts $1])
1113543d802faSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname:
1113643d802faSmrgAS_LITERAL_IF([$1],
1113743d802faSmrg  [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [
1113843d802faSmrg      ax_save_FLAGS=$LDFLAGS
1113943d802faSmrg      LDFLAGS="$1"
1114043d802faSmrg      AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])],
1114143d802faSmrg        AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
1114243d802faSmrg        AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
1114343d802faSmrg      LDFLAGS=$ax_save_FLAGS])],
1114443d802faSmrg  [ax_save_FLAGS=$LDFLAGS
1114543d802faSmrg   LDFLAGS="$1"
1114643d802faSmrg   AC_LINK_IFELSE([AC_LANG_PROGRAM()],
1114743d802faSmrg     eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
1114843d802faSmrg     eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
1114943d802faSmrg   LDFLAGS=$ax_save_FLAGS])
1115043d802faSmrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1])
1115143d802faSmrgAC_MSG_RESULT($xorg_check_linker_flags)
1115243d802faSmrgif test "x$xorg_check_linker_flags" = xyes; then
1115343d802faSmrg	m4_default([$2], :)
1115443d802faSmrgelse
1115543d802faSmrg	m4_default([$3], :)
1115643d802faSmrgfi
1115743d802faSmrg]) # XORG_CHECK_LINKER_FLAGS
1115855acc8fcSmrg
1115943d802faSmrg# XORG_MEMORY_CHECK_FLAGS
1116043d802faSmrg# -----------------------
1116143d802faSmrg# Minimum version: 1.16.0
1116243d802faSmrg#
1116343d802faSmrg# This macro attempts to find appropriate memory checking functionality
1116443d802faSmrg# for various platforms which unit testing code may use to catch various
1116543d802faSmrg# forms of memory allocation and access errors in testing.
1116643d802faSmrg#
1116743d802faSmrg# Interface to module:
1116843d802faSmrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging
1116943d802faSmrg#                         Usually added to TESTS_ENVIRONMENT in Makefile.am
1117043d802faSmrg#
1117143d802faSmrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim.
1117243d802faSmrg#
1117343d802faSmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[
1117455acc8fcSmrg
1117543d802faSmrgAC_REQUIRE([AC_CANONICAL_HOST])
1117643d802faSmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV],
1117743d802faSmrg           [Environment variables to enable memory checking in tests])
1117855acc8fcSmrg
1117943d802faSmrg# Check for different types of support on different platforms
1118043d802faSmrgcase $host_os in
1118143d802faSmrg    solaris*)
1118243d802faSmrg        AC_CHECK_LIB([umem], [umem_alloc],
1118343d802faSmrg            [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default'])
111842a53b785Smrg        ;;
1118543d802faSmrg    *-gnu*) # GNU libc - Value is used as a single byte bit pattern,
1118643d802faSmrg        # both directly and inverted, so should not be 0 or 255.
1118743d802faSmrg        malloc_debug_env='MALLOC_PERTURB_=15'
111882a53b785Smrg        ;;
1118943d802faSmrg    darwin*)
1119043d802faSmrg        malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib'
1119143d802faSmrg        ;;
1119243d802faSmrg    *bsd*)
1119343d802faSmrg        malloc_debug_env='MallocPreScribble=1 MallocScribble=1'
1119443d802faSmrg        ;;
1119543d802faSmrgesac
1119648c85eb7Smrg
1119743d802faSmrg# User supplied flags override default flags
1119843d802faSmrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then
1119943d802faSmrg    malloc_debug_env="$XORG_MALLOC_DEBUG_ENV"
1120043d802faSmrgfi
1120148c85eb7Smrg
1120243d802faSmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env])
1120343d802faSmrg]) # XORG_WITH_LINT
1120448c85eb7Smrg
1120543d802faSmrg# XORG_CHECK_MALLOC_ZERO
1120643d802faSmrg# ----------------------
1120743d802faSmrg# Minimum version: 1.0.0
1120843d802faSmrg#
1120943d802faSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
1121043d802faSmrg# malloc(0) returns NULL.  Packages should add one of these cflags to
1121143d802faSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
1121243d802faSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
1121343d802faSmrgAC_ARG_ENABLE(malloc0returnsnull,
1121443d802faSmrg	AS_HELP_STRING([--enable-malloc0returnsnull],
1121543d802faSmrg		       [malloc(0) returns NULL (default: auto)]),
1121643d802faSmrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
1121743d802faSmrg	[MALLOC_ZERO_RETURNS_NULL=auto])
1121848c85eb7Smrg
1121943d802faSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
1122043d802faSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
1122143d802faSmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null],
1122243d802faSmrg	[AC_RUN_IFELSE([AC_LANG_PROGRAM([
1122343d802faSmrg#include <stdlib.h>
1122443d802faSmrg],[
1122543d802faSmrg    char *m0, *r0, *c0, *p;
1122643d802faSmrg    m0 = malloc(0);
1122743d802faSmrg    p = malloc(10);
1122843d802faSmrg    r0 = realloc(p,0);
1122943d802faSmrg    c0 = calloc(0,10);
1123043d802faSmrg    exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1);
1123143d802faSmrg])],
1123243d802faSmrg		[xorg_cv_malloc0_returns_null=yes],
1123343d802faSmrg		[xorg_cv_malloc0_returns_null=no])])
1123443d802faSmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null
1123543d802faSmrgfi
1123643d802faSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
1123748c85eb7Smrg
1123843d802faSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
1123943d802faSmrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
1124043d802faSmrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
1124143d802faSmrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
1124243d802faSmrgelse
1124343d802faSmrg	MALLOC_ZERO_CFLAGS=""
1124443d802faSmrg	XMALLOC_ZERO_CFLAGS=""
1124543d802faSmrg	XTMALLOC_ZERO_CFLAGS=""
1124643d802faSmrgfi
11247d63fdb69Smrg
1124843d802faSmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
1124943d802faSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
1125043d802faSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
1125143d802faSmrg]) # XORG_CHECK_MALLOC_ZERO
1125248c85eb7Smrg
1125343d802faSmrg# XORG_WITH_LINT()
1125443d802faSmrg# ----------------
1125543d802faSmrg# Minimum version: 1.1.0
1125643d802faSmrg#
1125743d802faSmrg# This macro enables the use of a tool that flags some suspicious and
1125843d802faSmrg# non-portable constructs (likely to be bugs) in C language source code.
1125943d802faSmrg# It will attempt to locate the tool and use appropriate options.
1126043d802faSmrg# There are various lint type tools on different platforms.
1126143d802faSmrg#
1126243d802faSmrg# Interface to module:
1126343d802faSmrg# LINT:		returns the path to the tool found on the platform
1126443d802faSmrg#		or the value set to LINT on the configure cmd line
1126543d802faSmrg#		also an Automake conditional
1126643d802faSmrg# LINT_FLAGS:	an Automake variable with appropriate flags
1126743d802faSmrg#
1126843d802faSmrg# --with-lint:	'yes' user instructs the module to use lint
1126943d802faSmrg#		'no' user instructs the module not to use lint (default)
1127043d802faSmrg#
1127143d802faSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
1127243d802faSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim.
1127343d802faSmrg#
1127443d802faSmrgAC_DEFUN([XORG_WITH_LINT],[
1127548c85eb7Smrg
1127643d802faSmrgAC_ARG_VAR([LINT], [Path to a lint-style command])
1127743d802faSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
1127843d802faSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
1127943d802faSmrg		[Use a lint-style source code checker (default: disabled)])],
1128043d802faSmrg		[use_lint=$withval], [use_lint=no])
112812a53b785Smrg
1128243d802faSmrg# Obtain platform specific info like program name and options
1128343d802faSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris
1128443d802faSmrgcase $host_os in
1128543d802faSmrg  *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
1128643d802faSmrg	lint_name=splint
1128743d802faSmrg	lint_options="-badflag"
1128843d802faSmrg	;;
1128943d802faSmrg  *freebsd* | *netbsd*)
1129043d802faSmrg	lint_name=lint
1129143d802faSmrg	lint_options="-u -b"
1129243d802faSmrg	;;
1129343d802faSmrg  *solaris*)
1129443d802faSmrg	lint_name=lint
1129543d802faSmrg	lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
1129643d802faSmrg	;;
1129743d802faSmrgesac
112982a53b785Smrg
1129943d802faSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user)
1130043d802faSmrgif test "x$use_lint" = x"yes" ; then
1130143d802faSmrg   AC_PATH_PROG([LINT], [$lint_name])
1130243d802faSmrg   if test "x$LINT" = "x"; then
1130343d802faSmrg        AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
1130443d802faSmrg   fi
1130543d802faSmrgelif test "x$use_lint" = x"no" ; then
1130643d802faSmrg   if test "x$LINT" != "x"; then
1130743d802faSmrg      AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
1130843d802faSmrg   fi
1130943d802faSmrgelse
1131043d802faSmrg   AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
1131148c85eb7Smrgfi
1131255acc8fcSmrg
1131343d802faSmrg# User supplied flags override default flags
1131443d802faSmrgif test "x$LINT_FLAGS" != "x"; then
1131543d802faSmrg   lint_options=$LINT_FLAGS
1131643d802faSmrgfi
1131748c85eb7Smrg
1131843d802faSmrgAC_SUBST([LINT_FLAGS],[$lint_options])
1131943d802faSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x])
1132048c85eb7Smrg
1132143d802faSmrg]) # XORG_WITH_LINT
1132248c85eb7Smrg
1132343d802faSmrg# XORG_LINT_LIBRARY(LIBNAME)
1132443d802faSmrg# --------------------------
1132543d802faSmrg# Minimum version: 1.1.0
1132643d802faSmrg#
1132743d802faSmrg# Sets up flags for building lint libraries for checking programs that call
1132843d802faSmrg# functions in the library.
1132943d802faSmrg#
1133043d802faSmrg# Interface to module:
1133143d802faSmrg# LINTLIB		- Automake variable with the name of lint library file to make
1133243d802faSmrg# MAKE_LINT_LIB		- Automake conditional
1133343d802faSmrg#
1133443d802faSmrg# --enable-lint-library:  - 'yes' user instructs the module to created a lint library
1133543d802faSmrg#			  - 'no' user instructs the module not to create a lint library (default)
1133655acc8fcSmrg
1133743d802faSmrgAC_DEFUN([XORG_LINT_LIBRARY],[
1133843d802faSmrgAC_REQUIRE([XORG_WITH_LINT])
1133943d802faSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
1134043d802faSmrg	[Create lint library (default: disabled)])],
1134143d802faSmrg	[make_lint_lib=$enableval], [make_lint_lib=no])
1134255acc8fcSmrg
1134343d802faSmrgif test "x$make_lint_lib" = x"yes" ; then
1134443d802faSmrg   LINTLIB=llib-l$1.ln
1134543d802faSmrg   if test "x$LINT" = "x"; then
1134643d802faSmrg        AC_MSG_ERROR([Cannot make lint library without --with-lint])
1134743d802faSmrg   fi
1134843d802faSmrgelif test "x$make_lint_lib" != x"no" ; then
1134943d802faSmrg   AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
1135043d802faSmrgfi
11351d63fdb69Smrg
1135243d802faSmrgAC_SUBST(LINTLIB)
1135343d802faSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
11354d63fdb69Smrg
1135543d802faSmrg]) # XORG_LINT_LIBRARY
1135652fd71cdSmrg
1135743d802faSmrg# XORG_COMPILER_BRAND
1135843d802faSmrg# -------------------
1135943d802faSmrg# Minimum version: 1.14.0
1136043d802faSmrg#
1136143d802faSmrg# Checks for various brands of compilers and sets flags as appropriate:
1136243d802faSmrg#   GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes"
1136343d802faSmrg#   GNU g++ - relies on AC_PROG_CXX to set GXX to "yes"
1136443d802faSmrg#   clang compiler - sets CLANGCC to "yes"
1136543d802faSmrg#   Intel compiler - sets INTELCC to "yes"
1136643d802faSmrg#   Sun/Oracle Solaris Studio cc - sets SUNCC to "yes"
1136743d802faSmrg#
1136843d802faSmrgAC_DEFUN([XORG_COMPILER_BRAND], [
1136943d802faSmrgAC_LANG_CASE(
1137043d802faSmrg	[C], [
1137143d802faSmrg		AC_REQUIRE([AC_PROG_CC_C99])
1137243d802faSmrg	],
1137343d802faSmrg	[C++], [
1137443d802faSmrg		AC_REQUIRE([AC_PROG_CXX])
1137543d802faSmrg	]
1137643d802faSmrg)
1137743d802faSmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"])
1137843d802faSmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
1137943d802faSmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
1138043d802faSmrg]) # XORG_COMPILER_BRAND
1138152fd71cdSmrg
1138243d802faSmrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...])
1138343d802faSmrg# ---------------
1138443d802faSmrg# Minimum version: 1.16.0
1138543d802faSmrg#
1138643d802faSmrg# Test if the compiler works when passed the given flag as a command line argument.
1138743d802faSmrg# If it succeeds, the flag is appeneded to the given variable.  If not, it tries the
1138843d802faSmrg# next flag in the list until there are no more options.
1138943d802faSmrg#
1139043d802faSmrg# Note that this does not guarantee that the compiler supports the flag as some
1139143d802faSmrg# compilers will simply ignore arguments that they do not understand, but we do
1139243d802faSmrg# attempt to weed out false positives by using -Werror=unknown-warning-option and
1139343d802faSmrg# -Werror=unused-command-line-argument
1139443d802faSmrg#
1139543d802faSmrgAC_DEFUN([XORG_TESTSET_CFLAG], [
1139643d802faSmrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
1139743d802faSmrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
1139852fd71cdSmrg
1139943d802faSmrgAC_LANG_COMPILER_REQUIRE
1140052fd71cdSmrg
1140143d802faSmrgAC_LANG_CASE(
1140243d802faSmrg	[C], [
1140343d802faSmrg		AC_REQUIRE([AC_PROG_CC_C99])
1140443d802faSmrg		define([PREFIX], [C])
1140543d802faSmrg		define([CACHE_PREFIX], [cc])
1140643d802faSmrg		define([COMPILER], [$CC])
1140743d802faSmrg	],
1140843d802faSmrg	[C++], [
1140943d802faSmrg		define([PREFIX], [CXX])
1141043d802faSmrg		define([CACHE_PREFIX], [cxx])
1141143d802faSmrg		define([COMPILER], [$CXX])
1141243d802faSmrg	]
1141343d802faSmrg)
1141452fd71cdSmrg
1141543d802faSmrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]"
1141652fd71cdSmrg
1141743d802faSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then
1141843d802faSmrg	PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
1141943d802faSmrg	AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option],
1142043d802faSmrg			[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option],
1142143d802faSmrg			AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
1142243d802faSmrg					  [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes],
1142343d802faSmrg					  [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no]))
1142443d802faSmrg	[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option]
1142543d802faSmrg	PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
1142643d802faSmrgfi
114272a53b785Smrg
1142843d802faSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then
1142943d802faSmrg	if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then
1143043d802faSmrg		PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
1143143d802faSmrg	fi
1143243d802faSmrg	PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
1143343d802faSmrg	AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument],
1143443d802faSmrg			[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument],
1143543d802faSmrg			AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
1143643d802faSmrg					  [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes],
1143743d802faSmrg					  [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no]))
1143843d802faSmrg	[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument]
1143943d802faSmrg	PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
1144043d802faSmrgfi
114412a53b785Smrg
1144243d802faSmrgfound="no"
1144343d802faSmrgm4_foreach([flag], m4_cdr($@), [
1144443d802faSmrg	if test $found = "no" ; then
1144543d802faSmrg		if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then
1144643d802faSmrg			PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
1144743d802faSmrg		fi
114482a53b785Smrg
1144943d802faSmrg		if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then
1145043d802faSmrg			PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
1145143d802faSmrg		fi
114522a53b785Smrg
1145343d802faSmrg		PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag["
114542a53b785Smrg
1145543d802faSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname
1145643d802faSmrg		AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[])
1145743d802faSmrg		cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[])
1145843d802faSmrg		AC_CACHE_VAL($cacheid,
1145943d802faSmrg			     [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])],
1146043d802faSmrg					     [eval $cacheid=yes],
1146143d802faSmrg					     [eval $cacheid=no])])
1146252fd71cdSmrg
1146343d802faSmrg		PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
1146452fd71cdSmrg
1146543d802faSmrg		eval supported=\$$cacheid
1146643d802faSmrg		AC_MSG_RESULT([$supported])
1146743d802faSmrg		if test "$supported" = "yes" ; then
1146843d802faSmrg			$1="$$1 ]flag["
1146943d802faSmrg			found="yes"
1147043d802faSmrg		fi
1147143d802faSmrg	fi
1147243d802faSmrg])
1147343d802faSmrg]) # XORG_TESTSET_CFLAG
1147452fd71cdSmrg
1147543d802faSmrg# XORG_COMPILER_FLAGS
1147643d802faSmrg# ---------------
1147743d802faSmrg# Minimum version: 1.16.0
1147843d802faSmrg#
1147943d802faSmrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line
1148043d802faSmrg# arguments supported by the selected compiler which do NOT alter the generated
1148143d802faSmrg# code.  These arguments will cause the compiler to print various warnings
1148243d802faSmrg# during compilation AND turn a conservative set of warnings into errors.
1148343d802faSmrg#
1148443d802faSmrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in
1148543d802faSmrg# future versions of util-macros as options are added to new compilers.
1148643d802faSmrg#
1148743d802faSmrgAC_DEFUN([XORG_COMPILER_FLAGS], [
1148843d802faSmrgAC_REQUIRE([XORG_COMPILER_BRAND])
1148952fd71cdSmrg
1149043d802faSmrgAC_ARG_ENABLE(selective-werror,
1149143d802faSmrg              AS_HELP_STRING([--disable-selective-werror],
1149243d802faSmrg                             [Turn off selective compiler errors. (default: enabled)]),
1149343d802faSmrg              [SELECTIVE_WERROR=$enableval],
1149443d802faSmrg              [SELECTIVE_WERROR=yes])
1149552fd71cdSmrg
1149643d802faSmrgAC_LANG_CASE(
1149743d802faSmrg        [C], [
1149843d802faSmrg                define([PREFIX], [C])
1149943d802faSmrg        ],
1150043d802faSmrg        [C++], [
1150143d802faSmrg                define([PREFIX], [CXX])
1150243d802faSmrg        ]
1150343d802faSmrg)
1150443d802faSmrg# -v is too short to test reliably with XORG_TESTSET_CFLAG
1150543d802faSmrgif test "x$SUNCC" = "xyes"; then
1150643d802faSmrg    [BASE_]PREFIX[FLAGS]="-v"
1150743d802faSmrgelse
1150843d802faSmrg    [BASE_]PREFIX[FLAGS]=""
115092a53b785Smrgfi
1151052fd71cdSmrg
1151143d802faSmrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS
1151243d802faSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall])
1151343d802faSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith])
1151443d802faSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations])
1151543d802faSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat])
1151643d802faSmrg
1151743d802faSmrgAC_LANG_CASE(
1151843d802faSmrg	[C], [
1151943d802faSmrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes])
1152043d802faSmrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes])
1152143d802faSmrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs])
1152243d802faSmrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast])
1152343d802faSmrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd])
1152443d802faSmrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement])
1152543d802faSmrg	]
1152643d802faSmrg)
1152752fd71cdSmrg
1152843d802faSmrg# This chunk adds additional warnings that could catch undesired effects.
1152943d802faSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused])
1153043d802faSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized])
1153143d802faSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow])
1153243d802faSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn])
1153343d802faSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute])
1153443d802faSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls])
1153543d802faSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
1153652fd71cdSmrg
1153743d802faSmrg# These are currently disabled because they are noisy.  They will be enabled
1153843d802faSmrg# in the future once the codebase is sufficiently modernized to silence
1153943d802faSmrg# them.  For now, I don't want them to drown out the other warnings.
1154043d802faSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses])
1154143d802faSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
1154243d802faSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
1154352fd71cdSmrg
1154443d802faSmrg# Turn some warnings into errors, so we don't accidently get successful builds
1154543d802faSmrg# when there are problems that should be fixed.
1154652fd71cdSmrg
1154743d802faSmrgif test "x$SELECTIVE_WERROR" = "xyes" ; then
1154843d802faSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED])
1154943d802faSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull])
1155043d802faSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self])
1155143d802faSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main])
1155243d802faSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces])
1155343d802faSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point])
1155443d802faSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT])
1155543d802faSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs])
1155643d802faSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds])
1155743d802faSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings])
1155843d802faSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address])
1155943d802faSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION])
1156043d802faSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION
1156143d802faSmrgelse
1156243d802faSmrgAC_MSG_WARN([You have chosen not to turn some select compiler warnings into errors.  This should not be necessary.  Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT])
1156343d802faSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit])
1156443d802faSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull])
1156543d802faSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self])
1156643d802faSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain])
1156743d802faSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces])
1156843d802faSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point])
1156943d802faSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type])
1157043d802faSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs])
1157143d802faSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds])
1157243d802faSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings])
1157343d802faSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress])
1157443d802faSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast])
1157543d802faSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast])
1157643d802faSmrgfi
1157752fd71cdSmrg
1157843d802faSmrgAC_SUBST([BASE_]PREFIX[FLAGS])
1157943d802faSmrg]) # XORG_COMPILER_FLAGS
1158052fd71cdSmrg
1158143d802faSmrg# XORG_CWARNFLAGS
1158243d802faSmrg# ---------------
1158343d802faSmrg# Minimum version: 1.2.0
1158443d802faSmrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead)
1158543d802faSmrg#
1158643d802faSmrg# Defines CWARNFLAGS to enable C compiler warnings.
1158743d802faSmrg#
1158843d802faSmrg# This function is deprecated because it defines -fno-strict-aliasing
1158943d802faSmrg# which alters the code generated by the compiler.  If -fno-strict-aliasing
1159043d802faSmrg# is needed, then it should be added explicitly in the module when
1159143d802faSmrg# it is updated to use BASE_CFLAGS.
1159243d802faSmrg#
1159343d802faSmrgAC_DEFUN([XORG_CWARNFLAGS], [
1159443d802faSmrgAC_REQUIRE([XORG_COMPILER_FLAGS])
1159543d802faSmrgAC_REQUIRE([XORG_COMPILER_BRAND])
1159643d802faSmrgAC_LANG_CASE(
1159743d802faSmrg	[C], [
1159843d802faSmrg		CWARNFLAGS="$BASE_CFLAGS"
1159943d802faSmrg		if  test "x$GCC" = xyes ; then
1160043d802faSmrg		    CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing"
1160143d802faSmrg		fi
1160243d802faSmrg		AC_SUBST(CWARNFLAGS)
1160343d802faSmrg	]
1160443d802faSmrg)
1160543d802faSmrg]) # XORG_CWARNFLAGS
1160652fd71cdSmrg
1160743d802faSmrg# XORG_STRICT_OPTION
1160843d802faSmrg# -----------------------
1160943d802faSmrg# Minimum version: 1.3.0
1161043d802faSmrg#
1161143d802faSmrg# Add configure option to enable strict compilation flags, such as treating
1161243d802faSmrg# warnings as fatal errors.
1161343d802faSmrg# If --enable-strict-compilation is passed to configure, adds strict flags to
1161443d802faSmrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS.
1161543d802faSmrg#
1161643d802faSmrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or
1161743d802faSmrg# when strict compilation is unconditionally desired.
1161843d802faSmrgAC_DEFUN([XORG_STRICT_OPTION], [
1161943d802faSmrgAC_REQUIRE([XORG_CWARNFLAGS])
1162043d802faSmrgAC_REQUIRE([XORG_COMPILER_FLAGS])
1162152fd71cdSmrg
1162243d802faSmrgAC_ARG_ENABLE(strict-compilation,
1162343d802faSmrg			  AS_HELP_STRING([--enable-strict-compilation],
1162443d802faSmrg			  [Enable all warnings from compiler and make them errors (default: disabled)]),
1162543d802faSmrg			  [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
1162652fd71cdSmrg
1162743d802faSmrgAC_LANG_CASE(
1162843d802faSmrg        [C], [
1162943d802faSmrg                define([PREFIX], [C])
1163043d802faSmrg        ],
1163143d802faSmrg        [C++], [
1163243d802faSmrg                define([PREFIX], [CXX])
1163343d802faSmrg        ]
1163443d802faSmrg)
1163552fd71cdSmrg
1163643d802faSmrg[STRICT_]PREFIX[FLAGS]=""
1163743d802faSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic])
1163843d802faSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn])
1163952fd71cdSmrg
1164043d802faSmrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not
1164143d802faSmrg# activate it with -Werror, so we add it here explicitly.
1164243d802faSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes])
1164352fd71cdSmrg
1164443d802faSmrgif test "x$STRICT_COMPILE" = "xyes"; then
1164543d802faSmrg    [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]"
1164643d802faSmrg    AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"])
1164743d802faSmrgfi
1164843d802faSmrgAC_SUBST([STRICT_]PREFIX[FLAGS])
1164943d802faSmrgAC_SUBST([BASE_]PREFIX[FLAGS])
1165043d802faSmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS]))
1165143d802faSmrg]) # XORG_STRICT_OPTION
1165252fd71cdSmrg
1165343d802faSmrg# XORG_DEFAULT_OPTIONS
1165443d802faSmrg# --------------------
1165543d802faSmrg# Minimum version: 1.3.0
1165643d802faSmrg#
1165743d802faSmrg# Defines default options for X.Org modules.
1165843d802faSmrg#
1165943d802faSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [
1166043d802faSmrgAC_REQUIRE([AC_PROG_INSTALL])
1166143d802faSmrgXORG_COMPILER_FLAGS
1166243d802faSmrgXORG_CWARNFLAGS
1166343d802faSmrgXORG_STRICT_OPTION
1166443d802faSmrgXORG_RELEASE_VERSION
1166543d802faSmrgXORG_CHANGELOG
1166643d802faSmrgXORG_INSTALL
1166743d802faSmrgXORG_MANPAGE_SECTIONS
1166843d802faSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
1166943d802faSmrg    [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
1167043d802faSmrg]) # XORG_DEFAULT_OPTIONS
1167152fd71cdSmrg
1167243d802faSmrg# XORG_INSTALL()
116732a53b785Smrg# ----------------
1167443d802faSmrg# Minimum version: 1.4.0
1167543d802faSmrg#
1167643d802faSmrg# Defines the variable INSTALL_CMD as the command to copy
1167743d802faSmrg# INSTALL from $prefix/share/util-macros.
1167843d802faSmrg#
1167943d802faSmrgAC_DEFUN([XORG_INSTALL], [
1168043d802faSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG])
1168143d802faSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
1168243d802faSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
1168343d802faSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
1168443d802faSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \
1168543d802faSmrgtouch \$(top_srcdir)/INSTALL; \
1168643d802faSmrgecho 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))"
1168743d802faSmrgAC_SUBST([INSTALL_CMD])
1168843d802faSmrg]) # XORG_INSTALL
1168943d802faSmrgdnl Copyright 2005 Red Hat, Inc
1169043d802faSmrgdnl
1169143d802faSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its
1169243d802faSmrgdnl documentation for any purpose is hereby granted without fee, provided that
1169343d802faSmrgdnl the above copyright notice appear in all copies and that both that
1169443d802faSmrgdnl copyright notice and this permission notice appear in supporting
1169543d802faSmrgdnl documentation.
1169643d802faSmrgdnl
1169743d802faSmrgdnl The above copyright notice and this permission notice shall be included
1169843d802faSmrgdnl in all copies or substantial portions of the Software.
1169943d802faSmrgdnl
1170043d802faSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
1170143d802faSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1170243d802faSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
1170343d802faSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
1170443d802faSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
1170543d802faSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
1170643d802faSmrgdnl OTHER DEALINGS IN THE SOFTWARE.
1170743d802faSmrgdnl
1170843d802faSmrgdnl Except as contained in this notice, the name of the copyright holders shall
1170943d802faSmrgdnl not be used in advertising or otherwise to promote the sale, use or
1171043d802faSmrgdnl other dealings in this Software without prior written authorization
1171143d802faSmrgdnl from the copyright holders.
1171243d802faSmrgdnl
1171352fd71cdSmrg
1171443d802faSmrg# XORG_RELEASE_VERSION
1171543d802faSmrg# --------------------
1171643d802faSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
1171752fd71cdSmrg
1171843d802faSmrgAC_DEFUN([XORG_RELEASE_VERSION],[
1171943d802faSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
1172043d802faSmrg		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
1172143d802faSmrg		[Major version of this package])
1172243d802faSmrg	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
1172343d802faSmrg	if test "x$PVM" = "x"; then
1172443d802faSmrg		PVM="0"
1172543d802faSmrg	fi
1172643d802faSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
1172743d802faSmrg		[$PVM],
1172843d802faSmrg		[Minor version of this package])
1172943d802faSmrg	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
1173043d802faSmrg	if test "x$PVP" = "x"; then
1173143d802faSmrg		PVP="0"
1173243d802faSmrg	fi
1173343d802faSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
1173443d802faSmrg		[$PVP],
1173543d802faSmrg		[Patch version of this package])
117362a53b785Smrg])
1173752fd71cdSmrg
1173843d802faSmrg# XORG_CHANGELOG()
1173943d802faSmrg# ----------------
1174043d802faSmrg# Minimum version: 1.2.0
1174143d802faSmrg#
1174243d802faSmrg# Defines the variable CHANGELOG_CMD as the command to generate
1174343d802faSmrg# ChangeLog from git.
1174443d802faSmrg#
1174543d802faSmrg#
1174643d802faSmrgAC_DEFUN([XORG_CHANGELOG], [
1174743d802faSmrgCHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \
1174843d802faSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
1174943d802faSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \
1175043d802faSmrgtouch \$(top_srcdir)/ChangeLog; \
1175143d802faSmrgecho 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))"
1175243d802faSmrgAC_SUBST([CHANGELOG_CMD])
1175343d802faSmrg]) # XORG_CHANGELOG
117542a53b785Smrg
1175543d802faSmrg# Copyright (C) 2002-2021 Free Software Foundation, Inc.
1175643d802faSmrg#
1175743d802faSmrg# This file is free software; the Free Software Foundation
1175843d802faSmrg# gives unlimited permission to copy and/or distribute it,
1175943d802faSmrg# with or without modifications, as long as this notice is preserved.
117602a53b785Smrg
1176143d802faSmrg# AM_AUTOMAKE_VERSION(VERSION)
1176243d802faSmrg# ----------------------------
1176343d802faSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
1176443d802faSmrg# generated from the m4 files accompanying Automake X.Y.
1176543d802faSmrg# (This private macro should not be called outside this file.)
1176643d802faSmrgAC_DEFUN([AM_AUTOMAKE_VERSION],
1176743d802faSmrg[am__api_version='1.16'
1176843d802faSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
1176943d802faSmrgdnl require some minimum version.  Point them to the right macro.
1177043d802faSmrgm4_if([$1], [1.16.5], [],
1177143d802faSmrg      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
1177243d802faSmrg])
117732a53b785Smrg
1177443d802faSmrg# _AM_AUTOCONF_VERSION(VERSION)
1177543d802faSmrg# -----------------------------
1177643d802faSmrg# aclocal traces this macro to find the Autoconf version.
1177743d802faSmrg# This is a private macro too.  Using m4_define simplifies
1177843d802faSmrg# the logic in aclocal, which can simply ignore this definition.
1177943d802faSmrgm4_define([_AM_AUTOCONF_VERSION], [])
117802a53b785Smrg
1178143d802faSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION
1178243d802faSmrg# -------------------------------
1178343d802faSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
1178443d802faSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
1178543d802faSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
1178643d802faSmrg[AM_AUTOMAKE_VERSION([1.16.5])dnl
1178743d802faSmrgm4_ifndef([AC_AUTOCONF_VERSION],
1178843d802faSmrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
1178943d802faSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
117902a53b785Smrg
1179143d802faSmrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
117922a53b785Smrg
1179343d802faSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc.
1179443d802faSmrg#
1179543d802faSmrg# This file is free software; the Free Software Foundation
1179643d802faSmrg# gives unlimited permission to copy and/or distribute it,
1179743d802faSmrg# with or without modifications, as long as this notice is preserved.
1179852fd71cdSmrg
1179943d802faSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
1180043d802faSmrg# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
1180143d802faSmrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
118022a53b785Smrg#
1180343d802faSmrg# Of course, Automake must honor this variable whenever it calls a
1180443d802faSmrg# tool from the auxiliary directory.  The problem is that $srcdir (and
1180543d802faSmrg# therefore $ac_aux_dir as well) can be either absolute or relative,
1180643d802faSmrg# depending on how configure is run.  This is pretty annoying, since
1180743d802faSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
1180843d802faSmrg# source directory, any form will work fine, but in subdirectories a
1180943d802faSmrg# relative path needs to be adjusted first.
1181043d802faSmrg#
1181143d802faSmrg# $ac_aux_dir/missing
1181243d802faSmrg#    fails when called from a subdirectory if $ac_aux_dir is relative
1181343d802faSmrg# $top_srcdir/$ac_aux_dir/missing
1181443d802faSmrg#    fails if $ac_aux_dir is absolute,
1181543d802faSmrg#    fails when called from a subdirectory in a VPATH build with
1181643d802faSmrg#          a relative $ac_aux_dir
1181743d802faSmrg#
1181843d802faSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
1181943d802faSmrg# are both prefixed by $srcdir.  In an in-source build this is usually
1182043d802faSmrg# harmless because $srcdir is '.', but things will broke when you
1182143d802faSmrg# start a VPATH build or use an absolute $srcdir.
118222a53b785Smrg#
1182343d802faSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
1182443d802faSmrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
1182543d802faSmrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
1182643d802faSmrg# and then we would define $MISSING as
1182743d802faSmrg#   MISSING="\${SHELL} $am_aux_dir/missing"
1182843d802faSmrg# This will work as long as MISSING is not called from configure, because
1182943d802faSmrg# unfortunately $(top_srcdir) has no meaning in configure.
1183043d802faSmrg# However there are other variables, like CC, which are often used in
1183143d802faSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
1183243d802faSmrg#
1183343d802faSmrg# Another solution, used here, is to always expand $ac_aux_dir to an
1183443d802faSmrg# absolute PATH.  The drawback is that using absolute paths prevent a
1183543d802faSmrg# configured tree to be moved without reconfiguration.
118362a53b785Smrg
1183743d802faSmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
1183843d802faSmrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1183943d802faSmrg# Expand $ac_aux_dir to an absolute path.
1184043d802faSmrgam_aux_dir=`cd "$ac_aux_dir" && pwd`
1184152fd71cdSmrg])
1184252fd71cdSmrg
1184343d802faSmrg# AM_CONDITIONAL                                            -*- Autoconf -*-
1184452fd71cdSmrg
1184543d802faSmrg# Copyright (C) 1997-2021 Free Software Foundation, Inc.
1184643d802faSmrg#
1184743d802faSmrg# This file is free software; the Free Software Foundation
1184843d802faSmrg# gives unlimited permission to copy and/or distribute it,
1184943d802faSmrg# with or without modifications, as long as this notice is preserved.
118502a53b785Smrg
1185143d802faSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
1185243d802faSmrg# -------------------------------------
1185343d802faSmrg# Define a conditional.
1185443d802faSmrgAC_DEFUN([AM_CONDITIONAL],
1185543d802faSmrg[AC_PREREQ([2.52])dnl
1185643d802faSmrg m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
1185743d802faSmrg       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1185843d802faSmrgAC_SUBST([$1_TRUE])dnl
1185943d802faSmrgAC_SUBST([$1_FALSE])dnl
1186043d802faSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl
1186143d802faSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl
1186243d802faSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl
1186343d802faSmrgif $2; then
1186443d802faSmrg  $1_TRUE=
1186543d802faSmrg  $1_FALSE='#'
1186643d802faSmrgelse
1186743d802faSmrg  $1_TRUE='#'
1186843d802faSmrg  $1_FALSE=
1186943d802faSmrgfi
1187043d802faSmrgAC_CONFIG_COMMANDS_PRE(
1187143d802faSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1187243d802faSmrg  AC_MSG_ERROR([[conditional "$1" was never defined.
1187343d802faSmrgUsually this means the macro was only invoked conditionally.]])
1187443d802faSmrgfi])])
118752a53b785Smrg
1187643d802faSmrg# Copyright (C) 1999-2021 Free Software Foundation, Inc.
1187743d802faSmrg#
1187843d802faSmrg# This file is free software; the Free Software Foundation
1187943d802faSmrg# gives unlimited permission to copy and/or distribute it,
1188043d802faSmrg# with or without modifications, as long as this notice is preserved.
1188152fd71cdSmrg
1188252fd71cdSmrg
1188343d802faSmrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
1188443d802faSmrg# written in clear, in which case automake, when reading aclocal.m4,
1188543d802faSmrg# will think it sees a *use*, and therefore will trigger all it's
1188643d802faSmrg# C support machinery.  Also note that it means that autoscan, seeing
1188743d802faSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
118882a53b785Smrg
1188952fd71cdSmrg
1189043d802faSmrg# _AM_DEPENDENCIES(NAME)
1189143d802faSmrg# ----------------------
1189243d802faSmrg# See how the compiler implements dependency checking.
1189343d802faSmrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
1189443d802faSmrg# We try a few techniques and use that to set a single cache variable.
1189543d802faSmrg#
1189643d802faSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
1189743d802faSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
1189843d802faSmrg# dependency, and given that the user is not expected to run this macro,
1189943d802faSmrg# just rely on AC_PROG_CC.
1190043d802faSmrgAC_DEFUN([_AM_DEPENDENCIES],
1190143d802faSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
1190243d802faSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
1190343d802faSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
1190443d802faSmrgAC_REQUIRE([AM_DEP_TRACK])dnl
1190552fd71cdSmrg
1190643d802faSmrgm4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
1190743d802faSmrg      [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
1190843d802faSmrg      [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
1190943d802faSmrg      [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
1191043d802faSmrg      [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
1191143d802faSmrg      [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
1191243d802faSmrg                    [depcc="$$1"   am_compiler_list=])
1191352fd71cdSmrg
1191443d802faSmrgAC_CACHE_CHECK([dependency style of $depcc],
1191543d802faSmrg               [am_cv_$1_dependencies_compiler_type],
1191643d802faSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
1191743d802faSmrg  # We make a subdir and do the tests there.  Otherwise we can end up
1191843d802faSmrg  # making bogus files that we don't know about and never remove.  For
1191943d802faSmrg  # instance it was reported that on HP-UX the gcc test will end up
1192043d802faSmrg  # making a dummy file named 'D' -- because '-MD' means "put the output
1192143d802faSmrg  # in D".
1192243d802faSmrg  rm -rf conftest.dir
1192343d802faSmrg  mkdir conftest.dir
1192443d802faSmrg  # Copy depcomp to subdir because otherwise we won't find it if we're
1192543d802faSmrg  # using a relative directory.
1192643d802faSmrg  cp "$am_depcomp" conftest.dir
1192743d802faSmrg  cd conftest.dir
1192843d802faSmrg  # We will build objects and dependencies in a subdirectory because
1192943d802faSmrg  # it helps to detect inapplicable dependency modes.  For instance
1193043d802faSmrg  # both Tru64's cc and ICC support -MD to output dependencies as a
1193143d802faSmrg  # side effect of compilation, but ICC will put the dependencies in
1193243d802faSmrg  # the current directory while Tru64 will put them in the object
1193343d802faSmrg  # directory.
1193443d802faSmrg  mkdir sub
1193552fd71cdSmrg
1193643d802faSmrg  am_cv_$1_dependencies_compiler_type=none
1193743d802faSmrg  if test "$am_compiler_list" = ""; then
1193843d802faSmrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
1193943d802faSmrg  fi
1194043d802faSmrg  am__universal=false
1194143d802faSmrg  m4_case([$1], [CC],
1194243d802faSmrg    [case " $depcc " in #(
1194343d802faSmrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
1194443d802faSmrg     esac],
1194543d802faSmrg    [CXX],
1194643d802faSmrg    [case " $depcc " in #(
1194743d802faSmrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
1194843d802faSmrg     esac])
119492a53b785Smrg
1195043d802faSmrg  for depmode in $am_compiler_list; do
1195143d802faSmrg    # Setup a source with many dependencies, because some compilers
1195243d802faSmrg    # like to wrap large dependency lists on column 80 (with \), and
1195343d802faSmrg    # we should not choose a depcomp mode which is confused by this.
1195443d802faSmrg    #
1195543d802faSmrg    # We need to recreate these files for each test, as the compiler may
1195643d802faSmrg    # overwrite some of them when testing with obscure command lines.
1195743d802faSmrg    # This happens at least with the AIX C compiler.
1195843d802faSmrg    : > sub/conftest.c
1195943d802faSmrg    for i in 1 2 3 4 5 6; do
1196043d802faSmrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
1196143d802faSmrg      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
1196243d802faSmrg      # Solaris 10 /bin/sh.
1196343d802faSmrg      echo '/* dummy */' > sub/conftst$i.h
1196443d802faSmrg    done
1196543d802faSmrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
119662a53b785Smrg
1196743d802faSmrg    # We check with '-c' and '-o' for the sake of the "dashmstdout"
1196843d802faSmrg    # mode.  It turns out that the SunPro C++ compiler does not properly
1196943d802faSmrg    # handle '-M -o', and we need to detect this.  Also, some Intel
1197043d802faSmrg    # versions had trouble with output in subdirs.
1197143d802faSmrg    am__obj=sub/conftest.${OBJEXT-o}
1197243d802faSmrg    am__minus_obj="-o $am__obj"
1197343d802faSmrg    case $depmode in
1197443d802faSmrg    gcc)
1197543d802faSmrg      # This depmode causes a compiler race in universal mode.
1197643d802faSmrg      test "$am__universal" = false || continue
1197743d802faSmrg      ;;
1197843d802faSmrg    nosideeffect)
1197943d802faSmrg      # After this tag, mechanisms are not by side-effect, so they'll
1198043d802faSmrg      # only be used when explicitly requested.
1198143d802faSmrg      if test "x$enable_dependency_tracking" = xyes; then
1198243d802faSmrg	continue
1198343d802faSmrg      else
1198443d802faSmrg	break
1198543d802faSmrg      fi
1198643d802faSmrg      ;;
1198743d802faSmrg    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
1198843d802faSmrg      # This compiler won't grok '-c -o', but also, the minuso test has
1198943d802faSmrg      # not run yet.  These depmodes are late enough in the game, and
1199043d802faSmrg      # so weak that their functioning should not be impacted.
1199143d802faSmrg      am__obj=conftest.${OBJEXT-o}
1199243d802faSmrg      am__minus_obj=
1199343d802faSmrg      ;;
1199443d802faSmrg    none) break ;;
1199543d802faSmrg    esac
1199643d802faSmrg    if depmode=$depmode \
1199743d802faSmrg       source=sub/conftest.c object=$am__obj \
1199843d802faSmrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
1199943d802faSmrg       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
1200043d802faSmrg         >/dev/null 2>conftest.err &&
1200143d802faSmrg       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
1200243d802faSmrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
1200343d802faSmrg       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
1200443d802faSmrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
1200543d802faSmrg      # icc doesn't choke on unknown options, it will just issue warnings
1200643d802faSmrg      # or remarks (even with -Werror).  So we grep stderr for any message
1200743d802faSmrg      # that says an option was ignored or not supported.
1200843d802faSmrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
1200943d802faSmrg      #   icc: Command line warning: ignoring option '-M'; no argument required
1201043d802faSmrg      # The diagnosis changed in icc 8.0:
1201143d802faSmrg      #   icc: Command line remark: option '-MP' not supported
1201243d802faSmrg      if (grep 'ignoring option' conftest.err ||
1201343d802faSmrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
1201443d802faSmrg        am_cv_$1_dependencies_compiler_type=$depmode
1201543d802faSmrg        break
1201643d802faSmrg      fi
1201743d802faSmrg    fi
1201843d802faSmrg  done
120192a53b785Smrg
1202043d802faSmrg  cd ..
1202143d802faSmrg  rm -rf conftest.dir
1202243d802faSmrgelse
1202343d802faSmrg  am_cv_$1_dependencies_compiler_type=none
1202443d802faSmrgfi
1202552fd71cdSmrg])
1202643d802faSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
1202743d802faSmrgAM_CONDITIONAL([am__fastdep$1], [
1202843d802faSmrg  test "x$enable_dependency_tracking" != xno \
1202943d802faSmrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
120302a53b785Smrg])
1203152fd71cdSmrg
120322a53b785Smrg
1203343d802faSmrg# AM_SET_DEPDIR
1203443d802faSmrg# -------------
1203543d802faSmrg# Choose a directory name for dependency files.
1203643d802faSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
1203743d802faSmrgAC_DEFUN([AM_SET_DEPDIR],
1203843d802faSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1203943d802faSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
1204052fd71cdSmrg])
1204152fd71cdSmrg
120422a53b785Smrg
1204343d802faSmrg# AM_DEP_TRACK
1204443d802faSmrg# ------------
1204543d802faSmrgAC_DEFUN([AM_DEP_TRACK],
1204643d802faSmrg[AC_ARG_ENABLE([dependency-tracking], [dnl
1204743d802faSmrgAS_HELP_STRING(
1204843d802faSmrg  [--enable-dependency-tracking],
1204943d802faSmrg  [do not reject slow dependency extractors])
1205043d802faSmrgAS_HELP_STRING(
1205143d802faSmrg  [--disable-dependency-tracking],
1205243d802faSmrg  [speeds up one-time build])])
1205343d802faSmrgif test "x$enable_dependency_tracking" != xno; then
1205443d802faSmrg  am_depcomp="$ac_aux_dir/depcomp"
1205543d802faSmrg  AMDEPBACKSLASH='\'
1205643d802faSmrg  am__nodep='_no'
1205743d802faSmrgfi
1205843d802faSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1205943d802faSmrgAC_SUBST([AMDEPBACKSLASH])dnl
1206043d802faSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
1206143d802faSmrgAC_SUBST([am__nodep])dnl
1206243d802faSmrg_AM_SUBST_NOTMAKE([am__nodep])dnl
1206343d802faSmrg])
120642a53b785Smrg
1206543d802faSmrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
1206652fd71cdSmrg
1206743d802faSmrg# Copyright (C) 1999-2021 Free Software Foundation, Inc.
1206843d802faSmrg#
1206943d802faSmrg# This file is free software; the Free Software Foundation
1207043d802faSmrg# gives unlimited permission to copy and/or distribute it,
1207143d802faSmrg# with or without modifications, as long as this notice is preserved.
1207252fd71cdSmrg
1207343d802faSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
1207443d802faSmrg# ------------------------------
1207543d802faSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1207643d802faSmrg[{
1207743d802faSmrg  # Older Autoconf quotes --file arguments for eval, but not when files
1207843d802faSmrg  # are listed without --file.  Let's play safe and only enable the eval
1207943d802faSmrg  # if we detect the quoting.
1208043d802faSmrg  # TODO: see whether this extra hack can be removed once we start
1208143d802faSmrg  # requiring Autoconf 2.70 or later.
1208243d802faSmrg  AS_CASE([$CONFIG_FILES],
1208343d802faSmrg          [*\'*], [eval set x "$CONFIG_FILES"],
1208443d802faSmrg          [*], [set x $CONFIG_FILES])
1208543d802faSmrg  shift
1208643d802faSmrg  # Used to flag and report bootstrapping failures.
1208743d802faSmrg  am_rc=0
1208843d802faSmrg  for am_mf
1208943d802faSmrg  do
1209043d802faSmrg    # Strip MF so we end up with the name of the file.
1209143d802faSmrg    am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
1209243d802faSmrg    # Check whether this is an Automake generated Makefile which includes
1209343d802faSmrg    # dependency-tracking related rules and includes.
1209443d802faSmrg    # Grep'ing the whole file directly is not great: AIX grep has a line
1209543d802faSmrg    # limit of 2048, but all sed's we know have understand at least 4000.
1209643d802faSmrg    sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
1209743d802faSmrg      || continue
1209843d802faSmrg    am_dirpart=`AS_DIRNAME(["$am_mf"])`
1209943d802faSmrg    am_filepart=`AS_BASENAME(["$am_mf"])`
1210043d802faSmrg    AM_RUN_LOG([cd "$am_dirpart" \
1210143d802faSmrg      && sed -e '/# am--include-marker/d' "$am_filepart" \
1210243d802faSmrg        | $MAKE -f - am--depfiles]) || am_rc=$?
1210343d802faSmrg  done
1210443d802faSmrg  if test $am_rc -ne 0; then
1210543d802faSmrg    AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
1210643d802faSmrg    for automatic dependency tracking.  If GNU make was not used, consider
1210743d802faSmrg    re-running the configure script with MAKE="gmake" (or whatever is
1210843d802faSmrg    necessary).  You can also try re-running configure with the
1210943d802faSmrg    '--disable-dependency-tracking' option to at least be able to build
1211043d802faSmrg    the package (albeit without support for automatic dependency tracking).])
1211143d802faSmrg  fi
1211243d802faSmrg  AS_UNSET([am_dirpart])
1211343d802faSmrg  AS_UNSET([am_filepart])
1211443d802faSmrg  AS_UNSET([am_mf])
1211543d802faSmrg  AS_UNSET([am_rc])
1211643d802faSmrg  rm -f conftest-deps.mk
1211743d802faSmrg}
1211843d802faSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1211952fd71cdSmrg
1212052fd71cdSmrg
1212143d802faSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS
1212243d802faSmrg# -----------------------------
1212343d802faSmrg# This macro should only be invoked once -- use via AC_REQUIRE.
1212443d802faSmrg#
1212543d802faSmrg# This code is only required when automatic dependency tracking is enabled.
1212643d802faSmrg# This creates each '.Po' and '.Plo' makefile fragment that we'll need in
1212743d802faSmrg# order to bootstrap the dependency handling code.
1212843d802faSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1212943d802faSmrg[AC_CONFIG_COMMANDS([depfiles],
1213043d802faSmrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1213143d802faSmrg     [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
1213252fd71cdSmrg
1213343d802faSmrg# Do all the work for Automake.                             -*- Autoconf -*-
1213452fd71cdSmrg
1213543d802faSmrg# Copyright (C) 1996-2021 Free Software Foundation, Inc.
1213643d802faSmrg#
1213743d802faSmrg# This file is free software; the Free Software Foundation
1213843d802faSmrg# gives unlimited permission to copy and/or distribute it,
1213943d802faSmrg# with or without modifications, as long as this notice is preserved.
1214052fd71cdSmrg
1214143d802faSmrg# This macro actually does too much.  Some checks are only needed if
1214243d802faSmrg# your package does certain things.  But this isn't really a big deal.
1214352fd71cdSmrg
1214443d802faSmrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
1214543d802faSmrgm4_define([AC_PROG_CC],
1214643d802faSmrgm4_defn([AC_PROG_CC])
1214743d802faSmrg[_AM_PROG_CC_C_O
1214843d802faSmrg])
1214952fd71cdSmrg
1215043d802faSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1215143d802faSmrg# AM_INIT_AUTOMAKE([OPTIONS])
1215243d802faSmrg# -----------------------------------------------
1215343d802faSmrg# The call with PACKAGE and VERSION arguments is the old style
1215443d802faSmrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
1215543d802faSmrg# and VERSION should now be passed to AC_INIT and removed from
1215643d802faSmrg# the call to AM_INIT_AUTOMAKE.
1215743d802faSmrg# We support both call styles for the transition.  After
1215843d802faSmrg# the next Automake release, Autoconf can make the AC_INIT
1215943d802faSmrg# arguments mandatory, and then we can depend on a new Autoconf
1216043d802faSmrg# release and drop the old call support.
1216143d802faSmrgAC_DEFUN([AM_INIT_AUTOMAKE],
1216243d802faSmrg[AC_PREREQ([2.65])dnl
1216343d802faSmrgm4_ifdef([_$0_ALREADY_INIT],
1216443d802faSmrg  [m4_fatal([$0 expanded multiple times
1216543d802faSmrg]m4_defn([_$0_ALREADY_INIT]))],
1216643d802faSmrg  [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl
1216743d802faSmrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
1216843d802faSmrgdnl the ones we care about.
1216943d802faSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1217043d802faSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1217143d802faSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
1217243d802faSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
1217343d802faSmrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
1217443d802faSmrg  # is not polluted with repeated "-I."
1217543d802faSmrg  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
1217643d802faSmrg  # test to see if srcdir already configured
1217743d802faSmrg  if test -f $srcdir/config.status; then
1217843d802faSmrg    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1217943d802faSmrg  fi
1218043d802faSmrgfi
1218152fd71cdSmrg
1218243d802faSmrg# test whether we have cygpath
1218343d802faSmrgif test -z "$CYGPATH_W"; then
1218443d802faSmrg  if (cygpath --version) >/dev/null 2>/dev/null; then
1218543d802faSmrg    CYGPATH_W='cygpath -w'
1218643d802faSmrg  else
1218743d802faSmrg    CYGPATH_W=echo
1218843d802faSmrg  fi
1218943d802faSmrgfi
1219043d802faSmrgAC_SUBST([CYGPATH_W])
1219152fd71cdSmrg
1219243d802faSmrg# Define the identity of the package.
1219343d802faSmrgdnl Distinguish between old-style and new-style calls.
1219443d802faSmrgm4_ifval([$2],
1219543d802faSmrg[AC_DIAGNOSE([obsolete],
1219643d802faSmrg             [$0: two- and three-arguments forms are deprecated.])
1219743d802faSmrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1219843d802faSmrg AC_SUBST([PACKAGE], [$1])dnl
1219943d802faSmrg AC_SUBST([VERSION], [$2])],
1220043d802faSmrg[_AM_SET_OPTIONS([$1])dnl
1220143d802faSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
1220243d802faSmrgm4_if(
1220343d802faSmrg  m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]),
1220443d802faSmrg  [ok:ok],,
1220543d802faSmrg  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1220643d802faSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1220743d802faSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1220852fd71cdSmrg
1220943d802faSmrg_AM_IF_OPTION([no-define],,
1221043d802faSmrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
1221143d802faSmrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
1221252fd71cdSmrg
1221343d802faSmrg# Some tools Automake needs.
1221443d802faSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
1221543d802faSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
1221643d802faSmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
1221743d802faSmrgAM_MISSING_PROG([AUTOCONF], [autoconf])
1221843d802faSmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
1221943d802faSmrgAM_MISSING_PROG([AUTOHEADER], [autoheader])
1222043d802faSmrgAM_MISSING_PROG([MAKEINFO], [makeinfo])
1222143d802faSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1222243d802faSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
1222343d802faSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl
1222443d802faSmrg# For better backward compatibility.  To be removed once Automake 1.9.x
1222543d802faSmrg# dies out for good.  For more background, see:
1222643d802faSmrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
1222743d802faSmrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
1222843d802faSmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)'])
1222943d802faSmrg# We need awk for the "check" target (and possibly the TAP driver).  The
1223043d802faSmrg# system "awk" is bad on some platforms.
1223143d802faSmrgAC_REQUIRE([AC_PROG_AWK])dnl
1223243d802faSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
1223343d802faSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
1223443d802faSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1223543d802faSmrg	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1223643d802faSmrg			     [_AM_PROG_TAR([v7])])])
1223743d802faSmrg_AM_IF_OPTION([no-dependencies],,
1223843d802faSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
1223943d802faSmrg		  [_AM_DEPENDENCIES([CC])],
1224043d802faSmrg		  [m4_define([AC_PROG_CC],
1224143d802faSmrg			     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
1224243d802faSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
1224343d802faSmrg		  [_AM_DEPENDENCIES([CXX])],
1224443d802faSmrg		  [m4_define([AC_PROG_CXX],
1224543d802faSmrg			     m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
1224643d802faSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC],
1224743d802faSmrg		  [_AM_DEPENDENCIES([OBJC])],
1224843d802faSmrg		  [m4_define([AC_PROG_OBJC],
1224943d802faSmrg			     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
1225043d802faSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
1225143d802faSmrg		  [_AM_DEPENDENCIES([OBJCXX])],
1225243d802faSmrg		  [m4_define([AC_PROG_OBJCXX],
1225343d802faSmrg			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
122542a53b785Smrg])
1225543d802faSmrg# Variables for tags utilities; see am/tags.am
1225643d802faSmrgif test -z "$CTAGS"; then
1225743d802faSmrg  CTAGS=ctags
1225843d802faSmrgfi
1225943d802faSmrgAC_SUBST([CTAGS])
1226043d802faSmrgif test -z "$ETAGS"; then
1226143d802faSmrg  ETAGS=etags
1226243d802faSmrgfi
1226343d802faSmrgAC_SUBST([ETAGS])
1226443d802faSmrgif test -z "$CSCOPE"; then
1226543d802faSmrg  CSCOPE=cscope
1226643d802faSmrgfi
1226743d802faSmrgAC_SUBST([CSCOPE])
1226852fd71cdSmrg
1226943d802faSmrgAC_REQUIRE([AM_SILENT_RULES])dnl
1227043d802faSmrgdnl The testsuite driver may need to know about EXEEXT, so add the
1227143d802faSmrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
1227243d802faSmrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
1227343d802faSmrgAC_CONFIG_COMMANDS_PRE(dnl
1227443d802faSmrg[m4_provide_if([_AM_COMPILER_EXEEXT],
1227543d802faSmrg  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
1227652fd71cdSmrg
1227743d802faSmrg# POSIX will say in a future version that running "rm -f" with no argument
1227843d802faSmrg# is OK; and we want to be able to make that assumption in our Makefile
1227943d802faSmrg# recipes.  So use an aggressive probe to check that the usage we want is
1228043d802faSmrg# actually supported "in the wild" to an acceptable degree.
1228143d802faSmrg# See automake bug#10828.
1228243d802faSmrg# To make any issue more visible, cause the running configure to be aborted
1228343d802faSmrg# by default if the 'rm' program in use doesn't match our expectations; the
1228443d802faSmrg# user can still override this though.
1228543d802faSmrgif rm -f && rm -fr && rm -rf; then : OK; else
1228643d802faSmrg  cat >&2 <<'END'
1228743d802faSmrgOops!
1228852fd71cdSmrg
1228943d802faSmrgYour 'rm' program seems unable to run without file operands specified
1229043d802faSmrgon the command line, even when the '-f' option is present.  This is contrary
1229143d802faSmrgto the behaviour of most rm programs out there, and not conforming with
1229243d802faSmrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
1229352fd71cdSmrg
1229443d802faSmrgPlease tell bug-automake@gnu.org about your system, including the value
1229543d802faSmrgof your $PATH and any error possibly output before this message.  This
1229643d802faSmrgcan help us improve future automake versions.
1229752fd71cdSmrg
1229843d802faSmrgEND
1229943d802faSmrg  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
1230043d802faSmrg    echo 'Configuration will proceed anyway, since you have set the' >&2
1230143d802faSmrg    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
1230243d802faSmrg    echo >&2
1230343d802faSmrg  else
1230443d802faSmrg    cat >&2 <<'END'
1230543d802faSmrgAborting the configuration process, to ensure you take notice of the issue.
1230652fd71cdSmrg
1230743d802faSmrgYou can download and install GNU coreutils to get an 'rm' implementation
1230843d802faSmrgthat behaves properly: <https://www.gnu.org/software/coreutils/>.
1230952fd71cdSmrg
1231043d802faSmrgIf you want to complete the configuration process using your problematic
1231143d802faSmrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
1231243d802faSmrgto "yes", and re-run configure.
1231352fd71cdSmrg
1231443d802faSmrgEND
1231543d802faSmrg    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
1231643d802faSmrg  fi
1231743d802faSmrgfi
1231843d802faSmrgdnl The trailing newline in this macro's definition is deliberate, for
1231943d802faSmrgdnl backward compatibility and to allow trailing 'dnl'-style comments
1232043d802faSmrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
123212a53b785Smrg])
1232252fd71cdSmrg
1232343d802faSmrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
1232443d802faSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
1232543d802faSmrgdnl mangled by Autoconf and run in a shell conditional statement.
1232643d802faSmrgm4_define([_AC_COMPILER_EXEEXT],
1232743d802faSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1232852fd71cdSmrg
1232943d802faSmrg# When config.status generates a header, we must update the stamp-h file.
1233043d802faSmrg# This file resides in the same directory as the config header
1233143d802faSmrg# that is generated.  The stamp files are numbered to have different names.
1233252fd71cdSmrg
1233343d802faSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1233443d802faSmrg# loop where config.status creates the headers, so we can generate
1233543d802faSmrg# our stamp files there.
1233643d802faSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1233743d802faSmrg[# Compute $1's index in $config_headers.
1233843d802faSmrg_am_arg=$1
1233943d802faSmrg_am_stamp_count=1
1234043d802faSmrgfor _am_header in $config_headers :; do
1234143d802faSmrg  case $_am_header in
1234243d802faSmrg    $_am_arg | $_am_arg:* )
1234343d802faSmrg      break ;;
1234443d802faSmrg    * )
1234543d802faSmrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1234643d802faSmrg  esac
1234743d802faSmrgdone
1234843d802faSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1234952fd71cdSmrg
1235043d802faSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc.
1235143d802faSmrg#
1235243d802faSmrg# This file is free software; the Free Software Foundation
1235343d802faSmrg# gives unlimited permission to copy and/or distribute it,
1235443d802faSmrg# with or without modifications, as long as this notice is preserved.
1235552fd71cdSmrg
1235643d802faSmrg# AM_PROG_INSTALL_SH
1235743d802faSmrg# ------------------
1235843d802faSmrg# Define $install_sh.
1235943d802faSmrgAC_DEFUN([AM_PROG_INSTALL_SH],
1236043d802faSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1236143d802faSmrgif test x"${install_sh+set}" != xset; then
1236243d802faSmrg  case $am_aux_dir in
1236343d802faSmrg  *\ * | *\	*)
1236443d802faSmrg    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1236543d802faSmrg  *)
1236643d802faSmrg    install_sh="\${SHELL} $am_aux_dir/install-sh"
1236743d802faSmrg  esac
1236843d802faSmrgfi
1236943d802faSmrgAC_SUBST([install_sh])])
1237052fd71cdSmrg
1237143d802faSmrg# Copyright (C) 2003-2021 Free Software Foundation, Inc.
1237243d802faSmrg#
1237343d802faSmrg# This file is free software; the Free Software Foundation
1237443d802faSmrg# gives unlimited permission to copy and/or distribute it,
1237543d802faSmrg# with or without modifications, as long as this notice is preserved.
1237652fd71cdSmrg
1237743d802faSmrg# Check whether the underlying file-system supports filenames
1237843d802faSmrg# with a leading dot.  For instance MS-DOS doesn't.
1237943d802faSmrgAC_DEFUN([AM_SET_LEADING_DOT],
1238043d802faSmrg[rm -rf .tst 2>/dev/null
1238143d802faSmrgmkdir .tst 2>/dev/null
1238243d802faSmrgif test -d .tst; then
1238343d802faSmrg  am__leading_dot=.
1238443d802faSmrgelse
1238543d802faSmrg  am__leading_dot=_
1238643d802faSmrgfi
1238743d802faSmrgrmdir .tst 2>/dev/null
1238843d802faSmrgAC_SUBST([am__leading_dot])])
1238952fd71cdSmrg
1239043d802faSmrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
1239152fd71cdSmrg
1239243d802faSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc.
1239343d802faSmrg#
1239443d802faSmrg# This file is free software; the Free Software Foundation
1239543d802faSmrg# gives unlimited permission to copy and/or distribute it,
1239643d802faSmrg# with or without modifications, as long as this notice is preserved.
1239752fd71cdSmrg
1239843d802faSmrg# AM_MAKE_INCLUDE()
1239943d802faSmrg# -----------------
1240043d802faSmrg# Check whether make has an 'include' directive that can support all
1240143d802faSmrg# the idioms we need for our automatic dependency tracking code.
1240243d802faSmrgAC_DEFUN([AM_MAKE_INCLUDE],
1240343d802faSmrg[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
1240443d802faSmrgcat > confinc.mk << 'END'
1240543d802faSmrgam__doit:
1240643d802faSmrg	@echo this is the am__doit target >confinc.out
1240743d802faSmrg.PHONY: am__doit
1240843d802faSmrgEND
1240943d802faSmrgam__include="#"
1241043d802faSmrgam__quote=
1241143d802faSmrg# BSD make does it like this.
1241243d802faSmrgecho '.include "confinc.mk" # ignored' > confmf.BSD
1241343d802faSmrg# Other make implementations (GNU, Solaris 10, AIX) do it like this.
1241443d802faSmrgecho 'include confinc.mk # ignored' > confmf.GNU
1241543d802faSmrg_am_result=no
1241643d802faSmrgfor s in GNU BSD; do
1241743d802faSmrg  AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
1241843d802faSmrg  AS_CASE([$?:`cat confinc.out 2>/dev/null`],
1241943d802faSmrg      ['0:this is the am__doit target'],
1242043d802faSmrg      [AS_CASE([$s],
1242143d802faSmrg          [BSD], [am__include='.include' am__quote='"'],
1242243d802faSmrg          [am__include='include' am__quote=''])])
1242343d802faSmrg  if test "$am__include" != "#"; then
1242443d802faSmrg    _am_result="yes ($s style)"
1242543d802faSmrg    break
1242643d802faSmrg  fi
1242743d802faSmrgdone
1242843d802faSmrgrm -f confinc.* confmf.*
1242943d802faSmrgAC_MSG_RESULT([${_am_result}])
1243043d802faSmrgAC_SUBST([am__include])])
1243143d802faSmrgAC_SUBST([am__quote])])
1243252fd71cdSmrg
1243343d802faSmrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
1243452fd71cdSmrg
1243543d802faSmrg# Copyright (C) 1997-2021 Free Software Foundation, Inc.
1243643d802faSmrg#
1243743d802faSmrg# This file is free software; the Free Software Foundation
1243843d802faSmrg# gives unlimited permission to copy and/or distribute it,
1243943d802faSmrg# with or without modifications, as long as this notice is preserved.
1244052fd71cdSmrg
1244143d802faSmrg# AM_MISSING_PROG(NAME, PROGRAM)
1244243d802faSmrg# ------------------------------
1244343d802faSmrgAC_DEFUN([AM_MISSING_PROG],
1244443d802faSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
1244543d802faSmrg$1=${$1-"${am_missing_run}$2"}
1244643d802faSmrgAC_SUBST($1)])
124472a53b785Smrg
1244843d802faSmrg# AM_MISSING_HAS_RUN
1244943d802faSmrg# ------------------
1245043d802faSmrg# Define MISSING if not defined so far and test if it is modern enough.
1245143d802faSmrg# If it is, set am_missing_run to use it, otherwise, to nothing.
1245243d802faSmrgAC_DEFUN([AM_MISSING_HAS_RUN],
1245343d802faSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1245443d802faSmrgAC_REQUIRE_AUX_FILE([missing])dnl
1245543d802faSmrgif test x"${MISSING+set}" != xset; then
1245643d802faSmrg  MISSING="\${SHELL} '$am_aux_dir/missing'"
1245743d802faSmrgfi
1245843d802faSmrg# Use eval to expand $SHELL
1245943d802faSmrgif eval "$MISSING --is-lightweight"; then
1246043d802faSmrg  am_missing_run="$MISSING "
1246143d802faSmrgelse
1246243d802faSmrg  am_missing_run=
1246343d802faSmrg  AC_MSG_WARN(['missing' script is too old or missing])
1246443d802faSmrgfi
1246543d802faSmrg])
124662a53b785Smrg
1246743d802faSmrg# Helper functions for option handling.                     -*- Autoconf -*-
1246843d802faSmrg
1246943d802faSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc.
124702a53b785Smrg#
1247143d802faSmrg# This file is free software; the Free Software Foundation
1247243d802faSmrg# gives unlimited permission to copy and/or distribute it,
1247343d802faSmrg# with or without modifications, as long as this notice is preserved.
1247452fd71cdSmrg
1247543d802faSmrg# _AM_MANGLE_OPTION(NAME)
1247643d802faSmrg# -----------------------
1247743d802faSmrgAC_DEFUN([_AM_MANGLE_OPTION],
1247843d802faSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1247952fd71cdSmrg
1248043d802faSmrg# _AM_SET_OPTION(NAME)
1248143d802faSmrg# --------------------
1248243d802faSmrg# Set option NAME.  Presently that only means defining a flag for this option.
1248343d802faSmrgAC_DEFUN([_AM_SET_OPTION],
1248443d802faSmrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
1248552fd71cdSmrg
1248643d802faSmrg# _AM_SET_OPTIONS(OPTIONS)
1248743d802faSmrg# ------------------------
1248843d802faSmrg# OPTIONS is a space-separated list of Automake options.
1248943d802faSmrgAC_DEFUN([_AM_SET_OPTIONS],
1249043d802faSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1249152fd71cdSmrg
1249243d802faSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1249343d802faSmrg# -------------------------------------------
1249443d802faSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1249543d802faSmrgAC_DEFUN([_AM_IF_OPTION],
1249643d802faSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1249752fd71cdSmrg
1249843d802faSmrg# Copyright (C) 1999-2021 Free Software Foundation, Inc.
1249943d802faSmrg#
1250043d802faSmrg# This file is free software; the Free Software Foundation
1250143d802faSmrg# gives unlimited permission to copy and/or distribute it,
1250243d802faSmrg# with or without modifications, as long as this notice is preserved.
1250352fd71cdSmrg
1250443d802faSmrg# _AM_PROG_CC_C_O
1250543d802faSmrg# ---------------
1250643d802faSmrg# Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
1250743d802faSmrg# to automatically call this.
1250843d802faSmrgAC_DEFUN([_AM_PROG_CC_C_O],
1250943d802faSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1251043d802faSmrgAC_REQUIRE_AUX_FILE([compile])dnl
1251143d802faSmrgAC_LANG_PUSH([C])dnl
1251243d802faSmrgAC_CACHE_CHECK(
1251343d802faSmrg  [whether $CC understands -c and -o together],
1251443d802faSmrg  [am_cv_prog_cc_c_o],
1251543d802faSmrg  [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
1251643d802faSmrg  # Make sure it works both with $CC and with simple cc.
1251743d802faSmrg  # Following AC_PROG_CC_C_O, we do the test twice because some
1251843d802faSmrg  # compilers refuse to overwrite an existing .o file with -o,
1251943d802faSmrg  # though they will create one.
1252043d802faSmrg  am_cv_prog_cc_c_o=yes
1252143d802faSmrg  for am_i in 1 2; do
1252243d802faSmrg    if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
1252343d802faSmrg         && test -f conftest2.$ac_objext; then
1252443d802faSmrg      : OK
1252543d802faSmrg    else
1252643d802faSmrg      am_cv_prog_cc_c_o=no
1252743d802faSmrg      break
1252843d802faSmrg    fi
1252943d802faSmrg  done
1253043d802faSmrg  rm -f core conftest*
1253143d802faSmrg  unset am_i])
1253243d802faSmrgif test "$am_cv_prog_cc_c_o" != yes; then
1253343d802faSmrg   # Losing compiler, so override with the script.
1253443d802faSmrg   # FIXME: It is wrong to rewrite CC.
1253543d802faSmrg   # But if we don't then we get into trouble of one sort or another.
1253643d802faSmrg   # A longer-term fix would be to have automake use am__CC in this case,
1253743d802faSmrg   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
1253843d802faSmrg   CC="$am_aux_dir/compile $CC"
1253943d802faSmrgfi
1254043d802faSmrgAC_LANG_POP([C])])
125412a53b785Smrg
1254243d802faSmrg# For backward compatibility.
1254343d802faSmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
1254452fd71cdSmrg
1254543d802faSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc.
1254652fd71cdSmrg#
1254743d802faSmrg# This file is free software; the Free Software Foundation
1254843d802faSmrg# gives unlimited permission to copy and/or distribute it,
1254943d802faSmrg# with or without modifications, as long as this notice is preserved.
1255052fd71cdSmrg
1255143d802faSmrg# AM_RUN_LOG(COMMAND)
1255243d802faSmrg# -------------------
1255343d802faSmrg# Run COMMAND, save the exit status in ac_status, and log it.
1255443d802faSmrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
1255543d802faSmrgAC_DEFUN([AM_RUN_LOG],
1255643d802faSmrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
1255743d802faSmrg   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
1255843d802faSmrg   ac_status=$?
1255943d802faSmrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1256043d802faSmrg   (exit $ac_status); }])
1256152fd71cdSmrg
1256243d802faSmrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
1256352fd71cdSmrg
1256443d802faSmrg# Copyright (C) 1996-2021 Free Software Foundation, Inc.
1256543d802faSmrg#
1256643d802faSmrg# This file is free software; the Free Software Foundation
1256743d802faSmrg# gives unlimited permission to copy and/or distribute it,
1256843d802faSmrg# with or without modifications, as long as this notice is preserved.
125692a53b785Smrg
1257043d802faSmrg# AM_SANITY_CHECK
1257143d802faSmrg# ---------------
1257243d802faSmrgAC_DEFUN([AM_SANITY_CHECK],
1257343d802faSmrg[AC_MSG_CHECKING([whether build environment is sane])
1257443d802faSmrg# Reject unsafe characters in $srcdir or the absolute working directory
1257543d802faSmrg# name.  Accept space and tab only in the latter.
1257643d802faSmrgam_lf='
1257743d802faSmrg'
1257843d802faSmrgcase `pwd` in
1257943d802faSmrg  *[[\\\"\#\$\&\'\`$am_lf]]*)
1258043d802faSmrg    AC_MSG_ERROR([unsafe absolute working directory name]);;
1258143d802faSmrgesac
1258243d802faSmrgcase $srcdir in
1258343d802faSmrg  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
1258443d802faSmrg    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
1258543d802faSmrgesac
125862a53b785Smrg
1258743d802faSmrg# Do 'set' in a subshell so we don't clobber the current shell's
1258843d802faSmrg# arguments.  Must try -L first in case configure is actually a
1258943d802faSmrg# symlink; some systems play weird games with the mod time of symlinks
1259043d802faSmrg# (eg FreeBSD returns the mod time of the symlink's containing
1259143d802faSmrg# directory).
1259243d802faSmrgif (
1259343d802faSmrg   am_has_slept=no
1259443d802faSmrg   for am_try in 1 2; do
1259543d802faSmrg     echo "timestamp, slept: $am_has_slept" > conftest.file
1259643d802faSmrg     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1259743d802faSmrg     if test "$[*]" = "X"; then
1259843d802faSmrg	# -L didn't work.
1259943d802faSmrg	set X `ls -t "$srcdir/configure" conftest.file`
1260043d802faSmrg     fi
1260143d802faSmrg     if test "$[*]" != "X $srcdir/configure conftest.file" \
1260243d802faSmrg	&& test "$[*]" != "X conftest.file $srcdir/configure"; then
126032a53b785Smrg
1260443d802faSmrg	# If neither matched, then we have a broken ls.  This can happen
1260543d802faSmrg	# if, for instance, CONFIG_SHELL is bash and it inherits a
1260643d802faSmrg	# broken ls alias from the environment.  This has actually
1260743d802faSmrg	# happened.  Such a system could not be considered "sane".
1260843d802faSmrg	AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
1260943d802faSmrg  alias in your environment])
1261043d802faSmrg     fi
1261143d802faSmrg     if test "$[2]" = conftest.file || test $am_try -eq 2; then
1261243d802faSmrg       break
1261343d802faSmrg     fi
1261443d802faSmrg     # Just in case.
1261543d802faSmrg     sleep 1
1261643d802faSmrg     am_has_slept=yes
1261743d802faSmrg   done
1261843d802faSmrg   test "$[2]" = conftest.file
1261943d802faSmrg   )
1262043d802faSmrgthen
1262143d802faSmrg   # Ok.
1262243d802faSmrg   :
1262343d802faSmrgelse
1262443d802faSmrg   AC_MSG_ERROR([newly created file is older than distributed files!
1262543d802faSmrgCheck your system clock])
1262643d802faSmrgfi
1262743d802faSmrgAC_MSG_RESULT([yes])
1262843d802faSmrg# If we didn't sleep, we still need to ensure time stamps of config.status and
1262943d802faSmrg# generated files are strictly newer.
1263043d802faSmrgam_sleep_pid=
1263143d802faSmrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then
1263243d802faSmrg  ( sleep 1 ) &
1263343d802faSmrg  am_sleep_pid=$!
1263443d802faSmrgfi
1263543d802faSmrgAC_CONFIG_COMMANDS_PRE(
1263643d802faSmrg  [AC_MSG_CHECKING([that generated files are newer than configure])
1263743d802faSmrg   if test -n "$am_sleep_pid"; then
1263843d802faSmrg     # Hide warnings about reused PIDs.
1263943d802faSmrg     wait $am_sleep_pid 2>/dev/null
1264043d802faSmrg   fi
1264143d802faSmrg   AC_MSG_RESULT([done])])
1264243d802faSmrgrm -f conftest.file
1264343d802faSmrg])
126442a53b785Smrg
1264543d802faSmrg# Copyright (C) 2009-2021 Free Software Foundation, Inc.
1264643d802faSmrg#
1264743d802faSmrg# This file is free software; the Free Software Foundation
1264843d802faSmrg# gives unlimited permission to copy and/or distribute it,
1264943d802faSmrg# with or without modifications, as long as this notice is preserved.
1265052fd71cdSmrg
1265143d802faSmrg# AM_SILENT_RULES([DEFAULT])
1265243d802faSmrg# --------------------------
1265343d802faSmrg# Enable less verbose build rules; with the default set to DEFAULT
1265443d802faSmrg# ("yes" being less verbose, "no" or empty being verbose).
1265543d802faSmrgAC_DEFUN([AM_SILENT_RULES],
1265643d802faSmrg[AC_ARG_ENABLE([silent-rules], [dnl
1265743d802faSmrgAS_HELP_STRING(
1265843d802faSmrg  [--enable-silent-rules],
1265943d802faSmrg  [less verbose build output (undo: "make V=1")])
1266043d802faSmrgAS_HELP_STRING(
1266143d802faSmrg  [--disable-silent-rules],
1266243d802faSmrg  [verbose build output (undo: "make V=0")])dnl
1266343d802faSmrg])
1266443d802faSmrgcase $enable_silent_rules in @%:@ (((
1266543d802faSmrg  yes) AM_DEFAULT_VERBOSITY=0;;
1266643d802faSmrg   no) AM_DEFAULT_VERBOSITY=1;;
1266743d802faSmrg    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
1266843d802faSmrgesac
1266943d802faSmrgdnl
1267043d802faSmrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep)
1267143d802faSmrgdnl do not support nested variable expansions.
1267243d802faSmrgdnl See automake bug#9928 and bug#10237.
1267343d802faSmrgam_make=${MAKE-make}
1267443d802faSmrgAC_CACHE_CHECK([whether $am_make supports nested variables],
1267543d802faSmrg   [am_cv_make_support_nested_variables],
1267643d802faSmrg   [if AS_ECHO([['TRUE=$(BAR$(V))
1267743d802faSmrgBAR0=false
1267843d802faSmrgBAR1=true
1267943d802faSmrgV=1
1268043d802faSmrgam__doit:
1268143d802faSmrg	@$(TRUE)
1268243d802faSmrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
1268343d802faSmrg  am_cv_make_support_nested_variables=yes
1268443d802faSmrgelse
1268543d802faSmrg  am_cv_make_support_nested_variables=no
1268643d802faSmrgfi])
1268743d802faSmrgif test $am_cv_make_support_nested_variables = yes; then
1268843d802faSmrg  dnl Using '$V' instead of '$(V)' breaks IRIX make.
1268943d802faSmrg  AM_V='$(V)'
1269043d802faSmrg  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
1269143d802faSmrgelse
1269243d802faSmrg  AM_V=$AM_DEFAULT_VERBOSITY
1269343d802faSmrg  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
1269443d802faSmrgfi
1269543d802faSmrgAC_SUBST([AM_V])dnl
1269643d802faSmrgAM_SUBST_NOTMAKE([AM_V])dnl
1269743d802faSmrgAC_SUBST([AM_DEFAULT_V])dnl
1269843d802faSmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
1269943d802faSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl
1270043d802faSmrgAM_BACKSLASH='\'
1270143d802faSmrgAC_SUBST([AM_BACKSLASH])dnl
1270243d802faSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
1270343d802faSmrg])
12704d63fdb69Smrg
1270543d802faSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc.
1270643d802faSmrg#
1270743d802faSmrg# This file is free software; the Free Software Foundation
1270843d802faSmrg# gives unlimited permission to copy and/or distribute it,
1270943d802faSmrg# with or without modifications, as long as this notice is preserved.
1271055acc8fcSmrg
1271143d802faSmrg# AM_PROG_INSTALL_STRIP
1271243d802faSmrg# ---------------------
1271343d802faSmrg# One issue with vendor 'install' (even GNU) is that you can't
1271443d802faSmrg# specify the program used to strip binaries.  This is especially
1271543d802faSmrg# annoying in cross-compiling environments, where the build's strip
1271643d802faSmrg# is unlikely to handle the host's binaries.
1271743d802faSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we
1271843d802faSmrg# always use install-sh in "make install-strip", and initialize
1271943d802faSmrg# STRIPPROG with the value of the STRIP variable (set by the user).
1272043d802faSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
1272143d802faSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1272243d802faSmrg# Installed binaries are usually stripped using 'strip' when the user
1272343d802faSmrg# run "make install-strip".  However 'strip' might not be the right
1272443d802faSmrg# tool to use in cross-compilation environments, therefore Automake
1272543d802faSmrg# will honor the 'STRIP' environment variable to overrule this program.
1272643d802faSmrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
1272743d802faSmrgif test "$cross_compiling" != no; then
1272843d802faSmrg  AC_CHECK_TOOL([STRIP], [strip], :)
1272943d802faSmrgfi
1273043d802faSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1273143d802faSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
1273255acc8fcSmrg
1273343d802faSmrg# Copyright (C) 2006-2021 Free Software Foundation, Inc.
1273443d802faSmrg#
1273543d802faSmrg# This file is free software; the Free Software Foundation
1273643d802faSmrg# gives unlimited permission to copy and/or distribute it,
1273743d802faSmrg# with or without modifications, as long as this notice is preserved.
12738d63fdb69Smrg
1273943d802faSmrg# _AM_SUBST_NOTMAKE(VARIABLE)
1274043d802faSmrg# ---------------------------
1274143d802faSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1274243d802faSmrg# This macro is traced by Automake.
1274343d802faSmrgAC_DEFUN([_AM_SUBST_NOTMAKE])
12744d63fdb69Smrg
1274543d802faSmrg# AM_SUBST_NOTMAKE(VARIABLE)
1274643d802faSmrg# --------------------------
1274743d802faSmrg# Public sister of _AM_SUBST_NOTMAKE.
1274843d802faSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1274955acc8fcSmrg
1275043d802faSmrg# Check how to create a tarball.                            -*- Autoconf -*-
12751e1c0d025Smrg
1275243d802faSmrg# Copyright (C) 2004-2021 Free Software Foundation, Inc.
1275343d802faSmrg#
1275443d802faSmrg# This file is free software; the Free Software Foundation
1275543d802faSmrg# gives unlimited permission to copy and/or distribute it,
1275643d802faSmrg# with or without modifications, as long as this notice is preserved.
1275755acc8fcSmrg
1275843d802faSmrg# _AM_PROG_TAR(FORMAT)
1275943d802faSmrg# --------------------
1276043d802faSmrg# Check how to create a tarball in format FORMAT.
1276143d802faSmrg# FORMAT should be one of 'v7', 'ustar', or 'pax'.
127622a53b785Smrg#
1276343d802faSmrg# Substitute a variable $(am__tar) that is a command
1276443d802faSmrg# writing to stdout a FORMAT-tarball containing the directory
1276543d802faSmrg# $tardir.
1276643d802faSmrg#     tardir=directory && $(am__tar) > result.tar
127672a53b785Smrg#
1276843d802faSmrg# Substitute a variable $(am__untar) that extract such
1276943d802faSmrg# a tarball read from stdin.
1277043d802faSmrg#     $(am__untar) < result.tar
1277143d802faSmrg#
1277243d802faSmrgAC_DEFUN([_AM_PROG_TAR],
1277343d802faSmrg[# Always define AMTAR for backward compatibility.  Yes, it's still used
1277443d802faSmrg# in the wild :-(  We should find a proper way to deprecate it ...
1277543d802faSmrgAC_SUBST([AMTAR], ['$${TAR-tar}'])
1277652fd71cdSmrg
1277743d802faSmrg# We'll loop over all known methods to create a tar archive until one works.
1277843d802faSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1277952fd71cdSmrg
1278043d802faSmrgm4_if([$1], [v7],
1278143d802faSmrg  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1278252fd71cdSmrg
1278343d802faSmrg  [m4_case([$1],
1278443d802faSmrg    [ustar],
1278543d802faSmrg     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
1278643d802faSmrg      # There is notably a 21 bits limit for the UID and the GID.  In fact,
1278743d802faSmrg      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
1278843d802faSmrg      # and bug#13588).
1278943d802faSmrg      am_max_uid=2097151 # 2^21 - 1
1279043d802faSmrg      am_max_gid=$am_max_uid
1279143d802faSmrg      # The $UID and $GID variables are not portable, so we need to resort
1279243d802faSmrg      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
1279343d802faSmrg      # below are definitely unexpected, so allow the users to see them
1279443d802faSmrg      # (that is, avoid stderr redirection).
1279543d802faSmrg      am_uid=`id -u || echo unknown`
1279643d802faSmrg      am_gid=`id -g || echo unknown`
1279743d802faSmrg      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
1279843d802faSmrg      if test $am_uid -le $am_max_uid; then
1279943d802faSmrg         AC_MSG_RESULT([yes])
1280043d802faSmrg      else
1280143d802faSmrg         AC_MSG_RESULT([no])
1280243d802faSmrg         _am_tools=none
1280343d802faSmrg      fi
1280443d802faSmrg      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
1280543d802faSmrg      if test $am_gid -le $am_max_gid; then
1280643d802faSmrg         AC_MSG_RESULT([yes])
1280743d802faSmrg      else
1280843d802faSmrg        AC_MSG_RESULT([no])
1280943d802faSmrg        _am_tools=none
1281043d802faSmrg      fi],
1281152fd71cdSmrg
1281243d802faSmrg  [pax],
1281343d802faSmrg    [],
1281452fd71cdSmrg
1281543d802faSmrg  [m4_fatal([Unknown tar format])])
1281652fd71cdSmrg
1281743d802faSmrg  AC_MSG_CHECKING([how to create a $1 tar archive])
1281852fd71cdSmrg
1281943d802faSmrg  # Go ahead even if we have the value already cached.  We do so because we
1282043d802faSmrg  # need to set the values for the 'am__tar' and 'am__untar' variables.
1282143d802faSmrg  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1282252fd71cdSmrg
1282343d802faSmrg  for _am_tool in $_am_tools; do
1282443d802faSmrg    case $_am_tool in
1282543d802faSmrg    gnutar)
1282643d802faSmrg      for _am_tar in tar gnutar gtar; do
1282743d802faSmrg        AM_RUN_LOG([$_am_tar --version]) && break
1282843d802faSmrg      done
1282943d802faSmrg      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1283043d802faSmrg      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1283143d802faSmrg      am__untar="$_am_tar -xf -"
1283243d802faSmrg      ;;
1283343d802faSmrg    plaintar)
1283443d802faSmrg      # Must skip GNU tar: if it does not support --format= it doesn't create
1283543d802faSmrg      # ustar tarball either.
1283643d802faSmrg      (tar --version) >/dev/null 2>&1 && continue
1283743d802faSmrg      am__tar='tar chf - "$$tardir"'
1283843d802faSmrg      am__tar_='tar chf - "$tardir"'
1283943d802faSmrg      am__untar='tar xf -'
1284043d802faSmrg      ;;
1284143d802faSmrg    pax)
1284243d802faSmrg      am__tar='pax -L -x $1 -w "$$tardir"'
1284343d802faSmrg      am__tar_='pax -L -x $1 -w "$tardir"'
1284443d802faSmrg      am__untar='pax -r'
1284543d802faSmrg      ;;
1284643d802faSmrg    cpio)
1284743d802faSmrg      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1284843d802faSmrg      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1284943d802faSmrg      am__untar='cpio -i -H $1 -d'
1285043d802faSmrg      ;;
1285143d802faSmrg    none)
1285243d802faSmrg      am__tar=false
1285343d802faSmrg      am__tar_=false
1285443d802faSmrg      am__untar=false
1285543d802faSmrg      ;;
1285643d802faSmrg    esac
1285752fd71cdSmrg
1285843d802faSmrg    # If the value was cached, stop now.  We just wanted to have am__tar
1285943d802faSmrg    # and am__untar set.
1286043d802faSmrg    test -n "${am_cv_prog_tar_$1}" && break
1286143d802faSmrg
1286243d802faSmrg    # tar/untar a dummy directory, and stop if the command works.
1286343d802faSmrg    rm -rf conftest.dir
1286443d802faSmrg    mkdir conftest.dir
1286543d802faSmrg    echo GrepMe > conftest.dir/file
1286643d802faSmrg    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1286743d802faSmrg    rm -rf conftest.dir
1286843d802faSmrg    if test -s conftest.tar; then
1286943d802faSmrg      AM_RUN_LOG([$am__untar <conftest.tar])
1287043d802faSmrg      AM_RUN_LOG([cat conftest.dir/file])
1287143d802faSmrg      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1287243d802faSmrg    fi
1287343d802faSmrg  done
1287443d802faSmrg  rm -rf conftest.dir
1287543d802faSmrg
1287643d802faSmrg  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1287743d802faSmrg  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1287843d802faSmrg
1287943d802faSmrgAC_SUBST([am__tar])
1288043d802faSmrgAC_SUBST([am__untar])
1288143d802faSmrg]) # _AM_PROG_TAR
12882d63fdb69Smrg
12883