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
23# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
24#
25#   Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software
26#   Foundation, Inc.
27#   Written by Gordon Matzigkeit, 1996
28#
29# This file is free software; the Free Software Foundation gives
30# unlimited permission to copy and/or distribute it, with or without
31# modifications, as long as this notice is preserved.
32
33m4_define([_LT_COPYING], [dnl
34# Copyright (C) 2014 Free Software Foundation, Inc.
35# This is free software; see the source for copying conditions.  There is NO
36# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
37
38# GNU Libtool is free software; you can redistribute it and/or modify
39# it under the terms of the GNU General Public License as published by
40# the Free Software Foundation; either version 2 of of the License, or
41# (at your option) any later version.
42#
43# As a special exception to the GNU General Public License, if you
44# distribute this file as part of a program or library that is built
45# using GNU Libtool, you may include this file under the  same
46# distribution terms that you use for the rest of that program.
47#
48# GNU Libtool is distributed in the hope that it will be useful, but
49# WITHOUT ANY WARRANTY; without even the implied warranty of
50# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
51# GNU General Public License for more details.
52#
53# You should have received a copy of the GNU General Public License
54# along with this program.  If not, see <http://www.gnu.org/licenses/>.
55])
56
57# serial 59 LT_INIT
58
59
60# LT_PREREQ(VERSION)
61# ------------------
62# Complain and exit if this libtool version is less that VERSION.
63m4_defun([LT_PREREQ],
64[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
65       [m4_default([$3],
66		   [m4_fatal([Libtool version $1 or higher is required],
67		             63)])],
68       [$2])])
69
70
71# _LT_CHECK_BUILDDIR
72# ------------------
73# Complain if the absolute build directory name contains unusual characters
74m4_defun([_LT_CHECK_BUILDDIR],
75[case `pwd` in
76  *\ * | *\	*)
77    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
78esac
79])
80
81
82# LT_INIT([OPTIONS])
83# ------------------
84AC_DEFUN([LT_INIT],
85[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
86AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
87AC_BEFORE([$0], [LT_LANG])dnl
88AC_BEFORE([$0], [LT_OUTPUT])dnl
89AC_BEFORE([$0], [LTDL_INIT])dnl
90m4_require([_LT_CHECK_BUILDDIR])dnl
91
92dnl Autoconf doesn't catch unexpanded LT_ macros by default:
93m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
94m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
95dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
96dnl unless we require an AC_DEFUNed macro:
97AC_REQUIRE([LTOPTIONS_VERSION])dnl
98AC_REQUIRE([LTSUGAR_VERSION])dnl
99AC_REQUIRE([LTVERSION_VERSION])dnl
100AC_REQUIRE([LTOBSOLETE_VERSION])dnl
101m4_require([_LT_PROG_LTMAIN])dnl
102
103_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
104
105dnl Parse OPTIONS
106_LT_SET_OPTIONS([$0], [$1])
107
108# This can be used to rebuild libtool when needed
109LIBTOOL_DEPS=$ltmain
110
111# Always use our own libtool.
112LIBTOOL='$(SHELL) $(top_builddir)/libtool'
113AC_SUBST(LIBTOOL)dnl
114
115_LT_SETUP
116
117# Only expand once:
118m4_define([LT_INIT])
119])# LT_INIT
120
121# Old names:
122AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
123AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
124dnl aclocal-1.4 backwards compatibility:
125dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
126dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
127
128
129# _LT_PREPARE_CC_BASENAME
130# -----------------------
131m4_defun([_LT_PREPARE_CC_BASENAME], [
132# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
133func_cc_basename ()
134{
135    for cc_temp in @S|@*""; do
136      case $cc_temp in
137        compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
138        distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
139        \-*) ;;
140        *) break;;
141      esac
142    done
143    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
144}
145])# _LT_PREPARE_CC_BASENAME
146
147
148# _LT_CC_BASENAME(CC)
149# -------------------
150# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
151# but that macro is also expanded into generated libtool script, which
152# arranges for $SED and $ECHO to be set by different means.
153m4_defun([_LT_CC_BASENAME],
154[m4_require([_LT_PREPARE_CC_BASENAME])dnl
155AC_REQUIRE([_LT_DECL_SED])dnl
156AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
157func_cc_basename $1
158cc_basename=$func_cc_basename_result
159])
160
161
162# _LT_FILEUTILS_DEFAULTS
163# ----------------------
164# It is okay to use these file commands and assume they have been set
165# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
166m4_defun([_LT_FILEUTILS_DEFAULTS],
167[: ${CP="cp -f"}
168: ${MV="mv -f"}
169: ${RM="rm -f"}
170])# _LT_FILEUTILS_DEFAULTS
171
172
173# _LT_SETUP
174# ---------
175m4_defun([_LT_SETUP],
176[AC_REQUIRE([AC_CANONICAL_HOST])dnl
177AC_REQUIRE([AC_CANONICAL_BUILD])dnl
178AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
179AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
180
181_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
182dnl
183_LT_DECL([], [host_alias], [0], [The host system])dnl
184_LT_DECL([], [host], [0])dnl
185_LT_DECL([], [host_os], [0])dnl
186dnl
187_LT_DECL([], [build_alias], [0], [The build system])dnl
188_LT_DECL([], [build], [0])dnl
189_LT_DECL([], [build_os], [0])dnl
190dnl
191AC_REQUIRE([AC_PROG_CC])dnl
192AC_REQUIRE([LT_PATH_LD])dnl
193AC_REQUIRE([LT_PATH_NM])dnl
194dnl
195AC_REQUIRE([AC_PROG_LN_S])dnl
196test -z "$LN_S" && LN_S="ln -s"
197_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
198dnl
199AC_REQUIRE([LT_CMD_MAX_LEN])dnl
200_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
201_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
202dnl
203m4_require([_LT_FILEUTILS_DEFAULTS])dnl
204m4_require([_LT_CHECK_SHELL_FEATURES])dnl
205m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
206m4_require([_LT_CMD_RELOAD])dnl
207m4_require([_LT_DECL_FILECMD])dnl
208m4_require([_LT_CHECK_MAGIC_METHOD])dnl
209m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
210m4_require([_LT_CMD_OLD_ARCHIVE])dnl
211m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
212m4_require([_LT_WITH_SYSROOT])dnl
213m4_require([_LT_CMD_TRUNCATE])dnl
214
215_LT_CONFIG_LIBTOOL_INIT([
216# See if we are running on zsh, and set the options that allow our
217# commands through without removal of \ escapes INIT.
218if test -n "\${ZSH_VERSION+set}"; then
219   setopt NO_GLOB_SUBST
220fi
221])
222if test -n "${ZSH_VERSION+set}"; then
223   setopt NO_GLOB_SUBST
224fi
225
226_LT_CHECK_OBJDIR
227
228m4_require([_LT_TAG_COMPILER])dnl
229
230case $host_os in
231aix3*)
232  # AIX sometimes has problems with the GCC collect2 program.  For some
233  # reason, if we set the COLLECT_NAMES environment variable, the problems
234  # vanish in a puff of smoke.
235  if test set != "${COLLECT_NAMES+set}"; then
236    COLLECT_NAMES=
237    export COLLECT_NAMES
238  fi
239  ;;
240esac
241
242# Global variables:
243ofile=libtool
244can_build_shared=yes
245
246# All known linkers require a '.a' archive for static linking (except MSVC and
247# ICC, which need '.lib').
248libext=a
249
250with_gnu_ld=$lt_cv_prog_gnu_ld
251
252old_CC=$CC
253old_CFLAGS=$CFLAGS
254
255# Set sane defaults for various variables
256test -z "$CC" && CC=cc
257test -z "$LTCC" && LTCC=$CC
258test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
259test -z "$LD" && LD=ld
260test -z "$ac_objext" && ac_objext=o
261
262_LT_CC_BASENAME([$compiler])
263
264# Only perform the check for file, if the check method requires it
265test -z "$MAGIC_CMD" && MAGIC_CMD=file
266case $deplibs_check_method in
267file_magic*)
268  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
269    _LT_PATH_MAGIC
270  fi
271  ;;
272esac
273
274# Use C for the default configuration in the libtool script
275LT_SUPPORTED_TAG([CC])
276_LT_LANG_C_CONFIG
277_LT_LANG_DEFAULT_CONFIG
278_LT_CONFIG_COMMANDS
279])# _LT_SETUP
280
281
282# _LT_PREPARE_SED_QUOTE_VARS
283# --------------------------
284# Define a few sed substitution that help us do robust quoting.
285m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
286[# Backslashify metacharacters that are still active within
287# double-quoted strings.
288sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
289
290# Same as above, but do not quote variable references.
291double_quote_subst='s/\([["`\\]]\)/\\\1/g'
292
293# Sed substitution to delay expansion of an escaped shell variable in a
294# double_quote_subst'ed string.
295delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
296
297# Sed substitution to delay expansion of an escaped single quote.
298delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
299
300# Sed substitution to avoid accidental globbing in evaled expressions
301no_glob_subst='s/\*/\\\*/g'
302])
303
304# _LT_PROG_LTMAIN
305# ---------------
306# Note that this code is called both from 'configure', and 'config.status'
307# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
308# 'config.status' has no value for ac_aux_dir unless we are using Automake,
309# so we pass a copy along to make sure it has a sensible value anyway.
310m4_defun([_LT_PROG_LTMAIN],
311[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
312_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
313ltmain=$ac_aux_dir/ltmain.sh
314])# _LT_PROG_LTMAIN
315
316
317
318# So that we can recreate a full libtool script including additional
319# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
320# in macros and then make a single call at the end using the 'libtool'
321# label.
322
323
324# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
325# ----------------------------------------
326# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
327m4_define([_LT_CONFIG_LIBTOOL_INIT],
328[m4_ifval([$1],
329          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
330                     [$1
331])])])
332
333# Initialize.
334m4_define([_LT_OUTPUT_LIBTOOL_INIT])
335
336
337# _LT_CONFIG_LIBTOOL([COMMANDS])
338# ------------------------------
339# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
340m4_define([_LT_CONFIG_LIBTOOL],
341[m4_ifval([$1],
342          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
343                     [$1
344])])])
345
346# Initialize.
347m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
348
349
350# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
351# -----------------------------------------------------
352m4_defun([_LT_CONFIG_SAVE_COMMANDS],
353[_LT_CONFIG_LIBTOOL([$1])
354_LT_CONFIG_LIBTOOL_INIT([$2])
355])
356
357
358# _LT_FORMAT_COMMENT([COMMENT])
359# -----------------------------
360# Add leading comment marks to the start of each line, and a trailing
361# full-stop to the whole comment if one is not present already.
362m4_define([_LT_FORMAT_COMMENT],
363[m4_ifval([$1], [
364m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
365              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
366)])
367
368
369
370
371
372# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
373# -------------------------------------------------------------------
374# CONFIGNAME is the name given to the value in the libtool script.
375# VARNAME is the (base) name used in the configure script.
376# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
377# VARNAME.  Any other value will be used directly.
378m4_define([_LT_DECL],
379[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
380    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
381	[m4_ifval([$1], [$1], [$2])])
382    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
383    m4_ifval([$4],
384	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
385    lt_dict_add_subkey([lt_decl_dict], [$2],
386	[tagged?], [m4_ifval([$5], [yes], [no])])])
387])
388
389
390# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
391# --------------------------------------------------------
392m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
393
394
395# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
396# ------------------------------------------------
397m4_define([lt_decl_tag_varnames],
398[_lt_decl_filter([tagged?], [yes], $@)])
399
400
401# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
402# ---------------------------------------------------------
403m4_define([_lt_decl_filter],
404[m4_case([$#],
405  [0], [m4_fatal([$0: too few arguments: $#])],
406  [1], [m4_fatal([$0: too few arguments: $#: $1])],
407  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
408  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
409  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
410])
411
412
413# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
414# --------------------------------------------------
415m4_define([lt_decl_quote_varnames],
416[_lt_decl_filter([value], [1], $@)])
417
418
419# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
420# ---------------------------------------------------
421m4_define([lt_decl_dquote_varnames],
422[_lt_decl_filter([value], [2], $@)])
423
424
425# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
426# ---------------------------------------------------
427m4_define([lt_decl_varnames_tagged],
428[m4_assert([$# <= 2])dnl
429_$0(m4_quote(m4_default([$1], [[, ]])),
430    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
431    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
432m4_define([_lt_decl_varnames_tagged],
433[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
434
435
436# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
437# ------------------------------------------------
438m4_define([lt_decl_all_varnames],
439[_$0(m4_quote(m4_default([$1], [[, ]])),
440     m4_if([$2], [],
441	   m4_quote(lt_decl_varnames),
442	m4_quote(m4_shift($@))))[]dnl
443])
444m4_define([_lt_decl_all_varnames],
445[lt_join($@, lt_decl_varnames_tagged([$1],
446			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
447])
448
449
450# _LT_CONFIG_STATUS_DECLARE([VARNAME])
451# ------------------------------------
452# Quote a variable value, and forward it to 'config.status' so that its
453# declaration there will have the same value as in 'configure'.  VARNAME
454# must have a single quote delimited value for this to work.
455m4_define([_LT_CONFIG_STATUS_DECLARE],
456[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
457
458
459# _LT_CONFIG_STATUS_DECLARATIONS
460# ------------------------------
461# We delimit libtool config variables with single quotes, so when
462# we write them to config.status, we have to be sure to quote all
463# embedded single quotes properly.  In configure, this macro expands
464# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
465#
466#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
467m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
468[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
469    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
470
471
472# _LT_LIBTOOL_TAGS
473# ----------------
474# Output comment and list of tags supported by the script
475m4_defun([_LT_LIBTOOL_TAGS],
476[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
477available_tags='_LT_TAGS'dnl
478])
479
480
481# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
482# -----------------------------------
483# Extract the dictionary values for VARNAME (optionally with TAG) and
484# expand to a commented shell variable setting:
485#
486#    # Some comment about what VAR is for.
487#    visible_name=$lt_internal_name
488m4_define([_LT_LIBTOOL_DECLARE],
489[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
490					   [description])))[]dnl
491m4_pushdef([_libtool_name],
492    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
493m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
494    [0], [_libtool_name=[$]$1],
495    [1], [_libtool_name=$lt_[]$1],
496    [2], [_libtool_name=$lt_[]$1],
497    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
498m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
499])
500
501
502# _LT_LIBTOOL_CONFIG_VARS
503# -----------------------
504# Produce commented declarations of non-tagged libtool config variables
505# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
506# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
507# section) are produced by _LT_LIBTOOL_TAG_VARS.
508m4_defun([_LT_LIBTOOL_CONFIG_VARS],
509[m4_foreach([_lt_var],
510    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
511    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
512
513
514# _LT_LIBTOOL_TAG_VARS(TAG)
515# -------------------------
516m4_define([_LT_LIBTOOL_TAG_VARS],
517[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
518    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
519
520
521# _LT_TAGVAR(VARNAME, [TAGNAME])
522# ------------------------------
523m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
524
525
526# _LT_CONFIG_COMMANDS
527# -------------------
528# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
529# variables for single and double quote escaping we saved from calls
530# to _LT_DECL, we can put quote escaped variables declarations
531# into 'config.status', and then the shell code to quote escape them in
532# for loops in 'config.status'.  Finally, any additional code accumulated
533# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
534m4_defun([_LT_CONFIG_COMMANDS],
535[AC_PROVIDE_IFELSE([LT_OUTPUT],
536	dnl If the libtool generation code has been placed in $CONFIG_LT,
537	dnl instead of duplicating it all over again into config.status,
538	dnl then we will have config.status run $CONFIG_LT later, so it
539	dnl needs to know what name is stored there:
540        [AC_CONFIG_COMMANDS([libtool],
541            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
542    dnl If the libtool generation code is destined for config.status,
543    dnl expand the accumulated commands and init code now:
544    [AC_CONFIG_COMMANDS([libtool],
545        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
546])#_LT_CONFIG_COMMANDS
547
548
549# Initialize.
550m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
551[
552
553# The HP-UX ksh and POSIX shell print the target directory to stdout
554# if CDPATH is set.
555(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
556
557sed_quote_subst='$sed_quote_subst'
558double_quote_subst='$double_quote_subst'
559delay_variable_subst='$delay_variable_subst'
560_LT_CONFIG_STATUS_DECLARATIONS
561LTCC='$LTCC'
562LTCFLAGS='$LTCFLAGS'
563compiler='$compiler_DEFAULT'
564
565# A function that is used when there is no print builtin or printf.
566func_fallback_echo ()
567{
568  eval 'cat <<_LTECHO_EOF
569\$[]1
570_LTECHO_EOF'
571}
572
573# Quote evaled strings.
574for var in lt_decl_all_varnames([[ \
575]], lt_decl_quote_varnames); do
576    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
577    *[[\\\\\\\`\\"\\\$]]*)
578      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
579      ;;
580    *)
581      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
582      ;;
583    esac
584done
585
586# Double-quote double-evaled strings.
587for var in lt_decl_all_varnames([[ \
588]], lt_decl_dquote_varnames); do
589    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
590    *[[\\\\\\\`\\"\\\$]]*)
591      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
592      ;;
593    *)
594      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
595      ;;
596    esac
597done
598
599_LT_OUTPUT_LIBTOOL_INIT
600])
601
602# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
603# ------------------------------------
604# Generate a child script FILE with all initialization necessary to
605# reuse the environment learned by the parent script, and make the
606# file executable.  If COMMENT is supplied, it is inserted after the
607# '#!' sequence but before initialization text begins.  After this
608# macro, additional text can be appended to FILE to form the body of
609# the child script.  The macro ends with non-zero status if the
610# file could not be fully written (such as if the disk is full).
611m4_ifdef([AS_INIT_GENERATED],
612[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
613[m4_defun([_LT_GENERATED_FILE_INIT],
614[m4_require([AS_PREPARE])]dnl
615[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
616[lt_write_fail=0
617cat >$1 <<_ASEOF || lt_write_fail=1
618#! $SHELL
619# Generated by $as_me.
620$2
621SHELL=\${CONFIG_SHELL-$SHELL}
622export SHELL
623_ASEOF
624cat >>$1 <<\_ASEOF || lt_write_fail=1
625AS_SHELL_SANITIZE
626_AS_PREPARE
627exec AS_MESSAGE_FD>&1
628_ASEOF
629test 0 = "$lt_write_fail" && chmod +x $1[]dnl
630m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
631
632# LT_OUTPUT
633# ---------
634# This macro allows early generation of the libtool script (before
635# AC_OUTPUT is called), incase it is used in configure for compilation
636# tests.
637AC_DEFUN([LT_OUTPUT],
638[: ${CONFIG_LT=./config.lt}
639AC_MSG_NOTICE([creating $CONFIG_LT])
640_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
641[# Run this file to recreate a libtool stub with the current configuration.])
642
643cat >>"$CONFIG_LT" <<\_LTEOF
644lt_cl_silent=false
645exec AS_MESSAGE_LOG_FD>>config.log
646{
647  echo
648  AS_BOX([Running $as_me.])
649} >&AS_MESSAGE_LOG_FD
650
651lt_cl_help="\
652'$as_me' creates a local libtool stub from the current configuration,
653for use in further configure time tests before the real libtool is
654generated.
655
656Usage: $[0] [[OPTIONS]]
657
658  -h, --help      print this help, then exit
659  -V, --version   print version number, then exit
660  -q, --quiet     do not print progress messages
661  -d, --debug     don't remove temporary files
662
663Report bugs to <bug-libtool@gnu.org>."
664
665lt_cl_version="\
666m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
667m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
668configured by $[0], generated by m4_PACKAGE_STRING.
669
670Copyright (C) 2011 Free Software Foundation, Inc.
671This config.lt script is free software; the Free Software Foundation
672gives unlimited permision to copy, distribute and modify it."
673
674while test 0 != $[#]
675do
676  case $[1] in
677    --version | --v* | -V )
678      echo "$lt_cl_version"; exit 0 ;;
679    --help | --h* | -h )
680      echo "$lt_cl_help"; exit 0 ;;
681    --debug | --d* | -d )
682      debug=: ;;
683    --quiet | --q* | --silent | --s* | -q )
684      lt_cl_silent=: ;;
685
686    -*) AC_MSG_ERROR([unrecognized option: $[1]
687Try '$[0] --help' for more information.]) ;;
688
689    *) AC_MSG_ERROR([unrecognized argument: $[1]
690Try '$[0] --help' for more information.]) ;;
691  esac
692  shift
693done
694
695if $lt_cl_silent; then
696  exec AS_MESSAGE_FD>/dev/null
697fi
698_LTEOF
699
700cat >>"$CONFIG_LT" <<_LTEOF
701_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
702_LTEOF
703
704cat >>"$CONFIG_LT" <<\_LTEOF
705AC_MSG_NOTICE([creating $ofile])
706_LT_OUTPUT_LIBTOOL_COMMANDS
707AS_EXIT(0)
708_LTEOF
709chmod +x "$CONFIG_LT"
710
711# configure is writing to config.log, but config.lt does its own redirection,
712# appending to config.log, which fails on DOS, as config.log is still kept
713# open by configure.  Here we exec the FD to /dev/null, effectively closing
714# config.log, so it can be properly (re)opened and appended to by config.lt.
715lt_cl_success=:
716test yes = "$silent" &&
717  lt_config_lt_args="$lt_config_lt_args --quiet"
718exec AS_MESSAGE_LOG_FD>/dev/null
719$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
720exec AS_MESSAGE_LOG_FD>>config.log
721$lt_cl_success || AS_EXIT(1)
722])# LT_OUTPUT
723
724
725# _LT_CONFIG(TAG)
726# ---------------
727# If TAG is the built-in tag, create an initial libtool script with a
728# default configuration from the untagged config vars.  Otherwise add code
729# to config.status for appending the configuration named by TAG from the
730# matching tagged config vars.
731m4_defun([_LT_CONFIG],
732[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
733_LT_CONFIG_SAVE_COMMANDS([
734  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
735  m4_if(_LT_TAG, [C], [
736    # See if we are running on zsh, and set the options that allow our
737    # commands through without removal of \ escapes.
738    if test -n "${ZSH_VERSION+set}"; then
739      setopt NO_GLOB_SUBST
740    fi
741
742    cfgfile=${ofile}T
743    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
744    $RM "$cfgfile"
745
746    cat <<_LT_EOF >> "$cfgfile"
747#! $SHELL
748# Generated automatically by $as_me ($PACKAGE) $VERSION
749# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
750# NOTE: Changes made to this file will be lost: look at ltmain.sh.
751
752# Provide generalized library-building support services.
753# Written by Gordon Matzigkeit, 1996
754
755_LT_COPYING
756_LT_LIBTOOL_TAGS
757
758# Configured defaults for sys_lib_dlsearch_path munging.
759: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
760
761# ### BEGIN LIBTOOL CONFIG
762_LT_LIBTOOL_CONFIG_VARS
763_LT_LIBTOOL_TAG_VARS
764# ### END LIBTOOL CONFIG
765
766_LT_EOF
767
768    cat <<'_LT_EOF' >> "$cfgfile"
769
770# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
771
772_LT_PREPARE_MUNGE_PATH_LIST
773_LT_PREPARE_CC_BASENAME
774
775# ### END FUNCTIONS SHARED WITH CONFIGURE
776
777_LT_EOF
778
779  case $host_os in
780  aix3*)
781    cat <<\_LT_EOF >> "$cfgfile"
782# AIX sometimes has problems with the GCC collect2 program.  For some
783# reason, if we set the COLLECT_NAMES environment variable, the problems
784# vanish in a puff of smoke.
785if test set != "${COLLECT_NAMES+set}"; then
786  COLLECT_NAMES=
787  export COLLECT_NAMES
788fi
789_LT_EOF
790    ;;
791  esac
792
793  _LT_PROG_LTMAIN
794
795  # We use sed instead of cat because bash on DJGPP gets confused if
796  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
797  # text mode, it properly converts lines to CR/LF.  This bash problem
798  # is reportedly fixed, but why not run on old versions too?
799  $SED '$q' "$ltmain" >> "$cfgfile" \
800     || (rm -f "$cfgfile"; exit 1)
801
802   mv -f "$cfgfile" "$ofile" ||
803    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
804  chmod +x "$ofile"
805],
806[cat <<_LT_EOF >> "$ofile"
807
808dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
809dnl in a comment (ie after a #).
810# ### BEGIN LIBTOOL TAG CONFIG: $1
811_LT_LIBTOOL_TAG_VARS(_LT_TAG)
812# ### END LIBTOOL TAG CONFIG: $1
813_LT_EOF
814])dnl /m4_if
815],
816[m4_if([$1], [], [
817    PACKAGE='$PACKAGE'
818    VERSION='$VERSION'
819    RM='$RM'
820    ofile='$ofile'], [])
821])dnl /_LT_CONFIG_SAVE_COMMANDS
822])# _LT_CONFIG
823
824
825# LT_SUPPORTED_TAG(TAG)
826# ---------------------
827# Trace this macro to discover what tags are supported by the libtool
828# --tag option, using:
829#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
830AC_DEFUN([LT_SUPPORTED_TAG], [])
831
832
833# C support is built-in for now
834m4_define([_LT_LANG_C_enabled], [])
835m4_define([_LT_TAGS], [])
836
837
838# LT_LANG(LANG)
839# -------------
840# Enable libtool support for the given language if not already enabled.
841AC_DEFUN([LT_LANG],
842[AC_BEFORE([$0], [LT_OUTPUT])dnl
843m4_case([$1],
844  [C],			[_LT_LANG(C)],
845  [C++],		[_LT_LANG(CXX)],
846  [Go],			[_LT_LANG(GO)],
847  [Java],		[_LT_LANG(GCJ)],
848  [Fortran 77],		[_LT_LANG(F77)],
849  [Fortran],		[_LT_LANG(FC)],
850  [Windows Resource],	[_LT_LANG(RC)],
851  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
852    [_LT_LANG($1)],
853    [m4_fatal([$0: unsupported language: "$1"])])])dnl
854])# LT_LANG
855
856
857# _LT_LANG(LANGNAME)
858# ------------------
859m4_defun([_LT_LANG],
860[m4_ifdef([_LT_LANG_]$1[_enabled], [],
861  [LT_SUPPORTED_TAG([$1])dnl
862  m4_append([_LT_TAGS], [$1 ])dnl
863  m4_define([_LT_LANG_]$1[_enabled], [])dnl
864  _LT_LANG_$1_CONFIG($1)])dnl
865])# _LT_LANG
866
867
868m4_ifndef([AC_PROG_GO], [
869# NOTE: This macro has been submitted for inclusion into   #
870#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
871#  a released version of Autoconf we should remove this    #
872#  macro and use it instead.                               #
873m4_defun([AC_PROG_GO],
874[AC_LANG_PUSH(Go)dnl
875AC_ARG_VAR([GOC],     [Go compiler command])dnl
876AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
877_AC_ARG_VAR_LDFLAGS()dnl
878AC_CHECK_TOOL(GOC, gccgo)
879if test -z "$GOC"; then
880  if test -n "$ac_tool_prefix"; then
881    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
882  fi
883fi
884if test -z "$GOC"; then
885  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
886fi
887])#m4_defun
888])#m4_ifndef
889
890
891# _LT_LANG_DEFAULT_CONFIG
892# -----------------------
893m4_defun([_LT_LANG_DEFAULT_CONFIG],
894[AC_PROVIDE_IFELSE([AC_PROG_CXX],
895  [LT_LANG(CXX)],
896  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
897
898AC_PROVIDE_IFELSE([AC_PROG_F77],
899  [LT_LANG(F77)],
900  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
901
902AC_PROVIDE_IFELSE([AC_PROG_FC],
903  [LT_LANG(FC)],
904  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
905
906dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
907dnl pulling things in needlessly.
908AC_PROVIDE_IFELSE([AC_PROG_GCJ],
909  [LT_LANG(GCJ)],
910  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
911    [LT_LANG(GCJ)],
912    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
913      [LT_LANG(GCJ)],
914      [m4_ifdef([AC_PROG_GCJ],
915	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
916       m4_ifdef([A][M_PROG_GCJ],
917	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
918       m4_ifdef([LT_PROG_GCJ],
919	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
920
921AC_PROVIDE_IFELSE([AC_PROG_GO],
922  [LT_LANG(GO)],
923  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
924
925AC_PROVIDE_IFELSE([LT_PROG_RC],
926  [LT_LANG(RC)],
927  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
928])# _LT_LANG_DEFAULT_CONFIG
929
930# Obsolete macros:
931AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
932AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
933AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
934AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
935AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
936dnl aclocal-1.4 backwards compatibility:
937dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
938dnl AC_DEFUN([AC_LIBTOOL_F77], [])
939dnl AC_DEFUN([AC_LIBTOOL_FC], [])
940dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
941dnl AC_DEFUN([AC_LIBTOOL_RC], [])
942
943
944# _LT_TAG_COMPILER
945# ----------------
946m4_defun([_LT_TAG_COMPILER],
947[AC_REQUIRE([AC_PROG_CC])dnl
948
949_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
950_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
951_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
952_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
953
954# If no C compiler was specified, use CC.
955LTCC=${LTCC-"$CC"}
956
957# If no C compiler flags were specified, use CFLAGS.
958LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
959
960# Allow CC to be a program name with arguments.
961compiler=$CC
962])# _LT_TAG_COMPILER
963
964
965# _LT_COMPILER_BOILERPLATE
966# ------------------------
967# Check for compiler boilerplate output or warnings with
968# the simple compiler test code.
969m4_defun([_LT_COMPILER_BOILERPLATE],
970[m4_require([_LT_DECL_SED])dnl
971ac_outfile=conftest.$ac_objext
972echo "$lt_simple_compile_test_code" >conftest.$ac_ext
973eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
974_lt_compiler_boilerplate=`cat conftest.err`
975$RM conftest*
976])# _LT_COMPILER_BOILERPLATE
977
978
979# _LT_LINKER_BOILERPLATE
980# ----------------------
981# Check for linker boilerplate output or warnings with
982# the simple link test code.
983m4_defun([_LT_LINKER_BOILERPLATE],
984[m4_require([_LT_DECL_SED])dnl
985ac_outfile=conftest.$ac_objext
986echo "$lt_simple_link_test_code" >conftest.$ac_ext
987eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
988_lt_linker_boilerplate=`cat conftest.err`
989$RM -r conftest*
990])# _LT_LINKER_BOILERPLATE
991
992# _LT_REQUIRED_DARWIN_CHECKS
993# -------------------------
994m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
995  case $host_os in
996    rhapsody* | darwin*)
997    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
998    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
999    AC_CHECK_TOOL([LIPO], [lipo], [:])
1000    AC_CHECK_TOOL([OTOOL], [otool], [:])
1001    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
1002    _LT_DECL([], [DSYMUTIL], [1],
1003      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1004    _LT_DECL([], [NMEDIT], [1],
1005      [Tool to change global to local symbols on Mac OS X])
1006    _LT_DECL([], [LIPO], [1],
1007      [Tool to manipulate fat objects and archives on Mac OS X])
1008    _LT_DECL([], [OTOOL], [1],
1009      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
1010    _LT_DECL([], [OTOOL64], [1],
1011      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
1012
1013    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1014      [lt_cv_apple_cc_single_mod=no
1015      if test -z "$LT_MULTI_MODULE"; then
1016	# By default we will add the -single_module flag. You can override
1017	# by either setting the environment variable LT_MULTI_MODULE
1018	# non-empty at configure time, or by adding -multi_module to the
1019	# link flags.
1020	rm -rf libconftest.dylib*
1021	echo "int foo(void){return 1;}" > conftest.c
1022	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1023-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1024	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1025	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1026        _lt_result=$?
1027	# If there is a non-empty error log, and "single_module"
1028	# appears in it, assume the flag caused a linker warning
1029        if test -s conftest.err && $GREP single_module conftest.err; then
1030	  cat conftest.err >&AS_MESSAGE_LOG_FD
1031	# Otherwise, if the output was created with a 0 exit code from
1032	# the compiler, it worked.
1033	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
1034	  lt_cv_apple_cc_single_mod=yes
1035	else
1036	  cat conftest.err >&AS_MESSAGE_LOG_FD
1037	fi
1038	rm -rf libconftest.dylib*
1039	rm -f conftest.*
1040      fi])
1041
1042    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1043      [lt_cv_ld_exported_symbols_list],
1044      [lt_cv_ld_exported_symbols_list=no
1045      save_LDFLAGS=$LDFLAGS
1046      echo "_main" > conftest.sym
1047      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1048      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1049	[lt_cv_ld_exported_symbols_list=yes],
1050	[lt_cv_ld_exported_symbols_list=no])
1051	LDFLAGS=$save_LDFLAGS
1052    ])
1053
1054    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
1055      [lt_cv_ld_force_load=no
1056      cat > conftest.c << _LT_EOF
1057int forced_loaded() { return 2;}
1058_LT_EOF
1059      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
1060      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1061      echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1062      $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1063      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
1064      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
1065      cat > conftest.c << _LT_EOF
1066int main() { return 0;}
1067_LT_EOF
1068      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
1069      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
1070      _lt_result=$?
1071      if test -s conftest.err && $GREP force_load conftest.err; then
1072	cat conftest.err >&AS_MESSAGE_LOG_FD
1073      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
1074	lt_cv_ld_force_load=yes
1075      else
1076	cat conftest.err >&AS_MESSAGE_LOG_FD
1077      fi
1078        rm -f conftest.err libconftest.a conftest conftest.c
1079        rm -rf conftest.dSYM
1080    ])
1081    case $host_os in
1082    rhapsody* | darwin1.[[012]])
1083      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
1084    darwin1.*)
1085      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
1086    darwin*)
1087      case $MACOSX_DEPLOYMENT_TARGET,$host in
1088        10.[[012]],*|,*powerpc*-darwin[[5-8]]*)
1089          _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
1090        *)
1091          _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
1092      esac
1093    ;;
1094  esac
1095    if test yes = "$lt_cv_apple_cc_single_mod"; then
1096      _lt_dar_single_mod='$single_module'
1097    fi
1098    if test yes = "$lt_cv_ld_exported_symbols_list"; then
1099      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
1100    else
1101      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
1102    fi
1103    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
1104      _lt_dsymutil='~$DSYMUTIL $lib || :'
1105    else
1106      _lt_dsymutil=
1107    fi
1108    ;;
1109  esac
1110])
1111
1112
1113# _LT_DARWIN_LINKER_FEATURES([TAG])
1114# ---------------------------------
1115# Checks for linker and compiler features on darwin
1116m4_defun([_LT_DARWIN_LINKER_FEATURES],
1117[
1118  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1119  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1120  _LT_TAGVAR(hardcode_direct, $1)=no
1121  _LT_TAGVAR(hardcode_automatic, $1)=yes
1122  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1123  if test yes = "$lt_cv_ld_force_load"; then
1124    _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\"`'
1125    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
1126                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
1127  else
1128    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1129  fi
1130  _LT_TAGVAR(link_all_deplibs, $1)=yes
1131  _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
1132  case $cc_basename in
1133     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
1134     *) _lt_dar_can_shared=$GCC ;;
1135  esac
1136  if test yes = "$_lt_dar_can_shared"; then
1137    output_verbose_link_cmd=func_echo_all
1138    _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"
1139    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
1140    _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"
1141    _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"
1142    m4_if([$1], [CXX],
1143[   if test yes != "$lt_cv_apple_cc_single_mod"; then
1144      _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"
1145      _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"
1146    fi
1147],[])
1148  else
1149  _LT_TAGVAR(ld_shlibs, $1)=no
1150  fi
1151])
1152
1153# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1154# ----------------------------------
1155# Links a minimal program and checks the executable
1156# for the system default hardcoded library path. In most cases,
1157# this is /usr/lib:/lib, but when the MPI compilers are used
1158# the location of the communication and MPI libs are included too.
1159# If we don't find anything, use the default library path according
1160# to the aix ld manual.
1161# Store the results from the different compilers for each TAGNAME.
1162# Allow to override them for all tags through lt_cv_aix_libpath.
1163m4_defun([_LT_SYS_MODULE_PATH_AIX],
1164[m4_require([_LT_DECL_SED])dnl
1165if test set = "${lt_cv_aix_libpath+set}"; then
1166  aix_libpath=$lt_cv_aix_libpath
1167else
1168  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1169  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1170  lt_aix_libpath_sed='[
1171      /Import File Strings/,/^$/ {
1172	  /^0/ {
1173	      s/^0  *\([^ ]*\) *$/\1/
1174	      p
1175	  }
1176      }]'
1177  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1178  # Check for a 64-bit object if we didn't find anything.
1179  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1180    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1181  fi],[])
1182  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1183    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
1184  fi
1185  ])
1186  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1187fi
1188])# _LT_SYS_MODULE_PATH_AIX
1189
1190
1191# _LT_SHELL_INIT(ARG)
1192# -------------------
1193m4_define([_LT_SHELL_INIT],
1194[m4_divert_text([M4SH-INIT], [$1
1195])])# _LT_SHELL_INIT
1196
1197
1198
1199# _LT_PROG_ECHO_BACKSLASH
1200# -----------------------
1201# Find how we can fake an echo command that does not interpret backslash.
1202# In particular, with Autoconf 2.60 or later we add some code to the start
1203# of the generated configure script that will find a shell with a builtin
1204# printf (that we can use as an echo command).
1205m4_defun([_LT_PROG_ECHO_BACKSLASH],
1206[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1207ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1208ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1209
1210AC_MSG_CHECKING([how to print strings])
1211# Test print first, because it will be a builtin if present.
1212if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
1213   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1214  ECHO='print -r --'
1215elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1216  ECHO='printf %s\n'
1217else
1218  # Use this function as a fallback that always works.
1219  func_fallback_echo ()
1220  {
1221    eval 'cat <<_LTECHO_EOF
1222$[]1
1223_LTECHO_EOF'
1224  }
1225  ECHO='func_fallback_echo'
1226fi
1227
1228# func_echo_all arg...
1229# Invoke $ECHO with all args, space-separated.
1230func_echo_all ()
1231{
1232    $ECHO "$*"
1233}
1234
1235case $ECHO in
1236  printf*) AC_MSG_RESULT([printf]) ;;
1237  print*) AC_MSG_RESULT([print -r]) ;;
1238  *) AC_MSG_RESULT([cat]) ;;
1239esac
1240
1241m4_ifdef([_AS_DETECT_SUGGESTED],
1242[_AS_DETECT_SUGGESTED([
1243  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
1244    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1245    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1246    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1247    PATH=/empty FPATH=/empty; export PATH FPATH
1248    test "X`printf %s $ECHO`" = "X$ECHO" \
1249      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
1250
1251_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1252_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
1253])# _LT_PROG_ECHO_BACKSLASH
1254
1255
1256# _LT_WITH_SYSROOT
1257# ----------------
1258AC_DEFUN([_LT_WITH_SYSROOT],
1259[m4_require([_LT_DECL_SED])dnl
1260AC_MSG_CHECKING([for sysroot])
1261AC_ARG_WITH([sysroot],
1262[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
1263  [Search for dependent libraries within DIR (or the compiler's sysroot
1264   if not specified).])],
1265[], [with_sysroot=no])
1266
1267dnl lt_sysroot will always be passed unquoted.  We quote it here
1268dnl in case the user passed a directory name.
1269lt_sysroot=
1270case $with_sysroot in #(
1271 yes)
1272   if test yes = "$GCC"; then
1273     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
1274   fi
1275   ;; #(
1276 /*)
1277   lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"`
1278   ;; #(
1279 no|'')
1280   ;; #(
1281 *)
1282   AC_MSG_RESULT([$with_sysroot])
1283   AC_MSG_ERROR([The sysroot must be an absolute path.])
1284   ;;
1285esac
1286
1287 AC_MSG_RESULT([${lt_sysroot:-no}])
1288_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
1289[dependent libraries, and where our libraries should be installed.])])
1290
1291# _LT_ENABLE_LOCK
1292# ---------------
1293m4_defun([_LT_ENABLE_LOCK],
1294[AC_ARG_ENABLE([libtool-lock],
1295  [AS_HELP_STRING([--disable-libtool-lock],
1296    [avoid locking (might break parallel builds)])])
1297test no = "$enable_libtool_lock" || enable_libtool_lock=yes
1298
1299# Some flags need to be propagated to the compiler or linker for good
1300# libtool support.
1301case $host in
1302ia64-*-hpux*)
1303  # Find out what ABI is being produced by ac_compile, and set mode
1304  # options accordingly.
1305  echo 'int i;' > conftest.$ac_ext
1306  if AC_TRY_EVAL(ac_compile); then
1307    case `$FILECMD conftest.$ac_objext` in
1308      *ELF-32*)
1309	HPUX_IA64_MODE=32
1310	;;
1311      *ELF-64*)
1312	HPUX_IA64_MODE=64
1313	;;
1314    esac
1315  fi
1316  rm -rf conftest*
1317  ;;
1318*-*-irix6*)
1319  # Find out what ABI is being produced by ac_compile, and set linker
1320  # options accordingly.
1321  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1322  if AC_TRY_EVAL(ac_compile); then
1323    if test yes = "$lt_cv_prog_gnu_ld"; then
1324      case `$FILECMD conftest.$ac_objext` in
1325	*32-bit*)
1326	  LD="${LD-ld} -melf32bsmip"
1327	  ;;
1328	*N32*)
1329	  LD="${LD-ld} -melf32bmipn32"
1330	  ;;
1331	*64-bit*)
1332	  LD="${LD-ld} -melf64bmip"
1333	;;
1334      esac
1335    else
1336      case `$FILECMD conftest.$ac_objext` in
1337	*32-bit*)
1338	  LD="${LD-ld} -32"
1339	  ;;
1340	*N32*)
1341	  LD="${LD-ld} -n32"
1342	  ;;
1343	*64-bit*)
1344	  LD="${LD-ld} -64"
1345	  ;;
1346      esac
1347    fi
1348  fi
1349  rm -rf conftest*
1350  ;;
1351
1352mips64*-*linux*)
1353  # Find out what ABI is being produced by ac_compile, and set linker
1354  # options accordingly.
1355  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1356  if AC_TRY_EVAL(ac_compile); then
1357    emul=elf
1358    case `$FILECMD conftest.$ac_objext` in
1359      *32-bit*)
1360	emul="${emul}32"
1361	;;
1362      *64-bit*)
1363	emul="${emul}64"
1364	;;
1365    esac
1366    case `$FILECMD conftest.$ac_objext` in
1367      *MSB*)
1368	emul="${emul}btsmip"
1369	;;
1370      *LSB*)
1371	emul="${emul}ltsmip"
1372	;;
1373    esac
1374    case `$FILECMD conftest.$ac_objext` in
1375      *N32*)
1376	emul="${emul}n32"
1377	;;
1378    esac
1379    LD="${LD-ld} -m $emul"
1380  fi
1381  rm -rf conftest*
1382  ;;
1383
1384x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
1385s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1386  # Find out what ABI is being produced by ac_compile, and set linker
1387  # options accordingly.  Note that the listed cases only cover the
1388  # situations where additional linker options are needed (such as when
1389  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
1390  # vice versa); the common cases where no linker options are needed do
1391  # not appear in the list.
1392  echo 'int i;' > conftest.$ac_ext
1393  if AC_TRY_EVAL(ac_compile); then
1394    case `$FILECMD conftest.o` in
1395      *32-bit*)
1396	case $host in
1397	  x86_64-*kfreebsd*-gnu)
1398	    LD="${LD-ld} -m elf_i386_fbsd"
1399	    ;;
1400	  x86_64-*linux*)
1401	    case `$FILECMD conftest.o` in
1402	      *x86-64*)
1403		LD="${LD-ld} -m elf32_x86_64"
1404		;;
1405	      *)
1406		LD="${LD-ld} -m elf_i386"
1407		;;
1408	    esac
1409	    ;;
1410	  powerpc64le-*linux*)
1411	    LD="${LD-ld} -m elf32lppclinux"
1412	    ;;
1413	  powerpc64-*linux*)
1414	    LD="${LD-ld} -m elf32ppclinux"
1415	    ;;
1416	  s390x-*linux*)
1417	    LD="${LD-ld} -m elf_s390"
1418	    ;;
1419	  sparc64-*linux*)
1420	    LD="${LD-ld} -m elf32_sparc"
1421	    ;;
1422	esac
1423	;;
1424      *64-bit*)
1425	case $host in
1426	  x86_64-*kfreebsd*-gnu)
1427	    LD="${LD-ld} -m elf_x86_64_fbsd"
1428	    ;;
1429	  x86_64-*linux*)
1430	    LD="${LD-ld} -m elf_x86_64"
1431	    ;;
1432	  powerpcle-*linux*|powerpc64le-*linux*)
1433	    LD="${LD-ld} -m elf64lppc"
1434	    ;;
1435	  powerpc-*linux*|powerpc64-*linux*)
1436	    LD="${LD-ld} -m elf64ppc"
1437	    ;;
1438	  s390*-*linux*|s390*-*tpf*)
1439	    LD="${LD-ld} -m elf64_s390"
1440	    ;;
1441	  sparc*-*linux*)
1442	    LD="${LD-ld} -m elf64_sparc"
1443	    ;;
1444	esac
1445	;;
1446    esac
1447  fi
1448  rm -rf conftest*
1449  ;;
1450
1451*-*-sco3.2v5*)
1452  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1453  SAVE_CFLAGS=$CFLAGS
1454  CFLAGS="$CFLAGS -belf"
1455  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1456    [AC_LANG_PUSH(C)
1457     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1458     AC_LANG_POP])
1459  if test yes != "$lt_cv_cc_needs_belf"; then
1460    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1461    CFLAGS=$SAVE_CFLAGS
1462  fi
1463  ;;
1464*-*solaris*)
1465  # Find out what ABI is being produced by ac_compile, and set linker
1466  # options accordingly.
1467  echo 'int i;' > conftest.$ac_ext
1468  if AC_TRY_EVAL(ac_compile); then
1469    case `$FILECMD conftest.o` in
1470    *64-bit*)
1471      case $lt_cv_prog_gnu_ld in
1472      yes*)
1473        case $host in
1474        i?86-*-solaris*|x86_64-*-solaris*)
1475          LD="${LD-ld} -m elf_x86_64"
1476          ;;
1477        sparc*-*-solaris*)
1478          LD="${LD-ld} -m elf64_sparc"
1479          ;;
1480        esac
1481        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
1482        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
1483          LD=${LD-ld}_sol2
1484        fi
1485        ;;
1486      *)
1487	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1488	  LD="${LD-ld} -64"
1489	fi
1490	;;
1491      esac
1492      ;;
1493    esac
1494  fi
1495  rm -rf conftest*
1496  ;;
1497esac
1498
1499need_locks=$enable_libtool_lock
1500])# _LT_ENABLE_LOCK
1501
1502
1503# _LT_PROG_AR
1504# -----------
1505m4_defun([_LT_PROG_AR],
1506[AC_CHECK_TOOLS(AR, [ar], false)
1507: ${AR=ar}
1508_LT_DECL([], [AR], [1], [The archiver])
1509
1510# Use ARFLAGS variable as AR's operation code to sync the variable naming with
1511# Automake.  If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
1512# higher priority because thats what people were doing historically (setting
1513# ARFLAGS for automake and AR_FLAGS for libtool).  FIXME: Make the AR_FLAGS
1514# variable obsoleted/removed.
1515
1516test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
1517lt_ar_flags=$AR_FLAGS
1518_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)])
1519
1520# Make AR_FLAGS overridable by 'make ARFLAGS='.  Don't try to run-time override
1521# by AR_FLAGS because that was never working and AR_FLAGS is about to die.
1522_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}],
1523         [Flags to create an archive])
1524
1525AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
1526  [lt_cv_ar_at_file=no
1527   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
1528     [echo conftest.$ac_objext > conftest.lst
1529      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
1530      AC_TRY_EVAL([lt_ar_try])
1531      if test 0 -eq "$ac_status"; then
1532	# Ensure the archiver fails upon bogus file names.
1533	rm -f conftest.$ac_objext libconftest.a
1534	AC_TRY_EVAL([lt_ar_try])
1535	if test 0 -ne "$ac_status"; then
1536          lt_cv_ar_at_file=@
1537        fi
1538      fi
1539      rm -f conftest.* libconftest.a
1540     ])
1541  ])
1542
1543if test no = "$lt_cv_ar_at_file"; then
1544  archiver_list_spec=
1545else
1546  archiver_list_spec=$lt_cv_ar_at_file
1547fi
1548_LT_DECL([], [archiver_list_spec], [1],
1549  [How to feed a file listing to the archiver])
1550])# _LT_PROG_AR
1551
1552
1553# _LT_CMD_OLD_ARCHIVE
1554# -------------------
1555m4_defun([_LT_CMD_OLD_ARCHIVE],
1556[_LT_PROG_AR
1557
1558AC_CHECK_TOOL(STRIP, strip, :)
1559test -z "$STRIP" && STRIP=:
1560_LT_DECL([], [STRIP], [1], [A symbol stripping program])
1561
1562AC_CHECK_TOOL(RANLIB, ranlib, :)
1563test -z "$RANLIB" && RANLIB=:
1564_LT_DECL([], [RANLIB], [1],
1565    [Commands used to install an old-style archive])
1566
1567# Determine commands to create old-style static archives.
1568old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1569old_postinstall_cmds='chmod 644 $oldlib'
1570old_postuninstall_cmds=
1571
1572if test -n "$RANLIB"; then
1573  case $host_os in
1574  bitrig* | openbsd*)
1575    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
1576    ;;
1577  *)
1578    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
1579    ;;
1580  esac
1581  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
1582fi
1583
1584case $host_os in
1585  darwin*)
1586    lock_old_archive_extraction=yes ;;
1587  *)
1588    lock_old_archive_extraction=no ;;
1589esac
1590_LT_DECL([], [old_postinstall_cmds], [2])
1591_LT_DECL([], [old_postuninstall_cmds], [2])
1592_LT_TAGDECL([], [old_archive_cmds], [2],
1593    [Commands used to build an old-style archive])
1594_LT_DECL([], [lock_old_archive_extraction], [0],
1595    [Whether to use a lock for old archive extraction])
1596])# _LT_CMD_OLD_ARCHIVE
1597
1598
1599# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1600#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1601# ----------------------------------------------------------------
1602# Check whether the given compiler option works
1603AC_DEFUN([_LT_COMPILER_OPTION],
1604[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1605m4_require([_LT_DECL_SED])dnl
1606AC_CACHE_CHECK([$1], [$2],
1607  [$2=no
1608   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1609   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1610   lt_compiler_flag="$3"  ## exclude from sc_useless_quotes_in_assignment
1611   # Insert the option either (1) after the last *FLAGS variable, or
1612   # (2) before a word containing "conftest.", or (3) at the end.
1613   # Note that $ac_compile itself does not contain backslashes and begins
1614   # with a dollar sign (not a hyphen), so the echo should work correctly.
1615   # The option is referenced via a variable to avoid confusing sed.
1616   lt_compile=`echo "$ac_compile" | $SED \
1617   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1618   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1619   -e 's:$: $lt_compiler_flag:'`
1620   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1621   (eval "$lt_compile" 2>conftest.err)
1622   ac_status=$?
1623   cat conftest.err >&AS_MESSAGE_LOG_FD
1624   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1625   if (exit $ac_status) && test -s "$ac_outfile"; then
1626     # The compiler can only warn and ignore the option if not recognized
1627     # So say no if there are warnings other than the usual output.
1628     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
1629     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1630     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1631       $2=yes
1632     fi
1633   fi
1634   $RM conftest*
1635])
1636
1637if test yes = "[$]$2"; then
1638    m4_if([$5], , :, [$5])
1639else
1640    m4_if([$6], , :, [$6])
1641fi
1642])# _LT_COMPILER_OPTION
1643
1644# Old name:
1645AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1646dnl aclocal-1.4 backwards compatibility:
1647dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1648
1649
1650# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1651#                  [ACTION-SUCCESS], [ACTION-FAILURE])
1652# ----------------------------------------------------
1653# Check whether the given linker option works
1654AC_DEFUN([_LT_LINKER_OPTION],
1655[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1656m4_require([_LT_DECL_SED])dnl
1657AC_CACHE_CHECK([$1], [$2],
1658  [$2=no
1659   save_LDFLAGS=$LDFLAGS
1660   LDFLAGS="$LDFLAGS $3"
1661   echo "$lt_simple_link_test_code" > conftest.$ac_ext
1662   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1663     # The linker can only warn and ignore the option if not recognized
1664     # So say no if there are warnings
1665     if test -s conftest.err; then
1666       # Append any errors to the config.log.
1667       cat conftest.err 1>&AS_MESSAGE_LOG_FD
1668       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
1669       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1670       if diff conftest.exp conftest.er2 >/dev/null; then
1671         $2=yes
1672       fi
1673     else
1674       $2=yes
1675     fi
1676   fi
1677   $RM -r conftest*
1678   LDFLAGS=$save_LDFLAGS
1679])
1680
1681if test yes = "[$]$2"; then
1682    m4_if([$4], , :, [$4])
1683else
1684    m4_if([$5], , :, [$5])
1685fi
1686])# _LT_LINKER_OPTION
1687
1688# Old name:
1689AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1690dnl aclocal-1.4 backwards compatibility:
1691dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1692
1693
1694# LT_CMD_MAX_LEN
1695#---------------
1696AC_DEFUN([LT_CMD_MAX_LEN],
1697[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1698# find the maximum length of command line arguments
1699AC_MSG_CHECKING([the maximum length of command line arguments])
1700AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1701  i=0
1702  teststring=ABCD
1703
1704  case $build_os in
1705  msdosdjgpp*)
1706    # On DJGPP, this test can blow up pretty badly due to problems in libc
1707    # (any single argument exceeding 2000 bytes causes a buffer overrun
1708    # during glob expansion).  Even if it were fixed, the result of this
1709    # check would be larger than it should be.
1710    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
1711    ;;
1712
1713  gnu*)
1714    # Under GNU Hurd, this test is not required because there is
1715    # no limit to the length of command line arguments.
1716    # Libtool will interpret -1 as no limit whatsoever
1717    lt_cv_sys_max_cmd_len=-1;
1718    ;;
1719
1720  cygwin* | mingw* | cegcc*)
1721    # On Win9x/ME, this test blows up -- it succeeds, but takes
1722    # about 5 minutes as the teststring grows exponentially.
1723    # Worse, since 9x/ME are not pre-emptively multitasking,
1724    # you end up with a "frozen" computer, even though with patience
1725    # the test eventually succeeds (with a max line length of 256k).
1726    # Instead, let's just punt: use the minimum linelength reported by
1727    # all of the supported platforms: 8192 (on NT/2K/XP).
1728    lt_cv_sys_max_cmd_len=8192;
1729    ;;
1730
1731  mint*)
1732    # On MiNT this can take a long time and run out of memory.
1733    lt_cv_sys_max_cmd_len=8192;
1734    ;;
1735
1736  mint*)
1737    # On MiNT this can take a long time and run out of memory.
1738    lt_cv_sys_max_cmd_len=8192;
1739    ;;
1740
1741  amigaos*)
1742    # On AmigaOS with pdksh, this test takes hours, literally.
1743    # So we just punt and use a minimum line length of 8192.
1744    lt_cv_sys_max_cmd_len=8192;
1745    ;;
1746
1747  bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
1748    # This has been around since 386BSD, at least.  Likely further.
1749    if test -x /sbin/sysctl; then
1750      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1751    elif test -x /usr/sbin/sysctl; then
1752      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1753    else
1754      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
1755    fi
1756    # And add a safety zone
1757    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1758    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1759    ;;
1760
1761  interix*)
1762    # We know the value 262144 and hardcode it with a safety zone (like BSD)
1763    lt_cv_sys_max_cmd_len=196608
1764    ;;
1765
1766  os2*)
1767    # The test takes a long time on OS/2.
1768    lt_cv_sys_max_cmd_len=8192
1769    ;;
1770
1771  osf*)
1772    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1773    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1774    # nice to cause kernel panics so lets avoid the loop below.
1775    # First set a reasonable default.
1776    lt_cv_sys_max_cmd_len=16384
1777    #
1778    if test -x /sbin/sysconfig; then
1779      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1780        *1*) lt_cv_sys_max_cmd_len=-1 ;;
1781      esac
1782    fi
1783    ;;
1784  sco3.2v5*)
1785    lt_cv_sys_max_cmd_len=102400
1786    ;;
1787  sysv5* | sco5v6* | sysv4.2uw2*)
1788    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1789    if test -n "$kargmax"; then
1790      lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[	 ]]//'`
1791    else
1792      lt_cv_sys_max_cmd_len=32768
1793    fi
1794    ;;
1795  *)
1796    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1797    if test -n "$lt_cv_sys_max_cmd_len" && \
1798       test undefined != "$lt_cv_sys_max_cmd_len"; then
1799      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1800      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1801    else
1802      # Make teststring a little bigger before we do anything with it.
1803      # a 1K string should be a reasonable start.
1804      for i in 1 2 3 4 5 6 7 8; do
1805        teststring=$teststring$teststring
1806      done
1807      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1808      # If test is not a shell built-in, we'll probably end up computing a
1809      # maximum length that is only half of the actual maximum length, but
1810      # we can't tell.
1811      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
1812	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
1813	      test 17 != "$i" # 1/2 MB should be enough
1814      do
1815        i=`expr $i + 1`
1816        teststring=$teststring$teststring
1817      done
1818      # Only check the string length outside the loop.
1819      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1820      teststring=
1821      # Add a significant safety factor because C++ compilers can tack on
1822      # massive amounts of additional arguments before passing them to the
1823      # linker.  It appears as though 1/2 is a usable value.
1824      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1825    fi
1826    ;;
1827  esac
1828])
1829if test -n "$lt_cv_sys_max_cmd_len"; then
1830  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1831else
1832  AC_MSG_RESULT(none)
1833fi
1834max_cmd_len=$lt_cv_sys_max_cmd_len
1835_LT_DECL([], [max_cmd_len], [0],
1836    [What is the maximum length of a command?])
1837])# LT_CMD_MAX_LEN
1838
1839# Old name:
1840AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1841dnl aclocal-1.4 backwards compatibility:
1842dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1843
1844
1845# _LT_HEADER_DLFCN
1846# ----------------
1847m4_defun([_LT_HEADER_DLFCN],
1848[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1849])# _LT_HEADER_DLFCN
1850
1851
1852# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1853#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1854# ----------------------------------------------------------------
1855m4_defun([_LT_TRY_DLOPEN_SELF],
1856[m4_require([_LT_HEADER_DLFCN])dnl
1857if test yes = "$cross_compiling"; then :
1858  [$4]
1859else
1860  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1861  lt_status=$lt_dlunknown
1862  cat > conftest.$ac_ext <<_LT_EOF
1863[#line $LINENO "configure"
1864#include "confdefs.h"
1865
1866#if HAVE_DLFCN_H
1867#include <dlfcn.h>
1868#endif
1869
1870#include <stdio.h>
1871
1872#ifdef RTLD_GLOBAL
1873#  define LT_DLGLOBAL		RTLD_GLOBAL
1874#else
1875#  ifdef DL_GLOBAL
1876#    define LT_DLGLOBAL		DL_GLOBAL
1877#  else
1878#    define LT_DLGLOBAL		0
1879#  endif
1880#endif
1881
1882/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1883   find out it does not work in some platform. */
1884#ifndef LT_DLLAZY_OR_NOW
1885#  ifdef RTLD_LAZY
1886#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
1887#  else
1888#    ifdef DL_LAZY
1889#      define LT_DLLAZY_OR_NOW		DL_LAZY
1890#    else
1891#      ifdef RTLD_NOW
1892#        define LT_DLLAZY_OR_NOW	RTLD_NOW
1893#      else
1894#        ifdef DL_NOW
1895#          define LT_DLLAZY_OR_NOW	DL_NOW
1896#        else
1897#          define LT_DLLAZY_OR_NOW	0
1898#        endif
1899#      endif
1900#    endif
1901#  endif
1902#endif
1903
1904/* When -fvisibility=hidden is used, assume the code has been annotated
1905   correspondingly for the symbols needed.  */
1906#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
1907int fnord () __attribute__((visibility("default")));
1908#endif
1909
1910int fnord () { return 42; }
1911int main ()
1912{
1913  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1914  int status = $lt_dlunknown;
1915
1916  if (self)
1917    {
1918      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
1919      else
1920        {
1921	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
1922          else puts (dlerror ());
1923	}
1924      /* dlclose (self); */
1925    }
1926  else
1927    puts (dlerror ());
1928
1929  return status;
1930}]
1931_LT_EOF
1932  if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
1933    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1934    lt_status=$?
1935    case x$lt_status in
1936      x$lt_dlno_uscore) $1 ;;
1937      x$lt_dlneed_uscore) $2 ;;
1938      x$lt_dlunknown|x*) $3 ;;
1939    esac
1940  else :
1941    # compilation failed
1942    $3
1943  fi
1944fi
1945rm -fr conftest*
1946])# _LT_TRY_DLOPEN_SELF
1947
1948
1949# LT_SYS_DLOPEN_SELF
1950# ------------------
1951AC_DEFUN([LT_SYS_DLOPEN_SELF],
1952[m4_require([_LT_HEADER_DLFCN])dnl
1953if test yes != "$enable_dlopen"; then
1954  enable_dlopen=unknown
1955  enable_dlopen_self=unknown
1956  enable_dlopen_self_static=unknown
1957else
1958  lt_cv_dlopen=no
1959  lt_cv_dlopen_libs=
1960
1961  case $host_os in
1962  beos*)
1963    lt_cv_dlopen=load_add_on
1964    lt_cv_dlopen_libs=
1965    lt_cv_dlopen_self=yes
1966    ;;
1967
1968  mingw* | pw32* | cegcc*)
1969    lt_cv_dlopen=LoadLibrary
1970    lt_cv_dlopen_libs=
1971    ;;
1972
1973  cygwin*)
1974    lt_cv_dlopen=dlopen
1975    lt_cv_dlopen_libs=
1976    ;;
1977
1978  darwin*)
1979    # if libdl is installed we need to link against it
1980    AC_CHECK_LIB([dl], [dlopen],
1981		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
1982    lt_cv_dlopen=dyld
1983    lt_cv_dlopen_libs=
1984    lt_cv_dlopen_self=yes
1985    ])
1986    ;;
1987
1988  tpf*)
1989    # Don't try to run any link tests for TPF.  We know it's impossible
1990    # because TPF is a cross-compiler, and we know how we open DSOs.
1991    lt_cv_dlopen=dlopen
1992    lt_cv_dlopen_libs=
1993    lt_cv_dlopen_self=no
1994    ;;
1995
1996  *)
1997    AC_CHECK_FUNC([shl_load],
1998	  [lt_cv_dlopen=shl_load],
1999      [AC_CHECK_LIB([dld], [shl_load],
2000	    [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
2001	[AC_CHECK_FUNC([dlopen],
2002	      [lt_cv_dlopen=dlopen],
2003	  [AC_CHECK_LIB([dl], [dlopen],
2004		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
2005	    [AC_CHECK_LIB([svld], [dlopen],
2006		  [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
2007	      [AC_CHECK_LIB([dld], [dld_link],
2008		    [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
2009	      ])
2010	    ])
2011	  ])
2012	])
2013      ])
2014    ;;
2015  esac
2016
2017  if test no = "$lt_cv_dlopen"; then
2018    enable_dlopen=no
2019  else
2020    enable_dlopen=yes
2021  fi
2022
2023  case $lt_cv_dlopen in
2024  dlopen)
2025    save_CPPFLAGS=$CPPFLAGS
2026    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2027
2028    save_LDFLAGS=$LDFLAGS
2029    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2030
2031    save_LIBS=$LIBS
2032    LIBS="$lt_cv_dlopen_libs $LIBS"
2033
2034    AC_CACHE_CHECK([whether a program can dlopen itself],
2035	  lt_cv_dlopen_self, [dnl
2036	  _LT_TRY_DLOPEN_SELF(
2037	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2038	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2039    ])
2040
2041    if test yes = "$lt_cv_dlopen_self"; then
2042      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2043      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2044	  lt_cv_dlopen_self_static, [dnl
2045	  _LT_TRY_DLOPEN_SELF(
2046	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2047	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
2048      ])
2049    fi
2050
2051    CPPFLAGS=$save_CPPFLAGS
2052    LDFLAGS=$save_LDFLAGS
2053    LIBS=$save_LIBS
2054    ;;
2055  esac
2056
2057  case $lt_cv_dlopen_self in
2058  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2059  *) enable_dlopen_self=unknown ;;
2060  esac
2061
2062  case $lt_cv_dlopen_self_static in
2063  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2064  *) enable_dlopen_self_static=unknown ;;
2065  esac
2066fi
2067_LT_DECL([dlopen_support], [enable_dlopen], [0],
2068	 [Whether dlopen is supported])
2069_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2070	 [Whether dlopen of programs is supported])
2071_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2072	 [Whether dlopen of statically linked programs is supported])
2073])# LT_SYS_DLOPEN_SELF
2074
2075# Old name:
2076AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2077dnl aclocal-1.4 backwards compatibility:
2078dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2079
2080
2081# _LT_COMPILER_C_O([TAGNAME])
2082# ---------------------------
2083# Check to see if options -c and -o are simultaneously supported by compiler.
2084# This macro does not hard code the compiler like AC_PROG_CC_C_O.
2085m4_defun([_LT_COMPILER_C_O],
2086[m4_require([_LT_DECL_SED])dnl
2087m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2088m4_require([_LT_TAG_COMPILER])dnl
2089AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2090  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2091  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2092   $RM -r conftest 2>/dev/null
2093   mkdir conftest
2094   cd conftest
2095   mkdir out
2096   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2097
2098   lt_compiler_flag="-o out/conftest2.$ac_objext"
2099   # Insert the option either (1) after the last *FLAGS variable, or
2100   # (2) before a word containing "conftest.", or (3) at the end.
2101   # Note that $ac_compile itself does not contain backslashes and begins
2102   # with a dollar sign (not a hyphen), so the echo should work correctly.
2103   lt_compile=`echo "$ac_compile" | $SED \
2104   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2105   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2106   -e 's:$: $lt_compiler_flag:'`
2107   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2108   (eval "$lt_compile" 2>out/conftest.err)
2109   ac_status=$?
2110   cat out/conftest.err >&AS_MESSAGE_LOG_FD
2111   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2112   if (exit $ac_status) && test -s out/conftest2.$ac_objext
2113   then
2114     # The compiler can only warn and ignore the option if not recognized
2115     # So say no if there are warnings
2116     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
2117     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2118     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2119       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2120     fi
2121   fi
2122   chmod u+w . 2>&AS_MESSAGE_LOG_FD
2123   $RM conftest*
2124   # SGI C++ compiler will create directory out/ii_files/ for
2125   # template instantiation
2126   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2127   $RM out/* && rmdir out
2128   cd ..
2129   $RM -r conftest
2130   $RM conftest*
2131])
2132_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2133	[Does compiler simultaneously support -c and -o options?])
2134])# _LT_COMPILER_C_O
2135
2136
2137# _LT_COMPILER_FILE_LOCKS([TAGNAME])
2138# ----------------------------------
2139# Check to see if we can do hard links to lock some files if needed
2140m4_defun([_LT_COMPILER_FILE_LOCKS],
2141[m4_require([_LT_ENABLE_LOCK])dnl
2142m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2143_LT_COMPILER_C_O([$1])
2144
2145hard_links=nottested
2146if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
2147  # do not overwrite the value of need_locks provided by the user
2148  AC_MSG_CHECKING([if we can lock with hard links])
2149  hard_links=yes
2150  $RM conftest*
2151  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2152  touch conftest.a
2153  ln conftest.a conftest.b 2>&5 || hard_links=no
2154  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2155  AC_MSG_RESULT([$hard_links])
2156  if test no = "$hard_links"; then
2157    AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
2158    need_locks=warn
2159  fi
2160else
2161  need_locks=no
2162fi
2163_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2164])# _LT_COMPILER_FILE_LOCKS
2165
2166
2167# _LT_CHECK_OBJDIR
2168# ----------------
2169m4_defun([_LT_CHECK_OBJDIR],
2170[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2171[rm -f .libs 2>/dev/null
2172mkdir .libs 2>/dev/null
2173if test -d .libs; then
2174  lt_cv_objdir=.libs
2175else
2176  # MS-DOS does not allow filenames that begin with a dot.
2177  lt_cv_objdir=_libs
2178fi
2179rmdir .libs 2>/dev/null])
2180objdir=$lt_cv_objdir
2181_LT_DECL([], [objdir], [0],
2182         [The name of the directory that contains temporary libtool files])dnl
2183m4_pattern_allow([LT_OBJDIR])dnl
2184AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
2185  [Define to the sub-directory where libtool stores uninstalled libraries.])
2186])# _LT_CHECK_OBJDIR
2187
2188
2189# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2190# --------------------------------------
2191# Check hardcoding attributes.
2192m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2193[AC_MSG_CHECKING([how to hardcode library paths into programs])
2194_LT_TAGVAR(hardcode_action, $1)=
2195if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2196   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2197   test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
2198
2199  # We can hardcode non-existent directories.
2200  if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
2201     # If the only mechanism to avoid hardcoding is shlibpath_var, we
2202     # have to relink, otherwise we might link with an installed library
2203     # when we should be linking with a yet-to-be-installed one
2204     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
2205     test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
2206    # Linking always hardcodes the temporary library directory.
2207    _LT_TAGVAR(hardcode_action, $1)=relink
2208  else
2209    # We can link without hardcoding, and we can hardcode nonexisting dirs.
2210    _LT_TAGVAR(hardcode_action, $1)=immediate
2211  fi
2212else
2213  # We cannot hardcode anything, or else we can only hardcode existing
2214  # directories.
2215  _LT_TAGVAR(hardcode_action, $1)=unsupported
2216fi
2217AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2218
2219if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
2220   test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
2221  # Fast installation is not supported
2222  enable_fast_install=no
2223elif test yes = "$shlibpath_overrides_runpath" ||
2224     test no = "$enable_shared"; then
2225  # Fast installation is not necessary
2226  enable_fast_install=needless
2227fi
2228_LT_TAGDECL([], [hardcode_action], [0],
2229    [How to hardcode a shared library path into an executable])
2230])# _LT_LINKER_HARDCODE_LIBPATH
2231
2232
2233# _LT_CMD_STRIPLIB
2234# ----------------
2235m4_defun([_LT_CMD_STRIPLIB],
2236[m4_require([_LT_DECL_EGREP])
2237striplib=
2238old_striplib=
2239AC_MSG_CHECKING([whether stripping libraries is possible])
2240if test -z "$STRIP"; then
2241  AC_MSG_RESULT([no])
2242else
2243  if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2244    old_striplib="$STRIP --strip-debug"
2245    striplib="$STRIP --strip-unneeded"
2246    AC_MSG_RESULT([yes])
2247  else
2248    case $host_os in
2249    darwin*)
2250      # FIXME - insert some real tests, host_os isn't really good enough
2251      striplib="$STRIP -x"
2252      old_striplib="$STRIP -S"
2253      AC_MSG_RESULT([yes])
2254      ;;
2255    freebsd*)
2256      if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
2257        old_striplib="$STRIP --strip-debug"
2258        striplib="$STRIP --strip-unneeded"
2259        AC_MSG_RESULT([yes])
2260      else
2261        AC_MSG_RESULT([no])
2262      fi
2263      ;;
2264    *)
2265      AC_MSG_RESULT([no])
2266      ;;
2267    esac
2268  fi
2269fi
2270_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2271_LT_DECL([], [striplib], [1])
2272])# _LT_CMD_STRIPLIB
2273
2274
2275# _LT_PREPARE_MUNGE_PATH_LIST
2276# ---------------------------
2277# Make sure func_munge_path_list() is defined correctly.
2278m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
2279[[# func_munge_path_list VARIABLE PATH
2280# -----------------------------------
2281# VARIABLE is name of variable containing _space_ separated list of
2282# directories to be munged by the contents of PATH, which is string
2283# having a format:
2284# "DIR[:DIR]:"
2285#       string "DIR[ DIR]" will be prepended to VARIABLE
2286# ":DIR[:DIR]"
2287#       string "DIR[ DIR]" will be appended to VARIABLE
2288# "DIRP[:DIRP]::[DIRA:]DIRA"
2289#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
2290#       "DIRA[ DIRA]" will be appended to VARIABLE
2291# "DIR[:DIR]"
2292#       VARIABLE will be replaced by "DIR[ DIR]"
2293func_munge_path_list ()
2294{
2295    case x@S|@2 in
2296    x)
2297        ;;
2298    *:)
2299        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
2300        ;;
2301    x:*)
2302        eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
2303        ;;
2304    *::*)
2305        eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
2306        eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
2307        ;;
2308    *)
2309        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
2310        ;;
2311    esac
2312}
2313]])# _LT_PREPARE_PATH_LIST
2314
2315
2316# _LT_SYS_DYNAMIC_LINKER([TAG])
2317# -----------------------------
2318# PORTME Fill in your ld.so characteristics
2319m4_defun([_LT_SYS_DYNAMIC_LINKER],
2320[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2321m4_require([_LT_DECL_EGREP])dnl
2322m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2323m4_require([_LT_DECL_OBJDUMP])dnl
2324m4_require([_LT_DECL_SED])dnl
2325m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2326m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
2327AC_MSG_CHECKING([dynamic linker characteristics])
2328m4_if([$1],
2329	[], [
2330if test yes = "$GCC"; then
2331  case $host_os in
2332    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
2333    *) lt_awk_arg='/^libraries:/' ;;
2334  esac
2335  case $host_os in
2336    mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
2337    *) lt_sed_strip_eq='s|=/|/|g' ;;
2338  esac
2339  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
2340  case $lt_search_path_spec in
2341  *\;*)
2342    # if the path contains ";" then we assume it to be the separator
2343    # otherwise default to the standard path separator (i.e. ":") - it is
2344    # assumed that no part of a normal pathname contains ";" but that should
2345    # okay in the real world where ";" in dirpaths is itself problematic.
2346    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
2347    ;;
2348  *)
2349    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
2350    ;;
2351  esac
2352  # Ok, now we have the path, separated by spaces, we can step through it
2353  # and add multilib dir if necessary...
2354  lt_tmp_lt_search_path_spec=
2355  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2356  # ...but if some path component already ends with the multilib dir we assume
2357  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
2358  case "$lt_multi_os_dir; $lt_search_path_spec " in
2359  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
2360    lt_multi_os_dir=
2361    ;;
2362  esac
2363  for lt_sys_path in $lt_search_path_spec; do
2364    if test -d "$lt_sys_path$lt_multi_os_dir"; then
2365      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
2366    elif test -n "$lt_multi_os_dir"; then
2367      test -d "$lt_sys_path" && \
2368	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2369    fi
2370  done
2371  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
2372BEGIN {RS = " "; FS = "/|\n";} {
2373  lt_foo = "";
2374  lt_count = 0;
2375  for (lt_i = NF; lt_i > 0; lt_i--) {
2376    if ($lt_i != "" && $lt_i != ".") {
2377      if ($lt_i == "..") {
2378        lt_count++;
2379      } else {
2380        if (lt_count == 0) {
2381          lt_foo = "/" $lt_i lt_foo;
2382        } else {
2383          lt_count--;
2384        }
2385      }
2386    }
2387  }
2388  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2389  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2390}'`
2391  # AWK program above erroneously prepends '/' to C:/dos/paths
2392  # for these hosts.
2393  case $host_os in
2394    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
2395      $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
2396  esac
2397  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
2398else
2399  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2400fi])
2401library_names_spec=
2402libname_spec='lib$name'
2403soname_spec=
2404shrext_cmds=.so
2405postinstall_cmds=
2406postuninstall_cmds=
2407finish_cmds=
2408finish_eval=
2409shlibpath_var=
2410shlibpath_overrides_runpath=unknown
2411version_type=none
2412dynamic_linker="$host_os ld.so"
2413sys_lib_dlsearch_path_spec="/lib /usr/lib"
2414need_lib_prefix=unknown
2415hardcode_into_libs=no
2416
2417# when you set need_version to no, make sure it does not cause -set_version
2418# flags to be left without arguments
2419need_version=unknown
2420
2421AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
2422[User-defined run-time library search path.])
2423
2424case $host_os in
2425aix3*)
2426  version_type=linux # correct to gnu/linux during the next big refactor
2427  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
2428  shlibpath_var=LIBPATH
2429
2430  # AIX 3 has no versioning support, so we append a major version to the name.
2431  soname_spec='$libname$release$shared_ext$major'
2432  ;;
2433
2434aix[[4-9]]*)
2435  version_type=linux # correct to gnu/linux during the next big refactor
2436  need_lib_prefix=no
2437  need_version=no
2438  hardcode_into_libs=yes
2439  if test ia64 = "$host_cpu"; then
2440    # AIX 5 supports IA64
2441    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
2442    shlibpath_var=LD_LIBRARY_PATH
2443  else
2444    # With GCC up to 2.95.x, collect2 would create an import file
2445    # for dependence libraries.  The import file would start with
2446    # the line '#! .'.  This would cause the generated library to
2447    # depend on '.', always an invalid library.  This was fixed in
2448    # development snapshots of GCC prior to 3.0.
2449    case $host_os in
2450      aix4 | aix4.[[01]] | aix4.[[01]].*)
2451      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2452	   echo ' yes '
2453	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
2454	:
2455      else
2456	can_build_shared=no
2457      fi
2458      ;;
2459    esac
2460    # Using Import Files as archive members, it is possible to support
2461    # filename-based versioning of shared library archives on AIX. While
2462    # this would work for both with and without runtime linking, it will
2463    # prevent static linking of such archives. So we do filename-based
2464    # shared library versioning with .so extension only, which is used
2465    # when both runtime linking and shared linking is enabled.
2466    # Unfortunately, runtime linking may impact performance, so we do
2467    # not want this to be the default eventually. Also, we use the
2468    # versioned .so libs for executables only if there is the -brtl
2469    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
2470    # To allow for filename-based versioning support, we need to create
2471    # libNAME.so.V as an archive file, containing:
2472    # *) an Import File, referring to the versioned filename of the
2473    #    archive as well as the shared archive member, telling the
2474    #    bitwidth (32 or 64) of that shared object, and providing the
2475    #    list of exported symbols of that shared object, eventually
2476    #    decorated with the 'weak' keyword
2477    # *) the shared object with the F_LOADONLY flag set, to really avoid
2478    #    it being seen by the linker.
2479    # At run time we better use the real file rather than another symlink,
2480    # but for link time we create the symlink libNAME.so -> libNAME.so.V
2481
2482    case $with_aix_soname,$aix_use_runtimelinking in
2483    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
2484    # soname into executable. Probably we can add versioning support to
2485    # collect2, so additional links can be useful in future.
2486    aix,yes) # traditional libtool
2487      dynamic_linker='AIX unversionable lib.so'
2488      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2489      # instead of lib<name>.a to let people know that these are not
2490      # typical AIX shared libraries.
2491      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2492      ;;
2493    aix,no) # traditional AIX only
2494      dynamic_linker='AIX lib.a[(]lib.so.V[)]'
2495      # We preserve .a as extension for shared libraries through AIX4.2
2496      # and later when we are not doing run time linking.
2497      library_names_spec='$libname$release.a $libname.a'
2498      soname_spec='$libname$release$shared_ext$major'
2499      ;;
2500    svr4,*) # full svr4 only
2501      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
2502      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
2503      # We do not specify a path in Import Files, so LIBPATH fires.
2504      shlibpath_overrides_runpath=yes
2505      ;;
2506    *,yes) # both, prefer svr4
2507      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
2508      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
2509      # unpreferred sharedlib libNAME.a needs extra handling
2510      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"'
2511      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"'
2512      # We do not specify a path in Import Files, so LIBPATH fires.
2513      shlibpath_overrides_runpath=yes
2514      ;;
2515    *,no) # both, prefer aix
2516      dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
2517      library_names_spec='$libname$release.a $libname.a'
2518      soname_spec='$libname$release$shared_ext$major'
2519      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
2520      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)'
2521      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"'
2522      ;;
2523    esac
2524    shlibpath_var=LIBPATH
2525  fi
2526  ;;
2527
2528amigaos*)
2529  case $host_cpu in
2530  powerpc)
2531    # Since July 2007 AmigaOS4 officially supports .so libraries.
2532    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2533    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2534    ;;
2535  m68k)
2536    library_names_spec='$libname.ixlibrary $libname.a'
2537    # Create ${libname}_ixlibrary.a entries in /sys/libs.
2538    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'
2539    ;;
2540  esac
2541  ;;
2542
2543beos*)
2544  library_names_spec='$libname$shared_ext'
2545  dynamic_linker="$host_os ld.so"
2546  shlibpath_var=LIBRARY_PATH
2547  ;;
2548
2549bsdi[[45]]*)
2550  version_type=linux # correct to gnu/linux during the next big refactor
2551  need_version=no
2552  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2553  soname_spec='$libname$release$shared_ext$major'
2554  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2555  shlibpath_var=LD_LIBRARY_PATH
2556  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2557  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2558  # the default ld.so.conf also contains /usr/contrib/lib and
2559  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2560  # libtool to hard-code these into programs
2561  ;;
2562
2563cygwin* | mingw* | pw32* | cegcc*)
2564  version_type=windows
2565  shrext_cmds=.dll
2566  need_version=no
2567  need_lib_prefix=no
2568
2569  case $GCC,$cc_basename in
2570  yes,*)
2571    # gcc
2572    library_names_spec='$libname.dll.a'
2573    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2574    postinstall_cmds='base_file=`basename \$file`~
2575      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
2576      dldir=$destdir/`dirname \$dlpath`~
2577      test -d \$dldir || mkdir -p \$dldir~
2578      $install_prog $dir/$dlname \$dldir/$dlname~
2579      chmod a+x \$dldir/$dlname~
2580      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2581        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2582      fi'
2583    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2584      dlpath=$dir/\$dldll~
2585       $RM \$dlpath'
2586    shlibpath_overrides_runpath=yes
2587
2588    case $host_os in
2589    cygwin*)
2590      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2591      soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2592m4_if([$1], [],[
2593      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
2594      ;;
2595    mingw* | cegcc*)
2596      # MinGW DLLs use traditional 'lib' prefix
2597      soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2598      ;;
2599    pw32*)
2600      # pw32 DLLs use 'pw' prefix rather than 'lib'
2601      library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2602      ;;
2603    esac
2604    dynamic_linker='Win32 ld.exe'
2605    ;;
2606
2607  *,cl* | *,icl*)
2608    # Native MSVC or ICC
2609    libname_spec='$name'
2610    soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2611    library_names_spec='$libname.dll.lib'
2612
2613    case $build_os in
2614    mingw*)
2615      sys_lib_search_path_spec=
2616      lt_save_ifs=$IFS
2617      IFS=';'
2618      for lt_path in $LIB
2619      do
2620        IFS=$lt_save_ifs
2621        # Let DOS variable expansion print the short 8.3 style file name.
2622        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
2623        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
2624      done
2625      IFS=$lt_save_ifs
2626      # Convert to MSYS style.
2627      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
2628      ;;
2629    cygwin*)
2630      # Convert to unix form, then to dos form, then back to unix form
2631      # but this time dos style (no spaces!) so that the unix form looks
2632      # like /cygdrive/c/PROGRA~1:/cygdr...
2633      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
2634      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
2635      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2636      ;;
2637    *)
2638      sys_lib_search_path_spec=$LIB
2639      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2640        # It is most probably a Windows format PATH.
2641        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2642      else
2643        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2644      fi
2645      # FIXME: find the short name or the path components, as spaces are
2646      # common. (e.g. "Program Files" -> "PROGRA~1")
2647      ;;
2648    esac
2649
2650    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2651    postinstall_cmds='base_file=`basename \$file`~
2652      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
2653      dldir=$destdir/`dirname \$dlpath`~
2654      test -d \$dldir || mkdir -p \$dldir~
2655      $install_prog $dir/$dlname \$dldir/$dlname'
2656    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2657      dlpath=$dir/\$dldll~
2658       $RM \$dlpath'
2659    shlibpath_overrides_runpath=yes
2660    dynamic_linker='Win32 link.exe'
2661    ;;
2662
2663  *)
2664    # Assume MSVC and ICC wrapper
2665    library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
2666    dynamic_linker='Win32 ld.exe'
2667    ;;
2668  esac
2669  # FIXME: first we should search . and the directory the executable is in
2670  shlibpath_var=PATH
2671  ;;
2672
2673darwin* | rhapsody*)
2674  dynamic_linker="$host_os dyld"
2675  version_type=darwin
2676  need_lib_prefix=no
2677  need_version=no
2678  library_names_spec='$libname$release$versuffix$shared_ext $libname$release$major$shared_ext $libname$shared_ext'
2679  soname_spec='$libname$release$major$shared_ext'
2680  shlibpath_overrides_runpath=yes
2681  shlibpath_var=DYLD_LIBRARY_PATH
2682  shrext_cmds='`test .$module = .yes && echo .bundle || echo .dylib`'
2683m4_if([$1], [],[
2684  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2685  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2686  ;;
2687
2688dgux*)
2689  version_type=linux # correct to gnu/linux during the next big refactor
2690  need_lib_prefix=no
2691  need_version=no
2692  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2693  soname_spec='$libname$release$shared_ext$major'
2694  shlibpath_var=LD_LIBRARY_PATH
2695  ;;
2696
2697freebsd* | dragonfly* | midnightbsd*)
2698  # DragonFly does not have aout.  When/if they implement a new
2699  # versioning mechanism, adjust this.
2700  if test -x /usr/bin/objformat; then
2701    objformat=`/usr/bin/objformat`
2702  else
2703    case $host_os in
2704    freebsd[[23]].*) objformat=aout ;;
2705    *) objformat=elf ;;
2706    esac
2707  fi
2708  # Handle Gentoo/FreeBSD as it was Linux
2709  case $host_vendor in
2710    gentoo)
2711      version_type=linux ;;
2712    *)
2713      version_type=freebsd-$objformat ;;
2714  esac
2715
2716  case $version_type in
2717    freebsd-elf*)
2718      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2719      soname_spec='$libname$release$shared_ext$major'
2720      need_version=no
2721      need_lib_prefix=no
2722      ;;
2723    freebsd-*)
2724      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2725      need_version=yes
2726      ;;
2727    linux)
2728      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2729      soname_spec='${libname}${release}${shared_ext}$major'
2730      need_lib_prefix=no
2731      need_version=no
2732      ;;
2733  esac
2734  shlibpath_var=LD_LIBRARY_PATH
2735  case $host_os in
2736  freebsd2.*)
2737    shlibpath_overrides_runpath=yes
2738    ;;
2739  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2740    shlibpath_overrides_runpath=yes
2741    hardcode_into_libs=yes
2742    ;;
2743  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2744  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2745    shlibpath_overrides_runpath=no
2746    hardcode_into_libs=yes
2747    ;;
2748  *) # from 4.6 on, and DragonFly
2749    shlibpath_overrides_runpath=yes
2750    hardcode_into_libs=yes
2751    ;;
2752  esac
2753  ;;
2754
2755haiku*)
2756  version_type=linux # correct to gnu/linux during the next big refactor
2757  need_lib_prefix=no
2758  need_version=no
2759  dynamic_linker="$host_os runtime_loader"
2760  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2761  soname_spec='$libname$release$shared_ext$major'
2762  shlibpath_var=LIBRARY_PATH
2763  shlibpath_overrides_runpath=no
2764  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
2765  hardcode_into_libs=yes
2766  ;;
2767
2768hpux9* | hpux10* | hpux11*)
2769  # Give a soname corresponding to the major version so that dld.sl refuses to
2770  # link against other versions.
2771  version_type=sunos
2772  need_lib_prefix=no
2773  need_version=no
2774  case $host_cpu in
2775  ia64*)
2776    shrext_cmds='.so'
2777    hardcode_into_libs=yes
2778    dynamic_linker="$host_os dld.so"
2779    shlibpath_var=LD_LIBRARY_PATH
2780    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2781    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2782    soname_spec='$libname$release$shared_ext$major'
2783    if test 32 = "$HPUX_IA64_MODE"; then
2784      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2785      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
2786    else
2787      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2788      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
2789    fi
2790    ;;
2791  hppa*64*)
2792    shrext_cmds='.sl'
2793    hardcode_into_libs=yes
2794    dynamic_linker="$host_os dld.sl"
2795    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2796    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2797    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2798    soname_spec='$libname$release$shared_ext$major'
2799    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2800    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2801    ;;
2802  *)
2803    shrext_cmds='.sl'
2804    dynamic_linker="$host_os dld.sl"
2805    shlibpath_var=SHLIB_PATH
2806    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2807    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2808    soname_spec='$libname$release$shared_ext$major'
2809    ;;
2810  esac
2811  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
2812  postinstall_cmds='chmod 555 $lib'
2813  # or fails outright, so override atomically:
2814  install_override_mode=555
2815  ;;
2816
2817interix[[3-9]]*)
2818  version_type=linux # correct to gnu/linux during the next big refactor
2819  need_lib_prefix=no
2820  need_version=no
2821  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2822  soname_spec='$libname$release$shared_ext$major'
2823  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2824  shlibpath_var=LD_LIBRARY_PATH
2825  shlibpath_overrides_runpath=no
2826  hardcode_into_libs=yes
2827  ;;
2828
2829irix5* | irix6* | nonstopux*)
2830  case $host_os in
2831    nonstopux*) version_type=nonstopux ;;
2832    *)
2833	if test yes = "$lt_cv_prog_gnu_ld"; then
2834		version_type=linux # correct to gnu/linux during the next big refactor
2835	else
2836		version_type=irix
2837	fi ;;
2838  esac
2839  need_lib_prefix=no
2840  need_version=no
2841  soname_spec='$libname$release$shared_ext$major'
2842  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
2843  case $host_os in
2844  irix5* | nonstopux*)
2845    libsuff= shlibsuff=
2846    ;;
2847  *)
2848    case $LD in # libtool.m4 will add one of these switches to LD
2849    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2850      libsuff= shlibsuff= libmagic=32-bit;;
2851    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2852      libsuff=32 shlibsuff=N32 libmagic=N32;;
2853    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2854      libsuff=64 shlibsuff=64 libmagic=64-bit;;
2855    *) libsuff= shlibsuff= libmagic=never-match;;
2856    esac
2857    ;;
2858  esac
2859  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2860  shlibpath_overrides_runpath=no
2861  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
2862  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
2863  hardcode_into_libs=yes
2864  ;;
2865
2866# No shared lib support for Linux oldld, aout, or coff.
2867linux*oldld* | linux*aout* | linux*coff*)
2868  dynamic_linker=no
2869  ;;
2870
2871linux*android*)
2872  version_type=none # Android doesn't support versioned libraries.
2873  need_lib_prefix=no
2874  need_version=no
2875  library_names_spec='$libname$release$shared_ext'
2876  soname_spec='$libname$release$shared_ext'
2877  finish_cmds=
2878  shlibpath_var=LD_LIBRARY_PATH
2879  shlibpath_overrides_runpath=yes
2880
2881  # This implies no fast_install, which is unacceptable.
2882  # Some rework will be needed to allow for fast_install
2883  # before this can be enabled.
2884  hardcode_into_libs=yes
2885
2886  dynamic_linker='Android linker'
2887  # Don't embed -rpath directories since the linker doesn't support them.
2888  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2889  ;;
2890
2891# This must be glibc/ELF.
2892linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
2893  version_type=linux # correct to gnu/linux during the next big refactor
2894  need_lib_prefix=no
2895  need_version=no
2896  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2897  soname_spec='$libname$release$shared_ext$major'
2898  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2899  shlibpath_var=LD_LIBRARY_PATH
2900  shlibpath_overrides_runpath=no
2901
2902  # Some binutils ld are patched to set DT_RUNPATH
2903  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
2904    [lt_cv_shlibpath_overrides_runpath=no
2905    save_LDFLAGS=$LDFLAGS
2906    save_libdir=$libdir
2907    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2908	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2909    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2910      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2911	 [lt_cv_shlibpath_overrides_runpath=yes])])
2912    LDFLAGS=$save_LDFLAGS
2913    libdir=$save_libdir
2914    ])
2915  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
2916
2917  # This implies no fast_install, which is unacceptable.
2918  # Some rework will be needed to allow for fast_install
2919  # before this can be enabled.
2920  hardcode_into_libs=yes
2921
2922  # Ideally, we could use ldconfig to report *all* directores which are
2923  # searched for libraries, however this is still not possible.  Aside from not
2924  # being certain /sbin/ldconfig is available, command
2925  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
2926  # even though it is searched at run-time.  Try to do the best guess by
2927  # appending ld.so.conf contents (and includes) to the search path.
2928  if test -f /etc/ld.so.conf; then
2929    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' ' '`
2930    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2931  fi
2932
2933  # We used to test for /lib/ld.so.1 and disable shared libraries on
2934  # powerpc, because MkLinux only supported shared libraries with the
2935  # GNU dynamic linker.  Since this was broken with cross compilers,
2936  # most powerpc-linux boxes support dynamic linking these days and
2937  # people can always --disable-shared, the test was removed, and we
2938  # assume the GNU/Linux dynamic linker is in use.
2939  dynamic_linker='GNU/Linux ld.so'
2940  ;;
2941
2942netbsd*)
2943  version_type=sunos
2944  need_lib_prefix=no
2945  need_version=no
2946  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2947    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2948    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2949    dynamic_linker='NetBSD (a.out) ld.so'
2950  else
2951    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2952    soname_spec='$libname$release$shared_ext$major'
2953    dynamic_linker='NetBSD ld.elf_so'
2954  fi
2955  shlibpath_var=LD_LIBRARY_PATH
2956  shlibpath_overrides_runpath=yes
2957  hardcode_into_libs=yes
2958  ;;
2959
2960newsos6)
2961  version_type=linux # correct to gnu/linux during the next big refactor
2962  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2963  shlibpath_var=LD_LIBRARY_PATH
2964  shlibpath_overrides_runpath=yes
2965  ;;
2966
2967*nto* | *qnx*)
2968  version_type=qnx
2969  need_lib_prefix=no
2970  need_version=no
2971  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2972  soname_spec='$libname$release$shared_ext$major'
2973  shlibpath_var=LD_LIBRARY_PATH
2974  shlibpath_overrides_runpath=no
2975  hardcode_into_libs=yes
2976  dynamic_linker='ldqnx.so'
2977  ;;
2978
2979openbsd* | bitrig*)
2980  version_type=sunos
2981  sys_lib_dlsearch_path_spec=/usr/lib
2982  need_lib_prefix=no
2983  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
2984    need_version=no
2985  else
2986    need_version=yes
2987  fi
2988  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2989  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2990  shlibpath_var=LD_LIBRARY_PATH
2991  shlibpath_overrides_runpath=yes
2992  ;;
2993
2994os2*)
2995  libname_spec='$name'
2996  version_type=windows
2997  shrext_cmds=.dll
2998  need_version=no
2999  need_lib_prefix=no
3000  # OS/2 can only load a DLL with a base name of 8 characters or less.
3001  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
3002    v=$($ECHO $release$versuffix | tr -d .-);
3003    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
3004    $ECHO $n$v`$shared_ext'
3005  library_names_spec='${libname}_dll.$libext'
3006  dynamic_linker='OS/2 ld.exe'
3007  shlibpath_var=BEGINLIBPATH
3008  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3009  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3010  postinstall_cmds='base_file=`basename \$file`~
3011    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
3012    dldir=$destdir/`dirname \$dlpath`~
3013    test -d \$dldir || mkdir -p \$dldir~
3014    $install_prog $dir/$dlname \$dldir/$dlname~
3015    chmod a+x \$dldir/$dlname~
3016    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
3017      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
3018    fi'
3019  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
3020    dlpath=$dir/\$dldll~
3021    $RM \$dlpath'
3022  ;;
3023
3024osf3* | osf4* | osf5*)
3025  version_type=osf
3026  need_lib_prefix=no
3027  need_version=no
3028  soname_spec='$libname$release$shared_ext$major'
3029  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3030  shlibpath_var=LD_LIBRARY_PATH
3031  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3032  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3033  ;;
3034
3035rdos*)
3036  dynamic_linker=no
3037  ;;
3038
3039solaris*)
3040  version_type=linux # correct to gnu/linux during the next big refactor
3041  need_lib_prefix=no
3042  need_version=no
3043  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3044  soname_spec='$libname$release$shared_ext$major'
3045  shlibpath_var=LD_LIBRARY_PATH
3046  shlibpath_overrides_runpath=yes
3047  hardcode_into_libs=yes
3048  # ldd complains unless libraries are executable
3049  postinstall_cmds='chmod +x $lib'
3050  ;;
3051
3052sunos4*)
3053  version_type=sunos
3054  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
3055  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3056  shlibpath_var=LD_LIBRARY_PATH
3057  shlibpath_overrides_runpath=yes
3058  if test yes = "$with_gnu_ld"; then
3059    need_lib_prefix=no
3060  fi
3061  need_version=yes
3062  ;;
3063
3064sysv4 | sysv4.3*)
3065  version_type=linux # correct to gnu/linux during the next big refactor
3066  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3067  soname_spec='$libname$release$shared_ext$major'
3068  shlibpath_var=LD_LIBRARY_PATH
3069  case $host_vendor in
3070    sni)
3071      shlibpath_overrides_runpath=no
3072      need_lib_prefix=no
3073      runpath_var=LD_RUN_PATH
3074      ;;
3075    siemens)
3076      need_lib_prefix=no
3077      ;;
3078    motorola)
3079      need_lib_prefix=no
3080      need_version=no
3081      shlibpath_overrides_runpath=no
3082      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3083      ;;
3084  esac
3085  ;;
3086
3087sysv4*MP*)
3088  if test -d /usr/nec; then
3089    version_type=linux # correct to gnu/linux during the next big refactor
3090    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
3091    soname_spec='$libname$shared_ext.$major'
3092    shlibpath_var=LD_LIBRARY_PATH
3093  fi
3094  ;;
3095
3096sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3097  version_type=sco
3098  need_lib_prefix=no
3099  need_version=no
3100  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
3101  soname_spec='$libname$release$shared_ext$major'
3102  shlibpath_var=LD_LIBRARY_PATH
3103  shlibpath_overrides_runpath=yes
3104  hardcode_into_libs=yes
3105  if test yes = "$with_gnu_ld"; then
3106    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3107  else
3108    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3109    case $host_os in
3110      sco3.2v5*)
3111        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3112	;;
3113    esac
3114  fi
3115  sys_lib_dlsearch_path_spec='/usr/lib'
3116  ;;
3117
3118tpf*)
3119  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
3120  version_type=linux # correct to gnu/linux during the next big refactor
3121  need_lib_prefix=no
3122  need_version=no
3123  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3124  shlibpath_var=LD_LIBRARY_PATH
3125  shlibpath_overrides_runpath=no
3126  hardcode_into_libs=yes
3127  ;;
3128
3129uts4*)
3130  version_type=linux # correct to gnu/linux during the next big refactor
3131  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3132  soname_spec='$libname$release$shared_ext$major'
3133  shlibpath_var=LD_LIBRARY_PATH
3134  ;;
3135
3136*)
3137  dynamic_linker=no
3138  ;;
3139esac
3140AC_MSG_RESULT([$dynamic_linker])
3141test no = "$dynamic_linker" && can_build_shared=no
3142
3143variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3144if test yes = "$GCC"; then
3145  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3146fi
3147
3148if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
3149  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
3150fi
3151
3152if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
3153  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
3154fi
3155
3156# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
3157configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
3158
3159# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
3160func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
3161
3162# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
3163configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
3164
3165_LT_DECL([], [variables_saved_for_relink], [1],
3166    [Variables whose values should be saved in libtool wrapper scripts and
3167    restored at link time])
3168_LT_DECL([], [need_lib_prefix], [0],
3169    [Do we need the "lib" prefix for modules?])
3170_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3171_LT_DECL([], [version_type], [0], [Library versioning type])
3172_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
3173_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3174_LT_DECL([], [shlibpath_overrides_runpath], [0],
3175    [Is shlibpath searched before the hard-coded library search path?])
3176_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3177_LT_DECL([], [library_names_spec], [1],
3178    [[List of archive names.  First name is the real one, the rest are links.
3179    The last name is the one that the linker finds with -lNAME]])
3180_LT_DECL([], [soname_spec], [1],
3181    [[The coded name of the library, if different from the real name]])
3182_LT_DECL([], [install_override_mode], [1],
3183    [Permission mode override for installation of shared libraries])
3184_LT_DECL([], [postinstall_cmds], [2],
3185    [Command to use after installation of a shared archive])
3186_LT_DECL([], [postuninstall_cmds], [2],
3187    [Command to use after uninstallation of a shared archive])
3188_LT_DECL([], [finish_cmds], [2],
3189    [Commands used to finish a libtool library installation in a directory])
3190_LT_DECL([], [finish_eval], [1],
3191    [[As "finish_cmds", except a single script fragment to be evaled but
3192    not shown]])
3193_LT_DECL([], [hardcode_into_libs], [0],
3194    [Whether we should hardcode library paths into libraries])
3195_LT_DECL([], [sys_lib_search_path_spec], [2],
3196    [Compile-time system search path for libraries])
3197_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
3198    [Detected run-time system search path for libraries])
3199_LT_DECL([], [configure_time_lt_sys_library_path], [2],
3200    [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
3201])# _LT_SYS_DYNAMIC_LINKER
3202
3203
3204# _LT_PATH_TOOL_PREFIX(TOOL)
3205# --------------------------
3206# find a file program that can recognize shared library
3207AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3208[m4_require([_LT_DECL_EGREP])dnl
3209AC_MSG_CHECKING([for $1])
3210AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3211[case $MAGIC_CMD in
3212[[\\/*] |  ?:[\\/]*])
3213  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
3214  ;;
3215*)
3216  lt_save_MAGIC_CMD=$MAGIC_CMD
3217  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3218dnl $ac_dummy forces splitting on constant user-supplied paths.
3219dnl POSIX.2 word splitting is done only on the output of word expansions,
3220dnl not every word.  This closes a longstanding sh security hole.
3221  ac_dummy="m4_if([$2], , $PATH, [$2])"
3222  for ac_dir in $ac_dummy; do
3223    IFS=$lt_save_ifs
3224    test -z "$ac_dir" && ac_dir=.
3225    if test -f "$ac_dir/$1"; then
3226      lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
3227      if test -n "$file_magic_test_file"; then
3228	case $deplibs_check_method in
3229	"file_magic "*)
3230	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3231	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
3232	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3233	    $EGREP "$file_magic_regex" > /dev/null; then
3234	    :
3235	  else
3236	    cat <<_LT_EOF 1>&2
3237
3238*** Warning: the command libtool uses to detect shared libraries,
3239*** $file_magic_cmd, produces output that libtool cannot recognize.
3240*** The result is that libtool may fail to recognize shared libraries
3241*** as such.  This will affect the creation of libtool libraries that
3242*** depend on shared libraries, but programs linked with such libtool
3243*** libraries will work regardless of this problem.  Nevertheless, you
3244*** may want to report the problem to your system manager and/or to
3245*** bug-libtool@gnu.org
3246
3247_LT_EOF
3248	  fi ;;
3249	esac
3250      fi
3251      break
3252    fi
3253  done
3254  IFS=$lt_save_ifs
3255  MAGIC_CMD=$lt_save_MAGIC_CMD
3256  ;;
3257esac])
3258MAGIC_CMD=$lt_cv_path_MAGIC_CMD
3259if test -n "$MAGIC_CMD"; then
3260  AC_MSG_RESULT($MAGIC_CMD)
3261else
3262  AC_MSG_RESULT(no)
3263fi
3264_LT_DECL([], [MAGIC_CMD], [0],
3265	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3266])# _LT_PATH_TOOL_PREFIX
3267
3268# Old name:
3269AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3270dnl aclocal-1.4 backwards compatibility:
3271dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3272
3273
3274# _LT_PATH_MAGIC
3275# --------------
3276# find a file program that can recognize a shared library
3277m4_defun([_LT_PATH_MAGIC],
3278[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3279if test -z "$lt_cv_path_MAGIC_CMD"; then
3280  if test -n "$ac_tool_prefix"; then
3281    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3282  else
3283    MAGIC_CMD=:
3284  fi
3285fi
3286])# _LT_PATH_MAGIC
3287
3288
3289# LT_PATH_LD
3290# ----------
3291# find the pathname to the GNU or non-GNU linker
3292AC_DEFUN([LT_PATH_LD],
3293[AC_REQUIRE([AC_PROG_CC])dnl
3294AC_REQUIRE([AC_CANONICAL_HOST])dnl
3295AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3296m4_require([_LT_DECL_SED])dnl
3297m4_require([_LT_DECL_EGREP])dnl
3298m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
3299
3300AC_ARG_WITH([gnu-ld],
3301    [AS_HELP_STRING([--with-gnu-ld],
3302	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
3303    [test no = "$withval" || with_gnu_ld=yes],
3304    [with_gnu_ld=no])dnl
3305
3306ac_prog=ld
3307if test yes = "$GCC"; then
3308  # Check if gcc -print-prog-name=ld gives a path.
3309  AC_MSG_CHECKING([for ld used by $CC])
3310  case $host in
3311  *-*-mingw*)
3312    # gcc leaves a trailing carriage return, which upsets mingw
3313    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3314  *)
3315    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3316  esac
3317  case $ac_prog in
3318    # Accept absolute paths.
3319    [[\\/]]* | ?:[[\\/]]*)
3320      re_direlt='/[[^/]][[^/]]*/\.\./'
3321      # Canonicalize the pathname of ld
3322      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3323      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3324	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3325      done
3326      test -z "$LD" && LD=$ac_prog
3327      ;;
3328  "")
3329    # If it fails, then pretend we aren't using GCC.
3330    ac_prog=ld
3331    ;;
3332  *)
3333    # If it is relative, then search for the first ld in PATH.
3334    with_gnu_ld=unknown
3335    ;;
3336  esac
3337elif test yes = "$with_gnu_ld"; then
3338  AC_MSG_CHECKING([for GNU ld])
3339else
3340  AC_MSG_CHECKING([for non-GNU ld])
3341fi
3342AC_CACHE_VAL(lt_cv_path_LD,
3343[if test -z "$LD"; then
3344  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3345  for ac_dir in $PATH; do
3346    IFS=$lt_save_ifs
3347    test -z "$ac_dir" && ac_dir=.
3348    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3349      lt_cv_path_LD=$ac_dir/$ac_prog
3350      # Check to see if the program is GNU ld.  I'd rather use --version,
3351      # but apparently some variants of GNU ld only accept -v.
3352      # Break only if it was the GNU/non-GNU ld that we prefer.
3353      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3354      *GNU* | *'with BFD'*)
3355	test no != "$with_gnu_ld" && break
3356	;;
3357      *)
3358	test yes != "$with_gnu_ld" && break
3359	;;
3360      esac
3361    fi
3362  done
3363  IFS=$lt_save_ifs
3364else
3365  lt_cv_path_LD=$LD # Let the user override the test with a path.
3366fi])
3367LD=$lt_cv_path_LD
3368if test -n "$LD"; then
3369  AC_MSG_RESULT($LD)
3370else
3371  AC_MSG_RESULT(no)
3372fi
3373test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3374_LT_PATH_LD_GNU
3375AC_SUBST([LD])
3376
3377_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3378])# LT_PATH_LD
3379
3380# Old names:
3381AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3382AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3383dnl aclocal-1.4 backwards compatibility:
3384dnl AC_DEFUN([AM_PROG_LD], [])
3385dnl AC_DEFUN([AC_PROG_LD], [])
3386
3387
3388# _LT_PATH_LD_GNU
3389#- --------------
3390m4_defun([_LT_PATH_LD_GNU],
3391[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3392[# I'd rather use --version here, but apparently some GNU lds only accept -v.
3393case `$LD -v 2>&1 </dev/null` in
3394*GNU* | *'with BFD'*)
3395  lt_cv_prog_gnu_ld=yes
3396  ;;
3397*)
3398  lt_cv_prog_gnu_ld=no
3399  ;;
3400esac])
3401with_gnu_ld=$lt_cv_prog_gnu_ld
3402])# _LT_PATH_LD_GNU
3403
3404
3405# _LT_CMD_RELOAD
3406# --------------
3407# find reload flag for linker
3408#   -- PORTME Some linkers may need a different reload flag.
3409m4_defun([_LT_CMD_RELOAD],
3410[AC_CACHE_CHECK([for $LD option to reload object files],
3411  lt_cv_ld_reload_flag,
3412  [lt_cv_ld_reload_flag='-r'])
3413reload_flag=$lt_cv_ld_reload_flag
3414case $reload_flag in
3415"" | " "*) ;;
3416*) reload_flag=" $reload_flag" ;;
3417esac
3418reload_cmds='$LD$reload_flag -o $output$reload_objs'
3419case $host_os in
3420  cygwin* | mingw* | pw32* | cegcc*)
3421    if test yes != "$GCC"; then
3422      reload_cmds=false
3423    fi
3424    ;;
3425  darwin*)
3426    if test yes = "$GCC"; then
3427      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
3428    else
3429      reload_cmds='$LD$reload_flag -o $output$reload_objs'
3430    fi
3431    ;;
3432esac
3433_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3434_LT_TAGDECL([], [reload_cmds], [2])dnl
3435])# _LT_CMD_RELOAD
3436
3437
3438# _LT_PATH_DD
3439# -----------
3440# find a working dd
3441m4_defun([_LT_PATH_DD],
3442[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
3443[printf 0123456789abcdef0123456789abcdef >conftest.i
3444cat conftest.i conftest.i >conftest2.i
3445: ${lt_DD:=$DD}
3446AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
3447[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
3448  cmp -s conftest.i conftest.out \
3449  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
3450fi])
3451rm -f conftest.i conftest2.i conftest.out])
3452])# _LT_PATH_DD
3453
3454
3455# _LT_CMD_TRUNCATE
3456# ----------------
3457# find command to truncate a binary pipe
3458m4_defun([_LT_CMD_TRUNCATE],
3459[m4_require([_LT_PATH_DD])
3460AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
3461[printf 0123456789abcdef0123456789abcdef >conftest.i
3462cat conftest.i conftest.i >conftest2.i
3463lt_cv_truncate_bin=
3464if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
3465  cmp -s conftest.i conftest.out \
3466  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
3467fi
3468rm -f conftest.i conftest2.i conftest.out
3469test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
3470_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
3471  [Command to truncate a binary pipe])
3472])# _LT_CMD_TRUNCATE
3473
3474
3475# _LT_CHECK_MAGIC_METHOD
3476# ----------------------
3477# how to check for library dependencies
3478#  -- PORTME fill in with the dynamic library characteristics
3479m4_defun([_LT_CHECK_MAGIC_METHOD],
3480[m4_require([_LT_DECL_EGREP])
3481m4_require([_LT_DECL_OBJDUMP])
3482AC_CACHE_CHECK([how to recognize dependent libraries],
3483lt_cv_deplibs_check_method,
3484[lt_cv_file_magic_cmd='$MAGIC_CMD'
3485lt_cv_file_magic_test_file=
3486lt_cv_deplibs_check_method='unknown'
3487# Need to set the preceding variable on all platforms that support
3488# interlibrary dependencies.
3489# 'none' -- dependencies not supported.
3490# 'unknown' -- same as none, but documents that we really don't know.
3491# 'pass_all' -- all dependencies passed with no checks.
3492# 'test_compile' -- check by making test program.
3493# 'file_magic [[regex]]' -- check by looking for files in library path
3494# that responds to the $file_magic_cmd with a given extended regex.
3495# If you have 'file' or equivalent on your system and you're not sure
3496# whether 'pass_all' will *always* work, you probably want this one.
3497
3498case $host_os in
3499aix[[4-9]]*)
3500  lt_cv_deplibs_check_method=pass_all
3501  ;;
3502
3503beos*)
3504  lt_cv_deplibs_check_method=pass_all
3505  ;;
3506
3507bsdi[[45]]*)
3508  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3509  lt_cv_file_magic_cmd='$FILECMD -L'
3510  lt_cv_file_magic_test_file=/shlib/libc.so
3511  ;;
3512
3513cygwin*)
3514  # func_win32_libid is a shell function defined in ltmain.sh
3515  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3516  lt_cv_file_magic_cmd='func_win32_libid'
3517  ;;
3518
3519mingw* | pw32*)
3520  # Base MSYS/MinGW do not provide the 'file' command needed by
3521  # func_win32_libid shell function, so use a weaker test based on 'objdump',
3522  # unless we find 'file', for example because we are cross-compiling.
3523  if ( file / ) >/dev/null 2>&1; then
3524    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3525    lt_cv_file_magic_cmd='func_win32_libid'
3526  else
3527    # Keep this pattern in sync with the one in func_win32_libid.
3528    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
3529    lt_cv_file_magic_cmd='$OBJDUMP -f'
3530  fi
3531  ;;
3532
3533cegcc*)
3534  # use the weaker test based on 'objdump'. See mingw*.
3535  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3536  lt_cv_file_magic_cmd='$OBJDUMP -f'
3537  ;;
3538
3539darwin* | rhapsody*)
3540  lt_cv_deplibs_check_method=pass_all
3541  ;;
3542
3543freebsd* | dragonfly* | midnightbsd*)
3544  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3545    case $host_cpu in
3546    i*86 )
3547      # Not sure whether the presence of OpenBSD here was a mistake.
3548      # Let's accept both of them until this is cleared up.
3549      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3550      lt_cv_file_magic_cmd=$FILECMD
3551      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3552      ;;
3553    esac
3554  else
3555    lt_cv_deplibs_check_method=pass_all
3556  fi
3557  ;;
3558
3559haiku*)
3560  lt_cv_deplibs_check_method=pass_all
3561  ;;
3562
3563hpux10.20* | hpux11*)
3564  lt_cv_file_magic_cmd=$FILECMD
3565  case $host_cpu in
3566  ia64*)
3567    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3568    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3569    ;;
3570  hppa*64*)
3571    [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]']
3572    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3573    ;;
3574  *)
3575    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
3576    lt_cv_file_magic_test_file=/usr/lib/libc.sl
3577    ;;
3578  esac
3579  ;;
3580
3581interix[[3-9]]*)
3582  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3583  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3584  ;;
3585
3586irix5* | irix6* | nonstopux*)
3587  case $LD in
3588  *-32|*"-32 ") libmagic=32-bit;;
3589  *-n32|*"-n32 ") libmagic=N32;;
3590  *-64|*"-64 ") libmagic=64-bit;;
3591  *) libmagic=never-match;;
3592  esac
3593  lt_cv_deplibs_check_method=pass_all
3594  ;;
3595
3596# This must be glibc/ELF.
3597linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
3598  lt_cv_deplibs_check_method=pass_all
3599  ;;
3600
3601netbsd*)
3602  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3603    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3604  else
3605    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3606  fi
3607  ;;
3608
3609newos6*)
3610  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3611  lt_cv_file_magic_cmd=$FILECMD
3612  lt_cv_file_magic_test_file=/usr/lib/libnls.so
3613  ;;
3614
3615*nto* | *qnx*)
3616  lt_cv_deplibs_check_method=pass_all
3617  ;;
3618
3619openbsd* | bitrig*)
3620  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
3621    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3622  else
3623    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3624  fi
3625  ;;
3626
3627osf3* | osf4* | osf5*)
3628  lt_cv_deplibs_check_method=pass_all
3629  ;;
3630
3631rdos*)
3632  lt_cv_deplibs_check_method=pass_all
3633  ;;
3634
3635solaris*)
3636  lt_cv_deplibs_check_method=pass_all
3637  ;;
3638
3639sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3640  lt_cv_deplibs_check_method=pass_all
3641  ;;
3642
3643sysv4 | sysv4.3*)
3644  case $host_vendor in
3645  motorola)
3646    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]]'
3647    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3648    ;;
3649  ncr)
3650    lt_cv_deplibs_check_method=pass_all
3651    ;;
3652  sequent)
3653    lt_cv_file_magic_cmd='/bin/file'
3654    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3655    ;;
3656  sni)
3657    lt_cv_file_magic_cmd='/bin/file'
3658    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3659    lt_cv_file_magic_test_file=/lib/libc.so
3660    ;;
3661  siemens)
3662    lt_cv_deplibs_check_method=pass_all
3663    ;;
3664  pc)
3665    lt_cv_deplibs_check_method=pass_all
3666    ;;
3667  esac
3668  ;;
3669
3670tpf*)
3671  lt_cv_deplibs_check_method=pass_all
3672  ;;
3673os2*)
3674  lt_cv_deplibs_check_method=pass_all
3675  ;;
3676esac
3677])
3678
3679file_magic_glob=
3680want_nocaseglob=no
3681if test "$build" = "$host"; then
3682  case $host_os in
3683  mingw* | pw32*)
3684    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
3685      want_nocaseglob=yes
3686    else
3687      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
3688    fi
3689    ;;
3690  esac
3691fi
3692
3693file_magic_cmd=$lt_cv_file_magic_cmd
3694deplibs_check_method=$lt_cv_deplibs_check_method
3695test -z "$deplibs_check_method" && deplibs_check_method=unknown
3696
3697_LT_DECL([], [deplibs_check_method], [1],
3698    [Method to check whether dependent libraries are shared objects])
3699_LT_DECL([], [file_magic_cmd], [1],
3700    [Command to use when deplibs_check_method = "file_magic"])
3701_LT_DECL([], [file_magic_glob], [1],
3702    [How to find potential files when deplibs_check_method = "file_magic"])
3703_LT_DECL([], [want_nocaseglob], [1],
3704    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
3705])# _LT_CHECK_MAGIC_METHOD
3706
3707
3708# LT_PATH_NM
3709# ----------
3710# find the pathname to a BSD- or MS-compatible name lister
3711AC_DEFUN([LT_PATH_NM],
3712[AC_REQUIRE([AC_PROG_CC])dnl
3713AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3714[if test -n "$NM"; then
3715  # Let the user override the test.
3716  lt_cv_path_NM=$NM
3717else
3718  lt_nm_to_check=${ac_tool_prefix}nm
3719  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3720    lt_nm_to_check="$lt_nm_to_check nm"
3721  fi
3722  for lt_tmp_nm in $lt_nm_to_check; do
3723    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3724    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3725      IFS=$lt_save_ifs
3726      test -z "$ac_dir" && ac_dir=.
3727      tmp_nm=$ac_dir/$lt_tmp_nm
3728      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
3729	# Check to see if the nm accepts a BSD-compat flag.
3730	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
3731	#   nm: unknown option "B" ignored
3732	# Tru64's nm complains that /dev/null is an invalid object file
3733	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
3734	case $build_os in
3735	mingw*) lt_bad_file=conftest.nm/nofile ;;
3736	*) lt_bad_file=/dev/null ;;
3737	esac
3738	case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in
3739	*$lt_bad_file* | *'Invalid file or object type'*)
3740	  lt_cv_path_NM="$tmp_nm -B"
3741	  break 2
3742	  ;;
3743	*)
3744	  case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in
3745	  */dev/null*)
3746	    lt_cv_path_NM="$tmp_nm -p"
3747	    break 2
3748	    ;;
3749	  *)
3750	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3751	    continue # so that we can try to find one that supports BSD flags
3752	    ;;
3753	  esac
3754	  ;;
3755	esac
3756      fi
3757    done
3758    IFS=$lt_save_ifs
3759  done
3760  : ${lt_cv_path_NM=no}
3761fi])
3762if test no != "$lt_cv_path_NM"; then
3763  NM=$lt_cv_path_NM
3764else
3765  # Didn't find any BSD compatible name lister, look for dumpbin.
3766  if test -n "$DUMPBIN"; then :
3767    # Let the user override the test.
3768  else
3769    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
3770    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in
3771    *COFF*)
3772      DUMPBIN="$DUMPBIN -symbols -headers"
3773      ;;
3774    *)
3775      DUMPBIN=:
3776      ;;
3777    esac
3778  fi
3779  AC_SUBST([DUMPBIN])
3780  if test : != "$DUMPBIN"; then
3781    NM=$DUMPBIN
3782  fi
3783fi
3784test -z "$NM" && NM=nm
3785AC_SUBST([NM])
3786_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3787
3788AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3789  [lt_cv_nm_interface="BSD nm"
3790  echo "int some_variable = 0;" > conftest.$ac_ext
3791  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3792  (eval "$ac_compile" 2>conftest.err)
3793  cat conftest.err >&AS_MESSAGE_LOG_FD
3794  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3795  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3796  cat conftest.err >&AS_MESSAGE_LOG_FD
3797  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
3798  cat conftest.out >&AS_MESSAGE_LOG_FD
3799  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3800    lt_cv_nm_interface="MS dumpbin"
3801  fi
3802  rm -f conftest*])
3803])# LT_PATH_NM
3804
3805# Old names:
3806AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3807AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3808dnl aclocal-1.4 backwards compatibility:
3809dnl AC_DEFUN([AM_PROG_NM], [])
3810dnl AC_DEFUN([AC_PROG_NM], [])
3811
3812# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3813# --------------------------------
3814# how to determine the name of the shared library
3815# associated with a specific link library.
3816#  -- PORTME fill in with the dynamic library characteristics
3817m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
3818[m4_require([_LT_DECL_EGREP])
3819m4_require([_LT_DECL_OBJDUMP])
3820m4_require([_LT_DECL_DLLTOOL])
3821AC_CACHE_CHECK([how to associate runtime and link libraries],
3822lt_cv_sharedlib_from_linklib_cmd,
3823[lt_cv_sharedlib_from_linklib_cmd='unknown'
3824
3825case $host_os in
3826cygwin* | mingw* | pw32* | cegcc*)
3827  # two different shell functions defined in ltmain.sh;
3828  # decide which one to use based on capabilities of $DLLTOOL
3829  case `$DLLTOOL --help 2>&1` in
3830  *--identify-strict*)
3831    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
3832    ;;
3833  *)
3834    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
3835    ;;
3836  esac
3837  ;;
3838*)
3839  # fallback: assume linklib IS sharedlib
3840  lt_cv_sharedlib_from_linklib_cmd=$ECHO
3841  ;;
3842esac
3843])
3844sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
3845test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
3846
3847_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
3848    [Command to associate shared and link libraries])
3849])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3850
3851
3852# _LT_PATH_MANIFEST_TOOL
3853# ----------------------
3854# locate the manifest tool
3855m4_defun([_LT_PATH_MANIFEST_TOOL],
3856[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
3857test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
3858AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
3859  [lt_cv_path_mainfest_tool=no
3860  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
3861  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
3862  cat conftest.err >&AS_MESSAGE_LOG_FD
3863  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
3864    lt_cv_path_mainfest_tool=yes
3865  fi
3866  rm -f conftest*])
3867if test yes != "$lt_cv_path_mainfest_tool"; then
3868  MANIFEST_TOOL=:
3869fi
3870_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
3871])# _LT_PATH_MANIFEST_TOOL
3872
3873
3874# _LT_DLL_DEF_P([FILE])
3875# ---------------------
3876# True iff FILE is a Windows DLL '.def' file.
3877# Keep in sync with func_dll_def_p in the libtool script
3878AC_DEFUN([_LT_DLL_DEF_P],
3879[dnl
3880  test DEF = "`$SED -n dnl
3881    -e '\''s/^[[	 ]]*//'\'' dnl Strip leading whitespace
3882    -e '\''/^\(;.*\)*$/d'\'' dnl      Delete empty lines and comments
3883    -e '\''s/^\(EXPORTS\|LIBRARY\)\([[	 ]].*\)*$/DEF/p'\'' dnl
3884    -e q dnl                          Only consider the first "real" line
3885    $1`" dnl
3886])# _LT_DLL_DEF_P
3887
3888
3889# LT_LIB_M
3890# --------
3891# check for math library
3892AC_DEFUN([LT_LIB_M],
3893[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3894LIBM=
3895case $host in
3896*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
3897  # These system don't have libm, or don't need it
3898  ;;
3899*-ncr-sysv4.3*)
3900  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
3901  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3902  ;;
3903*)
3904  AC_CHECK_LIB(m, cos, LIBM=-lm)
3905  ;;
3906esac
3907AC_SUBST([LIBM])
3908])# LT_LIB_M
3909
3910# Old name:
3911AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3912dnl aclocal-1.4 backwards compatibility:
3913dnl AC_DEFUN([AC_CHECK_LIBM], [])
3914
3915
3916# _LT_COMPILER_NO_RTTI([TAGNAME])
3917# -------------------------------
3918m4_defun([_LT_COMPILER_NO_RTTI],
3919[m4_require([_LT_TAG_COMPILER])dnl
3920
3921_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3922
3923if test yes = "$GCC"; then
3924  case $cc_basename in
3925  nvcc*)
3926    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
3927  *)
3928    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
3929  esac
3930
3931  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3932    lt_cv_prog_compiler_rtti_exceptions,
3933    [-fno-rtti -fno-exceptions], [],
3934    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3935fi
3936_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3937	[Compiler flag to turn off builtin functions])
3938])# _LT_COMPILER_NO_RTTI
3939
3940
3941# _LT_CMD_GLOBAL_SYMBOLS
3942# ----------------------
3943m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3944[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3945AC_REQUIRE([AC_PROG_CC])dnl
3946AC_REQUIRE([AC_PROG_AWK])dnl
3947AC_REQUIRE([LT_PATH_NM])dnl
3948AC_REQUIRE([LT_PATH_LD])dnl
3949m4_require([_LT_DECL_SED])dnl
3950m4_require([_LT_DECL_EGREP])dnl
3951m4_require([_LT_TAG_COMPILER])dnl
3952
3953# Check for command to grab the raw symbol name followed by C symbol from nm.
3954AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3955AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3956[
3957# These are sane defaults that work on at least a few old systems.
3958# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3959
3960# Character class describing NM global symbol codes.
3961symcode='[[BCDEGRST]]'
3962
3963# Regexp to match symbols that can be accessed directly from C.
3964sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3965
3966# Define system-specific variables.
3967case $host_os in
3968aix*)
3969  symcode='[[BCDT]]'
3970  ;;
3971cygwin* | mingw* | pw32* | cegcc*)
3972  symcode='[[ABCDGISTW]]'
3973  ;;
3974hpux*)
3975  if test ia64 = "$host_cpu"; then
3976    symcode='[[ABCDEGRST]]'
3977  fi
3978  ;;
3979irix* | nonstopux*)
3980  symcode='[[BCDEGRST]]'
3981  ;;
3982osf*)
3983  symcode='[[BCDEGQRST]]'
3984  ;;
3985solaris*)
3986  symcode='[[BDRT]]'
3987  ;;
3988sco3.2v5*)
3989  symcode='[[DT]]'
3990  ;;
3991sysv4.2uw2*)
3992  symcode='[[DT]]'
3993  ;;
3994sysv5* | sco5v6* | unixware* | OpenUNIX*)
3995  symcode='[[ABDT]]'
3996  ;;
3997sysv4)
3998  symcode='[[DFNSTU]]'
3999  ;;
4000esac
4001
4002# If we're using GNU nm, then use its standard symbol codes.
4003case `$NM -V 2>&1` in
4004*GNU* | *'with BFD'*)
4005  symcode='[[ABCDGIRSTW]]' ;;
4006esac
4007
4008if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4009  # Gets list of data symbols to import.
4010  lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'"
4011  # Adjust the below global symbol transforms to fixup imported variables.
4012  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
4013  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
4014  lt_c_name_lib_hook="\
4015  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
4016  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
4017else
4018  # Disable hooks by default.
4019  lt_cv_sys_global_symbol_to_import=
4020  lt_cdecl_hook=
4021  lt_c_name_hook=
4022  lt_c_name_lib_hook=
4023fi
4024
4025# Transform an extracted symbol line into a proper C declaration.
4026# Some systems (esp. on ia64) link data and code symbols differently,
4027# so use this general approach.
4028lt_cv_sys_global_symbol_to_cdecl="$SED -n"\
4029$lt_cdecl_hook\
4030" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
4031" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
4032
4033# Transform an extracted symbol line into symbol name and symbol address
4034lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\
4035$lt_c_name_hook\
4036" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
4037" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
4038
4039# Transform an extracted symbol line into symbol name with lib prefix and
4040# symbol address.
4041lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\
4042$lt_c_name_lib_hook\
4043" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
4044" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
4045" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
4046
4047# Handle CRLF in mingw tool chain
4048opt_cr=
4049case $build_os in
4050mingw*)
4051  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4052  ;;
4053esac
4054
4055# Try without a prefix underscore, then with it.
4056for ac_symprfx in "" "_"; do
4057
4058  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4059  symxfrm="\\1 $ac_symprfx\\2 \\2"
4060
4061  # Write the raw and C identifiers.
4062  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4063    # Fake it for dumpbin and say T for any non-static function,
4064    # D for any global variable and I for any imported variable.
4065    # Also find C++ and __fastcall symbols from MSVC++ or ICC,
4066    # which start with @ or ?.
4067    lt_cv_sys_global_symbol_pipe="$AWK ['"\
4068"     {last_section=section; section=\$ 3};"\
4069"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
4070"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4071"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
4072"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
4073"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
4074"     \$ 0!~/External *\|/{next};"\
4075"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4076"     {if(hide[section]) next};"\
4077"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
4078"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
4079"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
4080"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
4081"     ' prfx=^$ac_symprfx]"
4082  else
4083    lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4084  fi
4085  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'"
4086
4087  # Check to see that the pipe works correctly.
4088  pipe_works=no
4089
4090  rm -f conftest*
4091  cat > conftest.$ac_ext <<_LT_EOF
4092#ifdef __cplusplus
4093extern "C" {
4094#endif
4095char nm_test_var;
4096void nm_test_func(void);
4097void nm_test_func(void){}
4098#ifdef __cplusplus
4099}
4100#endif
4101int main(){nm_test_var='a';nm_test_func();return(0);}
4102_LT_EOF
4103
4104  if AC_TRY_EVAL(ac_compile); then
4105    # Now try to grab the symbols.
4106    nlist=conftest.nm
4107    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
4108      # Try sorting and uniquifying the output.
4109      if sort "$nlist" | uniq > "$nlist"T; then
4110	mv -f "$nlist"T "$nlist"
4111      else
4112	rm -f "$nlist"T
4113      fi
4114
4115      # Make sure that we snagged all the symbols we need.
4116      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4117	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4118	  cat <<_LT_EOF > conftest.$ac_ext
4119/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
4120#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
4121/* DATA imports from DLLs on WIN32 can't be const, because runtime
4122   relocations are performed -- see ld's documentation on pseudo-relocs.  */
4123# define LT@&t@_DLSYM_CONST
4124#elif defined __osf__
4125/* This system does not cope well with relocations in const data.  */
4126# define LT@&t@_DLSYM_CONST
4127#else
4128# define LT@&t@_DLSYM_CONST const
4129#endif
4130
4131#ifdef __cplusplus
4132extern "C" {
4133#endif
4134
4135_LT_EOF
4136	  # Now generate the symbol file.
4137	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4138
4139	  cat <<_LT_EOF >> conftest.$ac_ext
4140
4141/* The mapping between symbol names and symbols.  */
4142LT@&t@_DLSYM_CONST struct {
4143  const char *name;
4144  void       *address;
4145}
4146lt__PROGRAM__LTX_preloaded_symbols[[]] =
4147{
4148  { "@PROGRAM@", (void *) 0 },
4149_LT_EOF
4150	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4151	  cat <<\_LT_EOF >> conftest.$ac_ext
4152  {0, (void *) 0}
4153};
4154
4155/* This works around a problem in FreeBSD linker */
4156#ifdef FREEBSD_WORKAROUND
4157static const void *lt_preloaded_setup() {
4158  return lt__PROGRAM__LTX_preloaded_symbols;
4159}
4160#endif
4161
4162#ifdef __cplusplus
4163}
4164#endif
4165_LT_EOF
4166	  # Now try linking the two files.
4167	  mv conftest.$ac_objext conftstm.$ac_objext
4168	  lt_globsym_save_LIBS=$LIBS
4169	  lt_globsym_save_CFLAGS=$CFLAGS
4170	  LIBS=conftstm.$ac_objext
4171	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4172	  if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
4173	    pipe_works=yes
4174	  fi
4175	  LIBS=$lt_globsym_save_LIBS
4176	  CFLAGS=$lt_globsym_save_CFLAGS
4177	else
4178	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4179	fi
4180      else
4181	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4182      fi
4183    else
4184      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4185    fi
4186  else
4187    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4188    cat conftest.$ac_ext >&5
4189  fi
4190  rm -rf conftest* conftst*
4191
4192  # Do not use the global_symbol_pipe unless it works.
4193  if test yes = "$pipe_works"; then
4194    break
4195  else
4196    lt_cv_sys_global_symbol_pipe=
4197  fi
4198done
4199])
4200if test -z "$lt_cv_sys_global_symbol_pipe"; then
4201  lt_cv_sys_global_symbol_to_cdecl=
4202fi
4203if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4204  AC_MSG_RESULT(failed)
4205else
4206  AC_MSG_RESULT(ok)
4207fi
4208
4209# Response file support.
4210if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4211  nm_file_list_spec='@'
4212elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
4213  nm_file_list_spec='@'
4214fi
4215
4216_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4217    [Take the output of nm and produce a listing of raw symbols and C names])
4218_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4219    [Transform the output of nm in a proper C declaration])
4220_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
4221    [Transform the output of nm into a list of symbols to manually relocate])
4222_LT_DECL([global_symbol_to_c_name_address],
4223    [lt_cv_sys_global_symbol_to_c_name_address], [1],
4224    [Transform the output of nm in a C name address pair])
4225_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4226    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4227    [Transform the output of nm in a C name address pair when lib prefix is needed])
4228_LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
4229    [The name lister interface])
4230_LT_DECL([], [nm_file_list_spec], [1],
4231    [Specify filename containing input files for $NM])
4232]) # _LT_CMD_GLOBAL_SYMBOLS
4233
4234
4235# _LT_COMPILER_PIC([TAGNAME])
4236# ---------------------------
4237m4_defun([_LT_COMPILER_PIC],
4238[m4_require([_LT_TAG_COMPILER])dnl
4239_LT_TAGVAR(lt_prog_compiler_wl, $1)=
4240_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4241_LT_TAGVAR(lt_prog_compiler_static, $1)=
4242
4243m4_if([$1], [CXX], [
4244  # C++ specific cases for pic, static, wl, etc.
4245  if test yes = "$GXX"; then
4246    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4247    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4248
4249    case $host_os in
4250    aix*)
4251      # All AIX code is PIC.
4252      if test ia64 = "$host_cpu"; then
4253	# AIX 5 now supports IA64 processor
4254	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4255      fi
4256      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4257      ;;
4258
4259    amigaos*)
4260      case $host_cpu in
4261      powerpc)
4262            # see comment about AmigaOS4 .so support
4263            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4264        ;;
4265      m68k)
4266            # FIXME: we need at least 68020 code to build shared libraries, but
4267            # adding the '-m68020' flag to GCC prevents building anything better,
4268            # like '-m68040'.
4269            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4270        ;;
4271      esac
4272      ;;
4273
4274    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4275      # PIC is the default for these OSes.
4276      ;;
4277    mingw* | cygwin* | os2* | pw32* | cegcc*)
4278      # This hack is so that the source file can tell whether it is being
4279      # built for inclusion in a dll (and should export symbols for example).
4280      # Although the cygwin gcc ignores -fPIC, still need this for old-style
4281      # (--disable-auto-import) libraries
4282      m4_if([$1], [GCJ], [],
4283	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4284      case $host_os in
4285      os2*)
4286	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4287	;;
4288      esac
4289      ;;
4290    darwin* | rhapsody*)
4291      # PIC is the default on this platform
4292      # Common symbols not allowed in MH_DYLIB files
4293      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4294      ;;
4295    *djgpp*)
4296      # DJGPP does not support shared libraries at all
4297      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4298      ;;
4299    haiku*)
4300      # PIC is the default for Haiku.
4301      # The "-static" flag exists, but is broken.
4302      _LT_TAGVAR(lt_prog_compiler_static, $1)=
4303      ;;
4304    interix[[3-9]]*)
4305      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4306      # Instead, we relocate shared libraries at runtime.
4307      ;;
4308    sysv4*MP*)
4309      if test -d /usr/nec; then
4310	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4311      fi
4312      ;;
4313    hpux*)
4314      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4315      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4316      # sets the default TLS model and affects inlining.
4317      case $host_cpu in
4318      hppa*64*)
4319	;;
4320      *)
4321	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4322	;;
4323      esac
4324      ;;
4325    *qnx* | *nto*)
4326      # QNX uses GNU C++, but need to define -shared option too, otherwise
4327      # it will coredump.
4328      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4329      ;;
4330    *)
4331      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4332      ;;
4333    esac
4334  else
4335    case $host_os in
4336      aix[[4-9]]*)
4337	# All AIX code is PIC.
4338	if test ia64 = "$host_cpu"; then
4339	  # AIX 5 now supports IA64 processor
4340	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4341	else
4342	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4343	fi
4344	;;
4345      chorus*)
4346	case $cc_basename in
4347	cxch68*)
4348	  # Green Hills C++ Compiler
4349	  # _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"
4350	  ;;
4351	esac
4352	;;
4353      mingw* | cygwin* | os2* | pw32* | cegcc*)
4354	# This hack is so that the source file can tell whether it is being
4355	# built for inclusion in a dll (and should export symbols for example).
4356	m4_if([$1], [GCJ], [],
4357	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4358	;;
4359      dgux*)
4360	case $cc_basename in
4361	  ec++*)
4362	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4363	    ;;
4364	  ghcx*)
4365	    # Green Hills C++ Compiler
4366	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4367	    ;;
4368	  *)
4369	    ;;
4370	esac
4371	;;
4372      freebsd* | dragonfly* | midnightbsd*)
4373	# FreeBSD uses GNU C++
4374	;;
4375      hpux9* | hpux10* | hpux11*)
4376	case $cc_basename in
4377	  CC*)
4378	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4379	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4380	    if test ia64 != "$host_cpu"; then
4381	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4382	    fi
4383	    ;;
4384	  aCC*)
4385	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4386	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4387	    case $host_cpu in
4388	    hppa*64*|ia64*)
4389	      # +Z the default
4390	      ;;
4391	    *)
4392	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4393	      ;;
4394	    esac
4395	    ;;
4396	  *)
4397	    ;;
4398	esac
4399	;;
4400      interix*)
4401	# This is c89, which is MS Visual C++ (no shared libs)
4402	# Anyone wants to do a port?
4403	;;
4404      irix5* | irix6* | nonstopux*)
4405	case $cc_basename in
4406	  CC*)
4407	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4408	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4409	    # CC pic flag -KPIC is the default.
4410	    ;;
4411	  *)
4412	    ;;
4413	esac
4414	;;
4415      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4416	case $cc_basename in
4417	  KCC*)
4418	    # KAI C++ Compiler
4419	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4420	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4421	    ;;
4422	  ecpc* )
4423	    # old Intel C++ for x86_64, which still supported -KPIC.
4424	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4425	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4426	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4427	    ;;
4428	  icpc* )
4429	    # Intel C++, used to be incompatible with GCC.
4430	    # ICC 10 doesn't accept -KPIC any more.
4431	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4432	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4433	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4434	    ;;
4435	  pgCC* | pgcpp*)
4436	    # Portland Group C++ compiler
4437	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4438	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4439	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4440	    ;;
4441	  cxx*)
4442	    # Compaq C++
4443	    # Make sure the PIC flag is empty.  It appears that all Alpha
4444	    # Linux and Compaq Tru64 Unix objects are PIC.
4445	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4446	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4447	    ;;
4448	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
4449	    # IBM XL 8.0, 9.0 on PPC and BlueGene
4450	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4451	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4452	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4453	    ;;
4454	  *)
4455	    case `$CC -V 2>&1 | $SED 5q` in
4456	    *Sun\ C*)
4457	      # Sun C++ 5.9
4458	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4459	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4460	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4461	      ;;
4462	    esac
4463	    ;;
4464	esac
4465	;;
4466      lynxos*)
4467	;;
4468      m88k*)
4469	;;
4470      mvs*)
4471	case $cc_basename in
4472	  cxx*)
4473	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4474	    ;;
4475	  *)
4476	    ;;
4477	esac
4478	;;
4479      netbsd*)
4480	;;
4481      *qnx* | *nto*)
4482        # QNX uses GNU C++, but need to define -shared option too, otherwise
4483        # it will coredump.
4484        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4485        ;;
4486      osf3* | osf4* | osf5*)
4487	case $cc_basename in
4488	  KCC*)
4489	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4490	    ;;
4491	  RCC*)
4492	    # Rational C++ 2.4.1
4493	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4494	    ;;
4495	  cxx*)
4496	    # Digital/Compaq C++
4497	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4498	    # Make sure the PIC flag is empty.  It appears that all Alpha
4499	    # Linux and Compaq Tru64 Unix objects are PIC.
4500	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4501	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4502	    ;;
4503	  *)
4504	    ;;
4505	esac
4506	;;
4507      psos*)
4508	;;
4509      solaris*)
4510	case $cc_basename in
4511	  CC* | sunCC*)
4512	    # Sun C++ 4.2, 5.x and Centerline C++
4513	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4514	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4515	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4516	    ;;
4517	  gcx*)
4518	    # Green Hills C++ Compiler
4519	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4520	    ;;
4521	  *)
4522	    ;;
4523	esac
4524	;;
4525      sunos4*)
4526	case $cc_basename in
4527	  CC*)
4528	    # Sun C++ 4.x
4529	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4530	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4531	    ;;
4532	  lcc*)
4533	    # Lucid
4534	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4535	    ;;
4536	  *)
4537	    ;;
4538	esac
4539	;;
4540      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4541	case $cc_basename in
4542	  CC*)
4543	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4544	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4545	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4546	    ;;
4547	esac
4548	;;
4549      tandem*)
4550	case $cc_basename in
4551	  NCC*)
4552	    # NonStop-UX NCC 3.20
4553	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4554	    ;;
4555	  *)
4556	    ;;
4557	esac
4558	;;
4559      vxworks*)
4560	;;
4561      *)
4562	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4563	;;
4564    esac
4565  fi
4566],
4567[
4568  if test yes = "$GCC"; then
4569    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4570    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4571
4572    case $host_os in
4573      aix*)
4574      # All AIX code is PIC.
4575      if test ia64 = "$host_cpu"; then
4576	# AIX 5 now supports IA64 processor
4577	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4578      fi
4579      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4580      ;;
4581
4582    amigaos*)
4583      case $host_cpu in
4584      powerpc)
4585            # see comment about AmigaOS4 .so support
4586            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4587        ;;
4588      m68k)
4589            # FIXME: we need at least 68020 code to build shared libraries, but
4590            # adding the '-m68020' flag to GCC prevents building anything better,
4591            # like '-m68040'.
4592            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4593        ;;
4594      esac
4595      ;;
4596
4597    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4598      # PIC is the default for these OSes.
4599      ;;
4600
4601    mingw* | cygwin* | pw32* | os2* | cegcc*)
4602      # This hack is so that the source file can tell whether it is being
4603      # built for inclusion in a dll (and should export symbols for example).
4604      # Although the cygwin gcc ignores -fPIC, still need this for old-style
4605      # (--disable-auto-import) libraries
4606      m4_if([$1], [GCJ], [],
4607	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4608      case $host_os in
4609      os2*)
4610	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4611	;;
4612      esac
4613      ;;
4614
4615    darwin* | rhapsody*)
4616      # PIC is the default on this platform
4617      # Common symbols not allowed in MH_DYLIB files
4618      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4619      ;;
4620
4621    haiku*)
4622      # PIC is the default for Haiku.
4623      # The "-static" flag exists, but is broken.
4624      _LT_TAGVAR(lt_prog_compiler_static, $1)=
4625      ;;
4626
4627    hpux*)
4628      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4629      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4630      # sets the default TLS model and affects inlining.
4631      case $host_cpu in
4632      hppa*64*)
4633	# +Z the default
4634	;;
4635      *)
4636	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4637	;;
4638      esac
4639      ;;
4640
4641    interix[[3-9]]*)
4642      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4643      # Instead, we relocate shared libraries at runtime.
4644      ;;
4645
4646    msdosdjgpp*)
4647      # Just because we use GCC doesn't mean we suddenly get shared libraries
4648      # on systems that don't support them.
4649      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4650      enable_shared=no
4651      ;;
4652
4653    *nto* | *qnx*)
4654      # QNX uses GNU C++, but need to define -shared option too, otherwise
4655      # it will coredump.
4656      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4657      ;;
4658
4659    sysv4*MP*)
4660      if test -d /usr/nec; then
4661	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4662      fi
4663      ;;
4664
4665    *)
4666      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4667      ;;
4668    esac
4669
4670    case $cc_basename in
4671    nvcc*) # Cuda Compiler Driver 2.2
4672      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
4673      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4674        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
4675      fi
4676      ;;
4677    esac
4678  else
4679    # PORTME Check for flag to pass linker flags through the system compiler.
4680    case $host_os in
4681    aix*)
4682      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4683      if test ia64 = "$host_cpu"; then
4684	# AIX 5 now supports IA64 processor
4685	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4686      else
4687	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4688      fi
4689      ;;
4690
4691    darwin* | rhapsody*)
4692      # PIC is the default on this platform
4693      # Common symbols not allowed in MH_DYLIB files
4694      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4695      case $cc_basename in
4696      nagfor*)
4697        # NAG Fortran compiler
4698        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4699        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4700        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4701        ;;
4702      esac
4703      ;;
4704
4705    mingw* | cygwin* | pw32* | os2* | cegcc*)
4706      # This hack is so that the source file can tell whether it is being
4707      # built for inclusion in a dll (and should export symbols for example).
4708      m4_if([$1], [GCJ], [],
4709	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4710      case $host_os in
4711      os2*)
4712	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4713	;;
4714      esac
4715      ;;
4716
4717    hpux9* | hpux10* | hpux11*)
4718      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4719      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4720      # not for PA HP-UX.
4721      case $host_cpu in
4722      hppa*64*|ia64*)
4723	# +Z the default
4724	;;
4725      *)
4726	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4727	;;
4728      esac
4729      # Is there a better lt_prog_compiler_static that works with the bundled CC?
4730      _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4731      ;;
4732
4733    irix5* | irix6* | nonstopux*)
4734      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4735      # PIC (with -KPIC) is the default.
4736      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4737      ;;
4738
4739    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4740      case $cc_basename in
4741      # old Intel for x86_64, which still supported -KPIC.
4742      ecc*)
4743	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4744	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4745	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4746        ;;
4747      # icc used to be incompatible with GCC.
4748      # ICC 10 doesn't accept -KPIC any more.
4749      icc* | ifort*)
4750	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4751	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4752	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4753        ;;
4754      # Lahey Fortran 8.1.
4755      lf95*)
4756	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4757	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4758	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4759	;;
4760      nagfor*)
4761	# NAG Fortran compiler
4762	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4763	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4764	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4765	;;
4766      tcc*)
4767	# Fabrice Bellard et al's Tiny C Compiler
4768	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4769	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4770	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4771	;;
4772      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
4773        # Portland Group compilers (*not* the Pentium gcc compiler,
4774	# which looks to be a dead project)
4775	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4776	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4777	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4778        ;;
4779      ccc*)
4780        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4781        # All Alpha code is PIC.
4782        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4783        ;;
4784      xl* | bgxl* | bgf* | mpixl*)
4785	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
4786	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4787	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4788	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4789	;;
4790      *)
4791	case `$CC -V 2>&1 | $SED 5q` in
4792	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
4793	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
4794	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4795	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4796	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4797	  ;;
4798	*Sun\ F* | *Sun*Fortran*)
4799	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4800	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4801	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4802	  ;;
4803	*Sun\ C*)
4804	  # Sun C 5.9
4805	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4806	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4807	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4808	  ;;
4809        *Intel*\ [[CF]]*Compiler*)
4810	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4811	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4812	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4813	  ;;
4814	*Portland\ Group*)
4815	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4816	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4817	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4818	  ;;
4819	esac
4820	;;
4821      esac
4822      ;;
4823
4824    newsos6)
4825      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4826      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4827      ;;
4828
4829    *nto* | *qnx*)
4830      # QNX uses GNU C++, but need to define -shared option too, otherwise
4831      # it will coredump.
4832      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4833      ;;
4834
4835    osf3* | osf4* | osf5*)
4836      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4837      # All OSF/1 code is PIC.
4838      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4839      ;;
4840
4841    rdos*)
4842      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4843      ;;
4844
4845    solaris*)
4846      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4847      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4848      case $cc_basename in
4849      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
4850	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4851      *)
4852	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4853      esac
4854      ;;
4855
4856    sunos4*)
4857      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4858      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4859      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4860      ;;
4861
4862    sysv4 | sysv4.2uw2* | sysv4.3*)
4863      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4864      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4865      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4866      ;;
4867
4868    sysv4*MP*)
4869      if test -d /usr/nec; then
4870	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4871	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4872      fi
4873      ;;
4874
4875    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4876      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4877      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4878      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4879      ;;
4880
4881    unicos*)
4882      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4883      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4884      ;;
4885
4886    uts4*)
4887      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4888      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4889      ;;
4890
4891    *)
4892      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4893      ;;
4894    esac
4895  fi
4896])
4897case $host_os in
4898  # For platforms that do not support PIC, -DPIC is meaningless:
4899  *djgpp*)
4900    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4901    ;;
4902  *)
4903    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4904    ;;
4905esac
4906
4907AC_CACHE_CHECK([for $compiler option to produce PIC],
4908  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
4909  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4910_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
4911
4912#
4913# Check to make sure the PIC flag actually works.
4914#
4915if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4916  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4917    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4918    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4919    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4920     "" | " "*) ;;
4921     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4922     esac],
4923    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4924     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4925fi
4926_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4927	[Additional compiler flags for building library objects])
4928
4929_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4930	[How to pass a linker flag through the compiler])
4931#
4932# Check to make sure the static flag actually works.
4933#
4934wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4935_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4936  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4937  $lt_tmp_static_flag,
4938  [],
4939  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4940_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4941	[Compiler flag to prevent dynamic linking])
4942])# _LT_COMPILER_PIC
4943
4944
4945# _LT_LINKER_SHLIBS([TAGNAME])
4946# ----------------------------
4947# See if the linker supports building shared libraries.
4948m4_defun([_LT_LINKER_SHLIBS],
4949[AC_REQUIRE([LT_PATH_LD])dnl
4950AC_REQUIRE([LT_PATH_NM])dnl
4951m4_require([_LT_PATH_MANIFEST_TOOL])dnl
4952m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4953m4_require([_LT_DECL_EGREP])dnl
4954m4_require([_LT_DECL_SED])dnl
4955m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4956m4_require([_LT_TAG_COMPILER])dnl
4957AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4958m4_if([$1], [CXX], [
4959  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4960  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4961  case $host_os in
4962  aix[[4-9]]*)
4963    # If we're using GNU nm, then we don't want the "-C" option.
4964    # -C means demangle to GNU nm, but means don't demangle to AIX nm.
4965    # Without the "-l" option, or with the "-B" option, AIX nm treats
4966    # weak defined symbols like other global defined symbols, whereas
4967    # GNU nm marks them as "W".
4968    # While the 'weak' keyword is ignored in the Export File, we need
4969    # it in the Import File for the 'aix-soname' feature, so we have
4970    # to replace the "-B" option with "-P" for AIX nm.
4971    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4972      _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'
4973    else
4974      _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'
4975    fi
4976    ;;
4977  pw32*)
4978    _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
4979    ;;
4980  cygwin* | mingw* | cegcc*)
4981    case $cc_basename in
4982    cl* | icl*)
4983      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
4984      ;;
4985    *)
4986      _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'
4987      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4988      ;;
4989    esac
4990    ;;
4991  *)
4992    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4993    ;;
4994  esac
4995], [
4996  runpath_var=
4997  _LT_TAGVAR(allow_undefined_flag, $1)=
4998  _LT_TAGVAR(always_export_symbols, $1)=no
4999  _LT_TAGVAR(archive_cmds, $1)=
5000  _LT_TAGVAR(archive_expsym_cmds, $1)=
5001  _LT_TAGVAR(compiler_needs_object, $1)=no
5002  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5003  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5004  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5005  _LT_TAGVAR(hardcode_automatic, $1)=no
5006  _LT_TAGVAR(hardcode_direct, $1)=no
5007  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5008  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5009  _LT_TAGVAR(hardcode_libdir_separator, $1)=
5010  _LT_TAGVAR(hardcode_minus_L, $1)=no
5011  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5012  _LT_TAGVAR(inherit_rpath, $1)=no
5013  _LT_TAGVAR(link_all_deplibs, $1)=unknown
5014  _LT_TAGVAR(module_cmds, $1)=
5015  _LT_TAGVAR(module_expsym_cmds, $1)=
5016  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
5017  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5018  _LT_TAGVAR(thread_safe_flag_spec, $1)=
5019  _LT_TAGVAR(whole_archive_flag_spec, $1)=
5020  # include_expsyms should be a list of space-separated symbols to be *always*
5021  # included in the symbol list
5022  _LT_TAGVAR(include_expsyms, $1)=
5023  # exclude_expsyms can be an extended regexp of symbols to exclude
5024  # it will be wrapped by ' (' and ')$', so one must not match beginning or
5025  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
5026  # as well as any symbol that contains 'd'.
5027  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5028  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5029  # platforms (ab)use it in PIC code, but their linkers get confused if
5030  # the symbol is explicitly referenced.  Since portable code cannot
5031  # rely on this symbol name, it's probably fine to never include it in
5032  # preloaded symbol tables.
5033  # Exclude shared library initialization/finalization symbols.
5034dnl Note also adjust exclude_expsyms for C++ above.
5035  extract_expsyms_cmds=
5036
5037  case $host_os in
5038  cygwin* | mingw* | pw32* | cegcc*)
5039    # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
5040    # When not using gcc, we currently assume that we are using
5041    # Microsoft Visual C++ or Intel C++ Compiler.
5042    if test yes != "$GCC"; then
5043      with_gnu_ld=no
5044    fi
5045    ;;
5046  interix*)
5047    # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
5048    with_gnu_ld=yes
5049    ;;
5050  openbsd* | bitrig*)
5051    with_gnu_ld=no
5052    ;;
5053  esac
5054
5055  _LT_TAGVAR(ld_shlibs, $1)=yes
5056
5057  # On some targets, GNU ld is compatible enough with the native linker
5058  # that we're better off using the native interface for both.
5059  lt_use_gnu_ld_interface=no
5060  if test yes = "$with_gnu_ld"; then
5061    case $host_os in
5062      aix*)
5063	# The AIX port of GNU ld has always aspired to compatibility
5064	# with the native linker.  However, as the warning in the GNU ld
5065	# block says, versions before 2.19.5* couldn't really create working
5066	# shared libraries, regardless of the interface used.
5067	case `$LD -v 2>&1` in
5068	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
5069	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
5070	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
5071	  *)
5072	    lt_use_gnu_ld_interface=yes
5073	    ;;
5074	esac
5075	;;
5076      *)
5077	lt_use_gnu_ld_interface=yes
5078	;;
5079    esac
5080  fi
5081
5082  if test yes = "$lt_use_gnu_ld_interface"; then
5083    # If archive_cmds runs LD, not CC, wlarc should be empty
5084    wlarc='$wl'
5085
5086    # Set some defaults for GNU ld with shared library support. These
5087    # are reset later if shared libraries are not supported. Putting them
5088    # here allows them to be overridden if necessary.
5089    runpath_var=LD_RUN_PATH
5090    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5091    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
5092    # ancient GNU ld didn't support --whole-archive et. al.
5093    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5094      _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
5095    else
5096      _LT_TAGVAR(whole_archive_flag_spec, $1)=
5097    fi
5098    supports_anon_versioning=no
5099    case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in
5100      *GNU\ gold*) supports_anon_versioning=yes ;;
5101      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5102      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5103      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5104      *\ 2.11.*) ;; # other 2.11 versions
5105      *) supports_anon_versioning=yes ;;
5106    esac
5107
5108    # See if GNU ld supports shared libraries.
5109    case $host_os in
5110    aix[[3-9]]*)
5111      # On AIX/PPC, the GNU linker is very broken
5112      if test ia64 != "$host_cpu"; then
5113	_LT_TAGVAR(ld_shlibs, $1)=no
5114	cat <<_LT_EOF 1>&2
5115
5116*** Warning: the GNU linker, at least up to release 2.19, is reported
5117*** to be unable to reliably create shared libraries on AIX.
5118*** Therefore, libtool is disabling shared libraries support.  If you
5119*** really care for shared libraries, you may want to install binutils
5120*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
5121*** You will then need to restart the configuration process.
5122
5123_LT_EOF
5124      fi
5125      ;;
5126
5127    amigaos*)
5128      case $host_cpu in
5129      powerpc)
5130            # see comment about AmigaOS4 .so support
5131            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5132            _LT_TAGVAR(archive_expsym_cmds, $1)=''
5133        ;;
5134      m68k)
5135            _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)'
5136            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5137            _LT_TAGVAR(hardcode_minus_L, $1)=yes
5138        ;;
5139      esac
5140      ;;
5141
5142    beos*)
5143      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5144	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5145	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5146	# support --undefined.  This deserves some investigation.  FIXME
5147	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5148      else
5149	_LT_TAGVAR(ld_shlibs, $1)=no
5150      fi
5151      ;;
5152
5153    cygwin* | mingw* | pw32* | cegcc*)
5154      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5155      # as there is no search path for DLLs.
5156      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5157      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
5158      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5159      _LT_TAGVAR(always_export_symbols, $1)=no
5160      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5161      _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'
5162      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5163
5164      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5165        _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'
5166	# If the export-symbols file already is a .def file, use it as
5167	# is; otherwise, prepend EXPORTS...
5168	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
5169          cp $export_symbols $output_objdir/$soname.def;
5170        else
5171          echo EXPORTS > $output_objdir/$soname.def;
5172          cat $export_symbols >> $output_objdir/$soname.def;
5173        fi~
5174        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5175      else
5176	_LT_TAGVAR(ld_shlibs, $1)=no
5177      fi
5178      ;;
5179
5180    haiku*)
5181      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5182      _LT_TAGVAR(link_all_deplibs, $1)=yes
5183      ;;
5184
5185    os2*)
5186      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5187      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5188      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5189      shrext_cmds=.dll
5190      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5191	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5192	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5193	$ECHO EXPORTS >> $output_objdir/$libname.def~
5194	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
5195	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5196	emximp -o $lib $output_objdir/$libname.def'
5197      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5198	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5199	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5200	$ECHO EXPORTS >> $output_objdir/$libname.def~
5201	prefix_cmds="$SED"~
5202	if test EXPORTS = "`$SED 1q $export_symbols`"; then
5203	  prefix_cmds="$prefix_cmds -e 1d";
5204	fi~
5205	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
5206	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
5207	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5208	emximp -o $lib $output_objdir/$libname.def'
5209      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
5210      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5211      _LT_TAGVAR(file_list_spec, $1)='@'
5212      ;;
5213
5214    interix[[3-9]]*)
5215      _LT_TAGVAR(hardcode_direct, $1)=no
5216      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5217      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5218      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5219      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5220      # Instead, shared libraries are loaded at an image base (0x10000000 by
5221      # default) and relocated if they conflict, which is a slow very memory
5222      # consuming and fragmenting process.  To avoid this, we pick a random,
5223      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5224      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5225      _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'
5226      _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'
5227      ;;
5228
5229    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
5230      tmp_diet=no
5231      if test linux-dietlibc = "$host_os"; then
5232	case $cc_basename in
5233	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
5234	esac
5235      fi
5236      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5237	 && test no = "$tmp_diet"
5238      then
5239	tmp_addflag=' $pic_flag'
5240	tmp_sharedflag='-shared'
5241	case $cc_basename,$host_cpu in
5242        pgcc*)				# Portland Group C compiler
5243	  _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'
5244	  tmp_addflag=' $pic_flag'
5245	  ;;
5246	pgf77* | pgf90* | pgf95* | pgfortran*)
5247					# Portland Group f77 and f90 compilers
5248	  _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'
5249	  tmp_addflag=' $pic_flag -Mnomain' ;;
5250	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
5251	  tmp_addflag=' -i_dynamic' ;;
5252	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
5253	  tmp_addflag=' -i_dynamic -nofor_main' ;;
5254	ifc* | ifort*)			# Intel Fortran compiler
5255	  tmp_addflag=' -nofor_main' ;;
5256	lf95*)				# Lahey Fortran 8.1
5257	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
5258	  tmp_sharedflag='--shared' ;;
5259        nagfor*)                        # NAGFOR 5.3
5260          tmp_sharedflag='-Wl,-shared' ;;
5261	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
5262	  tmp_sharedflag='-qmkshrobj'
5263	  tmp_addflag= ;;
5264	nvcc*)	# Cuda Compiler Driver 2.2
5265	  _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'
5266	  _LT_TAGVAR(compiler_needs_object, $1)=yes
5267	  ;;
5268	esac
5269	case `$CC -V 2>&1 | $SED 5q` in
5270	*Sun\ C*)			# Sun C 5.9
5271	  _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'
5272	  _LT_TAGVAR(compiler_needs_object, $1)=yes
5273	  tmp_sharedflag='-G' ;;
5274	*Sun\ F*)			# Sun Fortran 8.3
5275	  tmp_sharedflag='-G' ;;
5276	esac
5277	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5278
5279        if test yes = "$supports_anon_versioning"; then
5280          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5281            cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5282            echo "local: *; };" >> $output_objdir/$libname.ver~
5283            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
5284        fi
5285
5286	case $cc_basename in
5287	tcc*)
5288	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
5289	  ;;
5290	xlf* | bgf* | bgxlf* | mpixlf*)
5291	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5292	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5293	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5294	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
5295	  if test yes = "$supports_anon_versioning"; then
5296	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5297              cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5298              echo "local: *; };" >> $output_objdir/$libname.ver~
5299              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5300	  fi
5301	  ;;
5302	esac
5303      else
5304        _LT_TAGVAR(ld_shlibs, $1)=no
5305      fi
5306      ;;
5307
5308    netbsd*)
5309      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5310	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5311	wlarc=
5312      else
5313	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5314	_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'
5315      fi
5316      ;;
5317
5318    solaris*)
5319      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5320	_LT_TAGVAR(ld_shlibs, $1)=no
5321	cat <<_LT_EOF 1>&2
5322
5323*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5324*** create shared libraries on Solaris systems.  Therefore, libtool
5325*** is disabling shared libraries support.  We urge you to upgrade GNU
5326*** binutils to release 2.9.1 or newer.  Another option is to modify
5327*** your PATH or compiler configuration so that the native linker is
5328*** used, and then restart.
5329
5330_LT_EOF
5331      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5332	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5333	_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'
5334      else
5335	_LT_TAGVAR(ld_shlibs, $1)=no
5336      fi
5337      ;;
5338
5339    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5340      case `$LD -v 2>&1` in
5341        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5342	_LT_TAGVAR(ld_shlibs, $1)=no
5343	cat <<_LT_EOF 1>&2
5344
5345*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
5346*** reliably create shared libraries on SCO systems.  Therefore, libtool
5347*** is disabling shared libraries support.  We urge you to upgrade GNU
5348*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
5349*** your PATH or compiler configuration so that the native linker is
5350*** used, and then restart.
5351
5352_LT_EOF
5353	;;
5354	*)
5355	  # For security reasons, it is highly recommended that you always
5356	  # use absolute paths for naming shared libraries, and exclude the
5357	  # DT_RUNPATH tag from executables and libraries.  But doing so
5358	  # requires that you compile everything twice, which is a pain.
5359	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5360	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5361	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5362	    _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'
5363	  else
5364	    _LT_TAGVAR(ld_shlibs, $1)=no
5365	  fi
5366	;;
5367      esac
5368      ;;
5369
5370    sunos4*)
5371      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5372      wlarc=
5373      _LT_TAGVAR(hardcode_direct, $1)=yes
5374      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5375      ;;
5376
5377    *)
5378      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5379	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5380	_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'
5381      else
5382	_LT_TAGVAR(ld_shlibs, $1)=no
5383      fi
5384      ;;
5385    esac
5386
5387    if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
5388      runpath_var=
5389      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5390      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5391      _LT_TAGVAR(whole_archive_flag_spec, $1)=
5392    fi
5393  else
5394    # PORTME fill in a description of your system's linker (not GNU ld)
5395    case $host_os in
5396    aix3*)
5397      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5398      _LT_TAGVAR(always_export_symbols, $1)=yes
5399      _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'
5400      # Note: this linker hardcodes the directories in LIBPATH if there
5401      # are no directories specified by -L.
5402      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5403      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
5404	# Neither direct hardcoding nor static linking is supported with a
5405	# broken collect2.
5406	_LT_TAGVAR(hardcode_direct, $1)=unsupported
5407      fi
5408      ;;
5409
5410    aix[[4-9]]*)
5411      if test ia64 = "$host_cpu"; then
5412	# On IA64, the linker does run time linking by default, so we don't
5413	# have to do anything special.
5414	aix_use_runtimelinking=no
5415	exp_sym_flag='-Bexport'
5416	no_entry_flag=
5417      else
5418	# If we're using GNU nm, then we don't want the "-C" option.
5419	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
5420	# Without the "-l" option, or with the "-B" option, AIX nm treats
5421	# weak defined symbols like other global defined symbols, whereas
5422	# GNU nm marks them as "W".
5423	# While the 'weak' keyword is ignored in the Export File, we need
5424	# it in the Import File for the 'aix-soname' feature, so we have
5425	# to replace the "-B" option with "-P" for AIX nm.
5426	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5427	  _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'
5428	else
5429	  _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'
5430	fi
5431	aix_use_runtimelinking=no
5432
5433	# Test if we are trying to use run time linking or normal
5434	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
5435	# have runtime linking enabled, and use it for executables.
5436	# For shared libraries, we enable/disable runtime linking
5437	# depending on the kind of the shared library created -
5438	# when "with_aix_soname,aix_use_runtimelinking" is:
5439	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
5440	# "aix,yes"  lib.so          shared, rtl:yes, for executables
5441	#            lib.a           static archive
5442	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
5443	#            lib.a(lib.so.V) shared, rtl:no,  for executables
5444	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
5445	#            lib.a(lib.so.V) shared, rtl:no
5446	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
5447	#            lib.a           static archive
5448	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5449	  for ld_flag in $LDFLAGS; do
5450	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
5451	    aix_use_runtimelinking=yes
5452	    break
5453	  fi
5454	  done
5455	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
5456	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
5457	    # so we don't have lib.a shared libs to link our executables.
5458	    # We have to force runtime linking in this case.
5459	    aix_use_runtimelinking=yes
5460	    LDFLAGS="$LDFLAGS -Wl,-brtl"
5461	  fi
5462	  ;;
5463	esac
5464
5465	exp_sym_flag='-bexport'
5466	no_entry_flag='-bnoentry'
5467      fi
5468
5469      # When large executables or shared objects are built, AIX ld can
5470      # have problems creating the table of contents.  If linking a library
5471      # or program results in "error TOC overflow" add -mminimal-toc to
5472      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5473      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5474
5475      _LT_TAGVAR(archive_cmds, $1)=''
5476      _LT_TAGVAR(hardcode_direct, $1)=yes
5477      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5478      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5479      _LT_TAGVAR(link_all_deplibs, $1)=yes
5480      _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
5481      case $with_aix_soname,$aix_use_runtimelinking in
5482      aix,*) ;; # traditional, no import file
5483      svr4,* | *,yes) # use import file
5484	# The Import File defines what to hardcode.
5485	_LT_TAGVAR(hardcode_direct, $1)=no
5486	_LT_TAGVAR(hardcode_direct_absolute, $1)=no
5487	;;
5488      esac
5489
5490      if test yes = "$GCC"; then
5491	case $host_os in aix4.[[012]]|aix4.[[012]].*)
5492	# We only want to do this on AIX 4.2 and lower, the check
5493	# below for broken collect2 doesn't work under 4.3+
5494	  collect2name=`$CC -print-prog-name=collect2`
5495	  if test -f "$collect2name" &&
5496	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5497	  then
5498	  # We have reworked collect2
5499	  :
5500	  else
5501	  # We have old collect2
5502	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
5503	  # It fails to find uninstalled libraries when the uninstalled
5504	  # path is not listed in the libpath.  Setting hardcode_minus_L
5505	  # to unsupported forces relinking
5506	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
5507	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5508	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
5509	  fi
5510	  ;;
5511	esac
5512	shared_flag='-shared'
5513	if test yes = "$aix_use_runtimelinking"; then
5514	  shared_flag="$shared_flag "'$wl-G'
5515	fi
5516	# Need to ensure runtime linking is disabled for the traditional
5517	# shared library, or the linker may eventually find shared libraries
5518	# /with/ Import File - we do not want to mix them.
5519	shared_flag_aix='-shared'
5520	shared_flag_svr4='-shared $wl-G'
5521      else
5522	# not using gcc
5523	if test ia64 = "$host_cpu"; then
5524	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5525	# chokes on -Wl,-G. The following line is correct:
5526	  shared_flag='-G'
5527	else
5528	  if test yes = "$aix_use_runtimelinking"; then
5529	    shared_flag='$wl-G'
5530	  else
5531	    shared_flag='$wl-bM:SRE'
5532	  fi
5533	  shared_flag_aix='$wl-bM:SRE'
5534	  shared_flag_svr4='$wl-G'
5535	fi
5536      fi
5537
5538      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
5539      # It seems that -bexpall does not export symbols beginning with
5540      # underscore (_), so it is better to generate a list of symbols to export.
5541      _LT_TAGVAR(always_export_symbols, $1)=yes
5542      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
5543	# Warning - without using the other runtime loading flags (-brtl),
5544	# -berok will link without error, but may produce a broken library.
5545	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5546        # Determine the default libpath from the value encoded in an
5547        # empty executable.
5548        _LT_SYS_MODULE_PATH_AIX([$1])
5549        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
5550        _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
5551      else
5552	if test ia64 = "$host_cpu"; then
5553	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
5554	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5555	  _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"
5556	else
5557	 # Determine the default libpath from the value encoded in an
5558	 # empty executable.
5559	 _LT_SYS_MODULE_PATH_AIX([$1])
5560	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
5561	  # Warning - without using the other run time loading flags,
5562	  # -berok will link without error, but may produce a broken library.
5563	  _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
5564	  _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
5565	  if test yes = "$with_gnu_ld"; then
5566	    # We only use this code for GNU lds that support --whole-archive.
5567	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
5568	  else
5569	    # Exported symbols can be pulled into shared objects from archives
5570	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5571	  fi
5572	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5573	  _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
5574	  # -brtl affects multiple linker settings, -berok does not and is overridden later
5575	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
5576	  if test svr4 != "$with_aix_soname"; then
5577	    # This is similar to how AIX traditionally builds its shared libraries.
5578	    _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'
5579	  fi
5580	  if test aix != "$with_aix_soname"; then
5581	    _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'
5582	  else
5583	    # used by -dlpreopen to get the symbols
5584	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
5585	  fi
5586	  _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
5587	fi
5588      fi
5589      ;;
5590
5591    amigaos*)
5592      case $host_cpu in
5593      powerpc)
5594            # see comment about AmigaOS4 .so support
5595            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5596            _LT_TAGVAR(archive_expsym_cmds, $1)=''
5597        ;;
5598      m68k)
5599            _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)'
5600            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5601            _LT_TAGVAR(hardcode_minus_L, $1)=yes
5602        ;;
5603      esac
5604      ;;
5605
5606    bsdi[[45]]*)
5607      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5608      ;;
5609
5610    cygwin* | mingw* | pw32* | cegcc*)
5611      # When not using gcc, we currently assume that we are using
5612      # Microsoft Visual C++ or Intel C++ Compiler.
5613      # hardcode_libdir_flag_spec is actually meaningless, as there is
5614      # no search path for DLLs.
5615      case $cc_basename in
5616      cl* | icl*)
5617	# Native MSVC or ICC
5618	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5619	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5620	_LT_TAGVAR(always_export_symbols, $1)=yes
5621	_LT_TAGVAR(file_list_spec, $1)='@'
5622	# Tell ltmain to make .lib files, not .a files.
5623	libext=lib
5624	# Tell ltmain to make .dll files, not .so files.
5625	shrext_cmds=.dll
5626	# FIXME: Setting linknames here is a bad hack.
5627	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
5628	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
5629            cp "$export_symbols" "$output_objdir/$soname.def";
5630            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
5631          else
5632            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
5633          fi~
5634          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5635          linknames='
5636	# The linker will not automatically build a static lib if we build a DLL.
5637	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5638	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5639	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5640	_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'
5641	# Don't use ranlib
5642	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
5643	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5644          lt_tool_outputfile="@TOOL_OUTPUT@"~
5645          case $lt_outputfile in
5646            *.exe|*.EXE) ;;
5647            *)
5648              lt_outputfile=$lt_outputfile.exe
5649              lt_tool_outputfile=$lt_tool_outputfile.exe
5650              ;;
5651          esac~
5652          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
5653            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5654            $RM "$lt_outputfile.manifest";
5655          fi'
5656	;;
5657      *)
5658	# Assume MSVC and ICC wrapper
5659	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5660	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5661	# Tell ltmain to make .lib files, not .a files.
5662	libext=lib
5663	# Tell ltmain to make .dll files, not .so files.
5664	shrext_cmds=.dll
5665	# FIXME: Setting linknames here is a bad hack.
5666	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5667	# The linker will automatically build a .lib file if we build a DLL.
5668	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5669	# FIXME: Should let the user specify the lib program.
5670	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5671	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5672	;;
5673      esac
5674      ;;
5675
5676    darwin* | rhapsody*)
5677      _LT_DARWIN_LINKER_FEATURES($1)
5678      ;;
5679
5680    dgux*)
5681      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5682      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5683      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5684      ;;
5685
5686    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5687    # support.  Future versions do this automatically, but an explicit c++rt0.o
5688    # does not break anything, and helps significantly (at the cost of a little
5689    # extra space).
5690    freebsd2.2*)
5691      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5692      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5693      _LT_TAGVAR(hardcode_direct, $1)=yes
5694      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5695      ;;
5696
5697    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5698    freebsd2.*)
5699      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5700      _LT_TAGVAR(hardcode_direct, $1)=yes
5701      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5702      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5703      ;;
5704
5705    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5706    freebsd* | dragonfly* | midnightbsd*)
5707      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5708      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5709      _LT_TAGVAR(hardcode_direct, $1)=yes
5710      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5711      ;;
5712
5713    hpux9*)
5714      if test yes = "$GCC"; then
5715	_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'
5716      else
5717	_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'
5718      fi
5719      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5720      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5721      _LT_TAGVAR(hardcode_direct, $1)=yes
5722
5723      # hardcode_minus_L: Not really in the search PATH,
5724      # but as the default location of the library.
5725      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5726      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5727      ;;
5728
5729    hpux10*)
5730      if test yes,no = "$GCC,$with_gnu_ld"; then
5731	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5732      else
5733	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5734      fi
5735      if test no = "$with_gnu_ld"; then
5736	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5737	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5738	_LT_TAGVAR(hardcode_direct, $1)=yes
5739	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5740	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5741	# hardcode_minus_L: Not really in the search PATH,
5742	# but as the default location of the library.
5743	_LT_TAGVAR(hardcode_minus_L, $1)=yes
5744      fi
5745      ;;
5746
5747    hpux11*)
5748      if test yes,no = "$GCC,$with_gnu_ld"; then
5749	case $host_cpu in
5750	hppa*64*)
5751	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
5752	  ;;
5753	ia64*)
5754	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5755	  ;;
5756	*)
5757	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5758	  ;;
5759	esac
5760      else
5761	case $host_cpu in
5762	hppa*64*)
5763	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
5764	  ;;
5765	ia64*)
5766	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5767	  ;;
5768	*)
5769	m4_if($1, [], [
5770	  # Older versions of the 11.00 compiler do not understand -b yet
5771	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
5772	  _LT_LINKER_OPTION([if $CC understands -b],
5773	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
5774	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
5775	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
5776	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
5777	  ;;
5778	esac
5779      fi
5780      if test no = "$with_gnu_ld"; then
5781	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5782	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5783
5784	case $host_cpu in
5785	hppa*64*|ia64*)
5786	  _LT_TAGVAR(hardcode_direct, $1)=no
5787	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5788	  ;;
5789	*)
5790	  _LT_TAGVAR(hardcode_direct, $1)=yes
5791	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5792	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5793
5794	  # hardcode_minus_L: Not really in the search PATH,
5795	  # but as the default location of the library.
5796	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
5797	  ;;
5798	esac
5799      fi
5800      ;;
5801
5802    irix5* | irix6* | nonstopux*)
5803      if test yes = "$GCC"; then
5804	_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'
5805	# Try to use the -exported_symbol ld option, if it does not
5806	# work, assume that -exports_file does not work either and
5807	# implicitly export all symbols.
5808	# This should be the same for all languages, so no per-tag cache variable.
5809	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
5810	  [lt_cv_irix_exported_symbol],
5811	  [save_LDFLAGS=$LDFLAGS
5812	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
5813	   AC_LINK_IFELSE(
5814	     [AC_LANG_SOURCE(
5815	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
5816			      [C++], [[int foo (void) { return 0; }]],
5817			      [Fortran 77], [[
5818      subroutine foo
5819      end]],
5820			      [Fortran], [[
5821      subroutine foo
5822      end]])])],
5823	      [lt_cv_irix_exported_symbol=yes],
5824	      [lt_cv_irix_exported_symbol=no])
5825           LDFLAGS=$save_LDFLAGS])
5826	if test yes = "$lt_cv_irix_exported_symbol"; then
5827          _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'
5828	fi
5829      else
5830	_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'
5831	_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'
5832      fi
5833      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5834      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5835      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5836      _LT_TAGVAR(inherit_rpath, $1)=yes
5837      _LT_TAGVAR(link_all_deplibs, $1)=yes
5838      ;;
5839
5840    linux*)
5841      case $cc_basename in
5842      tcc*)
5843	# Fabrice Bellard et al's Tiny C Compiler
5844	_LT_TAGVAR(ld_shlibs, $1)=yes
5845	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5846	;;
5847      esac
5848      ;;
5849
5850    netbsd*)
5851      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5852	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5853      else
5854	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5855      fi
5856      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5857      _LT_TAGVAR(hardcode_direct, $1)=yes
5858      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5859      ;;
5860
5861    newsos6)
5862      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5863      _LT_TAGVAR(hardcode_direct, $1)=yes
5864      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5865      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5866      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5867      ;;
5868
5869    *nto* | *qnx*)
5870      ;;
5871
5872    openbsd* | bitrig*)
5873      if test -f /usr/libexec/ld.so; then
5874	_LT_TAGVAR(hardcode_direct, $1)=yes
5875	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5876	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5877	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
5878	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5879	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
5880	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5881	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5882	else
5883	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5884	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5885	fi
5886      else
5887	_LT_TAGVAR(ld_shlibs, $1)=no
5888      fi
5889      ;;
5890
5891    os2*)
5892      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5893      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5894      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5895      shrext_cmds=.dll
5896      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5897	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5898	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5899	$ECHO EXPORTS >> $output_objdir/$libname.def~
5900	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
5901	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5902	emximp -o $lib $output_objdir/$libname.def'
5903      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5904	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5905	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5906	$ECHO EXPORTS >> $output_objdir/$libname.def~
5907	prefix_cmds="$SED"~
5908	if test EXPORTS = "`$SED 1q $export_symbols`"; then
5909	  prefix_cmds="$prefix_cmds -e 1d";
5910	fi~
5911	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
5912	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
5913	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5914	emximp -o $lib $output_objdir/$libname.def'
5915      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
5916      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5917      _LT_TAGVAR(file_list_spec, $1)='@'
5918      ;;
5919
5920    osf3*)
5921      if test yes = "$GCC"; then
5922	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
5923	_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'
5924      else
5925	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5926	_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'
5927      fi
5928      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5929      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5930      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5931      ;;
5932
5933    osf4* | osf5*)	# as osf3* with the addition of -msym flag
5934      if test yes = "$GCC"; then
5935	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
5936	_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'
5937	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5938      else
5939	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5940	_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'
5941	_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~
5942          $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'
5943
5944	# Both c and cxx compiler support -rpath directly
5945	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5946      fi
5947      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5948      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5949      ;;
5950
5951    solaris*)
5952      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5953      if test yes = "$GCC"; then
5954	wlarc='$wl'
5955	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
5956	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5957          $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'
5958      else
5959	case `$CC -V 2>&1` in
5960	*"Compilers 5.0"*)
5961	  wlarc=''
5962	  _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
5963	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5964            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5965	  ;;
5966	*)
5967	  wlarc='$wl'
5968	  _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5969	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5970            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5971	  ;;
5972	esac
5973      fi
5974      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5975      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5976      case $host_os in
5977      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5978      *)
5979	# The compiler driver will combine and reorder linker options,
5980	# but understands '-z linker_flag'.  GCC discards it without '$wl',
5981	# but is careful enough not to reorder.
5982	# Supported since Solaris 2.6 (maybe 2.5.1?)
5983	if test yes = "$GCC"; then
5984	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
5985	else
5986	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5987	fi
5988	;;
5989      esac
5990      _LT_TAGVAR(link_all_deplibs, $1)=yes
5991      ;;
5992
5993    sunos4*)
5994      if test sequent = "$host_vendor"; then
5995	# Use $CC to link under sequent, because it throws in some extra .o
5996	# files that make .init and .fini sections work.
5997	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5998      else
5999	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6000      fi
6001      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6002      _LT_TAGVAR(hardcode_direct, $1)=yes
6003      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6004      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6005      ;;
6006
6007    sysv4)
6008      case $host_vendor in
6009	sni)
6010	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6011	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6012	;;
6013	siemens)
6014	  ## LD is ld it makes a PLAMLIB
6015	  ## CC just makes a GrossModule.
6016	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6017	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6018	  _LT_TAGVAR(hardcode_direct, $1)=no
6019        ;;
6020	motorola)
6021	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6022	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6023	;;
6024      esac
6025      runpath_var='LD_RUN_PATH'
6026      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6027      ;;
6028
6029    sysv4.3*)
6030      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6031      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6032      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6033      ;;
6034
6035    sysv4*MP*)
6036      if test -d /usr/nec; then
6037	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6038	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6039	runpath_var=LD_RUN_PATH
6040	hardcode_runpath_var=yes
6041	_LT_TAGVAR(ld_shlibs, $1)=yes
6042      fi
6043      ;;
6044
6045    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6046      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
6047      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6048      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6049      runpath_var='LD_RUN_PATH'
6050
6051      if test yes = "$GCC"; then
6052	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6053	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6054      else
6055	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6056	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6057      fi
6058      ;;
6059
6060    sysv5* | sco3.2v5* | sco5v6*)
6061      # Note: We CANNOT use -z defs as we might desire, because we do not
6062      # link with -lc, and that would cause any symbols used from libc to
6063      # always be unresolved, which means just about no library would
6064      # ever link correctly.  If we're not using GNU ld we use -z text
6065      # though, which does catch some bad symbols but isn't as heavy-handed
6066      # as -z defs.
6067      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
6068      _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
6069      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6070      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6071      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
6072      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6073      _LT_TAGVAR(link_all_deplibs, $1)=yes
6074      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
6075      runpath_var='LD_RUN_PATH'
6076
6077      if test yes = "$GCC"; then
6078	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6079	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6080      else
6081	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6082	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6083      fi
6084      ;;
6085
6086    uts4*)
6087      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6088      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6089      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6090      ;;
6091
6092    *)
6093      _LT_TAGVAR(ld_shlibs, $1)=no
6094      ;;
6095    esac
6096
6097    if test sni = "$host_vendor"; then
6098      case $host in
6099      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6100	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
6101	;;
6102      esac
6103    fi
6104  fi
6105])
6106AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6107test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
6108
6109_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6110
6111_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6112_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6113_LT_DECL([], [extract_expsyms_cmds], [2],
6114    [The commands to extract the exported symbol list from a shared archive])
6115
6116#
6117# Do we need to explicitly link libc?
6118#
6119case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6120x|xyes)
6121  # Assume -lc should be added
6122  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6123
6124  if test yes,yes = "$GCC,$enable_shared"; then
6125    case $_LT_TAGVAR(archive_cmds, $1) in
6126    *'~'*)
6127      # FIXME: we may have to deal with multi-command sequences.
6128      ;;
6129    '$CC '*)
6130      # Test whether the compiler implicitly links with -lc since on some
6131      # systems, -lgcc has to come before -lc. If gcc already passes -lc
6132      # to ld, don't add -lc before -lgcc.
6133      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
6134	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
6135	[$RM conftest*
6136	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6137
6138	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6139	  soname=conftest
6140	  lib=conftest
6141	  libobjs=conftest.$ac_objext
6142	  deplibs=
6143	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6144	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6145	  compiler_flags=-v
6146	  linker_flags=-v
6147	  verstring=
6148	  output_objdir=.
6149	  libname=conftest
6150	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6151	  _LT_TAGVAR(allow_undefined_flag, $1)=
6152	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6153	  then
6154	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6155	  else
6156	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6157	  fi
6158	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6159	else
6160	  cat conftest.err 1>&5
6161	fi
6162	$RM conftest*
6163	])
6164      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
6165      ;;
6166    esac
6167  fi
6168  ;;
6169esac
6170
6171_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6172    [Whether or not to add -lc for building shared libraries])
6173_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6174    [enable_shared_with_static_runtimes], [0],
6175    [Whether or not to disallow shared libs when runtime libs are static])
6176_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6177    [Compiler flag to allow reflexive dlopens])
6178_LT_TAGDECL([], [whole_archive_flag_spec], [1],
6179    [Compiler flag to generate shared objects directly from archives])
6180_LT_TAGDECL([], [compiler_needs_object], [1],
6181    [Whether the compiler copes with passing no objects directly])
6182_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6183    [Create an old-style archive from a shared archive])
6184_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6185    [Create a temporary old-style archive to link instead of a shared archive])
6186_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6187_LT_TAGDECL([], [archive_expsym_cmds], [2])
6188_LT_TAGDECL([], [module_cmds], [2],
6189    [Commands used to build a loadable module if different from building
6190    a shared archive.])
6191_LT_TAGDECL([], [module_expsym_cmds], [2])
6192_LT_TAGDECL([], [with_gnu_ld], [1],
6193    [Whether we are building with GNU ld or not])
6194_LT_TAGDECL([], [allow_undefined_flag], [1],
6195    [Flag that allows shared libraries with undefined symbols to be built])
6196_LT_TAGDECL([], [no_undefined_flag], [1],
6197    [Flag that enforces no undefined symbols])
6198_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6199    [Flag to hardcode $libdir into a binary during linking.
6200    This must work even if $libdir does not exist])
6201_LT_TAGDECL([], [hardcode_libdir_separator], [1],
6202    [Whether we need a single "-rpath" flag with a separated argument])
6203_LT_TAGDECL([], [hardcode_direct], [0],
6204    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
6205    DIR into the resulting binary])
6206_LT_TAGDECL([], [hardcode_direct_absolute], [0],
6207    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
6208    DIR into the resulting binary and the resulting library dependency is
6209    "absolute", i.e impossible to change by setting $shlibpath_var if the
6210    library is relocated])
6211_LT_TAGDECL([], [hardcode_minus_L], [0],
6212    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6213    into the resulting binary])
6214_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6215    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6216    into the resulting binary])
6217_LT_TAGDECL([], [hardcode_automatic], [0],
6218    [Set to "yes" if building a shared library automatically hardcodes DIR
6219    into the library and all subsequent libraries and executables linked
6220    against it])
6221_LT_TAGDECL([], [inherit_rpath], [0],
6222    [Set to yes if linker adds runtime paths of dependent libraries
6223    to runtime path list])
6224_LT_TAGDECL([], [link_all_deplibs], [0],
6225    [Whether libtool must link a program against all its dependency libraries])
6226_LT_TAGDECL([], [always_export_symbols], [0],
6227    [Set to "yes" if exported symbols are required])
6228_LT_TAGDECL([], [export_symbols_cmds], [2],
6229    [The commands to list exported symbols])
6230_LT_TAGDECL([], [exclude_expsyms], [1],
6231    [Symbols that should not be listed in the preloaded symbols])
6232_LT_TAGDECL([], [include_expsyms], [1],
6233    [Symbols that must always be exported])
6234_LT_TAGDECL([], [prelink_cmds], [2],
6235    [Commands necessary for linking programs (against libraries) with templates])
6236_LT_TAGDECL([], [postlink_cmds], [2],
6237    [Commands necessary for finishing linking programs])
6238_LT_TAGDECL([], [file_list_spec], [1],
6239    [Specify filename containing input files])
6240dnl FIXME: Not yet implemented
6241dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6242dnl    [Compiler flag to generate thread safe objects])
6243])# _LT_LINKER_SHLIBS
6244
6245
6246# _LT_LANG_C_CONFIG([TAG])
6247# ------------------------
6248# Ensure that the configuration variables for a C compiler are suitably
6249# defined.  These variables are subsequently used by _LT_CONFIG to write
6250# the compiler configuration to 'libtool'.
6251m4_defun([_LT_LANG_C_CONFIG],
6252[m4_require([_LT_DECL_EGREP])dnl
6253lt_save_CC=$CC
6254AC_LANG_PUSH(C)
6255
6256# Source file extension for C test sources.
6257ac_ext=c
6258
6259# Object file extension for compiled C test sources.
6260objext=o
6261_LT_TAGVAR(objext, $1)=$objext
6262
6263# Code to be used in simple compile tests
6264lt_simple_compile_test_code="int some_variable = 0;"
6265
6266# Code to be used in simple link tests
6267lt_simple_link_test_code='int main(){return(0);}'
6268
6269_LT_TAG_COMPILER
6270# Save the default compiler, since it gets overwritten when the other
6271# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6272compiler_DEFAULT=$CC
6273
6274# save warnings/boilerplate of simple test code
6275_LT_COMPILER_BOILERPLATE
6276_LT_LINKER_BOILERPLATE
6277
6278if test -n "$compiler"; then
6279  _LT_COMPILER_NO_RTTI($1)
6280  _LT_COMPILER_PIC($1)
6281  _LT_COMPILER_C_O($1)
6282  _LT_COMPILER_FILE_LOCKS($1)
6283  _LT_LINKER_SHLIBS($1)
6284  _LT_SYS_DYNAMIC_LINKER($1)
6285  _LT_LINKER_HARDCODE_LIBPATH($1)
6286  LT_SYS_DLOPEN_SELF
6287  _LT_CMD_STRIPLIB
6288
6289  # Report what library types will actually be built
6290  AC_MSG_CHECKING([if libtool supports shared libraries])
6291  AC_MSG_RESULT([$can_build_shared])
6292
6293  AC_MSG_CHECKING([whether to build shared libraries])
6294  test no = "$can_build_shared" && enable_shared=no
6295
6296  # On AIX, shared libraries and static libraries use the same namespace, and
6297  # are all built from PIC.
6298  case $host_os in
6299  aix3*)
6300    test yes = "$enable_shared" && enable_static=no
6301    if test -n "$RANLIB"; then
6302      archive_cmds="$archive_cmds~\$RANLIB \$lib"
6303      postinstall_cmds='$RANLIB $lib'
6304    fi
6305    ;;
6306
6307  aix[[4-9]]*)
6308    if test ia64 != "$host_cpu"; then
6309      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
6310      yes,aix,yes) ;;			# shared object as lib.so file only
6311      yes,svr4,*) ;;			# shared object as lib.so archive member only
6312      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
6313      esac
6314    fi
6315    ;;
6316  esac
6317  AC_MSG_RESULT([$enable_shared])
6318
6319  AC_MSG_CHECKING([whether to build static libraries])
6320  # Make sure either enable_shared or enable_static is yes.
6321  test yes = "$enable_shared" || enable_static=yes
6322  AC_MSG_RESULT([$enable_static])
6323
6324  _LT_CONFIG($1)
6325fi
6326AC_LANG_POP
6327CC=$lt_save_CC
6328])# _LT_LANG_C_CONFIG
6329
6330
6331# _LT_LANG_CXX_CONFIG([TAG])
6332# --------------------------
6333# Ensure that the configuration variables for a C++ compiler are suitably
6334# defined.  These variables are subsequently used by _LT_CONFIG to write
6335# the compiler configuration to 'libtool'.
6336m4_defun([_LT_LANG_CXX_CONFIG],
6337[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6338m4_require([_LT_DECL_EGREP])dnl
6339m4_require([_LT_PATH_MANIFEST_TOOL])dnl
6340if test -n "$CXX" && ( test no != "$CXX" &&
6341    ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
6342    (test g++ != "$CXX"))); then
6343  AC_PROG_CXXCPP
6344else
6345  _lt_caught_CXX_error=yes
6346fi
6347
6348AC_LANG_PUSH(C++)
6349_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6350_LT_TAGVAR(allow_undefined_flag, $1)=
6351_LT_TAGVAR(always_export_symbols, $1)=no
6352_LT_TAGVAR(archive_expsym_cmds, $1)=
6353_LT_TAGVAR(compiler_needs_object, $1)=no
6354_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6355_LT_TAGVAR(hardcode_direct, $1)=no
6356_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6357_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6358_LT_TAGVAR(hardcode_libdir_separator, $1)=
6359_LT_TAGVAR(hardcode_minus_L, $1)=no
6360_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6361_LT_TAGVAR(hardcode_automatic, $1)=no
6362_LT_TAGVAR(inherit_rpath, $1)=no
6363_LT_TAGVAR(module_cmds, $1)=
6364_LT_TAGVAR(module_expsym_cmds, $1)=
6365_LT_TAGVAR(link_all_deplibs, $1)=unknown
6366_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6367_LT_TAGVAR(reload_flag, $1)=$reload_flag
6368_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
6369_LT_TAGVAR(no_undefined_flag, $1)=
6370_LT_TAGVAR(whole_archive_flag_spec, $1)=
6371_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6372
6373# Source file extension for C++ test sources.
6374ac_ext=cpp
6375
6376# Object file extension for compiled C++ test sources.
6377objext=o
6378_LT_TAGVAR(objext, $1)=$objext
6379
6380# No sense in running all these tests if we already determined that
6381# the CXX compiler isn't working.  Some variables (like enable_shared)
6382# are currently assumed to apply to all compilers on this platform,
6383# and will be corrupted by setting them based on a non-working compiler.
6384if test yes != "$_lt_caught_CXX_error"; then
6385  # Code to be used in simple compile tests
6386  lt_simple_compile_test_code="int some_variable = 0;"
6387
6388  # Code to be used in simple link tests
6389  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6390
6391  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6392  _LT_TAG_COMPILER
6393
6394  # save warnings/boilerplate of simple test code
6395  _LT_COMPILER_BOILERPLATE
6396  _LT_LINKER_BOILERPLATE
6397
6398  # Allow CC to be a program name with arguments.
6399  lt_save_CC=$CC
6400  lt_save_CFLAGS=$CFLAGS
6401  lt_save_LD=$LD
6402  lt_save_GCC=$GCC
6403  GCC=$GXX
6404  lt_save_with_gnu_ld=$with_gnu_ld
6405  lt_save_path_LD=$lt_cv_path_LD
6406  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6407    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6408  else
6409    $as_unset lt_cv_prog_gnu_ld
6410  fi
6411  if test -n "${lt_cv_path_LDCXX+set}"; then
6412    lt_cv_path_LD=$lt_cv_path_LDCXX
6413  else
6414    $as_unset lt_cv_path_LD
6415  fi
6416  test -z "${LDCXX+set}" || LD=$LDCXX
6417  CC=${CXX-"c++"}
6418  CFLAGS=$CXXFLAGS
6419  compiler=$CC
6420  _LT_TAGVAR(compiler, $1)=$CC
6421  _LT_CC_BASENAME([$compiler])
6422
6423  if test -n "$compiler"; then
6424    # We don't want -fno-exception when compiling C++ code, so set the
6425    # no_builtin_flag separately
6426    if test yes = "$GXX"; then
6427      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6428    else
6429      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6430    fi
6431
6432    if test yes = "$GXX"; then
6433      # Set up default GNU C++ configuration
6434
6435      LT_PATH_LD
6436
6437      # Check if GNU C++ uses GNU ld as the underlying linker, since the
6438      # archiving commands below assume that GNU ld is being used.
6439      if test yes = "$with_gnu_ld"; then
6440        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
6441        _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'
6442
6443        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6444        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
6445
6446        # If archive_cmds runs LD, not CC, wlarc should be empty
6447        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6448        #     investigate it a little bit more. (MM)
6449        wlarc='$wl'
6450
6451        # ancient GNU ld didn't support --whole-archive et. al.
6452        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6453	  $GREP 'no-whole-archive' > /dev/null; then
6454          _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
6455        else
6456          _LT_TAGVAR(whole_archive_flag_spec, $1)=
6457        fi
6458      else
6459        with_gnu_ld=no
6460        wlarc=
6461
6462        # A generic and very simple default shared library creation
6463        # command for GNU C++ for the case where it uses the native
6464        # linker, instead of GNU ld.  If possible, this setting should
6465        # overridden to take advantage of the native linker features on
6466        # the platform it is being used on.
6467        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6468      fi
6469
6470      # Commands to make compiler produce verbose output that lists
6471      # what "hidden" libraries, object files and flags are used when
6472      # linking a shared library.
6473      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6474
6475    else
6476      GXX=no
6477      with_gnu_ld=no
6478      wlarc=
6479    fi
6480
6481    # PORTME: fill in a description of your system's C++ link characteristics
6482    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6483    _LT_TAGVAR(ld_shlibs, $1)=yes
6484    case $host_os in
6485      aix3*)
6486        # FIXME: insert proper C++ library support
6487        _LT_TAGVAR(ld_shlibs, $1)=no
6488        ;;
6489      aix[[4-9]]*)
6490        if test ia64 = "$host_cpu"; then
6491          # On IA64, the linker does run time linking by default, so we don't
6492          # have to do anything special.
6493          aix_use_runtimelinking=no
6494          exp_sym_flag='-Bexport'
6495          no_entry_flag=
6496        else
6497          aix_use_runtimelinking=no
6498
6499          # Test if we are trying to use run time linking or normal
6500          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6501          # have runtime linking enabled, and use it for executables.
6502          # For shared libraries, we enable/disable runtime linking
6503          # depending on the kind of the shared library created -
6504          # when "with_aix_soname,aix_use_runtimelinking" is:
6505          # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
6506          # "aix,yes"  lib.so          shared, rtl:yes, for executables
6507          #            lib.a           static archive
6508          # "both,no"  lib.so.V(shr.o) shared, rtl:yes
6509          #            lib.a(lib.so.V) shared, rtl:no,  for executables
6510          # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
6511          #            lib.a(lib.so.V) shared, rtl:no
6512          # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
6513          #            lib.a           static archive
6514          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6515	    for ld_flag in $LDFLAGS; do
6516	      case $ld_flag in
6517	      *-brtl*)
6518	        aix_use_runtimelinking=yes
6519	        break
6520	        ;;
6521	      esac
6522	    done
6523	    if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
6524	      # With aix-soname=svr4, we create the lib.so.V shared archives only,
6525	      # so we don't have lib.a shared libs to link our executables.
6526	      # We have to force runtime linking in this case.
6527	      aix_use_runtimelinking=yes
6528	      LDFLAGS="$LDFLAGS -Wl,-brtl"
6529	    fi
6530	    ;;
6531          esac
6532
6533          exp_sym_flag='-bexport'
6534          no_entry_flag='-bnoentry'
6535        fi
6536
6537        # When large executables or shared objects are built, AIX ld can
6538        # have problems creating the table of contents.  If linking a library
6539        # or program results in "error TOC overflow" add -mminimal-toc to
6540        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6541        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6542
6543        _LT_TAGVAR(archive_cmds, $1)=''
6544        _LT_TAGVAR(hardcode_direct, $1)=yes
6545        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6546        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6547        _LT_TAGVAR(link_all_deplibs, $1)=yes
6548        _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
6549        case $with_aix_soname,$aix_use_runtimelinking in
6550        aix,*) ;;	# no import file
6551        svr4,* | *,yes) # use import file
6552          # The Import File defines what to hardcode.
6553          _LT_TAGVAR(hardcode_direct, $1)=no
6554          _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6555          ;;
6556        esac
6557
6558        if test yes = "$GXX"; then
6559          case $host_os in aix4.[[012]]|aix4.[[012]].*)
6560          # We only want to do this on AIX 4.2 and lower, the check
6561          # below for broken collect2 doesn't work under 4.3+
6562	  collect2name=`$CC -print-prog-name=collect2`
6563	  if test -f "$collect2name" &&
6564	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6565	  then
6566	    # We have reworked collect2
6567	    :
6568	  else
6569	    # We have old collect2
6570	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
6571	    # It fails to find uninstalled libraries when the uninstalled
6572	    # path is not listed in the libpath.  Setting hardcode_minus_L
6573	    # to unsupported forces relinking
6574	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
6575	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6576	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
6577	  fi
6578          esac
6579          shared_flag='-shared'
6580	  if test yes = "$aix_use_runtimelinking"; then
6581	    shared_flag=$shared_flag' $wl-G'
6582	  fi
6583	  # Need to ensure runtime linking is disabled for the traditional
6584	  # shared library, or the linker may eventually find shared libraries
6585	  # /with/ Import File - we do not want to mix them.
6586	  shared_flag_aix='-shared'
6587	  shared_flag_svr4='-shared $wl-G'
6588        else
6589          # not using gcc
6590          if test ia64 = "$host_cpu"; then
6591	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6592	  # chokes on -Wl,-G. The following line is correct:
6593	  shared_flag='-G'
6594          else
6595	    if test yes = "$aix_use_runtimelinking"; then
6596	      shared_flag='$wl-G'
6597	    else
6598	      shared_flag='$wl-bM:SRE'
6599	    fi
6600	    shared_flag_aix='$wl-bM:SRE'
6601	    shared_flag_svr4='$wl-G'
6602          fi
6603        fi
6604
6605        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
6606        # It seems that -bexpall does not export symbols beginning with
6607        # underscore (_), so it is better to generate a list of symbols to
6608	# export.
6609        _LT_TAGVAR(always_export_symbols, $1)=yes
6610	if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
6611          # Warning - without using the other runtime loading flags (-brtl),
6612          # -berok will link without error, but may produce a broken library.
6613          # The "-G" linker flag allows undefined symbols.
6614          _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
6615          # Determine the default libpath from the value encoded in an empty
6616          # executable.
6617          _LT_SYS_MODULE_PATH_AIX([$1])
6618          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
6619
6620          _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
6621        else
6622          if test ia64 = "$host_cpu"; then
6623	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
6624	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6625	    _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"
6626          else
6627	    # Determine the default libpath from the value encoded in an
6628	    # empty executable.
6629	    _LT_SYS_MODULE_PATH_AIX([$1])
6630	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
6631	    # Warning - without using the other run time loading flags,
6632	    # -berok will link without error, but may produce a broken library.
6633	    _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
6634	    _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
6635	    if test yes = "$with_gnu_ld"; then
6636	      # We only use this code for GNU lds that support --whole-archive.
6637	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
6638	    else
6639	      # Exported symbols can be pulled into shared objects from archives
6640	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6641	    fi
6642	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6643	    _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
6644	    # -brtl affects multiple linker settings, -berok does not and is overridden later
6645	    compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
6646	    if test svr4 != "$with_aix_soname"; then
6647	      # This is similar to how AIX traditionally builds its shared
6648	      # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
6649	      _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'
6650	    fi
6651	    if test aix != "$with_aix_soname"; then
6652	      _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'
6653	    else
6654	      # used by -dlpreopen to get the symbols
6655	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
6656	    fi
6657	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
6658          fi
6659        fi
6660        ;;
6661
6662      beos*)
6663	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6664	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6665	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6666	  # support --undefined.  This deserves some investigation.  FIXME
6667	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6668	else
6669	  _LT_TAGVAR(ld_shlibs, $1)=no
6670	fi
6671	;;
6672
6673      chorus*)
6674        case $cc_basename in
6675          *)
6676	  # FIXME: insert proper C++ library support
6677	  _LT_TAGVAR(ld_shlibs, $1)=no
6678	  ;;
6679        esac
6680        ;;
6681
6682      cygwin* | mingw* | pw32* | cegcc*)
6683	case $GXX,$cc_basename in
6684	,cl* | no,cl* | ,icl* | no,icl*)
6685	  # Native MSVC or ICC
6686	  # hardcode_libdir_flag_spec is actually meaningless, as there is
6687	  # no search path for DLLs.
6688	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6689	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6690	  _LT_TAGVAR(always_export_symbols, $1)=yes
6691	  _LT_TAGVAR(file_list_spec, $1)='@'
6692	  # Tell ltmain to make .lib files, not .a files.
6693	  libext=lib
6694	  # Tell ltmain to make .dll files, not .so files.
6695	  shrext_cmds=.dll
6696	  # FIXME: Setting linknames here is a bad hack.
6697	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
6698	  _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
6699              cp "$export_symbols" "$output_objdir/$soname.def";
6700              echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
6701            else
6702              $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
6703            fi~
6704            $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6705            linknames='
6706	  # The linker will not automatically build a static lib if we build a DLL.
6707	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6708	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6709	  # Don't use ranlib
6710	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6711	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6712            lt_tool_outputfile="@TOOL_OUTPUT@"~
6713            case $lt_outputfile in
6714              *.exe|*.EXE) ;;
6715              *)
6716                lt_outputfile=$lt_outputfile.exe
6717                lt_tool_outputfile=$lt_tool_outputfile.exe
6718                ;;
6719            esac~
6720            func_to_tool_file "$lt_outputfile"~
6721            if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
6722              $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6723              $RM "$lt_outputfile.manifest";
6724            fi'
6725	  ;;
6726	*)
6727	  # g++
6728	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6729	  # as there is no search path for DLLs.
6730	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6731	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
6732	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6733	  _LT_TAGVAR(always_export_symbols, $1)=no
6734	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6735
6736	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6737	    _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'
6738	    # If the export-symbols file already is a .def file, use it as
6739	    # is; otherwise, prepend EXPORTS...
6740	    _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
6741              cp $export_symbols $output_objdir/$soname.def;
6742            else
6743              echo EXPORTS > $output_objdir/$soname.def;
6744              cat $export_symbols >> $output_objdir/$soname.def;
6745            fi~
6746            $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'
6747	  else
6748	    _LT_TAGVAR(ld_shlibs, $1)=no
6749	  fi
6750	  ;;
6751	esac
6752	;;
6753      darwin* | rhapsody*)
6754        _LT_DARWIN_LINKER_FEATURES($1)
6755	;;
6756
6757      os2*)
6758	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6759	_LT_TAGVAR(hardcode_minus_L, $1)=yes
6760	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6761	shrext_cmds=.dll
6762	_LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6763	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6764	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6765	  $ECHO EXPORTS >> $output_objdir/$libname.def~
6766	  emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
6767	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6768	  emximp -o $lib $output_objdir/$libname.def'
6769	_LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6770	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6771	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6772	  $ECHO EXPORTS >> $output_objdir/$libname.def~
6773	  prefix_cmds="$SED"~
6774	  if test EXPORTS = "`$SED 1q $export_symbols`"; then
6775	    prefix_cmds="$prefix_cmds -e 1d";
6776	  fi~
6777	  prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
6778	  cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
6779	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6780	  emximp -o $lib $output_objdir/$libname.def'
6781	_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
6782	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6783	_LT_TAGVAR(file_list_spec, $1)='@'
6784	;;
6785
6786      dgux*)
6787        case $cc_basename in
6788          ec++*)
6789	    # FIXME: insert proper C++ library support
6790	    _LT_TAGVAR(ld_shlibs, $1)=no
6791	    ;;
6792          ghcx*)
6793	    # Green Hills C++ Compiler
6794	    # FIXME: insert proper C++ library support
6795	    _LT_TAGVAR(ld_shlibs, $1)=no
6796	    ;;
6797          *)
6798	    # FIXME: insert proper C++ library support
6799	    _LT_TAGVAR(ld_shlibs, $1)=no
6800	    ;;
6801        esac
6802        ;;
6803
6804      freebsd2.*)
6805        # C++ shared libraries reported to be fairly broken before
6806	# switch to ELF
6807        _LT_TAGVAR(ld_shlibs, $1)=no
6808        ;;
6809
6810      freebsd-elf*)
6811        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6812        ;;
6813
6814      freebsd* | dragonfly* | midnightbsd*)
6815        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6816        # conventions
6817        _LT_TAGVAR(ld_shlibs, $1)=yes
6818        ;;
6819
6820      haiku*)
6821        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6822        _LT_TAGVAR(link_all_deplibs, $1)=yes
6823        ;;
6824
6825      hpux9*)
6826        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
6827        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6828        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6829        _LT_TAGVAR(hardcode_direct, $1)=yes
6830        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6831				             # but as the default
6832				             # location of the library.
6833
6834        case $cc_basename in
6835          CC*)
6836            # FIXME: insert proper C++ library support
6837            _LT_TAGVAR(ld_shlibs, $1)=no
6838            ;;
6839          aCC*)
6840            _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'
6841            # Commands to make compiler produce verbose output that lists
6842            # what "hidden" libraries, object files and flags are used when
6843            # linking a shared library.
6844            #
6845            # There doesn't appear to be a way to prevent this compiler from
6846            # explicitly linking system object files so we need to strip them
6847            # from the output so that they don't get included in the library
6848            # dependencies.
6849            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"'
6850            ;;
6851          *)
6852            if test yes = "$GXX"; then
6853              _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'
6854            else
6855              # FIXME: insert proper C++ library support
6856              _LT_TAGVAR(ld_shlibs, $1)=no
6857            fi
6858            ;;
6859        esac
6860        ;;
6861
6862      hpux10*|hpux11*)
6863        if test no = "$with_gnu_ld"; then
6864	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
6865	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6866
6867          case $host_cpu in
6868            hppa*64*|ia64*)
6869              ;;
6870            *)
6871	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6872              ;;
6873          esac
6874        fi
6875        case $host_cpu in
6876          hppa*64*|ia64*)
6877            _LT_TAGVAR(hardcode_direct, $1)=no
6878            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6879            ;;
6880          *)
6881            _LT_TAGVAR(hardcode_direct, $1)=yes
6882            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6883            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6884					         # but as the default
6885					         # location of the library.
6886            ;;
6887        esac
6888
6889        case $cc_basename in
6890          CC*)
6891	    # FIXME: insert proper C++ library support
6892	    _LT_TAGVAR(ld_shlibs, $1)=no
6893	    ;;
6894          aCC*)
6895	    case $host_cpu in
6896	      hppa*64*)
6897	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6898	        ;;
6899	      ia64*)
6900	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6901	        ;;
6902	      *)
6903	        _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'
6904	        ;;
6905	    esac
6906	    # Commands to make compiler produce verbose output that lists
6907	    # what "hidden" libraries, object files and flags are used when
6908	    # linking a shared library.
6909	    #
6910	    # There doesn't appear to be a way to prevent this compiler from
6911	    # explicitly linking system object files so we need to strip them
6912	    # from the output so that they don't get included in the library
6913	    # dependencies.
6914	    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"'
6915	    ;;
6916          *)
6917	    if test yes = "$GXX"; then
6918	      if test no = "$with_gnu_ld"; then
6919	        case $host_cpu in
6920	          hppa*64*)
6921	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6922	            ;;
6923	          ia64*)
6924	            _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'
6925	            ;;
6926	          *)
6927	            _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'
6928	            ;;
6929	        esac
6930	      fi
6931	    else
6932	      # FIXME: insert proper C++ library support
6933	      _LT_TAGVAR(ld_shlibs, $1)=no
6934	    fi
6935	    ;;
6936        esac
6937        ;;
6938
6939      interix[[3-9]]*)
6940	_LT_TAGVAR(hardcode_direct, $1)=no
6941	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6942	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6943	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6944	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6945	# Instead, shared libraries are loaded at an image base (0x10000000 by
6946	# default) and relocated if they conflict, which is a slow very memory
6947	# consuming and fragmenting process.  To avoid this, we pick a random,
6948	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6949	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
6950	_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'
6951	_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'
6952	;;
6953      irix5* | irix6*)
6954        case $cc_basename in
6955          CC*)
6956	    # SGI C++
6957	    _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'
6958
6959	    # Archives containing C++ object files must be created using
6960	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
6961	    # necessary to make sure instantiated templates are included
6962	    # in the archive.
6963	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6964	    ;;
6965          *)
6966	    if test yes = "$GXX"; then
6967	      if test no = "$with_gnu_ld"; then
6968	        _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'
6969	      else
6970	        _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'
6971	      fi
6972	    fi
6973	    _LT_TAGVAR(link_all_deplibs, $1)=yes
6974	    ;;
6975        esac
6976        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6977        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6978        _LT_TAGVAR(inherit_rpath, $1)=yes
6979        ;;
6980
6981      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
6982        case $cc_basename in
6983          KCC*)
6984	    # Kuck and Associates, Inc. (KAI) C++ Compiler
6985
6986	    # KCC will only create a shared library if the output file
6987	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
6988	    # to its proper name (with version) after linking.
6989	    _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'
6990	    _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'
6991	    # Commands to make compiler produce verbose output that lists
6992	    # what "hidden" libraries, object files and flags are used when
6993	    # linking a shared library.
6994	    #
6995	    # There doesn't appear to be a way to prevent this compiler from
6996	    # explicitly linking system object files so we need to strip them
6997	    # from the output so that they don't get included in the library
6998	    # dependencies.
6999	    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"'
7000
7001	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7002	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7003
7004	    # Archives containing C++ object files must be created using
7005	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
7006	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
7007	    ;;
7008	  icpc* | ecpc* )
7009	    # Intel C++
7010	    with_gnu_ld=yes
7011	    # version 8.0 and above of icpc choke on multiply defined symbols
7012	    # if we add $predep_objects and $postdep_objects, however 7.1 and
7013	    # earlier do not add the objects themselves.
7014	    case `$CC -V 2>&1` in
7015	      *"Version 7."*)
7016	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7017		_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'
7018		;;
7019	      *)  # Version 8.0 or newer
7020	        tmp_idyn=
7021	        case $host_cpu in
7022		  ia64*) tmp_idyn=' -i_dynamic';;
7023		esac
7024	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7025		_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'
7026		;;
7027	    esac
7028	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7029	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7030	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7031	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
7032	    ;;
7033          pgCC* | pgcpp*)
7034            # Portland Group C++ compiler
7035	    case `$CC -V` in
7036	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
7037	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7038               rm -rf $tpldir~
7039               $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7040               compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
7041	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7042                rm -rf $tpldir~
7043                $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7044                $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
7045                $RANLIB $oldlib'
7046	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7047                rm -rf $tpldir~
7048                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7049                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7050	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7051                rm -rf $tpldir~
7052                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7053                $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'
7054	      ;;
7055	    *) # Version 6 and above use weak symbols
7056	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7057	      _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'
7058	      ;;
7059	    esac
7060
7061	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
7062	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7063	    _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'
7064            ;;
7065	  cxx*)
7066	    # Compaq C++
7067	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7068	    _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'
7069
7070	    runpath_var=LD_RUN_PATH
7071	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7072	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7073
7074	    # Commands to make compiler produce verbose output that lists
7075	    # what "hidden" libraries, object files and flags are used when
7076	    # linking a shared library.
7077	    #
7078	    # There doesn't appear to be a way to prevent this compiler from
7079	    # explicitly linking system object files so we need to strip them
7080	    # from the output so that they don't get included in the library
7081	    # dependencies.
7082	    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'
7083	    ;;
7084	  xl* | mpixl* | bgxl*)
7085	    # IBM XL 8.0 on PPC, with GNU ld
7086	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7087	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7088	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7089	    if test yes = "$supports_anon_versioning"; then
7090	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7091                cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7092                echo "local: *; };" >> $output_objdir/$libname.ver~
7093                $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
7094	    fi
7095	    ;;
7096	  *)
7097	    case `$CC -V 2>&1 | $SED 5q` in
7098	    *Sun\ C*)
7099	      # Sun C++ 5.9
7100	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7101	      _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7102	      _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'
7103	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7104	      _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'
7105	      _LT_TAGVAR(compiler_needs_object, $1)=yes
7106
7107	      # Not sure whether something based on
7108	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7109	      # would be better.
7110	      output_verbose_link_cmd='func_echo_all'
7111
7112	      # Archives containing C++ object files must be created using
7113	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7114	      # necessary to make sure instantiated templates are included
7115	      # in the archive.
7116	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7117	      ;;
7118	    esac
7119	    ;;
7120	esac
7121	;;
7122
7123      lynxos*)
7124        # FIXME: insert proper C++ library support
7125	_LT_TAGVAR(ld_shlibs, $1)=no
7126	;;
7127
7128      m88k*)
7129        # FIXME: insert proper C++ library support
7130        _LT_TAGVAR(ld_shlibs, $1)=no
7131	;;
7132
7133      mvs*)
7134        case $cc_basename in
7135          cxx*)
7136	    # FIXME: insert proper C++ library support
7137	    _LT_TAGVAR(ld_shlibs, $1)=no
7138	    ;;
7139	  *)
7140	    # FIXME: insert proper C++ library support
7141	    _LT_TAGVAR(ld_shlibs, $1)=no
7142	    ;;
7143	esac
7144	;;
7145
7146      netbsd*)
7147        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7148	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7149	  wlarc=
7150	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7151	  _LT_TAGVAR(hardcode_direct, $1)=yes
7152	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7153	fi
7154	# Workaround some broken pre-1.5 toolchains
7155	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7156	;;
7157
7158      *nto* | *qnx*)
7159        _LT_TAGVAR(ld_shlibs, $1)=yes
7160	;;
7161
7162      openbsd* | bitrig*)
7163	if test -f /usr/libexec/ld.so; then
7164	  _LT_TAGVAR(hardcode_direct, $1)=yes
7165	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7166	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7167	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7168	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7169	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
7170	    _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'
7171	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
7172	    _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
7173	  fi
7174	  output_verbose_link_cmd=func_echo_all
7175	else
7176	  _LT_TAGVAR(ld_shlibs, $1)=no
7177	fi
7178	;;
7179
7180      osf3* | osf4* | osf5*)
7181        case $cc_basename in
7182          KCC*)
7183	    # Kuck and Associates, Inc. (KAI) C++ Compiler
7184
7185	    # KCC will only create a shared library if the output file
7186	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
7187	    # to its proper name (with version) after linking.
7188	    _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'
7189
7190	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7191	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7192
7193	    # Archives containing C++ object files must be created using
7194	    # the KAI C++ compiler.
7195	    case $host in
7196	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7197	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7198	    esac
7199	    ;;
7200          RCC*)
7201	    # Rational C++ 2.4.1
7202	    # FIXME: insert proper C++ library support
7203	    _LT_TAGVAR(ld_shlibs, $1)=no
7204	    ;;
7205          cxx*)
7206	    case $host in
7207	      osf3*)
7208	        _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7209	        _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'
7210	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7211		;;
7212	      *)
7213	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7214	        _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'
7215	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7216                  echo "-hidden">> $lib.exp~
7217                  $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~
7218                  $RM $lib.exp'
7219	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7220		;;
7221	    esac
7222
7223	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7224
7225	    # Commands to make compiler produce verbose output that lists
7226	    # what "hidden" libraries, object files and flags are used when
7227	    # linking a shared library.
7228	    #
7229	    # There doesn't appear to be a way to prevent this compiler from
7230	    # explicitly linking system object files so we need to strip them
7231	    # from the output so that they don't get included in the library
7232	    # dependencies.
7233	    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"'
7234	    ;;
7235	  *)
7236	    if test yes,no = "$GXX,$with_gnu_ld"; then
7237	      _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7238	      case $host in
7239	        osf3*)
7240	          _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'
7241		  ;;
7242	        *)
7243	          _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'
7244		  ;;
7245	      esac
7246
7247	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7248	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7249
7250	      # Commands to make compiler produce verbose output that lists
7251	      # what "hidden" libraries, object files and flags are used when
7252	      # linking a shared library.
7253	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7254
7255	    else
7256	      # FIXME: insert proper C++ library support
7257	      _LT_TAGVAR(ld_shlibs, $1)=no
7258	    fi
7259	    ;;
7260        esac
7261        ;;
7262
7263      psos*)
7264        # FIXME: insert proper C++ library support
7265        _LT_TAGVAR(ld_shlibs, $1)=no
7266        ;;
7267
7268      sunos4*)
7269        case $cc_basename in
7270          CC*)
7271	    # Sun C++ 4.x
7272	    # FIXME: insert proper C++ library support
7273	    _LT_TAGVAR(ld_shlibs, $1)=no
7274	    ;;
7275          lcc*)
7276	    # Lucid
7277	    # FIXME: insert proper C++ library support
7278	    _LT_TAGVAR(ld_shlibs, $1)=no
7279	    ;;
7280          *)
7281	    # FIXME: insert proper C++ library support
7282	    _LT_TAGVAR(ld_shlibs, $1)=no
7283	    ;;
7284        esac
7285        ;;
7286
7287      solaris*)
7288        case $cc_basename in
7289          CC* | sunCC*)
7290	    # Sun C++ 4.2, 5.x and Centerline C++
7291            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7292	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7293	    _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7294	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7295              $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'
7296
7297	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7298	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7299	    case $host_os in
7300	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7301	      *)
7302		# The compiler driver will combine and reorder linker options,
7303		# but understands '-z linker_flag'.
7304	        # Supported since Solaris 2.6 (maybe 2.5.1?)
7305		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7306	        ;;
7307	    esac
7308	    _LT_TAGVAR(link_all_deplibs, $1)=yes
7309
7310	    output_verbose_link_cmd='func_echo_all'
7311
7312	    # Archives containing C++ object files must be created using
7313	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7314	    # necessary to make sure instantiated templates are included
7315	    # in the archive.
7316	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7317	    ;;
7318          gcx*)
7319	    # Green Hills C++ Compiler
7320	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7321
7322	    # The C++ compiler must be used to create the archive.
7323	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7324	    ;;
7325          *)
7326	    # GNU C++ compiler with Solaris linker
7327	    if test yes,no = "$GXX,$with_gnu_ld"; then
7328	      _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
7329	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7330	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7331	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7332                  $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'
7333
7334	        # Commands to make compiler produce verbose output that lists
7335	        # what "hidden" libraries, object files and flags are used when
7336	        # linking a shared library.
7337	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7338	      else
7339	        # g++ 2.7 appears to require '-G' NOT '-shared' on this
7340	        # platform.
7341	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7342	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7343                  $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'
7344
7345	        # Commands to make compiler produce verbose output that lists
7346	        # what "hidden" libraries, object files and flags are used when
7347	        # linking a shared library.
7348	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7349	      fi
7350
7351	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
7352	      case $host_os in
7353		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7354		*)
7355		  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
7356		  ;;
7357	      esac
7358	    fi
7359	    ;;
7360        esac
7361        ;;
7362
7363    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7364      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
7365      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7366      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7367      runpath_var='LD_RUN_PATH'
7368
7369      case $cc_basename in
7370        CC*)
7371	  _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7372	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7373	  ;;
7374	*)
7375	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7376	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7377	  ;;
7378      esac
7379      ;;
7380
7381      sysv5* | sco3.2v5* | sco5v6*)
7382	# Note: We CANNOT use -z defs as we might desire, because we do not
7383	# link with -lc, and that would cause any symbols used from libc to
7384	# always be unresolved, which means just about no library would
7385	# ever link correctly.  If we're not using GNU ld we use -z text
7386	# though, which does catch some bad symbols but isn't as heavy-handed
7387	# as -z defs.
7388	_LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
7389	_LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
7390	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7391	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7392	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
7393	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7394	_LT_TAGVAR(link_all_deplibs, $1)=yes
7395	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
7396	runpath_var='LD_RUN_PATH'
7397
7398	case $cc_basename in
7399          CC*)
7400	    _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7401	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7402	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
7403              '"$_LT_TAGVAR(old_archive_cmds, $1)"
7404	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
7405              '"$_LT_TAGVAR(reload_cmds, $1)"
7406	    ;;
7407	  *)
7408	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7409	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7410	    ;;
7411	esac
7412      ;;
7413
7414      tandem*)
7415        case $cc_basename in
7416          NCC*)
7417	    # NonStop-UX NCC 3.20
7418	    # FIXME: insert proper C++ library support
7419	    _LT_TAGVAR(ld_shlibs, $1)=no
7420	    ;;
7421          *)
7422	    # FIXME: insert proper C++ library support
7423	    _LT_TAGVAR(ld_shlibs, $1)=no
7424	    ;;
7425        esac
7426        ;;
7427
7428      vxworks*)
7429        # FIXME: insert proper C++ library support
7430        _LT_TAGVAR(ld_shlibs, $1)=no
7431        ;;
7432
7433      *)
7434        # FIXME: insert proper C++ library support
7435        _LT_TAGVAR(ld_shlibs, $1)=no
7436        ;;
7437    esac
7438
7439    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7440    test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
7441
7442    _LT_TAGVAR(GCC, $1)=$GXX
7443    _LT_TAGVAR(LD, $1)=$LD
7444
7445    ## CAVEAT EMPTOR:
7446    ## There is no encapsulation within the following macros, do not change
7447    ## the running order or otherwise move them around unless you know exactly
7448    ## what you are doing...
7449    _LT_SYS_HIDDEN_LIBDEPS($1)
7450    _LT_COMPILER_PIC($1)
7451    _LT_COMPILER_C_O($1)
7452    _LT_COMPILER_FILE_LOCKS($1)
7453    _LT_LINKER_SHLIBS($1)
7454    _LT_SYS_DYNAMIC_LINKER($1)
7455    _LT_LINKER_HARDCODE_LIBPATH($1)
7456
7457    _LT_CONFIG($1)
7458  fi # test -n "$compiler"
7459
7460  CC=$lt_save_CC
7461  CFLAGS=$lt_save_CFLAGS
7462  LDCXX=$LD
7463  LD=$lt_save_LD
7464  GCC=$lt_save_GCC
7465  with_gnu_ld=$lt_save_with_gnu_ld
7466  lt_cv_path_LDCXX=$lt_cv_path_LD
7467  lt_cv_path_LD=$lt_save_path_LD
7468  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7469  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7470fi # test yes != "$_lt_caught_CXX_error"
7471
7472AC_LANG_POP
7473])# _LT_LANG_CXX_CONFIG
7474
7475
7476# _LT_FUNC_STRIPNAME_CNF
7477# ----------------------
7478# func_stripname_cnf prefix suffix name
7479# strip PREFIX and SUFFIX off of NAME.
7480# PREFIX and SUFFIX must not contain globbing or regex special
7481# characters, hashes, percent signs, but SUFFIX may contain a leading
7482# dot (in which case that matches only a dot).
7483#
7484# This function is identical to the (non-XSI) version of func_stripname,
7485# except this one can be used by m4 code that may be executed by configure,
7486# rather than the libtool script.
7487m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
7488AC_REQUIRE([_LT_DECL_SED])
7489AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
7490func_stripname_cnf ()
7491{
7492  case @S|@2 in
7493  .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
7494  *)  func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
7495  esac
7496} # func_stripname_cnf
7497])# _LT_FUNC_STRIPNAME_CNF
7498
7499
7500# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7501# ---------------------------------
7502# Figure out "hidden" library dependencies from verbose
7503# compiler output when linking a shared library.
7504# Parse the compiler output and extract the necessary
7505# objects, libraries and library flags.
7506m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7507[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7508AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
7509# Dependencies to place before and after the object being linked:
7510_LT_TAGVAR(predep_objects, $1)=
7511_LT_TAGVAR(postdep_objects, $1)=
7512_LT_TAGVAR(predeps, $1)=
7513_LT_TAGVAR(postdeps, $1)=
7514_LT_TAGVAR(compiler_lib_search_path, $1)=
7515
7516dnl we can't use the lt_simple_compile_test_code here,
7517dnl because it contains code intended for an executable,
7518dnl not a library.  It's possible we should let each
7519dnl tag define a new lt_????_link_test_code variable,
7520dnl but it's only used here...
7521m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7522int a;
7523void foo (void) { a = 0; }
7524_LT_EOF
7525], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7526class Foo
7527{
7528public:
7529  Foo (void) { a = 0; }
7530private:
7531  int a;
7532};
7533_LT_EOF
7534], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7535      subroutine foo
7536      implicit none
7537      integer*4 a
7538      a=0
7539      return
7540      end
7541_LT_EOF
7542], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7543      subroutine foo
7544      implicit none
7545      integer a
7546      a=0
7547      return
7548      end
7549_LT_EOF
7550], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7551public class foo {
7552  private int a;
7553  public void bar (void) {
7554    a = 0;
7555  }
7556};
7557_LT_EOF
7558], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
7559package foo
7560func foo() {
7561}
7562_LT_EOF
7563])
7564
7565_lt_libdeps_save_CFLAGS=$CFLAGS
7566case "$CC $CFLAGS " in #(
7567*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
7568*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
7569*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
7570esac
7571
7572dnl Parse the compiler output and extract the necessary
7573dnl objects, libraries and library flags.
7574if AC_TRY_EVAL(ac_compile); then
7575  # Parse the compiler output and extract the necessary
7576  # objects, libraries and library flags.
7577
7578  # Sentinel used to keep track of whether or not we are before
7579  # the conftest object file.
7580  pre_test_object_deps_done=no
7581
7582  for p in `eval "$output_verbose_link_cmd"`; do
7583    case $prev$p in
7584
7585    -L* | -R* | -l*)
7586       # Some compilers place space between "-{L,R}" and the path.
7587       # Remove the space.
7588       if test x-L = "$p" ||
7589          test x-R = "$p"; then
7590	 prev=$p
7591	 continue
7592       fi
7593
7594       # Expand the sysroot to ease extracting the directories later.
7595       if test -z "$prev"; then
7596         case $p in
7597         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
7598         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
7599         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
7600         esac
7601       fi
7602       case $p in
7603       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
7604       esac
7605       if test no = "$pre_test_object_deps_done"; then
7606	 case $prev in
7607	 -L | -R)
7608	   # Internal compiler library paths should come after those
7609	   # provided the user.  The postdeps already come after the
7610	   # user supplied libs so there is no need to process them.
7611	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7612	     _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
7613	   else
7614	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
7615	   fi
7616	   ;;
7617	 # The "-l" case would never come before the object being
7618	 # linked, so don't bother handling this case.
7619	 esac
7620       else
7621	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7622	   _LT_TAGVAR(postdeps, $1)=$prev$p
7623	 else
7624	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
7625	 fi
7626       fi
7627       prev=
7628       ;;
7629
7630    *.lto.$objext) ;; # Ignore GCC LTO objects
7631    *.$objext)
7632       # This assumes that the test object file only shows up
7633       # once in the compiler output.
7634       if test "$p" = "conftest.$objext"; then
7635	 pre_test_object_deps_done=yes
7636	 continue
7637       fi
7638
7639       if test no = "$pre_test_object_deps_done"; then
7640	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7641	   _LT_TAGVAR(predep_objects, $1)=$p
7642	 else
7643	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7644	 fi
7645       else
7646	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7647	   _LT_TAGVAR(postdep_objects, $1)=$p
7648	 else
7649	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7650	 fi
7651       fi
7652       ;;
7653
7654    *) ;; # Ignore the rest.
7655
7656    esac
7657  done
7658
7659  # Clean up.
7660  rm -f a.out a.exe
7661else
7662  echo "libtool.m4: error: problem compiling $1 test program"
7663fi
7664
7665$RM -f confest.$objext
7666CFLAGS=$_lt_libdeps_save_CFLAGS
7667
7668# PORTME: override above test on systems where it is broken
7669m4_if([$1], [CXX],
7670[case $host_os in
7671interix[[3-9]]*)
7672  # Interix 3.5 installs completely hosed .la files for C++, so rather than
7673  # hack all around it, let's just trust "g++" to DTRT.
7674  _LT_TAGVAR(predep_objects,$1)=
7675  _LT_TAGVAR(postdep_objects,$1)=
7676  _LT_TAGVAR(postdeps,$1)=
7677  ;;
7678esac
7679])
7680
7681case " $_LT_TAGVAR(postdeps, $1) " in
7682*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7683esac
7684 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7685if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7686 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
7687fi
7688_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7689    [The directories searched by this compiler when creating a shared library])
7690_LT_TAGDECL([], [predep_objects], [1],
7691    [Dependencies to place before and after the objects being linked to
7692    create a shared library])
7693_LT_TAGDECL([], [postdep_objects], [1])
7694_LT_TAGDECL([], [predeps], [1])
7695_LT_TAGDECL([], [postdeps], [1])
7696_LT_TAGDECL([], [compiler_lib_search_path], [1],
7697    [The library search path used internally by the compiler when linking
7698    a shared library])
7699])# _LT_SYS_HIDDEN_LIBDEPS
7700
7701
7702# _LT_LANG_F77_CONFIG([TAG])
7703# --------------------------
7704# Ensure that the configuration variables for a Fortran 77 compiler are
7705# suitably defined.  These variables are subsequently used by _LT_CONFIG
7706# to write the compiler configuration to 'libtool'.
7707m4_defun([_LT_LANG_F77_CONFIG],
7708[AC_LANG_PUSH(Fortran 77)
7709if test -z "$F77" || test no = "$F77"; then
7710  _lt_disable_F77=yes
7711fi
7712
7713_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7714_LT_TAGVAR(allow_undefined_flag, $1)=
7715_LT_TAGVAR(always_export_symbols, $1)=no
7716_LT_TAGVAR(archive_expsym_cmds, $1)=
7717_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7718_LT_TAGVAR(hardcode_direct, $1)=no
7719_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7720_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7721_LT_TAGVAR(hardcode_libdir_separator, $1)=
7722_LT_TAGVAR(hardcode_minus_L, $1)=no
7723_LT_TAGVAR(hardcode_automatic, $1)=no
7724_LT_TAGVAR(inherit_rpath, $1)=no
7725_LT_TAGVAR(module_cmds, $1)=
7726_LT_TAGVAR(module_expsym_cmds, $1)=
7727_LT_TAGVAR(link_all_deplibs, $1)=unknown
7728_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7729_LT_TAGVAR(reload_flag, $1)=$reload_flag
7730_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7731_LT_TAGVAR(no_undefined_flag, $1)=
7732_LT_TAGVAR(whole_archive_flag_spec, $1)=
7733_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7734
7735# Source file extension for f77 test sources.
7736ac_ext=f
7737
7738# Object file extension for compiled f77 test sources.
7739objext=o
7740_LT_TAGVAR(objext, $1)=$objext
7741
7742# No sense in running all these tests if we already determined that
7743# the F77 compiler isn't working.  Some variables (like enable_shared)
7744# are currently assumed to apply to all compilers on this platform,
7745# and will be corrupted by setting them based on a non-working compiler.
7746if test yes != "$_lt_disable_F77"; then
7747  # Code to be used in simple compile tests
7748  lt_simple_compile_test_code="\
7749      subroutine t
7750      return
7751      end
7752"
7753
7754  # Code to be used in simple link tests
7755  lt_simple_link_test_code="\
7756      program t
7757      end
7758"
7759
7760  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7761  _LT_TAG_COMPILER
7762
7763  # save warnings/boilerplate of simple test code
7764  _LT_COMPILER_BOILERPLATE
7765  _LT_LINKER_BOILERPLATE
7766
7767  # Allow CC to be a program name with arguments.
7768  lt_save_CC=$CC
7769  lt_save_GCC=$GCC
7770  lt_save_CFLAGS=$CFLAGS
7771  CC=${F77-"f77"}
7772  CFLAGS=$FFLAGS
7773  compiler=$CC
7774  _LT_TAGVAR(compiler, $1)=$CC
7775  _LT_CC_BASENAME([$compiler])
7776  GCC=$G77
7777  if test -n "$compiler"; then
7778    AC_MSG_CHECKING([if libtool supports shared libraries])
7779    AC_MSG_RESULT([$can_build_shared])
7780
7781    AC_MSG_CHECKING([whether to build shared libraries])
7782    test no = "$can_build_shared" && enable_shared=no
7783
7784    # On AIX, shared libraries and static libraries use the same namespace, and
7785    # are all built from PIC.
7786    case $host_os in
7787      aix3*)
7788        test yes = "$enable_shared" && enable_static=no
7789        if test -n "$RANLIB"; then
7790          archive_cmds="$archive_cmds~\$RANLIB \$lib"
7791          postinstall_cmds='$RANLIB $lib'
7792        fi
7793        ;;
7794      aix[[4-9]]*)
7795	if test ia64 != "$host_cpu"; then
7796	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
7797	  yes,aix,yes) ;;		# shared object as lib.so file only
7798	  yes,svr4,*) ;;		# shared object as lib.so archive member only
7799	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
7800	  esac
7801	fi
7802        ;;
7803    esac
7804    AC_MSG_RESULT([$enable_shared])
7805
7806    AC_MSG_CHECKING([whether to build static libraries])
7807    # Make sure either enable_shared or enable_static is yes.
7808    test yes = "$enable_shared" || enable_static=yes
7809    AC_MSG_RESULT([$enable_static])
7810
7811    _LT_TAGVAR(GCC, $1)=$G77
7812    _LT_TAGVAR(LD, $1)=$LD
7813
7814    ## CAVEAT EMPTOR:
7815    ## There is no encapsulation within the following macros, do not change
7816    ## the running order or otherwise move them around unless you know exactly
7817    ## what you are doing...
7818    _LT_COMPILER_PIC($1)
7819    _LT_COMPILER_C_O($1)
7820    _LT_COMPILER_FILE_LOCKS($1)
7821    _LT_LINKER_SHLIBS($1)
7822    _LT_SYS_DYNAMIC_LINKER($1)
7823    _LT_LINKER_HARDCODE_LIBPATH($1)
7824
7825    _LT_CONFIG($1)
7826  fi # test -n "$compiler"
7827
7828  GCC=$lt_save_GCC
7829  CC=$lt_save_CC
7830  CFLAGS=$lt_save_CFLAGS
7831fi # test yes != "$_lt_disable_F77"
7832
7833AC_LANG_POP
7834])# _LT_LANG_F77_CONFIG
7835
7836
7837# _LT_LANG_FC_CONFIG([TAG])
7838# -------------------------
7839# Ensure that the configuration variables for a Fortran compiler are
7840# suitably defined.  These variables are subsequently used by _LT_CONFIG
7841# to write the compiler configuration to 'libtool'.
7842m4_defun([_LT_LANG_FC_CONFIG],
7843[AC_LANG_PUSH(Fortran)
7844
7845if test -z "$FC" || test no = "$FC"; then
7846  _lt_disable_FC=yes
7847fi
7848
7849_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7850_LT_TAGVAR(allow_undefined_flag, $1)=
7851_LT_TAGVAR(always_export_symbols, $1)=no
7852_LT_TAGVAR(archive_expsym_cmds, $1)=
7853_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7854_LT_TAGVAR(hardcode_direct, $1)=no
7855_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7856_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7857_LT_TAGVAR(hardcode_libdir_separator, $1)=
7858_LT_TAGVAR(hardcode_minus_L, $1)=no
7859_LT_TAGVAR(hardcode_automatic, $1)=no
7860_LT_TAGVAR(inherit_rpath, $1)=no
7861_LT_TAGVAR(module_cmds, $1)=
7862_LT_TAGVAR(module_expsym_cmds, $1)=
7863_LT_TAGVAR(link_all_deplibs, $1)=unknown
7864_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7865_LT_TAGVAR(reload_flag, $1)=$reload_flag
7866_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7867_LT_TAGVAR(no_undefined_flag, $1)=
7868_LT_TAGVAR(whole_archive_flag_spec, $1)=
7869_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7870
7871# Source file extension for fc test sources.
7872ac_ext=${ac_fc_srcext-f}
7873
7874# Object file extension for compiled fc test sources.
7875objext=o
7876_LT_TAGVAR(objext, $1)=$objext
7877
7878# No sense in running all these tests if we already determined that
7879# the FC compiler isn't working.  Some variables (like enable_shared)
7880# are currently assumed to apply to all compilers on this platform,
7881# and will be corrupted by setting them based on a non-working compiler.
7882if test yes != "$_lt_disable_FC"; then
7883  # Code to be used in simple compile tests
7884  lt_simple_compile_test_code="\
7885      subroutine t
7886      return
7887      end
7888"
7889
7890  # Code to be used in simple link tests
7891  lt_simple_link_test_code="\
7892      program t
7893      end
7894"
7895
7896  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7897  _LT_TAG_COMPILER
7898
7899  # save warnings/boilerplate of simple test code
7900  _LT_COMPILER_BOILERPLATE
7901  _LT_LINKER_BOILERPLATE
7902
7903  # Allow CC to be a program name with arguments.
7904  lt_save_CC=$CC
7905  lt_save_GCC=$GCC
7906  lt_save_CFLAGS=$CFLAGS
7907  CC=${FC-"f95"}
7908  CFLAGS=$FCFLAGS
7909  compiler=$CC
7910  GCC=$ac_cv_fc_compiler_gnu
7911
7912  _LT_TAGVAR(compiler, $1)=$CC
7913  _LT_CC_BASENAME([$compiler])
7914
7915  if test -n "$compiler"; then
7916    AC_MSG_CHECKING([if libtool supports shared libraries])
7917    AC_MSG_RESULT([$can_build_shared])
7918
7919    AC_MSG_CHECKING([whether to build shared libraries])
7920    test no = "$can_build_shared" && enable_shared=no
7921
7922    # On AIX, shared libraries and static libraries use the same namespace, and
7923    # are all built from PIC.
7924    case $host_os in
7925      aix3*)
7926        test yes = "$enable_shared" && enable_static=no
7927        if test -n "$RANLIB"; then
7928          archive_cmds="$archive_cmds~\$RANLIB \$lib"
7929          postinstall_cmds='$RANLIB $lib'
7930        fi
7931        ;;
7932      aix[[4-9]]*)
7933	if test ia64 != "$host_cpu"; then
7934	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
7935	  yes,aix,yes) ;;		# shared object as lib.so file only
7936	  yes,svr4,*) ;;		# shared object as lib.so archive member only
7937	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
7938	  esac
7939	fi
7940        ;;
7941    esac
7942    AC_MSG_RESULT([$enable_shared])
7943
7944    AC_MSG_CHECKING([whether to build static libraries])
7945    # Make sure either enable_shared or enable_static is yes.
7946    test yes = "$enable_shared" || enable_static=yes
7947    AC_MSG_RESULT([$enable_static])
7948
7949    _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
7950    _LT_TAGVAR(LD, $1)=$LD
7951
7952    ## CAVEAT EMPTOR:
7953    ## There is no encapsulation within the following macros, do not change
7954    ## the running order or otherwise move them around unless you know exactly
7955    ## what you are doing...
7956    _LT_SYS_HIDDEN_LIBDEPS($1)
7957    _LT_COMPILER_PIC($1)
7958    _LT_COMPILER_C_O($1)
7959    _LT_COMPILER_FILE_LOCKS($1)
7960    _LT_LINKER_SHLIBS($1)
7961    _LT_SYS_DYNAMIC_LINKER($1)
7962    _LT_LINKER_HARDCODE_LIBPATH($1)
7963
7964    _LT_CONFIG($1)
7965  fi # test -n "$compiler"
7966
7967  GCC=$lt_save_GCC
7968  CC=$lt_save_CC
7969  CFLAGS=$lt_save_CFLAGS
7970fi # test yes != "$_lt_disable_FC"
7971
7972AC_LANG_POP
7973])# _LT_LANG_FC_CONFIG
7974
7975
7976# _LT_LANG_GCJ_CONFIG([TAG])
7977# --------------------------
7978# Ensure that the configuration variables for the GNU Java Compiler compiler
7979# are suitably defined.  These variables are subsequently used by _LT_CONFIG
7980# to write the compiler configuration to 'libtool'.
7981m4_defun([_LT_LANG_GCJ_CONFIG],
7982[AC_REQUIRE([LT_PROG_GCJ])dnl
7983AC_LANG_SAVE
7984
7985# Source file extension for Java test sources.
7986ac_ext=java
7987
7988# Object file extension for compiled Java test sources.
7989objext=o
7990_LT_TAGVAR(objext, $1)=$objext
7991
7992# Code to be used in simple compile tests
7993lt_simple_compile_test_code="class foo {}"
7994
7995# Code to be used in simple link tests
7996lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7997
7998# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7999_LT_TAG_COMPILER
8000
8001# save warnings/boilerplate of simple test code
8002_LT_COMPILER_BOILERPLATE
8003_LT_LINKER_BOILERPLATE
8004
8005# Allow CC to be a program name with arguments.
8006lt_save_CC=$CC
8007lt_save_CFLAGS=$CFLAGS
8008lt_save_GCC=$GCC
8009GCC=yes
8010CC=${GCJ-"gcj"}
8011CFLAGS=$GCJFLAGS
8012compiler=$CC
8013_LT_TAGVAR(compiler, $1)=$CC
8014_LT_TAGVAR(LD, $1)=$LD
8015_LT_CC_BASENAME([$compiler])
8016
8017# GCJ did not exist at the time GCC didn't implicitly link libc in.
8018_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8019
8020_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8021_LT_TAGVAR(reload_flag, $1)=$reload_flag
8022_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8023
8024if test -n "$compiler"; then
8025  _LT_COMPILER_NO_RTTI($1)
8026  _LT_COMPILER_PIC($1)
8027  _LT_COMPILER_C_O($1)
8028  _LT_COMPILER_FILE_LOCKS($1)
8029  _LT_LINKER_SHLIBS($1)
8030  _LT_LINKER_HARDCODE_LIBPATH($1)
8031
8032  _LT_CONFIG($1)
8033fi
8034
8035AC_LANG_RESTORE
8036
8037GCC=$lt_save_GCC
8038CC=$lt_save_CC
8039CFLAGS=$lt_save_CFLAGS
8040])# _LT_LANG_GCJ_CONFIG
8041
8042
8043# _LT_LANG_GO_CONFIG([TAG])
8044# --------------------------
8045# Ensure that the configuration variables for the GNU Go compiler
8046# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8047# to write the compiler configuration to 'libtool'.
8048m4_defun([_LT_LANG_GO_CONFIG],
8049[AC_REQUIRE([LT_PROG_GO])dnl
8050AC_LANG_SAVE
8051
8052# Source file extension for Go test sources.
8053ac_ext=go
8054
8055# Object file extension for compiled Go test sources.
8056objext=o
8057_LT_TAGVAR(objext, $1)=$objext
8058
8059# Code to be used in simple compile tests
8060lt_simple_compile_test_code="package main; func main() { }"
8061
8062# Code to be used in simple link tests
8063lt_simple_link_test_code='package main; func main() { }'
8064
8065# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8066_LT_TAG_COMPILER
8067
8068# save warnings/boilerplate of simple test code
8069_LT_COMPILER_BOILERPLATE
8070_LT_LINKER_BOILERPLATE
8071
8072# Allow CC to be a program name with arguments.
8073lt_save_CC=$CC
8074lt_save_CFLAGS=$CFLAGS
8075lt_save_GCC=$GCC
8076GCC=yes
8077CC=${GOC-"gccgo"}
8078CFLAGS=$GOFLAGS
8079compiler=$CC
8080_LT_TAGVAR(compiler, $1)=$CC
8081_LT_TAGVAR(LD, $1)=$LD
8082_LT_CC_BASENAME([$compiler])
8083
8084# Go did not exist at the time GCC didn't implicitly link libc in.
8085_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8086
8087_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8088_LT_TAGVAR(reload_flag, $1)=$reload_flag
8089_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8090
8091if test -n "$compiler"; then
8092  _LT_COMPILER_NO_RTTI($1)
8093  _LT_COMPILER_PIC($1)
8094  _LT_COMPILER_C_O($1)
8095  _LT_COMPILER_FILE_LOCKS($1)
8096  _LT_LINKER_SHLIBS($1)
8097  _LT_LINKER_HARDCODE_LIBPATH($1)
8098
8099  _LT_CONFIG($1)
8100fi
8101
8102AC_LANG_RESTORE
8103
8104GCC=$lt_save_GCC
8105CC=$lt_save_CC
8106CFLAGS=$lt_save_CFLAGS
8107])# _LT_LANG_GO_CONFIG
8108
8109
8110# _LT_LANG_RC_CONFIG([TAG])
8111# -------------------------
8112# Ensure that the configuration variables for the Windows resource compiler
8113# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8114# to write the compiler configuration to 'libtool'.
8115m4_defun([_LT_LANG_RC_CONFIG],
8116[AC_REQUIRE([LT_PROG_RC])dnl
8117AC_LANG_SAVE
8118
8119# Source file extension for RC test sources.
8120ac_ext=rc
8121
8122# Object file extension for compiled RC test sources.
8123objext=o
8124_LT_TAGVAR(objext, $1)=$objext
8125
8126# Code to be used in simple compile tests
8127lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8128
8129# Code to be used in simple link tests
8130lt_simple_link_test_code=$lt_simple_compile_test_code
8131
8132# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8133_LT_TAG_COMPILER
8134
8135# save warnings/boilerplate of simple test code
8136_LT_COMPILER_BOILERPLATE
8137_LT_LINKER_BOILERPLATE
8138
8139# Allow CC to be a program name with arguments.
8140lt_save_CC=$CC
8141lt_save_CFLAGS=$CFLAGS
8142lt_save_GCC=$GCC
8143GCC=
8144CC=${RC-"windres"}
8145CFLAGS=
8146compiler=$CC
8147_LT_TAGVAR(compiler, $1)=$CC
8148_LT_CC_BASENAME([$compiler])
8149_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8150
8151if test -n "$compiler"; then
8152  :
8153  _LT_CONFIG($1)
8154fi
8155
8156GCC=$lt_save_GCC
8157AC_LANG_RESTORE
8158CC=$lt_save_CC
8159CFLAGS=$lt_save_CFLAGS
8160])# _LT_LANG_RC_CONFIG
8161
8162
8163# LT_PROG_GCJ
8164# -----------
8165AC_DEFUN([LT_PROG_GCJ],
8166[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8167  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8168    [AC_CHECK_TOOL(GCJ, gcj,)
8169      test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
8170      AC_SUBST(GCJFLAGS)])])[]dnl
8171])
8172
8173# Old name:
8174AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8175dnl aclocal-1.4 backwards compatibility:
8176dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8177
8178
8179# LT_PROG_GO
8180# ----------
8181AC_DEFUN([LT_PROG_GO],
8182[AC_CHECK_TOOL(GOC, gccgo,)
8183])
8184
8185
8186# LT_PROG_RC
8187# ----------
8188AC_DEFUN([LT_PROG_RC],
8189[AC_CHECK_TOOL(RC, windres,)
8190])
8191
8192# Old name:
8193AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8194dnl aclocal-1.4 backwards compatibility:
8195dnl AC_DEFUN([LT_AC_PROG_RC], [])
8196
8197
8198# _LT_DECL_EGREP
8199# --------------
8200# If we don't have a new enough Autoconf to choose the best grep
8201# available, choose the one first in the user's PATH.
8202m4_defun([_LT_DECL_EGREP],
8203[AC_REQUIRE([AC_PROG_EGREP])dnl
8204AC_REQUIRE([AC_PROG_FGREP])dnl
8205test -z "$GREP" && GREP=grep
8206_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8207_LT_DECL([], [EGREP], [1], [An ERE matcher])
8208_LT_DECL([], [FGREP], [1], [A literal string matcher])
8209dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8210AC_SUBST([GREP])
8211])
8212
8213
8214# _LT_DECL_OBJDUMP
8215# --------------
8216# If we don't have a new enough Autoconf to choose the best objdump
8217# available, choose the one first in the user's PATH.
8218m4_defun([_LT_DECL_OBJDUMP],
8219[AC_CHECK_TOOL(OBJDUMP, objdump, false)
8220test -z "$OBJDUMP" && OBJDUMP=objdump
8221_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8222AC_SUBST([OBJDUMP])
8223])
8224
8225# _LT_DECL_DLLTOOL
8226# ----------------
8227# Ensure DLLTOOL variable is set.
8228m4_defun([_LT_DECL_DLLTOOL],
8229[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8230test -z "$DLLTOOL" && DLLTOOL=dlltool
8231_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
8232AC_SUBST([DLLTOOL])
8233])
8234
8235# _LT_DECL_FILECMD
8236# ----------------
8237# Check for a file(cmd) program that can be used to detect file type and magic
8238m4_defun([_LT_DECL_FILECMD],
8239[AC_CHECK_TOOL([FILECMD], [file], [:])
8240_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types])
8241])# _LD_DECL_FILECMD
8242
8243# _LT_DECL_SED
8244# ------------
8245# Check for a fully-functional sed program, that truncates
8246# as few characters as possible.  Prefer GNU sed if found.
8247m4_defun([_LT_DECL_SED],
8248[AC_PROG_SED
8249test -z "$SED" && SED=sed
8250Xsed="$SED -e 1s/^X//"
8251_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8252_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8253    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8254])# _LT_DECL_SED
8255
8256m4_ifndef([AC_PROG_SED], [
8257# NOTE: This macro has been submitted for inclusion into   #
8258#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
8259#  a released version of Autoconf we should remove this    #
8260#  macro and use it instead.                               #
8261
8262m4_defun([AC_PROG_SED],
8263[AC_MSG_CHECKING([for a sed that does not truncate output])
8264AC_CACHE_VAL(lt_cv_path_SED,
8265[# Loop through the user's path and test for sed and gsed.
8266# Then use that list of sed's as ones to test for truncation.
8267as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8268for as_dir in $PATH
8269do
8270  IFS=$as_save_IFS
8271  test -z "$as_dir" && as_dir=.
8272  for lt_ac_prog in sed gsed; do
8273    for ac_exec_ext in '' $ac_executable_extensions; do
8274      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8275        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8276      fi
8277    done
8278  done
8279done
8280IFS=$as_save_IFS
8281lt_ac_max=0
8282lt_ac_count=0
8283# Add /usr/xpg4/bin/sed as it is typically found on Solaris
8284# along with /bin/sed that truncates output.
8285for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8286  test ! -f "$lt_ac_sed" && continue
8287  cat /dev/null > conftest.in
8288  lt_ac_count=0
8289  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8290  # Check for GNU sed and select it if it is found.
8291  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8292    lt_cv_path_SED=$lt_ac_sed
8293    break
8294  fi
8295  while true; do
8296    cat conftest.in conftest.in >conftest.tmp
8297    mv conftest.tmp conftest.in
8298    cp conftest.in conftest.nl
8299    echo >>conftest.nl
8300    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8301    cmp -s conftest.out conftest.nl || break
8302    # 10000 chars as input seems more than enough
8303    test 10 -lt "$lt_ac_count" && break
8304    lt_ac_count=`expr $lt_ac_count + 1`
8305    if test "$lt_ac_count" -gt "$lt_ac_max"; then
8306      lt_ac_max=$lt_ac_count
8307      lt_cv_path_SED=$lt_ac_sed
8308    fi
8309  done
8310done
8311])
8312SED=$lt_cv_path_SED
8313AC_SUBST([SED])
8314AC_MSG_RESULT([$SED])
8315])#AC_PROG_SED
8316])#m4_ifndef
8317
8318# Old name:
8319AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8320dnl aclocal-1.4 backwards compatibility:
8321dnl AC_DEFUN([LT_AC_PROG_SED], [])
8322
8323
8324# _LT_CHECK_SHELL_FEATURES
8325# ------------------------
8326# Find out whether the shell is Bourne or XSI compatible,
8327# or has some other useful features.
8328m4_defun([_LT_CHECK_SHELL_FEATURES],
8329[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8330  lt_unset=unset
8331else
8332  lt_unset=false
8333fi
8334_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8335
8336# test EBCDIC or ASCII
8337case `echo X|tr X '\101'` in
8338 A) # ASCII based system
8339    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8340  lt_SP2NL='tr \040 \012'
8341  lt_NL2SP='tr \015\012 \040\040'
8342  ;;
8343 *) # EBCDIC based system
8344  lt_SP2NL='tr \100 \n'
8345  lt_NL2SP='tr \r\n \100\100'
8346  ;;
8347esac
8348_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8349_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8350])# _LT_CHECK_SHELL_FEATURES
8351
8352
8353# _LT_PATH_CONVERSION_FUNCTIONS
8354# -----------------------------
8355# Determine what file name conversion functions should be used by
8356# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
8357# for certain cross-compile configurations and native mingw.
8358m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
8359[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8360AC_REQUIRE([AC_CANONICAL_BUILD])dnl
8361AC_MSG_CHECKING([how to convert $build file names to $host format])
8362AC_CACHE_VAL(lt_cv_to_host_file_cmd,
8363[case $host in
8364  *-*-mingw* )
8365    case $build in
8366      *-*-mingw* ) # actually msys
8367        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8368        ;;
8369      *-*-cygwin* )
8370        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8371        ;;
8372      * ) # otherwise, assume *nix
8373        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8374        ;;
8375    esac
8376    ;;
8377  *-*-cygwin* )
8378    case $build in
8379      *-*-mingw* ) # actually msys
8380        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8381        ;;
8382      *-*-cygwin* )
8383        lt_cv_to_host_file_cmd=func_convert_file_noop
8384        ;;
8385      * ) # otherwise, assume *nix
8386        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8387        ;;
8388    esac
8389    ;;
8390  * ) # unhandled hosts (and "normal" native builds)
8391    lt_cv_to_host_file_cmd=func_convert_file_noop
8392    ;;
8393esac
8394])
8395to_host_file_cmd=$lt_cv_to_host_file_cmd
8396AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
8397_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
8398         [0], [convert $build file names to $host format])dnl
8399
8400AC_MSG_CHECKING([how to convert $build file names to toolchain format])
8401AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
8402[#assume ordinary cross tools, or native build.
8403lt_cv_to_tool_file_cmd=func_convert_file_noop
8404case $host in
8405  *-*-mingw* )
8406    case $build in
8407      *-*-mingw* ) # actually msys
8408        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8409        ;;
8410    esac
8411    ;;
8412esac
8413])
8414to_tool_file_cmd=$lt_cv_to_tool_file_cmd
8415AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
8416_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
8417         [0], [convert $build files to toolchain format])dnl
8418])# _LT_PATH_CONVERSION_FUNCTIONS
8419
8420# Helper functions for option handling.                    -*- Autoconf -*-
8421#
8422#   Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free
8423#   Software Foundation, Inc.
8424#   Written by Gary V. Vaughan, 2004
8425#
8426# This file is free software; the Free Software Foundation gives
8427# unlimited permission to copy and/or distribute it, with or without
8428# modifications, as long as this notice is preserved.
8429
8430# serial 8 ltoptions.m4
8431
8432# This is to help aclocal find these macros, as it can't see m4_define.
8433AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
8434
8435
8436# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
8437# ------------------------------------------
8438m4_define([_LT_MANGLE_OPTION],
8439[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
8440
8441
8442# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
8443# ---------------------------------------
8444# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
8445# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
8446# saved as a flag.
8447m4_define([_LT_SET_OPTION],
8448[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
8449m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
8450        _LT_MANGLE_DEFUN([$1], [$2]),
8451    [m4_warning([Unknown $1 option '$2'])])[]dnl
8452])
8453
8454
8455# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
8456# ------------------------------------------------------------
8457# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8458m4_define([_LT_IF_OPTION],
8459[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
8460
8461
8462# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
8463# -------------------------------------------------------
8464# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
8465# are set.
8466m4_define([_LT_UNLESS_OPTIONS],
8467[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8468	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
8469		      [m4_define([$0_found])])])[]dnl
8470m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
8471])[]dnl
8472])
8473
8474
8475# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
8476# ----------------------------------------
8477# OPTION-LIST is a space-separated list of Libtool options associated
8478# with MACRO-NAME.  If any OPTION has a matching handler declared with
8479# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
8480# the unknown option and exit.
8481m4_defun([_LT_SET_OPTIONS],
8482[# Set options
8483m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8484    [_LT_SET_OPTION([$1], _LT_Option)])
8485
8486m4_if([$1],[LT_INIT],[
8487  dnl
8488  dnl Simply set some default values (i.e off) if boolean options were not
8489  dnl specified:
8490  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
8491  ])
8492  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
8493  ])
8494  dnl
8495  dnl If no reference was made to various pairs of opposing options, then
8496  dnl we run the default mode handler for the pair.  For example, if neither
8497  dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
8498  dnl archives by default:
8499  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
8500  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
8501  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
8502  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
8503		   [_LT_ENABLE_FAST_INSTALL])
8504  _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
8505		   [_LT_WITH_AIX_SONAME([aix])])
8506  ])
8507])# _LT_SET_OPTIONS
8508
8509
8510
8511# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
8512# -----------------------------------------
8513m4_define([_LT_MANGLE_DEFUN],
8514[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
8515
8516
8517# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
8518# -----------------------------------------------
8519m4_define([LT_OPTION_DEFINE],
8520[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
8521])# LT_OPTION_DEFINE
8522
8523
8524# dlopen
8525# ------
8526LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
8527])
8528
8529AU_DEFUN([AC_LIBTOOL_DLOPEN],
8530[_LT_SET_OPTION([LT_INIT], [dlopen])
8531AC_DIAGNOSE([obsolete],
8532[$0: Remove this warning and the call to _LT_SET_OPTION when you
8533put the 'dlopen' option into LT_INIT's first parameter.])
8534])
8535
8536dnl aclocal-1.4 backwards compatibility:
8537dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
8538
8539
8540# win32-dll
8541# ---------
8542# Declare package support for building win32 dll's.
8543LT_OPTION_DEFINE([LT_INIT], [win32-dll],
8544[enable_win32_dll=yes
8545
8546case $host in
8547*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
8548  AC_CHECK_TOOL(AS, as, false)
8549  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8550  AC_CHECK_TOOL(OBJDUMP, objdump, false)
8551  ;;
8552esac
8553
8554test -z "$AS" && AS=as
8555_LT_DECL([], [AS],      [1], [Assembler program])dnl
8556
8557test -z "$DLLTOOL" && DLLTOOL=dlltool
8558_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
8559
8560test -z "$OBJDUMP" && OBJDUMP=objdump
8561_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
8562])# win32-dll
8563
8564AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
8565[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8566_LT_SET_OPTION([LT_INIT], [win32-dll])
8567AC_DIAGNOSE([obsolete],
8568[$0: Remove this warning and the call to _LT_SET_OPTION when you
8569put the 'win32-dll' option into LT_INIT's first parameter.])
8570])
8571
8572dnl aclocal-1.4 backwards compatibility:
8573dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
8574
8575
8576# _LT_ENABLE_SHARED([DEFAULT])
8577# ----------------------------
8578# implement the --enable-shared flag, and supports the 'shared' and
8579# 'disable-shared' LT_INIT options.
8580# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
8581m4_define([_LT_ENABLE_SHARED],
8582[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
8583AC_ARG_ENABLE([shared],
8584    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
8585	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
8586    [p=${PACKAGE-default}
8587    case $enableval in
8588    yes) enable_shared=yes ;;
8589    no) enable_shared=no ;;
8590    *)
8591      enable_shared=no
8592      # Look at the argument we got.  We use all the common list separators.
8593      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
8594      for pkg in $enableval; do
8595	IFS=$lt_save_ifs
8596	if test "X$pkg" = "X$p"; then
8597	  enable_shared=yes
8598	fi
8599      done
8600      IFS=$lt_save_ifs
8601      ;;
8602    esac],
8603    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
8604
8605    _LT_DECL([build_libtool_libs], [enable_shared], [0],
8606	[Whether or not to build shared libraries])
8607])# _LT_ENABLE_SHARED
8608
8609LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
8610LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
8611
8612# Old names:
8613AC_DEFUN([AC_ENABLE_SHARED],
8614[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
8615])
8616
8617AC_DEFUN([AC_DISABLE_SHARED],
8618[_LT_SET_OPTION([LT_INIT], [disable-shared])
8619])
8620
8621AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
8622AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
8623
8624dnl aclocal-1.4 backwards compatibility:
8625dnl AC_DEFUN([AM_ENABLE_SHARED], [])
8626dnl AC_DEFUN([AM_DISABLE_SHARED], [])
8627
8628
8629
8630# _LT_ENABLE_STATIC([DEFAULT])
8631# ----------------------------
8632# implement the --enable-static flag, and support the 'static' and
8633# 'disable-static' LT_INIT options.
8634# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
8635m4_define([_LT_ENABLE_STATIC],
8636[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
8637AC_ARG_ENABLE([static],
8638    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
8639	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
8640    [p=${PACKAGE-default}
8641    case $enableval in
8642    yes) enable_static=yes ;;
8643    no) enable_static=no ;;
8644    *)
8645     enable_static=no
8646      # Look at the argument we got.  We use all the common list separators.
8647      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
8648      for pkg in $enableval; do
8649	IFS=$lt_save_ifs
8650	if test "X$pkg" = "X$p"; then
8651	  enable_static=yes
8652	fi
8653      done
8654      IFS=$lt_save_ifs
8655      ;;
8656    esac],
8657    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
8658
8659    _LT_DECL([build_old_libs], [enable_static], [0],
8660	[Whether or not to build static libraries])
8661])# _LT_ENABLE_STATIC
8662
8663LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
8664LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
8665
8666# Old names:
8667AC_DEFUN([AC_ENABLE_STATIC],
8668[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
8669])
8670
8671AC_DEFUN([AC_DISABLE_STATIC],
8672[_LT_SET_OPTION([LT_INIT], [disable-static])
8673])
8674
8675AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
8676AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
8677
8678dnl aclocal-1.4 backwards compatibility:
8679dnl AC_DEFUN([AM_ENABLE_STATIC], [])
8680dnl AC_DEFUN([AM_DISABLE_STATIC], [])
8681
8682
8683
8684# _LT_ENABLE_FAST_INSTALL([DEFAULT])
8685# ----------------------------------
8686# implement the --enable-fast-install flag, and support the 'fast-install'
8687# and 'disable-fast-install' LT_INIT options.
8688# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
8689m4_define([_LT_ENABLE_FAST_INSTALL],
8690[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
8691AC_ARG_ENABLE([fast-install],
8692    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
8693    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
8694    [p=${PACKAGE-default}
8695    case $enableval in
8696    yes) enable_fast_install=yes ;;
8697    no) enable_fast_install=no ;;
8698    *)
8699      enable_fast_install=no
8700      # Look at the argument we got.  We use all the common list separators.
8701      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
8702      for pkg in $enableval; do
8703	IFS=$lt_save_ifs
8704	if test "X$pkg" = "X$p"; then
8705	  enable_fast_install=yes
8706	fi
8707      done
8708      IFS=$lt_save_ifs
8709      ;;
8710    esac],
8711    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
8712
8713_LT_DECL([fast_install], [enable_fast_install], [0],
8714	 [Whether or not to optimize for fast installation])dnl
8715])# _LT_ENABLE_FAST_INSTALL
8716
8717LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
8718LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
8719
8720# Old names:
8721AU_DEFUN([AC_ENABLE_FAST_INSTALL],
8722[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
8723AC_DIAGNOSE([obsolete],
8724[$0: Remove this warning and the call to _LT_SET_OPTION when you put
8725the 'fast-install' option into LT_INIT's first parameter.])
8726])
8727
8728AU_DEFUN([AC_DISABLE_FAST_INSTALL],
8729[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
8730AC_DIAGNOSE([obsolete],
8731[$0: Remove this warning and the call to _LT_SET_OPTION when you put
8732the 'disable-fast-install' option into LT_INIT's first parameter.])
8733])
8734
8735dnl aclocal-1.4 backwards compatibility:
8736dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
8737dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
8738
8739
8740# _LT_WITH_AIX_SONAME([DEFAULT])
8741# ----------------------------------
8742# implement the --with-aix-soname flag, and support the `aix-soname=aix'
8743# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
8744# is either `aix', `both' or `svr4'.  If omitted, it defaults to `aix'.
8745m4_define([_LT_WITH_AIX_SONAME],
8746[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
8747shared_archive_member_spec=
8748case $host,$enable_shared in
8749power*-*-aix[[5-9]]*,yes)
8750  AC_MSG_CHECKING([which variant of shared library versioning to provide])
8751  AC_ARG_WITH([aix-soname],
8752    [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
8753      [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
8754    [case $withval in
8755    aix|svr4|both)
8756      ;;
8757    *)
8758      AC_MSG_ERROR([Unknown argument to --with-aix-soname])
8759      ;;
8760    esac
8761    lt_cv_with_aix_soname=$with_aix_soname],
8762    [AC_CACHE_VAL([lt_cv_with_aix_soname],
8763      [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
8764    with_aix_soname=$lt_cv_with_aix_soname])
8765  AC_MSG_RESULT([$with_aix_soname])
8766  if test aix != "$with_aix_soname"; then
8767    # For the AIX way of multilib, we name the shared archive member
8768    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
8769    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
8770    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
8771    # the AIX toolchain works better with OBJECT_MODE set (default 32).
8772    if test 64 = "${OBJECT_MODE-32}"; then
8773      shared_archive_member_spec=shr_64
8774    else
8775      shared_archive_member_spec=shr
8776    fi
8777  fi
8778  ;;
8779*)
8780  with_aix_soname=aix
8781  ;;
8782esac
8783
8784_LT_DECL([], [shared_archive_member_spec], [0],
8785    [Shared archive member basename, for filename based shared library versioning on AIX])dnl
8786])# _LT_WITH_AIX_SONAME
8787
8788LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
8789LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
8790LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
8791
8792
8793# _LT_WITH_PIC([MODE])
8794# --------------------
8795# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
8796# LT_INIT options.
8797# MODE is either 'yes' or 'no'.  If omitted, it defaults to 'both'.
8798m4_define([_LT_WITH_PIC],
8799[AC_ARG_WITH([pic],
8800    [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
8801	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
8802    [lt_p=${PACKAGE-default}
8803    case $withval in
8804    yes|no) pic_mode=$withval ;;
8805    *)
8806      pic_mode=default
8807      # Look at the argument we got.  We use all the common list separators.
8808      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
8809      for lt_pkg in $withval; do
8810	IFS=$lt_save_ifs
8811	if test "X$lt_pkg" = "X$lt_p"; then
8812	  pic_mode=yes
8813	fi
8814      done
8815      IFS=$lt_save_ifs
8816      ;;
8817    esac],
8818    [pic_mode=m4_default([$1], [default])])
8819
8820_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
8821])# _LT_WITH_PIC
8822
8823LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
8824LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
8825
8826# Old name:
8827AU_DEFUN([AC_LIBTOOL_PICMODE],
8828[_LT_SET_OPTION([LT_INIT], [pic-only])
8829AC_DIAGNOSE([obsolete],
8830[$0: Remove this warning and the call to _LT_SET_OPTION when you
8831put the 'pic-only' option into LT_INIT's first parameter.])
8832])
8833
8834dnl aclocal-1.4 backwards compatibility:
8835dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
8836
8837
8838m4_define([_LTDL_MODE], [])
8839LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
8840		 [m4_define([_LTDL_MODE], [nonrecursive])])
8841LT_OPTION_DEFINE([LTDL_INIT], [recursive],
8842		 [m4_define([_LTDL_MODE], [recursive])])
8843LT_OPTION_DEFINE([LTDL_INIT], [subproject],
8844		 [m4_define([_LTDL_MODE], [subproject])])
8845
8846m4_define([_LTDL_TYPE], [])
8847LT_OPTION_DEFINE([LTDL_INIT], [installable],
8848		 [m4_define([_LTDL_TYPE], [installable])])
8849LT_OPTION_DEFINE([LTDL_INIT], [convenience],
8850		 [m4_define([_LTDL_TYPE], [convenience])])
8851
8852# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
8853#
8854# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software
8855# Foundation, Inc.
8856# Written by Gary V. Vaughan, 2004
8857#
8858# This file is free software; the Free Software Foundation gives
8859# unlimited permission to copy and/or distribute it, with or without
8860# modifications, as long as this notice is preserved.
8861
8862# serial 6 ltsugar.m4
8863
8864# This is to help aclocal find these macros, as it can't see m4_define.
8865AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
8866
8867
8868# lt_join(SEP, ARG1, [ARG2...])
8869# -----------------------------
8870# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
8871# associated separator.
8872# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
8873# versions in m4sugar had bugs.
8874m4_define([lt_join],
8875[m4_if([$#], [1], [],
8876       [$#], [2], [[$2]],
8877       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
8878m4_define([_lt_join],
8879[m4_if([$#$2], [2], [],
8880       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
8881
8882
8883# lt_car(LIST)
8884# lt_cdr(LIST)
8885# ------------
8886# Manipulate m4 lists.
8887# These macros are necessary as long as will still need to support
8888# Autoconf-2.59, which quotes differently.
8889m4_define([lt_car], [[$1]])
8890m4_define([lt_cdr],
8891[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
8892       [$#], 1, [],
8893       [m4_dquote(m4_shift($@))])])
8894m4_define([lt_unquote], $1)
8895
8896
8897# lt_append(MACRO-NAME, STRING, [SEPARATOR])
8898# ------------------------------------------
8899# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
8900# Note that neither SEPARATOR nor STRING are expanded; they are appended
8901# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
8902# No SEPARATOR is output if MACRO-NAME was previously undefined (different
8903# than defined and empty).
8904#
8905# This macro is needed until we can rely on Autoconf 2.62, since earlier
8906# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
8907m4_define([lt_append],
8908[m4_define([$1],
8909	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
8910
8911
8912
8913# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
8914# ----------------------------------------------------------
8915# Produce a SEP delimited list of all paired combinations of elements of
8916# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
8917# has the form PREFIXmINFIXSUFFIXn.
8918# Needed until we can rely on m4_combine added in Autoconf 2.62.
8919m4_define([lt_combine],
8920[m4_if(m4_eval([$# > 3]), [1],
8921       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
8922[[m4_foreach([_Lt_prefix], [$2],
8923	     [m4_foreach([_Lt_suffix],
8924		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
8925	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
8926
8927
8928# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
8929# -----------------------------------------------------------------------
8930# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
8931# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
8932m4_define([lt_if_append_uniq],
8933[m4_ifdef([$1],
8934	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
8935		 [lt_append([$1], [$2], [$3])$4],
8936		 [$5])],
8937	  [lt_append([$1], [$2], [$3])$4])])
8938
8939
8940# lt_dict_add(DICT, KEY, VALUE)
8941# -----------------------------
8942m4_define([lt_dict_add],
8943[m4_define([$1($2)], [$3])])
8944
8945
8946# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
8947# --------------------------------------------
8948m4_define([lt_dict_add_subkey],
8949[m4_define([$1($2:$3)], [$4])])
8950
8951
8952# lt_dict_fetch(DICT, KEY, [SUBKEY])
8953# ----------------------------------
8954m4_define([lt_dict_fetch],
8955[m4_ifval([$3],
8956	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
8957    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
8958
8959
8960# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
8961# -----------------------------------------------------------------
8962m4_define([lt_if_dict_fetch],
8963[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
8964	[$5],
8965    [$6])])
8966
8967
8968# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
8969# --------------------------------------------------------------
8970m4_define([lt_dict_filter],
8971[m4_if([$5], [], [],
8972  [lt_join(m4_quote(m4_default([$4], [[, ]])),
8973           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
8974		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
8975])
8976
8977# ltversion.m4 -- version numbers			-*- Autoconf -*-
8978#
8979#   Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation,
8980#   Inc.
8981#   Written by Scott James Remnant, 2004
8982#
8983# This file is free software; the Free Software Foundation gives
8984# unlimited permission to copy and/or distribute it, with or without
8985# modifications, as long as this notice is preserved.
8986
8987# @configure_input@
8988
8989# serial 4245 ltversion.m4
8990# This file is part of GNU Libtool
8991
8992m4_define([LT_PACKAGE_VERSION], [2.4.7])
8993m4_define([LT_PACKAGE_REVISION], [2.4.7])
8994
8995AC_DEFUN([LTVERSION_VERSION],
8996[macro_version='2.4.7'
8997macro_revision='2.4.7'
8998_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
8999_LT_DECL(, macro_revision, 0)
9000])
9001
9002# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
9003#
9004#   Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free
9005#   Software Foundation, Inc.
9006#   Written by Scott James Remnant, 2004.
9007#
9008# This file is free software; the Free Software Foundation gives
9009# unlimited permission to copy and/or distribute it, with or without
9010# modifications, as long as this notice is preserved.
9011
9012# serial 5 lt~obsolete.m4
9013
9014# These exist entirely to fool aclocal when bootstrapping libtool.
9015#
9016# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
9017# which have later been changed to m4_define as they aren't part of the
9018# exported API, or moved to Autoconf or Automake where they belong.
9019#
9020# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
9021# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
9022# using a macro with the same name in our local m4/libtool.m4 it'll
9023# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
9024# and doesn't know about Autoconf macros at all.)
9025#
9026# So we provide this file, which has a silly filename so it's always
9027# included after everything else.  This provides aclocal with the
9028# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
9029# because those macros already exist, or will be overwritten later.
9030# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
9031#
9032# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
9033# Yes, that means every name once taken will need to remain here until
9034# we give up compatibility with versions before 1.7, at which point
9035# we need to keep only those names which we still refer to.
9036
9037# This is to help aclocal find these macros, as it can't see m4_define.
9038AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9039
9040m4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9041m4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
9042m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9043m4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
9044m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9045m4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
9046m4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
9047m4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9048m4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
9049m4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
9050m4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
9051m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9052m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9053m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9054m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9055m4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9056m4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
9057m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9058m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9059m4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
9060m4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
9061m4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9062m4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9063m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9064m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9065m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9066m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9067m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9068m4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
9069m4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
9070m4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
9071m4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9072m4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9073m4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
9074m4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
9075m4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9076m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9077m4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
9078m4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9079m4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
9080m4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
9081m4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
9082m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9083m4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9084m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9085m4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9086m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9087m4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9088m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9089m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9090m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9091m4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9092m4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
9093m4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9094m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],	[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
9095m4_ifndef([_LT_AC_PROG_CXXCPP],		[AC_DEFUN([_LT_AC_PROG_CXXCPP])])
9096m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],	[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
9097m4_ifndef([_LT_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
9098m4_ifndef([_LT_PROG_F77],		[AC_DEFUN([_LT_PROG_F77])])
9099m4_ifndef([_LT_PROG_FC],		[AC_DEFUN([_LT_PROG_FC])])
9100m4_ifndef([_LT_PROG_CXX],		[AC_DEFUN([_LT_PROG_CXX])])
9101
9102# pkg.m4 - Macros to locate and utilise pkg-config.   -*- Autoconf -*-
9103# serial 11 (pkg-config-0.29.1)
9104
9105dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
9106dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
9107dnl
9108dnl This program is free software; you can redistribute it and/or modify
9109dnl it under the terms of the GNU General Public License as published by
9110dnl the Free Software Foundation; either version 2 of the License, or
9111dnl (at your option) any later version.
9112dnl
9113dnl This program is distributed in the hope that it will be useful, but
9114dnl WITHOUT ANY WARRANTY; without even the implied warranty of
9115dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9116dnl General Public License for more details.
9117dnl
9118dnl You should have received a copy of the GNU General Public License
9119dnl along with this program; if not, write to the Free Software
9120dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
9121dnl 02111-1307, USA.
9122dnl
9123dnl As a special exception to the GNU General Public License, if you
9124dnl distribute this file as part of a program that contains a
9125dnl configuration script generated by Autoconf, you may include it under
9126dnl the same distribution terms that you use for the rest of that
9127dnl program.
9128
9129dnl PKG_PREREQ(MIN-VERSION)
9130dnl -----------------------
9131dnl Since: 0.29
9132dnl
9133dnl Verify that the version of the pkg-config macros are at least
9134dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
9135dnl installed version of pkg-config, this checks the developer's version
9136dnl of pkg.m4 when generating configure.
9137dnl
9138dnl To ensure that this macro is defined, also add:
9139dnl m4_ifndef([PKG_PREREQ],
9140dnl     [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
9141dnl
9142dnl See the "Since" comment for each macro you use to see what version
9143dnl of the macros you require.
9144m4_defun([PKG_PREREQ],
9145[m4_define([PKG_MACROS_VERSION], [0.29.1])
9146m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
9147    [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
9148])dnl PKG_PREREQ
9149
9150dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
9151dnl ----------------------------------
9152dnl Since: 0.16
9153dnl
9154dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
9155dnl first found in the path. Checks that the version of pkg-config found
9156dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
9157dnl used since that's the first version where most current features of
9158dnl pkg-config existed.
9159AC_DEFUN([PKG_PROG_PKG_CONFIG],
9160[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
9161m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
9162m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
9163AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
9164AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
9165AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
9166
9167if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9168	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
9169fi
9170if test -n "$PKG_CONFIG"; then
9171	_pkg_min_version=m4_default([$1], [0.9.0])
9172	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
9173	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9174		AC_MSG_RESULT([yes])
9175	else
9176		AC_MSG_RESULT([no])
9177		PKG_CONFIG=""
9178	fi
9179fi[]dnl
9180])dnl PKG_PROG_PKG_CONFIG
9181
9182dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
9183dnl -------------------------------------------------------------------
9184dnl Since: 0.18
9185dnl
9186dnl Check to see whether a particular set of modules exists. Similar to
9187dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
9188dnl
9189dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9190dnl only at the first occurence in configure.ac, so if the first place
9191dnl it's called might be skipped (such as if it is within an "if", you
9192dnl have to call PKG_CHECK_EXISTS manually
9193AC_DEFUN([PKG_CHECK_EXISTS],
9194[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9195if test -n "$PKG_CONFIG" && \
9196    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
9197  m4_default([$2], [:])
9198m4_ifvaln([$3], [else
9199  $3])dnl
9200fi])
9201
9202dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
9203dnl ---------------------------------------------
9204dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
9205dnl pkg_failed based on the result.
9206m4_define([_PKG_CONFIG],
9207[if test -n "$$1"; then
9208    pkg_cv_[]$1="$$1"
9209 elif test -n "$PKG_CONFIG"; then
9210    PKG_CHECK_EXISTS([$3],
9211                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
9212		      test "x$?" != "x0" && pkg_failed=yes ],
9213		     [pkg_failed=yes])
9214 else
9215    pkg_failed=untried
9216fi[]dnl
9217])dnl _PKG_CONFIG
9218
9219dnl _PKG_SHORT_ERRORS_SUPPORTED
9220dnl ---------------------------
9221dnl Internal check to see if pkg-config supports short errors.
9222AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
9223[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9224if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9225        _pkg_short_errors_supported=yes
9226else
9227        _pkg_short_errors_supported=no
9228fi[]dnl
9229])dnl _PKG_SHORT_ERRORS_SUPPORTED
9230
9231
9232dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
9233dnl   [ACTION-IF-NOT-FOUND])
9234dnl --------------------------------------------------------------
9235dnl Since: 0.4.0
9236dnl
9237dnl Note that if there is a possibility the first call to
9238dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
9239dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
9240AC_DEFUN([PKG_CHECK_MODULES],
9241[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9242AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
9243AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
9244
9245pkg_failed=no
9246AC_MSG_CHECKING([for $1])
9247
9248_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
9249_PKG_CONFIG([$1][_LIBS], [libs], [$2])
9250
9251m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
9252and $1[]_LIBS to avoid the need to call pkg-config.
9253See the pkg-config man page for more details.])
9254
9255if test $pkg_failed = yes; then
9256   	AC_MSG_RESULT([no])
9257        _PKG_SHORT_ERRORS_SUPPORTED
9258        if test $_pkg_short_errors_supported = yes; then
9259	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
9260        else 
9261	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
9262        fi
9263	# Put the nasty error message in config.log where it belongs
9264	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
9265
9266	m4_default([$4], [AC_MSG_ERROR(
9267[Package requirements ($2) were not met:
9268
9269$$1_PKG_ERRORS
9270
9271Consider adjusting the PKG_CONFIG_PATH environment variable if you
9272installed software in a non-standard prefix.
9273
9274_PKG_TEXT])[]dnl
9275        ])
9276elif test $pkg_failed = untried; then
9277     	AC_MSG_RESULT([no])
9278	m4_default([$4], [AC_MSG_FAILURE(
9279[The pkg-config script could not be found or is too old.  Make sure it
9280is in your PATH or set the PKG_CONFIG environment variable to the full
9281path to pkg-config.
9282
9283_PKG_TEXT
9284
9285To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
9286        ])
9287else
9288	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
9289	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
9290        AC_MSG_RESULT([yes])
9291	$3
9292fi[]dnl
9293])dnl PKG_CHECK_MODULES
9294
9295
9296dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
9297dnl   [ACTION-IF-NOT-FOUND])
9298dnl ---------------------------------------------------------------------
9299dnl Since: 0.29
9300dnl
9301dnl Checks for existence of MODULES and gathers its build flags with
9302dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
9303dnl and VARIABLE-PREFIX_LIBS from --libs.
9304dnl
9305dnl Note that if there is a possibility the first call to
9306dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
9307dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
9308dnl configure.ac.
9309AC_DEFUN([PKG_CHECK_MODULES_STATIC],
9310[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9311_save_PKG_CONFIG=$PKG_CONFIG
9312PKG_CONFIG="$PKG_CONFIG --static"
9313PKG_CHECK_MODULES($@)
9314PKG_CONFIG=$_save_PKG_CONFIG[]dnl
9315])dnl PKG_CHECK_MODULES_STATIC
9316
9317
9318dnl PKG_INSTALLDIR([DIRECTORY])
9319dnl -------------------------
9320dnl Since: 0.27
9321dnl
9322dnl Substitutes the variable pkgconfigdir as the location where a module
9323dnl should install pkg-config .pc files. By default the directory is
9324dnl $libdir/pkgconfig, but the default can be changed by passing
9325dnl DIRECTORY. The user can override through the --with-pkgconfigdir
9326dnl parameter.
9327AC_DEFUN([PKG_INSTALLDIR],
9328[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
9329m4_pushdef([pkg_description],
9330    [pkg-config installation directory @<:@]pkg_default[@:>@])
9331AC_ARG_WITH([pkgconfigdir],
9332    [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
9333    [with_pkgconfigdir=]pkg_default)
9334AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
9335m4_popdef([pkg_default])
9336m4_popdef([pkg_description])
9337])dnl PKG_INSTALLDIR
9338
9339
9340dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
9341dnl --------------------------------
9342dnl Since: 0.27
9343dnl
9344dnl Substitutes the variable noarch_pkgconfigdir as the location where a
9345dnl module should install arch-independent pkg-config .pc files. By
9346dnl default the directory is $datadir/pkgconfig, but the default can be
9347dnl changed by passing DIRECTORY. The user can override through the
9348dnl --with-noarch-pkgconfigdir parameter.
9349AC_DEFUN([PKG_NOARCH_INSTALLDIR],
9350[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
9351m4_pushdef([pkg_description],
9352    [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
9353AC_ARG_WITH([noarch-pkgconfigdir],
9354    [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
9355    [with_noarch_pkgconfigdir=]pkg_default)
9356AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
9357m4_popdef([pkg_default])
9358m4_popdef([pkg_description])
9359])dnl PKG_NOARCH_INSTALLDIR
9360
9361
9362dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
9363dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
9364dnl -------------------------------------------
9365dnl Since: 0.28
9366dnl
9367dnl Retrieves the value of the pkg-config variable for the given module.
9368AC_DEFUN([PKG_CHECK_VAR],
9369[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9370AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
9371
9372_PKG_CONFIG([$1], [variable="][$3]["], [$2])
9373AS_VAR_COPY([$1], [pkg_cv_][$1])
9374
9375AS_VAR_IF([$1], [""], [$5], [$4])dnl
9376])dnl PKG_CHECK_VAR
9377
9378dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES,
9379dnl   [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND],
9380dnl   [DESCRIPTION], [DEFAULT])
9381dnl ------------------------------------------
9382dnl
9383dnl Prepare a "--with-" configure option using the lowercase
9384dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and
9385dnl PKG_CHECK_MODULES in a single macro.
9386AC_DEFUN([PKG_WITH_MODULES],
9387[
9388m4_pushdef([with_arg], m4_tolower([$1]))
9389
9390m4_pushdef([description],
9391           [m4_default([$5], [build with ]with_arg[ support])])
9392
9393m4_pushdef([def_arg], [m4_default([$6], [auto])])
9394m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes])
9395m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no])
9396
9397m4_case(def_arg,
9398            [yes],[m4_pushdef([with_without], [--without-]with_arg)],
9399            [m4_pushdef([with_without],[--with-]with_arg)])
9400
9401AC_ARG_WITH(with_arg,
9402     AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),,
9403    [AS_TR_SH([with_]with_arg)=def_arg])
9404
9405AS_CASE([$AS_TR_SH([with_]with_arg)],
9406            [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)],
9407            [auto],[PKG_CHECK_MODULES([$1],[$2],
9408                                        [m4_n([def_action_if_found]) $3],
9409                                        [m4_n([def_action_if_not_found]) $4])])
9410
9411m4_popdef([with_arg])
9412m4_popdef([description])
9413m4_popdef([def_arg])
9414
9415])dnl PKG_WITH_MODULES
9416
9417dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
9418dnl   [DESCRIPTION], [DEFAULT])
9419dnl -----------------------------------------------
9420dnl
9421dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES
9422dnl check._[VARIABLE-PREFIX] is exported as make variable.
9423AC_DEFUN([PKG_HAVE_WITH_MODULES],
9424[
9425PKG_WITH_MODULES([$1],[$2],,,[$3],[$4])
9426
9427AM_CONDITIONAL([HAVE_][$1],
9428               [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"])
9429])dnl PKG_HAVE_WITH_MODULES
9430
9431dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
9432dnl   [DESCRIPTION], [DEFAULT])
9433dnl ------------------------------------------------------
9434dnl
9435dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after
9436dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make
9437dnl and preprocessor variable.
9438AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES],
9439[
9440PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4])
9441
9442AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"],
9443        [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])])
9444])dnl PKG_HAVE_DEFINE_WITH_MODULES
9445
9446dnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
9447dnl
9448dnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
9449dnl
9450dnl Permission is hereby granted, free of charge, to any person obtaining a
9451dnl copy of this software and associated documentation files (the "Software"),
9452dnl to deal in the Software without restriction, including without limitation
9453dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
9454dnl and/or sell copies of the Software, and to permit persons to whom the
9455dnl Software is furnished to do so, subject to the following conditions:
9456dnl
9457dnl The above copyright notice and this permission notice (including the next
9458dnl paragraph) shall be included in all copies or substantial portions of the
9459dnl Software.
9460dnl
9461dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
9462dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
9463dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
9464dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
9465dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
9466dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
9467dnl DEALINGS IN THE SOFTWARE.
9468
9469# XORG_MACROS_VERSION(required-version)
9470# -------------------------------------
9471# Minimum version: 1.1.0
9472#
9473# If you're using a macro added in Version 1.1 or newer, include this in
9474# your configure.ac with the minimum required version, such as:
9475# XORG_MACROS_VERSION(1.1)
9476#
9477# To ensure that this macro is defined, also add:
9478# m4_ifndef([XORG_MACROS_VERSION],
9479#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
9480#
9481#
9482# See the "minimum version" comment for each macro you use to see what
9483# version you require.
9484m4_defun([XORG_MACROS_VERSION],[
9485m4_define([vers_have], [1.19.3])
9486m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
9487m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
9488m4_if(m4_cmp(maj_have, maj_needed), 0,,
9489    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
9490m4_if(m4_version_compare(vers_have, [$1]), -1,
9491    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
9492m4_undefine([vers_have])
9493m4_undefine([maj_have])
9494m4_undefine([maj_needed])
9495]) # XORG_MACROS_VERSION
9496
9497# XORG_PROG_RAWCPP()
9498# ------------------
9499# Minimum version: 1.0.0
9500#
9501# Find cpp program and necessary flags for use in pre-processing text files
9502# such as man pages and config files
9503AC_DEFUN([XORG_PROG_RAWCPP],[
9504AC_REQUIRE([AC_PROG_CPP])
9505AC_PATH_TOOL(RAWCPP, [cpp], [${CPP}],
9506   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
9507
9508# Check for flag to avoid builtin definitions - assumes unix is predefined,
9509# which is not the best choice for supporting other OS'es, but covers most
9510# of the ones we need for now.
9511AC_MSG_CHECKING([if $RAWCPP requires -undef])
9512AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])])
9513if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
9514	AC_MSG_RESULT([no])
9515else
9516	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
9517		RAWCPPFLAGS=-undef
9518		AC_MSG_RESULT([yes])
9519	# under Cygwin unix is still defined even with -undef
9520	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
9521		RAWCPPFLAGS="-undef -ansi"
9522		AC_MSG_RESULT([yes, with -ansi])
9523	else
9524		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
9525	fi
9526fi
9527rm -f conftest.$ac_ext
9528
9529AC_MSG_CHECKING([if $RAWCPP requires -traditional])
9530AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve   "whitespace"?]])])
9531if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
9532	AC_MSG_RESULT([no])
9533else
9534	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
9535		TRADITIONALCPPFLAGS="-traditional"
9536		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
9537		AC_MSG_RESULT([yes])
9538	else
9539		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
9540	fi
9541fi
9542rm -f conftest.$ac_ext
9543AC_SUBST(RAWCPPFLAGS)
9544AC_SUBST(TRADITIONALCPPFLAGS)
9545]) # XORG_PROG_RAWCPP
9546
9547# XORG_MANPAGE_SECTIONS()
9548# -----------------------
9549# Minimum version: 1.0.0
9550#
9551# Determine which sections man pages go in for the different man page types
9552# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
9553# Not sure if there's any better way than just hardcoding by OS name.
9554# Override default settings by setting environment variables
9555# Added MAN_SUBSTS in version 1.8
9556# Added AC_PROG_SED in version 1.8
9557
9558AC_DEFUN([XORG_MANPAGE_SECTIONS],[
9559AC_REQUIRE([AC_CANONICAL_HOST])
9560AC_REQUIRE([AC_PROG_SED])
9561
9562case $host_os in
9563    solaris*)
9564        # Solaris 2.0 - 11.3 use SysV man page section numbers, so we
9565        # check for a man page file found in later versions that use
9566        # traditional section numbers instead
9567        AC_CHECK_FILE([/usr/share/man/man7/attributes.7],
9568                [SYSV_MAN_SECTIONS=false], [SYSV_MAN_SECTIONS=true])
9569        ;;
9570    *) SYSV_MAN_SECTIONS=false ;;
9571esac
9572
9573if test x$APP_MAN_SUFFIX = x    ; then
9574    APP_MAN_SUFFIX=1
9575fi
9576if test x$APP_MAN_DIR = x    ; then
9577    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
9578fi
9579
9580if test x$LIB_MAN_SUFFIX = x    ; then
9581    LIB_MAN_SUFFIX=3
9582fi
9583if test x$LIB_MAN_DIR = x    ; then
9584    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
9585fi
9586
9587if test x$FILE_MAN_SUFFIX = x    ; then
9588    case $SYSV_MAN_SECTIONS in
9589	true)				FILE_MAN_SUFFIX=4  ;;
9590	*)				FILE_MAN_SUFFIX=5  ;;
9591    esac
9592fi
9593if test x$FILE_MAN_DIR = x    ; then
9594    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
9595fi
9596
9597if test x$MISC_MAN_SUFFIX = x    ; then
9598    case $SYSV_MAN_SECTIONS in
9599	true)				MISC_MAN_SUFFIX=5  ;;
9600	*)				MISC_MAN_SUFFIX=7  ;;
9601    esac
9602fi
9603if test x$MISC_MAN_DIR = x    ; then
9604    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
9605fi
9606
9607if test x$DRIVER_MAN_SUFFIX = x    ; then
9608    case $SYSV_MAN_SECTIONS in
9609	true)				DRIVER_MAN_SUFFIX=7  ;;
9610	*)				DRIVER_MAN_SUFFIX=4  ;;
9611    esac
9612fi
9613if test x$DRIVER_MAN_DIR = x    ; then
9614    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
9615fi
9616
9617if test x$ADMIN_MAN_SUFFIX = x    ; then
9618    case $SYSV_MAN_SECTIONS in
9619	true)				ADMIN_MAN_SUFFIX=1m ;;
9620	*)				ADMIN_MAN_SUFFIX=8  ;;
9621    esac
9622fi
9623if test x$ADMIN_MAN_DIR = x    ; then
9624    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
9625fi
9626
9627
9628AC_SUBST([APP_MAN_SUFFIX])
9629AC_SUBST([LIB_MAN_SUFFIX])
9630AC_SUBST([FILE_MAN_SUFFIX])
9631AC_SUBST([MISC_MAN_SUFFIX])
9632AC_SUBST([DRIVER_MAN_SUFFIX])
9633AC_SUBST([ADMIN_MAN_SUFFIX])
9634AC_SUBST([APP_MAN_DIR])
9635AC_SUBST([LIB_MAN_DIR])
9636AC_SUBST([FILE_MAN_DIR])
9637AC_SUBST([MISC_MAN_DIR])
9638AC_SUBST([DRIVER_MAN_DIR])
9639AC_SUBST([ADMIN_MAN_DIR])
9640
9641XORG_MAN_PAGE="X Version 11"
9642AC_SUBST([XORG_MAN_PAGE])
9643MAN_SUBSTS="\
9644	-e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
9645	-e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
9646	-e 's|__xservername__|Xorg|g' \
9647	-e 's|__xconfigfile__|xorg.conf|g' \
9648	-e 's|__projectroot__|\$(prefix)|g' \
9649	-e 's|__apploaddir__|\$(appdefaultdir)|g' \
9650	-e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
9651	-e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
9652	-e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
9653	-e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
9654	-e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
9655	-e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
9656AC_SUBST([MAN_SUBSTS])
9657
9658]) # XORG_MANPAGE_SECTIONS
9659
9660# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
9661# ------------------------
9662# Minimum version: 1.7.0
9663#
9664# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
9665# provided by xorg-sgml-doctools, if installed.
9666AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
9667AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
9668XORG_SGML_PATH=
9669PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
9670    [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
9671    [m4_ifval([$1],[:],
9672        [if test x"$cross_compiling" != x"yes" ; then
9673            AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
9674                          [XORG_SGML_PATH=$prefix/share/sgml])
9675         fi])
9676    ])
9677
9678# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
9679# the path and the name of the doc stylesheet
9680if test "x$XORG_SGML_PATH" != "x" ; then
9681   AC_MSG_RESULT([$XORG_SGML_PATH])
9682   STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
9683   XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
9684else
9685   AC_MSG_RESULT([no])
9686fi
9687
9688AC_SUBST(XORG_SGML_PATH)
9689AC_SUBST(STYLESHEET_SRCDIR)
9690AC_SUBST(XSL_STYLESHEET)
9691AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
9692]) # XORG_CHECK_SGML_DOCTOOLS
9693
9694# XORG_CHECK_LINUXDOC
9695# -------------------
9696# Minimum version: 1.0.0
9697#
9698# Defines the variable MAKE_TEXT if the necessary tools and
9699# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
9700# Whether or not the necessary tools and files are found can be checked
9701# with the AM_CONDITIONAL "BUILD_LINUXDOC"
9702AC_DEFUN([XORG_CHECK_LINUXDOC],[
9703AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
9704AC_REQUIRE([XORG_WITH_PS2PDF])
9705
9706AC_PATH_PROG(LINUXDOC, linuxdoc)
9707
9708AC_MSG_CHECKING([whether to build documentation])
9709
9710if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
9711   BUILDDOC=yes
9712else
9713   BUILDDOC=no
9714fi
9715
9716AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
9717
9718AC_MSG_RESULT([$BUILDDOC])
9719
9720AC_MSG_CHECKING([whether to build pdf documentation])
9721
9722if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
9723   BUILDPDFDOC=yes
9724else
9725   BUILDPDFDOC=no
9726fi
9727
9728AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
9729
9730AC_MSG_RESULT([$BUILDPDFDOC])
9731
9732MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
9733MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
9734MAKE_PDF="$PS2PDF"
9735MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
9736
9737AC_SUBST(MAKE_TEXT)
9738AC_SUBST(MAKE_PS)
9739AC_SUBST(MAKE_PDF)
9740AC_SUBST(MAKE_HTML)
9741]) # XORG_CHECK_LINUXDOC
9742
9743# XORG_CHECK_DOCBOOK
9744# -------------------
9745# Minimum version: 1.0.0
9746#
9747# Checks for the ability to build output formats from SGML DocBook source.
9748# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
9749# indicates whether the necessary tools and files are found and, if set,
9750# $(MAKE_XXX) blah.sgml will produce blah.xxx.
9751AC_DEFUN([XORG_CHECK_DOCBOOK],[
9752AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
9753
9754BUILDTXTDOC=no
9755BUILDPDFDOC=no
9756BUILDPSDOC=no
9757BUILDHTMLDOC=no
9758
9759AC_PATH_PROG(DOCBOOKPS, docbook2ps)
9760AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
9761AC_PATH_PROG(DOCBOOKHTML, docbook2html)
9762AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
9763
9764AC_MSG_CHECKING([whether to build text documentation])
9765if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
9766   test x$BUILD_TXTDOC != xno; then
9767	BUILDTXTDOC=yes
9768fi
9769AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
9770AC_MSG_RESULT([$BUILDTXTDOC])
9771
9772AC_MSG_CHECKING([whether to build PDF documentation])
9773if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
9774   test x$BUILD_PDFDOC != xno; then
9775	BUILDPDFDOC=yes
9776fi
9777AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
9778AC_MSG_RESULT([$BUILDPDFDOC])
9779
9780AC_MSG_CHECKING([whether to build PostScript documentation])
9781if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
9782   test x$BUILD_PSDOC != xno; then
9783	BUILDPSDOC=yes
9784fi
9785AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
9786AC_MSG_RESULT([$BUILDPSDOC])
9787
9788AC_MSG_CHECKING([whether to build HTML documentation])
9789if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
9790   test x$BUILD_HTMLDOC != xno; then
9791	BUILDHTMLDOC=yes
9792fi
9793AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
9794AC_MSG_RESULT([$BUILDHTMLDOC])
9795
9796MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
9797MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
9798MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
9799MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
9800
9801AC_SUBST(MAKE_TEXT)
9802AC_SUBST(MAKE_PS)
9803AC_SUBST(MAKE_PDF)
9804AC_SUBST(MAKE_HTML)
9805]) # XORG_CHECK_DOCBOOK
9806
9807# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT])
9808# ----------------
9809# Minimum version: 1.5.0
9810# Minimum version for optional DEFAULT argument: 1.11.0
9811#
9812# Documentation tools are not always available on all platforms and sometimes
9813# not at the appropriate level. This macro enables a module to test for the
9814# presence of the tool and obtain it's path in separate variables. Coupled with
9815# the --with-xmlto option, it allows maximum flexibilty in making decisions
9816# as whether or not to use the xmlto package. When DEFAULT is not specified,
9817# --with-xmlto assumes 'auto'.
9818#
9819# Interface to module:
9820# HAVE_XMLTO: 	used in makefiles to conditionally generate documentation
9821# XMLTO:	returns the path of the xmlto program found
9822#		returns the path set by the user in the environment
9823# --with-xmlto:	'yes' user instructs the module to use xmlto
9824#		'no' user instructs the module not to use xmlto
9825#
9826# Added in version 1.10.0
9827# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
9828#                  xmlto for text output requires either lynx, links, or w3m browsers
9829#
9830# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
9831#
9832AC_DEFUN([XORG_WITH_XMLTO],[
9833AC_ARG_VAR([XMLTO], [Path to xmlto command])
9834m4_define([_defopt], m4_default([$2], [auto]))
9835AC_ARG_WITH(xmlto,
9836	AS_HELP_STRING([--with-xmlto],
9837	   [Use xmlto to regenerate documentation (default: ]_defopt[)]),
9838	   [use_xmlto=$withval], [use_xmlto=]_defopt)
9839m4_undefine([_defopt])
9840
9841if test "x$use_xmlto" = x"auto"; then
9842   AC_PATH_PROG([XMLTO], [xmlto])
9843   if test "x$XMLTO" = "x"; then
9844        AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
9845	have_xmlto=no
9846   else
9847        have_xmlto=yes
9848   fi
9849elif test "x$use_xmlto" = x"yes" ; then
9850   AC_PATH_PROG([XMLTO], [xmlto])
9851   if test "x$XMLTO" = "x"; then
9852        AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
9853   fi
9854   have_xmlto=yes
9855elif test "x$use_xmlto" = x"no" ; then
9856   if test "x$XMLTO" != "x"; then
9857      AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
9858   fi
9859   have_xmlto=no
9860else
9861   AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
9862fi
9863
9864# Test for a minimum version of xmlto, if provided.
9865m4_ifval([$1],
9866[if test "$have_xmlto" = yes; then
9867    # scrape the xmlto version
9868    AC_MSG_CHECKING([the xmlto version])
9869    xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
9870    AC_MSG_RESULT([$xmlto_version])
9871    AS_VERSION_COMPARE([$xmlto_version], [$1],
9872        [if test "x$use_xmlto" = xauto; then
9873            AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
9874            have_xmlto=no
9875        else
9876            AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
9877        fi])
9878fi])
9879
9880# Test for the ability of xmlto to generate a text target
9881#
9882# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the
9883# following test for empty XML docbook files.
9884# For compatibility reasons use the following empty XML docbook file and if
9885# it fails try it again with a non-empty XML file.
9886have_xmlto_text=no
9887cat > conftest.xml << "EOF"
9888EOF
9889AS_IF([test "$have_xmlto" = yes],
9890      [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
9891             [have_xmlto_text=yes],
9892             [# Try it again with a non-empty XML file.
9893              cat > conftest.xml << "EOF"
9894<x></x>
9895EOF
9896              AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
9897                    [have_xmlto_text=yes],
9898                    [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])])
9899rm -f conftest.xml
9900AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
9901AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
9902]) # XORG_WITH_XMLTO
9903
9904# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT])
9905# --------------------------------------------
9906# Minimum version: 1.12.0
9907# Minimum version for optional DEFAULT argument: 1.12.0
9908#
9909# XSLT (Extensible Stylesheet Language Transformations) is a declarative,
9910# XML-based language used for the transformation of XML documents.
9911# The xsltproc command line tool is for applying XSLT stylesheets to XML documents.
9912# It is used under the cover by xmlto to generate html files from DocBook/XML.
9913# The XSLT processor is often used as a standalone tool for transformations.
9914# It should not be assumed that this tool is used only to work with documnetation.
9915# When DEFAULT is not specified, --with-xsltproc assumes 'auto'.
9916#
9917# Interface to module:
9918# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation
9919# XSLTPROC:	 returns the path of the xsltproc program found
9920#		 returns the path set by the user in the environment
9921# --with-xsltproc: 'yes' user instructs the module to use xsltproc
9922#		  'no' user instructs the module not to use xsltproc
9923# have_xsltproc: returns yes if xsltproc found in PATH or no
9924#
9925# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path.
9926#
9927AC_DEFUN([XORG_WITH_XSLTPROC],[
9928AC_ARG_VAR([XSLTPROC], [Path to xsltproc command])
9929# Preserves the interface, should it be implemented later
9930m4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])])
9931m4_define([_defopt], m4_default([$2], [auto]))
9932AC_ARG_WITH(xsltproc,
9933	AS_HELP_STRING([--with-xsltproc],
9934	   [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]),
9935	   [use_xsltproc=$withval], [use_xsltproc=]_defopt)
9936m4_undefine([_defopt])
9937
9938if test "x$use_xsltproc" = x"auto"; then
9939   AC_PATH_PROG([XSLTPROC], [xsltproc])
9940   if test "x$XSLTPROC" = "x"; then
9941        AC_MSG_WARN([xsltproc not found - cannot transform XML documents])
9942	have_xsltproc=no
9943   else
9944        have_xsltproc=yes
9945   fi
9946elif test "x$use_xsltproc" = x"yes" ; then
9947   AC_PATH_PROG([XSLTPROC], [xsltproc])
9948   if test "x$XSLTPROC" = "x"; then
9949        AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH])
9950   fi
9951   have_xsltproc=yes
9952elif test "x$use_xsltproc" = x"no" ; then
9953   if test "x$XSLTPROC" != "x"; then
9954      AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified])
9955   fi
9956   have_xsltproc=no
9957else
9958   AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no'])
9959fi
9960
9961AM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes])
9962]) # XORG_WITH_XSLTPROC
9963
9964# XORG_WITH_PERL([MIN-VERSION], [DEFAULT])
9965# ----------------------------------------
9966# Minimum version: 1.15.0
9967#
9968# PERL (Practical Extraction and Report Language) is a language optimized for
9969# scanning arbitrary text files, extracting information from those text files,
9970# and printing reports based on that information.
9971#
9972# When DEFAULT is not specified, --with-perl assumes 'auto'.
9973#
9974# Interface to module:
9975# HAVE_PERL: used in makefiles to conditionally scan text files
9976# PERL:	     returns the path of the perl program found
9977#	     returns the path set by the user in the environment
9978# --with-perl: 'yes' user instructs the module to use perl
9979#	       'no' user instructs the module not to use perl
9980# have_perl: returns yes if perl found in PATH or no
9981#
9982# If the user sets the value of PERL, AC_PATH_PROG skips testing the path.
9983#
9984AC_DEFUN([XORG_WITH_PERL],[
9985AC_ARG_VAR([PERL], [Path to perl command])
9986# Preserves the interface, should it be implemented later
9987m4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])])
9988m4_define([_defopt], m4_default([$2], [auto]))
9989AC_ARG_WITH(perl,
9990	AS_HELP_STRING([--with-perl],
9991	   [Use perl for extracting information from files (default: ]_defopt[)]),
9992	   [use_perl=$withval], [use_perl=]_defopt)
9993m4_undefine([_defopt])
9994
9995if test "x$use_perl" = x"auto"; then
9996   AC_PATH_PROG([PERL], [perl])
9997   if test "x$PERL" = "x"; then
9998        AC_MSG_WARN([perl not found - cannot extract information and report])
9999	have_perl=no
10000   else
10001        have_perl=yes
10002   fi
10003elif test "x$use_perl" = x"yes" ; then
10004   AC_PATH_PROG([PERL], [perl])
10005   if test "x$PERL" = "x"; then
10006        AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH])
10007   fi
10008   have_perl=yes
10009elif test "x$use_perl" = x"no" ; then
10010   if test "x$PERL" != "x"; then
10011      AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified])
10012   fi
10013   have_perl=no
10014else
10015   AC_MSG_ERROR([--with-perl expects 'yes' or 'no'])
10016fi
10017
10018AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes])
10019]) # XORG_WITH_PERL
10020
10021# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
10022# ----------------
10023# Minimum version: 1.5.0
10024# Minimum version for optional DEFAULT argument: 1.11.0
10025#
10026# Documentation tools are not always available on all platforms and sometimes
10027# not at the appropriate level. This macro enables a module to test for the
10028# presence of the tool and obtain it's path in separate variables. Coupled with
10029# the --with-asciidoc option, it allows maximum flexibilty in making decisions
10030# as whether or not to use the asciidoc package. When DEFAULT is not specified,
10031# --with-asciidoc assumes 'auto'.
10032#
10033# Interface to module:
10034# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
10035# ASCIIDOC:	 returns the path of the asciidoc program found
10036#		 returns the path set by the user in the environment
10037# --with-asciidoc: 'yes' user instructs the module to use asciidoc
10038#		  'no' user instructs the module not to use asciidoc
10039#
10040# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
10041#
10042AC_DEFUN([XORG_WITH_ASCIIDOC],[
10043AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
10044m4_define([_defopt], m4_default([$2], [auto]))
10045AC_ARG_WITH(asciidoc,
10046	AS_HELP_STRING([--with-asciidoc],
10047	   [Use asciidoc to regenerate documentation (default: ]_defopt[)]),
10048	   [use_asciidoc=$withval], [use_asciidoc=]_defopt)
10049m4_undefine([_defopt])
10050
10051if test "x$use_asciidoc" = x"auto"; then
10052   AC_PATH_PROG([ASCIIDOC], [asciidoc])
10053   if test "x$ASCIIDOC" = "x"; then
10054        AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
10055	have_asciidoc=no
10056   else
10057        have_asciidoc=yes
10058   fi
10059elif test "x$use_asciidoc" = x"yes" ; then
10060   AC_PATH_PROG([ASCIIDOC], [asciidoc])
10061   if test "x$ASCIIDOC" = "x"; then
10062        AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
10063   fi
10064   have_asciidoc=yes
10065elif test "x$use_asciidoc" = x"no" ; then
10066   if test "x$ASCIIDOC" != "x"; then
10067      AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
10068   fi
10069   have_asciidoc=no
10070else
10071   AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
10072fi
10073m4_ifval([$1],
10074[if test "$have_asciidoc" = yes; then
10075    # scrape the asciidoc version
10076    AC_MSG_CHECKING([the asciidoc version])
10077    asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
10078    AC_MSG_RESULT([$asciidoc_version])
10079    AS_VERSION_COMPARE([$asciidoc_version], [$1],
10080        [if test "x$use_asciidoc" = xauto; then
10081            AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
10082            have_asciidoc=no
10083        else
10084            AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
10085        fi])
10086fi])
10087AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
10088]) # XORG_WITH_ASCIIDOC
10089
10090# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
10091# -------------------------------------------
10092# Minimum version: 1.5.0
10093# Minimum version for optional DEFAULT argument: 1.11.0
10094# Minimum version for optional DOT checking: 1.18.0
10095#
10096# Documentation tools are not always available on all platforms and sometimes
10097# not at the appropriate level. This macro enables a module to test for the
10098# presence of the tool and obtain it's path in separate variables. Coupled with
10099# the --with-doxygen option, it allows maximum flexibilty in making decisions
10100# as whether or not to use the doxygen package. When DEFAULT is not specified,
10101# --with-doxygen assumes 'auto'.
10102#
10103# Interface to module:
10104# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
10105# DOXYGEN:	 returns the path of the doxygen program found
10106#		 returns the path set by the user in the environment
10107# --with-doxygen: 'yes' user instructs the module to use doxygen
10108#		  'no' user instructs the module not to use doxygen
10109#
10110# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
10111#
10112AC_DEFUN([XORG_WITH_DOXYGEN],[
10113AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
10114AC_ARG_VAR([DOT], [Path to the dot graphics utility])
10115m4_define([_defopt], m4_default([$2], [auto]))
10116AC_ARG_WITH(doxygen,
10117	AS_HELP_STRING([--with-doxygen],
10118	   [Use doxygen to regenerate documentation (default: ]_defopt[)]),
10119	   [use_doxygen=$withval], [use_doxygen=]_defopt)
10120m4_undefine([_defopt])
10121
10122if test "x$use_doxygen" = x"auto"; then
10123   AC_PATH_PROG([DOXYGEN], [doxygen])
10124   if test "x$DOXYGEN" = "x"; then
10125        AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
10126	have_doxygen=no
10127   else
10128        have_doxygen=yes
10129   fi
10130elif test "x$use_doxygen" = x"yes" ; then
10131   AC_PATH_PROG([DOXYGEN], [doxygen])
10132   if test "x$DOXYGEN" = "x"; then
10133        AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
10134   fi
10135   have_doxygen=yes
10136elif test "x$use_doxygen" = x"no" ; then
10137   if test "x$DOXYGEN" != "x"; then
10138      AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
10139   fi
10140   have_doxygen=no
10141else
10142   AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
10143fi
10144m4_ifval([$1],
10145[if test "$have_doxygen" = yes; then
10146    # scrape the doxygen version
10147    AC_MSG_CHECKING([the doxygen version])
10148    doxygen_version=`$DOXYGEN --version 2>/dev/null`
10149    AC_MSG_RESULT([$doxygen_version])
10150    AS_VERSION_COMPARE([$doxygen_version], [$1],
10151        [if test "x$use_doxygen" = xauto; then
10152            AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
10153            have_doxygen=no
10154        else
10155            AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
10156        fi])
10157fi])
10158
10159dnl Check for DOT if we have doxygen. The caller decides if it is mandatory
10160dnl HAVE_DOT is a variable that can be used in your doxygen.in config file:
10161dnl 	HAVE_DOT = @HAVE_DOT@
10162HAVE_DOT=no
10163if test "x$have_doxygen" = "xyes"; then
10164  AC_PATH_PROG([DOT], [dot])
10165    if test "x$DOT" != "x"; then
10166      HAVE_DOT=yes
10167    fi
10168fi
10169
10170AC_SUBST([HAVE_DOT])
10171AM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"])
10172AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
10173]) # XORG_WITH_DOXYGEN
10174
10175# XORG_WITH_GROFF([DEFAULT])
10176# ----------------
10177# Minimum version: 1.6.0
10178# Minimum version for optional DEFAULT argument: 1.11.0
10179#
10180# Documentation tools are not always available on all platforms and sometimes
10181# not at the appropriate level. This macro enables a module to test for the
10182# presence of the tool and obtain it's path in separate variables. Coupled with
10183# the --with-groff option, it allows maximum flexibilty in making decisions
10184# as whether or not to use the groff package. When DEFAULT is not specified,
10185# --with-groff assumes 'auto'.
10186#
10187# Interface to module:
10188# HAVE_GROFF:	 used in makefiles to conditionally generate documentation
10189# HAVE_GROFF_MM: the memorandum macros (-mm) package
10190# HAVE_GROFF_MS: the -ms macros package
10191# GROFF:	 returns the path of the groff program found
10192#		 returns the path set by the user in the environment
10193# --with-groff:	 'yes' user instructs the module to use groff
10194#		 'no' user instructs the module not to use groff
10195#
10196# Added in version 1.9.0:
10197# HAVE_GROFF_HTML: groff has dependencies to output HTML format:
10198#		   pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
10199#		   psselect from the psutils package.
10200#		   the ghostcript package. Refer to the grohtml man pages
10201#
10202# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
10203#
10204# OS and distros often splits groff in a basic and full package, the former
10205# having the groff program and the later having devices, fonts and macros
10206# Checking for the groff executable is not enough.
10207#
10208# If macros are missing, we cannot assume that groff is useless, so we don't
10209# unset HAVE_GROFF or GROFF env variables.
10210# HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
10211#
10212AC_DEFUN([XORG_WITH_GROFF],[
10213AC_ARG_VAR([GROFF], [Path to groff command])
10214m4_define([_defopt], m4_default([$1], [auto]))
10215AC_ARG_WITH(groff,
10216	AS_HELP_STRING([--with-groff],
10217	   [Use groff to regenerate documentation (default: ]_defopt[)]),
10218	   [use_groff=$withval], [use_groff=]_defopt)
10219m4_undefine([_defopt])
10220
10221if test "x$use_groff" = x"auto"; then
10222   AC_PATH_PROG([GROFF], [groff])
10223   if test "x$GROFF" = "x"; then
10224        AC_MSG_WARN([groff not found - documentation targets will be skipped])
10225	have_groff=no
10226   else
10227        have_groff=yes
10228   fi
10229elif test "x$use_groff" = x"yes" ; then
10230   AC_PATH_PROG([GROFF], [groff])
10231   if test "x$GROFF" = "x"; then
10232        AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
10233   fi
10234   have_groff=yes
10235elif test "x$use_groff" = x"no" ; then
10236   if test "x$GROFF" != "x"; then
10237      AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
10238   fi
10239   have_groff=no
10240else
10241   AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
10242fi
10243
10244# We have groff, test for the presence of the macro packages
10245if test "x$have_groff" = x"yes"; then
10246    AC_MSG_CHECKING([for ${GROFF} -ms macros])
10247    if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
10248        groff_ms_works=yes
10249    else
10250        groff_ms_works=no
10251    fi
10252    AC_MSG_RESULT([$groff_ms_works])
10253    AC_MSG_CHECKING([for ${GROFF} -mm macros])
10254    if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
10255        groff_mm_works=yes
10256    else
10257        groff_mm_works=no
10258    fi
10259    AC_MSG_RESULT([$groff_mm_works])
10260fi
10261
10262# We have groff, test for HTML dependencies, one command per package
10263if test "x$have_groff" = x"yes"; then
10264   AC_PATH_PROGS(GS_PATH, [gs gswin32c])
10265   AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
10266   AC_PATH_PROG(PSSELECT_PATH, [psselect])
10267   if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
10268      have_groff_html=yes
10269   else
10270      have_groff_html=no
10271      AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
10272   fi
10273fi
10274
10275# Set Automake conditionals for Makefiles
10276AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
10277AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
10278AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
10279AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
10280]) # XORG_WITH_GROFF
10281
10282# XORG_WITH_FOP([MIN-VERSION], [DEFAULT])
10283# ---------------------------------------
10284# Minimum version: 1.6.0
10285# Minimum version for optional DEFAULT argument: 1.11.0
10286# Minimum version for optional MIN-VERSION argument: 1.15.0
10287#
10288# Documentation tools are not always available on all platforms and sometimes
10289# not at the appropriate level. This macro enables a module to test for the
10290# presence of the tool and obtain it's path in separate variables. Coupled with
10291# the --with-fop option, it allows maximum flexibilty in making decisions
10292# as whether or not to use the fop package. When DEFAULT is not specified,
10293# --with-fop assumes 'auto'.
10294#
10295# Interface to module:
10296# HAVE_FOP: 	used in makefiles to conditionally generate documentation
10297# FOP:	 	returns the path of the fop program found
10298#		returns the path set by the user in the environment
10299# --with-fop: 	'yes' user instructs the module to use fop
10300#		'no' user instructs the module not to use fop
10301#
10302# If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
10303#
10304AC_DEFUN([XORG_WITH_FOP],[
10305AC_ARG_VAR([FOP], [Path to fop command])
10306m4_define([_defopt], m4_default([$2], [auto]))
10307AC_ARG_WITH(fop,
10308	AS_HELP_STRING([--with-fop],
10309	   [Use fop to regenerate documentation (default: ]_defopt[)]),
10310	   [use_fop=$withval], [use_fop=]_defopt)
10311m4_undefine([_defopt])
10312
10313if test "x$use_fop" = x"auto"; then
10314   AC_PATH_PROG([FOP], [fop])
10315   if test "x$FOP" = "x"; then
10316        AC_MSG_WARN([fop not found - documentation targets will be skipped])
10317	have_fop=no
10318   else
10319        have_fop=yes
10320   fi
10321elif test "x$use_fop" = x"yes" ; then
10322   AC_PATH_PROG([FOP], [fop])
10323   if test "x$FOP" = "x"; then
10324        AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
10325   fi
10326   have_fop=yes
10327elif test "x$use_fop" = x"no" ; then
10328   if test "x$FOP" != "x"; then
10329      AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
10330   fi
10331   have_fop=no
10332else
10333   AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
10334fi
10335
10336# Test for a minimum version of fop, if provided.
10337m4_ifval([$1],
10338[if test "$have_fop" = yes; then
10339    # scrape the fop version
10340    AC_MSG_CHECKING([for fop minimum version])
10341    fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3`
10342    AC_MSG_RESULT([$fop_version])
10343    AS_VERSION_COMPARE([$fop_version], [$1],
10344        [if test "x$use_fop" = xauto; then
10345            AC_MSG_WARN([fop version $fop_version found, but $1 needed])
10346            have_fop=no
10347        else
10348            AC_MSG_ERROR([fop version $fop_version found, but $1 needed])
10349        fi])
10350fi])
10351AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
10352]) # XORG_WITH_FOP
10353
10354# XORG_WITH_M4([MIN-VERSION])
10355# ---------------------------
10356# Minimum version: 1.19.0
10357#
10358# This macro attempts to locate an m4 macro processor which supports
10359# -I option and is only useful for modules relying on M4 in order to
10360# expand macros in source code files.
10361#
10362# Interface to module:
10363# M4:	 	returns the path of the m4 program found
10364#		returns the path set by the user in the environment
10365#
10366AC_DEFUN([XORG_WITH_M4], [
10367AC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4],
10368   [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4],
10369       [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \
10370         ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]],
10371   [AC_MSG_ERROR([could not find m4 that supports -I option])],
10372   [$PATH:/usr/gnu/bin])])
10373
10374AC_SUBST([M4], [$ac_cv_path_M4])
10375]) # XORG_WITH_M4
10376
10377# XORG_WITH_PS2PDF([DEFAULT])
10378# ----------------
10379# Minimum version: 1.6.0
10380# Minimum version for optional DEFAULT argument: 1.11.0
10381#
10382# Documentation tools are not always available on all platforms and sometimes
10383# not at the appropriate level. This macro enables a module to test for the
10384# presence of the tool and obtain it's path in separate variables. Coupled with
10385# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
10386# as whether or not to use the ps2pdf package. When DEFAULT is not specified,
10387# --with-ps2pdf assumes 'auto'.
10388#
10389# Interface to module:
10390# HAVE_PS2PDF: 	used in makefiles to conditionally generate documentation
10391# PS2PDF:	returns the path of the ps2pdf program found
10392#		returns the path set by the user in the environment
10393# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
10394#		 'no' user instructs the module not to use ps2pdf
10395#
10396# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
10397#
10398AC_DEFUN([XORG_WITH_PS2PDF],[
10399AC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
10400m4_define([_defopt], m4_default([$1], [auto]))
10401AC_ARG_WITH(ps2pdf,
10402	AS_HELP_STRING([--with-ps2pdf],
10403	   [Use ps2pdf to regenerate documentation (default: ]_defopt[)]),
10404	   [use_ps2pdf=$withval], [use_ps2pdf=]_defopt)
10405m4_undefine([_defopt])
10406
10407if test "x$use_ps2pdf" = x"auto"; then
10408   AC_PATH_PROG([PS2PDF], [ps2pdf])
10409   if test "x$PS2PDF" = "x"; then
10410        AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
10411	have_ps2pdf=no
10412   else
10413        have_ps2pdf=yes
10414   fi
10415elif test "x$use_ps2pdf" = x"yes" ; then
10416   AC_PATH_PROG([PS2PDF], [ps2pdf])
10417   if test "x$PS2PDF" = "x"; then
10418        AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
10419   fi
10420   have_ps2pdf=yes
10421elif test "x$use_ps2pdf" = x"no" ; then
10422   if test "x$PS2PDF" != "x"; then
10423      AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
10424   fi
10425   have_ps2pdf=no
10426else
10427   AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
10428fi
10429AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
10430]) # XORG_WITH_PS2PDF
10431
10432# XORG_ENABLE_DOCS (enable_docs=yes)
10433# ----------------
10434# Minimum version: 1.6.0
10435#
10436# Documentation tools are not always available on all platforms and sometimes
10437# not at the appropriate level. This macro enables a builder to skip all
10438# documentation targets except traditional man pages.
10439# Combined with the specific tool checking macros XORG_WITH_*, it provides
10440# maximum flexibilty in controlling documentation building.
10441# Refer to:
10442# XORG_WITH_XMLTO         --with-xmlto
10443# XORG_WITH_ASCIIDOC      --with-asciidoc
10444# XORG_WITH_DOXYGEN       --with-doxygen
10445# XORG_WITH_FOP           --with-fop
10446# XORG_WITH_GROFF         --with-groff
10447# XORG_WITH_PS2PDF        --with-ps2pdf
10448#
10449# Interface to module:
10450# ENABLE_DOCS: 	  used in makefiles to conditionally generate documentation
10451# --enable-docs: 'yes' user instructs the module to generate docs
10452#		 'no' user instructs the module not to generate docs
10453# parm1:	specify the default value, yes or no.
10454#
10455AC_DEFUN([XORG_ENABLE_DOCS],[
10456m4_define([docs_default], m4_default([$1], [yes]))
10457AC_ARG_ENABLE(docs,
10458	AS_HELP_STRING([--enable-docs],
10459	   [Enable building the documentation (default: ]docs_default[)]),
10460	   [build_docs=$enableval], [build_docs=]docs_default)
10461m4_undefine([docs_default])
10462AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
10463AC_MSG_CHECKING([whether to build documentation])
10464AC_MSG_RESULT([$build_docs])
10465]) # XORG_ENABLE_DOCS
10466
10467# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
10468# ----------------
10469# Minimum version: 1.6.0
10470#
10471# This macro enables a builder to skip all developer documentation.
10472# Combined with the specific tool checking macros XORG_WITH_*, it provides
10473# maximum flexibilty in controlling documentation building.
10474# Refer to:
10475# XORG_WITH_XMLTO         --with-xmlto
10476# XORG_WITH_ASCIIDOC      --with-asciidoc
10477# XORG_WITH_DOXYGEN       --with-doxygen
10478# XORG_WITH_FOP           --with-fop
10479# XORG_WITH_GROFF         --with-groff
10480# XORG_WITH_PS2PDF        --with-ps2pdf
10481#
10482# Interface to module:
10483# ENABLE_DEVEL_DOCS:	used in makefiles to conditionally generate developer docs
10484# --enable-devel-docs:	'yes' user instructs the module to generate developer docs
10485#			'no' user instructs the module not to generate developer docs
10486# parm1:		specify the default value, yes or no.
10487#
10488AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
10489m4_define([devel_default], m4_default([$1], [yes]))
10490AC_ARG_ENABLE(devel-docs,
10491	AS_HELP_STRING([--enable-devel-docs],
10492	   [Enable building the developer documentation (default: ]devel_default[)]),
10493	   [build_devel_docs=$enableval], [build_devel_docs=]devel_default)
10494m4_undefine([devel_default])
10495AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
10496AC_MSG_CHECKING([whether to build developer documentation])
10497AC_MSG_RESULT([$build_devel_docs])
10498]) # XORG_ENABLE_DEVEL_DOCS
10499
10500# XORG_ENABLE_SPECS (enable_specs=yes)
10501# ----------------
10502# Minimum version: 1.6.0
10503#
10504# This macro enables a builder to skip all functional specification targets.
10505# Combined with the specific tool checking macros XORG_WITH_*, it provides
10506# maximum flexibilty in controlling documentation building.
10507# Refer to:
10508# XORG_WITH_XMLTO         --with-xmlto
10509# XORG_WITH_ASCIIDOC      --with-asciidoc
10510# XORG_WITH_DOXYGEN       --with-doxygen
10511# XORG_WITH_FOP           --with-fop
10512# XORG_WITH_GROFF         --with-groff
10513# XORG_WITH_PS2PDF        --with-ps2pdf
10514#
10515# Interface to module:
10516# ENABLE_SPECS:		used in makefiles to conditionally generate specs
10517# --enable-specs:	'yes' user instructs the module to generate specs
10518#			'no' user instructs the module not to generate specs
10519# parm1:		specify the default value, yes or no.
10520#
10521AC_DEFUN([XORG_ENABLE_SPECS],[
10522m4_define([spec_default], m4_default([$1], [yes]))
10523AC_ARG_ENABLE(specs,
10524	AS_HELP_STRING([--enable-specs],
10525	   [Enable building the specs (default: ]spec_default[)]),
10526	   [build_specs=$enableval], [build_specs=]spec_default)
10527m4_undefine([spec_default])
10528AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
10529AC_MSG_CHECKING([whether to build functional specifications])
10530AC_MSG_RESULT([$build_specs])
10531]) # XORG_ENABLE_SPECS
10532
10533# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto)
10534# ----------------------------------------------
10535# Minimum version: 1.13.0
10536#
10537# This macro enables a builder to enable/disable unit testing
10538# It makes no assumption about the test cases implementation
10539# Test cases may or may not use Automake "Support for test suites"
10540# They may or may not use the software utility library GLib
10541#
10542# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL
10543# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib.
10544# The variable enable_unit_tests is used by other macros in this file.
10545#
10546# Interface to module:
10547# ENABLE_UNIT_TESTS:	used in makefiles to conditionally build tests
10548# enable_unit_tests:    used in configure.ac for additional configuration
10549# --enable-unit-tests:	'yes' user instructs the module to build tests
10550#			'no' user instructs the module not to build tests
10551# parm1:		specify the default value, yes or no.
10552#
10553AC_DEFUN([XORG_ENABLE_UNIT_TESTS],[
10554AC_BEFORE([$0], [XORG_WITH_GLIB])
10555AC_BEFORE([$0], [XORG_LD_WRAP])
10556AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS])
10557m4_define([_defopt], m4_default([$1], [auto]))
10558AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests],
10559	[Enable building unit test cases (default: ]_defopt[)]),
10560	[enable_unit_tests=$enableval], [enable_unit_tests=]_defopt)
10561m4_undefine([_defopt])
10562AM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno])
10563AC_MSG_CHECKING([whether to build unit test cases])
10564AC_MSG_RESULT([$enable_unit_tests])
10565]) # XORG_ENABLE_UNIT_TESTS
10566
10567# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto)
10568# ------------------------------------------------------
10569# Minimum version: 1.17.0
10570#
10571# This macro enables a builder to enable/disable integration testing
10572# It makes no assumption about the test cases' implementation
10573# Test cases may or may not use Automake "Support for test suites"
10574#
10575# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support
10576# usually requires less dependencies and may be built and run under less
10577# stringent environments than integration tests.
10578#
10579# Interface to module:
10580# ENABLE_INTEGRATION_TESTS:   used in makefiles to conditionally build tests
10581# enable_integration_tests:   used in configure.ac for additional configuration
10582# --enable-integration-tests: 'yes' user instructs the module to build tests
10583#                             'no' user instructs the module not to build tests
10584# parm1:                      specify the default value, yes or no.
10585#
10586AC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[
10587AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS])
10588m4_define([_defopt], m4_default([$1], [auto]))
10589AC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests],
10590	[Enable building integration test cases (default: ]_defopt[)]),
10591	[enable_integration_tests=$enableval],
10592	[enable_integration_tests=]_defopt)
10593m4_undefine([_defopt])
10594AM_CONDITIONAL([ENABLE_INTEGRATION_TESTS],
10595	[test "x$enable_integration_tests" != xno])
10596AC_MSG_CHECKING([whether to build unit test cases])
10597AC_MSG_RESULT([$enable_integration_tests])
10598]) # XORG_ENABLE_INTEGRATION_TESTS
10599
10600# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT])
10601# ----------------------------------------
10602# Minimum version: 1.13.0
10603#
10604# GLib is a library which provides advanced data structures and functions.
10605# This macro enables a module to test for the presence of Glib.
10606#
10607# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing.
10608# Otherwise the value of $enable_unit_tests is blank.
10609#
10610# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit
10611# test support usually requires less dependencies and may be built and run under
10612# less stringent environments than integration tests.
10613#
10614# Interface to module:
10615# HAVE_GLIB: used in makefiles to conditionally build targets
10616# with_glib: used in configure.ac to know if GLib has been found
10617# --with-glib:	'yes' user instructs the module to use glib
10618#		'no' user instructs the module not to use glib
10619#
10620AC_DEFUN([XORG_WITH_GLIB],[
10621AC_REQUIRE([PKG_PROG_PKG_CONFIG])
10622m4_define([_defopt], m4_default([$2], [auto]))
10623AC_ARG_WITH(glib, AS_HELP_STRING([--with-glib],
10624	[Use GLib library for unit testing (default: ]_defopt[)]),
10625	[with_glib=$withval], [with_glib=]_defopt)
10626m4_undefine([_defopt])
10627
10628have_glib=no
10629# Do not probe GLib if user explicitly disabled unit testing
10630if test "x$enable_unit_tests" != x"no"; then
10631  # Do not probe GLib if user explicitly disabled it
10632  if test "x$with_glib" != x"no"; then
10633    m4_ifval(
10634      [$1],
10635      [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])],
10636      [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])]
10637    )
10638  fi
10639fi
10640
10641# Not having GLib when unit testing has been explicitly requested is an error
10642if test "x$enable_unit_tests" = x"yes"; then
10643  if test "x$have_glib" = x"no"; then
10644    AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
10645  fi
10646fi
10647
10648# Having unit testing disabled when GLib has been explicitly requested is an error
10649if test "x$enable_unit_tests" = x"no"; then
10650  if test "x$with_glib" = x"yes"; then
10651    AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
10652  fi
10653fi
10654
10655# Not having GLib when it has been explicitly requested is an error
10656if test "x$with_glib" = x"yes"; then
10657  if test "x$have_glib" = x"no"; then
10658    AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found])
10659  fi
10660fi
10661
10662AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes])
10663]) # XORG_WITH_GLIB
10664
10665# XORG_LD_WRAP([required|optional])
10666# ---------------------------------
10667# Minimum version: 1.13.0
10668#
10669# Check if linker supports -wrap, passed via compiler flags
10670#
10671# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing.
10672# Otherwise the value of $enable_unit_tests is blank.
10673#
10674# Argument added in 1.16.0 - default is "required", to match existing behavior
10675# of returning an error if enable_unit_tests is yes, and ld -wrap is not
10676# available, an argument of "optional" allows use when some unit tests require
10677# ld -wrap and others do not.
10678#
10679AC_DEFUN([XORG_LD_WRAP],[
10680XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no],
10681    [AC_LANG_PROGRAM([#include <stdlib.h>
10682                      void __wrap_exit(int status) { return; }],
10683                     [exit(0);])])
10684# Not having ld wrap when unit testing has been explicitly requested is an error
10685if test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then
10686  if test "x$have_ld_wrap" = x"no"; then
10687    AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available])
10688  fi
10689fi
10690AM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes])
10691#
10692]) # XORG_LD_WRAP
10693
10694# XORG_CHECK_LINKER_FLAGS
10695# -----------------------
10696# SYNOPSIS
10697#
10698#   XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE])
10699#
10700# DESCRIPTION
10701#
10702#   Check whether the given linker FLAGS work with the current language's
10703#   linker, or whether they give an error.
10704#
10705#   ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
10706#   success/failure.
10707#
10708#   PROGRAM-SOURCE is the program source to link with, if needed
10709#
10710#   NOTE: Based on AX_CHECK_COMPILER_FLAGS.
10711#
10712# LICENSE
10713#
10714#   Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org>
10715#   Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu>
10716#   Copyright (c) 2009 Matteo Frigo
10717#
10718#   This program is free software: you can redistribute it and/or modify it
10719#   under the terms of the GNU General Public License as published by the
10720#   Free Software Foundation, either version 3 of the License, or (at your
10721#   option) any later version.
10722#
10723#   This program is distributed in the hope that it will be useful, but
10724#   WITHOUT ANY WARRANTY; without even the implied warranty of
10725#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
10726#   Public License for more details.
10727#
10728#   You should have received a copy of the GNU General Public License along
10729#   with this program. If not, see <http://www.gnu.org/licenses/>.
10730#
10731#   As a special exception, the respective Autoconf Macro's copyright owner
10732#   gives unlimited permission to copy, distribute and modify the configure
10733#   scripts that are the output of Autoconf when processing the Macro. You
10734#   need not follow the terms of the GNU General Public License when using
10735#   or distributing such scripts, even though portions of the text of the
10736#   Macro appear in them. The GNU General Public License (GPL) does govern
10737#   all other use of the material that constitutes the Autoconf Macro.
10738#
10739#   This special exception to the GPL applies to versions of the Autoconf
10740#   Macro released by the Autoconf Archive. When you make and distribute a
10741#   modified version of the Autoconf Macro, you may extend this special
10742#   exception to the GPL to apply to your modified version as well.#
10743AC_DEFUN([XORG_CHECK_LINKER_FLAGS],
10744[AC_MSG_CHECKING([whether the linker accepts $1])
10745dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname:
10746AS_LITERAL_IF([$1],
10747  [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [
10748      ax_save_FLAGS=$LDFLAGS
10749      LDFLAGS="$1"
10750      AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])],
10751        AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
10752        AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
10753      LDFLAGS=$ax_save_FLAGS])],
10754  [ax_save_FLAGS=$LDFLAGS
10755   LDFLAGS="$1"
10756   AC_LINK_IFELSE([AC_LANG_PROGRAM()],
10757     eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
10758     eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
10759   LDFLAGS=$ax_save_FLAGS])
10760eval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1])
10761AC_MSG_RESULT($xorg_check_linker_flags)
10762if test "x$xorg_check_linker_flags" = xyes; then
10763	m4_default([$2], :)
10764else
10765	m4_default([$3], :)
10766fi
10767]) # XORG_CHECK_LINKER_FLAGS
10768
10769# XORG_MEMORY_CHECK_FLAGS
10770# -----------------------
10771# Minimum version: 1.16.0
10772#
10773# This macro attempts to find appropriate memory checking functionality
10774# for various platforms which unit testing code may use to catch various
10775# forms of memory allocation and access errors in testing.
10776#
10777# Interface to module:
10778# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging
10779#                         Usually added to TESTS_ENVIRONMENT in Makefile.am
10780#
10781# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim.
10782#
10783AC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[
10784
10785AC_REQUIRE([AC_CANONICAL_HOST])
10786AC_ARG_VAR([XORG_MALLOC_DEBUG_ENV],
10787           [Environment variables to enable memory checking in tests])
10788
10789# Check for different types of support on different platforms
10790case $host_os in
10791    solaris*)
10792        AC_CHECK_LIB([umem], [umem_alloc],
10793            [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default'])
10794        ;;
10795    *-gnu*) # GNU libc - Value is used as a single byte bit pattern,
10796        # both directly and inverted, so should not be 0 or 255.
10797        malloc_debug_env='MALLOC_PERTURB_=15'
10798        ;;
10799    darwin*)
10800        malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib'
10801        ;;
10802    *bsd*)
10803        malloc_debug_env='MallocPreScribble=1 MallocScribble=1'
10804        ;;
10805esac
10806
10807# User supplied flags override default flags
10808if test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then
10809    malloc_debug_env="$XORG_MALLOC_DEBUG_ENV"
10810fi
10811
10812AC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env])
10813]) # XORG_WITH_LINT
10814
10815# XORG_CHECK_MALLOC_ZERO
10816# ----------------------
10817# Minimum version: 1.0.0
10818#
10819# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
10820# malloc(0) returns NULL.  Packages should add one of these cflags to
10821# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
10822AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
10823AC_ARG_ENABLE(malloc0returnsnull,
10824	AS_HELP_STRING([--enable-malloc0returnsnull],
10825		       [malloc(0) returns NULL (default: auto)]),
10826	[MALLOC_ZERO_RETURNS_NULL=$enableval],
10827	[MALLOC_ZERO_RETURNS_NULL=auto])
10828
10829AC_MSG_CHECKING([whether malloc(0) returns NULL])
10830if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
10831AC_CACHE_VAL([xorg_cv_malloc0_returns_null],
10832	[AC_RUN_IFELSE([AC_LANG_PROGRAM([
10833#include <stdlib.h>
10834],[
10835    char *m0, *r0, *c0, *p;
10836    m0 = malloc(0);
10837    p = malloc(10);
10838    r0 = realloc(p,0);
10839    c0 = calloc(0,10);
10840    exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1);
10841])],
10842		[xorg_cv_malloc0_returns_null=yes],
10843		[xorg_cv_malloc0_returns_null=no])])
10844MALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null
10845fi
10846AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
10847
10848if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
10849	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
10850	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
10851	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
10852else
10853	MALLOC_ZERO_CFLAGS=""
10854	XMALLOC_ZERO_CFLAGS=""
10855	XTMALLOC_ZERO_CFLAGS=""
10856fi
10857
10858AC_SUBST([MALLOC_ZERO_CFLAGS])
10859AC_SUBST([XMALLOC_ZERO_CFLAGS])
10860AC_SUBST([XTMALLOC_ZERO_CFLAGS])
10861]) # XORG_CHECK_MALLOC_ZERO
10862
10863# XORG_WITH_LINT()
10864# ----------------
10865# Minimum version: 1.1.0
10866#
10867# This macro enables the use of a tool that flags some suspicious and
10868# non-portable constructs (likely to be bugs) in C language source code.
10869# It will attempt to locate the tool and use appropriate options.
10870# There are various lint type tools on different platforms.
10871#
10872# Interface to module:
10873# LINT:		returns the path to the tool found on the platform
10874#		or the value set to LINT on the configure cmd line
10875#		also an Automake conditional
10876# LINT_FLAGS:	an Automake variable with appropriate flags
10877#
10878# --with-lint:	'yes' user instructs the module to use lint
10879#		'no' user instructs the module not to use lint (default)
10880#
10881# If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
10882# If the user sets the value of LINT_FLAGS, they are used verbatim.
10883#
10884AC_DEFUN([XORG_WITH_LINT],[
10885
10886AC_ARG_VAR([LINT], [Path to a lint-style command])
10887AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
10888AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
10889		[Use a lint-style source code checker (default: disabled)])],
10890		[use_lint=$withval], [use_lint=no])
10891
10892# Obtain platform specific info like program name and options
10893# The lint program on FreeBSD and NetBSD is different from the one on Solaris
10894case $host_os in
10895  *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
10896	lint_name=splint
10897	lint_options="-badflag"
10898	;;
10899  *freebsd* | *netbsd*)
10900	lint_name=lint
10901	lint_options="-u -b"
10902	;;
10903  *solaris*)
10904	lint_name=lint
10905	lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
10906	;;
10907esac
10908
10909# Test for the presence of the program (either guessed by the code or spelled out by the user)
10910if test "x$use_lint" = x"yes" ; then
10911   AC_PATH_PROG([LINT], [$lint_name])
10912   if test "x$LINT" = "x"; then
10913        AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
10914   fi
10915elif test "x$use_lint" = x"no" ; then
10916   if test "x$LINT" != "x"; then
10917      AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
10918   fi
10919else
10920   AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
10921fi
10922
10923# User supplied flags override default flags
10924if test "x$LINT_FLAGS" != "x"; then
10925   lint_options=$LINT_FLAGS
10926fi
10927
10928AC_SUBST([LINT_FLAGS],[$lint_options])
10929AM_CONDITIONAL(LINT, [test "x$LINT" != x])
10930
10931]) # XORG_WITH_LINT
10932
10933# XORG_LINT_LIBRARY(LIBNAME)
10934# --------------------------
10935# Minimum version: 1.1.0
10936#
10937# Sets up flags for building lint libraries for checking programs that call
10938# functions in the library.
10939#
10940# Interface to module:
10941# LINTLIB		- Automake variable with the name of lint library file to make
10942# MAKE_LINT_LIB		- Automake conditional
10943#
10944# --enable-lint-library:  - 'yes' user instructs the module to created a lint library
10945#			  - 'no' user instructs the module not to create a lint library (default)
10946
10947AC_DEFUN([XORG_LINT_LIBRARY],[
10948AC_REQUIRE([XORG_WITH_LINT])
10949AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
10950	[Create lint library (default: disabled)])],
10951	[make_lint_lib=$enableval], [make_lint_lib=no])
10952
10953if test "x$make_lint_lib" = x"yes" ; then
10954   LINTLIB=llib-l$1.ln
10955   if test "x$LINT" = "x"; then
10956        AC_MSG_ERROR([Cannot make lint library without --with-lint])
10957   fi
10958elif test "x$make_lint_lib" != x"no" ; then
10959   AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
10960fi
10961
10962AC_SUBST(LINTLIB)
10963AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
10964
10965]) # XORG_LINT_LIBRARY
10966
10967# XORG_COMPILER_BRAND
10968# -------------------
10969# Minimum version: 1.14.0
10970#
10971# Checks for various brands of compilers and sets flags as appropriate:
10972#   GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes"
10973#   GNU g++ - relies on AC_PROG_CXX to set GXX to "yes"
10974#   clang compiler - sets CLANGCC to "yes"
10975#   Intel compiler - sets INTELCC to "yes"
10976#   Sun/Oracle Solaris Studio cc - sets SUNCC to "yes"
10977#
10978AC_DEFUN([XORG_COMPILER_BRAND], [
10979AC_LANG_CASE(
10980	[C], [
10981		AC_REQUIRE([AC_PROG_CC_C99])
10982	],
10983	[C++], [
10984		AC_REQUIRE([AC_PROG_CXX])
10985	]
10986)
10987AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"])
10988AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
10989AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
10990]) # XORG_COMPILER_BRAND
10991
10992# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...])
10993# ---------------
10994# Minimum version: 1.16.0
10995#
10996# Test if the compiler works when passed the given flag as a command line argument.
10997# If it succeeds, the flag is appeneded to the given variable.  If not, it tries the
10998# next flag in the list until there are no more options.
10999#
11000# Note that this does not guarantee that the compiler supports the flag as some
11001# compilers will simply ignore arguments that they do not understand, but we do
11002# attempt to weed out false positives by using -Werror=unknown-warning-option and
11003# -Werror=unused-command-line-argument
11004#
11005AC_DEFUN([XORG_TESTSET_CFLAG], [
11006m4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
11007m4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
11008
11009AC_LANG_COMPILER_REQUIRE
11010
11011AC_LANG_CASE(
11012	[C], [
11013		AC_REQUIRE([AC_PROG_CC_C99])
11014		define([PREFIX], [C])
11015		define([CACHE_PREFIX], [cc])
11016		define([COMPILER], [$CC])
11017	],
11018	[C++], [
11019		define([PREFIX], [CXX])
11020		define([CACHE_PREFIX], [cxx])
11021		define([COMPILER], [$CXX])
11022	]
11023)
11024
11025[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]"
11026
11027if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then
11028	PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
11029	AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option],
11030			[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option],
11031			AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
11032					  [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes],
11033					  [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no]))
11034	[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option]
11035	PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
11036fi
11037
11038if test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then
11039	if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then
11040		PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
11041	fi
11042	PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
11043	AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument],
11044			[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument],
11045			AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
11046					  [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes],
11047					  [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no]))
11048	[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument]
11049	PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
11050fi
11051
11052found="no"
11053m4_foreach([flag], m4_cdr($@), [
11054	if test $found = "no" ; then
11055		if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then
11056			PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
11057		fi
11058
11059		if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then
11060			PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
11061		fi
11062
11063		PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag["
11064
11065dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname
11066		AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[])
11067		cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[])
11068		AC_CACHE_VAL($cacheid,
11069			     [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])],
11070					     [eval $cacheid=yes],
11071					     [eval $cacheid=no])])
11072
11073		PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
11074
11075		eval supported=\$$cacheid
11076		AC_MSG_RESULT([$supported])
11077		if test "$supported" = "yes" ; then
11078			$1="$$1 ]flag["
11079			found="yes"
11080		fi
11081	fi
11082])
11083]) # XORG_TESTSET_CFLAG
11084
11085# XORG_COMPILER_FLAGS
11086# ---------------
11087# Minimum version: 1.16.0
11088#
11089# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line
11090# arguments supported by the selected compiler which do NOT alter the generated
11091# code.  These arguments will cause the compiler to print various warnings
11092# during compilation AND turn a conservative set of warnings into errors.
11093#
11094# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in
11095# future versions of util-macros as options are added to new compilers.
11096#
11097AC_DEFUN([XORG_COMPILER_FLAGS], [
11098AC_REQUIRE([XORG_COMPILER_BRAND])
11099
11100AC_ARG_ENABLE(selective-werror,
11101              AS_HELP_STRING([--disable-selective-werror],
11102                             [Turn off selective compiler errors. (default: enabled)]),
11103              [SELECTIVE_WERROR=$enableval],
11104              [SELECTIVE_WERROR=yes])
11105
11106AC_LANG_CASE(
11107        [C], [
11108                define([PREFIX], [C])
11109        ],
11110        [C++], [
11111                define([PREFIX], [CXX])
11112        ]
11113)
11114# -v is too short to test reliably with XORG_TESTSET_CFLAG
11115if test "x$SUNCC" = "xyes"; then
11116    [BASE_]PREFIX[FLAGS]="-v"
11117else
11118    [BASE_]PREFIX[FLAGS]=""
11119fi
11120
11121# This chunk of warnings were those that existed in the legacy CWARNFLAGS
11122XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall])
11123XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith])
11124XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations])
11125XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat])
11126
11127AC_LANG_CASE(
11128	[C], [
11129		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes])
11130		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes])
11131		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs])
11132		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast])
11133		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd])
11134		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement])
11135	]
11136)
11137
11138# This chunk adds additional warnings that could catch undesired effects.
11139XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused])
11140XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized])
11141XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow])
11142XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn])
11143XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute])
11144XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls])
11145XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
11146
11147# These are currently disabled because they are noisy.  They will be enabled
11148# in the future once the codebase is sufficiently modernized to silence
11149# them.  For now, I don't want them to drown out the other warnings.
11150# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses])
11151# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
11152# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
11153
11154# Turn some warnings into errors, so we don't accidently get successful builds
11155# when there are problems that should be fixed.
11156
11157if test "x$SELECTIVE_WERROR" = "xyes" ; then
11158XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED])
11159XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull])
11160XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self])
11161XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main])
11162XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces])
11163XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point])
11164XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT])
11165XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs])
11166XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds])
11167XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings])
11168XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address])
11169XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION])
11170XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION
11171else
11172AC_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])
11173XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit])
11174XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull])
11175XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self])
11176XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain])
11177XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces])
11178XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point])
11179XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type])
11180XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs])
11181XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds])
11182XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings])
11183XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress])
11184XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast])
11185XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast])
11186fi
11187
11188AC_SUBST([BASE_]PREFIX[FLAGS])
11189]) # XORG_COMPILER_FLAGS
11190
11191# XORG_CWARNFLAGS
11192# ---------------
11193# Minimum version: 1.2.0
11194# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead)
11195#
11196# Defines CWARNFLAGS to enable C compiler warnings.
11197#
11198# This function is deprecated because it defines -fno-strict-aliasing
11199# which alters the code generated by the compiler.  If -fno-strict-aliasing
11200# is needed, then it should be added explicitly in the module when
11201# it is updated to use BASE_CFLAGS.
11202#
11203AC_DEFUN([XORG_CWARNFLAGS], [
11204AC_REQUIRE([XORG_COMPILER_FLAGS])
11205AC_REQUIRE([XORG_COMPILER_BRAND])
11206AC_LANG_CASE(
11207	[C], [
11208		CWARNFLAGS="$BASE_CFLAGS"
11209		if  test "x$GCC" = xyes ; then
11210		    CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing"
11211		fi
11212		AC_SUBST(CWARNFLAGS)
11213	]
11214)
11215]) # XORG_CWARNFLAGS
11216
11217# XORG_STRICT_OPTION
11218# -----------------------
11219# Minimum version: 1.3.0
11220#
11221# Add configure option to enable strict compilation flags, such as treating
11222# warnings as fatal errors.
11223# If --enable-strict-compilation is passed to configure, adds strict flags to
11224# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS.
11225#
11226# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or
11227# when strict compilation is unconditionally desired.
11228AC_DEFUN([XORG_STRICT_OPTION], [
11229AC_REQUIRE([XORG_CWARNFLAGS])
11230AC_REQUIRE([XORG_COMPILER_FLAGS])
11231
11232AC_ARG_ENABLE(strict-compilation,
11233			  AS_HELP_STRING([--enable-strict-compilation],
11234			  [Enable all warnings from compiler and make them errors (default: disabled)]),
11235			  [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
11236
11237AC_LANG_CASE(
11238        [C], [
11239                define([PREFIX], [C])
11240        ],
11241        [C++], [
11242                define([PREFIX], [CXX])
11243        ]
11244)
11245
11246[STRICT_]PREFIX[FLAGS]=""
11247XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic])
11248XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn])
11249
11250# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not
11251# activate it with -Werror, so we add it here explicitly.
11252XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes])
11253
11254if test "x$STRICT_COMPILE" = "xyes"; then
11255    [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]"
11256    AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"])
11257fi
11258AC_SUBST([STRICT_]PREFIX[FLAGS])
11259AC_SUBST([BASE_]PREFIX[FLAGS])
11260AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS]))
11261]) # XORG_STRICT_OPTION
11262
11263# XORG_DEFAULT_OPTIONS
11264# --------------------
11265# Minimum version: 1.3.0
11266#
11267# Defines default options for X.Org modules.
11268#
11269AC_DEFUN([XORG_DEFAULT_OPTIONS], [
11270AC_REQUIRE([AC_PROG_INSTALL])
11271XORG_COMPILER_FLAGS
11272XORG_CWARNFLAGS
11273XORG_STRICT_OPTION
11274XORG_RELEASE_VERSION
11275XORG_CHANGELOG
11276XORG_INSTALL
11277XORG_MANPAGE_SECTIONS
11278m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
11279    [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
11280]) # XORG_DEFAULT_OPTIONS
11281
11282# XORG_INSTALL()
11283# ----------------
11284# Minimum version: 1.4.0
11285#
11286# Defines the variable INSTALL_CMD as the command to copy
11287# INSTALL from $prefix/share/util-macros.
11288#
11289AC_DEFUN([XORG_INSTALL], [
11290AC_REQUIRE([PKG_PROG_PKG_CONFIG])
11291macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
11292INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
11293mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
11294|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \
11295touch \$(top_srcdir)/INSTALL; \
11296echo 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))"
11297AC_SUBST([INSTALL_CMD])
11298]) # XORG_INSTALL
11299dnl Copyright 2005 Red Hat, Inc
11300dnl
11301dnl Permission to use, copy, modify, distribute, and sell this software and its
11302dnl documentation for any purpose is hereby granted without fee, provided that
11303dnl the above copyright notice appear in all copies and that both that
11304dnl copyright notice and this permission notice appear in supporting
11305dnl documentation.
11306dnl
11307dnl The above copyright notice and this permission notice shall be included
11308dnl in all copies or substantial portions of the Software.
11309dnl
11310dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
11311dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
11312dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11313dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
11314dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
11315dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
11316dnl OTHER DEALINGS IN THE SOFTWARE.
11317dnl
11318dnl Except as contained in this notice, the name of the copyright holders shall
11319dnl not be used in advertising or otherwise to promote the sale, use or
11320dnl other dealings in this Software without prior written authorization
11321dnl from the copyright holders.
11322dnl
11323
11324# XORG_RELEASE_VERSION
11325# --------------------
11326# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
11327
11328AC_DEFUN([XORG_RELEASE_VERSION],[
11329	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
11330		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
11331		[Major version of this package])
11332	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
11333	if test "x$PVM" = "x"; then
11334		PVM="0"
11335	fi
11336	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
11337		[$PVM],
11338		[Minor version of this package])
11339	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
11340	if test "x$PVP" = "x"; then
11341		PVP="0"
11342	fi
11343	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
11344		[$PVP],
11345		[Patch version of this package])
11346])
11347
11348# XORG_CHANGELOG()
11349# ----------------
11350# Minimum version: 1.2.0
11351#
11352# Defines the variable CHANGELOG_CMD as the command to generate
11353# ChangeLog from git.
11354#
11355#
11356AC_DEFUN([XORG_CHANGELOG], [
11357CHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \
11358mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
11359|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \
11360touch \$(top_srcdir)/ChangeLog; \
11361echo 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))"
11362AC_SUBST([CHANGELOG_CMD])
11363]) # XORG_CHANGELOG
11364
11365dnl Copyright 2005 Red Hat, Inc
11366dnl 
11367dnl Permission to use, copy, modify, distribute, and sell this software and its
11368dnl documentation for any purpose is hereby granted without fee, provided that
11369dnl the above copyright notice appear in all copies and that both that
11370dnl copyright notice and this permission notice appear in supporting
11371dnl documentation.
11372dnl 
11373dnl The above copyright notice and this permission notice shall be included
11374dnl in all copies or substantial portions of the Software.
11375dnl 
11376dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
11377dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
11378dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11379dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
11380dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
11381dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
11382dnl OTHER DEALINGS IN THE SOFTWARE.
11383dnl 
11384dnl Except as contained in this notice, the name of the copyright holders shall
11385dnl not be used in advertising or otherwise to promote the sale, use or
11386dnl other dealings in this Software without prior written authorization
11387dnl from the copyright holders.
11388dnl 
11389
11390# XORG_DRIVER_CHECK_EXT(MACRO, PROTO)
11391# --------------------------
11392# Checks for the MACRO define in xorg-server.h (from the sdk).  If it
11393# is defined, then add the given PROTO to $REQUIRED_MODULES.
11394
11395AC_DEFUN([XORG_DRIVER_CHECK_EXT],[
11396	AC_REQUIRE([PKG_PROG_PKG_CONFIG])
11397	SAVE_CFLAGS="$CFLAGS"
11398	CFLAGS="$CFLAGS `$PKG_CONFIG --cflags xorg-server`"
11399	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
11400#include "xorg-server.h"
11401#if !defined $1
11402#error $1 not defined
11403#endif
11404		]])],
11405		[_EXT_CHECK=yes],
11406		[_EXT_CHECK=no])
11407	CFLAGS="$SAVE_CFLAGS"
11408	AC_MSG_CHECKING([if $1 is defined])
11409	AC_MSG_RESULT([$_EXT_CHECK])
11410	if test "$_EXT_CHECK" != no; then
11411		REQUIRED_MODULES="$REQUIRED_MODULES $2"
11412	fi
11413])
11414
11415# Copyright (C) 2002-2021 Free Software Foundation, Inc.
11416#
11417# This file is free software; the Free Software Foundation
11418# gives unlimited permission to copy and/or distribute it,
11419# with or without modifications, as long as this notice is preserved.
11420
11421# AM_AUTOMAKE_VERSION(VERSION)
11422# ----------------------------
11423# Automake X.Y traces this macro to ensure aclocal.m4 has been
11424# generated from the m4 files accompanying Automake X.Y.
11425# (This private macro should not be called outside this file.)
11426AC_DEFUN([AM_AUTOMAKE_VERSION],
11427[am__api_version='1.16'
11428dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
11429dnl require some minimum version.  Point them to the right macro.
11430m4_if([$1], [1.16.5], [],
11431      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
11432])
11433
11434# _AM_AUTOCONF_VERSION(VERSION)
11435# -----------------------------
11436# aclocal traces this macro to find the Autoconf version.
11437# This is a private macro too.  Using m4_define simplifies
11438# the logic in aclocal, which can simply ignore this definition.
11439m4_define([_AM_AUTOCONF_VERSION], [])
11440
11441# AM_SET_CURRENT_AUTOMAKE_VERSION
11442# -------------------------------
11443# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
11444# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
11445AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
11446[AM_AUTOMAKE_VERSION([1.16.5])dnl
11447m4_ifndef([AC_AUTOCONF_VERSION],
11448  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
11449_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
11450
11451# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
11452
11453# Copyright (C) 2001-2021 Free Software Foundation, Inc.
11454#
11455# This file is free software; the Free Software Foundation
11456# gives unlimited permission to copy and/or distribute it,
11457# with or without modifications, as long as this notice is preserved.
11458
11459# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
11460# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
11461# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
11462#
11463# Of course, Automake must honor this variable whenever it calls a
11464# tool from the auxiliary directory.  The problem is that $srcdir (and
11465# therefore $ac_aux_dir as well) can be either absolute or relative,
11466# depending on how configure is run.  This is pretty annoying, since
11467# it makes $ac_aux_dir quite unusable in subdirectories: in the top
11468# source directory, any form will work fine, but in subdirectories a
11469# relative path needs to be adjusted first.
11470#
11471# $ac_aux_dir/missing
11472#    fails when called from a subdirectory if $ac_aux_dir is relative
11473# $top_srcdir/$ac_aux_dir/missing
11474#    fails if $ac_aux_dir is absolute,
11475#    fails when called from a subdirectory in a VPATH build with
11476#          a relative $ac_aux_dir
11477#
11478# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
11479# are both prefixed by $srcdir.  In an in-source build this is usually
11480# harmless because $srcdir is '.', but things will broke when you
11481# start a VPATH build or use an absolute $srcdir.
11482#
11483# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
11484# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
11485#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
11486# and then we would define $MISSING as
11487#   MISSING="\${SHELL} $am_aux_dir/missing"
11488# This will work as long as MISSING is not called from configure, because
11489# unfortunately $(top_srcdir) has no meaning in configure.
11490# However there are other variables, like CC, which are often used in
11491# configure, and could therefore not use this "fixed" $ac_aux_dir.
11492#
11493# Another solution, used here, is to always expand $ac_aux_dir to an
11494# absolute PATH.  The drawback is that using absolute paths prevent a
11495# configured tree to be moved without reconfiguration.
11496
11497AC_DEFUN([AM_AUX_DIR_EXPAND],
11498[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
11499# Expand $ac_aux_dir to an absolute path.
11500am_aux_dir=`cd "$ac_aux_dir" && pwd`
11501])
11502
11503# AM_CONDITIONAL                                            -*- Autoconf -*-
11504
11505# Copyright (C) 1997-2021 Free Software Foundation, Inc.
11506#
11507# This file is free software; the Free Software Foundation
11508# gives unlimited permission to copy and/or distribute it,
11509# with or without modifications, as long as this notice is preserved.
11510
11511# AM_CONDITIONAL(NAME, SHELL-CONDITION)
11512# -------------------------------------
11513# Define a conditional.
11514AC_DEFUN([AM_CONDITIONAL],
11515[AC_PREREQ([2.52])dnl
11516 m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
11517       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
11518AC_SUBST([$1_TRUE])dnl
11519AC_SUBST([$1_FALSE])dnl
11520_AM_SUBST_NOTMAKE([$1_TRUE])dnl
11521_AM_SUBST_NOTMAKE([$1_FALSE])dnl
11522m4_define([_AM_COND_VALUE_$1], [$2])dnl
11523if $2; then
11524  $1_TRUE=
11525  $1_FALSE='#'
11526else
11527  $1_TRUE='#'
11528  $1_FALSE=
11529fi
11530AC_CONFIG_COMMANDS_PRE(
11531[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
11532  AC_MSG_ERROR([[conditional "$1" was never defined.
11533Usually this means the macro was only invoked conditionally.]])
11534fi])])
11535
11536# Copyright (C) 1999-2021 Free Software Foundation, Inc.
11537#
11538# This file is free software; the Free Software Foundation
11539# gives unlimited permission to copy and/or distribute it,
11540# with or without modifications, as long as this notice is preserved.
11541
11542
11543# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
11544# written in clear, in which case automake, when reading aclocal.m4,
11545# will think it sees a *use*, and therefore will trigger all it's
11546# C support machinery.  Also note that it means that autoscan, seeing
11547# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
11548
11549
11550# _AM_DEPENDENCIES(NAME)
11551# ----------------------
11552# See how the compiler implements dependency checking.
11553# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
11554# We try a few techniques and use that to set a single cache variable.
11555#
11556# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
11557# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
11558# dependency, and given that the user is not expected to run this macro,
11559# just rely on AC_PROG_CC.
11560AC_DEFUN([_AM_DEPENDENCIES],
11561[AC_REQUIRE([AM_SET_DEPDIR])dnl
11562AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
11563AC_REQUIRE([AM_MAKE_INCLUDE])dnl
11564AC_REQUIRE([AM_DEP_TRACK])dnl
11565
11566m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
11567      [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
11568      [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
11569      [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
11570      [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
11571      [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
11572                    [depcc="$$1"   am_compiler_list=])
11573
11574AC_CACHE_CHECK([dependency style of $depcc],
11575               [am_cv_$1_dependencies_compiler_type],
11576[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
11577  # We make a subdir and do the tests there.  Otherwise we can end up
11578  # making bogus files that we don't know about and never remove.  For
11579  # instance it was reported that on HP-UX the gcc test will end up
11580  # making a dummy file named 'D' -- because '-MD' means "put the output
11581  # in D".
11582  rm -rf conftest.dir
11583  mkdir conftest.dir
11584  # Copy depcomp to subdir because otherwise we won't find it if we're
11585  # using a relative directory.
11586  cp "$am_depcomp" conftest.dir
11587  cd conftest.dir
11588  # We will build objects and dependencies in a subdirectory because
11589  # it helps to detect inapplicable dependency modes.  For instance
11590  # both Tru64's cc and ICC support -MD to output dependencies as a
11591  # side effect of compilation, but ICC will put the dependencies in
11592  # the current directory while Tru64 will put them in the object
11593  # directory.
11594  mkdir sub
11595
11596  am_cv_$1_dependencies_compiler_type=none
11597  if test "$am_compiler_list" = ""; then
11598     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
11599  fi
11600  am__universal=false
11601  m4_case([$1], [CC],
11602    [case " $depcc " in #(
11603     *\ -arch\ *\ -arch\ *) am__universal=true ;;
11604     esac],
11605    [CXX],
11606    [case " $depcc " in #(
11607     *\ -arch\ *\ -arch\ *) am__universal=true ;;
11608     esac])
11609
11610  for depmode in $am_compiler_list; do
11611    # Setup a source with many dependencies, because some compilers
11612    # like to wrap large dependency lists on column 80 (with \), and
11613    # we should not choose a depcomp mode which is confused by this.
11614    #
11615    # We need to recreate these files for each test, as the compiler may
11616    # overwrite some of them when testing with obscure command lines.
11617    # This happens at least with the AIX C compiler.
11618    : > sub/conftest.c
11619    for i in 1 2 3 4 5 6; do
11620      echo '#include "conftst'$i'.h"' >> sub/conftest.c
11621      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
11622      # Solaris 10 /bin/sh.
11623      echo '/* dummy */' > sub/conftst$i.h
11624    done
11625    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
11626
11627    # We check with '-c' and '-o' for the sake of the "dashmstdout"
11628    # mode.  It turns out that the SunPro C++ compiler does not properly
11629    # handle '-M -o', and we need to detect this.  Also, some Intel
11630    # versions had trouble with output in subdirs.
11631    am__obj=sub/conftest.${OBJEXT-o}
11632    am__minus_obj="-o $am__obj"
11633    case $depmode in
11634    gcc)
11635      # This depmode causes a compiler race in universal mode.
11636      test "$am__universal" = false || continue
11637      ;;
11638    nosideeffect)
11639      # After this tag, mechanisms are not by side-effect, so they'll
11640      # only be used when explicitly requested.
11641      if test "x$enable_dependency_tracking" = xyes; then
11642	continue
11643      else
11644	break
11645      fi
11646      ;;
11647    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
11648      # This compiler won't grok '-c -o', but also, the minuso test has
11649      # not run yet.  These depmodes are late enough in the game, and
11650      # so weak that their functioning should not be impacted.
11651      am__obj=conftest.${OBJEXT-o}
11652      am__minus_obj=
11653      ;;
11654    none) break ;;
11655    esac
11656    if depmode=$depmode \
11657       source=sub/conftest.c object=$am__obj \
11658       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
11659       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
11660         >/dev/null 2>conftest.err &&
11661       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
11662       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
11663       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
11664       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
11665      # icc doesn't choke on unknown options, it will just issue warnings
11666      # or remarks (even with -Werror).  So we grep stderr for any message
11667      # that says an option was ignored or not supported.
11668      # When given -MP, icc 7.0 and 7.1 complain thusly:
11669      #   icc: Command line warning: ignoring option '-M'; no argument required
11670      # The diagnosis changed in icc 8.0:
11671      #   icc: Command line remark: option '-MP' not supported
11672      if (grep 'ignoring option' conftest.err ||
11673          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
11674        am_cv_$1_dependencies_compiler_type=$depmode
11675        break
11676      fi
11677    fi
11678  done
11679
11680  cd ..
11681  rm -rf conftest.dir
11682else
11683  am_cv_$1_dependencies_compiler_type=none
11684fi
11685])
11686AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
11687AM_CONDITIONAL([am__fastdep$1], [
11688  test "x$enable_dependency_tracking" != xno \
11689  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
11690])
11691
11692
11693# AM_SET_DEPDIR
11694# -------------
11695# Choose a directory name for dependency files.
11696# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
11697AC_DEFUN([AM_SET_DEPDIR],
11698[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
11699AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
11700])
11701
11702
11703# AM_DEP_TRACK
11704# ------------
11705AC_DEFUN([AM_DEP_TRACK],
11706[AC_ARG_ENABLE([dependency-tracking], [dnl
11707AS_HELP_STRING(
11708  [--enable-dependency-tracking],
11709  [do not reject slow dependency extractors])
11710AS_HELP_STRING(
11711  [--disable-dependency-tracking],
11712  [speeds up one-time build])])
11713if test "x$enable_dependency_tracking" != xno; then
11714  am_depcomp="$ac_aux_dir/depcomp"
11715  AMDEPBACKSLASH='\'
11716  am__nodep='_no'
11717fi
11718AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
11719AC_SUBST([AMDEPBACKSLASH])dnl
11720_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
11721AC_SUBST([am__nodep])dnl
11722_AM_SUBST_NOTMAKE([am__nodep])dnl
11723])
11724
11725# Generate code to set up dependency tracking.              -*- Autoconf -*-
11726
11727# Copyright (C) 1999-2021 Free Software Foundation, Inc.
11728#
11729# This file is free software; the Free Software Foundation
11730# gives unlimited permission to copy and/or distribute it,
11731# with or without modifications, as long as this notice is preserved.
11732
11733# _AM_OUTPUT_DEPENDENCY_COMMANDS
11734# ------------------------------
11735AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
11736[{
11737  # Older Autoconf quotes --file arguments for eval, but not when files
11738  # are listed without --file.  Let's play safe and only enable the eval
11739  # if we detect the quoting.
11740  # TODO: see whether this extra hack can be removed once we start
11741  # requiring Autoconf 2.70 or later.
11742  AS_CASE([$CONFIG_FILES],
11743          [*\'*], [eval set x "$CONFIG_FILES"],
11744          [*], [set x $CONFIG_FILES])
11745  shift
11746  # Used to flag and report bootstrapping failures.
11747  am_rc=0
11748  for am_mf
11749  do
11750    # Strip MF so we end up with the name of the file.
11751    am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
11752    # Check whether this is an Automake generated Makefile which includes
11753    # dependency-tracking related rules and includes.
11754    # Grep'ing the whole file directly is not great: AIX grep has a line
11755    # limit of 2048, but all sed's we know have understand at least 4000.
11756    sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
11757      || continue
11758    am_dirpart=`AS_DIRNAME(["$am_mf"])`
11759    am_filepart=`AS_BASENAME(["$am_mf"])`
11760    AM_RUN_LOG([cd "$am_dirpart" \
11761      && sed -e '/# am--include-marker/d' "$am_filepart" \
11762        | $MAKE -f - am--depfiles]) || am_rc=$?
11763  done
11764  if test $am_rc -ne 0; then
11765    AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
11766    for automatic dependency tracking.  If GNU make was not used, consider
11767    re-running the configure script with MAKE="gmake" (or whatever is
11768    necessary).  You can also try re-running configure with the
11769    '--disable-dependency-tracking' option to at least be able to build
11770    the package (albeit without support for automatic dependency tracking).])
11771  fi
11772  AS_UNSET([am_dirpart])
11773  AS_UNSET([am_filepart])
11774  AS_UNSET([am_mf])
11775  AS_UNSET([am_rc])
11776  rm -f conftest-deps.mk
11777}
11778])# _AM_OUTPUT_DEPENDENCY_COMMANDS
11779
11780
11781# AM_OUTPUT_DEPENDENCY_COMMANDS
11782# -----------------------------
11783# This macro should only be invoked once -- use via AC_REQUIRE.
11784#
11785# This code is only required when automatic dependency tracking is enabled.
11786# This creates each '.Po' and '.Plo' makefile fragment that we'll need in
11787# order to bootstrap the dependency handling code.
11788AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
11789[AC_CONFIG_COMMANDS([depfiles],
11790     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
11791     [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
11792
11793# Do all the work for Automake.                             -*- Autoconf -*-
11794
11795# Copyright (C) 1996-2021 Free Software Foundation, Inc.
11796#
11797# This file is free software; the Free Software Foundation
11798# gives unlimited permission to copy and/or distribute it,
11799# with or without modifications, as long as this notice is preserved.
11800
11801# This macro actually does too much.  Some checks are only needed if
11802# your package does certain things.  But this isn't really a big deal.
11803
11804dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
11805m4_define([AC_PROG_CC],
11806m4_defn([AC_PROG_CC])
11807[_AM_PROG_CC_C_O
11808])
11809
11810# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
11811# AM_INIT_AUTOMAKE([OPTIONS])
11812# -----------------------------------------------
11813# The call with PACKAGE and VERSION arguments is the old style
11814# call (pre autoconf-2.50), which is being phased out.  PACKAGE
11815# and VERSION should now be passed to AC_INIT and removed from
11816# the call to AM_INIT_AUTOMAKE.
11817# We support both call styles for the transition.  After
11818# the next Automake release, Autoconf can make the AC_INIT
11819# arguments mandatory, and then we can depend on a new Autoconf
11820# release and drop the old call support.
11821AC_DEFUN([AM_INIT_AUTOMAKE],
11822[AC_PREREQ([2.65])dnl
11823m4_ifdef([_$0_ALREADY_INIT],
11824  [m4_fatal([$0 expanded multiple times
11825]m4_defn([_$0_ALREADY_INIT]))],
11826  [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl
11827dnl Autoconf wants to disallow AM_ names.  We explicitly allow
11828dnl the ones we care about.
11829m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
11830AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
11831AC_REQUIRE([AC_PROG_INSTALL])dnl
11832if test "`cd $srcdir && pwd`" != "`pwd`"; then
11833  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
11834  # is not polluted with repeated "-I."
11835  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
11836  # test to see if srcdir already configured
11837  if test -f $srcdir/config.status; then
11838    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
11839  fi
11840fi
11841
11842# test whether we have cygpath
11843if test -z "$CYGPATH_W"; then
11844  if (cygpath --version) >/dev/null 2>/dev/null; then
11845    CYGPATH_W='cygpath -w'
11846  else
11847    CYGPATH_W=echo
11848  fi
11849fi
11850AC_SUBST([CYGPATH_W])
11851
11852# Define the identity of the package.
11853dnl Distinguish between old-style and new-style calls.
11854m4_ifval([$2],
11855[AC_DIAGNOSE([obsolete],
11856             [$0: two- and three-arguments forms are deprecated.])
11857m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
11858 AC_SUBST([PACKAGE], [$1])dnl
11859 AC_SUBST([VERSION], [$2])],
11860[_AM_SET_OPTIONS([$1])dnl
11861dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
11862m4_if(
11863  m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]),
11864  [ok:ok],,
11865  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
11866 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
11867 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
11868
11869_AM_IF_OPTION([no-define],,
11870[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
11871 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
11872
11873# Some tools Automake needs.
11874AC_REQUIRE([AM_SANITY_CHECK])dnl
11875AC_REQUIRE([AC_ARG_PROGRAM])dnl
11876AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
11877AM_MISSING_PROG([AUTOCONF], [autoconf])
11878AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
11879AM_MISSING_PROG([AUTOHEADER], [autoheader])
11880AM_MISSING_PROG([MAKEINFO], [makeinfo])
11881AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
11882AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
11883AC_REQUIRE([AC_PROG_MKDIR_P])dnl
11884# For better backward compatibility.  To be removed once Automake 1.9.x
11885# dies out for good.  For more background, see:
11886# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
11887# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
11888AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
11889# We need awk for the "check" target (and possibly the TAP driver).  The
11890# system "awk" is bad on some platforms.
11891AC_REQUIRE([AC_PROG_AWK])dnl
11892AC_REQUIRE([AC_PROG_MAKE_SET])dnl
11893AC_REQUIRE([AM_SET_LEADING_DOT])dnl
11894_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
11895	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
11896			     [_AM_PROG_TAR([v7])])])
11897_AM_IF_OPTION([no-dependencies],,
11898[AC_PROVIDE_IFELSE([AC_PROG_CC],
11899		  [_AM_DEPENDENCIES([CC])],
11900		  [m4_define([AC_PROG_CC],
11901			     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
11902AC_PROVIDE_IFELSE([AC_PROG_CXX],
11903		  [_AM_DEPENDENCIES([CXX])],
11904		  [m4_define([AC_PROG_CXX],
11905			     m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
11906AC_PROVIDE_IFELSE([AC_PROG_OBJC],
11907		  [_AM_DEPENDENCIES([OBJC])],
11908		  [m4_define([AC_PROG_OBJC],
11909			     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
11910AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
11911		  [_AM_DEPENDENCIES([OBJCXX])],
11912		  [m4_define([AC_PROG_OBJCXX],
11913			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
11914])
11915# Variables for tags utilities; see am/tags.am
11916if test -z "$CTAGS"; then
11917  CTAGS=ctags
11918fi
11919AC_SUBST([CTAGS])
11920if test -z "$ETAGS"; then
11921  ETAGS=etags
11922fi
11923AC_SUBST([ETAGS])
11924if test -z "$CSCOPE"; then
11925  CSCOPE=cscope
11926fi
11927AC_SUBST([CSCOPE])
11928
11929AC_REQUIRE([AM_SILENT_RULES])dnl
11930dnl The testsuite driver may need to know about EXEEXT, so add the
11931dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
11932dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
11933AC_CONFIG_COMMANDS_PRE(dnl
11934[m4_provide_if([_AM_COMPILER_EXEEXT],
11935  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
11936
11937# POSIX will say in a future version that running "rm -f" with no argument
11938# is OK; and we want to be able to make that assumption in our Makefile
11939# recipes.  So use an aggressive probe to check that the usage we want is
11940# actually supported "in the wild" to an acceptable degree.
11941# See automake bug#10828.
11942# To make any issue more visible, cause the running configure to be aborted
11943# by default if the 'rm' program in use doesn't match our expectations; the
11944# user can still override this though.
11945if rm -f && rm -fr && rm -rf; then : OK; else
11946  cat >&2 <<'END'
11947Oops!
11948
11949Your 'rm' program seems unable to run without file operands specified
11950on the command line, even when the '-f' option is present.  This is contrary
11951to the behaviour of most rm programs out there, and not conforming with
11952the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
11953
11954Please tell bug-automake@gnu.org about your system, including the value
11955of your $PATH and any error possibly output before this message.  This
11956can help us improve future automake versions.
11957
11958END
11959  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
11960    echo 'Configuration will proceed anyway, since you have set the' >&2
11961    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
11962    echo >&2
11963  else
11964    cat >&2 <<'END'
11965Aborting the configuration process, to ensure you take notice of the issue.
11966
11967You can download and install GNU coreutils to get an 'rm' implementation
11968that behaves properly: <https://www.gnu.org/software/coreutils/>.
11969
11970If you want to complete the configuration process using your problematic
11971'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
11972to "yes", and re-run configure.
11973
11974END
11975    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
11976  fi
11977fi
11978dnl The trailing newline in this macro's definition is deliberate, for
11979dnl backward compatibility and to allow trailing 'dnl'-style comments
11980dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
11981])
11982
11983dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
11984dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
11985dnl mangled by Autoconf and run in a shell conditional statement.
11986m4_define([_AC_COMPILER_EXEEXT],
11987m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
11988
11989# When config.status generates a header, we must update the stamp-h file.
11990# This file resides in the same directory as the config header
11991# that is generated.  The stamp files are numbered to have different names.
11992
11993# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
11994# loop where config.status creates the headers, so we can generate
11995# our stamp files there.
11996AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
11997[# Compute $1's index in $config_headers.
11998_am_arg=$1
11999_am_stamp_count=1
12000for _am_header in $config_headers :; do
12001  case $_am_header in
12002    $_am_arg | $_am_arg:* )
12003      break ;;
12004    * )
12005      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
12006  esac
12007done
12008echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
12009
12010# Copyright (C) 2001-2021 Free Software Foundation, Inc.
12011#
12012# This file is free software; the Free Software Foundation
12013# gives unlimited permission to copy and/or distribute it,
12014# with or without modifications, as long as this notice is preserved.
12015
12016# AM_PROG_INSTALL_SH
12017# ------------------
12018# Define $install_sh.
12019AC_DEFUN([AM_PROG_INSTALL_SH],
12020[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
12021if test x"${install_sh+set}" != xset; then
12022  case $am_aux_dir in
12023  *\ * | *\	*)
12024    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
12025  *)
12026    install_sh="\${SHELL} $am_aux_dir/install-sh"
12027  esac
12028fi
12029AC_SUBST([install_sh])])
12030
12031# Copyright (C) 2003-2021 Free Software Foundation, Inc.
12032#
12033# This file is free software; the Free Software Foundation
12034# gives unlimited permission to copy and/or distribute it,
12035# with or without modifications, as long as this notice is preserved.
12036
12037# Check whether the underlying file-system supports filenames
12038# with a leading dot.  For instance MS-DOS doesn't.
12039AC_DEFUN([AM_SET_LEADING_DOT],
12040[rm -rf .tst 2>/dev/null
12041mkdir .tst 2>/dev/null
12042if test -d .tst; then
12043  am__leading_dot=.
12044else
12045  am__leading_dot=_
12046fi
12047rmdir .tst 2>/dev/null
12048AC_SUBST([am__leading_dot])])
12049
12050# Check to see how 'make' treats includes.	            -*- Autoconf -*-
12051
12052# Copyright (C) 2001-2021 Free Software Foundation, Inc.
12053#
12054# This file is free software; the Free Software Foundation
12055# gives unlimited permission to copy and/or distribute it,
12056# with or without modifications, as long as this notice is preserved.
12057
12058# AM_MAKE_INCLUDE()
12059# -----------------
12060# Check whether make has an 'include' directive that can support all
12061# the idioms we need for our automatic dependency tracking code.
12062AC_DEFUN([AM_MAKE_INCLUDE],
12063[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
12064cat > confinc.mk << 'END'
12065am__doit:
12066	@echo this is the am__doit target >confinc.out
12067.PHONY: am__doit
12068END
12069am__include="#"
12070am__quote=
12071# BSD make does it like this.
12072echo '.include "confinc.mk" # ignored' > confmf.BSD
12073# Other make implementations (GNU, Solaris 10, AIX) do it like this.
12074echo 'include confinc.mk # ignored' > confmf.GNU
12075_am_result=no
12076for s in GNU BSD; do
12077  AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
12078  AS_CASE([$?:`cat confinc.out 2>/dev/null`],
12079      ['0:this is the am__doit target'],
12080      [AS_CASE([$s],
12081          [BSD], [am__include='.include' am__quote='"'],
12082          [am__include='include' am__quote=''])])
12083  if test "$am__include" != "#"; then
12084    _am_result="yes ($s style)"
12085    break
12086  fi
12087done
12088rm -f confinc.* confmf.*
12089AC_MSG_RESULT([${_am_result}])
12090AC_SUBST([am__include])])
12091AC_SUBST([am__quote])])
12092
12093# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
12094
12095# Copyright (C) 1997-2021 Free Software Foundation, Inc.
12096#
12097# This file is free software; the Free Software Foundation
12098# gives unlimited permission to copy and/or distribute it,
12099# with or without modifications, as long as this notice is preserved.
12100
12101# AM_MISSING_PROG(NAME, PROGRAM)
12102# ------------------------------
12103AC_DEFUN([AM_MISSING_PROG],
12104[AC_REQUIRE([AM_MISSING_HAS_RUN])
12105$1=${$1-"${am_missing_run}$2"}
12106AC_SUBST($1)])
12107
12108# AM_MISSING_HAS_RUN
12109# ------------------
12110# Define MISSING if not defined so far and test if it is modern enough.
12111# If it is, set am_missing_run to use it, otherwise, to nothing.
12112AC_DEFUN([AM_MISSING_HAS_RUN],
12113[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
12114AC_REQUIRE_AUX_FILE([missing])dnl
12115if test x"${MISSING+set}" != xset; then
12116  MISSING="\${SHELL} '$am_aux_dir/missing'"
12117fi
12118# Use eval to expand $SHELL
12119if eval "$MISSING --is-lightweight"; then
12120  am_missing_run="$MISSING "
12121else
12122  am_missing_run=
12123  AC_MSG_WARN(['missing' script is too old or missing])
12124fi
12125])
12126
12127# Helper functions for option handling.                     -*- Autoconf -*-
12128
12129# Copyright (C) 2001-2021 Free Software Foundation, Inc.
12130#
12131# This file is free software; the Free Software Foundation
12132# gives unlimited permission to copy and/or distribute it,
12133# with or without modifications, as long as this notice is preserved.
12134
12135# _AM_MANGLE_OPTION(NAME)
12136# -----------------------
12137AC_DEFUN([_AM_MANGLE_OPTION],
12138[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
12139
12140# _AM_SET_OPTION(NAME)
12141# --------------------
12142# Set option NAME.  Presently that only means defining a flag for this option.
12143AC_DEFUN([_AM_SET_OPTION],
12144[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
12145
12146# _AM_SET_OPTIONS(OPTIONS)
12147# ------------------------
12148# OPTIONS is a space-separated list of Automake options.
12149AC_DEFUN([_AM_SET_OPTIONS],
12150[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
12151
12152# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
12153# -------------------------------------------
12154# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
12155AC_DEFUN([_AM_IF_OPTION],
12156[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
12157
12158# Copyright (C) 1999-2021 Free Software Foundation, Inc.
12159#
12160# This file is free software; the Free Software Foundation
12161# gives unlimited permission to copy and/or distribute it,
12162# with or without modifications, as long as this notice is preserved.
12163
12164# _AM_PROG_CC_C_O
12165# ---------------
12166# Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
12167# to automatically call this.
12168AC_DEFUN([_AM_PROG_CC_C_O],
12169[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
12170AC_REQUIRE_AUX_FILE([compile])dnl
12171AC_LANG_PUSH([C])dnl
12172AC_CACHE_CHECK(
12173  [whether $CC understands -c and -o together],
12174  [am_cv_prog_cc_c_o],
12175  [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
12176  # Make sure it works both with $CC and with simple cc.
12177  # Following AC_PROG_CC_C_O, we do the test twice because some
12178  # compilers refuse to overwrite an existing .o file with -o,
12179  # though they will create one.
12180  am_cv_prog_cc_c_o=yes
12181  for am_i in 1 2; do
12182    if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
12183         && test -f conftest2.$ac_objext; then
12184      : OK
12185    else
12186      am_cv_prog_cc_c_o=no
12187      break
12188    fi
12189  done
12190  rm -f core conftest*
12191  unset am_i])
12192if test "$am_cv_prog_cc_c_o" != yes; then
12193   # Losing compiler, so override with the script.
12194   # FIXME: It is wrong to rewrite CC.
12195   # But if we don't then we get into trouble of one sort or another.
12196   # A longer-term fix would be to have automake use am__CC in this case,
12197   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
12198   CC="$am_aux_dir/compile $CC"
12199fi
12200AC_LANG_POP([C])])
12201
12202# For backward compatibility.
12203AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
12204
12205# Copyright (C) 2001-2021 Free Software Foundation, Inc.
12206#
12207# This file is free software; the Free Software Foundation
12208# gives unlimited permission to copy and/or distribute it,
12209# with or without modifications, as long as this notice is preserved.
12210
12211# AM_RUN_LOG(COMMAND)
12212# -------------------
12213# Run COMMAND, save the exit status in ac_status, and log it.
12214# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
12215AC_DEFUN([AM_RUN_LOG],
12216[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
12217   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
12218   ac_status=$?
12219   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
12220   (exit $ac_status); }])
12221
12222# Check to make sure that the build environment is sane.    -*- Autoconf -*-
12223
12224# Copyright (C) 1996-2021 Free Software Foundation, Inc.
12225#
12226# This file is free software; the Free Software Foundation
12227# gives unlimited permission to copy and/or distribute it,
12228# with or without modifications, as long as this notice is preserved.
12229
12230# AM_SANITY_CHECK
12231# ---------------
12232AC_DEFUN([AM_SANITY_CHECK],
12233[AC_MSG_CHECKING([whether build environment is sane])
12234# Reject unsafe characters in $srcdir or the absolute working directory
12235# name.  Accept space and tab only in the latter.
12236am_lf='
12237'
12238case `pwd` in
12239  *[[\\\"\#\$\&\'\`$am_lf]]*)
12240    AC_MSG_ERROR([unsafe absolute working directory name]);;
12241esac
12242case $srcdir in
12243  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
12244    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
12245esac
12246
12247# Do 'set' in a subshell so we don't clobber the current shell's
12248# arguments.  Must try -L first in case configure is actually a
12249# symlink; some systems play weird games with the mod time of symlinks
12250# (eg FreeBSD returns the mod time of the symlink's containing
12251# directory).
12252if (
12253   am_has_slept=no
12254   for am_try in 1 2; do
12255     echo "timestamp, slept: $am_has_slept" > conftest.file
12256     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
12257     if test "$[*]" = "X"; then
12258	# -L didn't work.
12259	set X `ls -t "$srcdir/configure" conftest.file`
12260     fi
12261     if test "$[*]" != "X $srcdir/configure conftest.file" \
12262	&& test "$[*]" != "X conftest.file $srcdir/configure"; then
12263
12264	# If neither matched, then we have a broken ls.  This can happen
12265	# if, for instance, CONFIG_SHELL is bash and it inherits a
12266	# broken ls alias from the environment.  This has actually
12267	# happened.  Such a system could not be considered "sane".
12268	AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
12269  alias in your environment])
12270     fi
12271     if test "$[2]" = conftest.file || test $am_try -eq 2; then
12272       break
12273     fi
12274     # Just in case.
12275     sleep 1
12276     am_has_slept=yes
12277   done
12278   test "$[2]" = conftest.file
12279   )
12280then
12281   # Ok.
12282   :
12283else
12284   AC_MSG_ERROR([newly created file is older than distributed files!
12285Check your system clock])
12286fi
12287AC_MSG_RESULT([yes])
12288# If we didn't sleep, we still need to ensure time stamps of config.status and
12289# generated files are strictly newer.
12290am_sleep_pid=
12291if grep 'slept: no' conftest.file >/dev/null 2>&1; then
12292  ( sleep 1 ) &
12293  am_sleep_pid=$!
12294fi
12295AC_CONFIG_COMMANDS_PRE(
12296  [AC_MSG_CHECKING([that generated files are newer than configure])
12297   if test -n "$am_sleep_pid"; then
12298     # Hide warnings about reused PIDs.
12299     wait $am_sleep_pid 2>/dev/null
12300   fi
12301   AC_MSG_RESULT([done])])
12302rm -f conftest.file
12303])
12304
12305# Copyright (C) 2009-2021 Free Software Foundation, Inc.
12306#
12307# This file is free software; the Free Software Foundation
12308# gives unlimited permission to copy and/or distribute it,
12309# with or without modifications, as long as this notice is preserved.
12310
12311# AM_SILENT_RULES([DEFAULT])
12312# --------------------------
12313# Enable less verbose build rules; with the default set to DEFAULT
12314# ("yes" being less verbose, "no" or empty being verbose).
12315AC_DEFUN([AM_SILENT_RULES],
12316[AC_ARG_ENABLE([silent-rules], [dnl
12317AS_HELP_STRING(
12318  [--enable-silent-rules],
12319  [less verbose build output (undo: "make V=1")])
12320AS_HELP_STRING(
12321  [--disable-silent-rules],
12322  [verbose build output (undo: "make V=0")])dnl
12323])
12324case $enable_silent_rules in @%:@ (((
12325  yes) AM_DEFAULT_VERBOSITY=0;;
12326   no) AM_DEFAULT_VERBOSITY=1;;
12327    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
12328esac
12329dnl
12330dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
12331dnl do not support nested variable expansions.
12332dnl See automake bug#9928 and bug#10237.
12333am_make=${MAKE-make}
12334AC_CACHE_CHECK([whether $am_make supports nested variables],
12335   [am_cv_make_support_nested_variables],
12336   [if AS_ECHO([['TRUE=$(BAR$(V))
12337BAR0=false
12338BAR1=true
12339V=1
12340am__doit:
12341	@$(TRUE)
12342.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
12343  am_cv_make_support_nested_variables=yes
12344else
12345  am_cv_make_support_nested_variables=no
12346fi])
12347if test $am_cv_make_support_nested_variables = yes; then
12348  dnl Using '$V' instead of '$(V)' breaks IRIX make.
12349  AM_V='$(V)'
12350  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
12351else
12352  AM_V=$AM_DEFAULT_VERBOSITY
12353  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
12354fi
12355AC_SUBST([AM_V])dnl
12356AM_SUBST_NOTMAKE([AM_V])dnl
12357AC_SUBST([AM_DEFAULT_V])dnl
12358AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
12359AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
12360AM_BACKSLASH='\'
12361AC_SUBST([AM_BACKSLASH])dnl
12362_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
12363])
12364
12365# Copyright (C) 2001-2021 Free Software Foundation, Inc.
12366#
12367# This file is free software; the Free Software Foundation
12368# gives unlimited permission to copy and/or distribute it,
12369# with or without modifications, as long as this notice is preserved.
12370
12371# AM_PROG_INSTALL_STRIP
12372# ---------------------
12373# One issue with vendor 'install' (even GNU) is that you can't
12374# specify the program used to strip binaries.  This is especially
12375# annoying in cross-compiling environments, where the build's strip
12376# is unlikely to handle the host's binaries.
12377# Fortunately install-sh will honor a STRIPPROG variable, so we
12378# always use install-sh in "make install-strip", and initialize
12379# STRIPPROG with the value of the STRIP variable (set by the user).
12380AC_DEFUN([AM_PROG_INSTALL_STRIP],
12381[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
12382# Installed binaries are usually stripped using 'strip' when the user
12383# run "make install-strip".  However 'strip' might not be the right
12384# tool to use in cross-compilation environments, therefore Automake
12385# will honor the 'STRIP' environment variable to overrule this program.
12386dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
12387if test "$cross_compiling" != no; then
12388  AC_CHECK_TOOL([STRIP], [strip], :)
12389fi
12390INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
12391AC_SUBST([INSTALL_STRIP_PROGRAM])])
12392
12393# Copyright (C) 2006-2021 Free Software Foundation, Inc.
12394#
12395# This file is free software; the Free Software Foundation
12396# gives unlimited permission to copy and/or distribute it,
12397# with or without modifications, as long as this notice is preserved.
12398
12399# _AM_SUBST_NOTMAKE(VARIABLE)
12400# ---------------------------
12401# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
12402# This macro is traced by Automake.
12403AC_DEFUN([_AM_SUBST_NOTMAKE])
12404
12405# AM_SUBST_NOTMAKE(VARIABLE)
12406# --------------------------
12407# Public sister of _AM_SUBST_NOTMAKE.
12408AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
12409
12410# Check how to create a tarball.                            -*- Autoconf -*-
12411
12412# Copyright (C) 2004-2021 Free Software Foundation, Inc.
12413#
12414# This file is free software; the Free Software Foundation
12415# gives unlimited permission to copy and/or distribute it,
12416# with or without modifications, as long as this notice is preserved.
12417
12418# _AM_PROG_TAR(FORMAT)
12419# --------------------
12420# Check how to create a tarball in format FORMAT.
12421# FORMAT should be one of 'v7', 'ustar', or 'pax'.
12422#
12423# Substitute a variable $(am__tar) that is a command
12424# writing to stdout a FORMAT-tarball containing the directory
12425# $tardir.
12426#     tardir=directory && $(am__tar) > result.tar
12427#
12428# Substitute a variable $(am__untar) that extract such
12429# a tarball read from stdin.
12430#     $(am__untar) < result.tar
12431#
12432AC_DEFUN([_AM_PROG_TAR],
12433[# Always define AMTAR for backward compatibility.  Yes, it's still used
12434# in the wild :-(  We should find a proper way to deprecate it ...
12435AC_SUBST([AMTAR], ['$${TAR-tar}'])
12436
12437# We'll loop over all known methods to create a tar archive until one works.
12438_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
12439
12440m4_if([$1], [v7],
12441  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
12442
12443  [m4_case([$1],
12444    [ustar],
12445     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
12446      # There is notably a 21 bits limit for the UID and the GID.  In fact,
12447      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
12448      # and bug#13588).
12449      am_max_uid=2097151 # 2^21 - 1
12450      am_max_gid=$am_max_uid
12451      # The $UID and $GID variables are not portable, so we need to resort
12452      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
12453      # below are definitely unexpected, so allow the users to see them
12454      # (that is, avoid stderr redirection).
12455      am_uid=`id -u || echo unknown`
12456      am_gid=`id -g || echo unknown`
12457      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
12458      if test $am_uid -le $am_max_uid; then
12459         AC_MSG_RESULT([yes])
12460      else
12461         AC_MSG_RESULT([no])
12462         _am_tools=none
12463      fi
12464      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
12465      if test $am_gid -le $am_max_gid; then
12466         AC_MSG_RESULT([yes])
12467      else
12468        AC_MSG_RESULT([no])
12469        _am_tools=none
12470      fi],
12471
12472  [pax],
12473    [],
12474
12475  [m4_fatal([Unknown tar format])])
12476
12477  AC_MSG_CHECKING([how to create a $1 tar archive])
12478
12479  # Go ahead even if we have the value already cached.  We do so because we
12480  # need to set the values for the 'am__tar' and 'am__untar' variables.
12481  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
12482
12483  for _am_tool in $_am_tools; do
12484    case $_am_tool in
12485    gnutar)
12486      for _am_tar in tar gnutar gtar; do
12487        AM_RUN_LOG([$_am_tar --version]) && break
12488      done
12489      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
12490      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
12491      am__untar="$_am_tar -xf -"
12492      ;;
12493    plaintar)
12494      # Must skip GNU tar: if it does not support --format= it doesn't create
12495      # ustar tarball either.
12496      (tar --version) >/dev/null 2>&1 && continue
12497      am__tar='tar chf - "$$tardir"'
12498      am__tar_='tar chf - "$tardir"'
12499      am__untar='tar xf -'
12500      ;;
12501    pax)
12502      am__tar='pax -L -x $1 -w "$$tardir"'
12503      am__tar_='pax -L -x $1 -w "$tardir"'
12504      am__untar='pax -r'
12505      ;;
12506    cpio)
12507      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
12508      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
12509      am__untar='cpio -i -H $1 -d'
12510      ;;
12511    none)
12512      am__tar=false
12513      am__tar_=false
12514      am__untar=false
12515      ;;
12516    esac
12517
12518    # If the value was cached, stop now.  We just wanted to have am__tar
12519    # and am__untar set.
12520    test -n "${am_cv_prog_tar_$1}" && break
12521
12522    # tar/untar a dummy directory, and stop if the command works.
12523    rm -rf conftest.dir
12524    mkdir conftest.dir
12525    echo GrepMe > conftest.dir/file
12526    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
12527    rm -rf conftest.dir
12528    if test -s conftest.tar; then
12529      AM_RUN_LOG([$am__untar <conftest.tar])
12530      AM_RUN_LOG([cat conftest.dir/file])
12531      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
12532    fi
12533  done
12534  rm -rf conftest.dir
12535
12536  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
12537  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
12538
12539AC_SUBST([am__tar])
12540AC_SUBST([am__untar])
12541]) # _AM_PROG_TAR
12542
12543