aclocal.m4 revision c82838c1
1# generated automatically by aclocal 1.16.5 -*- Autoconf -*-
2
3# Copyright (C) 1996-2021 Free Software Foundation, Inc.
4
5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it,
7# with or without modifications, as long as this notice is preserved.
8
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12# PARTICULAR PURPOSE.
13
14m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15m4_ifndef([AC_AUTOCONF_VERSION],
16  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],,
18[m4_warning([this file was generated for autoconf 2.71.
19You have another version of autoconf.  It may work, but is not guaranteed to.
20If you have problems, you may need to regenerate the build system entirely.
21To do so, use the procedure documented by the package, typically 'autoreconf'.])])
22
23dnl fontutil.m4.  Generated from fontutil.m4.in by configure.
24dnl
25dnl This file comes from X.Org's font-util 1.3.1
26dnl
27dnl Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
28dnl
29dnl Permission is hereby granted, free of charge, to any person obtaining a
30dnl copy of this software and associated documentation files (the "Software"),
31dnl to deal in the Software without restriction, including without limitation
32dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
33dnl and/or sell copies of the Software, and to permit persons to whom the
34dnl Software is furnished to do so, subject to the following conditions:
35dnl
36dnl The above copyright notice and this permission notice (including the next
37dnl paragraph) shall be included in all copies or substantial portions of the
38dnl Software.
39dnl
40dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
41dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
42dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
43dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
44dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
45dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
46dnl DEALINGS IN THE SOFTWARE.
47dnl
48dnl --------------------------------------------------------------------
49dnl
50dnl Copyright 2005 Red Hat, Inc
51dnl
52dnl Permission to use, copy, modify, distribute, and sell this software and its
53dnl documentation for any purpose is hereby granted without fee, provided that
54dnl the above copyright notice appear in all copies and that both that
55dnl copyright notice and this permission notice appear in supporting
56dnl documentation.
57dnl
58dnl The above copyright notice and this permission notice shall be included
59dnl in all copies or substantial portions of the Software.
60dnl
61dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
62dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
63dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
64dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
65dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
66dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
67dnl OTHER DEALINGS IN THE SOFTWARE.
68dnl
69dnl Except as contained in this notice, the name of the copyright holders shall
70dnl not be used in advertising or otherwise to promote the sale, use or
71dnl other dealings in this Software without prior written authorization
72dnl from the copyright holders.
73
74# XORG_FONT_MACROS_VERSION(required-version)
75# ------------------------------------------
76# Minimum version: 1.1.0
77#
78# If you're using a macro added in Version 1.1 or newer, include this in
79# your configure.ac with the minimum required version, such as:
80# XORG_FONT_MACROS_VERSION(1.1)
81#
82# To ensure that this macro is defined, also add:
83# m4_ifndef([XORG_FONT_MACROS_VERSION],
84#     [m4_fatal([must install X.Org font-util 1.1 or later before running autoconf/autogen])])
85#
86#
87# See the "minimum version" comment for each macro you use to see what
88# version you require.
89m4_defun([XORG_FONT_MACROS_VERSION],[
90m4_define([vers_have], [1.3.1])
91m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
92m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
93m4_if(m4_cmp(maj_have, maj_needed), 0,,
94    [m4_fatal([font-util major version ]maj_needed[ is required but ]vers_have[ found])])
95m4_if(m4_version_compare(vers_have, [$1]), -1,
96    [m4_fatal([font-util version $1 or higher is required but ]vers_have[ found])])
97m4_undefine([vers_have])
98m4_undefine([maj_have])
99m4_undefine([maj_needed])
100]) # XORG_FONT_MACROS_VERSION
101
102# XORG_FONT_CHECK_{maps}()
103# ------------------------
104# Minimum version: 1.0.0
105# These macros add --enable/disable-{maps} where {maps} are ISO8859-*,
106# JISX0201 or KOI8_R.  By default, they are all enabled.
107
108AC_DEFUN([XORG_FONT_CHECK_ISO8859_1], [XORG_FONT_CHECK_ENCODING(ISO8859-1)])
109AC_DEFUN([XORG_FONT_CHECK_ISO8859_2], [XORG_FONT_CHECK_ENCODING(ISO8859-2)])
110AC_DEFUN([XORG_FONT_CHECK_ISO8859_3], [XORG_FONT_CHECK_ENCODING(ISO8859-3)])
111AC_DEFUN([XORG_FONT_CHECK_ISO8859_4], [XORG_FONT_CHECK_ENCODING(ISO8859-4)])
112AC_DEFUN([XORG_FONT_CHECK_ISO8859_5], [XORG_FONT_CHECK_ENCODING(ISO8859-5)])
113AC_DEFUN([XORG_FONT_CHECK_ISO8859_6], [XORG_FONT_CHECK_ENCODING(ISO8859-6)])
114AC_DEFUN([XORG_FONT_CHECK_ISO8859_7], [XORG_FONT_CHECK_ENCODING(ISO8859-7)])
115AC_DEFUN([XORG_FONT_CHECK_ISO8859_8], [XORG_FONT_CHECK_ENCODING(ISO8859-8)])
116AC_DEFUN([XORG_FONT_CHECK_ISO8859_9], [XORG_FONT_CHECK_ENCODING(ISO8859-9)])
117AC_DEFUN([XORG_FONT_CHECK_ISO8859_10],[XORG_FONT_CHECK_ENCODING(ISO8859-10)])
118AC_DEFUN([XORG_FONT_CHECK_ISO8859_11],[XORG_FONT_CHECK_ENCODING(ISO8859-11)])
119AC_DEFUN([XORG_FONT_CHECK_ISO8859_12],[XORG_FONT_CHECK_ENCODING(ISO8859-12)])
120AC_DEFUN([XORG_FONT_CHECK_ISO8859_13],[XORG_FONT_CHECK_ENCODING(ISO8859-13)])
121AC_DEFUN([XORG_FONT_CHECK_ISO8859_14],[XORG_FONT_CHECK_ENCODING(ISO8859-14)])
122AC_DEFUN([XORG_FONT_CHECK_ISO8859_15],[XORG_FONT_CHECK_ENCODING(ISO8859-15)])
123AC_DEFUN([XORG_FONT_CHECK_ISO8859_16],[XORG_FONT_CHECK_ENCODING(ISO8859-16)])
124AC_DEFUN([XORG_FONT_CHECK_JISX0201],  [XORG_FONT_CHECK_ENCODING(JISX0201)])
125AC_DEFUN([XORG_FONT_CHECK_KOI8_R],    [XORG_FONT_CHECK_ENCODING(KOI8-R)])
126
127# XORG_FONT_CHECK_ENCODING(encoding)
128# ----------------------------------
129# Minimum version: 1.1.0
130# This macro adds --enable/disable-<encoding>, enabled by default.
131# It replaced individual copies of this code in the above macros in 1.1.
132# Currently assumes encoding names will be all upper-case - add m4_toupper
133# calls if this is not true in the future.
134
135AC_DEFUN([XORG_FONT_CHECK_ENCODING],[
136	AC_ARG_ENABLE(m4_tolower($1),
137		AS_HELP_STRING(m4_join([-], [--disable], m4_tolower($1)),
138				[Build $1 fonts (default: yes)]),
139		[AS_TR_SH($1)=$enableval])
140	AC_MSG_CHECKING([whether to build $1 fonts])
141	AC_MSG_RESULT($[AS_TR_SH($1)])
142	AM_CONDITIONAL(AS_TR_SH($1), [test "x$AS_TR_SH($1)" = xyes])
143]) # XORG_FONT_CHECK_ENCODING
144
145# XORG_FONT_CHECK_ENCODING_LIST(encoding1 encoding2....)
146# -----------------------------------------------------
147# Minimum version: 1.1.0
148# Call XORG_FONT_CHECK_ENCODING for multiple encodings at once.
149# Add a shorthand --enable/disable-all-encodings option.
150
151AC_DEFUN([XORG_FONT_CHECK_ENCODING_LIST],[
152	AC_ARG_ENABLE([all-encodings],
153		AS_HELP_STRING([--disable-all-encodings],
154				[Disable building of all font encodings]),
155		[m4_foreach_w([enc], [$1], [
156			AS_TR_SH(enc)=$enableval
157		])],
158		[m4_foreach_w([enc], [$1], [
159			AS_TR_SH(enc)=yes
160		])])
161	m4_foreach_w([enc], [$1], [XORG_FONT_CHECK_ENCODING(enc)])
162]) # XORG_FONT_CHECK_ENCODING_LIST
163
164# XORG_FONT_REQUIRED_PROG(VARNAME, progname)
165# ------------------------------------------
166# Minimum version: 1.1.0
167#
168# Simple wrapper around AC_PATH_PROG that errors if not found
169#
170
171AC_DEFUN([XORG_FONT_REQUIRED_PROG],[
172	AC_PATH_PROG($1, $2)
173	if test x"$$1" = x; then
174		AC_MSG_ERROR([$2 is required to build $PACKAGE_NAME.])
175	fi
176])
177
178
179# XORG_FONT_FCCACHE()
180# -------------------
181# Minimum version: 1.1.0
182#
183# Set FCCACHE to path to fc-cache (fontconfig cache builder) if found
184# Set RUN_FCCACHE to a rule suitable for substituting into a makefile
185# to run fc-cache if found and not installing to $DESTDIR and not
186# cross-compiling
187#
188# fc-cache is optional, not required, and should be skipped when making
189# packages (installing to $DESTDIR) or cross-compiling
190#
191AC_DEFUN([XORG_FONT_FCCACHE],[
192	AC_PATH_PROG(FCCACHE, fc-cache)
193	FCCACHE_WARN='echo "** Warning: fonts.cache not built" ; echo "** Generate this file manually on host system using fc-cache"'
194	if test x"$FCCACHE" = x || test x"$cross_compiling" != x"no" ; then
195		RUN_FCCACHE="${FCCACHE_WARN}"
196	else
197		RUN_FCCACHE='@(if test -z "$(DESTDIR)"; then echo $(FCCACHE) $(fontdir); $(FCCACHE) $(fontdir); else'
198		RUN_FCCACHE="${RUN_FCCACHE} ${FCCACHE_WARN} ; fi)"
199	fi
200	AC_SUBST([RUN_FCCACHE])
201])
202
203# XORG_FONT_MKFONTDIR()
204# -------------------
205# Minimum version: 1.3.0
206#
207# Set MKFONTDIR to path to mkfontdir.
208#
209# If cross-compiling, and if mkdir is not found, use a shell command
210# which warns mkfontdir needs to be run on the target
211#
212# If not cross-compiling, mkfontdir must be found
213#
214AC_DEFUN([XORG_FONT_MKFONTDIR],[
215	if test x"$cross_compiling" != x"no" ; then
216		AC_PATH_PROG(MKFONTDIR, mkfontdir, "")
217		MKFONTDIR_WARN='echo "** Warning: mkfontdir not run" ; echo "** Run mkfontdir manually on host system"'
218
219		if test x"$MKFONTDIR" = x; then
220			MKFONTDIR="${MKFONTDIR_WARN} ; echo '** mkfontdir'"
221		fi
222	else
223		XORG_FONT_REQUIRED_PROG(MKFONTDIR, mkfontdir)
224	fi
225
226	AC_SUBST([MKFONTDIR])
227])
228
229# XORG_FONT_COMMON_UTILS()
230# ------------------------
231# Minimum version: 1.1.0
232#
233# Call XORG_FONT_REQUIRED_PROG for programs needed for all font types
234
235AC_DEFUN([XORG_FONT_COMMON_UTILS],[
236	XORG_FONT_FCCACHE
237	XORG_FONT_MKFONTDIR
238])
239
240# XORG_FONT_SCALED_UTILS()
241# ------------------------
242# Minimum version: 1.1.0
243#
244# Call XORG_FONT_REQUIRED_PROG for programs needed for scalable fonts
245# (TrueType, OpenType, Type1)
246
247AC_DEFUN([XORG_FONT_SCALED_UTILS],[
248	XORG_FONT_COMMON_UTILS
249	XORG_FONT_REQUIRED_PROG(MKFONTSCALE, mkfontscale)
250])
251
252# XORG_FONT_BDF_UTILS()
253# ---------------------
254# Minimum version: 1.1.0
255#
256# Call XORG_FONT_REQUIRED_PROG for programs needed for BDF format bitmap fonts
257# Also call XORG_FONT_CHECK_COMPRESSION to determine how to compress the
258# PCF output files created by bdftopcf
259
260AC_DEFUN([XORG_FONT_BDF_UTILS],[
261	XORG_FONT_COMMON_UTILS
262	XORG_FONT_REQUIRED_PROG(BDFTOPCF, bdftopcf)
263	XORG_FONT_CHECK_COMPRESSION
264])
265
266# XORG_FONT_CHECK_COMPRESSION()
267# -----------------------------
268# Minimum version: 1.1.0
269#
270# Offer a --with-compression flag to control what compression method is
271# used for pcf font files.   Offers all the methods currently supported
272# by libXfont, including no compression.
273
274AC_DEFUN([XORG_FONT_CHECK_COMPRESSION],[
275	AC_MSG_CHECKING([font compression method])
276	AC_ARG_WITH(compression,
277	 [AS_HELP_STRING([--with-compression=<no|compress|gzip|bzip2>],
278			 [compression method to use on pcf fonts])],
279         [compression="$withval"], [compression="yes"])
280	if test x"$compression" = "xyes" ; then
281		compression="gzip"
282	fi
283	AC_MSG_RESULT([${compression}])
284	case ${compression} in
285	 *compress)	COMPRESS_SUFFIX=".Z" ;;
286	 *gzip)		COMPRESS_SUFFIX=".gz" ;;
287	 *bzip2)	COMPRESS_SUFFIX=".bz2" ;;
288	 no|none)	COMPRESS_SUFFIX="" ; COMPRESS="cat" ;;
289	 *) AC_MSG_ERROR([${compression} is not a supported compression method]) ;;
290	esac
291	if test x"$COMPRESS_SUFFIX" != "x" ; then
292	   XORG_FONT_REQUIRED_PROG(COMPRESS, ${compression})
293	fi
294	AC_SUBST([COMPRESS_SUFFIX])
295])
296
297# XORG_FONT_UCS2ANY()
298# -------------------
299# Minimum version: 1.1.0
300#
301# Call XORG_FONT_REQUIRED_PROG for ucs2any program needed for splitting
302# Unicode-encoded BDF format bitmap fonts into subsets for older encodings.
303# Also call pkg-config to find the directory with the encoding files needed
304# by ucs2any, and export it as MAPFILES_PATH to the Makefiles
305
306AC_DEFUN([XORG_FONT_UCS2ANY],[
307	AC_REQUIRE([PKG_PROG_PKG_CONFIG])
308	XORG_FONT_REQUIRED_PROG(UCS2ANY, ucs2any)
309	PKG_CHECK_MODULES(MAPS, [fontutil])
310	AC_MSG_CHECKING([for ucs2any encoding data files])
311	MAPFILES_PATH=`$PKG_CONFIG --variable=mapdir fontutil`
312	AC_SUBST(MAPFILES_PATH)
313	AC_MSG_RESULT([${MAPFILES_PATH}])
314])
315
316
317
318# XORG_FONT_FC_CONFDIR()
319# --------------------
320# Minimum version: 1.2.0
321#
322# Sets FC_CONFDIR to the fontconfig config directory
323# (which should be --with-confdir=... when building fontconfig)
324# found from:
325#	--with-fc-confdir=...
326#	pkg-config --variable=confdir fontconfig
327#	${sysconfdir}/fonts
328
329AC_DEFUN([XORG_FONT_FC_CONFDIR],[
330	dnl Ensure $PKG_CONFIG is set first
331	AC_REQUIRE([PKG_PROG_PKG_CONFIG])
332
333	AC_MSG_CHECKING([for fontconfig's configuration directory])
334	AC_ARG_WITH(fc-confdir,
335		    AS_HELP_STRING([--with-fc-confdir=DIR],
336			   [Path to fontconfig's configuration directory]),
337		    [FC_CONFDIR="$withval"])
338	# if --with-fc-confdir was not specified
339	if test "x${FC_CONFDIR}" = "x"; then
340		FC_CONFDIR=`$PKG_CONFIG --variable=confdir fontconfig`
341	fi
342	# ...and if pkg-config didn't find confdir in fontconfig.pc...
343	if test "x${FC_CONFDIR}" = "x"; then
344		FC_CONFDIR="${sysconfdir}/fonts"
345	fi
346	AC_SUBST(FC_CONFDIR)
347	AC_MSG_RESULT([${FC_CONFDIR}])
348])
349
350
351
352# XORG_FONTROOTDIR()
353# --------------------
354# Minimum version: 1.1.0
355#
356# Sets FONTROOTDIR to the root directory for font files.  Uses the first
357# found from:
358#	--with-fontrootdir
359#	pkg-config --variable=fontrootdir fontutil
360#	${datadir}/fonts/X11
361
362AC_DEFUN([XORG_FONTROOTDIR],[
363	dnl Ensure $PKG_CONFIG is set first
364	AC_REQUIRE([PKG_PROG_PKG_CONFIG])
365
366	AC_MSG_CHECKING([for root directory for font files])
367	AC_ARG_WITH(fontrootdir,
368		    AS_HELP_STRING([--with-fontrootdir=DIR],
369			   [Path to root directory for font files]),
370		    [FONTROOTDIR="$withval"])
371	# if --with-fontrootdir not specified...
372	if test "x${FONTROOTDIR}" = "x"; then
373		FONTROOTDIR=`$PKG_CONFIG --variable=fontrootdir fontutil`
374	fi
375	# ...and if pkg-config didn't find fontdir in fontutil.pc...
376	if test "x${FONTROOTDIR}" = "x"; then
377		FONTROOTDIR="${datadir}/fonts/X11"
378	fi
379	AC_SUBST(FONTROOTDIR)
380	AC_MSG_RESULT([${FONTROOTDIR}])
381])
382
383# XORG_FONTSUBDIR(variable, flag, subdir)
384# ---------------------------------------
385# Minimum version: 1.1.0
386#
387# Offer a --with-<flag> flag to control directory for font installation
388# Default is the specified <subdir> of the font root directory.
389# Sets <variable> to the selected directory
390
391AC_DEFUN([XORG_FONTSUBDIR],[
392	AC_REQUIRE([XORG_FONTROOTDIR])
393
394	AC_MSG_CHECKING([for directory for $3 files])
395	AC_ARG_WITH($2,
396		    [AS_HELP_STRING([--with-$2=DIR],
397				    [Path to $3 files [FONTROOTDIR/$3]])],
398		    [$1="${withval}"], [$1='${FONTROOTDIR}/$3'])
399	AC_SUBST($1)
400	AC_MSG_RESULT([${$1}])
401]) # XORG_FONTSUBDIR
402
403# XORG_FONTDIR(subdir)
404# --------------------
405# Minimum version: 1.1.0
406#
407# Offer a --with-fontdir flag to control directory for font installation
408# Default is the specified subdir of the font root directory.
409# Sets FONTDIR to the selected directory
410
411AC_DEFUN([XORG_FONTDIR],[XORG_FONTSUBDIR([FONTDIR], [fontdir], [$1])])
412
413# pkg.m4 - Macros to locate and utilise pkg-config.   -*- Autoconf -*-
414# serial 11 (pkg-config-0.29.1)
415
416dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
417dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
418dnl
419dnl This program is free software; you can redistribute it and/or modify
420dnl it under the terms of the GNU General Public License as published by
421dnl the Free Software Foundation; either version 2 of the License, or
422dnl (at your option) any later version.
423dnl
424dnl This program is distributed in the hope that it will be useful, but
425dnl WITHOUT ANY WARRANTY; without even the implied warranty of
426dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
427dnl General Public License for more details.
428dnl
429dnl You should have received a copy of the GNU General Public License
430dnl along with this program; if not, write to the Free Software
431dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
432dnl 02111-1307, USA.
433dnl
434dnl As a special exception to the GNU General Public License, if you
435dnl distribute this file as part of a program that contains a
436dnl configuration script generated by Autoconf, you may include it under
437dnl the same distribution terms that you use for the rest of that
438dnl program.
439
440dnl PKG_PREREQ(MIN-VERSION)
441dnl -----------------------
442dnl Since: 0.29
443dnl
444dnl Verify that the version of the pkg-config macros are at least
445dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
446dnl installed version of pkg-config, this checks the developer's version
447dnl of pkg.m4 when generating configure.
448dnl
449dnl To ensure that this macro is defined, also add:
450dnl m4_ifndef([PKG_PREREQ],
451dnl     [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
452dnl
453dnl See the "Since" comment for each macro you use to see what version
454dnl of the macros you require.
455m4_defun([PKG_PREREQ],
456[m4_define([PKG_MACROS_VERSION], [0.29.1])
457m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
458    [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
459])dnl PKG_PREREQ
460
461dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
462dnl ----------------------------------
463dnl Since: 0.16
464dnl
465dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
466dnl first found in the path. Checks that the version of pkg-config found
467dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
468dnl used since that's the first version where most current features of
469dnl pkg-config existed.
470AC_DEFUN([PKG_PROG_PKG_CONFIG],
471[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
472m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
473m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
474AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
475AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
476AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
477
478if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
479	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
480fi
481if test -n "$PKG_CONFIG"; then
482	_pkg_min_version=m4_default([$1], [0.9.0])
483	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
484	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
485		AC_MSG_RESULT([yes])
486	else
487		AC_MSG_RESULT([no])
488		PKG_CONFIG=""
489	fi
490fi[]dnl
491])dnl PKG_PROG_PKG_CONFIG
492
493dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
494dnl -------------------------------------------------------------------
495dnl Since: 0.18
496dnl
497dnl Check to see whether a particular set of modules exists. Similar to
498dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
499dnl
500dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
501dnl only at the first occurence in configure.ac, so if the first place
502dnl it's called might be skipped (such as if it is within an "if", you
503dnl have to call PKG_CHECK_EXISTS manually
504AC_DEFUN([PKG_CHECK_EXISTS],
505[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
506if test -n "$PKG_CONFIG" && \
507    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
508  m4_default([$2], [:])
509m4_ifvaln([$3], [else
510  $3])dnl
511fi])
512
513dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
514dnl ---------------------------------------------
515dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
516dnl pkg_failed based on the result.
517m4_define([_PKG_CONFIG],
518[if test -n "$$1"; then
519    pkg_cv_[]$1="$$1"
520 elif test -n "$PKG_CONFIG"; then
521    PKG_CHECK_EXISTS([$3],
522                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
523		      test "x$?" != "x0" && pkg_failed=yes ],
524		     [pkg_failed=yes])
525 else
526    pkg_failed=untried
527fi[]dnl
528])dnl _PKG_CONFIG
529
530dnl _PKG_SHORT_ERRORS_SUPPORTED
531dnl ---------------------------
532dnl Internal check to see if pkg-config supports short errors.
533AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
534[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
535if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
536        _pkg_short_errors_supported=yes
537else
538        _pkg_short_errors_supported=no
539fi[]dnl
540])dnl _PKG_SHORT_ERRORS_SUPPORTED
541
542
543dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
544dnl   [ACTION-IF-NOT-FOUND])
545dnl --------------------------------------------------------------
546dnl Since: 0.4.0
547dnl
548dnl Note that if there is a possibility the first call to
549dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
550dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
551AC_DEFUN([PKG_CHECK_MODULES],
552[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
553AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
554AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
555
556pkg_failed=no
557AC_MSG_CHECKING([for $1])
558
559_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
560_PKG_CONFIG([$1][_LIBS], [libs], [$2])
561
562m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
563and $1[]_LIBS to avoid the need to call pkg-config.
564See the pkg-config man page for more details.])
565
566if test $pkg_failed = yes; then
567   	AC_MSG_RESULT([no])
568        _PKG_SHORT_ERRORS_SUPPORTED
569        if test $_pkg_short_errors_supported = yes; then
570	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
571        else 
572	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
573        fi
574	# Put the nasty error message in config.log where it belongs
575	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
576
577	m4_default([$4], [AC_MSG_ERROR(
578[Package requirements ($2) were not met:
579
580$$1_PKG_ERRORS
581
582Consider adjusting the PKG_CONFIG_PATH environment variable if you
583installed software in a non-standard prefix.
584
585_PKG_TEXT])[]dnl
586        ])
587elif test $pkg_failed = untried; then
588     	AC_MSG_RESULT([no])
589	m4_default([$4], [AC_MSG_FAILURE(
590[The pkg-config script could not be found or is too old.  Make sure it
591is in your PATH or set the PKG_CONFIG environment variable to the full
592path to pkg-config.
593
594_PKG_TEXT
595
596To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
597        ])
598else
599	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
600	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
601        AC_MSG_RESULT([yes])
602	$3
603fi[]dnl
604])dnl PKG_CHECK_MODULES
605
606
607dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
608dnl   [ACTION-IF-NOT-FOUND])
609dnl ---------------------------------------------------------------------
610dnl Since: 0.29
611dnl
612dnl Checks for existence of MODULES and gathers its build flags with
613dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
614dnl and VARIABLE-PREFIX_LIBS from --libs.
615dnl
616dnl Note that if there is a possibility the first call to
617dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
618dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
619dnl configure.ac.
620AC_DEFUN([PKG_CHECK_MODULES_STATIC],
621[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
622_save_PKG_CONFIG=$PKG_CONFIG
623PKG_CONFIG="$PKG_CONFIG --static"
624PKG_CHECK_MODULES($@)
625PKG_CONFIG=$_save_PKG_CONFIG[]dnl
626])dnl PKG_CHECK_MODULES_STATIC
627
628
629dnl PKG_INSTALLDIR([DIRECTORY])
630dnl -------------------------
631dnl Since: 0.27
632dnl
633dnl Substitutes the variable pkgconfigdir as the location where a module
634dnl should install pkg-config .pc files. By default the directory is
635dnl $libdir/pkgconfig, but the default can be changed by passing
636dnl DIRECTORY. The user can override through the --with-pkgconfigdir
637dnl parameter.
638AC_DEFUN([PKG_INSTALLDIR],
639[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
640m4_pushdef([pkg_description],
641    [pkg-config installation directory @<:@]pkg_default[@:>@])
642AC_ARG_WITH([pkgconfigdir],
643    [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
644    [with_pkgconfigdir=]pkg_default)
645AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
646m4_popdef([pkg_default])
647m4_popdef([pkg_description])
648])dnl PKG_INSTALLDIR
649
650
651dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
652dnl --------------------------------
653dnl Since: 0.27
654dnl
655dnl Substitutes the variable noarch_pkgconfigdir as the location where a
656dnl module should install arch-independent pkg-config .pc files. By
657dnl default the directory is $datadir/pkgconfig, but the default can be
658dnl changed by passing DIRECTORY. The user can override through the
659dnl --with-noarch-pkgconfigdir parameter.
660AC_DEFUN([PKG_NOARCH_INSTALLDIR],
661[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
662m4_pushdef([pkg_description],
663    [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
664AC_ARG_WITH([noarch-pkgconfigdir],
665    [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
666    [with_noarch_pkgconfigdir=]pkg_default)
667AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
668m4_popdef([pkg_default])
669m4_popdef([pkg_description])
670])dnl PKG_NOARCH_INSTALLDIR
671
672
673dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
674dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
675dnl -------------------------------------------
676dnl Since: 0.28
677dnl
678dnl Retrieves the value of the pkg-config variable for the given module.
679AC_DEFUN([PKG_CHECK_VAR],
680[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
681AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
682
683_PKG_CONFIG([$1], [variable="][$3]["], [$2])
684AS_VAR_COPY([$1], [pkg_cv_][$1])
685
686AS_VAR_IF([$1], [""], [$5], [$4])dnl
687])dnl PKG_CHECK_VAR
688
689dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES,
690dnl   [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND],
691dnl   [DESCRIPTION], [DEFAULT])
692dnl ------------------------------------------
693dnl
694dnl Prepare a "--with-" configure option using the lowercase
695dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and
696dnl PKG_CHECK_MODULES in a single macro.
697AC_DEFUN([PKG_WITH_MODULES],
698[
699m4_pushdef([with_arg], m4_tolower([$1]))
700
701m4_pushdef([description],
702           [m4_default([$5], [build with ]with_arg[ support])])
703
704m4_pushdef([def_arg], [m4_default([$6], [auto])])
705m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes])
706m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no])
707
708m4_case(def_arg,
709            [yes],[m4_pushdef([with_without], [--without-]with_arg)],
710            [m4_pushdef([with_without],[--with-]with_arg)])
711
712AC_ARG_WITH(with_arg,
713     AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),,
714    [AS_TR_SH([with_]with_arg)=def_arg])
715
716AS_CASE([$AS_TR_SH([with_]with_arg)],
717            [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)],
718            [auto],[PKG_CHECK_MODULES([$1],[$2],
719                                        [m4_n([def_action_if_found]) $3],
720                                        [m4_n([def_action_if_not_found]) $4])])
721
722m4_popdef([with_arg])
723m4_popdef([description])
724m4_popdef([def_arg])
725
726])dnl PKG_WITH_MODULES
727
728dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
729dnl   [DESCRIPTION], [DEFAULT])
730dnl -----------------------------------------------
731dnl
732dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES
733dnl check._[VARIABLE-PREFIX] is exported as make variable.
734AC_DEFUN([PKG_HAVE_WITH_MODULES],
735[
736PKG_WITH_MODULES([$1],[$2],,,[$3],[$4])
737
738AM_CONDITIONAL([HAVE_][$1],
739               [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"])
740])dnl PKG_HAVE_WITH_MODULES
741
742dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
743dnl   [DESCRIPTION], [DEFAULT])
744dnl ------------------------------------------------------
745dnl
746dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after
747dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make
748dnl and preprocessor variable.
749AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES],
750[
751PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4])
752
753AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"],
754        [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])])
755])dnl PKG_HAVE_DEFINE_WITH_MODULES
756
757dnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
758dnl
759dnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
760dnl
761dnl Permission is hereby granted, free of charge, to any person obtaining a
762dnl copy of this software and associated documentation files (the "Software"),
763dnl to deal in the Software without restriction, including without limitation
764dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
765dnl and/or sell copies of the Software, and to permit persons to whom the
766dnl Software is furnished to do so, subject to the following conditions:
767dnl
768dnl The above copyright notice and this permission notice (including the next
769dnl paragraph) shall be included in all copies or substantial portions of the
770dnl Software.
771dnl
772dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
773dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
774dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
775dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
776dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
777dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
778dnl DEALINGS IN THE SOFTWARE.
779
780# XORG_MACROS_VERSION(required-version)
781# -------------------------------------
782# Minimum version: 1.1.0
783#
784# If you're using a macro added in Version 1.1 or newer, include this in
785# your configure.ac with the minimum required version, such as:
786# XORG_MACROS_VERSION(1.1)
787#
788# To ensure that this macro is defined, also add:
789# m4_ifndef([XORG_MACROS_VERSION],
790#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
791#
792#
793# See the "minimum version" comment for each macro you use to see what
794# version you require.
795m4_defun([XORG_MACROS_VERSION],[
796m4_define([vers_have], [1.19.3])
797m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
798m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
799m4_if(m4_cmp(maj_have, maj_needed), 0,,
800    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
801m4_if(m4_version_compare(vers_have, [$1]), -1,
802    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
803m4_undefine([vers_have])
804m4_undefine([maj_have])
805m4_undefine([maj_needed])
806]) # XORG_MACROS_VERSION
807
808# XORG_PROG_RAWCPP()
809# ------------------
810# Minimum version: 1.0.0
811#
812# Find cpp program and necessary flags for use in pre-processing text files
813# such as man pages and config files
814AC_DEFUN([XORG_PROG_RAWCPP],[
815AC_REQUIRE([AC_PROG_CPP])
816AC_PATH_TOOL(RAWCPP, [cpp], [${CPP}],
817   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
818
819# Check for flag to avoid builtin definitions - assumes unix is predefined,
820# which is not the best choice for supporting other OS'es, but covers most
821# of the ones we need for now.
822AC_MSG_CHECKING([if $RAWCPP requires -undef])
823AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])])
824if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
825	AC_MSG_RESULT([no])
826else
827	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
828		RAWCPPFLAGS=-undef
829		AC_MSG_RESULT([yes])
830	# under Cygwin unix is still defined even with -undef
831	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
832		RAWCPPFLAGS="-undef -ansi"
833		AC_MSG_RESULT([yes, with -ansi])
834	else
835		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
836	fi
837fi
838rm -f conftest.$ac_ext
839
840AC_MSG_CHECKING([if $RAWCPP requires -traditional])
841AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve   "whitespace"?]])])
842if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
843	AC_MSG_RESULT([no])
844else
845	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
846		TRADITIONALCPPFLAGS="-traditional"
847		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
848		AC_MSG_RESULT([yes])
849	else
850		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
851	fi
852fi
853rm -f conftest.$ac_ext
854AC_SUBST(RAWCPPFLAGS)
855AC_SUBST(TRADITIONALCPPFLAGS)
856]) # XORG_PROG_RAWCPP
857
858# XORG_MANPAGE_SECTIONS()
859# -----------------------
860# Minimum version: 1.0.0
861#
862# Determine which sections man pages go in for the different man page types
863# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
864# Not sure if there's any better way than just hardcoding by OS name.
865# Override default settings by setting environment variables
866# Added MAN_SUBSTS in version 1.8
867# Added AC_PROG_SED in version 1.8
868
869AC_DEFUN([XORG_MANPAGE_SECTIONS],[
870AC_REQUIRE([AC_CANONICAL_HOST])
871AC_REQUIRE([AC_PROG_SED])
872
873case $host_os in
874    solaris*)
875        # Solaris 2.0 - 11.3 use SysV man page section numbers, so we
876        # check for a man page file found in later versions that use
877        # traditional section numbers instead
878        AC_CHECK_FILE([/usr/share/man/man7/attributes.7],
879                [SYSV_MAN_SECTIONS=false], [SYSV_MAN_SECTIONS=true])
880        ;;
881    *) SYSV_MAN_SECTIONS=false ;;
882esac
883
884if test x$APP_MAN_SUFFIX = x    ; then
885    APP_MAN_SUFFIX=1
886fi
887if test x$APP_MAN_DIR = x    ; then
888    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
889fi
890
891if test x$LIB_MAN_SUFFIX = x    ; then
892    LIB_MAN_SUFFIX=3
893fi
894if test x$LIB_MAN_DIR = x    ; then
895    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
896fi
897
898if test x$FILE_MAN_SUFFIX = x    ; then
899    case $SYSV_MAN_SECTIONS in
900	true)				FILE_MAN_SUFFIX=4  ;;
901	*)				FILE_MAN_SUFFIX=5  ;;
902    esac
903fi
904if test x$FILE_MAN_DIR = x    ; then
905    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
906fi
907
908if test x$MISC_MAN_SUFFIX = x    ; then
909    case $SYSV_MAN_SECTIONS in
910	true)				MISC_MAN_SUFFIX=5  ;;
911	*)				MISC_MAN_SUFFIX=7  ;;
912    esac
913fi
914if test x$MISC_MAN_DIR = x    ; then
915    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
916fi
917
918if test x$DRIVER_MAN_SUFFIX = x    ; then
919    case $SYSV_MAN_SECTIONS in
920	true)				DRIVER_MAN_SUFFIX=7  ;;
921	*)				DRIVER_MAN_SUFFIX=4  ;;
922    esac
923fi
924if test x$DRIVER_MAN_DIR = x    ; then
925    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
926fi
927
928if test x$ADMIN_MAN_SUFFIX = x    ; then
929    case $SYSV_MAN_SECTIONS in
930	true)				ADMIN_MAN_SUFFIX=1m ;;
931	*)				ADMIN_MAN_SUFFIX=8  ;;
932    esac
933fi
934if test x$ADMIN_MAN_DIR = x    ; then
935    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
936fi
937
938
939AC_SUBST([APP_MAN_SUFFIX])
940AC_SUBST([LIB_MAN_SUFFIX])
941AC_SUBST([FILE_MAN_SUFFIX])
942AC_SUBST([MISC_MAN_SUFFIX])
943AC_SUBST([DRIVER_MAN_SUFFIX])
944AC_SUBST([ADMIN_MAN_SUFFIX])
945AC_SUBST([APP_MAN_DIR])
946AC_SUBST([LIB_MAN_DIR])
947AC_SUBST([FILE_MAN_DIR])
948AC_SUBST([MISC_MAN_DIR])
949AC_SUBST([DRIVER_MAN_DIR])
950AC_SUBST([ADMIN_MAN_DIR])
951
952XORG_MAN_PAGE="X Version 11"
953AC_SUBST([XORG_MAN_PAGE])
954MAN_SUBSTS="\
955	-e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
956	-e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
957	-e 's|__xservername__|Xorg|g' \
958	-e 's|__xconfigfile__|xorg.conf|g' \
959	-e 's|__projectroot__|\$(prefix)|g' \
960	-e 's|__apploaddir__|\$(appdefaultdir)|g' \
961	-e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
962	-e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
963	-e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
964	-e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
965	-e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
966	-e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
967AC_SUBST([MAN_SUBSTS])
968
969]) # XORG_MANPAGE_SECTIONS
970
971# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
972# ------------------------
973# Minimum version: 1.7.0
974#
975# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
976# provided by xorg-sgml-doctools, if installed.
977AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
978AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
979XORG_SGML_PATH=
980PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
981    [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
982    [m4_ifval([$1],[:],
983        [if test x"$cross_compiling" != x"yes" ; then
984            AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
985                          [XORG_SGML_PATH=$prefix/share/sgml])
986         fi])
987    ])
988
989# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
990# the path and the name of the doc stylesheet
991if test "x$XORG_SGML_PATH" != "x" ; then
992   AC_MSG_RESULT([$XORG_SGML_PATH])
993   STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
994   XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
995else
996   AC_MSG_RESULT([no])
997fi
998
999AC_SUBST(XORG_SGML_PATH)
1000AC_SUBST(STYLESHEET_SRCDIR)
1001AC_SUBST(XSL_STYLESHEET)
1002AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
1003]) # XORG_CHECK_SGML_DOCTOOLS
1004
1005# XORG_CHECK_LINUXDOC
1006# -------------------
1007# Minimum version: 1.0.0
1008#
1009# Defines the variable MAKE_TEXT if the necessary tools and
1010# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
1011# Whether or not the necessary tools and files are found can be checked
1012# with the AM_CONDITIONAL "BUILD_LINUXDOC"
1013AC_DEFUN([XORG_CHECK_LINUXDOC],[
1014AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
1015AC_REQUIRE([XORG_WITH_PS2PDF])
1016
1017AC_PATH_PROG(LINUXDOC, linuxdoc)
1018
1019AC_MSG_CHECKING([whether to build documentation])
1020
1021if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
1022   BUILDDOC=yes
1023else
1024   BUILDDOC=no
1025fi
1026
1027AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
1028
1029AC_MSG_RESULT([$BUILDDOC])
1030
1031AC_MSG_CHECKING([whether to build pdf documentation])
1032
1033if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
1034   BUILDPDFDOC=yes
1035else
1036   BUILDPDFDOC=no
1037fi
1038
1039AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
1040
1041AC_MSG_RESULT([$BUILDPDFDOC])
1042
1043MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
1044MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
1045MAKE_PDF="$PS2PDF"
1046MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
1047
1048AC_SUBST(MAKE_TEXT)
1049AC_SUBST(MAKE_PS)
1050AC_SUBST(MAKE_PDF)
1051AC_SUBST(MAKE_HTML)
1052]) # XORG_CHECK_LINUXDOC
1053
1054# XORG_CHECK_DOCBOOK
1055# -------------------
1056# Minimum version: 1.0.0
1057#
1058# Checks for the ability to build output formats from SGML DocBook source.
1059# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
1060# indicates whether the necessary tools and files are found and, if set,
1061# $(MAKE_XXX) blah.sgml will produce blah.xxx.
1062AC_DEFUN([XORG_CHECK_DOCBOOK],[
1063AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
1064
1065BUILDTXTDOC=no
1066BUILDPDFDOC=no
1067BUILDPSDOC=no
1068BUILDHTMLDOC=no
1069
1070AC_PATH_PROG(DOCBOOKPS, docbook2ps)
1071AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
1072AC_PATH_PROG(DOCBOOKHTML, docbook2html)
1073AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
1074
1075AC_MSG_CHECKING([whether to build text documentation])
1076if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
1077   test x$BUILD_TXTDOC != xno; then
1078	BUILDTXTDOC=yes
1079fi
1080AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
1081AC_MSG_RESULT([$BUILDTXTDOC])
1082
1083AC_MSG_CHECKING([whether to build PDF documentation])
1084if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
1085   test x$BUILD_PDFDOC != xno; then
1086	BUILDPDFDOC=yes
1087fi
1088AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
1089AC_MSG_RESULT([$BUILDPDFDOC])
1090
1091AC_MSG_CHECKING([whether to build PostScript documentation])
1092if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
1093   test x$BUILD_PSDOC != xno; then
1094	BUILDPSDOC=yes
1095fi
1096AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
1097AC_MSG_RESULT([$BUILDPSDOC])
1098
1099AC_MSG_CHECKING([whether to build HTML documentation])
1100if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
1101   test x$BUILD_HTMLDOC != xno; then
1102	BUILDHTMLDOC=yes
1103fi
1104AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
1105AC_MSG_RESULT([$BUILDHTMLDOC])
1106
1107MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
1108MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
1109MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
1110MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
1111
1112AC_SUBST(MAKE_TEXT)
1113AC_SUBST(MAKE_PS)
1114AC_SUBST(MAKE_PDF)
1115AC_SUBST(MAKE_HTML)
1116]) # XORG_CHECK_DOCBOOK
1117
1118# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT])
1119# ----------------
1120# Minimum version: 1.5.0
1121# Minimum version for optional DEFAULT argument: 1.11.0
1122#
1123# Documentation tools are not always available on all platforms and sometimes
1124# not at the appropriate level. This macro enables a module to test for the
1125# presence of the tool and obtain it's path in separate variables. Coupled with
1126# the --with-xmlto option, it allows maximum flexibilty in making decisions
1127# as whether or not to use the xmlto package. When DEFAULT is not specified,
1128# --with-xmlto assumes 'auto'.
1129#
1130# Interface to module:
1131# HAVE_XMLTO: 	used in makefiles to conditionally generate documentation
1132# XMLTO:	returns the path of the xmlto program found
1133#		returns the path set by the user in the environment
1134# --with-xmlto:	'yes' user instructs the module to use xmlto
1135#		'no' user instructs the module not to use xmlto
1136#
1137# Added in version 1.10.0
1138# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
1139#                  xmlto for text output requires either lynx, links, or w3m browsers
1140#
1141# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
1142#
1143AC_DEFUN([XORG_WITH_XMLTO],[
1144AC_ARG_VAR([XMLTO], [Path to xmlto command])
1145m4_define([_defopt], m4_default([$2], [auto]))
1146AC_ARG_WITH(xmlto,
1147	AS_HELP_STRING([--with-xmlto],
1148	   [Use xmlto to regenerate documentation (default: ]_defopt[)]),
1149	   [use_xmlto=$withval], [use_xmlto=]_defopt)
1150m4_undefine([_defopt])
1151
1152if test "x$use_xmlto" = x"auto"; then
1153   AC_PATH_PROG([XMLTO], [xmlto])
1154   if test "x$XMLTO" = "x"; then
1155        AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
1156	have_xmlto=no
1157   else
1158        have_xmlto=yes
1159   fi
1160elif test "x$use_xmlto" = x"yes" ; then
1161   AC_PATH_PROG([XMLTO], [xmlto])
1162   if test "x$XMLTO" = "x"; then
1163        AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
1164   fi
1165   have_xmlto=yes
1166elif test "x$use_xmlto" = x"no" ; then
1167   if test "x$XMLTO" != "x"; then
1168      AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
1169   fi
1170   have_xmlto=no
1171else
1172   AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
1173fi
1174
1175# Test for a minimum version of xmlto, if provided.
1176m4_ifval([$1],
1177[if test "$have_xmlto" = yes; then
1178    # scrape the xmlto version
1179    AC_MSG_CHECKING([the xmlto version])
1180    xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
1181    AC_MSG_RESULT([$xmlto_version])
1182    AS_VERSION_COMPARE([$xmlto_version], [$1],
1183        [if test "x$use_xmlto" = xauto; then
1184            AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
1185            have_xmlto=no
1186        else
1187            AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
1188        fi])
1189fi])
1190
1191# Test for the ability of xmlto to generate a text target
1192#
1193# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the
1194# following test for empty XML docbook files.
1195# For compatibility reasons use the following empty XML docbook file and if
1196# it fails try it again with a non-empty XML file.
1197have_xmlto_text=no
1198cat > conftest.xml << "EOF"
1199EOF
1200AS_IF([test "$have_xmlto" = yes],
1201      [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
1202             [have_xmlto_text=yes],
1203             [# Try it again with a non-empty XML file.
1204              cat > conftest.xml << "EOF"
1205<x></x>
1206EOF
1207              AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
1208                    [have_xmlto_text=yes],
1209                    [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])])
1210rm -f conftest.xml
1211AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
1212AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
1213]) # XORG_WITH_XMLTO
1214
1215# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT])
1216# --------------------------------------------
1217# Minimum version: 1.12.0
1218# Minimum version for optional DEFAULT argument: 1.12.0
1219#
1220# XSLT (Extensible Stylesheet Language Transformations) is a declarative,
1221# XML-based language used for the transformation of XML documents.
1222# The xsltproc command line tool is for applying XSLT stylesheets to XML documents.
1223# It is used under the cover by xmlto to generate html files from DocBook/XML.
1224# The XSLT processor is often used as a standalone tool for transformations.
1225# It should not be assumed that this tool is used only to work with documnetation.
1226# When DEFAULT is not specified, --with-xsltproc assumes 'auto'.
1227#
1228# Interface to module:
1229# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation
1230# XSLTPROC:	 returns the path of the xsltproc program found
1231#		 returns the path set by the user in the environment
1232# --with-xsltproc: 'yes' user instructs the module to use xsltproc
1233#		  'no' user instructs the module not to use xsltproc
1234# have_xsltproc: returns yes if xsltproc found in PATH or no
1235#
1236# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path.
1237#
1238AC_DEFUN([XORG_WITH_XSLTPROC],[
1239AC_ARG_VAR([XSLTPROC], [Path to xsltproc command])
1240# Preserves the interface, should it be implemented later
1241m4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])])
1242m4_define([_defopt], m4_default([$2], [auto]))
1243AC_ARG_WITH(xsltproc,
1244	AS_HELP_STRING([--with-xsltproc],
1245	   [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]),
1246	   [use_xsltproc=$withval], [use_xsltproc=]_defopt)
1247m4_undefine([_defopt])
1248
1249if test "x$use_xsltproc" = x"auto"; then
1250   AC_PATH_PROG([XSLTPROC], [xsltproc])
1251   if test "x$XSLTPROC" = "x"; then
1252        AC_MSG_WARN([xsltproc not found - cannot transform XML documents])
1253	have_xsltproc=no
1254   else
1255        have_xsltproc=yes
1256   fi
1257elif test "x$use_xsltproc" = x"yes" ; then
1258   AC_PATH_PROG([XSLTPROC], [xsltproc])
1259   if test "x$XSLTPROC" = "x"; then
1260        AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH])
1261   fi
1262   have_xsltproc=yes
1263elif test "x$use_xsltproc" = x"no" ; then
1264   if test "x$XSLTPROC" != "x"; then
1265      AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified])
1266   fi
1267   have_xsltproc=no
1268else
1269   AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no'])
1270fi
1271
1272AM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes])
1273]) # XORG_WITH_XSLTPROC
1274
1275# XORG_WITH_PERL([MIN-VERSION], [DEFAULT])
1276# ----------------------------------------
1277# Minimum version: 1.15.0
1278#
1279# PERL (Practical Extraction and Report Language) is a language optimized for
1280# scanning arbitrary text files, extracting information from those text files,
1281# and printing reports based on that information.
1282#
1283# When DEFAULT is not specified, --with-perl assumes 'auto'.
1284#
1285# Interface to module:
1286# HAVE_PERL: used in makefiles to conditionally scan text files
1287# PERL:	     returns the path of the perl program found
1288#	     returns the path set by the user in the environment
1289# --with-perl: 'yes' user instructs the module to use perl
1290#	       'no' user instructs the module not to use perl
1291# have_perl: returns yes if perl found in PATH or no
1292#
1293# If the user sets the value of PERL, AC_PATH_PROG skips testing the path.
1294#
1295AC_DEFUN([XORG_WITH_PERL],[
1296AC_ARG_VAR([PERL], [Path to perl command])
1297# Preserves the interface, should it be implemented later
1298m4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])])
1299m4_define([_defopt], m4_default([$2], [auto]))
1300AC_ARG_WITH(perl,
1301	AS_HELP_STRING([--with-perl],
1302	   [Use perl for extracting information from files (default: ]_defopt[)]),
1303	   [use_perl=$withval], [use_perl=]_defopt)
1304m4_undefine([_defopt])
1305
1306if test "x$use_perl" = x"auto"; then
1307   AC_PATH_PROG([PERL], [perl])
1308   if test "x$PERL" = "x"; then
1309        AC_MSG_WARN([perl not found - cannot extract information and report])
1310	have_perl=no
1311   else
1312        have_perl=yes
1313   fi
1314elif test "x$use_perl" = x"yes" ; then
1315   AC_PATH_PROG([PERL], [perl])
1316   if test "x$PERL" = "x"; then
1317        AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH])
1318   fi
1319   have_perl=yes
1320elif test "x$use_perl" = x"no" ; then
1321   if test "x$PERL" != "x"; then
1322      AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified])
1323   fi
1324   have_perl=no
1325else
1326   AC_MSG_ERROR([--with-perl expects 'yes' or 'no'])
1327fi
1328
1329AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes])
1330]) # XORG_WITH_PERL
1331
1332# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
1333# ----------------
1334# Minimum version: 1.5.0
1335# Minimum version for optional DEFAULT argument: 1.11.0
1336#
1337# Documentation tools are not always available on all platforms and sometimes
1338# not at the appropriate level. This macro enables a module to test for the
1339# presence of the tool and obtain it's path in separate variables. Coupled with
1340# the --with-asciidoc option, it allows maximum flexibilty in making decisions
1341# as whether or not to use the asciidoc package. When DEFAULT is not specified,
1342# --with-asciidoc assumes 'auto'.
1343#
1344# Interface to module:
1345# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
1346# ASCIIDOC:	 returns the path of the asciidoc program found
1347#		 returns the path set by the user in the environment
1348# --with-asciidoc: 'yes' user instructs the module to use asciidoc
1349#		  'no' user instructs the module not to use asciidoc
1350#
1351# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
1352#
1353AC_DEFUN([XORG_WITH_ASCIIDOC],[
1354AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
1355m4_define([_defopt], m4_default([$2], [auto]))
1356AC_ARG_WITH(asciidoc,
1357	AS_HELP_STRING([--with-asciidoc],
1358	   [Use asciidoc to regenerate documentation (default: ]_defopt[)]),
1359	   [use_asciidoc=$withval], [use_asciidoc=]_defopt)
1360m4_undefine([_defopt])
1361
1362if test "x$use_asciidoc" = x"auto"; then
1363   AC_PATH_PROG([ASCIIDOC], [asciidoc])
1364   if test "x$ASCIIDOC" = "x"; then
1365        AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
1366	have_asciidoc=no
1367   else
1368        have_asciidoc=yes
1369   fi
1370elif test "x$use_asciidoc" = x"yes" ; then
1371   AC_PATH_PROG([ASCIIDOC], [asciidoc])
1372   if test "x$ASCIIDOC" = "x"; then
1373        AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
1374   fi
1375   have_asciidoc=yes
1376elif test "x$use_asciidoc" = x"no" ; then
1377   if test "x$ASCIIDOC" != "x"; then
1378      AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
1379   fi
1380   have_asciidoc=no
1381else
1382   AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
1383fi
1384m4_ifval([$1],
1385[if test "$have_asciidoc" = yes; then
1386    # scrape the asciidoc version
1387    AC_MSG_CHECKING([the asciidoc version])
1388    asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
1389    AC_MSG_RESULT([$asciidoc_version])
1390    AS_VERSION_COMPARE([$asciidoc_version], [$1],
1391        [if test "x$use_asciidoc" = xauto; then
1392            AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
1393            have_asciidoc=no
1394        else
1395            AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
1396        fi])
1397fi])
1398AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
1399]) # XORG_WITH_ASCIIDOC
1400
1401# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
1402# -------------------------------------------
1403# Minimum version: 1.5.0
1404# Minimum version for optional DEFAULT argument: 1.11.0
1405# Minimum version for optional DOT checking: 1.18.0
1406#
1407# Documentation tools are not always available on all platforms and sometimes
1408# not at the appropriate level. This macro enables a module to test for the
1409# presence of the tool and obtain it's path in separate variables. Coupled with
1410# the --with-doxygen option, it allows maximum flexibilty in making decisions
1411# as whether or not to use the doxygen package. When DEFAULT is not specified,
1412# --with-doxygen assumes 'auto'.
1413#
1414# Interface to module:
1415# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
1416# DOXYGEN:	 returns the path of the doxygen program found
1417#		 returns the path set by the user in the environment
1418# --with-doxygen: 'yes' user instructs the module to use doxygen
1419#		  'no' user instructs the module not to use doxygen
1420#
1421# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
1422#
1423AC_DEFUN([XORG_WITH_DOXYGEN],[
1424AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
1425AC_ARG_VAR([DOT], [Path to the dot graphics utility])
1426m4_define([_defopt], m4_default([$2], [auto]))
1427AC_ARG_WITH(doxygen,
1428	AS_HELP_STRING([--with-doxygen],
1429	   [Use doxygen to regenerate documentation (default: ]_defopt[)]),
1430	   [use_doxygen=$withval], [use_doxygen=]_defopt)
1431m4_undefine([_defopt])
1432
1433if test "x$use_doxygen" = x"auto"; then
1434   AC_PATH_PROG([DOXYGEN], [doxygen])
1435   if test "x$DOXYGEN" = "x"; then
1436        AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
1437	have_doxygen=no
1438   else
1439        have_doxygen=yes
1440   fi
1441elif test "x$use_doxygen" = x"yes" ; then
1442   AC_PATH_PROG([DOXYGEN], [doxygen])
1443   if test "x$DOXYGEN" = "x"; then
1444        AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
1445   fi
1446   have_doxygen=yes
1447elif test "x$use_doxygen" = x"no" ; then
1448   if test "x$DOXYGEN" != "x"; then
1449      AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
1450   fi
1451   have_doxygen=no
1452else
1453   AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
1454fi
1455m4_ifval([$1],
1456[if test "$have_doxygen" = yes; then
1457    # scrape the doxygen version
1458    AC_MSG_CHECKING([the doxygen version])
1459    doxygen_version=`$DOXYGEN --version 2>/dev/null`
1460    AC_MSG_RESULT([$doxygen_version])
1461    AS_VERSION_COMPARE([$doxygen_version], [$1],
1462        [if test "x$use_doxygen" = xauto; then
1463            AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
1464            have_doxygen=no
1465        else
1466            AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
1467        fi])
1468fi])
1469
1470dnl Check for DOT if we have doxygen. The caller decides if it is mandatory
1471dnl HAVE_DOT is a variable that can be used in your doxygen.in config file:
1472dnl 	HAVE_DOT = @HAVE_DOT@
1473HAVE_DOT=no
1474if test "x$have_doxygen" = "xyes"; then
1475  AC_PATH_PROG([DOT], [dot])
1476    if test "x$DOT" != "x"; then
1477      HAVE_DOT=yes
1478    fi
1479fi
1480
1481AC_SUBST([HAVE_DOT])
1482AM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"])
1483AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
1484]) # XORG_WITH_DOXYGEN
1485
1486# XORG_WITH_GROFF([DEFAULT])
1487# ----------------
1488# Minimum version: 1.6.0
1489# Minimum version for optional DEFAULT argument: 1.11.0
1490#
1491# Documentation tools are not always available on all platforms and sometimes
1492# not at the appropriate level. This macro enables a module to test for the
1493# presence of the tool and obtain it's path in separate variables. Coupled with
1494# the --with-groff option, it allows maximum flexibilty in making decisions
1495# as whether or not to use the groff package. When DEFAULT is not specified,
1496# --with-groff assumes 'auto'.
1497#
1498# Interface to module:
1499# HAVE_GROFF:	 used in makefiles to conditionally generate documentation
1500# HAVE_GROFF_MM: the memorandum macros (-mm) package
1501# HAVE_GROFF_MS: the -ms macros package
1502# GROFF:	 returns the path of the groff program found
1503#		 returns the path set by the user in the environment
1504# --with-groff:	 'yes' user instructs the module to use groff
1505#		 'no' user instructs the module not to use groff
1506#
1507# Added in version 1.9.0:
1508# HAVE_GROFF_HTML: groff has dependencies to output HTML format:
1509#		   pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
1510#		   psselect from the psutils package.
1511#		   the ghostcript package. Refer to the grohtml man pages
1512#
1513# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
1514#
1515# OS and distros often splits groff in a basic and full package, the former
1516# having the groff program and the later having devices, fonts and macros
1517# Checking for the groff executable is not enough.
1518#
1519# If macros are missing, we cannot assume that groff is useless, so we don't
1520# unset HAVE_GROFF or GROFF env variables.
1521# HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
1522#
1523AC_DEFUN([XORG_WITH_GROFF],[
1524AC_ARG_VAR([GROFF], [Path to groff command])
1525m4_define([_defopt], m4_default([$1], [auto]))
1526AC_ARG_WITH(groff,
1527	AS_HELP_STRING([--with-groff],
1528	   [Use groff to regenerate documentation (default: ]_defopt[)]),
1529	   [use_groff=$withval], [use_groff=]_defopt)
1530m4_undefine([_defopt])
1531
1532if test "x$use_groff" = x"auto"; then
1533   AC_PATH_PROG([GROFF], [groff])
1534   if test "x$GROFF" = "x"; then
1535        AC_MSG_WARN([groff not found - documentation targets will be skipped])
1536	have_groff=no
1537   else
1538        have_groff=yes
1539   fi
1540elif test "x$use_groff" = x"yes" ; then
1541   AC_PATH_PROG([GROFF], [groff])
1542   if test "x$GROFF" = "x"; then
1543        AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
1544   fi
1545   have_groff=yes
1546elif test "x$use_groff" = x"no" ; then
1547   if test "x$GROFF" != "x"; then
1548      AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
1549   fi
1550   have_groff=no
1551else
1552   AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
1553fi
1554
1555# We have groff, test for the presence of the macro packages
1556if test "x$have_groff" = x"yes"; then
1557    AC_MSG_CHECKING([for ${GROFF} -ms macros])
1558    if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
1559        groff_ms_works=yes
1560    else
1561        groff_ms_works=no
1562    fi
1563    AC_MSG_RESULT([$groff_ms_works])
1564    AC_MSG_CHECKING([for ${GROFF} -mm macros])
1565    if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
1566        groff_mm_works=yes
1567    else
1568        groff_mm_works=no
1569    fi
1570    AC_MSG_RESULT([$groff_mm_works])
1571fi
1572
1573# We have groff, test for HTML dependencies, one command per package
1574if test "x$have_groff" = x"yes"; then
1575   AC_PATH_PROGS(GS_PATH, [gs gswin32c])
1576   AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
1577   AC_PATH_PROG(PSSELECT_PATH, [psselect])
1578   if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
1579      have_groff_html=yes
1580   else
1581      have_groff_html=no
1582      AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
1583   fi
1584fi
1585
1586# Set Automake conditionals for Makefiles
1587AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
1588AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
1589AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
1590AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
1591]) # XORG_WITH_GROFF
1592
1593# XORG_WITH_FOP([MIN-VERSION], [DEFAULT])
1594# ---------------------------------------
1595# Minimum version: 1.6.0
1596# Minimum version for optional DEFAULT argument: 1.11.0
1597# Minimum version for optional MIN-VERSION argument: 1.15.0
1598#
1599# Documentation tools are not always available on all platforms and sometimes
1600# not at the appropriate level. This macro enables a module to test for the
1601# presence of the tool and obtain it's path in separate variables. Coupled with
1602# the --with-fop option, it allows maximum flexibilty in making decisions
1603# as whether or not to use the fop package. When DEFAULT is not specified,
1604# --with-fop assumes 'auto'.
1605#
1606# Interface to module:
1607# HAVE_FOP: 	used in makefiles to conditionally generate documentation
1608# FOP:	 	returns the path of the fop program found
1609#		returns the path set by the user in the environment
1610# --with-fop: 	'yes' user instructs the module to use fop
1611#		'no' user instructs the module not to use fop
1612#
1613# If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
1614#
1615AC_DEFUN([XORG_WITH_FOP],[
1616AC_ARG_VAR([FOP], [Path to fop command])
1617m4_define([_defopt], m4_default([$2], [auto]))
1618AC_ARG_WITH(fop,
1619	AS_HELP_STRING([--with-fop],
1620	   [Use fop to regenerate documentation (default: ]_defopt[)]),
1621	   [use_fop=$withval], [use_fop=]_defopt)
1622m4_undefine([_defopt])
1623
1624if test "x$use_fop" = x"auto"; then
1625   AC_PATH_PROG([FOP], [fop])
1626   if test "x$FOP" = "x"; then
1627        AC_MSG_WARN([fop not found - documentation targets will be skipped])
1628	have_fop=no
1629   else
1630        have_fop=yes
1631   fi
1632elif test "x$use_fop" = x"yes" ; then
1633   AC_PATH_PROG([FOP], [fop])
1634   if test "x$FOP" = "x"; then
1635        AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
1636   fi
1637   have_fop=yes
1638elif test "x$use_fop" = x"no" ; then
1639   if test "x$FOP" != "x"; then
1640      AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
1641   fi
1642   have_fop=no
1643else
1644   AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
1645fi
1646
1647# Test for a minimum version of fop, if provided.
1648m4_ifval([$1],
1649[if test "$have_fop" = yes; then
1650    # scrape the fop version
1651    AC_MSG_CHECKING([for fop minimum version])
1652    fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3`
1653    AC_MSG_RESULT([$fop_version])
1654    AS_VERSION_COMPARE([$fop_version], [$1],
1655        [if test "x$use_fop" = xauto; then
1656            AC_MSG_WARN([fop version $fop_version found, but $1 needed])
1657            have_fop=no
1658        else
1659            AC_MSG_ERROR([fop version $fop_version found, but $1 needed])
1660        fi])
1661fi])
1662AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
1663]) # XORG_WITH_FOP
1664
1665# XORG_WITH_M4([MIN-VERSION])
1666# ---------------------------
1667# Minimum version: 1.19.0
1668#
1669# This macro attempts to locate an m4 macro processor which supports
1670# -I option and is only useful for modules relying on M4 in order to
1671# expand macros in source code files.
1672#
1673# Interface to module:
1674# M4:	 	returns the path of the m4 program found
1675#		returns the path set by the user in the environment
1676#
1677AC_DEFUN([XORG_WITH_M4], [
1678AC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4],
1679   [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4],
1680       [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \
1681         ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]],
1682   [AC_MSG_ERROR([could not find m4 that supports -I option])],
1683   [$PATH:/usr/gnu/bin])])
1684
1685AC_SUBST([M4], [$ac_cv_path_M4])
1686]) # XORG_WITH_M4
1687
1688# XORG_WITH_PS2PDF([DEFAULT])
1689# ----------------
1690# Minimum version: 1.6.0
1691# Minimum version for optional DEFAULT argument: 1.11.0
1692#
1693# Documentation tools are not always available on all platforms and sometimes
1694# not at the appropriate level. This macro enables a module to test for the
1695# presence of the tool and obtain it's path in separate variables. Coupled with
1696# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
1697# as whether or not to use the ps2pdf package. When DEFAULT is not specified,
1698# --with-ps2pdf assumes 'auto'.
1699#
1700# Interface to module:
1701# HAVE_PS2PDF: 	used in makefiles to conditionally generate documentation
1702# PS2PDF:	returns the path of the ps2pdf program found
1703#		returns the path set by the user in the environment
1704# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
1705#		 'no' user instructs the module not to use ps2pdf
1706#
1707# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
1708#
1709AC_DEFUN([XORG_WITH_PS2PDF],[
1710AC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
1711m4_define([_defopt], m4_default([$1], [auto]))
1712AC_ARG_WITH(ps2pdf,
1713	AS_HELP_STRING([--with-ps2pdf],
1714	   [Use ps2pdf to regenerate documentation (default: ]_defopt[)]),
1715	   [use_ps2pdf=$withval], [use_ps2pdf=]_defopt)
1716m4_undefine([_defopt])
1717
1718if test "x$use_ps2pdf" = x"auto"; then
1719   AC_PATH_PROG([PS2PDF], [ps2pdf])
1720   if test "x$PS2PDF" = "x"; then
1721        AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
1722	have_ps2pdf=no
1723   else
1724        have_ps2pdf=yes
1725   fi
1726elif test "x$use_ps2pdf" = x"yes" ; then
1727   AC_PATH_PROG([PS2PDF], [ps2pdf])
1728   if test "x$PS2PDF" = "x"; then
1729        AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
1730   fi
1731   have_ps2pdf=yes
1732elif test "x$use_ps2pdf" = x"no" ; then
1733   if test "x$PS2PDF" != "x"; then
1734      AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
1735   fi
1736   have_ps2pdf=no
1737else
1738   AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
1739fi
1740AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
1741]) # XORG_WITH_PS2PDF
1742
1743# XORG_ENABLE_DOCS (enable_docs=yes)
1744# ----------------
1745# Minimum version: 1.6.0
1746#
1747# Documentation tools are not always available on all platforms and sometimes
1748# not at the appropriate level. This macro enables a builder to skip all
1749# documentation targets except traditional man pages.
1750# Combined with the specific tool checking macros XORG_WITH_*, it provides
1751# maximum flexibilty in controlling documentation building.
1752# Refer to:
1753# XORG_WITH_XMLTO         --with-xmlto
1754# XORG_WITH_ASCIIDOC      --with-asciidoc
1755# XORG_WITH_DOXYGEN       --with-doxygen
1756# XORG_WITH_FOP           --with-fop
1757# XORG_WITH_GROFF         --with-groff
1758# XORG_WITH_PS2PDF        --with-ps2pdf
1759#
1760# Interface to module:
1761# ENABLE_DOCS: 	  used in makefiles to conditionally generate documentation
1762# --enable-docs: 'yes' user instructs the module to generate docs
1763#		 'no' user instructs the module not to generate docs
1764# parm1:	specify the default value, yes or no.
1765#
1766AC_DEFUN([XORG_ENABLE_DOCS],[
1767m4_define([docs_default], m4_default([$1], [yes]))
1768AC_ARG_ENABLE(docs,
1769	AS_HELP_STRING([--enable-docs],
1770	   [Enable building the documentation (default: ]docs_default[)]),
1771	   [build_docs=$enableval], [build_docs=]docs_default)
1772m4_undefine([docs_default])
1773AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
1774AC_MSG_CHECKING([whether to build documentation])
1775AC_MSG_RESULT([$build_docs])
1776]) # XORG_ENABLE_DOCS
1777
1778# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
1779# ----------------
1780# Minimum version: 1.6.0
1781#
1782# This macro enables a builder to skip all developer documentation.
1783# Combined with the specific tool checking macros XORG_WITH_*, it provides
1784# maximum flexibilty in controlling documentation building.
1785# Refer to:
1786# XORG_WITH_XMLTO         --with-xmlto
1787# XORG_WITH_ASCIIDOC      --with-asciidoc
1788# XORG_WITH_DOXYGEN       --with-doxygen
1789# XORG_WITH_FOP           --with-fop
1790# XORG_WITH_GROFF         --with-groff
1791# XORG_WITH_PS2PDF        --with-ps2pdf
1792#
1793# Interface to module:
1794# ENABLE_DEVEL_DOCS:	used in makefiles to conditionally generate developer docs
1795# --enable-devel-docs:	'yes' user instructs the module to generate developer docs
1796#			'no' user instructs the module not to generate developer docs
1797# parm1:		specify the default value, yes or no.
1798#
1799AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
1800m4_define([devel_default], m4_default([$1], [yes]))
1801AC_ARG_ENABLE(devel-docs,
1802	AS_HELP_STRING([--enable-devel-docs],
1803	   [Enable building the developer documentation (default: ]devel_default[)]),
1804	   [build_devel_docs=$enableval], [build_devel_docs=]devel_default)
1805m4_undefine([devel_default])
1806AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
1807AC_MSG_CHECKING([whether to build developer documentation])
1808AC_MSG_RESULT([$build_devel_docs])
1809]) # XORG_ENABLE_DEVEL_DOCS
1810
1811# XORG_ENABLE_SPECS (enable_specs=yes)
1812# ----------------
1813# Minimum version: 1.6.0
1814#
1815# This macro enables a builder to skip all functional specification targets.
1816# Combined with the specific tool checking macros XORG_WITH_*, it provides
1817# maximum flexibilty in controlling documentation building.
1818# Refer to:
1819# XORG_WITH_XMLTO         --with-xmlto
1820# XORG_WITH_ASCIIDOC      --with-asciidoc
1821# XORG_WITH_DOXYGEN       --with-doxygen
1822# XORG_WITH_FOP           --with-fop
1823# XORG_WITH_GROFF         --with-groff
1824# XORG_WITH_PS2PDF        --with-ps2pdf
1825#
1826# Interface to module:
1827# ENABLE_SPECS:		used in makefiles to conditionally generate specs
1828# --enable-specs:	'yes' user instructs the module to generate specs
1829#			'no' user instructs the module not to generate specs
1830# parm1:		specify the default value, yes or no.
1831#
1832AC_DEFUN([XORG_ENABLE_SPECS],[
1833m4_define([spec_default], m4_default([$1], [yes]))
1834AC_ARG_ENABLE(specs,
1835	AS_HELP_STRING([--enable-specs],
1836	   [Enable building the specs (default: ]spec_default[)]),
1837	   [build_specs=$enableval], [build_specs=]spec_default)
1838m4_undefine([spec_default])
1839AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
1840AC_MSG_CHECKING([whether to build functional specifications])
1841AC_MSG_RESULT([$build_specs])
1842]) # XORG_ENABLE_SPECS
1843
1844# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto)
1845# ----------------------------------------------
1846# Minimum version: 1.13.0
1847#
1848# This macro enables a builder to enable/disable unit testing
1849# It makes no assumption about the test cases implementation
1850# Test cases may or may not use Automake "Support for test suites"
1851# They may or may not use the software utility library GLib
1852#
1853# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL
1854# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib.
1855# The variable enable_unit_tests is used by other macros in this file.
1856#
1857# Interface to module:
1858# ENABLE_UNIT_TESTS:	used in makefiles to conditionally build tests
1859# enable_unit_tests:    used in configure.ac for additional configuration
1860# --enable-unit-tests:	'yes' user instructs the module to build tests
1861#			'no' user instructs the module not to build tests
1862# parm1:		specify the default value, yes or no.
1863#
1864AC_DEFUN([XORG_ENABLE_UNIT_TESTS],[
1865AC_BEFORE([$0], [XORG_WITH_GLIB])
1866AC_BEFORE([$0], [XORG_LD_WRAP])
1867AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS])
1868m4_define([_defopt], m4_default([$1], [auto]))
1869AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests],
1870	[Enable building unit test cases (default: ]_defopt[)]),
1871	[enable_unit_tests=$enableval], [enable_unit_tests=]_defopt)
1872m4_undefine([_defopt])
1873AM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno])
1874AC_MSG_CHECKING([whether to build unit test cases])
1875AC_MSG_RESULT([$enable_unit_tests])
1876]) # XORG_ENABLE_UNIT_TESTS
1877
1878# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto)
1879# ------------------------------------------------------
1880# Minimum version: 1.17.0
1881#
1882# This macro enables a builder to enable/disable integration testing
1883# It makes no assumption about the test cases' implementation
1884# Test cases may or may not use Automake "Support for test suites"
1885#
1886# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support
1887# usually requires less dependencies and may be built and run under less
1888# stringent environments than integration tests.
1889#
1890# Interface to module:
1891# ENABLE_INTEGRATION_TESTS:   used in makefiles to conditionally build tests
1892# enable_integration_tests:   used in configure.ac for additional configuration
1893# --enable-integration-tests: 'yes' user instructs the module to build tests
1894#                             'no' user instructs the module not to build tests
1895# parm1:                      specify the default value, yes or no.
1896#
1897AC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[
1898AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS])
1899m4_define([_defopt], m4_default([$1], [auto]))
1900AC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests],
1901	[Enable building integration test cases (default: ]_defopt[)]),
1902	[enable_integration_tests=$enableval],
1903	[enable_integration_tests=]_defopt)
1904m4_undefine([_defopt])
1905AM_CONDITIONAL([ENABLE_INTEGRATION_TESTS],
1906	[test "x$enable_integration_tests" != xno])
1907AC_MSG_CHECKING([whether to build unit test cases])
1908AC_MSG_RESULT([$enable_integration_tests])
1909]) # XORG_ENABLE_INTEGRATION_TESTS
1910
1911# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT])
1912# ----------------------------------------
1913# Minimum version: 1.13.0
1914#
1915# GLib is a library which provides advanced data structures and functions.
1916# This macro enables a module to test for the presence of Glib.
1917#
1918# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing.
1919# Otherwise the value of $enable_unit_tests is blank.
1920#
1921# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit
1922# test support usually requires less dependencies and may be built and run under
1923# less stringent environments than integration tests.
1924#
1925# Interface to module:
1926# HAVE_GLIB: used in makefiles to conditionally build targets
1927# with_glib: used in configure.ac to know if GLib has been found
1928# --with-glib:	'yes' user instructs the module to use glib
1929#		'no' user instructs the module not to use glib
1930#
1931AC_DEFUN([XORG_WITH_GLIB],[
1932AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1933m4_define([_defopt], m4_default([$2], [auto]))
1934AC_ARG_WITH(glib, AS_HELP_STRING([--with-glib],
1935	[Use GLib library for unit testing (default: ]_defopt[)]),
1936	[with_glib=$withval], [with_glib=]_defopt)
1937m4_undefine([_defopt])
1938
1939have_glib=no
1940# Do not probe GLib if user explicitly disabled unit testing
1941if test "x$enable_unit_tests" != x"no"; then
1942  # Do not probe GLib if user explicitly disabled it
1943  if test "x$with_glib" != x"no"; then
1944    m4_ifval(
1945      [$1],
1946      [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])],
1947      [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])]
1948    )
1949  fi
1950fi
1951
1952# Not having GLib when unit testing has been explicitly requested is an error
1953if test "x$enable_unit_tests" = x"yes"; then
1954  if test "x$have_glib" = x"no"; then
1955    AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
1956  fi
1957fi
1958
1959# Having unit testing disabled when GLib has been explicitly requested is an error
1960if test "x$enable_unit_tests" = x"no"; then
1961  if test "x$with_glib" = x"yes"; then
1962    AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
1963  fi
1964fi
1965
1966# Not having GLib when it has been explicitly requested is an error
1967if test "x$with_glib" = x"yes"; then
1968  if test "x$have_glib" = x"no"; then
1969    AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found])
1970  fi
1971fi
1972
1973AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes])
1974]) # XORG_WITH_GLIB
1975
1976# XORG_LD_WRAP([required|optional])
1977# ---------------------------------
1978# Minimum version: 1.13.0
1979#
1980# Check if linker supports -wrap, passed via compiler flags
1981#
1982# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing.
1983# Otherwise the value of $enable_unit_tests is blank.
1984#
1985# Argument added in 1.16.0 - default is "required", to match existing behavior
1986# of returning an error if enable_unit_tests is yes, and ld -wrap is not
1987# available, an argument of "optional" allows use when some unit tests require
1988# ld -wrap and others do not.
1989#
1990AC_DEFUN([XORG_LD_WRAP],[
1991XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no],
1992    [AC_LANG_PROGRAM([#include <stdlib.h>
1993                      void __wrap_exit(int status) { return; }],
1994                     [exit(0);])])
1995# Not having ld wrap when unit testing has been explicitly requested is an error
1996if test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then
1997  if test "x$have_ld_wrap" = x"no"; then
1998    AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available])
1999  fi
2000fi
2001AM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes])
2002#
2003]) # XORG_LD_WRAP
2004
2005# XORG_CHECK_LINKER_FLAGS
2006# -----------------------
2007# SYNOPSIS
2008#
2009#   XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE])
2010#
2011# DESCRIPTION
2012#
2013#   Check whether the given linker FLAGS work with the current language's
2014#   linker, or whether they give an error.
2015#
2016#   ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
2017#   success/failure.
2018#
2019#   PROGRAM-SOURCE is the program source to link with, if needed
2020#
2021#   NOTE: Based on AX_CHECK_COMPILER_FLAGS.
2022#
2023# LICENSE
2024#
2025#   Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org>
2026#   Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu>
2027#   Copyright (c) 2009 Matteo Frigo
2028#
2029#   This program is free software: you can redistribute it and/or modify it
2030#   under the terms of the GNU General Public License as published by the
2031#   Free Software Foundation, either version 3 of the License, or (at your
2032#   option) any later version.
2033#
2034#   This program is distributed in the hope that it will be useful, but
2035#   WITHOUT ANY WARRANTY; without even the implied warranty of
2036#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
2037#   Public License for more details.
2038#
2039#   You should have received a copy of the GNU General Public License along
2040#   with this program. If not, see <http://www.gnu.org/licenses/>.
2041#
2042#   As a special exception, the respective Autoconf Macro's copyright owner
2043#   gives unlimited permission to copy, distribute and modify the configure
2044#   scripts that are the output of Autoconf when processing the Macro. You
2045#   need not follow the terms of the GNU General Public License when using
2046#   or distributing such scripts, even though portions of the text of the
2047#   Macro appear in them. The GNU General Public License (GPL) does govern
2048#   all other use of the material that constitutes the Autoconf Macro.
2049#
2050#   This special exception to the GPL applies to versions of the Autoconf
2051#   Macro released by the Autoconf Archive. When you make and distribute a
2052#   modified version of the Autoconf Macro, you may extend this special
2053#   exception to the GPL to apply to your modified version as well.#
2054AC_DEFUN([XORG_CHECK_LINKER_FLAGS],
2055[AC_MSG_CHECKING([whether the linker accepts $1])
2056dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname:
2057AS_LITERAL_IF([$1],
2058  [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [
2059      ax_save_FLAGS=$LDFLAGS
2060      LDFLAGS="$1"
2061      AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])],
2062        AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
2063        AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
2064      LDFLAGS=$ax_save_FLAGS])],
2065  [ax_save_FLAGS=$LDFLAGS
2066   LDFLAGS="$1"
2067   AC_LINK_IFELSE([AC_LANG_PROGRAM()],
2068     eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
2069     eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
2070   LDFLAGS=$ax_save_FLAGS])
2071eval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1])
2072AC_MSG_RESULT($xorg_check_linker_flags)
2073if test "x$xorg_check_linker_flags" = xyes; then
2074	m4_default([$2], :)
2075else
2076	m4_default([$3], :)
2077fi
2078]) # XORG_CHECK_LINKER_FLAGS
2079
2080# XORG_MEMORY_CHECK_FLAGS
2081# -----------------------
2082# Minimum version: 1.16.0
2083#
2084# This macro attempts to find appropriate memory checking functionality
2085# for various platforms which unit testing code may use to catch various
2086# forms of memory allocation and access errors in testing.
2087#
2088# Interface to module:
2089# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging
2090#                         Usually added to TESTS_ENVIRONMENT in Makefile.am
2091#
2092# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim.
2093#
2094AC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[
2095
2096AC_REQUIRE([AC_CANONICAL_HOST])
2097AC_ARG_VAR([XORG_MALLOC_DEBUG_ENV],
2098           [Environment variables to enable memory checking in tests])
2099
2100# Check for different types of support on different platforms
2101case $host_os in
2102    solaris*)
2103        AC_CHECK_LIB([umem], [umem_alloc],
2104            [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default'])
2105        ;;
2106    *-gnu*) # GNU libc - Value is used as a single byte bit pattern,
2107        # both directly and inverted, so should not be 0 or 255.
2108        malloc_debug_env='MALLOC_PERTURB_=15'
2109        ;;
2110    darwin*)
2111        malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib'
2112        ;;
2113    *bsd*)
2114        malloc_debug_env='MallocPreScribble=1 MallocScribble=1'
2115        ;;
2116esac
2117
2118# User supplied flags override default flags
2119if test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then
2120    malloc_debug_env="$XORG_MALLOC_DEBUG_ENV"
2121fi
2122
2123AC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env])
2124]) # XORG_WITH_LINT
2125
2126# XORG_CHECK_MALLOC_ZERO
2127# ----------------------
2128# Minimum version: 1.0.0
2129#
2130# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
2131# malloc(0) returns NULL.  Packages should add one of these cflags to
2132# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
2133AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
2134AC_ARG_ENABLE(malloc0returnsnull,
2135	AS_HELP_STRING([--enable-malloc0returnsnull],
2136		       [malloc(0) returns NULL (default: auto)]),
2137	[MALLOC_ZERO_RETURNS_NULL=$enableval],
2138	[MALLOC_ZERO_RETURNS_NULL=auto])
2139
2140AC_MSG_CHECKING([whether malloc(0) returns NULL])
2141if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
2142AC_CACHE_VAL([xorg_cv_malloc0_returns_null],
2143	[AC_RUN_IFELSE([AC_LANG_PROGRAM([
2144#include <stdlib.h>
2145],[
2146    char *m0, *r0, *c0, *p;
2147    m0 = malloc(0);
2148    p = malloc(10);
2149    r0 = realloc(p,0);
2150    c0 = calloc(0,10);
2151    exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1);
2152])],
2153		[xorg_cv_malloc0_returns_null=yes],
2154		[xorg_cv_malloc0_returns_null=no])])
2155MALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null
2156fi
2157AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
2158
2159if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
2160	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
2161	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
2162	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
2163else
2164	MALLOC_ZERO_CFLAGS=""
2165	XMALLOC_ZERO_CFLAGS=""
2166	XTMALLOC_ZERO_CFLAGS=""
2167fi
2168
2169AC_SUBST([MALLOC_ZERO_CFLAGS])
2170AC_SUBST([XMALLOC_ZERO_CFLAGS])
2171AC_SUBST([XTMALLOC_ZERO_CFLAGS])
2172]) # XORG_CHECK_MALLOC_ZERO
2173
2174# XORG_WITH_LINT()
2175# ----------------
2176# Minimum version: 1.1.0
2177#
2178# This macro enables the use of a tool that flags some suspicious and
2179# non-portable constructs (likely to be bugs) in C language source code.
2180# It will attempt to locate the tool and use appropriate options.
2181# There are various lint type tools on different platforms.
2182#
2183# Interface to module:
2184# LINT:		returns the path to the tool found on the platform
2185#		or the value set to LINT on the configure cmd line
2186#		also an Automake conditional
2187# LINT_FLAGS:	an Automake variable with appropriate flags
2188#
2189# --with-lint:	'yes' user instructs the module to use lint
2190#		'no' user instructs the module not to use lint (default)
2191#
2192# If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
2193# If the user sets the value of LINT_FLAGS, they are used verbatim.
2194#
2195AC_DEFUN([XORG_WITH_LINT],[
2196
2197AC_ARG_VAR([LINT], [Path to a lint-style command])
2198AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
2199AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
2200		[Use a lint-style source code checker (default: disabled)])],
2201		[use_lint=$withval], [use_lint=no])
2202
2203# Obtain platform specific info like program name and options
2204# The lint program on FreeBSD and NetBSD is different from the one on Solaris
2205case $host_os in
2206  *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
2207	lint_name=splint
2208	lint_options="-badflag"
2209	;;
2210  *freebsd* | *netbsd*)
2211	lint_name=lint
2212	lint_options="-u -b"
2213	;;
2214  *solaris*)
2215	lint_name=lint
2216	lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
2217	;;
2218esac
2219
2220# Test for the presence of the program (either guessed by the code or spelled out by the user)
2221if test "x$use_lint" = x"yes" ; then
2222   AC_PATH_PROG([LINT], [$lint_name])
2223   if test "x$LINT" = "x"; then
2224        AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
2225   fi
2226elif test "x$use_lint" = x"no" ; then
2227   if test "x$LINT" != "x"; then
2228      AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
2229   fi
2230else
2231   AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
2232fi
2233
2234# User supplied flags override default flags
2235if test "x$LINT_FLAGS" != "x"; then
2236   lint_options=$LINT_FLAGS
2237fi
2238
2239AC_SUBST([LINT_FLAGS],[$lint_options])
2240AM_CONDITIONAL(LINT, [test "x$LINT" != x])
2241
2242]) # XORG_WITH_LINT
2243
2244# XORG_LINT_LIBRARY(LIBNAME)
2245# --------------------------
2246# Minimum version: 1.1.0
2247#
2248# Sets up flags for building lint libraries for checking programs that call
2249# functions in the library.
2250#
2251# Interface to module:
2252# LINTLIB		- Automake variable with the name of lint library file to make
2253# MAKE_LINT_LIB		- Automake conditional
2254#
2255# --enable-lint-library:  - 'yes' user instructs the module to created a lint library
2256#			  - 'no' user instructs the module not to create a lint library (default)
2257
2258AC_DEFUN([XORG_LINT_LIBRARY],[
2259AC_REQUIRE([XORG_WITH_LINT])
2260AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
2261	[Create lint library (default: disabled)])],
2262	[make_lint_lib=$enableval], [make_lint_lib=no])
2263
2264if test "x$make_lint_lib" = x"yes" ; then
2265   LINTLIB=llib-l$1.ln
2266   if test "x$LINT" = "x"; then
2267        AC_MSG_ERROR([Cannot make lint library without --with-lint])
2268   fi
2269elif test "x$make_lint_lib" != x"no" ; then
2270   AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
2271fi
2272
2273AC_SUBST(LINTLIB)
2274AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
2275
2276]) # XORG_LINT_LIBRARY
2277
2278# XORG_COMPILER_BRAND
2279# -------------------
2280# Minimum version: 1.14.0
2281#
2282# Checks for various brands of compilers and sets flags as appropriate:
2283#   GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes"
2284#   GNU g++ - relies on AC_PROG_CXX to set GXX to "yes"
2285#   clang compiler - sets CLANGCC to "yes"
2286#   Intel compiler - sets INTELCC to "yes"
2287#   Sun/Oracle Solaris Studio cc - sets SUNCC to "yes"
2288#
2289AC_DEFUN([XORG_COMPILER_BRAND], [
2290AC_LANG_CASE(
2291	[C], [
2292		AC_REQUIRE([AC_PROG_CC_C99])
2293	],
2294	[C++], [
2295		AC_REQUIRE([AC_PROG_CXX])
2296	]
2297)
2298AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"])
2299AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
2300AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
2301]) # XORG_COMPILER_BRAND
2302
2303# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...])
2304# ---------------
2305# Minimum version: 1.16.0
2306#
2307# Test if the compiler works when passed the given flag as a command line argument.
2308# If it succeeds, the flag is appeneded to the given variable.  If not, it tries the
2309# next flag in the list until there are no more options.
2310#
2311# Note that this does not guarantee that the compiler supports the flag as some
2312# compilers will simply ignore arguments that they do not understand, but we do
2313# attempt to weed out false positives by using -Werror=unknown-warning-option and
2314# -Werror=unused-command-line-argument
2315#
2316AC_DEFUN([XORG_TESTSET_CFLAG], [
2317m4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
2318m4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
2319
2320AC_LANG_COMPILER_REQUIRE
2321
2322AC_LANG_CASE(
2323	[C], [
2324		AC_REQUIRE([AC_PROG_CC_C99])
2325		define([PREFIX], [C])
2326		define([CACHE_PREFIX], [cc])
2327		define([COMPILER], [$CC])
2328	],
2329	[C++], [
2330		define([PREFIX], [CXX])
2331		define([CACHE_PREFIX], [cxx])
2332		define([COMPILER], [$CXX])
2333	]
2334)
2335
2336[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]"
2337
2338if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then
2339	PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
2340	AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option],
2341			[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option],
2342			AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
2343					  [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes],
2344					  [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no]))
2345	[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option]
2346	PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
2347fi
2348
2349if test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then
2350	if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then
2351		PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
2352	fi
2353	PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
2354	AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument],
2355			[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument],
2356			AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
2357					  [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes],
2358					  [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no]))
2359	[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument]
2360	PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
2361fi
2362
2363found="no"
2364m4_foreach([flag], m4_cdr($@), [
2365	if test $found = "no" ; then
2366		if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then
2367			PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
2368		fi
2369
2370		if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then
2371			PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
2372		fi
2373
2374		PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag["
2375
2376dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname
2377		AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[])
2378		cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[])
2379		AC_CACHE_VAL($cacheid,
2380			     [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])],
2381					     [eval $cacheid=yes],
2382					     [eval $cacheid=no])])
2383
2384		PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
2385
2386		eval supported=\$$cacheid
2387		AC_MSG_RESULT([$supported])
2388		if test "$supported" = "yes" ; then
2389			$1="$$1 ]flag["
2390			found="yes"
2391		fi
2392	fi
2393])
2394]) # XORG_TESTSET_CFLAG
2395
2396# XORG_COMPILER_FLAGS
2397# ---------------
2398# Minimum version: 1.16.0
2399#
2400# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line
2401# arguments supported by the selected compiler which do NOT alter the generated
2402# code.  These arguments will cause the compiler to print various warnings
2403# during compilation AND turn a conservative set of warnings into errors.
2404#
2405# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in
2406# future versions of util-macros as options are added to new compilers.
2407#
2408AC_DEFUN([XORG_COMPILER_FLAGS], [
2409AC_REQUIRE([XORG_COMPILER_BRAND])
2410
2411AC_ARG_ENABLE(selective-werror,
2412              AS_HELP_STRING([--disable-selective-werror],
2413                             [Turn off selective compiler errors. (default: enabled)]),
2414              [SELECTIVE_WERROR=$enableval],
2415              [SELECTIVE_WERROR=yes])
2416
2417AC_LANG_CASE(
2418        [C], [
2419                define([PREFIX], [C])
2420        ],
2421        [C++], [
2422                define([PREFIX], [CXX])
2423        ]
2424)
2425# -v is too short to test reliably with XORG_TESTSET_CFLAG
2426if test "x$SUNCC" = "xyes"; then
2427    [BASE_]PREFIX[FLAGS]="-v"
2428else
2429    [BASE_]PREFIX[FLAGS]=""
2430fi
2431
2432# This chunk of warnings were those that existed in the legacy CWARNFLAGS
2433XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall])
2434XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith])
2435XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations])
2436XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat])
2437
2438AC_LANG_CASE(
2439	[C], [
2440		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes])
2441		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes])
2442		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs])
2443		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast])
2444		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd])
2445		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement])
2446	]
2447)
2448
2449# This chunk adds additional warnings that could catch undesired effects.
2450XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused])
2451XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized])
2452XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow])
2453XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn])
2454XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute])
2455XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls])
2456XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
2457
2458# These are currently disabled because they are noisy.  They will be enabled
2459# in the future once the codebase is sufficiently modernized to silence
2460# them.  For now, I don't want them to drown out the other warnings.
2461# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses])
2462# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
2463# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
2464
2465# Turn some warnings into errors, so we don't accidently get successful builds
2466# when there are problems that should be fixed.
2467
2468if test "x$SELECTIVE_WERROR" = "xyes" ; then
2469XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED])
2470XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull])
2471XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self])
2472XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main])
2473XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces])
2474XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point])
2475XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT])
2476XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs])
2477XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds])
2478XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings])
2479XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address])
2480XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION])
2481XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION
2482else
2483AC_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])
2484XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit])
2485XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull])
2486XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self])
2487XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain])
2488XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces])
2489XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point])
2490XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type])
2491XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs])
2492XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds])
2493XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings])
2494XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress])
2495XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast])
2496XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast])
2497fi
2498
2499AC_SUBST([BASE_]PREFIX[FLAGS])
2500]) # XORG_COMPILER_FLAGS
2501
2502# XORG_CWARNFLAGS
2503# ---------------
2504# Minimum version: 1.2.0
2505# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead)
2506#
2507# Defines CWARNFLAGS to enable C compiler warnings.
2508#
2509# This function is deprecated because it defines -fno-strict-aliasing
2510# which alters the code generated by the compiler.  If -fno-strict-aliasing
2511# is needed, then it should be added explicitly in the module when
2512# it is updated to use BASE_CFLAGS.
2513#
2514AC_DEFUN([XORG_CWARNFLAGS], [
2515AC_REQUIRE([XORG_COMPILER_FLAGS])
2516AC_REQUIRE([XORG_COMPILER_BRAND])
2517AC_LANG_CASE(
2518	[C], [
2519		CWARNFLAGS="$BASE_CFLAGS"
2520		if  test "x$GCC" = xyes ; then
2521		    CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing"
2522		fi
2523		AC_SUBST(CWARNFLAGS)
2524	]
2525)
2526]) # XORG_CWARNFLAGS
2527
2528# XORG_STRICT_OPTION
2529# -----------------------
2530# Minimum version: 1.3.0
2531#
2532# Add configure option to enable strict compilation flags, such as treating
2533# warnings as fatal errors.
2534# If --enable-strict-compilation is passed to configure, adds strict flags to
2535# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS.
2536#
2537# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or
2538# when strict compilation is unconditionally desired.
2539AC_DEFUN([XORG_STRICT_OPTION], [
2540AC_REQUIRE([XORG_CWARNFLAGS])
2541AC_REQUIRE([XORG_COMPILER_FLAGS])
2542
2543AC_ARG_ENABLE(strict-compilation,
2544			  AS_HELP_STRING([--enable-strict-compilation],
2545			  [Enable all warnings from compiler and make them errors (default: disabled)]),
2546			  [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
2547
2548AC_LANG_CASE(
2549        [C], [
2550                define([PREFIX], [C])
2551        ],
2552        [C++], [
2553                define([PREFIX], [CXX])
2554        ]
2555)
2556
2557[STRICT_]PREFIX[FLAGS]=""
2558XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic])
2559XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn])
2560
2561# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not
2562# activate it with -Werror, so we add it here explicitly.
2563XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes])
2564
2565if test "x$STRICT_COMPILE" = "xyes"; then
2566    [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]"
2567    AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"])
2568fi
2569AC_SUBST([STRICT_]PREFIX[FLAGS])
2570AC_SUBST([BASE_]PREFIX[FLAGS])
2571AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS]))
2572]) # XORG_STRICT_OPTION
2573
2574# XORG_DEFAULT_OPTIONS
2575# --------------------
2576# Minimum version: 1.3.0
2577#
2578# Defines default options for X.Org modules.
2579#
2580AC_DEFUN([XORG_DEFAULT_OPTIONS], [
2581AC_REQUIRE([AC_PROG_INSTALL])
2582XORG_COMPILER_FLAGS
2583XORG_CWARNFLAGS
2584XORG_STRICT_OPTION
2585XORG_RELEASE_VERSION
2586XORG_CHANGELOG
2587XORG_INSTALL
2588XORG_MANPAGE_SECTIONS
2589m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
2590    [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
2591]) # XORG_DEFAULT_OPTIONS
2592
2593# XORG_INSTALL()
2594# ----------------
2595# Minimum version: 1.4.0
2596#
2597# Defines the variable INSTALL_CMD as the command to copy
2598# INSTALL from $prefix/share/util-macros.
2599#
2600AC_DEFUN([XORG_INSTALL], [
2601AC_REQUIRE([PKG_PROG_PKG_CONFIG])
2602macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
2603INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
2604mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
2605|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \
2606touch \$(top_srcdir)/INSTALL; \
2607echo 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))"
2608AC_SUBST([INSTALL_CMD])
2609]) # XORG_INSTALL
2610dnl Copyright 2005 Red Hat, Inc
2611dnl
2612dnl Permission to use, copy, modify, distribute, and sell this software and its
2613dnl documentation for any purpose is hereby granted without fee, provided that
2614dnl the above copyright notice appear in all copies and that both that
2615dnl copyright notice and this permission notice appear in supporting
2616dnl documentation.
2617dnl
2618dnl The above copyright notice and this permission notice shall be included
2619dnl in all copies or substantial portions of the Software.
2620dnl
2621dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
2622dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
2623dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
2624dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
2625dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
2626dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
2627dnl OTHER DEALINGS IN THE SOFTWARE.
2628dnl
2629dnl Except as contained in this notice, the name of the copyright holders shall
2630dnl not be used in advertising or otherwise to promote the sale, use or
2631dnl other dealings in this Software without prior written authorization
2632dnl from the copyright holders.
2633dnl
2634
2635# XORG_RELEASE_VERSION
2636# --------------------
2637# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
2638
2639AC_DEFUN([XORG_RELEASE_VERSION],[
2640	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
2641		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
2642		[Major version of this package])
2643	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
2644	if test "x$PVM" = "x"; then
2645		PVM="0"
2646	fi
2647	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
2648		[$PVM],
2649		[Minor version of this package])
2650	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
2651	if test "x$PVP" = "x"; then
2652		PVP="0"
2653	fi
2654	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
2655		[$PVP],
2656		[Patch version of this package])
2657])
2658
2659# XORG_CHANGELOG()
2660# ----------------
2661# Minimum version: 1.2.0
2662#
2663# Defines the variable CHANGELOG_CMD as the command to generate
2664# ChangeLog from git.
2665#
2666#
2667AC_DEFUN([XORG_CHANGELOG], [
2668CHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \
2669mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
2670|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \
2671touch \$(top_srcdir)/ChangeLog; \
2672echo 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))"
2673AC_SUBST([CHANGELOG_CMD])
2674]) # XORG_CHANGELOG
2675
2676dnl
2677dnl Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
2678dnl
2679dnl Permission is hereby granted, free of charge, to any person obtaining a
2680dnl copy of this software and associated documentation files (the "Software"),
2681dnl to deal in the Software without restriction, including without limitation
2682dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
2683dnl and/or sell copies of the Software, and to permit persons to whom the
2684dnl Software is furnished to do so, subject to the following conditions:
2685dnl
2686dnl The above copyright notice and this permission notice (including the next
2687dnl paragraph) shall be included in all copies or substantial portions of the
2688dnl Software.
2689dnl
2690dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2691dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2692dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
2693dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2694dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
2695dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
2696dnl DEALINGS IN THE SOFTWARE.
2697dnl
2698
2699# XTRANS_TCP_FLAGS()
2700# ------------------
2701# Find needed libraries for TCP sockets, and check for IPv6 support
2702AC_DEFUN([XTRANS_TCP_FLAGS],[
2703 # SVR4 hides these in libraries other than libc
2704 AC_SEARCH_LIBS(socket, [socket])
2705 AC_SEARCH_LIBS(gethostbyname, [nsl])
2706 if test "$ac_cv_search_socket$ac_cv_search_gethostbyname" = "nono"; then
2707   AC_CHECK_LIB([ws2_32],[main])
2708 fi
2709
2710 # Needs to come after above checks for libsocket & libnsl for SVR4 systems
2711 AC_ARG_ENABLE(ipv6,
2712	AS_HELP_STRING([--enable-ipv6],[Enable IPv6 support]),
2713	[IPV6CONN=$enableval],
2714	[AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])])
2715 AC_MSG_CHECKING([if IPv6 support should be built])
2716 if test "$IPV6CONN" = "yes"; then
2717	AC_DEFINE(IPv6,1,[Support IPv6 for TCP connections])
2718 fi
2719 AC_MSG_RESULT($IPV6CONN)
2720
2721 # 4.3BSD-Reno added a new member to struct sockaddr_in
2722 AC_CHECK_MEMBER([struct sockaddr_in.sin_len],
2723	AC_DEFINE([BSD44SOCKETS],1,
2724 	    [Define to 1 if `struct sockaddr_in' has a `sin_len' member]), [], [
2725#include <sys/types.h>
2726#include <sys/socket.h>
2727#include <netinet/in.h>
2728 ])
2729
2730 # POSIX.1g changed the type of pointer passed to getsockname/getpeername/etc.
2731 AC_CHECK_TYPES([socklen_t], [], [], [
2732AC_INCLUDES_DEFAULT
2733#include <sys/socket.h>])
2734
2735 # XPG4v2/UNIX95 added msg_control - check to see if we need to define
2736 # _XOPEN_SOURCE to get it (such as on Solaris)
2737 AC_CHECK_MEMBER([struct msghdr.msg_control], [], [],
2738                 [
2739AC_INCLUDES_DEFAULT
2740#include <sys/socket.h>
2741                 ])
2742 # First try for Solaris in C99 compliant mode, which requires XPG6/UNIX03
2743 if test "x$ac_cv_member_struct_msghdr_msg_control" = xno; then
2744     unset ac_cv_member_struct_msghdr_msg_control
2745     AC_MSG_NOTICE([trying again with _XOPEN_SOURCE=600])
2746     AC_CHECK_MEMBER([struct msghdr.msg_control],
2747                     [AC_DEFINE([_XOPEN_SOURCE], [600],
2748                       [Defined if needed to expose struct msghdr.msg_control])
2749                     ], [], [
2750#define _XOPEN_SOURCE 600
2751AC_INCLUDES_DEFAULT
2752#include <sys/socket.h>
2753                     ])
2754 fi
2755 # If that didn't work, fall back to XPG5/UNIX98 with C89
2756 if test "x$ac_cv_member_struct_msghdr_msg_control" = xno; then
2757     unset ac_cv_member_struct_msghdr_msg_control
2758     AC_MSG_NOTICE([trying again with _XOPEN_SOURCE=500])
2759     AC_CHECK_MEMBER([struct msghdr.msg_control],
2760                     [AC_DEFINE([_XOPEN_SOURCE], [500],
2761                       [Defined if needed to expose struct msghdr.msg_control])
2762                     ], [], [
2763#define _XOPEN_SOURCE 500
2764AC_INCLUDES_DEFAULT
2765#include <sys/socket.h>
2766                     ])
2767 fi
2768
2769
2770]) # XTRANS_TCP_FLAGS
2771
2772# XTRANS_CONNECTION_FLAGS()
2773# -------------------------
2774# Standard checks for which Xtrans transports to use by the Xorg packages
2775# that use Xtrans functions
2776AC_DEFUN([XTRANS_CONNECTION_FLAGS],[
2777 AC_REQUIRE([AC_CANONICAL_HOST])
2778 [case $host_os in
2779	mingw*)	unixdef="no"   ;;
2780	*)	unixdef="yes"  ;;
2781 esac]
2782 AC_ARG_ENABLE(unix-transport,
2783	AS_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]),
2784	[UNIXCONN=$enableval], [UNIXCONN=$unixdef])
2785 AC_MSG_CHECKING([if Xtrans should support UNIX socket connections])
2786 if test "$UNIXCONN" = "yes"; then
2787	AC_DEFINE(UNIXCONN,1,[Support UNIX socket connections])
2788 fi
2789 AC_MSG_RESULT($UNIXCONN)
2790 AC_ARG_ENABLE(tcp-transport,
2791	AS_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]),
2792	[TCPCONN=$enableval], [TCPCONN=yes])
2793 AC_MSG_CHECKING([if Xtrans should support TCP socket connections])
2794 AC_MSG_RESULT($TCPCONN)
2795 if test "$TCPCONN" = "yes"; then
2796	AC_DEFINE(TCPCONN,1,[Support TCP socket connections])
2797	XTRANS_TCP_FLAGS
2798 fi
2799 [case $host_os in
2800	solaris*|sco*|sysv4*)	localdef="yes" ;;
2801	*)			localdef="no"  ;;
2802 esac]
2803 AC_ARG_ENABLE(local-transport,
2804	AS_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]),
2805	[LOCALCONN=$enableval], [LOCALCONN=$localdef])
2806 AC_MSG_CHECKING([if Xtrans should support os-specific local connections])
2807 AC_MSG_RESULT($LOCALCONN)
2808 if test "$LOCALCONN" = "yes"; then
2809	AC_DEFINE(LOCALCONN,1,[Support os-specific local connections])
2810 fi
2811
2812 # Other functions Xtrans may need
2813 AC_CHECK_FUNCS([strcasecmp strlcpy])
2814
2815]) # XTRANS_CONNECTION_FLAGS
2816
2817
2818# XTRANS_SECURE_RPC_FLAGS()
2819# -------------------------
2820# Check for Secure RPC functions - must come after XTRANS_TCP_FLAGS
2821# so that any necessary networking libraries are already found
2822AC_DEFUN([XTRANS_SECURE_RPC_FLAGS],
2823[AC_REQUIRE([XTRANS_TCP_FLAGS])
2824 AC_ARG_ENABLE(secure-rpc,
2825	AS_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]),
2826        [SECURE_RPC=$enableval], [SECURE_RPC="try"])
2827
2828 if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then
2829	FOUND_SECURE_RPC="no"
2830	AC_CHECK_FUNCS([authdes_seccreate authdes_create],
2831			[FOUND_SECURE_RPC="yes"])
2832	if test "x$FOUND_SECURE_RPC" = "xno" ; then
2833		if test "x$SECURE_RPC" = "xyes" ; then
2834	AC_MSG_ERROR([Secure RPC requested, but required functions not found])
2835		fi
2836		SECURE_RPC="no"
2837	else
2838		dnl FreeBSD keeps getsecretkey in librpcsvc
2839		AC_SEARCH_LIBS(getsecretkey, [rpcsvc])
2840		SECURE_RPC="yes"
2841	fi
2842 fi
2843 AC_MSG_CHECKING([if Secure RPC authentication ("SUN-DES-1") should be supported])
2844 if test "x$SECURE_RPC" = "xyes" ; then
2845	AC_DEFINE(SECURE_RPC, 1, [Support Secure RPC ("SUN-DES-1") authentication for X11 clients])
2846 fi
2847 AC_MSG_RESULT($SECURE_RPC)
2848]) # XTRANS_SECURE_RPC_FLAGS
2849
2850
2851# Copyright (C) 2002-2021 Free Software Foundation, Inc.
2852#
2853# This file is free software; the Free Software Foundation
2854# gives unlimited permission to copy and/or distribute it,
2855# with or without modifications, as long as this notice is preserved.
2856
2857# AM_AUTOMAKE_VERSION(VERSION)
2858# ----------------------------
2859# Automake X.Y traces this macro to ensure aclocal.m4 has been
2860# generated from the m4 files accompanying Automake X.Y.
2861# (This private macro should not be called outside this file.)
2862AC_DEFUN([AM_AUTOMAKE_VERSION],
2863[am__api_version='1.16'
2864dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
2865dnl require some minimum version.  Point them to the right macro.
2866m4_if([$1], [1.16.5], [],
2867      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
2868])
2869
2870# _AM_AUTOCONF_VERSION(VERSION)
2871# -----------------------------
2872# aclocal traces this macro to find the Autoconf version.
2873# This is a private macro too.  Using m4_define simplifies
2874# the logic in aclocal, which can simply ignore this definition.
2875m4_define([_AM_AUTOCONF_VERSION], [])
2876
2877# AM_SET_CURRENT_AUTOMAKE_VERSION
2878# -------------------------------
2879# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
2880# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
2881AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
2882[AM_AUTOMAKE_VERSION([1.16.5])dnl
2883m4_ifndef([AC_AUTOCONF_VERSION],
2884  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
2885_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
2886
2887# Figure out how to run the assembler.                      -*- Autoconf -*-
2888
2889# Copyright (C) 2001-2021 Free Software Foundation, Inc.
2890#
2891# This file is free software; the Free Software Foundation
2892# gives unlimited permission to copy and/or distribute it,
2893# with or without modifications, as long as this notice is preserved.
2894
2895# AM_PROG_AS
2896# ----------
2897AC_DEFUN([AM_PROG_AS],
2898[# By default we simply use the C compiler to build assembly code.
2899AC_REQUIRE([AC_PROG_CC])
2900test "${CCAS+set}" = set || CCAS=$CC
2901test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
2902AC_ARG_VAR([CCAS],      [assembler compiler command (defaults to CC)])
2903AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)])
2904_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl
2905])
2906
2907# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
2908
2909# Copyright (C) 2001-2021 Free Software Foundation, Inc.
2910#
2911# This file is free software; the Free Software Foundation
2912# gives unlimited permission to copy and/or distribute it,
2913# with or without modifications, as long as this notice is preserved.
2914
2915# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
2916# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
2917# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
2918#
2919# Of course, Automake must honor this variable whenever it calls a
2920# tool from the auxiliary directory.  The problem is that $srcdir (and
2921# therefore $ac_aux_dir as well) can be either absolute or relative,
2922# depending on how configure is run.  This is pretty annoying, since
2923# it makes $ac_aux_dir quite unusable in subdirectories: in the top
2924# source directory, any form will work fine, but in subdirectories a
2925# relative path needs to be adjusted first.
2926#
2927# $ac_aux_dir/missing
2928#    fails when called from a subdirectory if $ac_aux_dir is relative
2929# $top_srcdir/$ac_aux_dir/missing
2930#    fails if $ac_aux_dir is absolute,
2931#    fails when called from a subdirectory in a VPATH build with
2932#          a relative $ac_aux_dir
2933#
2934# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
2935# are both prefixed by $srcdir.  In an in-source build this is usually
2936# harmless because $srcdir is '.', but things will broke when you
2937# start a VPATH build or use an absolute $srcdir.
2938#
2939# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
2940# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
2941#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
2942# and then we would define $MISSING as
2943#   MISSING="\${SHELL} $am_aux_dir/missing"
2944# This will work as long as MISSING is not called from configure, because
2945# unfortunately $(top_srcdir) has no meaning in configure.
2946# However there are other variables, like CC, which are often used in
2947# configure, and could therefore not use this "fixed" $ac_aux_dir.
2948#
2949# Another solution, used here, is to always expand $ac_aux_dir to an
2950# absolute PATH.  The drawback is that using absolute paths prevent a
2951# configured tree to be moved without reconfiguration.
2952
2953AC_DEFUN([AM_AUX_DIR_EXPAND],
2954[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
2955# Expand $ac_aux_dir to an absolute path.
2956am_aux_dir=`cd "$ac_aux_dir" && pwd`
2957])
2958
2959# AM_CONDITIONAL                                            -*- Autoconf -*-
2960
2961# Copyright (C) 1997-2021 Free Software Foundation, Inc.
2962#
2963# This file is free software; the Free Software Foundation
2964# gives unlimited permission to copy and/or distribute it,
2965# with or without modifications, as long as this notice is preserved.
2966
2967# AM_CONDITIONAL(NAME, SHELL-CONDITION)
2968# -------------------------------------
2969# Define a conditional.
2970AC_DEFUN([AM_CONDITIONAL],
2971[AC_PREREQ([2.52])dnl
2972 m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
2973       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
2974AC_SUBST([$1_TRUE])dnl
2975AC_SUBST([$1_FALSE])dnl
2976_AM_SUBST_NOTMAKE([$1_TRUE])dnl
2977_AM_SUBST_NOTMAKE([$1_FALSE])dnl
2978m4_define([_AM_COND_VALUE_$1], [$2])dnl
2979if $2; then
2980  $1_TRUE=
2981  $1_FALSE='#'
2982else
2983  $1_TRUE='#'
2984  $1_FALSE=
2985fi
2986AC_CONFIG_COMMANDS_PRE(
2987[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
2988  AC_MSG_ERROR([[conditional "$1" was never defined.
2989Usually this means the macro was only invoked conditionally.]])
2990fi])])
2991
2992# Copyright (C) 1999-2021 Free Software Foundation, Inc.
2993#
2994# This file is free software; the Free Software Foundation
2995# gives unlimited permission to copy and/or distribute it,
2996# with or without modifications, as long as this notice is preserved.
2997
2998
2999# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
3000# written in clear, in which case automake, when reading aclocal.m4,
3001# will think it sees a *use*, and therefore will trigger all it's
3002# C support machinery.  Also note that it means that autoscan, seeing
3003# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
3004
3005
3006# _AM_DEPENDENCIES(NAME)
3007# ----------------------
3008# See how the compiler implements dependency checking.
3009# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
3010# We try a few techniques and use that to set a single cache variable.
3011#
3012# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
3013# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
3014# dependency, and given that the user is not expected to run this macro,
3015# just rely on AC_PROG_CC.
3016AC_DEFUN([_AM_DEPENDENCIES],
3017[AC_REQUIRE([AM_SET_DEPDIR])dnl
3018AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
3019AC_REQUIRE([AM_MAKE_INCLUDE])dnl
3020AC_REQUIRE([AM_DEP_TRACK])dnl
3021
3022m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
3023      [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
3024      [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
3025      [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
3026      [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
3027      [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
3028                    [depcc="$$1"   am_compiler_list=])
3029
3030AC_CACHE_CHECK([dependency style of $depcc],
3031               [am_cv_$1_dependencies_compiler_type],
3032[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
3033  # We make a subdir and do the tests there.  Otherwise we can end up
3034  # making bogus files that we don't know about and never remove.  For
3035  # instance it was reported that on HP-UX the gcc test will end up
3036  # making a dummy file named 'D' -- because '-MD' means "put the output
3037  # in D".
3038  rm -rf conftest.dir
3039  mkdir conftest.dir
3040  # Copy depcomp to subdir because otherwise we won't find it if we're
3041  # using a relative directory.
3042  cp "$am_depcomp" conftest.dir
3043  cd conftest.dir
3044  # We will build objects and dependencies in a subdirectory because
3045  # it helps to detect inapplicable dependency modes.  For instance
3046  # both Tru64's cc and ICC support -MD to output dependencies as a
3047  # side effect of compilation, but ICC will put the dependencies in
3048  # the current directory while Tru64 will put them in the object
3049  # directory.
3050  mkdir sub
3051
3052  am_cv_$1_dependencies_compiler_type=none
3053  if test "$am_compiler_list" = ""; then
3054     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
3055  fi
3056  am__universal=false
3057  m4_case([$1], [CC],
3058    [case " $depcc " in #(
3059     *\ -arch\ *\ -arch\ *) am__universal=true ;;
3060     esac],
3061    [CXX],
3062    [case " $depcc " in #(
3063     *\ -arch\ *\ -arch\ *) am__universal=true ;;
3064     esac])
3065
3066  for depmode in $am_compiler_list; do
3067    # Setup a source with many dependencies, because some compilers
3068    # like to wrap large dependency lists on column 80 (with \), and
3069    # we should not choose a depcomp mode which is confused by this.
3070    #
3071    # We need to recreate these files for each test, as the compiler may
3072    # overwrite some of them when testing with obscure command lines.
3073    # This happens at least with the AIX C compiler.
3074    : > sub/conftest.c
3075    for i in 1 2 3 4 5 6; do
3076      echo '#include "conftst'$i'.h"' >> sub/conftest.c
3077      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
3078      # Solaris 10 /bin/sh.
3079      echo '/* dummy */' > sub/conftst$i.h
3080    done
3081    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
3082
3083    # We check with '-c' and '-o' for the sake of the "dashmstdout"
3084    # mode.  It turns out that the SunPro C++ compiler does not properly
3085    # handle '-M -o', and we need to detect this.  Also, some Intel
3086    # versions had trouble with output in subdirs.
3087    am__obj=sub/conftest.${OBJEXT-o}
3088    am__minus_obj="-o $am__obj"
3089    case $depmode in
3090    gcc)
3091      # This depmode causes a compiler race in universal mode.
3092      test "$am__universal" = false || continue
3093      ;;
3094    nosideeffect)
3095      # After this tag, mechanisms are not by side-effect, so they'll
3096      # only be used when explicitly requested.
3097      if test "x$enable_dependency_tracking" = xyes; then
3098	continue
3099      else
3100	break
3101      fi
3102      ;;
3103    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
3104      # This compiler won't grok '-c -o', but also, the minuso test has
3105      # not run yet.  These depmodes are late enough in the game, and
3106      # so weak that their functioning should not be impacted.
3107      am__obj=conftest.${OBJEXT-o}
3108      am__minus_obj=
3109      ;;
3110    none) break ;;
3111    esac
3112    if depmode=$depmode \
3113       source=sub/conftest.c object=$am__obj \
3114       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
3115       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
3116         >/dev/null 2>conftest.err &&
3117       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
3118       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
3119       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
3120       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
3121      # icc doesn't choke on unknown options, it will just issue warnings
3122      # or remarks (even with -Werror).  So we grep stderr for any message
3123      # that says an option was ignored or not supported.
3124      # When given -MP, icc 7.0 and 7.1 complain thusly:
3125      #   icc: Command line warning: ignoring option '-M'; no argument required
3126      # The diagnosis changed in icc 8.0:
3127      #   icc: Command line remark: option '-MP' not supported
3128      if (grep 'ignoring option' conftest.err ||
3129          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
3130        am_cv_$1_dependencies_compiler_type=$depmode
3131        break
3132      fi
3133    fi
3134  done
3135
3136  cd ..
3137  rm -rf conftest.dir
3138else
3139  am_cv_$1_dependencies_compiler_type=none
3140fi
3141])
3142AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
3143AM_CONDITIONAL([am__fastdep$1], [
3144  test "x$enable_dependency_tracking" != xno \
3145  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
3146])
3147
3148
3149# AM_SET_DEPDIR
3150# -------------
3151# Choose a directory name for dependency files.
3152# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
3153AC_DEFUN([AM_SET_DEPDIR],
3154[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
3155AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
3156])
3157
3158
3159# AM_DEP_TRACK
3160# ------------
3161AC_DEFUN([AM_DEP_TRACK],
3162[AC_ARG_ENABLE([dependency-tracking], [dnl
3163AS_HELP_STRING(
3164  [--enable-dependency-tracking],
3165  [do not reject slow dependency extractors])
3166AS_HELP_STRING(
3167  [--disable-dependency-tracking],
3168  [speeds up one-time build])])
3169if test "x$enable_dependency_tracking" != xno; then
3170  am_depcomp="$ac_aux_dir/depcomp"
3171  AMDEPBACKSLASH='\'
3172  am__nodep='_no'
3173fi
3174AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
3175AC_SUBST([AMDEPBACKSLASH])dnl
3176_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
3177AC_SUBST([am__nodep])dnl
3178_AM_SUBST_NOTMAKE([am__nodep])dnl
3179])
3180
3181# Generate code to set up dependency tracking.              -*- Autoconf -*-
3182
3183# Copyright (C) 1999-2021 Free Software Foundation, Inc.
3184#
3185# This file is free software; the Free Software Foundation
3186# gives unlimited permission to copy and/or distribute it,
3187# with or without modifications, as long as this notice is preserved.
3188
3189# _AM_OUTPUT_DEPENDENCY_COMMANDS
3190# ------------------------------
3191AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
3192[{
3193  # Older Autoconf quotes --file arguments for eval, but not when files
3194  # are listed without --file.  Let's play safe and only enable the eval
3195  # if we detect the quoting.
3196  # TODO: see whether this extra hack can be removed once we start
3197  # requiring Autoconf 2.70 or later.
3198  AS_CASE([$CONFIG_FILES],
3199          [*\'*], [eval set x "$CONFIG_FILES"],
3200          [*], [set x $CONFIG_FILES])
3201  shift
3202  # Used to flag and report bootstrapping failures.
3203  am_rc=0
3204  for am_mf
3205  do
3206    # Strip MF so we end up with the name of the file.
3207    am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
3208    # Check whether this is an Automake generated Makefile which includes
3209    # dependency-tracking related rules and includes.
3210    # Grep'ing the whole file directly is not great: AIX grep has a line
3211    # limit of 2048, but all sed's we know have understand at least 4000.
3212    sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
3213      || continue
3214    am_dirpart=`AS_DIRNAME(["$am_mf"])`
3215    am_filepart=`AS_BASENAME(["$am_mf"])`
3216    AM_RUN_LOG([cd "$am_dirpart" \
3217      && sed -e '/# am--include-marker/d' "$am_filepart" \
3218        | $MAKE -f - am--depfiles]) || am_rc=$?
3219  done
3220  if test $am_rc -ne 0; then
3221    AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
3222    for automatic dependency tracking.  If GNU make was not used, consider
3223    re-running the configure script with MAKE="gmake" (or whatever is
3224    necessary).  You can also try re-running configure with the
3225    '--disable-dependency-tracking' option to at least be able to build
3226    the package (albeit without support for automatic dependency tracking).])
3227  fi
3228  AS_UNSET([am_dirpart])
3229  AS_UNSET([am_filepart])
3230  AS_UNSET([am_mf])
3231  AS_UNSET([am_rc])
3232  rm -f conftest-deps.mk
3233}
3234])# _AM_OUTPUT_DEPENDENCY_COMMANDS
3235
3236
3237# AM_OUTPUT_DEPENDENCY_COMMANDS
3238# -----------------------------
3239# This macro should only be invoked once -- use via AC_REQUIRE.
3240#
3241# This code is only required when automatic dependency tracking is enabled.
3242# This creates each '.Po' and '.Plo' makefile fragment that we'll need in
3243# order to bootstrap the dependency handling code.
3244AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
3245[AC_CONFIG_COMMANDS([depfiles],
3246     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
3247     [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
3248
3249# Do all the work for Automake.                             -*- Autoconf -*-
3250
3251# Copyright (C) 1996-2021 Free Software Foundation, Inc.
3252#
3253# This file is free software; the Free Software Foundation
3254# gives unlimited permission to copy and/or distribute it,
3255# with or without modifications, as long as this notice is preserved.
3256
3257# This macro actually does too much.  Some checks are only needed if
3258# your package does certain things.  But this isn't really a big deal.
3259
3260dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
3261m4_define([AC_PROG_CC],
3262m4_defn([AC_PROG_CC])
3263[_AM_PROG_CC_C_O
3264])
3265
3266# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
3267# AM_INIT_AUTOMAKE([OPTIONS])
3268# -----------------------------------------------
3269# The call with PACKAGE and VERSION arguments is the old style
3270# call (pre autoconf-2.50), which is being phased out.  PACKAGE
3271# and VERSION should now be passed to AC_INIT and removed from
3272# the call to AM_INIT_AUTOMAKE.
3273# We support both call styles for the transition.  After
3274# the next Automake release, Autoconf can make the AC_INIT
3275# arguments mandatory, and then we can depend on a new Autoconf
3276# release and drop the old call support.
3277AC_DEFUN([AM_INIT_AUTOMAKE],
3278[AC_PREREQ([2.65])dnl
3279m4_ifdef([_$0_ALREADY_INIT],
3280  [m4_fatal([$0 expanded multiple times
3281]m4_defn([_$0_ALREADY_INIT]))],
3282  [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl
3283dnl Autoconf wants to disallow AM_ names.  We explicitly allow
3284dnl the ones we care about.
3285m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
3286AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
3287AC_REQUIRE([AC_PROG_INSTALL])dnl
3288if test "`cd $srcdir && pwd`" != "`pwd`"; then
3289  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3290  # is not polluted with repeated "-I."
3291  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
3292  # test to see if srcdir already configured
3293  if test -f $srcdir/config.status; then
3294    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
3295  fi
3296fi
3297
3298# test whether we have cygpath
3299if test -z "$CYGPATH_W"; then
3300  if (cygpath --version) >/dev/null 2>/dev/null; then
3301    CYGPATH_W='cygpath -w'
3302  else
3303    CYGPATH_W=echo
3304  fi
3305fi
3306AC_SUBST([CYGPATH_W])
3307
3308# Define the identity of the package.
3309dnl Distinguish between old-style and new-style calls.
3310m4_ifval([$2],
3311[AC_DIAGNOSE([obsolete],
3312             [$0: two- and three-arguments forms are deprecated.])
3313m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
3314 AC_SUBST([PACKAGE], [$1])dnl
3315 AC_SUBST([VERSION], [$2])],
3316[_AM_SET_OPTIONS([$1])dnl
3317dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
3318m4_if(
3319  m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]),
3320  [ok:ok],,
3321  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
3322 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
3323 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
3324
3325_AM_IF_OPTION([no-define],,
3326[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
3327 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
3328
3329# Some tools Automake needs.
3330AC_REQUIRE([AM_SANITY_CHECK])dnl
3331AC_REQUIRE([AC_ARG_PROGRAM])dnl
3332AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
3333AM_MISSING_PROG([AUTOCONF], [autoconf])
3334AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
3335AM_MISSING_PROG([AUTOHEADER], [autoheader])
3336AM_MISSING_PROG([MAKEINFO], [makeinfo])
3337AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
3338AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
3339AC_REQUIRE([AC_PROG_MKDIR_P])dnl
3340# For better backward compatibility.  To be removed once Automake 1.9.x
3341# dies out for good.  For more background, see:
3342# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
3343# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
3344AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
3345# We need awk for the "check" target (and possibly the TAP driver).  The
3346# system "awk" is bad on some platforms.
3347AC_REQUIRE([AC_PROG_AWK])dnl
3348AC_REQUIRE([AC_PROG_MAKE_SET])dnl
3349AC_REQUIRE([AM_SET_LEADING_DOT])dnl
3350_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
3351	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
3352			     [_AM_PROG_TAR([v7])])])
3353_AM_IF_OPTION([no-dependencies],,
3354[AC_PROVIDE_IFELSE([AC_PROG_CC],
3355		  [_AM_DEPENDENCIES([CC])],
3356		  [m4_define([AC_PROG_CC],
3357			     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
3358AC_PROVIDE_IFELSE([AC_PROG_CXX],
3359		  [_AM_DEPENDENCIES([CXX])],
3360		  [m4_define([AC_PROG_CXX],
3361			     m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
3362AC_PROVIDE_IFELSE([AC_PROG_OBJC],
3363		  [_AM_DEPENDENCIES([OBJC])],
3364		  [m4_define([AC_PROG_OBJC],
3365			     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
3366AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
3367		  [_AM_DEPENDENCIES([OBJCXX])],
3368		  [m4_define([AC_PROG_OBJCXX],
3369			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
3370])
3371# Variables for tags utilities; see am/tags.am
3372if test -z "$CTAGS"; then
3373  CTAGS=ctags
3374fi
3375AC_SUBST([CTAGS])
3376if test -z "$ETAGS"; then
3377  ETAGS=etags
3378fi
3379AC_SUBST([ETAGS])
3380if test -z "$CSCOPE"; then
3381  CSCOPE=cscope
3382fi
3383AC_SUBST([CSCOPE])
3384
3385AC_REQUIRE([AM_SILENT_RULES])dnl
3386dnl The testsuite driver may need to know about EXEEXT, so add the
3387dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
3388dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
3389AC_CONFIG_COMMANDS_PRE(dnl
3390[m4_provide_if([_AM_COMPILER_EXEEXT],
3391  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
3392
3393# POSIX will say in a future version that running "rm -f" with no argument
3394# is OK; and we want to be able to make that assumption in our Makefile
3395# recipes.  So use an aggressive probe to check that the usage we want is
3396# actually supported "in the wild" to an acceptable degree.
3397# See automake bug#10828.
3398# To make any issue more visible, cause the running configure to be aborted
3399# by default if the 'rm' program in use doesn't match our expectations; the
3400# user can still override this though.
3401if rm -f && rm -fr && rm -rf; then : OK; else
3402  cat >&2 <<'END'
3403Oops!
3404
3405Your 'rm' program seems unable to run without file operands specified
3406on the command line, even when the '-f' option is present.  This is contrary
3407to the behaviour of most rm programs out there, and not conforming with
3408the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
3409
3410Please tell bug-automake@gnu.org about your system, including the value
3411of your $PATH and any error possibly output before this message.  This
3412can help us improve future automake versions.
3413
3414END
3415  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
3416    echo 'Configuration will proceed anyway, since you have set the' >&2
3417    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
3418    echo >&2
3419  else
3420    cat >&2 <<'END'
3421Aborting the configuration process, to ensure you take notice of the issue.
3422
3423You can download and install GNU coreutils to get an 'rm' implementation
3424that behaves properly: <https://www.gnu.org/software/coreutils/>.
3425
3426If you want to complete the configuration process using your problematic
3427'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
3428to "yes", and re-run configure.
3429
3430END
3431    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
3432  fi
3433fi
3434dnl The trailing newline in this macro's definition is deliberate, for
3435dnl backward compatibility and to allow trailing 'dnl'-style comments
3436dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
3437])
3438
3439dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
3440dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
3441dnl mangled by Autoconf and run in a shell conditional statement.
3442m4_define([_AC_COMPILER_EXEEXT],
3443m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
3444
3445# When config.status generates a header, we must update the stamp-h file.
3446# This file resides in the same directory as the config header
3447# that is generated.  The stamp files are numbered to have different names.
3448
3449# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
3450# loop where config.status creates the headers, so we can generate
3451# our stamp files there.
3452AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
3453[# Compute $1's index in $config_headers.
3454_am_arg=$1
3455_am_stamp_count=1
3456for _am_header in $config_headers :; do
3457  case $_am_header in
3458    $_am_arg | $_am_arg:* )
3459      break ;;
3460    * )
3461      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
3462  esac
3463done
3464echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
3465
3466# Copyright (C) 2001-2021 Free Software Foundation, Inc.
3467#
3468# This file is free software; the Free Software Foundation
3469# gives unlimited permission to copy and/or distribute it,
3470# with or without modifications, as long as this notice is preserved.
3471
3472# AM_PROG_INSTALL_SH
3473# ------------------
3474# Define $install_sh.
3475AC_DEFUN([AM_PROG_INSTALL_SH],
3476[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
3477if test x"${install_sh+set}" != xset; then
3478  case $am_aux_dir in
3479  *\ * | *\	*)
3480    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3481  *)
3482    install_sh="\${SHELL} $am_aux_dir/install-sh"
3483  esac
3484fi
3485AC_SUBST([install_sh])])
3486
3487# Copyright (C) 2003-2021 Free Software Foundation, Inc.
3488#
3489# This file is free software; the Free Software Foundation
3490# gives unlimited permission to copy and/or distribute it,
3491# with or without modifications, as long as this notice is preserved.
3492
3493# Check whether the underlying file-system supports filenames
3494# with a leading dot.  For instance MS-DOS doesn't.
3495AC_DEFUN([AM_SET_LEADING_DOT],
3496[rm -rf .tst 2>/dev/null
3497mkdir .tst 2>/dev/null
3498if test -d .tst; then
3499  am__leading_dot=.
3500else
3501  am__leading_dot=_
3502fi
3503rmdir .tst 2>/dev/null
3504AC_SUBST([am__leading_dot])])
3505
3506# Check to see how 'make' treats includes.	            -*- Autoconf -*-
3507
3508# Copyright (C) 2001-2021 Free Software Foundation, Inc.
3509#
3510# This file is free software; the Free Software Foundation
3511# gives unlimited permission to copy and/or distribute it,
3512# with or without modifications, as long as this notice is preserved.
3513
3514# AM_MAKE_INCLUDE()
3515# -----------------
3516# Check whether make has an 'include' directive that can support all
3517# the idioms we need for our automatic dependency tracking code.
3518AC_DEFUN([AM_MAKE_INCLUDE],
3519[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
3520cat > confinc.mk << 'END'
3521am__doit:
3522	@echo this is the am__doit target >confinc.out
3523.PHONY: am__doit
3524END
3525am__include="#"
3526am__quote=
3527# BSD make does it like this.
3528echo '.include "confinc.mk" # ignored' > confmf.BSD
3529# Other make implementations (GNU, Solaris 10, AIX) do it like this.
3530echo 'include confinc.mk # ignored' > confmf.GNU
3531_am_result=no
3532for s in GNU BSD; do
3533  AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
3534  AS_CASE([$?:`cat confinc.out 2>/dev/null`],
3535      ['0:this is the am__doit target'],
3536      [AS_CASE([$s],
3537          [BSD], [am__include='.include' am__quote='"'],
3538          [am__include='include' am__quote=''])])
3539  if test "$am__include" != "#"; then
3540    _am_result="yes ($s style)"
3541    break
3542  fi
3543done
3544rm -f confinc.* confmf.*
3545AC_MSG_RESULT([${_am_result}])
3546AC_SUBST([am__include])])
3547AC_SUBST([am__quote])])
3548
3549# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
3550
3551# Copyright (C) 1997-2021 Free Software Foundation, Inc.
3552#
3553# This file is free software; the Free Software Foundation
3554# gives unlimited permission to copy and/or distribute it,
3555# with or without modifications, as long as this notice is preserved.
3556
3557# AM_MISSING_PROG(NAME, PROGRAM)
3558# ------------------------------
3559AC_DEFUN([AM_MISSING_PROG],
3560[AC_REQUIRE([AM_MISSING_HAS_RUN])
3561$1=${$1-"${am_missing_run}$2"}
3562AC_SUBST($1)])
3563
3564# AM_MISSING_HAS_RUN
3565# ------------------
3566# Define MISSING if not defined so far and test if it is modern enough.
3567# If it is, set am_missing_run to use it, otherwise, to nothing.
3568AC_DEFUN([AM_MISSING_HAS_RUN],
3569[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
3570AC_REQUIRE_AUX_FILE([missing])dnl
3571if test x"${MISSING+set}" != xset; then
3572  MISSING="\${SHELL} '$am_aux_dir/missing'"
3573fi
3574# Use eval to expand $SHELL
3575if eval "$MISSING --is-lightweight"; then
3576  am_missing_run="$MISSING "
3577else
3578  am_missing_run=
3579  AC_MSG_WARN(['missing' script is too old or missing])
3580fi
3581])
3582
3583# Helper functions for option handling.                     -*- Autoconf -*-
3584
3585# Copyright (C) 2001-2021 Free Software Foundation, Inc.
3586#
3587# This file is free software; the Free Software Foundation
3588# gives unlimited permission to copy and/or distribute it,
3589# with or without modifications, as long as this notice is preserved.
3590
3591# _AM_MANGLE_OPTION(NAME)
3592# -----------------------
3593AC_DEFUN([_AM_MANGLE_OPTION],
3594[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
3595
3596# _AM_SET_OPTION(NAME)
3597# --------------------
3598# Set option NAME.  Presently that only means defining a flag for this option.
3599AC_DEFUN([_AM_SET_OPTION],
3600[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
3601
3602# _AM_SET_OPTIONS(OPTIONS)
3603# ------------------------
3604# OPTIONS is a space-separated list of Automake options.
3605AC_DEFUN([_AM_SET_OPTIONS],
3606[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
3607
3608# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
3609# -------------------------------------------
3610# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
3611AC_DEFUN([_AM_IF_OPTION],
3612[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
3613
3614# Copyright (C) 1999-2021 Free Software Foundation, Inc.
3615#
3616# This file is free software; the Free Software Foundation
3617# gives unlimited permission to copy and/or distribute it,
3618# with or without modifications, as long as this notice is preserved.
3619
3620# _AM_PROG_CC_C_O
3621# ---------------
3622# Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
3623# to automatically call this.
3624AC_DEFUN([_AM_PROG_CC_C_O],
3625[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
3626AC_REQUIRE_AUX_FILE([compile])dnl
3627AC_LANG_PUSH([C])dnl
3628AC_CACHE_CHECK(
3629  [whether $CC understands -c and -o together],
3630  [am_cv_prog_cc_c_o],
3631  [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
3632  # Make sure it works both with $CC and with simple cc.
3633  # Following AC_PROG_CC_C_O, we do the test twice because some
3634  # compilers refuse to overwrite an existing .o file with -o,
3635  # though they will create one.
3636  am_cv_prog_cc_c_o=yes
3637  for am_i in 1 2; do
3638    if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
3639         && test -f conftest2.$ac_objext; then
3640      : OK
3641    else
3642      am_cv_prog_cc_c_o=no
3643      break
3644    fi
3645  done
3646  rm -f core conftest*
3647  unset am_i])
3648if test "$am_cv_prog_cc_c_o" != yes; then
3649   # Losing compiler, so override with the script.
3650   # FIXME: It is wrong to rewrite CC.
3651   # But if we don't then we get into trouble of one sort or another.
3652   # A longer-term fix would be to have automake use am__CC in this case,
3653   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
3654   CC="$am_aux_dir/compile $CC"
3655fi
3656AC_LANG_POP([C])])
3657
3658# For backward compatibility.
3659AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
3660
3661# Copyright (C) 2001-2021 Free Software Foundation, Inc.
3662#
3663# This file is free software; the Free Software Foundation
3664# gives unlimited permission to copy and/or distribute it,
3665# with or without modifications, as long as this notice is preserved.
3666
3667# AM_RUN_LOG(COMMAND)
3668# -------------------
3669# Run COMMAND, save the exit status in ac_status, and log it.
3670# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
3671AC_DEFUN([AM_RUN_LOG],
3672[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
3673   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
3674   ac_status=$?
3675   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3676   (exit $ac_status); }])
3677
3678# Check to make sure that the build environment is sane.    -*- Autoconf -*-
3679
3680# Copyright (C) 1996-2021 Free Software Foundation, Inc.
3681#
3682# This file is free software; the Free Software Foundation
3683# gives unlimited permission to copy and/or distribute it,
3684# with or without modifications, as long as this notice is preserved.
3685
3686# AM_SANITY_CHECK
3687# ---------------
3688AC_DEFUN([AM_SANITY_CHECK],
3689[AC_MSG_CHECKING([whether build environment is sane])
3690# Reject unsafe characters in $srcdir or the absolute working directory
3691# name.  Accept space and tab only in the latter.
3692am_lf='
3693'
3694case `pwd` in
3695  *[[\\\"\#\$\&\'\`$am_lf]]*)
3696    AC_MSG_ERROR([unsafe absolute working directory name]);;
3697esac
3698case $srcdir in
3699  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
3700    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
3701esac
3702
3703# Do 'set' in a subshell so we don't clobber the current shell's
3704# arguments.  Must try -L first in case configure is actually a
3705# symlink; some systems play weird games with the mod time of symlinks
3706# (eg FreeBSD returns the mod time of the symlink's containing
3707# directory).
3708if (
3709   am_has_slept=no
3710   for am_try in 1 2; do
3711     echo "timestamp, slept: $am_has_slept" > conftest.file
3712     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3713     if test "$[*]" = "X"; then
3714	# -L didn't work.
3715	set X `ls -t "$srcdir/configure" conftest.file`
3716     fi
3717     if test "$[*]" != "X $srcdir/configure conftest.file" \
3718	&& test "$[*]" != "X conftest.file $srcdir/configure"; then
3719
3720	# If neither matched, then we have a broken ls.  This can happen
3721	# if, for instance, CONFIG_SHELL is bash and it inherits a
3722	# broken ls alias from the environment.  This has actually
3723	# happened.  Such a system could not be considered "sane".
3724	AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
3725  alias in your environment])
3726     fi
3727     if test "$[2]" = conftest.file || test $am_try -eq 2; then
3728       break
3729     fi
3730     # Just in case.
3731     sleep 1
3732     am_has_slept=yes
3733   done
3734   test "$[2]" = conftest.file
3735   )
3736then
3737   # Ok.
3738   :
3739else
3740   AC_MSG_ERROR([newly created file is older than distributed files!
3741Check your system clock])
3742fi
3743AC_MSG_RESULT([yes])
3744# If we didn't sleep, we still need to ensure time stamps of config.status and
3745# generated files are strictly newer.
3746am_sleep_pid=
3747if grep 'slept: no' conftest.file >/dev/null 2>&1; then
3748  ( sleep 1 ) &
3749  am_sleep_pid=$!
3750fi
3751AC_CONFIG_COMMANDS_PRE(
3752  [AC_MSG_CHECKING([that generated files are newer than configure])
3753   if test -n "$am_sleep_pid"; then
3754     # Hide warnings about reused PIDs.
3755     wait $am_sleep_pid 2>/dev/null
3756   fi
3757   AC_MSG_RESULT([done])])
3758rm -f conftest.file
3759])
3760
3761# Copyright (C) 2009-2021 Free Software Foundation, Inc.
3762#
3763# This file is free software; the Free Software Foundation
3764# gives unlimited permission to copy and/or distribute it,
3765# with or without modifications, as long as this notice is preserved.
3766
3767# AM_SILENT_RULES([DEFAULT])
3768# --------------------------
3769# Enable less verbose build rules; with the default set to DEFAULT
3770# ("yes" being less verbose, "no" or empty being verbose).
3771AC_DEFUN([AM_SILENT_RULES],
3772[AC_ARG_ENABLE([silent-rules], [dnl
3773AS_HELP_STRING(
3774  [--enable-silent-rules],
3775  [less verbose build output (undo: "make V=1")])
3776AS_HELP_STRING(
3777  [--disable-silent-rules],
3778  [verbose build output (undo: "make V=0")])dnl
3779])
3780case $enable_silent_rules in @%:@ (((
3781  yes) AM_DEFAULT_VERBOSITY=0;;
3782   no) AM_DEFAULT_VERBOSITY=1;;
3783    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
3784esac
3785dnl
3786dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
3787dnl do not support nested variable expansions.
3788dnl See automake bug#9928 and bug#10237.
3789am_make=${MAKE-make}
3790AC_CACHE_CHECK([whether $am_make supports nested variables],
3791   [am_cv_make_support_nested_variables],
3792   [if AS_ECHO([['TRUE=$(BAR$(V))
3793BAR0=false
3794BAR1=true
3795V=1
3796am__doit:
3797	@$(TRUE)
3798.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
3799  am_cv_make_support_nested_variables=yes
3800else
3801  am_cv_make_support_nested_variables=no
3802fi])
3803if test $am_cv_make_support_nested_variables = yes; then
3804  dnl Using '$V' instead of '$(V)' breaks IRIX make.
3805  AM_V='$(V)'
3806  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
3807else
3808  AM_V=$AM_DEFAULT_VERBOSITY
3809  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
3810fi
3811AC_SUBST([AM_V])dnl
3812AM_SUBST_NOTMAKE([AM_V])dnl
3813AC_SUBST([AM_DEFAULT_V])dnl
3814AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
3815AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
3816AM_BACKSLASH='\'
3817AC_SUBST([AM_BACKSLASH])dnl
3818_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
3819])
3820
3821# Copyright (C) 2001-2021 Free Software Foundation, Inc.
3822#
3823# This file is free software; the Free Software Foundation
3824# gives unlimited permission to copy and/or distribute it,
3825# with or without modifications, as long as this notice is preserved.
3826
3827# AM_PROG_INSTALL_STRIP
3828# ---------------------
3829# One issue with vendor 'install' (even GNU) is that you can't
3830# specify the program used to strip binaries.  This is especially
3831# annoying in cross-compiling environments, where the build's strip
3832# is unlikely to handle the host's binaries.
3833# Fortunately install-sh will honor a STRIPPROG variable, so we
3834# always use install-sh in "make install-strip", and initialize
3835# STRIPPROG with the value of the STRIP variable (set by the user).
3836AC_DEFUN([AM_PROG_INSTALL_STRIP],
3837[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
3838# Installed binaries are usually stripped using 'strip' when the user
3839# run "make install-strip".  However 'strip' might not be the right
3840# tool to use in cross-compilation environments, therefore Automake
3841# will honor the 'STRIP' environment variable to overrule this program.
3842dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
3843if test "$cross_compiling" != no; then
3844  AC_CHECK_TOOL([STRIP], [strip], :)
3845fi
3846INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3847AC_SUBST([INSTALL_STRIP_PROGRAM])])
3848
3849# Copyright (C) 2006-2021 Free Software Foundation, Inc.
3850#
3851# This file is free software; the Free Software Foundation
3852# gives unlimited permission to copy and/or distribute it,
3853# with or without modifications, as long as this notice is preserved.
3854
3855# _AM_SUBST_NOTMAKE(VARIABLE)
3856# ---------------------------
3857# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
3858# This macro is traced by Automake.
3859AC_DEFUN([_AM_SUBST_NOTMAKE])
3860
3861# AM_SUBST_NOTMAKE(VARIABLE)
3862# --------------------------
3863# Public sister of _AM_SUBST_NOTMAKE.
3864AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
3865
3866# Check how to create a tarball.                            -*- Autoconf -*-
3867
3868# Copyright (C) 2004-2021 Free Software Foundation, Inc.
3869#
3870# This file is free software; the Free Software Foundation
3871# gives unlimited permission to copy and/or distribute it,
3872# with or without modifications, as long as this notice is preserved.
3873
3874# _AM_PROG_TAR(FORMAT)
3875# --------------------
3876# Check how to create a tarball in format FORMAT.
3877# FORMAT should be one of 'v7', 'ustar', or 'pax'.
3878#
3879# Substitute a variable $(am__tar) that is a command
3880# writing to stdout a FORMAT-tarball containing the directory
3881# $tardir.
3882#     tardir=directory && $(am__tar) > result.tar
3883#
3884# Substitute a variable $(am__untar) that extract such
3885# a tarball read from stdin.
3886#     $(am__untar) < result.tar
3887#
3888AC_DEFUN([_AM_PROG_TAR],
3889[# Always define AMTAR for backward compatibility.  Yes, it's still used
3890# in the wild :-(  We should find a proper way to deprecate it ...
3891AC_SUBST([AMTAR], ['$${TAR-tar}'])
3892
3893# We'll loop over all known methods to create a tar archive until one works.
3894_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
3895
3896m4_if([$1], [v7],
3897  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
3898
3899  [m4_case([$1],
3900    [ustar],
3901     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
3902      # There is notably a 21 bits limit for the UID and the GID.  In fact,
3903      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
3904      # and bug#13588).
3905      am_max_uid=2097151 # 2^21 - 1
3906      am_max_gid=$am_max_uid
3907      # The $UID and $GID variables are not portable, so we need to resort
3908      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
3909      # below are definitely unexpected, so allow the users to see them
3910      # (that is, avoid stderr redirection).
3911      am_uid=`id -u || echo unknown`
3912      am_gid=`id -g || echo unknown`
3913      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
3914      if test $am_uid -le $am_max_uid; then
3915         AC_MSG_RESULT([yes])
3916      else
3917         AC_MSG_RESULT([no])
3918         _am_tools=none
3919      fi
3920      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
3921      if test $am_gid -le $am_max_gid; then
3922         AC_MSG_RESULT([yes])
3923      else
3924        AC_MSG_RESULT([no])
3925        _am_tools=none
3926      fi],
3927
3928  [pax],
3929    [],
3930
3931  [m4_fatal([Unknown tar format])])
3932
3933  AC_MSG_CHECKING([how to create a $1 tar archive])
3934
3935  # Go ahead even if we have the value already cached.  We do so because we
3936  # need to set the values for the 'am__tar' and 'am__untar' variables.
3937  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
3938
3939  for _am_tool in $_am_tools; do
3940    case $_am_tool in
3941    gnutar)
3942      for _am_tar in tar gnutar gtar; do
3943        AM_RUN_LOG([$_am_tar --version]) && break
3944      done
3945      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
3946      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
3947      am__untar="$_am_tar -xf -"
3948      ;;
3949    plaintar)
3950      # Must skip GNU tar: if it does not support --format= it doesn't create
3951      # ustar tarball either.
3952      (tar --version) >/dev/null 2>&1 && continue
3953      am__tar='tar chf - "$$tardir"'
3954      am__tar_='tar chf - "$tardir"'
3955      am__untar='tar xf -'
3956      ;;
3957    pax)
3958      am__tar='pax -L -x $1 -w "$$tardir"'
3959      am__tar_='pax -L -x $1 -w "$tardir"'
3960      am__untar='pax -r'
3961      ;;
3962    cpio)
3963      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
3964      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
3965      am__untar='cpio -i -H $1 -d'
3966      ;;
3967    none)
3968      am__tar=false
3969      am__tar_=false
3970      am__untar=false
3971      ;;
3972    esac
3973
3974    # If the value was cached, stop now.  We just wanted to have am__tar
3975    # and am__untar set.
3976    test -n "${am_cv_prog_tar_$1}" && break
3977
3978    # tar/untar a dummy directory, and stop if the command works.
3979    rm -rf conftest.dir
3980    mkdir conftest.dir
3981    echo GrepMe > conftest.dir/file
3982    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
3983    rm -rf conftest.dir
3984    if test -s conftest.tar; then
3985      AM_RUN_LOG([$am__untar <conftest.tar])
3986      AM_RUN_LOG([cat conftest.dir/file])
3987      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
3988    fi
3989  done
3990  rm -rf conftest.dir
3991
3992  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
3993  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
3994
3995AC_SUBST([am__tar])
3996AC_SUBST([am__untar])
3997]) # _AM_PROG_TAR
3998
3999m4_include([m4/ac_define_dir.m4])
4000m4_include([m4/ax_pthread.m4])
4001m4_include([m4/ltoptions.m4])
4002m4_include([m4/ltsugar.m4])
4003m4_include([m4/lt~obsolete.m4])
4004# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
4005#
4006#   Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software
4007#   Foundation, Inc.
4008#   Written by Gordon Matzigkeit, 1996
4009#
4010# This file is free software; the Free Software Foundation gives
4011# unlimited permission to copy and/or distribute it, with or without
4012# modifications, as long as this notice is preserved.
4013
4014m4_define([_LT_COPYING], [dnl
4015# Copyright (C) 2014 Free Software Foundation, Inc.
4016# This is free software; see the source for copying conditions.  There is NO
4017# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
4018
4019# GNU Libtool is free software; you can redistribute it and/or modify
4020# it under the terms of the GNU General Public License as published by
4021# the Free Software Foundation; either version 2 of of the License, or
4022# (at your option) any later version.
4023#
4024# As a special exception to the GNU General Public License, if you
4025# distribute this file as part of a program or library that is built
4026# using GNU Libtool, you may include this file under the  same
4027# distribution terms that you use for the rest of that program.
4028#
4029# GNU Libtool is distributed in the hope that it will be useful, but
4030# WITHOUT ANY WARRANTY; without even the implied warranty of
4031# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
4032# GNU General Public License for more details.
4033#
4034# You should have received a copy of the GNU General Public License
4035# along with this program.  If not, see <http://www.gnu.org/licenses/>.
4036])
4037
4038# serial 59 LT_INIT
4039
4040
4041# LT_PREREQ(VERSION)
4042# ------------------
4043# Complain and exit if this libtool version is less that VERSION.
4044m4_defun([LT_PREREQ],
4045[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
4046       [m4_default([$3],
4047		   [m4_fatal([Libtool version $1 or higher is required],
4048		             63)])],
4049       [$2])])
4050
4051
4052# _LT_CHECK_BUILDDIR
4053# ------------------
4054# Complain if the absolute build directory name contains unusual characters
4055m4_defun([_LT_CHECK_BUILDDIR],
4056[case `pwd` in
4057  *\ * | *\	*)
4058    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
4059esac
4060])
4061
4062
4063# LT_INIT([OPTIONS])
4064# ------------------
4065AC_DEFUN([LT_INIT],
4066[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
4067AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
4068AC_BEFORE([$0], [LT_LANG])dnl
4069AC_BEFORE([$0], [LT_OUTPUT])dnl
4070AC_BEFORE([$0], [LTDL_INIT])dnl
4071m4_require([_LT_CHECK_BUILDDIR])dnl
4072
4073dnl Autoconf doesn't catch unexpanded LT_ macros by default:
4074m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
4075m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
4076dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
4077dnl unless we require an AC_DEFUNed macro:
4078AC_REQUIRE([LTOPTIONS_VERSION])dnl
4079AC_REQUIRE([LTSUGAR_VERSION])dnl
4080AC_REQUIRE([LTVERSION_VERSION])dnl
4081AC_REQUIRE([LTOBSOLETE_VERSION])dnl
4082m4_require([_LT_PROG_LTMAIN])dnl
4083
4084_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
4085
4086dnl Parse OPTIONS
4087_LT_SET_OPTIONS([$0], [$1])
4088
4089# This can be used to rebuild libtool when needed
4090LIBTOOL_DEPS=$ltmain
4091
4092# Always use our own libtool.
4093LIBTOOL='$(SHELL) $(top_builddir)/libtool'
4094AC_SUBST(LIBTOOL)dnl
4095
4096_LT_SETUP
4097
4098# Only expand once:
4099m4_define([LT_INIT])
4100])# LT_INIT
4101
4102# Old names:
4103AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
4104AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
4105dnl aclocal-1.4 backwards compatibility:
4106dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
4107dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
4108
4109
4110# _LT_PREPARE_CC_BASENAME
4111# -----------------------
4112m4_defun([_LT_PREPARE_CC_BASENAME], [
4113# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
4114func_cc_basename ()
4115{
4116    for cc_temp in @S|@*""; do
4117      case $cc_temp in
4118        compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
4119        distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
4120        \-*) ;;
4121        *) break;;
4122      esac
4123    done
4124    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
4125}
4126])# _LT_PREPARE_CC_BASENAME
4127
4128
4129# _LT_CC_BASENAME(CC)
4130# -------------------
4131# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
4132# but that macro is also expanded into generated libtool script, which
4133# arranges for $SED and $ECHO to be set by different means.
4134m4_defun([_LT_CC_BASENAME],
4135[m4_require([_LT_PREPARE_CC_BASENAME])dnl
4136AC_REQUIRE([_LT_DECL_SED])dnl
4137AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
4138func_cc_basename $1
4139cc_basename=$func_cc_basename_result
4140])
4141
4142
4143# _LT_FILEUTILS_DEFAULTS
4144# ----------------------
4145# It is okay to use these file commands and assume they have been set
4146# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
4147m4_defun([_LT_FILEUTILS_DEFAULTS],
4148[: ${CP="cp -f"}
4149: ${MV="mv -f"}
4150: ${RM="rm -f"}
4151])# _LT_FILEUTILS_DEFAULTS
4152
4153
4154# _LT_SETUP
4155# ---------
4156m4_defun([_LT_SETUP],
4157[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4158AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4159AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
4160AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
4161
4162_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
4163dnl
4164_LT_DECL([], [host_alias], [0], [The host system])dnl
4165_LT_DECL([], [host], [0])dnl
4166_LT_DECL([], [host_os], [0])dnl
4167dnl
4168_LT_DECL([], [build_alias], [0], [The build system])dnl
4169_LT_DECL([], [build], [0])dnl
4170_LT_DECL([], [build_os], [0])dnl
4171dnl
4172AC_REQUIRE([AC_PROG_CC])dnl
4173AC_REQUIRE([LT_PATH_LD])dnl
4174AC_REQUIRE([LT_PATH_NM])dnl
4175dnl
4176AC_REQUIRE([AC_PROG_LN_S])dnl
4177test -z "$LN_S" && LN_S="ln -s"
4178_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
4179dnl
4180AC_REQUIRE([LT_CMD_MAX_LEN])dnl
4181_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
4182_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
4183dnl
4184m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4185m4_require([_LT_CHECK_SHELL_FEATURES])dnl
4186m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
4187m4_require([_LT_CMD_RELOAD])dnl
4188m4_require([_LT_DECL_FILECMD])dnl
4189m4_require([_LT_CHECK_MAGIC_METHOD])dnl
4190m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
4191m4_require([_LT_CMD_OLD_ARCHIVE])dnl
4192m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4193m4_require([_LT_WITH_SYSROOT])dnl
4194m4_require([_LT_CMD_TRUNCATE])dnl
4195
4196_LT_CONFIG_LIBTOOL_INIT([
4197# See if we are running on zsh, and set the options that allow our
4198# commands through without removal of \ escapes INIT.
4199if test -n "\${ZSH_VERSION+set}"; then
4200   setopt NO_GLOB_SUBST
4201fi
4202])
4203if test -n "${ZSH_VERSION+set}"; then
4204   setopt NO_GLOB_SUBST
4205fi
4206
4207_LT_CHECK_OBJDIR
4208
4209m4_require([_LT_TAG_COMPILER])dnl
4210
4211case $host_os in
4212aix3*)
4213  # AIX sometimes has problems with the GCC collect2 program.  For some
4214  # reason, if we set the COLLECT_NAMES environment variable, the problems
4215  # vanish in a puff of smoke.
4216  if test set != "${COLLECT_NAMES+set}"; then
4217    COLLECT_NAMES=
4218    export COLLECT_NAMES
4219  fi
4220  ;;
4221esac
4222
4223# Global variables:
4224ofile=libtool
4225can_build_shared=yes
4226
4227# All known linkers require a '.a' archive for static linking (except MSVC and
4228# ICC, which need '.lib').
4229libext=a
4230
4231with_gnu_ld=$lt_cv_prog_gnu_ld
4232
4233old_CC=$CC
4234old_CFLAGS=$CFLAGS
4235
4236# Set sane defaults for various variables
4237test -z "$CC" && CC=cc
4238test -z "$LTCC" && LTCC=$CC
4239test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
4240test -z "$LD" && LD=ld
4241test -z "$ac_objext" && ac_objext=o
4242
4243_LT_CC_BASENAME([$compiler])
4244
4245# Only perform the check for file, if the check method requires it
4246test -z "$MAGIC_CMD" && MAGIC_CMD=file
4247case $deplibs_check_method in
4248file_magic*)
4249  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4250    _LT_PATH_MAGIC
4251  fi
4252  ;;
4253esac
4254
4255# Use C for the default configuration in the libtool script
4256LT_SUPPORTED_TAG([CC])
4257_LT_LANG_C_CONFIG
4258_LT_LANG_DEFAULT_CONFIG
4259_LT_CONFIG_COMMANDS
4260])# _LT_SETUP
4261
4262
4263# _LT_PREPARE_SED_QUOTE_VARS
4264# --------------------------
4265# Define a few sed substitution that help us do robust quoting.
4266m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
4267[# Backslashify metacharacters that are still active within
4268# double-quoted strings.
4269sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
4270
4271# Same as above, but do not quote variable references.
4272double_quote_subst='s/\([["`\\]]\)/\\\1/g'
4273
4274# Sed substitution to delay expansion of an escaped shell variable in a
4275# double_quote_subst'ed string.
4276delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4277
4278# Sed substitution to delay expansion of an escaped single quote.
4279delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
4280
4281# Sed substitution to avoid accidental globbing in evaled expressions
4282no_glob_subst='s/\*/\\\*/g'
4283])
4284
4285# _LT_PROG_LTMAIN
4286# ---------------
4287# Note that this code is called both from 'configure', and 'config.status'
4288# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
4289# 'config.status' has no value for ac_aux_dir unless we are using Automake,
4290# so we pass a copy along to make sure it has a sensible value anyway.
4291m4_defun([_LT_PROG_LTMAIN],
4292[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
4293_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
4294ltmain=$ac_aux_dir/ltmain.sh
4295])# _LT_PROG_LTMAIN
4296
4297
4298
4299# So that we can recreate a full libtool script including additional
4300# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
4301# in macros and then make a single call at the end using the 'libtool'
4302# label.
4303
4304
4305# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
4306# ----------------------------------------
4307# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
4308m4_define([_LT_CONFIG_LIBTOOL_INIT],
4309[m4_ifval([$1],
4310          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
4311                     [$1
4312])])])
4313
4314# Initialize.
4315m4_define([_LT_OUTPUT_LIBTOOL_INIT])
4316
4317
4318# _LT_CONFIG_LIBTOOL([COMMANDS])
4319# ------------------------------
4320# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
4321m4_define([_LT_CONFIG_LIBTOOL],
4322[m4_ifval([$1],
4323          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
4324                     [$1
4325])])])
4326
4327# Initialize.
4328m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
4329
4330
4331# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
4332# -----------------------------------------------------
4333m4_defun([_LT_CONFIG_SAVE_COMMANDS],
4334[_LT_CONFIG_LIBTOOL([$1])
4335_LT_CONFIG_LIBTOOL_INIT([$2])
4336])
4337
4338
4339# _LT_FORMAT_COMMENT([COMMENT])
4340# -----------------------------
4341# Add leading comment marks to the start of each line, and a trailing
4342# full-stop to the whole comment if one is not present already.
4343m4_define([_LT_FORMAT_COMMENT],
4344[m4_ifval([$1], [
4345m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
4346              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
4347)])
4348
4349
4350
4351
4352
4353# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
4354# -------------------------------------------------------------------
4355# CONFIGNAME is the name given to the value in the libtool script.
4356# VARNAME is the (base) name used in the configure script.
4357# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
4358# VARNAME.  Any other value will be used directly.
4359m4_define([_LT_DECL],
4360[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
4361    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
4362	[m4_ifval([$1], [$1], [$2])])
4363    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
4364    m4_ifval([$4],
4365	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
4366    lt_dict_add_subkey([lt_decl_dict], [$2],
4367	[tagged?], [m4_ifval([$5], [yes], [no])])])
4368])
4369
4370
4371# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
4372# --------------------------------------------------------
4373m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
4374
4375
4376# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
4377# ------------------------------------------------
4378m4_define([lt_decl_tag_varnames],
4379[_lt_decl_filter([tagged?], [yes], $@)])
4380
4381
4382# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
4383# ---------------------------------------------------------
4384m4_define([_lt_decl_filter],
4385[m4_case([$#],
4386  [0], [m4_fatal([$0: too few arguments: $#])],
4387  [1], [m4_fatal([$0: too few arguments: $#: $1])],
4388  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
4389  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
4390  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
4391])
4392
4393
4394# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
4395# --------------------------------------------------
4396m4_define([lt_decl_quote_varnames],
4397[_lt_decl_filter([value], [1], $@)])
4398
4399
4400# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
4401# ---------------------------------------------------
4402m4_define([lt_decl_dquote_varnames],
4403[_lt_decl_filter([value], [2], $@)])
4404
4405
4406# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
4407# ---------------------------------------------------
4408m4_define([lt_decl_varnames_tagged],
4409[m4_assert([$# <= 2])dnl
4410_$0(m4_quote(m4_default([$1], [[, ]])),
4411    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
4412    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
4413m4_define([_lt_decl_varnames_tagged],
4414[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
4415
4416
4417# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
4418# ------------------------------------------------
4419m4_define([lt_decl_all_varnames],
4420[_$0(m4_quote(m4_default([$1], [[, ]])),
4421     m4_if([$2], [],
4422	   m4_quote(lt_decl_varnames),
4423	m4_quote(m4_shift($@))))[]dnl
4424])
4425m4_define([_lt_decl_all_varnames],
4426[lt_join($@, lt_decl_varnames_tagged([$1],
4427			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
4428])
4429
4430
4431# _LT_CONFIG_STATUS_DECLARE([VARNAME])
4432# ------------------------------------
4433# Quote a variable value, and forward it to 'config.status' so that its
4434# declaration there will have the same value as in 'configure'.  VARNAME
4435# must have a single quote delimited value for this to work.
4436m4_define([_LT_CONFIG_STATUS_DECLARE],
4437[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
4438
4439
4440# _LT_CONFIG_STATUS_DECLARATIONS
4441# ------------------------------
4442# We delimit libtool config variables with single quotes, so when
4443# we write them to config.status, we have to be sure to quote all
4444# embedded single quotes properly.  In configure, this macro expands
4445# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
4446#
4447#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
4448m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
4449[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
4450    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
4451
4452
4453# _LT_LIBTOOL_TAGS
4454# ----------------
4455# Output comment and list of tags supported by the script
4456m4_defun([_LT_LIBTOOL_TAGS],
4457[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
4458available_tags='_LT_TAGS'dnl
4459])
4460
4461
4462# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
4463# -----------------------------------
4464# Extract the dictionary values for VARNAME (optionally with TAG) and
4465# expand to a commented shell variable setting:
4466#
4467#    # Some comment about what VAR is for.
4468#    visible_name=$lt_internal_name
4469m4_define([_LT_LIBTOOL_DECLARE],
4470[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
4471					   [description])))[]dnl
4472m4_pushdef([_libtool_name],
4473    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
4474m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
4475    [0], [_libtool_name=[$]$1],
4476    [1], [_libtool_name=$lt_[]$1],
4477    [2], [_libtool_name=$lt_[]$1],
4478    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
4479m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
4480])
4481
4482
4483# _LT_LIBTOOL_CONFIG_VARS
4484# -----------------------
4485# Produce commented declarations of non-tagged libtool config variables
4486# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
4487# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
4488# section) are produced by _LT_LIBTOOL_TAG_VARS.
4489m4_defun([_LT_LIBTOOL_CONFIG_VARS],
4490[m4_foreach([_lt_var],
4491    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
4492    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
4493
4494
4495# _LT_LIBTOOL_TAG_VARS(TAG)
4496# -------------------------
4497m4_define([_LT_LIBTOOL_TAG_VARS],
4498[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
4499    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
4500
4501
4502# _LT_TAGVAR(VARNAME, [TAGNAME])
4503# ------------------------------
4504m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
4505
4506
4507# _LT_CONFIG_COMMANDS
4508# -------------------
4509# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
4510# variables for single and double quote escaping we saved from calls
4511# to _LT_DECL, we can put quote escaped variables declarations
4512# into 'config.status', and then the shell code to quote escape them in
4513# for loops in 'config.status'.  Finally, any additional code accumulated
4514# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
4515m4_defun([_LT_CONFIG_COMMANDS],
4516[AC_PROVIDE_IFELSE([LT_OUTPUT],
4517	dnl If the libtool generation code has been placed in $CONFIG_LT,
4518	dnl instead of duplicating it all over again into config.status,
4519	dnl then we will have config.status run $CONFIG_LT later, so it
4520	dnl needs to know what name is stored there:
4521        [AC_CONFIG_COMMANDS([libtool],
4522            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
4523    dnl If the libtool generation code is destined for config.status,
4524    dnl expand the accumulated commands and init code now:
4525    [AC_CONFIG_COMMANDS([libtool],
4526        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
4527])#_LT_CONFIG_COMMANDS
4528
4529
4530# Initialize.
4531m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
4532[
4533
4534# The HP-UX ksh and POSIX shell print the target directory to stdout
4535# if CDPATH is set.
4536(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
4537
4538sed_quote_subst='$sed_quote_subst'
4539double_quote_subst='$double_quote_subst'
4540delay_variable_subst='$delay_variable_subst'
4541_LT_CONFIG_STATUS_DECLARATIONS
4542LTCC='$LTCC'
4543LTCFLAGS='$LTCFLAGS'
4544compiler='$compiler_DEFAULT'
4545
4546# A function that is used when there is no print builtin or printf.
4547func_fallback_echo ()
4548{
4549  eval 'cat <<_LTECHO_EOF
4550\$[]1
4551_LTECHO_EOF'
4552}
4553
4554# Quote evaled strings.
4555for var in lt_decl_all_varnames([[ \
4556]], lt_decl_quote_varnames); do
4557    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
4558    *[[\\\\\\\`\\"\\\$]]*)
4559      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
4560      ;;
4561    *)
4562      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
4563      ;;
4564    esac
4565done
4566
4567# Double-quote double-evaled strings.
4568for var in lt_decl_all_varnames([[ \
4569]], lt_decl_dquote_varnames); do
4570    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
4571    *[[\\\\\\\`\\"\\\$]]*)
4572      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
4573      ;;
4574    *)
4575      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
4576      ;;
4577    esac
4578done
4579
4580_LT_OUTPUT_LIBTOOL_INIT
4581])
4582
4583# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
4584# ------------------------------------
4585# Generate a child script FILE with all initialization necessary to
4586# reuse the environment learned by the parent script, and make the
4587# file executable.  If COMMENT is supplied, it is inserted after the
4588# '#!' sequence but before initialization text begins.  After this
4589# macro, additional text can be appended to FILE to form the body of
4590# the child script.  The macro ends with non-zero status if the
4591# file could not be fully written (such as if the disk is full).
4592m4_ifdef([AS_INIT_GENERATED],
4593[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
4594[m4_defun([_LT_GENERATED_FILE_INIT],
4595[m4_require([AS_PREPARE])]dnl
4596[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
4597[lt_write_fail=0
4598cat >$1 <<_ASEOF || lt_write_fail=1
4599#! $SHELL
4600# Generated by $as_me.
4601$2
4602SHELL=\${CONFIG_SHELL-$SHELL}
4603export SHELL
4604_ASEOF
4605cat >>$1 <<\_ASEOF || lt_write_fail=1
4606AS_SHELL_SANITIZE
4607_AS_PREPARE
4608exec AS_MESSAGE_FD>&1
4609_ASEOF
4610test 0 = "$lt_write_fail" && chmod +x $1[]dnl
4611m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
4612
4613# LT_OUTPUT
4614# ---------
4615# This macro allows early generation of the libtool script (before
4616# AC_OUTPUT is called), incase it is used in configure for compilation
4617# tests.
4618AC_DEFUN([LT_OUTPUT],
4619[: ${CONFIG_LT=./config.lt}
4620AC_MSG_NOTICE([creating $CONFIG_LT])
4621_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
4622[# Run this file to recreate a libtool stub with the current configuration.])
4623
4624cat >>"$CONFIG_LT" <<\_LTEOF
4625lt_cl_silent=false
4626exec AS_MESSAGE_LOG_FD>>config.log
4627{
4628  echo
4629  AS_BOX([Running $as_me.])
4630} >&AS_MESSAGE_LOG_FD
4631
4632lt_cl_help="\
4633'$as_me' creates a local libtool stub from the current configuration,
4634for use in further configure time tests before the real libtool is
4635generated.
4636
4637Usage: $[0] [[OPTIONS]]
4638
4639  -h, --help      print this help, then exit
4640  -V, --version   print version number, then exit
4641  -q, --quiet     do not print progress messages
4642  -d, --debug     don't remove temporary files
4643
4644Report bugs to <bug-libtool@gnu.org>."
4645
4646lt_cl_version="\
4647m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
4648m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
4649configured by $[0], generated by m4_PACKAGE_STRING.
4650
4651Copyright (C) 2011 Free Software Foundation, Inc.
4652This config.lt script is free software; the Free Software Foundation
4653gives unlimited permision to copy, distribute and modify it."
4654
4655while test 0 != $[#]
4656do
4657  case $[1] in
4658    --version | --v* | -V )
4659      echo "$lt_cl_version"; exit 0 ;;
4660    --help | --h* | -h )
4661      echo "$lt_cl_help"; exit 0 ;;
4662    --debug | --d* | -d )
4663      debug=: ;;
4664    --quiet | --q* | --silent | --s* | -q )
4665      lt_cl_silent=: ;;
4666
4667    -*) AC_MSG_ERROR([unrecognized option: $[1]
4668Try '$[0] --help' for more information.]) ;;
4669
4670    *) AC_MSG_ERROR([unrecognized argument: $[1]
4671Try '$[0] --help' for more information.]) ;;
4672  esac
4673  shift
4674done
4675
4676if $lt_cl_silent; then
4677  exec AS_MESSAGE_FD>/dev/null
4678fi
4679_LTEOF
4680
4681cat >>"$CONFIG_LT" <<_LTEOF
4682_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
4683_LTEOF
4684
4685cat >>"$CONFIG_LT" <<\_LTEOF
4686AC_MSG_NOTICE([creating $ofile])
4687_LT_OUTPUT_LIBTOOL_COMMANDS
4688AS_EXIT(0)
4689_LTEOF
4690chmod +x "$CONFIG_LT"
4691
4692# configure is writing to config.log, but config.lt does its own redirection,
4693# appending to config.log, which fails on DOS, as config.log is still kept
4694# open by configure.  Here we exec the FD to /dev/null, effectively closing
4695# config.log, so it can be properly (re)opened and appended to by config.lt.
4696lt_cl_success=:
4697test yes = "$silent" &&
4698  lt_config_lt_args="$lt_config_lt_args --quiet"
4699exec AS_MESSAGE_LOG_FD>/dev/null
4700$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
4701exec AS_MESSAGE_LOG_FD>>config.log
4702$lt_cl_success || AS_EXIT(1)
4703])# LT_OUTPUT
4704
4705
4706# _LT_CONFIG(TAG)
4707# ---------------
4708# If TAG is the built-in tag, create an initial libtool script with a
4709# default configuration from the untagged config vars.  Otherwise add code
4710# to config.status for appending the configuration named by TAG from the
4711# matching tagged config vars.
4712m4_defun([_LT_CONFIG],
4713[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4714_LT_CONFIG_SAVE_COMMANDS([
4715  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
4716  m4_if(_LT_TAG, [C], [
4717    # See if we are running on zsh, and set the options that allow our
4718    # commands through without removal of \ escapes.
4719    if test -n "${ZSH_VERSION+set}"; then
4720      setopt NO_GLOB_SUBST
4721    fi
4722
4723    cfgfile=${ofile}T
4724    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
4725    $RM "$cfgfile"
4726
4727    cat <<_LT_EOF >> "$cfgfile"
4728#! $SHELL
4729# Generated automatically by $as_me ($PACKAGE) $VERSION
4730# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4731# NOTE: Changes made to this file will be lost: look at ltmain.sh.
4732
4733# Provide generalized library-building support services.
4734# Written by Gordon Matzigkeit, 1996
4735
4736_LT_COPYING
4737_LT_LIBTOOL_TAGS
4738
4739# Configured defaults for sys_lib_dlsearch_path munging.
4740: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
4741
4742# ### BEGIN LIBTOOL CONFIG
4743_LT_LIBTOOL_CONFIG_VARS
4744_LT_LIBTOOL_TAG_VARS
4745# ### END LIBTOOL CONFIG
4746
4747_LT_EOF
4748
4749    cat <<'_LT_EOF' >> "$cfgfile"
4750
4751# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
4752
4753_LT_PREPARE_MUNGE_PATH_LIST
4754_LT_PREPARE_CC_BASENAME
4755
4756# ### END FUNCTIONS SHARED WITH CONFIGURE
4757
4758_LT_EOF
4759
4760  case $host_os in
4761  aix3*)
4762    cat <<\_LT_EOF >> "$cfgfile"
4763# AIX sometimes has problems with the GCC collect2 program.  For some
4764# reason, if we set the COLLECT_NAMES environment variable, the problems
4765# vanish in a puff of smoke.
4766if test set != "${COLLECT_NAMES+set}"; then
4767  COLLECT_NAMES=
4768  export COLLECT_NAMES
4769fi
4770_LT_EOF
4771    ;;
4772  esac
4773
4774  _LT_PROG_LTMAIN
4775
4776  # We use sed instead of cat because bash on DJGPP gets confused if
4777  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
4778  # text mode, it properly converts lines to CR/LF.  This bash problem
4779  # is reportedly fixed, but why not run on old versions too?
4780  $SED '$q' "$ltmain" >> "$cfgfile" \
4781     || (rm -f "$cfgfile"; exit 1)
4782
4783   mv -f "$cfgfile" "$ofile" ||
4784    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
4785  chmod +x "$ofile"
4786],
4787[cat <<_LT_EOF >> "$ofile"
4788
4789dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
4790dnl in a comment (ie after a #).
4791# ### BEGIN LIBTOOL TAG CONFIG: $1
4792_LT_LIBTOOL_TAG_VARS(_LT_TAG)
4793# ### END LIBTOOL TAG CONFIG: $1
4794_LT_EOF
4795])dnl /m4_if
4796],
4797[m4_if([$1], [], [
4798    PACKAGE='$PACKAGE'
4799    VERSION='$VERSION'
4800    RM='$RM'
4801    ofile='$ofile'], [])
4802])dnl /_LT_CONFIG_SAVE_COMMANDS
4803])# _LT_CONFIG
4804
4805
4806# LT_SUPPORTED_TAG(TAG)
4807# ---------------------
4808# Trace this macro to discover what tags are supported by the libtool
4809# --tag option, using:
4810#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
4811AC_DEFUN([LT_SUPPORTED_TAG], [])
4812
4813
4814# C support is built-in for now
4815m4_define([_LT_LANG_C_enabled], [])
4816m4_define([_LT_TAGS], [])
4817
4818
4819# LT_LANG(LANG)
4820# -------------
4821# Enable libtool support for the given language if not already enabled.
4822AC_DEFUN([LT_LANG],
4823[AC_BEFORE([$0], [LT_OUTPUT])dnl
4824m4_case([$1],
4825  [C],			[_LT_LANG(C)],
4826  [C++],		[_LT_LANG(CXX)],
4827  [Go],			[_LT_LANG(GO)],
4828  [Java],		[_LT_LANG(GCJ)],
4829  [Fortran 77],		[_LT_LANG(F77)],
4830  [Fortran],		[_LT_LANG(FC)],
4831  [Windows Resource],	[_LT_LANG(RC)],
4832  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
4833    [_LT_LANG($1)],
4834    [m4_fatal([$0: unsupported language: "$1"])])])dnl
4835])# LT_LANG
4836
4837
4838# _LT_LANG(LANGNAME)
4839# ------------------
4840m4_defun([_LT_LANG],
4841[m4_ifdef([_LT_LANG_]$1[_enabled], [],
4842  [LT_SUPPORTED_TAG([$1])dnl
4843  m4_append([_LT_TAGS], [$1 ])dnl
4844  m4_define([_LT_LANG_]$1[_enabled], [])dnl
4845  _LT_LANG_$1_CONFIG($1)])dnl
4846])# _LT_LANG
4847
4848
4849m4_ifndef([AC_PROG_GO], [
4850# NOTE: This macro has been submitted for inclusion into   #
4851#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
4852#  a released version of Autoconf we should remove this    #
4853#  macro and use it instead.                               #
4854m4_defun([AC_PROG_GO],
4855[AC_LANG_PUSH(Go)dnl
4856AC_ARG_VAR([GOC],     [Go compiler command])dnl
4857AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
4858_AC_ARG_VAR_LDFLAGS()dnl
4859AC_CHECK_TOOL(GOC, gccgo)
4860if test -z "$GOC"; then
4861  if test -n "$ac_tool_prefix"; then
4862    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
4863  fi
4864fi
4865if test -z "$GOC"; then
4866  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
4867fi
4868])#m4_defun
4869])#m4_ifndef
4870
4871
4872# _LT_LANG_DEFAULT_CONFIG
4873# -----------------------
4874m4_defun([_LT_LANG_DEFAULT_CONFIG],
4875[AC_PROVIDE_IFELSE([AC_PROG_CXX],
4876  [LT_LANG(CXX)],
4877  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
4878
4879AC_PROVIDE_IFELSE([AC_PROG_F77],
4880  [LT_LANG(F77)],
4881  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
4882
4883AC_PROVIDE_IFELSE([AC_PROG_FC],
4884  [LT_LANG(FC)],
4885  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
4886
4887dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
4888dnl pulling things in needlessly.
4889AC_PROVIDE_IFELSE([AC_PROG_GCJ],
4890  [LT_LANG(GCJ)],
4891  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
4892    [LT_LANG(GCJ)],
4893    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
4894      [LT_LANG(GCJ)],
4895      [m4_ifdef([AC_PROG_GCJ],
4896	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
4897       m4_ifdef([A][M_PROG_GCJ],
4898	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
4899       m4_ifdef([LT_PROG_GCJ],
4900	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
4901
4902AC_PROVIDE_IFELSE([AC_PROG_GO],
4903  [LT_LANG(GO)],
4904  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
4905
4906AC_PROVIDE_IFELSE([LT_PROG_RC],
4907  [LT_LANG(RC)],
4908  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
4909])# _LT_LANG_DEFAULT_CONFIG
4910
4911# Obsolete macros:
4912AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
4913AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
4914AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
4915AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
4916AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
4917dnl aclocal-1.4 backwards compatibility:
4918dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
4919dnl AC_DEFUN([AC_LIBTOOL_F77], [])
4920dnl AC_DEFUN([AC_LIBTOOL_FC], [])
4921dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
4922dnl AC_DEFUN([AC_LIBTOOL_RC], [])
4923
4924
4925# _LT_TAG_COMPILER
4926# ----------------
4927m4_defun([_LT_TAG_COMPILER],
4928[AC_REQUIRE([AC_PROG_CC])dnl
4929
4930_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
4931_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
4932_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
4933_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
4934
4935# If no C compiler was specified, use CC.
4936LTCC=${LTCC-"$CC"}
4937
4938# If no C compiler flags were specified, use CFLAGS.
4939LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
4940
4941# Allow CC to be a program name with arguments.
4942compiler=$CC
4943])# _LT_TAG_COMPILER
4944
4945
4946# _LT_COMPILER_BOILERPLATE
4947# ------------------------
4948# Check for compiler boilerplate output or warnings with
4949# the simple compiler test code.
4950m4_defun([_LT_COMPILER_BOILERPLATE],
4951[m4_require([_LT_DECL_SED])dnl
4952ac_outfile=conftest.$ac_objext
4953echo "$lt_simple_compile_test_code" >conftest.$ac_ext
4954eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
4955_lt_compiler_boilerplate=`cat conftest.err`
4956$RM conftest*
4957])# _LT_COMPILER_BOILERPLATE
4958
4959
4960# _LT_LINKER_BOILERPLATE
4961# ----------------------
4962# Check for linker boilerplate output or warnings with
4963# the simple link test code.
4964m4_defun([_LT_LINKER_BOILERPLATE],
4965[m4_require([_LT_DECL_SED])dnl
4966ac_outfile=conftest.$ac_objext
4967echo "$lt_simple_link_test_code" >conftest.$ac_ext
4968eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
4969_lt_linker_boilerplate=`cat conftest.err`
4970$RM -r conftest*
4971])# _LT_LINKER_BOILERPLATE
4972
4973# _LT_REQUIRED_DARWIN_CHECKS
4974# -------------------------
4975m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
4976  case $host_os in
4977    rhapsody* | darwin*)
4978    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
4979    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
4980    AC_CHECK_TOOL([LIPO], [lipo], [:])
4981    AC_CHECK_TOOL([OTOOL], [otool], [:])
4982    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
4983    _LT_DECL([], [DSYMUTIL], [1],
4984      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
4985    _LT_DECL([], [NMEDIT], [1],
4986      [Tool to change global to local symbols on Mac OS X])
4987    _LT_DECL([], [LIPO], [1],
4988      [Tool to manipulate fat objects and archives on Mac OS X])
4989    _LT_DECL([], [OTOOL], [1],
4990      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
4991    _LT_DECL([], [OTOOL64], [1],
4992      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
4993
4994    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
4995      [lt_cv_apple_cc_single_mod=no
4996      if test -z "$LT_MULTI_MODULE"; then
4997	# By default we will add the -single_module flag. You can override
4998	# by either setting the environment variable LT_MULTI_MODULE
4999	# non-empty at configure time, or by adding -multi_module to the
5000	# link flags.
5001	rm -rf libconftest.dylib*
5002	echo "int foo(void){return 1;}" > conftest.c
5003	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
5004-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
5005	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
5006	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
5007        _lt_result=$?
5008	# If there is a non-empty error log, and "single_module"
5009	# appears in it, assume the flag caused a linker warning
5010        if test -s conftest.err && $GREP single_module conftest.err; then
5011	  cat conftest.err >&AS_MESSAGE_LOG_FD
5012	# Otherwise, if the output was created with a 0 exit code from
5013	# the compiler, it worked.
5014	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
5015	  lt_cv_apple_cc_single_mod=yes
5016	else
5017	  cat conftest.err >&AS_MESSAGE_LOG_FD
5018	fi
5019	rm -rf libconftest.dylib*
5020	rm -f conftest.*
5021      fi])
5022
5023    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
5024      [lt_cv_ld_exported_symbols_list],
5025      [lt_cv_ld_exported_symbols_list=no
5026      save_LDFLAGS=$LDFLAGS
5027      echo "_main" > conftest.sym
5028      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
5029      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
5030	[lt_cv_ld_exported_symbols_list=yes],
5031	[lt_cv_ld_exported_symbols_list=no])
5032	LDFLAGS=$save_LDFLAGS
5033    ])
5034
5035    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
5036      [lt_cv_ld_force_load=no
5037      cat > conftest.c << _LT_EOF
5038int forced_loaded() { return 2;}
5039_LT_EOF
5040      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
5041      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
5042      echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
5043      $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
5044      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
5045      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
5046      cat > conftest.c << _LT_EOF
5047int main() { return 0;}
5048_LT_EOF
5049      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
5050      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
5051      _lt_result=$?
5052      if test -s conftest.err && $GREP force_load conftest.err; then
5053	cat conftest.err >&AS_MESSAGE_LOG_FD
5054      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
5055	lt_cv_ld_force_load=yes
5056      else
5057	cat conftest.err >&AS_MESSAGE_LOG_FD
5058      fi
5059        rm -f conftest.err libconftest.a conftest conftest.c
5060        rm -rf conftest.dSYM
5061    ])
5062    case $host_os in
5063    rhapsody* | darwin1.[[012]])
5064      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
5065    darwin1.*)
5066      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
5067    darwin*)
5068      case $MACOSX_DEPLOYMENT_TARGET,$host in
5069        10.[[012]],*|,*powerpc*-darwin[[5-8]]*)
5070          _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
5071        *)
5072          _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
5073      esac
5074    ;;
5075  esac
5076    if test yes = "$lt_cv_apple_cc_single_mod"; then
5077      _lt_dar_single_mod='$single_module'
5078    fi
5079    if test yes = "$lt_cv_ld_exported_symbols_list"; then
5080      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
5081    else
5082      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
5083    fi
5084    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
5085      _lt_dsymutil='~$DSYMUTIL $lib || :'
5086    else
5087      _lt_dsymutil=
5088    fi
5089    ;;
5090  esac
5091])
5092
5093
5094# _LT_DARWIN_LINKER_FEATURES([TAG])
5095# ---------------------------------
5096# Checks for linker and compiler features on darwin
5097m4_defun([_LT_DARWIN_LINKER_FEATURES],
5098[
5099  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
5100  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5101  _LT_TAGVAR(hardcode_direct, $1)=no
5102  _LT_TAGVAR(hardcode_automatic, $1)=yes
5103  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5104  if test yes = "$lt_cv_ld_force_load"; then
5105    _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\"`'
5106    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
5107                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
5108  else
5109    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
5110  fi
5111  _LT_TAGVAR(link_all_deplibs, $1)=yes
5112  _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
5113  case $cc_basename in
5114     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
5115     *) _lt_dar_can_shared=$GCC ;;
5116  esac
5117  if test yes = "$_lt_dar_can_shared"; then
5118    output_verbose_link_cmd=func_echo_all
5119    _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"
5120    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
5121    _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"
5122    _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"
5123    m4_if([$1], [CXX],
5124[   if test yes != "$lt_cv_apple_cc_single_mod"; then
5125      _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"
5126      _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"
5127    fi
5128],[])
5129  else
5130  _LT_TAGVAR(ld_shlibs, $1)=no
5131  fi
5132])
5133
5134# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
5135# ----------------------------------
5136# Links a minimal program and checks the executable
5137# for the system default hardcoded library path. In most cases,
5138# this is /usr/lib:/lib, but when the MPI compilers are used
5139# the location of the communication and MPI libs are included too.
5140# If we don't find anything, use the default library path according
5141# to the aix ld manual.
5142# Store the results from the different compilers for each TAGNAME.
5143# Allow to override them for all tags through lt_cv_aix_libpath.
5144m4_defun([_LT_SYS_MODULE_PATH_AIX],
5145[m4_require([_LT_DECL_SED])dnl
5146if test set = "${lt_cv_aix_libpath+set}"; then
5147  aix_libpath=$lt_cv_aix_libpath
5148else
5149  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
5150  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
5151  lt_aix_libpath_sed='[
5152      /Import File Strings/,/^$/ {
5153	  /^0/ {
5154	      s/^0  *\([^ ]*\) *$/\1/
5155	      p
5156	  }
5157      }]'
5158  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
5159  # Check for a 64-bit object if we didn't find anything.
5160  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
5161    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
5162  fi],[])
5163  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
5164    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
5165  fi
5166  ])
5167  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
5168fi
5169])# _LT_SYS_MODULE_PATH_AIX
5170
5171
5172# _LT_SHELL_INIT(ARG)
5173# -------------------
5174m4_define([_LT_SHELL_INIT],
5175[m4_divert_text([M4SH-INIT], [$1
5176])])# _LT_SHELL_INIT
5177
5178
5179
5180# _LT_PROG_ECHO_BACKSLASH
5181# -----------------------
5182# Find how we can fake an echo command that does not interpret backslash.
5183# In particular, with Autoconf 2.60 or later we add some code to the start
5184# of the generated configure script that will find a shell with a builtin
5185# printf (that we can use as an echo command).
5186m4_defun([_LT_PROG_ECHO_BACKSLASH],
5187[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
5188ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
5189ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
5190
5191AC_MSG_CHECKING([how to print strings])
5192# Test print first, because it will be a builtin if present.
5193if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
5194   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
5195  ECHO='print -r --'
5196elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
5197  ECHO='printf %s\n'
5198else
5199  # Use this function as a fallback that always works.
5200  func_fallback_echo ()
5201  {
5202    eval 'cat <<_LTECHO_EOF
5203$[]1
5204_LTECHO_EOF'
5205  }
5206  ECHO='func_fallback_echo'
5207fi
5208
5209# func_echo_all arg...
5210# Invoke $ECHO with all args, space-separated.
5211func_echo_all ()
5212{
5213    $ECHO "$*"
5214}
5215
5216case $ECHO in
5217  printf*) AC_MSG_RESULT([printf]) ;;
5218  print*) AC_MSG_RESULT([print -r]) ;;
5219  *) AC_MSG_RESULT([cat]) ;;
5220esac
5221
5222m4_ifdef([_AS_DETECT_SUGGESTED],
5223[_AS_DETECT_SUGGESTED([
5224  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
5225    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
5226    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
5227    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
5228    PATH=/empty FPATH=/empty; export PATH FPATH
5229    test "X`printf %s $ECHO`" = "X$ECHO" \
5230      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
5231
5232_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
5233_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
5234])# _LT_PROG_ECHO_BACKSLASH
5235
5236
5237# _LT_WITH_SYSROOT
5238# ----------------
5239AC_DEFUN([_LT_WITH_SYSROOT],
5240[m4_require([_LT_DECL_SED])dnl
5241AC_MSG_CHECKING([for sysroot])
5242AC_ARG_WITH([sysroot],
5243[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
5244  [Search for dependent libraries within DIR (or the compiler's sysroot
5245   if not specified).])],
5246[], [with_sysroot=no])
5247
5248dnl lt_sysroot will always be passed unquoted.  We quote it here
5249dnl in case the user passed a directory name.
5250lt_sysroot=
5251case $with_sysroot in #(
5252 yes)
5253   if test yes = "$GCC"; then
5254     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
5255   fi
5256   ;; #(
5257 /*)
5258   lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"`
5259   ;; #(
5260 no|'')
5261   ;; #(
5262 *)
5263   AC_MSG_RESULT([$with_sysroot])
5264   AC_MSG_ERROR([The sysroot must be an absolute path.])
5265   ;;
5266esac
5267
5268 AC_MSG_RESULT([${lt_sysroot:-no}])
5269_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
5270[dependent libraries, and where our libraries should be installed.])])
5271
5272# _LT_ENABLE_LOCK
5273# ---------------
5274m4_defun([_LT_ENABLE_LOCK],
5275[AC_ARG_ENABLE([libtool-lock],
5276  [AS_HELP_STRING([--disable-libtool-lock],
5277    [avoid locking (might break parallel builds)])])
5278test no = "$enable_libtool_lock" || enable_libtool_lock=yes
5279
5280# Some flags need to be propagated to the compiler or linker for good
5281# libtool support.
5282case $host in
5283ia64-*-hpux*)
5284  # Find out what ABI is being produced by ac_compile, and set mode
5285  # options accordingly.
5286  echo 'int i;' > conftest.$ac_ext
5287  if AC_TRY_EVAL(ac_compile); then
5288    case `$FILECMD conftest.$ac_objext` in
5289      *ELF-32*)
5290	HPUX_IA64_MODE=32
5291	;;
5292      *ELF-64*)
5293	HPUX_IA64_MODE=64
5294	;;
5295    esac
5296  fi
5297  rm -rf conftest*
5298  ;;
5299*-*-irix6*)
5300  # Find out what ABI is being produced by ac_compile, and set linker
5301  # options accordingly.
5302  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
5303  if AC_TRY_EVAL(ac_compile); then
5304    if test yes = "$lt_cv_prog_gnu_ld"; then
5305      case `$FILECMD conftest.$ac_objext` in
5306	*32-bit*)
5307	  LD="${LD-ld} -melf32bsmip"
5308	  ;;
5309	*N32*)
5310	  LD="${LD-ld} -melf32bmipn32"
5311	  ;;
5312	*64-bit*)
5313	  LD="${LD-ld} -melf64bmip"
5314	;;
5315      esac
5316    else
5317      case `$FILECMD conftest.$ac_objext` in
5318	*32-bit*)
5319	  LD="${LD-ld} -32"
5320	  ;;
5321	*N32*)
5322	  LD="${LD-ld} -n32"
5323	  ;;
5324	*64-bit*)
5325	  LD="${LD-ld} -64"
5326	  ;;
5327      esac
5328    fi
5329  fi
5330  rm -rf conftest*
5331  ;;
5332
5333mips64*-*linux*)
5334  # Find out what ABI is being produced by ac_compile, and set linker
5335  # options accordingly.
5336  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
5337  if AC_TRY_EVAL(ac_compile); then
5338    emul=elf
5339    case `$FILECMD conftest.$ac_objext` in
5340      *32-bit*)
5341	emul="${emul}32"
5342	;;
5343      *64-bit*)
5344	emul="${emul}64"
5345	;;
5346    esac
5347    case `$FILECMD conftest.$ac_objext` in
5348      *MSB*)
5349	emul="${emul}btsmip"
5350	;;
5351      *LSB*)
5352	emul="${emul}ltsmip"
5353	;;
5354    esac
5355    case `$FILECMD conftest.$ac_objext` in
5356      *N32*)
5357	emul="${emul}n32"
5358	;;
5359    esac
5360    LD="${LD-ld} -m $emul"
5361  fi
5362  rm -rf conftest*
5363  ;;
5364
5365x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
5366s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
5367  # Find out what ABI is being produced by ac_compile, and set linker
5368  # options accordingly.  Note that the listed cases only cover the
5369  # situations where additional linker options are needed (such as when
5370  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
5371  # vice versa); the common cases where no linker options are needed do
5372  # not appear in the list.
5373  echo 'int i;' > conftest.$ac_ext
5374  if AC_TRY_EVAL(ac_compile); then
5375    case `$FILECMD conftest.o` in
5376      *32-bit*)
5377	case $host in
5378	  x86_64-*kfreebsd*-gnu)
5379	    LD="${LD-ld} -m elf_i386_fbsd"
5380	    ;;
5381	  x86_64-*linux*)
5382	    case `$FILECMD conftest.o` in
5383	      *x86-64*)
5384		LD="${LD-ld} -m elf32_x86_64"
5385		;;
5386	      *)
5387		LD="${LD-ld} -m elf_i386"
5388		;;
5389	    esac
5390	    ;;
5391	  powerpc64le-*linux*)
5392	    LD="${LD-ld} -m elf32lppclinux"
5393	    ;;
5394	  powerpc64-*linux*)
5395	    LD="${LD-ld} -m elf32ppclinux"
5396	    ;;
5397	  s390x-*linux*)
5398	    LD="${LD-ld} -m elf_s390"
5399	    ;;
5400	  sparc64-*linux*)
5401	    LD="${LD-ld} -m elf32_sparc"
5402	    ;;
5403	esac
5404	;;
5405      *64-bit*)
5406	case $host in
5407	  x86_64-*kfreebsd*-gnu)
5408	    LD="${LD-ld} -m elf_x86_64_fbsd"
5409	    ;;
5410	  x86_64-*linux*)
5411	    LD="${LD-ld} -m elf_x86_64"
5412	    ;;
5413	  powerpcle-*linux*)
5414	    LD="${LD-ld} -m elf64lppc"
5415	    ;;
5416	  powerpc-*linux*)
5417	    LD="${LD-ld} -m elf64ppc"
5418	    ;;
5419	  s390*-*linux*|s390*-*tpf*)
5420	    LD="${LD-ld} -m elf64_s390"
5421	    ;;
5422	  sparc*-*linux*)
5423	    LD="${LD-ld} -m elf64_sparc"
5424	    ;;
5425	esac
5426	;;
5427    esac
5428  fi
5429  rm -rf conftest*
5430  ;;
5431
5432*-*-sco3.2v5*)
5433  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
5434  SAVE_CFLAGS=$CFLAGS
5435  CFLAGS="$CFLAGS -belf"
5436  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
5437    [AC_LANG_PUSH(C)
5438     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
5439     AC_LANG_POP])
5440  if test yes != "$lt_cv_cc_needs_belf"; then
5441    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
5442    CFLAGS=$SAVE_CFLAGS
5443  fi
5444  ;;
5445*-*solaris*)
5446  # Find out what ABI is being produced by ac_compile, and set linker
5447  # options accordingly.
5448  echo 'int i;' > conftest.$ac_ext
5449  if AC_TRY_EVAL(ac_compile); then
5450    case `$FILECMD conftest.o` in
5451    *64-bit*)
5452      case $lt_cv_prog_gnu_ld in
5453      yes*)
5454        case $host in
5455        i?86-*-solaris*|x86_64-*-solaris*)
5456          LD="${LD-ld} -m elf_x86_64"
5457          ;;
5458        sparc*-*-solaris*)
5459          LD="${LD-ld} -m elf64_sparc"
5460          ;;
5461        esac
5462        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
5463        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
5464          LD=${LD-ld}_sol2
5465        fi
5466        ;;
5467      *)
5468	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
5469	  LD="${LD-ld} -64"
5470	fi
5471	;;
5472      esac
5473      ;;
5474    esac
5475  fi
5476  rm -rf conftest*
5477  ;;
5478esac
5479
5480need_locks=$enable_libtool_lock
5481])# _LT_ENABLE_LOCK
5482
5483
5484# _LT_PROG_AR
5485# -----------
5486m4_defun([_LT_PROG_AR],
5487[AC_CHECK_TOOLS(AR, [ar], false)
5488: ${AR=ar}
5489_LT_DECL([], [AR], [1], [The archiver])
5490
5491# Use ARFLAGS variable as AR's operation code to sync the variable naming with
5492# Automake.  If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
5493# higher priority because thats what people were doing historically (setting
5494# ARFLAGS for automake and AR_FLAGS for libtool).  FIXME: Make the AR_FLAGS
5495# variable obsoleted/removed.
5496
5497test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
5498lt_ar_flags=$AR_FLAGS
5499_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)])
5500
5501# Make AR_FLAGS overridable by 'make ARFLAGS='.  Don't try to run-time override
5502# by AR_FLAGS because that was never working and AR_FLAGS is about to die.
5503_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}],
5504         [Flags to create an archive])
5505
5506AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
5507  [lt_cv_ar_at_file=no
5508   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
5509     [echo conftest.$ac_objext > conftest.lst
5510      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
5511      AC_TRY_EVAL([lt_ar_try])
5512      if test 0 -eq "$ac_status"; then
5513	# Ensure the archiver fails upon bogus file names.
5514	rm -f conftest.$ac_objext libconftest.a
5515	AC_TRY_EVAL([lt_ar_try])
5516	if test 0 -ne "$ac_status"; then
5517          lt_cv_ar_at_file=@
5518        fi
5519      fi
5520      rm -f conftest.* libconftest.a
5521     ])
5522  ])
5523
5524if test no = "$lt_cv_ar_at_file"; then
5525  archiver_list_spec=
5526else
5527  archiver_list_spec=$lt_cv_ar_at_file
5528fi
5529_LT_DECL([], [archiver_list_spec], [1],
5530  [How to feed a file listing to the archiver])
5531])# _LT_PROG_AR
5532
5533
5534# _LT_CMD_OLD_ARCHIVE
5535# -------------------
5536m4_defun([_LT_CMD_OLD_ARCHIVE],
5537[_LT_PROG_AR
5538
5539AC_CHECK_TOOL(STRIP, strip, :)
5540test -z "$STRIP" && STRIP=:
5541_LT_DECL([], [STRIP], [1], [A symbol stripping program])
5542
5543AC_CHECK_TOOL(RANLIB, ranlib, :)
5544test -z "$RANLIB" && RANLIB=:
5545_LT_DECL([], [RANLIB], [1],
5546    [Commands used to install an old-style archive])
5547
5548# Determine commands to create old-style static archives.
5549old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
5550old_postinstall_cmds='chmod 644 $oldlib'
5551old_postuninstall_cmds=
5552
5553if test -n "$RANLIB"; then
5554  case $host_os in
5555  bitrig* | openbsd*)
5556    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
5557    ;;
5558  *)
5559    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
5560    ;;
5561  esac
5562  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
5563fi
5564
5565case $host_os in
5566  darwin*)
5567    lock_old_archive_extraction=yes ;;
5568  *)
5569    lock_old_archive_extraction=no ;;
5570esac
5571_LT_DECL([], [old_postinstall_cmds], [2])
5572_LT_DECL([], [old_postuninstall_cmds], [2])
5573_LT_TAGDECL([], [old_archive_cmds], [2],
5574    [Commands used to build an old-style archive])
5575_LT_DECL([], [lock_old_archive_extraction], [0],
5576    [Whether to use a lock for old archive extraction])
5577])# _LT_CMD_OLD_ARCHIVE
5578
5579
5580# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
5581#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
5582# ----------------------------------------------------------------
5583# Check whether the given compiler option works
5584AC_DEFUN([_LT_COMPILER_OPTION],
5585[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5586m4_require([_LT_DECL_SED])dnl
5587AC_CACHE_CHECK([$1], [$2],
5588  [$2=no
5589   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
5590   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5591   lt_compiler_flag="$3"  ## exclude from sc_useless_quotes_in_assignment
5592   # Insert the option either (1) after the last *FLAGS variable, or
5593   # (2) before a word containing "conftest.", or (3) at the end.
5594   # Note that $ac_compile itself does not contain backslashes and begins
5595   # with a dollar sign (not a hyphen), so the echo should work correctly.
5596   # The option is referenced via a variable to avoid confusing sed.
5597   lt_compile=`echo "$ac_compile" | $SED \
5598   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
5599   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
5600   -e 's:$: $lt_compiler_flag:'`
5601   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
5602   (eval "$lt_compile" 2>conftest.err)
5603   ac_status=$?
5604   cat conftest.err >&AS_MESSAGE_LOG_FD
5605   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
5606   if (exit $ac_status) && test -s "$ac_outfile"; then
5607     # The compiler can only warn and ignore the option if not recognized
5608     # So say no if there are warnings other than the usual output.
5609     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
5610     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
5611     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
5612       $2=yes
5613     fi
5614   fi
5615   $RM conftest*
5616])
5617
5618if test yes = "[$]$2"; then
5619    m4_if([$5], , :, [$5])
5620else
5621    m4_if([$6], , :, [$6])
5622fi
5623])# _LT_COMPILER_OPTION
5624
5625# Old name:
5626AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
5627dnl aclocal-1.4 backwards compatibility:
5628dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
5629
5630
5631# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
5632#                  [ACTION-SUCCESS], [ACTION-FAILURE])
5633# ----------------------------------------------------
5634# Check whether the given linker option works
5635AC_DEFUN([_LT_LINKER_OPTION],
5636[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5637m4_require([_LT_DECL_SED])dnl
5638AC_CACHE_CHECK([$1], [$2],
5639  [$2=no
5640   save_LDFLAGS=$LDFLAGS
5641   LDFLAGS="$LDFLAGS $3"
5642   echo "$lt_simple_link_test_code" > conftest.$ac_ext
5643   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
5644     # The linker can only warn and ignore the option if not recognized
5645     # So say no if there are warnings
5646     if test -s conftest.err; then
5647       # Append any errors to the config.log.
5648       cat conftest.err 1>&AS_MESSAGE_LOG_FD
5649       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
5650       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
5651       if diff conftest.exp conftest.er2 >/dev/null; then
5652         $2=yes
5653       fi
5654     else
5655       $2=yes
5656     fi
5657   fi
5658   $RM -r conftest*
5659   LDFLAGS=$save_LDFLAGS
5660])
5661
5662if test yes = "[$]$2"; then
5663    m4_if([$4], , :, [$4])
5664else
5665    m4_if([$5], , :, [$5])
5666fi
5667])# _LT_LINKER_OPTION
5668
5669# Old name:
5670AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
5671dnl aclocal-1.4 backwards compatibility:
5672dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
5673
5674
5675# LT_CMD_MAX_LEN
5676#---------------
5677AC_DEFUN([LT_CMD_MAX_LEN],
5678[AC_REQUIRE([AC_CANONICAL_HOST])dnl
5679# find the maximum length of command line arguments
5680AC_MSG_CHECKING([the maximum length of command line arguments])
5681AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
5682  i=0
5683  teststring=ABCD
5684
5685  case $build_os in
5686  msdosdjgpp*)
5687    # On DJGPP, this test can blow up pretty badly due to problems in libc
5688    # (any single argument exceeding 2000 bytes causes a buffer overrun
5689    # during glob expansion).  Even if it were fixed, the result of this
5690    # check would be larger than it should be.
5691    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
5692    ;;
5693
5694  gnu*)
5695    # Under GNU Hurd, this test is not required because there is
5696    # no limit to the length of command line arguments.
5697    # Libtool will interpret -1 as no limit whatsoever
5698    lt_cv_sys_max_cmd_len=-1;
5699    ;;
5700
5701  cygwin* | mingw* | cegcc*)
5702    # On Win9x/ME, this test blows up -- it succeeds, but takes
5703    # about 5 minutes as the teststring grows exponentially.
5704    # Worse, since 9x/ME are not pre-emptively multitasking,
5705    # you end up with a "frozen" computer, even though with patience
5706    # the test eventually succeeds (with a max line length of 256k).
5707    # Instead, let's just punt: use the minimum linelength reported by
5708    # all of the supported platforms: 8192 (on NT/2K/XP).
5709    lt_cv_sys_max_cmd_len=8192;
5710    ;;
5711
5712  mint*)
5713    # On MiNT this can take a long time and run out of memory.
5714    lt_cv_sys_max_cmd_len=8192;
5715    ;;
5716
5717  amigaos*)
5718    # On AmigaOS with pdksh, this test takes hours, literally.
5719    # So we just punt and use a minimum line length of 8192.
5720    lt_cv_sys_max_cmd_len=8192;
5721    ;;
5722
5723  bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
5724    # This has been around since 386BSD, at least.  Likely further.
5725    if test -x /sbin/sysctl; then
5726      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
5727    elif test -x /usr/sbin/sysctl; then
5728      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
5729    else
5730      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
5731    fi
5732    # And add a safety zone
5733    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
5734    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
5735    ;;
5736
5737  interix*)
5738    # We know the value 262144 and hardcode it with a safety zone (like BSD)
5739    lt_cv_sys_max_cmd_len=196608
5740    ;;
5741
5742  os2*)
5743    # The test takes a long time on OS/2.
5744    lt_cv_sys_max_cmd_len=8192
5745    ;;
5746
5747  osf*)
5748    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
5749    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
5750    # nice to cause kernel panics so lets avoid the loop below.
5751    # First set a reasonable default.
5752    lt_cv_sys_max_cmd_len=16384
5753    #
5754    if test -x /sbin/sysconfig; then
5755      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
5756        *1*) lt_cv_sys_max_cmd_len=-1 ;;
5757      esac
5758    fi
5759    ;;
5760  sco3.2v5*)
5761    lt_cv_sys_max_cmd_len=102400
5762    ;;
5763  sysv5* | sco5v6* | sysv4.2uw2*)
5764    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
5765    if test -n "$kargmax"; then
5766      lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[	 ]]//'`
5767    else
5768      lt_cv_sys_max_cmd_len=32768
5769    fi
5770    ;;
5771  *)
5772    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
5773    if test -n "$lt_cv_sys_max_cmd_len" && \
5774       test undefined != "$lt_cv_sys_max_cmd_len"; then
5775      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
5776      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
5777    else
5778      # Make teststring a little bigger before we do anything with it.
5779      # a 1K string should be a reasonable start.
5780      for i in 1 2 3 4 5 6 7 8; do
5781        teststring=$teststring$teststring
5782      done
5783      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
5784      # If test is not a shell built-in, we'll probably end up computing a
5785      # maximum length that is only half of the actual maximum length, but
5786      # we can't tell.
5787      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
5788	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
5789	      test 17 != "$i" # 1/2 MB should be enough
5790      do
5791        i=`expr $i + 1`
5792        teststring=$teststring$teststring
5793      done
5794      # Only check the string length outside the loop.
5795      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
5796      teststring=
5797      # Add a significant safety factor because C++ compilers can tack on
5798      # massive amounts of additional arguments before passing them to the
5799      # linker.  It appears as though 1/2 is a usable value.
5800      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
5801    fi
5802    ;;
5803  esac
5804])
5805if test -n "$lt_cv_sys_max_cmd_len"; then
5806  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
5807else
5808  AC_MSG_RESULT(none)
5809fi
5810max_cmd_len=$lt_cv_sys_max_cmd_len
5811_LT_DECL([], [max_cmd_len], [0],
5812    [What is the maximum length of a command?])
5813])# LT_CMD_MAX_LEN
5814
5815# Old name:
5816AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
5817dnl aclocal-1.4 backwards compatibility:
5818dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
5819
5820
5821# _LT_HEADER_DLFCN
5822# ----------------
5823m4_defun([_LT_HEADER_DLFCN],
5824[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
5825])# _LT_HEADER_DLFCN
5826
5827
5828# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
5829#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
5830# ----------------------------------------------------------------
5831m4_defun([_LT_TRY_DLOPEN_SELF],
5832[m4_require([_LT_HEADER_DLFCN])dnl
5833if test yes = "$cross_compiling"; then :
5834  [$4]
5835else
5836  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
5837  lt_status=$lt_dlunknown
5838  cat > conftest.$ac_ext <<_LT_EOF
5839[#line $LINENO "configure"
5840#include "confdefs.h"
5841
5842#if HAVE_DLFCN_H
5843#include <dlfcn.h>
5844#endif
5845
5846#include <stdio.h>
5847
5848#ifdef RTLD_GLOBAL
5849#  define LT_DLGLOBAL		RTLD_GLOBAL
5850#else
5851#  ifdef DL_GLOBAL
5852#    define LT_DLGLOBAL		DL_GLOBAL
5853#  else
5854#    define LT_DLGLOBAL		0
5855#  endif
5856#endif
5857
5858/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
5859   find out it does not work in some platform. */
5860#ifndef LT_DLLAZY_OR_NOW
5861#  ifdef RTLD_LAZY
5862#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
5863#  else
5864#    ifdef DL_LAZY
5865#      define LT_DLLAZY_OR_NOW		DL_LAZY
5866#    else
5867#      ifdef RTLD_NOW
5868#        define LT_DLLAZY_OR_NOW	RTLD_NOW
5869#      else
5870#        ifdef DL_NOW
5871#          define LT_DLLAZY_OR_NOW	DL_NOW
5872#        else
5873#          define LT_DLLAZY_OR_NOW	0
5874#        endif
5875#      endif
5876#    endif
5877#  endif
5878#endif
5879
5880/* When -fvisibility=hidden is used, assume the code has been annotated
5881   correspondingly for the symbols needed.  */
5882#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
5883int fnord () __attribute__((visibility("default")));
5884#endif
5885
5886int fnord () { return 42; }
5887int main ()
5888{
5889  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
5890  int status = $lt_dlunknown;
5891
5892  if (self)
5893    {
5894      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
5895      else
5896        {
5897	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
5898          else puts (dlerror ());
5899	}
5900      /* dlclose (self); */
5901    }
5902  else
5903    puts (dlerror ());
5904
5905  return status;
5906}]
5907_LT_EOF
5908  if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
5909    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
5910    lt_status=$?
5911    case x$lt_status in
5912      x$lt_dlno_uscore) $1 ;;
5913      x$lt_dlneed_uscore) $2 ;;
5914      x$lt_dlunknown|x*) $3 ;;
5915    esac
5916  else :
5917    # compilation failed
5918    $3
5919  fi
5920fi
5921rm -fr conftest*
5922])# _LT_TRY_DLOPEN_SELF
5923
5924
5925# LT_SYS_DLOPEN_SELF
5926# ------------------
5927AC_DEFUN([LT_SYS_DLOPEN_SELF],
5928[m4_require([_LT_HEADER_DLFCN])dnl
5929if test yes != "$enable_dlopen"; then
5930  enable_dlopen=unknown
5931  enable_dlopen_self=unknown
5932  enable_dlopen_self_static=unknown
5933else
5934  lt_cv_dlopen=no
5935  lt_cv_dlopen_libs=
5936
5937  case $host_os in
5938  beos*)
5939    lt_cv_dlopen=load_add_on
5940    lt_cv_dlopen_libs=
5941    lt_cv_dlopen_self=yes
5942    ;;
5943
5944  mingw* | pw32* | cegcc*)
5945    lt_cv_dlopen=LoadLibrary
5946    lt_cv_dlopen_libs=
5947    ;;
5948
5949  cygwin*)
5950    lt_cv_dlopen=dlopen
5951    lt_cv_dlopen_libs=
5952    ;;
5953
5954  darwin*)
5955    # if libdl is installed we need to link against it
5956    AC_CHECK_LIB([dl], [dlopen],
5957		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
5958    lt_cv_dlopen=dyld
5959    lt_cv_dlopen_libs=
5960    lt_cv_dlopen_self=yes
5961    ])
5962    ;;
5963
5964  tpf*)
5965    # Don't try to run any link tests for TPF.  We know it's impossible
5966    # because TPF is a cross-compiler, and we know how we open DSOs.
5967    lt_cv_dlopen=dlopen
5968    lt_cv_dlopen_libs=
5969    lt_cv_dlopen_self=no
5970    ;;
5971
5972  *)
5973    AC_CHECK_FUNC([shl_load],
5974	  [lt_cv_dlopen=shl_load],
5975      [AC_CHECK_LIB([dld], [shl_load],
5976	    [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
5977	[AC_CHECK_FUNC([dlopen],
5978	      [lt_cv_dlopen=dlopen],
5979	  [AC_CHECK_LIB([dl], [dlopen],
5980		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
5981	    [AC_CHECK_LIB([svld], [dlopen],
5982		  [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
5983	      [AC_CHECK_LIB([dld], [dld_link],
5984		    [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
5985	      ])
5986	    ])
5987	  ])
5988	])
5989      ])
5990    ;;
5991  esac
5992
5993  if test no = "$lt_cv_dlopen"; then
5994    enable_dlopen=no
5995  else
5996    enable_dlopen=yes
5997  fi
5998
5999  case $lt_cv_dlopen in
6000  dlopen)
6001    save_CPPFLAGS=$CPPFLAGS
6002    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6003
6004    save_LDFLAGS=$LDFLAGS
6005    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6006
6007    save_LIBS=$LIBS
6008    LIBS="$lt_cv_dlopen_libs $LIBS"
6009
6010    AC_CACHE_CHECK([whether a program can dlopen itself],
6011	  lt_cv_dlopen_self, [dnl
6012	  _LT_TRY_DLOPEN_SELF(
6013	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
6014	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
6015    ])
6016
6017    if test yes = "$lt_cv_dlopen_self"; then
6018      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
6019      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
6020	  lt_cv_dlopen_self_static, [dnl
6021	  _LT_TRY_DLOPEN_SELF(
6022	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
6023	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
6024      ])
6025    fi
6026
6027    CPPFLAGS=$save_CPPFLAGS
6028    LDFLAGS=$save_LDFLAGS
6029    LIBS=$save_LIBS
6030    ;;
6031  esac
6032
6033  case $lt_cv_dlopen_self in
6034  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
6035  *) enable_dlopen_self=unknown ;;
6036  esac
6037
6038  case $lt_cv_dlopen_self_static in
6039  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
6040  *) enable_dlopen_self_static=unknown ;;
6041  esac
6042fi
6043_LT_DECL([dlopen_support], [enable_dlopen], [0],
6044	 [Whether dlopen is supported])
6045_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
6046	 [Whether dlopen of programs is supported])
6047_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
6048	 [Whether dlopen of statically linked programs is supported])
6049])# LT_SYS_DLOPEN_SELF
6050
6051# Old name:
6052AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
6053dnl aclocal-1.4 backwards compatibility:
6054dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
6055
6056
6057# _LT_COMPILER_C_O([TAGNAME])
6058# ---------------------------
6059# Check to see if options -c and -o are simultaneously supported by compiler.
6060# This macro does not hard code the compiler like AC_PROG_CC_C_O.
6061m4_defun([_LT_COMPILER_C_O],
6062[m4_require([_LT_DECL_SED])dnl
6063m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6064m4_require([_LT_TAG_COMPILER])dnl
6065AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
6066  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
6067  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
6068   $RM -r conftest 2>/dev/null
6069   mkdir conftest
6070   cd conftest
6071   mkdir out
6072   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6073
6074   lt_compiler_flag="-o out/conftest2.$ac_objext"
6075   # Insert the option either (1) after the last *FLAGS variable, or
6076   # (2) before a word containing "conftest.", or (3) at the end.
6077   # Note that $ac_compile itself does not contain backslashes and begins
6078   # with a dollar sign (not a hyphen), so the echo should work correctly.
6079   lt_compile=`echo "$ac_compile" | $SED \
6080   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
6081   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
6082   -e 's:$: $lt_compiler_flag:'`
6083   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
6084   (eval "$lt_compile" 2>out/conftest.err)
6085   ac_status=$?
6086   cat out/conftest.err >&AS_MESSAGE_LOG_FD
6087   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
6088   if (exit $ac_status) && test -s out/conftest2.$ac_objext
6089   then
6090     # The compiler can only warn and ignore the option if not recognized
6091     # So say no if there are warnings
6092     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
6093     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
6094     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
6095       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
6096     fi
6097   fi
6098   chmod u+w . 2>&AS_MESSAGE_LOG_FD
6099   $RM conftest*
6100   # SGI C++ compiler will create directory out/ii_files/ for
6101   # template instantiation
6102   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
6103   $RM out/* && rmdir out
6104   cd ..
6105   $RM -r conftest
6106   $RM conftest*
6107])
6108_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
6109	[Does compiler simultaneously support -c and -o options?])
6110])# _LT_COMPILER_C_O
6111
6112
6113# _LT_COMPILER_FILE_LOCKS([TAGNAME])
6114# ----------------------------------
6115# Check to see if we can do hard links to lock some files if needed
6116m4_defun([_LT_COMPILER_FILE_LOCKS],
6117[m4_require([_LT_ENABLE_LOCK])dnl
6118m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6119_LT_COMPILER_C_O([$1])
6120
6121hard_links=nottested
6122if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
6123  # do not overwrite the value of need_locks provided by the user
6124  AC_MSG_CHECKING([if we can lock with hard links])
6125  hard_links=yes
6126  $RM conftest*
6127  ln conftest.a conftest.b 2>/dev/null && hard_links=no
6128  touch conftest.a
6129  ln conftest.a conftest.b 2>&5 || hard_links=no
6130  ln conftest.a conftest.b 2>/dev/null && hard_links=no
6131  AC_MSG_RESULT([$hard_links])
6132  if test no = "$hard_links"; then
6133    AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
6134    need_locks=warn
6135  fi
6136else
6137  need_locks=no
6138fi
6139_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
6140])# _LT_COMPILER_FILE_LOCKS
6141
6142
6143# _LT_CHECK_OBJDIR
6144# ----------------
6145m4_defun([_LT_CHECK_OBJDIR],
6146[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
6147[rm -f .libs 2>/dev/null
6148mkdir .libs 2>/dev/null
6149if test -d .libs; then
6150  lt_cv_objdir=.libs
6151else
6152  # MS-DOS does not allow filenames that begin with a dot.
6153  lt_cv_objdir=_libs
6154fi
6155rmdir .libs 2>/dev/null])
6156objdir=$lt_cv_objdir
6157_LT_DECL([], [objdir], [0],
6158         [The name of the directory that contains temporary libtool files])dnl
6159m4_pattern_allow([LT_OBJDIR])dnl
6160AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
6161  [Define to the sub-directory where libtool stores uninstalled libraries.])
6162])# _LT_CHECK_OBJDIR
6163
6164
6165# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
6166# --------------------------------------
6167# Check hardcoding attributes.
6168m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
6169[AC_MSG_CHECKING([how to hardcode library paths into programs])
6170_LT_TAGVAR(hardcode_action, $1)=
6171if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
6172   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
6173   test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
6174
6175  # We can hardcode non-existent directories.
6176  if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
6177     # If the only mechanism to avoid hardcoding is shlibpath_var, we
6178     # have to relink, otherwise we might link with an installed library
6179     # when we should be linking with a yet-to-be-installed one
6180     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
6181     test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
6182    # Linking always hardcodes the temporary library directory.
6183    _LT_TAGVAR(hardcode_action, $1)=relink
6184  else
6185    # We can link without hardcoding, and we can hardcode nonexisting dirs.
6186    _LT_TAGVAR(hardcode_action, $1)=immediate
6187  fi
6188else
6189  # We cannot hardcode anything, or else we can only hardcode existing
6190  # directories.
6191  _LT_TAGVAR(hardcode_action, $1)=unsupported
6192fi
6193AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
6194
6195if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
6196   test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
6197  # Fast installation is not supported
6198  enable_fast_install=no
6199elif test yes = "$shlibpath_overrides_runpath" ||
6200     test no = "$enable_shared"; then
6201  # Fast installation is not necessary
6202  enable_fast_install=needless
6203fi
6204_LT_TAGDECL([], [hardcode_action], [0],
6205    [How to hardcode a shared library path into an executable])
6206])# _LT_LINKER_HARDCODE_LIBPATH
6207
6208
6209# _LT_CMD_STRIPLIB
6210# ----------------
6211m4_defun([_LT_CMD_STRIPLIB],
6212[m4_require([_LT_DECL_EGREP])
6213striplib=
6214old_striplib=
6215AC_MSG_CHECKING([whether stripping libraries is possible])
6216if test -z "$STRIP"; then
6217  AC_MSG_RESULT([no])
6218else
6219  if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
6220    old_striplib="$STRIP --strip-debug"
6221    striplib="$STRIP --strip-unneeded"
6222    AC_MSG_RESULT([yes])
6223  else
6224    case $host_os in
6225    darwin*)
6226      # FIXME - insert some real tests, host_os isn't really good enough
6227      striplib="$STRIP -x"
6228      old_striplib="$STRIP -S"
6229      AC_MSG_RESULT([yes])
6230      ;;
6231    freebsd*)
6232      if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
6233        old_striplib="$STRIP --strip-debug"
6234        striplib="$STRIP --strip-unneeded"
6235        AC_MSG_RESULT([yes])
6236      else
6237        AC_MSG_RESULT([no])
6238      fi
6239      ;;
6240    *)
6241      AC_MSG_RESULT([no])
6242      ;;
6243    esac
6244  fi
6245fi
6246_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
6247_LT_DECL([], [striplib], [1])
6248])# _LT_CMD_STRIPLIB
6249
6250
6251# _LT_PREPARE_MUNGE_PATH_LIST
6252# ---------------------------
6253# Make sure func_munge_path_list() is defined correctly.
6254m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
6255[[# func_munge_path_list VARIABLE PATH
6256# -----------------------------------
6257# VARIABLE is name of variable containing _space_ separated list of
6258# directories to be munged by the contents of PATH, which is string
6259# having a format:
6260# "DIR[:DIR]:"
6261#       string "DIR[ DIR]" will be prepended to VARIABLE
6262# ":DIR[:DIR]"
6263#       string "DIR[ DIR]" will be appended to VARIABLE
6264# "DIRP[:DIRP]::[DIRA:]DIRA"
6265#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
6266#       "DIRA[ DIRA]" will be appended to VARIABLE
6267# "DIR[:DIR]"
6268#       VARIABLE will be replaced by "DIR[ DIR]"
6269func_munge_path_list ()
6270{
6271    case x@S|@2 in
6272    x)
6273        ;;
6274    *:)
6275        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
6276        ;;
6277    x:*)
6278        eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
6279        ;;
6280    *::*)
6281        eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
6282        eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
6283        ;;
6284    *)
6285        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
6286        ;;
6287    esac
6288}
6289]])# _LT_PREPARE_PATH_LIST
6290
6291
6292# _LT_SYS_DYNAMIC_LINKER([TAG])
6293# -----------------------------
6294# PORTME Fill in your ld.so characteristics
6295m4_defun([_LT_SYS_DYNAMIC_LINKER],
6296[AC_REQUIRE([AC_CANONICAL_HOST])dnl
6297m4_require([_LT_DECL_EGREP])dnl
6298m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6299m4_require([_LT_DECL_OBJDUMP])dnl
6300m4_require([_LT_DECL_SED])dnl
6301m4_require([_LT_CHECK_SHELL_FEATURES])dnl
6302m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
6303AC_MSG_CHECKING([dynamic linker characteristics])
6304m4_if([$1],
6305	[], [
6306if test yes = "$GCC"; then
6307  case $host_os in
6308    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
6309    *) lt_awk_arg='/^libraries:/' ;;
6310  esac
6311  case $host_os in
6312    mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
6313    *) lt_sed_strip_eq='s|=/|/|g' ;;
6314  esac
6315  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
6316  case $lt_search_path_spec in
6317  *\;*)
6318    # if the path contains ";" then we assume it to be the separator
6319    # otherwise default to the standard path separator (i.e. ":") - it is
6320    # assumed that no part of a normal pathname contains ";" but that should
6321    # okay in the real world where ";" in dirpaths is itself problematic.
6322    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
6323    ;;
6324  *)
6325    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
6326    ;;
6327  esac
6328  # Ok, now we have the path, separated by spaces, we can step through it
6329  # and add multilib dir if necessary...
6330  lt_tmp_lt_search_path_spec=
6331  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
6332  # ...but if some path component already ends with the multilib dir we assume
6333  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
6334  case "$lt_multi_os_dir; $lt_search_path_spec " in
6335  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
6336    lt_multi_os_dir=
6337    ;;
6338  esac
6339  for lt_sys_path in $lt_search_path_spec; do
6340    if test -d "$lt_sys_path$lt_multi_os_dir"; then
6341      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
6342    elif test -n "$lt_multi_os_dir"; then
6343      test -d "$lt_sys_path" && \
6344	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
6345    fi
6346  done
6347  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
6348BEGIN {RS = " "; FS = "/|\n";} {
6349  lt_foo = "";
6350  lt_count = 0;
6351  for (lt_i = NF; lt_i > 0; lt_i--) {
6352    if ($lt_i != "" && $lt_i != ".") {
6353      if ($lt_i == "..") {
6354        lt_count++;
6355      } else {
6356        if (lt_count == 0) {
6357          lt_foo = "/" $lt_i lt_foo;
6358        } else {
6359          lt_count--;
6360        }
6361      }
6362    }
6363  }
6364  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
6365  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
6366}'`
6367  # AWK program above erroneously prepends '/' to C:/dos/paths
6368  # for these hosts.
6369  case $host_os in
6370    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
6371      $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
6372  esac
6373  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
6374else
6375  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6376fi])
6377library_names_spec=
6378libname_spec='lib$name'
6379soname_spec=
6380shrext_cmds=.so
6381postinstall_cmds=
6382postuninstall_cmds=
6383finish_cmds=
6384finish_eval=
6385shlibpath_var=
6386shlibpath_overrides_runpath=unknown
6387version_type=none
6388dynamic_linker="$host_os ld.so"
6389sys_lib_dlsearch_path_spec="/lib /usr/lib"
6390need_lib_prefix=unknown
6391hardcode_into_libs=no
6392
6393# when you set need_version to no, make sure it does not cause -set_version
6394# flags to be left without arguments
6395need_version=unknown
6396
6397AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
6398[User-defined run-time library search path.])
6399
6400case $host_os in
6401aix3*)
6402  version_type=linux # correct to gnu/linux during the next big refactor
6403  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
6404  shlibpath_var=LIBPATH
6405
6406  # AIX 3 has no versioning support, so we append a major version to the name.
6407  soname_spec='$libname$release$shared_ext$major'
6408  ;;
6409
6410aix[[4-9]]*)
6411  version_type=linux # correct to gnu/linux during the next big refactor
6412  need_lib_prefix=no
6413  need_version=no
6414  hardcode_into_libs=yes
6415  if test ia64 = "$host_cpu"; then
6416    # AIX 5 supports IA64
6417    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
6418    shlibpath_var=LD_LIBRARY_PATH
6419  else
6420    # With GCC up to 2.95.x, collect2 would create an import file
6421    # for dependence libraries.  The import file would start with
6422    # the line '#! .'.  This would cause the generated library to
6423    # depend on '.', always an invalid library.  This was fixed in
6424    # development snapshots of GCC prior to 3.0.
6425    case $host_os in
6426      aix4 | aix4.[[01]] | aix4.[[01]].*)
6427      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6428	   echo ' yes '
6429	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
6430	:
6431      else
6432	can_build_shared=no
6433      fi
6434      ;;
6435    esac
6436    # Using Import Files as archive members, it is possible to support
6437    # filename-based versioning of shared library archives on AIX. While
6438    # this would work for both with and without runtime linking, it will
6439    # prevent static linking of such archives. So we do filename-based
6440    # shared library versioning with .so extension only, which is used
6441    # when both runtime linking and shared linking is enabled.
6442    # Unfortunately, runtime linking may impact performance, so we do
6443    # not want this to be the default eventually. Also, we use the
6444    # versioned .so libs for executables only if there is the -brtl
6445    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
6446    # To allow for filename-based versioning support, we need to create
6447    # libNAME.so.V as an archive file, containing:
6448    # *) an Import File, referring to the versioned filename of the
6449    #    archive as well as the shared archive member, telling the
6450    #    bitwidth (32 or 64) of that shared object, and providing the
6451    #    list of exported symbols of that shared object, eventually
6452    #    decorated with the 'weak' keyword
6453    # *) the shared object with the F_LOADONLY flag set, to really avoid
6454    #    it being seen by the linker.
6455    # At run time we better use the real file rather than another symlink,
6456    # but for link time we create the symlink libNAME.so -> libNAME.so.V
6457
6458    case $with_aix_soname,$aix_use_runtimelinking in
6459    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
6460    # soname into executable. Probably we can add versioning support to
6461    # collect2, so additional links can be useful in future.
6462    aix,yes) # traditional libtool
6463      dynamic_linker='AIX unversionable lib.so'
6464      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6465      # instead of lib<name>.a to let people know that these are not
6466      # typical AIX shared libraries.
6467      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6468      ;;
6469    aix,no) # traditional AIX only
6470      dynamic_linker='AIX lib.a[(]lib.so.V[)]'
6471      # We preserve .a as extension for shared libraries through AIX4.2
6472      # and later when we are not doing run time linking.
6473      library_names_spec='$libname$release.a $libname.a'
6474      soname_spec='$libname$release$shared_ext$major'
6475      ;;
6476    svr4,*) # full svr4 only
6477      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
6478      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
6479      # We do not specify a path in Import Files, so LIBPATH fires.
6480      shlibpath_overrides_runpath=yes
6481      ;;
6482    *,yes) # both, prefer svr4
6483      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
6484      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
6485      # unpreferred sharedlib libNAME.a needs extra handling
6486      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"'
6487      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"'
6488      # We do not specify a path in Import Files, so LIBPATH fires.
6489      shlibpath_overrides_runpath=yes
6490      ;;
6491    *,no) # both, prefer aix
6492      dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
6493      library_names_spec='$libname$release.a $libname.a'
6494      soname_spec='$libname$release$shared_ext$major'
6495      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
6496      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)'
6497      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"'
6498      ;;
6499    esac
6500    shlibpath_var=LIBPATH
6501  fi
6502  ;;
6503
6504amigaos*)
6505  case $host_cpu in
6506  powerpc)
6507    # Since July 2007 AmigaOS4 officially supports .so libraries.
6508    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
6509    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6510    ;;
6511  m68k)
6512    library_names_spec='$libname.ixlibrary $libname.a'
6513    # Create ${libname}_ixlibrary.a entries in /sys/libs.
6514    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'
6515    ;;
6516  esac
6517  ;;
6518
6519beos*)
6520  library_names_spec='$libname$shared_ext'
6521  dynamic_linker="$host_os ld.so"
6522  shlibpath_var=LIBRARY_PATH
6523  ;;
6524
6525bsdi[[45]]*)
6526  version_type=linux # correct to gnu/linux during the next big refactor
6527  need_version=no
6528  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6529  soname_spec='$libname$release$shared_ext$major'
6530  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6531  shlibpath_var=LD_LIBRARY_PATH
6532  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6533  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6534  # the default ld.so.conf also contains /usr/contrib/lib and
6535  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6536  # libtool to hard-code these into programs
6537  ;;
6538
6539cygwin* | mingw* | pw32* | cegcc*)
6540  version_type=windows
6541  shrext_cmds=.dll
6542  need_version=no
6543  need_lib_prefix=no
6544
6545  case $GCC,$cc_basename in
6546  yes,*)
6547    # gcc
6548    library_names_spec='$libname.dll.a'
6549    # DLL is installed to $(libdir)/../bin by postinstall_cmds
6550    postinstall_cmds='base_file=`basename \$file`~
6551      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
6552      dldir=$destdir/`dirname \$dlpath`~
6553      test -d \$dldir || mkdir -p \$dldir~
6554      $install_prog $dir/$dlname \$dldir/$dlname~
6555      chmod a+x \$dldir/$dlname~
6556      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
6557        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
6558      fi'
6559    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
6560      dlpath=$dir/\$dldll~
6561       $RM \$dlpath'
6562    shlibpath_overrides_runpath=yes
6563
6564    case $host_os in
6565    cygwin*)
6566      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
6567      soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
6568m4_if([$1], [],[
6569      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
6570      ;;
6571    mingw* | cegcc*)
6572      # MinGW DLLs use traditional 'lib' prefix
6573      soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
6574      ;;
6575    pw32*)
6576      # pw32 DLLs use 'pw' prefix rather than 'lib'
6577      library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
6578      ;;
6579    esac
6580    dynamic_linker='Win32 ld.exe'
6581    ;;
6582
6583  *,cl* | *,icl*)
6584    # Native MSVC or ICC
6585    libname_spec='$name'
6586    soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
6587    library_names_spec='$libname.dll.lib'
6588
6589    case $build_os in
6590    mingw*)
6591      sys_lib_search_path_spec=
6592      lt_save_ifs=$IFS
6593      IFS=';'
6594      for lt_path in $LIB
6595      do
6596        IFS=$lt_save_ifs
6597        # Let DOS variable expansion print the short 8.3 style file name.
6598        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
6599        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
6600      done
6601      IFS=$lt_save_ifs
6602      # Convert to MSYS style.
6603      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
6604      ;;
6605    cygwin*)
6606      # Convert to unix form, then to dos form, then back to unix form
6607      # but this time dos style (no spaces!) so that the unix form looks
6608      # like /cygdrive/c/PROGRA~1:/cygdr...
6609      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
6610      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
6611      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
6612      ;;
6613    *)
6614      sys_lib_search_path_spec=$LIB
6615      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
6616        # It is most probably a Windows format PATH.
6617        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
6618      else
6619        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
6620      fi
6621      # FIXME: find the short name or the path components, as spaces are
6622      # common. (e.g. "Program Files" -> "PROGRA~1")
6623      ;;
6624    esac
6625
6626    # DLL is installed to $(libdir)/../bin by postinstall_cmds
6627    postinstall_cmds='base_file=`basename \$file`~
6628      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
6629      dldir=$destdir/`dirname \$dlpath`~
6630      test -d \$dldir || mkdir -p \$dldir~
6631      $install_prog $dir/$dlname \$dldir/$dlname'
6632    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
6633      dlpath=$dir/\$dldll~
6634       $RM \$dlpath'
6635    shlibpath_overrides_runpath=yes
6636    dynamic_linker='Win32 link.exe'
6637    ;;
6638
6639  *)
6640    # Assume MSVC and ICC wrapper
6641    library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
6642    dynamic_linker='Win32 ld.exe'
6643    ;;
6644  esac
6645  # FIXME: first we should search . and the directory the executable is in
6646  shlibpath_var=PATH
6647  ;;
6648
6649darwin* | rhapsody*)
6650  dynamic_linker="$host_os dyld"
6651  version_type=darwin
6652  need_lib_prefix=no
6653  need_version=no
6654  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
6655  soname_spec='$libname$release$major$shared_ext'
6656  shlibpath_overrides_runpath=yes
6657  shlibpath_var=DYLD_LIBRARY_PATH
6658  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
6659m4_if([$1], [],[
6660  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
6661  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
6662  ;;
6663
6664dgux*)
6665  version_type=linux # correct to gnu/linux during the next big refactor
6666  need_lib_prefix=no
6667  need_version=no
6668  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6669  soname_spec='$libname$release$shared_ext$major'
6670  shlibpath_var=LD_LIBRARY_PATH
6671  ;;
6672
6673freebsd* | dragonfly* | midnightbsd*)
6674  # DragonFly does not have aout.  When/if they implement a new
6675  # versioning mechanism, adjust this.
6676  if test -x /usr/bin/objformat; then
6677    objformat=`/usr/bin/objformat`
6678  else
6679    case $host_os in
6680    freebsd[[23]].*) objformat=aout ;;
6681    *) objformat=elf ;;
6682    esac
6683  fi
6684  version_type=freebsd-$objformat
6685  case $version_type in
6686    freebsd-elf*)
6687      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6688      soname_spec='$libname$release$shared_ext$major'
6689      need_version=no
6690      need_lib_prefix=no
6691      ;;
6692    freebsd-*)
6693      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
6694      need_version=yes
6695      ;;
6696  esac
6697  shlibpath_var=LD_LIBRARY_PATH
6698  case $host_os in
6699  freebsd2.*)
6700    shlibpath_overrides_runpath=yes
6701    ;;
6702  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
6703    shlibpath_overrides_runpath=yes
6704    hardcode_into_libs=yes
6705    ;;
6706  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
6707  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
6708    shlibpath_overrides_runpath=no
6709    hardcode_into_libs=yes
6710    ;;
6711  *) # from 4.6 on, and DragonFly
6712    shlibpath_overrides_runpath=yes
6713    hardcode_into_libs=yes
6714    ;;
6715  esac
6716  ;;
6717
6718haiku*)
6719  version_type=linux # correct to gnu/linux during the next big refactor
6720  need_lib_prefix=no
6721  need_version=no
6722  dynamic_linker="$host_os runtime_loader"
6723  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6724  soname_spec='$libname$release$shared_ext$major'
6725  shlibpath_var=LIBRARY_PATH
6726  shlibpath_overrides_runpath=no
6727  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
6728  hardcode_into_libs=yes
6729  ;;
6730
6731hpux9* | hpux10* | hpux11*)
6732  # Give a soname corresponding to the major version so that dld.sl refuses to
6733  # link against other versions.
6734  version_type=sunos
6735  need_lib_prefix=no
6736  need_version=no
6737  case $host_cpu in
6738  ia64*)
6739    shrext_cmds='.so'
6740    hardcode_into_libs=yes
6741    dynamic_linker="$host_os dld.so"
6742    shlibpath_var=LD_LIBRARY_PATH
6743    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
6744    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6745    soname_spec='$libname$release$shared_ext$major'
6746    if test 32 = "$HPUX_IA64_MODE"; then
6747      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
6748      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
6749    else
6750      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
6751      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
6752    fi
6753    ;;
6754  hppa*64*)
6755    shrext_cmds='.sl'
6756    hardcode_into_libs=yes
6757    dynamic_linker="$host_os dld.sl"
6758    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
6759    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
6760    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6761    soname_spec='$libname$release$shared_ext$major'
6762    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
6763    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
6764    ;;
6765  *)
6766    shrext_cmds='.sl'
6767    dynamic_linker="$host_os dld.sl"
6768    shlibpath_var=SHLIB_PATH
6769    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6770    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6771    soname_spec='$libname$release$shared_ext$major'
6772    ;;
6773  esac
6774  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
6775  postinstall_cmds='chmod 555 $lib'
6776  # or fails outright, so override atomically:
6777  install_override_mode=555
6778  ;;
6779
6780interix[[3-9]]*)
6781  version_type=linux # correct to gnu/linux during the next big refactor
6782  need_lib_prefix=no
6783  need_version=no
6784  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6785  soname_spec='$libname$release$shared_ext$major'
6786  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
6787  shlibpath_var=LD_LIBRARY_PATH
6788  shlibpath_overrides_runpath=no
6789  hardcode_into_libs=yes
6790  ;;
6791
6792irix5* | irix6* | nonstopux*)
6793  case $host_os in
6794    nonstopux*) version_type=nonstopux ;;
6795    *)
6796	if test yes = "$lt_cv_prog_gnu_ld"; then
6797		version_type=linux # correct to gnu/linux during the next big refactor
6798	else
6799		version_type=irix
6800	fi ;;
6801  esac
6802  need_lib_prefix=no
6803  need_version=no
6804  soname_spec='$libname$release$shared_ext$major'
6805  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
6806  case $host_os in
6807  irix5* | nonstopux*)
6808    libsuff= shlibsuff=
6809    ;;
6810  *)
6811    case $LD in # libtool.m4 will add one of these switches to LD
6812    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
6813      libsuff= shlibsuff= libmagic=32-bit;;
6814    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
6815      libsuff=32 shlibsuff=N32 libmagic=N32;;
6816    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
6817      libsuff=64 shlibsuff=64 libmagic=64-bit;;
6818    *) libsuff= shlibsuff= libmagic=never-match;;
6819    esac
6820    ;;
6821  esac
6822  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6823  shlibpath_overrides_runpath=no
6824  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
6825  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
6826  hardcode_into_libs=yes
6827  ;;
6828
6829# No shared lib support for Linux oldld, aout, or coff.
6830linux*oldld* | linux*aout* | linux*coff*)
6831  dynamic_linker=no
6832  ;;
6833
6834linux*android*)
6835  version_type=none # Android doesn't support versioned libraries.
6836  need_lib_prefix=no
6837  need_version=no
6838  library_names_spec='$libname$release$shared_ext'
6839  soname_spec='$libname$release$shared_ext'
6840  finish_cmds=
6841  shlibpath_var=LD_LIBRARY_PATH
6842  shlibpath_overrides_runpath=yes
6843
6844  # This implies no fast_install, which is unacceptable.
6845  # Some rework will be needed to allow for fast_install
6846  # before this can be enabled.
6847  hardcode_into_libs=yes
6848
6849  dynamic_linker='Android linker'
6850  # Don't embed -rpath directories since the linker doesn't support them.
6851  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6852  ;;
6853
6854# This must be glibc/ELF.
6855linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
6856  version_type=linux # correct to gnu/linux during the next big refactor
6857  need_lib_prefix=no
6858  need_version=no
6859  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6860  soname_spec='$libname$release$shared_ext$major'
6861  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6862  shlibpath_var=LD_LIBRARY_PATH
6863  shlibpath_overrides_runpath=no
6864
6865  # Some binutils ld are patched to set DT_RUNPATH
6866  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
6867    [lt_cv_shlibpath_overrides_runpath=no
6868    save_LDFLAGS=$LDFLAGS
6869    save_libdir=$libdir
6870    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
6871	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
6872    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
6873      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
6874	 [lt_cv_shlibpath_overrides_runpath=yes])])
6875    LDFLAGS=$save_LDFLAGS
6876    libdir=$save_libdir
6877    ])
6878  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
6879
6880  # This implies no fast_install, which is unacceptable.
6881  # Some rework will be needed to allow for fast_install
6882  # before this can be enabled.
6883  hardcode_into_libs=yes
6884
6885  # Add ABI-specific directories to the system library path.
6886  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
6887
6888  # Ideally, we could use ldconfig to report *all* directores which are
6889  # searched for libraries, however this is still not possible.  Aside from not
6890  # being certain /sbin/ldconfig is available, command
6891  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
6892  # even though it is searched at run-time.  Try to do the best guess by
6893  # appending ld.so.conf contents (and includes) to the search path.
6894  if test -f /etc/ld.so.conf; then
6895    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' ' '`
6896    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
6897  fi
6898
6899  # We used to test for /lib/ld.so.1 and disable shared libraries on
6900  # powerpc, because MkLinux only supported shared libraries with the
6901  # GNU dynamic linker.  Since this was broken with cross compilers,
6902  # most powerpc-linux boxes support dynamic linking these days and
6903  # people can always --disable-shared, the test was removed, and we
6904  # assume the GNU/Linux dynamic linker is in use.
6905  dynamic_linker='GNU/Linux ld.so'
6906  ;;
6907
6908netbsd*)
6909  version_type=sunos
6910  need_lib_prefix=no
6911  need_version=no
6912  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6913    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
6914    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6915    dynamic_linker='NetBSD (a.out) ld.so'
6916  else
6917    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6918    soname_spec='$libname$release$shared_ext$major'
6919    dynamic_linker='NetBSD ld.elf_so'
6920  fi
6921  shlibpath_var=LD_LIBRARY_PATH
6922  shlibpath_overrides_runpath=yes
6923  hardcode_into_libs=yes
6924  ;;
6925
6926newsos6)
6927  version_type=linux # correct to gnu/linux during the next big refactor
6928  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6929  shlibpath_var=LD_LIBRARY_PATH
6930  shlibpath_overrides_runpath=yes
6931  ;;
6932
6933*nto* | *qnx*)
6934  version_type=qnx
6935  need_lib_prefix=no
6936  need_version=no
6937  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6938  soname_spec='$libname$release$shared_ext$major'
6939  shlibpath_var=LD_LIBRARY_PATH
6940  shlibpath_overrides_runpath=no
6941  hardcode_into_libs=yes
6942  dynamic_linker='ldqnx.so'
6943  ;;
6944
6945openbsd* | bitrig*)
6946  version_type=sunos
6947  sys_lib_dlsearch_path_spec=/usr/lib
6948  need_lib_prefix=no
6949  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
6950    need_version=no
6951  else
6952    need_version=yes
6953  fi
6954  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
6955  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6956  shlibpath_var=LD_LIBRARY_PATH
6957  shlibpath_overrides_runpath=yes
6958  ;;
6959
6960os2*)
6961  libname_spec='$name'
6962  version_type=windows
6963  shrext_cmds=.dll
6964  need_version=no
6965  need_lib_prefix=no
6966  # OS/2 can only load a DLL with a base name of 8 characters or less.
6967  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
6968    v=$($ECHO $release$versuffix | tr -d .-);
6969    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
6970    $ECHO $n$v`$shared_ext'
6971  library_names_spec='${libname}_dll.$libext'
6972  dynamic_linker='OS/2 ld.exe'
6973  shlibpath_var=BEGINLIBPATH
6974  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6975  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
6976  postinstall_cmds='base_file=`basename \$file`~
6977    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
6978    dldir=$destdir/`dirname \$dlpath`~
6979    test -d \$dldir || mkdir -p \$dldir~
6980    $install_prog $dir/$dlname \$dldir/$dlname~
6981    chmod a+x \$dldir/$dlname~
6982    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
6983      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
6984    fi'
6985  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
6986    dlpath=$dir/\$dldll~
6987    $RM \$dlpath'
6988  ;;
6989
6990osf3* | osf4* | osf5*)
6991  version_type=osf
6992  need_lib_prefix=no
6993  need_version=no
6994  soname_spec='$libname$release$shared_ext$major'
6995  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6996  shlibpath_var=LD_LIBRARY_PATH
6997  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6998  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
6999  ;;
7000
7001rdos*)
7002  dynamic_linker=no
7003  ;;
7004
7005solaris*)
7006  version_type=linux # correct to gnu/linux during the next big refactor
7007  need_lib_prefix=no
7008  need_version=no
7009  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
7010  soname_spec='$libname$release$shared_ext$major'
7011  shlibpath_var=LD_LIBRARY_PATH
7012  shlibpath_overrides_runpath=yes
7013  hardcode_into_libs=yes
7014  # ldd complains unless libraries are executable
7015  postinstall_cmds='chmod +x $lib'
7016  ;;
7017
7018sunos4*)
7019  version_type=sunos
7020  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
7021  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
7022  shlibpath_var=LD_LIBRARY_PATH
7023  shlibpath_overrides_runpath=yes
7024  if test yes = "$with_gnu_ld"; then
7025    need_lib_prefix=no
7026  fi
7027  need_version=yes
7028  ;;
7029
7030sysv4 | sysv4.3*)
7031  version_type=linux # correct to gnu/linux during the next big refactor
7032  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
7033  soname_spec='$libname$release$shared_ext$major'
7034  shlibpath_var=LD_LIBRARY_PATH
7035  case $host_vendor in
7036    sni)
7037      shlibpath_overrides_runpath=no
7038      need_lib_prefix=no
7039      runpath_var=LD_RUN_PATH
7040      ;;
7041    siemens)
7042      need_lib_prefix=no
7043      ;;
7044    motorola)
7045      need_lib_prefix=no
7046      need_version=no
7047      shlibpath_overrides_runpath=no
7048      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
7049      ;;
7050  esac
7051  ;;
7052
7053sysv4*MP*)
7054  if test -d /usr/nec; then
7055    version_type=linux # correct to gnu/linux during the next big refactor
7056    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
7057    soname_spec='$libname$shared_ext.$major'
7058    shlibpath_var=LD_LIBRARY_PATH
7059  fi
7060  ;;
7061
7062sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
7063  version_type=sco
7064  need_lib_prefix=no
7065  need_version=no
7066  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
7067  soname_spec='$libname$release$shared_ext$major'
7068  shlibpath_var=LD_LIBRARY_PATH
7069  shlibpath_overrides_runpath=yes
7070  hardcode_into_libs=yes
7071  if test yes = "$with_gnu_ld"; then
7072    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
7073  else
7074    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
7075    case $host_os in
7076      sco3.2v5*)
7077        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
7078	;;
7079    esac
7080  fi
7081  sys_lib_dlsearch_path_spec='/usr/lib'
7082  ;;
7083
7084tpf*)
7085  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
7086  version_type=linux # correct to gnu/linux during the next big refactor
7087  need_lib_prefix=no
7088  need_version=no
7089  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
7090  shlibpath_var=LD_LIBRARY_PATH
7091  shlibpath_overrides_runpath=no
7092  hardcode_into_libs=yes
7093  ;;
7094
7095uts4*)
7096  version_type=linux # correct to gnu/linux during the next big refactor
7097  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
7098  soname_spec='$libname$release$shared_ext$major'
7099  shlibpath_var=LD_LIBRARY_PATH
7100  ;;
7101
7102*)
7103  dynamic_linker=no
7104  ;;
7105esac
7106AC_MSG_RESULT([$dynamic_linker])
7107test no = "$dynamic_linker" && can_build_shared=no
7108
7109variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
7110if test yes = "$GCC"; then
7111  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
7112fi
7113
7114if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
7115  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
7116fi
7117
7118if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
7119  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
7120fi
7121
7122# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
7123configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
7124
7125# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
7126func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
7127
7128# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
7129configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
7130
7131_LT_DECL([], [variables_saved_for_relink], [1],
7132    [Variables whose values should be saved in libtool wrapper scripts and
7133    restored at link time])
7134_LT_DECL([], [need_lib_prefix], [0],
7135    [Do we need the "lib" prefix for modules?])
7136_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
7137_LT_DECL([], [version_type], [0], [Library versioning type])
7138_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
7139_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
7140_LT_DECL([], [shlibpath_overrides_runpath], [0],
7141    [Is shlibpath searched before the hard-coded library search path?])
7142_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
7143_LT_DECL([], [library_names_spec], [1],
7144    [[List of archive names.  First name is the real one, the rest are links.
7145    The last name is the one that the linker finds with -lNAME]])
7146_LT_DECL([], [soname_spec], [1],
7147    [[The coded name of the library, if different from the real name]])
7148_LT_DECL([], [install_override_mode], [1],
7149    [Permission mode override for installation of shared libraries])
7150_LT_DECL([], [postinstall_cmds], [2],
7151    [Command to use after installation of a shared archive])
7152_LT_DECL([], [postuninstall_cmds], [2],
7153    [Command to use after uninstallation of a shared archive])
7154_LT_DECL([], [finish_cmds], [2],
7155    [Commands used to finish a libtool library installation in a directory])
7156_LT_DECL([], [finish_eval], [1],
7157    [[As "finish_cmds", except a single script fragment to be evaled but
7158    not shown]])
7159_LT_DECL([], [hardcode_into_libs], [0],
7160    [Whether we should hardcode library paths into libraries])
7161_LT_DECL([], [sys_lib_search_path_spec], [2],
7162    [Compile-time system search path for libraries])
7163_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
7164    [Detected run-time system search path for libraries])
7165_LT_DECL([], [configure_time_lt_sys_library_path], [2],
7166    [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
7167])# _LT_SYS_DYNAMIC_LINKER
7168
7169
7170# _LT_PATH_TOOL_PREFIX(TOOL)
7171# --------------------------
7172# find a file program that can recognize shared library
7173AC_DEFUN([_LT_PATH_TOOL_PREFIX],
7174[m4_require([_LT_DECL_EGREP])dnl
7175AC_MSG_CHECKING([for $1])
7176AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
7177[case $MAGIC_CMD in
7178[[\\/*] |  ?:[\\/]*])
7179  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
7180  ;;
7181*)
7182  lt_save_MAGIC_CMD=$MAGIC_CMD
7183  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7184dnl $ac_dummy forces splitting on constant user-supplied paths.
7185dnl POSIX.2 word splitting is done only on the output of word expansions,
7186dnl not every word.  This closes a longstanding sh security hole.
7187  ac_dummy="m4_if([$2], , $PATH, [$2])"
7188  for ac_dir in $ac_dummy; do
7189    IFS=$lt_save_ifs
7190    test -z "$ac_dir" && ac_dir=.
7191    if test -f "$ac_dir/$1"; then
7192      lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
7193      if test -n "$file_magic_test_file"; then
7194	case $deplibs_check_method in
7195	"file_magic "*)
7196	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
7197	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
7198	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
7199	    $EGREP "$file_magic_regex" > /dev/null; then
7200	    :
7201	  else
7202	    cat <<_LT_EOF 1>&2
7203
7204*** Warning: the command libtool uses to detect shared libraries,
7205*** $file_magic_cmd, produces output that libtool cannot recognize.
7206*** The result is that libtool may fail to recognize shared libraries
7207*** as such.  This will affect the creation of libtool libraries that
7208*** depend on shared libraries, but programs linked with such libtool
7209*** libraries will work regardless of this problem.  Nevertheless, you
7210*** may want to report the problem to your system manager and/or to
7211*** bug-libtool@gnu.org
7212
7213_LT_EOF
7214	  fi ;;
7215	esac
7216      fi
7217      break
7218    fi
7219  done
7220  IFS=$lt_save_ifs
7221  MAGIC_CMD=$lt_save_MAGIC_CMD
7222  ;;
7223esac])
7224MAGIC_CMD=$lt_cv_path_MAGIC_CMD
7225if test -n "$MAGIC_CMD"; then
7226  AC_MSG_RESULT($MAGIC_CMD)
7227else
7228  AC_MSG_RESULT(no)
7229fi
7230_LT_DECL([], [MAGIC_CMD], [0],
7231	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
7232])# _LT_PATH_TOOL_PREFIX
7233
7234# Old name:
7235AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
7236dnl aclocal-1.4 backwards compatibility:
7237dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
7238
7239
7240# _LT_PATH_MAGIC
7241# --------------
7242# find a file program that can recognize a shared library
7243m4_defun([_LT_PATH_MAGIC],
7244[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
7245if test -z "$lt_cv_path_MAGIC_CMD"; then
7246  if test -n "$ac_tool_prefix"; then
7247    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
7248  else
7249    MAGIC_CMD=:
7250  fi
7251fi
7252])# _LT_PATH_MAGIC
7253
7254
7255# LT_PATH_LD
7256# ----------
7257# find the pathname to the GNU or non-GNU linker
7258AC_DEFUN([LT_PATH_LD],
7259[AC_REQUIRE([AC_PROG_CC])dnl
7260AC_REQUIRE([AC_CANONICAL_HOST])dnl
7261AC_REQUIRE([AC_CANONICAL_BUILD])dnl
7262m4_require([_LT_DECL_SED])dnl
7263m4_require([_LT_DECL_EGREP])dnl
7264m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
7265
7266AC_ARG_WITH([gnu-ld],
7267    [AS_HELP_STRING([--with-gnu-ld],
7268	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
7269    [test no = "$withval" || with_gnu_ld=yes],
7270    [with_gnu_ld=no])dnl
7271
7272ac_prog=ld
7273if test yes = "$GCC"; then
7274  # Check if gcc -print-prog-name=ld gives a path.
7275  AC_MSG_CHECKING([for ld used by $CC])
7276  case $host in
7277  *-*-mingw*)
7278    # gcc leaves a trailing carriage return, which upsets mingw
7279    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7280  *)
7281    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7282  esac
7283  case $ac_prog in
7284    # Accept absolute paths.
7285    [[\\/]]* | ?:[[\\/]]*)
7286      re_direlt='/[[^/]][[^/]]*/\.\./'
7287      # Canonicalize the pathname of ld
7288      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
7289      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
7290	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
7291      done
7292      test -z "$LD" && LD=$ac_prog
7293      ;;
7294  "")
7295    # If it fails, then pretend we aren't using GCC.
7296    ac_prog=ld
7297    ;;
7298  *)
7299    # If it is relative, then search for the first ld in PATH.
7300    with_gnu_ld=unknown
7301    ;;
7302  esac
7303elif test yes = "$with_gnu_ld"; then
7304  AC_MSG_CHECKING([for GNU ld])
7305else
7306  AC_MSG_CHECKING([for non-GNU ld])
7307fi
7308AC_CACHE_VAL(lt_cv_path_LD,
7309[if test -z "$LD"; then
7310  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7311  for ac_dir in $PATH; do
7312    IFS=$lt_save_ifs
7313    test -z "$ac_dir" && ac_dir=.
7314    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7315      lt_cv_path_LD=$ac_dir/$ac_prog
7316      # Check to see if the program is GNU ld.  I'd rather use --version,
7317      # but apparently some variants of GNU ld only accept -v.
7318      # Break only if it was the GNU/non-GNU ld that we prefer.
7319      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
7320      *GNU* | *'with BFD'*)
7321	test no != "$with_gnu_ld" && break
7322	;;
7323      *)
7324	test yes != "$with_gnu_ld" && break
7325	;;
7326      esac
7327    fi
7328  done
7329  IFS=$lt_save_ifs
7330else
7331  lt_cv_path_LD=$LD # Let the user override the test with a path.
7332fi])
7333LD=$lt_cv_path_LD
7334if test -n "$LD"; then
7335  AC_MSG_RESULT($LD)
7336else
7337  AC_MSG_RESULT(no)
7338fi
7339test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
7340_LT_PATH_LD_GNU
7341AC_SUBST([LD])
7342
7343_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
7344])# LT_PATH_LD
7345
7346# Old names:
7347AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
7348AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
7349dnl aclocal-1.4 backwards compatibility:
7350dnl AC_DEFUN([AM_PROG_LD], [])
7351dnl AC_DEFUN([AC_PROG_LD], [])
7352
7353
7354# _LT_PATH_LD_GNU
7355#- --------------
7356m4_defun([_LT_PATH_LD_GNU],
7357[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
7358[# I'd rather use --version here, but apparently some GNU lds only accept -v.
7359case `$LD -v 2>&1 </dev/null` in
7360*GNU* | *'with BFD'*)
7361  lt_cv_prog_gnu_ld=yes
7362  ;;
7363*)
7364  lt_cv_prog_gnu_ld=no
7365  ;;
7366esac])
7367with_gnu_ld=$lt_cv_prog_gnu_ld
7368])# _LT_PATH_LD_GNU
7369
7370
7371# _LT_CMD_RELOAD
7372# --------------
7373# find reload flag for linker
7374#   -- PORTME Some linkers may need a different reload flag.
7375m4_defun([_LT_CMD_RELOAD],
7376[AC_CACHE_CHECK([for $LD option to reload object files],
7377  lt_cv_ld_reload_flag,
7378  [lt_cv_ld_reload_flag='-r'])
7379reload_flag=$lt_cv_ld_reload_flag
7380case $reload_flag in
7381"" | " "*) ;;
7382*) reload_flag=" $reload_flag" ;;
7383esac
7384reload_cmds='$LD$reload_flag -o $output$reload_objs'
7385case $host_os in
7386  cygwin* | mingw* | pw32* | cegcc*)
7387    if test yes != "$GCC"; then
7388      reload_cmds=false
7389    fi
7390    ;;
7391  darwin*)
7392    if test yes = "$GCC"; then
7393      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
7394    else
7395      reload_cmds='$LD$reload_flag -o $output$reload_objs'
7396    fi
7397    ;;
7398esac
7399_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
7400_LT_TAGDECL([], [reload_cmds], [2])dnl
7401])# _LT_CMD_RELOAD
7402
7403
7404# _LT_PATH_DD
7405# -----------
7406# find a working dd
7407m4_defun([_LT_PATH_DD],
7408[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
7409[printf 0123456789abcdef0123456789abcdef >conftest.i
7410cat conftest.i conftest.i >conftest2.i
7411: ${lt_DD:=$DD}
7412AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
7413[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
7414  cmp -s conftest.i conftest.out \
7415  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
7416fi])
7417rm -f conftest.i conftest2.i conftest.out])
7418])# _LT_PATH_DD
7419
7420
7421# _LT_CMD_TRUNCATE
7422# ----------------
7423# find command to truncate a binary pipe
7424m4_defun([_LT_CMD_TRUNCATE],
7425[m4_require([_LT_PATH_DD])
7426AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
7427[printf 0123456789abcdef0123456789abcdef >conftest.i
7428cat conftest.i conftest.i >conftest2.i
7429lt_cv_truncate_bin=
7430if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
7431  cmp -s conftest.i conftest.out \
7432  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
7433fi
7434rm -f conftest.i conftest2.i conftest.out
7435test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
7436_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
7437  [Command to truncate a binary pipe])
7438])# _LT_CMD_TRUNCATE
7439
7440
7441# _LT_CHECK_MAGIC_METHOD
7442# ----------------------
7443# how to check for library dependencies
7444#  -- PORTME fill in with the dynamic library characteristics
7445m4_defun([_LT_CHECK_MAGIC_METHOD],
7446[m4_require([_LT_DECL_EGREP])
7447m4_require([_LT_DECL_OBJDUMP])
7448AC_CACHE_CHECK([how to recognize dependent libraries],
7449lt_cv_deplibs_check_method,
7450[lt_cv_file_magic_cmd='$MAGIC_CMD'
7451lt_cv_file_magic_test_file=
7452lt_cv_deplibs_check_method='unknown'
7453# Need to set the preceding variable on all platforms that support
7454# interlibrary dependencies.
7455# 'none' -- dependencies not supported.
7456# 'unknown' -- same as none, but documents that we really don't know.
7457# 'pass_all' -- all dependencies passed with no checks.
7458# 'test_compile' -- check by making test program.
7459# 'file_magic [[regex]]' -- check by looking for files in library path
7460# that responds to the $file_magic_cmd with a given extended regex.
7461# If you have 'file' or equivalent on your system and you're not sure
7462# whether 'pass_all' will *always* work, you probably want this one.
7463
7464case $host_os in
7465aix[[4-9]]*)
7466  lt_cv_deplibs_check_method=pass_all
7467  ;;
7468
7469beos*)
7470  lt_cv_deplibs_check_method=pass_all
7471  ;;
7472
7473bsdi[[45]]*)
7474  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
7475  lt_cv_file_magic_cmd='$FILECMD -L'
7476  lt_cv_file_magic_test_file=/shlib/libc.so
7477  ;;
7478
7479cygwin*)
7480  # func_win32_libid is a shell function defined in ltmain.sh
7481  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
7482  lt_cv_file_magic_cmd='func_win32_libid'
7483  ;;
7484
7485mingw* | pw32*)
7486  # Base MSYS/MinGW do not provide the 'file' command needed by
7487  # func_win32_libid shell function, so use a weaker test based on 'objdump',
7488  # unless we find 'file', for example because we are cross-compiling.
7489  if ( file / ) >/dev/null 2>&1; then
7490    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
7491    lt_cv_file_magic_cmd='func_win32_libid'
7492  else
7493    # Keep this pattern in sync with the one in func_win32_libid.
7494    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
7495    lt_cv_file_magic_cmd='$OBJDUMP -f'
7496  fi
7497  ;;
7498
7499cegcc*)
7500  # use the weaker test based on 'objdump'. See mingw*.
7501  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
7502  lt_cv_file_magic_cmd='$OBJDUMP -f'
7503  ;;
7504
7505darwin* | rhapsody*)
7506  lt_cv_deplibs_check_method=pass_all
7507  ;;
7508
7509freebsd* | dragonfly* | midnightbsd*)
7510  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
7511    case $host_cpu in
7512    i*86 )
7513      # Not sure whether the presence of OpenBSD here was a mistake.
7514      # Let's accept both of them until this is cleared up.
7515      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
7516      lt_cv_file_magic_cmd=$FILECMD
7517      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
7518      ;;
7519    esac
7520  else
7521    lt_cv_deplibs_check_method=pass_all
7522  fi
7523  ;;
7524
7525haiku*)
7526  lt_cv_deplibs_check_method=pass_all
7527  ;;
7528
7529hpux10.20* | hpux11*)
7530  lt_cv_file_magic_cmd=$FILECMD
7531  case $host_cpu in
7532  ia64*)
7533    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
7534    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
7535    ;;
7536  hppa*64*)
7537    [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]']
7538    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
7539    ;;
7540  *)
7541    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
7542    lt_cv_file_magic_test_file=/usr/lib/libc.sl
7543    ;;
7544  esac
7545  ;;
7546
7547interix[[3-9]]*)
7548  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
7549  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
7550  ;;
7551
7552irix5* | irix6* | nonstopux*)
7553  case $LD in
7554  *-32|*"-32 ") libmagic=32-bit;;
7555  *-n32|*"-n32 ") libmagic=N32;;
7556  *-64|*"-64 ") libmagic=64-bit;;
7557  *) libmagic=never-match;;
7558  esac
7559  lt_cv_deplibs_check_method=pass_all
7560  ;;
7561
7562# This must be glibc/ELF.
7563linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
7564  lt_cv_deplibs_check_method=pass_all
7565  ;;
7566
7567netbsd*)
7568  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
7569    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
7570  else
7571    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
7572  fi
7573  ;;
7574
7575newos6*)
7576  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
7577  lt_cv_file_magic_cmd=$FILECMD
7578  lt_cv_file_magic_test_file=/usr/lib/libnls.so
7579  ;;
7580
7581*nto* | *qnx*)
7582  lt_cv_deplibs_check_method=pass_all
7583  ;;
7584
7585openbsd* | bitrig*)
7586  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
7587    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
7588  else
7589    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
7590  fi
7591  ;;
7592
7593osf3* | osf4* | osf5*)
7594  lt_cv_deplibs_check_method=pass_all
7595  ;;
7596
7597rdos*)
7598  lt_cv_deplibs_check_method=pass_all
7599  ;;
7600
7601solaris*)
7602  lt_cv_deplibs_check_method=pass_all
7603  ;;
7604
7605sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
7606  lt_cv_deplibs_check_method=pass_all
7607  ;;
7608
7609sysv4 | sysv4.3*)
7610  case $host_vendor in
7611  motorola)
7612    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]]'
7613    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
7614    ;;
7615  ncr)
7616    lt_cv_deplibs_check_method=pass_all
7617    ;;
7618  sequent)
7619    lt_cv_file_magic_cmd='/bin/file'
7620    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
7621    ;;
7622  sni)
7623    lt_cv_file_magic_cmd='/bin/file'
7624    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
7625    lt_cv_file_magic_test_file=/lib/libc.so
7626    ;;
7627  siemens)
7628    lt_cv_deplibs_check_method=pass_all
7629    ;;
7630  pc)
7631    lt_cv_deplibs_check_method=pass_all
7632    ;;
7633  esac
7634  ;;
7635
7636tpf*)
7637  lt_cv_deplibs_check_method=pass_all
7638  ;;
7639os2*)
7640  lt_cv_deplibs_check_method=pass_all
7641  ;;
7642esac
7643])
7644
7645file_magic_glob=
7646want_nocaseglob=no
7647if test "$build" = "$host"; then
7648  case $host_os in
7649  mingw* | pw32*)
7650    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
7651      want_nocaseglob=yes
7652    else
7653      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
7654    fi
7655    ;;
7656  esac
7657fi
7658
7659file_magic_cmd=$lt_cv_file_magic_cmd
7660deplibs_check_method=$lt_cv_deplibs_check_method
7661test -z "$deplibs_check_method" && deplibs_check_method=unknown
7662
7663_LT_DECL([], [deplibs_check_method], [1],
7664    [Method to check whether dependent libraries are shared objects])
7665_LT_DECL([], [file_magic_cmd], [1],
7666    [Command to use when deplibs_check_method = "file_magic"])
7667_LT_DECL([], [file_magic_glob], [1],
7668    [How to find potential files when deplibs_check_method = "file_magic"])
7669_LT_DECL([], [want_nocaseglob], [1],
7670    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
7671])# _LT_CHECK_MAGIC_METHOD
7672
7673
7674# LT_PATH_NM
7675# ----------
7676# find the pathname to a BSD- or MS-compatible name lister
7677AC_DEFUN([LT_PATH_NM],
7678[AC_REQUIRE([AC_PROG_CC])dnl
7679AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
7680[if test -n "$NM"; then
7681  # Let the user override the test.
7682  lt_cv_path_NM=$NM
7683else
7684  lt_nm_to_check=${ac_tool_prefix}nm
7685  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
7686    lt_nm_to_check="$lt_nm_to_check nm"
7687  fi
7688  for lt_tmp_nm in $lt_nm_to_check; do
7689    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7690    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
7691      IFS=$lt_save_ifs
7692      test -z "$ac_dir" && ac_dir=.
7693      tmp_nm=$ac_dir/$lt_tmp_nm
7694      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
7695	# Check to see if the nm accepts a BSD-compat flag.
7696	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
7697	#   nm: unknown option "B" ignored
7698	# Tru64's nm complains that /dev/null is an invalid object file
7699	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
7700	case $build_os in
7701	mingw*) lt_bad_file=conftest.nm/nofile ;;
7702	*) lt_bad_file=/dev/null ;;
7703	esac
7704	case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in
7705	*$lt_bad_file* | *'Invalid file or object type'*)
7706	  lt_cv_path_NM="$tmp_nm -B"
7707	  break 2
7708	  ;;
7709	*)
7710	  case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in
7711	  */dev/null*)
7712	    lt_cv_path_NM="$tmp_nm -p"
7713	    break 2
7714	    ;;
7715	  *)
7716	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
7717	    continue # so that we can try to find one that supports BSD flags
7718	    ;;
7719	  esac
7720	  ;;
7721	esac
7722      fi
7723    done
7724    IFS=$lt_save_ifs
7725  done
7726  : ${lt_cv_path_NM=no}
7727fi])
7728if test no != "$lt_cv_path_NM"; then
7729  NM=$lt_cv_path_NM
7730else
7731  # Didn't find any BSD compatible name lister, look for dumpbin.
7732  if test -n "$DUMPBIN"; then :
7733    # Let the user override the test.
7734  else
7735    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
7736    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in
7737    *COFF*)
7738      DUMPBIN="$DUMPBIN -symbols -headers"
7739      ;;
7740    *)
7741      DUMPBIN=:
7742      ;;
7743    esac
7744  fi
7745  AC_SUBST([DUMPBIN])
7746  if test : != "$DUMPBIN"; then
7747    NM=$DUMPBIN
7748  fi
7749fi
7750test -z "$NM" && NM=nm
7751AC_SUBST([NM])
7752_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
7753
7754AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
7755  [lt_cv_nm_interface="BSD nm"
7756  echo "int some_variable = 0;" > conftest.$ac_ext
7757  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
7758  (eval "$ac_compile" 2>conftest.err)
7759  cat conftest.err >&AS_MESSAGE_LOG_FD
7760  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
7761  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
7762  cat conftest.err >&AS_MESSAGE_LOG_FD
7763  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
7764  cat conftest.out >&AS_MESSAGE_LOG_FD
7765  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
7766    lt_cv_nm_interface="MS dumpbin"
7767  fi
7768  rm -f conftest*])
7769])# LT_PATH_NM
7770
7771# Old names:
7772AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
7773AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
7774dnl aclocal-1.4 backwards compatibility:
7775dnl AC_DEFUN([AM_PROG_NM], [])
7776dnl AC_DEFUN([AC_PROG_NM], [])
7777
7778# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
7779# --------------------------------
7780# how to determine the name of the shared library
7781# associated with a specific link library.
7782#  -- PORTME fill in with the dynamic library characteristics
7783m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
7784[m4_require([_LT_DECL_EGREP])
7785m4_require([_LT_DECL_OBJDUMP])
7786m4_require([_LT_DECL_DLLTOOL])
7787AC_CACHE_CHECK([how to associate runtime and link libraries],
7788lt_cv_sharedlib_from_linklib_cmd,
7789[lt_cv_sharedlib_from_linklib_cmd='unknown'
7790
7791case $host_os in
7792cygwin* | mingw* | pw32* | cegcc*)
7793  # two different shell functions defined in ltmain.sh;
7794  # decide which one to use based on capabilities of $DLLTOOL
7795  case `$DLLTOOL --help 2>&1` in
7796  *--identify-strict*)
7797    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
7798    ;;
7799  *)
7800    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
7801    ;;
7802  esac
7803  ;;
7804*)
7805  # fallback: assume linklib IS sharedlib
7806  lt_cv_sharedlib_from_linklib_cmd=$ECHO
7807  ;;
7808esac
7809])
7810sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
7811test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
7812
7813_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
7814    [Command to associate shared and link libraries])
7815])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
7816
7817
7818# _LT_PATH_MANIFEST_TOOL
7819# ----------------------
7820# locate the manifest tool
7821m4_defun([_LT_PATH_MANIFEST_TOOL],
7822[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
7823test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
7824AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
7825  [lt_cv_path_mainfest_tool=no
7826  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
7827  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
7828  cat conftest.err >&AS_MESSAGE_LOG_FD
7829  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
7830    lt_cv_path_mainfest_tool=yes
7831  fi
7832  rm -f conftest*])
7833if test yes != "$lt_cv_path_mainfest_tool"; then
7834  MANIFEST_TOOL=:
7835fi
7836_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
7837])# _LT_PATH_MANIFEST_TOOL
7838
7839
7840# _LT_DLL_DEF_P([FILE])
7841# ---------------------
7842# True iff FILE is a Windows DLL '.def' file.
7843# Keep in sync with func_dll_def_p in the libtool script
7844AC_DEFUN([_LT_DLL_DEF_P],
7845[dnl
7846  test DEF = "`$SED -n dnl
7847    -e '\''s/^[[	 ]]*//'\'' dnl Strip leading whitespace
7848    -e '\''/^\(;.*\)*$/d'\'' dnl      Delete empty lines and comments
7849    -e '\''s/^\(EXPORTS\|LIBRARY\)\([[	 ]].*\)*$/DEF/p'\'' dnl
7850    -e q dnl                          Only consider the first "real" line
7851    $1`" dnl
7852])# _LT_DLL_DEF_P
7853
7854
7855# LT_LIB_M
7856# --------
7857# check for math library
7858AC_DEFUN([LT_LIB_M],
7859[AC_REQUIRE([AC_CANONICAL_HOST])dnl
7860LIBM=
7861case $host in
7862*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
7863  # These system don't have libm, or don't need it
7864  ;;
7865*-ncr-sysv4.3*)
7866  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
7867  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
7868  ;;
7869*)
7870  AC_CHECK_LIB(m, cos, LIBM=-lm)
7871  ;;
7872esac
7873AC_SUBST([LIBM])
7874])# LT_LIB_M
7875
7876# Old name:
7877AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
7878dnl aclocal-1.4 backwards compatibility:
7879dnl AC_DEFUN([AC_CHECK_LIBM], [])
7880
7881
7882# _LT_COMPILER_NO_RTTI([TAGNAME])
7883# -------------------------------
7884m4_defun([_LT_COMPILER_NO_RTTI],
7885[m4_require([_LT_TAG_COMPILER])dnl
7886
7887_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
7888
7889if test yes = "$GCC"; then
7890  case $cc_basename in
7891  nvcc*)
7892    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
7893  *)
7894    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
7895  esac
7896
7897  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
7898    lt_cv_prog_compiler_rtti_exceptions,
7899    [-fno-rtti -fno-exceptions], [],
7900    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
7901fi
7902_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
7903	[Compiler flag to turn off builtin functions])
7904])# _LT_COMPILER_NO_RTTI
7905
7906
7907# _LT_CMD_GLOBAL_SYMBOLS
7908# ----------------------
7909m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
7910[AC_REQUIRE([AC_CANONICAL_HOST])dnl
7911AC_REQUIRE([AC_PROG_CC])dnl
7912AC_REQUIRE([AC_PROG_AWK])dnl
7913AC_REQUIRE([LT_PATH_NM])dnl
7914AC_REQUIRE([LT_PATH_LD])dnl
7915m4_require([_LT_DECL_SED])dnl
7916m4_require([_LT_DECL_EGREP])dnl
7917m4_require([_LT_TAG_COMPILER])dnl
7918
7919# Check for command to grab the raw symbol name followed by C symbol from nm.
7920AC_MSG_CHECKING([command to parse $NM output from $compiler object])
7921AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
7922[
7923# These are sane defaults that work on at least a few old systems.
7924# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
7925
7926# Character class describing NM global symbol codes.
7927symcode='[[BCDEGRST]]'
7928
7929# Regexp to match symbols that can be accessed directly from C.
7930sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
7931
7932# Define system-specific variables.
7933case $host_os in
7934aix*)
7935  symcode='[[BCDT]]'
7936  ;;
7937cygwin* | mingw* | pw32* | cegcc*)
7938  symcode='[[ABCDGISTW]]'
7939  ;;
7940hpux*)
7941  if test ia64 = "$host_cpu"; then
7942    symcode='[[ABCDEGRST]]'
7943  fi
7944  ;;
7945irix* | nonstopux*)
7946  symcode='[[BCDEGRST]]'
7947  ;;
7948osf*)
7949  symcode='[[BCDEGQRST]]'
7950  ;;
7951solaris*)
7952  symcode='[[BDRT]]'
7953  ;;
7954sco3.2v5*)
7955  symcode='[[DT]]'
7956  ;;
7957sysv4.2uw2*)
7958  symcode='[[DT]]'
7959  ;;
7960sysv5* | sco5v6* | unixware* | OpenUNIX*)
7961  symcode='[[ABDT]]'
7962  ;;
7963sysv4)
7964  symcode='[[DFNSTU]]'
7965  ;;
7966esac
7967
7968# If we're using GNU nm, then use its standard symbol codes.
7969case `$NM -V 2>&1` in
7970*GNU* | *'with BFD'*)
7971  symcode='[[ABCDGIRSTW]]' ;;
7972esac
7973
7974if test "$lt_cv_nm_interface" = "MS dumpbin"; then
7975  # Gets list of data symbols to import.
7976  lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'"
7977  # Adjust the below global symbol transforms to fixup imported variables.
7978  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
7979  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
7980  lt_c_name_lib_hook="\
7981  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
7982  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
7983else
7984  # Disable hooks by default.
7985  lt_cv_sys_global_symbol_to_import=
7986  lt_cdecl_hook=
7987  lt_c_name_hook=
7988  lt_c_name_lib_hook=
7989fi
7990
7991# Transform an extracted symbol line into a proper C declaration.
7992# Some systems (esp. on ia64) link data and code symbols differently,
7993# so use this general approach.
7994lt_cv_sys_global_symbol_to_cdecl="$SED -n"\
7995$lt_cdecl_hook\
7996" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
7997" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
7998
7999# Transform an extracted symbol line into symbol name and symbol address
8000lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\
8001$lt_c_name_hook\
8002" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
8003" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
8004
8005# Transform an extracted symbol line into symbol name with lib prefix and
8006# symbol address.
8007lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\
8008$lt_c_name_lib_hook\
8009" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
8010" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
8011" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
8012
8013# Handle CRLF in mingw tool chain
8014opt_cr=
8015case $build_os in
8016mingw*)
8017  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
8018  ;;
8019esac
8020
8021# Try without a prefix underscore, then with it.
8022for ac_symprfx in "" "_"; do
8023
8024  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
8025  symxfrm="\\1 $ac_symprfx\\2 \\2"
8026
8027  # Write the raw and C identifiers.
8028  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8029    # Fake it for dumpbin and say T for any non-static function,
8030    # D for any global variable and I for any imported variable.
8031    # Also find C++ and __fastcall symbols from MSVC++ or ICC,
8032    # which start with @ or ?.
8033    lt_cv_sys_global_symbol_pipe="$AWK ['"\
8034"     {last_section=section; section=\$ 3};"\
8035"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
8036"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
8037"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
8038"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
8039"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
8040"     \$ 0!~/External *\|/{next};"\
8041"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
8042"     {if(hide[section]) next};"\
8043"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
8044"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
8045"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
8046"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
8047"     ' prfx=^$ac_symprfx]"
8048  else
8049    lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
8050  fi
8051  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'"
8052
8053  # Check to see that the pipe works correctly.
8054  pipe_works=no
8055
8056  rm -f conftest*
8057  cat > conftest.$ac_ext <<_LT_EOF
8058#ifdef __cplusplus
8059extern "C" {
8060#endif
8061char nm_test_var;
8062void nm_test_func(void);
8063void nm_test_func(void){}
8064#ifdef __cplusplus
8065}
8066#endif
8067int main(){nm_test_var='a';nm_test_func();return(0);}
8068_LT_EOF
8069
8070  if AC_TRY_EVAL(ac_compile); then
8071    # Now try to grab the symbols.
8072    nlist=conftest.nm
8073    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
8074      # Try sorting and uniquifying the output.
8075      if sort "$nlist" | uniq > "$nlist"T; then
8076	mv -f "$nlist"T "$nlist"
8077      else
8078	rm -f "$nlist"T
8079      fi
8080
8081      # Make sure that we snagged all the symbols we need.
8082      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
8083	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
8084	  cat <<_LT_EOF > conftest.$ac_ext
8085/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
8086#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
8087/* DATA imports from DLLs on WIN32 can't be const, because runtime
8088   relocations are performed -- see ld's documentation on pseudo-relocs.  */
8089# define LT@&t@_DLSYM_CONST
8090#elif defined __osf__
8091/* This system does not cope well with relocations in const data.  */
8092# define LT@&t@_DLSYM_CONST
8093#else
8094# define LT@&t@_DLSYM_CONST const
8095#endif
8096
8097#ifdef __cplusplus
8098extern "C" {
8099#endif
8100
8101_LT_EOF
8102	  # Now generate the symbol file.
8103	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
8104
8105	  cat <<_LT_EOF >> conftest.$ac_ext
8106
8107/* The mapping between symbol names and symbols.  */
8108LT@&t@_DLSYM_CONST struct {
8109  const char *name;
8110  void       *address;
8111}
8112lt__PROGRAM__LTX_preloaded_symbols[[]] =
8113{
8114  { "@PROGRAM@", (void *) 0 },
8115_LT_EOF
8116	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
8117	  cat <<\_LT_EOF >> conftest.$ac_ext
8118  {0, (void *) 0}
8119};
8120
8121/* This works around a problem in FreeBSD linker */
8122#ifdef FREEBSD_WORKAROUND
8123static const void *lt_preloaded_setup() {
8124  return lt__PROGRAM__LTX_preloaded_symbols;
8125}
8126#endif
8127
8128#ifdef __cplusplus
8129}
8130#endif
8131_LT_EOF
8132	  # Now try linking the two files.
8133	  mv conftest.$ac_objext conftstm.$ac_objext
8134	  lt_globsym_save_LIBS=$LIBS
8135	  lt_globsym_save_CFLAGS=$CFLAGS
8136	  LIBS=conftstm.$ac_objext
8137	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
8138	  if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
8139	    pipe_works=yes
8140	  fi
8141	  LIBS=$lt_globsym_save_LIBS
8142	  CFLAGS=$lt_globsym_save_CFLAGS
8143	else
8144	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
8145	fi
8146      else
8147	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
8148      fi
8149    else
8150      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
8151    fi
8152  else
8153    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
8154    cat conftest.$ac_ext >&5
8155  fi
8156  rm -rf conftest* conftst*
8157
8158  # Do not use the global_symbol_pipe unless it works.
8159  if test yes = "$pipe_works"; then
8160    break
8161  else
8162    lt_cv_sys_global_symbol_pipe=
8163  fi
8164done
8165])
8166if test -z "$lt_cv_sys_global_symbol_pipe"; then
8167  lt_cv_sys_global_symbol_to_cdecl=
8168fi
8169if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
8170  AC_MSG_RESULT(failed)
8171else
8172  AC_MSG_RESULT(ok)
8173fi
8174
8175# Response file support.
8176if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8177  nm_file_list_spec='@'
8178elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
8179  nm_file_list_spec='@'
8180fi
8181
8182_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
8183    [Take the output of nm and produce a listing of raw symbols and C names])
8184_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
8185    [Transform the output of nm in a proper C declaration])
8186_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
8187    [Transform the output of nm into a list of symbols to manually relocate])
8188_LT_DECL([global_symbol_to_c_name_address],
8189    [lt_cv_sys_global_symbol_to_c_name_address], [1],
8190    [Transform the output of nm in a C name address pair])
8191_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
8192    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
8193    [Transform the output of nm in a C name address pair when lib prefix is needed])
8194_LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
8195    [The name lister interface])
8196_LT_DECL([], [nm_file_list_spec], [1],
8197    [Specify filename containing input files for $NM])
8198]) # _LT_CMD_GLOBAL_SYMBOLS
8199
8200
8201# _LT_COMPILER_PIC([TAGNAME])
8202# ---------------------------
8203m4_defun([_LT_COMPILER_PIC],
8204[m4_require([_LT_TAG_COMPILER])dnl
8205_LT_TAGVAR(lt_prog_compiler_wl, $1)=
8206_LT_TAGVAR(lt_prog_compiler_pic, $1)=
8207_LT_TAGVAR(lt_prog_compiler_static, $1)=
8208
8209m4_if([$1], [CXX], [
8210  # C++ specific cases for pic, static, wl, etc.
8211  if test yes = "$GXX"; then
8212    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8213    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
8214
8215    case $host_os in
8216    aix*)
8217      # All AIX code is PIC.
8218      if test ia64 = "$host_cpu"; then
8219	# AIX 5 now supports IA64 processor
8220	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8221      fi
8222      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
8223      ;;
8224
8225    amigaos*)
8226      case $host_cpu in
8227      powerpc)
8228            # see comment about AmigaOS4 .so support
8229            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
8230        ;;
8231      m68k)
8232            # FIXME: we need at least 68020 code to build shared libraries, but
8233            # adding the '-m68020' flag to GCC prevents building anything better,
8234            # like '-m68040'.
8235            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
8236        ;;
8237      esac
8238      ;;
8239
8240    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
8241      # PIC is the default for these OSes.
8242      ;;
8243    mingw* | cygwin* | os2* | pw32* | cegcc*)
8244      # This hack is so that the source file can tell whether it is being
8245      # built for inclusion in a dll (and should export symbols for example).
8246      # Although the cygwin gcc ignores -fPIC, still need this for old-style
8247      # (--disable-auto-import) libraries
8248      m4_if([$1], [GCJ], [],
8249	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
8250      case $host_os in
8251      os2*)
8252	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
8253	;;
8254      esac
8255      ;;
8256    darwin* | rhapsody*)
8257      # PIC is the default on this platform
8258      # Common symbols not allowed in MH_DYLIB files
8259      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
8260      ;;
8261    *djgpp*)
8262      # DJGPP does not support shared libraries at all
8263      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
8264      ;;
8265    haiku*)
8266      # PIC is the default for Haiku.
8267      # The "-static" flag exists, but is broken.
8268      _LT_TAGVAR(lt_prog_compiler_static, $1)=
8269      ;;
8270    interix[[3-9]]*)
8271      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
8272      # Instead, we relocate shared libraries at runtime.
8273      ;;
8274    sysv4*MP*)
8275      if test -d /usr/nec; then
8276	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
8277      fi
8278      ;;
8279    hpux*)
8280      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
8281      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
8282      # sets the default TLS model and affects inlining.
8283      case $host_cpu in
8284      hppa*64*)
8285	;;
8286      *)
8287	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
8288	;;
8289      esac
8290      ;;
8291    *qnx* | *nto*)
8292      # QNX uses GNU C++, but need to define -shared option too, otherwise
8293      # it will coredump.
8294      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
8295      ;;
8296    *)
8297      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
8298      ;;
8299    esac
8300  else
8301    case $host_os in
8302      aix[[4-9]]*)
8303	# All AIX code is PIC.
8304	if test ia64 = "$host_cpu"; then
8305	  # AIX 5 now supports IA64 processor
8306	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8307	else
8308	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
8309	fi
8310	;;
8311      chorus*)
8312	case $cc_basename in
8313	cxch68*)
8314	  # Green Hills C++ Compiler
8315	  # _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"
8316	  ;;
8317	esac
8318	;;
8319      mingw* | cygwin* | os2* | pw32* | cegcc*)
8320	# This hack is so that the source file can tell whether it is being
8321	# built for inclusion in a dll (and should export symbols for example).
8322	m4_if([$1], [GCJ], [],
8323	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
8324	;;
8325      dgux*)
8326	case $cc_basename in
8327	  ec++*)
8328	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8329	    ;;
8330	  ghcx*)
8331	    # Green Hills C++ Compiler
8332	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
8333	    ;;
8334	  *)
8335	    ;;
8336	esac
8337	;;
8338      freebsd* | dragonfly* | midnightbsd*)
8339	# FreeBSD uses GNU C++
8340	;;
8341      hpux9* | hpux10* | hpux11*)
8342	case $cc_basename in
8343	  CC*)
8344	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8345	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
8346	    if test ia64 != "$host_cpu"; then
8347	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
8348	    fi
8349	    ;;
8350	  aCC*)
8351	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8352	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
8353	    case $host_cpu in
8354	    hppa*64*|ia64*)
8355	      # +Z the default
8356	      ;;
8357	    *)
8358	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
8359	      ;;
8360	    esac
8361	    ;;
8362	  *)
8363	    ;;
8364	esac
8365	;;
8366      interix*)
8367	# This is c89, which is MS Visual C++ (no shared libs)
8368	# Anyone wants to do a port?
8369	;;
8370      irix5* | irix6* | nonstopux*)
8371	case $cc_basename in
8372	  CC*)
8373	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8374	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
8375	    # CC pic flag -KPIC is the default.
8376	    ;;
8377	  *)
8378	    ;;
8379	esac
8380	;;
8381      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
8382	case $cc_basename in
8383	  KCC*)
8384	    # KAI C++ Compiler
8385	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
8386	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
8387	    ;;
8388	  ecpc* )
8389	    # old Intel C++ for x86_64, which still supported -KPIC.
8390	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8391	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8392	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
8393	    ;;
8394	  icpc* )
8395	    # Intel C++, used to be incompatible with GCC.
8396	    # ICC 10 doesn't accept -KPIC any more.
8397	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8398	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
8399	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
8400	    ;;
8401	  pgCC* | pgcpp*)
8402	    # Portland Group C++ compiler
8403	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8404	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
8405	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8406	    ;;
8407	  cxx*)
8408	    # Compaq C++
8409	    # Make sure the PIC flag is empty.  It appears that all Alpha
8410	    # Linux and Compaq Tru64 Unix objects are PIC.
8411	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
8412	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
8413	    ;;
8414	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
8415	    # IBM XL 8.0, 9.0 on PPC and BlueGene
8416	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8417	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
8418	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
8419	    ;;
8420	  *)
8421	    case `$CC -V 2>&1 | $SED 5q` in
8422	    *Sun\ C*)
8423	      # Sun C++ 5.9
8424	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8425	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8426	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
8427	      ;;
8428	    esac
8429	    ;;
8430	esac
8431	;;
8432      lynxos*)
8433	;;
8434      m88k*)
8435	;;
8436      mvs*)
8437	case $cc_basename in
8438	  cxx*)
8439	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
8440	    ;;
8441	  *)
8442	    ;;
8443	esac
8444	;;
8445      netbsd*)
8446	;;
8447      *qnx* | *nto*)
8448        # QNX uses GNU C++, but need to define -shared option too, otherwise
8449        # it will coredump.
8450        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
8451        ;;
8452      osf3* | osf4* | osf5*)
8453	case $cc_basename in
8454	  KCC*)
8455	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
8456	    ;;
8457	  RCC*)
8458	    # Rational C++ 2.4.1
8459	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
8460	    ;;
8461	  cxx*)
8462	    # Digital/Compaq C++
8463	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8464	    # Make sure the PIC flag is empty.  It appears that all Alpha
8465	    # Linux and Compaq Tru64 Unix objects are PIC.
8466	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
8467	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
8468	    ;;
8469	  *)
8470	    ;;
8471	esac
8472	;;
8473      psos*)
8474	;;
8475      solaris*)
8476	case $cc_basename in
8477	  CC* | sunCC*)
8478	    # Sun C++ 4.2, 5.x and Centerline C++
8479	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8480	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8481	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
8482	    ;;
8483	  gcx*)
8484	    # Green Hills C++ Compiler
8485	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
8486	    ;;
8487	  *)
8488	    ;;
8489	esac
8490	;;
8491      sunos4*)
8492	case $cc_basename in
8493	  CC*)
8494	    # Sun C++ 4.x
8495	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
8496	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8497	    ;;
8498	  lcc*)
8499	    # Lucid
8500	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
8501	    ;;
8502	  *)
8503	    ;;
8504	esac
8505	;;
8506      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
8507	case $cc_basename in
8508	  CC*)
8509	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8510	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8511	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8512	    ;;
8513	esac
8514	;;
8515      tandem*)
8516	case $cc_basename in
8517	  NCC*)
8518	    # NonStop-UX NCC 3.20
8519	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8520	    ;;
8521	  *)
8522	    ;;
8523	esac
8524	;;
8525      vxworks*)
8526	;;
8527      *)
8528	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
8529	;;
8530    esac
8531  fi
8532],
8533[
8534  if test yes = "$GCC"; then
8535    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8536    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
8537
8538    case $host_os in
8539      aix*)
8540      # All AIX code is PIC.
8541      if test ia64 = "$host_cpu"; then
8542	# AIX 5 now supports IA64 processor
8543	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8544      fi
8545      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
8546      ;;
8547
8548    amigaos*)
8549      case $host_cpu in
8550      powerpc)
8551            # see comment about AmigaOS4 .so support
8552            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
8553        ;;
8554      m68k)
8555            # FIXME: we need at least 68020 code to build shared libraries, but
8556            # adding the '-m68020' flag to GCC prevents building anything better,
8557            # like '-m68040'.
8558            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
8559        ;;
8560      esac
8561      ;;
8562
8563    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
8564      # PIC is the default for these OSes.
8565      ;;
8566
8567    mingw* | cygwin* | pw32* | os2* | cegcc*)
8568      # This hack is so that the source file can tell whether it is being
8569      # built for inclusion in a dll (and should export symbols for example).
8570      # Although the cygwin gcc ignores -fPIC, still need this for old-style
8571      # (--disable-auto-import) libraries
8572      m4_if([$1], [GCJ], [],
8573	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
8574      case $host_os in
8575      os2*)
8576	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
8577	;;
8578      esac
8579      ;;
8580
8581    darwin* | rhapsody*)
8582      # PIC is the default on this platform
8583      # Common symbols not allowed in MH_DYLIB files
8584      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
8585      ;;
8586
8587    haiku*)
8588      # PIC is the default for Haiku.
8589      # The "-static" flag exists, but is broken.
8590      _LT_TAGVAR(lt_prog_compiler_static, $1)=
8591      ;;
8592
8593    hpux*)
8594      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
8595      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
8596      # sets the default TLS model and affects inlining.
8597      case $host_cpu in
8598      hppa*64*)
8599	# +Z the default
8600	;;
8601      *)
8602	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
8603	;;
8604      esac
8605      ;;
8606
8607    interix[[3-9]]*)
8608      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
8609      # Instead, we relocate shared libraries at runtime.
8610      ;;
8611
8612    msdosdjgpp*)
8613      # Just because we use GCC doesn't mean we suddenly get shared libraries
8614      # on systems that don't support them.
8615      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
8616      enable_shared=no
8617      ;;
8618
8619    *nto* | *qnx*)
8620      # QNX uses GNU C++, but need to define -shared option too, otherwise
8621      # it will coredump.
8622      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
8623      ;;
8624
8625    sysv4*MP*)
8626      if test -d /usr/nec; then
8627	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
8628      fi
8629      ;;
8630
8631    *)
8632      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
8633      ;;
8634    esac
8635
8636    case $cc_basename in
8637    nvcc*) # Cuda Compiler Driver 2.2
8638      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
8639      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
8640        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
8641      fi
8642      ;;
8643    esac
8644  else
8645    # PORTME Check for flag to pass linker flags through the system compiler.
8646    case $host_os in
8647    aix*)
8648      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8649      if test ia64 = "$host_cpu"; then
8650	# AIX 5 now supports IA64 processor
8651	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8652      else
8653	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
8654      fi
8655      ;;
8656
8657    darwin* | rhapsody*)
8658      # PIC is the default on this platform
8659      # Common symbols not allowed in MH_DYLIB files
8660      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
8661      case $cc_basename in
8662      nagfor*)
8663        # NAG Fortran compiler
8664        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
8665        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
8666        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8667        ;;
8668      esac
8669      ;;
8670
8671    mingw* | cygwin* | pw32* | os2* | cegcc*)
8672      # This hack is so that the source file can tell whether it is being
8673      # built for inclusion in a dll (and should export symbols for example).
8674      m4_if([$1], [GCJ], [],
8675	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
8676      case $host_os in
8677      os2*)
8678	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
8679	;;
8680      esac
8681      ;;
8682
8683    hpux9* | hpux10* | hpux11*)
8684      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8685      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
8686      # not for PA HP-UX.
8687      case $host_cpu in
8688      hppa*64*|ia64*)
8689	# +Z the default
8690	;;
8691      *)
8692	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
8693	;;
8694      esac
8695      # Is there a better lt_prog_compiler_static that works with the bundled CC?
8696      _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
8697      ;;
8698
8699    irix5* | irix6* | nonstopux*)
8700      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8701      # PIC (with -KPIC) is the default.
8702      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
8703      ;;
8704
8705    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
8706      case $cc_basename in
8707      # old Intel for x86_64, which still supported -KPIC.
8708      ecc*)
8709	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8710	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8711	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
8712        ;;
8713      # icc used to be incompatible with GCC.
8714      # ICC 10 doesn't accept -KPIC any more.
8715      icc* | ifort*)
8716	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8717	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
8718	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
8719        ;;
8720      # Lahey Fortran 8.1.
8721      lf95*)
8722	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8723	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
8724	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
8725	;;
8726      nagfor*)
8727	# NAG Fortran compiler
8728	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
8729	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
8730	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8731	;;
8732      tcc*)
8733	# Fabrice Bellard et al's Tiny C Compiler
8734	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8735	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
8736	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
8737	;;
8738      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
8739        # Portland Group compilers (*not* the Pentium gcc compiler,
8740	# which looks to be a dead project)
8741	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8742	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
8743	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8744        ;;
8745      ccc*)
8746        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8747        # All Alpha code is PIC.
8748        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
8749        ;;
8750      xl* | bgxl* | bgf* | mpixl*)
8751	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
8752	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8753	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
8754	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
8755	;;
8756      *)
8757	case `$CC -V 2>&1 | $SED 5q` in
8758	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
8759	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
8760	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8761	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8762	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
8763	  ;;
8764	*Sun\ F* | *Sun*Fortran*)
8765	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8766	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8767	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
8768	  ;;
8769	*Sun\ C*)
8770	  # Sun C 5.9
8771	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8772	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8773	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8774	  ;;
8775        *Intel*\ [[CF]]*Compiler*)
8776	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8777	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
8778	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
8779	  ;;
8780	*Portland\ Group*)
8781	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8782	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
8783	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8784	  ;;
8785	esac
8786	;;
8787      esac
8788      ;;
8789
8790    newsos6)
8791      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8792      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8793      ;;
8794
8795    *nto* | *qnx*)
8796      # QNX uses GNU C++, but need to define -shared option too, otherwise
8797      # it will coredump.
8798      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
8799      ;;
8800
8801    osf3* | osf4* | osf5*)
8802      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8803      # All OSF/1 code is PIC.
8804      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
8805      ;;
8806
8807    rdos*)
8808      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
8809      ;;
8810
8811    solaris*)
8812      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8813      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8814      case $cc_basename in
8815      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
8816	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
8817      *)
8818	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
8819      esac
8820      ;;
8821
8822    sunos4*)
8823      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
8824      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
8825      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8826      ;;
8827
8828    sysv4 | sysv4.2uw2* | sysv4.3*)
8829      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8830      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8831      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8832      ;;
8833
8834    sysv4*MP*)
8835      if test -d /usr/nec; then
8836	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
8837	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8838      fi
8839      ;;
8840
8841    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
8842      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8843      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8844      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8845      ;;
8846
8847    unicos*)
8848      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8849      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
8850      ;;
8851
8852    uts4*)
8853      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
8854      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8855      ;;
8856
8857    *)
8858      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
8859      ;;
8860    esac
8861  fi
8862])
8863case $host_os in
8864  # For platforms that do not support PIC, -DPIC is meaningless:
8865  *djgpp*)
8866    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
8867    ;;
8868  *)
8869    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
8870    ;;
8871esac
8872
8873AC_CACHE_CHECK([for $compiler option to produce PIC],
8874  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
8875  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
8876_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
8877
8878#
8879# Check to make sure the PIC flag actually works.
8880#
8881if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
8882  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
8883    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
8884    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
8885    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
8886     "" | " "*) ;;
8887     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
8888     esac],
8889    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
8890     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
8891fi
8892_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
8893	[Additional compiler flags for building library objects])
8894
8895_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
8896	[How to pass a linker flag through the compiler])
8897#
8898# Check to make sure the static flag actually works.
8899#
8900wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
8901_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
8902  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
8903  $lt_tmp_static_flag,
8904  [],
8905  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
8906_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
8907	[Compiler flag to prevent dynamic linking])
8908])# _LT_COMPILER_PIC
8909
8910
8911# _LT_LINKER_SHLIBS([TAGNAME])
8912# ----------------------------
8913# See if the linker supports building shared libraries.
8914m4_defun([_LT_LINKER_SHLIBS],
8915[AC_REQUIRE([LT_PATH_LD])dnl
8916AC_REQUIRE([LT_PATH_NM])dnl
8917m4_require([_LT_PATH_MANIFEST_TOOL])dnl
8918m4_require([_LT_FILEUTILS_DEFAULTS])dnl
8919m4_require([_LT_DECL_EGREP])dnl
8920m4_require([_LT_DECL_SED])dnl
8921m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
8922m4_require([_LT_TAG_COMPILER])dnl
8923AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
8924m4_if([$1], [CXX], [
8925  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
8926  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
8927  case $host_os in
8928  aix[[4-9]]*)
8929    # If we're using GNU nm, then we don't want the "-C" option.
8930    # -C means demangle to GNU nm, but means don't demangle to AIX nm.
8931    # Without the "-l" option, or with the "-B" option, AIX nm treats
8932    # weak defined symbols like other global defined symbols, whereas
8933    # GNU nm marks them as "W".
8934    # While the 'weak' keyword is ignored in the Export File, we need
8935    # it in the Import File for the 'aix-soname' feature, so we have
8936    # to replace the "-B" option with "-P" for AIX nm.
8937    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
8938      _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'
8939    else
8940      _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'
8941    fi
8942    ;;
8943  pw32*)
8944    _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
8945    ;;
8946  cygwin* | mingw* | cegcc*)
8947    case $cc_basename in
8948    cl* | icl*)
8949      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
8950      ;;
8951    *)
8952      _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'
8953      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
8954      ;;
8955    esac
8956    ;;
8957  *)
8958    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
8959    ;;
8960  esac
8961], [
8962  runpath_var=
8963  _LT_TAGVAR(allow_undefined_flag, $1)=
8964  _LT_TAGVAR(always_export_symbols, $1)=no
8965  _LT_TAGVAR(archive_cmds, $1)=
8966  _LT_TAGVAR(archive_expsym_cmds, $1)=
8967  _LT_TAGVAR(compiler_needs_object, $1)=no
8968  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8969  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
8970  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
8971  _LT_TAGVAR(hardcode_automatic, $1)=no
8972  _LT_TAGVAR(hardcode_direct, $1)=no
8973  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8974  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8975  _LT_TAGVAR(hardcode_libdir_separator, $1)=
8976  _LT_TAGVAR(hardcode_minus_L, $1)=no
8977  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
8978  _LT_TAGVAR(inherit_rpath, $1)=no
8979  _LT_TAGVAR(link_all_deplibs, $1)=unknown
8980  _LT_TAGVAR(module_cmds, $1)=
8981  _LT_TAGVAR(module_expsym_cmds, $1)=
8982  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
8983  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
8984  _LT_TAGVAR(thread_safe_flag_spec, $1)=
8985  _LT_TAGVAR(whole_archive_flag_spec, $1)=
8986  # include_expsyms should be a list of space-separated symbols to be *always*
8987  # included in the symbol list
8988  _LT_TAGVAR(include_expsyms, $1)=
8989  # exclude_expsyms can be an extended regexp of symbols to exclude
8990  # it will be wrapped by ' (' and ')$', so one must not match beginning or
8991  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
8992  # as well as any symbol that contains 'd'.
8993  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
8994  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
8995  # platforms (ab)use it in PIC code, but their linkers get confused if
8996  # the symbol is explicitly referenced.  Since portable code cannot
8997  # rely on this symbol name, it's probably fine to never include it in
8998  # preloaded symbol tables.
8999  # Exclude shared library initialization/finalization symbols.
9000dnl Note also adjust exclude_expsyms for C++ above.
9001  extract_expsyms_cmds=
9002
9003  case $host_os in
9004  cygwin* | mingw* | pw32* | cegcc*)
9005    # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
9006    # When not using gcc, we currently assume that we are using
9007    # Microsoft Visual C++ or Intel C++ Compiler.
9008    if test yes != "$GCC"; then
9009      with_gnu_ld=no
9010    fi
9011    ;;
9012  interix*)
9013    # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
9014    with_gnu_ld=yes
9015    ;;
9016  openbsd* | bitrig*)
9017    with_gnu_ld=no
9018    ;;
9019  esac
9020
9021  _LT_TAGVAR(ld_shlibs, $1)=yes
9022
9023  # On some targets, GNU ld is compatible enough with the native linker
9024  # that we're better off using the native interface for both.
9025  lt_use_gnu_ld_interface=no
9026  if test yes = "$with_gnu_ld"; then
9027    case $host_os in
9028      aix*)
9029	# The AIX port of GNU ld has always aspired to compatibility
9030	# with the native linker.  However, as the warning in the GNU ld
9031	# block says, versions before 2.19.5* couldn't really create working
9032	# shared libraries, regardless of the interface used.
9033	case `$LD -v 2>&1` in
9034	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
9035	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
9036	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
9037	  *)
9038	    lt_use_gnu_ld_interface=yes
9039	    ;;
9040	esac
9041	;;
9042      *)
9043	lt_use_gnu_ld_interface=yes
9044	;;
9045    esac
9046  fi
9047
9048  if test yes = "$lt_use_gnu_ld_interface"; then
9049    # If archive_cmds runs LD, not CC, wlarc should be empty
9050    wlarc='$wl'
9051
9052    # Set some defaults for GNU ld with shared library support. These
9053    # are reset later if shared libraries are not supported. Putting them
9054    # here allows them to be overridden if necessary.
9055    runpath_var=LD_RUN_PATH
9056    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
9057    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
9058    # ancient GNU ld didn't support --whole-archive et. al.
9059    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
9060      _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
9061    else
9062      _LT_TAGVAR(whole_archive_flag_spec, $1)=
9063    fi
9064    supports_anon_versioning=no
9065    case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in
9066      *GNU\ gold*) supports_anon_versioning=yes ;;
9067      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
9068      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
9069      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
9070      *\ 2.11.*) ;; # other 2.11 versions
9071      *) supports_anon_versioning=yes ;;
9072    esac
9073
9074    # See if GNU ld supports shared libraries.
9075    case $host_os in
9076    aix[[3-9]]*)
9077      # On AIX/PPC, the GNU linker is very broken
9078      if test ia64 != "$host_cpu"; then
9079	_LT_TAGVAR(ld_shlibs, $1)=no
9080	cat <<_LT_EOF 1>&2
9081
9082*** Warning: the GNU linker, at least up to release 2.19, is reported
9083*** to be unable to reliably create shared libraries on AIX.
9084*** Therefore, libtool is disabling shared libraries support.  If you
9085*** really care for shared libraries, you may want to install binutils
9086*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
9087*** You will then need to restart the configuration process.
9088
9089_LT_EOF
9090      fi
9091      ;;
9092
9093    amigaos*)
9094      case $host_cpu in
9095      powerpc)
9096            # see comment about AmigaOS4 .so support
9097            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
9098            _LT_TAGVAR(archive_expsym_cmds, $1)=''
9099        ;;
9100      m68k)
9101            _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)'
9102            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9103            _LT_TAGVAR(hardcode_minus_L, $1)=yes
9104        ;;
9105      esac
9106      ;;
9107
9108    beos*)
9109      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
9110	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
9111	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
9112	# support --undefined.  This deserves some investigation.  FIXME
9113	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
9114      else
9115	_LT_TAGVAR(ld_shlibs, $1)=no
9116      fi
9117      ;;
9118
9119    cygwin* | mingw* | pw32* | cegcc*)
9120      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
9121      # as there is no search path for DLLs.
9122      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9123      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
9124      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
9125      _LT_TAGVAR(always_export_symbols, $1)=no
9126      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
9127      _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'
9128      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
9129
9130      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
9131        _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'
9132	# If the export-symbols file already is a .def file, use it as
9133	# is; otherwise, prepend EXPORTS...
9134	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
9135          cp $export_symbols $output_objdir/$soname.def;
9136        else
9137          echo EXPORTS > $output_objdir/$soname.def;
9138          cat $export_symbols >> $output_objdir/$soname.def;
9139        fi~
9140        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
9141      else
9142	_LT_TAGVAR(ld_shlibs, $1)=no
9143      fi
9144      ;;
9145
9146    haiku*)
9147      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
9148      _LT_TAGVAR(link_all_deplibs, $1)=yes
9149      ;;
9150
9151    os2*)
9152      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9153      _LT_TAGVAR(hardcode_minus_L, $1)=yes
9154      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
9155      shrext_cmds=.dll
9156      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
9157	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
9158	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
9159	$ECHO EXPORTS >> $output_objdir/$libname.def~
9160	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
9161	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
9162	emximp -o $lib $output_objdir/$libname.def'
9163      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
9164	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
9165	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
9166	$ECHO EXPORTS >> $output_objdir/$libname.def~
9167	prefix_cmds="$SED"~
9168	if test EXPORTS = "`$SED 1q $export_symbols`"; then
9169	  prefix_cmds="$prefix_cmds -e 1d";
9170	fi~
9171	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
9172	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
9173	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
9174	emximp -o $lib $output_objdir/$libname.def'
9175      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
9176      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
9177      _LT_TAGVAR(file_list_spec, $1)='@'
9178      ;;
9179
9180    interix[[3-9]]*)
9181      _LT_TAGVAR(hardcode_direct, $1)=no
9182      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9183      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
9184      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
9185      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
9186      # Instead, shared libraries are loaded at an image base (0x10000000 by
9187      # default) and relocated if they conflict, which is a slow very memory
9188      # consuming and fragmenting process.  To avoid this, we pick a random,
9189      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
9190      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
9191      _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'
9192      _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'
9193      ;;
9194
9195    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
9196      tmp_diet=no
9197      if test linux-dietlibc = "$host_os"; then
9198	case $cc_basename in
9199	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
9200	esac
9201      fi
9202      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
9203	 && test no = "$tmp_diet"
9204      then
9205	tmp_addflag=' $pic_flag'
9206	tmp_sharedflag='-shared'
9207	case $cc_basename,$host_cpu in
9208        pgcc*)				# Portland Group C compiler
9209	  _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'
9210	  tmp_addflag=' $pic_flag'
9211	  ;;
9212	pgf77* | pgf90* | pgf95* | pgfortran*)
9213					# Portland Group f77 and f90 compilers
9214	  _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'
9215	  tmp_addflag=' $pic_flag -Mnomain' ;;
9216	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
9217	  tmp_addflag=' -i_dynamic' ;;
9218	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
9219	  tmp_addflag=' -i_dynamic -nofor_main' ;;
9220	ifc* | ifort*)			# Intel Fortran compiler
9221	  tmp_addflag=' -nofor_main' ;;
9222	lf95*)				# Lahey Fortran 8.1
9223	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
9224	  tmp_sharedflag='--shared' ;;
9225        nagfor*)                        # NAGFOR 5.3
9226          tmp_sharedflag='-Wl,-shared' ;;
9227	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
9228	  tmp_sharedflag='-qmkshrobj'
9229	  tmp_addflag= ;;
9230	nvcc*)	# Cuda Compiler Driver 2.2
9231	  _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'
9232	  _LT_TAGVAR(compiler_needs_object, $1)=yes
9233	  ;;
9234	esac
9235	case `$CC -V 2>&1 | $SED 5q` in
9236	*Sun\ C*)			# Sun C 5.9
9237	  _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'
9238	  _LT_TAGVAR(compiler_needs_object, $1)=yes
9239	  tmp_sharedflag='-G' ;;
9240	*Sun\ F*)			# Sun Fortran 8.3
9241	  tmp_sharedflag='-G' ;;
9242	esac
9243	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
9244
9245        if test yes = "$supports_anon_versioning"; then
9246          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
9247            cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
9248            echo "local: *; };" >> $output_objdir/$libname.ver~
9249            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
9250        fi
9251
9252	case $cc_basename in
9253	tcc*)
9254	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
9255	  ;;
9256	xlf* | bgf* | bgxlf* | mpixlf*)
9257	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
9258	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
9259	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
9260	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
9261	  if test yes = "$supports_anon_versioning"; then
9262	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
9263              cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
9264              echo "local: *; };" >> $output_objdir/$libname.ver~
9265              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
9266	  fi
9267	  ;;
9268	esac
9269      else
9270        _LT_TAGVAR(ld_shlibs, $1)=no
9271      fi
9272      ;;
9273
9274    netbsd*)
9275      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
9276	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
9277	wlarc=
9278      else
9279	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
9280	_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'
9281      fi
9282      ;;
9283
9284    solaris*)
9285      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
9286	_LT_TAGVAR(ld_shlibs, $1)=no
9287	cat <<_LT_EOF 1>&2
9288
9289*** Warning: The releases 2.8.* of the GNU linker cannot reliably
9290*** create shared libraries on Solaris systems.  Therefore, libtool
9291*** is disabling shared libraries support.  We urge you to upgrade GNU
9292*** binutils to release 2.9.1 or newer.  Another option is to modify
9293*** your PATH or compiler configuration so that the native linker is
9294*** used, and then restart.
9295
9296_LT_EOF
9297      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
9298	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
9299	_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'
9300      else
9301	_LT_TAGVAR(ld_shlibs, $1)=no
9302      fi
9303      ;;
9304
9305    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
9306      case `$LD -v 2>&1` in
9307        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
9308	_LT_TAGVAR(ld_shlibs, $1)=no
9309	cat <<_LT_EOF 1>&2
9310
9311*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
9312*** reliably create shared libraries on SCO systems.  Therefore, libtool
9313*** is disabling shared libraries support.  We urge you to upgrade GNU
9314*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
9315*** your PATH or compiler configuration so that the native linker is
9316*** used, and then restart.
9317
9318_LT_EOF
9319	;;
9320	*)
9321	  # For security reasons, it is highly recommended that you always
9322	  # use absolute paths for naming shared libraries, and exclude the
9323	  # DT_RUNPATH tag from executables and libraries.  But doing so
9324	  # requires that you compile everything twice, which is a pain.
9325	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
9326	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
9327	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
9328	    _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'
9329	  else
9330	    _LT_TAGVAR(ld_shlibs, $1)=no
9331	  fi
9332	;;
9333      esac
9334      ;;
9335
9336    sunos4*)
9337      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9338      wlarc=
9339      _LT_TAGVAR(hardcode_direct, $1)=yes
9340      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9341      ;;
9342
9343    *)
9344      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
9345	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
9346	_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'
9347      else
9348	_LT_TAGVAR(ld_shlibs, $1)=no
9349      fi
9350      ;;
9351    esac
9352
9353    if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
9354      runpath_var=
9355      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
9356      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
9357      _LT_TAGVAR(whole_archive_flag_spec, $1)=
9358    fi
9359  else
9360    # PORTME fill in a description of your system's linker (not GNU ld)
9361    case $host_os in
9362    aix3*)
9363      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
9364      _LT_TAGVAR(always_export_symbols, $1)=yes
9365      _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'
9366      # Note: this linker hardcodes the directories in LIBPATH if there
9367      # are no directories specified by -L.
9368      _LT_TAGVAR(hardcode_minus_L, $1)=yes
9369      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
9370	# Neither direct hardcoding nor static linking is supported with a
9371	# broken collect2.
9372	_LT_TAGVAR(hardcode_direct, $1)=unsupported
9373      fi
9374      ;;
9375
9376    aix[[4-9]]*)
9377      if test ia64 = "$host_cpu"; then
9378	# On IA64, the linker does run time linking by default, so we don't
9379	# have to do anything special.
9380	aix_use_runtimelinking=no
9381	exp_sym_flag='-Bexport'
9382	no_entry_flag=
9383      else
9384	# If we're using GNU nm, then we don't want the "-C" option.
9385	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
9386	# Without the "-l" option, or with the "-B" option, AIX nm treats
9387	# weak defined symbols like other global defined symbols, whereas
9388	# GNU nm marks them as "W".
9389	# While the 'weak' keyword is ignored in the Export File, we need
9390	# it in the Import File for the 'aix-soname' feature, so we have
9391	# to replace the "-B" option with "-P" for AIX nm.
9392	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
9393	  _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'
9394	else
9395	  _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'
9396	fi
9397	aix_use_runtimelinking=no
9398
9399	# Test if we are trying to use run time linking or normal
9400	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
9401	# have runtime linking enabled, and use it for executables.
9402	# For shared libraries, we enable/disable runtime linking
9403	# depending on the kind of the shared library created -
9404	# when "with_aix_soname,aix_use_runtimelinking" is:
9405	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
9406	# "aix,yes"  lib.so          shared, rtl:yes, for executables
9407	#            lib.a           static archive
9408	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
9409	#            lib.a(lib.so.V) shared, rtl:no,  for executables
9410	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
9411	#            lib.a(lib.so.V) shared, rtl:no
9412	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
9413	#            lib.a           static archive
9414	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
9415	  for ld_flag in $LDFLAGS; do
9416	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
9417	    aix_use_runtimelinking=yes
9418	    break
9419	  fi
9420	  done
9421	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
9422	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
9423	    # so we don't have lib.a shared libs to link our executables.
9424	    # We have to force runtime linking in this case.
9425	    aix_use_runtimelinking=yes
9426	    LDFLAGS="$LDFLAGS -Wl,-brtl"
9427	  fi
9428	  ;;
9429	esac
9430
9431	exp_sym_flag='-bexport'
9432	no_entry_flag='-bnoentry'
9433      fi
9434
9435      # When large executables or shared objects are built, AIX ld can
9436      # have problems creating the table of contents.  If linking a library
9437      # or program results in "error TOC overflow" add -mminimal-toc to
9438      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
9439      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
9440
9441      _LT_TAGVAR(archive_cmds, $1)=''
9442      _LT_TAGVAR(hardcode_direct, $1)=yes
9443      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
9444      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
9445      _LT_TAGVAR(link_all_deplibs, $1)=yes
9446      _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
9447      case $with_aix_soname,$aix_use_runtimelinking in
9448      aix,*) ;; # traditional, no import file
9449      svr4,* | *,yes) # use import file
9450	# The Import File defines what to hardcode.
9451	_LT_TAGVAR(hardcode_direct, $1)=no
9452	_LT_TAGVAR(hardcode_direct_absolute, $1)=no
9453	;;
9454      esac
9455
9456      if test yes = "$GCC"; then
9457	case $host_os in aix4.[[012]]|aix4.[[012]].*)
9458	# We only want to do this on AIX 4.2 and lower, the check
9459	# below for broken collect2 doesn't work under 4.3+
9460	  collect2name=`$CC -print-prog-name=collect2`
9461	  if test -f "$collect2name" &&
9462	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
9463	  then
9464	  # We have reworked collect2
9465	  :
9466	  else
9467	  # We have old collect2
9468	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
9469	  # It fails to find uninstalled libraries when the uninstalled
9470	  # path is not listed in the libpath.  Setting hardcode_minus_L
9471	  # to unsupported forces relinking
9472	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
9473	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9474	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
9475	  fi
9476	  ;;
9477	esac
9478	shared_flag='-shared'
9479	if test yes = "$aix_use_runtimelinking"; then
9480	  shared_flag="$shared_flag "'$wl-G'
9481	fi
9482	# Need to ensure runtime linking is disabled for the traditional
9483	# shared library, or the linker may eventually find shared libraries
9484	# /with/ Import File - we do not want to mix them.
9485	shared_flag_aix='-shared'
9486	shared_flag_svr4='-shared $wl-G'
9487      else
9488	# not using gcc
9489	if test ia64 = "$host_cpu"; then
9490	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
9491	# chokes on -Wl,-G. The following line is correct:
9492	  shared_flag='-G'
9493	else
9494	  if test yes = "$aix_use_runtimelinking"; then
9495	    shared_flag='$wl-G'
9496	  else
9497	    shared_flag='$wl-bM:SRE'
9498	  fi
9499	  shared_flag_aix='$wl-bM:SRE'
9500	  shared_flag_svr4='$wl-G'
9501	fi
9502      fi
9503
9504      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
9505      # It seems that -bexpall does not export symbols beginning with
9506      # underscore (_), so it is better to generate a list of symbols to export.
9507      _LT_TAGVAR(always_export_symbols, $1)=yes
9508      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
9509	# Warning - without using the other runtime loading flags (-brtl),
9510	# -berok will link without error, but may produce a broken library.
9511	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
9512        # Determine the default libpath from the value encoded in an
9513        # empty executable.
9514        _LT_SYS_MODULE_PATH_AIX([$1])
9515        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
9516        _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
9517      else
9518	if test ia64 = "$host_cpu"; then
9519	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
9520	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
9521	  _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"
9522	else
9523	 # Determine the default libpath from the value encoded in an
9524	 # empty executable.
9525	 _LT_SYS_MODULE_PATH_AIX([$1])
9526	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
9527	  # Warning - without using the other run time loading flags,
9528	  # -berok will link without error, but may produce a broken library.
9529	  _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
9530	  _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
9531	  if test yes = "$with_gnu_ld"; then
9532	    # We only use this code for GNU lds that support --whole-archive.
9533	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
9534	  else
9535	    # Exported symbols can be pulled into shared objects from archives
9536	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
9537	  fi
9538	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
9539	  _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
9540	  # -brtl affects multiple linker settings, -berok does not and is overridden later
9541	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
9542	  if test svr4 != "$with_aix_soname"; then
9543	    # This is similar to how AIX traditionally builds its shared libraries.
9544	    _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'
9545	  fi
9546	  if test aix != "$with_aix_soname"; then
9547	    _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'
9548	  else
9549	    # used by -dlpreopen to get the symbols
9550	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
9551	  fi
9552	  _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
9553	fi
9554      fi
9555      ;;
9556
9557    amigaos*)
9558      case $host_cpu in
9559      powerpc)
9560            # see comment about AmigaOS4 .so support
9561            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
9562            _LT_TAGVAR(archive_expsym_cmds, $1)=''
9563        ;;
9564      m68k)
9565            _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)'
9566            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9567            _LT_TAGVAR(hardcode_minus_L, $1)=yes
9568        ;;
9569      esac
9570      ;;
9571
9572    bsdi[[45]]*)
9573      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
9574      ;;
9575
9576    cygwin* | mingw* | pw32* | cegcc*)
9577      # When not using gcc, we currently assume that we are using
9578      # Microsoft Visual C++ or Intel C++ Compiler.
9579      # hardcode_libdir_flag_spec is actually meaningless, as there is
9580      # no search path for DLLs.
9581      case $cc_basename in
9582      cl* | icl*)
9583	# Native MSVC or ICC
9584	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
9585	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
9586	_LT_TAGVAR(always_export_symbols, $1)=yes
9587	_LT_TAGVAR(file_list_spec, $1)='@'
9588	# Tell ltmain to make .lib files, not .a files.
9589	libext=lib
9590	# Tell ltmain to make .dll files, not .so files.
9591	shrext_cmds=.dll
9592	# FIXME: Setting linknames here is a bad hack.
9593	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
9594	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
9595            cp "$export_symbols" "$output_objdir/$soname.def";
9596            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
9597          else
9598            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
9599          fi~
9600          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
9601          linknames='
9602	# The linker will not automatically build a static lib if we build a DLL.
9603	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
9604	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
9605	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
9606	_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'
9607	# Don't use ranlib
9608	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
9609	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
9610          lt_tool_outputfile="@TOOL_OUTPUT@"~
9611          case $lt_outputfile in
9612            *.exe|*.EXE) ;;
9613            *)
9614              lt_outputfile=$lt_outputfile.exe
9615              lt_tool_outputfile=$lt_tool_outputfile.exe
9616              ;;
9617          esac~
9618          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
9619            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
9620            $RM "$lt_outputfile.manifest";
9621          fi'
9622	;;
9623      *)
9624	# Assume MSVC and ICC wrapper
9625	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
9626	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
9627	# Tell ltmain to make .lib files, not .a files.
9628	libext=lib
9629	# Tell ltmain to make .dll files, not .so files.
9630	shrext_cmds=.dll
9631	# FIXME: Setting linknames here is a bad hack.
9632	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
9633	# The linker will automatically build a .lib file if we build a DLL.
9634	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
9635	# FIXME: Should let the user specify the lib program.
9636	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
9637	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
9638	;;
9639      esac
9640      ;;
9641
9642    darwin* | rhapsody*)
9643      _LT_DARWIN_LINKER_FEATURES($1)
9644      ;;
9645
9646    dgux*)
9647      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9648      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9649      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9650      ;;
9651
9652    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
9653    # support.  Future versions do this automatically, but an explicit c++rt0.o
9654    # does not break anything, and helps significantly (at the cost of a little
9655    # extra space).
9656    freebsd2.2*)
9657      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
9658      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
9659      _LT_TAGVAR(hardcode_direct, $1)=yes
9660      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9661      ;;
9662
9663    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
9664    freebsd2.*)
9665      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9666      _LT_TAGVAR(hardcode_direct, $1)=yes
9667      _LT_TAGVAR(hardcode_minus_L, $1)=yes
9668      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9669      ;;
9670
9671    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
9672    freebsd* | dragonfly* | midnightbsd*)
9673      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9674      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
9675      _LT_TAGVAR(hardcode_direct, $1)=yes
9676      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9677      ;;
9678
9679    hpux9*)
9680      if test yes = "$GCC"; then
9681	_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'
9682      else
9683	_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'
9684      fi
9685      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
9686      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
9687      _LT_TAGVAR(hardcode_direct, $1)=yes
9688
9689      # hardcode_minus_L: Not really in the search PATH,
9690      # but as the default location of the library.
9691      _LT_TAGVAR(hardcode_minus_L, $1)=yes
9692      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
9693      ;;
9694
9695    hpux10*)
9696      if test yes,no = "$GCC,$with_gnu_ld"; then
9697	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
9698      else
9699	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
9700      fi
9701      if test no = "$with_gnu_ld"; then
9702	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
9703	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
9704	_LT_TAGVAR(hardcode_direct, $1)=yes
9705	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
9706	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
9707	# hardcode_minus_L: Not really in the search PATH,
9708	# but as the default location of the library.
9709	_LT_TAGVAR(hardcode_minus_L, $1)=yes
9710      fi
9711      ;;
9712
9713    hpux11*)
9714      if test yes,no = "$GCC,$with_gnu_ld"; then
9715	case $host_cpu in
9716	hppa*64*)
9717	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
9718	  ;;
9719	ia64*)
9720	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
9721	  ;;
9722	*)
9723	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
9724	  ;;
9725	esac
9726      else
9727	case $host_cpu in
9728	hppa*64*)
9729	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
9730	  ;;
9731	ia64*)
9732	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
9733	  ;;
9734	*)
9735	m4_if($1, [], [
9736	  # Older versions of the 11.00 compiler do not understand -b yet
9737	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
9738	  _LT_LINKER_OPTION([if $CC understands -b],
9739	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
9740	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
9741	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
9742	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
9743	  ;;
9744	esac
9745      fi
9746      if test no = "$with_gnu_ld"; then
9747	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
9748	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
9749
9750	case $host_cpu in
9751	hppa*64*|ia64*)
9752	  _LT_TAGVAR(hardcode_direct, $1)=no
9753	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9754	  ;;
9755	*)
9756	  _LT_TAGVAR(hardcode_direct, $1)=yes
9757	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
9758	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
9759
9760	  # hardcode_minus_L: Not really in the search PATH,
9761	  # but as the default location of the library.
9762	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
9763	  ;;
9764	esac
9765      fi
9766      ;;
9767
9768    irix5* | irix6* | nonstopux*)
9769      if test yes = "$GCC"; then
9770	_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'
9771	# Try to use the -exported_symbol ld option, if it does not
9772	# work, assume that -exports_file does not work either and
9773	# implicitly export all symbols.
9774	# This should be the same for all languages, so no per-tag cache variable.
9775	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
9776	  [lt_cv_irix_exported_symbol],
9777	  [save_LDFLAGS=$LDFLAGS
9778	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
9779	   AC_LINK_IFELSE(
9780	     [AC_LANG_SOURCE(
9781	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
9782			      [C++], [[int foo (void) { return 0; }]],
9783			      [Fortran 77], [[
9784      subroutine foo
9785      end]],
9786			      [Fortran], [[
9787      subroutine foo
9788      end]])])],
9789	      [lt_cv_irix_exported_symbol=yes],
9790	      [lt_cv_irix_exported_symbol=no])
9791           LDFLAGS=$save_LDFLAGS])
9792	if test yes = "$lt_cv_irix_exported_symbol"; then
9793          _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'
9794	fi
9795      else
9796	_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'
9797	_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'
9798      fi
9799      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
9800      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
9801      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
9802      _LT_TAGVAR(inherit_rpath, $1)=yes
9803      _LT_TAGVAR(link_all_deplibs, $1)=yes
9804      ;;
9805
9806    linux*)
9807      case $cc_basename in
9808      tcc*)
9809	# Fabrice Bellard et al's Tiny C Compiler
9810	_LT_TAGVAR(ld_shlibs, $1)=yes
9811	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9812	;;
9813      esac
9814      ;;
9815
9816    netbsd*)
9817      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
9818	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
9819      else
9820	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
9821      fi
9822      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
9823      _LT_TAGVAR(hardcode_direct, $1)=yes
9824      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9825      ;;
9826
9827    newsos6)
9828      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9829      _LT_TAGVAR(hardcode_direct, $1)=yes
9830      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
9831      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
9832      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9833      ;;
9834
9835    *nto* | *qnx*)
9836      ;;
9837
9838    openbsd* | bitrig*)
9839      if test -f /usr/libexec/ld.so; then
9840	_LT_TAGVAR(hardcode_direct, $1)=yes
9841	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9842	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
9843	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
9844	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9845	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
9846	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
9847	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
9848	else
9849	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9850	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
9851	fi
9852      else
9853	_LT_TAGVAR(ld_shlibs, $1)=no
9854      fi
9855      ;;
9856
9857    os2*)
9858      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9859      _LT_TAGVAR(hardcode_minus_L, $1)=yes
9860      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
9861      shrext_cmds=.dll
9862      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
9863	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
9864	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
9865	$ECHO EXPORTS >> $output_objdir/$libname.def~
9866	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
9867	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
9868	emximp -o $lib $output_objdir/$libname.def'
9869      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
9870	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
9871	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
9872	$ECHO EXPORTS >> $output_objdir/$libname.def~
9873	prefix_cmds="$SED"~
9874	if test EXPORTS = "`$SED 1q $export_symbols`"; then
9875	  prefix_cmds="$prefix_cmds -e 1d";
9876	fi~
9877	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
9878	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
9879	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
9880	emximp -o $lib $output_objdir/$libname.def'
9881      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
9882      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
9883      _LT_TAGVAR(file_list_spec, $1)='@'
9884      ;;
9885
9886    osf3*)
9887      if test yes = "$GCC"; then
9888	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
9889	_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'
9890      else
9891	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
9892	_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'
9893      fi
9894      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
9895      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
9896      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
9897      ;;
9898
9899    osf4* | osf5*)	# as osf3* with the addition of -msym flag
9900      if test yes = "$GCC"; then
9901	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
9902	_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'
9903	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
9904      else
9905	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
9906	_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'
9907	_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~
9908          $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'
9909
9910	# Both c and cxx compiler support -rpath directly
9911	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
9912      fi
9913      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
9914      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
9915      ;;
9916
9917    solaris*)
9918      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
9919      if test yes = "$GCC"; then
9920	wlarc='$wl'
9921	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
9922	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
9923          $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'
9924      else
9925	case `$CC -V 2>&1` in
9926	*"Compilers 5.0"*)
9927	  wlarc=''
9928	  _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
9929	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
9930            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
9931	  ;;
9932	*)
9933	  wlarc='$wl'
9934	  _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
9935	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
9936            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
9937	  ;;
9938	esac
9939      fi
9940      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
9941      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9942      case $host_os in
9943      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
9944      *)
9945	# The compiler driver will combine and reorder linker options,
9946	# but understands '-z linker_flag'.  GCC discards it without '$wl',
9947	# but is careful enough not to reorder.
9948	# Supported since Solaris 2.6 (maybe 2.5.1?)
9949	if test yes = "$GCC"; then
9950	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
9951	else
9952	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
9953	fi
9954	;;
9955      esac
9956      _LT_TAGVAR(link_all_deplibs, $1)=yes
9957      ;;
9958
9959    sunos4*)
9960      if test sequent = "$host_vendor"; then
9961	# Use $CC to link under sequent, because it throws in some extra .o
9962	# files that make .init and .fini sections work.
9963	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
9964      else
9965	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
9966      fi
9967      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9968      _LT_TAGVAR(hardcode_direct, $1)=yes
9969      _LT_TAGVAR(hardcode_minus_L, $1)=yes
9970      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9971      ;;
9972
9973    sysv4)
9974      case $host_vendor in
9975	sni)
9976	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9977	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
9978	;;
9979	siemens)
9980	  ## LD is ld it makes a PLAMLIB
9981	  ## CC just makes a GrossModule.
9982	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
9983	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
9984	  _LT_TAGVAR(hardcode_direct, $1)=no
9985        ;;
9986	motorola)
9987	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9988	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
9989	;;
9990      esac
9991      runpath_var='LD_RUN_PATH'
9992      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9993      ;;
9994
9995    sysv4.3*)
9996      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9997      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9998      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
9999      ;;
10000
10001    sysv4*MP*)
10002      if test -d /usr/nec; then
10003	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10004	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
10005	runpath_var=LD_RUN_PATH
10006	hardcode_runpath_var=yes
10007	_LT_TAGVAR(ld_shlibs, $1)=yes
10008      fi
10009      ;;
10010
10011    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
10012      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
10013      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
10014      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
10015      runpath_var='LD_RUN_PATH'
10016
10017      if test yes = "$GCC"; then
10018	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10019	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10020      else
10021	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10022	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10023      fi
10024      ;;
10025
10026    sysv5* | sco3.2v5* | sco5v6*)
10027      # Note: We CANNOT use -z defs as we might desire, because we do not
10028      # link with -lc, and that would cause any symbols used from libc to
10029      # always be unresolved, which means just about no library would
10030      # ever link correctly.  If we're not using GNU ld we use -z text
10031      # though, which does catch some bad symbols but isn't as heavy-handed
10032      # as -z defs.
10033      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
10034      _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
10035      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
10036      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
10037      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
10038      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
10039      _LT_TAGVAR(link_all_deplibs, $1)=yes
10040      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
10041      runpath_var='LD_RUN_PATH'
10042
10043      if test yes = "$GCC"; then
10044	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10045	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10046      else
10047	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10048	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10049      fi
10050      ;;
10051
10052    uts4*)
10053      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10054      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10055      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
10056      ;;
10057
10058    *)
10059      _LT_TAGVAR(ld_shlibs, $1)=no
10060      ;;
10061    esac
10062
10063    if test sni = "$host_vendor"; then
10064      case $host in
10065      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
10066	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
10067	;;
10068      esac
10069    fi
10070  fi
10071])
10072AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
10073test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
10074
10075_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
10076
10077_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
10078_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
10079_LT_DECL([], [extract_expsyms_cmds], [2],
10080    [The commands to extract the exported symbol list from a shared archive])
10081
10082#
10083# Do we need to explicitly link libc?
10084#
10085case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
10086x|xyes)
10087  # Assume -lc should be added
10088  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
10089
10090  if test yes,yes = "$GCC,$enable_shared"; then
10091    case $_LT_TAGVAR(archive_cmds, $1) in
10092    *'~'*)
10093      # FIXME: we may have to deal with multi-command sequences.
10094      ;;
10095    '$CC '*)
10096      # Test whether the compiler implicitly links with -lc since on some
10097      # systems, -lgcc has to come before -lc. If gcc already passes -lc
10098      # to ld, don't add -lc before -lgcc.
10099      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
10100	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
10101	[$RM conftest*
10102	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
10103
10104	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
10105	  soname=conftest
10106	  lib=conftest
10107	  libobjs=conftest.$ac_objext
10108	  deplibs=
10109	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
10110	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
10111	  compiler_flags=-v
10112	  linker_flags=-v
10113	  verstring=
10114	  output_objdir=.
10115	  libname=conftest
10116	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
10117	  _LT_TAGVAR(allow_undefined_flag, $1)=
10118	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
10119	  then
10120	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
10121	  else
10122	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
10123	  fi
10124	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
10125	else
10126	  cat conftest.err 1>&5
10127	fi
10128	$RM conftest*
10129	])
10130      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
10131      ;;
10132    esac
10133  fi
10134  ;;
10135esac
10136
10137_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
10138    [Whether or not to add -lc for building shared libraries])
10139_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
10140    [enable_shared_with_static_runtimes], [0],
10141    [Whether or not to disallow shared libs when runtime libs are static])
10142_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
10143    [Compiler flag to allow reflexive dlopens])
10144_LT_TAGDECL([], [whole_archive_flag_spec], [1],
10145    [Compiler flag to generate shared objects directly from archives])
10146_LT_TAGDECL([], [compiler_needs_object], [1],
10147    [Whether the compiler copes with passing no objects directly])
10148_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
10149    [Create an old-style archive from a shared archive])
10150_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
10151    [Create a temporary old-style archive to link instead of a shared archive])
10152_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
10153_LT_TAGDECL([], [archive_expsym_cmds], [2])
10154_LT_TAGDECL([], [module_cmds], [2],
10155    [Commands used to build a loadable module if different from building
10156    a shared archive.])
10157_LT_TAGDECL([], [module_expsym_cmds], [2])
10158_LT_TAGDECL([], [with_gnu_ld], [1],
10159    [Whether we are building with GNU ld or not])
10160_LT_TAGDECL([], [allow_undefined_flag], [1],
10161    [Flag that allows shared libraries with undefined symbols to be built])
10162_LT_TAGDECL([], [no_undefined_flag], [1],
10163    [Flag that enforces no undefined symbols])
10164_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
10165    [Flag to hardcode $libdir into a binary during linking.
10166    This must work even if $libdir does not exist])
10167_LT_TAGDECL([], [hardcode_libdir_separator], [1],
10168    [Whether we need a single "-rpath" flag with a separated argument])
10169_LT_TAGDECL([], [hardcode_direct], [0],
10170    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
10171    DIR into the resulting binary])
10172_LT_TAGDECL([], [hardcode_direct_absolute], [0],
10173    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
10174    DIR into the resulting binary and the resulting library dependency is
10175    "absolute", i.e impossible to change by setting $shlibpath_var if the
10176    library is relocated])
10177_LT_TAGDECL([], [hardcode_minus_L], [0],
10178    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
10179    into the resulting binary])
10180_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
10181    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
10182    into the resulting binary])
10183_LT_TAGDECL([], [hardcode_automatic], [0],
10184    [Set to "yes" if building a shared library automatically hardcodes DIR
10185    into the library and all subsequent libraries and executables linked
10186    against it])
10187_LT_TAGDECL([], [inherit_rpath], [0],
10188    [Set to yes if linker adds runtime paths of dependent libraries
10189    to runtime path list])
10190_LT_TAGDECL([], [link_all_deplibs], [0],
10191    [Whether libtool must link a program against all its dependency libraries])
10192_LT_TAGDECL([], [always_export_symbols], [0],
10193    [Set to "yes" if exported symbols are required])
10194_LT_TAGDECL([], [export_symbols_cmds], [2],
10195    [The commands to list exported symbols])
10196_LT_TAGDECL([], [exclude_expsyms], [1],
10197    [Symbols that should not be listed in the preloaded symbols])
10198_LT_TAGDECL([], [include_expsyms], [1],
10199    [Symbols that must always be exported])
10200_LT_TAGDECL([], [prelink_cmds], [2],
10201    [Commands necessary for linking programs (against libraries) with templates])
10202_LT_TAGDECL([], [postlink_cmds], [2],
10203    [Commands necessary for finishing linking programs])
10204_LT_TAGDECL([], [file_list_spec], [1],
10205    [Specify filename containing input files])
10206dnl FIXME: Not yet implemented
10207dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
10208dnl    [Compiler flag to generate thread safe objects])
10209])# _LT_LINKER_SHLIBS
10210
10211
10212# _LT_LANG_C_CONFIG([TAG])
10213# ------------------------
10214# Ensure that the configuration variables for a C compiler are suitably
10215# defined.  These variables are subsequently used by _LT_CONFIG to write
10216# the compiler configuration to 'libtool'.
10217m4_defun([_LT_LANG_C_CONFIG],
10218[m4_require([_LT_DECL_EGREP])dnl
10219lt_save_CC=$CC
10220AC_LANG_PUSH(C)
10221
10222# Source file extension for C test sources.
10223ac_ext=c
10224
10225# Object file extension for compiled C test sources.
10226objext=o
10227_LT_TAGVAR(objext, $1)=$objext
10228
10229# Code to be used in simple compile tests
10230lt_simple_compile_test_code="int some_variable = 0;"
10231
10232# Code to be used in simple link tests
10233lt_simple_link_test_code='int main(){return(0);}'
10234
10235_LT_TAG_COMPILER
10236# Save the default compiler, since it gets overwritten when the other
10237# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
10238compiler_DEFAULT=$CC
10239
10240# save warnings/boilerplate of simple test code
10241_LT_COMPILER_BOILERPLATE
10242_LT_LINKER_BOILERPLATE
10243
10244if test -n "$compiler"; then
10245  _LT_COMPILER_NO_RTTI($1)
10246  _LT_COMPILER_PIC($1)
10247  _LT_COMPILER_C_O($1)
10248  _LT_COMPILER_FILE_LOCKS($1)
10249  _LT_LINKER_SHLIBS($1)
10250  _LT_SYS_DYNAMIC_LINKER($1)
10251  _LT_LINKER_HARDCODE_LIBPATH($1)
10252  LT_SYS_DLOPEN_SELF
10253  _LT_CMD_STRIPLIB
10254
10255  # Report what library types will actually be built
10256  AC_MSG_CHECKING([if libtool supports shared libraries])
10257  AC_MSG_RESULT([$can_build_shared])
10258
10259  AC_MSG_CHECKING([whether to build shared libraries])
10260  test no = "$can_build_shared" && enable_shared=no
10261
10262  # On AIX, shared libraries and static libraries use the same namespace, and
10263  # are all built from PIC.
10264  case $host_os in
10265  aix3*)
10266    test yes = "$enable_shared" && enable_static=no
10267    if test -n "$RANLIB"; then
10268      archive_cmds="$archive_cmds~\$RANLIB \$lib"
10269      postinstall_cmds='$RANLIB $lib'
10270    fi
10271    ;;
10272
10273  aix[[4-9]]*)
10274    if test ia64 != "$host_cpu"; then
10275      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
10276      yes,aix,yes) ;;			# shared object as lib.so file only
10277      yes,svr4,*) ;;			# shared object as lib.so archive member only
10278      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
10279      esac
10280    fi
10281    ;;
10282  esac
10283  AC_MSG_RESULT([$enable_shared])
10284
10285  AC_MSG_CHECKING([whether to build static libraries])
10286  # Make sure either enable_shared or enable_static is yes.
10287  test yes = "$enable_shared" || enable_static=yes
10288  AC_MSG_RESULT([$enable_static])
10289
10290  _LT_CONFIG($1)
10291fi
10292AC_LANG_POP
10293CC=$lt_save_CC
10294])# _LT_LANG_C_CONFIG
10295
10296
10297# _LT_LANG_CXX_CONFIG([TAG])
10298# --------------------------
10299# Ensure that the configuration variables for a C++ compiler are suitably
10300# defined.  These variables are subsequently used by _LT_CONFIG to write
10301# the compiler configuration to 'libtool'.
10302m4_defun([_LT_LANG_CXX_CONFIG],
10303[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
10304m4_require([_LT_DECL_EGREP])dnl
10305m4_require([_LT_PATH_MANIFEST_TOOL])dnl
10306if test -n "$CXX" && ( test no != "$CXX" &&
10307    ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
10308    (test g++ != "$CXX"))); then
10309  AC_PROG_CXXCPP
10310else
10311  _lt_caught_CXX_error=yes
10312fi
10313
10314AC_LANG_PUSH(C++)
10315_LT_TAGVAR(archive_cmds_need_lc, $1)=no
10316_LT_TAGVAR(allow_undefined_flag, $1)=
10317_LT_TAGVAR(always_export_symbols, $1)=no
10318_LT_TAGVAR(archive_expsym_cmds, $1)=
10319_LT_TAGVAR(compiler_needs_object, $1)=no
10320_LT_TAGVAR(export_dynamic_flag_spec, $1)=
10321_LT_TAGVAR(hardcode_direct, $1)=no
10322_LT_TAGVAR(hardcode_direct_absolute, $1)=no
10323_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
10324_LT_TAGVAR(hardcode_libdir_separator, $1)=
10325_LT_TAGVAR(hardcode_minus_L, $1)=no
10326_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
10327_LT_TAGVAR(hardcode_automatic, $1)=no
10328_LT_TAGVAR(inherit_rpath, $1)=no
10329_LT_TAGVAR(module_cmds, $1)=
10330_LT_TAGVAR(module_expsym_cmds, $1)=
10331_LT_TAGVAR(link_all_deplibs, $1)=unknown
10332_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
10333_LT_TAGVAR(reload_flag, $1)=$reload_flag
10334_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
10335_LT_TAGVAR(no_undefined_flag, $1)=
10336_LT_TAGVAR(whole_archive_flag_spec, $1)=
10337_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
10338
10339# Source file extension for C++ test sources.
10340ac_ext=cpp
10341
10342# Object file extension for compiled C++ test sources.
10343objext=o
10344_LT_TAGVAR(objext, $1)=$objext
10345
10346# No sense in running all these tests if we already determined that
10347# the CXX compiler isn't working.  Some variables (like enable_shared)
10348# are currently assumed to apply to all compilers on this platform,
10349# and will be corrupted by setting them based on a non-working compiler.
10350if test yes != "$_lt_caught_CXX_error"; then
10351  # Code to be used in simple compile tests
10352  lt_simple_compile_test_code="int some_variable = 0;"
10353
10354  # Code to be used in simple link tests
10355  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
10356
10357  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
10358  _LT_TAG_COMPILER
10359
10360  # save warnings/boilerplate of simple test code
10361  _LT_COMPILER_BOILERPLATE
10362  _LT_LINKER_BOILERPLATE
10363
10364  # Allow CC to be a program name with arguments.
10365  lt_save_CC=$CC
10366  lt_save_CFLAGS=$CFLAGS
10367  lt_save_LD=$LD
10368  lt_save_GCC=$GCC
10369  GCC=$GXX
10370  lt_save_with_gnu_ld=$with_gnu_ld
10371  lt_save_path_LD=$lt_cv_path_LD
10372  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
10373    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
10374  else
10375    $as_unset lt_cv_prog_gnu_ld
10376  fi
10377  if test -n "${lt_cv_path_LDCXX+set}"; then
10378    lt_cv_path_LD=$lt_cv_path_LDCXX
10379  else
10380    $as_unset lt_cv_path_LD
10381  fi
10382  test -z "${LDCXX+set}" || LD=$LDCXX
10383  CC=${CXX-"c++"}
10384  CFLAGS=$CXXFLAGS
10385  compiler=$CC
10386  _LT_TAGVAR(compiler, $1)=$CC
10387  _LT_CC_BASENAME([$compiler])
10388
10389  if test -n "$compiler"; then
10390    # We don't want -fno-exception when compiling C++ code, so set the
10391    # no_builtin_flag separately
10392    if test yes = "$GXX"; then
10393      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
10394    else
10395      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
10396    fi
10397
10398    if test yes = "$GXX"; then
10399      # Set up default GNU C++ configuration
10400
10401      LT_PATH_LD
10402
10403      # Check if GNU C++ uses GNU ld as the underlying linker, since the
10404      # archiving commands below assume that GNU ld is being used.
10405      if test yes = "$with_gnu_ld"; then
10406        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
10407        _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'
10408
10409        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
10410        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
10411
10412        # If archive_cmds runs LD, not CC, wlarc should be empty
10413        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
10414        #     investigate it a little bit more. (MM)
10415        wlarc='$wl'
10416
10417        # ancient GNU ld didn't support --whole-archive et. al.
10418        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
10419	  $GREP 'no-whole-archive' > /dev/null; then
10420          _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
10421        else
10422          _LT_TAGVAR(whole_archive_flag_spec, $1)=
10423        fi
10424      else
10425        with_gnu_ld=no
10426        wlarc=
10427
10428        # A generic and very simple default shared library creation
10429        # command for GNU C++ for the case where it uses the native
10430        # linker, instead of GNU ld.  If possible, this setting should
10431        # overridden to take advantage of the native linker features on
10432        # the platform it is being used on.
10433        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
10434      fi
10435
10436      # Commands to make compiler produce verbose output that lists
10437      # what "hidden" libraries, object files and flags are used when
10438      # linking a shared library.
10439      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
10440
10441    else
10442      GXX=no
10443      with_gnu_ld=no
10444      wlarc=
10445    fi
10446
10447    # PORTME: fill in a description of your system's C++ link characteristics
10448    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
10449    _LT_TAGVAR(ld_shlibs, $1)=yes
10450    case $host_os in
10451      aix3*)
10452        # FIXME: insert proper C++ library support
10453        _LT_TAGVAR(ld_shlibs, $1)=no
10454        ;;
10455      aix[[4-9]]*)
10456        if test ia64 = "$host_cpu"; then
10457          # On IA64, the linker does run time linking by default, so we don't
10458          # have to do anything special.
10459          aix_use_runtimelinking=no
10460          exp_sym_flag='-Bexport'
10461          no_entry_flag=
10462        else
10463          aix_use_runtimelinking=no
10464
10465          # Test if we are trying to use run time linking or normal
10466          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
10467          # have runtime linking enabled, and use it for executables.
10468          # For shared libraries, we enable/disable runtime linking
10469          # depending on the kind of the shared library created -
10470          # when "with_aix_soname,aix_use_runtimelinking" is:
10471          # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
10472          # "aix,yes"  lib.so          shared, rtl:yes, for executables
10473          #            lib.a           static archive
10474          # "both,no"  lib.so.V(shr.o) shared, rtl:yes
10475          #            lib.a(lib.so.V) shared, rtl:no,  for executables
10476          # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
10477          #            lib.a(lib.so.V) shared, rtl:no
10478          # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
10479          #            lib.a           static archive
10480          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
10481	    for ld_flag in $LDFLAGS; do
10482	      case $ld_flag in
10483	      *-brtl*)
10484	        aix_use_runtimelinking=yes
10485	        break
10486	        ;;
10487	      esac
10488	    done
10489	    if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
10490	      # With aix-soname=svr4, we create the lib.so.V shared archives only,
10491	      # so we don't have lib.a shared libs to link our executables.
10492	      # We have to force runtime linking in this case.
10493	      aix_use_runtimelinking=yes
10494	      LDFLAGS="$LDFLAGS -Wl,-brtl"
10495	    fi
10496	    ;;
10497          esac
10498
10499          exp_sym_flag='-bexport'
10500          no_entry_flag='-bnoentry'
10501        fi
10502
10503        # When large executables or shared objects are built, AIX ld can
10504        # have problems creating the table of contents.  If linking a library
10505        # or program results in "error TOC overflow" add -mminimal-toc to
10506        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
10507        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
10508
10509        _LT_TAGVAR(archive_cmds, $1)=''
10510        _LT_TAGVAR(hardcode_direct, $1)=yes
10511        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
10512        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
10513        _LT_TAGVAR(link_all_deplibs, $1)=yes
10514        _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
10515        case $with_aix_soname,$aix_use_runtimelinking in
10516        aix,*) ;;	# no import file
10517        svr4,* | *,yes) # use import file
10518          # The Import File defines what to hardcode.
10519          _LT_TAGVAR(hardcode_direct, $1)=no
10520          _LT_TAGVAR(hardcode_direct_absolute, $1)=no
10521          ;;
10522        esac
10523
10524        if test yes = "$GXX"; then
10525          case $host_os in aix4.[[012]]|aix4.[[012]].*)
10526          # We only want to do this on AIX 4.2 and lower, the check
10527          # below for broken collect2 doesn't work under 4.3+
10528	  collect2name=`$CC -print-prog-name=collect2`
10529	  if test -f "$collect2name" &&
10530	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
10531	  then
10532	    # We have reworked collect2
10533	    :
10534	  else
10535	    # We have old collect2
10536	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
10537	    # It fails to find uninstalled libraries when the uninstalled
10538	    # path is not listed in the libpath.  Setting hardcode_minus_L
10539	    # to unsupported forces relinking
10540	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
10541	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10542	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
10543	  fi
10544          esac
10545          shared_flag='-shared'
10546	  if test yes = "$aix_use_runtimelinking"; then
10547	    shared_flag=$shared_flag' $wl-G'
10548	  fi
10549	  # Need to ensure runtime linking is disabled for the traditional
10550	  # shared library, or the linker may eventually find shared libraries
10551	  # /with/ Import File - we do not want to mix them.
10552	  shared_flag_aix='-shared'
10553	  shared_flag_svr4='-shared $wl-G'
10554        else
10555          # not using gcc
10556          if test ia64 = "$host_cpu"; then
10557	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
10558	  # chokes on -Wl,-G. The following line is correct:
10559	  shared_flag='-G'
10560          else
10561	    if test yes = "$aix_use_runtimelinking"; then
10562	      shared_flag='$wl-G'
10563	    else
10564	      shared_flag='$wl-bM:SRE'
10565	    fi
10566	    shared_flag_aix='$wl-bM:SRE'
10567	    shared_flag_svr4='$wl-G'
10568          fi
10569        fi
10570
10571        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
10572        # It seems that -bexpall does not export symbols beginning with
10573        # underscore (_), so it is better to generate a list of symbols to
10574	# export.
10575        _LT_TAGVAR(always_export_symbols, $1)=yes
10576	if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
10577          # Warning - without using the other runtime loading flags (-brtl),
10578          # -berok will link without error, but may produce a broken library.
10579          # The "-G" linker flag allows undefined symbols.
10580          _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
10581          # Determine the default libpath from the value encoded in an empty
10582          # executable.
10583          _LT_SYS_MODULE_PATH_AIX([$1])
10584          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
10585
10586          _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
10587        else
10588          if test ia64 = "$host_cpu"; then
10589	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
10590	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
10591	    _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"
10592          else
10593	    # Determine the default libpath from the value encoded in an
10594	    # empty executable.
10595	    _LT_SYS_MODULE_PATH_AIX([$1])
10596	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
10597	    # Warning - without using the other run time loading flags,
10598	    # -berok will link without error, but may produce a broken library.
10599	    _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
10600	    _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
10601	    if test yes = "$with_gnu_ld"; then
10602	      # We only use this code for GNU lds that support --whole-archive.
10603	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
10604	    else
10605	      # Exported symbols can be pulled into shared objects from archives
10606	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
10607	    fi
10608	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
10609	    _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
10610	    # -brtl affects multiple linker settings, -berok does not and is overridden later
10611	    compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
10612	    if test svr4 != "$with_aix_soname"; then
10613	      # This is similar to how AIX traditionally builds its shared
10614	      # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
10615	      _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'
10616	    fi
10617	    if test aix != "$with_aix_soname"; then
10618	      _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'
10619	    else
10620	      # used by -dlpreopen to get the symbols
10621	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
10622	    fi
10623	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
10624          fi
10625        fi
10626        ;;
10627
10628      beos*)
10629	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
10630	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
10631	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
10632	  # support --undefined.  This deserves some investigation.  FIXME
10633	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
10634	else
10635	  _LT_TAGVAR(ld_shlibs, $1)=no
10636	fi
10637	;;
10638
10639      chorus*)
10640        case $cc_basename in
10641          *)
10642	  # FIXME: insert proper C++ library support
10643	  _LT_TAGVAR(ld_shlibs, $1)=no
10644	  ;;
10645        esac
10646        ;;
10647
10648      cygwin* | mingw* | pw32* | cegcc*)
10649	case $GXX,$cc_basename in
10650	,cl* | no,cl* | ,icl* | no,icl*)
10651	  # Native MSVC or ICC
10652	  # hardcode_libdir_flag_spec is actually meaningless, as there is
10653	  # no search path for DLLs.
10654	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
10655	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
10656	  _LT_TAGVAR(always_export_symbols, $1)=yes
10657	  _LT_TAGVAR(file_list_spec, $1)='@'
10658	  # Tell ltmain to make .lib files, not .a files.
10659	  libext=lib
10660	  # Tell ltmain to make .dll files, not .so files.
10661	  shrext_cmds=.dll
10662	  # FIXME: Setting linknames here is a bad hack.
10663	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
10664	  _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
10665              cp "$export_symbols" "$output_objdir/$soname.def";
10666              echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
10667            else
10668              $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
10669            fi~
10670            $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
10671            linknames='
10672	  # The linker will not automatically build a static lib if we build a DLL.
10673	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
10674	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
10675	  # Don't use ranlib
10676	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
10677	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
10678            lt_tool_outputfile="@TOOL_OUTPUT@"~
10679            case $lt_outputfile in
10680              *.exe|*.EXE) ;;
10681              *)
10682                lt_outputfile=$lt_outputfile.exe
10683                lt_tool_outputfile=$lt_tool_outputfile.exe
10684                ;;
10685            esac~
10686            func_to_tool_file "$lt_outputfile"~
10687            if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
10688              $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
10689              $RM "$lt_outputfile.manifest";
10690            fi'
10691	  ;;
10692	*)
10693	  # g++
10694	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
10695	  # as there is no search path for DLLs.
10696	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10697	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
10698	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
10699	  _LT_TAGVAR(always_export_symbols, $1)=no
10700	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
10701
10702	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
10703	    _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'
10704	    # If the export-symbols file already is a .def file, use it as
10705	    # is; otherwise, prepend EXPORTS...
10706	    _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
10707              cp $export_symbols $output_objdir/$soname.def;
10708            else
10709              echo EXPORTS > $output_objdir/$soname.def;
10710              cat $export_symbols >> $output_objdir/$soname.def;
10711            fi~
10712            $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'
10713	  else
10714	    _LT_TAGVAR(ld_shlibs, $1)=no
10715	  fi
10716	  ;;
10717	esac
10718	;;
10719      darwin* | rhapsody*)
10720        _LT_DARWIN_LINKER_FEATURES($1)
10721	;;
10722
10723      os2*)
10724	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10725	_LT_TAGVAR(hardcode_minus_L, $1)=yes
10726	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
10727	shrext_cmds=.dll
10728	_LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
10729	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
10730	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
10731	  $ECHO EXPORTS >> $output_objdir/$libname.def~
10732	  emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
10733	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
10734	  emximp -o $lib $output_objdir/$libname.def'
10735	_LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
10736	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
10737	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
10738	  $ECHO EXPORTS >> $output_objdir/$libname.def~
10739	  prefix_cmds="$SED"~
10740	  if test EXPORTS = "`$SED 1q $export_symbols`"; then
10741	    prefix_cmds="$prefix_cmds -e 1d";
10742	  fi~
10743	  prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
10744	  cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
10745	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
10746	  emximp -o $lib $output_objdir/$libname.def'
10747	_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
10748	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
10749	_LT_TAGVAR(file_list_spec, $1)='@'
10750	;;
10751
10752      dgux*)
10753        case $cc_basename in
10754          ec++*)
10755	    # FIXME: insert proper C++ library support
10756	    _LT_TAGVAR(ld_shlibs, $1)=no
10757	    ;;
10758          ghcx*)
10759	    # Green Hills C++ Compiler
10760	    # FIXME: insert proper C++ library support
10761	    _LT_TAGVAR(ld_shlibs, $1)=no
10762	    ;;
10763          *)
10764	    # FIXME: insert proper C++ library support
10765	    _LT_TAGVAR(ld_shlibs, $1)=no
10766	    ;;
10767        esac
10768        ;;
10769
10770      freebsd2.*)
10771        # C++ shared libraries reported to be fairly broken before
10772	# switch to ELF
10773        _LT_TAGVAR(ld_shlibs, $1)=no
10774        ;;
10775
10776      freebsd-elf*)
10777        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
10778        ;;
10779
10780      freebsd* | dragonfly* | midnightbsd*)
10781        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
10782        # conventions
10783        _LT_TAGVAR(ld_shlibs, $1)=yes
10784        ;;
10785
10786      haiku*)
10787        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
10788        _LT_TAGVAR(link_all_deplibs, $1)=yes
10789        ;;
10790
10791      hpux9*)
10792        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
10793        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
10794        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
10795        _LT_TAGVAR(hardcode_direct, $1)=yes
10796        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
10797				             # but as the default
10798				             # location of the library.
10799
10800        case $cc_basename in
10801          CC*)
10802            # FIXME: insert proper C++ library support
10803            _LT_TAGVAR(ld_shlibs, $1)=no
10804            ;;
10805          aCC*)
10806            _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'
10807            # Commands to make compiler produce verbose output that lists
10808            # what "hidden" libraries, object files and flags are used when
10809            # linking a shared library.
10810            #
10811            # There doesn't appear to be a way to prevent this compiler from
10812            # explicitly linking system object files so we need to strip them
10813            # from the output so that they don't get included in the library
10814            # dependencies.
10815            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"'
10816            ;;
10817          *)
10818            if test yes = "$GXX"; then
10819              _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'
10820            else
10821              # FIXME: insert proper C++ library support
10822              _LT_TAGVAR(ld_shlibs, $1)=no
10823            fi
10824            ;;
10825        esac
10826        ;;
10827
10828      hpux10*|hpux11*)
10829        if test no = "$with_gnu_ld"; then
10830	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
10831	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
10832
10833          case $host_cpu in
10834            hppa*64*|ia64*)
10835              ;;
10836            *)
10837	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
10838              ;;
10839          esac
10840        fi
10841        case $host_cpu in
10842          hppa*64*|ia64*)
10843            _LT_TAGVAR(hardcode_direct, $1)=no
10844            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
10845            ;;
10846          *)
10847            _LT_TAGVAR(hardcode_direct, $1)=yes
10848            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
10849            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
10850					         # but as the default
10851					         # location of the library.
10852            ;;
10853        esac
10854
10855        case $cc_basename in
10856          CC*)
10857	    # FIXME: insert proper C++ library support
10858	    _LT_TAGVAR(ld_shlibs, $1)=no
10859	    ;;
10860          aCC*)
10861	    case $host_cpu in
10862	      hppa*64*)
10863	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
10864	        ;;
10865	      ia64*)
10866	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
10867	        ;;
10868	      *)
10869	        _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'
10870	        ;;
10871	    esac
10872	    # Commands to make compiler produce verbose output that lists
10873	    # what "hidden" libraries, object files and flags are used when
10874	    # linking a shared library.
10875	    #
10876	    # There doesn't appear to be a way to prevent this compiler from
10877	    # explicitly linking system object files so we need to strip them
10878	    # from the output so that they don't get included in the library
10879	    # dependencies.
10880	    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"'
10881	    ;;
10882          *)
10883	    if test yes = "$GXX"; then
10884	      if test no = "$with_gnu_ld"; then
10885	        case $host_cpu in
10886	          hppa*64*)
10887	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
10888	            ;;
10889	          ia64*)
10890	            _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'
10891	            ;;
10892	          *)
10893	            _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'
10894	            ;;
10895	        esac
10896	      fi
10897	    else
10898	      # FIXME: insert proper C++ library support
10899	      _LT_TAGVAR(ld_shlibs, $1)=no
10900	    fi
10901	    ;;
10902        esac
10903        ;;
10904
10905      interix[[3-9]]*)
10906	_LT_TAGVAR(hardcode_direct, $1)=no
10907	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
10908	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
10909	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
10910	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
10911	# Instead, shared libraries are loaded at an image base (0x10000000 by
10912	# default) and relocated if they conflict, which is a slow very memory
10913	# consuming and fragmenting process.  To avoid this, we pick a random,
10914	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
10915	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
10916	_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'
10917	_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'
10918	;;
10919      irix5* | irix6*)
10920        case $cc_basename in
10921          CC*)
10922	    # SGI C++
10923	    _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'
10924
10925	    # Archives containing C++ object files must be created using
10926	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
10927	    # necessary to make sure instantiated templates are included
10928	    # in the archive.
10929	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
10930	    ;;
10931          *)
10932	    if test yes = "$GXX"; then
10933	      if test no = "$with_gnu_ld"; then
10934	        _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'
10935	      else
10936	        _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'
10937	      fi
10938	    fi
10939	    _LT_TAGVAR(link_all_deplibs, $1)=yes
10940	    ;;
10941        esac
10942        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
10943        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
10944        _LT_TAGVAR(inherit_rpath, $1)=yes
10945        ;;
10946
10947      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
10948        case $cc_basename in
10949          KCC*)
10950	    # Kuck and Associates, Inc. (KAI) C++ Compiler
10951
10952	    # KCC will only create a shared library if the output file
10953	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
10954	    # to its proper name (with version) after linking.
10955	    _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'
10956	    _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'
10957	    # Commands to make compiler produce verbose output that lists
10958	    # what "hidden" libraries, object files and flags are used when
10959	    # linking a shared library.
10960	    #
10961	    # There doesn't appear to be a way to prevent this compiler from
10962	    # explicitly linking system object files so we need to strip them
10963	    # from the output so that they don't get included in the library
10964	    # dependencies.
10965	    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"'
10966
10967	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
10968	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
10969
10970	    # Archives containing C++ object files must be created using
10971	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
10972	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
10973	    ;;
10974	  icpc* | ecpc* )
10975	    # Intel C++
10976	    with_gnu_ld=yes
10977	    # version 8.0 and above of icpc choke on multiply defined symbols
10978	    # if we add $predep_objects and $postdep_objects, however 7.1 and
10979	    # earlier do not add the objects themselves.
10980	    case `$CC -V 2>&1` in
10981	      *"Version 7."*)
10982	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
10983		_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'
10984		;;
10985	      *)  # Version 8.0 or newer
10986	        tmp_idyn=
10987	        case $host_cpu in
10988		  ia64*) tmp_idyn=' -i_dynamic';;
10989		esac
10990	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
10991		_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'
10992		;;
10993	    esac
10994	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
10995	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
10996	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
10997	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
10998	    ;;
10999          pgCC* | pgcpp*)
11000            # Portland Group C++ compiler
11001	    case `$CC -V` in
11002	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
11003	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
11004               rm -rf $tpldir~
11005               $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
11006               compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
11007	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
11008                rm -rf $tpldir~
11009                $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
11010                $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
11011                $RANLIB $oldlib'
11012	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
11013                rm -rf $tpldir~
11014                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
11015                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
11016	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
11017                rm -rf $tpldir~
11018                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
11019                $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'
11020	      ;;
11021	    *) # Version 6 and above use weak symbols
11022	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
11023	      _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'
11024	      ;;
11025	    esac
11026
11027	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
11028	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
11029	    _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'
11030            ;;
11031	  cxx*)
11032	    # Compaq C++
11033	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
11034	    _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'
11035
11036	    runpath_var=LD_RUN_PATH
11037	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
11038	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
11039
11040	    # Commands to make compiler produce verbose output that lists
11041	    # what "hidden" libraries, object files and flags are used when
11042	    # linking a shared library.
11043	    #
11044	    # There doesn't appear to be a way to prevent this compiler from
11045	    # explicitly linking system object files so we need to strip them
11046	    # from the output so that they don't get included in the library
11047	    # dependencies.
11048	    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'
11049	    ;;
11050	  xl* | mpixl* | bgxl*)
11051	    # IBM XL 8.0 on PPC, with GNU ld
11052	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
11053	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
11054	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11055	    if test yes = "$supports_anon_versioning"; then
11056	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
11057                cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11058                echo "local: *; };" >> $output_objdir/$libname.ver~
11059                $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
11060	    fi
11061	    ;;
11062	  *)
11063	    case `$CC -V 2>&1 | $SED 5q` in
11064	    *Sun\ C*)
11065	      # Sun C++ 5.9
11066	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
11067	      _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
11068	      _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'
11069	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11070	      _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'
11071	      _LT_TAGVAR(compiler_needs_object, $1)=yes
11072
11073	      # Not sure whether something based on
11074	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
11075	      # would be better.
11076	      output_verbose_link_cmd='func_echo_all'
11077
11078	      # Archives containing C++ object files must be created using
11079	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
11080	      # necessary to make sure instantiated templates are included
11081	      # in the archive.
11082	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
11083	      ;;
11084	    esac
11085	    ;;
11086	esac
11087	;;
11088
11089      lynxos*)
11090        # FIXME: insert proper C++ library support
11091	_LT_TAGVAR(ld_shlibs, $1)=no
11092	;;
11093
11094      m88k*)
11095        # FIXME: insert proper C++ library support
11096        _LT_TAGVAR(ld_shlibs, $1)=no
11097	;;
11098
11099      mvs*)
11100        case $cc_basename in
11101          cxx*)
11102	    # FIXME: insert proper C++ library support
11103	    _LT_TAGVAR(ld_shlibs, $1)=no
11104	    ;;
11105	  *)
11106	    # FIXME: insert proper C++ library support
11107	    _LT_TAGVAR(ld_shlibs, $1)=no
11108	    ;;
11109	esac
11110	;;
11111
11112      netbsd*)
11113        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
11114	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
11115	  wlarc=
11116	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11117	  _LT_TAGVAR(hardcode_direct, $1)=yes
11118	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
11119	fi
11120	# Workaround some broken pre-1.5 toolchains
11121	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
11122	;;
11123
11124      *nto* | *qnx*)
11125        _LT_TAGVAR(ld_shlibs, $1)=yes
11126	;;
11127
11128      openbsd* | bitrig*)
11129	if test -f /usr/libexec/ld.so; then
11130	  _LT_TAGVAR(hardcode_direct, $1)=yes
11131	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
11132	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
11133	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
11134	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
11135	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
11136	    _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'
11137	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
11138	    _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
11139	  fi
11140	  output_verbose_link_cmd=func_echo_all
11141	else
11142	  _LT_TAGVAR(ld_shlibs, $1)=no
11143	fi
11144	;;
11145
11146      osf3* | osf4* | osf5*)
11147        case $cc_basename in
11148          KCC*)
11149	    # Kuck and Associates, Inc. (KAI) C++ Compiler
11150
11151	    # KCC will only create a shared library if the output file
11152	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
11153	    # to its proper name (with version) after linking.
11154	    _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'
11155
11156	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
11157	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
11158
11159	    # Archives containing C++ object files must be created using
11160	    # the KAI C++ compiler.
11161	    case $host in
11162	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
11163	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
11164	    esac
11165	    ;;
11166          RCC*)
11167	    # Rational C++ 2.4.1
11168	    # FIXME: insert proper C++ library support
11169	    _LT_TAGVAR(ld_shlibs, $1)=no
11170	    ;;
11171          cxx*)
11172	    case $host in
11173	      osf3*)
11174	        _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
11175	        _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'
11176	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
11177		;;
11178	      *)
11179	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
11180	        _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'
11181	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
11182                  echo "-hidden">> $lib.exp~
11183                  $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~
11184                  $RM $lib.exp'
11185	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
11186		;;
11187	    esac
11188
11189	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
11190
11191	    # Commands to make compiler produce verbose output that lists
11192	    # what "hidden" libraries, object files and flags are used when
11193	    # linking a shared library.
11194	    #
11195	    # There doesn't appear to be a way to prevent this compiler from
11196	    # explicitly linking system object files so we need to strip them
11197	    # from the output so that they don't get included in the library
11198	    # dependencies.
11199	    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"'
11200	    ;;
11201	  *)
11202	    if test yes,no = "$GXX,$with_gnu_ld"; then
11203	      _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
11204	      case $host in
11205	        osf3*)
11206	          _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'
11207		  ;;
11208	        *)
11209	          _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'
11210		  ;;
11211	      esac
11212
11213	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
11214	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
11215
11216	      # Commands to make compiler produce verbose output that lists
11217	      # what "hidden" libraries, object files and flags are used when
11218	      # linking a shared library.
11219	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
11220
11221	    else
11222	      # FIXME: insert proper C++ library support
11223	      _LT_TAGVAR(ld_shlibs, $1)=no
11224	    fi
11225	    ;;
11226        esac
11227        ;;
11228
11229      psos*)
11230        # FIXME: insert proper C++ library support
11231        _LT_TAGVAR(ld_shlibs, $1)=no
11232        ;;
11233
11234      sunos4*)
11235        case $cc_basename in
11236          CC*)
11237	    # Sun C++ 4.x
11238	    # FIXME: insert proper C++ library support
11239	    _LT_TAGVAR(ld_shlibs, $1)=no
11240	    ;;
11241          lcc*)
11242	    # Lucid
11243	    # FIXME: insert proper C++ library support
11244	    _LT_TAGVAR(ld_shlibs, $1)=no
11245	    ;;
11246          *)
11247	    # FIXME: insert proper C++ library support
11248	    _LT_TAGVAR(ld_shlibs, $1)=no
11249	    ;;
11250        esac
11251        ;;
11252
11253      solaris*)
11254        case $cc_basename in
11255          CC* | sunCC*)
11256	    # Sun C++ 4.2, 5.x and Centerline C++
11257            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
11258	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
11259	    _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
11260	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
11261              $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'
11262
11263	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11264	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
11265	    case $host_os in
11266	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
11267	      *)
11268		# The compiler driver will combine and reorder linker options,
11269		# but understands '-z linker_flag'.
11270	        # Supported since Solaris 2.6 (maybe 2.5.1?)
11271		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
11272	        ;;
11273	    esac
11274	    _LT_TAGVAR(link_all_deplibs, $1)=yes
11275
11276	    output_verbose_link_cmd='func_echo_all'
11277
11278	    # Archives containing C++ object files must be created using
11279	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
11280	    # necessary to make sure instantiated templates are included
11281	    # in the archive.
11282	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
11283	    ;;
11284          gcx*)
11285	    # Green Hills C++ Compiler
11286	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
11287
11288	    # The C++ compiler must be used to create the archive.
11289	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
11290	    ;;
11291          *)
11292	    # GNU C++ compiler with Solaris linker
11293	    if test yes,no = "$GXX,$with_gnu_ld"; then
11294	      _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
11295	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
11296	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
11297	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
11298                  $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'
11299
11300	        # Commands to make compiler produce verbose output that lists
11301	        # what "hidden" libraries, object files and flags are used when
11302	        # linking a shared library.
11303	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
11304	      else
11305	        # g++ 2.7 appears to require '-G' NOT '-shared' on this
11306	        # platform.
11307	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
11308	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
11309                  $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'
11310
11311	        # Commands to make compiler produce verbose output that lists
11312	        # what "hidden" libraries, object files and flags are used when
11313	        # linking a shared library.
11314	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
11315	      fi
11316
11317	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
11318	      case $host_os in
11319		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
11320		*)
11321		  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
11322		  ;;
11323	      esac
11324	    fi
11325	    ;;
11326        esac
11327        ;;
11328
11329    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
11330      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
11331      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
11332      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
11333      runpath_var='LD_RUN_PATH'
11334
11335      case $cc_basename in
11336        CC*)
11337	  _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11338	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11339	  ;;
11340	*)
11341	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11342	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11343	  ;;
11344      esac
11345      ;;
11346
11347      sysv5* | sco3.2v5* | sco5v6*)
11348	# Note: We CANNOT use -z defs as we might desire, because we do not
11349	# link with -lc, and that would cause any symbols used from libc to
11350	# always be unresolved, which means just about no library would
11351	# ever link correctly.  If we're not using GNU ld we use -z text
11352	# though, which does catch some bad symbols but isn't as heavy-handed
11353	# as -z defs.
11354	_LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
11355	_LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
11356	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
11357	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
11358	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
11359	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
11360	_LT_TAGVAR(link_all_deplibs, $1)=yes
11361	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
11362	runpath_var='LD_RUN_PATH'
11363
11364	case $cc_basename in
11365          CC*)
11366	    _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11367	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11368	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
11369              '"$_LT_TAGVAR(old_archive_cmds, $1)"
11370	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
11371              '"$_LT_TAGVAR(reload_cmds, $1)"
11372	    ;;
11373	  *)
11374	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11375	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11376	    ;;
11377	esac
11378      ;;
11379
11380      tandem*)
11381        case $cc_basename in
11382          NCC*)
11383	    # NonStop-UX NCC 3.20
11384	    # FIXME: insert proper C++ library support
11385	    _LT_TAGVAR(ld_shlibs, $1)=no
11386	    ;;
11387          *)
11388	    # FIXME: insert proper C++ library support
11389	    _LT_TAGVAR(ld_shlibs, $1)=no
11390	    ;;
11391        esac
11392        ;;
11393
11394      vxworks*)
11395        # FIXME: insert proper C++ library support
11396        _LT_TAGVAR(ld_shlibs, $1)=no
11397        ;;
11398
11399      *)
11400        # FIXME: insert proper C++ library support
11401        _LT_TAGVAR(ld_shlibs, $1)=no
11402        ;;
11403    esac
11404
11405    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
11406    test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
11407
11408    _LT_TAGVAR(GCC, $1)=$GXX
11409    _LT_TAGVAR(LD, $1)=$LD
11410
11411    ## CAVEAT EMPTOR:
11412    ## There is no encapsulation within the following macros, do not change
11413    ## the running order or otherwise move them around unless you know exactly
11414    ## what you are doing...
11415    _LT_SYS_HIDDEN_LIBDEPS($1)
11416    _LT_COMPILER_PIC($1)
11417    _LT_COMPILER_C_O($1)
11418    _LT_COMPILER_FILE_LOCKS($1)
11419    _LT_LINKER_SHLIBS($1)
11420    _LT_SYS_DYNAMIC_LINKER($1)
11421    _LT_LINKER_HARDCODE_LIBPATH($1)
11422
11423    _LT_CONFIG($1)
11424  fi # test -n "$compiler"
11425
11426  CC=$lt_save_CC
11427  CFLAGS=$lt_save_CFLAGS
11428  LDCXX=$LD
11429  LD=$lt_save_LD
11430  GCC=$lt_save_GCC
11431  with_gnu_ld=$lt_save_with_gnu_ld
11432  lt_cv_path_LDCXX=$lt_cv_path_LD
11433  lt_cv_path_LD=$lt_save_path_LD
11434  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
11435  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
11436fi # test yes != "$_lt_caught_CXX_error"
11437
11438AC_LANG_POP
11439])# _LT_LANG_CXX_CONFIG
11440
11441
11442# _LT_FUNC_STRIPNAME_CNF
11443# ----------------------
11444# func_stripname_cnf prefix suffix name
11445# strip PREFIX and SUFFIX off of NAME.
11446# PREFIX and SUFFIX must not contain globbing or regex special
11447# characters, hashes, percent signs, but SUFFIX may contain a leading
11448# dot (in which case that matches only a dot).
11449#
11450# This function is identical to the (non-XSI) version of func_stripname,
11451# except this one can be used by m4 code that may be executed by configure,
11452# rather than the libtool script.
11453m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
11454AC_REQUIRE([_LT_DECL_SED])
11455AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
11456func_stripname_cnf ()
11457{
11458  case @S|@2 in
11459  .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
11460  *)  func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
11461  esac
11462} # func_stripname_cnf
11463])# _LT_FUNC_STRIPNAME_CNF
11464
11465
11466# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
11467# ---------------------------------
11468# Figure out "hidden" library dependencies from verbose
11469# compiler output when linking a shared library.
11470# Parse the compiler output and extract the necessary
11471# objects, libraries and library flags.
11472m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
11473[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
11474AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
11475# Dependencies to place before and after the object being linked:
11476_LT_TAGVAR(predep_objects, $1)=
11477_LT_TAGVAR(postdep_objects, $1)=
11478_LT_TAGVAR(predeps, $1)=
11479_LT_TAGVAR(postdeps, $1)=
11480_LT_TAGVAR(compiler_lib_search_path, $1)=
11481
11482dnl we can't use the lt_simple_compile_test_code here,
11483dnl because it contains code intended for an executable,
11484dnl not a library.  It's possible we should let each
11485dnl tag define a new lt_????_link_test_code variable,
11486dnl but it's only used here...
11487m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
11488int a;
11489void foo (void) { a = 0; }
11490_LT_EOF
11491], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
11492class Foo
11493{
11494public:
11495  Foo (void) { a = 0; }
11496private:
11497  int a;
11498};
11499_LT_EOF
11500], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
11501      subroutine foo
11502      implicit none
11503      integer*4 a
11504      a=0
11505      return
11506      end
11507_LT_EOF
11508], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
11509      subroutine foo
11510      implicit none
11511      integer a
11512      a=0
11513      return
11514      end
11515_LT_EOF
11516], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
11517public class foo {
11518  private int a;
11519  public void bar (void) {
11520    a = 0;
11521  }
11522};
11523_LT_EOF
11524], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
11525package foo
11526func foo() {
11527}
11528_LT_EOF
11529])
11530
11531_lt_libdeps_save_CFLAGS=$CFLAGS
11532case "$CC $CFLAGS " in #(
11533*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
11534*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
11535*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
11536esac
11537
11538dnl Parse the compiler output and extract the necessary
11539dnl objects, libraries and library flags.
11540if AC_TRY_EVAL(ac_compile); then
11541  # Parse the compiler output and extract the necessary
11542  # objects, libraries and library flags.
11543
11544  # Sentinel used to keep track of whether or not we are before
11545  # the conftest object file.
11546  pre_test_object_deps_done=no
11547
11548  for p in `eval "$output_verbose_link_cmd"`; do
11549    case $prev$p in
11550
11551    -L* | -R* | -l*)
11552       # Some compilers place space between "-{L,R}" and the path.
11553       # Remove the space.
11554       if test x-L = "$p" ||
11555          test x-R = "$p"; then
11556	 prev=$p
11557	 continue
11558       fi
11559
11560       # Expand the sysroot to ease extracting the directories later.
11561       if test -z "$prev"; then
11562         case $p in
11563         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
11564         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
11565         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
11566         esac
11567       fi
11568       case $p in
11569       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
11570       esac
11571       if test no = "$pre_test_object_deps_done"; then
11572	 case $prev in
11573	 -L | -R)
11574	   # Internal compiler library paths should come after those
11575	   # provided the user.  The postdeps already come after the
11576	   # user supplied libs so there is no need to process them.
11577	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
11578	     _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
11579	   else
11580	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
11581	   fi
11582	   ;;
11583	 # The "-l" case would never come before the object being
11584	 # linked, so don't bother handling this case.
11585	 esac
11586       else
11587	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
11588	   _LT_TAGVAR(postdeps, $1)=$prev$p
11589	 else
11590	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
11591	 fi
11592       fi
11593       prev=
11594       ;;
11595
11596    *.lto.$objext) ;; # Ignore GCC LTO objects
11597    *.$objext)
11598       # This assumes that the test object file only shows up
11599       # once in the compiler output.
11600       if test "$p" = "conftest.$objext"; then
11601	 pre_test_object_deps_done=yes
11602	 continue
11603       fi
11604
11605       if test no = "$pre_test_object_deps_done"; then
11606	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
11607	   _LT_TAGVAR(predep_objects, $1)=$p
11608	 else
11609	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
11610	 fi
11611       else
11612	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
11613	   _LT_TAGVAR(postdep_objects, $1)=$p
11614	 else
11615	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
11616	 fi
11617       fi
11618       ;;
11619
11620    *) ;; # Ignore the rest.
11621
11622    esac
11623  done
11624
11625  # Clean up.
11626  rm -f a.out a.exe
11627else
11628  echo "libtool.m4: error: problem compiling $1 test program"
11629fi
11630
11631$RM -f confest.$objext
11632CFLAGS=$_lt_libdeps_save_CFLAGS
11633
11634# PORTME: override above test on systems where it is broken
11635m4_if([$1], [CXX],
11636[case $host_os in
11637interix[[3-9]]*)
11638  # Interix 3.5 installs completely hosed .la files for C++, so rather than
11639  # hack all around it, let's just trust "g++" to DTRT.
11640  _LT_TAGVAR(predep_objects,$1)=
11641  _LT_TAGVAR(postdep_objects,$1)=
11642  _LT_TAGVAR(postdeps,$1)=
11643  ;;
11644esac
11645])
11646
11647case " $_LT_TAGVAR(postdeps, $1) " in
11648*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
11649esac
11650 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
11651if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
11652 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
11653fi
11654_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
11655    [The directories searched by this compiler when creating a shared library])
11656_LT_TAGDECL([], [predep_objects], [1],
11657    [Dependencies to place before and after the objects being linked to
11658    create a shared library])
11659_LT_TAGDECL([], [postdep_objects], [1])
11660_LT_TAGDECL([], [predeps], [1])
11661_LT_TAGDECL([], [postdeps], [1])
11662_LT_TAGDECL([], [compiler_lib_search_path], [1],
11663    [The library search path used internally by the compiler when linking
11664    a shared library])
11665])# _LT_SYS_HIDDEN_LIBDEPS
11666
11667
11668# _LT_LANG_F77_CONFIG([TAG])
11669# --------------------------
11670# Ensure that the configuration variables for a Fortran 77 compiler are
11671# suitably defined.  These variables are subsequently used by _LT_CONFIG
11672# to write the compiler configuration to 'libtool'.
11673m4_defun([_LT_LANG_F77_CONFIG],
11674[AC_LANG_PUSH(Fortran 77)
11675if test -z "$F77" || test no = "$F77"; then
11676  _lt_disable_F77=yes
11677fi
11678
11679_LT_TAGVAR(archive_cmds_need_lc, $1)=no
11680_LT_TAGVAR(allow_undefined_flag, $1)=
11681_LT_TAGVAR(always_export_symbols, $1)=no
11682_LT_TAGVAR(archive_expsym_cmds, $1)=
11683_LT_TAGVAR(export_dynamic_flag_spec, $1)=
11684_LT_TAGVAR(hardcode_direct, $1)=no
11685_LT_TAGVAR(hardcode_direct_absolute, $1)=no
11686_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
11687_LT_TAGVAR(hardcode_libdir_separator, $1)=
11688_LT_TAGVAR(hardcode_minus_L, $1)=no
11689_LT_TAGVAR(hardcode_automatic, $1)=no
11690_LT_TAGVAR(inherit_rpath, $1)=no
11691_LT_TAGVAR(module_cmds, $1)=
11692_LT_TAGVAR(module_expsym_cmds, $1)=
11693_LT_TAGVAR(link_all_deplibs, $1)=unknown
11694_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
11695_LT_TAGVAR(reload_flag, $1)=$reload_flag
11696_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
11697_LT_TAGVAR(no_undefined_flag, $1)=
11698_LT_TAGVAR(whole_archive_flag_spec, $1)=
11699_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
11700
11701# Source file extension for f77 test sources.
11702ac_ext=f
11703
11704# Object file extension for compiled f77 test sources.
11705objext=o
11706_LT_TAGVAR(objext, $1)=$objext
11707
11708# No sense in running all these tests if we already determined that
11709# the F77 compiler isn't working.  Some variables (like enable_shared)
11710# are currently assumed to apply to all compilers on this platform,
11711# and will be corrupted by setting them based on a non-working compiler.
11712if test yes != "$_lt_disable_F77"; then
11713  # Code to be used in simple compile tests
11714  lt_simple_compile_test_code="\
11715      subroutine t
11716      return
11717      end
11718"
11719
11720  # Code to be used in simple link tests
11721  lt_simple_link_test_code="\
11722      program t
11723      end
11724"
11725
11726  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
11727  _LT_TAG_COMPILER
11728
11729  # save warnings/boilerplate of simple test code
11730  _LT_COMPILER_BOILERPLATE
11731  _LT_LINKER_BOILERPLATE
11732
11733  # Allow CC to be a program name with arguments.
11734  lt_save_CC=$CC
11735  lt_save_GCC=$GCC
11736  lt_save_CFLAGS=$CFLAGS
11737  CC=${F77-"f77"}
11738  CFLAGS=$FFLAGS
11739  compiler=$CC
11740  _LT_TAGVAR(compiler, $1)=$CC
11741  _LT_CC_BASENAME([$compiler])
11742  GCC=$G77
11743  if test -n "$compiler"; then
11744    AC_MSG_CHECKING([if libtool supports shared libraries])
11745    AC_MSG_RESULT([$can_build_shared])
11746
11747    AC_MSG_CHECKING([whether to build shared libraries])
11748    test no = "$can_build_shared" && enable_shared=no
11749
11750    # On AIX, shared libraries and static libraries use the same namespace, and
11751    # are all built from PIC.
11752    case $host_os in
11753      aix3*)
11754        test yes = "$enable_shared" && enable_static=no
11755        if test -n "$RANLIB"; then
11756          archive_cmds="$archive_cmds~\$RANLIB \$lib"
11757          postinstall_cmds='$RANLIB $lib'
11758        fi
11759        ;;
11760      aix[[4-9]]*)
11761	if test ia64 != "$host_cpu"; then
11762	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
11763	  yes,aix,yes) ;;		# shared object as lib.so file only
11764	  yes,svr4,*) ;;		# shared object as lib.so archive member only
11765	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
11766	  esac
11767	fi
11768        ;;
11769    esac
11770    AC_MSG_RESULT([$enable_shared])
11771
11772    AC_MSG_CHECKING([whether to build static libraries])
11773    # Make sure either enable_shared or enable_static is yes.
11774    test yes = "$enable_shared" || enable_static=yes
11775    AC_MSG_RESULT([$enable_static])
11776
11777    _LT_TAGVAR(GCC, $1)=$G77
11778    _LT_TAGVAR(LD, $1)=$LD
11779
11780    ## CAVEAT EMPTOR:
11781    ## There is no encapsulation within the following macros, do not change
11782    ## the running order or otherwise move them around unless you know exactly
11783    ## what you are doing...
11784    _LT_COMPILER_PIC($1)
11785    _LT_COMPILER_C_O($1)
11786    _LT_COMPILER_FILE_LOCKS($1)
11787    _LT_LINKER_SHLIBS($1)
11788    _LT_SYS_DYNAMIC_LINKER($1)
11789    _LT_LINKER_HARDCODE_LIBPATH($1)
11790
11791    _LT_CONFIG($1)
11792  fi # test -n "$compiler"
11793
11794  GCC=$lt_save_GCC
11795  CC=$lt_save_CC
11796  CFLAGS=$lt_save_CFLAGS
11797fi # test yes != "$_lt_disable_F77"
11798
11799AC_LANG_POP
11800])# _LT_LANG_F77_CONFIG
11801
11802
11803# _LT_LANG_FC_CONFIG([TAG])
11804# -------------------------
11805# Ensure that the configuration variables for a Fortran compiler are
11806# suitably defined.  These variables are subsequently used by _LT_CONFIG
11807# to write the compiler configuration to 'libtool'.
11808m4_defun([_LT_LANG_FC_CONFIG],
11809[AC_LANG_PUSH(Fortran)
11810
11811if test -z "$FC" || test no = "$FC"; then
11812  _lt_disable_FC=yes
11813fi
11814
11815_LT_TAGVAR(archive_cmds_need_lc, $1)=no
11816_LT_TAGVAR(allow_undefined_flag, $1)=
11817_LT_TAGVAR(always_export_symbols, $1)=no
11818_LT_TAGVAR(archive_expsym_cmds, $1)=
11819_LT_TAGVAR(export_dynamic_flag_spec, $1)=
11820_LT_TAGVAR(hardcode_direct, $1)=no
11821_LT_TAGVAR(hardcode_direct_absolute, $1)=no
11822_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
11823_LT_TAGVAR(hardcode_libdir_separator, $1)=
11824_LT_TAGVAR(hardcode_minus_L, $1)=no
11825_LT_TAGVAR(hardcode_automatic, $1)=no
11826_LT_TAGVAR(inherit_rpath, $1)=no
11827_LT_TAGVAR(module_cmds, $1)=
11828_LT_TAGVAR(module_expsym_cmds, $1)=
11829_LT_TAGVAR(link_all_deplibs, $1)=unknown
11830_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
11831_LT_TAGVAR(reload_flag, $1)=$reload_flag
11832_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
11833_LT_TAGVAR(no_undefined_flag, $1)=
11834_LT_TAGVAR(whole_archive_flag_spec, $1)=
11835_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
11836
11837# Source file extension for fc test sources.
11838ac_ext=${ac_fc_srcext-f}
11839
11840# Object file extension for compiled fc test sources.
11841objext=o
11842_LT_TAGVAR(objext, $1)=$objext
11843
11844# No sense in running all these tests if we already determined that
11845# the FC compiler isn't working.  Some variables (like enable_shared)
11846# are currently assumed to apply to all compilers on this platform,
11847# and will be corrupted by setting them based on a non-working compiler.
11848if test yes != "$_lt_disable_FC"; then
11849  # Code to be used in simple compile tests
11850  lt_simple_compile_test_code="\
11851      subroutine t
11852      return
11853      end
11854"
11855
11856  # Code to be used in simple link tests
11857  lt_simple_link_test_code="\
11858      program t
11859      end
11860"
11861
11862  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
11863  _LT_TAG_COMPILER
11864
11865  # save warnings/boilerplate of simple test code
11866  _LT_COMPILER_BOILERPLATE
11867  _LT_LINKER_BOILERPLATE
11868
11869  # Allow CC to be a program name with arguments.
11870  lt_save_CC=$CC
11871  lt_save_GCC=$GCC
11872  lt_save_CFLAGS=$CFLAGS
11873  CC=${FC-"f95"}
11874  CFLAGS=$FCFLAGS
11875  compiler=$CC
11876  GCC=$ac_cv_fc_compiler_gnu
11877
11878  _LT_TAGVAR(compiler, $1)=$CC
11879  _LT_CC_BASENAME([$compiler])
11880
11881  if test -n "$compiler"; then
11882    AC_MSG_CHECKING([if libtool supports shared libraries])
11883    AC_MSG_RESULT([$can_build_shared])
11884
11885    AC_MSG_CHECKING([whether to build shared libraries])
11886    test no = "$can_build_shared" && enable_shared=no
11887
11888    # On AIX, shared libraries and static libraries use the same namespace, and
11889    # are all built from PIC.
11890    case $host_os in
11891      aix3*)
11892        test yes = "$enable_shared" && enable_static=no
11893        if test -n "$RANLIB"; then
11894          archive_cmds="$archive_cmds~\$RANLIB \$lib"
11895          postinstall_cmds='$RANLIB $lib'
11896        fi
11897        ;;
11898      aix[[4-9]]*)
11899	if test ia64 != "$host_cpu"; then
11900	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
11901	  yes,aix,yes) ;;		# shared object as lib.so file only
11902	  yes,svr4,*) ;;		# shared object as lib.so archive member only
11903	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
11904	  esac
11905	fi
11906        ;;
11907    esac
11908    AC_MSG_RESULT([$enable_shared])
11909
11910    AC_MSG_CHECKING([whether to build static libraries])
11911    # Make sure either enable_shared or enable_static is yes.
11912    test yes = "$enable_shared" || enable_static=yes
11913    AC_MSG_RESULT([$enable_static])
11914
11915    _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
11916    _LT_TAGVAR(LD, $1)=$LD
11917
11918    ## CAVEAT EMPTOR:
11919    ## There is no encapsulation within the following macros, do not change
11920    ## the running order or otherwise move them around unless you know exactly
11921    ## what you are doing...
11922    _LT_SYS_HIDDEN_LIBDEPS($1)
11923    _LT_COMPILER_PIC($1)
11924    _LT_COMPILER_C_O($1)
11925    _LT_COMPILER_FILE_LOCKS($1)
11926    _LT_LINKER_SHLIBS($1)
11927    _LT_SYS_DYNAMIC_LINKER($1)
11928    _LT_LINKER_HARDCODE_LIBPATH($1)
11929
11930    _LT_CONFIG($1)
11931  fi # test -n "$compiler"
11932
11933  GCC=$lt_save_GCC
11934  CC=$lt_save_CC
11935  CFLAGS=$lt_save_CFLAGS
11936fi # test yes != "$_lt_disable_FC"
11937
11938AC_LANG_POP
11939])# _LT_LANG_FC_CONFIG
11940
11941
11942# _LT_LANG_GCJ_CONFIG([TAG])
11943# --------------------------
11944# Ensure that the configuration variables for the GNU Java Compiler compiler
11945# are suitably defined.  These variables are subsequently used by _LT_CONFIG
11946# to write the compiler configuration to 'libtool'.
11947m4_defun([_LT_LANG_GCJ_CONFIG],
11948[AC_REQUIRE([LT_PROG_GCJ])dnl
11949AC_LANG_SAVE
11950
11951# Source file extension for Java test sources.
11952ac_ext=java
11953
11954# Object file extension for compiled Java test sources.
11955objext=o
11956_LT_TAGVAR(objext, $1)=$objext
11957
11958# Code to be used in simple compile tests
11959lt_simple_compile_test_code="class foo {}"
11960
11961# Code to be used in simple link tests
11962lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
11963
11964# ltmain only uses $CC for tagged configurations so make sure $CC is set.
11965_LT_TAG_COMPILER
11966
11967# save warnings/boilerplate of simple test code
11968_LT_COMPILER_BOILERPLATE
11969_LT_LINKER_BOILERPLATE
11970
11971# Allow CC to be a program name with arguments.
11972lt_save_CC=$CC
11973lt_save_CFLAGS=$CFLAGS
11974lt_save_GCC=$GCC
11975GCC=yes
11976CC=${GCJ-"gcj"}
11977CFLAGS=$GCJFLAGS
11978compiler=$CC
11979_LT_TAGVAR(compiler, $1)=$CC
11980_LT_TAGVAR(LD, $1)=$LD
11981_LT_CC_BASENAME([$compiler])
11982
11983# GCJ did not exist at the time GCC didn't implicitly link libc in.
11984_LT_TAGVAR(archive_cmds_need_lc, $1)=no
11985
11986_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
11987_LT_TAGVAR(reload_flag, $1)=$reload_flag
11988_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
11989
11990if test -n "$compiler"; then
11991  _LT_COMPILER_NO_RTTI($1)
11992  _LT_COMPILER_PIC($1)
11993  _LT_COMPILER_C_O($1)
11994  _LT_COMPILER_FILE_LOCKS($1)
11995  _LT_LINKER_SHLIBS($1)
11996  _LT_LINKER_HARDCODE_LIBPATH($1)
11997
11998  _LT_CONFIG($1)
11999fi
12000
12001AC_LANG_RESTORE
12002
12003GCC=$lt_save_GCC
12004CC=$lt_save_CC
12005CFLAGS=$lt_save_CFLAGS
12006])# _LT_LANG_GCJ_CONFIG
12007
12008
12009# _LT_LANG_GO_CONFIG([TAG])
12010# --------------------------
12011# Ensure that the configuration variables for the GNU Go compiler
12012# are suitably defined.  These variables are subsequently used by _LT_CONFIG
12013# to write the compiler configuration to 'libtool'.
12014m4_defun([_LT_LANG_GO_CONFIG],
12015[AC_REQUIRE([LT_PROG_GO])dnl
12016AC_LANG_SAVE
12017
12018# Source file extension for Go test sources.
12019ac_ext=go
12020
12021# Object file extension for compiled Go test sources.
12022objext=o
12023_LT_TAGVAR(objext, $1)=$objext
12024
12025# Code to be used in simple compile tests
12026lt_simple_compile_test_code="package main; func main() { }"
12027
12028# Code to be used in simple link tests
12029lt_simple_link_test_code='package main; func main() { }'
12030
12031# ltmain only uses $CC for tagged configurations so make sure $CC is set.
12032_LT_TAG_COMPILER
12033
12034# save warnings/boilerplate of simple test code
12035_LT_COMPILER_BOILERPLATE
12036_LT_LINKER_BOILERPLATE
12037
12038# Allow CC to be a program name with arguments.
12039lt_save_CC=$CC
12040lt_save_CFLAGS=$CFLAGS
12041lt_save_GCC=$GCC
12042GCC=yes
12043CC=${GOC-"gccgo"}
12044CFLAGS=$GOFLAGS
12045compiler=$CC
12046_LT_TAGVAR(compiler, $1)=$CC
12047_LT_TAGVAR(LD, $1)=$LD
12048_LT_CC_BASENAME([$compiler])
12049
12050# Go did not exist at the time GCC didn't implicitly link libc in.
12051_LT_TAGVAR(archive_cmds_need_lc, $1)=no
12052
12053_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
12054_LT_TAGVAR(reload_flag, $1)=$reload_flag
12055_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
12056
12057if test -n "$compiler"; then
12058  _LT_COMPILER_NO_RTTI($1)
12059  _LT_COMPILER_PIC($1)
12060  _LT_COMPILER_C_O($1)
12061  _LT_COMPILER_FILE_LOCKS($1)
12062  _LT_LINKER_SHLIBS($1)
12063  _LT_LINKER_HARDCODE_LIBPATH($1)
12064
12065  _LT_CONFIG($1)
12066fi
12067
12068AC_LANG_RESTORE
12069
12070GCC=$lt_save_GCC
12071CC=$lt_save_CC
12072CFLAGS=$lt_save_CFLAGS
12073])# _LT_LANG_GO_CONFIG
12074
12075
12076# _LT_LANG_RC_CONFIG([TAG])
12077# -------------------------
12078# Ensure that the configuration variables for the Windows resource compiler
12079# are suitably defined.  These variables are subsequently used by _LT_CONFIG
12080# to write the compiler configuration to 'libtool'.
12081m4_defun([_LT_LANG_RC_CONFIG],
12082[AC_REQUIRE([LT_PROG_RC])dnl
12083AC_LANG_SAVE
12084
12085# Source file extension for RC test sources.
12086ac_ext=rc
12087
12088# Object file extension for compiled RC test sources.
12089objext=o
12090_LT_TAGVAR(objext, $1)=$objext
12091
12092# Code to be used in simple compile tests
12093lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
12094
12095# Code to be used in simple link tests
12096lt_simple_link_test_code=$lt_simple_compile_test_code
12097
12098# ltmain only uses $CC for tagged configurations so make sure $CC is set.
12099_LT_TAG_COMPILER
12100
12101# save warnings/boilerplate of simple test code
12102_LT_COMPILER_BOILERPLATE
12103_LT_LINKER_BOILERPLATE
12104
12105# Allow CC to be a program name with arguments.
12106lt_save_CC=$CC
12107lt_save_CFLAGS=$CFLAGS
12108lt_save_GCC=$GCC
12109GCC=
12110CC=${RC-"windres"}
12111CFLAGS=
12112compiler=$CC
12113_LT_TAGVAR(compiler, $1)=$CC
12114_LT_CC_BASENAME([$compiler])
12115_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
12116
12117if test -n "$compiler"; then
12118  :
12119  _LT_CONFIG($1)
12120fi
12121
12122GCC=$lt_save_GCC
12123AC_LANG_RESTORE
12124CC=$lt_save_CC
12125CFLAGS=$lt_save_CFLAGS
12126])# _LT_LANG_RC_CONFIG
12127
12128
12129# LT_PROG_GCJ
12130# -----------
12131AC_DEFUN([LT_PROG_GCJ],
12132[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
12133  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
12134    [AC_CHECK_TOOL(GCJ, gcj,)
12135      test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
12136      AC_SUBST(GCJFLAGS)])])[]dnl
12137])
12138
12139# Old name:
12140AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
12141dnl aclocal-1.4 backwards compatibility:
12142dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
12143
12144
12145# LT_PROG_GO
12146# ----------
12147AC_DEFUN([LT_PROG_GO],
12148[AC_CHECK_TOOL(GOC, gccgo,)
12149])
12150
12151
12152# LT_PROG_RC
12153# ----------
12154AC_DEFUN([LT_PROG_RC],
12155[AC_CHECK_TOOL(RC, windres,)
12156])
12157
12158# Old name:
12159AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
12160dnl aclocal-1.4 backwards compatibility:
12161dnl AC_DEFUN([LT_AC_PROG_RC], [])
12162
12163
12164# _LT_DECL_EGREP
12165# --------------
12166# If we don't have a new enough Autoconf to choose the best grep
12167# available, choose the one first in the user's PATH.
12168m4_defun([_LT_DECL_EGREP],
12169[AC_REQUIRE([AC_PROG_EGREP])dnl
12170AC_REQUIRE([AC_PROG_FGREP])dnl
12171test -z "$GREP" && GREP=grep
12172_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
12173_LT_DECL([], [EGREP], [1], [An ERE matcher])
12174_LT_DECL([], [FGREP], [1], [A literal string matcher])
12175dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
12176AC_SUBST([GREP])
12177])
12178
12179
12180# _LT_DECL_OBJDUMP
12181# --------------
12182# If we don't have a new enough Autoconf to choose the best objdump
12183# available, choose the one first in the user's PATH.
12184m4_defun([_LT_DECL_OBJDUMP],
12185[AC_CHECK_TOOL(OBJDUMP, objdump, false)
12186test -z "$OBJDUMP" && OBJDUMP=objdump
12187_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
12188AC_SUBST([OBJDUMP])
12189])
12190
12191# _LT_DECL_DLLTOOL
12192# ----------------
12193# Ensure DLLTOOL variable is set.
12194m4_defun([_LT_DECL_DLLTOOL],
12195[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
12196test -z "$DLLTOOL" && DLLTOOL=dlltool
12197_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
12198AC_SUBST([DLLTOOL])
12199])
12200
12201# _LT_DECL_FILECMD
12202# ----------------
12203# Check for a file(cmd) program that can be used to detect file type and magic
12204m4_defun([_LT_DECL_FILECMD],
12205[AC_CHECK_TOOL([FILECMD], [file], [:])
12206_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types])
12207])# _LD_DECL_FILECMD
12208
12209# _LT_DECL_SED
12210# ------------
12211# Check for a fully-functional sed program, that truncates
12212# as few characters as possible.  Prefer GNU sed if found.
12213m4_defun([_LT_DECL_SED],
12214[AC_PROG_SED
12215test -z "$SED" && SED=sed
12216Xsed="$SED -e 1s/^X//"
12217_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
12218_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
12219    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
12220])# _LT_DECL_SED
12221
12222m4_ifndef([AC_PROG_SED], [
12223# NOTE: This macro has been submitted for inclusion into   #
12224#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
12225#  a released version of Autoconf we should remove this    #
12226#  macro and use it instead.                               #
12227
12228m4_defun([AC_PROG_SED],
12229[AC_MSG_CHECKING([for a sed that does not truncate output])
12230AC_CACHE_VAL(lt_cv_path_SED,
12231[# Loop through the user's path and test for sed and gsed.
12232# Then use that list of sed's as ones to test for truncation.
12233as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12234for as_dir in $PATH
12235do
12236  IFS=$as_save_IFS
12237  test -z "$as_dir" && as_dir=.
12238  for lt_ac_prog in sed gsed; do
12239    for ac_exec_ext in '' $ac_executable_extensions; do
12240      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
12241        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
12242      fi
12243    done
12244  done
12245done
12246IFS=$as_save_IFS
12247lt_ac_max=0
12248lt_ac_count=0
12249# Add /usr/xpg4/bin/sed as it is typically found on Solaris
12250# along with /bin/sed that truncates output.
12251for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
12252  test ! -f "$lt_ac_sed" && continue
12253  cat /dev/null > conftest.in
12254  lt_ac_count=0
12255  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
12256  # Check for GNU sed and select it if it is found.
12257  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
12258    lt_cv_path_SED=$lt_ac_sed
12259    break
12260  fi
12261  while true; do
12262    cat conftest.in conftest.in >conftest.tmp
12263    mv conftest.tmp conftest.in
12264    cp conftest.in conftest.nl
12265    echo >>conftest.nl
12266    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
12267    cmp -s conftest.out conftest.nl || break
12268    # 10000 chars as input seems more than enough
12269    test 10 -lt "$lt_ac_count" && break
12270    lt_ac_count=`expr $lt_ac_count + 1`
12271    if test "$lt_ac_count" -gt "$lt_ac_max"; then
12272      lt_ac_max=$lt_ac_count
12273      lt_cv_path_SED=$lt_ac_sed
12274    fi
12275  done
12276done
12277])
12278SED=$lt_cv_path_SED
12279AC_SUBST([SED])
12280AC_MSG_RESULT([$SED])
12281])#AC_PROG_SED
12282])#m4_ifndef
12283
12284# Old name:
12285AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
12286dnl aclocal-1.4 backwards compatibility:
12287dnl AC_DEFUN([LT_AC_PROG_SED], [])
12288
12289
12290# _LT_CHECK_SHELL_FEATURES
12291# ------------------------
12292# Find out whether the shell is Bourne or XSI compatible,
12293# or has some other useful features.
12294m4_defun([_LT_CHECK_SHELL_FEATURES],
12295[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
12296  lt_unset=unset
12297else
12298  lt_unset=false
12299fi
12300_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
12301
12302# test EBCDIC or ASCII
12303case `echo X|tr X '\101'` in
12304 A) # ASCII based system
12305    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
12306  lt_SP2NL='tr \040 \012'
12307  lt_NL2SP='tr \015\012 \040\040'
12308  ;;
12309 *) # EBCDIC based system
12310  lt_SP2NL='tr \100 \n'
12311  lt_NL2SP='tr \r\n \100\100'
12312  ;;
12313esac
12314_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
12315_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
12316])# _LT_CHECK_SHELL_FEATURES
12317
12318
12319# _LT_PATH_CONVERSION_FUNCTIONS
12320# -----------------------------
12321# Determine what file name conversion functions should be used by
12322# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
12323# for certain cross-compile configurations and native mingw.
12324m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
12325[AC_REQUIRE([AC_CANONICAL_HOST])dnl
12326AC_REQUIRE([AC_CANONICAL_BUILD])dnl
12327AC_MSG_CHECKING([how to convert $build file names to $host format])
12328AC_CACHE_VAL(lt_cv_to_host_file_cmd,
12329[case $host in
12330  *-*-mingw* )
12331    case $build in
12332      *-*-mingw* ) # actually msys
12333        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
12334        ;;
12335      *-*-cygwin* )
12336        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
12337        ;;
12338      * ) # otherwise, assume *nix
12339        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
12340        ;;
12341    esac
12342    ;;
12343  *-*-cygwin* )
12344    case $build in
12345      *-*-mingw* ) # actually msys
12346        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
12347        ;;
12348      *-*-cygwin* )
12349        lt_cv_to_host_file_cmd=func_convert_file_noop
12350        ;;
12351      * ) # otherwise, assume *nix
12352        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
12353        ;;
12354    esac
12355    ;;
12356  * ) # unhandled hosts (and "normal" native builds)
12357    lt_cv_to_host_file_cmd=func_convert_file_noop
12358    ;;
12359esac
12360])
12361to_host_file_cmd=$lt_cv_to_host_file_cmd
12362AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
12363_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
12364         [0], [convert $build file names to $host format])dnl
12365
12366AC_MSG_CHECKING([how to convert $build file names to toolchain format])
12367AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
12368[#assume ordinary cross tools, or native build.
12369lt_cv_to_tool_file_cmd=func_convert_file_noop
12370case $host in
12371  *-*-mingw* )
12372    case $build in
12373      *-*-mingw* ) # actually msys
12374        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
12375        ;;
12376    esac
12377    ;;
12378esac
12379])
12380to_tool_file_cmd=$lt_cv_to_tool_file_cmd
12381AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
12382_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
12383         [0], [convert $build files to toolchain format])dnl
12384])# _LT_PATH_CONVERSION_FUNCTIONS
12385
12386# ltversion.m4 -- version numbers			-*- Autoconf -*-
12387#
12388#   Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation,
12389#   Inc.
12390#   Written by Scott James Remnant, 2004
12391#
12392# This file is free software; the Free Software Foundation gives
12393# unlimited permission to copy and/or distribute it, with or without
12394# modifications, as long as this notice is preserved.
12395
12396# @configure_input@
12397
12398# serial 4245 ltversion.m4
12399# This file is part of GNU Libtool
12400
12401m4_define([LT_PACKAGE_VERSION], [2.4.7])
12402m4_define([LT_PACKAGE_REVISION], [2.4.7])
12403
12404AC_DEFUN([LTVERSION_VERSION],
12405[macro_version='2.4.7'
12406macro_revision='2.4.7'
12407_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
12408_LT_DECL(, macro_revision, 0)
12409])
12410
12411