aclocal.m4 revision 43d802fa
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.3
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.3])
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# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
414#
415#   Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software
416#   Foundation, Inc.
417#   Written by Gordon Matzigkeit, 1996
418#
419# This file is free software; the Free Software Foundation gives
420# unlimited permission to copy and/or distribute it, with or without
421# modifications, as long as this notice is preserved.
422
423m4_define([_LT_COPYING], [dnl
424# Copyright (C) 2014 Free Software Foundation, Inc.
425# This is free software; see the source for copying conditions.  There is NO
426# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
427
428# GNU Libtool is free software; you can redistribute it and/or modify
429# it under the terms of the GNU General Public License as published by
430# the Free Software Foundation; either version 2 of of the License, or
431# (at your option) any later version.
432#
433# As a special exception to the GNU General Public License, if you
434# distribute this file as part of a program or library that is built
435# using GNU Libtool, you may include this file under the  same
436# distribution terms that you use for the rest of that program.
437#
438# GNU Libtool is distributed in the hope that it will be useful, but
439# WITHOUT ANY WARRANTY; without even the implied warranty of
440# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
441# GNU General Public License for more details.
442#
443# You should have received a copy of the GNU General Public License
444# along with this program.  If not, see <http://www.gnu.org/licenses/>.
445])
446
447# serial 59 LT_INIT
448
449
450# LT_PREREQ(VERSION)
451# ------------------
452# Complain and exit if this libtool version is less that VERSION.
453m4_defun([LT_PREREQ],
454[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
455       [m4_default([$3],
456		   [m4_fatal([Libtool version $1 or higher is required],
457		             63)])],
458       [$2])])
459
460
461# _LT_CHECK_BUILDDIR
462# ------------------
463# Complain if the absolute build directory name contains unusual characters
464m4_defun([_LT_CHECK_BUILDDIR],
465[case `pwd` in
466  *\ * | *\	*)
467    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
468esac
469])
470
471
472# LT_INIT([OPTIONS])
473# ------------------
474AC_DEFUN([LT_INIT],
475[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
476AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
477AC_BEFORE([$0], [LT_LANG])dnl
478AC_BEFORE([$0], [LT_OUTPUT])dnl
479AC_BEFORE([$0], [LTDL_INIT])dnl
480m4_require([_LT_CHECK_BUILDDIR])dnl
481
482dnl Autoconf doesn't catch unexpanded LT_ macros by default:
483m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
484m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
485dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
486dnl unless we require an AC_DEFUNed macro:
487AC_REQUIRE([LTOPTIONS_VERSION])dnl
488AC_REQUIRE([LTSUGAR_VERSION])dnl
489AC_REQUIRE([LTVERSION_VERSION])dnl
490AC_REQUIRE([LTOBSOLETE_VERSION])dnl
491m4_require([_LT_PROG_LTMAIN])dnl
492
493_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
494
495dnl Parse OPTIONS
496_LT_SET_OPTIONS([$0], [$1])
497
498# This can be used to rebuild libtool when needed
499LIBTOOL_DEPS=$ltmain
500
501# Always use our own libtool.
502LIBTOOL='$(SHELL) $(top_builddir)/libtool'
503AC_SUBST(LIBTOOL)dnl
504
505_LT_SETUP
506
507# Only expand once:
508m4_define([LT_INIT])
509])# LT_INIT
510
511# Old names:
512AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
513AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
514dnl aclocal-1.4 backwards compatibility:
515dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
516dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
517
518
519# _LT_PREPARE_CC_BASENAME
520# -----------------------
521m4_defun([_LT_PREPARE_CC_BASENAME], [
522# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
523func_cc_basename ()
524{
525    for cc_temp in @S|@*""; do
526      case $cc_temp in
527        compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
528        distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
529        \-*) ;;
530        *) break;;
531      esac
532    done
533    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
534}
535])# _LT_PREPARE_CC_BASENAME
536
537
538# _LT_CC_BASENAME(CC)
539# -------------------
540# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
541# but that macro is also expanded into generated libtool script, which
542# arranges for $SED and $ECHO to be set by different means.
543m4_defun([_LT_CC_BASENAME],
544[m4_require([_LT_PREPARE_CC_BASENAME])dnl
545AC_REQUIRE([_LT_DECL_SED])dnl
546AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
547func_cc_basename $1
548cc_basename=$func_cc_basename_result
549])
550
551
552# _LT_FILEUTILS_DEFAULTS
553# ----------------------
554# It is okay to use these file commands and assume they have been set
555# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
556m4_defun([_LT_FILEUTILS_DEFAULTS],
557[: ${CP="cp -f"}
558: ${MV="mv -f"}
559: ${RM="rm -f"}
560])# _LT_FILEUTILS_DEFAULTS
561
562
563# _LT_SETUP
564# ---------
565m4_defun([_LT_SETUP],
566[AC_REQUIRE([AC_CANONICAL_HOST])dnl
567AC_REQUIRE([AC_CANONICAL_BUILD])dnl
568AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
569AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
570
571_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
572dnl
573_LT_DECL([], [host_alias], [0], [The host system])dnl
574_LT_DECL([], [host], [0])dnl
575_LT_DECL([], [host_os], [0])dnl
576dnl
577_LT_DECL([], [build_alias], [0], [The build system])dnl
578_LT_DECL([], [build], [0])dnl
579_LT_DECL([], [build_os], [0])dnl
580dnl
581AC_REQUIRE([AC_PROG_CC])dnl
582AC_REQUIRE([LT_PATH_LD])dnl
583AC_REQUIRE([LT_PATH_NM])dnl
584dnl
585AC_REQUIRE([AC_PROG_LN_S])dnl
586test -z "$LN_S" && LN_S="ln -s"
587_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
588dnl
589AC_REQUIRE([LT_CMD_MAX_LEN])dnl
590_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
591_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
592dnl
593m4_require([_LT_FILEUTILS_DEFAULTS])dnl
594m4_require([_LT_CHECK_SHELL_FEATURES])dnl
595m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
596m4_require([_LT_CMD_RELOAD])dnl
597m4_require([_LT_DECL_FILECMD])dnl
598m4_require([_LT_CHECK_MAGIC_METHOD])dnl
599m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
600m4_require([_LT_CMD_OLD_ARCHIVE])dnl
601m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
602m4_require([_LT_WITH_SYSROOT])dnl
603m4_require([_LT_CMD_TRUNCATE])dnl
604
605_LT_CONFIG_LIBTOOL_INIT([
606# See if we are running on zsh, and set the options that allow our
607# commands through without removal of \ escapes INIT.
608if test -n "\${ZSH_VERSION+set}"; then
609   setopt NO_GLOB_SUBST
610fi
611])
612if test -n "${ZSH_VERSION+set}"; then
613   setopt NO_GLOB_SUBST
614fi
615
616_LT_CHECK_OBJDIR
617
618m4_require([_LT_TAG_COMPILER])dnl
619
620case $host_os in
621aix3*)
622  # AIX sometimes has problems with the GCC collect2 program.  For some
623  # reason, if we set the COLLECT_NAMES environment variable, the problems
624  # vanish in a puff of smoke.
625  if test set != "${COLLECT_NAMES+set}"; then
626    COLLECT_NAMES=
627    export COLLECT_NAMES
628  fi
629  ;;
630esac
631
632# Global variables:
633ofile=libtool
634can_build_shared=yes
635
636# All known linkers require a '.a' archive for static linking (except MSVC and
637# ICC, which need '.lib').
638libext=a
639
640with_gnu_ld=$lt_cv_prog_gnu_ld
641
642old_CC=$CC
643old_CFLAGS=$CFLAGS
644
645# Set sane defaults for various variables
646test -z "$CC" && CC=cc
647test -z "$LTCC" && LTCC=$CC
648test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
649test -z "$LD" && LD=ld
650test -z "$ac_objext" && ac_objext=o
651
652_LT_CC_BASENAME([$compiler])
653
654# Only perform the check for file, if the check method requires it
655test -z "$MAGIC_CMD" && MAGIC_CMD=file
656case $deplibs_check_method in
657file_magic*)
658  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
659    _LT_PATH_MAGIC
660  fi
661  ;;
662esac
663
664# Use C for the default configuration in the libtool script
665LT_SUPPORTED_TAG([CC])
666_LT_LANG_C_CONFIG
667_LT_LANG_DEFAULT_CONFIG
668_LT_CONFIG_COMMANDS
669])# _LT_SETUP
670
671
672# _LT_PREPARE_SED_QUOTE_VARS
673# --------------------------
674# Define a few sed substitution that help us do robust quoting.
675m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
676[# Backslashify metacharacters that are still active within
677# double-quoted strings.
678sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
679
680# Same as above, but do not quote variable references.
681double_quote_subst='s/\([["`\\]]\)/\\\1/g'
682
683# Sed substitution to delay expansion of an escaped shell variable in a
684# double_quote_subst'ed string.
685delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
686
687# Sed substitution to delay expansion of an escaped single quote.
688delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
689
690# Sed substitution to avoid accidental globbing in evaled expressions
691no_glob_subst='s/\*/\\\*/g'
692])
693
694# _LT_PROG_LTMAIN
695# ---------------
696# Note that this code is called both from 'configure', and 'config.status'
697# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
698# 'config.status' has no value for ac_aux_dir unless we are using Automake,
699# so we pass a copy along to make sure it has a sensible value anyway.
700m4_defun([_LT_PROG_LTMAIN],
701[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
702_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
703ltmain=$ac_aux_dir/ltmain.sh
704])# _LT_PROG_LTMAIN
705
706
707
708# So that we can recreate a full libtool script including additional
709# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
710# in macros and then make a single call at the end using the 'libtool'
711# label.
712
713
714# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
715# ----------------------------------------
716# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
717m4_define([_LT_CONFIG_LIBTOOL_INIT],
718[m4_ifval([$1],
719          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
720                     [$1
721])])])
722
723# Initialize.
724m4_define([_LT_OUTPUT_LIBTOOL_INIT])
725
726
727# _LT_CONFIG_LIBTOOL([COMMANDS])
728# ------------------------------
729# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
730m4_define([_LT_CONFIG_LIBTOOL],
731[m4_ifval([$1],
732          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
733                     [$1
734])])])
735
736# Initialize.
737m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
738
739
740# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
741# -----------------------------------------------------
742m4_defun([_LT_CONFIG_SAVE_COMMANDS],
743[_LT_CONFIG_LIBTOOL([$1])
744_LT_CONFIG_LIBTOOL_INIT([$2])
745])
746
747
748# _LT_FORMAT_COMMENT([COMMENT])
749# -----------------------------
750# Add leading comment marks to the start of each line, and a trailing
751# full-stop to the whole comment if one is not present already.
752m4_define([_LT_FORMAT_COMMENT],
753[m4_ifval([$1], [
754m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
755              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
756)])
757
758
759
760
761
762# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
763# -------------------------------------------------------------------
764# CONFIGNAME is the name given to the value in the libtool script.
765# VARNAME is the (base) name used in the configure script.
766# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
767# VARNAME.  Any other value will be used directly.
768m4_define([_LT_DECL],
769[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
770    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
771	[m4_ifval([$1], [$1], [$2])])
772    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
773    m4_ifval([$4],
774	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
775    lt_dict_add_subkey([lt_decl_dict], [$2],
776	[tagged?], [m4_ifval([$5], [yes], [no])])])
777])
778
779
780# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
781# --------------------------------------------------------
782m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
783
784
785# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
786# ------------------------------------------------
787m4_define([lt_decl_tag_varnames],
788[_lt_decl_filter([tagged?], [yes], $@)])
789
790
791# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
792# ---------------------------------------------------------
793m4_define([_lt_decl_filter],
794[m4_case([$#],
795  [0], [m4_fatal([$0: too few arguments: $#])],
796  [1], [m4_fatal([$0: too few arguments: $#: $1])],
797  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
798  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
799  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
800])
801
802
803# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
804# --------------------------------------------------
805m4_define([lt_decl_quote_varnames],
806[_lt_decl_filter([value], [1], $@)])
807
808
809# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
810# ---------------------------------------------------
811m4_define([lt_decl_dquote_varnames],
812[_lt_decl_filter([value], [2], $@)])
813
814
815# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
816# ---------------------------------------------------
817m4_define([lt_decl_varnames_tagged],
818[m4_assert([$# <= 2])dnl
819_$0(m4_quote(m4_default([$1], [[, ]])),
820    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
821    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
822m4_define([_lt_decl_varnames_tagged],
823[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
824
825
826# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
827# ------------------------------------------------
828m4_define([lt_decl_all_varnames],
829[_$0(m4_quote(m4_default([$1], [[, ]])),
830     m4_if([$2], [],
831	   m4_quote(lt_decl_varnames),
832	m4_quote(m4_shift($@))))[]dnl
833])
834m4_define([_lt_decl_all_varnames],
835[lt_join($@, lt_decl_varnames_tagged([$1],
836			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
837])
838
839
840# _LT_CONFIG_STATUS_DECLARE([VARNAME])
841# ------------------------------------
842# Quote a variable value, and forward it to 'config.status' so that its
843# declaration there will have the same value as in 'configure'.  VARNAME
844# must have a single quote delimited value for this to work.
845m4_define([_LT_CONFIG_STATUS_DECLARE],
846[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
847
848
849# _LT_CONFIG_STATUS_DECLARATIONS
850# ------------------------------
851# We delimit libtool config variables with single quotes, so when
852# we write them to config.status, we have to be sure to quote all
853# embedded single quotes properly.  In configure, this macro expands
854# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
855#
856#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
857m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
858[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
859    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
860
861
862# _LT_LIBTOOL_TAGS
863# ----------------
864# Output comment and list of tags supported by the script
865m4_defun([_LT_LIBTOOL_TAGS],
866[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
867available_tags='_LT_TAGS'dnl
868])
869
870
871# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
872# -----------------------------------
873# Extract the dictionary values for VARNAME (optionally with TAG) and
874# expand to a commented shell variable setting:
875#
876#    # Some comment about what VAR is for.
877#    visible_name=$lt_internal_name
878m4_define([_LT_LIBTOOL_DECLARE],
879[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
880					   [description])))[]dnl
881m4_pushdef([_libtool_name],
882    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
883m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
884    [0], [_libtool_name=[$]$1],
885    [1], [_libtool_name=$lt_[]$1],
886    [2], [_libtool_name=$lt_[]$1],
887    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
888m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
889])
890
891
892# _LT_LIBTOOL_CONFIG_VARS
893# -----------------------
894# Produce commented declarations of non-tagged libtool config variables
895# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
896# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
897# section) are produced by _LT_LIBTOOL_TAG_VARS.
898m4_defun([_LT_LIBTOOL_CONFIG_VARS],
899[m4_foreach([_lt_var],
900    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
901    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
902
903
904# _LT_LIBTOOL_TAG_VARS(TAG)
905# -------------------------
906m4_define([_LT_LIBTOOL_TAG_VARS],
907[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
908    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
909
910
911# _LT_TAGVAR(VARNAME, [TAGNAME])
912# ------------------------------
913m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
914
915
916# _LT_CONFIG_COMMANDS
917# -------------------
918# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
919# variables for single and double quote escaping we saved from calls
920# to _LT_DECL, we can put quote escaped variables declarations
921# into 'config.status', and then the shell code to quote escape them in
922# for loops in 'config.status'.  Finally, any additional code accumulated
923# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
924m4_defun([_LT_CONFIG_COMMANDS],
925[AC_PROVIDE_IFELSE([LT_OUTPUT],
926	dnl If the libtool generation code has been placed in $CONFIG_LT,
927	dnl instead of duplicating it all over again into config.status,
928	dnl then we will have config.status run $CONFIG_LT later, so it
929	dnl needs to know what name is stored there:
930        [AC_CONFIG_COMMANDS([libtool],
931            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
932    dnl If the libtool generation code is destined for config.status,
933    dnl expand the accumulated commands and init code now:
934    [AC_CONFIG_COMMANDS([libtool],
935        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
936])#_LT_CONFIG_COMMANDS
937
938
939# Initialize.
940m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
941[
942
943# The HP-UX ksh and POSIX shell print the target directory to stdout
944# if CDPATH is set.
945(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
946
947sed_quote_subst='$sed_quote_subst'
948double_quote_subst='$double_quote_subst'
949delay_variable_subst='$delay_variable_subst'
950_LT_CONFIG_STATUS_DECLARATIONS
951LTCC='$LTCC'
952LTCFLAGS='$LTCFLAGS'
953compiler='$compiler_DEFAULT'
954
955# A function that is used when there is no print builtin or printf.
956func_fallback_echo ()
957{
958  eval 'cat <<_LTECHO_EOF
959\$[]1
960_LTECHO_EOF'
961}
962
963# Quote evaled strings.
964for var in lt_decl_all_varnames([[ \
965]], lt_decl_quote_varnames); do
966    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
967    *[[\\\\\\\`\\"\\\$]]*)
968      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
969      ;;
970    *)
971      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
972      ;;
973    esac
974done
975
976# Double-quote double-evaled strings.
977for var in lt_decl_all_varnames([[ \
978]], lt_decl_dquote_varnames); do
979    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
980    *[[\\\\\\\`\\"\\\$]]*)
981      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
982      ;;
983    *)
984      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
985      ;;
986    esac
987done
988
989_LT_OUTPUT_LIBTOOL_INIT
990])
991
992# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
993# ------------------------------------
994# Generate a child script FILE with all initialization necessary to
995# reuse the environment learned by the parent script, and make the
996# file executable.  If COMMENT is supplied, it is inserted after the
997# '#!' sequence but before initialization text begins.  After this
998# macro, additional text can be appended to FILE to form the body of
999# the child script.  The macro ends with non-zero status if the
1000# file could not be fully written (such as if the disk is full).
1001m4_ifdef([AS_INIT_GENERATED],
1002[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
1003[m4_defun([_LT_GENERATED_FILE_INIT],
1004[m4_require([AS_PREPARE])]dnl
1005[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
1006[lt_write_fail=0
1007cat >$1 <<_ASEOF || lt_write_fail=1
1008#! $SHELL
1009# Generated by $as_me.
1010$2
1011SHELL=\${CONFIG_SHELL-$SHELL}
1012export SHELL
1013_ASEOF
1014cat >>$1 <<\_ASEOF || lt_write_fail=1
1015AS_SHELL_SANITIZE
1016_AS_PREPARE
1017exec AS_MESSAGE_FD>&1
1018_ASEOF
1019test 0 = "$lt_write_fail" && chmod +x $1[]dnl
1020m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
1021
1022# LT_OUTPUT
1023# ---------
1024# This macro allows early generation of the libtool script (before
1025# AC_OUTPUT is called), incase it is used in configure for compilation
1026# tests.
1027AC_DEFUN([LT_OUTPUT],
1028[: ${CONFIG_LT=./config.lt}
1029AC_MSG_NOTICE([creating $CONFIG_LT])
1030_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
1031[# Run this file to recreate a libtool stub with the current configuration.])
1032
1033cat >>"$CONFIG_LT" <<\_LTEOF
1034lt_cl_silent=false
1035exec AS_MESSAGE_LOG_FD>>config.log
1036{
1037  echo
1038  AS_BOX([Running $as_me.])
1039} >&AS_MESSAGE_LOG_FD
1040
1041lt_cl_help="\
1042'$as_me' creates a local libtool stub from the current configuration,
1043for use in further configure time tests before the real libtool is
1044generated.
1045
1046Usage: $[0] [[OPTIONS]]
1047
1048  -h, --help      print this help, then exit
1049  -V, --version   print version number, then exit
1050  -q, --quiet     do not print progress messages
1051  -d, --debug     don't remove temporary files
1052
1053Report bugs to <bug-libtool@gnu.org>."
1054
1055lt_cl_version="\
1056m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
1057m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1058configured by $[0], generated by m4_PACKAGE_STRING.
1059
1060Copyright (C) 2011 Free Software Foundation, Inc.
1061This config.lt script is free software; the Free Software Foundation
1062gives unlimited permision to copy, distribute and modify it."
1063
1064while test 0 != $[#]
1065do
1066  case $[1] in
1067    --version | --v* | -V )
1068      echo "$lt_cl_version"; exit 0 ;;
1069    --help | --h* | -h )
1070      echo "$lt_cl_help"; exit 0 ;;
1071    --debug | --d* | -d )
1072      debug=: ;;
1073    --quiet | --q* | --silent | --s* | -q )
1074      lt_cl_silent=: ;;
1075
1076    -*) AC_MSG_ERROR([unrecognized option: $[1]
1077Try '$[0] --help' for more information.]) ;;
1078
1079    *) AC_MSG_ERROR([unrecognized argument: $[1]
1080Try '$[0] --help' for more information.]) ;;
1081  esac
1082  shift
1083done
1084
1085if $lt_cl_silent; then
1086  exec AS_MESSAGE_FD>/dev/null
1087fi
1088_LTEOF
1089
1090cat >>"$CONFIG_LT" <<_LTEOF
1091_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
1092_LTEOF
1093
1094cat >>"$CONFIG_LT" <<\_LTEOF
1095AC_MSG_NOTICE([creating $ofile])
1096_LT_OUTPUT_LIBTOOL_COMMANDS
1097AS_EXIT(0)
1098_LTEOF
1099chmod +x "$CONFIG_LT"
1100
1101# configure is writing to config.log, but config.lt does its own redirection,
1102# appending to config.log, which fails on DOS, as config.log is still kept
1103# open by configure.  Here we exec the FD to /dev/null, effectively closing
1104# config.log, so it can be properly (re)opened and appended to by config.lt.
1105lt_cl_success=:
1106test yes = "$silent" &&
1107  lt_config_lt_args="$lt_config_lt_args --quiet"
1108exec AS_MESSAGE_LOG_FD>/dev/null
1109$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
1110exec AS_MESSAGE_LOG_FD>>config.log
1111$lt_cl_success || AS_EXIT(1)
1112])# LT_OUTPUT
1113
1114
1115# _LT_CONFIG(TAG)
1116# ---------------
1117# If TAG is the built-in tag, create an initial libtool script with a
1118# default configuration from the untagged config vars.  Otherwise add code
1119# to config.status for appending the configuration named by TAG from the
1120# matching tagged config vars.
1121m4_defun([_LT_CONFIG],
1122[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1123_LT_CONFIG_SAVE_COMMANDS([
1124  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
1125  m4_if(_LT_TAG, [C], [
1126    # See if we are running on zsh, and set the options that allow our
1127    # commands through without removal of \ escapes.
1128    if test -n "${ZSH_VERSION+set}"; then
1129      setopt NO_GLOB_SUBST
1130    fi
1131
1132    cfgfile=${ofile}T
1133    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
1134    $RM "$cfgfile"
1135
1136    cat <<_LT_EOF >> "$cfgfile"
1137#! $SHELL
1138# Generated automatically by $as_me ($PACKAGE) $VERSION
1139# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1140# NOTE: Changes made to this file will be lost: look at ltmain.sh.
1141
1142# Provide generalized library-building support services.
1143# Written by Gordon Matzigkeit, 1996
1144
1145_LT_COPYING
1146_LT_LIBTOOL_TAGS
1147
1148# Configured defaults for sys_lib_dlsearch_path munging.
1149: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
1150
1151# ### BEGIN LIBTOOL CONFIG
1152_LT_LIBTOOL_CONFIG_VARS
1153_LT_LIBTOOL_TAG_VARS
1154# ### END LIBTOOL CONFIG
1155
1156_LT_EOF
1157
1158    cat <<'_LT_EOF' >> "$cfgfile"
1159
1160# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
1161
1162_LT_PREPARE_MUNGE_PATH_LIST
1163_LT_PREPARE_CC_BASENAME
1164
1165# ### END FUNCTIONS SHARED WITH CONFIGURE
1166
1167_LT_EOF
1168
1169  case $host_os in
1170  aix3*)
1171    cat <<\_LT_EOF >> "$cfgfile"
1172# AIX sometimes has problems with the GCC collect2 program.  For some
1173# reason, if we set the COLLECT_NAMES environment variable, the problems
1174# vanish in a puff of smoke.
1175if test set != "${COLLECT_NAMES+set}"; then
1176  COLLECT_NAMES=
1177  export COLLECT_NAMES
1178fi
1179_LT_EOF
1180    ;;
1181  esac
1182
1183  _LT_PROG_LTMAIN
1184
1185  # We use sed instead of cat because bash on DJGPP gets confused if
1186  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
1187  # text mode, it properly converts lines to CR/LF.  This bash problem
1188  # is reportedly fixed, but why not run on old versions too?
1189  $SED '$q' "$ltmain" >> "$cfgfile" \
1190     || (rm -f "$cfgfile"; exit 1)
1191
1192   mv -f "$cfgfile" "$ofile" ||
1193    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
1194  chmod +x "$ofile"
1195],
1196[cat <<_LT_EOF >> "$ofile"
1197
1198dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
1199dnl in a comment (ie after a #).
1200# ### BEGIN LIBTOOL TAG CONFIG: $1
1201_LT_LIBTOOL_TAG_VARS(_LT_TAG)
1202# ### END LIBTOOL TAG CONFIG: $1
1203_LT_EOF
1204])dnl /m4_if
1205],
1206[m4_if([$1], [], [
1207    PACKAGE='$PACKAGE'
1208    VERSION='$VERSION'
1209    RM='$RM'
1210    ofile='$ofile'], [])
1211])dnl /_LT_CONFIG_SAVE_COMMANDS
1212])# _LT_CONFIG
1213
1214
1215# LT_SUPPORTED_TAG(TAG)
1216# ---------------------
1217# Trace this macro to discover what tags are supported by the libtool
1218# --tag option, using:
1219#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
1220AC_DEFUN([LT_SUPPORTED_TAG], [])
1221
1222
1223# C support is built-in for now
1224m4_define([_LT_LANG_C_enabled], [])
1225m4_define([_LT_TAGS], [])
1226
1227
1228# LT_LANG(LANG)
1229# -------------
1230# Enable libtool support for the given language if not already enabled.
1231AC_DEFUN([LT_LANG],
1232[AC_BEFORE([$0], [LT_OUTPUT])dnl
1233m4_case([$1],
1234  [C],			[_LT_LANG(C)],
1235  [C++],		[_LT_LANG(CXX)],
1236  [Go],			[_LT_LANG(GO)],
1237  [Java],		[_LT_LANG(GCJ)],
1238  [Fortran 77],		[_LT_LANG(F77)],
1239  [Fortran],		[_LT_LANG(FC)],
1240  [Windows Resource],	[_LT_LANG(RC)],
1241  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
1242    [_LT_LANG($1)],
1243    [m4_fatal([$0: unsupported language: "$1"])])])dnl
1244])# LT_LANG
1245
1246
1247# _LT_LANG(LANGNAME)
1248# ------------------
1249m4_defun([_LT_LANG],
1250[m4_ifdef([_LT_LANG_]$1[_enabled], [],
1251  [LT_SUPPORTED_TAG([$1])dnl
1252  m4_append([_LT_TAGS], [$1 ])dnl
1253  m4_define([_LT_LANG_]$1[_enabled], [])dnl
1254  _LT_LANG_$1_CONFIG($1)])dnl
1255])# _LT_LANG
1256
1257
1258m4_ifndef([AC_PROG_GO], [
1259# NOTE: This macro has been submitted for inclusion into   #
1260#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
1261#  a released version of Autoconf we should remove this    #
1262#  macro and use it instead.                               #
1263m4_defun([AC_PROG_GO],
1264[AC_LANG_PUSH(Go)dnl
1265AC_ARG_VAR([GOC],     [Go compiler command])dnl
1266AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
1267_AC_ARG_VAR_LDFLAGS()dnl
1268AC_CHECK_TOOL(GOC, gccgo)
1269if test -z "$GOC"; then
1270  if test -n "$ac_tool_prefix"; then
1271    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
1272  fi
1273fi
1274if test -z "$GOC"; then
1275  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
1276fi
1277])#m4_defun
1278])#m4_ifndef
1279
1280
1281# _LT_LANG_DEFAULT_CONFIG
1282# -----------------------
1283m4_defun([_LT_LANG_DEFAULT_CONFIG],
1284[AC_PROVIDE_IFELSE([AC_PROG_CXX],
1285  [LT_LANG(CXX)],
1286  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
1287
1288AC_PROVIDE_IFELSE([AC_PROG_F77],
1289  [LT_LANG(F77)],
1290  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
1291
1292AC_PROVIDE_IFELSE([AC_PROG_FC],
1293  [LT_LANG(FC)],
1294  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
1295
1296dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
1297dnl pulling things in needlessly.
1298AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1299  [LT_LANG(GCJ)],
1300  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1301    [LT_LANG(GCJ)],
1302    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
1303      [LT_LANG(GCJ)],
1304      [m4_ifdef([AC_PROG_GCJ],
1305	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
1306       m4_ifdef([A][M_PROG_GCJ],
1307	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
1308       m4_ifdef([LT_PROG_GCJ],
1309	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
1310
1311AC_PROVIDE_IFELSE([AC_PROG_GO],
1312  [LT_LANG(GO)],
1313  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
1314
1315AC_PROVIDE_IFELSE([LT_PROG_RC],
1316  [LT_LANG(RC)],
1317  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
1318])# _LT_LANG_DEFAULT_CONFIG
1319
1320# Obsolete macros:
1321AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
1322AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
1323AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
1324AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
1325AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
1326dnl aclocal-1.4 backwards compatibility:
1327dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
1328dnl AC_DEFUN([AC_LIBTOOL_F77], [])
1329dnl AC_DEFUN([AC_LIBTOOL_FC], [])
1330dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
1331dnl AC_DEFUN([AC_LIBTOOL_RC], [])
1332
1333
1334# _LT_TAG_COMPILER
1335# ----------------
1336m4_defun([_LT_TAG_COMPILER],
1337[AC_REQUIRE([AC_PROG_CC])dnl
1338
1339_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
1340_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
1341_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
1342_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
1343
1344# If no C compiler was specified, use CC.
1345LTCC=${LTCC-"$CC"}
1346
1347# If no C compiler flags were specified, use CFLAGS.
1348LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1349
1350# Allow CC to be a program name with arguments.
1351compiler=$CC
1352])# _LT_TAG_COMPILER
1353
1354
1355# _LT_COMPILER_BOILERPLATE
1356# ------------------------
1357# Check for compiler boilerplate output or warnings with
1358# the simple compiler test code.
1359m4_defun([_LT_COMPILER_BOILERPLATE],
1360[m4_require([_LT_DECL_SED])dnl
1361ac_outfile=conftest.$ac_objext
1362echo "$lt_simple_compile_test_code" >conftest.$ac_ext
1363eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1364_lt_compiler_boilerplate=`cat conftest.err`
1365$RM conftest*
1366])# _LT_COMPILER_BOILERPLATE
1367
1368
1369# _LT_LINKER_BOILERPLATE
1370# ----------------------
1371# Check for linker boilerplate output or warnings with
1372# the simple link test code.
1373m4_defun([_LT_LINKER_BOILERPLATE],
1374[m4_require([_LT_DECL_SED])dnl
1375ac_outfile=conftest.$ac_objext
1376echo "$lt_simple_link_test_code" >conftest.$ac_ext
1377eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1378_lt_linker_boilerplate=`cat conftest.err`
1379$RM -r conftest*
1380])# _LT_LINKER_BOILERPLATE
1381
1382# _LT_REQUIRED_DARWIN_CHECKS
1383# -------------------------
1384m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
1385  case $host_os in
1386    rhapsody* | darwin*)
1387    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1388    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1389    AC_CHECK_TOOL([LIPO], [lipo], [:])
1390    AC_CHECK_TOOL([OTOOL], [otool], [:])
1391    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
1392    _LT_DECL([], [DSYMUTIL], [1],
1393      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1394    _LT_DECL([], [NMEDIT], [1],
1395      [Tool to change global to local symbols on Mac OS X])
1396    _LT_DECL([], [LIPO], [1],
1397      [Tool to manipulate fat objects and archives on Mac OS X])
1398    _LT_DECL([], [OTOOL], [1],
1399      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
1400    _LT_DECL([], [OTOOL64], [1],
1401      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
1402
1403    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1404      [lt_cv_apple_cc_single_mod=no
1405      if test -z "$LT_MULTI_MODULE"; then
1406	# By default we will add the -single_module flag. You can override
1407	# by either setting the environment variable LT_MULTI_MODULE
1408	# non-empty at configure time, or by adding -multi_module to the
1409	# link flags.
1410	rm -rf libconftest.dylib*
1411	echo "int foo(void){return 1;}" > conftest.c
1412	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1413-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1414	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1415	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1416        _lt_result=$?
1417	# If there is a non-empty error log, and "single_module"
1418	# appears in it, assume the flag caused a linker warning
1419        if test -s conftest.err && $GREP single_module conftest.err; then
1420	  cat conftest.err >&AS_MESSAGE_LOG_FD
1421	# Otherwise, if the output was created with a 0 exit code from
1422	# the compiler, it worked.
1423	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
1424	  lt_cv_apple_cc_single_mod=yes
1425	else
1426	  cat conftest.err >&AS_MESSAGE_LOG_FD
1427	fi
1428	rm -rf libconftest.dylib*
1429	rm -f conftest.*
1430      fi])
1431
1432    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1433      [lt_cv_ld_exported_symbols_list],
1434      [lt_cv_ld_exported_symbols_list=no
1435      save_LDFLAGS=$LDFLAGS
1436      echo "_main" > conftest.sym
1437      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1438      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1439	[lt_cv_ld_exported_symbols_list=yes],
1440	[lt_cv_ld_exported_symbols_list=no])
1441	LDFLAGS=$save_LDFLAGS
1442    ])
1443
1444    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
1445      [lt_cv_ld_force_load=no
1446      cat > conftest.c << _LT_EOF
1447int forced_loaded() { return 2;}
1448_LT_EOF
1449      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
1450      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1451      echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1452      $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1453      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
1454      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
1455      cat > conftest.c << _LT_EOF
1456int main() { return 0;}
1457_LT_EOF
1458      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
1459      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
1460      _lt_result=$?
1461      if test -s conftest.err && $GREP force_load conftest.err; then
1462	cat conftest.err >&AS_MESSAGE_LOG_FD
1463      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
1464	lt_cv_ld_force_load=yes
1465      else
1466	cat conftest.err >&AS_MESSAGE_LOG_FD
1467      fi
1468        rm -f conftest.err libconftest.a conftest conftest.c
1469        rm -rf conftest.dSYM
1470    ])
1471    case $host_os in
1472    rhapsody* | darwin1.[[012]])
1473      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
1474    darwin1.*)
1475      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
1476    darwin*)
1477      case $MACOSX_DEPLOYMENT_TARGET,$host in
1478        10.[[012]],*|,*powerpc*-darwin[[5-8]]*)
1479          _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
1480        *)
1481          _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
1482      esac
1483    ;;
1484  esac
1485    if test yes = "$lt_cv_apple_cc_single_mod"; then
1486      _lt_dar_single_mod='$single_module'
1487    fi
1488    if test yes = "$lt_cv_ld_exported_symbols_list"; then
1489      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
1490    else
1491      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
1492    fi
1493    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
1494      _lt_dsymutil='~$DSYMUTIL $lib || :'
1495    else
1496      _lt_dsymutil=
1497    fi
1498    ;;
1499  esac
1500])
1501
1502
1503# _LT_DARWIN_LINKER_FEATURES([TAG])
1504# ---------------------------------
1505# Checks for linker and compiler features on darwin
1506m4_defun([_LT_DARWIN_LINKER_FEATURES],
1507[
1508  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1509  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1510  _LT_TAGVAR(hardcode_direct, $1)=no
1511  _LT_TAGVAR(hardcode_automatic, $1)=yes
1512  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1513  if test yes = "$lt_cv_ld_force_load"; then
1514    _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\"`'
1515    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
1516                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
1517  else
1518    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1519  fi
1520  _LT_TAGVAR(link_all_deplibs, $1)=yes
1521  _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
1522  case $cc_basename in
1523     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
1524     *) _lt_dar_can_shared=$GCC ;;
1525  esac
1526  if test yes = "$_lt_dar_can_shared"; then
1527    output_verbose_link_cmd=func_echo_all
1528    _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"
1529    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
1530    _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"
1531    _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"
1532    m4_if([$1], [CXX],
1533[   if test yes != "$lt_cv_apple_cc_single_mod"; then
1534      _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"
1535      _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"
1536    fi
1537],[])
1538  else
1539  _LT_TAGVAR(ld_shlibs, $1)=no
1540  fi
1541])
1542
1543# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1544# ----------------------------------
1545# Links a minimal program and checks the executable
1546# for the system default hardcoded library path. In most cases,
1547# this is /usr/lib:/lib, but when the MPI compilers are used
1548# the location of the communication and MPI libs are included too.
1549# If we don't find anything, use the default library path according
1550# to the aix ld manual.
1551# Store the results from the different compilers for each TAGNAME.
1552# Allow to override them for all tags through lt_cv_aix_libpath.
1553m4_defun([_LT_SYS_MODULE_PATH_AIX],
1554[m4_require([_LT_DECL_SED])dnl
1555if test set = "${lt_cv_aix_libpath+set}"; then
1556  aix_libpath=$lt_cv_aix_libpath
1557else
1558  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1559  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1560  lt_aix_libpath_sed='[
1561      /Import File Strings/,/^$/ {
1562	  /^0/ {
1563	      s/^0  *\([^ ]*\) *$/\1/
1564	      p
1565	  }
1566      }]'
1567  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1568  # Check for a 64-bit object if we didn't find anything.
1569  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1570    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1571  fi],[])
1572  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1573    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
1574  fi
1575  ])
1576  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1577fi
1578])# _LT_SYS_MODULE_PATH_AIX
1579
1580
1581# _LT_SHELL_INIT(ARG)
1582# -------------------
1583m4_define([_LT_SHELL_INIT],
1584[m4_divert_text([M4SH-INIT], [$1
1585])])# _LT_SHELL_INIT
1586
1587
1588
1589# _LT_PROG_ECHO_BACKSLASH
1590# -----------------------
1591# Find how we can fake an echo command that does not interpret backslash.
1592# In particular, with Autoconf 2.60 or later we add some code to the start
1593# of the generated configure script that will find a shell with a builtin
1594# printf (that we can use as an echo command).
1595m4_defun([_LT_PROG_ECHO_BACKSLASH],
1596[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1597ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1598ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1599
1600AC_MSG_CHECKING([how to print strings])
1601# Test print first, because it will be a builtin if present.
1602if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
1603   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1604  ECHO='print -r --'
1605elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1606  ECHO='printf %s\n'
1607else
1608  # Use this function as a fallback that always works.
1609  func_fallback_echo ()
1610  {
1611    eval 'cat <<_LTECHO_EOF
1612$[]1
1613_LTECHO_EOF'
1614  }
1615  ECHO='func_fallback_echo'
1616fi
1617
1618# func_echo_all arg...
1619# Invoke $ECHO with all args, space-separated.
1620func_echo_all ()
1621{
1622    $ECHO "$*"
1623}
1624
1625case $ECHO in
1626  printf*) AC_MSG_RESULT([printf]) ;;
1627  print*) AC_MSG_RESULT([print -r]) ;;
1628  *) AC_MSG_RESULT([cat]) ;;
1629esac
1630
1631m4_ifdef([_AS_DETECT_SUGGESTED],
1632[_AS_DETECT_SUGGESTED([
1633  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
1634    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1635    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1636    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1637    PATH=/empty FPATH=/empty; export PATH FPATH
1638    test "X`printf %s $ECHO`" = "X$ECHO" \
1639      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
1640
1641_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1642_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
1643])# _LT_PROG_ECHO_BACKSLASH
1644
1645
1646# _LT_WITH_SYSROOT
1647# ----------------
1648AC_DEFUN([_LT_WITH_SYSROOT],
1649[m4_require([_LT_DECL_SED])dnl
1650AC_MSG_CHECKING([for sysroot])
1651AC_ARG_WITH([sysroot],
1652[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
1653  [Search for dependent libraries within DIR (or the compiler's sysroot
1654   if not specified).])],
1655[], [with_sysroot=no])
1656
1657dnl lt_sysroot will always be passed unquoted.  We quote it here
1658dnl in case the user passed a directory name.
1659lt_sysroot=
1660case $with_sysroot in #(
1661 yes)
1662   if test yes = "$GCC"; then
1663     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
1664   fi
1665   ;; #(
1666 /*)
1667   lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"`
1668   ;; #(
1669 no|'')
1670   ;; #(
1671 *)
1672   AC_MSG_RESULT([$with_sysroot])
1673   AC_MSG_ERROR([The sysroot must be an absolute path.])
1674   ;;
1675esac
1676
1677 AC_MSG_RESULT([${lt_sysroot:-no}])
1678_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
1679[dependent libraries, and where our libraries should be installed.])])
1680
1681# _LT_ENABLE_LOCK
1682# ---------------
1683m4_defun([_LT_ENABLE_LOCK],
1684[AC_ARG_ENABLE([libtool-lock],
1685  [AS_HELP_STRING([--disable-libtool-lock],
1686    [avoid locking (might break parallel builds)])])
1687test no = "$enable_libtool_lock" || enable_libtool_lock=yes
1688
1689# Some flags need to be propagated to the compiler or linker for good
1690# libtool support.
1691case $host in
1692ia64-*-hpux*)
1693  # Find out what ABI is being produced by ac_compile, and set mode
1694  # options accordingly.
1695  echo 'int i;' > conftest.$ac_ext
1696  if AC_TRY_EVAL(ac_compile); then
1697    case `$FILECMD conftest.$ac_objext` in
1698      *ELF-32*)
1699	HPUX_IA64_MODE=32
1700	;;
1701      *ELF-64*)
1702	HPUX_IA64_MODE=64
1703	;;
1704    esac
1705  fi
1706  rm -rf conftest*
1707  ;;
1708*-*-irix6*)
1709  # Find out what ABI is being produced by ac_compile, and set linker
1710  # options accordingly.
1711  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1712  if AC_TRY_EVAL(ac_compile); then
1713    if test yes = "$lt_cv_prog_gnu_ld"; then
1714      case `$FILECMD conftest.$ac_objext` in
1715	*32-bit*)
1716	  LD="${LD-ld} -melf32bsmip"
1717	  ;;
1718	*N32*)
1719	  LD="${LD-ld} -melf32bmipn32"
1720	  ;;
1721	*64-bit*)
1722	  LD="${LD-ld} -melf64bmip"
1723	;;
1724      esac
1725    else
1726      case `$FILECMD conftest.$ac_objext` in
1727	*32-bit*)
1728	  LD="${LD-ld} -32"
1729	  ;;
1730	*N32*)
1731	  LD="${LD-ld} -n32"
1732	  ;;
1733	*64-bit*)
1734	  LD="${LD-ld} -64"
1735	  ;;
1736      esac
1737    fi
1738  fi
1739  rm -rf conftest*
1740  ;;
1741
1742mips64*-*linux*)
1743  # Find out what ABI is being produced by ac_compile, and set linker
1744  # options accordingly.
1745  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1746  if AC_TRY_EVAL(ac_compile); then
1747    emul=elf
1748    case `$FILECMD conftest.$ac_objext` in
1749      *32-bit*)
1750	emul="${emul}32"
1751	;;
1752      *64-bit*)
1753	emul="${emul}64"
1754	;;
1755    esac
1756    case `$FILECMD conftest.$ac_objext` in
1757      *MSB*)
1758	emul="${emul}btsmip"
1759	;;
1760      *LSB*)
1761	emul="${emul}ltsmip"
1762	;;
1763    esac
1764    case `$FILECMD conftest.$ac_objext` in
1765      *N32*)
1766	emul="${emul}n32"
1767	;;
1768    esac
1769    LD="${LD-ld} -m $emul"
1770  fi
1771  rm -rf conftest*
1772  ;;
1773
1774x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
1775s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1776  # Find out what ABI is being produced by ac_compile, and set linker
1777  # options accordingly.  Note that the listed cases only cover the
1778  # situations where additional linker options are needed (such as when
1779  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
1780  # vice versa); the common cases where no linker options are needed do
1781  # not appear in the list.
1782  echo 'int i;' > conftest.$ac_ext
1783  if AC_TRY_EVAL(ac_compile); then
1784    case `$FILECMD conftest.o` in
1785      *32-bit*)
1786	case $host in
1787	  x86_64-*kfreebsd*-gnu)
1788	    LD="${LD-ld} -m elf_i386_fbsd"
1789	    ;;
1790	  x86_64-*linux*)
1791	    case `$FILECMD conftest.o` in
1792	      *x86-64*)
1793		LD="${LD-ld} -m elf32_x86_64"
1794		;;
1795	      *)
1796		LD="${LD-ld} -m elf_i386"
1797		;;
1798	    esac
1799	    ;;
1800	  powerpc64le-*linux*)
1801	    LD="${LD-ld} -m elf32lppclinux"
1802	    ;;
1803	  powerpc64-*linux*)
1804	    LD="${LD-ld} -m elf32ppclinux"
1805	    ;;
1806	  s390x-*linux*)
1807	    LD="${LD-ld} -m elf_s390"
1808	    ;;
1809	  sparc64-*linux*)
1810	    LD="${LD-ld} -m elf32_sparc"
1811	    ;;
1812	esac
1813	;;
1814      *64-bit*)
1815	case $host in
1816	  x86_64-*kfreebsd*-gnu)
1817	    LD="${LD-ld} -m elf_x86_64_fbsd"
1818	    ;;
1819	  x86_64-*linux*)
1820	    LD="${LD-ld} -m elf_x86_64"
1821	    ;;
1822	  powerpcle-*linux*|powerpc64le-*linux*)
1823	    LD="${LD-ld} -m elf64lppc"
1824	    ;;
1825	  powerpc-*linux*|powerpc64-*linux*)
1826	    LD="${LD-ld} -m elf64ppc"
1827	    ;;
1828	  s390*-*linux*|s390*-*tpf*)
1829	    LD="${LD-ld} -m elf64_s390"
1830	    ;;
1831	  sparc*-*linux*)
1832	    LD="${LD-ld} -m elf64_sparc"
1833	    ;;
1834	esac
1835	;;
1836    esac
1837  fi
1838  rm -rf conftest*
1839  ;;
1840
1841*-*-sco3.2v5*)
1842  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1843  SAVE_CFLAGS=$CFLAGS
1844  CFLAGS="$CFLAGS -belf"
1845  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1846    [AC_LANG_PUSH(C)
1847     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1848     AC_LANG_POP])
1849  if test yes != "$lt_cv_cc_needs_belf"; then
1850    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1851    CFLAGS=$SAVE_CFLAGS
1852  fi
1853  ;;
1854*-*solaris*)
1855  # Find out what ABI is being produced by ac_compile, and set linker
1856  # options accordingly.
1857  echo 'int i;' > conftest.$ac_ext
1858  if AC_TRY_EVAL(ac_compile); then
1859    case `$FILECMD conftest.o` in
1860    *64-bit*)
1861      case $lt_cv_prog_gnu_ld in
1862      yes*)
1863        case $host in
1864        i?86-*-solaris*|x86_64-*-solaris*)
1865          LD="${LD-ld} -m elf_x86_64"
1866          ;;
1867        sparc*-*-solaris*)
1868          LD="${LD-ld} -m elf64_sparc"
1869          ;;
1870        esac
1871        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
1872        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
1873          LD=${LD-ld}_sol2
1874        fi
1875        ;;
1876      *)
1877	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1878	  LD="${LD-ld} -64"
1879	fi
1880	;;
1881      esac
1882      ;;
1883    esac
1884  fi
1885  rm -rf conftest*
1886  ;;
1887esac
1888
1889need_locks=$enable_libtool_lock
1890])# _LT_ENABLE_LOCK
1891
1892
1893# _LT_PROG_AR
1894# -----------
1895m4_defun([_LT_PROG_AR],
1896[AC_CHECK_TOOLS(AR, [ar], false)
1897: ${AR=ar}
1898_LT_DECL([], [AR], [1], [The archiver])
1899
1900# Use ARFLAGS variable as AR's operation code to sync the variable naming with
1901# Automake.  If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
1902# higher priority because thats what people were doing historically (setting
1903# ARFLAGS for automake and AR_FLAGS for libtool).  FIXME: Make the AR_FLAGS
1904# variable obsoleted/removed.
1905
1906test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
1907lt_ar_flags=$AR_FLAGS
1908_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)])
1909
1910# Make AR_FLAGS overridable by 'make ARFLAGS='.  Don't try to run-time override
1911# by AR_FLAGS because that was never working and AR_FLAGS is about to die.
1912_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}],
1913         [Flags to create an archive])
1914
1915AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
1916  [lt_cv_ar_at_file=no
1917   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
1918     [echo conftest.$ac_objext > conftest.lst
1919      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
1920      AC_TRY_EVAL([lt_ar_try])
1921      if test 0 -eq "$ac_status"; then
1922	# Ensure the archiver fails upon bogus file names.
1923	rm -f conftest.$ac_objext libconftest.a
1924	AC_TRY_EVAL([lt_ar_try])
1925	if test 0 -ne "$ac_status"; then
1926          lt_cv_ar_at_file=@
1927        fi
1928      fi
1929      rm -f conftest.* libconftest.a
1930     ])
1931  ])
1932
1933if test no = "$lt_cv_ar_at_file"; then
1934  archiver_list_spec=
1935else
1936  archiver_list_spec=$lt_cv_ar_at_file
1937fi
1938_LT_DECL([], [archiver_list_spec], [1],
1939  [How to feed a file listing to the archiver])
1940])# _LT_PROG_AR
1941
1942
1943# _LT_CMD_OLD_ARCHIVE
1944# -------------------
1945m4_defun([_LT_CMD_OLD_ARCHIVE],
1946[_LT_PROG_AR
1947
1948AC_CHECK_TOOL(STRIP, strip, :)
1949test -z "$STRIP" && STRIP=:
1950_LT_DECL([], [STRIP], [1], [A symbol stripping program])
1951
1952AC_CHECK_TOOL(RANLIB, ranlib, :)
1953test -z "$RANLIB" && RANLIB=:
1954_LT_DECL([], [RANLIB], [1],
1955    [Commands used to install an old-style archive])
1956
1957# Determine commands to create old-style static archives.
1958old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1959old_postinstall_cmds='chmod 644 $oldlib'
1960old_postuninstall_cmds=
1961
1962if test -n "$RANLIB"; then
1963  case $host_os in
1964  bitrig* | openbsd*)
1965    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
1966    ;;
1967  *)
1968    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
1969    ;;
1970  esac
1971  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
1972fi
1973
1974case $host_os in
1975  darwin*)
1976    lock_old_archive_extraction=yes ;;
1977  *)
1978    lock_old_archive_extraction=no ;;
1979esac
1980_LT_DECL([], [old_postinstall_cmds], [2])
1981_LT_DECL([], [old_postuninstall_cmds], [2])
1982_LT_TAGDECL([], [old_archive_cmds], [2],
1983    [Commands used to build an old-style archive])
1984_LT_DECL([], [lock_old_archive_extraction], [0],
1985    [Whether to use a lock for old archive extraction])
1986])# _LT_CMD_OLD_ARCHIVE
1987
1988
1989# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1990#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1991# ----------------------------------------------------------------
1992# Check whether the given compiler option works
1993AC_DEFUN([_LT_COMPILER_OPTION],
1994[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1995m4_require([_LT_DECL_SED])dnl
1996AC_CACHE_CHECK([$1], [$2],
1997  [$2=no
1998   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1999   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2000   lt_compiler_flag="$3"  ## exclude from sc_useless_quotes_in_assignment
2001   # Insert the option either (1) after the last *FLAGS variable, or
2002   # (2) before a word containing "conftest.", or (3) at the end.
2003   # Note that $ac_compile itself does not contain backslashes and begins
2004   # with a dollar sign (not a hyphen), so the echo should work correctly.
2005   # The option is referenced via a variable to avoid confusing sed.
2006   lt_compile=`echo "$ac_compile" | $SED \
2007   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2008   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2009   -e 's:$: $lt_compiler_flag:'`
2010   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2011   (eval "$lt_compile" 2>conftest.err)
2012   ac_status=$?
2013   cat conftest.err >&AS_MESSAGE_LOG_FD
2014   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2015   if (exit $ac_status) && test -s "$ac_outfile"; then
2016     # The compiler can only warn and ignore the option if not recognized
2017     # So say no if there are warnings other than the usual output.
2018     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
2019     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2020     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2021       $2=yes
2022     fi
2023   fi
2024   $RM conftest*
2025])
2026
2027if test yes = "[$]$2"; then
2028    m4_if([$5], , :, [$5])
2029else
2030    m4_if([$6], , :, [$6])
2031fi
2032])# _LT_COMPILER_OPTION
2033
2034# Old name:
2035AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
2036dnl aclocal-1.4 backwards compatibility:
2037dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
2038
2039
2040# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2041#                  [ACTION-SUCCESS], [ACTION-FAILURE])
2042# ----------------------------------------------------
2043# Check whether the given linker option works
2044AC_DEFUN([_LT_LINKER_OPTION],
2045[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2046m4_require([_LT_DECL_SED])dnl
2047AC_CACHE_CHECK([$1], [$2],
2048  [$2=no
2049   save_LDFLAGS=$LDFLAGS
2050   LDFLAGS="$LDFLAGS $3"
2051   echo "$lt_simple_link_test_code" > conftest.$ac_ext
2052   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2053     # The linker can only warn and ignore the option if not recognized
2054     # So say no if there are warnings
2055     if test -s conftest.err; then
2056       # Append any errors to the config.log.
2057       cat conftest.err 1>&AS_MESSAGE_LOG_FD
2058       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
2059       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2060       if diff conftest.exp conftest.er2 >/dev/null; then
2061         $2=yes
2062       fi
2063     else
2064       $2=yes
2065     fi
2066   fi
2067   $RM -r conftest*
2068   LDFLAGS=$save_LDFLAGS
2069])
2070
2071if test yes = "[$]$2"; then
2072    m4_if([$4], , :, [$4])
2073else
2074    m4_if([$5], , :, [$5])
2075fi
2076])# _LT_LINKER_OPTION
2077
2078# Old name:
2079AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
2080dnl aclocal-1.4 backwards compatibility:
2081dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
2082
2083
2084# LT_CMD_MAX_LEN
2085#---------------
2086AC_DEFUN([LT_CMD_MAX_LEN],
2087[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2088# find the maximum length of command line arguments
2089AC_MSG_CHECKING([the maximum length of command line arguments])
2090AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2091  i=0
2092  teststring=ABCD
2093
2094  case $build_os in
2095  msdosdjgpp*)
2096    # On DJGPP, this test can blow up pretty badly due to problems in libc
2097    # (any single argument exceeding 2000 bytes causes a buffer overrun
2098    # during glob expansion).  Even if it were fixed, the result of this
2099    # check would be larger than it should be.
2100    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
2101    ;;
2102
2103  gnu*)
2104    # Under GNU Hurd, this test is not required because there is
2105    # no limit to the length of command line arguments.
2106    # Libtool will interpret -1 as no limit whatsoever
2107    lt_cv_sys_max_cmd_len=-1;
2108    ;;
2109
2110  cygwin* | mingw* | cegcc*)
2111    # On Win9x/ME, this test blows up -- it succeeds, but takes
2112    # about 5 minutes as the teststring grows exponentially.
2113    # Worse, since 9x/ME are not pre-emptively multitasking,
2114    # you end up with a "frozen" computer, even though with patience
2115    # the test eventually succeeds (with a max line length of 256k).
2116    # Instead, let's just punt: use the minimum linelength reported by
2117    # all of the supported platforms: 8192 (on NT/2K/XP).
2118    lt_cv_sys_max_cmd_len=8192;
2119    ;;
2120
2121  mint*)
2122    # On MiNT this can take a long time and run out of memory.
2123    lt_cv_sys_max_cmd_len=8192;
2124    ;;
2125
2126  mint*)
2127    # On MiNT this can take a long time and run out of memory.
2128    lt_cv_sys_max_cmd_len=8192;
2129    ;;
2130
2131  amigaos*)
2132    # On AmigaOS with pdksh, this test takes hours, literally.
2133    # So we just punt and use a minimum line length of 8192.
2134    lt_cv_sys_max_cmd_len=8192;
2135    ;;
2136
2137  bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
2138    # This has been around since 386BSD, at least.  Likely further.
2139    if test -x /sbin/sysctl; then
2140      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2141    elif test -x /usr/sbin/sysctl; then
2142      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2143    else
2144      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
2145    fi
2146    # And add a safety zone
2147    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2148    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2149    ;;
2150
2151  interix*)
2152    # We know the value 262144 and hardcode it with a safety zone (like BSD)
2153    lt_cv_sys_max_cmd_len=196608
2154    ;;
2155
2156  os2*)
2157    # The test takes a long time on OS/2.
2158    lt_cv_sys_max_cmd_len=8192
2159    ;;
2160
2161  osf*)
2162    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2163    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2164    # nice to cause kernel panics so lets avoid the loop below.
2165    # First set a reasonable default.
2166    lt_cv_sys_max_cmd_len=16384
2167    #
2168    if test -x /sbin/sysconfig; then
2169      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2170        *1*) lt_cv_sys_max_cmd_len=-1 ;;
2171      esac
2172    fi
2173    ;;
2174  sco3.2v5*)
2175    lt_cv_sys_max_cmd_len=102400
2176    ;;
2177  sysv5* | sco5v6* | sysv4.2uw2*)
2178    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2179    if test -n "$kargmax"; then
2180      lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[	 ]]//'`
2181    else
2182      lt_cv_sys_max_cmd_len=32768
2183    fi
2184    ;;
2185  *)
2186    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
2187    if test -n "$lt_cv_sys_max_cmd_len" && \
2188       test undefined != "$lt_cv_sys_max_cmd_len"; then
2189      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2190      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2191    else
2192      # Make teststring a little bigger before we do anything with it.
2193      # a 1K string should be a reasonable start.
2194      for i in 1 2 3 4 5 6 7 8; do
2195        teststring=$teststring$teststring
2196      done
2197      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2198      # If test is not a shell built-in, we'll probably end up computing a
2199      # maximum length that is only half of the actual maximum length, but
2200      # we can't tell.
2201      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
2202	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
2203	      test 17 != "$i" # 1/2 MB should be enough
2204      do
2205        i=`expr $i + 1`
2206        teststring=$teststring$teststring
2207      done
2208      # Only check the string length outside the loop.
2209      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
2210      teststring=
2211      # Add a significant safety factor because C++ compilers can tack on
2212      # massive amounts of additional arguments before passing them to the
2213      # linker.  It appears as though 1/2 is a usable value.
2214      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2215    fi
2216    ;;
2217  esac
2218])
2219if test -n "$lt_cv_sys_max_cmd_len"; then
2220  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2221else
2222  AC_MSG_RESULT(none)
2223fi
2224max_cmd_len=$lt_cv_sys_max_cmd_len
2225_LT_DECL([], [max_cmd_len], [0],
2226    [What is the maximum length of a command?])
2227])# LT_CMD_MAX_LEN
2228
2229# Old name:
2230AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
2231dnl aclocal-1.4 backwards compatibility:
2232dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
2233
2234
2235# _LT_HEADER_DLFCN
2236# ----------------
2237m4_defun([_LT_HEADER_DLFCN],
2238[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
2239])# _LT_HEADER_DLFCN
2240
2241
2242# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2243#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2244# ----------------------------------------------------------------
2245m4_defun([_LT_TRY_DLOPEN_SELF],
2246[m4_require([_LT_HEADER_DLFCN])dnl
2247if test yes = "$cross_compiling"; then :
2248  [$4]
2249else
2250  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2251  lt_status=$lt_dlunknown
2252  cat > conftest.$ac_ext <<_LT_EOF
2253[#line $LINENO "configure"
2254#include "confdefs.h"
2255
2256#if HAVE_DLFCN_H
2257#include <dlfcn.h>
2258#endif
2259
2260#include <stdio.h>
2261
2262#ifdef RTLD_GLOBAL
2263#  define LT_DLGLOBAL		RTLD_GLOBAL
2264#else
2265#  ifdef DL_GLOBAL
2266#    define LT_DLGLOBAL		DL_GLOBAL
2267#  else
2268#    define LT_DLGLOBAL		0
2269#  endif
2270#endif
2271
2272/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2273   find out it does not work in some platform. */
2274#ifndef LT_DLLAZY_OR_NOW
2275#  ifdef RTLD_LAZY
2276#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
2277#  else
2278#    ifdef DL_LAZY
2279#      define LT_DLLAZY_OR_NOW		DL_LAZY
2280#    else
2281#      ifdef RTLD_NOW
2282#        define LT_DLLAZY_OR_NOW	RTLD_NOW
2283#      else
2284#        ifdef DL_NOW
2285#          define LT_DLLAZY_OR_NOW	DL_NOW
2286#        else
2287#          define LT_DLLAZY_OR_NOW	0
2288#        endif
2289#      endif
2290#    endif
2291#  endif
2292#endif
2293
2294/* When -fvisibility=hidden is used, assume the code has been annotated
2295   correspondingly for the symbols needed.  */
2296#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
2297int fnord () __attribute__((visibility("default")));
2298#endif
2299
2300int fnord () { return 42; }
2301int main ()
2302{
2303  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2304  int status = $lt_dlunknown;
2305
2306  if (self)
2307    {
2308      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
2309      else
2310        {
2311	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
2312          else puts (dlerror ());
2313	}
2314      /* dlclose (self); */
2315    }
2316  else
2317    puts (dlerror ());
2318
2319  return status;
2320}]
2321_LT_EOF
2322  if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
2323    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
2324    lt_status=$?
2325    case x$lt_status in
2326      x$lt_dlno_uscore) $1 ;;
2327      x$lt_dlneed_uscore) $2 ;;
2328      x$lt_dlunknown|x*) $3 ;;
2329    esac
2330  else :
2331    # compilation failed
2332    $3
2333  fi
2334fi
2335rm -fr conftest*
2336])# _LT_TRY_DLOPEN_SELF
2337
2338
2339# LT_SYS_DLOPEN_SELF
2340# ------------------
2341AC_DEFUN([LT_SYS_DLOPEN_SELF],
2342[m4_require([_LT_HEADER_DLFCN])dnl
2343if test yes != "$enable_dlopen"; then
2344  enable_dlopen=unknown
2345  enable_dlopen_self=unknown
2346  enable_dlopen_self_static=unknown
2347else
2348  lt_cv_dlopen=no
2349  lt_cv_dlopen_libs=
2350
2351  case $host_os in
2352  beos*)
2353    lt_cv_dlopen=load_add_on
2354    lt_cv_dlopen_libs=
2355    lt_cv_dlopen_self=yes
2356    ;;
2357
2358  mingw* | pw32* | cegcc*)
2359    lt_cv_dlopen=LoadLibrary
2360    lt_cv_dlopen_libs=
2361    ;;
2362
2363  cygwin*)
2364    lt_cv_dlopen=dlopen
2365    lt_cv_dlopen_libs=
2366    ;;
2367
2368  darwin*)
2369    # if libdl is installed we need to link against it
2370    AC_CHECK_LIB([dl], [dlopen],
2371		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
2372    lt_cv_dlopen=dyld
2373    lt_cv_dlopen_libs=
2374    lt_cv_dlopen_self=yes
2375    ])
2376    ;;
2377
2378  tpf*)
2379    # Don't try to run any link tests for TPF.  We know it's impossible
2380    # because TPF is a cross-compiler, and we know how we open DSOs.
2381    lt_cv_dlopen=dlopen
2382    lt_cv_dlopen_libs=
2383    lt_cv_dlopen_self=no
2384    ;;
2385
2386  *)
2387    AC_CHECK_FUNC([shl_load],
2388	  [lt_cv_dlopen=shl_load],
2389      [AC_CHECK_LIB([dld], [shl_load],
2390	    [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
2391	[AC_CHECK_FUNC([dlopen],
2392	      [lt_cv_dlopen=dlopen],
2393	  [AC_CHECK_LIB([dl], [dlopen],
2394		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
2395	    [AC_CHECK_LIB([svld], [dlopen],
2396		  [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
2397	      [AC_CHECK_LIB([dld], [dld_link],
2398		    [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
2399	      ])
2400	    ])
2401	  ])
2402	])
2403      ])
2404    ;;
2405  esac
2406
2407  if test no = "$lt_cv_dlopen"; then
2408    enable_dlopen=no
2409  else
2410    enable_dlopen=yes
2411  fi
2412
2413  case $lt_cv_dlopen in
2414  dlopen)
2415    save_CPPFLAGS=$CPPFLAGS
2416    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2417
2418    save_LDFLAGS=$LDFLAGS
2419    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2420
2421    save_LIBS=$LIBS
2422    LIBS="$lt_cv_dlopen_libs $LIBS"
2423
2424    AC_CACHE_CHECK([whether a program can dlopen itself],
2425	  lt_cv_dlopen_self, [dnl
2426	  _LT_TRY_DLOPEN_SELF(
2427	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2428	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2429    ])
2430
2431    if test yes = "$lt_cv_dlopen_self"; then
2432      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2433      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2434	  lt_cv_dlopen_self_static, [dnl
2435	  _LT_TRY_DLOPEN_SELF(
2436	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2437	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
2438      ])
2439    fi
2440
2441    CPPFLAGS=$save_CPPFLAGS
2442    LDFLAGS=$save_LDFLAGS
2443    LIBS=$save_LIBS
2444    ;;
2445  esac
2446
2447  case $lt_cv_dlopen_self in
2448  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2449  *) enable_dlopen_self=unknown ;;
2450  esac
2451
2452  case $lt_cv_dlopen_self_static in
2453  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2454  *) enable_dlopen_self_static=unknown ;;
2455  esac
2456fi
2457_LT_DECL([dlopen_support], [enable_dlopen], [0],
2458	 [Whether dlopen is supported])
2459_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2460	 [Whether dlopen of programs is supported])
2461_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2462	 [Whether dlopen of statically linked programs is supported])
2463])# LT_SYS_DLOPEN_SELF
2464
2465# Old name:
2466AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2467dnl aclocal-1.4 backwards compatibility:
2468dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2469
2470
2471# _LT_COMPILER_C_O([TAGNAME])
2472# ---------------------------
2473# Check to see if options -c and -o are simultaneously supported by compiler.
2474# This macro does not hard code the compiler like AC_PROG_CC_C_O.
2475m4_defun([_LT_COMPILER_C_O],
2476[m4_require([_LT_DECL_SED])dnl
2477m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2478m4_require([_LT_TAG_COMPILER])dnl
2479AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2480  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2481  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2482   $RM -r conftest 2>/dev/null
2483   mkdir conftest
2484   cd conftest
2485   mkdir out
2486   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2487
2488   lt_compiler_flag="-o out/conftest2.$ac_objext"
2489   # Insert the option either (1) after the last *FLAGS variable, or
2490   # (2) before a word containing "conftest.", or (3) at the end.
2491   # Note that $ac_compile itself does not contain backslashes and begins
2492   # with a dollar sign (not a hyphen), so the echo should work correctly.
2493   lt_compile=`echo "$ac_compile" | $SED \
2494   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2495   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2496   -e 's:$: $lt_compiler_flag:'`
2497   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2498   (eval "$lt_compile" 2>out/conftest.err)
2499   ac_status=$?
2500   cat out/conftest.err >&AS_MESSAGE_LOG_FD
2501   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2502   if (exit $ac_status) && test -s out/conftest2.$ac_objext
2503   then
2504     # The compiler can only warn and ignore the option if not recognized
2505     # So say no if there are warnings
2506     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
2507     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2508     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2509       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2510     fi
2511   fi
2512   chmod u+w . 2>&AS_MESSAGE_LOG_FD
2513   $RM conftest*
2514   # SGI C++ compiler will create directory out/ii_files/ for
2515   # template instantiation
2516   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2517   $RM out/* && rmdir out
2518   cd ..
2519   $RM -r conftest
2520   $RM conftest*
2521])
2522_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2523	[Does compiler simultaneously support -c and -o options?])
2524])# _LT_COMPILER_C_O
2525
2526
2527# _LT_COMPILER_FILE_LOCKS([TAGNAME])
2528# ----------------------------------
2529# Check to see if we can do hard links to lock some files if needed
2530m4_defun([_LT_COMPILER_FILE_LOCKS],
2531[m4_require([_LT_ENABLE_LOCK])dnl
2532m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2533_LT_COMPILER_C_O([$1])
2534
2535hard_links=nottested
2536if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
2537  # do not overwrite the value of need_locks provided by the user
2538  AC_MSG_CHECKING([if we can lock with hard links])
2539  hard_links=yes
2540  $RM conftest*
2541  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2542  touch conftest.a
2543  ln conftest.a conftest.b 2>&5 || hard_links=no
2544  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2545  AC_MSG_RESULT([$hard_links])
2546  if test no = "$hard_links"; then
2547    AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
2548    need_locks=warn
2549  fi
2550else
2551  need_locks=no
2552fi
2553_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2554])# _LT_COMPILER_FILE_LOCKS
2555
2556
2557# _LT_CHECK_OBJDIR
2558# ----------------
2559m4_defun([_LT_CHECK_OBJDIR],
2560[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2561[rm -f .libs 2>/dev/null
2562mkdir .libs 2>/dev/null
2563if test -d .libs; then
2564  lt_cv_objdir=.libs
2565else
2566  # MS-DOS does not allow filenames that begin with a dot.
2567  lt_cv_objdir=_libs
2568fi
2569rmdir .libs 2>/dev/null])
2570objdir=$lt_cv_objdir
2571_LT_DECL([], [objdir], [0],
2572         [The name of the directory that contains temporary libtool files])dnl
2573m4_pattern_allow([LT_OBJDIR])dnl
2574AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
2575  [Define to the sub-directory where libtool stores uninstalled libraries.])
2576])# _LT_CHECK_OBJDIR
2577
2578
2579# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2580# --------------------------------------
2581# Check hardcoding attributes.
2582m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2583[AC_MSG_CHECKING([how to hardcode library paths into programs])
2584_LT_TAGVAR(hardcode_action, $1)=
2585if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2586   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2587   test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
2588
2589  # We can hardcode non-existent directories.
2590  if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
2591     # If the only mechanism to avoid hardcoding is shlibpath_var, we
2592     # have to relink, otherwise we might link with an installed library
2593     # when we should be linking with a yet-to-be-installed one
2594     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
2595     test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
2596    # Linking always hardcodes the temporary library directory.
2597    _LT_TAGVAR(hardcode_action, $1)=relink
2598  else
2599    # We can link without hardcoding, and we can hardcode nonexisting dirs.
2600    _LT_TAGVAR(hardcode_action, $1)=immediate
2601  fi
2602else
2603  # We cannot hardcode anything, or else we can only hardcode existing
2604  # directories.
2605  _LT_TAGVAR(hardcode_action, $1)=unsupported
2606fi
2607AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2608
2609if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
2610   test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
2611  # Fast installation is not supported
2612  enable_fast_install=no
2613elif test yes = "$shlibpath_overrides_runpath" ||
2614     test no = "$enable_shared"; then
2615  # Fast installation is not necessary
2616  enable_fast_install=needless
2617fi
2618_LT_TAGDECL([], [hardcode_action], [0],
2619    [How to hardcode a shared library path into an executable])
2620])# _LT_LINKER_HARDCODE_LIBPATH
2621
2622
2623# _LT_CMD_STRIPLIB
2624# ----------------
2625m4_defun([_LT_CMD_STRIPLIB],
2626[m4_require([_LT_DECL_EGREP])
2627striplib=
2628old_striplib=
2629AC_MSG_CHECKING([whether stripping libraries is possible])
2630if test -z "$STRIP"; then
2631  AC_MSG_RESULT([no])
2632else
2633  if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2634    old_striplib="$STRIP --strip-debug"
2635    striplib="$STRIP --strip-unneeded"
2636    AC_MSG_RESULT([yes])
2637  else
2638    case $host_os in
2639    darwin*)
2640      # FIXME - insert some real tests, host_os isn't really good enough
2641      striplib="$STRIP -x"
2642      old_striplib="$STRIP -S"
2643      AC_MSG_RESULT([yes])
2644      ;;
2645    freebsd*)
2646      if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
2647        old_striplib="$STRIP --strip-debug"
2648        striplib="$STRIP --strip-unneeded"
2649        AC_MSG_RESULT([yes])
2650      else
2651        AC_MSG_RESULT([no])
2652      fi
2653      ;;
2654    *)
2655      AC_MSG_RESULT([no])
2656      ;;
2657    esac
2658  fi
2659fi
2660_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2661_LT_DECL([], [striplib], [1])
2662])# _LT_CMD_STRIPLIB
2663
2664
2665# _LT_PREPARE_MUNGE_PATH_LIST
2666# ---------------------------
2667# Make sure func_munge_path_list() is defined correctly.
2668m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
2669[[# func_munge_path_list VARIABLE PATH
2670# -----------------------------------
2671# VARIABLE is name of variable containing _space_ separated list of
2672# directories to be munged by the contents of PATH, which is string
2673# having a format:
2674# "DIR[:DIR]:"
2675#       string "DIR[ DIR]" will be prepended to VARIABLE
2676# ":DIR[:DIR]"
2677#       string "DIR[ DIR]" will be appended to VARIABLE
2678# "DIRP[:DIRP]::[DIRA:]DIRA"
2679#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
2680#       "DIRA[ DIRA]" will be appended to VARIABLE
2681# "DIR[:DIR]"
2682#       VARIABLE will be replaced by "DIR[ DIR]"
2683func_munge_path_list ()
2684{
2685    case x@S|@2 in
2686    x)
2687        ;;
2688    *:)
2689        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
2690        ;;
2691    x:*)
2692        eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
2693        ;;
2694    *::*)
2695        eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
2696        eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
2697        ;;
2698    *)
2699        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
2700        ;;
2701    esac
2702}
2703]])# _LT_PREPARE_PATH_LIST
2704
2705
2706# _LT_SYS_DYNAMIC_LINKER([TAG])
2707# -----------------------------
2708# PORTME Fill in your ld.so characteristics
2709m4_defun([_LT_SYS_DYNAMIC_LINKER],
2710[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2711m4_require([_LT_DECL_EGREP])dnl
2712m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2713m4_require([_LT_DECL_OBJDUMP])dnl
2714m4_require([_LT_DECL_SED])dnl
2715m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2716m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
2717AC_MSG_CHECKING([dynamic linker characteristics])
2718m4_if([$1],
2719	[], [
2720if test yes = "$GCC"; then
2721  case $host_os in
2722    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
2723    *) lt_awk_arg='/^libraries:/' ;;
2724  esac
2725  case $host_os in
2726    mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
2727    *) lt_sed_strip_eq='s|=/|/|g' ;;
2728  esac
2729  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
2730  case $lt_search_path_spec in
2731  *\;*)
2732    # if the path contains ";" then we assume it to be the separator
2733    # otherwise default to the standard path separator (i.e. ":") - it is
2734    # assumed that no part of a normal pathname contains ";" but that should
2735    # okay in the real world where ";" in dirpaths is itself problematic.
2736    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
2737    ;;
2738  *)
2739    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
2740    ;;
2741  esac
2742  # Ok, now we have the path, separated by spaces, we can step through it
2743  # and add multilib dir if necessary...
2744  lt_tmp_lt_search_path_spec=
2745  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2746  # ...but if some path component already ends with the multilib dir we assume
2747  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
2748  case "$lt_multi_os_dir; $lt_search_path_spec " in
2749  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
2750    lt_multi_os_dir=
2751    ;;
2752  esac
2753  for lt_sys_path in $lt_search_path_spec; do
2754    if test -d "$lt_sys_path$lt_multi_os_dir"; then
2755      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
2756    elif test -n "$lt_multi_os_dir"; then
2757      test -d "$lt_sys_path" && \
2758	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2759    fi
2760  done
2761  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
2762BEGIN {RS = " "; FS = "/|\n";} {
2763  lt_foo = "";
2764  lt_count = 0;
2765  for (lt_i = NF; lt_i > 0; lt_i--) {
2766    if ($lt_i != "" && $lt_i != ".") {
2767      if ($lt_i == "..") {
2768        lt_count++;
2769      } else {
2770        if (lt_count == 0) {
2771          lt_foo = "/" $lt_i lt_foo;
2772        } else {
2773          lt_count--;
2774        }
2775      }
2776    }
2777  }
2778  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2779  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2780}'`
2781  # AWK program above erroneously prepends '/' to C:/dos/paths
2782  # for these hosts.
2783  case $host_os in
2784    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
2785      $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
2786  esac
2787  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
2788else
2789  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2790fi])
2791library_names_spec=
2792libname_spec='lib$name'
2793soname_spec=
2794shrext_cmds=.so
2795postinstall_cmds=
2796postuninstall_cmds=
2797finish_cmds=
2798finish_eval=
2799shlibpath_var=
2800shlibpath_overrides_runpath=unknown
2801version_type=none
2802dynamic_linker="$host_os ld.so"
2803sys_lib_dlsearch_path_spec="/lib /usr/lib"
2804need_lib_prefix=unknown
2805hardcode_into_libs=no
2806
2807# when you set need_version to no, make sure it does not cause -set_version
2808# flags to be left without arguments
2809need_version=unknown
2810
2811AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
2812[User-defined run-time library search path.])
2813
2814case $host_os in
2815aix3*)
2816  version_type=linux # correct to gnu/linux during the next big refactor
2817  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
2818  shlibpath_var=LIBPATH
2819
2820  # AIX 3 has no versioning support, so we append a major version to the name.
2821  soname_spec='$libname$release$shared_ext$major'
2822  ;;
2823
2824aix[[4-9]]*)
2825  version_type=linux # correct to gnu/linux during the next big refactor
2826  need_lib_prefix=no
2827  need_version=no
2828  hardcode_into_libs=yes
2829  if test ia64 = "$host_cpu"; then
2830    # AIX 5 supports IA64
2831    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
2832    shlibpath_var=LD_LIBRARY_PATH
2833  else
2834    # With GCC up to 2.95.x, collect2 would create an import file
2835    # for dependence libraries.  The import file would start with
2836    # the line '#! .'.  This would cause the generated library to
2837    # depend on '.', always an invalid library.  This was fixed in
2838    # development snapshots of GCC prior to 3.0.
2839    case $host_os in
2840      aix4 | aix4.[[01]] | aix4.[[01]].*)
2841      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2842	   echo ' yes '
2843	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
2844	:
2845      else
2846	can_build_shared=no
2847      fi
2848      ;;
2849    esac
2850    # Using Import Files as archive members, it is possible to support
2851    # filename-based versioning of shared library archives on AIX. While
2852    # this would work for both with and without runtime linking, it will
2853    # prevent static linking of such archives. So we do filename-based
2854    # shared library versioning with .so extension only, which is used
2855    # when both runtime linking and shared linking is enabled.
2856    # Unfortunately, runtime linking may impact performance, so we do
2857    # not want this to be the default eventually. Also, we use the
2858    # versioned .so libs for executables only if there is the -brtl
2859    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
2860    # To allow for filename-based versioning support, we need to create
2861    # libNAME.so.V as an archive file, containing:
2862    # *) an Import File, referring to the versioned filename of the
2863    #    archive as well as the shared archive member, telling the
2864    #    bitwidth (32 or 64) of that shared object, and providing the
2865    #    list of exported symbols of that shared object, eventually
2866    #    decorated with the 'weak' keyword
2867    # *) the shared object with the F_LOADONLY flag set, to really avoid
2868    #    it being seen by the linker.
2869    # At run time we better use the real file rather than another symlink,
2870    # but for link time we create the symlink libNAME.so -> libNAME.so.V
2871
2872    case $with_aix_soname,$aix_use_runtimelinking in
2873    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
2874    # soname into executable. Probably we can add versioning support to
2875    # collect2, so additional links can be useful in future.
2876    aix,yes) # traditional libtool
2877      dynamic_linker='AIX unversionable lib.so'
2878      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2879      # instead of lib<name>.a to let people know that these are not
2880      # typical AIX shared libraries.
2881      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2882      ;;
2883    aix,no) # traditional AIX only
2884      dynamic_linker='AIX lib.a[(]lib.so.V[)]'
2885      # We preserve .a as extension for shared libraries through AIX4.2
2886      # and later when we are not doing run time linking.
2887      library_names_spec='$libname$release.a $libname.a'
2888      soname_spec='$libname$release$shared_ext$major'
2889      ;;
2890    svr4,*) # full svr4 only
2891      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
2892      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
2893      # We do not specify a path in Import Files, so LIBPATH fires.
2894      shlibpath_overrides_runpath=yes
2895      ;;
2896    *,yes) # both, prefer svr4
2897      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
2898      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
2899      # unpreferred sharedlib libNAME.a needs extra handling
2900      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"'
2901      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"'
2902      # We do not specify a path in Import Files, so LIBPATH fires.
2903      shlibpath_overrides_runpath=yes
2904      ;;
2905    *,no) # both, prefer aix
2906      dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
2907      library_names_spec='$libname$release.a $libname.a'
2908      soname_spec='$libname$release$shared_ext$major'
2909      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
2910      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)'
2911      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"'
2912      ;;
2913    esac
2914    shlibpath_var=LIBPATH
2915  fi
2916  ;;
2917
2918amigaos*)
2919  case $host_cpu in
2920  powerpc)
2921    # Since July 2007 AmigaOS4 officially supports .so libraries.
2922    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2923    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2924    ;;
2925  m68k)
2926    library_names_spec='$libname.ixlibrary $libname.a'
2927    # Create ${libname}_ixlibrary.a entries in /sys/libs.
2928    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'
2929    ;;
2930  esac
2931  ;;
2932
2933beos*)
2934  library_names_spec='$libname$shared_ext'
2935  dynamic_linker="$host_os ld.so"
2936  shlibpath_var=LIBRARY_PATH
2937  ;;
2938
2939bsdi[[45]]*)
2940  version_type=linux # correct to gnu/linux during the next big refactor
2941  need_version=no
2942  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2943  soname_spec='$libname$release$shared_ext$major'
2944  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2945  shlibpath_var=LD_LIBRARY_PATH
2946  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2947  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2948  # the default ld.so.conf also contains /usr/contrib/lib and
2949  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2950  # libtool to hard-code these into programs
2951  ;;
2952
2953cygwin* | mingw* | pw32* | cegcc*)
2954  version_type=windows
2955  shrext_cmds=.dll
2956  need_version=no
2957  need_lib_prefix=no
2958
2959  case $GCC,$cc_basename in
2960  yes,*)
2961    # gcc
2962    library_names_spec='$libname.dll.a'
2963    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2964    postinstall_cmds='base_file=`basename \$file`~
2965      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
2966      dldir=$destdir/`dirname \$dlpath`~
2967      test -d \$dldir || mkdir -p \$dldir~
2968      $install_prog $dir/$dlname \$dldir/$dlname~
2969      chmod a+x \$dldir/$dlname~
2970      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2971        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2972      fi'
2973    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2974      dlpath=$dir/\$dldll~
2975       $RM \$dlpath'
2976    shlibpath_overrides_runpath=yes
2977
2978    case $host_os in
2979    cygwin*)
2980      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2981      soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2982m4_if([$1], [],[
2983      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
2984      ;;
2985    mingw* | cegcc*)
2986      # MinGW DLLs use traditional 'lib' prefix
2987      soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2988      ;;
2989    pw32*)
2990      # pw32 DLLs use 'pw' prefix rather than 'lib'
2991      library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2992      ;;
2993    esac
2994    dynamic_linker='Win32 ld.exe'
2995    ;;
2996
2997  *,cl* | *,icl*)
2998    # Native MSVC or ICC
2999    libname_spec='$name'
3000    soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
3001    library_names_spec='$libname.dll.lib'
3002
3003    case $build_os in
3004    mingw*)
3005      sys_lib_search_path_spec=
3006      lt_save_ifs=$IFS
3007      IFS=';'
3008      for lt_path in $LIB
3009      do
3010        IFS=$lt_save_ifs
3011        # Let DOS variable expansion print the short 8.3 style file name.
3012        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
3013        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
3014      done
3015      IFS=$lt_save_ifs
3016      # Convert to MSYS style.
3017      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
3018      ;;
3019    cygwin*)
3020      # Convert to unix form, then to dos form, then back to unix form
3021      # but this time dos style (no spaces!) so that the unix form looks
3022      # like /cygdrive/c/PROGRA~1:/cygdr...
3023      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
3024      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
3025      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3026      ;;
3027    *)
3028      sys_lib_search_path_spec=$LIB
3029      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
3030        # It is most probably a Windows format PATH.
3031        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3032      else
3033        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3034      fi
3035      # FIXME: find the short name or the path components, as spaces are
3036      # common. (e.g. "Program Files" -> "PROGRA~1")
3037      ;;
3038    esac
3039
3040    # DLL is installed to $(libdir)/../bin by postinstall_cmds
3041    postinstall_cmds='base_file=`basename \$file`~
3042      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
3043      dldir=$destdir/`dirname \$dlpath`~
3044      test -d \$dldir || mkdir -p \$dldir~
3045      $install_prog $dir/$dlname \$dldir/$dlname'
3046    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3047      dlpath=$dir/\$dldll~
3048       $RM \$dlpath'
3049    shlibpath_overrides_runpath=yes
3050    dynamic_linker='Win32 link.exe'
3051    ;;
3052
3053  *)
3054    # Assume MSVC and ICC wrapper
3055    library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
3056    dynamic_linker='Win32 ld.exe'
3057    ;;
3058  esac
3059  # FIXME: first we should search . and the directory the executable is in
3060  shlibpath_var=PATH
3061  ;;
3062
3063darwin* | rhapsody*)
3064  dynamic_linker="$host_os dyld"
3065  version_type=darwin
3066  need_lib_prefix=no
3067  need_version=no
3068  library_names_spec='$libname$release$versuffix$shared_ext $libname$release$major$shared_ext $libname$shared_ext'
3069  soname_spec='$libname$release$major$shared_ext'
3070  shlibpath_overrides_runpath=yes
3071  shlibpath_var=DYLD_LIBRARY_PATH
3072  shrext_cmds='`test .$module = .yes && echo .bundle || echo .dylib`'
3073m4_if([$1], [],[
3074  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
3075  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3076  ;;
3077
3078dgux*)
3079  version_type=linux # correct to gnu/linux during the next big refactor
3080  need_lib_prefix=no
3081  need_version=no
3082  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3083  soname_spec='$libname$release$shared_ext$major'
3084  shlibpath_var=LD_LIBRARY_PATH
3085  ;;
3086
3087freebsd* | dragonfly* | midnightbsd*)
3088  # DragonFly does not have aout.  When/if they implement a new
3089  # versioning mechanism, adjust this.
3090  if test -x /usr/bin/objformat; then
3091    objformat=`/usr/bin/objformat`
3092  else
3093    case $host_os in
3094    freebsd[[23]].*) objformat=aout ;;
3095    *) objformat=elf ;;
3096    esac
3097  fi
3098  # Handle Gentoo/FreeBSD as it was Linux
3099  case $host_vendor in
3100    gentoo)
3101      version_type=linux ;;
3102    *)
3103      version_type=freebsd-$objformat ;;
3104  esac
3105
3106  case $version_type in
3107    freebsd-elf*)
3108      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3109      soname_spec='$libname$release$shared_ext$major'
3110      need_version=no
3111      need_lib_prefix=no
3112      ;;
3113    freebsd-*)
3114      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
3115      need_version=yes
3116      ;;
3117    linux)
3118      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3119      soname_spec='${libname}${release}${shared_ext}$major'
3120      need_lib_prefix=no
3121      need_version=no
3122      ;;
3123  esac
3124  shlibpath_var=LD_LIBRARY_PATH
3125  case $host_os in
3126  freebsd2.*)
3127    shlibpath_overrides_runpath=yes
3128    ;;
3129  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3130    shlibpath_overrides_runpath=yes
3131    hardcode_into_libs=yes
3132    ;;
3133  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3134  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
3135    shlibpath_overrides_runpath=no
3136    hardcode_into_libs=yes
3137    ;;
3138  *) # from 4.6 on, and DragonFly
3139    shlibpath_overrides_runpath=yes
3140    hardcode_into_libs=yes
3141    ;;
3142  esac
3143  ;;
3144
3145haiku*)
3146  version_type=linux # correct to gnu/linux during the next big refactor
3147  need_lib_prefix=no
3148  need_version=no
3149  dynamic_linker="$host_os runtime_loader"
3150  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3151  soname_spec='$libname$release$shared_ext$major'
3152  shlibpath_var=LIBRARY_PATH
3153  shlibpath_overrides_runpath=no
3154  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
3155  hardcode_into_libs=yes
3156  ;;
3157
3158hpux9* | hpux10* | hpux11*)
3159  # Give a soname corresponding to the major version so that dld.sl refuses to
3160  # link against other versions.
3161  version_type=sunos
3162  need_lib_prefix=no
3163  need_version=no
3164  case $host_cpu in
3165  ia64*)
3166    shrext_cmds='.so'
3167    hardcode_into_libs=yes
3168    dynamic_linker="$host_os dld.so"
3169    shlibpath_var=LD_LIBRARY_PATH
3170    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3171    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3172    soname_spec='$libname$release$shared_ext$major'
3173    if test 32 = "$HPUX_IA64_MODE"; then
3174      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3175      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
3176    else
3177      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3178      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
3179    fi
3180    ;;
3181  hppa*64*)
3182    shrext_cmds='.sl'
3183    hardcode_into_libs=yes
3184    dynamic_linker="$host_os dld.sl"
3185    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3186    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3187    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3188    soname_spec='$libname$release$shared_ext$major'
3189    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3190    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3191    ;;
3192  *)
3193    shrext_cmds='.sl'
3194    dynamic_linker="$host_os dld.sl"
3195    shlibpath_var=SHLIB_PATH
3196    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3197    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3198    soname_spec='$libname$release$shared_ext$major'
3199    ;;
3200  esac
3201  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
3202  postinstall_cmds='chmod 555 $lib'
3203  # or fails outright, so override atomically:
3204  install_override_mode=555
3205  ;;
3206
3207interix[[3-9]]*)
3208  version_type=linux # correct to gnu/linux during the next big refactor
3209  need_lib_prefix=no
3210  need_version=no
3211  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3212  soname_spec='$libname$release$shared_ext$major'
3213  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3214  shlibpath_var=LD_LIBRARY_PATH
3215  shlibpath_overrides_runpath=no
3216  hardcode_into_libs=yes
3217  ;;
3218
3219irix5* | irix6* | nonstopux*)
3220  case $host_os in
3221    nonstopux*) version_type=nonstopux ;;
3222    *)
3223	if test yes = "$lt_cv_prog_gnu_ld"; then
3224		version_type=linux # correct to gnu/linux during the next big refactor
3225	else
3226		version_type=irix
3227	fi ;;
3228  esac
3229  need_lib_prefix=no
3230  need_version=no
3231  soname_spec='$libname$release$shared_ext$major'
3232  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
3233  case $host_os in
3234  irix5* | nonstopux*)
3235    libsuff= shlibsuff=
3236    ;;
3237  *)
3238    case $LD in # libtool.m4 will add one of these switches to LD
3239    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3240      libsuff= shlibsuff= libmagic=32-bit;;
3241    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3242      libsuff=32 shlibsuff=N32 libmagic=N32;;
3243    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3244      libsuff=64 shlibsuff=64 libmagic=64-bit;;
3245    *) libsuff= shlibsuff= libmagic=never-match;;
3246    esac
3247    ;;
3248  esac
3249  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3250  shlibpath_overrides_runpath=no
3251  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
3252  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
3253  hardcode_into_libs=yes
3254  ;;
3255
3256# No shared lib support for Linux oldld, aout, or coff.
3257linux*oldld* | linux*aout* | linux*coff*)
3258  dynamic_linker=no
3259  ;;
3260
3261linux*android*)
3262  version_type=none # Android doesn't support versioned libraries.
3263  need_lib_prefix=no
3264  need_version=no
3265  library_names_spec='$libname$release$shared_ext'
3266  soname_spec='$libname$release$shared_ext'
3267  finish_cmds=
3268  shlibpath_var=LD_LIBRARY_PATH
3269  shlibpath_overrides_runpath=yes
3270
3271  # This implies no fast_install, which is unacceptable.
3272  # Some rework will be needed to allow for fast_install
3273  # before this can be enabled.
3274  hardcode_into_libs=yes
3275
3276  dynamic_linker='Android linker'
3277  # Don't embed -rpath directories since the linker doesn't support them.
3278  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3279  ;;
3280
3281# This must be glibc/ELF.
3282linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
3283  version_type=linux # correct to gnu/linux during the next big refactor
3284  need_lib_prefix=no
3285  need_version=no
3286  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3287  soname_spec='$libname$release$shared_ext$major'
3288  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3289  shlibpath_var=LD_LIBRARY_PATH
3290  shlibpath_overrides_runpath=no
3291
3292  # Some binutils ld are patched to set DT_RUNPATH
3293  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
3294    [lt_cv_shlibpath_overrides_runpath=no
3295    save_LDFLAGS=$LDFLAGS
3296    save_libdir=$libdir
3297    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
3298	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
3299    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3300      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
3301	 [lt_cv_shlibpath_overrides_runpath=yes])])
3302    LDFLAGS=$save_LDFLAGS
3303    libdir=$save_libdir
3304    ])
3305  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
3306
3307  # This implies no fast_install, which is unacceptable.
3308  # Some rework will be needed to allow for fast_install
3309  # before this can be enabled.
3310  hardcode_into_libs=yes
3311
3312  # Ideally, we could use ldconfig to report *all* directores which are
3313  # searched for libraries, however this is still not possible.  Aside from not
3314  # being certain /sbin/ldconfig is available, command
3315  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
3316  # even though it is searched at run-time.  Try to do the best guess by
3317  # appending ld.so.conf contents (and includes) to the search path.
3318  if test -f /etc/ld.so.conf; then
3319    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' ' '`
3320    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
3321  fi
3322
3323  # We used to test for /lib/ld.so.1 and disable shared libraries on
3324  # powerpc, because MkLinux only supported shared libraries with the
3325  # GNU dynamic linker.  Since this was broken with cross compilers,
3326  # most powerpc-linux boxes support dynamic linking these days and
3327  # people can always --disable-shared, the test was removed, and we
3328  # assume the GNU/Linux dynamic linker is in use.
3329  dynamic_linker='GNU/Linux ld.so'
3330  ;;
3331
3332netbsd*)
3333  version_type=sunos
3334  need_lib_prefix=no
3335  need_version=no
3336  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
3337    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
3338    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3339    dynamic_linker='NetBSD (a.out) ld.so'
3340  else
3341    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3342    soname_spec='$libname$release$shared_ext$major'
3343    dynamic_linker='NetBSD ld.elf_so'
3344  fi
3345  shlibpath_var=LD_LIBRARY_PATH
3346  shlibpath_overrides_runpath=yes
3347  hardcode_into_libs=yes
3348  ;;
3349
3350newsos6)
3351  version_type=linux # correct to gnu/linux during the next big refactor
3352  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3353  shlibpath_var=LD_LIBRARY_PATH
3354  shlibpath_overrides_runpath=yes
3355  ;;
3356
3357*nto* | *qnx*)
3358  version_type=qnx
3359  need_lib_prefix=no
3360  need_version=no
3361  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3362  soname_spec='$libname$release$shared_ext$major'
3363  shlibpath_var=LD_LIBRARY_PATH
3364  shlibpath_overrides_runpath=no
3365  hardcode_into_libs=yes
3366  dynamic_linker='ldqnx.so'
3367  ;;
3368
3369openbsd* | bitrig*)
3370  version_type=sunos
3371  sys_lib_dlsearch_path_spec=/usr/lib
3372  need_lib_prefix=no
3373  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
3374    need_version=no
3375  else
3376    need_version=yes
3377  fi
3378  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
3379  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3380  shlibpath_var=LD_LIBRARY_PATH
3381  shlibpath_overrides_runpath=yes
3382  ;;
3383
3384os2*)
3385  libname_spec='$name'
3386  version_type=windows
3387  shrext_cmds=.dll
3388  need_version=no
3389  need_lib_prefix=no
3390  # OS/2 can only load a DLL with a base name of 8 characters or less.
3391  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
3392    v=$($ECHO $release$versuffix | tr -d .-);
3393    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
3394    $ECHO $n$v`$shared_ext'
3395  library_names_spec='${libname}_dll.$libext'
3396  dynamic_linker='OS/2 ld.exe'
3397  shlibpath_var=BEGINLIBPATH
3398  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3399  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3400  postinstall_cmds='base_file=`basename \$file`~
3401    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
3402    dldir=$destdir/`dirname \$dlpath`~
3403    test -d \$dldir || mkdir -p \$dldir~
3404    $install_prog $dir/$dlname \$dldir/$dlname~
3405    chmod a+x \$dldir/$dlname~
3406    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
3407      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
3408    fi'
3409  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
3410    dlpath=$dir/\$dldll~
3411    $RM \$dlpath'
3412  ;;
3413
3414osf3* | osf4* | osf5*)
3415  version_type=osf
3416  need_lib_prefix=no
3417  need_version=no
3418  soname_spec='$libname$release$shared_ext$major'
3419  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3420  shlibpath_var=LD_LIBRARY_PATH
3421  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3422  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3423  ;;
3424
3425rdos*)
3426  dynamic_linker=no
3427  ;;
3428
3429solaris*)
3430  version_type=linux # correct to gnu/linux during the next big refactor
3431  need_lib_prefix=no
3432  need_version=no
3433  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3434  soname_spec='$libname$release$shared_ext$major'
3435  shlibpath_var=LD_LIBRARY_PATH
3436  shlibpath_overrides_runpath=yes
3437  hardcode_into_libs=yes
3438  # ldd complains unless libraries are executable
3439  postinstall_cmds='chmod +x $lib'
3440  ;;
3441
3442sunos4*)
3443  version_type=sunos
3444  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
3445  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3446  shlibpath_var=LD_LIBRARY_PATH
3447  shlibpath_overrides_runpath=yes
3448  if test yes = "$with_gnu_ld"; then
3449    need_lib_prefix=no
3450  fi
3451  need_version=yes
3452  ;;
3453
3454sysv4 | sysv4.3*)
3455  version_type=linux # correct to gnu/linux during the next big refactor
3456  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3457  soname_spec='$libname$release$shared_ext$major'
3458  shlibpath_var=LD_LIBRARY_PATH
3459  case $host_vendor in
3460    sni)
3461      shlibpath_overrides_runpath=no
3462      need_lib_prefix=no
3463      runpath_var=LD_RUN_PATH
3464      ;;
3465    siemens)
3466      need_lib_prefix=no
3467      ;;
3468    motorola)
3469      need_lib_prefix=no
3470      need_version=no
3471      shlibpath_overrides_runpath=no
3472      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3473      ;;
3474  esac
3475  ;;
3476
3477sysv4*MP*)
3478  if test -d /usr/nec; then
3479    version_type=linux # correct to gnu/linux during the next big refactor
3480    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
3481    soname_spec='$libname$shared_ext.$major'
3482    shlibpath_var=LD_LIBRARY_PATH
3483  fi
3484  ;;
3485
3486sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3487  version_type=sco
3488  need_lib_prefix=no
3489  need_version=no
3490  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
3491  soname_spec='$libname$release$shared_ext$major'
3492  shlibpath_var=LD_LIBRARY_PATH
3493  shlibpath_overrides_runpath=yes
3494  hardcode_into_libs=yes
3495  if test yes = "$with_gnu_ld"; then
3496    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3497  else
3498    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3499    case $host_os in
3500      sco3.2v5*)
3501        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3502	;;
3503    esac
3504  fi
3505  sys_lib_dlsearch_path_spec='/usr/lib'
3506  ;;
3507
3508tpf*)
3509  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
3510  version_type=linux # correct to gnu/linux during the next big refactor
3511  need_lib_prefix=no
3512  need_version=no
3513  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3514  shlibpath_var=LD_LIBRARY_PATH
3515  shlibpath_overrides_runpath=no
3516  hardcode_into_libs=yes
3517  ;;
3518
3519uts4*)
3520  version_type=linux # correct to gnu/linux during the next big refactor
3521  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3522  soname_spec='$libname$release$shared_ext$major'
3523  shlibpath_var=LD_LIBRARY_PATH
3524  ;;
3525
3526*)
3527  dynamic_linker=no
3528  ;;
3529esac
3530AC_MSG_RESULT([$dynamic_linker])
3531test no = "$dynamic_linker" && can_build_shared=no
3532
3533variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3534if test yes = "$GCC"; then
3535  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3536fi
3537
3538if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
3539  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
3540fi
3541
3542if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
3543  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
3544fi
3545
3546# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
3547configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
3548
3549# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
3550func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
3551
3552# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
3553configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
3554
3555_LT_DECL([], [variables_saved_for_relink], [1],
3556    [Variables whose values should be saved in libtool wrapper scripts and
3557    restored at link time])
3558_LT_DECL([], [need_lib_prefix], [0],
3559    [Do we need the "lib" prefix for modules?])
3560_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3561_LT_DECL([], [version_type], [0], [Library versioning type])
3562_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
3563_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3564_LT_DECL([], [shlibpath_overrides_runpath], [0],
3565    [Is shlibpath searched before the hard-coded library search path?])
3566_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3567_LT_DECL([], [library_names_spec], [1],
3568    [[List of archive names.  First name is the real one, the rest are links.
3569    The last name is the one that the linker finds with -lNAME]])
3570_LT_DECL([], [soname_spec], [1],
3571    [[The coded name of the library, if different from the real name]])
3572_LT_DECL([], [install_override_mode], [1],
3573    [Permission mode override for installation of shared libraries])
3574_LT_DECL([], [postinstall_cmds], [2],
3575    [Command to use after installation of a shared archive])
3576_LT_DECL([], [postuninstall_cmds], [2],
3577    [Command to use after uninstallation of a shared archive])
3578_LT_DECL([], [finish_cmds], [2],
3579    [Commands used to finish a libtool library installation in a directory])
3580_LT_DECL([], [finish_eval], [1],
3581    [[As "finish_cmds", except a single script fragment to be evaled but
3582    not shown]])
3583_LT_DECL([], [hardcode_into_libs], [0],
3584    [Whether we should hardcode library paths into libraries])
3585_LT_DECL([], [sys_lib_search_path_spec], [2],
3586    [Compile-time system search path for libraries])
3587_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
3588    [Detected run-time system search path for libraries])
3589_LT_DECL([], [configure_time_lt_sys_library_path], [2],
3590    [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
3591])# _LT_SYS_DYNAMIC_LINKER
3592
3593
3594# _LT_PATH_TOOL_PREFIX(TOOL)
3595# --------------------------
3596# find a file program that can recognize shared library
3597AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3598[m4_require([_LT_DECL_EGREP])dnl
3599AC_MSG_CHECKING([for $1])
3600AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3601[case $MAGIC_CMD in
3602[[\\/*] |  ?:[\\/]*])
3603  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
3604  ;;
3605*)
3606  lt_save_MAGIC_CMD=$MAGIC_CMD
3607  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3608dnl $ac_dummy forces splitting on constant user-supplied paths.
3609dnl POSIX.2 word splitting is done only on the output of word expansions,
3610dnl not every word.  This closes a longstanding sh security hole.
3611  ac_dummy="m4_if([$2], , $PATH, [$2])"
3612  for ac_dir in $ac_dummy; do
3613    IFS=$lt_save_ifs
3614    test -z "$ac_dir" && ac_dir=.
3615    if test -f "$ac_dir/$1"; then
3616      lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
3617      if test -n "$file_magic_test_file"; then
3618	case $deplibs_check_method in
3619	"file_magic "*)
3620	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3621	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
3622	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3623	    $EGREP "$file_magic_regex" > /dev/null; then
3624	    :
3625	  else
3626	    cat <<_LT_EOF 1>&2
3627
3628*** Warning: the command libtool uses to detect shared libraries,
3629*** $file_magic_cmd, produces output that libtool cannot recognize.
3630*** The result is that libtool may fail to recognize shared libraries
3631*** as such.  This will affect the creation of libtool libraries that
3632*** depend on shared libraries, but programs linked with such libtool
3633*** libraries will work regardless of this problem.  Nevertheless, you
3634*** may want to report the problem to your system manager and/or to
3635*** bug-libtool@gnu.org
3636
3637_LT_EOF
3638	  fi ;;
3639	esac
3640      fi
3641      break
3642    fi
3643  done
3644  IFS=$lt_save_ifs
3645  MAGIC_CMD=$lt_save_MAGIC_CMD
3646  ;;
3647esac])
3648MAGIC_CMD=$lt_cv_path_MAGIC_CMD
3649if test -n "$MAGIC_CMD"; then
3650  AC_MSG_RESULT($MAGIC_CMD)
3651else
3652  AC_MSG_RESULT(no)
3653fi
3654_LT_DECL([], [MAGIC_CMD], [0],
3655	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3656])# _LT_PATH_TOOL_PREFIX
3657
3658# Old name:
3659AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3660dnl aclocal-1.4 backwards compatibility:
3661dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3662
3663
3664# _LT_PATH_MAGIC
3665# --------------
3666# find a file program that can recognize a shared library
3667m4_defun([_LT_PATH_MAGIC],
3668[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3669if test -z "$lt_cv_path_MAGIC_CMD"; then
3670  if test -n "$ac_tool_prefix"; then
3671    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3672  else
3673    MAGIC_CMD=:
3674  fi
3675fi
3676])# _LT_PATH_MAGIC
3677
3678
3679# LT_PATH_LD
3680# ----------
3681# find the pathname to the GNU or non-GNU linker
3682AC_DEFUN([LT_PATH_LD],
3683[AC_REQUIRE([AC_PROG_CC])dnl
3684AC_REQUIRE([AC_CANONICAL_HOST])dnl
3685AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3686m4_require([_LT_DECL_SED])dnl
3687m4_require([_LT_DECL_EGREP])dnl
3688m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
3689
3690AC_ARG_WITH([gnu-ld],
3691    [AS_HELP_STRING([--with-gnu-ld],
3692	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
3693    [test no = "$withval" || with_gnu_ld=yes],
3694    [with_gnu_ld=no])dnl
3695
3696ac_prog=ld
3697if test yes = "$GCC"; then
3698  # Check if gcc -print-prog-name=ld gives a path.
3699  AC_MSG_CHECKING([for ld used by $CC])
3700  case $host in
3701  *-*-mingw*)
3702    # gcc leaves a trailing carriage return, which upsets mingw
3703    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3704  *)
3705    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3706  esac
3707  case $ac_prog in
3708    # Accept absolute paths.
3709    [[\\/]]* | ?:[[\\/]]*)
3710      re_direlt='/[[^/]][[^/]]*/\.\./'
3711      # Canonicalize the pathname of ld
3712      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3713      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3714	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3715      done
3716      test -z "$LD" && LD=$ac_prog
3717      ;;
3718  "")
3719    # If it fails, then pretend we aren't using GCC.
3720    ac_prog=ld
3721    ;;
3722  *)
3723    # If it is relative, then search for the first ld in PATH.
3724    with_gnu_ld=unknown
3725    ;;
3726  esac
3727elif test yes = "$with_gnu_ld"; then
3728  AC_MSG_CHECKING([for GNU ld])
3729else
3730  AC_MSG_CHECKING([for non-GNU ld])
3731fi
3732AC_CACHE_VAL(lt_cv_path_LD,
3733[if test -z "$LD"; then
3734  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3735  for ac_dir in $PATH; do
3736    IFS=$lt_save_ifs
3737    test -z "$ac_dir" && ac_dir=.
3738    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3739      lt_cv_path_LD=$ac_dir/$ac_prog
3740      # Check to see if the program is GNU ld.  I'd rather use --version,
3741      # but apparently some variants of GNU ld only accept -v.
3742      # Break only if it was the GNU/non-GNU ld that we prefer.
3743      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3744      *GNU* | *'with BFD'*)
3745	test no != "$with_gnu_ld" && break
3746	;;
3747      *)
3748	test yes != "$with_gnu_ld" && break
3749	;;
3750      esac
3751    fi
3752  done
3753  IFS=$lt_save_ifs
3754else
3755  lt_cv_path_LD=$LD # Let the user override the test with a path.
3756fi])
3757LD=$lt_cv_path_LD
3758if test -n "$LD"; then
3759  AC_MSG_RESULT($LD)
3760else
3761  AC_MSG_RESULT(no)
3762fi
3763test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3764_LT_PATH_LD_GNU
3765AC_SUBST([LD])
3766
3767_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3768])# LT_PATH_LD
3769
3770# Old names:
3771AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3772AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3773dnl aclocal-1.4 backwards compatibility:
3774dnl AC_DEFUN([AM_PROG_LD], [])
3775dnl AC_DEFUN([AC_PROG_LD], [])
3776
3777
3778# _LT_PATH_LD_GNU
3779#- --------------
3780m4_defun([_LT_PATH_LD_GNU],
3781[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3782[# I'd rather use --version here, but apparently some GNU lds only accept -v.
3783case `$LD -v 2>&1 </dev/null` in
3784*GNU* | *'with BFD'*)
3785  lt_cv_prog_gnu_ld=yes
3786  ;;
3787*)
3788  lt_cv_prog_gnu_ld=no
3789  ;;
3790esac])
3791with_gnu_ld=$lt_cv_prog_gnu_ld
3792])# _LT_PATH_LD_GNU
3793
3794
3795# _LT_CMD_RELOAD
3796# --------------
3797# find reload flag for linker
3798#   -- PORTME Some linkers may need a different reload flag.
3799m4_defun([_LT_CMD_RELOAD],
3800[AC_CACHE_CHECK([for $LD option to reload object files],
3801  lt_cv_ld_reload_flag,
3802  [lt_cv_ld_reload_flag='-r'])
3803reload_flag=$lt_cv_ld_reload_flag
3804case $reload_flag in
3805"" | " "*) ;;
3806*) reload_flag=" $reload_flag" ;;
3807esac
3808reload_cmds='$LD$reload_flag -o $output$reload_objs'
3809case $host_os in
3810  cygwin* | mingw* | pw32* | cegcc*)
3811    if test yes != "$GCC"; then
3812      reload_cmds=false
3813    fi
3814    ;;
3815  darwin*)
3816    if test yes = "$GCC"; then
3817      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
3818    else
3819      reload_cmds='$LD$reload_flag -o $output$reload_objs'
3820    fi
3821    ;;
3822esac
3823_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3824_LT_TAGDECL([], [reload_cmds], [2])dnl
3825])# _LT_CMD_RELOAD
3826
3827
3828# _LT_PATH_DD
3829# -----------
3830# find a working dd
3831m4_defun([_LT_PATH_DD],
3832[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
3833[printf 0123456789abcdef0123456789abcdef >conftest.i
3834cat conftest.i conftest.i >conftest2.i
3835: ${lt_DD:=$DD}
3836AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
3837[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
3838  cmp -s conftest.i conftest.out \
3839  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
3840fi])
3841rm -f conftest.i conftest2.i conftest.out])
3842])# _LT_PATH_DD
3843
3844
3845# _LT_CMD_TRUNCATE
3846# ----------------
3847# find command to truncate a binary pipe
3848m4_defun([_LT_CMD_TRUNCATE],
3849[m4_require([_LT_PATH_DD])
3850AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
3851[printf 0123456789abcdef0123456789abcdef >conftest.i
3852cat conftest.i conftest.i >conftest2.i
3853lt_cv_truncate_bin=
3854if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
3855  cmp -s conftest.i conftest.out \
3856  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
3857fi
3858rm -f conftest.i conftest2.i conftest.out
3859test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
3860_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
3861  [Command to truncate a binary pipe])
3862])# _LT_CMD_TRUNCATE
3863
3864
3865# _LT_CHECK_MAGIC_METHOD
3866# ----------------------
3867# how to check for library dependencies
3868#  -- PORTME fill in with the dynamic library characteristics
3869m4_defun([_LT_CHECK_MAGIC_METHOD],
3870[m4_require([_LT_DECL_EGREP])
3871m4_require([_LT_DECL_OBJDUMP])
3872AC_CACHE_CHECK([how to recognize dependent libraries],
3873lt_cv_deplibs_check_method,
3874[lt_cv_file_magic_cmd='$MAGIC_CMD'
3875lt_cv_file_magic_test_file=
3876lt_cv_deplibs_check_method='unknown'
3877# Need to set the preceding variable on all platforms that support
3878# interlibrary dependencies.
3879# 'none' -- dependencies not supported.
3880# 'unknown' -- same as none, but documents that we really don't know.
3881# 'pass_all' -- all dependencies passed with no checks.
3882# 'test_compile' -- check by making test program.
3883# 'file_magic [[regex]]' -- check by looking for files in library path
3884# that responds to the $file_magic_cmd with a given extended regex.
3885# If you have 'file' or equivalent on your system and you're not sure
3886# whether 'pass_all' will *always* work, you probably want this one.
3887
3888case $host_os in
3889aix[[4-9]]*)
3890  lt_cv_deplibs_check_method=pass_all
3891  ;;
3892
3893beos*)
3894  lt_cv_deplibs_check_method=pass_all
3895  ;;
3896
3897bsdi[[45]]*)
3898  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3899  lt_cv_file_magic_cmd='$FILECMD -L'
3900  lt_cv_file_magic_test_file=/shlib/libc.so
3901  ;;
3902
3903cygwin*)
3904  # func_win32_libid is a shell function defined in ltmain.sh
3905  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3906  lt_cv_file_magic_cmd='func_win32_libid'
3907  ;;
3908
3909mingw* | pw32*)
3910  # Base MSYS/MinGW do not provide the 'file' command needed by
3911  # func_win32_libid shell function, so use a weaker test based on 'objdump',
3912  # unless we find 'file', for example because we are cross-compiling.
3913  if ( file / ) >/dev/null 2>&1; then
3914    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3915    lt_cv_file_magic_cmd='func_win32_libid'
3916  else
3917    # Keep this pattern in sync with the one in func_win32_libid.
3918    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
3919    lt_cv_file_magic_cmd='$OBJDUMP -f'
3920  fi
3921  ;;
3922
3923cegcc*)
3924  # use the weaker test based on 'objdump'. See mingw*.
3925  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3926  lt_cv_file_magic_cmd='$OBJDUMP -f'
3927  ;;
3928
3929darwin* | rhapsody*)
3930  lt_cv_deplibs_check_method=pass_all
3931  ;;
3932
3933freebsd* | dragonfly* | midnightbsd*)
3934  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3935    case $host_cpu in
3936    i*86 )
3937      # Not sure whether the presence of OpenBSD here was a mistake.
3938      # Let's accept both of them until this is cleared up.
3939      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3940      lt_cv_file_magic_cmd=$FILECMD
3941      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3942      ;;
3943    esac
3944  else
3945    lt_cv_deplibs_check_method=pass_all
3946  fi
3947  ;;
3948
3949haiku*)
3950  lt_cv_deplibs_check_method=pass_all
3951  ;;
3952
3953hpux10.20* | hpux11*)
3954  lt_cv_file_magic_cmd=$FILECMD
3955  case $host_cpu in
3956  ia64*)
3957    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3958    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3959    ;;
3960  hppa*64*)
3961    [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]']
3962    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3963    ;;
3964  *)
3965    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
3966    lt_cv_file_magic_test_file=/usr/lib/libc.sl
3967    ;;
3968  esac
3969  ;;
3970
3971interix[[3-9]]*)
3972  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3973  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3974  ;;
3975
3976irix5* | irix6* | nonstopux*)
3977  case $LD in
3978  *-32|*"-32 ") libmagic=32-bit;;
3979  *-n32|*"-n32 ") libmagic=N32;;
3980  *-64|*"-64 ") libmagic=64-bit;;
3981  *) libmagic=never-match;;
3982  esac
3983  lt_cv_deplibs_check_method=pass_all
3984  ;;
3985
3986# This must be glibc/ELF.
3987linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
3988  lt_cv_deplibs_check_method=pass_all
3989  ;;
3990
3991netbsd*)
3992  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3993    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3994  else
3995    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3996  fi
3997  ;;
3998
3999newos6*)
4000  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4001  lt_cv_file_magic_cmd=$FILECMD
4002  lt_cv_file_magic_test_file=/usr/lib/libnls.so
4003  ;;
4004
4005*nto* | *qnx*)
4006  lt_cv_deplibs_check_method=pass_all
4007  ;;
4008
4009openbsd* | bitrig*)
4010  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
4011    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
4012  else
4013    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4014  fi
4015  ;;
4016
4017osf3* | osf4* | osf5*)
4018  lt_cv_deplibs_check_method=pass_all
4019  ;;
4020
4021rdos*)
4022  lt_cv_deplibs_check_method=pass_all
4023  ;;
4024
4025solaris*)
4026  lt_cv_deplibs_check_method=pass_all
4027  ;;
4028
4029sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4030  lt_cv_deplibs_check_method=pass_all
4031  ;;
4032
4033sysv4 | sysv4.3*)
4034  case $host_vendor in
4035  motorola)
4036    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]]'
4037    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4038    ;;
4039  ncr)
4040    lt_cv_deplibs_check_method=pass_all
4041    ;;
4042  sequent)
4043    lt_cv_file_magic_cmd='/bin/file'
4044    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4045    ;;
4046  sni)
4047    lt_cv_file_magic_cmd='/bin/file'
4048    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4049    lt_cv_file_magic_test_file=/lib/libc.so
4050    ;;
4051  siemens)
4052    lt_cv_deplibs_check_method=pass_all
4053    ;;
4054  pc)
4055    lt_cv_deplibs_check_method=pass_all
4056    ;;
4057  esac
4058  ;;
4059
4060tpf*)
4061  lt_cv_deplibs_check_method=pass_all
4062  ;;
4063os2*)
4064  lt_cv_deplibs_check_method=pass_all
4065  ;;
4066esac
4067])
4068
4069file_magic_glob=
4070want_nocaseglob=no
4071if test "$build" = "$host"; then
4072  case $host_os in
4073  mingw* | pw32*)
4074    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
4075      want_nocaseglob=yes
4076    else
4077      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
4078    fi
4079    ;;
4080  esac
4081fi
4082
4083file_magic_cmd=$lt_cv_file_magic_cmd
4084deplibs_check_method=$lt_cv_deplibs_check_method
4085test -z "$deplibs_check_method" && deplibs_check_method=unknown
4086
4087_LT_DECL([], [deplibs_check_method], [1],
4088    [Method to check whether dependent libraries are shared objects])
4089_LT_DECL([], [file_magic_cmd], [1],
4090    [Command to use when deplibs_check_method = "file_magic"])
4091_LT_DECL([], [file_magic_glob], [1],
4092    [How to find potential files when deplibs_check_method = "file_magic"])
4093_LT_DECL([], [want_nocaseglob], [1],
4094    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
4095])# _LT_CHECK_MAGIC_METHOD
4096
4097
4098# LT_PATH_NM
4099# ----------
4100# find the pathname to a BSD- or MS-compatible name lister
4101AC_DEFUN([LT_PATH_NM],
4102[AC_REQUIRE([AC_PROG_CC])dnl
4103AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
4104[if test -n "$NM"; then
4105  # Let the user override the test.
4106  lt_cv_path_NM=$NM
4107else
4108  lt_nm_to_check=${ac_tool_prefix}nm
4109  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4110    lt_nm_to_check="$lt_nm_to_check nm"
4111  fi
4112  for lt_tmp_nm in $lt_nm_to_check; do
4113    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
4114    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4115      IFS=$lt_save_ifs
4116      test -z "$ac_dir" && ac_dir=.
4117      tmp_nm=$ac_dir/$lt_tmp_nm
4118      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
4119	# Check to see if the nm accepts a BSD-compat flag.
4120	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
4121	#   nm: unknown option "B" ignored
4122	# Tru64's nm complains that /dev/null is an invalid object file
4123	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
4124	case $build_os in
4125	mingw*) lt_bad_file=conftest.nm/nofile ;;
4126	*) lt_bad_file=/dev/null ;;
4127	esac
4128	case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in
4129	*$lt_bad_file* | *'Invalid file or object type'*)
4130	  lt_cv_path_NM="$tmp_nm -B"
4131	  break 2
4132	  ;;
4133	*)
4134	  case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in
4135	  */dev/null*)
4136	    lt_cv_path_NM="$tmp_nm -p"
4137	    break 2
4138	    ;;
4139	  *)
4140	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4141	    continue # so that we can try to find one that supports BSD flags
4142	    ;;
4143	  esac
4144	  ;;
4145	esac
4146      fi
4147    done
4148    IFS=$lt_save_ifs
4149  done
4150  : ${lt_cv_path_NM=no}
4151fi])
4152if test no != "$lt_cv_path_NM"; then
4153  NM=$lt_cv_path_NM
4154else
4155  # Didn't find any BSD compatible name lister, look for dumpbin.
4156  if test -n "$DUMPBIN"; then :
4157    # Let the user override the test.
4158  else
4159    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
4160    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in
4161    *COFF*)
4162      DUMPBIN="$DUMPBIN -symbols -headers"
4163      ;;
4164    *)
4165      DUMPBIN=:
4166      ;;
4167    esac
4168  fi
4169  AC_SUBST([DUMPBIN])
4170  if test : != "$DUMPBIN"; then
4171    NM=$DUMPBIN
4172  fi
4173fi
4174test -z "$NM" && NM=nm
4175AC_SUBST([NM])
4176_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
4177
4178AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
4179  [lt_cv_nm_interface="BSD nm"
4180  echo "int some_variable = 0;" > conftest.$ac_ext
4181  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
4182  (eval "$ac_compile" 2>conftest.err)
4183  cat conftest.err >&AS_MESSAGE_LOG_FD
4184  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
4185  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4186  cat conftest.err >&AS_MESSAGE_LOG_FD
4187  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
4188  cat conftest.out >&AS_MESSAGE_LOG_FD
4189  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4190    lt_cv_nm_interface="MS dumpbin"
4191  fi
4192  rm -f conftest*])
4193])# LT_PATH_NM
4194
4195# Old names:
4196AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
4197AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
4198dnl aclocal-1.4 backwards compatibility:
4199dnl AC_DEFUN([AM_PROG_NM], [])
4200dnl AC_DEFUN([AC_PROG_NM], [])
4201
4202# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4203# --------------------------------
4204# how to determine the name of the shared library
4205# associated with a specific link library.
4206#  -- PORTME fill in with the dynamic library characteristics
4207m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
4208[m4_require([_LT_DECL_EGREP])
4209m4_require([_LT_DECL_OBJDUMP])
4210m4_require([_LT_DECL_DLLTOOL])
4211AC_CACHE_CHECK([how to associate runtime and link libraries],
4212lt_cv_sharedlib_from_linklib_cmd,
4213[lt_cv_sharedlib_from_linklib_cmd='unknown'
4214
4215case $host_os in
4216cygwin* | mingw* | pw32* | cegcc*)
4217  # two different shell functions defined in ltmain.sh;
4218  # decide which one to use based on capabilities of $DLLTOOL
4219  case `$DLLTOOL --help 2>&1` in
4220  *--identify-strict*)
4221    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
4222    ;;
4223  *)
4224    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
4225    ;;
4226  esac
4227  ;;
4228*)
4229  # fallback: assume linklib IS sharedlib
4230  lt_cv_sharedlib_from_linklib_cmd=$ECHO
4231  ;;
4232esac
4233])
4234sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
4235test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
4236
4237_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
4238    [Command to associate shared and link libraries])
4239])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4240
4241
4242# _LT_PATH_MANIFEST_TOOL
4243# ----------------------
4244# locate the manifest tool
4245m4_defun([_LT_PATH_MANIFEST_TOOL],
4246[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
4247test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
4248AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
4249  [lt_cv_path_mainfest_tool=no
4250  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
4251  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
4252  cat conftest.err >&AS_MESSAGE_LOG_FD
4253  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
4254    lt_cv_path_mainfest_tool=yes
4255  fi
4256  rm -f conftest*])
4257if test yes != "$lt_cv_path_mainfest_tool"; then
4258  MANIFEST_TOOL=:
4259fi
4260_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
4261])# _LT_PATH_MANIFEST_TOOL
4262
4263
4264# _LT_DLL_DEF_P([FILE])
4265# ---------------------
4266# True iff FILE is a Windows DLL '.def' file.
4267# Keep in sync with func_dll_def_p in the libtool script
4268AC_DEFUN([_LT_DLL_DEF_P],
4269[dnl
4270  test DEF = "`$SED -n dnl
4271    -e '\''s/^[[	 ]]*//'\'' dnl Strip leading whitespace
4272    -e '\''/^\(;.*\)*$/d'\'' dnl      Delete empty lines and comments
4273    -e '\''s/^\(EXPORTS\|LIBRARY\)\([[	 ]].*\)*$/DEF/p'\'' dnl
4274    -e q dnl                          Only consider the first "real" line
4275    $1`" dnl
4276])# _LT_DLL_DEF_P
4277
4278
4279# LT_LIB_M
4280# --------
4281# check for math library
4282AC_DEFUN([LT_LIB_M],
4283[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4284LIBM=
4285case $host in
4286*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
4287  # These system don't have libm, or don't need it
4288  ;;
4289*-ncr-sysv4.3*)
4290  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
4291  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4292  ;;
4293*)
4294  AC_CHECK_LIB(m, cos, LIBM=-lm)
4295  ;;
4296esac
4297AC_SUBST([LIBM])
4298])# LT_LIB_M
4299
4300# Old name:
4301AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
4302dnl aclocal-1.4 backwards compatibility:
4303dnl AC_DEFUN([AC_CHECK_LIBM], [])
4304
4305
4306# _LT_COMPILER_NO_RTTI([TAGNAME])
4307# -------------------------------
4308m4_defun([_LT_COMPILER_NO_RTTI],
4309[m4_require([_LT_TAG_COMPILER])dnl
4310
4311_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4312
4313if test yes = "$GCC"; then
4314  case $cc_basename in
4315  nvcc*)
4316    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
4317  *)
4318    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
4319  esac
4320
4321  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4322    lt_cv_prog_compiler_rtti_exceptions,
4323    [-fno-rtti -fno-exceptions], [],
4324    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4325fi
4326_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
4327	[Compiler flag to turn off builtin functions])
4328])# _LT_COMPILER_NO_RTTI
4329
4330
4331# _LT_CMD_GLOBAL_SYMBOLS
4332# ----------------------
4333m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
4334[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4335AC_REQUIRE([AC_PROG_CC])dnl
4336AC_REQUIRE([AC_PROG_AWK])dnl
4337AC_REQUIRE([LT_PATH_NM])dnl
4338AC_REQUIRE([LT_PATH_LD])dnl
4339m4_require([_LT_DECL_SED])dnl
4340m4_require([_LT_DECL_EGREP])dnl
4341m4_require([_LT_TAG_COMPILER])dnl
4342
4343# Check for command to grab the raw symbol name followed by C symbol from nm.
4344AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4345AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4346[
4347# These are sane defaults that work on at least a few old systems.
4348# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4349
4350# Character class describing NM global symbol codes.
4351symcode='[[BCDEGRST]]'
4352
4353# Regexp to match symbols that can be accessed directly from C.
4354sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4355
4356# Define system-specific variables.
4357case $host_os in
4358aix*)
4359  symcode='[[BCDT]]'
4360  ;;
4361cygwin* | mingw* | pw32* | cegcc*)
4362  symcode='[[ABCDGISTW]]'
4363  ;;
4364hpux*)
4365  if test ia64 = "$host_cpu"; then
4366    symcode='[[ABCDEGRST]]'
4367  fi
4368  ;;
4369irix* | nonstopux*)
4370  symcode='[[BCDEGRST]]'
4371  ;;
4372osf*)
4373  symcode='[[BCDEGQRST]]'
4374  ;;
4375solaris*)
4376  symcode='[[BDRT]]'
4377  ;;
4378sco3.2v5*)
4379  symcode='[[DT]]'
4380  ;;
4381sysv4.2uw2*)
4382  symcode='[[DT]]'
4383  ;;
4384sysv5* | sco5v6* | unixware* | OpenUNIX*)
4385  symcode='[[ABDT]]'
4386  ;;
4387sysv4)
4388  symcode='[[DFNSTU]]'
4389  ;;
4390esac
4391
4392# If we're using GNU nm, then use its standard symbol codes.
4393case `$NM -V 2>&1` in
4394*GNU* | *'with BFD'*)
4395  symcode='[[ABCDGIRSTW]]' ;;
4396esac
4397
4398if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4399  # Gets list of data symbols to import.
4400  lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'"
4401  # Adjust the below global symbol transforms to fixup imported variables.
4402  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
4403  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
4404  lt_c_name_lib_hook="\
4405  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
4406  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
4407else
4408  # Disable hooks by default.
4409  lt_cv_sys_global_symbol_to_import=
4410  lt_cdecl_hook=
4411  lt_c_name_hook=
4412  lt_c_name_lib_hook=
4413fi
4414
4415# Transform an extracted symbol line into a proper C declaration.
4416# Some systems (esp. on ia64) link data and code symbols differently,
4417# so use this general approach.
4418lt_cv_sys_global_symbol_to_cdecl="$SED -n"\
4419$lt_cdecl_hook\
4420" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
4421" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
4422
4423# Transform an extracted symbol line into symbol name and symbol address
4424lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\
4425$lt_c_name_hook\
4426" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
4427" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
4428
4429# Transform an extracted symbol line into symbol name with lib prefix and
4430# symbol address.
4431lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\
4432$lt_c_name_lib_hook\
4433" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
4434" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
4435" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
4436
4437# Handle CRLF in mingw tool chain
4438opt_cr=
4439case $build_os in
4440mingw*)
4441  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4442  ;;
4443esac
4444
4445# Try without a prefix underscore, then with it.
4446for ac_symprfx in "" "_"; do
4447
4448  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4449  symxfrm="\\1 $ac_symprfx\\2 \\2"
4450
4451  # Write the raw and C identifiers.
4452  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4453    # Fake it for dumpbin and say T for any non-static function,
4454    # D for any global variable and I for any imported variable.
4455    # Also find C++ and __fastcall symbols from MSVC++ or ICC,
4456    # which start with @ or ?.
4457    lt_cv_sys_global_symbol_pipe="$AWK ['"\
4458"     {last_section=section; section=\$ 3};"\
4459"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
4460"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4461"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
4462"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
4463"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
4464"     \$ 0!~/External *\|/{next};"\
4465"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4466"     {if(hide[section]) next};"\
4467"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
4468"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
4469"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
4470"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
4471"     ' prfx=^$ac_symprfx]"
4472  else
4473    lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4474  fi
4475  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'"
4476
4477  # Check to see that the pipe works correctly.
4478  pipe_works=no
4479
4480  rm -f conftest*
4481  cat > conftest.$ac_ext <<_LT_EOF
4482#ifdef __cplusplus
4483extern "C" {
4484#endif
4485char nm_test_var;
4486void nm_test_func(void);
4487void nm_test_func(void){}
4488#ifdef __cplusplus
4489}
4490#endif
4491int main(){nm_test_var='a';nm_test_func();return(0);}
4492_LT_EOF
4493
4494  if AC_TRY_EVAL(ac_compile); then
4495    # Now try to grab the symbols.
4496    nlist=conftest.nm
4497    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
4498      # Try sorting and uniquifying the output.
4499      if sort "$nlist" | uniq > "$nlist"T; then
4500	mv -f "$nlist"T "$nlist"
4501      else
4502	rm -f "$nlist"T
4503      fi
4504
4505      # Make sure that we snagged all the symbols we need.
4506      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4507	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4508	  cat <<_LT_EOF > conftest.$ac_ext
4509/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
4510#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
4511/* DATA imports from DLLs on WIN32 can't be const, because runtime
4512   relocations are performed -- see ld's documentation on pseudo-relocs.  */
4513# define LT@&t@_DLSYM_CONST
4514#elif defined __osf__
4515/* This system does not cope well with relocations in const data.  */
4516# define LT@&t@_DLSYM_CONST
4517#else
4518# define LT@&t@_DLSYM_CONST const
4519#endif
4520
4521#ifdef __cplusplus
4522extern "C" {
4523#endif
4524
4525_LT_EOF
4526	  # Now generate the symbol file.
4527	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4528
4529	  cat <<_LT_EOF >> conftest.$ac_ext
4530
4531/* The mapping between symbol names and symbols.  */
4532LT@&t@_DLSYM_CONST struct {
4533  const char *name;
4534  void       *address;
4535}
4536lt__PROGRAM__LTX_preloaded_symbols[[]] =
4537{
4538  { "@PROGRAM@", (void *) 0 },
4539_LT_EOF
4540	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4541	  cat <<\_LT_EOF >> conftest.$ac_ext
4542  {0, (void *) 0}
4543};
4544
4545/* This works around a problem in FreeBSD linker */
4546#ifdef FREEBSD_WORKAROUND
4547static const void *lt_preloaded_setup() {
4548  return lt__PROGRAM__LTX_preloaded_symbols;
4549}
4550#endif
4551
4552#ifdef __cplusplus
4553}
4554#endif
4555_LT_EOF
4556	  # Now try linking the two files.
4557	  mv conftest.$ac_objext conftstm.$ac_objext
4558	  lt_globsym_save_LIBS=$LIBS
4559	  lt_globsym_save_CFLAGS=$CFLAGS
4560	  LIBS=conftstm.$ac_objext
4561	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4562	  if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
4563	    pipe_works=yes
4564	  fi
4565	  LIBS=$lt_globsym_save_LIBS
4566	  CFLAGS=$lt_globsym_save_CFLAGS
4567	else
4568	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4569	fi
4570      else
4571	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4572      fi
4573    else
4574      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4575    fi
4576  else
4577    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4578    cat conftest.$ac_ext >&5
4579  fi
4580  rm -rf conftest* conftst*
4581
4582  # Do not use the global_symbol_pipe unless it works.
4583  if test yes = "$pipe_works"; then
4584    break
4585  else
4586    lt_cv_sys_global_symbol_pipe=
4587  fi
4588done
4589])
4590if test -z "$lt_cv_sys_global_symbol_pipe"; then
4591  lt_cv_sys_global_symbol_to_cdecl=
4592fi
4593if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4594  AC_MSG_RESULT(failed)
4595else
4596  AC_MSG_RESULT(ok)
4597fi
4598
4599# Response file support.
4600if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4601  nm_file_list_spec='@'
4602elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
4603  nm_file_list_spec='@'
4604fi
4605
4606_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4607    [Take the output of nm and produce a listing of raw symbols and C names])
4608_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4609    [Transform the output of nm in a proper C declaration])
4610_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
4611    [Transform the output of nm into a list of symbols to manually relocate])
4612_LT_DECL([global_symbol_to_c_name_address],
4613    [lt_cv_sys_global_symbol_to_c_name_address], [1],
4614    [Transform the output of nm in a C name address pair])
4615_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4616    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4617    [Transform the output of nm in a C name address pair when lib prefix is needed])
4618_LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
4619    [The name lister interface])
4620_LT_DECL([], [nm_file_list_spec], [1],
4621    [Specify filename containing input files for $NM])
4622]) # _LT_CMD_GLOBAL_SYMBOLS
4623
4624
4625# _LT_COMPILER_PIC([TAGNAME])
4626# ---------------------------
4627m4_defun([_LT_COMPILER_PIC],
4628[m4_require([_LT_TAG_COMPILER])dnl
4629_LT_TAGVAR(lt_prog_compiler_wl, $1)=
4630_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4631_LT_TAGVAR(lt_prog_compiler_static, $1)=
4632
4633m4_if([$1], [CXX], [
4634  # C++ specific cases for pic, static, wl, etc.
4635  if test yes = "$GXX"; then
4636    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4637    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4638
4639    case $host_os in
4640    aix*)
4641      # All AIX code is PIC.
4642      if test ia64 = "$host_cpu"; then
4643	# AIX 5 now supports IA64 processor
4644	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4645      fi
4646      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4647      ;;
4648
4649    amigaos*)
4650      case $host_cpu in
4651      powerpc)
4652            # see comment about AmigaOS4 .so support
4653            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4654        ;;
4655      m68k)
4656            # FIXME: we need at least 68020 code to build shared libraries, but
4657            # adding the '-m68020' flag to GCC prevents building anything better,
4658            # like '-m68040'.
4659            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4660        ;;
4661      esac
4662      ;;
4663
4664    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4665      # PIC is the default for these OSes.
4666      ;;
4667    mingw* | cygwin* | os2* | pw32* | cegcc*)
4668      # This hack is so that the source file can tell whether it is being
4669      # built for inclusion in a dll (and should export symbols for example).
4670      # Although the cygwin gcc ignores -fPIC, still need this for old-style
4671      # (--disable-auto-import) libraries
4672      m4_if([$1], [GCJ], [],
4673	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4674      case $host_os in
4675      os2*)
4676	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4677	;;
4678      esac
4679      ;;
4680    darwin* | rhapsody*)
4681      # PIC is the default on this platform
4682      # Common symbols not allowed in MH_DYLIB files
4683      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4684      ;;
4685    *djgpp*)
4686      # DJGPP does not support shared libraries at all
4687      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4688      ;;
4689    haiku*)
4690      # PIC is the default for Haiku.
4691      # The "-static" flag exists, but is broken.
4692      _LT_TAGVAR(lt_prog_compiler_static, $1)=
4693      ;;
4694    interix[[3-9]]*)
4695      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4696      # Instead, we relocate shared libraries at runtime.
4697      ;;
4698    sysv4*MP*)
4699      if test -d /usr/nec; then
4700	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4701      fi
4702      ;;
4703    hpux*)
4704      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4705      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4706      # sets the default TLS model and affects inlining.
4707      case $host_cpu in
4708      hppa*64*)
4709	;;
4710      *)
4711	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4712	;;
4713      esac
4714      ;;
4715    *qnx* | *nto*)
4716      # QNX uses GNU C++, but need to define -shared option too, otherwise
4717      # it will coredump.
4718      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4719      ;;
4720    *)
4721      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4722      ;;
4723    esac
4724  else
4725    case $host_os in
4726      aix[[4-9]]*)
4727	# All AIX code is PIC.
4728	if test ia64 = "$host_cpu"; then
4729	  # AIX 5 now supports IA64 processor
4730	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4731	else
4732	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4733	fi
4734	;;
4735      chorus*)
4736	case $cc_basename in
4737	cxch68*)
4738	  # Green Hills C++ Compiler
4739	  # _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"
4740	  ;;
4741	esac
4742	;;
4743      mingw* | cygwin* | os2* | pw32* | cegcc*)
4744	# This hack is so that the source file can tell whether it is being
4745	# built for inclusion in a dll (and should export symbols for example).
4746	m4_if([$1], [GCJ], [],
4747	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4748	;;
4749      dgux*)
4750	case $cc_basename in
4751	  ec++*)
4752	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4753	    ;;
4754	  ghcx*)
4755	    # Green Hills C++ Compiler
4756	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4757	    ;;
4758	  *)
4759	    ;;
4760	esac
4761	;;
4762      freebsd* | dragonfly* | midnightbsd*)
4763	# FreeBSD uses GNU C++
4764	;;
4765      hpux9* | hpux10* | hpux11*)
4766	case $cc_basename in
4767	  CC*)
4768	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4769	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4770	    if test ia64 != "$host_cpu"; then
4771	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4772	    fi
4773	    ;;
4774	  aCC*)
4775	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4776	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4777	    case $host_cpu in
4778	    hppa*64*|ia64*)
4779	      # +Z the default
4780	      ;;
4781	    *)
4782	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4783	      ;;
4784	    esac
4785	    ;;
4786	  *)
4787	    ;;
4788	esac
4789	;;
4790      interix*)
4791	# This is c89, which is MS Visual C++ (no shared libs)
4792	# Anyone wants to do a port?
4793	;;
4794      irix5* | irix6* | nonstopux*)
4795	case $cc_basename in
4796	  CC*)
4797	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4798	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4799	    # CC pic flag -KPIC is the default.
4800	    ;;
4801	  *)
4802	    ;;
4803	esac
4804	;;
4805      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4806	case $cc_basename in
4807	  KCC*)
4808	    # KAI C++ Compiler
4809	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4810	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4811	    ;;
4812	  ecpc* )
4813	    # old Intel C++ for x86_64, which still supported -KPIC.
4814	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4815	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4816	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4817	    ;;
4818	  icpc* )
4819	    # Intel C++, used to be incompatible with GCC.
4820	    # ICC 10 doesn't accept -KPIC any more.
4821	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4822	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4823	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4824	    ;;
4825	  pgCC* | pgcpp*)
4826	    # Portland Group C++ compiler
4827	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4828	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4829	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4830	    ;;
4831	  cxx*)
4832	    # Compaq C++
4833	    # Make sure the PIC flag is empty.  It appears that all Alpha
4834	    # Linux and Compaq Tru64 Unix objects are PIC.
4835	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4836	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4837	    ;;
4838	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
4839	    # IBM XL 8.0, 9.0 on PPC and BlueGene
4840	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4841	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4842	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4843	    ;;
4844	  *)
4845	    case `$CC -V 2>&1 | $SED 5q` in
4846	    *Sun\ C*)
4847	      # Sun C++ 5.9
4848	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4849	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4850	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4851	      ;;
4852	    esac
4853	    ;;
4854	esac
4855	;;
4856      lynxos*)
4857	;;
4858      m88k*)
4859	;;
4860      mvs*)
4861	case $cc_basename in
4862	  cxx*)
4863	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4864	    ;;
4865	  *)
4866	    ;;
4867	esac
4868	;;
4869      netbsd*)
4870	;;
4871      *qnx* | *nto*)
4872        # QNX uses GNU C++, but need to define -shared option too, otherwise
4873        # it will coredump.
4874        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4875        ;;
4876      osf3* | osf4* | osf5*)
4877	case $cc_basename in
4878	  KCC*)
4879	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4880	    ;;
4881	  RCC*)
4882	    # Rational C++ 2.4.1
4883	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4884	    ;;
4885	  cxx*)
4886	    # Digital/Compaq C++
4887	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4888	    # Make sure the PIC flag is empty.  It appears that all Alpha
4889	    # Linux and Compaq Tru64 Unix objects are PIC.
4890	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4891	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4892	    ;;
4893	  *)
4894	    ;;
4895	esac
4896	;;
4897      psos*)
4898	;;
4899      solaris*)
4900	case $cc_basename in
4901	  CC* | sunCC*)
4902	    # Sun C++ 4.2, 5.x and Centerline C++
4903	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4904	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4905	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4906	    ;;
4907	  gcx*)
4908	    # Green Hills C++ Compiler
4909	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4910	    ;;
4911	  *)
4912	    ;;
4913	esac
4914	;;
4915      sunos4*)
4916	case $cc_basename in
4917	  CC*)
4918	    # Sun C++ 4.x
4919	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4920	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4921	    ;;
4922	  lcc*)
4923	    # Lucid
4924	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4925	    ;;
4926	  *)
4927	    ;;
4928	esac
4929	;;
4930      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4931	case $cc_basename in
4932	  CC*)
4933	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4934	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4935	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4936	    ;;
4937	esac
4938	;;
4939      tandem*)
4940	case $cc_basename in
4941	  NCC*)
4942	    # NonStop-UX NCC 3.20
4943	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4944	    ;;
4945	  *)
4946	    ;;
4947	esac
4948	;;
4949      vxworks*)
4950	;;
4951      *)
4952	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4953	;;
4954    esac
4955  fi
4956],
4957[
4958  if test yes = "$GCC"; then
4959    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4960    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4961
4962    case $host_os in
4963      aix*)
4964      # All AIX code is PIC.
4965      if test ia64 = "$host_cpu"; then
4966	# AIX 5 now supports IA64 processor
4967	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4968      fi
4969      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4970      ;;
4971
4972    amigaos*)
4973      case $host_cpu in
4974      powerpc)
4975            # see comment about AmigaOS4 .so support
4976            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4977        ;;
4978      m68k)
4979            # FIXME: we need at least 68020 code to build shared libraries, but
4980            # adding the '-m68020' flag to GCC prevents building anything better,
4981            # like '-m68040'.
4982            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4983        ;;
4984      esac
4985      ;;
4986
4987    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4988      # PIC is the default for these OSes.
4989      ;;
4990
4991    mingw* | cygwin* | pw32* | os2* | cegcc*)
4992      # This hack is so that the source file can tell whether it is being
4993      # built for inclusion in a dll (and should export symbols for example).
4994      # Although the cygwin gcc ignores -fPIC, still need this for old-style
4995      # (--disable-auto-import) libraries
4996      m4_if([$1], [GCJ], [],
4997	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4998      case $host_os in
4999      os2*)
5000	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
5001	;;
5002      esac
5003      ;;
5004
5005    darwin* | rhapsody*)
5006      # PIC is the default on this platform
5007      # Common symbols not allowed in MH_DYLIB files
5008      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5009      ;;
5010
5011    haiku*)
5012      # PIC is the default for Haiku.
5013      # The "-static" flag exists, but is broken.
5014      _LT_TAGVAR(lt_prog_compiler_static, $1)=
5015      ;;
5016
5017    hpux*)
5018      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5019      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
5020      # sets the default TLS model and affects inlining.
5021      case $host_cpu in
5022      hppa*64*)
5023	# +Z the default
5024	;;
5025      *)
5026	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5027	;;
5028      esac
5029      ;;
5030
5031    interix[[3-9]]*)
5032      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5033      # Instead, we relocate shared libraries at runtime.
5034      ;;
5035
5036    msdosdjgpp*)
5037      # Just because we use GCC doesn't mean we suddenly get shared libraries
5038      # on systems that don't support them.
5039      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5040      enable_shared=no
5041      ;;
5042
5043    *nto* | *qnx*)
5044      # QNX uses GNU C++, but need to define -shared option too, otherwise
5045      # it will coredump.
5046      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5047      ;;
5048
5049    sysv4*MP*)
5050      if test -d /usr/nec; then
5051	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5052      fi
5053      ;;
5054
5055    *)
5056      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5057      ;;
5058    esac
5059
5060    case $cc_basename in
5061    nvcc*) # Cuda Compiler Driver 2.2
5062      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
5063      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5064        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
5065      fi
5066      ;;
5067    esac
5068  else
5069    # PORTME Check for flag to pass linker flags through the system compiler.
5070    case $host_os in
5071    aix*)
5072      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5073      if test ia64 = "$host_cpu"; then
5074	# AIX 5 now supports IA64 processor
5075	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5076      else
5077	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5078      fi
5079      ;;
5080
5081    darwin* | rhapsody*)
5082      # PIC is the default on this platform
5083      # Common symbols not allowed in MH_DYLIB files
5084      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5085      case $cc_basename in
5086      nagfor*)
5087        # NAG Fortran compiler
5088        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
5089        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5090        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5091        ;;
5092      esac
5093      ;;
5094
5095    mingw* | cygwin* | pw32* | os2* | cegcc*)
5096      # This hack is so that the source file can tell whether it is being
5097      # built for inclusion in a dll (and should export symbols for example).
5098      m4_if([$1], [GCJ], [],
5099	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5100      case $host_os in
5101      os2*)
5102	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
5103	;;
5104      esac
5105      ;;
5106
5107    hpux9* | hpux10* | hpux11*)
5108      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5109      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5110      # not for PA HP-UX.
5111      case $host_cpu in
5112      hppa*64*|ia64*)
5113	# +Z the default
5114	;;
5115      *)
5116	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5117	;;
5118      esac
5119      # Is there a better lt_prog_compiler_static that works with the bundled CC?
5120      _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
5121      ;;
5122
5123    irix5* | irix6* | nonstopux*)
5124      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5125      # PIC (with -KPIC) is the default.
5126      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5127      ;;
5128
5129    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
5130      case $cc_basename in
5131      # old Intel for x86_64, which still supported -KPIC.
5132      ecc*)
5133	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5134	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5135	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5136        ;;
5137      # icc used to be incompatible with GCC.
5138      # ICC 10 doesn't accept -KPIC any more.
5139      icc* | ifort*)
5140	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5141	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5142	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5143        ;;
5144      # Lahey Fortran 8.1.
5145      lf95*)
5146	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5147	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
5148	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
5149	;;
5150      nagfor*)
5151	# NAG Fortran compiler
5152	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
5153	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5154	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5155	;;
5156      tcc*)
5157	# Fabrice Bellard et al's Tiny C Compiler
5158	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5159	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5160	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5161	;;
5162      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
5163        # Portland Group compilers (*not* the Pentium gcc compiler,
5164	# which looks to be a dead project)
5165	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5166	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5167	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5168        ;;
5169      ccc*)
5170        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5171        # All Alpha code is PIC.
5172        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5173        ;;
5174      xl* | bgxl* | bgf* | mpixl*)
5175	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
5176	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5177	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5178	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5179	;;
5180      *)
5181	case `$CC -V 2>&1 | $SED 5q` in
5182	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
5183	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
5184	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5185	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5186	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
5187	  ;;
5188	*Sun\ F* | *Sun*Fortran*)
5189	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5190	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5191	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5192	  ;;
5193	*Sun\ C*)
5194	  # Sun C 5.9
5195	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5196	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5197	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5198	  ;;
5199        *Intel*\ [[CF]]*Compiler*)
5200	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5201	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5202	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5203	  ;;
5204	*Portland\ Group*)
5205	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5206	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5207	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5208	  ;;
5209	esac
5210	;;
5211      esac
5212      ;;
5213
5214    newsos6)
5215      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5216      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5217      ;;
5218
5219    *nto* | *qnx*)
5220      # QNX uses GNU C++, but need to define -shared option too, otherwise
5221      # it will coredump.
5222      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5223      ;;
5224
5225    osf3* | osf4* | osf5*)
5226      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5227      # All OSF/1 code is PIC.
5228      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5229      ;;
5230
5231    rdos*)
5232      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5233      ;;
5234
5235    solaris*)
5236      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5237      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5238      case $cc_basename in
5239      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
5240	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5241      *)
5242	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5243      esac
5244      ;;
5245
5246    sunos4*)
5247      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5248      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5249      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5250      ;;
5251
5252    sysv4 | sysv4.2uw2* | sysv4.3*)
5253      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5254      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5255      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5256      ;;
5257
5258    sysv4*MP*)
5259      if test -d /usr/nec; then
5260	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5261	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5262      fi
5263      ;;
5264
5265    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5266      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5267      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5268      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5269      ;;
5270
5271    unicos*)
5272      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5273      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5274      ;;
5275
5276    uts4*)
5277      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5278      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5279      ;;
5280
5281    *)
5282      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5283      ;;
5284    esac
5285  fi
5286])
5287case $host_os in
5288  # For platforms that do not support PIC, -DPIC is meaningless:
5289  *djgpp*)
5290    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5291    ;;
5292  *)
5293    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
5294    ;;
5295esac
5296
5297AC_CACHE_CHECK([for $compiler option to produce PIC],
5298  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
5299  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
5300_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
5301
5302#
5303# Check to make sure the PIC flag actually works.
5304#
5305if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5306  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
5307    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
5308    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
5309    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
5310     "" | " "*) ;;
5311     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5312     esac],
5313    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5314     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5315fi
5316_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
5317	[Additional compiler flags for building library objects])
5318
5319_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
5320	[How to pass a linker flag through the compiler])
5321#
5322# Check to make sure the static flag actually works.
5323#
5324wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
5325_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5326  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
5327  $lt_tmp_static_flag,
5328  [],
5329  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
5330_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
5331	[Compiler flag to prevent dynamic linking])
5332])# _LT_COMPILER_PIC
5333
5334
5335# _LT_LINKER_SHLIBS([TAGNAME])
5336# ----------------------------
5337# See if the linker supports building shared libraries.
5338m4_defun([_LT_LINKER_SHLIBS],
5339[AC_REQUIRE([LT_PATH_LD])dnl
5340AC_REQUIRE([LT_PATH_NM])dnl
5341m4_require([_LT_PATH_MANIFEST_TOOL])dnl
5342m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5343m4_require([_LT_DECL_EGREP])dnl
5344m4_require([_LT_DECL_SED])dnl
5345m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
5346m4_require([_LT_TAG_COMPILER])dnl
5347AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5348m4_if([$1], [CXX], [
5349  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5350  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5351  case $host_os in
5352  aix[[4-9]]*)
5353    # If we're using GNU nm, then we don't want the "-C" option.
5354    # -C means demangle to GNU nm, but means don't demangle to AIX nm.
5355    # Without the "-l" option, or with the "-B" option, AIX nm treats
5356    # weak defined symbols like other global defined symbols, whereas
5357    # GNU nm marks them as "W".
5358    # While the 'weak' keyword is ignored in the Export File, we need
5359    # it in the Import File for the 'aix-soname' feature, so we have
5360    # to replace the "-B" option with "-P" for AIX nm.
5361    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5362      _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'
5363    else
5364      _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'
5365    fi
5366    ;;
5367  pw32*)
5368    _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
5369    ;;
5370  cygwin* | mingw* | cegcc*)
5371    case $cc_basename in
5372    cl* | icl*)
5373      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5374      ;;
5375    *)
5376      _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'
5377      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5378      ;;
5379    esac
5380    ;;
5381  *)
5382    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5383    ;;
5384  esac
5385], [
5386  runpath_var=
5387  _LT_TAGVAR(allow_undefined_flag, $1)=
5388  _LT_TAGVAR(always_export_symbols, $1)=no
5389  _LT_TAGVAR(archive_cmds, $1)=
5390  _LT_TAGVAR(archive_expsym_cmds, $1)=
5391  _LT_TAGVAR(compiler_needs_object, $1)=no
5392  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5393  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5394  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5395  _LT_TAGVAR(hardcode_automatic, $1)=no
5396  _LT_TAGVAR(hardcode_direct, $1)=no
5397  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5398  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5399  _LT_TAGVAR(hardcode_libdir_separator, $1)=
5400  _LT_TAGVAR(hardcode_minus_L, $1)=no
5401  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5402  _LT_TAGVAR(inherit_rpath, $1)=no
5403  _LT_TAGVAR(link_all_deplibs, $1)=unknown
5404  _LT_TAGVAR(module_cmds, $1)=
5405  _LT_TAGVAR(module_expsym_cmds, $1)=
5406  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
5407  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5408  _LT_TAGVAR(thread_safe_flag_spec, $1)=
5409  _LT_TAGVAR(whole_archive_flag_spec, $1)=
5410  # include_expsyms should be a list of space-separated symbols to be *always*
5411  # included in the symbol list
5412  _LT_TAGVAR(include_expsyms, $1)=
5413  # exclude_expsyms can be an extended regexp of symbols to exclude
5414  # it will be wrapped by ' (' and ')$', so one must not match beginning or
5415  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
5416  # as well as any symbol that contains 'd'.
5417  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5418  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5419  # platforms (ab)use it in PIC code, but their linkers get confused if
5420  # the symbol is explicitly referenced.  Since portable code cannot
5421  # rely on this symbol name, it's probably fine to never include it in
5422  # preloaded symbol tables.
5423  # Exclude shared library initialization/finalization symbols.
5424dnl Note also adjust exclude_expsyms for C++ above.
5425  extract_expsyms_cmds=
5426
5427  case $host_os in
5428  cygwin* | mingw* | pw32* | cegcc*)
5429    # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
5430    # When not using gcc, we currently assume that we are using
5431    # Microsoft Visual C++ or Intel C++ Compiler.
5432    if test yes != "$GCC"; then
5433      with_gnu_ld=no
5434    fi
5435    ;;
5436  interix*)
5437    # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
5438    with_gnu_ld=yes
5439    ;;
5440  openbsd* | bitrig*)
5441    with_gnu_ld=no
5442    ;;
5443  esac
5444
5445  _LT_TAGVAR(ld_shlibs, $1)=yes
5446
5447  # On some targets, GNU ld is compatible enough with the native linker
5448  # that we're better off using the native interface for both.
5449  lt_use_gnu_ld_interface=no
5450  if test yes = "$with_gnu_ld"; then
5451    case $host_os in
5452      aix*)
5453	# The AIX port of GNU ld has always aspired to compatibility
5454	# with the native linker.  However, as the warning in the GNU ld
5455	# block says, versions before 2.19.5* couldn't really create working
5456	# shared libraries, regardless of the interface used.
5457	case `$LD -v 2>&1` in
5458	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
5459	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
5460	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
5461	  *)
5462	    lt_use_gnu_ld_interface=yes
5463	    ;;
5464	esac
5465	;;
5466      *)
5467	lt_use_gnu_ld_interface=yes
5468	;;
5469    esac
5470  fi
5471
5472  if test yes = "$lt_use_gnu_ld_interface"; then
5473    # If archive_cmds runs LD, not CC, wlarc should be empty
5474    wlarc='$wl'
5475
5476    # Set some defaults for GNU ld with shared library support. These
5477    # are reset later if shared libraries are not supported. Putting them
5478    # here allows them to be overridden if necessary.
5479    runpath_var=LD_RUN_PATH
5480    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5481    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
5482    # ancient GNU ld didn't support --whole-archive et. al.
5483    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5484      _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
5485    else
5486      _LT_TAGVAR(whole_archive_flag_spec, $1)=
5487    fi
5488    supports_anon_versioning=no
5489    case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in
5490      *GNU\ gold*) supports_anon_versioning=yes ;;
5491      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5492      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5493      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5494      *\ 2.11.*) ;; # other 2.11 versions
5495      *) supports_anon_versioning=yes ;;
5496    esac
5497
5498    # See if GNU ld supports shared libraries.
5499    case $host_os in
5500    aix[[3-9]]*)
5501      # On AIX/PPC, the GNU linker is very broken
5502      if test ia64 != "$host_cpu"; then
5503	_LT_TAGVAR(ld_shlibs, $1)=no
5504	cat <<_LT_EOF 1>&2
5505
5506*** Warning: the GNU linker, at least up to release 2.19, is reported
5507*** to be unable to reliably create shared libraries on AIX.
5508*** Therefore, libtool is disabling shared libraries support.  If you
5509*** really care for shared libraries, you may want to install binutils
5510*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
5511*** You will then need to restart the configuration process.
5512
5513_LT_EOF
5514      fi
5515      ;;
5516
5517    amigaos*)
5518      case $host_cpu in
5519      powerpc)
5520            # see comment about AmigaOS4 .so support
5521            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5522            _LT_TAGVAR(archive_expsym_cmds, $1)=''
5523        ;;
5524      m68k)
5525            _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)'
5526            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5527            _LT_TAGVAR(hardcode_minus_L, $1)=yes
5528        ;;
5529      esac
5530      ;;
5531
5532    beos*)
5533      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5534	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5535	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5536	# support --undefined.  This deserves some investigation.  FIXME
5537	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5538      else
5539	_LT_TAGVAR(ld_shlibs, $1)=no
5540      fi
5541      ;;
5542
5543    cygwin* | mingw* | pw32* | cegcc*)
5544      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5545      # as there is no search path for DLLs.
5546      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5547      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
5548      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5549      _LT_TAGVAR(always_export_symbols, $1)=no
5550      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5551      _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'
5552      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5553
5554      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5555        _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'
5556	# If the export-symbols file already is a .def file, use it as
5557	# is; otherwise, prepend EXPORTS...
5558	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
5559          cp $export_symbols $output_objdir/$soname.def;
5560        else
5561          echo EXPORTS > $output_objdir/$soname.def;
5562          cat $export_symbols >> $output_objdir/$soname.def;
5563        fi~
5564        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5565      else
5566	_LT_TAGVAR(ld_shlibs, $1)=no
5567      fi
5568      ;;
5569
5570    haiku*)
5571      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5572      _LT_TAGVAR(link_all_deplibs, $1)=yes
5573      ;;
5574
5575    os2*)
5576      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5577      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5578      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5579      shrext_cmds=.dll
5580      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5581	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5582	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5583	$ECHO EXPORTS >> $output_objdir/$libname.def~
5584	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
5585	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5586	emximp -o $lib $output_objdir/$libname.def'
5587      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5588	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5589	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5590	$ECHO EXPORTS >> $output_objdir/$libname.def~
5591	prefix_cmds="$SED"~
5592	if test EXPORTS = "`$SED 1q $export_symbols`"; then
5593	  prefix_cmds="$prefix_cmds -e 1d";
5594	fi~
5595	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
5596	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
5597	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5598	emximp -o $lib $output_objdir/$libname.def'
5599      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
5600      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5601      _LT_TAGVAR(file_list_spec, $1)='@'
5602      ;;
5603
5604    interix[[3-9]]*)
5605      _LT_TAGVAR(hardcode_direct, $1)=no
5606      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5607      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5608      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5609      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5610      # Instead, shared libraries are loaded at an image base (0x10000000 by
5611      # default) and relocated if they conflict, which is a slow very memory
5612      # consuming and fragmenting process.  To avoid this, we pick a random,
5613      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5614      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5615      _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'
5616      _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'
5617      ;;
5618
5619    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
5620      tmp_diet=no
5621      if test linux-dietlibc = "$host_os"; then
5622	case $cc_basename in
5623	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
5624	esac
5625      fi
5626      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5627	 && test no = "$tmp_diet"
5628      then
5629	tmp_addflag=' $pic_flag'
5630	tmp_sharedflag='-shared'
5631	case $cc_basename,$host_cpu in
5632        pgcc*)				# Portland Group C compiler
5633	  _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'
5634	  tmp_addflag=' $pic_flag'
5635	  ;;
5636	pgf77* | pgf90* | pgf95* | pgfortran*)
5637					# Portland Group f77 and f90 compilers
5638	  _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'
5639	  tmp_addflag=' $pic_flag -Mnomain' ;;
5640	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
5641	  tmp_addflag=' -i_dynamic' ;;
5642	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
5643	  tmp_addflag=' -i_dynamic -nofor_main' ;;
5644	ifc* | ifort*)			# Intel Fortran compiler
5645	  tmp_addflag=' -nofor_main' ;;
5646	lf95*)				# Lahey Fortran 8.1
5647	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
5648	  tmp_sharedflag='--shared' ;;
5649        nagfor*)                        # NAGFOR 5.3
5650          tmp_sharedflag='-Wl,-shared' ;;
5651	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
5652	  tmp_sharedflag='-qmkshrobj'
5653	  tmp_addflag= ;;
5654	nvcc*)	# Cuda Compiler Driver 2.2
5655	  _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'
5656	  _LT_TAGVAR(compiler_needs_object, $1)=yes
5657	  ;;
5658	esac
5659	case `$CC -V 2>&1 | $SED 5q` in
5660	*Sun\ C*)			# Sun C 5.9
5661	  _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'
5662	  _LT_TAGVAR(compiler_needs_object, $1)=yes
5663	  tmp_sharedflag='-G' ;;
5664	*Sun\ F*)			# Sun Fortran 8.3
5665	  tmp_sharedflag='-G' ;;
5666	esac
5667	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5668
5669        if test yes = "$supports_anon_versioning"; then
5670          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5671            cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5672            echo "local: *; };" >> $output_objdir/$libname.ver~
5673            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
5674        fi
5675
5676	case $cc_basename in
5677	tcc*)
5678	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
5679	  ;;
5680	xlf* | bgf* | bgxlf* | mpixlf*)
5681	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5682	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5683	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5684	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
5685	  if test yes = "$supports_anon_versioning"; then
5686	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5687              cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5688              echo "local: *; };" >> $output_objdir/$libname.ver~
5689              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5690	  fi
5691	  ;;
5692	esac
5693      else
5694        _LT_TAGVAR(ld_shlibs, $1)=no
5695      fi
5696      ;;
5697
5698    netbsd*)
5699      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5700	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5701	wlarc=
5702      else
5703	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5704	_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'
5705      fi
5706      ;;
5707
5708    solaris*)
5709      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5710	_LT_TAGVAR(ld_shlibs, $1)=no
5711	cat <<_LT_EOF 1>&2
5712
5713*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5714*** create shared libraries on Solaris systems.  Therefore, libtool
5715*** is disabling shared libraries support.  We urge you to upgrade GNU
5716*** binutils to release 2.9.1 or newer.  Another option is to modify
5717*** your PATH or compiler configuration so that the native linker is
5718*** used, and then restart.
5719
5720_LT_EOF
5721      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5722	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5723	_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'
5724      else
5725	_LT_TAGVAR(ld_shlibs, $1)=no
5726      fi
5727      ;;
5728
5729    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5730      case `$LD -v 2>&1` in
5731        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5732	_LT_TAGVAR(ld_shlibs, $1)=no
5733	cat <<_LT_EOF 1>&2
5734
5735*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
5736*** reliably create shared libraries on SCO systems.  Therefore, libtool
5737*** is disabling shared libraries support.  We urge you to upgrade GNU
5738*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
5739*** your PATH or compiler configuration so that the native linker is
5740*** used, and then restart.
5741
5742_LT_EOF
5743	;;
5744	*)
5745	  # For security reasons, it is highly recommended that you always
5746	  # use absolute paths for naming shared libraries, and exclude the
5747	  # DT_RUNPATH tag from executables and libraries.  But doing so
5748	  # requires that you compile everything twice, which is a pain.
5749	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5750	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5751	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5752	    _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'
5753	  else
5754	    _LT_TAGVAR(ld_shlibs, $1)=no
5755	  fi
5756	;;
5757      esac
5758      ;;
5759
5760    sunos4*)
5761      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5762      wlarc=
5763      _LT_TAGVAR(hardcode_direct, $1)=yes
5764      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5765      ;;
5766
5767    *)
5768      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5769	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5770	_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'
5771      else
5772	_LT_TAGVAR(ld_shlibs, $1)=no
5773      fi
5774      ;;
5775    esac
5776
5777    if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
5778      runpath_var=
5779      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5780      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5781      _LT_TAGVAR(whole_archive_flag_spec, $1)=
5782    fi
5783  else
5784    # PORTME fill in a description of your system's linker (not GNU ld)
5785    case $host_os in
5786    aix3*)
5787      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5788      _LT_TAGVAR(always_export_symbols, $1)=yes
5789      _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'
5790      # Note: this linker hardcodes the directories in LIBPATH if there
5791      # are no directories specified by -L.
5792      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5793      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
5794	# Neither direct hardcoding nor static linking is supported with a
5795	# broken collect2.
5796	_LT_TAGVAR(hardcode_direct, $1)=unsupported
5797      fi
5798      ;;
5799
5800    aix[[4-9]]*)
5801      if test ia64 = "$host_cpu"; then
5802	# On IA64, the linker does run time linking by default, so we don't
5803	# have to do anything special.
5804	aix_use_runtimelinking=no
5805	exp_sym_flag='-Bexport'
5806	no_entry_flag=
5807      else
5808	# If we're using GNU nm, then we don't want the "-C" option.
5809	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
5810	# Without the "-l" option, or with the "-B" option, AIX nm treats
5811	# weak defined symbols like other global defined symbols, whereas
5812	# GNU nm marks them as "W".
5813	# While the 'weak' keyword is ignored in the Export File, we need
5814	# it in the Import File for the 'aix-soname' feature, so we have
5815	# to replace the "-B" option with "-P" for AIX nm.
5816	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5817	  _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'
5818	else
5819	  _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'
5820	fi
5821	aix_use_runtimelinking=no
5822
5823	# Test if we are trying to use run time linking or normal
5824	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
5825	# have runtime linking enabled, and use it for executables.
5826	# For shared libraries, we enable/disable runtime linking
5827	# depending on the kind of the shared library created -
5828	# when "with_aix_soname,aix_use_runtimelinking" is:
5829	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
5830	# "aix,yes"  lib.so          shared, rtl:yes, for executables
5831	#            lib.a           static archive
5832	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
5833	#            lib.a(lib.so.V) shared, rtl:no,  for executables
5834	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
5835	#            lib.a(lib.so.V) shared, rtl:no
5836	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
5837	#            lib.a           static archive
5838	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5839	  for ld_flag in $LDFLAGS; do
5840	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
5841	    aix_use_runtimelinking=yes
5842	    break
5843	  fi
5844	  done
5845	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
5846	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
5847	    # so we don't have lib.a shared libs to link our executables.
5848	    # We have to force runtime linking in this case.
5849	    aix_use_runtimelinking=yes
5850	    LDFLAGS="$LDFLAGS -Wl,-brtl"
5851	  fi
5852	  ;;
5853	esac
5854
5855	exp_sym_flag='-bexport'
5856	no_entry_flag='-bnoentry'
5857      fi
5858
5859      # When large executables or shared objects are built, AIX ld can
5860      # have problems creating the table of contents.  If linking a library
5861      # or program results in "error TOC overflow" add -mminimal-toc to
5862      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5863      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5864
5865      _LT_TAGVAR(archive_cmds, $1)=''
5866      _LT_TAGVAR(hardcode_direct, $1)=yes
5867      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5868      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5869      _LT_TAGVAR(link_all_deplibs, $1)=yes
5870      _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
5871      case $with_aix_soname,$aix_use_runtimelinking in
5872      aix,*) ;; # traditional, no import file
5873      svr4,* | *,yes) # use import file
5874	# The Import File defines what to hardcode.
5875	_LT_TAGVAR(hardcode_direct, $1)=no
5876	_LT_TAGVAR(hardcode_direct_absolute, $1)=no
5877	;;
5878      esac
5879
5880      if test yes = "$GCC"; then
5881	case $host_os in aix4.[[012]]|aix4.[[012]].*)
5882	# We only want to do this on AIX 4.2 and lower, the check
5883	# below for broken collect2 doesn't work under 4.3+
5884	  collect2name=`$CC -print-prog-name=collect2`
5885	  if test -f "$collect2name" &&
5886	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5887	  then
5888	  # We have reworked collect2
5889	  :
5890	  else
5891	  # We have old collect2
5892	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
5893	  # It fails to find uninstalled libraries when the uninstalled
5894	  # path is not listed in the libpath.  Setting hardcode_minus_L
5895	  # to unsupported forces relinking
5896	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
5897	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5898	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
5899	  fi
5900	  ;;
5901	esac
5902	shared_flag='-shared'
5903	if test yes = "$aix_use_runtimelinking"; then
5904	  shared_flag="$shared_flag "'$wl-G'
5905	fi
5906	# Need to ensure runtime linking is disabled for the traditional
5907	# shared library, or the linker may eventually find shared libraries
5908	# /with/ Import File - we do not want to mix them.
5909	shared_flag_aix='-shared'
5910	shared_flag_svr4='-shared $wl-G'
5911      else
5912	# not using gcc
5913	if test ia64 = "$host_cpu"; then
5914	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5915	# chokes on -Wl,-G. The following line is correct:
5916	  shared_flag='-G'
5917	else
5918	  if test yes = "$aix_use_runtimelinking"; then
5919	    shared_flag='$wl-G'
5920	  else
5921	    shared_flag='$wl-bM:SRE'
5922	  fi
5923	  shared_flag_aix='$wl-bM:SRE'
5924	  shared_flag_svr4='$wl-G'
5925	fi
5926      fi
5927
5928      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
5929      # It seems that -bexpall does not export symbols beginning with
5930      # underscore (_), so it is better to generate a list of symbols to export.
5931      _LT_TAGVAR(always_export_symbols, $1)=yes
5932      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
5933	# Warning - without using the other runtime loading flags (-brtl),
5934	# -berok will link without error, but may produce a broken library.
5935	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5936        # Determine the default libpath from the value encoded in an
5937        # empty executable.
5938        _LT_SYS_MODULE_PATH_AIX([$1])
5939        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
5940        _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
5941      else
5942	if test ia64 = "$host_cpu"; then
5943	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
5944	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5945	  _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"
5946	else
5947	 # Determine the default libpath from the value encoded in an
5948	 # empty executable.
5949	 _LT_SYS_MODULE_PATH_AIX([$1])
5950	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
5951	  # Warning - without using the other run time loading flags,
5952	  # -berok will link without error, but may produce a broken library.
5953	  _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
5954	  _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
5955	  if test yes = "$with_gnu_ld"; then
5956	    # We only use this code for GNU lds that support --whole-archive.
5957	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
5958	  else
5959	    # Exported symbols can be pulled into shared objects from archives
5960	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5961	  fi
5962	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5963	  _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
5964	  # -brtl affects multiple linker settings, -berok does not and is overridden later
5965	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
5966	  if test svr4 != "$with_aix_soname"; then
5967	    # This is similar to how AIX traditionally builds its shared libraries.
5968	    _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'
5969	  fi
5970	  if test aix != "$with_aix_soname"; then
5971	    _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'
5972	  else
5973	    # used by -dlpreopen to get the symbols
5974	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
5975	  fi
5976	  _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
5977	fi
5978      fi
5979      ;;
5980
5981    amigaos*)
5982      case $host_cpu in
5983      powerpc)
5984            # see comment about AmigaOS4 .so support
5985            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5986            _LT_TAGVAR(archive_expsym_cmds, $1)=''
5987        ;;
5988      m68k)
5989            _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)'
5990            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5991            _LT_TAGVAR(hardcode_minus_L, $1)=yes
5992        ;;
5993      esac
5994      ;;
5995
5996    bsdi[[45]]*)
5997      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5998      ;;
5999
6000    cygwin* | mingw* | pw32* | cegcc*)
6001      # When not using gcc, we currently assume that we are using
6002      # Microsoft Visual C++ or Intel C++ Compiler.
6003      # hardcode_libdir_flag_spec is actually meaningless, as there is
6004      # no search path for DLLs.
6005      case $cc_basename in
6006      cl* | icl*)
6007	# Native MSVC or ICC
6008	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6009	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6010	_LT_TAGVAR(always_export_symbols, $1)=yes
6011	_LT_TAGVAR(file_list_spec, $1)='@'
6012	# Tell ltmain to make .lib files, not .a files.
6013	libext=lib
6014	# Tell ltmain to make .dll files, not .so files.
6015	shrext_cmds=.dll
6016	# FIXME: Setting linknames here is a bad hack.
6017	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
6018	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
6019            cp "$export_symbols" "$output_objdir/$soname.def";
6020            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
6021          else
6022            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
6023          fi~
6024          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6025          linknames='
6026	# The linker will not automatically build a static lib if we build a DLL.
6027	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6028	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6029	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
6030	_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'
6031	# Don't use ranlib
6032	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6033	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6034          lt_tool_outputfile="@TOOL_OUTPUT@"~
6035          case $lt_outputfile in
6036            *.exe|*.EXE) ;;
6037            *)
6038              lt_outputfile=$lt_outputfile.exe
6039              lt_tool_outputfile=$lt_tool_outputfile.exe
6040              ;;
6041          esac~
6042          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
6043            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6044            $RM "$lt_outputfile.manifest";
6045          fi'
6046	;;
6047      *)
6048	# Assume MSVC and ICC wrapper
6049	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6050	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6051	# Tell ltmain to make .lib files, not .a files.
6052	libext=lib
6053	# Tell ltmain to make .dll files, not .so files.
6054	shrext_cmds=.dll
6055	# FIXME: Setting linknames here is a bad hack.
6056	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
6057	# The linker will automatically build a .lib file if we build a DLL.
6058	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6059	# FIXME: Should let the user specify the lib program.
6060	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
6061	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6062	;;
6063      esac
6064      ;;
6065
6066    darwin* | rhapsody*)
6067      _LT_DARWIN_LINKER_FEATURES($1)
6068      ;;
6069
6070    dgux*)
6071      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6072      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6073      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6074      ;;
6075
6076    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6077    # support.  Future versions do this automatically, but an explicit c++rt0.o
6078    # does not break anything, and helps significantly (at the cost of a little
6079    # extra space).
6080    freebsd2.2*)
6081      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6082      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6083      _LT_TAGVAR(hardcode_direct, $1)=yes
6084      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6085      ;;
6086
6087    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6088    freebsd2.*)
6089      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6090      _LT_TAGVAR(hardcode_direct, $1)=yes
6091      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6092      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6093      ;;
6094
6095    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6096    freebsd* | dragonfly* | midnightbsd*)
6097      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6098      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6099      _LT_TAGVAR(hardcode_direct, $1)=yes
6100      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6101      ;;
6102
6103    hpux9*)
6104      if test yes = "$GCC"; then
6105	_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'
6106      else
6107	_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'
6108      fi
6109      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
6110      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6111      _LT_TAGVAR(hardcode_direct, $1)=yes
6112
6113      # hardcode_minus_L: Not really in the search PATH,
6114      # but as the default location of the library.
6115      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6116      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6117      ;;
6118
6119    hpux10*)
6120      if test yes,no = "$GCC,$with_gnu_ld"; then
6121	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6122      else
6123	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6124      fi
6125      if test no = "$with_gnu_ld"; then
6126	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
6127	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6128	_LT_TAGVAR(hardcode_direct, $1)=yes
6129	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6130	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6131	# hardcode_minus_L: Not really in the search PATH,
6132	# but as the default location of the library.
6133	_LT_TAGVAR(hardcode_minus_L, $1)=yes
6134      fi
6135      ;;
6136
6137    hpux11*)
6138      if test yes,no = "$GCC,$with_gnu_ld"; then
6139	case $host_cpu in
6140	hppa*64*)
6141	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
6142	  ;;
6143	ia64*)
6144	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6145	  ;;
6146	*)
6147	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6148	  ;;
6149	esac
6150      else
6151	case $host_cpu in
6152	hppa*64*)
6153	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
6154	  ;;
6155	ia64*)
6156	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6157	  ;;
6158	*)
6159	m4_if($1, [], [
6160	  # Older versions of the 11.00 compiler do not understand -b yet
6161	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
6162	  _LT_LINKER_OPTION([if $CC understands -b],
6163	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
6164	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
6165	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
6166	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
6167	  ;;
6168	esac
6169      fi
6170      if test no = "$with_gnu_ld"; then
6171	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
6172	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6173
6174	case $host_cpu in
6175	hppa*64*|ia64*)
6176	  _LT_TAGVAR(hardcode_direct, $1)=no
6177	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6178	  ;;
6179	*)
6180	  _LT_TAGVAR(hardcode_direct, $1)=yes
6181	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6182	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6183
6184	  # hardcode_minus_L: Not really in the search PATH,
6185	  # but as the default location of the library.
6186	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
6187	  ;;
6188	esac
6189      fi
6190      ;;
6191
6192    irix5* | irix6* | nonstopux*)
6193      if test yes = "$GCC"; then
6194	_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'
6195	# Try to use the -exported_symbol ld option, if it does not
6196	# work, assume that -exports_file does not work either and
6197	# implicitly export all symbols.
6198	# This should be the same for all languages, so no per-tag cache variable.
6199	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
6200	  [lt_cv_irix_exported_symbol],
6201	  [save_LDFLAGS=$LDFLAGS
6202	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
6203	   AC_LINK_IFELSE(
6204	     [AC_LANG_SOURCE(
6205	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
6206			      [C++], [[int foo (void) { return 0; }]],
6207			      [Fortran 77], [[
6208      subroutine foo
6209      end]],
6210			      [Fortran], [[
6211      subroutine foo
6212      end]])])],
6213	      [lt_cv_irix_exported_symbol=yes],
6214	      [lt_cv_irix_exported_symbol=no])
6215           LDFLAGS=$save_LDFLAGS])
6216	if test yes = "$lt_cv_irix_exported_symbol"; then
6217          _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'
6218	fi
6219      else
6220	_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'
6221	_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'
6222      fi
6223      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6224      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6225      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6226      _LT_TAGVAR(inherit_rpath, $1)=yes
6227      _LT_TAGVAR(link_all_deplibs, $1)=yes
6228      ;;
6229
6230    linux*)
6231      case $cc_basename in
6232      tcc*)
6233	# Fabrice Bellard et al's Tiny C Compiler
6234	_LT_TAGVAR(ld_shlibs, $1)=yes
6235	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6236	;;
6237      esac
6238      ;;
6239
6240    netbsd*)
6241      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6242	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6243      else
6244	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6245      fi
6246      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6247      _LT_TAGVAR(hardcode_direct, $1)=yes
6248      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6249      ;;
6250
6251    newsos6)
6252      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6253      _LT_TAGVAR(hardcode_direct, $1)=yes
6254      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6255      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6256      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6257      ;;
6258
6259    *nto* | *qnx*)
6260      ;;
6261
6262    openbsd* | bitrig*)
6263      if test -f /usr/libexec/ld.so; then
6264	_LT_TAGVAR(hardcode_direct, $1)=yes
6265	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6266	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6267	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
6268	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6269	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
6270	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6271	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6272	else
6273	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6274	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6275	fi
6276      else
6277	_LT_TAGVAR(ld_shlibs, $1)=no
6278      fi
6279      ;;
6280
6281    os2*)
6282      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6283      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6284      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6285      shrext_cmds=.dll
6286      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6287	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6288	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6289	$ECHO EXPORTS >> $output_objdir/$libname.def~
6290	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
6291	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6292	emximp -o $lib $output_objdir/$libname.def'
6293      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6294	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6295	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6296	$ECHO EXPORTS >> $output_objdir/$libname.def~
6297	prefix_cmds="$SED"~
6298	if test EXPORTS = "`$SED 1q $export_symbols`"; then
6299	  prefix_cmds="$prefix_cmds -e 1d";
6300	fi~
6301	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
6302	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
6303	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6304	emximp -o $lib $output_objdir/$libname.def'
6305      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
6306      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6307      _LT_TAGVAR(file_list_spec, $1)='@'
6308      ;;
6309
6310    osf3*)
6311      if test yes = "$GCC"; then
6312	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
6313	_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'
6314      else
6315	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6316	_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'
6317      fi
6318      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6319      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6320      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6321      ;;
6322
6323    osf4* | osf5*)	# as osf3* with the addition of -msym flag
6324      if test yes = "$GCC"; then
6325	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
6326	_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'
6327	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6328      else
6329	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6330	_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'
6331	_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~
6332          $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'
6333
6334	# Both c and cxx compiler support -rpath directly
6335	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6336      fi
6337      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6338      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6339      ;;
6340
6341    solaris*)
6342      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
6343      if test yes = "$GCC"; then
6344	wlarc='$wl'
6345	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
6346	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6347          $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'
6348      else
6349	case `$CC -V 2>&1` in
6350	*"Compilers 5.0"*)
6351	  wlarc=''
6352	  _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
6353	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6354            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
6355	  ;;
6356	*)
6357	  wlarc='$wl'
6358	  _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
6359	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6360            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6361	  ;;
6362	esac
6363      fi
6364      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6365      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6366      case $host_os in
6367      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6368      *)
6369	# The compiler driver will combine and reorder linker options,
6370	# but understands '-z linker_flag'.  GCC discards it without '$wl',
6371	# but is careful enough not to reorder.
6372	# Supported since Solaris 2.6 (maybe 2.5.1?)
6373	if test yes = "$GCC"; then
6374	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
6375	else
6376	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6377	fi
6378	;;
6379      esac
6380      _LT_TAGVAR(link_all_deplibs, $1)=yes
6381      ;;
6382
6383    sunos4*)
6384      if test sequent = "$host_vendor"; then
6385	# Use $CC to link under sequent, because it throws in some extra .o
6386	# files that make .init and .fini sections work.
6387	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6388      else
6389	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6390      fi
6391      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6392      _LT_TAGVAR(hardcode_direct, $1)=yes
6393      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6394      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6395      ;;
6396
6397    sysv4)
6398      case $host_vendor in
6399	sni)
6400	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6401	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6402	;;
6403	siemens)
6404	  ## LD is ld it makes a PLAMLIB
6405	  ## CC just makes a GrossModule.
6406	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6407	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6408	  _LT_TAGVAR(hardcode_direct, $1)=no
6409        ;;
6410	motorola)
6411	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6412	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6413	;;
6414      esac
6415      runpath_var='LD_RUN_PATH'
6416      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6417      ;;
6418
6419    sysv4.3*)
6420      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6421      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6422      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6423      ;;
6424
6425    sysv4*MP*)
6426      if test -d /usr/nec; then
6427	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6428	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6429	runpath_var=LD_RUN_PATH
6430	hardcode_runpath_var=yes
6431	_LT_TAGVAR(ld_shlibs, $1)=yes
6432      fi
6433      ;;
6434
6435    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6436      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
6437      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6438      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6439      runpath_var='LD_RUN_PATH'
6440
6441      if test yes = "$GCC"; then
6442	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6443	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6444      else
6445	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6446	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6447      fi
6448      ;;
6449
6450    sysv5* | sco3.2v5* | sco5v6*)
6451      # Note: We CANNOT use -z defs as we might desire, because we do not
6452      # link with -lc, and that would cause any symbols used from libc to
6453      # always be unresolved, which means just about no library would
6454      # ever link correctly.  If we're not using GNU ld we use -z text
6455      # though, which does catch some bad symbols but isn't as heavy-handed
6456      # as -z defs.
6457      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
6458      _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
6459      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6460      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6461      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
6462      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6463      _LT_TAGVAR(link_all_deplibs, $1)=yes
6464      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
6465      runpath_var='LD_RUN_PATH'
6466
6467      if test yes = "$GCC"; then
6468	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6469	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6470      else
6471	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6472	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6473      fi
6474      ;;
6475
6476    uts4*)
6477      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6478      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6479      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6480      ;;
6481
6482    *)
6483      _LT_TAGVAR(ld_shlibs, $1)=no
6484      ;;
6485    esac
6486
6487    if test sni = "$host_vendor"; then
6488      case $host in
6489      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6490	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
6491	;;
6492      esac
6493    fi
6494  fi
6495])
6496AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6497test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
6498
6499_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6500
6501_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6502_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6503_LT_DECL([], [extract_expsyms_cmds], [2],
6504    [The commands to extract the exported symbol list from a shared archive])
6505
6506#
6507# Do we need to explicitly link libc?
6508#
6509case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6510x|xyes)
6511  # Assume -lc should be added
6512  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6513
6514  if test yes,yes = "$GCC,$enable_shared"; then
6515    case $_LT_TAGVAR(archive_cmds, $1) in
6516    *'~'*)
6517      # FIXME: we may have to deal with multi-command sequences.
6518      ;;
6519    '$CC '*)
6520      # Test whether the compiler implicitly links with -lc since on some
6521      # systems, -lgcc has to come before -lc. If gcc already passes -lc
6522      # to ld, don't add -lc before -lgcc.
6523      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
6524	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
6525	[$RM conftest*
6526	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6527
6528	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6529	  soname=conftest
6530	  lib=conftest
6531	  libobjs=conftest.$ac_objext
6532	  deplibs=
6533	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6534	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6535	  compiler_flags=-v
6536	  linker_flags=-v
6537	  verstring=
6538	  output_objdir=.
6539	  libname=conftest
6540	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6541	  _LT_TAGVAR(allow_undefined_flag, $1)=
6542	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6543	  then
6544	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6545	  else
6546	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6547	  fi
6548	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6549	else
6550	  cat conftest.err 1>&5
6551	fi
6552	$RM conftest*
6553	])
6554      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
6555      ;;
6556    esac
6557  fi
6558  ;;
6559esac
6560
6561_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6562    [Whether or not to add -lc for building shared libraries])
6563_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6564    [enable_shared_with_static_runtimes], [0],
6565    [Whether or not to disallow shared libs when runtime libs are static])
6566_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6567    [Compiler flag to allow reflexive dlopens])
6568_LT_TAGDECL([], [whole_archive_flag_spec], [1],
6569    [Compiler flag to generate shared objects directly from archives])
6570_LT_TAGDECL([], [compiler_needs_object], [1],
6571    [Whether the compiler copes with passing no objects directly])
6572_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6573    [Create an old-style archive from a shared archive])
6574_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6575    [Create a temporary old-style archive to link instead of a shared archive])
6576_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6577_LT_TAGDECL([], [archive_expsym_cmds], [2])
6578_LT_TAGDECL([], [module_cmds], [2],
6579    [Commands used to build a loadable module if different from building
6580    a shared archive.])
6581_LT_TAGDECL([], [module_expsym_cmds], [2])
6582_LT_TAGDECL([], [with_gnu_ld], [1],
6583    [Whether we are building with GNU ld or not])
6584_LT_TAGDECL([], [allow_undefined_flag], [1],
6585    [Flag that allows shared libraries with undefined symbols to be built])
6586_LT_TAGDECL([], [no_undefined_flag], [1],
6587    [Flag that enforces no undefined symbols])
6588_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6589    [Flag to hardcode $libdir into a binary during linking.
6590    This must work even if $libdir does not exist])
6591_LT_TAGDECL([], [hardcode_libdir_separator], [1],
6592    [Whether we need a single "-rpath" flag with a separated argument])
6593_LT_TAGDECL([], [hardcode_direct], [0],
6594    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
6595    DIR into the resulting binary])
6596_LT_TAGDECL([], [hardcode_direct_absolute], [0],
6597    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
6598    DIR into the resulting binary and the resulting library dependency is
6599    "absolute", i.e impossible to change by setting $shlibpath_var if the
6600    library is relocated])
6601_LT_TAGDECL([], [hardcode_minus_L], [0],
6602    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6603    into the resulting binary])
6604_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6605    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6606    into the resulting binary])
6607_LT_TAGDECL([], [hardcode_automatic], [0],
6608    [Set to "yes" if building a shared library automatically hardcodes DIR
6609    into the library and all subsequent libraries and executables linked
6610    against it])
6611_LT_TAGDECL([], [inherit_rpath], [0],
6612    [Set to yes if linker adds runtime paths of dependent libraries
6613    to runtime path list])
6614_LT_TAGDECL([], [link_all_deplibs], [0],
6615    [Whether libtool must link a program against all its dependency libraries])
6616_LT_TAGDECL([], [always_export_symbols], [0],
6617    [Set to "yes" if exported symbols are required])
6618_LT_TAGDECL([], [export_symbols_cmds], [2],
6619    [The commands to list exported symbols])
6620_LT_TAGDECL([], [exclude_expsyms], [1],
6621    [Symbols that should not be listed in the preloaded symbols])
6622_LT_TAGDECL([], [include_expsyms], [1],
6623    [Symbols that must always be exported])
6624_LT_TAGDECL([], [prelink_cmds], [2],
6625    [Commands necessary for linking programs (against libraries) with templates])
6626_LT_TAGDECL([], [postlink_cmds], [2],
6627    [Commands necessary for finishing linking programs])
6628_LT_TAGDECL([], [file_list_spec], [1],
6629    [Specify filename containing input files])
6630dnl FIXME: Not yet implemented
6631dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6632dnl    [Compiler flag to generate thread safe objects])
6633])# _LT_LINKER_SHLIBS
6634
6635
6636# _LT_LANG_C_CONFIG([TAG])
6637# ------------------------
6638# Ensure that the configuration variables for a C compiler are suitably
6639# defined.  These variables are subsequently used by _LT_CONFIG to write
6640# the compiler configuration to 'libtool'.
6641m4_defun([_LT_LANG_C_CONFIG],
6642[m4_require([_LT_DECL_EGREP])dnl
6643lt_save_CC=$CC
6644AC_LANG_PUSH(C)
6645
6646# Source file extension for C test sources.
6647ac_ext=c
6648
6649# Object file extension for compiled C test sources.
6650objext=o
6651_LT_TAGVAR(objext, $1)=$objext
6652
6653# Code to be used in simple compile tests
6654lt_simple_compile_test_code="int some_variable = 0;"
6655
6656# Code to be used in simple link tests
6657lt_simple_link_test_code='int main(){return(0);}'
6658
6659_LT_TAG_COMPILER
6660# Save the default compiler, since it gets overwritten when the other
6661# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6662compiler_DEFAULT=$CC
6663
6664# save warnings/boilerplate of simple test code
6665_LT_COMPILER_BOILERPLATE
6666_LT_LINKER_BOILERPLATE
6667
6668if test -n "$compiler"; then
6669  _LT_COMPILER_NO_RTTI($1)
6670  _LT_COMPILER_PIC($1)
6671  _LT_COMPILER_C_O($1)
6672  _LT_COMPILER_FILE_LOCKS($1)
6673  _LT_LINKER_SHLIBS($1)
6674  _LT_SYS_DYNAMIC_LINKER($1)
6675  _LT_LINKER_HARDCODE_LIBPATH($1)
6676  LT_SYS_DLOPEN_SELF
6677  _LT_CMD_STRIPLIB
6678
6679  # Report what library types will actually be built
6680  AC_MSG_CHECKING([if libtool supports shared libraries])
6681  AC_MSG_RESULT([$can_build_shared])
6682
6683  AC_MSG_CHECKING([whether to build shared libraries])
6684  test no = "$can_build_shared" && enable_shared=no
6685
6686  # On AIX, shared libraries and static libraries use the same namespace, and
6687  # are all built from PIC.
6688  case $host_os in
6689  aix3*)
6690    test yes = "$enable_shared" && enable_static=no
6691    if test -n "$RANLIB"; then
6692      archive_cmds="$archive_cmds~\$RANLIB \$lib"
6693      postinstall_cmds='$RANLIB $lib'
6694    fi
6695    ;;
6696
6697  aix[[4-9]]*)
6698    if test ia64 != "$host_cpu"; then
6699      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
6700      yes,aix,yes) ;;			# shared object as lib.so file only
6701      yes,svr4,*) ;;			# shared object as lib.so archive member only
6702      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
6703      esac
6704    fi
6705    ;;
6706  esac
6707  AC_MSG_RESULT([$enable_shared])
6708
6709  AC_MSG_CHECKING([whether to build static libraries])
6710  # Make sure either enable_shared or enable_static is yes.
6711  test yes = "$enable_shared" || enable_static=yes
6712  AC_MSG_RESULT([$enable_static])
6713
6714  _LT_CONFIG($1)
6715fi
6716AC_LANG_POP
6717CC=$lt_save_CC
6718])# _LT_LANG_C_CONFIG
6719
6720
6721# _LT_LANG_CXX_CONFIG([TAG])
6722# --------------------------
6723# Ensure that the configuration variables for a C++ compiler are suitably
6724# defined.  These variables are subsequently used by _LT_CONFIG to write
6725# the compiler configuration to 'libtool'.
6726m4_defun([_LT_LANG_CXX_CONFIG],
6727[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6728m4_require([_LT_DECL_EGREP])dnl
6729m4_require([_LT_PATH_MANIFEST_TOOL])dnl
6730if test -n "$CXX" && ( test no != "$CXX" &&
6731    ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
6732    (test g++ != "$CXX"))); then
6733  AC_PROG_CXXCPP
6734else
6735  _lt_caught_CXX_error=yes
6736fi
6737
6738AC_LANG_PUSH(C++)
6739_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6740_LT_TAGVAR(allow_undefined_flag, $1)=
6741_LT_TAGVAR(always_export_symbols, $1)=no
6742_LT_TAGVAR(archive_expsym_cmds, $1)=
6743_LT_TAGVAR(compiler_needs_object, $1)=no
6744_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6745_LT_TAGVAR(hardcode_direct, $1)=no
6746_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6747_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6748_LT_TAGVAR(hardcode_libdir_separator, $1)=
6749_LT_TAGVAR(hardcode_minus_L, $1)=no
6750_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6751_LT_TAGVAR(hardcode_automatic, $1)=no
6752_LT_TAGVAR(inherit_rpath, $1)=no
6753_LT_TAGVAR(module_cmds, $1)=
6754_LT_TAGVAR(module_expsym_cmds, $1)=
6755_LT_TAGVAR(link_all_deplibs, $1)=unknown
6756_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6757_LT_TAGVAR(reload_flag, $1)=$reload_flag
6758_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
6759_LT_TAGVAR(no_undefined_flag, $1)=
6760_LT_TAGVAR(whole_archive_flag_spec, $1)=
6761_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6762
6763# Source file extension for C++ test sources.
6764ac_ext=cpp
6765
6766# Object file extension for compiled C++ test sources.
6767objext=o
6768_LT_TAGVAR(objext, $1)=$objext
6769
6770# No sense in running all these tests if we already determined that
6771# the CXX compiler isn't working.  Some variables (like enable_shared)
6772# are currently assumed to apply to all compilers on this platform,
6773# and will be corrupted by setting them based on a non-working compiler.
6774if test yes != "$_lt_caught_CXX_error"; then
6775  # Code to be used in simple compile tests
6776  lt_simple_compile_test_code="int some_variable = 0;"
6777
6778  # Code to be used in simple link tests
6779  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6780
6781  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6782  _LT_TAG_COMPILER
6783
6784  # save warnings/boilerplate of simple test code
6785  _LT_COMPILER_BOILERPLATE
6786  _LT_LINKER_BOILERPLATE
6787
6788  # Allow CC to be a program name with arguments.
6789  lt_save_CC=$CC
6790  lt_save_CFLAGS=$CFLAGS
6791  lt_save_LD=$LD
6792  lt_save_GCC=$GCC
6793  GCC=$GXX
6794  lt_save_with_gnu_ld=$with_gnu_ld
6795  lt_save_path_LD=$lt_cv_path_LD
6796  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6797    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6798  else
6799    $as_unset lt_cv_prog_gnu_ld
6800  fi
6801  if test -n "${lt_cv_path_LDCXX+set}"; then
6802    lt_cv_path_LD=$lt_cv_path_LDCXX
6803  else
6804    $as_unset lt_cv_path_LD
6805  fi
6806  test -z "${LDCXX+set}" || LD=$LDCXX
6807  CC=${CXX-"c++"}
6808  CFLAGS=$CXXFLAGS
6809  compiler=$CC
6810  _LT_TAGVAR(compiler, $1)=$CC
6811  _LT_CC_BASENAME([$compiler])
6812
6813  if test -n "$compiler"; then
6814    # We don't want -fno-exception when compiling C++ code, so set the
6815    # no_builtin_flag separately
6816    if test yes = "$GXX"; then
6817      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6818    else
6819      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6820    fi
6821
6822    if test yes = "$GXX"; then
6823      # Set up default GNU C++ configuration
6824
6825      LT_PATH_LD
6826
6827      # Check if GNU C++ uses GNU ld as the underlying linker, since the
6828      # archiving commands below assume that GNU ld is being used.
6829      if test yes = "$with_gnu_ld"; then
6830        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
6831        _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'
6832
6833        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6834        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
6835
6836        # If archive_cmds runs LD, not CC, wlarc should be empty
6837        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6838        #     investigate it a little bit more. (MM)
6839        wlarc='$wl'
6840
6841        # ancient GNU ld didn't support --whole-archive et. al.
6842        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6843	  $GREP 'no-whole-archive' > /dev/null; then
6844          _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
6845        else
6846          _LT_TAGVAR(whole_archive_flag_spec, $1)=
6847        fi
6848      else
6849        with_gnu_ld=no
6850        wlarc=
6851
6852        # A generic and very simple default shared library creation
6853        # command for GNU C++ for the case where it uses the native
6854        # linker, instead of GNU ld.  If possible, this setting should
6855        # overridden to take advantage of the native linker features on
6856        # the platform it is being used on.
6857        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6858      fi
6859
6860      # Commands to make compiler produce verbose output that lists
6861      # what "hidden" libraries, object files and flags are used when
6862      # linking a shared library.
6863      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6864
6865    else
6866      GXX=no
6867      with_gnu_ld=no
6868      wlarc=
6869    fi
6870
6871    # PORTME: fill in a description of your system's C++ link characteristics
6872    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6873    _LT_TAGVAR(ld_shlibs, $1)=yes
6874    case $host_os in
6875      aix3*)
6876        # FIXME: insert proper C++ library support
6877        _LT_TAGVAR(ld_shlibs, $1)=no
6878        ;;
6879      aix[[4-9]]*)
6880        if test ia64 = "$host_cpu"; then
6881          # On IA64, the linker does run time linking by default, so we don't
6882          # have to do anything special.
6883          aix_use_runtimelinking=no
6884          exp_sym_flag='-Bexport'
6885          no_entry_flag=
6886        else
6887          aix_use_runtimelinking=no
6888
6889          # Test if we are trying to use run time linking or normal
6890          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6891          # have runtime linking enabled, and use it for executables.
6892          # For shared libraries, we enable/disable runtime linking
6893          # depending on the kind of the shared library created -
6894          # when "with_aix_soname,aix_use_runtimelinking" is:
6895          # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
6896          # "aix,yes"  lib.so          shared, rtl:yes, for executables
6897          #            lib.a           static archive
6898          # "both,no"  lib.so.V(shr.o) shared, rtl:yes
6899          #            lib.a(lib.so.V) shared, rtl:no,  for executables
6900          # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
6901          #            lib.a(lib.so.V) shared, rtl:no
6902          # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
6903          #            lib.a           static archive
6904          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6905	    for ld_flag in $LDFLAGS; do
6906	      case $ld_flag in
6907	      *-brtl*)
6908	        aix_use_runtimelinking=yes
6909	        break
6910	        ;;
6911	      esac
6912	    done
6913	    if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
6914	      # With aix-soname=svr4, we create the lib.so.V shared archives only,
6915	      # so we don't have lib.a shared libs to link our executables.
6916	      # We have to force runtime linking in this case.
6917	      aix_use_runtimelinking=yes
6918	      LDFLAGS="$LDFLAGS -Wl,-brtl"
6919	    fi
6920	    ;;
6921          esac
6922
6923          exp_sym_flag='-bexport'
6924          no_entry_flag='-bnoentry'
6925        fi
6926
6927        # When large executables or shared objects are built, AIX ld can
6928        # have problems creating the table of contents.  If linking a library
6929        # or program results in "error TOC overflow" add -mminimal-toc to
6930        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6931        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6932
6933        _LT_TAGVAR(archive_cmds, $1)=''
6934        _LT_TAGVAR(hardcode_direct, $1)=yes
6935        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6936        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6937        _LT_TAGVAR(link_all_deplibs, $1)=yes
6938        _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
6939        case $with_aix_soname,$aix_use_runtimelinking in
6940        aix,*) ;;	# no import file
6941        svr4,* | *,yes) # use import file
6942          # The Import File defines what to hardcode.
6943          _LT_TAGVAR(hardcode_direct, $1)=no
6944          _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6945          ;;
6946        esac
6947
6948        if test yes = "$GXX"; then
6949          case $host_os in aix4.[[012]]|aix4.[[012]].*)
6950          # We only want to do this on AIX 4.2 and lower, the check
6951          # below for broken collect2 doesn't work under 4.3+
6952	  collect2name=`$CC -print-prog-name=collect2`
6953	  if test -f "$collect2name" &&
6954	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6955	  then
6956	    # We have reworked collect2
6957	    :
6958	  else
6959	    # We have old collect2
6960	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
6961	    # It fails to find uninstalled libraries when the uninstalled
6962	    # path is not listed in the libpath.  Setting hardcode_minus_L
6963	    # to unsupported forces relinking
6964	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
6965	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6966	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
6967	  fi
6968          esac
6969          shared_flag='-shared'
6970	  if test yes = "$aix_use_runtimelinking"; then
6971	    shared_flag=$shared_flag' $wl-G'
6972	  fi
6973	  # Need to ensure runtime linking is disabled for the traditional
6974	  # shared library, or the linker may eventually find shared libraries
6975	  # /with/ Import File - we do not want to mix them.
6976	  shared_flag_aix='-shared'
6977	  shared_flag_svr4='-shared $wl-G'
6978        else
6979          # not using gcc
6980          if test ia64 = "$host_cpu"; then
6981	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6982	  # chokes on -Wl,-G. The following line is correct:
6983	  shared_flag='-G'
6984          else
6985	    if test yes = "$aix_use_runtimelinking"; then
6986	      shared_flag='$wl-G'
6987	    else
6988	      shared_flag='$wl-bM:SRE'
6989	    fi
6990	    shared_flag_aix='$wl-bM:SRE'
6991	    shared_flag_svr4='$wl-G'
6992          fi
6993        fi
6994
6995        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
6996        # It seems that -bexpall does not export symbols beginning with
6997        # underscore (_), so it is better to generate a list of symbols to
6998	# export.
6999        _LT_TAGVAR(always_export_symbols, $1)=yes
7000	if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
7001          # Warning - without using the other runtime loading flags (-brtl),
7002          # -berok will link without error, but may produce a broken library.
7003          # The "-G" linker flag allows undefined symbols.
7004          _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
7005          # Determine the default libpath from the value encoded in an empty
7006          # executable.
7007          _LT_SYS_MODULE_PATH_AIX([$1])
7008          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
7009
7010          _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
7011        else
7012          if test ia64 = "$host_cpu"; then
7013	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
7014	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7015	    _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"
7016          else
7017	    # Determine the default libpath from the value encoded in an
7018	    # empty executable.
7019	    _LT_SYS_MODULE_PATH_AIX([$1])
7020	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
7021	    # Warning - without using the other run time loading flags,
7022	    # -berok will link without error, but may produce a broken library.
7023	    _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
7024	    _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
7025	    if test yes = "$with_gnu_ld"; then
7026	      # We only use this code for GNU lds that support --whole-archive.
7027	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
7028	    else
7029	      # Exported symbols can be pulled into shared objects from archives
7030	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7031	    fi
7032	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7033	    _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
7034	    # -brtl affects multiple linker settings, -berok does not and is overridden later
7035	    compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
7036	    if test svr4 != "$with_aix_soname"; then
7037	      # This is similar to how AIX traditionally builds its shared
7038	      # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
7039	      _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'
7040	    fi
7041	    if test aix != "$with_aix_soname"; then
7042	      _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'
7043	    else
7044	      # used by -dlpreopen to get the symbols
7045	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
7046	    fi
7047	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
7048          fi
7049        fi
7050        ;;
7051
7052      beos*)
7053	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7054	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7055	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
7056	  # support --undefined.  This deserves some investigation.  FIXME
7057	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7058	else
7059	  _LT_TAGVAR(ld_shlibs, $1)=no
7060	fi
7061	;;
7062
7063      chorus*)
7064        case $cc_basename in
7065          *)
7066	  # FIXME: insert proper C++ library support
7067	  _LT_TAGVAR(ld_shlibs, $1)=no
7068	  ;;
7069        esac
7070        ;;
7071
7072      cygwin* | mingw* | pw32* | cegcc*)
7073	case $GXX,$cc_basename in
7074	,cl* | no,cl* | ,icl* | no,icl*)
7075	  # Native MSVC or ICC
7076	  # hardcode_libdir_flag_spec is actually meaningless, as there is
7077	  # no search path for DLLs.
7078	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7079	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7080	  _LT_TAGVAR(always_export_symbols, $1)=yes
7081	  _LT_TAGVAR(file_list_spec, $1)='@'
7082	  # Tell ltmain to make .lib files, not .a files.
7083	  libext=lib
7084	  # Tell ltmain to make .dll files, not .so files.
7085	  shrext_cmds=.dll
7086	  # FIXME: Setting linknames here is a bad hack.
7087	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
7088	  _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
7089              cp "$export_symbols" "$output_objdir/$soname.def";
7090              echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
7091            else
7092              $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
7093            fi~
7094            $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
7095            linknames='
7096	  # The linker will not automatically build a static lib if we build a DLL.
7097	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7098	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7099	  # Don't use ranlib
7100	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
7101	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
7102            lt_tool_outputfile="@TOOL_OUTPUT@"~
7103            case $lt_outputfile in
7104              *.exe|*.EXE) ;;
7105              *)
7106                lt_outputfile=$lt_outputfile.exe
7107                lt_tool_outputfile=$lt_tool_outputfile.exe
7108                ;;
7109            esac~
7110            func_to_tool_file "$lt_outputfile"~
7111            if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
7112              $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
7113              $RM "$lt_outputfile.manifest";
7114            fi'
7115	  ;;
7116	*)
7117	  # g++
7118	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7119	  # as there is no search path for DLLs.
7120	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7121	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
7122	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7123	  _LT_TAGVAR(always_export_symbols, $1)=no
7124	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7125
7126	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
7127	    _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'
7128	    # If the export-symbols file already is a .def file, use it as
7129	    # is; otherwise, prepend EXPORTS...
7130	    _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
7131              cp $export_symbols $output_objdir/$soname.def;
7132            else
7133              echo EXPORTS > $output_objdir/$soname.def;
7134              cat $export_symbols >> $output_objdir/$soname.def;
7135            fi~
7136            $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'
7137	  else
7138	    _LT_TAGVAR(ld_shlibs, $1)=no
7139	  fi
7140	  ;;
7141	esac
7142	;;
7143      darwin* | rhapsody*)
7144        _LT_DARWIN_LINKER_FEATURES($1)
7145	;;
7146
7147      os2*)
7148	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7149	_LT_TAGVAR(hardcode_minus_L, $1)=yes
7150	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7151	shrext_cmds=.dll
7152	_LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
7153	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
7154	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
7155	  $ECHO EXPORTS >> $output_objdir/$libname.def~
7156	  emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
7157	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
7158	  emximp -o $lib $output_objdir/$libname.def'
7159	_LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
7160	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
7161	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
7162	  $ECHO EXPORTS >> $output_objdir/$libname.def~
7163	  prefix_cmds="$SED"~
7164	  if test EXPORTS = "`$SED 1q $export_symbols`"; then
7165	    prefix_cmds="$prefix_cmds -e 1d";
7166	  fi~
7167	  prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
7168	  cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
7169	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
7170	  emximp -o $lib $output_objdir/$libname.def'
7171	_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
7172	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7173	_LT_TAGVAR(file_list_spec, $1)='@'
7174	;;
7175
7176      dgux*)
7177        case $cc_basename in
7178          ec++*)
7179	    # FIXME: insert proper C++ library support
7180	    _LT_TAGVAR(ld_shlibs, $1)=no
7181	    ;;
7182          ghcx*)
7183	    # Green Hills C++ Compiler
7184	    # FIXME: insert proper C++ library support
7185	    _LT_TAGVAR(ld_shlibs, $1)=no
7186	    ;;
7187          *)
7188	    # FIXME: insert proper C++ library support
7189	    _LT_TAGVAR(ld_shlibs, $1)=no
7190	    ;;
7191        esac
7192        ;;
7193
7194      freebsd2.*)
7195        # C++ shared libraries reported to be fairly broken before
7196	# switch to ELF
7197        _LT_TAGVAR(ld_shlibs, $1)=no
7198        ;;
7199
7200      freebsd-elf*)
7201        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7202        ;;
7203
7204      freebsd* | dragonfly* | midnightbsd*)
7205        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
7206        # conventions
7207        _LT_TAGVAR(ld_shlibs, $1)=yes
7208        ;;
7209
7210      haiku*)
7211        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7212        _LT_TAGVAR(link_all_deplibs, $1)=yes
7213        ;;
7214
7215      hpux9*)
7216        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
7217        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7218        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
7219        _LT_TAGVAR(hardcode_direct, $1)=yes
7220        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7221				             # but as the default
7222				             # location of the library.
7223
7224        case $cc_basename in
7225          CC*)
7226            # FIXME: insert proper C++ library support
7227            _LT_TAGVAR(ld_shlibs, $1)=no
7228            ;;
7229          aCC*)
7230            _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'
7231            # Commands to make compiler produce verbose output that lists
7232            # what "hidden" libraries, object files and flags are used when
7233            # linking a shared library.
7234            #
7235            # There doesn't appear to be a way to prevent this compiler from
7236            # explicitly linking system object files so we need to strip them
7237            # from the output so that they don't get included in the library
7238            # dependencies.
7239            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"'
7240            ;;
7241          *)
7242            if test yes = "$GXX"; then
7243              _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'
7244            else
7245              # FIXME: insert proper C++ library support
7246              _LT_TAGVAR(ld_shlibs, $1)=no
7247            fi
7248            ;;
7249        esac
7250        ;;
7251
7252      hpux10*|hpux11*)
7253        if test no = "$with_gnu_ld"; then
7254	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
7255	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7256
7257          case $host_cpu in
7258            hppa*64*|ia64*)
7259              ;;
7260            *)
7261	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
7262              ;;
7263          esac
7264        fi
7265        case $host_cpu in
7266          hppa*64*|ia64*)
7267            _LT_TAGVAR(hardcode_direct, $1)=no
7268            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7269            ;;
7270          *)
7271            _LT_TAGVAR(hardcode_direct, $1)=yes
7272            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7273            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7274					         # but as the default
7275					         # location of the library.
7276            ;;
7277        esac
7278
7279        case $cc_basename in
7280          CC*)
7281	    # FIXME: insert proper C++ library support
7282	    _LT_TAGVAR(ld_shlibs, $1)=no
7283	    ;;
7284          aCC*)
7285	    case $host_cpu in
7286	      hppa*64*)
7287	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7288	        ;;
7289	      ia64*)
7290	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7291	        ;;
7292	      *)
7293	        _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'
7294	        ;;
7295	    esac
7296	    # Commands to make compiler produce verbose output that lists
7297	    # what "hidden" libraries, object files and flags are used when
7298	    # linking a shared library.
7299	    #
7300	    # There doesn't appear to be a way to prevent this compiler from
7301	    # explicitly linking system object files so we need to strip them
7302	    # from the output so that they don't get included in the library
7303	    # dependencies.
7304	    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"'
7305	    ;;
7306          *)
7307	    if test yes = "$GXX"; then
7308	      if test no = "$with_gnu_ld"; then
7309	        case $host_cpu in
7310	          hppa*64*)
7311	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7312	            ;;
7313	          ia64*)
7314	            _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'
7315	            ;;
7316	          *)
7317	            _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'
7318	            ;;
7319	        esac
7320	      fi
7321	    else
7322	      # FIXME: insert proper C++ library support
7323	      _LT_TAGVAR(ld_shlibs, $1)=no
7324	    fi
7325	    ;;
7326        esac
7327        ;;
7328
7329      interix[[3-9]]*)
7330	_LT_TAGVAR(hardcode_direct, $1)=no
7331	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7332	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7333	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
7334	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7335	# Instead, shared libraries are loaded at an image base (0x10000000 by
7336	# default) and relocated if they conflict, which is a slow very memory
7337	# consuming and fragmenting process.  To avoid this, we pick a random,
7338	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7339	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
7340	_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'
7341	_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'
7342	;;
7343      irix5* | irix6*)
7344        case $cc_basename in
7345          CC*)
7346	    # SGI C++
7347	    _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'
7348
7349	    # Archives containing C++ object files must be created using
7350	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
7351	    # necessary to make sure instantiated templates are included
7352	    # in the archive.
7353	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
7354	    ;;
7355          *)
7356	    if test yes = "$GXX"; then
7357	      if test no = "$with_gnu_ld"; then
7358	        _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'
7359	      else
7360	        _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'
7361	      fi
7362	    fi
7363	    _LT_TAGVAR(link_all_deplibs, $1)=yes
7364	    ;;
7365        esac
7366        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7367        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7368        _LT_TAGVAR(inherit_rpath, $1)=yes
7369        ;;
7370
7371      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
7372        case $cc_basename in
7373          KCC*)
7374	    # Kuck and Associates, Inc. (KAI) C++ Compiler
7375
7376	    # KCC will only create a shared library if the output file
7377	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
7378	    # to its proper name (with version) after linking.
7379	    _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'
7380	    _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'
7381	    # Commands to make compiler produce verbose output that lists
7382	    # what "hidden" libraries, object files and flags are used when
7383	    # linking a shared library.
7384	    #
7385	    # There doesn't appear to be a way to prevent this compiler from
7386	    # explicitly linking system object files so we need to strip them
7387	    # from the output so that they don't get included in the library
7388	    # dependencies.
7389	    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"'
7390
7391	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7392	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7393
7394	    # Archives containing C++ object files must be created using
7395	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
7396	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
7397	    ;;
7398	  icpc* | ecpc* )
7399	    # Intel C++
7400	    with_gnu_ld=yes
7401	    # version 8.0 and above of icpc choke on multiply defined symbols
7402	    # if we add $predep_objects and $postdep_objects, however 7.1 and
7403	    # earlier do not add the objects themselves.
7404	    case `$CC -V 2>&1` in
7405	      *"Version 7."*)
7406	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7407		_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'
7408		;;
7409	      *)  # Version 8.0 or newer
7410	        tmp_idyn=
7411	        case $host_cpu in
7412		  ia64*) tmp_idyn=' -i_dynamic';;
7413		esac
7414	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7415		_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'
7416		;;
7417	    esac
7418	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7419	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7420	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7421	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
7422	    ;;
7423          pgCC* | pgcpp*)
7424            # Portland Group C++ compiler
7425	    case `$CC -V` in
7426	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
7427	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7428               rm -rf $tpldir~
7429               $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7430               compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
7431	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7432                rm -rf $tpldir~
7433                $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7434                $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
7435                $RANLIB $oldlib'
7436	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7437                rm -rf $tpldir~
7438                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7439                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7440	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7441                rm -rf $tpldir~
7442                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7443                $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'
7444	      ;;
7445	    *) # Version 6 and above use weak symbols
7446	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7447	      _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'
7448	      ;;
7449	    esac
7450
7451	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
7452	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7453	    _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'
7454            ;;
7455	  cxx*)
7456	    # Compaq C++
7457	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7458	    _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'
7459
7460	    runpath_var=LD_RUN_PATH
7461	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7462	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7463
7464	    # Commands to make compiler produce verbose output that lists
7465	    # what "hidden" libraries, object files and flags are used when
7466	    # linking a shared library.
7467	    #
7468	    # There doesn't appear to be a way to prevent this compiler from
7469	    # explicitly linking system object files so we need to strip them
7470	    # from the output so that they don't get included in the library
7471	    # dependencies.
7472	    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'
7473	    ;;
7474	  xl* | mpixl* | bgxl*)
7475	    # IBM XL 8.0 on PPC, with GNU ld
7476	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7477	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7478	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7479	    if test yes = "$supports_anon_versioning"; then
7480	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7481                cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7482                echo "local: *; };" >> $output_objdir/$libname.ver~
7483                $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
7484	    fi
7485	    ;;
7486	  *)
7487	    case `$CC -V 2>&1 | $SED 5q` in
7488	    *Sun\ C*)
7489	      # Sun C++ 5.9
7490	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7491	      _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7492	      _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'
7493	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7494	      _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'
7495	      _LT_TAGVAR(compiler_needs_object, $1)=yes
7496
7497	      # Not sure whether something based on
7498	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7499	      # would be better.
7500	      output_verbose_link_cmd='func_echo_all'
7501
7502	      # Archives containing C++ object files must be created using
7503	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7504	      # necessary to make sure instantiated templates are included
7505	      # in the archive.
7506	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7507	      ;;
7508	    esac
7509	    ;;
7510	esac
7511	;;
7512
7513      lynxos*)
7514        # FIXME: insert proper C++ library support
7515	_LT_TAGVAR(ld_shlibs, $1)=no
7516	;;
7517
7518      m88k*)
7519        # FIXME: insert proper C++ library support
7520        _LT_TAGVAR(ld_shlibs, $1)=no
7521	;;
7522
7523      mvs*)
7524        case $cc_basename in
7525          cxx*)
7526	    # FIXME: insert proper C++ library support
7527	    _LT_TAGVAR(ld_shlibs, $1)=no
7528	    ;;
7529	  *)
7530	    # FIXME: insert proper C++ library support
7531	    _LT_TAGVAR(ld_shlibs, $1)=no
7532	    ;;
7533	esac
7534	;;
7535
7536      netbsd*)
7537        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7538	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7539	  wlarc=
7540	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7541	  _LT_TAGVAR(hardcode_direct, $1)=yes
7542	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7543	fi
7544	# Workaround some broken pre-1.5 toolchains
7545	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7546	;;
7547
7548      *nto* | *qnx*)
7549        _LT_TAGVAR(ld_shlibs, $1)=yes
7550	;;
7551
7552      openbsd* | bitrig*)
7553	if test -f /usr/libexec/ld.so; then
7554	  _LT_TAGVAR(hardcode_direct, $1)=yes
7555	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7556	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7557	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7558	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7559	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
7560	    _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'
7561	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
7562	    _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
7563	  fi
7564	  output_verbose_link_cmd=func_echo_all
7565	else
7566	  _LT_TAGVAR(ld_shlibs, $1)=no
7567	fi
7568	;;
7569
7570      osf3* | osf4* | osf5*)
7571        case $cc_basename in
7572          KCC*)
7573	    # Kuck and Associates, Inc. (KAI) C++ Compiler
7574
7575	    # KCC will only create a shared library if the output file
7576	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
7577	    # to its proper name (with version) after linking.
7578	    _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'
7579
7580	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7581	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7582
7583	    # Archives containing C++ object files must be created using
7584	    # the KAI C++ compiler.
7585	    case $host in
7586	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7587	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7588	    esac
7589	    ;;
7590          RCC*)
7591	    # Rational C++ 2.4.1
7592	    # FIXME: insert proper C++ library support
7593	    _LT_TAGVAR(ld_shlibs, $1)=no
7594	    ;;
7595          cxx*)
7596	    case $host in
7597	      osf3*)
7598	        _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7599	        _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'
7600	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7601		;;
7602	      *)
7603	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7604	        _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'
7605	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7606                  echo "-hidden">> $lib.exp~
7607                  $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~
7608                  $RM $lib.exp'
7609	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7610		;;
7611	    esac
7612
7613	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7614
7615	    # Commands to make compiler produce verbose output that lists
7616	    # what "hidden" libraries, object files and flags are used when
7617	    # linking a shared library.
7618	    #
7619	    # There doesn't appear to be a way to prevent this compiler from
7620	    # explicitly linking system object files so we need to strip them
7621	    # from the output so that they don't get included in the library
7622	    # dependencies.
7623	    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"'
7624	    ;;
7625	  *)
7626	    if test yes,no = "$GXX,$with_gnu_ld"; then
7627	      _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7628	      case $host in
7629	        osf3*)
7630	          _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'
7631		  ;;
7632	        *)
7633	          _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'
7634		  ;;
7635	      esac
7636
7637	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7638	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7639
7640	      # Commands to make compiler produce verbose output that lists
7641	      # what "hidden" libraries, object files and flags are used when
7642	      # linking a shared library.
7643	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7644
7645	    else
7646	      # FIXME: insert proper C++ library support
7647	      _LT_TAGVAR(ld_shlibs, $1)=no
7648	    fi
7649	    ;;
7650        esac
7651        ;;
7652
7653      psos*)
7654        # FIXME: insert proper C++ library support
7655        _LT_TAGVAR(ld_shlibs, $1)=no
7656        ;;
7657
7658      sunos4*)
7659        case $cc_basename in
7660          CC*)
7661	    # Sun C++ 4.x
7662	    # FIXME: insert proper C++ library support
7663	    _LT_TAGVAR(ld_shlibs, $1)=no
7664	    ;;
7665          lcc*)
7666	    # Lucid
7667	    # FIXME: insert proper C++ library support
7668	    _LT_TAGVAR(ld_shlibs, $1)=no
7669	    ;;
7670          *)
7671	    # FIXME: insert proper C++ library support
7672	    _LT_TAGVAR(ld_shlibs, $1)=no
7673	    ;;
7674        esac
7675        ;;
7676
7677      solaris*)
7678        case $cc_basename in
7679          CC* | sunCC*)
7680	    # Sun C++ 4.2, 5.x and Centerline C++
7681            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7682	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7683	    _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7684	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7685              $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'
7686
7687	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7688	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7689	    case $host_os in
7690	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7691	      *)
7692		# The compiler driver will combine and reorder linker options,
7693		# but understands '-z linker_flag'.
7694	        # Supported since Solaris 2.6 (maybe 2.5.1?)
7695		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7696	        ;;
7697	    esac
7698	    _LT_TAGVAR(link_all_deplibs, $1)=yes
7699
7700	    output_verbose_link_cmd='func_echo_all'
7701
7702	    # Archives containing C++ object files must be created using
7703	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7704	    # necessary to make sure instantiated templates are included
7705	    # in the archive.
7706	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7707	    ;;
7708          gcx*)
7709	    # Green Hills C++ Compiler
7710	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7711
7712	    # The C++ compiler must be used to create the archive.
7713	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7714	    ;;
7715          *)
7716	    # GNU C++ compiler with Solaris linker
7717	    if test yes,no = "$GXX,$with_gnu_ld"; then
7718	      _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
7719	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7720	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7721	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7722                  $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'
7723
7724	        # Commands to make compiler produce verbose output that lists
7725	        # what "hidden" libraries, object files and flags are used when
7726	        # linking a shared library.
7727	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7728	      else
7729	        # g++ 2.7 appears to require '-G' NOT '-shared' on this
7730	        # platform.
7731	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7732	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7733                  $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'
7734
7735	        # Commands to make compiler produce verbose output that lists
7736	        # what "hidden" libraries, object files and flags are used when
7737	        # linking a shared library.
7738	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7739	      fi
7740
7741	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
7742	      case $host_os in
7743		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7744		*)
7745		  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
7746		  ;;
7747	      esac
7748	    fi
7749	    ;;
7750        esac
7751        ;;
7752
7753    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7754      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
7755      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7756      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7757      runpath_var='LD_RUN_PATH'
7758
7759      case $cc_basename in
7760        CC*)
7761	  _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7762	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7763	  ;;
7764	*)
7765	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7766	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7767	  ;;
7768      esac
7769      ;;
7770
7771      sysv5* | sco3.2v5* | sco5v6*)
7772	# Note: We CANNOT use -z defs as we might desire, because we do not
7773	# link with -lc, and that would cause any symbols used from libc to
7774	# always be unresolved, which means just about no library would
7775	# ever link correctly.  If we're not using GNU ld we use -z text
7776	# though, which does catch some bad symbols but isn't as heavy-handed
7777	# as -z defs.
7778	_LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
7779	_LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
7780	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7781	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7782	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
7783	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7784	_LT_TAGVAR(link_all_deplibs, $1)=yes
7785	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
7786	runpath_var='LD_RUN_PATH'
7787
7788	case $cc_basename in
7789          CC*)
7790	    _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7791	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7792	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
7793              '"$_LT_TAGVAR(old_archive_cmds, $1)"
7794	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
7795              '"$_LT_TAGVAR(reload_cmds, $1)"
7796	    ;;
7797	  *)
7798	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7799	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7800	    ;;
7801	esac
7802      ;;
7803
7804      tandem*)
7805        case $cc_basename in
7806          NCC*)
7807	    # NonStop-UX NCC 3.20
7808	    # FIXME: insert proper C++ library support
7809	    _LT_TAGVAR(ld_shlibs, $1)=no
7810	    ;;
7811          *)
7812	    # FIXME: insert proper C++ library support
7813	    _LT_TAGVAR(ld_shlibs, $1)=no
7814	    ;;
7815        esac
7816        ;;
7817
7818      vxworks*)
7819        # FIXME: insert proper C++ library support
7820        _LT_TAGVAR(ld_shlibs, $1)=no
7821        ;;
7822
7823      *)
7824        # FIXME: insert proper C++ library support
7825        _LT_TAGVAR(ld_shlibs, $1)=no
7826        ;;
7827    esac
7828
7829    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7830    test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
7831
7832    _LT_TAGVAR(GCC, $1)=$GXX
7833    _LT_TAGVAR(LD, $1)=$LD
7834
7835    ## CAVEAT EMPTOR:
7836    ## There is no encapsulation within the following macros, do not change
7837    ## the running order or otherwise move them around unless you know exactly
7838    ## what you are doing...
7839    _LT_SYS_HIDDEN_LIBDEPS($1)
7840    _LT_COMPILER_PIC($1)
7841    _LT_COMPILER_C_O($1)
7842    _LT_COMPILER_FILE_LOCKS($1)
7843    _LT_LINKER_SHLIBS($1)
7844    _LT_SYS_DYNAMIC_LINKER($1)
7845    _LT_LINKER_HARDCODE_LIBPATH($1)
7846
7847    _LT_CONFIG($1)
7848  fi # test -n "$compiler"
7849
7850  CC=$lt_save_CC
7851  CFLAGS=$lt_save_CFLAGS
7852  LDCXX=$LD
7853  LD=$lt_save_LD
7854  GCC=$lt_save_GCC
7855  with_gnu_ld=$lt_save_with_gnu_ld
7856  lt_cv_path_LDCXX=$lt_cv_path_LD
7857  lt_cv_path_LD=$lt_save_path_LD
7858  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7859  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7860fi # test yes != "$_lt_caught_CXX_error"
7861
7862AC_LANG_POP
7863])# _LT_LANG_CXX_CONFIG
7864
7865
7866# _LT_FUNC_STRIPNAME_CNF
7867# ----------------------
7868# func_stripname_cnf prefix suffix name
7869# strip PREFIX and SUFFIX off of NAME.
7870# PREFIX and SUFFIX must not contain globbing or regex special
7871# characters, hashes, percent signs, but SUFFIX may contain a leading
7872# dot (in which case that matches only a dot).
7873#
7874# This function is identical to the (non-XSI) version of func_stripname,
7875# except this one can be used by m4 code that may be executed by configure,
7876# rather than the libtool script.
7877m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
7878AC_REQUIRE([_LT_DECL_SED])
7879AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
7880func_stripname_cnf ()
7881{
7882  case @S|@2 in
7883  .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
7884  *)  func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
7885  esac
7886} # func_stripname_cnf
7887])# _LT_FUNC_STRIPNAME_CNF
7888
7889
7890# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7891# ---------------------------------
7892# Figure out "hidden" library dependencies from verbose
7893# compiler output when linking a shared library.
7894# Parse the compiler output and extract the necessary
7895# objects, libraries and library flags.
7896m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7897[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7898AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
7899# Dependencies to place before and after the object being linked:
7900_LT_TAGVAR(predep_objects, $1)=
7901_LT_TAGVAR(postdep_objects, $1)=
7902_LT_TAGVAR(predeps, $1)=
7903_LT_TAGVAR(postdeps, $1)=
7904_LT_TAGVAR(compiler_lib_search_path, $1)=
7905
7906dnl we can't use the lt_simple_compile_test_code here,
7907dnl because it contains code intended for an executable,
7908dnl not a library.  It's possible we should let each
7909dnl tag define a new lt_????_link_test_code variable,
7910dnl but it's only used here...
7911m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7912int a;
7913void foo (void) { a = 0; }
7914_LT_EOF
7915], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7916class Foo
7917{
7918public:
7919  Foo (void) { a = 0; }
7920private:
7921  int a;
7922};
7923_LT_EOF
7924], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7925      subroutine foo
7926      implicit none
7927      integer*4 a
7928      a=0
7929      return
7930      end
7931_LT_EOF
7932], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7933      subroutine foo
7934      implicit none
7935      integer a
7936      a=0
7937      return
7938      end
7939_LT_EOF
7940], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7941public class foo {
7942  private int a;
7943  public void bar (void) {
7944    a = 0;
7945  }
7946};
7947_LT_EOF
7948], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
7949package foo
7950func foo() {
7951}
7952_LT_EOF
7953])
7954
7955_lt_libdeps_save_CFLAGS=$CFLAGS
7956case "$CC $CFLAGS " in #(
7957*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
7958*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
7959*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
7960esac
7961
7962dnl Parse the compiler output and extract the necessary
7963dnl objects, libraries and library flags.
7964if AC_TRY_EVAL(ac_compile); then
7965  # Parse the compiler output and extract the necessary
7966  # objects, libraries and library flags.
7967
7968  # Sentinel used to keep track of whether or not we are before
7969  # the conftest object file.
7970  pre_test_object_deps_done=no
7971
7972  for p in `eval "$output_verbose_link_cmd"`; do
7973    case $prev$p in
7974
7975    -L* | -R* | -l*)
7976       # Some compilers place space between "-{L,R}" and the path.
7977       # Remove the space.
7978       if test x-L = "$p" ||
7979          test x-R = "$p"; then
7980	 prev=$p
7981	 continue
7982       fi
7983
7984       # Expand the sysroot to ease extracting the directories later.
7985       if test -z "$prev"; then
7986         case $p in
7987         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
7988         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
7989         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
7990         esac
7991       fi
7992       case $p in
7993       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
7994       esac
7995       if test no = "$pre_test_object_deps_done"; then
7996	 case $prev in
7997	 -L | -R)
7998	   # Internal compiler library paths should come after those
7999	   # provided the user.  The postdeps already come after the
8000	   # user supplied libs so there is no need to process them.
8001	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
8002	     _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
8003	   else
8004	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
8005	   fi
8006	   ;;
8007	 # The "-l" case would never come before the object being
8008	 # linked, so don't bother handling this case.
8009	 esac
8010       else
8011	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
8012	   _LT_TAGVAR(postdeps, $1)=$prev$p
8013	 else
8014	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
8015	 fi
8016       fi
8017       prev=
8018       ;;
8019
8020    *.lto.$objext) ;; # Ignore GCC LTO objects
8021    *.$objext)
8022       # This assumes that the test object file only shows up
8023       # once in the compiler output.
8024       if test "$p" = "conftest.$objext"; then
8025	 pre_test_object_deps_done=yes
8026	 continue
8027       fi
8028
8029       if test no = "$pre_test_object_deps_done"; then
8030	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
8031	   _LT_TAGVAR(predep_objects, $1)=$p
8032	 else
8033	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
8034	 fi
8035       else
8036	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
8037	   _LT_TAGVAR(postdep_objects, $1)=$p
8038	 else
8039	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
8040	 fi
8041       fi
8042       ;;
8043
8044    *) ;; # Ignore the rest.
8045
8046    esac
8047  done
8048
8049  # Clean up.
8050  rm -f a.out a.exe
8051else
8052  echo "libtool.m4: error: problem compiling $1 test program"
8053fi
8054
8055$RM -f confest.$objext
8056CFLAGS=$_lt_libdeps_save_CFLAGS
8057
8058# PORTME: override above test on systems where it is broken
8059m4_if([$1], [CXX],
8060[case $host_os in
8061interix[[3-9]]*)
8062  # Interix 3.5 installs completely hosed .la files for C++, so rather than
8063  # hack all around it, let's just trust "g++" to DTRT.
8064  _LT_TAGVAR(predep_objects,$1)=
8065  _LT_TAGVAR(postdep_objects,$1)=
8066  _LT_TAGVAR(postdeps,$1)=
8067  ;;
8068esac
8069])
8070
8071case " $_LT_TAGVAR(postdeps, $1) " in
8072*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
8073esac
8074 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
8075if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
8076 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
8077fi
8078_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
8079    [The directories searched by this compiler when creating a shared library])
8080_LT_TAGDECL([], [predep_objects], [1],
8081    [Dependencies to place before and after the objects being linked to
8082    create a shared library])
8083_LT_TAGDECL([], [postdep_objects], [1])
8084_LT_TAGDECL([], [predeps], [1])
8085_LT_TAGDECL([], [postdeps], [1])
8086_LT_TAGDECL([], [compiler_lib_search_path], [1],
8087    [The library search path used internally by the compiler when linking
8088    a shared library])
8089])# _LT_SYS_HIDDEN_LIBDEPS
8090
8091
8092# _LT_LANG_F77_CONFIG([TAG])
8093# --------------------------
8094# Ensure that the configuration variables for a Fortran 77 compiler are
8095# suitably defined.  These variables are subsequently used by _LT_CONFIG
8096# to write the compiler configuration to 'libtool'.
8097m4_defun([_LT_LANG_F77_CONFIG],
8098[AC_LANG_PUSH(Fortran 77)
8099if test -z "$F77" || test no = "$F77"; then
8100  _lt_disable_F77=yes
8101fi
8102
8103_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8104_LT_TAGVAR(allow_undefined_flag, $1)=
8105_LT_TAGVAR(always_export_symbols, $1)=no
8106_LT_TAGVAR(archive_expsym_cmds, $1)=
8107_LT_TAGVAR(export_dynamic_flag_spec, $1)=
8108_LT_TAGVAR(hardcode_direct, $1)=no
8109_LT_TAGVAR(hardcode_direct_absolute, $1)=no
8110_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8111_LT_TAGVAR(hardcode_libdir_separator, $1)=
8112_LT_TAGVAR(hardcode_minus_L, $1)=no
8113_LT_TAGVAR(hardcode_automatic, $1)=no
8114_LT_TAGVAR(inherit_rpath, $1)=no
8115_LT_TAGVAR(module_cmds, $1)=
8116_LT_TAGVAR(module_expsym_cmds, $1)=
8117_LT_TAGVAR(link_all_deplibs, $1)=unknown
8118_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8119_LT_TAGVAR(reload_flag, $1)=$reload_flag
8120_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8121_LT_TAGVAR(no_undefined_flag, $1)=
8122_LT_TAGVAR(whole_archive_flag_spec, $1)=
8123_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8124
8125# Source file extension for f77 test sources.
8126ac_ext=f
8127
8128# Object file extension for compiled f77 test sources.
8129objext=o
8130_LT_TAGVAR(objext, $1)=$objext
8131
8132# No sense in running all these tests if we already determined that
8133# the F77 compiler isn't working.  Some variables (like enable_shared)
8134# are currently assumed to apply to all compilers on this platform,
8135# and will be corrupted by setting them based on a non-working compiler.
8136if test yes != "$_lt_disable_F77"; then
8137  # Code to be used in simple compile tests
8138  lt_simple_compile_test_code="\
8139      subroutine t
8140      return
8141      end
8142"
8143
8144  # Code to be used in simple link tests
8145  lt_simple_link_test_code="\
8146      program t
8147      end
8148"
8149
8150  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8151  _LT_TAG_COMPILER
8152
8153  # save warnings/boilerplate of simple test code
8154  _LT_COMPILER_BOILERPLATE
8155  _LT_LINKER_BOILERPLATE
8156
8157  # Allow CC to be a program name with arguments.
8158  lt_save_CC=$CC
8159  lt_save_GCC=$GCC
8160  lt_save_CFLAGS=$CFLAGS
8161  CC=${F77-"f77"}
8162  CFLAGS=$FFLAGS
8163  compiler=$CC
8164  _LT_TAGVAR(compiler, $1)=$CC
8165  _LT_CC_BASENAME([$compiler])
8166  GCC=$G77
8167  if test -n "$compiler"; then
8168    AC_MSG_CHECKING([if libtool supports shared libraries])
8169    AC_MSG_RESULT([$can_build_shared])
8170
8171    AC_MSG_CHECKING([whether to build shared libraries])
8172    test no = "$can_build_shared" && enable_shared=no
8173
8174    # On AIX, shared libraries and static libraries use the same namespace, and
8175    # are all built from PIC.
8176    case $host_os in
8177      aix3*)
8178        test yes = "$enable_shared" && enable_static=no
8179        if test -n "$RANLIB"; then
8180          archive_cmds="$archive_cmds~\$RANLIB \$lib"
8181          postinstall_cmds='$RANLIB $lib'
8182        fi
8183        ;;
8184      aix[[4-9]]*)
8185	if test ia64 != "$host_cpu"; then
8186	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
8187	  yes,aix,yes) ;;		# shared object as lib.so file only
8188	  yes,svr4,*) ;;		# shared object as lib.so archive member only
8189	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
8190	  esac
8191	fi
8192        ;;
8193    esac
8194    AC_MSG_RESULT([$enable_shared])
8195
8196    AC_MSG_CHECKING([whether to build static libraries])
8197    # Make sure either enable_shared or enable_static is yes.
8198    test yes = "$enable_shared" || enable_static=yes
8199    AC_MSG_RESULT([$enable_static])
8200
8201    _LT_TAGVAR(GCC, $1)=$G77
8202    _LT_TAGVAR(LD, $1)=$LD
8203
8204    ## CAVEAT EMPTOR:
8205    ## There is no encapsulation within the following macros, do not change
8206    ## the running order or otherwise move them around unless you know exactly
8207    ## what you are doing...
8208    _LT_COMPILER_PIC($1)
8209    _LT_COMPILER_C_O($1)
8210    _LT_COMPILER_FILE_LOCKS($1)
8211    _LT_LINKER_SHLIBS($1)
8212    _LT_SYS_DYNAMIC_LINKER($1)
8213    _LT_LINKER_HARDCODE_LIBPATH($1)
8214
8215    _LT_CONFIG($1)
8216  fi # test -n "$compiler"
8217
8218  GCC=$lt_save_GCC
8219  CC=$lt_save_CC
8220  CFLAGS=$lt_save_CFLAGS
8221fi # test yes != "$_lt_disable_F77"
8222
8223AC_LANG_POP
8224])# _LT_LANG_F77_CONFIG
8225
8226
8227# _LT_LANG_FC_CONFIG([TAG])
8228# -------------------------
8229# Ensure that the configuration variables for a Fortran compiler are
8230# suitably defined.  These variables are subsequently used by _LT_CONFIG
8231# to write the compiler configuration to 'libtool'.
8232m4_defun([_LT_LANG_FC_CONFIG],
8233[AC_LANG_PUSH(Fortran)
8234
8235if test -z "$FC" || test no = "$FC"; then
8236  _lt_disable_FC=yes
8237fi
8238
8239_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8240_LT_TAGVAR(allow_undefined_flag, $1)=
8241_LT_TAGVAR(always_export_symbols, $1)=no
8242_LT_TAGVAR(archive_expsym_cmds, $1)=
8243_LT_TAGVAR(export_dynamic_flag_spec, $1)=
8244_LT_TAGVAR(hardcode_direct, $1)=no
8245_LT_TAGVAR(hardcode_direct_absolute, $1)=no
8246_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8247_LT_TAGVAR(hardcode_libdir_separator, $1)=
8248_LT_TAGVAR(hardcode_minus_L, $1)=no
8249_LT_TAGVAR(hardcode_automatic, $1)=no
8250_LT_TAGVAR(inherit_rpath, $1)=no
8251_LT_TAGVAR(module_cmds, $1)=
8252_LT_TAGVAR(module_expsym_cmds, $1)=
8253_LT_TAGVAR(link_all_deplibs, $1)=unknown
8254_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8255_LT_TAGVAR(reload_flag, $1)=$reload_flag
8256_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8257_LT_TAGVAR(no_undefined_flag, $1)=
8258_LT_TAGVAR(whole_archive_flag_spec, $1)=
8259_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8260
8261# Source file extension for fc test sources.
8262ac_ext=${ac_fc_srcext-f}
8263
8264# Object file extension for compiled fc test sources.
8265objext=o
8266_LT_TAGVAR(objext, $1)=$objext
8267
8268# No sense in running all these tests if we already determined that
8269# the FC compiler isn't working.  Some variables (like enable_shared)
8270# are currently assumed to apply to all compilers on this platform,
8271# and will be corrupted by setting them based on a non-working compiler.
8272if test yes != "$_lt_disable_FC"; then
8273  # Code to be used in simple compile tests
8274  lt_simple_compile_test_code="\
8275      subroutine t
8276      return
8277      end
8278"
8279
8280  # Code to be used in simple link tests
8281  lt_simple_link_test_code="\
8282      program t
8283      end
8284"
8285
8286  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8287  _LT_TAG_COMPILER
8288
8289  # save warnings/boilerplate of simple test code
8290  _LT_COMPILER_BOILERPLATE
8291  _LT_LINKER_BOILERPLATE
8292
8293  # Allow CC to be a program name with arguments.
8294  lt_save_CC=$CC
8295  lt_save_GCC=$GCC
8296  lt_save_CFLAGS=$CFLAGS
8297  CC=${FC-"f95"}
8298  CFLAGS=$FCFLAGS
8299  compiler=$CC
8300  GCC=$ac_cv_fc_compiler_gnu
8301
8302  _LT_TAGVAR(compiler, $1)=$CC
8303  _LT_CC_BASENAME([$compiler])
8304
8305  if test -n "$compiler"; then
8306    AC_MSG_CHECKING([if libtool supports shared libraries])
8307    AC_MSG_RESULT([$can_build_shared])
8308
8309    AC_MSG_CHECKING([whether to build shared libraries])
8310    test no = "$can_build_shared" && enable_shared=no
8311
8312    # On AIX, shared libraries and static libraries use the same namespace, and
8313    # are all built from PIC.
8314    case $host_os in
8315      aix3*)
8316        test yes = "$enable_shared" && enable_static=no
8317        if test -n "$RANLIB"; then
8318          archive_cmds="$archive_cmds~\$RANLIB \$lib"
8319          postinstall_cmds='$RANLIB $lib'
8320        fi
8321        ;;
8322      aix[[4-9]]*)
8323	if test ia64 != "$host_cpu"; then
8324	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
8325	  yes,aix,yes) ;;		# shared object as lib.so file only
8326	  yes,svr4,*) ;;		# shared object as lib.so archive member only
8327	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
8328	  esac
8329	fi
8330        ;;
8331    esac
8332    AC_MSG_RESULT([$enable_shared])
8333
8334    AC_MSG_CHECKING([whether to build static libraries])
8335    # Make sure either enable_shared or enable_static is yes.
8336    test yes = "$enable_shared" || enable_static=yes
8337    AC_MSG_RESULT([$enable_static])
8338
8339    _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
8340    _LT_TAGVAR(LD, $1)=$LD
8341
8342    ## CAVEAT EMPTOR:
8343    ## There is no encapsulation within the following macros, do not change
8344    ## the running order or otherwise move them around unless you know exactly
8345    ## what you are doing...
8346    _LT_SYS_HIDDEN_LIBDEPS($1)
8347    _LT_COMPILER_PIC($1)
8348    _LT_COMPILER_C_O($1)
8349    _LT_COMPILER_FILE_LOCKS($1)
8350    _LT_LINKER_SHLIBS($1)
8351    _LT_SYS_DYNAMIC_LINKER($1)
8352    _LT_LINKER_HARDCODE_LIBPATH($1)
8353
8354    _LT_CONFIG($1)
8355  fi # test -n "$compiler"
8356
8357  GCC=$lt_save_GCC
8358  CC=$lt_save_CC
8359  CFLAGS=$lt_save_CFLAGS
8360fi # test yes != "$_lt_disable_FC"
8361
8362AC_LANG_POP
8363])# _LT_LANG_FC_CONFIG
8364
8365
8366# _LT_LANG_GCJ_CONFIG([TAG])
8367# --------------------------
8368# Ensure that the configuration variables for the GNU Java Compiler compiler
8369# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8370# to write the compiler configuration to 'libtool'.
8371m4_defun([_LT_LANG_GCJ_CONFIG],
8372[AC_REQUIRE([LT_PROG_GCJ])dnl
8373AC_LANG_SAVE
8374
8375# Source file extension for Java test sources.
8376ac_ext=java
8377
8378# Object file extension for compiled Java test sources.
8379objext=o
8380_LT_TAGVAR(objext, $1)=$objext
8381
8382# Code to be used in simple compile tests
8383lt_simple_compile_test_code="class foo {}"
8384
8385# Code to be used in simple link tests
8386lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
8387
8388# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8389_LT_TAG_COMPILER
8390
8391# save warnings/boilerplate of simple test code
8392_LT_COMPILER_BOILERPLATE
8393_LT_LINKER_BOILERPLATE
8394
8395# Allow CC to be a program name with arguments.
8396lt_save_CC=$CC
8397lt_save_CFLAGS=$CFLAGS
8398lt_save_GCC=$GCC
8399GCC=yes
8400CC=${GCJ-"gcj"}
8401CFLAGS=$GCJFLAGS
8402compiler=$CC
8403_LT_TAGVAR(compiler, $1)=$CC
8404_LT_TAGVAR(LD, $1)=$LD
8405_LT_CC_BASENAME([$compiler])
8406
8407# GCJ did not exist at the time GCC didn't implicitly link libc in.
8408_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8409
8410_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8411_LT_TAGVAR(reload_flag, $1)=$reload_flag
8412_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8413
8414if test -n "$compiler"; then
8415  _LT_COMPILER_NO_RTTI($1)
8416  _LT_COMPILER_PIC($1)
8417  _LT_COMPILER_C_O($1)
8418  _LT_COMPILER_FILE_LOCKS($1)
8419  _LT_LINKER_SHLIBS($1)
8420  _LT_LINKER_HARDCODE_LIBPATH($1)
8421
8422  _LT_CONFIG($1)
8423fi
8424
8425AC_LANG_RESTORE
8426
8427GCC=$lt_save_GCC
8428CC=$lt_save_CC
8429CFLAGS=$lt_save_CFLAGS
8430])# _LT_LANG_GCJ_CONFIG
8431
8432
8433# _LT_LANG_GO_CONFIG([TAG])
8434# --------------------------
8435# Ensure that the configuration variables for the GNU Go compiler
8436# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8437# to write the compiler configuration to 'libtool'.
8438m4_defun([_LT_LANG_GO_CONFIG],
8439[AC_REQUIRE([LT_PROG_GO])dnl
8440AC_LANG_SAVE
8441
8442# Source file extension for Go test sources.
8443ac_ext=go
8444
8445# Object file extension for compiled Go test sources.
8446objext=o
8447_LT_TAGVAR(objext, $1)=$objext
8448
8449# Code to be used in simple compile tests
8450lt_simple_compile_test_code="package main; func main() { }"
8451
8452# Code to be used in simple link tests
8453lt_simple_link_test_code='package main; func main() { }'
8454
8455# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8456_LT_TAG_COMPILER
8457
8458# save warnings/boilerplate of simple test code
8459_LT_COMPILER_BOILERPLATE
8460_LT_LINKER_BOILERPLATE
8461
8462# Allow CC to be a program name with arguments.
8463lt_save_CC=$CC
8464lt_save_CFLAGS=$CFLAGS
8465lt_save_GCC=$GCC
8466GCC=yes
8467CC=${GOC-"gccgo"}
8468CFLAGS=$GOFLAGS
8469compiler=$CC
8470_LT_TAGVAR(compiler, $1)=$CC
8471_LT_TAGVAR(LD, $1)=$LD
8472_LT_CC_BASENAME([$compiler])
8473
8474# Go did not exist at the time GCC didn't implicitly link libc in.
8475_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8476
8477_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8478_LT_TAGVAR(reload_flag, $1)=$reload_flag
8479_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8480
8481if test -n "$compiler"; then
8482  _LT_COMPILER_NO_RTTI($1)
8483  _LT_COMPILER_PIC($1)
8484  _LT_COMPILER_C_O($1)
8485  _LT_COMPILER_FILE_LOCKS($1)
8486  _LT_LINKER_SHLIBS($1)
8487  _LT_LINKER_HARDCODE_LIBPATH($1)
8488
8489  _LT_CONFIG($1)
8490fi
8491
8492AC_LANG_RESTORE
8493
8494GCC=$lt_save_GCC
8495CC=$lt_save_CC
8496CFLAGS=$lt_save_CFLAGS
8497])# _LT_LANG_GO_CONFIG
8498
8499
8500# _LT_LANG_RC_CONFIG([TAG])
8501# -------------------------
8502# Ensure that the configuration variables for the Windows resource compiler
8503# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8504# to write the compiler configuration to 'libtool'.
8505m4_defun([_LT_LANG_RC_CONFIG],
8506[AC_REQUIRE([LT_PROG_RC])dnl
8507AC_LANG_SAVE
8508
8509# Source file extension for RC test sources.
8510ac_ext=rc
8511
8512# Object file extension for compiled RC test sources.
8513objext=o
8514_LT_TAGVAR(objext, $1)=$objext
8515
8516# Code to be used in simple compile tests
8517lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8518
8519# Code to be used in simple link tests
8520lt_simple_link_test_code=$lt_simple_compile_test_code
8521
8522# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8523_LT_TAG_COMPILER
8524
8525# save warnings/boilerplate of simple test code
8526_LT_COMPILER_BOILERPLATE
8527_LT_LINKER_BOILERPLATE
8528
8529# Allow CC to be a program name with arguments.
8530lt_save_CC=$CC
8531lt_save_CFLAGS=$CFLAGS
8532lt_save_GCC=$GCC
8533GCC=
8534CC=${RC-"windres"}
8535CFLAGS=
8536compiler=$CC
8537_LT_TAGVAR(compiler, $1)=$CC
8538_LT_CC_BASENAME([$compiler])
8539_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8540
8541if test -n "$compiler"; then
8542  :
8543  _LT_CONFIG($1)
8544fi
8545
8546GCC=$lt_save_GCC
8547AC_LANG_RESTORE
8548CC=$lt_save_CC
8549CFLAGS=$lt_save_CFLAGS
8550])# _LT_LANG_RC_CONFIG
8551
8552
8553# LT_PROG_GCJ
8554# -----------
8555AC_DEFUN([LT_PROG_GCJ],
8556[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8557  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8558    [AC_CHECK_TOOL(GCJ, gcj,)
8559      test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
8560      AC_SUBST(GCJFLAGS)])])[]dnl
8561])
8562
8563# Old name:
8564AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8565dnl aclocal-1.4 backwards compatibility:
8566dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8567
8568
8569# LT_PROG_GO
8570# ----------
8571AC_DEFUN([LT_PROG_GO],
8572[AC_CHECK_TOOL(GOC, gccgo,)
8573])
8574
8575
8576# LT_PROG_RC
8577# ----------
8578AC_DEFUN([LT_PROG_RC],
8579[AC_CHECK_TOOL(RC, windres,)
8580])
8581
8582# Old name:
8583AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8584dnl aclocal-1.4 backwards compatibility:
8585dnl AC_DEFUN([LT_AC_PROG_RC], [])
8586
8587
8588# _LT_DECL_EGREP
8589# --------------
8590# If we don't have a new enough Autoconf to choose the best grep
8591# available, choose the one first in the user's PATH.
8592m4_defun([_LT_DECL_EGREP],
8593[AC_REQUIRE([AC_PROG_EGREP])dnl
8594AC_REQUIRE([AC_PROG_FGREP])dnl
8595test -z "$GREP" && GREP=grep
8596_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8597_LT_DECL([], [EGREP], [1], [An ERE matcher])
8598_LT_DECL([], [FGREP], [1], [A literal string matcher])
8599dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8600AC_SUBST([GREP])
8601])
8602
8603
8604# _LT_DECL_OBJDUMP
8605# --------------
8606# If we don't have a new enough Autoconf to choose the best objdump
8607# available, choose the one first in the user's PATH.
8608m4_defun([_LT_DECL_OBJDUMP],
8609[AC_CHECK_TOOL(OBJDUMP, objdump, false)
8610test -z "$OBJDUMP" && OBJDUMP=objdump
8611_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8612AC_SUBST([OBJDUMP])
8613])
8614
8615# _LT_DECL_DLLTOOL
8616# ----------------
8617# Ensure DLLTOOL variable is set.
8618m4_defun([_LT_DECL_DLLTOOL],
8619[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8620test -z "$DLLTOOL" && DLLTOOL=dlltool
8621_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
8622AC_SUBST([DLLTOOL])
8623])
8624
8625# _LT_DECL_FILECMD
8626# ----------------
8627# Check for a file(cmd) program that can be used to detect file type and magic
8628m4_defun([_LT_DECL_FILECMD],
8629[AC_CHECK_TOOL([FILECMD], [file], [:])
8630_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types])
8631])# _LD_DECL_FILECMD
8632
8633# _LT_DECL_SED
8634# ------------
8635# Check for a fully-functional sed program, that truncates
8636# as few characters as possible.  Prefer GNU sed if found.
8637m4_defun([_LT_DECL_SED],
8638[AC_PROG_SED
8639test -z "$SED" && SED=sed
8640Xsed="$SED -e 1s/^X//"
8641_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8642_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8643    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8644])# _LT_DECL_SED
8645
8646m4_ifndef([AC_PROG_SED], [
8647# NOTE: This macro has been submitted for inclusion into   #
8648#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
8649#  a released version of Autoconf we should remove this    #
8650#  macro and use it instead.                               #
8651
8652m4_defun([AC_PROG_SED],
8653[AC_MSG_CHECKING([for a sed that does not truncate output])
8654AC_CACHE_VAL(lt_cv_path_SED,
8655[# Loop through the user's path and test for sed and gsed.
8656# Then use that list of sed's as ones to test for truncation.
8657as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8658for as_dir in $PATH
8659do
8660  IFS=$as_save_IFS
8661  test -z "$as_dir" && as_dir=.
8662  for lt_ac_prog in sed gsed; do
8663    for ac_exec_ext in '' $ac_executable_extensions; do
8664      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8665        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8666      fi
8667    done
8668  done
8669done
8670IFS=$as_save_IFS
8671lt_ac_max=0
8672lt_ac_count=0
8673# Add /usr/xpg4/bin/sed as it is typically found on Solaris
8674# along with /bin/sed that truncates output.
8675for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8676  test ! -f "$lt_ac_sed" && continue
8677  cat /dev/null > conftest.in
8678  lt_ac_count=0
8679  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8680  # Check for GNU sed and select it if it is found.
8681  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8682    lt_cv_path_SED=$lt_ac_sed
8683    break
8684  fi
8685  while true; do
8686    cat conftest.in conftest.in >conftest.tmp
8687    mv conftest.tmp conftest.in
8688    cp conftest.in conftest.nl
8689    echo >>conftest.nl
8690    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8691    cmp -s conftest.out conftest.nl || break
8692    # 10000 chars as input seems more than enough
8693    test 10 -lt "$lt_ac_count" && break
8694    lt_ac_count=`expr $lt_ac_count + 1`
8695    if test "$lt_ac_count" -gt "$lt_ac_max"; then
8696      lt_ac_max=$lt_ac_count
8697      lt_cv_path_SED=$lt_ac_sed
8698    fi
8699  done
8700done
8701])
8702SED=$lt_cv_path_SED
8703AC_SUBST([SED])
8704AC_MSG_RESULT([$SED])
8705])#AC_PROG_SED
8706])#m4_ifndef
8707
8708# Old name:
8709AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8710dnl aclocal-1.4 backwards compatibility:
8711dnl AC_DEFUN([LT_AC_PROG_SED], [])
8712
8713
8714# _LT_CHECK_SHELL_FEATURES
8715# ------------------------
8716# Find out whether the shell is Bourne or XSI compatible,
8717# or has some other useful features.
8718m4_defun([_LT_CHECK_SHELL_FEATURES],
8719[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8720  lt_unset=unset
8721else
8722  lt_unset=false
8723fi
8724_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8725
8726# test EBCDIC or ASCII
8727case `echo X|tr X '\101'` in
8728 A) # ASCII based system
8729    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8730  lt_SP2NL='tr \040 \012'
8731  lt_NL2SP='tr \015\012 \040\040'
8732  ;;
8733 *) # EBCDIC based system
8734  lt_SP2NL='tr \100 \n'
8735  lt_NL2SP='tr \r\n \100\100'
8736  ;;
8737esac
8738_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8739_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8740])# _LT_CHECK_SHELL_FEATURES
8741
8742
8743# _LT_PATH_CONVERSION_FUNCTIONS
8744# -----------------------------
8745# Determine what file name conversion functions should be used by
8746# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
8747# for certain cross-compile configurations and native mingw.
8748m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
8749[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8750AC_REQUIRE([AC_CANONICAL_BUILD])dnl
8751AC_MSG_CHECKING([how to convert $build file names to $host format])
8752AC_CACHE_VAL(lt_cv_to_host_file_cmd,
8753[case $host in
8754  *-*-mingw* )
8755    case $build in
8756      *-*-mingw* ) # actually msys
8757        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8758        ;;
8759      *-*-cygwin* )
8760        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8761        ;;
8762      * ) # otherwise, assume *nix
8763        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8764        ;;
8765    esac
8766    ;;
8767  *-*-cygwin* )
8768    case $build in
8769      *-*-mingw* ) # actually msys
8770        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8771        ;;
8772      *-*-cygwin* )
8773        lt_cv_to_host_file_cmd=func_convert_file_noop
8774        ;;
8775      * ) # otherwise, assume *nix
8776        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8777        ;;
8778    esac
8779    ;;
8780  * ) # unhandled hosts (and "normal" native builds)
8781    lt_cv_to_host_file_cmd=func_convert_file_noop
8782    ;;
8783esac
8784])
8785to_host_file_cmd=$lt_cv_to_host_file_cmd
8786AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
8787_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
8788         [0], [convert $build file names to $host format])dnl
8789
8790AC_MSG_CHECKING([how to convert $build file names to toolchain format])
8791AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
8792[#assume ordinary cross tools, or native build.
8793lt_cv_to_tool_file_cmd=func_convert_file_noop
8794case $host in
8795  *-*-mingw* )
8796    case $build in
8797      *-*-mingw* ) # actually msys
8798        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8799        ;;
8800    esac
8801    ;;
8802esac
8803])
8804to_tool_file_cmd=$lt_cv_to_tool_file_cmd
8805AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
8806_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
8807         [0], [convert $build files to toolchain format])dnl
8808])# _LT_PATH_CONVERSION_FUNCTIONS
8809
8810# Helper functions for option handling.                    -*- Autoconf -*-
8811#
8812#   Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free
8813#   Software Foundation, Inc.
8814#   Written by Gary V. Vaughan, 2004
8815#
8816# This file is free software; the Free Software Foundation gives
8817# unlimited permission to copy and/or distribute it, with or without
8818# modifications, as long as this notice is preserved.
8819
8820# serial 8 ltoptions.m4
8821
8822# This is to help aclocal find these macros, as it can't see m4_define.
8823AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
8824
8825
8826# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
8827# ------------------------------------------
8828m4_define([_LT_MANGLE_OPTION],
8829[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
8830
8831
8832# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
8833# ---------------------------------------
8834# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
8835# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
8836# saved as a flag.
8837m4_define([_LT_SET_OPTION],
8838[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
8839m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
8840        _LT_MANGLE_DEFUN([$1], [$2]),
8841    [m4_warning([Unknown $1 option '$2'])])[]dnl
8842])
8843
8844
8845# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
8846# ------------------------------------------------------------
8847# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8848m4_define([_LT_IF_OPTION],
8849[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
8850
8851
8852# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
8853# -------------------------------------------------------
8854# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
8855# are set.
8856m4_define([_LT_UNLESS_OPTIONS],
8857[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8858	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
8859		      [m4_define([$0_found])])])[]dnl
8860m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
8861])[]dnl
8862])
8863
8864
8865# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
8866# ----------------------------------------
8867# OPTION-LIST is a space-separated list of Libtool options associated
8868# with MACRO-NAME.  If any OPTION has a matching handler declared with
8869# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
8870# the unknown option and exit.
8871m4_defun([_LT_SET_OPTIONS],
8872[# Set options
8873m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8874    [_LT_SET_OPTION([$1], _LT_Option)])
8875
8876m4_if([$1],[LT_INIT],[
8877  dnl
8878  dnl Simply set some default values (i.e off) if boolean options were not
8879  dnl specified:
8880  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
8881  ])
8882  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
8883  ])
8884  dnl
8885  dnl If no reference was made to various pairs of opposing options, then
8886  dnl we run the default mode handler for the pair.  For example, if neither
8887  dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
8888  dnl archives by default:
8889  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
8890  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
8891  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
8892  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
8893		   [_LT_ENABLE_FAST_INSTALL])
8894  _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
8895		   [_LT_WITH_AIX_SONAME([aix])])
8896  ])
8897])# _LT_SET_OPTIONS
8898
8899
8900
8901# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
8902# -----------------------------------------
8903m4_define([_LT_MANGLE_DEFUN],
8904[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
8905
8906
8907# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
8908# -----------------------------------------------
8909m4_define([LT_OPTION_DEFINE],
8910[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
8911])# LT_OPTION_DEFINE
8912
8913
8914# dlopen
8915# ------
8916LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
8917])
8918
8919AU_DEFUN([AC_LIBTOOL_DLOPEN],
8920[_LT_SET_OPTION([LT_INIT], [dlopen])
8921AC_DIAGNOSE([obsolete],
8922[$0: Remove this warning and the call to _LT_SET_OPTION when you
8923put the 'dlopen' option into LT_INIT's first parameter.])
8924])
8925
8926dnl aclocal-1.4 backwards compatibility:
8927dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
8928
8929
8930# win32-dll
8931# ---------
8932# Declare package support for building win32 dll's.
8933LT_OPTION_DEFINE([LT_INIT], [win32-dll],
8934[enable_win32_dll=yes
8935
8936case $host in
8937*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
8938  AC_CHECK_TOOL(AS, as, false)
8939  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8940  AC_CHECK_TOOL(OBJDUMP, objdump, false)
8941  ;;
8942esac
8943
8944test -z "$AS" && AS=as
8945_LT_DECL([], [AS],      [1], [Assembler program])dnl
8946
8947test -z "$DLLTOOL" && DLLTOOL=dlltool
8948_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
8949
8950test -z "$OBJDUMP" && OBJDUMP=objdump
8951_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
8952])# win32-dll
8953
8954AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
8955[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8956_LT_SET_OPTION([LT_INIT], [win32-dll])
8957AC_DIAGNOSE([obsolete],
8958[$0: Remove this warning and the call to _LT_SET_OPTION when you
8959put the 'win32-dll' option into LT_INIT's first parameter.])
8960])
8961
8962dnl aclocal-1.4 backwards compatibility:
8963dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
8964
8965
8966# _LT_ENABLE_SHARED([DEFAULT])
8967# ----------------------------
8968# implement the --enable-shared flag, and supports the 'shared' and
8969# 'disable-shared' LT_INIT options.
8970# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
8971m4_define([_LT_ENABLE_SHARED],
8972[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
8973AC_ARG_ENABLE([shared],
8974    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
8975	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
8976    [p=${PACKAGE-default}
8977    case $enableval in
8978    yes) enable_shared=yes ;;
8979    no) enable_shared=no ;;
8980    *)
8981      enable_shared=no
8982      # Look at the argument we got.  We use all the common list separators.
8983      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
8984      for pkg in $enableval; do
8985	IFS=$lt_save_ifs
8986	if test "X$pkg" = "X$p"; then
8987	  enable_shared=yes
8988	fi
8989      done
8990      IFS=$lt_save_ifs
8991      ;;
8992    esac],
8993    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
8994
8995    _LT_DECL([build_libtool_libs], [enable_shared], [0],
8996	[Whether or not to build shared libraries])
8997])# _LT_ENABLE_SHARED
8998
8999LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
9000LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
9001
9002# Old names:
9003AC_DEFUN([AC_ENABLE_SHARED],
9004[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
9005])
9006
9007AC_DEFUN([AC_DISABLE_SHARED],
9008[_LT_SET_OPTION([LT_INIT], [disable-shared])
9009])
9010
9011AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9012AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9013
9014dnl aclocal-1.4 backwards compatibility:
9015dnl AC_DEFUN([AM_ENABLE_SHARED], [])
9016dnl AC_DEFUN([AM_DISABLE_SHARED], [])
9017
9018
9019
9020# _LT_ENABLE_STATIC([DEFAULT])
9021# ----------------------------
9022# implement the --enable-static flag, and support the 'static' and
9023# 'disable-static' LT_INIT options.
9024# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
9025m4_define([_LT_ENABLE_STATIC],
9026[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
9027AC_ARG_ENABLE([static],
9028    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
9029	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
9030    [p=${PACKAGE-default}
9031    case $enableval in
9032    yes) enable_static=yes ;;
9033    no) enable_static=no ;;
9034    *)
9035     enable_static=no
9036      # Look at the argument we got.  We use all the common list separators.
9037      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
9038      for pkg in $enableval; do
9039	IFS=$lt_save_ifs
9040	if test "X$pkg" = "X$p"; then
9041	  enable_static=yes
9042	fi
9043      done
9044      IFS=$lt_save_ifs
9045      ;;
9046    esac],
9047    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
9048
9049    _LT_DECL([build_old_libs], [enable_static], [0],
9050	[Whether or not to build static libraries])
9051])# _LT_ENABLE_STATIC
9052
9053LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
9054LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
9055
9056# Old names:
9057AC_DEFUN([AC_ENABLE_STATIC],
9058[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
9059])
9060
9061AC_DEFUN([AC_DISABLE_STATIC],
9062[_LT_SET_OPTION([LT_INIT], [disable-static])
9063])
9064
9065AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
9066AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
9067
9068dnl aclocal-1.4 backwards compatibility:
9069dnl AC_DEFUN([AM_ENABLE_STATIC], [])
9070dnl AC_DEFUN([AM_DISABLE_STATIC], [])
9071
9072
9073
9074# _LT_ENABLE_FAST_INSTALL([DEFAULT])
9075# ----------------------------------
9076# implement the --enable-fast-install flag, and support the 'fast-install'
9077# and 'disable-fast-install' LT_INIT options.
9078# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
9079m4_define([_LT_ENABLE_FAST_INSTALL],
9080[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
9081AC_ARG_ENABLE([fast-install],
9082    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
9083    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
9084    [p=${PACKAGE-default}
9085    case $enableval in
9086    yes) enable_fast_install=yes ;;
9087    no) enable_fast_install=no ;;
9088    *)
9089      enable_fast_install=no
9090      # Look at the argument we got.  We use all the common list separators.
9091      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
9092      for pkg in $enableval; do
9093	IFS=$lt_save_ifs
9094	if test "X$pkg" = "X$p"; then
9095	  enable_fast_install=yes
9096	fi
9097      done
9098      IFS=$lt_save_ifs
9099      ;;
9100    esac],
9101    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
9102
9103_LT_DECL([fast_install], [enable_fast_install], [0],
9104	 [Whether or not to optimize for fast installation])dnl
9105])# _LT_ENABLE_FAST_INSTALL
9106
9107LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
9108LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
9109
9110# Old names:
9111AU_DEFUN([AC_ENABLE_FAST_INSTALL],
9112[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
9113AC_DIAGNOSE([obsolete],
9114[$0: Remove this warning and the call to _LT_SET_OPTION when you put
9115the 'fast-install' option into LT_INIT's first parameter.])
9116])
9117
9118AU_DEFUN([AC_DISABLE_FAST_INSTALL],
9119[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
9120AC_DIAGNOSE([obsolete],
9121[$0: Remove this warning and the call to _LT_SET_OPTION when you put
9122the 'disable-fast-install' option into LT_INIT's first parameter.])
9123])
9124
9125dnl aclocal-1.4 backwards compatibility:
9126dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
9127dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
9128
9129
9130# _LT_WITH_AIX_SONAME([DEFAULT])
9131# ----------------------------------
9132# implement the --with-aix-soname flag, and support the `aix-soname=aix'
9133# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
9134# is either `aix', `both' or `svr4'.  If omitted, it defaults to `aix'.
9135m4_define([_LT_WITH_AIX_SONAME],
9136[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
9137shared_archive_member_spec=
9138case $host,$enable_shared in
9139power*-*-aix[[5-9]]*,yes)
9140  AC_MSG_CHECKING([which variant of shared library versioning to provide])
9141  AC_ARG_WITH([aix-soname],
9142    [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
9143      [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
9144    [case $withval in
9145    aix|svr4|both)
9146      ;;
9147    *)
9148      AC_MSG_ERROR([Unknown argument to --with-aix-soname])
9149      ;;
9150    esac
9151    lt_cv_with_aix_soname=$with_aix_soname],
9152    [AC_CACHE_VAL([lt_cv_with_aix_soname],
9153      [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
9154    with_aix_soname=$lt_cv_with_aix_soname])
9155  AC_MSG_RESULT([$with_aix_soname])
9156  if test aix != "$with_aix_soname"; then
9157    # For the AIX way of multilib, we name the shared archive member
9158    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
9159    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
9160    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
9161    # the AIX toolchain works better with OBJECT_MODE set (default 32).
9162    if test 64 = "${OBJECT_MODE-32}"; then
9163      shared_archive_member_spec=shr_64
9164    else
9165      shared_archive_member_spec=shr
9166    fi
9167  fi
9168  ;;
9169*)
9170  with_aix_soname=aix
9171  ;;
9172esac
9173
9174_LT_DECL([], [shared_archive_member_spec], [0],
9175    [Shared archive member basename, for filename based shared library versioning on AIX])dnl
9176])# _LT_WITH_AIX_SONAME
9177
9178LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
9179LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
9180LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
9181
9182
9183# _LT_WITH_PIC([MODE])
9184# --------------------
9185# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
9186# LT_INIT options.
9187# MODE is either 'yes' or 'no'.  If omitted, it defaults to 'both'.
9188m4_define([_LT_WITH_PIC],
9189[AC_ARG_WITH([pic],
9190    [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
9191	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
9192    [lt_p=${PACKAGE-default}
9193    case $withval in
9194    yes|no) pic_mode=$withval ;;
9195    *)
9196      pic_mode=default
9197      # Look at the argument we got.  We use all the common list separators.
9198      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
9199      for lt_pkg in $withval; do
9200	IFS=$lt_save_ifs
9201	if test "X$lt_pkg" = "X$lt_p"; then
9202	  pic_mode=yes
9203	fi
9204      done
9205      IFS=$lt_save_ifs
9206      ;;
9207    esac],
9208    [pic_mode=m4_default([$1], [default])])
9209
9210_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
9211])# _LT_WITH_PIC
9212
9213LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
9214LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
9215
9216# Old name:
9217AU_DEFUN([AC_LIBTOOL_PICMODE],
9218[_LT_SET_OPTION([LT_INIT], [pic-only])
9219AC_DIAGNOSE([obsolete],
9220[$0: Remove this warning and the call to _LT_SET_OPTION when you
9221put the 'pic-only' option into LT_INIT's first parameter.])
9222])
9223
9224dnl aclocal-1.4 backwards compatibility:
9225dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
9226
9227
9228m4_define([_LTDL_MODE], [])
9229LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
9230		 [m4_define([_LTDL_MODE], [nonrecursive])])
9231LT_OPTION_DEFINE([LTDL_INIT], [recursive],
9232		 [m4_define([_LTDL_MODE], [recursive])])
9233LT_OPTION_DEFINE([LTDL_INIT], [subproject],
9234		 [m4_define([_LTDL_MODE], [subproject])])
9235
9236m4_define([_LTDL_TYPE], [])
9237LT_OPTION_DEFINE([LTDL_INIT], [installable],
9238		 [m4_define([_LTDL_TYPE], [installable])])
9239LT_OPTION_DEFINE([LTDL_INIT], [convenience],
9240		 [m4_define([_LTDL_TYPE], [convenience])])
9241
9242# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
9243#
9244# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software
9245# Foundation, Inc.
9246# Written by Gary V. Vaughan, 2004
9247#
9248# This file is free software; the Free Software Foundation gives
9249# unlimited permission to copy and/or distribute it, with or without
9250# modifications, as long as this notice is preserved.
9251
9252# serial 6 ltsugar.m4
9253
9254# This is to help aclocal find these macros, as it can't see m4_define.
9255AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
9256
9257
9258# lt_join(SEP, ARG1, [ARG2...])
9259# -----------------------------
9260# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
9261# associated separator.
9262# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
9263# versions in m4sugar had bugs.
9264m4_define([lt_join],
9265[m4_if([$#], [1], [],
9266       [$#], [2], [[$2]],
9267       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
9268m4_define([_lt_join],
9269[m4_if([$#$2], [2], [],
9270       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
9271
9272
9273# lt_car(LIST)
9274# lt_cdr(LIST)
9275# ------------
9276# Manipulate m4 lists.
9277# These macros are necessary as long as will still need to support
9278# Autoconf-2.59, which quotes differently.
9279m4_define([lt_car], [[$1]])
9280m4_define([lt_cdr],
9281[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
9282       [$#], 1, [],
9283       [m4_dquote(m4_shift($@))])])
9284m4_define([lt_unquote], $1)
9285
9286
9287# lt_append(MACRO-NAME, STRING, [SEPARATOR])
9288# ------------------------------------------
9289# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
9290# Note that neither SEPARATOR nor STRING are expanded; they are appended
9291# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
9292# No SEPARATOR is output if MACRO-NAME was previously undefined (different
9293# than defined and empty).
9294#
9295# This macro is needed until we can rely on Autoconf 2.62, since earlier
9296# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
9297m4_define([lt_append],
9298[m4_define([$1],
9299	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9300
9301
9302
9303# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
9304# ----------------------------------------------------------
9305# Produce a SEP delimited list of all paired combinations of elements of
9306# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
9307# has the form PREFIXmINFIXSUFFIXn.
9308# Needed until we can rely on m4_combine added in Autoconf 2.62.
9309m4_define([lt_combine],
9310[m4_if(m4_eval([$# > 3]), [1],
9311       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
9312[[m4_foreach([_Lt_prefix], [$2],
9313	     [m4_foreach([_Lt_suffix],
9314		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
9315	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
9316
9317
9318# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
9319# -----------------------------------------------------------------------
9320# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
9321# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
9322m4_define([lt_if_append_uniq],
9323[m4_ifdef([$1],
9324	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
9325		 [lt_append([$1], [$2], [$3])$4],
9326		 [$5])],
9327	  [lt_append([$1], [$2], [$3])$4])])
9328
9329
9330# lt_dict_add(DICT, KEY, VALUE)
9331# -----------------------------
9332m4_define([lt_dict_add],
9333[m4_define([$1($2)], [$3])])
9334
9335
9336# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
9337# --------------------------------------------
9338m4_define([lt_dict_add_subkey],
9339[m4_define([$1($2:$3)], [$4])])
9340
9341
9342# lt_dict_fetch(DICT, KEY, [SUBKEY])
9343# ----------------------------------
9344m4_define([lt_dict_fetch],
9345[m4_ifval([$3],
9346	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
9347    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9348
9349
9350# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
9351# -----------------------------------------------------------------
9352m4_define([lt_if_dict_fetch],
9353[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
9354	[$5],
9355    [$6])])
9356
9357
9358# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
9359# --------------------------------------------------------------
9360m4_define([lt_dict_filter],
9361[m4_if([$5], [], [],
9362  [lt_join(m4_quote(m4_default([$4], [[, ]])),
9363           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
9364		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
9365])
9366
9367# ltversion.m4 -- version numbers			-*- Autoconf -*-
9368#
9369#   Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation,
9370#   Inc.
9371#   Written by Scott James Remnant, 2004
9372#
9373# This file is free software; the Free Software Foundation gives
9374# unlimited permission to copy and/or distribute it, with or without
9375# modifications, as long as this notice is preserved.
9376
9377# @configure_input@
9378
9379# serial 4245 ltversion.m4
9380# This file is part of GNU Libtool
9381
9382m4_define([LT_PACKAGE_VERSION], [2.4.7])
9383m4_define([LT_PACKAGE_REVISION], [2.4.7])
9384
9385AC_DEFUN([LTVERSION_VERSION],
9386[macro_version='2.4.7'
9387macro_revision='2.4.7'
9388_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
9389_LT_DECL(, macro_revision, 0)
9390])
9391
9392# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
9393#
9394#   Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free
9395#   Software Foundation, Inc.
9396#   Written by Scott James Remnant, 2004.
9397#
9398# This file is free software; the Free Software Foundation gives
9399# unlimited permission to copy and/or distribute it, with or without
9400# modifications, as long as this notice is preserved.
9401
9402# serial 5 lt~obsolete.m4
9403
9404# These exist entirely to fool aclocal when bootstrapping libtool.
9405#
9406# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
9407# which have later been changed to m4_define as they aren't part of the
9408# exported API, or moved to Autoconf or Automake where they belong.
9409#
9410# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
9411# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
9412# using a macro with the same name in our local m4/libtool.m4 it'll
9413# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
9414# and doesn't know about Autoconf macros at all.)
9415#
9416# So we provide this file, which has a silly filename so it's always
9417# included after everything else.  This provides aclocal with the
9418# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
9419# because those macros already exist, or will be overwritten later.
9420# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
9421#
9422# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
9423# Yes, that means every name once taken will need to remain here until
9424# we give up compatibility with versions before 1.7, at which point
9425# we need to keep only those names which we still refer to.
9426
9427# This is to help aclocal find these macros, as it can't see m4_define.
9428AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9429
9430m4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9431m4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
9432m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9433m4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
9434m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9435m4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
9436m4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
9437m4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9438m4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
9439m4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
9440m4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
9441m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9442m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9443m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9444m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9445m4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9446m4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
9447m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9448m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9449m4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
9450m4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
9451m4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9452m4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9453m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9454m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9455m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9456m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9457m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9458m4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
9459m4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
9460m4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
9461m4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9462m4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9463m4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
9464m4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
9465m4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9466m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9467m4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
9468m4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9469m4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
9470m4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
9471m4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
9472m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9473m4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9474m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9475m4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9476m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9477m4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9478m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9479m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9480m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9481m4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9482m4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
9483m4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9484m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],	[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
9485m4_ifndef([_LT_AC_PROG_CXXCPP],		[AC_DEFUN([_LT_AC_PROG_CXXCPP])])
9486m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],	[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
9487m4_ifndef([_LT_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
9488m4_ifndef([_LT_PROG_F77],		[AC_DEFUN([_LT_PROG_F77])])
9489m4_ifndef([_LT_PROG_FC],		[AC_DEFUN([_LT_PROG_FC])])
9490m4_ifndef([_LT_PROG_CXX],		[AC_DEFUN([_LT_PROG_CXX])])
9491
9492# pkg.m4 - Macros to locate and utilise pkg-config.   -*- Autoconf -*-
9493# serial 11 (pkg-config-0.29.1)
9494
9495dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
9496dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
9497dnl
9498dnl This program is free software; you can redistribute it and/or modify
9499dnl it under the terms of the GNU General Public License as published by
9500dnl the Free Software Foundation; either version 2 of the License, or
9501dnl (at your option) any later version.
9502dnl
9503dnl This program is distributed in the hope that it will be useful, but
9504dnl WITHOUT ANY WARRANTY; without even the implied warranty of
9505dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9506dnl General Public License for more details.
9507dnl
9508dnl You should have received a copy of the GNU General Public License
9509dnl along with this program; if not, write to the Free Software
9510dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
9511dnl 02111-1307, USA.
9512dnl
9513dnl As a special exception to the GNU General Public License, if you
9514dnl distribute this file as part of a program that contains a
9515dnl configuration script generated by Autoconf, you may include it under
9516dnl the same distribution terms that you use for the rest of that
9517dnl program.
9518
9519dnl PKG_PREREQ(MIN-VERSION)
9520dnl -----------------------
9521dnl Since: 0.29
9522dnl
9523dnl Verify that the version of the pkg-config macros are at least
9524dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
9525dnl installed version of pkg-config, this checks the developer's version
9526dnl of pkg.m4 when generating configure.
9527dnl
9528dnl To ensure that this macro is defined, also add:
9529dnl m4_ifndef([PKG_PREREQ],
9530dnl     [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
9531dnl
9532dnl See the "Since" comment for each macro you use to see what version
9533dnl of the macros you require.
9534m4_defun([PKG_PREREQ],
9535[m4_define([PKG_MACROS_VERSION], [0.29.1])
9536m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
9537    [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
9538])dnl PKG_PREREQ
9539
9540dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
9541dnl ----------------------------------
9542dnl Since: 0.16
9543dnl
9544dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
9545dnl first found in the path. Checks that the version of pkg-config found
9546dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
9547dnl used since that's the first version where most current features of
9548dnl pkg-config existed.
9549AC_DEFUN([PKG_PROG_PKG_CONFIG],
9550[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
9551m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
9552m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
9553AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
9554AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
9555AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
9556
9557if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9558	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
9559fi
9560if test -n "$PKG_CONFIG"; then
9561	_pkg_min_version=m4_default([$1], [0.9.0])
9562	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
9563	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9564		AC_MSG_RESULT([yes])
9565	else
9566		AC_MSG_RESULT([no])
9567		PKG_CONFIG=""
9568	fi
9569fi[]dnl
9570])dnl PKG_PROG_PKG_CONFIG
9571
9572dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
9573dnl -------------------------------------------------------------------
9574dnl Since: 0.18
9575dnl
9576dnl Check to see whether a particular set of modules exists. Similar to
9577dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
9578dnl
9579dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9580dnl only at the first occurence in configure.ac, so if the first place
9581dnl it's called might be skipped (such as if it is within an "if", you
9582dnl have to call PKG_CHECK_EXISTS manually
9583AC_DEFUN([PKG_CHECK_EXISTS],
9584[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9585if test -n "$PKG_CONFIG" && \
9586    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
9587  m4_default([$2], [:])
9588m4_ifvaln([$3], [else
9589  $3])dnl
9590fi])
9591
9592dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
9593dnl ---------------------------------------------
9594dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
9595dnl pkg_failed based on the result.
9596m4_define([_PKG_CONFIG],
9597[if test -n "$$1"; then
9598    pkg_cv_[]$1="$$1"
9599 elif test -n "$PKG_CONFIG"; then
9600    PKG_CHECK_EXISTS([$3],
9601                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
9602		      test "x$?" != "x0" && pkg_failed=yes ],
9603		     [pkg_failed=yes])
9604 else
9605    pkg_failed=untried
9606fi[]dnl
9607])dnl _PKG_CONFIG
9608
9609dnl _PKG_SHORT_ERRORS_SUPPORTED
9610dnl ---------------------------
9611dnl Internal check to see if pkg-config supports short errors.
9612AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
9613[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9614if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9615        _pkg_short_errors_supported=yes
9616else
9617        _pkg_short_errors_supported=no
9618fi[]dnl
9619])dnl _PKG_SHORT_ERRORS_SUPPORTED
9620
9621
9622dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
9623dnl   [ACTION-IF-NOT-FOUND])
9624dnl --------------------------------------------------------------
9625dnl Since: 0.4.0
9626dnl
9627dnl Note that if there is a possibility the first call to
9628dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
9629dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
9630AC_DEFUN([PKG_CHECK_MODULES],
9631[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9632AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
9633AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
9634
9635pkg_failed=no
9636AC_MSG_CHECKING([for $1])
9637
9638_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
9639_PKG_CONFIG([$1][_LIBS], [libs], [$2])
9640
9641m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
9642and $1[]_LIBS to avoid the need to call pkg-config.
9643See the pkg-config man page for more details.])
9644
9645if test $pkg_failed = yes; then
9646   	AC_MSG_RESULT([no])
9647        _PKG_SHORT_ERRORS_SUPPORTED
9648        if test $_pkg_short_errors_supported = yes; then
9649	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
9650        else 
9651	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
9652        fi
9653	# Put the nasty error message in config.log where it belongs
9654	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
9655
9656	m4_default([$4], [AC_MSG_ERROR(
9657[Package requirements ($2) were not met:
9658
9659$$1_PKG_ERRORS
9660
9661Consider adjusting the PKG_CONFIG_PATH environment variable if you
9662installed software in a non-standard prefix.
9663
9664_PKG_TEXT])[]dnl
9665        ])
9666elif test $pkg_failed = untried; then
9667     	AC_MSG_RESULT([no])
9668	m4_default([$4], [AC_MSG_FAILURE(
9669[The pkg-config script could not be found or is too old.  Make sure it
9670is in your PATH or set the PKG_CONFIG environment variable to the full
9671path to pkg-config.
9672
9673_PKG_TEXT
9674
9675To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
9676        ])
9677else
9678	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
9679	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
9680        AC_MSG_RESULT([yes])
9681	$3
9682fi[]dnl
9683])dnl PKG_CHECK_MODULES
9684
9685
9686dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
9687dnl   [ACTION-IF-NOT-FOUND])
9688dnl ---------------------------------------------------------------------
9689dnl Since: 0.29
9690dnl
9691dnl Checks for existence of MODULES and gathers its build flags with
9692dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
9693dnl and VARIABLE-PREFIX_LIBS from --libs.
9694dnl
9695dnl Note that if there is a possibility the first call to
9696dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
9697dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
9698dnl configure.ac.
9699AC_DEFUN([PKG_CHECK_MODULES_STATIC],
9700[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9701_save_PKG_CONFIG=$PKG_CONFIG
9702PKG_CONFIG="$PKG_CONFIG --static"
9703PKG_CHECK_MODULES($@)
9704PKG_CONFIG=$_save_PKG_CONFIG[]dnl
9705])dnl PKG_CHECK_MODULES_STATIC
9706
9707
9708dnl PKG_INSTALLDIR([DIRECTORY])
9709dnl -------------------------
9710dnl Since: 0.27
9711dnl
9712dnl Substitutes the variable pkgconfigdir as the location where a module
9713dnl should install pkg-config .pc files. By default the directory is
9714dnl $libdir/pkgconfig, but the default can be changed by passing
9715dnl DIRECTORY. The user can override through the --with-pkgconfigdir
9716dnl parameter.
9717AC_DEFUN([PKG_INSTALLDIR],
9718[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
9719m4_pushdef([pkg_description],
9720    [pkg-config installation directory @<:@]pkg_default[@:>@])
9721AC_ARG_WITH([pkgconfigdir],
9722    [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
9723    [with_pkgconfigdir=]pkg_default)
9724AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
9725m4_popdef([pkg_default])
9726m4_popdef([pkg_description])
9727])dnl PKG_INSTALLDIR
9728
9729
9730dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
9731dnl --------------------------------
9732dnl Since: 0.27
9733dnl
9734dnl Substitutes the variable noarch_pkgconfigdir as the location where a
9735dnl module should install arch-independent pkg-config .pc files. By
9736dnl default the directory is $datadir/pkgconfig, but the default can be
9737dnl changed by passing DIRECTORY. The user can override through the
9738dnl --with-noarch-pkgconfigdir parameter.
9739AC_DEFUN([PKG_NOARCH_INSTALLDIR],
9740[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
9741m4_pushdef([pkg_description],
9742    [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
9743AC_ARG_WITH([noarch-pkgconfigdir],
9744    [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
9745    [with_noarch_pkgconfigdir=]pkg_default)
9746AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
9747m4_popdef([pkg_default])
9748m4_popdef([pkg_description])
9749])dnl PKG_NOARCH_INSTALLDIR
9750
9751
9752dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
9753dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
9754dnl -------------------------------------------
9755dnl Since: 0.28
9756dnl
9757dnl Retrieves the value of the pkg-config variable for the given module.
9758AC_DEFUN([PKG_CHECK_VAR],
9759[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9760AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
9761
9762_PKG_CONFIG([$1], [variable="][$3]["], [$2])
9763AS_VAR_COPY([$1], [pkg_cv_][$1])
9764
9765AS_VAR_IF([$1], [""], [$5], [$4])dnl
9766])dnl PKG_CHECK_VAR
9767
9768dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES,
9769dnl   [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND],
9770dnl   [DESCRIPTION], [DEFAULT])
9771dnl ------------------------------------------
9772dnl
9773dnl Prepare a "--with-" configure option using the lowercase
9774dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and
9775dnl PKG_CHECK_MODULES in a single macro.
9776AC_DEFUN([PKG_WITH_MODULES],
9777[
9778m4_pushdef([with_arg], m4_tolower([$1]))
9779
9780m4_pushdef([description],
9781           [m4_default([$5], [build with ]with_arg[ support])])
9782
9783m4_pushdef([def_arg], [m4_default([$6], [auto])])
9784m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes])
9785m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no])
9786
9787m4_case(def_arg,
9788            [yes],[m4_pushdef([with_without], [--without-]with_arg)],
9789            [m4_pushdef([with_without],[--with-]with_arg)])
9790
9791AC_ARG_WITH(with_arg,
9792     AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),,
9793    [AS_TR_SH([with_]with_arg)=def_arg])
9794
9795AS_CASE([$AS_TR_SH([with_]with_arg)],
9796            [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)],
9797            [auto],[PKG_CHECK_MODULES([$1],[$2],
9798                                        [m4_n([def_action_if_found]) $3],
9799                                        [m4_n([def_action_if_not_found]) $4])])
9800
9801m4_popdef([with_arg])
9802m4_popdef([description])
9803m4_popdef([def_arg])
9804
9805])dnl PKG_WITH_MODULES
9806
9807dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
9808dnl   [DESCRIPTION], [DEFAULT])
9809dnl -----------------------------------------------
9810dnl
9811dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES
9812dnl check._[VARIABLE-PREFIX] is exported as make variable.
9813AC_DEFUN([PKG_HAVE_WITH_MODULES],
9814[
9815PKG_WITH_MODULES([$1],[$2],,,[$3],[$4])
9816
9817AM_CONDITIONAL([HAVE_][$1],
9818               [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"])
9819])dnl PKG_HAVE_WITH_MODULES
9820
9821dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
9822dnl   [DESCRIPTION], [DEFAULT])
9823dnl ------------------------------------------------------
9824dnl
9825dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after
9826dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make
9827dnl and preprocessor variable.
9828AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES],
9829[
9830PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4])
9831
9832AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"],
9833        [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])])
9834])dnl PKG_HAVE_DEFINE_WITH_MODULES
9835
9836dnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
9837dnl
9838dnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
9839dnl
9840dnl Permission is hereby granted, free of charge, to any person obtaining a
9841dnl copy of this software and associated documentation files (the "Software"),
9842dnl to deal in the Software without restriction, including without limitation
9843dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
9844dnl and/or sell copies of the Software, and to permit persons to whom the
9845dnl Software is furnished to do so, subject to the following conditions:
9846dnl
9847dnl The above copyright notice and this permission notice (including the next
9848dnl paragraph) shall be included in all copies or substantial portions of the
9849dnl Software.
9850dnl
9851dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
9852dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
9853dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
9854dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
9855dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
9856dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
9857dnl DEALINGS IN THE SOFTWARE.
9858
9859# XORG_MACROS_VERSION(required-version)
9860# -------------------------------------
9861# Minimum version: 1.1.0
9862#
9863# If you're using a macro added in Version 1.1 or newer, include this in
9864# your configure.ac with the minimum required version, such as:
9865# XORG_MACROS_VERSION(1.1)
9866#
9867# To ensure that this macro is defined, also add:
9868# m4_ifndef([XORG_MACROS_VERSION],
9869#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
9870#
9871#
9872# See the "minimum version" comment for each macro you use to see what
9873# version you require.
9874m4_defun([XORG_MACROS_VERSION],[
9875m4_define([vers_have], [1.19.3])
9876m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
9877m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
9878m4_if(m4_cmp(maj_have, maj_needed), 0,,
9879    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
9880m4_if(m4_version_compare(vers_have, [$1]), -1,
9881    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
9882m4_undefine([vers_have])
9883m4_undefine([maj_have])
9884m4_undefine([maj_needed])
9885]) # XORG_MACROS_VERSION
9886
9887# XORG_PROG_RAWCPP()
9888# ------------------
9889# Minimum version: 1.0.0
9890#
9891# Find cpp program and necessary flags for use in pre-processing text files
9892# such as man pages and config files
9893AC_DEFUN([XORG_PROG_RAWCPP],[
9894AC_REQUIRE([AC_PROG_CPP])
9895AC_PATH_TOOL(RAWCPP, [cpp], [${CPP}],
9896   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
9897
9898# Check for flag to avoid builtin definitions - assumes unix is predefined,
9899# which is not the best choice for supporting other OS'es, but covers most
9900# of the ones we need for now.
9901AC_MSG_CHECKING([if $RAWCPP requires -undef])
9902AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])])
9903if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
9904	AC_MSG_RESULT([no])
9905else
9906	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
9907		RAWCPPFLAGS=-undef
9908		AC_MSG_RESULT([yes])
9909	# under Cygwin unix is still defined even with -undef
9910	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
9911		RAWCPPFLAGS="-undef -ansi"
9912		AC_MSG_RESULT([yes, with -ansi])
9913	else
9914		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
9915	fi
9916fi
9917rm -f conftest.$ac_ext
9918
9919AC_MSG_CHECKING([if $RAWCPP requires -traditional])
9920AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve   "whitespace"?]])])
9921if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
9922	AC_MSG_RESULT([no])
9923else
9924	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
9925		TRADITIONALCPPFLAGS="-traditional"
9926		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
9927		AC_MSG_RESULT([yes])
9928	else
9929		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
9930	fi
9931fi
9932rm -f conftest.$ac_ext
9933AC_SUBST(RAWCPPFLAGS)
9934AC_SUBST(TRADITIONALCPPFLAGS)
9935]) # XORG_PROG_RAWCPP
9936
9937# XORG_MANPAGE_SECTIONS()
9938# -----------------------
9939# Minimum version: 1.0.0
9940#
9941# Determine which sections man pages go in for the different man page types
9942# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
9943# Not sure if there's any better way than just hardcoding by OS name.
9944# Override default settings by setting environment variables
9945# Added MAN_SUBSTS in version 1.8
9946# Added AC_PROG_SED in version 1.8
9947
9948AC_DEFUN([XORG_MANPAGE_SECTIONS],[
9949AC_REQUIRE([AC_CANONICAL_HOST])
9950AC_REQUIRE([AC_PROG_SED])
9951
9952case $host_os in
9953    solaris*)
9954        # Solaris 2.0 - 11.3 use SysV man page section numbers, so we
9955        # check for a man page file found in later versions that use
9956        # traditional section numbers instead
9957        AC_CHECK_FILE([/usr/share/man/man7/attributes.7],
9958                [SYSV_MAN_SECTIONS=false], [SYSV_MAN_SECTIONS=true])
9959        ;;
9960    *) SYSV_MAN_SECTIONS=false ;;
9961esac
9962
9963if test x$APP_MAN_SUFFIX = x    ; then
9964    APP_MAN_SUFFIX=1
9965fi
9966if test x$APP_MAN_DIR = x    ; then
9967    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
9968fi
9969
9970if test x$LIB_MAN_SUFFIX = x    ; then
9971    LIB_MAN_SUFFIX=3
9972fi
9973if test x$LIB_MAN_DIR = x    ; then
9974    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
9975fi
9976
9977if test x$FILE_MAN_SUFFIX = x    ; then
9978    case $SYSV_MAN_SECTIONS in
9979	true)				FILE_MAN_SUFFIX=4  ;;
9980	*)				FILE_MAN_SUFFIX=5  ;;
9981    esac
9982fi
9983if test x$FILE_MAN_DIR = x    ; then
9984    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
9985fi
9986
9987if test x$MISC_MAN_SUFFIX = x    ; then
9988    case $SYSV_MAN_SECTIONS in
9989	true)				MISC_MAN_SUFFIX=5  ;;
9990	*)				MISC_MAN_SUFFIX=7  ;;
9991    esac
9992fi
9993if test x$MISC_MAN_DIR = x    ; then
9994    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
9995fi
9996
9997if test x$DRIVER_MAN_SUFFIX = x    ; then
9998    case $SYSV_MAN_SECTIONS in
9999	true)				DRIVER_MAN_SUFFIX=7  ;;
10000	*)				DRIVER_MAN_SUFFIX=4  ;;
10001    esac
10002fi
10003if test x$DRIVER_MAN_DIR = x    ; then
10004    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
10005fi
10006
10007if test x$ADMIN_MAN_SUFFIX = x    ; then
10008    case $SYSV_MAN_SECTIONS in
10009	true)				ADMIN_MAN_SUFFIX=1m ;;
10010	*)				ADMIN_MAN_SUFFIX=8  ;;
10011    esac
10012fi
10013if test x$ADMIN_MAN_DIR = x    ; then
10014    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
10015fi
10016
10017
10018AC_SUBST([APP_MAN_SUFFIX])
10019AC_SUBST([LIB_MAN_SUFFIX])
10020AC_SUBST([FILE_MAN_SUFFIX])
10021AC_SUBST([MISC_MAN_SUFFIX])
10022AC_SUBST([DRIVER_MAN_SUFFIX])
10023AC_SUBST([ADMIN_MAN_SUFFIX])
10024AC_SUBST([APP_MAN_DIR])
10025AC_SUBST([LIB_MAN_DIR])
10026AC_SUBST([FILE_MAN_DIR])
10027AC_SUBST([MISC_MAN_DIR])
10028AC_SUBST([DRIVER_MAN_DIR])
10029AC_SUBST([ADMIN_MAN_DIR])
10030
10031XORG_MAN_PAGE="X Version 11"
10032AC_SUBST([XORG_MAN_PAGE])
10033MAN_SUBSTS="\
10034	-e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
10035	-e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
10036	-e 's|__xservername__|Xorg|g' \
10037	-e 's|__xconfigfile__|xorg.conf|g' \
10038	-e 's|__projectroot__|\$(prefix)|g' \
10039	-e 's|__apploaddir__|\$(appdefaultdir)|g' \
10040	-e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
10041	-e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
10042	-e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
10043	-e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
10044	-e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
10045	-e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
10046AC_SUBST([MAN_SUBSTS])
10047
10048]) # XORG_MANPAGE_SECTIONS
10049
10050# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
10051# ------------------------
10052# Minimum version: 1.7.0
10053#
10054# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
10055# provided by xorg-sgml-doctools, if installed.
10056AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
10057AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
10058XORG_SGML_PATH=
10059PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
10060    [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
10061    [m4_ifval([$1],[:],
10062        [if test x"$cross_compiling" != x"yes" ; then
10063            AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
10064                          [XORG_SGML_PATH=$prefix/share/sgml])
10065         fi])
10066    ])
10067
10068# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
10069# the path and the name of the doc stylesheet
10070if test "x$XORG_SGML_PATH" != "x" ; then
10071   AC_MSG_RESULT([$XORG_SGML_PATH])
10072   STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
10073   XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
10074else
10075   AC_MSG_RESULT([no])
10076fi
10077
10078AC_SUBST(XORG_SGML_PATH)
10079AC_SUBST(STYLESHEET_SRCDIR)
10080AC_SUBST(XSL_STYLESHEET)
10081AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
10082]) # XORG_CHECK_SGML_DOCTOOLS
10083
10084# XORG_CHECK_LINUXDOC
10085# -------------------
10086# Minimum version: 1.0.0
10087#
10088# Defines the variable MAKE_TEXT if the necessary tools and
10089# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
10090# Whether or not the necessary tools and files are found can be checked
10091# with the AM_CONDITIONAL "BUILD_LINUXDOC"
10092AC_DEFUN([XORG_CHECK_LINUXDOC],[
10093AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
10094AC_REQUIRE([XORG_WITH_PS2PDF])
10095
10096AC_PATH_PROG(LINUXDOC, linuxdoc)
10097
10098AC_MSG_CHECKING([whether to build documentation])
10099
10100if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
10101   BUILDDOC=yes
10102else
10103   BUILDDOC=no
10104fi
10105
10106AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
10107
10108AC_MSG_RESULT([$BUILDDOC])
10109
10110AC_MSG_CHECKING([whether to build pdf documentation])
10111
10112if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
10113   BUILDPDFDOC=yes
10114else
10115   BUILDPDFDOC=no
10116fi
10117
10118AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
10119
10120AC_MSG_RESULT([$BUILDPDFDOC])
10121
10122MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
10123MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
10124MAKE_PDF="$PS2PDF"
10125MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
10126
10127AC_SUBST(MAKE_TEXT)
10128AC_SUBST(MAKE_PS)
10129AC_SUBST(MAKE_PDF)
10130AC_SUBST(MAKE_HTML)
10131]) # XORG_CHECK_LINUXDOC
10132
10133# XORG_CHECK_DOCBOOK
10134# -------------------
10135# Minimum version: 1.0.0
10136#
10137# Checks for the ability to build output formats from SGML DocBook source.
10138# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
10139# indicates whether the necessary tools and files are found and, if set,
10140# $(MAKE_XXX) blah.sgml will produce blah.xxx.
10141AC_DEFUN([XORG_CHECK_DOCBOOK],[
10142AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
10143
10144BUILDTXTDOC=no
10145BUILDPDFDOC=no
10146BUILDPSDOC=no
10147BUILDHTMLDOC=no
10148
10149AC_PATH_PROG(DOCBOOKPS, docbook2ps)
10150AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
10151AC_PATH_PROG(DOCBOOKHTML, docbook2html)
10152AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
10153
10154AC_MSG_CHECKING([whether to build text documentation])
10155if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
10156   test x$BUILD_TXTDOC != xno; then
10157	BUILDTXTDOC=yes
10158fi
10159AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
10160AC_MSG_RESULT([$BUILDTXTDOC])
10161
10162AC_MSG_CHECKING([whether to build PDF documentation])
10163if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
10164   test x$BUILD_PDFDOC != xno; then
10165	BUILDPDFDOC=yes
10166fi
10167AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
10168AC_MSG_RESULT([$BUILDPDFDOC])
10169
10170AC_MSG_CHECKING([whether to build PostScript documentation])
10171if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
10172   test x$BUILD_PSDOC != xno; then
10173	BUILDPSDOC=yes
10174fi
10175AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
10176AC_MSG_RESULT([$BUILDPSDOC])
10177
10178AC_MSG_CHECKING([whether to build HTML documentation])
10179if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
10180   test x$BUILD_HTMLDOC != xno; then
10181	BUILDHTMLDOC=yes
10182fi
10183AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
10184AC_MSG_RESULT([$BUILDHTMLDOC])
10185
10186MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
10187MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
10188MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
10189MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
10190
10191AC_SUBST(MAKE_TEXT)
10192AC_SUBST(MAKE_PS)
10193AC_SUBST(MAKE_PDF)
10194AC_SUBST(MAKE_HTML)
10195]) # XORG_CHECK_DOCBOOK
10196
10197# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT])
10198# ----------------
10199# Minimum version: 1.5.0
10200# Minimum version for optional DEFAULT argument: 1.11.0
10201#
10202# Documentation tools are not always available on all platforms and sometimes
10203# not at the appropriate level. This macro enables a module to test for the
10204# presence of the tool and obtain it's path in separate variables. Coupled with
10205# the --with-xmlto option, it allows maximum flexibilty in making decisions
10206# as whether or not to use the xmlto package. When DEFAULT is not specified,
10207# --with-xmlto assumes 'auto'.
10208#
10209# Interface to module:
10210# HAVE_XMLTO: 	used in makefiles to conditionally generate documentation
10211# XMLTO:	returns the path of the xmlto program found
10212#		returns the path set by the user in the environment
10213# --with-xmlto:	'yes' user instructs the module to use xmlto
10214#		'no' user instructs the module not to use xmlto
10215#
10216# Added in version 1.10.0
10217# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
10218#                  xmlto for text output requires either lynx, links, or w3m browsers
10219#
10220# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
10221#
10222AC_DEFUN([XORG_WITH_XMLTO],[
10223AC_ARG_VAR([XMLTO], [Path to xmlto command])
10224m4_define([_defopt], m4_default([$2], [auto]))
10225AC_ARG_WITH(xmlto,
10226	AS_HELP_STRING([--with-xmlto],
10227	   [Use xmlto to regenerate documentation (default: ]_defopt[)]),
10228	   [use_xmlto=$withval], [use_xmlto=]_defopt)
10229m4_undefine([_defopt])
10230
10231if test "x$use_xmlto" = x"auto"; then
10232   AC_PATH_PROG([XMLTO], [xmlto])
10233   if test "x$XMLTO" = "x"; then
10234        AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
10235	have_xmlto=no
10236   else
10237        have_xmlto=yes
10238   fi
10239elif test "x$use_xmlto" = x"yes" ; then
10240   AC_PATH_PROG([XMLTO], [xmlto])
10241   if test "x$XMLTO" = "x"; then
10242        AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
10243   fi
10244   have_xmlto=yes
10245elif test "x$use_xmlto" = x"no" ; then
10246   if test "x$XMLTO" != "x"; then
10247      AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
10248   fi
10249   have_xmlto=no
10250else
10251   AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
10252fi
10253
10254# Test for a minimum version of xmlto, if provided.
10255m4_ifval([$1],
10256[if test "$have_xmlto" = yes; then
10257    # scrape the xmlto version
10258    AC_MSG_CHECKING([the xmlto version])
10259    xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
10260    AC_MSG_RESULT([$xmlto_version])
10261    AS_VERSION_COMPARE([$xmlto_version], [$1],
10262        [if test "x$use_xmlto" = xauto; then
10263            AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
10264            have_xmlto=no
10265        else
10266            AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
10267        fi])
10268fi])
10269
10270# Test for the ability of xmlto to generate a text target
10271#
10272# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the
10273# following test for empty XML docbook files.
10274# For compatibility reasons use the following empty XML docbook file and if
10275# it fails try it again with a non-empty XML file.
10276have_xmlto_text=no
10277cat > conftest.xml << "EOF"
10278EOF
10279AS_IF([test "$have_xmlto" = yes],
10280      [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
10281             [have_xmlto_text=yes],
10282             [# Try it again with a non-empty XML file.
10283              cat > conftest.xml << "EOF"
10284<x></x>
10285EOF
10286              AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
10287                    [have_xmlto_text=yes],
10288                    [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])])
10289rm -f conftest.xml
10290AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
10291AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
10292]) # XORG_WITH_XMLTO
10293
10294# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT])
10295# --------------------------------------------
10296# Minimum version: 1.12.0
10297# Minimum version for optional DEFAULT argument: 1.12.0
10298#
10299# XSLT (Extensible Stylesheet Language Transformations) is a declarative,
10300# XML-based language used for the transformation of XML documents.
10301# The xsltproc command line tool is for applying XSLT stylesheets to XML documents.
10302# It is used under the cover by xmlto to generate html files from DocBook/XML.
10303# The XSLT processor is often used as a standalone tool for transformations.
10304# It should not be assumed that this tool is used only to work with documnetation.
10305# When DEFAULT is not specified, --with-xsltproc assumes 'auto'.
10306#
10307# Interface to module:
10308# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation
10309# XSLTPROC:	 returns the path of the xsltproc program found
10310#		 returns the path set by the user in the environment
10311# --with-xsltproc: 'yes' user instructs the module to use xsltproc
10312#		  'no' user instructs the module not to use xsltproc
10313# have_xsltproc: returns yes if xsltproc found in PATH or no
10314#
10315# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path.
10316#
10317AC_DEFUN([XORG_WITH_XSLTPROC],[
10318AC_ARG_VAR([XSLTPROC], [Path to xsltproc command])
10319# Preserves the interface, should it be implemented later
10320m4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])])
10321m4_define([_defopt], m4_default([$2], [auto]))
10322AC_ARG_WITH(xsltproc,
10323	AS_HELP_STRING([--with-xsltproc],
10324	   [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]),
10325	   [use_xsltproc=$withval], [use_xsltproc=]_defopt)
10326m4_undefine([_defopt])
10327
10328if test "x$use_xsltproc" = x"auto"; then
10329   AC_PATH_PROG([XSLTPROC], [xsltproc])
10330   if test "x$XSLTPROC" = "x"; then
10331        AC_MSG_WARN([xsltproc not found - cannot transform XML documents])
10332	have_xsltproc=no
10333   else
10334        have_xsltproc=yes
10335   fi
10336elif test "x$use_xsltproc" = x"yes" ; then
10337   AC_PATH_PROG([XSLTPROC], [xsltproc])
10338   if test "x$XSLTPROC" = "x"; then
10339        AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH])
10340   fi
10341   have_xsltproc=yes
10342elif test "x$use_xsltproc" = x"no" ; then
10343   if test "x$XSLTPROC" != "x"; then
10344      AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified])
10345   fi
10346   have_xsltproc=no
10347else
10348   AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no'])
10349fi
10350
10351AM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes])
10352]) # XORG_WITH_XSLTPROC
10353
10354# XORG_WITH_PERL([MIN-VERSION], [DEFAULT])
10355# ----------------------------------------
10356# Minimum version: 1.15.0
10357#
10358# PERL (Practical Extraction and Report Language) is a language optimized for
10359# scanning arbitrary text files, extracting information from those text files,
10360# and printing reports based on that information.
10361#
10362# When DEFAULT is not specified, --with-perl assumes 'auto'.
10363#
10364# Interface to module:
10365# HAVE_PERL: used in makefiles to conditionally scan text files
10366# PERL:	     returns the path of the perl program found
10367#	     returns the path set by the user in the environment
10368# --with-perl: 'yes' user instructs the module to use perl
10369#	       'no' user instructs the module not to use perl
10370# have_perl: returns yes if perl found in PATH or no
10371#
10372# If the user sets the value of PERL, AC_PATH_PROG skips testing the path.
10373#
10374AC_DEFUN([XORG_WITH_PERL],[
10375AC_ARG_VAR([PERL], [Path to perl command])
10376# Preserves the interface, should it be implemented later
10377m4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])])
10378m4_define([_defopt], m4_default([$2], [auto]))
10379AC_ARG_WITH(perl,
10380	AS_HELP_STRING([--with-perl],
10381	   [Use perl for extracting information from files (default: ]_defopt[)]),
10382	   [use_perl=$withval], [use_perl=]_defopt)
10383m4_undefine([_defopt])
10384
10385if test "x$use_perl" = x"auto"; then
10386   AC_PATH_PROG([PERL], [perl])
10387   if test "x$PERL" = "x"; then
10388        AC_MSG_WARN([perl not found - cannot extract information and report])
10389	have_perl=no
10390   else
10391        have_perl=yes
10392   fi
10393elif test "x$use_perl" = x"yes" ; then
10394   AC_PATH_PROG([PERL], [perl])
10395   if test "x$PERL" = "x"; then
10396        AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH])
10397   fi
10398   have_perl=yes
10399elif test "x$use_perl" = x"no" ; then
10400   if test "x$PERL" != "x"; then
10401      AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified])
10402   fi
10403   have_perl=no
10404else
10405   AC_MSG_ERROR([--with-perl expects 'yes' or 'no'])
10406fi
10407
10408AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes])
10409]) # XORG_WITH_PERL
10410
10411# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
10412# ----------------
10413# Minimum version: 1.5.0
10414# Minimum version for optional DEFAULT argument: 1.11.0
10415#
10416# Documentation tools are not always available on all platforms and sometimes
10417# not at the appropriate level. This macro enables a module to test for the
10418# presence of the tool and obtain it's path in separate variables. Coupled with
10419# the --with-asciidoc option, it allows maximum flexibilty in making decisions
10420# as whether or not to use the asciidoc package. When DEFAULT is not specified,
10421# --with-asciidoc assumes 'auto'.
10422#
10423# Interface to module:
10424# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
10425# ASCIIDOC:	 returns the path of the asciidoc program found
10426#		 returns the path set by the user in the environment
10427# --with-asciidoc: 'yes' user instructs the module to use asciidoc
10428#		  'no' user instructs the module not to use asciidoc
10429#
10430# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
10431#
10432AC_DEFUN([XORG_WITH_ASCIIDOC],[
10433AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
10434m4_define([_defopt], m4_default([$2], [auto]))
10435AC_ARG_WITH(asciidoc,
10436	AS_HELP_STRING([--with-asciidoc],
10437	   [Use asciidoc to regenerate documentation (default: ]_defopt[)]),
10438	   [use_asciidoc=$withval], [use_asciidoc=]_defopt)
10439m4_undefine([_defopt])
10440
10441if test "x$use_asciidoc" = x"auto"; then
10442   AC_PATH_PROG([ASCIIDOC], [asciidoc])
10443   if test "x$ASCIIDOC" = "x"; then
10444        AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
10445	have_asciidoc=no
10446   else
10447        have_asciidoc=yes
10448   fi
10449elif test "x$use_asciidoc" = x"yes" ; then
10450   AC_PATH_PROG([ASCIIDOC], [asciidoc])
10451   if test "x$ASCIIDOC" = "x"; then
10452        AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
10453   fi
10454   have_asciidoc=yes
10455elif test "x$use_asciidoc" = x"no" ; then
10456   if test "x$ASCIIDOC" != "x"; then
10457      AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
10458   fi
10459   have_asciidoc=no
10460else
10461   AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
10462fi
10463m4_ifval([$1],
10464[if test "$have_asciidoc" = yes; then
10465    # scrape the asciidoc version
10466    AC_MSG_CHECKING([the asciidoc version])
10467    asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
10468    AC_MSG_RESULT([$asciidoc_version])
10469    AS_VERSION_COMPARE([$asciidoc_version], [$1],
10470        [if test "x$use_asciidoc" = xauto; then
10471            AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
10472            have_asciidoc=no
10473        else
10474            AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
10475        fi])
10476fi])
10477AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
10478]) # XORG_WITH_ASCIIDOC
10479
10480# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
10481# -------------------------------------------
10482# Minimum version: 1.5.0
10483# Minimum version for optional DEFAULT argument: 1.11.0
10484# Minimum version for optional DOT checking: 1.18.0
10485#
10486# Documentation tools are not always available on all platforms and sometimes
10487# not at the appropriate level. This macro enables a module to test for the
10488# presence of the tool and obtain it's path in separate variables. Coupled with
10489# the --with-doxygen option, it allows maximum flexibilty in making decisions
10490# as whether or not to use the doxygen package. When DEFAULT is not specified,
10491# --with-doxygen assumes 'auto'.
10492#
10493# Interface to module:
10494# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
10495# DOXYGEN:	 returns the path of the doxygen program found
10496#		 returns the path set by the user in the environment
10497# --with-doxygen: 'yes' user instructs the module to use doxygen
10498#		  'no' user instructs the module not to use doxygen
10499#
10500# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
10501#
10502AC_DEFUN([XORG_WITH_DOXYGEN],[
10503AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
10504AC_ARG_VAR([DOT], [Path to the dot graphics utility])
10505m4_define([_defopt], m4_default([$2], [auto]))
10506AC_ARG_WITH(doxygen,
10507	AS_HELP_STRING([--with-doxygen],
10508	   [Use doxygen to regenerate documentation (default: ]_defopt[)]),
10509	   [use_doxygen=$withval], [use_doxygen=]_defopt)
10510m4_undefine([_defopt])
10511
10512if test "x$use_doxygen" = x"auto"; then
10513   AC_PATH_PROG([DOXYGEN], [doxygen])
10514   if test "x$DOXYGEN" = "x"; then
10515        AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
10516	have_doxygen=no
10517   else
10518        have_doxygen=yes
10519   fi
10520elif test "x$use_doxygen" = x"yes" ; then
10521   AC_PATH_PROG([DOXYGEN], [doxygen])
10522   if test "x$DOXYGEN" = "x"; then
10523        AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
10524   fi
10525   have_doxygen=yes
10526elif test "x$use_doxygen" = x"no" ; then
10527   if test "x$DOXYGEN" != "x"; then
10528      AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
10529   fi
10530   have_doxygen=no
10531else
10532   AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
10533fi
10534m4_ifval([$1],
10535[if test "$have_doxygen" = yes; then
10536    # scrape the doxygen version
10537    AC_MSG_CHECKING([the doxygen version])
10538    doxygen_version=`$DOXYGEN --version 2>/dev/null`
10539    AC_MSG_RESULT([$doxygen_version])
10540    AS_VERSION_COMPARE([$doxygen_version], [$1],
10541        [if test "x$use_doxygen" = xauto; then
10542            AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
10543            have_doxygen=no
10544        else
10545            AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
10546        fi])
10547fi])
10548
10549dnl Check for DOT if we have doxygen. The caller decides if it is mandatory
10550dnl HAVE_DOT is a variable that can be used in your doxygen.in config file:
10551dnl 	HAVE_DOT = @HAVE_DOT@
10552HAVE_DOT=no
10553if test "x$have_doxygen" = "xyes"; then
10554  AC_PATH_PROG([DOT], [dot])
10555    if test "x$DOT" != "x"; then
10556      HAVE_DOT=yes
10557    fi
10558fi
10559
10560AC_SUBST([HAVE_DOT])
10561AM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"])
10562AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
10563]) # XORG_WITH_DOXYGEN
10564
10565# XORG_WITH_GROFF([DEFAULT])
10566# ----------------
10567# Minimum version: 1.6.0
10568# Minimum version for optional DEFAULT argument: 1.11.0
10569#
10570# Documentation tools are not always available on all platforms and sometimes
10571# not at the appropriate level. This macro enables a module to test for the
10572# presence of the tool and obtain it's path in separate variables. Coupled with
10573# the --with-groff option, it allows maximum flexibilty in making decisions
10574# as whether or not to use the groff package. When DEFAULT is not specified,
10575# --with-groff assumes 'auto'.
10576#
10577# Interface to module:
10578# HAVE_GROFF:	 used in makefiles to conditionally generate documentation
10579# HAVE_GROFF_MM: the memorandum macros (-mm) package
10580# HAVE_GROFF_MS: the -ms macros package
10581# GROFF:	 returns the path of the groff program found
10582#		 returns the path set by the user in the environment
10583# --with-groff:	 'yes' user instructs the module to use groff
10584#		 'no' user instructs the module not to use groff
10585#
10586# Added in version 1.9.0:
10587# HAVE_GROFF_HTML: groff has dependencies to output HTML format:
10588#		   pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
10589#		   psselect from the psutils package.
10590#		   the ghostcript package. Refer to the grohtml man pages
10591#
10592# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
10593#
10594# OS and distros often splits groff in a basic and full package, the former
10595# having the groff program and the later having devices, fonts and macros
10596# Checking for the groff executable is not enough.
10597#
10598# If macros are missing, we cannot assume that groff is useless, so we don't
10599# unset HAVE_GROFF or GROFF env variables.
10600# HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
10601#
10602AC_DEFUN([XORG_WITH_GROFF],[
10603AC_ARG_VAR([GROFF], [Path to groff command])
10604m4_define([_defopt], m4_default([$1], [auto]))
10605AC_ARG_WITH(groff,
10606	AS_HELP_STRING([--with-groff],
10607	   [Use groff to regenerate documentation (default: ]_defopt[)]),
10608	   [use_groff=$withval], [use_groff=]_defopt)
10609m4_undefine([_defopt])
10610
10611if test "x$use_groff" = x"auto"; then
10612   AC_PATH_PROG([GROFF], [groff])
10613   if test "x$GROFF" = "x"; then
10614        AC_MSG_WARN([groff not found - documentation targets will be skipped])
10615	have_groff=no
10616   else
10617        have_groff=yes
10618   fi
10619elif test "x$use_groff" = x"yes" ; then
10620   AC_PATH_PROG([GROFF], [groff])
10621   if test "x$GROFF" = "x"; then
10622        AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
10623   fi
10624   have_groff=yes
10625elif test "x$use_groff" = x"no" ; then
10626   if test "x$GROFF" != "x"; then
10627      AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
10628   fi
10629   have_groff=no
10630else
10631   AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
10632fi
10633
10634# We have groff, test for the presence of the macro packages
10635if test "x$have_groff" = x"yes"; then
10636    AC_MSG_CHECKING([for ${GROFF} -ms macros])
10637    if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
10638        groff_ms_works=yes
10639    else
10640        groff_ms_works=no
10641    fi
10642    AC_MSG_RESULT([$groff_ms_works])
10643    AC_MSG_CHECKING([for ${GROFF} -mm macros])
10644    if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
10645        groff_mm_works=yes
10646    else
10647        groff_mm_works=no
10648    fi
10649    AC_MSG_RESULT([$groff_mm_works])
10650fi
10651
10652# We have groff, test for HTML dependencies, one command per package
10653if test "x$have_groff" = x"yes"; then
10654   AC_PATH_PROGS(GS_PATH, [gs gswin32c])
10655   AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
10656   AC_PATH_PROG(PSSELECT_PATH, [psselect])
10657   if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
10658      have_groff_html=yes
10659   else
10660      have_groff_html=no
10661      AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
10662   fi
10663fi
10664
10665# Set Automake conditionals for Makefiles
10666AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
10667AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
10668AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
10669AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
10670]) # XORG_WITH_GROFF
10671
10672# XORG_WITH_FOP([MIN-VERSION], [DEFAULT])
10673# ---------------------------------------
10674# Minimum version: 1.6.0
10675# Minimum version for optional DEFAULT argument: 1.11.0
10676# Minimum version for optional MIN-VERSION argument: 1.15.0
10677#
10678# Documentation tools are not always available on all platforms and sometimes
10679# not at the appropriate level. This macro enables a module to test for the
10680# presence of the tool and obtain it's path in separate variables. Coupled with
10681# the --with-fop option, it allows maximum flexibilty in making decisions
10682# as whether or not to use the fop package. When DEFAULT is not specified,
10683# --with-fop assumes 'auto'.
10684#
10685# Interface to module:
10686# HAVE_FOP: 	used in makefiles to conditionally generate documentation
10687# FOP:	 	returns the path of the fop program found
10688#		returns the path set by the user in the environment
10689# --with-fop: 	'yes' user instructs the module to use fop
10690#		'no' user instructs the module not to use fop
10691#
10692# If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
10693#
10694AC_DEFUN([XORG_WITH_FOP],[
10695AC_ARG_VAR([FOP], [Path to fop command])
10696m4_define([_defopt], m4_default([$2], [auto]))
10697AC_ARG_WITH(fop,
10698	AS_HELP_STRING([--with-fop],
10699	   [Use fop to regenerate documentation (default: ]_defopt[)]),
10700	   [use_fop=$withval], [use_fop=]_defopt)
10701m4_undefine([_defopt])
10702
10703if test "x$use_fop" = x"auto"; then
10704   AC_PATH_PROG([FOP], [fop])
10705   if test "x$FOP" = "x"; then
10706        AC_MSG_WARN([fop not found - documentation targets will be skipped])
10707	have_fop=no
10708   else
10709        have_fop=yes
10710   fi
10711elif test "x$use_fop" = x"yes" ; then
10712   AC_PATH_PROG([FOP], [fop])
10713   if test "x$FOP" = "x"; then
10714        AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
10715   fi
10716   have_fop=yes
10717elif test "x$use_fop" = x"no" ; then
10718   if test "x$FOP" != "x"; then
10719      AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
10720   fi
10721   have_fop=no
10722else
10723   AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
10724fi
10725
10726# Test for a minimum version of fop, if provided.
10727m4_ifval([$1],
10728[if test "$have_fop" = yes; then
10729    # scrape the fop version
10730    AC_MSG_CHECKING([for fop minimum version])
10731    fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3`
10732    AC_MSG_RESULT([$fop_version])
10733    AS_VERSION_COMPARE([$fop_version], [$1],
10734        [if test "x$use_fop" = xauto; then
10735            AC_MSG_WARN([fop version $fop_version found, but $1 needed])
10736            have_fop=no
10737        else
10738            AC_MSG_ERROR([fop version $fop_version found, but $1 needed])
10739        fi])
10740fi])
10741AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
10742]) # XORG_WITH_FOP
10743
10744# XORG_WITH_M4([MIN-VERSION])
10745# ---------------------------
10746# Minimum version: 1.19.0
10747#
10748# This macro attempts to locate an m4 macro processor which supports
10749# -I option and is only useful for modules relying on M4 in order to
10750# expand macros in source code files.
10751#
10752# Interface to module:
10753# M4:	 	returns the path of the m4 program found
10754#		returns the path set by the user in the environment
10755#
10756AC_DEFUN([XORG_WITH_M4], [
10757AC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4],
10758   [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4],
10759       [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \
10760         ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]],
10761   [AC_MSG_ERROR([could not find m4 that supports -I option])],
10762   [$PATH:/usr/gnu/bin])])
10763
10764AC_SUBST([M4], [$ac_cv_path_M4])
10765]) # XORG_WITH_M4
10766
10767# XORG_WITH_PS2PDF([DEFAULT])
10768# ----------------
10769# Minimum version: 1.6.0
10770# Minimum version for optional DEFAULT argument: 1.11.0
10771#
10772# Documentation tools are not always available on all platforms and sometimes
10773# not at the appropriate level. This macro enables a module to test for the
10774# presence of the tool and obtain it's path in separate variables. Coupled with
10775# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
10776# as whether or not to use the ps2pdf package. When DEFAULT is not specified,
10777# --with-ps2pdf assumes 'auto'.
10778#
10779# Interface to module:
10780# HAVE_PS2PDF: 	used in makefiles to conditionally generate documentation
10781# PS2PDF:	returns the path of the ps2pdf program found
10782#		returns the path set by the user in the environment
10783# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
10784#		 'no' user instructs the module not to use ps2pdf
10785#
10786# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
10787#
10788AC_DEFUN([XORG_WITH_PS2PDF],[
10789AC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
10790m4_define([_defopt], m4_default([$1], [auto]))
10791AC_ARG_WITH(ps2pdf,
10792	AS_HELP_STRING([--with-ps2pdf],
10793	   [Use ps2pdf to regenerate documentation (default: ]_defopt[)]),
10794	   [use_ps2pdf=$withval], [use_ps2pdf=]_defopt)
10795m4_undefine([_defopt])
10796
10797if test "x$use_ps2pdf" = x"auto"; then
10798   AC_PATH_PROG([PS2PDF], [ps2pdf])
10799   if test "x$PS2PDF" = "x"; then
10800        AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
10801	have_ps2pdf=no
10802   else
10803        have_ps2pdf=yes
10804   fi
10805elif test "x$use_ps2pdf" = x"yes" ; then
10806   AC_PATH_PROG([PS2PDF], [ps2pdf])
10807   if test "x$PS2PDF" = "x"; then
10808        AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
10809   fi
10810   have_ps2pdf=yes
10811elif test "x$use_ps2pdf" = x"no" ; then
10812   if test "x$PS2PDF" != "x"; then
10813      AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
10814   fi
10815   have_ps2pdf=no
10816else
10817   AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
10818fi
10819AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
10820]) # XORG_WITH_PS2PDF
10821
10822# XORG_ENABLE_DOCS (enable_docs=yes)
10823# ----------------
10824# Minimum version: 1.6.0
10825#
10826# Documentation tools are not always available on all platforms and sometimes
10827# not at the appropriate level. This macro enables a builder to skip all
10828# documentation targets except traditional man pages.
10829# Combined with the specific tool checking macros XORG_WITH_*, it provides
10830# maximum flexibilty in controlling documentation building.
10831# Refer to:
10832# XORG_WITH_XMLTO         --with-xmlto
10833# XORG_WITH_ASCIIDOC      --with-asciidoc
10834# XORG_WITH_DOXYGEN       --with-doxygen
10835# XORG_WITH_FOP           --with-fop
10836# XORG_WITH_GROFF         --with-groff
10837# XORG_WITH_PS2PDF        --with-ps2pdf
10838#
10839# Interface to module:
10840# ENABLE_DOCS: 	  used in makefiles to conditionally generate documentation
10841# --enable-docs: 'yes' user instructs the module to generate docs
10842#		 'no' user instructs the module not to generate docs
10843# parm1:	specify the default value, yes or no.
10844#
10845AC_DEFUN([XORG_ENABLE_DOCS],[
10846m4_define([docs_default], m4_default([$1], [yes]))
10847AC_ARG_ENABLE(docs,
10848	AS_HELP_STRING([--enable-docs],
10849	   [Enable building the documentation (default: ]docs_default[)]),
10850	   [build_docs=$enableval], [build_docs=]docs_default)
10851m4_undefine([docs_default])
10852AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
10853AC_MSG_CHECKING([whether to build documentation])
10854AC_MSG_RESULT([$build_docs])
10855]) # XORG_ENABLE_DOCS
10856
10857# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
10858# ----------------
10859# Minimum version: 1.6.0
10860#
10861# This macro enables a builder to skip all developer documentation.
10862# Combined with the specific tool checking macros XORG_WITH_*, it provides
10863# maximum flexibilty in controlling documentation building.
10864# Refer to:
10865# XORG_WITH_XMLTO         --with-xmlto
10866# XORG_WITH_ASCIIDOC      --with-asciidoc
10867# XORG_WITH_DOXYGEN       --with-doxygen
10868# XORG_WITH_FOP           --with-fop
10869# XORG_WITH_GROFF         --with-groff
10870# XORG_WITH_PS2PDF        --with-ps2pdf
10871#
10872# Interface to module:
10873# ENABLE_DEVEL_DOCS:	used in makefiles to conditionally generate developer docs
10874# --enable-devel-docs:	'yes' user instructs the module to generate developer docs
10875#			'no' user instructs the module not to generate developer docs
10876# parm1:		specify the default value, yes or no.
10877#
10878AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
10879m4_define([devel_default], m4_default([$1], [yes]))
10880AC_ARG_ENABLE(devel-docs,
10881	AS_HELP_STRING([--enable-devel-docs],
10882	   [Enable building the developer documentation (default: ]devel_default[)]),
10883	   [build_devel_docs=$enableval], [build_devel_docs=]devel_default)
10884m4_undefine([devel_default])
10885AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
10886AC_MSG_CHECKING([whether to build developer documentation])
10887AC_MSG_RESULT([$build_devel_docs])
10888]) # XORG_ENABLE_DEVEL_DOCS
10889
10890# XORG_ENABLE_SPECS (enable_specs=yes)
10891# ----------------
10892# Minimum version: 1.6.0
10893#
10894# This macro enables a builder to skip all functional specification targets.
10895# Combined with the specific tool checking macros XORG_WITH_*, it provides
10896# maximum flexibilty in controlling documentation building.
10897# Refer to:
10898# XORG_WITH_XMLTO         --with-xmlto
10899# XORG_WITH_ASCIIDOC      --with-asciidoc
10900# XORG_WITH_DOXYGEN       --with-doxygen
10901# XORG_WITH_FOP           --with-fop
10902# XORG_WITH_GROFF         --with-groff
10903# XORG_WITH_PS2PDF        --with-ps2pdf
10904#
10905# Interface to module:
10906# ENABLE_SPECS:		used in makefiles to conditionally generate specs
10907# --enable-specs:	'yes' user instructs the module to generate specs
10908#			'no' user instructs the module not to generate specs
10909# parm1:		specify the default value, yes or no.
10910#
10911AC_DEFUN([XORG_ENABLE_SPECS],[
10912m4_define([spec_default], m4_default([$1], [yes]))
10913AC_ARG_ENABLE(specs,
10914	AS_HELP_STRING([--enable-specs],
10915	   [Enable building the specs (default: ]spec_default[)]),
10916	   [build_specs=$enableval], [build_specs=]spec_default)
10917m4_undefine([spec_default])
10918AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
10919AC_MSG_CHECKING([whether to build functional specifications])
10920AC_MSG_RESULT([$build_specs])
10921]) # XORG_ENABLE_SPECS
10922
10923# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto)
10924# ----------------------------------------------
10925# Minimum version: 1.13.0
10926#
10927# This macro enables a builder to enable/disable unit testing
10928# It makes no assumption about the test cases implementation
10929# Test cases may or may not use Automake "Support for test suites"
10930# They may or may not use the software utility library GLib
10931#
10932# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL
10933# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib.
10934# The variable enable_unit_tests is used by other macros in this file.
10935#
10936# Interface to module:
10937# ENABLE_UNIT_TESTS:	used in makefiles to conditionally build tests
10938# enable_unit_tests:    used in configure.ac for additional configuration
10939# --enable-unit-tests:	'yes' user instructs the module to build tests
10940#			'no' user instructs the module not to build tests
10941# parm1:		specify the default value, yes or no.
10942#
10943AC_DEFUN([XORG_ENABLE_UNIT_TESTS],[
10944AC_BEFORE([$0], [XORG_WITH_GLIB])
10945AC_BEFORE([$0], [XORG_LD_WRAP])
10946AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS])
10947m4_define([_defopt], m4_default([$1], [auto]))
10948AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests],
10949	[Enable building unit test cases (default: ]_defopt[)]),
10950	[enable_unit_tests=$enableval], [enable_unit_tests=]_defopt)
10951m4_undefine([_defopt])
10952AM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno])
10953AC_MSG_CHECKING([whether to build unit test cases])
10954AC_MSG_RESULT([$enable_unit_tests])
10955]) # XORG_ENABLE_UNIT_TESTS
10956
10957# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto)
10958# ------------------------------------------------------
10959# Minimum version: 1.17.0
10960#
10961# This macro enables a builder to enable/disable integration testing
10962# It makes no assumption about the test cases' implementation
10963# Test cases may or may not use Automake "Support for test suites"
10964#
10965# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support
10966# usually requires less dependencies and may be built and run under less
10967# stringent environments than integration tests.
10968#
10969# Interface to module:
10970# ENABLE_INTEGRATION_TESTS:   used in makefiles to conditionally build tests
10971# enable_integration_tests:   used in configure.ac for additional configuration
10972# --enable-integration-tests: 'yes' user instructs the module to build tests
10973#                             'no' user instructs the module not to build tests
10974# parm1:                      specify the default value, yes or no.
10975#
10976AC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[
10977AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS])
10978m4_define([_defopt], m4_default([$1], [auto]))
10979AC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests],
10980	[Enable building integration test cases (default: ]_defopt[)]),
10981	[enable_integration_tests=$enableval],
10982	[enable_integration_tests=]_defopt)
10983m4_undefine([_defopt])
10984AM_CONDITIONAL([ENABLE_INTEGRATION_TESTS],
10985	[test "x$enable_integration_tests" != xno])
10986AC_MSG_CHECKING([whether to build unit test cases])
10987AC_MSG_RESULT([$enable_integration_tests])
10988]) # XORG_ENABLE_INTEGRATION_TESTS
10989
10990# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT])
10991# ----------------------------------------
10992# Minimum version: 1.13.0
10993#
10994# GLib is a library which provides advanced data structures and functions.
10995# This macro enables a module to test for the presence of Glib.
10996#
10997# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing.
10998# Otherwise the value of $enable_unit_tests is blank.
10999#
11000# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit
11001# test support usually requires less dependencies and may be built and run under
11002# less stringent environments than integration tests.
11003#
11004# Interface to module:
11005# HAVE_GLIB: used in makefiles to conditionally build targets
11006# with_glib: used in configure.ac to know if GLib has been found
11007# --with-glib:	'yes' user instructs the module to use glib
11008#		'no' user instructs the module not to use glib
11009#
11010AC_DEFUN([XORG_WITH_GLIB],[
11011AC_REQUIRE([PKG_PROG_PKG_CONFIG])
11012m4_define([_defopt], m4_default([$2], [auto]))
11013AC_ARG_WITH(glib, AS_HELP_STRING([--with-glib],
11014	[Use GLib library for unit testing (default: ]_defopt[)]),
11015	[with_glib=$withval], [with_glib=]_defopt)
11016m4_undefine([_defopt])
11017
11018have_glib=no
11019# Do not probe GLib if user explicitly disabled unit testing
11020if test "x$enable_unit_tests" != x"no"; then
11021  # Do not probe GLib if user explicitly disabled it
11022  if test "x$with_glib" != x"no"; then
11023    m4_ifval(
11024      [$1],
11025      [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])],
11026      [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])]
11027    )
11028  fi
11029fi
11030
11031# Not having GLib when unit testing has been explicitly requested is an error
11032if test "x$enable_unit_tests" = x"yes"; then
11033  if test "x$have_glib" = x"no"; then
11034    AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
11035  fi
11036fi
11037
11038# Having unit testing disabled when GLib has been explicitly requested is an error
11039if test "x$enable_unit_tests" = x"no"; then
11040  if test "x$with_glib" = x"yes"; then
11041    AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
11042  fi
11043fi
11044
11045# Not having GLib when it has been explicitly requested is an error
11046if test "x$with_glib" = x"yes"; then
11047  if test "x$have_glib" = x"no"; then
11048    AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found])
11049  fi
11050fi
11051
11052AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes])
11053]) # XORG_WITH_GLIB
11054
11055# XORG_LD_WRAP([required|optional])
11056# ---------------------------------
11057# Minimum version: 1.13.0
11058#
11059# Check if linker supports -wrap, passed via compiler flags
11060#
11061# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing.
11062# Otherwise the value of $enable_unit_tests is blank.
11063#
11064# Argument added in 1.16.0 - default is "required", to match existing behavior
11065# of returning an error if enable_unit_tests is yes, and ld -wrap is not
11066# available, an argument of "optional" allows use when some unit tests require
11067# ld -wrap and others do not.
11068#
11069AC_DEFUN([XORG_LD_WRAP],[
11070XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no],
11071    [AC_LANG_PROGRAM([#include <stdlib.h>
11072                      void __wrap_exit(int status) { return; }],
11073                     [exit(0);])])
11074# Not having ld wrap when unit testing has been explicitly requested is an error
11075if test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then
11076  if test "x$have_ld_wrap" = x"no"; then
11077    AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available])
11078  fi
11079fi
11080AM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes])
11081#
11082]) # XORG_LD_WRAP
11083
11084# XORG_CHECK_LINKER_FLAGS
11085# -----------------------
11086# SYNOPSIS
11087#
11088#   XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE])
11089#
11090# DESCRIPTION
11091#
11092#   Check whether the given linker FLAGS work with the current language's
11093#   linker, or whether they give an error.
11094#
11095#   ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
11096#   success/failure.
11097#
11098#   PROGRAM-SOURCE is the program source to link with, if needed
11099#
11100#   NOTE: Based on AX_CHECK_COMPILER_FLAGS.
11101#
11102# LICENSE
11103#
11104#   Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org>
11105#   Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu>
11106#   Copyright (c) 2009 Matteo Frigo
11107#
11108#   This program is free software: you can redistribute it and/or modify it
11109#   under the terms of the GNU General Public License as published by the
11110#   Free Software Foundation, either version 3 of the License, or (at your
11111#   option) any later version.
11112#
11113#   This program is distributed in the hope that it will be useful, but
11114#   WITHOUT ANY WARRANTY; without even the implied warranty of
11115#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
11116#   Public License for more details.
11117#
11118#   You should have received a copy of the GNU General Public License along
11119#   with this program. If not, see <http://www.gnu.org/licenses/>.
11120#
11121#   As a special exception, the respective Autoconf Macro's copyright owner
11122#   gives unlimited permission to copy, distribute and modify the configure
11123#   scripts that are the output of Autoconf when processing the Macro. You
11124#   need not follow the terms of the GNU General Public License when using
11125#   or distributing such scripts, even though portions of the text of the
11126#   Macro appear in them. The GNU General Public License (GPL) does govern
11127#   all other use of the material that constitutes the Autoconf Macro.
11128#
11129#   This special exception to the GPL applies to versions of the Autoconf
11130#   Macro released by the Autoconf Archive. When you make and distribute a
11131#   modified version of the Autoconf Macro, you may extend this special
11132#   exception to the GPL to apply to your modified version as well.#
11133AC_DEFUN([XORG_CHECK_LINKER_FLAGS],
11134[AC_MSG_CHECKING([whether the linker accepts $1])
11135dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname:
11136AS_LITERAL_IF([$1],
11137  [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [
11138      ax_save_FLAGS=$LDFLAGS
11139      LDFLAGS="$1"
11140      AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])],
11141        AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
11142        AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
11143      LDFLAGS=$ax_save_FLAGS])],
11144  [ax_save_FLAGS=$LDFLAGS
11145   LDFLAGS="$1"
11146   AC_LINK_IFELSE([AC_LANG_PROGRAM()],
11147     eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
11148     eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
11149   LDFLAGS=$ax_save_FLAGS])
11150eval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1])
11151AC_MSG_RESULT($xorg_check_linker_flags)
11152if test "x$xorg_check_linker_flags" = xyes; then
11153	m4_default([$2], :)
11154else
11155	m4_default([$3], :)
11156fi
11157]) # XORG_CHECK_LINKER_FLAGS
11158
11159# XORG_MEMORY_CHECK_FLAGS
11160# -----------------------
11161# Minimum version: 1.16.0
11162#
11163# This macro attempts to find appropriate memory checking functionality
11164# for various platforms which unit testing code may use to catch various
11165# forms of memory allocation and access errors in testing.
11166#
11167# Interface to module:
11168# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging
11169#                         Usually added to TESTS_ENVIRONMENT in Makefile.am
11170#
11171# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim.
11172#
11173AC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[
11174
11175AC_REQUIRE([AC_CANONICAL_HOST])
11176AC_ARG_VAR([XORG_MALLOC_DEBUG_ENV],
11177           [Environment variables to enable memory checking in tests])
11178
11179# Check for different types of support on different platforms
11180case $host_os in
11181    solaris*)
11182        AC_CHECK_LIB([umem], [umem_alloc],
11183            [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default'])
11184        ;;
11185    *-gnu*) # GNU libc - Value is used as a single byte bit pattern,
11186        # both directly and inverted, so should not be 0 or 255.
11187        malloc_debug_env='MALLOC_PERTURB_=15'
11188        ;;
11189    darwin*)
11190        malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib'
11191        ;;
11192    *bsd*)
11193        malloc_debug_env='MallocPreScribble=1 MallocScribble=1'
11194        ;;
11195esac
11196
11197# User supplied flags override default flags
11198if test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then
11199    malloc_debug_env="$XORG_MALLOC_DEBUG_ENV"
11200fi
11201
11202AC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env])
11203]) # XORG_WITH_LINT
11204
11205# XORG_CHECK_MALLOC_ZERO
11206# ----------------------
11207# Minimum version: 1.0.0
11208#
11209# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
11210# malloc(0) returns NULL.  Packages should add one of these cflags to
11211# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
11212AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
11213AC_ARG_ENABLE(malloc0returnsnull,
11214	AS_HELP_STRING([--enable-malloc0returnsnull],
11215		       [malloc(0) returns NULL (default: auto)]),
11216	[MALLOC_ZERO_RETURNS_NULL=$enableval],
11217	[MALLOC_ZERO_RETURNS_NULL=auto])
11218
11219AC_MSG_CHECKING([whether malloc(0) returns NULL])
11220if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
11221AC_CACHE_VAL([xorg_cv_malloc0_returns_null],
11222	[AC_RUN_IFELSE([AC_LANG_PROGRAM([
11223#include <stdlib.h>
11224],[
11225    char *m0, *r0, *c0, *p;
11226    m0 = malloc(0);
11227    p = malloc(10);
11228    r0 = realloc(p,0);
11229    c0 = calloc(0,10);
11230    exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1);
11231])],
11232		[xorg_cv_malloc0_returns_null=yes],
11233		[xorg_cv_malloc0_returns_null=no])])
11234MALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null
11235fi
11236AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
11237
11238if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
11239	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
11240	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
11241	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
11242else
11243	MALLOC_ZERO_CFLAGS=""
11244	XMALLOC_ZERO_CFLAGS=""
11245	XTMALLOC_ZERO_CFLAGS=""
11246fi
11247
11248AC_SUBST([MALLOC_ZERO_CFLAGS])
11249AC_SUBST([XMALLOC_ZERO_CFLAGS])
11250AC_SUBST([XTMALLOC_ZERO_CFLAGS])
11251]) # XORG_CHECK_MALLOC_ZERO
11252
11253# XORG_WITH_LINT()
11254# ----------------
11255# Minimum version: 1.1.0
11256#
11257# This macro enables the use of a tool that flags some suspicious and
11258# non-portable constructs (likely to be bugs) in C language source code.
11259# It will attempt to locate the tool and use appropriate options.
11260# There are various lint type tools on different platforms.
11261#
11262# Interface to module:
11263# LINT:		returns the path to the tool found on the platform
11264#		or the value set to LINT on the configure cmd line
11265#		also an Automake conditional
11266# LINT_FLAGS:	an Automake variable with appropriate flags
11267#
11268# --with-lint:	'yes' user instructs the module to use lint
11269#		'no' user instructs the module not to use lint (default)
11270#
11271# If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
11272# If the user sets the value of LINT_FLAGS, they are used verbatim.
11273#
11274AC_DEFUN([XORG_WITH_LINT],[
11275
11276AC_ARG_VAR([LINT], [Path to a lint-style command])
11277AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
11278AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
11279		[Use a lint-style source code checker (default: disabled)])],
11280		[use_lint=$withval], [use_lint=no])
11281
11282# Obtain platform specific info like program name and options
11283# The lint program on FreeBSD and NetBSD is different from the one on Solaris
11284case $host_os in
11285  *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
11286	lint_name=splint
11287	lint_options="-badflag"
11288	;;
11289  *freebsd* | *netbsd*)
11290	lint_name=lint
11291	lint_options="-u -b"
11292	;;
11293  *solaris*)
11294	lint_name=lint
11295	lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
11296	;;
11297esac
11298
11299# Test for the presence of the program (either guessed by the code or spelled out by the user)
11300if test "x$use_lint" = x"yes" ; then
11301   AC_PATH_PROG([LINT], [$lint_name])
11302   if test "x$LINT" = "x"; then
11303        AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
11304   fi
11305elif test "x$use_lint" = x"no" ; then
11306   if test "x$LINT" != "x"; then
11307      AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
11308   fi
11309else
11310   AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
11311fi
11312
11313# User supplied flags override default flags
11314if test "x$LINT_FLAGS" != "x"; then
11315   lint_options=$LINT_FLAGS
11316fi
11317
11318AC_SUBST([LINT_FLAGS],[$lint_options])
11319AM_CONDITIONAL(LINT, [test "x$LINT" != x])
11320
11321]) # XORG_WITH_LINT
11322
11323# XORG_LINT_LIBRARY(LIBNAME)
11324# --------------------------
11325# Minimum version: 1.1.0
11326#
11327# Sets up flags for building lint libraries for checking programs that call
11328# functions in the library.
11329#
11330# Interface to module:
11331# LINTLIB		- Automake variable with the name of lint library file to make
11332# MAKE_LINT_LIB		- Automake conditional
11333#
11334# --enable-lint-library:  - 'yes' user instructs the module to created a lint library
11335#			  - 'no' user instructs the module not to create a lint library (default)
11336
11337AC_DEFUN([XORG_LINT_LIBRARY],[
11338AC_REQUIRE([XORG_WITH_LINT])
11339AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
11340	[Create lint library (default: disabled)])],
11341	[make_lint_lib=$enableval], [make_lint_lib=no])
11342
11343if test "x$make_lint_lib" = x"yes" ; then
11344   LINTLIB=llib-l$1.ln
11345   if test "x$LINT" = "x"; then
11346        AC_MSG_ERROR([Cannot make lint library without --with-lint])
11347   fi
11348elif test "x$make_lint_lib" != x"no" ; then
11349   AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
11350fi
11351
11352AC_SUBST(LINTLIB)
11353AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
11354
11355]) # XORG_LINT_LIBRARY
11356
11357# XORG_COMPILER_BRAND
11358# -------------------
11359# Minimum version: 1.14.0
11360#
11361# Checks for various brands of compilers and sets flags as appropriate:
11362#   GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes"
11363#   GNU g++ - relies on AC_PROG_CXX to set GXX to "yes"
11364#   clang compiler - sets CLANGCC to "yes"
11365#   Intel compiler - sets INTELCC to "yes"
11366#   Sun/Oracle Solaris Studio cc - sets SUNCC to "yes"
11367#
11368AC_DEFUN([XORG_COMPILER_BRAND], [
11369AC_LANG_CASE(
11370	[C], [
11371		AC_REQUIRE([AC_PROG_CC_C99])
11372	],
11373	[C++], [
11374		AC_REQUIRE([AC_PROG_CXX])
11375	]
11376)
11377AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"])
11378AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
11379AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
11380]) # XORG_COMPILER_BRAND
11381
11382# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...])
11383# ---------------
11384# Minimum version: 1.16.0
11385#
11386# Test if the compiler works when passed the given flag as a command line argument.
11387# If it succeeds, the flag is appeneded to the given variable.  If not, it tries the
11388# next flag in the list until there are no more options.
11389#
11390# Note that this does not guarantee that the compiler supports the flag as some
11391# compilers will simply ignore arguments that they do not understand, but we do
11392# attempt to weed out false positives by using -Werror=unknown-warning-option and
11393# -Werror=unused-command-line-argument
11394#
11395AC_DEFUN([XORG_TESTSET_CFLAG], [
11396m4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
11397m4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
11398
11399AC_LANG_COMPILER_REQUIRE
11400
11401AC_LANG_CASE(
11402	[C], [
11403		AC_REQUIRE([AC_PROG_CC_C99])
11404		define([PREFIX], [C])
11405		define([CACHE_PREFIX], [cc])
11406		define([COMPILER], [$CC])
11407	],
11408	[C++], [
11409		define([PREFIX], [CXX])
11410		define([CACHE_PREFIX], [cxx])
11411		define([COMPILER], [$CXX])
11412	]
11413)
11414
11415[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]"
11416
11417if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then
11418	PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
11419	AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option],
11420			[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option],
11421			AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
11422					  [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes],
11423					  [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no]))
11424	[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option]
11425	PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
11426fi
11427
11428if test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then
11429	if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then
11430		PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
11431	fi
11432	PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
11433	AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument],
11434			[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument],
11435			AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
11436					  [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes],
11437					  [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no]))
11438	[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument]
11439	PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
11440fi
11441
11442found="no"
11443m4_foreach([flag], m4_cdr($@), [
11444	if test $found = "no" ; then
11445		if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then
11446			PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
11447		fi
11448
11449		if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then
11450			PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
11451		fi
11452
11453		PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag["
11454
11455dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname
11456		AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[])
11457		cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[])
11458		AC_CACHE_VAL($cacheid,
11459			     [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])],
11460					     [eval $cacheid=yes],
11461					     [eval $cacheid=no])])
11462
11463		PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
11464
11465		eval supported=\$$cacheid
11466		AC_MSG_RESULT([$supported])
11467		if test "$supported" = "yes" ; then
11468			$1="$$1 ]flag["
11469			found="yes"
11470		fi
11471	fi
11472])
11473]) # XORG_TESTSET_CFLAG
11474
11475# XORG_COMPILER_FLAGS
11476# ---------------
11477# Minimum version: 1.16.0
11478#
11479# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line
11480# arguments supported by the selected compiler which do NOT alter the generated
11481# code.  These arguments will cause the compiler to print various warnings
11482# during compilation AND turn a conservative set of warnings into errors.
11483#
11484# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in
11485# future versions of util-macros as options are added to new compilers.
11486#
11487AC_DEFUN([XORG_COMPILER_FLAGS], [
11488AC_REQUIRE([XORG_COMPILER_BRAND])
11489
11490AC_ARG_ENABLE(selective-werror,
11491              AS_HELP_STRING([--disable-selective-werror],
11492                             [Turn off selective compiler errors. (default: enabled)]),
11493              [SELECTIVE_WERROR=$enableval],
11494              [SELECTIVE_WERROR=yes])
11495
11496AC_LANG_CASE(
11497        [C], [
11498                define([PREFIX], [C])
11499        ],
11500        [C++], [
11501                define([PREFIX], [CXX])
11502        ]
11503)
11504# -v is too short to test reliably with XORG_TESTSET_CFLAG
11505if test "x$SUNCC" = "xyes"; then
11506    [BASE_]PREFIX[FLAGS]="-v"
11507else
11508    [BASE_]PREFIX[FLAGS]=""
11509fi
11510
11511# This chunk of warnings were those that existed in the legacy CWARNFLAGS
11512XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall])
11513XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith])
11514XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations])
11515XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat])
11516
11517AC_LANG_CASE(
11518	[C], [
11519		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes])
11520		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes])
11521		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs])
11522		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast])
11523		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd])
11524		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement])
11525	]
11526)
11527
11528# This chunk adds additional warnings that could catch undesired effects.
11529XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused])
11530XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized])
11531XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow])
11532XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn])
11533XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute])
11534XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls])
11535XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
11536
11537# These are currently disabled because they are noisy.  They will be enabled
11538# in the future once the codebase is sufficiently modernized to silence
11539# them.  For now, I don't want them to drown out the other warnings.
11540# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses])
11541# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
11542# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
11543
11544# Turn some warnings into errors, so we don't accidently get successful builds
11545# when there are problems that should be fixed.
11546
11547if test "x$SELECTIVE_WERROR" = "xyes" ; then
11548XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED])
11549XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull])
11550XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self])
11551XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main])
11552XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces])
11553XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point])
11554XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT])
11555XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs])
11556XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds])
11557XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings])
11558XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address])
11559XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION])
11560XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION
11561else
11562AC_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])
11563XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit])
11564XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull])
11565XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self])
11566XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain])
11567XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces])
11568XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point])
11569XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type])
11570XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs])
11571XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds])
11572XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings])
11573XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress])
11574XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast])
11575XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast])
11576fi
11577
11578AC_SUBST([BASE_]PREFIX[FLAGS])
11579]) # XORG_COMPILER_FLAGS
11580
11581# XORG_CWARNFLAGS
11582# ---------------
11583# Minimum version: 1.2.0
11584# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead)
11585#
11586# Defines CWARNFLAGS to enable C compiler warnings.
11587#
11588# This function is deprecated because it defines -fno-strict-aliasing
11589# which alters the code generated by the compiler.  If -fno-strict-aliasing
11590# is needed, then it should be added explicitly in the module when
11591# it is updated to use BASE_CFLAGS.
11592#
11593AC_DEFUN([XORG_CWARNFLAGS], [
11594AC_REQUIRE([XORG_COMPILER_FLAGS])
11595AC_REQUIRE([XORG_COMPILER_BRAND])
11596AC_LANG_CASE(
11597	[C], [
11598		CWARNFLAGS="$BASE_CFLAGS"
11599		if  test "x$GCC" = xyes ; then
11600		    CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing"
11601		fi
11602		AC_SUBST(CWARNFLAGS)
11603	]
11604)
11605]) # XORG_CWARNFLAGS
11606
11607# XORG_STRICT_OPTION
11608# -----------------------
11609# Minimum version: 1.3.0
11610#
11611# Add configure option to enable strict compilation flags, such as treating
11612# warnings as fatal errors.
11613# If --enable-strict-compilation is passed to configure, adds strict flags to
11614# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS.
11615#
11616# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or
11617# when strict compilation is unconditionally desired.
11618AC_DEFUN([XORG_STRICT_OPTION], [
11619AC_REQUIRE([XORG_CWARNFLAGS])
11620AC_REQUIRE([XORG_COMPILER_FLAGS])
11621
11622AC_ARG_ENABLE(strict-compilation,
11623			  AS_HELP_STRING([--enable-strict-compilation],
11624			  [Enable all warnings from compiler and make them errors (default: disabled)]),
11625			  [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
11626
11627AC_LANG_CASE(
11628        [C], [
11629                define([PREFIX], [C])
11630        ],
11631        [C++], [
11632                define([PREFIX], [CXX])
11633        ]
11634)
11635
11636[STRICT_]PREFIX[FLAGS]=""
11637XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic])
11638XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn])
11639
11640# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not
11641# activate it with -Werror, so we add it here explicitly.
11642XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes])
11643
11644if test "x$STRICT_COMPILE" = "xyes"; then
11645    [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]"
11646    AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"])
11647fi
11648AC_SUBST([STRICT_]PREFIX[FLAGS])
11649AC_SUBST([BASE_]PREFIX[FLAGS])
11650AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS]))
11651]) # XORG_STRICT_OPTION
11652
11653# XORG_DEFAULT_OPTIONS
11654# --------------------
11655# Minimum version: 1.3.0
11656#
11657# Defines default options for X.Org modules.
11658#
11659AC_DEFUN([XORG_DEFAULT_OPTIONS], [
11660AC_REQUIRE([AC_PROG_INSTALL])
11661XORG_COMPILER_FLAGS
11662XORG_CWARNFLAGS
11663XORG_STRICT_OPTION
11664XORG_RELEASE_VERSION
11665XORG_CHANGELOG
11666XORG_INSTALL
11667XORG_MANPAGE_SECTIONS
11668m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
11669    [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
11670]) # XORG_DEFAULT_OPTIONS
11671
11672# XORG_INSTALL()
11673# ----------------
11674# Minimum version: 1.4.0
11675#
11676# Defines the variable INSTALL_CMD as the command to copy
11677# INSTALL from $prefix/share/util-macros.
11678#
11679AC_DEFUN([XORG_INSTALL], [
11680AC_REQUIRE([PKG_PROG_PKG_CONFIG])
11681macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
11682INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
11683mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
11684|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \
11685touch \$(top_srcdir)/INSTALL; \
11686echo 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))"
11687AC_SUBST([INSTALL_CMD])
11688]) # XORG_INSTALL
11689dnl Copyright 2005 Red Hat, Inc
11690dnl
11691dnl Permission to use, copy, modify, distribute, and sell this software and its
11692dnl documentation for any purpose is hereby granted without fee, provided that
11693dnl the above copyright notice appear in all copies and that both that
11694dnl copyright notice and this permission notice appear in supporting
11695dnl documentation.
11696dnl
11697dnl The above copyright notice and this permission notice shall be included
11698dnl in all copies or substantial portions of the Software.
11699dnl
11700dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
11701dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
11702dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11703dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
11704dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
11705dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
11706dnl OTHER DEALINGS IN THE SOFTWARE.
11707dnl
11708dnl Except as contained in this notice, the name of the copyright holders shall
11709dnl not be used in advertising or otherwise to promote the sale, use or
11710dnl other dealings in this Software without prior written authorization
11711dnl from the copyright holders.
11712dnl
11713
11714# XORG_RELEASE_VERSION
11715# --------------------
11716# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
11717
11718AC_DEFUN([XORG_RELEASE_VERSION],[
11719	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
11720		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
11721		[Major version of this package])
11722	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
11723	if test "x$PVM" = "x"; then
11724		PVM="0"
11725	fi
11726	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
11727		[$PVM],
11728		[Minor version of this package])
11729	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
11730	if test "x$PVP" = "x"; then
11731		PVP="0"
11732	fi
11733	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
11734		[$PVP],
11735		[Patch version of this package])
11736])
11737
11738# XORG_CHANGELOG()
11739# ----------------
11740# Minimum version: 1.2.0
11741#
11742# Defines the variable CHANGELOG_CMD as the command to generate
11743# ChangeLog from git.
11744#
11745#
11746AC_DEFUN([XORG_CHANGELOG], [
11747CHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \
11748mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
11749|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \
11750touch \$(top_srcdir)/ChangeLog; \
11751echo 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))"
11752AC_SUBST([CHANGELOG_CMD])
11753]) # XORG_CHANGELOG
11754
11755# Copyright (C) 2002-2021 Free Software Foundation, Inc.
11756#
11757# This file is free software; the Free Software Foundation
11758# gives unlimited permission to copy and/or distribute it,
11759# with or without modifications, as long as this notice is preserved.
11760
11761# AM_AUTOMAKE_VERSION(VERSION)
11762# ----------------------------
11763# Automake X.Y traces this macro to ensure aclocal.m4 has been
11764# generated from the m4 files accompanying Automake X.Y.
11765# (This private macro should not be called outside this file.)
11766AC_DEFUN([AM_AUTOMAKE_VERSION],
11767[am__api_version='1.16'
11768dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
11769dnl require some minimum version.  Point them to the right macro.
11770m4_if([$1], [1.16.5], [],
11771      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
11772])
11773
11774# _AM_AUTOCONF_VERSION(VERSION)
11775# -----------------------------
11776# aclocal traces this macro to find the Autoconf version.
11777# This is a private macro too.  Using m4_define simplifies
11778# the logic in aclocal, which can simply ignore this definition.
11779m4_define([_AM_AUTOCONF_VERSION], [])
11780
11781# AM_SET_CURRENT_AUTOMAKE_VERSION
11782# -------------------------------
11783# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
11784# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
11785AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
11786[AM_AUTOMAKE_VERSION([1.16.5])dnl
11787m4_ifndef([AC_AUTOCONF_VERSION],
11788  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
11789_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
11790
11791# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
11792
11793# Copyright (C) 2001-2021 Free Software Foundation, Inc.
11794#
11795# This file is free software; the Free Software Foundation
11796# gives unlimited permission to copy and/or distribute it,
11797# with or without modifications, as long as this notice is preserved.
11798
11799# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
11800# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
11801# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
11802#
11803# Of course, Automake must honor this variable whenever it calls a
11804# tool from the auxiliary directory.  The problem is that $srcdir (and
11805# therefore $ac_aux_dir as well) can be either absolute or relative,
11806# depending on how configure is run.  This is pretty annoying, since
11807# it makes $ac_aux_dir quite unusable in subdirectories: in the top
11808# source directory, any form will work fine, but in subdirectories a
11809# relative path needs to be adjusted first.
11810#
11811# $ac_aux_dir/missing
11812#    fails when called from a subdirectory if $ac_aux_dir is relative
11813# $top_srcdir/$ac_aux_dir/missing
11814#    fails if $ac_aux_dir is absolute,
11815#    fails when called from a subdirectory in a VPATH build with
11816#          a relative $ac_aux_dir
11817#
11818# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
11819# are both prefixed by $srcdir.  In an in-source build this is usually
11820# harmless because $srcdir is '.', but things will broke when you
11821# start a VPATH build or use an absolute $srcdir.
11822#
11823# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
11824# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
11825#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
11826# and then we would define $MISSING as
11827#   MISSING="\${SHELL} $am_aux_dir/missing"
11828# This will work as long as MISSING is not called from configure, because
11829# unfortunately $(top_srcdir) has no meaning in configure.
11830# However there are other variables, like CC, which are often used in
11831# configure, and could therefore not use this "fixed" $ac_aux_dir.
11832#
11833# Another solution, used here, is to always expand $ac_aux_dir to an
11834# absolute PATH.  The drawback is that using absolute paths prevent a
11835# configured tree to be moved without reconfiguration.
11836
11837AC_DEFUN([AM_AUX_DIR_EXPAND],
11838[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
11839# Expand $ac_aux_dir to an absolute path.
11840am_aux_dir=`cd "$ac_aux_dir" && pwd`
11841])
11842
11843# AM_CONDITIONAL                                            -*- Autoconf -*-
11844
11845# Copyright (C) 1997-2021 Free Software Foundation, Inc.
11846#
11847# This file is free software; the Free Software Foundation
11848# gives unlimited permission to copy and/or distribute it,
11849# with or without modifications, as long as this notice is preserved.
11850
11851# AM_CONDITIONAL(NAME, SHELL-CONDITION)
11852# -------------------------------------
11853# Define a conditional.
11854AC_DEFUN([AM_CONDITIONAL],
11855[AC_PREREQ([2.52])dnl
11856 m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
11857       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
11858AC_SUBST([$1_TRUE])dnl
11859AC_SUBST([$1_FALSE])dnl
11860_AM_SUBST_NOTMAKE([$1_TRUE])dnl
11861_AM_SUBST_NOTMAKE([$1_FALSE])dnl
11862m4_define([_AM_COND_VALUE_$1], [$2])dnl
11863if $2; then
11864  $1_TRUE=
11865  $1_FALSE='#'
11866else
11867  $1_TRUE='#'
11868  $1_FALSE=
11869fi
11870AC_CONFIG_COMMANDS_PRE(
11871[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
11872  AC_MSG_ERROR([[conditional "$1" was never defined.
11873Usually this means the macro was only invoked conditionally.]])
11874fi])])
11875
11876# Copyright (C) 1999-2021 Free Software Foundation, Inc.
11877#
11878# This file is free software; the Free Software Foundation
11879# gives unlimited permission to copy and/or distribute it,
11880# with or without modifications, as long as this notice is preserved.
11881
11882
11883# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
11884# written in clear, in which case automake, when reading aclocal.m4,
11885# will think it sees a *use*, and therefore will trigger all it's
11886# C support machinery.  Also note that it means that autoscan, seeing
11887# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
11888
11889
11890# _AM_DEPENDENCIES(NAME)
11891# ----------------------
11892# See how the compiler implements dependency checking.
11893# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
11894# We try a few techniques and use that to set a single cache variable.
11895#
11896# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
11897# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
11898# dependency, and given that the user is not expected to run this macro,
11899# just rely on AC_PROG_CC.
11900AC_DEFUN([_AM_DEPENDENCIES],
11901[AC_REQUIRE([AM_SET_DEPDIR])dnl
11902AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
11903AC_REQUIRE([AM_MAKE_INCLUDE])dnl
11904AC_REQUIRE([AM_DEP_TRACK])dnl
11905
11906m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
11907      [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
11908      [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
11909      [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
11910      [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
11911      [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
11912                    [depcc="$$1"   am_compiler_list=])
11913
11914AC_CACHE_CHECK([dependency style of $depcc],
11915               [am_cv_$1_dependencies_compiler_type],
11916[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
11917  # We make a subdir and do the tests there.  Otherwise we can end up
11918  # making bogus files that we don't know about and never remove.  For
11919  # instance it was reported that on HP-UX the gcc test will end up
11920  # making a dummy file named 'D' -- because '-MD' means "put the output
11921  # in D".
11922  rm -rf conftest.dir
11923  mkdir conftest.dir
11924  # Copy depcomp to subdir because otherwise we won't find it if we're
11925  # using a relative directory.
11926  cp "$am_depcomp" conftest.dir
11927  cd conftest.dir
11928  # We will build objects and dependencies in a subdirectory because
11929  # it helps to detect inapplicable dependency modes.  For instance
11930  # both Tru64's cc and ICC support -MD to output dependencies as a
11931  # side effect of compilation, but ICC will put the dependencies in
11932  # the current directory while Tru64 will put them in the object
11933  # directory.
11934  mkdir sub
11935
11936  am_cv_$1_dependencies_compiler_type=none
11937  if test "$am_compiler_list" = ""; then
11938     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
11939  fi
11940  am__universal=false
11941  m4_case([$1], [CC],
11942    [case " $depcc " in #(
11943     *\ -arch\ *\ -arch\ *) am__universal=true ;;
11944     esac],
11945    [CXX],
11946    [case " $depcc " in #(
11947     *\ -arch\ *\ -arch\ *) am__universal=true ;;
11948     esac])
11949
11950  for depmode in $am_compiler_list; do
11951    # Setup a source with many dependencies, because some compilers
11952    # like to wrap large dependency lists on column 80 (with \), and
11953    # we should not choose a depcomp mode which is confused by this.
11954    #
11955    # We need to recreate these files for each test, as the compiler may
11956    # overwrite some of them when testing with obscure command lines.
11957    # This happens at least with the AIX C compiler.
11958    : > sub/conftest.c
11959    for i in 1 2 3 4 5 6; do
11960      echo '#include "conftst'$i'.h"' >> sub/conftest.c
11961      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
11962      # Solaris 10 /bin/sh.
11963      echo '/* dummy */' > sub/conftst$i.h
11964    done
11965    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
11966
11967    # We check with '-c' and '-o' for the sake of the "dashmstdout"
11968    # mode.  It turns out that the SunPro C++ compiler does not properly
11969    # handle '-M -o', and we need to detect this.  Also, some Intel
11970    # versions had trouble with output in subdirs.
11971    am__obj=sub/conftest.${OBJEXT-o}
11972    am__minus_obj="-o $am__obj"
11973    case $depmode in
11974    gcc)
11975      # This depmode causes a compiler race in universal mode.
11976      test "$am__universal" = false || continue
11977      ;;
11978    nosideeffect)
11979      # After this tag, mechanisms are not by side-effect, so they'll
11980      # only be used when explicitly requested.
11981      if test "x$enable_dependency_tracking" = xyes; then
11982	continue
11983      else
11984	break
11985      fi
11986      ;;
11987    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
11988      # This compiler won't grok '-c -o', but also, the minuso test has
11989      # not run yet.  These depmodes are late enough in the game, and
11990      # so weak that their functioning should not be impacted.
11991      am__obj=conftest.${OBJEXT-o}
11992      am__minus_obj=
11993      ;;
11994    none) break ;;
11995    esac
11996    if depmode=$depmode \
11997       source=sub/conftest.c object=$am__obj \
11998       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
11999       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
12000         >/dev/null 2>conftest.err &&
12001       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
12002       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
12003       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
12004       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
12005      # icc doesn't choke on unknown options, it will just issue warnings
12006      # or remarks (even with -Werror).  So we grep stderr for any message
12007      # that says an option was ignored or not supported.
12008      # When given -MP, icc 7.0 and 7.1 complain thusly:
12009      #   icc: Command line warning: ignoring option '-M'; no argument required
12010      # The diagnosis changed in icc 8.0:
12011      #   icc: Command line remark: option '-MP' not supported
12012      if (grep 'ignoring option' conftest.err ||
12013          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
12014        am_cv_$1_dependencies_compiler_type=$depmode
12015        break
12016      fi
12017    fi
12018  done
12019
12020  cd ..
12021  rm -rf conftest.dir
12022else
12023  am_cv_$1_dependencies_compiler_type=none
12024fi
12025])
12026AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
12027AM_CONDITIONAL([am__fastdep$1], [
12028  test "x$enable_dependency_tracking" != xno \
12029  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
12030])
12031
12032
12033# AM_SET_DEPDIR
12034# -------------
12035# Choose a directory name for dependency files.
12036# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
12037AC_DEFUN([AM_SET_DEPDIR],
12038[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
12039AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
12040])
12041
12042
12043# AM_DEP_TRACK
12044# ------------
12045AC_DEFUN([AM_DEP_TRACK],
12046[AC_ARG_ENABLE([dependency-tracking], [dnl
12047AS_HELP_STRING(
12048  [--enable-dependency-tracking],
12049  [do not reject slow dependency extractors])
12050AS_HELP_STRING(
12051  [--disable-dependency-tracking],
12052  [speeds up one-time build])])
12053if test "x$enable_dependency_tracking" != xno; then
12054  am_depcomp="$ac_aux_dir/depcomp"
12055  AMDEPBACKSLASH='\'
12056  am__nodep='_no'
12057fi
12058AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
12059AC_SUBST([AMDEPBACKSLASH])dnl
12060_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
12061AC_SUBST([am__nodep])dnl
12062_AM_SUBST_NOTMAKE([am__nodep])dnl
12063])
12064
12065# Generate code to set up dependency tracking.              -*- Autoconf -*-
12066
12067# Copyright (C) 1999-2021 Free Software Foundation, Inc.
12068#
12069# This file is free software; the Free Software Foundation
12070# gives unlimited permission to copy and/or distribute it,
12071# with or without modifications, as long as this notice is preserved.
12072
12073# _AM_OUTPUT_DEPENDENCY_COMMANDS
12074# ------------------------------
12075AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
12076[{
12077  # Older Autoconf quotes --file arguments for eval, but not when files
12078  # are listed without --file.  Let's play safe and only enable the eval
12079  # if we detect the quoting.
12080  # TODO: see whether this extra hack can be removed once we start
12081  # requiring Autoconf 2.70 or later.
12082  AS_CASE([$CONFIG_FILES],
12083          [*\'*], [eval set x "$CONFIG_FILES"],
12084          [*], [set x $CONFIG_FILES])
12085  shift
12086  # Used to flag and report bootstrapping failures.
12087  am_rc=0
12088  for am_mf
12089  do
12090    # Strip MF so we end up with the name of the file.
12091    am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
12092    # Check whether this is an Automake generated Makefile which includes
12093    # dependency-tracking related rules and includes.
12094    # Grep'ing the whole file directly is not great: AIX grep has a line
12095    # limit of 2048, but all sed's we know have understand at least 4000.
12096    sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
12097      || continue
12098    am_dirpart=`AS_DIRNAME(["$am_mf"])`
12099    am_filepart=`AS_BASENAME(["$am_mf"])`
12100    AM_RUN_LOG([cd "$am_dirpart" \
12101      && sed -e '/# am--include-marker/d' "$am_filepart" \
12102        | $MAKE -f - am--depfiles]) || am_rc=$?
12103  done
12104  if test $am_rc -ne 0; then
12105    AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
12106    for automatic dependency tracking.  If GNU make was not used, consider
12107    re-running the configure script with MAKE="gmake" (or whatever is
12108    necessary).  You can also try re-running configure with the
12109    '--disable-dependency-tracking' option to at least be able to build
12110    the package (albeit without support for automatic dependency tracking).])
12111  fi
12112  AS_UNSET([am_dirpart])
12113  AS_UNSET([am_filepart])
12114  AS_UNSET([am_mf])
12115  AS_UNSET([am_rc])
12116  rm -f conftest-deps.mk
12117}
12118])# _AM_OUTPUT_DEPENDENCY_COMMANDS
12119
12120
12121# AM_OUTPUT_DEPENDENCY_COMMANDS
12122# -----------------------------
12123# This macro should only be invoked once -- use via AC_REQUIRE.
12124#
12125# This code is only required when automatic dependency tracking is enabled.
12126# This creates each '.Po' and '.Plo' makefile fragment that we'll need in
12127# order to bootstrap the dependency handling code.
12128AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
12129[AC_CONFIG_COMMANDS([depfiles],
12130     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
12131     [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
12132
12133# Do all the work for Automake.                             -*- Autoconf -*-
12134
12135# Copyright (C) 1996-2021 Free Software Foundation, Inc.
12136#
12137# This file is free software; the Free Software Foundation
12138# gives unlimited permission to copy and/or distribute it,
12139# with or without modifications, as long as this notice is preserved.
12140
12141# This macro actually does too much.  Some checks are only needed if
12142# your package does certain things.  But this isn't really a big deal.
12143
12144dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
12145m4_define([AC_PROG_CC],
12146m4_defn([AC_PROG_CC])
12147[_AM_PROG_CC_C_O
12148])
12149
12150# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
12151# AM_INIT_AUTOMAKE([OPTIONS])
12152# -----------------------------------------------
12153# The call with PACKAGE and VERSION arguments is the old style
12154# call (pre autoconf-2.50), which is being phased out.  PACKAGE
12155# and VERSION should now be passed to AC_INIT and removed from
12156# the call to AM_INIT_AUTOMAKE.
12157# We support both call styles for the transition.  After
12158# the next Automake release, Autoconf can make the AC_INIT
12159# arguments mandatory, and then we can depend on a new Autoconf
12160# release and drop the old call support.
12161AC_DEFUN([AM_INIT_AUTOMAKE],
12162[AC_PREREQ([2.65])dnl
12163m4_ifdef([_$0_ALREADY_INIT],
12164  [m4_fatal([$0 expanded multiple times
12165]m4_defn([_$0_ALREADY_INIT]))],
12166  [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl
12167dnl Autoconf wants to disallow AM_ names.  We explicitly allow
12168dnl the ones we care about.
12169m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
12170AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
12171AC_REQUIRE([AC_PROG_INSTALL])dnl
12172if test "`cd $srcdir && pwd`" != "`pwd`"; then
12173  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
12174  # is not polluted with repeated "-I."
12175  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
12176  # test to see if srcdir already configured
12177  if test -f $srcdir/config.status; then
12178    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
12179  fi
12180fi
12181
12182# test whether we have cygpath
12183if test -z "$CYGPATH_W"; then
12184  if (cygpath --version) >/dev/null 2>/dev/null; then
12185    CYGPATH_W='cygpath -w'
12186  else
12187    CYGPATH_W=echo
12188  fi
12189fi
12190AC_SUBST([CYGPATH_W])
12191
12192# Define the identity of the package.
12193dnl Distinguish between old-style and new-style calls.
12194m4_ifval([$2],
12195[AC_DIAGNOSE([obsolete],
12196             [$0: two- and three-arguments forms are deprecated.])
12197m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
12198 AC_SUBST([PACKAGE], [$1])dnl
12199 AC_SUBST([VERSION], [$2])],
12200[_AM_SET_OPTIONS([$1])dnl
12201dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
12202m4_if(
12203  m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]),
12204  [ok:ok],,
12205  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
12206 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
12207 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
12208
12209_AM_IF_OPTION([no-define],,
12210[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
12211 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
12212
12213# Some tools Automake needs.
12214AC_REQUIRE([AM_SANITY_CHECK])dnl
12215AC_REQUIRE([AC_ARG_PROGRAM])dnl
12216AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
12217AM_MISSING_PROG([AUTOCONF], [autoconf])
12218AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
12219AM_MISSING_PROG([AUTOHEADER], [autoheader])
12220AM_MISSING_PROG([MAKEINFO], [makeinfo])
12221AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
12222AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
12223AC_REQUIRE([AC_PROG_MKDIR_P])dnl
12224# For better backward compatibility.  To be removed once Automake 1.9.x
12225# dies out for good.  For more background, see:
12226# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
12227# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
12228AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
12229# We need awk for the "check" target (and possibly the TAP driver).  The
12230# system "awk" is bad on some platforms.
12231AC_REQUIRE([AC_PROG_AWK])dnl
12232AC_REQUIRE([AC_PROG_MAKE_SET])dnl
12233AC_REQUIRE([AM_SET_LEADING_DOT])dnl
12234_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
12235	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
12236			     [_AM_PROG_TAR([v7])])])
12237_AM_IF_OPTION([no-dependencies],,
12238[AC_PROVIDE_IFELSE([AC_PROG_CC],
12239		  [_AM_DEPENDENCIES([CC])],
12240		  [m4_define([AC_PROG_CC],
12241			     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
12242AC_PROVIDE_IFELSE([AC_PROG_CXX],
12243		  [_AM_DEPENDENCIES([CXX])],
12244		  [m4_define([AC_PROG_CXX],
12245			     m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
12246AC_PROVIDE_IFELSE([AC_PROG_OBJC],
12247		  [_AM_DEPENDENCIES([OBJC])],
12248		  [m4_define([AC_PROG_OBJC],
12249			     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
12250AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
12251		  [_AM_DEPENDENCIES([OBJCXX])],
12252		  [m4_define([AC_PROG_OBJCXX],
12253			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
12254])
12255# Variables for tags utilities; see am/tags.am
12256if test -z "$CTAGS"; then
12257  CTAGS=ctags
12258fi
12259AC_SUBST([CTAGS])
12260if test -z "$ETAGS"; then
12261  ETAGS=etags
12262fi
12263AC_SUBST([ETAGS])
12264if test -z "$CSCOPE"; then
12265  CSCOPE=cscope
12266fi
12267AC_SUBST([CSCOPE])
12268
12269AC_REQUIRE([AM_SILENT_RULES])dnl
12270dnl The testsuite driver may need to know about EXEEXT, so add the
12271dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
12272dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
12273AC_CONFIG_COMMANDS_PRE(dnl
12274[m4_provide_if([_AM_COMPILER_EXEEXT],
12275  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
12276
12277# POSIX will say in a future version that running "rm -f" with no argument
12278# is OK; and we want to be able to make that assumption in our Makefile
12279# recipes.  So use an aggressive probe to check that the usage we want is
12280# actually supported "in the wild" to an acceptable degree.
12281# See automake bug#10828.
12282# To make any issue more visible, cause the running configure to be aborted
12283# by default if the 'rm' program in use doesn't match our expectations; the
12284# user can still override this though.
12285if rm -f && rm -fr && rm -rf; then : OK; else
12286  cat >&2 <<'END'
12287Oops!
12288
12289Your 'rm' program seems unable to run without file operands specified
12290on the command line, even when the '-f' option is present.  This is contrary
12291to the behaviour of most rm programs out there, and not conforming with
12292the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
12293
12294Please tell bug-automake@gnu.org about your system, including the value
12295of your $PATH and any error possibly output before this message.  This
12296can help us improve future automake versions.
12297
12298END
12299  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
12300    echo 'Configuration will proceed anyway, since you have set the' >&2
12301    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
12302    echo >&2
12303  else
12304    cat >&2 <<'END'
12305Aborting the configuration process, to ensure you take notice of the issue.
12306
12307You can download and install GNU coreutils to get an 'rm' implementation
12308that behaves properly: <https://www.gnu.org/software/coreutils/>.
12309
12310If you want to complete the configuration process using your problematic
12311'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
12312to "yes", and re-run configure.
12313
12314END
12315    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
12316  fi
12317fi
12318dnl The trailing newline in this macro's definition is deliberate, for
12319dnl backward compatibility and to allow trailing 'dnl'-style comments
12320dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
12321])
12322
12323dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
12324dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
12325dnl mangled by Autoconf and run in a shell conditional statement.
12326m4_define([_AC_COMPILER_EXEEXT],
12327m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
12328
12329# When config.status generates a header, we must update the stamp-h file.
12330# This file resides in the same directory as the config header
12331# that is generated.  The stamp files are numbered to have different names.
12332
12333# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
12334# loop where config.status creates the headers, so we can generate
12335# our stamp files there.
12336AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
12337[# Compute $1's index in $config_headers.
12338_am_arg=$1
12339_am_stamp_count=1
12340for _am_header in $config_headers :; do
12341  case $_am_header in
12342    $_am_arg | $_am_arg:* )
12343      break ;;
12344    * )
12345      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
12346  esac
12347done
12348echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
12349
12350# Copyright (C) 2001-2021 Free Software Foundation, Inc.
12351#
12352# This file is free software; the Free Software Foundation
12353# gives unlimited permission to copy and/or distribute it,
12354# with or without modifications, as long as this notice is preserved.
12355
12356# AM_PROG_INSTALL_SH
12357# ------------------
12358# Define $install_sh.
12359AC_DEFUN([AM_PROG_INSTALL_SH],
12360[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
12361if test x"${install_sh+set}" != xset; then
12362  case $am_aux_dir in
12363  *\ * | *\	*)
12364    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
12365  *)
12366    install_sh="\${SHELL} $am_aux_dir/install-sh"
12367  esac
12368fi
12369AC_SUBST([install_sh])])
12370
12371# Copyright (C) 2003-2021 Free Software Foundation, Inc.
12372#
12373# This file is free software; the Free Software Foundation
12374# gives unlimited permission to copy and/or distribute it,
12375# with or without modifications, as long as this notice is preserved.
12376
12377# Check whether the underlying file-system supports filenames
12378# with a leading dot.  For instance MS-DOS doesn't.
12379AC_DEFUN([AM_SET_LEADING_DOT],
12380[rm -rf .tst 2>/dev/null
12381mkdir .tst 2>/dev/null
12382if test -d .tst; then
12383  am__leading_dot=.
12384else
12385  am__leading_dot=_
12386fi
12387rmdir .tst 2>/dev/null
12388AC_SUBST([am__leading_dot])])
12389
12390# Check to see how 'make' treats includes.	            -*- Autoconf -*-
12391
12392# Copyright (C) 2001-2021 Free Software Foundation, Inc.
12393#
12394# This file is free software; the Free Software Foundation
12395# gives unlimited permission to copy and/or distribute it,
12396# with or without modifications, as long as this notice is preserved.
12397
12398# AM_MAKE_INCLUDE()
12399# -----------------
12400# Check whether make has an 'include' directive that can support all
12401# the idioms we need for our automatic dependency tracking code.
12402AC_DEFUN([AM_MAKE_INCLUDE],
12403[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
12404cat > confinc.mk << 'END'
12405am__doit:
12406	@echo this is the am__doit target >confinc.out
12407.PHONY: am__doit
12408END
12409am__include="#"
12410am__quote=
12411# BSD make does it like this.
12412echo '.include "confinc.mk" # ignored' > confmf.BSD
12413# Other make implementations (GNU, Solaris 10, AIX) do it like this.
12414echo 'include confinc.mk # ignored' > confmf.GNU
12415_am_result=no
12416for s in GNU BSD; do
12417  AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
12418  AS_CASE([$?:`cat confinc.out 2>/dev/null`],
12419      ['0:this is the am__doit target'],
12420      [AS_CASE([$s],
12421          [BSD], [am__include='.include' am__quote='"'],
12422          [am__include='include' am__quote=''])])
12423  if test "$am__include" != "#"; then
12424    _am_result="yes ($s style)"
12425    break
12426  fi
12427done
12428rm -f confinc.* confmf.*
12429AC_MSG_RESULT([${_am_result}])
12430AC_SUBST([am__include])])
12431AC_SUBST([am__quote])])
12432
12433# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
12434
12435# Copyright (C) 1997-2021 Free Software Foundation, Inc.
12436#
12437# This file is free software; the Free Software Foundation
12438# gives unlimited permission to copy and/or distribute it,
12439# with or without modifications, as long as this notice is preserved.
12440
12441# AM_MISSING_PROG(NAME, PROGRAM)
12442# ------------------------------
12443AC_DEFUN([AM_MISSING_PROG],
12444[AC_REQUIRE([AM_MISSING_HAS_RUN])
12445$1=${$1-"${am_missing_run}$2"}
12446AC_SUBST($1)])
12447
12448# AM_MISSING_HAS_RUN
12449# ------------------
12450# Define MISSING if not defined so far and test if it is modern enough.
12451# If it is, set am_missing_run to use it, otherwise, to nothing.
12452AC_DEFUN([AM_MISSING_HAS_RUN],
12453[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
12454AC_REQUIRE_AUX_FILE([missing])dnl
12455if test x"${MISSING+set}" != xset; then
12456  MISSING="\${SHELL} '$am_aux_dir/missing'"
12457fi
12458# Use eval to expand $SHELL
12459if eval "$MISSING --is-lightweight"; then
12460  am_missing_run="$MISSING "
12461else
12462  am_missing_run=
12463  AC_MSG_WARN(['missing' script is too old or missing])
12464fi
12465])
12466
12467# Helper functions for option handling.                     -*- Autoconf -*-
12468
12469# Copyright (C) 2001-2021 Free Software Foundation, Inc.
12470#
12471# This file is free software; the Free Software Foundation
12472# gives unlimited permission to copy and/or distribute it,
12473# with or without modifications, as long as this notice is preserved.
12474
12475# _AM_MANGLE_OPTION(NAME)
12476# -----------------------
12477AC_DEFUN([_AM_MANGLE_OPTION],
12478[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
12479
12480# _AM_SET_OPTION(NAME)
12481# --------------------
12482# Set option NAME.  Presently that only means defining a flag for this option.
12483AC_DEFUN([_AM_SET_OPTION],
12484[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
12485
12486# _AM_SET_OPTIONS(OPTIONS)
12487# ------------------------
12488# OPTIONS is a space-separated list of Automake options.
12489AC_DEFUN([_AM_SET_OPTIONS],
12490[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
12491
12492# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
12493# -------------------------------------------
12494# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
12495AC_DEFUN([_AM_IF_OPTION],
12496[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
12497
12498# Copyright (C) 1999-2021 Free Software Foundation, Inc.
12499#
12500# This file is free software; the Free Software Foundation
12501# gives unlimited permission to copy and/or distribute it,
12502# with or without modifications, as long as this notice is preserved.
12503
12504# _AM_PROG_CC_C_O
12505# ---------------
12506# Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
12507# to automatically call this.
12508AC_DEFUN([_AM_PROG_CC_C_O],
12509[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
12510AC_REQUIRE_AUX_FILE([compile])dnl
12511AC_LANG_PUSH([C])dnl
12512AC_CACHE_CHECK(
12513  [whether $CC understands -c and -o together],
12514  [am_cv_prog_cc_c_o],
12515  [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
12516  # Make sure it works both with $CC and with simple cc.
12517  # Following AC_PROG_CC_C_O, we do the test twice because some
12518  # compilers refuse to overwrite an existing .o file with -o,
12519  # though they will create one.
12520  am_cv_prog_cc_c_o=yes
12521  for am_i in 1 2; do
12522    if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
12523         && test -f conftest2.$ac_objext; then
12524      : OK
12525    else
12526      am_cv_prog_cc_c_o=no
12527      break
12528    fi
12529  done
12530  rm -f core conftest*
12531  unset am_i])
12532if test "$am_cv_prog_cc_c_o" != yes; then
12533   # Losing compiler, so override with the script.
12534   # FIXME: It is wrong to rewrite CC.
12535   # But if we don't then we get into trouble of one sort or another.
12536   # A longer-term fix would be to have automake use am__CC in this case,
12537   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
12538   CC="$am_aux_dir/compile $CC"
12539fi
12540AC_LANG_POP([C])])
12541
12542# For backward compatibility.
12543AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
12544
12545# Copyright (C) 2001-2021 Free Software Foundation, Inc.
12546#
12547# This file is free software; the Free Software Foundation
12548# gives unlimited permission to copy and/or distribute it,
12549# with or without modifications, as long as this notice is preserved.
12550
12551# AM_RUN_LOG(COMMAND)
12552# -------------------
12553# Run COMMAND, save the exit status in ac_status, and log it.
12554# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
12555AC_DEFUN([AM_RUN_LOG],
12556[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
12557   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
12558   ac_status=$?
12559   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
12560   (exit $ac_status); }])
12561
12562# Check to make sure that the build environment is sane.    -*- Autoconf -*-
12563
12564# Copyright (C) 1996-2021 Free Software Foundation, Inc.
12565#
12566# This file is free software; the Free Software Foundation
12567# gives unlimited permission to copy and/or distribute it,
12568# with or without modifications, as long as this notice is preserved.
12569
12570# AM_SANITY_CHECK
12571# ---------------
12572AC_DEFUN([AM_SANITY_CHECK],
12573[AC_MSG_CHECKING([whether build environment is sane])
12574# Reject unsafe characters in $srcdir or the absolute working directory
12575# name.  Accept space and tab only in the latter.
12576am_lf='
12577'
12578case `pwd` in
12579  *[[\\\"\#\$\&\'\`$am_lf]]*)
12580    AC_MSG_ERROR([unsafe absolute working directory name]);;
12581esac
12582case $srcdir in
12583  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
12584    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
12585esac
12586
12587# Do 'set' in a subshell so we don't clobber the current shell's
12588# arguments.  Must try -L first in case configure is actually a
12589# symlink; some systems play weird games with the mod time of symlinks
12590# (eg FreeBSD returns the mod time of the symlink's containing
12591# directory).
12592if (
12593   am_has_slept=no
12594   for am_try in 1 2; do
12595     echo "timestamp, slept: $am_has_slept" > conftest.file
12596     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
12597     if test "$[*]" = "X"; then
12598	# -L didn't work.
12599	set X `ls -t "$srcdir/configure" conftest.file`
12600     fi
12601     if test "$[*]" != "X $srcdir/configure conftest.file" \
12602	&& test "$[*]" != "X conftest.file $srcdir/configure"; then
12603
12604	# If neither matched, then we have a broken ls.  This can happen
12605	# if, for instance, CONFIG_SHELL is bash and it inherits a
12606	# broken ls alias from the environment.  This has actually
12607	# happened.  Such a system could not be considered "sane".
12608	AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
12609  alias in your environment])
12610     fi
12611     if test "$[2]" = conftest.file || test $am_try -eq 2; then
12612       break
12613     fi
12614     # Just in case.
12615     sleep 1
12616     am_has_slept=yes
12617   done
12618   test "$[2]" = conftest.file
12619   )
12620then
12621   # Ok.
12622   :
12623else
12624   AC_MSG_ERROR([newly created file is older than distributed files!
12625Check your system clock])
12626fi
12627AC_MSG_RESULT([yes])
12628# If we didn't sleep, we still need to ensure time stamps of config.status and
12629# generated files are strictly newer.
12630am_sleep_pid=
12631if grep 'slept: no' conftest.file >/dev/null 2>&1; then
12632  ( sleep 1 ) &
12633  am_sleep_pid=$!
12634fi
12635AC_CONFIG_COMMANDS_PRE(
12636  [AC_MSG_CHECKING([that generated files are newer than configure])
12637   if test -n "$am_sleep_pid"; then
12638     # Hide warnings about reused PIDs.
12639     wait $am_sleep_pid 2>/dev/null
12640   fi
12641   AC_MSG_RESULT([done])])
12642rm -f conftest.file
12643])
12644
12645# Copyright (C) 2009-2021 Free Software Foundation, Inc.
12646#
12647# This file is free software; the Free Software Foundation
12648# gives unlimited permission to copy and/or distribute it,
12649# with or without modifications, as long as this notice is preserved.
12650
12651# AM_SILENT_RULES([DEFAULT])
12652# --------------------------
12653# Enable less verbose build rules; with the default set to DEFAULT
12654# ("yes" being less verbose, "no" or empty being verbose).
12655AC_DEFUN([AM_SILENT_RULES],
12656[AC_ARG_ENABLE([silent-rules], [dnl
12657AS_HELP_STRING(
12658  [--enable-silent-rules],
12659  [less verbose build output (undo: "make V=1")])
12660AS_HELP_STRING(
12661  [--disable-silent-rules],
12662  [verbose build output (undo: "make V=0")])dnl
12663])
12664case $enable_silent_rules in @%:@ (((
12665  yes) AM_DEFAULT_VERBOSITY=0;;
12666   no) AM_DEFAULT_VERBOSITY=1;;
12667    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
12668esac
12669dnl
12670dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
12671dnl do not support nested variable expansions.
12672dnl See automake bug#9928 and bug#10237.
12673am_make=${MAKE-make}
12674AC_CACHE_CHECK([whether $am_make supports nested variables],
12675   [am_cv_make_support_nested_variables],
12676   [if AS_ECHO([['TRUE=$(BAR$(V))
12677BAR0=false
12678BAR1=true
12679V=1
12680am__doit:
12681	@$(TRUE)
12682.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
12683  am_cv_make_support_nested_variables=yes
12684else
12685  am_cv_make_support_nested_variables=no
12686fi])
12687if test $am_cv_make_support_nested_variables = yes; then
12688  dnl Using '$V' instead of '$(V)' breaks IRIX make.
12689  AM_V='$(V)'
12690  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
12691else
12692  AM_V=$AM_DEFAULT_VERBOSITY
12693  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
12694fi
12695AC_SUBST([AM_V])dnl
12696AM_SUBST_NOTMAKE([AM_V])dnl
12697AC_SUBST([AM_DEFAULT_V])dnl
12698AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
12699AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
12700AM_BACKSLASH='\'
12701AC_SUBST([AM_BACKSLASH])dnl
12702_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
12703])
12704
12705# Copyright (C) 2001-2021 Free Software Foundation, Inc.
12706#
12707# This file is free software; the Free Software Foundation
12708# gives unlimited permission to copy and/or distribute it,
12709# with or without modifications, as long as this notice is preserved.
12710
12711# AM_PROG_INSTALL_STRIP
12712# ---------------------
12713# One issue with vendor 'install' (even GNU) is that you can't
12714# specify the program used to strip binaries.  This is especially
12715# annoying in cross-compiling environments, where the build's strip
12716# is unlikely to handle the host's binaries.
12717# Fortunately install-sh will honor a STRIPPROG variable, so we
12718# always use install-sh in "make install-strip", and initialize
12719# STRIPPROG with the value of the STRIP variable (set by the user).
12720AC_DEFUN([AM_PROG_INSTALL_STRIP],
12721[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
12722# Installed binaries are usually stripped using 'strip' when the user
12723# run "make install-strip".  However 'strip' might not be the right
12724# tool to use in cross-compilation environments, therefore Automake
12725# will honor the 'STRIP' environment variable to overrule this program.
12726dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
12727if test "$cross_compiling" != no; then
12728  AC_CHECK_TOOL([STRIP], [strip], :)
12729fi
12730INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
12731AC_SUBST([INSTALL_STRIP_PROGRAM])])
12732
12733# Copyright (C) 2006-2021 Free Software Foundation, Inc.
12734#
12735# This file is free software; the Free Software Foundation
12736# gives unlimited permission to copy and/or distribute it,
12737# with or without modifications, as long as this notice is preserved.
12738
12739# _AM_SUBST_NOTMAKE(VARIABLE)
12740# ---------------------------
12741# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
12742# This macro is traced by Automake.
12743AC_DEFUN([_AM_SUBST_NOTMAKE])
12744
12745# AM_SUBST_NOTMAKE(VARIABLE)
12746# --------------------------
12747# Public sister of _AM_SUBST_NOTMAKE.
12748AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
12749
12750# Check how to create a tarball.                            -*- Autoconf -*-
12751
12752# Copyright (C) 2004-2021 Free Software Foundation, Inc.
12753#
12754# This file is free software; the Free Software Foundation
12755# gives unlimited permission to copy and/or distribute it,
12756# with or without modifications, as long as this notice is preserved.
12757
12758# _AM_PROG_TAR(FORMAT)
12759# --------------------
12760# Check how to create a tarball in format FORMAT.
12761# FORMAT should be one of 'v7', 'ustar', or 'pax'.
12762#
12763# Substitute a variable $(am__tar) that is a command
12764# writing to stdout a FORMAT-tarball containing the directory
12765# $tardir.
12766#     tardir=directory && $(am__tar) > result.tar
12767#
12768# Substitute a variable $(am__untar) that extract such
12769# a tarball read from stdin.
12770#     $(am__untar) < result.tar
12771#
12772AC_DEFUN([_AM_PROG_TAR],
12773[# Always define AMTAR for backward compatibility.  Yes, it's still used
12774# in the wild :-(  We should find a proper way to deprecate it ...
12775AC_SUBST([AMTAR], ['$${TAR-tar}'])
12776
12777# We'll loop over all known methods to create a tar archive until one works.
12778_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
12779
12780m4_if([$1], [v7],
12781  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
12782
12783  [m4_case([$1],
12784    [ustar],
12785     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
12786      # There is notably a 21 bits limit for the UID and the GID.  In fact,
12787      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
12788      # and bug#13588).
12789      am_max_uid=2097151 # 2^21 - 1
12790      am_max_gid=$am_max_uid
12791      # The $UID and $GID variables are not portable, so we need to resort
12792      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
12793      # below are definitely unexpected, so allow the users to see them
12794      # (that is, avoid stderr redirection).
12795      am_uid=`id -u || echo unknown`
12796      am_gid=`id -g || echo unknown`
12797      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
12798      if test $am_uid -le $am_max_uid; then
12799         AC_MSG_RESULT([yes])
12800      else
12801         AC_MSG_RESULT([no])
12802         _am_tools=none
12803      fi
12804      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
12805      if test $am_gid -le $am_max_gid; then
12806         AC_MSG_RESULT([yes])
12807      else
12808        AC_MSG_RESULT([no])
12809        _am_tools=none
12810      fi],
12811
12812  [pax],
12813    [],
12814
12815  [m4_fatal([Unknown tar format])])
12816
12817  AC_MSG_CHECKING([how to create a $1 tar archive])
12818
12819  # Go ahead even if we have the value already cached.  We do so because we
12820  # need to set the values for the 'am__tar' and 'am__untar' variables.
12821  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
12822
12823  for _am_tool in $_am_tools; do
12824    case $_am_tool in
12825    gnutar)
12826      for _am_tar in tar gnutar gtar; do
12827        AM_RUN_LOG([$_am_tar --version]) && break
12828      done
12829      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
12830      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
12831      am__untar="$_am_tar -xf -"
12832      ;;
12833    plaintar)
12834      # Must skip GNU tar: if it does not support --format= it doesn't create
12835      # ustar tarball either.
12836      (tar --version) >/dev/null 2>&1 && continue
12837      am__tar='tar chf - "$$tardir"'
12838      am__tar_='tar chf - "$tardir"'
12839      am__untar='tar xf -'
12840      ;;
12841    pax)
12842      am__tar='pax -L -x $1 -w "$$tardir"'
12843      am__tar_='pax -L -x $1 -w "$tardir"'
12844      am__untar='pax -r'
12845      ;;
12846    cpio)
12847      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
12848      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
12849      am__untar='cpio -i -H $1 -d'
12850      ;;
12851    none)
12852      am__tar=false
12853      am__tar_=false
12854      am__untar=false
12855      ;;
12856    esac
12857
12858    # If the value was cached, stop now.  We just wanted to have am__tar
12859    # and am__untar set.
12860    test -n "${am_cv_prog_tar_$1}" && break
12861
12862    # tar/untar a dummy directory, and stop if the command works.
12863    rm -rf conftest.dir
12864    mkdir conftest.dir
12865    echo GrepMe > conftest.dir/file
12866    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
12867    rm -rf conftest.dir
12868    if test -s conftest.tar; then
12869      AM_RUN_LOG([$am__untar <conftest.tar])
12870      AM_RUN_LOG([cat conftest.dir/file])
12871      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
12872    fi
12873  done
12874  rm -rf conftest.dir
12875
12876  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
12877  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
12878
12879AC_SUBST([am__tar])
12880AC_SUBST([am__untar])
12881]) # _AM_PROG_TAR
12882
12883