1# generated automatically by aclocal 1.15.1 -*- Autoconf -*-
2
3# Copyright (C) 1996-2017 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.69],,
18[m4_warning([this file was generated for autoconf 2.69.
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# Copyright (C) 1995-2002 Free Software Foundation, Inc.
24# Copyright (C) 2001-2003,2004 Red Hat, Inc.
25#
26# This file is free software, distributed under the terms of the GNU
27# General Public License.  As a special exception to the GNU General
28# Public License, this file may be distributed as part of a program
29# that contains a configuration script generated by Autoconf, under
30# the same distribution terms as the rest of that program.
31#
32# This file can be copied and used freely without restrictions.  It can
33# be used in projects which are not available under the GNU Public License
34# but which still want to provide support for the GNU gettext functionality.
35#
36# Macro to add for using GNU gettext.
37# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
38#
39# Modified to never use included libintl.
40# Owen Taylor <otaylor@redhat.com>, 12/15/1998
41#
42# Major rework to remove unused code
43# Owen Taylor <otaylor@redhat.com>, 12/11/2002
44#
45# Added better handling of ALL_LINGUAS from GNU gettext version
46# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
47#
48# Modified to require ngettext
49# Matthias Clasen <mclasen@redhat.com> 08/06/2004
50#
51# We need this here as well, since someone might use autoconf-2.5x
52# to configure GLib then an older version to configure a package
53# using AM_GLIB_GNU_GETTEXT
54AC_PREREQ(2.53)
55
56dnl
57dnl We go to great lengths to make sure that aclocal won't
58dnl try to pull in the installed version of these macros
59dnl when running aclocal in the glib directory.
60dnl
61m4_copy([AC_DEFUN],[glib_DEFUN])
62m4_copy([AC_REQUIRE],[glib_REQUIRE])
63dnl
64dnl At the end, if we're not within glib, we'll define the public
65dnl definitions in terms of our private definitions.
66dnl
67
68# GLIB_LC_MESSAGES
69#--------------------
70glib_DEFUN([GLIB_LC_MESSAGES],
71  [AC_CHECK_HEADERS([locale.h])
72    if test $ac_cv_header_locale_h = yes; then
73    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
74      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
75       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
76    if test $am_cv_val_LC_MESSAGES = yes; then
77      AC_DEFINE(HAVE_LC_MESSAGES, 1,
78        [Define if your <locale.h> file defines LC_MESSAGES.])
79    fi
80  fi])
81
82# GLIB_PATH_PROG_WITH_TEST
83#----------------------------
84dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
85dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
86glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
87[# Extract the first word of "$2", so it can be a program name with args.
88set dummy $2; ac_word=[$]2
89AC_MSG_CHECKING([for $ac_word])
90AC_CACHE_VAL(ac_cv_path_$1,
91[case "[$]$1" in
92  /*)
93  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
94  ;;
95  *)
96  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
97  for ac_dir in ifelse([$5], , $PATH, [$5]); do
98    test -z "$ac_dir" && ac_dir=.
99    if test -f $ac_dir/$ac_word; then
100      if [$3]; then
101	ac_cv_path_$1="$ac_dir/$ac_word"
102	break
103      fi
104    fi
105  done
106  IFS="$ac_save_ifs"
107dnl If no 4th arg is given, leave the cache variable unset,
108dnl so AC_PATH_PROGS will keep looking.
109ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
110])dnl
111  ;;
112esac])dnl
113$1="$ac_cv_path_$1"
114if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
115  AC_MSG_RESULT([$]$1)
116else
117  AC_MSG_RESULT(no)
118fi
119AC_SUBST($1)dnl
120])
121
122dnl Checks for special options needed on Mac OS X.
123dnl Defines INTL_MACOSX_LIBS.
124dnl
125dnl Copied from intlmacosx.m4 in gettext, GPL.
126dnl Copyright (C) 2004-2013 Free Software Foundation, Inc.
127glib_DEFUN([glib_gt_INTL_MACOSX],
128[
129  dnl Check for API introduced in Mac OS X 10.2.
130  AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
131    [gt_cv_func_CFPreferencesCopyAppValue],
132    [gt_save_LIBS="$LIBS"
133     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
134     AC_LINK_IFELSE(
135       [AC_LANG_PROGRAM(
136          [[#include <CoreFoundation/CFPreferences.h>]],
137          [[CFPreferencesCopyAppValue(NULL, NULL)]])],
138       [gt_cv_func_CFPreferencesCopyAppValue=yes],
139       [gt_cv_func_CFPreferencesCopyAppValue=no])
140     LIBS="$gt_save_LIBS"])
141  if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
142    AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
143      [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
144  fi
145  dnl Check for API introduced in Mac OS X 10.3.
146  AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
147    [gt_save_LIBS="$LIBS"
148     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
149     AC_LINK_IFELSE(
150       [AC_LANG_PROGRAM(
151          [[#include <CoreFoundation/CFLocale.h>]],
152          [[CFLocaleCopyCurrent();]])],
153       [gt_cv_func_CFLocaleCopyCurrent=yes],
154       [gt_cv_func_CFLocaleCopyCurrent=no])
155     LIBS="$gt_save_LIBS"])
156  if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
157    AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
158      [Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
159  fi
160  INTL_MACOSX_LIBS=
161  if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
162    INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
163  fi
164  AC_SUBST([INTL_MACOSX_LIBS])
165])
166
167# GLIB_WITH_NLS
168#-----------------
169glib_DEFUN([GLIB_WITH_NLS],
170  dnl NLS is obligatory
171  [USE_NLS=yes
172    AC_SUBST(USE_NLS)
173
174    gt_cv_have_gettext=no
175
176    CATOBJEXT=NONE
177    XGETTEXT=:
178    INTLLIBS=
179
180    glib_gt_INTL_MACOSX
181
182    AC_CHECK_HEADER(libintl.h,
183     [gt_cv_func_dgettext_libintl="no"
184      libintl_extra_libs=""
185
186      #
187      # First check in libc
188      #
189      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
190        [AC_TRY_LINK([
191#include <libintl.h>
192],
193         [return !ngettext ("","", 1)],
194	  gt_cv_func_ngettext_libc=yes,
195          gt_cv_func_ngettext_libc=no)
196        ])
197
198      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
199	      AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
200        	[AC_TRY_LINK([
201#include <libintl.h>
202],
203	          [return !dgettext ("","")],
204		  gt_cv_func_dgettext_libc=yes,
205	          gt_cv_func_dgettext_libc=no)
206        	])
207      fi
208
209      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
210        AC_CHECK_FUNCS(bind_textdomain_codeset)
211      fi
212
213      #
214      # If we don't have everything we want, check in libintl
215      #
216      if test "$gt_cv_func_dgettext_libc" != "yes" \
217	 || test "$gt_cv_func_ngettext_libc" != "yes" \
218         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
219
220        AC_CHECK_LIB(intl, bindtextdomain,
221	    [AC_CHECK_LIB(intl, ngettext,
222		    [AC_CHECK_LIB(intl, dgettext,
223			          gt_cv_func_dgettext_libintl=yes)])])
224
225	if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
226	  AC_MSG_CHECKING([if -liconv is needed to use gettext])
227	  AC_MSG_RESULT([])
228  	  AC_CHECK_LIB(intl, ngettext,
229          	[AC_CHECK_LIB(intl, dcgettext,
230		       [gt_cv_func_dgettext_libintl=yes
231			libintl_extra_libs=-liconv],
232			:,-liconv)],
233		:,-liconv)
234        fi
235
236        #
237        # If we found libintl, then check in it for bind_textdomain_codeset();
238        # we'll prefer libc if neither have bind_textdomain_codeset(),
239        # and both have dgettext and ngettext
240        #
241        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
242          glib_save_LIBS="$LIBS"
243          LIBS="$LIBS -lintl $libintl_extra_libs"
244          unset ac_cv_func_bind_textdomain_codeset
245          AC_CHECK_FUNCS(bind_textdomain_codeset)
246          LIBS="$glib_save_LIBS"
247
248          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
249            gt_cv_func_dgettext_libc=no
250          else
251            if test "$gt_cv_func_dgettext_libc" = "yes" \
252		&& test "$gt_cv_func_ngettext_libc" = "yes"; then
253              gt_cv_func_dgettext_libintl=no
254            fi
255          fi
256        fi
257      fi
258
259      if test "$gt_cv_func_dgettext_libc" = "yes" \
260	|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
261        gt_cv_have_gettext=yes
262      fi
263
264      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
265        INTLLIBS="-lintl $libintl_extra_libs $INTL_MACOSX_LIBS"
266      fi
267
268      if test "$gt_cv_have_gettext" = "yes"; then
269	AC_DEFINE(HAVE_GETTEXT,1,
270	  [Define if the GNU gettext() function is already present or preinstalled.])
271	GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
272	  [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
273	if test "$MSGFMT" != "no"; then
274          glib_save_LIBS="$LIBS"
275          LIBS="$LIBS $INTLLIBS"
276	  AC_CHECK_FUNCS(dcgettext)
277	  MSGFMT_OPTS=
278	  AC_MSG_CHECKING([if msgfmt accepts -c])
279	  GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
280msgid ""
281msgstr ""
282"Content-Type: text/plain; charset=UTF-8\n"
283"Project-Id-Version: test 1.0\n"
284"PO-Revision-Date: 2007-02-15 12:01+0100\n"
285"Last-Translator: test <foo@bar.xx>\n"
286"Language-Team: C <LL@li.org>\n"
287"MIME-Version: 1.0\n"
288"Content-Transfer-Encoding: 8bit\n"
289], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
290	  AC_SUBST(MSGFMT_OPTS)
291	  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
292	  GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
293	    [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
294	  AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
295			 return _nl_msg_cat_cntr],
296	    [CATOBJEXT=.gmo
297             DATADIRNAME=share],
298	    [case $host in
299	    *-*-solaris*)
300	    dnl On Solaris, if bind_textdomain_codeset is in libc,
301	    dnl GNU format message catalog is always supported,
302            dnl since both are added to the libc all together.
303	    dnl Hence, we'd like to go with DATADIRNAME=share and
304	    dnl and CATOBJEXT=.gmo in this case.
305            AC_CHECK_FUNC(bind_textdomain_codeset,
306	      [CATOBJEXT=.gmo
307               DATADIRNAME=share],
308	      [CATOBJEXT=.mo
309               DATADIRNAME=lib])
310	    ;;
311	    *-*-openbsd*)
312	    CATOBJEXT=.mo
313            DATADIRNAME=share
314	    ;;
315	    *)
316	    CATOBJEXT=.mo
317            DATADIRNAME=lib
318	    ;;
319	    esac])
320          LIBS="$glib_save_LIBS"
321	  INSTOBJEXT=.mo
322	else
323	  gt_cv_have_gettext=no
324	fi
325      fi
326    ])
327
328    if test "$gt_cv_have_gettext" = "yes" ; then
329      AC_DEFINE(ENABLE_NLS, 1,
330        [always defined to indicate that i18n is enabled])
331    fi
332
333    dnl Test whether we really found GNU xgettext.
334    if test "$XGETTEXT" != ":"; then
335      dnl If it is not GNU xgettext we define it as : so that the
336      dnl Makefiles still can work.
337      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
338        : ;
339      else
340        AC_MSG_RESULT(
341	  [found xgettext program is not GNU xgettext; ignore it])
342        XGETTEXT=":"
343      fi
344    fi
345
346    # We need to process the po/ directory.
347    POSUB=po
348
349    AC_OUTPUT_COMMANDS(
350      [case "$CONFIG_FILES" in *po/Makefile.in*)
351        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
352      esac])
353
354    dnl These rules are solely for the distribution goal.  While doing this
355    dnl we only have to keep exactly one list of the available catalogs
356    dnl in configure.ac.
357    for lang in $ALL_LINGUAS; do
358      GMOFILES="$GMOFILES $lang.gmo"
359      POFILES="$POFILES $lang.po"
360    done
361
362    dnl Make all variables we use known to autoconf.
363    AC_SUBST(CATALOGS)
364    AC_SUBST(CATOBJEXT)
365    AC_SUBST(DATADIRNAME)
366    AC_SUBST(GMOFILES)
367    AC_SUBST(INSTOBJEXT)
368    AC_SUBST(INTLLIBS)
369    AC_SUBST(PO_IN_DATADIR_TRUE)
370    AC_SUBST(PO_IN_DATADIR_FALSE)
371    AC_SUBST(POFILES)
372    AC_SUBST(POSUB)
373  ])
374
375# AM_GLIB_GNU_GETTEXT
376# -------------------
377# Do checks necessary for use of gettext. If a suitable implementation
378# of gettext is found in either in libintl or in the C library,
379# it will set INTLLIBS to the libraries needed for use of gettext
380# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
381# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
382# on various variables needed by the Makefile.in.in installed by
383# glib-gettextize.
384dnl
385AU_DEFUN([GLIB_GNU_GETTEXT],
386  [AC_REQUIRE([AC_PROG_CC])dnl
387
388   GLIB_LC_MESSAGES
389   GLIB_WITH_NLS
390
391   if test "$gt_cv_have_gettext" = "yes"; then
392     if test "x$ALL_LINGUAS" = "x"; then
393       LINGUAS=
394     else
395       AC_MSG_CHECKING(for catalogs to be installed)
396       NEW_LINGUAS=
397       for presentlang in $ALL_LINGUAS; do
398         useit=no
399         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
400           desiredlanguages="$LINGUAS"
401         else
402           desiredlanguages="$ALL_LINGUAS"
403         fi
404         for desiredlang in $desiredlanguages; do
405 	   # Use the presentlang catalog if desiredlang is
406           #   a. equal to presentlang, or
407           #   b. a variant of presentlang (because in this case,
408           #      presentlang can be used as a fallback for messages
409           #      which are not translated in the desiredlang catalog).
410           case "$desiredlang" in
411             "$presentlang"*) useit=yes;;
412           esac
413         done
414         if test $useit = yes; then
415           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
416         fi
417       done
418       LINGUAS=$NEW_LINGUAS
419       AC_MSG_RESULT($LINGUAS)
420     fi
421
422     dnl Construct list of names of catalog files to be constructed.
423     if test -n "$LINGUAS"; then
424       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
425     fi
426   fi
427
428   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
429   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
430   dnl Try to locate is.
431   MKINSTALLDIRS=
432   if test -n "$ac_aux_dir"; then
433     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
434   fi
435   if test -z "$MKINSTALLDIRS"; then
436     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
437   fi
438   AC_SUBST(MKINSTALLDIRS)
439
440   dnl Generate list of files to be processed by xgettext which will
441   dnl be included in po/Makefile.
442   test -d po || mkdir po
443   if test "x$srcdir" != "x."; then
444     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
445       posrcprefix="$srcdir/"
446     else
447       posrcprefix="../$srcdir/"
448     fi
449   else
450     posrcprefix="../"
451   fi
452   rm -f po/POTFILES
453   sed -e "/^#/d" -e "/^\$/d" -e "s,.*,	$posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
454	< $srcdir/po/POTFILES.in > po/POTFILES
455  ],
456  [[$0: This macro is deprecated. You should use upstream gettext instead.]])
457
458# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
459# -------------------------------
460# Define VARIABLE to the location where catalog files will
461# be installed by po/Makefile.
462glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
463[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
464glib_save_prefix="$prefix"
465glib_save_exec_prefix="$exec_prefix"
466glib_save_datarootdir="$datarootdir"
467test "x$prefix" = xNONE && prefix=$ac_default_prefix
468test "x$exec_prefix" = xNONE && exec_prefix=$prefix
469datarootdir=`eval echo "${datarootdir}"`
470if test "x$CATOBJEXT" = "x.mo" ; then
471  localedir=`eval echo "${libdir}/locale"`
472else
473  localedir=`eval echo "${datadir}/locale"`
474fi
475prefix="$glib_save_prefix"
476exec_prefix="$glib_save_exec_prefix"
477datarootdir="$glib_save_datarootdir"
478AC_DEFINE_UNQUOTED($1, "$localedir",
479  [Define the location where the catalogs will be installed])
480])
481
482dnl
483dnl Now the definitions that aclocal will find
484dnl
485ifdef(glib_configure_ac,[],[
486AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
487AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
488])dnl
489
490# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
491#
492# Create a temporary file with TEST-FILE as its contents and pass the
493# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
494# 0 and perform ACTION-IF-FAIL for any other exit status.
495AC_DEFUN([GLIB_RUN_PROG],
496[cat >conftest.foo <<_ACEOF
497$2
498_ACEOF
499if AC_RUN_LOG([$1 conftest.foo]); then
500  m4_ifval([$3], [$3], [:])
501m4_ifvaln([$4], [else $4])dnl
502echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
503sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
504fi])
505
506
507
508dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
509# serial 42 IT_PROG_INTLTOOL
510AC_DEFUN([IT_PROG_INTLTOOL], [
511AC_PREREQ([2.50])dnl
512AC_REQUIRE([AM_NLS])dnl
513
514case "$am__api_version" in
515    1.[01234])
516	AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
517    ;;
518    *)
519    ;;
520esac
521
522INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
523INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
524INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
525if test -n "$1"; then
526    AC_MSG_CHECKING([for intltool >= $1])
527    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
528    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
529	AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
530fi
531
532AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
533AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
534AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
535if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
536    AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
537fi
538
539if test -z "$AM_DEFAULT_VERBOSITY"; then
540  AM_DEFAULT_VERBOSITY=1
541fi
542AC_SUBST([AM_DEFAULT_VERBOSITY])
543
544INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
545INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
546INTLTOOL__v_MERGE_0='@echo "  ITMRG " [$]@;'
547AC_SUBST(INTLTOOL_V_MERGE)
548AC_SUBST(INTLTOOL__v_MERGE_)
549AC_SUBST(INTLTOOL__v_MERGE_0)
550
551INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
552intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
553intltool__v_merge_options_0='-q'
554AC_SUBST(INTLTOOL_V_MERGE_OPTIONS)
555AC_SUBST(intltool__v_merge_options_)
556AC_SUBST(intltool__v_merge_options_0)
557
558  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
559INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
560     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
561     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
562      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< [$]@'
563     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
564   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
565    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
566INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
567       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
568      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
569if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
570      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< [$]@'
571else
572      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.[$][$]RANDOM && mkdir [$][$]_it_tmp_dir && LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u [$][$]_it_tmp_dir $< [$]@ && rmdir [$][$]_it_tmp_dir'
573fi
574      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
575      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
576    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
577  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
578    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
579    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
580   INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
581
582_IT_SUBST(INTLTOOL_DESKTOP_RULE)
583_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
584_IT_SUBST(INTLTOOL_KEYS_RULE)
585_IT_SUBST(INTLTOOL_PROP_RULE)
586_IT_SUBST(INTLTOOL_OAF_RULE)
587_IT_SUBST(INTLTOOL_PONG_RULE)
588_IT_SUBST(INTLTOOL_SERVER_RULE)
589_IT_SUBST(INTLTOOL_SHEET_RULE)
590_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
591_IT_SUBST(INTLTOOL_UI_RULE)
592_IT_SUBST(INTLTOOL_XAM_RULE)
593_IT_SUBST(INTLTOOL_KBD_RULE)
594_IT_SUBST(INTLTOOL_XML_RULE)
595_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
596_IT_SUBST(INTLTOOL_CAVES_RULE)
597_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
598_IT_SUBST(INTLTOOL_THEME_RULE)
599_IT_SUBST(INTLTOOL_SERVICE_RULE)
600_IT_SUBST(INTLTOOL_POLICY_RULE)
601
602# Check the gettext tools to make sure they are GNU
603AC_PATH_PROG(XGETTEXT, xgettext)
604AC_PATH_PROG(MSGMERGE, msgmerge)
605AC_PATH_PROG(MSGFMT, msgfmt)
606AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
607if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
608    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
609fi
610xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
611mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
612mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
613if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
614    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
615fi
616
617AC_PATH_PROG(INTLTOOL_PERL, perl)
618if test -z "$INTLTOOL_PERL"; then
619   AC_MSG_ERROR([perl not found])
620fi
621AC_MSG_CHECKING([for perl >= 5.8.1])
622$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
623if test $? -ne 0; then
624   AC_MSG_ERROR([perl 5.8.1 is required for intltool])
625else
626   IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"`
627   AC_MSG_RESULT([$IT_PERL_VERSION])
628fi
629if test "x$2" != "xno-xml"; then
630   AC_MSG_CHECKING([for XML::Parser])
631   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
632       AC_MSG_RESULT([ok])
633   else
634       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
635   fi
636fi
637
638# Substitute ALL_LINGUAS so we can use it in po/Makefile
639AC_SUBST(ALL_LINGUAS)
640
641IT_PO_SUBDIR([po])
642
643])
644
645
646# IT_PO_SUBDIR(DIRNAME)
647# ---------------------
648# All po subdirs have to be declared with this macro; the subdir "po" is
649# declared by IT_PROG_INTLTOOL.
650#
651AC_DEFUN([IT_PO_SUBDIR],
652[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
653dnl
654dnl The following CONFIG_COMMANDS should be executed at the very end
655dnl of config.status.
656AC_CONFIG_COMMANDS_PRE([
657  AC_CONFIG_COMMANDS([$1/stamp-it], [
658    if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
659       AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
660    fi
661    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
662    >"$1/stamp-it.tmp"
663    [sed '/^#/d
664	 s/^[[].*] *//
665	 /^[ 	]*$/d
666	'"s|^|	$ac_top_srcdir/|" \
667      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
668    ]
669    [sed '/^POTFILES =/,/[^\\]$/ {
670		/^POTFILES =/!d
671		r $1/POTFILES
672	  }
673	 ' "$1/Makefile.in" >"$1/Makefile"]
674    rm -f "$1/Makefile.tmp"
675    mv "$1/stamp-it.tmp" "$1/stamp-it"
676  ])
677])dnl
678])
679
680# _IT_SUBST(VARIABLE)
681# -------------------
682# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
683#
684AC_DEFUN([_IT_SUBST],
685[
686AC_SUBST([$1])
687m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
688]
689)
690
691# deprecated macros
692AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
693# A hint is needed for aclocal from Automake <= 1.9.4:
694# AC_DEFUN([AC_PROG_INTLTOOL], ...)
695
696
697# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
698#
699#   Copyright (C) 1996-2001, 2003-2017 Free Software Foundation, Inc.
700#   Written by Gordon Matzigkeit, 1996
701#
702# This file is free software; the Free Software Foundation gives
703# unlimited permission to copy and/or distribute it, with or without
704# modifications, as long as this notice is preserved.
705
706m4_define([_LT_COPYING], [dnl
707# Copyright (C) 2014 Free Software Foundation, Inc.
708# This is free software; see the source for copying conditions.  There is NO
709# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
710
711# GNU Libtool is free software; you can redistribute it and/or modify
712# it under the terms of the GNU General Public License as published by
713# the Free Software Foundation; either version 2 of of the License, or
714# (at your option) any later version.
715#
716# As a special exception to the GNU General Public License, if you
717# distribute this file as part of a program or library that is built
718# using GNU Libtool, you may include this file under the  same
719# distribution terms that you use for the rest of that program.
720#
721# GNU Libtool is distributed in the hope that it will be useful, but
722# WITHOUT ANY WARRANTY; without even the implied warranty of
723# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
724# GNU General Public License for more details.
725#
726# You should have received a copy of the GNU General Public License
727# along with this program.  If not, see <http://www.gnu.org/licenses/>.
728])
729
730# serial 58 LT_INIT
731
732
733# LT_PREREQ(VERSION)
734# ------------------
735# Complain and exit if this libtool version is less that VERSION.
736m4_defun([LT_PREREQ],
737[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
738       [m4_default([$3],
739		   [m4_fatal([Libtool version $1 or higher is required],
740		             63)])],
741       [$2])])
742
743
744# _LT_CHECK_BUILDDIR
745# ------------------
746# Complain if the absolute build directory name contains unusual characters
747m4_defun([_LT_CHECK_BUILDDIR],
748[case `pwd` in
749  *\ * | *\	*)
750    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
751esac
752])
753
754
755# LT_INIT([OPTIONS])
756# ------------------
757AC_DEFUN([LT_INIT],
758[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
759AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
760AC_BEFORE([$0], [LT_LANG])dnl
761AC_BEFORE([$0], [LT_OUTPUT])dnl
762AC_BEFORE([$0], [LTDL_INIT])dnl
763m4_require([_LT_CHECK_BUILDDIR])dnl
764
765dnl Autoconf doesn't catch unexpanded LT_ macros by default:
766m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
767m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
768dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
769dnl unless we require an AC_DEFUNed macro:
770AC_REQUIRE([LTOPTIONS_VERSION])dnl
771AC_REQUIRE([LTSUGAR_VERSION])dnl
772AC_REQUIRE([LTVERSION_VERSION])dnl
773AC_REQUIRE([LTOBSOLETE_VERSION])dnl
774m4_require([_LT_PROG_LTMAIN])dnl
775
776_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
777
778dnl Parse OPTIONS
779_LT_SET_OPTIONS([$0], [$1])
780
781# This can be used to rebuild libtool when needed
782LIBTOOL_DEPS=$ltmain
783
784# Always use our own libtool.
785LIBTOOL='$(SHELL) $(top_builddir)/libtool'
786AC_SUBST(LIBTOOL)dnl
787
788_LT_SETUP
789
790# Only expand once:
791m4_define([LT_INIT])
792])# LT_INIT
793
794# Old names:
795AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
796AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
797dnl aclocal-1.4 backwards compatibility:
798dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
799dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
800
801
802# _LT_PREPARE_CC_BASENAME
803# -----------------------
804m4_defun([_LT_PREPARE_CC_BASENAME], [
805# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
806func_cc_basename ()
807{
808    for cc_temp in @S|@*""; do
809      case $cc_temp in
810        compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
811        distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
812        \-*) ;;
813        *) break;;
814      esac
815    done
816    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
817}
818])# _LT_PREPARE_CC_BASENAME
819
820
821# _LT_CC_BASENAME(CC)
822# -------------------
823# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
824# but that macro is also expanded into generated libtool script, which
825# arranges for $SED and $ECHO to be set by different means.
826m4_defun([_LT_CC_BASENAME],
827[m4_require([_LT_PREPARE_CC_BASENAME])dnl
828AC_REQUIRE([_LT_DECL_SED])dnl
829AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
830func_cc_basename $1
831cc_basename=$func_cc_basename_result
832])
833
834
835# _LT_FILEUTILS_DEFAULTS
836# ----------------------
837# It is okay to use these file commands and assume they have been set
838# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
839m4_defun([_LT_FILEUTILS_DEFAULTS],
840[: ${CP="cp -f"}
841: ${MV="mv -f"}
842: ${RM="rm -f"}
843])# _LT_FILEUTILS_DEFAULTS
844
845
846# _LT_SETUP
847# ---------
848m4_defun([_LT_SETUP],
849[AC_REQUIRE([AC_CANONICAL_HOST])dnl
850AC_REQUIRE([AC_CANONICAL_BUILD])dnl
851AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
852AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
853
854_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
855dnl
856_LT_DECL([], [host_alias], [0], [The host system])dnl
857_LT_DECL([], [host], [0])dnl
858_LT_DECL([], [host_os], [0])dnl
859dnl
860_LT_DECL([], [build_alias], [0], [The build system])dnl
861_LT_DECL([], [build], [0])dnl
862_LT_DECL([], [build_os], [0])dnl
863dnl
864AC_REQUIRE([AC_PROG_CC])dnl
865AC_REQUIRE([LT_PATH_LD])dnl
866AC_REQUIRE([LT_PATH_NM])dnl
867dnl
868AC_REQUIRE([AC_PROG_LN_S])dnl
869test -z "$LN_S" && LN_S="ln -s"
870_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
871dnl
872AC_REQUIRE([LT_CMD_MAX_LEN])dnl
873_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
874_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
875dnl
876m4_require([_LT_FILEUTILS_DEFAULTS])dnl
877m4_require([_LT_CHECK_SHELL_FEATURES])dnl
878m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
879m4_require([_LT_CMD_RELOAD])dnl
880m4_require([_LT_CHECK_MAGIC_METHOD])dnl
881m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
882m4_require([_LT_CMD_OLD_ARCHIVE])dnl
883m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
884m4_require([_LT_WITH_SYSROOT])dnl
885m4_require([_LT_CMD_TRUNCATE])dnl
886
887_LT_CONFIG_LIBTOOL_INIT([
888# See if we are running on zsh, and set the options that allow our
889# commands through without removal of \ escapes INIT.
890if test -n "\${ZSH_VERSION+set}"; then
891   setopt NO_GLOB_SUBST
892fi
893])
894if test -n "${ZSH_VERSION+set}"; then
895   setopt NO_GLOB_SUBST
896fi
897
898_LT_CHECK_OBJDIR
899
900m4_require([_LT_TAG_COMPILER])dnl
901
902case $host_os in
903aix3*)
904  # AIX sometimes has problems with the GCC collect2 program.  For some
905  # reason, if we set the COLLECT_NAMES environment variable, the problems
906  # vanish in a puff of smoke.
907  if test set != "${COLLECT_NAMES+set}"; then
908    COLLECT_NAMES=
909    export COLLECT_NAMES
910  fi
911  ;;
912esac
913
914# Global variables:
915ofile=libtool
916can_build_shared=yes
917
918# All known linkers require a '.a' archive for static linking (except MSVC,
919# which needs '.lib').
920libext=a
921
922with_gnu_ld=$lt_cv_prog_gnu_ld
923
924old_CC=$CC
925old_CFLAGS=$CFLAGS
926
927# Set sane defaults for various variables
928test -z "$CC" && CC=cc
929test -z "$LTCC" && LTCC=$CC
930test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
931test -z "$LD" && LD=ld
932test -z "$ac_objext" && ac_objext=o
933
934_LT_CC_BASENAME([$compiler])
935
936# Only perform the check for file, if the check method requires it
937test -z "$MAGIC_CMD" && MAGIC_CMD=file
938case $deplibs_check_method in
939file_magic*)
940  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
941    _LT_PATH_MAGIC
942  fi
943  ;;
944esac
945
946# Use C for the default configuration in the libtool script
947LT_SUPPORTED_TAG([CC])
948_LT_LANG_C_CONFIG
949_LT_LANG_DEFAULT_CONFIG
950_LT_CONFIG_COMMANDS
951])# _LT_SETUP
952
953
954# _LT_PREPARE_SED_QUOTE_VARS
955# --------------------------
956# Define a few sed substitution that help us do robust quoting.
957m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
958[# Backslashify metacharacters that are still active within
959# double-quoted strings.
960sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
961
962# Same as above, but do not quote variable references.
963double_quote_subst='s/\([["`\\]]\)/\\\1/g'
964
965# Sed substitution to delay expansion of an escaped shell variable in a
966# double_quote_subst'ed string.
967delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
968
969# Sed substitution to delay expansion of an escaped single quote.
970delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
971
972# Sed substitution to avoid accidental globbing in evaled expressions
973no_glob_subst='s/\*/\\\*/g'
974])
975
976# _LT_PROG_LTMAIN
977# ---------------
978# Note that this code is called both from 'configure', and 'config.status'
979# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
980# 'config.status' has no value for ac_aux_dir unless we are using Automake,
981# so we pass a copy along to make sure it has a sensible value anyway.
982m4_defun([_LT_PROG_LTMAIN],
983[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
984_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
985ltmain=$ac_aux_dir/ltmain.sh
986])# _LT_PROG_LTMAIN
987
988
989
990# So that we can recreate a full libtool script including additional
991# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
992# in macros and then make a single call at the end using the 'libtool'
993# label.
994
995
996# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
997# ----------------------------------------
998# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
999m4_define([_LT_CONFIG_LIBTOOL_INIT],
1000[m4_ifval([$1],
1001          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
1002                     [$1
1003])])])
1004
1005# Initialize.
1006m4_define([_LT_OUTPUT_LIBTOOL_INIT])
1007
1008
1009# _LT_CONFIG_LIBTOOL([COMMANDS])
1010# ------------------------------
1011# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1012m4_define([_LT_CONFIG_LIBTOOL],
1013[m4_ifval([$1],
1014          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
1015                     [$1
1016])])])
1017
1018# Initialize.
1019m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
1020
1021
1022# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
1023# -----------------------------------------------------
1024m4_defun([_LT_CONFIG_SAVE_COMMANDS],
1025[_LT_CONFIG_LIBTOOL([$1])
1026_LT_CONFIG_LIBTOOL_INIT([$2])
1027])
1028
1029
1030# _LT_FORMAT_COMMENT([COMMENT])
1031# -----------------------------
1032# Add leading comment marks to the start of each line, and a trailing
1033# full-stop to the whole comment if one is not present already.
1034m4_define([_LT_FORMAT_COMMENT],
1035[m4_ifval([$1], [
1036m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
1037              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
1038)])
1039
1040
1041
1042
1043
1044# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
1045# -------------------------------------------------------------------
1046# CONFIGNAME is the name given to the value in the libtool script.
1047# VARNAME is the (base) name used in the configure script.
1048# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
1049# VARNAME.  Any other value will be used directly.
1050m4_define([_LT_DECL],
1051[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
1052    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
1053	[m4_ifval([$1], [$1], [$2])])
1054    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
1055    m4_ifval([$4],
1056	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
1057    lt_dict_add_subkey([lt_decl_dict], [$2],
1058	[tagged?], [m4_ifval([$5], [yes], [no])])])
1059])
1060
1061
1062# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
1063# --------------------------------------------------------
1064m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
1065
1066
1067# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
1068# ------------------------------------------------
1069m4_define([lt_decl_tag_varnames],
1070[_lt_decl_filter([tagged?], [yes], $@)])
1071
1072
1073# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
1074# ---------------------------------------------------------
1075m4_define([_lt_decl_filter],
1076[m4_case([$#],
1077  [0], [m4_fatal([$0: too few arguments: $#])],
1078  [1], [m4_fatal([$0: too few arguments: $#: $1])],
1079  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
1080  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
1081  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
1082])
1083
1084
1085# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
1086# --------------------------------------------------
1087m4_define([lt_decl_quote_varnames],
1088[_lt_decl_filter([value], [1], $@)])
1089
1090
1091# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
1092# ---------------------------------------------------
1093m4_define([lt_decl_dquote_varnames],
1094[_lt_decl_filter([value], [2], $@)])
1095
1096
1097# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
1098# ---------------------------------------------------
1099m4_define([lt_decl_varnames_tagged],
1100[m4_assert([$# <= 2])dnl
1101_$0(m4_quote(m4_default([$1], [[, ]])),
1102    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
1103    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
1104m4_define([_lt_decl_varnames_tagged],
1105[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
1106
1107
1108# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
1109# ------------------------------------------------
1110m4_define([lt_decl_all_varnames],
1111[_$0(m4_quote(m4_default([$1], [[, ]])),
1112     m4_if([$2], [],
1113	   m4_quote(lt_decl_varnames),
1114	m4_quote(m4_shift($@))))[]dnl
1115])
1116m4_define([_lt_decl_all_varnames],
1117[lt_join($@, lt_decl_varnames_tagged([$1],
1118			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
1119])
1120
1121
1122# _LT_CONFIG_STATUS_DECLARE([VARNAME])
1123# ------------------------------------
1124# Quote a variable value, and forward it to 'config.status' so that its
1125# declaration there will have the same value as in 'configure'.  VARNAME
1126# must have a single quote delimited value for this to work.
1127m4_define([_LT_CONFIG_STATUS_DECLARE],
1128[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
1129
1130
1131# _LT_CONFIG_STATUS_DECLARATIONS
1132# ------------------------------
1133# We delimit libtool config variables with single quotes, so when
1134# we write them to config.status, we have to be sure to quote all
1135# embedded single quotes properly.  In configure, this macro expands
1136# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
1137#
1138#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
1139m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
1140[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
1141    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
1142
1143
1144# _LT_LIBTOOL_TAGS
1145# ----------------
1146# Output comment and list of tags supported by the script
1147m4_defun([_LT_LIBTOOL_TAGS],
1148[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
1149available_tags='_LT_TAGS'dnl
1150])
1151
1152
1153# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
1154# -----------------------------------
1155# Extract the dictionary values for VARNAME (optionally with TAG) and
1156# expand to a commented shell variable setting:
1157#
1158#    # Some comment about what VAR is for.
1159#    visible_name=$lt_internal_name
1160m4_define([_LT_LIBTOOL_DECLARE],
1161[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
1162					   [description])))[]dnl
1163m4_pushdef([_libtool_name],
1164    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
1165m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
1166    [0], [_libtool_name=[$]$1],
1167    [1], [_libtool_name=$lt_[]$1],
1168    [2], [_libtool_name=$lt_[]$1],
1169    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
1170m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
1171])
1172
1173
1174# _LT_LIBTOOL_CONFIG_VARS
1175# -----------------------
1176# Produce commented declarations of non-tagged libtool config variables
1177# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
1178# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
1179# section) are produced by _LT_LIBTOOL_TAG_VARS.
1180m4_defun([_LT_LIBTOOL_CONFIG_VARS],
1181[m4_foreach([_lt_var],
1182    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
1183    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
1184
1185
1186# _LT_LIBTOOL_TAG_VARS(TAG)
1187# -------------------------
1188m4_define([_LT_LIBTOOL_TAG_VARS],
1189[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
1190    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
1191
1192
1193# _LT_TAGVAR(VARNAME, [TAGNAME])
1194# ------------------------------
1195m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
1196
1197
1198# _LT_CONFIG_COMMANDS
1199# -------------------
1200# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
1201# variables for single and double quote escaping we saved from calls
1202# to _LT_DECL, we can put quote escaped variables declarations
1203# into 'config.status', and then the shell code to quote escape them in
1204# for loops in 'config.status'.  Finally, any additional code accumulated
1205# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
1206m4_defun([_LT_CONFIG_COMMANDS],
1207[AC_PROVIDE_IFELSE([LT_OUTPUT],
1208	dnl If the libtool generation code has been placed in $CONFIG_LT,
1209	dnl instead of duplicating it all over again into config.status,
1210	dnl then we will have config.status run $CONFIG_LT later, so it
1211	dnl needs to know what name is stored there:
1212        [AC_CONFIG_COMMANDS([libtool],
1213            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
1214    dnl If the libtool generation code is destined for config.status,
1215    dnl expand the accumulated commands and init code now:
1216    [AC_CONFIG_COMMANDS([libtool],
1217        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
1218])#_LT_CONFIG_COMMANDS
1219
1220
1221# Initialize.
1222m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
1223[
1224
1225# The HP-UX ksh and POSIX shell print the target directory to stdout
1226# if CDPATH is set.
1227(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1228
1229sed_quote_subst='$sed_quote_subst'
1230double_quote_subst='$double_quote_subst'
1231delay_variable_subst='$delay_variable_subst'
1232_LT_CONFIG_STATUS_DECLARATIONS
1233LTCC='$LTCC'
1234LTCFLAGS='$LTCFLAGS'
1235compiler='$compiler_DEFAULT'
1236
1237# A function that is used when there is no print builtin or printf.
1238func_fallback_echo ()
1239{
1240  eval 'cat <<_LTECHO_EOF
1241\$[]1
1242_LTECHO_EOF'
1243}
1244
1245# Quote evaled strings.
1246for var in lt_decl_all_varnames([[ \
1247]], lt_decl_quote_varnames); do
1248    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1249    *[[\\\\\\\`\\"\\\$]]*)
1250      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
1251      ;;
1252    *)
1253      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1254      ;;
1255    esac
1256done
1257
1258# Double-quote double-evaled strings.
1259for var in lt_decl_all_varnames([[ \
1260]], lt_decl_dquote_varnames); do
1261    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1262    *[[\\\\\\\`\\"\\\$]]*)
1263      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
1264      ;;
1265    *)
1266      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1267      ;;
1268    esac
1269done
1270
1271_LT_OUTPUT_LIBTOOL_INIT
1272])
1273
1274# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
1275# ------------------------------------
1276# Generate a child script FILE with all initialization necessary to
1277# reuse the environment learned by the parent script, and make the
1278# file executable.  If COMMENT is supplied, it is inserted after the
1279# '#!' sequence but before initialization text begins.  After this
1280# macro, additional text can be appended to FILE to form the body of
1281# the child script.  The macro ends with non-zero status if the
1282# file could not be fully written (such as if the disk is full).
1283m4_ifdef([AS_INIT_GENERATED],
1284[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
1285[m4_defun([_LT_GENERATED_FILE_INIT],
1286[m4_require([AS_PREPARE])]dnl
1287[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
1288[lt_write_fail=0
1289cat >$1 <<_ASEOF || lt_write_fail=1
1290#! $SHELL
1291# Generated by $as_me.
1292$2
1293SHELL=\${CONFIG_SHELL-$SHELL}
1294export SHELL
1295_ASEOF
1296cat >>$1 <<\_ASEOF || lt_write_fail=1
1297AS_SHELL_SANITIZE
1298_AS_PREPARE
1299exec AS_MESSAGE_FD>&1
1300_ASEOF
1301test 0 = "$lt_write_fail" && chmod +x $1[]dnl
1302m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
1303
1304# LT_OUTPUT
1305# ---------
1306# This macro allows early generation of the libtool script (before
1307# AC_OUTPUT is called), incase it is used in configure for compilation
1308# tests.
1309AC_DEFUN([LT_OUTPUT],
1310[: ${CONFIG_LT=./config.lt}
1311AC_MSG_NOTICE([creating $CONFIG_LT])
1312_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
1313[# Run this file to recreate a libtool stub with the current configuration.])
1314
1315cat >>"$CONFIG_LT" <<\_LTEOF
1316lt_cl_silent=false
1317exec AS_MESSAGE_LOG_FD>>config.log
1318{
1319  echo
1320  AS_BOX([Running $as_me.])
1321} >&AS_MESSAGE_LOG_FD
1322
1323lt_cl_help="\
1324'$as_me' creates a local libtool stub from the current configuration,
1325for use in further configure time tests before the real libtool is
1326generated.
1327
1328Usage: $[0] [[OPTIONS]]
1329
1330  -h, --help      print this help, then exit
1331  -V, --version   print version number, then exit
1332  -q, --quiet     do not print progress messages
1333  -d, --debug     don't remove temporary files
1334
1335Report bugs to <bug-libtool@gnu.org>."
1336
1337lt_cl_version="\
1338m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
1339m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1340configured by $[0], generated by m4_PACKAGE_STRING.
1341
1342Copyright (C) 2011 Free Software Foundation, Inc.
1343This config.lt script is free software; the Free Software Foundation
1344gives unlimited permision to copy, distribute and modify it."
1345
1346while test 0 != $[#]
1347do
1348  case $[1] in
1349    --version | --v* | -V )
1350      echo "$lt_cl_version"; exit 0 ;;
1351    --help | --h* | -h )
1352      echo "$lt_cl_help"; exit 0 ;;
1353    --debug | --d* | -d )
1354      debug=: ;;
1355    --quiet | --q* | --silent | --s* | -q )
1356      lt_cl_silent=: ;;
1357
1358    -*) AC_MSG_ERROR([unrecognized option: $[1]
1359Try '$[0] --help' for more information.]) ;;
1360
1361    *) AC_MSG_ERROR([unrecognized argument: $[1]
1362Try '$[0] --help' for more information.]) ;;
1363  esac
1364  shift
1365done
1366
1367if $lt_cl_silent; then
1368  exec AS_MESSAGE_FD>/dev/null
1369fi
1370_LTEOF
1371
1372cat >>"$CONFIG_LT" <<_LTEOF
1373_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
1374_LTEOF
1375
1376cat >>"$CONFIG_LT" <<\_LTEOF
1377AC_MSG_NOTICE([creating $ofile])
1378_LT_OUTPUT_LIBTOOL_COMMANDS
1379AS_EXIT(0)
1380_LTEOF
1381chmod +x "$CONFIG_LT"
1382
1383# configure is writing to config.log, but config.lt does its own redirection,
1384# appending to config.log, which fails on DOS, as config.log is still kept
1385# open by configure.  Here we exec the FD to /dev/null, effectively closing
1386# config.log, so it can be properly (re)opened and appended to by config.lt.
1387lt_cl_success=:
1388test yes = "$silent" &&
1389  lt_config_lt_args="$lt_config_lt_args --quiet"
1390exec AS_MESSAGE_LOG_FD>/dev/null
1391$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
1392exec AS_MESSAGE_LOG_FD>>config.log
1393$lt_cl_success || AS_EXIT(1)
1394])# LT_OUTPUT
1395
1396
1397# _LT_CONFIG(TAG)
1398# ---------------
1399# If TAG is the built-in tag, create an initial libtool script with a
1400# default configuration from the untagged config vars.  Otherwise add code
1401# to config.status for appending the configuration named by TAG from the
1402# matching tagged config vars.
1403m4_defun([_LT_CONFIG],
1404[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1405_LT_CONFIG_SAVE_COMMANDS([
1406  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
1407  m4_if(_LT_TAG, [C], [
1408    # See if we are running on zsh, and set the options that allow our
1409    # commands through without removal of \ escapes.
1410    if test -n "${ZSH_VERSION+set}"; then
1411      setopt NO_GLOB_SUBST
1412    fi
1413
1414    cfgfile=${ofile}T
1415    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
1416    $RM "$cfgfile"
1417
1418    cat <<_LT_EOF >> "$cfgfile"
1419#! $SHELL
1420# Generated automatically by $as_me ($PACKAGE) $VERSION
1421# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1422# NOTE: Changes made to this file will be lost: look at ltmain.sh.
1423
1424# Provide generalized library-building support services.
1425# Written by Gordon Matzigkeit, 1996
1426
1427_LT_COPYING
1428_LT_LIBTOOL_TAGS
1429
1430# Configured defaults for sys_lib_dlsearch_path munging.
1431: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
1432
1433# ### BEGIN LIBTOOL CONFIG
1434_LT_LIBTOOL_CONFIG_VARS
1435_LT_LIBTOOL_TAG_VARS
1436# ### END LIBTOOL CONFIG
1437
1438_LT_EOF
1439
1440    cat <<'_LT_EOF' >> "$cfgfile"
1441
1442# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
1443
1444_LT_PREPARE_MUNGE_PATH_LIST
1445_LT_PREPARE_CC_BASENAME
1446
1447# ### END FUNCTIONS SHARED WITH CONFIGURE
1448
1449_LT_EOF
1450
1451  case $host_os in
1452  aix3*)
1453    cat <<\_LT_EOF >> "$cfgfile"
1454# AIX sometimes has problems with the GCC collect2 program.  For some
1455# reason, if we set the COLLECT_NAMES environment variable, the problems
1456# vanish in a puff of smoke.
1457if test set != "${COLLECT_NAMES+set}"; then
1458  COLLECT_NAMES=
1459  export COLLECT_NAMES
1460fi
1461_LT_EOF
1462    ;;
1463  esac
1464
1465  _LT_PROG_LTMAIN
1466
1467  # We use sed instead of cat because bash on DJGPP gets confused if
1468  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
1469  # text mode, it properly converts lines to CR/LF.  This bash problem
1470  # is reportedly fixed, but why not run on old versions too?
1471  sed '$q' "$ltmain" >> "$cfgfile" \
1472     || (rm -f "$cfgfile"; exit 1)
1473
1474   mv -f "$cfgfile" "$ofile" ||
1475    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
1476  chmod +x "$ofile"
1477],
1478[cat <<_LT_EOF >> "$ofile"
1479
1480dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
1481dnl in a comment (ie after a #).
1482# ### BEGIN LIBTOOL TAG CONFIG: $1
1483_LT_LIBTOOL_TAG_VARS(_LT_TAG)
1484# ### END LIBTOOL TAG CONFIG: $1
1485_LT_EOF
1486])dnl /m4_if
1487],
1488[m4_if([$1], [], [
1489    PACKAGE='$PACKAGE'
1490    VERSION='$VERSION'
1491    RM='$RM'
1492    ofile='$ofile'], [])
1493])dnl /_LT_CONFIG_SAVE_COMMANDS
1494])# _LT_CONFIG
1495
1496
1497# LT_SUPPORTED_TAG(TAG)
1498# ---------------------
1499# Trace this macro to discover what tags are supported by the libtool
1500# --tag option, using:
1501#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
1502AC_DEFUN([LT_SUPPORTED_TAG], [])
1503
1504
1505# C support is built-in for now
1506m4_define([_LT_LANG_C_enabled], [])
1507m4_define([_LT_TAGS], [])
1508
1509
1510# LT_LANG(LANG)
1511# -------------
1512# Enable libtool support for the given language if not already enabled.
1513AC_DEFUN([LT_LANG],
1514[AC_BEFORE([$0], [LT_OUTPUT])dnl
1515m4_case([$1],
1516  [C],			[_LT_LANG(C)],
1517  [C++],		[_LT_LANG(CXX)],
1518  [Go],			[_LT_LANG(GO)],
1519  [Java],		[_LT_LANG(GCJ)],
1520  [Fortran 77],		[_LT_LANG(F77)],
1521  [Fortran],		[_LT_LANG(FC)],
1522  [Windows Resource],	[_LT_LANG(RC)],
1523  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
1524    [_LT_LANG($1)],
1525    [m4_fatal([$0: unsupported language: "$1"])])])dnl
1526])# LT_LANG
1527
1528
1529# _LT_LANG(LANGNAME)
1530# ------------------
1531m4_defun([_LT_LANG],
1532[m4_ifdef([_LT_LANG_]$1[_enabled], [],
1533  [LT_SUPPORTED_TAG([$1])dnl
1534  m4_append([_LT_TAGS], [$1 ])dnl
1535  m4_define([_LT_LANG_]$1[_enabled], [])dnl
1536  _LT_LANG_$1_CONFIG($1)])dnl
1537])# _LT_LANG
1538
1539
1540m4_ifndef([AC_PROG_GO], [
1541# NOTE: This macro has been submitted for inclusion into   #
1542#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
1543#  a released version of Autoconf we should remove this    #
1544#  macro and use it instead.                               #
1545m4_defun([AC_PROG_GO],
1546[AC_LANG_PUSH(Go)dnl
1547AC_ARG_VAR([GOC],     [Go compiler command])dnl
1548AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
1549_AC_ARG_VAR_LDFLAGS()dnl
1550AC_CHECK_TOOL(GOC, gccgo)
1551if test -z "$GOC"; then
1552  if test -n "$ac_tool_prefix"; then
1553    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
1554  fi
1555fi
1556if test -z "$GOC"; then
1557  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
1558fi
1559])#m4_defun
1560])#m4_ifndef
1561
1562
1563# _LT_LANG_DEFAULT_CONFIG
1564# -----------------------
1565m4_defun([_LT_LANG_DEFAULT_CONFIG],
1566[AC_PROVIDE_IFELSE([AC_PROG_CXX],
1567  [LT_LANG(CXX)],
1568  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
1569
1570AC_PROVIDE_IFELSE([AC_PROG_F77],
1571  [LT_LANG(F77)],
1572  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
1573
1574AC_PROVIDE_IFELSE([AC_PROG_FC],
1575  [LT_LANG(FC)],
1576  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
1577
1578dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
1579dnl pulling things in needlessly.
1580AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1581  [LT_LANG(GCJ)],
1582  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1583    [LT_LANG(GCJ)],
1584    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
1585      [LT_LANG(GCJ)],
1586      [m4_ifdef([AC_PROG_GCJ],
1587	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
1588       m4_ifdef([A][M_PROG_GCJ],
1589	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
1590       m4_ifdef([LT_PROG_GCJ],
1591	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
1592
1593AC_PROVIDE_IFELSE([AC_PROG_GO],
1594  [LT_LANG(GO)],
1595  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
1596
1597AC_PROVIDE_IFELSE([LT_PROG_RC],
1598  [LT_LANG(RC)],
1599  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
1600])# _LT_LANG_DEFAULT_CONFIG
1601
1602# Obsolete macros:
1603AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
1604AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
1605AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
1606AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
1607AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
1608dnl aclocal-1.4 backwards compatibility:
1609dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
1610dnl AC_DEFUN([AC_LIBTOOL_F77], [])
1611dnl AC_DEFUN([AC_LIBTOOL_FC], [])
1612dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
1613dnl AC_DEFUN([AC_LIBTOOL_RC], [])
1614
1615
1616# _LT_TAG_COMPILER
1617# ----------------
1618m4_defun([_LT_TAG_COMPILER],
1619[AC_REQUIRE([AC_PROG_CC])dnl
1620
1621_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
1622_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
1623_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
1624_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
1625
1626# If no C compiler was specified, use CC.
1627LTCC=${LTCC-"$CC"}
1628
1629# If no C compiler flags were specified, use CFLAGS.
1630LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1631
1632# Allow CC to be a program name with arguments.
1633compiler=$CC
1634])# _LT_TAG_COMPILER
1635
1636
1637# _LT_COMPILER_BOILERPLATE
1638# ------------------------
1639# Check for compiler boilerplate output or warnings with
1640# the simple compiler test code.
1641m4_defun([_LT_COMPILER_BOILERPLATE],
1642[m4_require([_LT_DECL_SED])dnl
1643ac_outfile=conftest.$ac_objext
1644echo "$lt_simple_compile_test_code" >conftest.$ac_ext
1645eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1646_lt_compiler_boilerplate=`cat conftest.err`
1647$RM conftest*
1648])# _LT_COMPILER_BOILERPLATE
1649
1650
1651# _LT_LINKER_BOILERPLATE
1652# ----------------------
1653# Check for linker boilerplate output or warnings with
1654# the simple link test code.
1655m4_defun([_LT_LINKER_BOILERPLATE],
1656[m4_require([_LT_DECL_SED])dnl
1657ac_outfile=conftest.$ac_objext
1658echo "$lt_simple_link_test_code" >conftest.$ac_ext
1659eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1660_lt_linker_boilerplate=`cat conftest.err`
1661$RM -r conftest*
1662])# _LT_LINKER_BOILERPLATE
1663
1664# _LT_REQUIRED_DARWIN_CHECKS
1665# -------------------------
1666m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
1667  case $host_os in
1668    rhapsody* | darwin*)
1669    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1670    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1671    AC_CHECK_TOOL([LIPO], [lipo], [:])
1672    AC_CHECK_TOOL([OTOOL], [otool], [:])
1673    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
1674    _LT_DECL([], [DSYMUTIL], [1],
1675      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1676    _LT_DECL([], [NMEDIT], [1],
1677      [Tool to change global to local symbols on Mac OS X])
1678    _LT_DECL([], [LIPO], [1],
1679      [Tool to manipulate fat objects and archives on Mac OS X])
1680    _LT_DECL([], [OTOOL], [1],
1681      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
1682    _LT_DECL([], [OTOOL64], [1],
1683      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
1684
1685    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1686      [lt_cv_apple_cc_single_mod=no
1687      if test -z "$LT_MULTI_MODULE"; then
1688	# By default we will add the -single_module flag. You can override
1689	# by either setting the environment variable LT_MULTI_MODULE
1690	# non-empty at configure time, or by adding -multi_module to the
1691	# link flags.
1692	rm -rf libconftest.dylib*
1693	echo "int foo(void){return 1;}" > conftest.c
1694	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1695-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1696	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1697	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1698        _lt_result=$?
1699	# If there is a non-empty error log, and "single_module"
1700	# appears in it, assume the flag caused a linker warning
1701        if test -s conftest.err && $GREP single_module conftest.err; then
1702	  cat conftest.err >&AS_MESSAGE_LOG_FD
1703	# Otherwise, if the output was created with a 0 exit code from
1704	# the compiler, it worked.
1705	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
1706	  lt_cv_apple_cc_single_mod=yes
1707	else
1708	  cat conftest.err >&AS_MESSAGE_LOG_FD
1709	fi
1710	rm -rf libconftest.dylib*
1711	rm -f conftest.*
1712      fi])
1713
1714    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1715      [lt_cv_ld_exported_symbols_list],
1716      [lt_cv_ld_exported_symbols_list=no
1717      save_LDFLAGS=$LDFLAGS
1718      echo "_main" > conftest.sym
1719      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1720      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1721	[lt_cv_ld_exported_symbols_list=yes],
1722	[lt_cv_ld_exported_symbols_list=no])
1723	LDFLAGS=$save_LDFLAGS
1724    ])
1725
1726    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
1727      [lt_cv_ld_force_load=no
1728      cat > conftest.c << _LT_EOF
1729int forced_loaded() { return 2;}
1730_LT_EOF
1731      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
1732      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1733      echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1734      $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1735      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
1736      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
1737      cat > conftest.c << _LT_EOF
1738int main() { return 0;}
1739_LT_EOF
1740      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
1741      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
1742      _lt_result=$?
1743      if test -s conftest.err && $GREP force_load conftest.err; then
1744	cat conftest.err >&AS_MESSAGE_LOG_FD
1745      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
1746	lt_cv_ld_force_load=yes
1747      else
1748	cat conftest.err >&AS_MESSAGE_LOG_FD
1749      fi
1750        rm -f conftest.err libconftest.a conftest conftest.c
1751        rm -rf conftest.dSYM
1752    ])
1753    case $host_os in
1754    rhapsody* | darwin1.[[012]])
1755      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
1756    darwin1.*)
1757      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
1758    darwin*) # darwin 5.x on
1759      # if running on 10.5 or later, the deployment target defaults
1760      # to the OS version, if on x86, and 10.4, the deployment
1761      # target defaults to 10.4. Don't you love it?
1762      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1763	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1764	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
1765	10.[[012]][[,.]]*)
1766	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
1767	10.*)
1768	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
1769      esac
1770    ;;
1771  esac
1772    if test yes = "$lt_cv_apple_cc_single_mod"; then
1773      _lt_dar_single_mod='$single_module'
1774    fi
1775    if test yes = "$lt_cv_ld_exported_symbols_list"; then
1776      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
1777    else
1778      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
1779    fi
1780    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
1781      _lt_dsymutil='~$DSYMUTIL $lib || :'
1782    else
1783      _lt_dsymutil=
1784    fi
1785    ;;
1786  esac
1787])
1788
1789
1790# _LT_DARWIN_LINKER_FEATURES([TAG])
1791# ---------------------------------
1792# Checks for linker and compiler features on darwin
1793m4_defun([_LT_DARWIN_LINKER_FEATURES],
1794[
1795  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1796  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1797  _LT_TAGVAR(hardcode_direct, $1)=no
1798  _LT_TAGVAR(hardcode_automatic, $1)=yes
1799  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1800  if test yes = "$lt_cv_ld_force_load"; then
1801    _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\"`'
1802    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
1803                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
1804  else
1805    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1806  fi
1807  _LT_TAGVAR(link_all_deplibs, $1)=yes
1808  _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
1809  case $cc_basename in
1810     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
1811     *) _lt_dar_can_shared=$GCC ;;
1812  esac
1813  if test yes = "$_lt_dar_can_shared"; then
1814    output_verbose_link_cmd=func_echo_all
1815    _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"
1816    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
1817    _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"
1818    _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"
1819    m4_if([$1], [CXX],
1820[   if test yes != "$lt_cv_apple_cc_single_mod"; then
1821      _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"
1822      _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"
1823    fi
1824],[])
1825  else
1826  _LT_TAGVAR(ld_shlibs, $1)=no
1827  fi
1828])
1829
1830# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1831# ----------------------------------
1832# Links a minimal program and checks the executable
1833# for the system default hardcoded library path. In most cases,
1834# this is /usr/lib:/lib, but when the MPI compilers are used
1835# the location of the communication and MPI libs are included too.
1836# If we don't find anything, use the default library path according
1837# to the aix ld manual.
1838# Store the results from the different compilers for each TAGNAME.
1839# Allow to override them for all tags through lt_cv_aix_libpath.
1840m4_defun([_LT_SYS_MODULE_PATH_AIX],
1841[m4_require([_LT_DECL_SED])dnl
1842if test set = "${lt_cv_aix_libpath+set}"; then
1843  aix_libpath=$lt_cv_aix_libpath
1844else
1845  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1846  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1847  lt_aix_libpath_sed='[
1848      /Import File Strings/,/^$/ {
1849	  /^0/ {
1850	      s/^0  *\([^ ]*\) *$/\1/
1851	      p
1852	  }
1853      }]'
1854  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1855  # Check for a 64-bit object if we didn't find anything.
1856  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1857    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1858  fi],[])
1859  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1860    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
1861  fi
1862  ])
1863  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1864fi
1865])# _LT_SYS_MODULE_PATH_AIX
1866
1867
1868# _LT_SHELL_INIT(ARG)
1869# -------------------
1870m4_define([_LT_SHELL_INIT],
1871[m4_divert_text([M4SH-INIT], [$1
1872])])# _LT_SHELL_INIT
1873
1874
1875
1876# _LT_PROG_ECHO_BACKSLASH
1877# -----------------------
1878# Find how we can fake an echo command that does not interpret backslash.
1879# In particular, with Autoconf 2.60 or later we add some code to the start
1880# of the generated configure script that will find a shell with a builtin
1881# printf (that we can use as an echo command).
1882m4_defun([_LT_PROG_ECHO_BACKSLASH],
1883[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1884ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1885ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1886
1887AC_MSG_CHECKING([how to print strings])
1888# Test print first, because it will be a builtin if present.
1889if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
1890   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1891  ECHO='print -r --'
1892elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1893  ECHO='printf %s\n'
1894else
1895  # Use this function as a fallback that always works.
1896  func_fallback_echo ()
1897  {
1898    eval 'cat <<_LTECHO_EOF
1899$[]1
1900_LTECHO_EOF'
1901  }
1902  ECHO='func_fallback_echo'
1903fi
1904
1905# func_echo_all arg...
1906# Invoke $ECHO with all args, space-separated.
1907func_echo_all ()
1908{
1909    $ECHO "$*"
1910}
1911
1912case $ECHO in
1913  printf*) AC_MSG_RESULT([printf]) ;;
1914  print*) AC_MSG_RESULT([print -r]) ;;
1915  *) AC_MSG_RESULT([cat]) ;;
1916esac
1917
1918m4_ifdef([_AS_DETECT_SUGGESTED],
1919[_AS_DETECT_SUGGESTED([
1920  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
1921    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1922    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1923    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1924    PATH=/empty FPATH=/empty; export PATH FPATH
1925    test "X`printf %s $ECHO`" = "X$ECHO" \
1926      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
1927
1928_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1929_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
1930])# _LT_PROG_ECHO_BACKSLASH
1931
1932
1933# _LT_WITH_SYSROOT
1934# ----------------
1935AC_DEFUN([_LT_WITH_SYSROOT],
1936[AC_MSG_CHECKING([for sysroot])
1937AC_ARG_WITH([sysroot],
1938[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
1939  [Search for dependent libraries within DIR (or the compiler's sysroot
1940   if not specified).])],
1941[], [with_sysroot=no])
1942
1943dnl lt_sysroot will always be passed unquoted.  We quote it here
1944dnl in case the user passed a directory name.
1945lt_sysroot=
1946case $with_sysroot in #(
1947 yes)
1948   if test yes = "$GCC"; then
1949     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
1950   fi
1951   ;; #(
1952 /*)
1953   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
1954   ;; #(
1955 no|'')
1956   ;; #(
1957 *)
1958   AC_MSG_RESULT([$with_sysroot])
1959   AC_MSG_ERROR([The sysroot must be an absolute path.])
1960   ;;
1961esac
1962
1963 AC_MSG_RESULT([${lt_sysroot:-no}])
1964_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
1965[dependent libraries, and where our libraries should be installed.])])
1966
1967# _LT_ENABLE_LOCK
1968# ---------------
1969m4_defun([_LT_ENABLE_LOCK],
1970[AC_ARG_ENABLE([libtool-lock],
1971  [AS_HELP_STRING([--disable-libtool-lock],
1972    [avoid locking (might break parallel builds)])])
1973test no = "$enable_libtool_lock" || enable_libtool_lock=yes
1974
1975# Some flags need to be propagated to the compiler or linker for good
1976# libtool support.
1977case $host in
1978ia64-*-hpux*)
1979  # Find out what ABI is being produced by ac_compile, and set mode
1980  # options accordingly.
1981  echo 'int i;' > conftest.$ac_ext
1982  if AC_TRY_EVAL(ac_compile); then
1983    case `/usr/bin/file conftest.$ac_objext` in
1984      *ELF-32*)
1985	HPUX_IA64_MODE=32
1986	;;
1987      *ELF-64*)
1988	HPUX_IA64_MODE=64
1989	;;
1990    esac
1991  fi
1992  rm -rf conftest*
1993  ;;
1994*-*-irix6*)
1995  # Find out what ABI is being produced by ac_compile, and set linker
1996  # options accordingly.
1997  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1998  if AC_TRY_EVAL(ac_compile); then
1999    if test yes = "$lt_cv_prog_gnu_ld"; then
2000      case `/usr/bin/file conftest.$ac_objext` in
2001	*32-bit*)
2002	  LD="${LD-ld} -melf32bsmip"
2003	  ;;
2004	*N32*)
2005	  LD="${LD-ld} -melf32bmipn32"
2006	  ;;
2007	*64-bit*)
2008	  LD="${LD-ld} -melf64bmip"
2009	;;
2010      esac
2011    else
2012      case `/usr/bin/file conftest.$ac_objext` in
2013	*32-bit*)
2014	  LD="${LD-ld} -32"
2015	  ;;
2016	*N32*)
2017	  LD="${LD-ld} -n32"
2018	  ;;
2019	*64-bit*)
2020	  LD="${LD-ld} -64"
2021	  ;;
2022      esac
2023    fi
2024  fi
2025  rm -rf conftest*
2026  ;;
2027
2028mips64*-*linux*)
2029  # Find out what ABI is being produced by ac_compile, and set linker
2030  # options accordingly.
2031  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
2032  if AC_TRY_EVAL(ac_compile); then
2033    emul=elf
2034    case `/usr/bin/file conftest.$ac_objext` in
2035      *32-bit*)
2036	emul="${emul}32"
2037	;;
2038      *64-bit*)
2039	emul="${emul}64"
2040	;;
2041    esac
2042    case `/usr/bin/file conftest.$ac_objext` in
2043      *MSB*)
2044	emul="${emul}btsmip"
2045	;;
2046      *LSB*)
2047	emul="${emul}ltsmip"
2048	;;
2049    esac
2050    case `/usr/bin/file conftest.$ac_objext` in
2051      *N32*)
2052	emul="${emul}n32"
2053	;;
2054    esac
2055    LD="${LD-ld} -m $emul"
2056  fi
2057  rm -rf conftest*
2058  ;;
2059
2060x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
2061s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
2062  # Find out what ABI is being produced by ac_compile, and set linker
2063  # options accordingly.  Note that the listed cases only cover the
2064  # situations where additional linker options are needed (such as when
2065  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
2066  # vice versa); the common cases where no linker options are needed do
2067  # not appear in the list.
2068  echo 'int i;' > conftest.$ac_ext
2069  if AC_TRY_EVAL(ac_compile); then
2070    case `/usr/bin/file conftest.o` in
2071      *32-bit*)
2072	case $host in
2073	  x86_64-*kfreebsd*-gnu)
2074	    LD="${LD-ld} -m elf_i386_fbsd"
2075	    ;;
2076	  x86_64-*linux*)
2077	    case `/usr/bin/file conftest.o` in
2078	      *x86-64*)
2079		LD="${LD-ld} -m elf32_x86_64"
2080		;;
2081	      *)
2082		LD="${LD-ld} -m elf_i386"
2083		;;
2084	    esac
2085	    ;;
2086	  powerpc64le-*linux*)
2087	    LD="${LD-ld} -m elf32lppclinux"
2088	    ;;
2089	  powerpc64-*linux*)
2090	    LD="${LD-ld} -m elf32ppclinux"
2091	    ;;
2092	  s390x-*linux*)
2093	    LD="${LD-ld} -m elf_s390"
2094	    ;;
2095	  sparc64-*linux*)
2096	    LD="${LD-ld} -m elf32_sparc"
2097	    ;;
2098	esac
2099	;;
2100      *64-bit*)
2101	case $host in
2102	  x86_64-*kfreebsd*-gnu)
2103	    LD="${LD-ld} -m elf_x86_64_fbsd"
2104	    ;;
2105	  x86_64-*linux*)
2106	    LD="${LD-ld} -m elf_x86_64"
2107	    ;;
2108	  powerpcle-*linux*)
2109	    LD="${LD-ld} -m elf64lppc"
2110	    ;;
2111	  powerpc-*linux*)
2112	    LD="${LD-ld} -m elf64ppc"
2113	    ;;
2114	  s390*-*linux*|s390*-*tpf*)
2115	    LD="${LD-ld} -m elf64_s390"
2116	    ;;
2117	  sparc*-*linux*)
2118	    LD="${LD-ld} -m elf64_sparc"
2119	    ;;
2120	esac
2121	;;
2122    esac
2123  fi
2124  rm -rf conftest*
2125  ;;
2126
2127*-*-sco3.2v5*)
2128  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2129  SAVE_CFLAGS=$CFLAGS
2130  CFLAGS="$CFLAGS -belf"
2131  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2132    [AC_LANG_PUSH(C)
2133     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2134     AC_LANG_POP])
2135  if test yes != "$lt_cv_cc_needs_belf"; then
2136    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2137    CFLAGS=$SAVE_CFLAGS
2138  fi
2139  ;;
2140*-*solaris*)
2141  # Find out what ABI is being produced by ac_compile, and set linker
2142  # options accordingly.
2143  echo 'int i;' > conftest.$ac_ext
2144  if AC_TRY_EVAL(ac_compile); then
2145    case `/usr/bin/file conftest.o` in
2146    *64-bit*)
2147      case $lt_cv_prog_gnu_ld in
2148      yes*)
2149        case $host in
2150        i?86-*-solaris*|x86_64-*-solaris*)
2151          LD="${LD-ld} -m elf_x86_64"
2152          ;;
2153        sparc*-*-solaris*)
2154          LD="${LD-ld} -m elf64_sparc"
2155          ;;
2156        esac
2157        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
2158        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
2159          LD=${LD-ld}_sol2
2160        fi
2161        ;;
2162      *)
2163	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2164	  LD="${LD-ld} -64"
2165	fi
2166	;;
2167      esac
2168      ;;
2169    esac
2170  fi
2171  rm -rf conftest*
2172  ;;
2173esac
2174
2175need_locks=$enable_libtool_lock
2176])# _LT_ENABLE_LOCK
2177
2178
2179# _LT_PROG_AR
2180# -----------
2181m4_defun([_LT_PROG_AR],
2182[AC_CHECK_TOOLS(AR, [ar], false)
2183: ${AR=ar}
2184_LT_DECL([], [AR], [1], [The archiver])
2185
2186# Use ARFLAGS variable as AR's operation code to sync the variable naming with
2187# Automake.  If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
2188# higher priority because thats what people were doing historically (setting
2189# ARFLAGS for automake and AR_FLAGS for libtool).  FIXME: Make the AR_FLAGS
2190# variable obsoleted/removed.
2191
2192test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
2193lt_ar_flags=$AR_FLAGS
2194_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)])
2195
2196# Make AR_FLAGS overridable by 'make ARFLAGS='.  Don't try to run-time override
2197# by AR_FLAGS because that was never working and AR_FLAGS is about to die.
2198_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}],
2199         [Flags to create an archive])
2200
2201AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
2202  [lt_cv_ar_at_file=no
2203   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
2204     [echo conftest.$ac_objext > conftest.lst
2205      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
2206      AC_TRY_EVAL([lt_ar_try])
2207      if test 0 -eq "$ac_status"; then
2208	# Ensure the archiver fails upon bogus file names.
2209	rm -f conftest.$ac_objext libconftest.a
2210	AC_TRY_EVAL([lt_ar_try])
2211	if test 0 -ne "$ac_status"; then
2212          lt_cv_ar_at_file=@
2213        fi
2214      fi
2215      rm -f conftest.* libconftest.a
2216     ])
2217  ])
2218
2219if test no = "$lt_cv_ar_at_file"; then
2220  archiver_list_spec=
2221else
2222  archiver_list_spec=$lt_cv_ar_at_file
2223fi
2224_LT_DECL([], [archiver_list_spec], [1],
2225  [How to feed a file listing to the archiver])
2226])# _LT_PROG_AR
2227
2228
2229# _LT_CMD_OLD_ARCHIVE
2230# -------------------
2231m4_defun([_LT_CMD_OLD_ARCHIVE],
2232[_LT_PROG_AR
2233
2234AC_CHECK_TOOL(STRIP, strip, :)
2235test -z "$STRIP" && STRIP=:
2236_LT_DECL([], [STRIP], [1], [A symbol stripping program])
2237
2238AC_CHECK_TOOL(RANLIB, ranlib, :)
2239test -z "$RANLIB" && RANLIB=:
2240_LT_DECL([], [RANLIB], [1],
2241    [Commands used to install an old-style archive])
2242
2243# Determine commands to create old-style static archives.
2244old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
2245old_postinstall_cmds='chmod 644 $oldlib'
2246old_postuninstall_cmds=
2247
2248if test -n "$RANLIB"; then
2249  case $host_os in
2250  bitrig* | openbsd*)
2251    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
2252    ;;
2253  *)
2254    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
2255    ;;
2256  esac
2257  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
2258fi
2259
2260case $host_os in
2261  darwin*)
2262    lock_old_archive_extraction=yes ;;
2263  *)
2264    lock_old_archive_extraction=no ;;
2265esac
2266_LT_DECL([], [old_postinstall_cmds], [2])
2267_LT_DECL([], [old_postuninstall_cmds], [2])
2268_LT_TAGDECL([], [old_archive_cmds], [2],
2269    [Commands used to build an old-style archive])
2270_LT_DECL([], [lock_old_archive_extraction], [0],
2271    [Whether to use a lock for old archive extraction])
2272])# _LT_CMD_OLD_ARCHIVE
2273
2274
2275# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2276#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2277# ----------------------------------------------------------------
2278# Check whether the given compiler option works
2279AC_DEFUN([_LT_COMPILER_OPTION],
2280[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2281m4_require([_LT_DECL_SED])dnl
2282AC_CACHE_CHECK([$1], [$2],
2283  [$2=no
2284   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2285   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2286   lt_compiler_flag="$3"  ## exclude from sc_useless_quotes_in_assignment
2287   # Insert the option either (1) after the last *FLAGS variable, or
2288   # (2) before a word containing "conftest.", or (3) at the end.
2289   # Note that $ac_compile itself does not contain backslashes and begins
2290   # with a dollar sign (not a hyphen), so the echo should work correctly.
2291   # The option is referenced via a variable to avoid confusing sed.
2292   lt_compile=`echo "$ac_compile" | $SED \
2293   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2294   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2295   -e 's:$: $lt_compiler_flag:'`
2296   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2297   (eval "$lt_compile" 2>conftest.err)
2298   ac_status=$?
2299   cat conftest.err >&AS_MESSAGE_LOG_FD
2300   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2301   if (exit $ac_status) && test -s "$ac_outfile"; then
2302     # The compiler can only warn and ignore the option if not recognized
2303     # So say no if there are warnings other than the usual output.
2304     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
2305     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2306     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2307       $2=yes
2308     fi
2309   fi
2310   $RM conftest*
2311])
2312
2313if test yes = "[$]$2"; then
2314    m4_if([$5], , :, [$5])
2315else
2316    m4_if([$6], , :, [$6])
2317fi
2318])# _LT_COMPILER_OPTION
2319
2320# Old name:
2321AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
2322dnl aclocal-1.4 backwards compatibility:
2323dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
2324
2325
2326# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2327#                  [ACTION-SUCCESS], [ACTION-FAILURE])
2328# ----------------------------------------------------
2329# Check whether the given linker option works
2330AC_DEFUN([_LT_LINKER_OPTION],
2331[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2332m4_require([_LT_DECL_SED])dnl
2333AC_CACHE_CHECK([$1], [$2],
2334  [$2=no
2335   save_LDFLAGS=$LDFLAGS
2336   LDFLAGS="$LDFLAGS $3"
2337   echo "$lt_simple_link_test_code" > conftest.$ac_ext
2338   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2339     # The linker can only warn and ignore the option if not recognized
2340     # So say no if there are warnings
2341     if test -s conftest.err; then
2342       # Append any errors to the config.log.
2343       cat conftest.err 1>&AS_MESSAGE_LOG_FD
2344       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
2345       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2346       if diff conftest.exp conftest.er2 >/dev/null; then
2347         $2=yes
2348       fi
2349     else
2350       $2=yes
2351     fi
2352   fi
2353   $RM -r conftest*
2354   LDFLAGS=$save_LDFLAGS
2355])
2356
2357if test yes = "[$]$2"; then
2358    m4_if([$4], , :, [$4])
2359else
2360    m4_if([$5], , :, [$5])
2361fi
2362])# _LT_LINKER_OPTION
2363
2364# Old name:
2365AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
2366dnl aclocal-1.4 backwards compatibility:
2367dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
2368
2369
2370# LT_CMD_MAX_LEN
2371#---------------
2372AC_DEFUN([LT_CMD_MAX_LEN],
2373[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2374# find the maximum length of command line arguments
2375AC_MSG_CHECKING([the maximum length of command line arguments])
2376AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2377  i=0
2378  teststring=ABCD
2379
2380  case $build_os in
2381  msdosdjgpp*)
2382    # On DJGPP, this test can blow up pretty badly due to problems in libc
2383    # (any single argument exceeding 2000 bytes causes a buffer overrun
2384    # during glob expansion).  Even if it were fixed, the result of this
2385    # check would be larger than it should be.
2386    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
2387    ;;
2388
2389  gnu*)
2390    # Under GNU Hurd, this test is not required because there is
2391    # no limit to the length of command line arguments.
2392    # Libtool will interpret -1 as no limit whatsoever
2393    lt_cv_sys_max_cmd_len=-1;
2394    ;;
2395
2396  cygwin* | mingw* | cegcc*)
2397    # On Win9x/ME, this test blows up -- it succeeds, but takes
2398    # about 5 minutes as the teststring grows exponentially.
2399    # Worse, since 9x/ME are not pre-emptively multitasking,
2400    # you end up with a "frozen" computer, even though with patience
2401    # the test eventually succeeds (with a max line length of 256k).
2402    # Instead, let's just punt: use the minimum linelength reported by
2403    # all of the supported platforms: 8192 (on NT/2K/XP).
2404    lt_cv_sys_max_cmd_len=8192;
2405    ;;
2406
2407  mint*)
2408    # On MiNT this can take a long time and run out of memory.
2409    lt_cv_sys_max_cmd_len=8192;
2410    ;;
2411
2412  amigaos*)
2413    # On AmigaOS with pdksh, this test takes hours, literally.
2414    # So we just punt and use a minimum line length of 8192.
2415    lt_cv_sys_max_cmd_len=8192;
2416    ;;
2417
2418  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
2419    # This has been around since 386BSD, at least.  Likely further.
2420    if test -x /sbin/sysctl; then
2421      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2422    elif test -x /usr/sbin/sysctl; then
2423      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2424    else
2425      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
2426    fi
2427    # And add a safety zone
2428    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2429    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2430    ;;
2431
2432  interix*)
2433    # We know the value 262144 and hardcode it with a safety zone (like BSD)
2434    lt_cv_sys_max_cmd_len=196608
2435    ;;
2436
2437  os2*)
2438    # The test takes a long time on OS/2.
2439    lt_cv_sys_max_cmd_len=8192
2440    ;;
2441
2442  osf*)
2443    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2444    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2445    # nice to cause kernel panics so lets avoid the loop below.
2446    # First set a reasonable default.
2447    lt_cv_sys_max_cmd_len=16384
2448    #
2449    if test -x /sbin/sysconfig; then
2450      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2451        *1*) lt_cv_sys_max_cmd_len=-1 ;;
2452      esac
2453    fi
2454    ;;
2455  sco3.2v5*)
2456    lt_cv_sys_max_cmd_len=102400
2457    ;;
2458  sysv5* | sco5v6* | sysv4.2uw2*)
2459    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2460    if test -n "$kargmax"; then
2461      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
2462    else
2463      lt_cv_sys_max_cmd_len=32768
2464    fi
2465    ;;
2466  *)
2467    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
2468    if test -n "$lt_cv_sys_max_cmd_len" && \
2469       test undefined != "$lt_cv_sys_max_cmd_len"; then
2470      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2471      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2472    else
2473      # Make teststring a little bigger before we do anything with it.
2474      # a 1K string should be a reasonable start.
2475      for i in 1 2 3 4 5 6 7 8; do
2476        teststring=$teststring$teststring
2477      done
2478      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2479      # If test is not a shell built-in, we'll probably end up computing a
2480      # maximum length that is only half of the actual maximum length, but
2481      # we can't tell.
2482      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
2483	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
2484	      test 17 != "$i" # 1/2 MB should be enough
2485      do
2486        i=`expr $i + 1`
2487        teststring=$teststring$teststring
2488      done
2489      # Only check the string length outside the loop.
2490      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
2491      teststring=
2492      # Add a significant safety factor because C++ compilers can tack on
2493      # massive amounts of additional arguments before passing them to the
2494      # linker.  It appears as though 1/2 is a usable value.
2495      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2496    fi
2497    ;;
2498  esac
2499])
2500if test -n "$lt_cv_sys_max_cmd_len"; then
2501  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2502else
2503  AC_MSG_RESULT(none)
2504fi
2505max_cmd_len=$lt_cv_sys_max_cmd_len
2506_LT_DECL([], [max_cmd_len], [0],
2507    [What is the maximum length of a command?])
2508])# LT_CMD_MAX_LEN
2509
2510# Old name:
2511AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
2512dnl aclocal-1.4 backwards compatibility:
2513dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
2514
2515
2516# _LT_HEADER_DLFCN
2517# ----------------
2518m4_defun([_LT_HEADER_DLFCN],
2519[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
2520])# _LT_HEADER_DLFCN
2521
2522
2523# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2524#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2525# ----------------------------------------------------------------
2526m4_defun([_LT_TRY_DLOPEN_SELF],
2527[m4_require([_LT_HEADER_DLFCN])dnl
2528if test yes = "$cross_compiling"; then :
2529  [$4]
2530else
2531  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2532  lt_status=$lt_dlunknown
2533  cat > conftest.$ac_ext <<_LT_EOF
2534[#line $LINENO "configure"
2535#include "confdefs.h"
2536
2537#if HAVE_DLFCN_H
2538#include <dlfcn.h>
2539#endif
2540
2541#include <stdio.h>
2542
2543#ifdef RTLD_GLOBAL
2544#  define LT_DLGLOBAL		RTLD_GLOBAL
2545#else
2546#  ifdef DL_GLOBAL
2547#    define LT_DLGLOBAL		DL_GLOBAL
2548#  else
2549#    define LT_DLGLOBAL		0
2550#  endif
2551#endif
2552
2553/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2554   find out it does not work in some platform. */
2555#ifndef LT_DLLAZY_OR_NOW
2556#  ifdef RTLD_LAZY
2557#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
2558#  else
2559#    ifdef DL_LAZY
2560#      define LT_DLLAZY_OR_NOW		DL_LAZY
2561#    else
2562#      ifdef RTLD_NOW
2563#        define LT_DLLAZY_OR_NOW	RTLD_NOW
2564#      else
2565#        ifdef DL_NOW
2566#          define LT_DLLAZY_OR_NOW	DL_NOW
2567#        else
2568#          define LT_DLLAZY_OR_NOW	0
2569#        endif
2570#      endif
2571#    endif
2572#  endif
2573#endif
2574
2575/* When -fvisibility=hidden is used, assume the code has been annotated
2576   correspondingly for the symbols needed.  */
2577#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
2578int fnord () __attribute__((visibility("default")));
2579#endif
2580
2581int fnord () { return 42; }
2582int main ()
2583{
2584  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2585  int status = $lt_dlunknown;
2586
2587  if (self)
2588    {
2589      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
2590      else
2591        {
2592	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
2593          else puts (dlerror ());
2594	}
2595      /* dlclose (self); */
2596    }
2597  else
2598    puts (dlerror ());
2599
2600  return status;
2601}]
2602_LT_EOF
2603  if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
2604    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
2605    lt_status=$?
2606    case x$lt_status in
2607      x$lt_dlno_uscore) $1 ;;
2608      x$lt_dlneed_uscore) $2 ;;
2609      x$lt_dlunknown|x*) $3 ;;
2610    esac
2611  else :
2612    # compilation failed
2613    $3
2614  fi
2615fi
2616rm -fr conftest*
2617])# _LT_TRY_DLOPEN_SELF
2618
2619
2620# LT_SYS_DLOPEN_SELF
2621# ------------------
2622AC_DEFUN([LT_SYS_DLOPEN_SELF],
2623[m4_require([_LT_HEADER_DLFCN])dnl
2624if test yes != "$enable_dlopen"; then
2625  enable_dlopen=unknown
2626  enable_dlopen_self=unknown
2627  enable_dlopen_self_static=unknown
2628else
2629  lt_cv_dlopen=no
2630  lt_cv_dlopen_libs=
2631
2632  case $host_os in
2633  beos*)
2634    lt_cv_dlopen=load_add_on
2635    lt_cv_dlopen_libs=
2636    lt_cv_dlopen_self=yes
2637    ;;
2638
2639  mingw* | pw32* | cegcc*)
2640    lt_cv_dlopen=LoadLibrary
2641    lt_cv_dlopen_libs=
2642    ;;
2643
2644  cygwin*)
2645    lt_cv_dlopen=dlopen
2646    lt_cv_dlopen_libs=
2647    ;;
2648
2649  darwin*)
2650    # if libdl is installed we need to link against it
2651    AC_CHECK_LIB([dl], [dlopen],
2652		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
2653    lt_cv_dlopen=dyld
2654    lt_cv_dlopen_libs=
2655    lt_cv_dlopen_self=yes
2656    ])
2657    ;;
2658
2659  tpf*)
2660    # Don't try to run any link tests for TPF.  We know it's impossible
2661    # because TPF is a cross-compiler, and we know how we open DSOs.
2662    lt_cv_dlopen=dlopen
2663    lt_cv_dlopen_libs=
2664    lt_cv_dlopen_self=no
2665    ;;
2666
2667  *)
2668    AC_CHECK_FUNC([shl_load],
2669	  [lt_cv_dlopen=shl_load],
2670      [AC_CHECK_LIB([dld], [shl_load],
2671	    [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
2672	[AC_CHECK_FUNC([dlopen],
2673	      [lt_cv_dlopen=dlopen],
2674	  [AC_CHECK_LIB([dl], [dlopen],
2675		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
2676	    [AC_CHECK_LIB([svld], [dlopen],
2677		  [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
2678	      [AC_CHECK_LIB([dld], [dld_link],
2679		    [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
2680	      ])
2681	    ])
2682	  ])
2683	])
2684      ])
2685    ;;
2686  esac
2687
2688  if test no = "$lt_cv_dlopen"; then
2689    enable_dlopen=no
2690  else
2691    enable_dlopen=yes
2692  fi
2693
2694  case $lt_cv_dlopen in
2695  dlopen)
2696    save_CPPFLAGS=$CPPFLAGS
2697    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2698
2699    save_LDFLAGS=$LDFLAGS
2700    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2701
2702    save_LIBS=$LIBS
2703    LIBS="$lt_cv_dlopen_libs $LIBS"
2704
2705    AC_CACHE_CHECK([whether a program can dlopen itself],
2706	  lt_cv_dlopen_self, [dnl
2707	  _LT_TRY_DLOPEN_SELF(
2708	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2709	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2710    ])
2711
2712    if test yes = "$lt_cv_dlopen_self"; then
2713      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2714      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2715	  lt_cv_dlopen_self_static, [dnl
2716	  _LT_TRY_DLOPEN_SELF(
2717	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2718	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
2719      ])
2720    fi
2721
2722    CPPFLAGS=$save_CPPFLAGS
2723    LDFLAGS=$save_LDFLAGS
2724    LIBS=$save_LIBS
2725    ;;
2726  esac
2727
2728  case $lt_cv_dlopen_self in
2729  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2730  *) enable_dlopen_self=unknown ;;
2731  esac
2732
2733  case $lt_cv_dlopen_self_static in
2734  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2735  *) enable_dlopen_self_static=unknown ;;
2736  esac
2737fi
2738_LT_DECL([dlopen_support], [enable_dlopen], [0],
2739	 [Whether dlopen is supported])
2740_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2741	 [Whether dlopen of programs is supported])
2742_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2743	 [Whether dlopen of statically linked programs is supported])
2744])# LT_SYS_DLOPEN_SELF
2745
2746# Old name:
2747AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2748dnl aclocal-1.4 backwards compatibility:
2749dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2750
2751
2752# _LT_COMPILER_C_O([TAGNAME])
2753# ---------------------------
2754# Check to see if options -c and -o are simultaneously supported by compiler.
2755# This macro does not hard code the compiler like AC_PROG_CC_C_O.
2756m4_defun([_LT_COMPILER_C_O],
2757[m4_require([_LT_DECL_SED])dnl
2758m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2759m4_require([_LT_TAG_COMPILER])dnl
2760AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2761  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2762  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2763   $RM -r conftest 2>/dev/null
2764   mkdir conftest
2765   cd conftest
2766   mkdir out
2767   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2768
2769   lt_compiler_flag="-o out/conftest2.$ac_objext"
2770   # Insert the option either (1) after the last *FLAGS variable, or
2771   # (2) before a word containing "conftest.", or (3) at the end.
2772   # Note that $ac_compile itself does not contain backslashes and begins
2773   # with a dollar sign (not a hyphen), so the echo should work correctly.
2774   lt_compile=`echo "$ac_compile" | $SED \
2775   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2776   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2777   -e 's:$: $lt_compiler_flag:'`
2778   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2779   (eval "$lt_compile" 2>out/conftest.err)
2780   ac_status=$?
2781   cat out/conftest.err >&AS_MESSAGE_LOG_FD
2782   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2783   if (exit $ac_status) && test -s out/conftest2.$ac_objext
2784   then
2785     # The compiler can only warn and ignore the option if not recognized
2786     # So say no if there are warnings
2787     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
2788     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2789     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2790       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2791     fi
2792   fi
2793   chmod u+w . 2>&AS_MESSAGE_LOG_FD
2794   $RM conftest*
2795   # SGI C++ compiler will create directory out/ii_files/ for
2796   # template instantiation
2797   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2798   $RM out/* && rmdir out
2799   cd ..
2800   $RM -r conftest
2801   $RM conftest*
2802])
2803_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2804	[Does compiler simultaneously support -c and -o options?])
2805])# _LT_COMPILER_C_O
2806
2807
2808# _LT_COMPILER_FILE_LOCKS([TAGNAME])
2809# ----------------------------------
2810# Check to see if we can do hard links to lock some files if needed
2811m4_defun([_LT_COMPILER_FILE_LOCKS],
2812[m4_require([_LT_ENABLE_LOCK])dnl
2813m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2814_LT_COMPILER_C_O([$1])
2815
2816hard_links=nottested
2817if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
2818  # do not overwrite the value of need_locks provided by the user
2819  AC_MSG_CHECKING([if we can lock with hard links])
2820  hard_links=yes
2821  $RM conftest*
2822  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2823  touch conftest.a
2824  ln conftest.a conftest.b 2>&5 || hard_links=no
2825  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2826  AC_MSG_RESULT([$hard_links])
2827  if test no = "$hard_links"; then
2828    AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
2829    need_locks=warn
2830  fi
2831else
2832  need_locks=no
2833fi
2834_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2835])# _LT_COMPILER_FILE_LOCKS
2836
2837
2838# _LT_CHECK_OBJDIR
2839# ----------------
2840m4_defun([_LT_CHECK_OBJDIR],
2841[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2842[rm -f .libs 2>/dev/null
2843mkdir .libs 2>/dev/null
2844if test -d .libs; then
2845  lt_cv_objdir=.libs
2846else
2847  # MS-DOS does not allow filenames that begin with a dot.
2848  lt_cv_objdir=_libs
2849fi
2850rmdir .libs 2>/dev/null])
2851objdir=$lt_cv_objdir
2852_LT_DECL([], [objdir], [0],
2853         [The name of the directory that contains temporary libtool files])dnl
2854m4_pattern_allow([LT_OBJDIR])dnl
2855AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
2856  [Define to the sub-directory where libtool stores uninstalled libraries.])
2857])# _LT_CHECK_OBJDIR
2858
2859
2860# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2861# --------------------------------------
2862# Check hardcoding attributes.
2863m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2864[AC_MSG_CHECKING([how to hardcode library paths into programs])
2865_LT_TAGVAR(hardcode_action, $1)=
2866if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2867   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2868   test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
2869
2870  # We can hardcode non-existent directories.
2871  if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
2872     # If the only mechanism to avoid hardcoding is shlibpath_var, we
2873     # have to relink, otherwise we might link with an installed library
2874     # when we should be linking with a yet-to-be-installed one
2875     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
2876     test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
2877    # Linking always hardcodes the temporary library directory.
2878    _LT_TAGVAR(hardcode_action, $1)=relink
2879  else
2880    # We can link without hardcoding, and we can hardcode nonexisting dirs.
2881    _LT_TAGVAR(hardcode_action, $1)=immediate
2882  fi
2883else
2884  # We cannot hardcode anything, or else we can only hardcode existing
2885  # directories.
2886  _LT_TAGVAR(hardcode_action, $1)=unsupported
2887fi
2888AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2889
2890if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
2891   test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
2892  # Fast installation is not supported
2893  enable_fast_install=no
2894elif test yes = "$shlibpath_overrides_runpath" ||
2895     test no = "$enable_shared"; then
2896  # Fast installation is not necessary
2897  enable_fast_install=needless
2898fi
2899_LT_TAGDECL([], [hardcode_action], [0],
2900    [How to hardcode a shared library path into an executable])
2901])# _LT_LINKER_HARDCODE_LIBPATH
2902
2903
2904# _LT_CMD_STRIPLIB
2905# ----------------
2906m4_defun([_LT_CMD_STRIPLIB],
2907[m4_require([_LT_DECL_EGREP])
2908striplib=
2909old_striplib=
2910AC_MSG_CHECKING([whether stripping libraries is possible])
2911if test -z "$STRIP"; then
2912  AC_MSG_RESULT([no])
2913else
2914  if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2915    old_striplib="$STRIP --strip-debug"
2916    striplib="$STRIP --strip-unneeded"
2917    AC_MSG_RESULT([yes])
2918  else
2919    case $host_os in
2920    darwin*)
2921      # FIXME - insert some real tests, host_os isn't really good enough
2922      striplib="$STRIP -x"
2923      old_striplib="$STRIP -S"
2924      AC_MSG_RESULT([yes])
2925      ;;
2926    freebsd*)
2927      if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
2928        old_striplib="$STRIP --strip-debug"
2929        striplib="$STRIP --strip-unneeded"
2930        AC_MSG_RESULT([yes])
2931      else
2932        AC_MSG_RESULT([no])
2933      fi
2934      ;;
2935    *)
2936      AC_MSG_RESULT([no])
2937      ;;
2938    esac
2939  fi
2940fi
2941_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2942_LT_DECL([], [striplib], [1])
2943])# _LT_CMD_STRIPLIB
2944
2945
2946# _LT_PREPARE_MUNGE_PATH_LIST
2947# ---------------------------
2948# Make sure func_munge_path_list() is defined correctly.
2949m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
2950[[# func_munge_path_list VARIABLE PATH
2951# -----------------------------------
2952# VARIABLE is name of variable containing _space_ separated list of
2953# directories to be munged by the contents of PATH, which is string
2954# having a format:
2955# "DIR[:DIR]:"
2956#       string "DIR[ DIR]" will be prepended to VARIABLE
2957# ":DIR[:DIR]"
2958#       string "DIR[ DIR]" will be appended to VARIABLE
2959# "DIRP[:DIRP]::[DIRA:]DIRA"
2960#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
2961#       "DIRA[ DIRA]" will be appended to VARIABLE
2962# "DIR[:DIR]"
2963#       VARIABLE will be replaced by "DIR[ DIR]"
2964func_munge_path_list ()
2965{
2966    case x@S|@2 in
2967    x)
2968        ;;
2969    *:)
2970        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
2971        ;;
2972    x:*)
2973        eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
2974        ;;
2975    *::*)
2976        eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
2977        eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
2978        ;;
2979    *)
2980        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
2981        ;;
2982    esac
2983}
2984]])# _LT_PREPARE_PATH_LIST
2985
2986
2987# _LT_SYS_DYNAMIC_LINKER([TAG])
2988# -----------------------------
2989# PORTME Fill in your ld.so characteristics
2990m4_defun([_LT_SYS_DYNAMIC_LINKER],
2991[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2992m4_require([_LT_DECL_EGREP])dnl
2993m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2994m4_require([_LT_DECL_OBJDUMP])dnl
2995m4_require([_LT_DECL_SED])dnl
2996m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2997m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
2998AC_MSG_CHECKING([dynamic linker characteristics])
2999m4_if([$1],
3000	[], [
3001if test yes = "$GCC"; then
3002  case $host_os in
3003    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
3004    *) lt_awk_arg='/^libraries:/' ;;
3005  esac
3006  case $host_os in
3007    mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
3008    *) lt_sed_strip_eq='s|=/|/|g' ;;
3009  esac
3010  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
3011  case $lt_search_path_spec in
3012  *\;*)
3013    # if the path contains ";" then we assume it to be the separator
3014    # otherwise default to the standard path separator (i.e. ":") - it is
3015    # assumed that no part of a normal pathname contains ";" but that should
3016    # okay in the real world where ";" in dirpaths is itself problematic.
3017    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
3018    ;;
3019  *)
3020    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
3021    ;;
3022  esac
3023  # Ok, now we have the path, separated by spaces, we can step through it
3024  # and add multilib dir if necessary...
3025  lt_tmp_lt_search_path_spec=
3026  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
3027  # ...but if some path component already ends with the multilib dir we assume
3028  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
3029  case "$lt_multi_os_dir; $lt_search_path_spec " in
3030  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
3031    lt_multi_os_dir=
3032    ;;
3033  esac
3034  for lt_sys_path in $lt_search_path_spec; do
3035    if test -d "$lt_sys_path$lt_multi_os_dir"; then
3036      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
3037    elif test -n "$lt_multi_os_dir"; then
3038      test -d "$lt_sys_path" && \
3039	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
3040    fi
3041  done
3042  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
3043BEGIN {RS = " "; FS = "/|\n";} {
3044  lt_foo = "";
3045  lt_count = 0;
3046  for (lt_i = NF; lt_i > 0; lt_i--) {
3047    if ($lt_i != "" && $lt_i != ".") {
3048      if ($lt_i == "..") {
3049        lt_count++;
3050      } else {
3051        if (lt_count == 0) {
3052          lt_foo = "/" $lt_i lt_foo;
3053        } else {
3054          lt_count--;
3055        }
3056      }
3057    }
3058  }
3059  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
3060  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
3061}'`
3062  # AWK program above erroneously prepends '/' to C:/dos/paths
3063  # for these hosts.
3064  case $host_os in
3065    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
3066      $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
3067  esac
3068  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
3069else
3070  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3071fi])
3072library_names_spec=
3073libname_spec='lib$name'
3074soname_spec=
3075shrext_cmds=.so
3076postinstall_cmds=
3077postuninstall_cmds=
3078finish_cmds=
3079finish_eval=
3080shlibpath_var=
3081shlibpath_overrides_runpath=unknown
3082version_type=none
3083dynamic_linker="$host_os ld.so"
3084sys_lib_dlsearch_path_spec="/lib /usr/lib"
3085need_lib_prefix=unknown
3086hardcode_into_libs=no
3087
3088# when you set need_version to no, make sure it does not cause -set_version
3089# flags to be left without arguments
3090need_version=unknown
3091
3092AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
3093[User-defined run-time library search path.])
3094
3095case $host_os in
3096aix3*)
3097  version_type=linux # correct to gnu/linux during the next big refactor
3098  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
3099  shlibpath_var=LIBPATH
3100
3101  # AIX 3 has no versioning support, so we append a major version to the name.
3102  soname_spec='$libname$release$shared_ext$major'
3103  ;;
3104
3105aix[[4-9]]*)
3106  version_type=linux # correct to gnu/linux during the next big refactor
3107  need_lib_prefix=no
3108  need_version=no
3109  hardcode_into_libs=yes
3110  if test ia64 = "$host_cpu"; then
3111    # AIX 5 supports IA64
3112    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
3113    shlibpath_var=LD_LIBRARY_PATH
3114  else
3115    # With GCC up to 2.95.x, collect2 would create an import file
3116    # for dependence libraries.  The import file would start with
3117    # the line '#! .'.  This would cause the generated library to
3118    # depend on '.', always an invalid library.  This was fixed in
3119    # development snapshots of GCC prior to 3.0.
3120    case $host_os in
3121      aix4 | aix4.[[01]] | aix4.[[01]].*)
3122      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
3123	   echo ' yes '
3124	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
3125	:
3126      else
3127	can_build_shared=no
3128      fi
3129      ;;
3130    esac
3131    # Using Import Files as archive members, it is possible to support
3132    # filename-based versioning of shared library archives on AIX. While
3133    # this would work for both with and without runtime linking, it will
3134    # prevent static linking of such archives. So we do filename-based
3135    # shared library versioning with .so extension only, which is used
3136    # when both runtime linking and shared linking is enabled.
3137    # Unfortunately, runtime linking may impact performance, so we do
3138    # not want this to be the default eventually. Also, we use the
3139    # versioned .so libs for executables only if there is the -brtl
3140    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
3141    # To allow for filename-based versioning support, we need to create
3142    # libNAME.so.V as an archive file, containing:
3143    # *) an Import File, referring to the versioned filename of the
3144    #    archive as well as the shared archive member, telling the
3145    #    bitwidth (32 or 64) of that shared object, and providing the
3146    #    list of exported symbols of that shared object, eventually
3147    #    decorated with the 'weak' keyword
3148    # *) the shared object with the F_LOADONLY flag set, to really avoid
3149    #    it being seen by the linker.
3150    # At run time we better use the real file rather than another symlink,
3151    # but for link time we create the symlink libNAME.so -> libNAME.so.V
3152
3153    case $with_aix_soname,$aix_use_runtimelinking in
3154    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
3155    # soname into executable. Probably we can add versioning support to
3156    # collect2, so additional links can be useful in future.
3157    aix,yes) # traditional libtool
3158      dynamic_linker='AIX unversionable lib.so'
3159      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
3160      # instead of lib<name>.a to let people know that these are not
3161      # typical AIX shared libraries.
3162      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3163      ;;
3164    aix,no) # traditional AIX only
3165      dynamic_linker='AIX lib.a[(]lib.so.V[)]'
3166      # We preserve .a as extension for shared libraries through AIX4.2
3167      # and later when we are not doing run time linking.
3168      library_names_spec='$libname$release.a $libname.a'
3169      soname_spec='$libname$release$shared_ext$major'
3170      ;;
3171    svr4,*) # full svr4 only
3172      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
3173      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
3174      # We do not specify a path in Import Files, so LIBPATH fires.
3175      shlibpath_overrides_runpath=yes
3176      ;;
3177    *,yes) # both, prefer svr4
3178      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
3179      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
3180      # unpreferred sharedlib libNAME.a needs extra handling
3181      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"'
3182      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"'
3183      # We do not specify a path in Import Files, so LIBPATH fires.
3184      shlibpath_overrides_runpath=yes
3185      ;;
3186    *,no) # both, prefer aix
3187      dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
3188      library_names_spec='$libname$release.a $libname.a'
3189      soname_spec='$libname$release$shared_ext$major'
3190      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
3191      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)'
3192      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"'
3193      ;;
3194    esac
3195    shlibpath_var=LIBPATH
3196  fi
3197  ;;
3198
3199amigaos*)
3200  case $host_cpu in
3201  powerpc)
3202    # Since July 2007 AmigaOS4 officially supports .so libraries.
3203    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
3204    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3205    ;;
3206  m68k)
3207    library_names_spec='$libname.ixlibrary $libname.a'
3208    # Create ${libname}_ixlibrary.a entries in /sys/libs.
3209    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'
3210    ;;
3211  esac
3212  ;;
3213
3214beos*)
3215  library_names_spec='$libname$shared_ext'
3216  dynamic_linker="$host_os ld.so"
3217  shlibpath_var=LIBRARY_PATH
3218  ;;
3219
3220bsdi[[45]]*)
3221  version_type=linux # correct to gnu/linux during the next big refactor
3222  need_version=no
3223  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3224  soname_spec='$libname$release$shared_ext$major'
3225  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3226  shlibpath_var=LD_LIBRARY_PATH
3227  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3228  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3229  # the default ld.so.conf also contains /usr/contrib/lib and
3230  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3231  # libtool to hard-code these into programs
3232  ;;
3233
3234cygwin* | mingw* | pw32* | cegcc*)
3235  version_type=windows
3236  shrext_cmds=.dll
3237  need_version=no
3238  need_lib_prefix=no
3239
3240  case $GCC,$cc_basename in
3241  yes,*)
3242    # gcc
3243    library_names_spec='$libname.dll.a'
3244    # DLL is installed to $(libdir)/../bin by postinstall_cmds
3245    postinstall_cmds='base_file=`basename \$file`~
3246      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
3247      dldir=$destdir/`dirname \$dlpath`~
3248      test -d \$dldir || mkdir -p \$dldir~
3249      $install_prog $dir/$dlname \$dldir/$dlname~
3250      chmod a+x \$dldir/$dlname~
3251      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
3252        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
3253      fi'
3254    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3255      dlpath=$dir/\$dldll~
3256       $RM \$dlpath'
3257    shlibpath_overrides_runpath=yes
3258
3259    case $host_os in
3260    cygwin*)
3261      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
3262      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
3263m4_if([$1], [],[
3264      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
3265      ;;
3266    mingw* | cegcc*)
3267      # MinGW DLLs use traditional 'lib' prefix
3268      soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
3269      ;;
3270    pw32*)
3271      # pw32 DLLs use 'pw' prefix rather than 'lib'
3272      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
3273      ;;
3274    esac
3275    dynamic_linker='Win32 ld.exe'
3276    ;;
3277
3278  *,cl*)
3279    # Native MSVC
3280    libname_spec='$name'
3281    soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
3282    library_names_spec='$libname.dll.lib'
3283
3284    case $build_os in
3285    mingw*)
3286      sys_lib_search_path_spec=
3287      lt_save_ifs=$IFS
3288      IFS=';'
3289      for lt_path in $LIB
3290      do
3291        IFS=$lt_save_ifs
3292        # Let DOS variable expansion print the short 8.3 style file name.
3293        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
3294        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
3295      done
3296      IFS=$lt_save_ifs
3297      # Convert to MSYS style.
3298      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
3299      ;;
3300    cygwin*)
3301      # Convert to unix form, then to dos form, then back to unix form
3302      # but this time dos style (no spaces!) so that the unix form looks
3303      # like /cygdrive/c/PROGRA~1:/cygdr...
3304      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
3305      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
3306      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3307      ;;
3308    *)
3309      sys_lib_search_path_spec=$LIB
3310      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
3311        # It is most probably a Windows format PATH.
3312        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3313      else
3314        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3315      fi
3316      # FIXME: find the short name or the path components, as spaces are
3317      # common. (e.g. "Program Files" -> "PROGRA~1")
3318      ;;
3319    esac
3320
3321    # DLL is installed to $(libdir)/../bin by postinstall_cmds
3322    postinstall_cmds='base_file=`basename \$file`~
3323      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
3324      dldir=$destdir/`dirname \$dlpath`~
3325      test -d \$dldir || mkdir -p \$dldir~
3326      $install_prog $dir/$dlname \$dldir/$dlname'
3327    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3328      dlpath=$dir/\$dldll~
3329       $RM \$dlpath'
3330    shlibpath_overrides_runpath=yes
3331    dynamic_linker='Win32 link.exe'
3332    ;;
3333
3334  *)
3335    # Assume MSVC wrapper
3336    library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
3337    dynamic_linker='Win32 ld.exe'
3338    ;;
3339  esac
3340  # FIXME: first we should search . and the directory the executable is in
3341  shlibpath_var=PATH
3342  ;;
3343
3344darwin* | rhapsody*)
3345  dynamic_linker="$host_os dyld"
3346  version_type=darwin
3347  need_lib_prefix=no
3348  need_version=no
3349  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
3350  soname_spec='$libname$release$major$shared_ext'
3351  shlibpath_overrides_runpath=yes
3352  shlibpath_var=DYLD_LIBRARY_PATH
3353  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
3354m4_if([$1], [],[
3355  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
3356  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3357  ;;
3358
3359dgux*)
3360  version_type=linux # correct to gnu/linux during the next big refactor
3361  need_lib_prefix=no
3362  need_version=no
3363  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3364  soname_spec='$libname$release$shared_ext$major'
3365  shlibpath_var=LD_LIBRARY_PATH
3366  ;;
3367
3368freebsd* | dragonfly*)
3369  # DragonFly does not have aout.  When/if they implement a new
3370  # versioning mechanism, adjust this.
3371  if test -x /usr/bin/objformat; then
3372    objformat=`/usr/bin/objformat`
3373  else
3374    case $host_os in
3375    freebsd[[23]].*) objformat=aout ;;
3376    *) objformat=elf ;;
3377    esac
3378  fi
3379  version_type=freebsd-$objformat
3380  case $version_type in
3381    freebsd-elf*)
3382      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3383      soname_spec='$libname$release$shared_ext$major'
3384      need_version=no
3385      need_lib_prefix=no
3386      ;;
3387    freebsd-*)
3388      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
3389      need_version=yes
3390      ;;
3391  esac
3392  shlibpath_var=LD_LIBRARY_PATH
3393  case $host_os in
3394  freebsd2.*)
3395    shlibpath_overrides_runpath=yes
3396    ;;
3397  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3398    shlibpath_overrides_runpath=yes
3399    hardcode_into_libs=yes
3400    ;;
3401  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3402  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
3403    shlibpath_overrides_runpath=no
3404    hardcode_into_libs=yes
3405    ;;
3406  *) # from 4.6 on, and DragonFly
3407    shlibpath_overrides_runpath=yes
3408    hardcode_into_libs=yes
3409    ;;
3410  esac
3411  ;;
3412
3413haiku*)
3414  version_type=linux # correct to gnu/linux during the next big refactor
3415  need_lib_prefix=no
3416  need_version=no
3417  dynamic_linker="$host_os runtime_loader"
3418  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3419  soname_spec='$libname$release$shared_ext$major'
3420  shlibpath_var=LIBRARY_PATH
3421  shlibpath_overrides_runpath=no
3422  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
3423  hardcode_into_libs=yes
3424  ;;
3425
3426hpux9* | hpux10* | hpux11*)
3427  # Give a soname corresponding to the major version so that dld.sl refuses to
3428  # link against other versions.
3429  version_type=sunos
3430  need_lib_prefix=no
3431  need_version=no
3432  case $host_cpu in
3433  ia64*)
3434    shrext_cmds='.so'
3435    hardcode_into_libs=yes
3436    dynamic_linker="$host_os dld.so"
3437    shlibpath_var=LD_LIBRARY_PATH
3438    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3439    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3440    soname_spec='$libname$release$shared_ext$major'
3441    if test 32 = "$HPUX_IA64_MODE"; then
3442      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3443      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
3444    else
3445      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3446      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
3447    fi
3448    ;;
3449  hppa*64*)
3450    shrext_cmds='.sl'
3451    hardcode_into_libs=yes
3452    dynamic_linker="$host_os dld.sl"
3453    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3454    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3455    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3456    soname_spec='$libname$release$shared_ext$major'
3457    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3458    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3459    ;;
3460  *)
3461    shrext_cmds='.sl'
3462    dynamic_linker="$host_os dld.sl"
3463    shlibpath_var=SHLIB_PATH
3464    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3465    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3466    soname_spec='$libname$release$shared_ext$major'
3467    ;;
3468  esac
3469  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
3470  postinstall_cmds='chmod 555 $lib'
3471  # or fails outright, so override atomically:
3472  install_override_mode=555
3473  ;;
3474
3475interix[[3-9]]*)
3476  version_type=linux # correct to gnu/linux during the next big refactor
3477  need_lib_prefix=no
3478  need_version=no
3479  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3480  soname_spec='$libname$release$shared_ext$major'
3481  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3482  shlibpath_var=LD_LIBRARY_PATH
3483  shlibpath_overrides_runpath=no
3484  hardcode_into_libs=yes
3485  ;;
3486
3487irix5* | irix6* | nonstopux*)
3488  case $host_os in
3489    nonstopux*) version_type=nonstopux ;;
3490    *)
3491	if test yes = "$lt_cv_prog_gnu_ld"; then
3492		version_type=linux # correct to gnu/linux during the next big refactor
3493	else
3494		version_type=irix
3495	fi ;;
3496  esac
3497  need_lib_prefix=no
3498  need_version=no
3499  soname_spec='$libname$release$shared_ext$major'
3500  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
3501  case $host_os in
3502  irix5* | nonstopux*)
3503    libsuff= shlibsuff=
3504    ;;
3505  *)
3506    case $LD in # libtool.m4 will add one of these switches to LD
3507    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3508      libsuff= shlibsuff= libmagic=32-bit;;
3509    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3510      libsuff=32 shlibsuff=N32 libmagic=N32;;
3511    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3512      libsuff=64 shlibsuff=64 libmagic=64-bit;;
3513    *) libsuff= shlibsuff= libmagic=never-match;;
3514    esac
3515    ;;
3516  esac
3517  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3518  shlibpath_overrides_runpath=no
3519  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
3520  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
3521  hardcode_into_libs=yes
3522  ;;
3523
3524# No shared lib support for Linux oldld, aout, or coff.
3525linux*oldld* | linux*aout* | linux*coff*)
3526  dynamic_linker=no
3527  ;;
3528
3529linux*android*)
3530  version_type=none # Android doesn't support versioned libraries.
3531  need_lib_prefix=no
3532  need_version=no
3533  library_names_spec='$libname$release$shared_ext'
3534  soname_spec='$libname$release$shared_ext'
3535  finish_cmds=
3536  shlibpath_var=LD_LIBRARY_PATH
3537  shlibpath_overrides_runpath=yes
3538
3539  # This implies no fast_install, which is unacceptable.
3540  # Some rework will be needed to allow for fast_install
3541  # before this can be enabled.
3542  hardcode_into_libs=yes
3543
3544  dynamic_linker='Android linker'
3545  # Don't embed -rpath directories since the linker doesn't support them.
3546  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3547  ;;
3548
3549# This must be glibc/ELF.
3550linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
3551  version_type=linux # correct to gnu/linux during the next big refactor
3552  need_lib_prefix=no
3553  need_version=no
3554  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3555  soname_spec='$libname$release$shared_ext$major'
3556  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3557  shlibpath_var=LD_LIBRARY_PATH
3558  shlibpath_overrides_runpath=no
3559
3560  # Some binutils ld are patched to set DT_RUNPATH
3561  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
3562    [lt_cv_shlibpath_overrides_runpath=no
3563    save_LDFLAGS=$LDFLAGS
3564    save_libdir=$libdir
3565    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
3566	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
3567    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3568      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
3569	 [lt_cv_shlibpath_overrides_runpath=yes])])
3570    LDFLAGS=$save_LDFLAGS
3571    libdir=$save_libdir
3572    ])
3573  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
3574
3575  # This implies no fast_install, which is unacceptable.
3576  # Some rework will be needed to allow for fast_install
3577  # before this can be enabled.
3578  hardcode_into_libs=yes
3579
3580  # Ideally, we could use ldconfig to report *all* directores which are
3581  # searched for libraries, however this is still not possible.  Aside from not
3582  # being certain /sbin/ldconfig is available, command
3583  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
3584  # even though it is searched at run-time.  Try to do the best guess by
3585  # appending ld.so.conf contents (and includes) to the search path.
3586  if test -f /etc/ld.so.conf; then
3587    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' ' '`
3588    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
3589  fi
3590
3591  # We used to test for /lib/ld.so.1 and disable shared libraries on
3592  # powerpc, because MkLinux only supported shared libraries with the
3593  # GNU dynamic linker.  Since this was broken with cross compilers,
3594  # most powerpc-linux boxes support dynamic linking these days and
3595  # people can always --disable-shared, the test was removed, and we
3596  # assume the GNU/Linux dynamic linker is in use.
3597  dynamic_linker='GNU/Linux ld.so'
3598  ;;
3599
3600netbsd*)
3601  version_type=sunos
3602  need_lib_prefix=no
3603  need_version=no
3604  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
3605    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
3606    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3607    dynamic_linker='NetBSD (a.out) ld.so'
3608  else
3609    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3610    soname_spec='$libname$release$shared_ext$major'
3611    dynamic_linker='NetBSD ld.elf_so'
3612  fi
3613  shlibpath_var=LD_LIBRARY_PATH
3614  shlibpath_overrides_runpath=yes
3615  hardcode_into_libs=yes
3616  ;;
3617
3618newsos6)
3619  version_type=linux # correct to gnu/linux during the next big refactor
3620  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3621  shlibpath_var=LD_LIBRARY_PATH
3622  shlibpath_overrides_runpath=yes
3623  ;;
3624
3625*nto* | *qnx*)
3626  version_type=qnx
3627  need_lib_prefix=no
3628  need_version=no
3629  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3630  soname_spec='$libname$release$shared_ext$major'
3631  shlibpath_var=LD_LIBRARY_PATH
3632  shlibpath_overrides_runpath=no
3633  hardcode_into_libs=yes
3634  dynamic_linker='ldqnx.so'
3635  ;;
3636
3637openbsd* | bitrig*)
3638  version_type=sunos
3639  sys_lib_dlsearch_path_spec=/usr/lib
3640  need_lib_prefix=no
3641  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
3642    need_version=no
3643  else
3644    need_version=yes
3645  fi
3646  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
3647  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3648  shlibpath_var=LD_LIBRARY_PATH
3649  shlibpath_overrides_runpath=yes
3650  ;;
3651
3652os2*)
3653  libname_spec='$name'
3654  version_type=windows
3655  shrext_cmds=.dll
3656  need_version=no
3657  need_lib_prefix=no
3658  # OS/2 can only load a DLL with a base name of 8 characters or less.
3659  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
3660    v=$($ECHO $release$versuffix | tr -d .-);
3661    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
3662    $ECHO $n$v`$shared_ext'
3663  library_names_spec='${libname}_dll.$libext'
3664  dynamic_linker='OS/2 ld.exe'
3665  shlibpath_var=BEGINLIBPATH
3666  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3667  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3668  postinstall_cmds='base_file=`basename \$file`~
3669    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
3670    dldir=$destdir/`dirname \$dlpath`~
3671    test -d \$dldir || mkdir -p \$dldir~
3672    $install_prog $dir/$dlname \$dldir/$dlname~
3673    chmod a+x \$dldir/$dlname~
3674    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
3675      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
3676    fi'
3677  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
3678    dlpath=$dir/\$dldll~
3679    $RM \$dlpath'
3680  ;;
3681
3682osf3* | osf4* | osf5*)
3683  version_type=osf
3684  need_lib_prefix=no
3685  need_version=no
3686  soname_spec='$libname$release$shared_ext$major'
3687  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3688  shlibpath_var=LD_LIBRARY_PATH
3689  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3690  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3691  ;;
3692
3693rdos*)
3694  dynamic_linker=no
3695  ;;
3696
3697solaris*)
3698  version_type=linux # correct to gnu/linux during the next big refactor
3699  need_lib_prefix=no
3700  need_version=no
3701  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3702  soname_spec='$libname$release$shared_ext$major'
3703  shlibpath_var=LD_LIBRARY_PATH
3704  shlibpath_overrides_runpath=yes
3705  hardcode_into_libs=yes
3706  # ldd complains unless libraries are executable
3707  postinstall_cmds='chmod +x $lib'
3708  ;;
3709
3710sunos4*)
3711  version_type=sunos
3712  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
3713  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3714  shlibpath_var=LD_LIBRARY_PATH
3715  shlibpath_overrides_runpath=yes
3716  if test yes = "$with_gnu_ld"; then
3717    need_lib_prefix=no
3718  fi
3719  need_version=yes
3720  ;;
3721
3722sysv4 | sysv4.3*)
3723  version_type=linux # correct to gnu/linux during the next big refactor
3724  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3725  soname_spec='$libname$release$shared_ext$major'
3726  shlibpath_var=LD_LIBRARY_PATH
3727  case $host_vendor in
3728    sni)
3729      shlibpath_overrides_runpath=no
3730      need_lib_prefix=no
3731      runpath_var=LD_RUN_PATH
3732      ;;
3733    siemens)
3734      need_lib_prefix=no
3735      ;;
3736    motorola)
3737      need_lib_prefix=no
3738      need_version=no
3739      shlibpath_overrides_runpath=no
3740      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3741      ;;
3742  esac
3743  ;;
3744
3745sysv4*MP*)
3746  if test -d /usr/nec; then
3747    version_type=linux # correct to gnu/linux during the next big refactor
3748    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
3749    soname_spec='$libname$shared_ext.$major'
3750    shlibpath_var=LD_LIBRARY_PATH
3751  fi
3752  ;;
3753
3754sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3755  version_type=sco
3756  need_lib_prefix=no
3757  need_version=no
3758  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
3759  soname_spec='$libname$release$shared_ext$major'
3760  shlibpath_var=LD_LIBRARY_PATH
3761  shlibpath_overrides_runpath=yes
3762  hardcode_into_libs=yes
3763  if test yes = "$with_gnu_ld"; then
3764    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3765  else
3766    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3767    case $host_os in
3768      sco3.2v5*)
3769        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3770	;;
3771    esac
3772  fi
3773  sys_lib_dlsearch_path_spec='/usr/lib'
3774  ;;
3775
3776tpf*)
3777  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
3778  version_type=linux # correct to gnu/linux during the next big refactor
3779  need_lib_prefix=no
3780  need_version=no
3781  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3782  shlibpath_var=LD_LIBRARY_PATH
3783  shlibpath_overrides_runpath=no
3784  hardcode_into_libs=yes
3785  ;;
3786
3787uts4*)
3788  version_type=linux # correct to gnu/linux during the next big refactor
3789  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3790  soname_spec='$libname$release$shared_ext$major'
3791  shlibpath_var=LD_LIBRARY_PATH
3792  ;;
3793
3794*)
3795  dynamic_linker=no
3796  ;;
3797esac
3798AC_MSG_RESULT([$dynamic_linker])
3799test no = "$dynamic_linker" && can_build_shared=no
3800
3801variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3802if test yes = "$GCC"; then
3803  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3804fi
3805
3806if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
3807  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
3808fi
3809
3810if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
3811  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
3812fi
3813
3814# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
3815configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
3816
3817# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
3818func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
3819
3820# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
3821configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
3822
3823_LT_DECL([], [variables_saved_for_relink], [1],
3824    [Variables whose values should be saved in libtool wrapper scripts and
3825    restored at link time])
3826_LT_DECL([], [need_lib_prefix], [0],
3827    [Do we need the "lib" prefix for modules?])
3828_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3829_LT_DECL([], [version_type], [0], [Library versioning type])
3830_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
3831_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3832_LT_DECL([], [shlibpath_overrides_runpath], [0],
3833    [Is shlibpath searched before the hard-coded library search path?])
3834_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3835_LT_DECL([], [library_names_spec], [1],
3836    [[List of archive names.  First name is the real one, the rest are links.
3837    The last name is the one that the linker finds with -lNAME]])
3838_LT_DECL([], [soname_spec], [1],
3839    [[The coded name of the library, if different from the real name]])
3840_LT_DECL([], [install_override_mode], [1],
3841    [Permission mode override for installation of shared libraries])
3842_LT_DECL([], [postinstall_cmds], [2],
3843    [Command to use after installation of a shared archive])
3844_LT_DECL([], [postuninstall_cmds], [2],
3845    [Command to use after uninstallation of a shared archive])
3846_LT_DECL([], [finish_cmds], [2],
3847    [Commands used to finish a libtool library installation in a directory])
3848_LT_DECL([], [finish_eval], [1],
3849    [[As "finish_cmds", except a single script fragment to be evaled but
3850    not shown]])
3851_LT_DECL([], [hardcode_into_libs], [0],
3852    [Whether we should hardcode library paths into libraries])
3853_LT_DECL([], [sys_lib_search_path_spec], [2],
3854    [Compile-time system search path for libraries])
3855_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
3856    [Detected run-time system search path for libraries])
3857_LT_DECL([], [configure_time_lt_sys_library_path], [2],
3858    [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
3859])# _LT_SYS_DYNAMIC_LINKER
3860
3861
3862# _LT_PATH_TOOL_PREFIX(TOOL)
3863# --------------------------
3864# find a file program that can recognize shared library
3865AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3866[m4_require([_LT_DECL_EGREP])dnl
3867AC_MSG_CHECKING([for $1])
3868AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3869[case $MAGIC_CMD in
3870[[\\/*] |  ?:[\\/]*])
3871  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
3872  ;;
3873*)
3874  lt_save_MAGIC_CMD=$MAGIC_CMD
3875  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3876dnl $ac_dummy forces splitting on constant user-supplied paths.
3877dnl POSIX.2 word splitting is done only on the output of word expansions,
3878dnl not every word.  This closes a longstanding sh security hole.
3879  ac_dummy="m4_if([$2], , $PATH, [$2])"
3880  for ac_dir in $ac_dummy; do
3881    IFS=$lt_save_ifs
3882    test -z "$ac_dir" && ac_dir=.
3883    if test -f "$ac_dir/$1"; then
3884      lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
3885      if test -n "$file_magic_test_file"; then
3886	case $deplibs_check_method in
3887	"file_magic "*)
3888	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3889	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
3890	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3891	    $EGREP "$file_magic_regex" > /dev/null; then
3892	    :
3893	  else
3894	    cat <<_LT_EOF 1>&2
3895
3896*** Warning: the command libtool uses to detect shared libraries,
3897*** $file_magic_cmd, produces output that libtool cannot recognize.
3898*** The result is that libtool may fail to recognize shared libraries
3899*** as such.  This will affect the creation of libtool libraries that
3900*** depend on shared libraries, but programs linked with such libtool
3901*** libraries will work regardless of this problem.  Nevertheless, you
3902*** may want to report the problem to your system manager and/or to
3903*** bug-libtool@gnu.org
3904
3905_LT_EOF
3906	  fi ;;
3907	esac
3908      fi
3909      break
3910    fi
3911  done
3912  IFS=$lt_save_ifs
3913  MAGIC_CMD=$lt_save_MAGIC_CMD
3914  ;;
3915esac])
3916MAGIC_CMD=$lt_cv_path_MAGIC_CMD
3917if test -n "$MAGIC_CMD"; then
3918  AC_MSG_RESULT($MAGIC_CMD)
3919else
3920  AC_MSG_RESULT(no)
3921fi
3922_LT_DECL([], [MAGIC_CMD], [0],
3923	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3924])# _LT_PATH_TOOL_PREFIX
3925
3926# Old name:
3927AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3928dnl aclocal-1.4 backwards compatibility:
3929dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3930
3931
3932# _LT_PATH_MAGIC
3933# --------------
3934# find a file program that can recognize a shared library
3935m4_defun([_LT_PATH_MAGIC],
3936[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3937if test -z "$lt_cv_path_MAGIC_CMD"; then
3938  if test -n "$ac_tool_prefix"; then
3939    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3940  else
3941    MAGIC_CMD=:
3942  fi
3943fi
3944])# _LT_PATH_MAGIC
3945
3946
3947# LT_PATH_LD
3948# ----------
3949# find the pathname to the GNU or non-GNU linker
3950AC_DEFUN([LT_PATH_LD],
3951[AC_REQUIRE([AC_PROG_CC])dnl
3952AC_REQUIRE([AC_CANONICAL_HOST])dnl
3953AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3954m4_require([_LT_DECL_SED])dnl
3955m4_require([_LT_DECL_EGREP])dnl
3956m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
3957
3958AC_ARG_WITH([gnu-ld],
3959    [AS_HELP_STRING([--with-gnu-ld],
3960	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
3961    [test no = "$withval" || with_gnu_ld=yes],
3962    [with_gnu_ld=no])dnl
3963
3964ac_prog=ld
3965if test yes = "$GCC"; then
3966  # Check if gcc -print-prog-name=ld gives a path.
3967  AC_MSG_CHECKING([for ld used by $CC])
3968  case $host in
3969  *-*-mingw*)
3970    # gcc leaves a trailing carriage return, which upsets mingw
3971    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3972  *)
3973    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3974  esac
3975  case $ac_prog in
3976    # Accept absolute paths.
3977    [[\\/]]* | ?:[[\\/]]*)
3978      re_direlt='/[[^/]][[^/]]*/\.\./'
3979      # Canonicalize the pathname of ld
3980      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3981      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3982	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3983      done
3984      test -z "$LD" && LD=$ac_prog
3985      ;;
3986  "")
3987    # If it fails, then pretend we aren't using GCC.
3988    ac_prog=ld
3989    ;;
3990  *)
3991    # If it is relative, then search for the first ld in PATH.
3992    with_gnu_ld=unknown
3993    ;;
3994  esac
3995elif test yes = "$with_gnu_ld"; then
3996  AC_MSG_CHECKING([for GNU ld])
3997else
3998  AC_MSG_CHECKING([for non-GNU ld])
3999fi
4000AC_CACHE_VAL(lt_cv_path_LD,
4001[if test -z "$LD"; then
4002  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
4003  for ac_dir in $PATH; do
4004    IFS=$lt_save_ifs
4005    test -z "$ac_dir" && ac_dir=.
4006    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4007      lt_cv_path_LD=$ac_dir/$ac_prog
4008      # Check to see if the program is GNU ld.  I'd rather use --version,
4009      # but apparently some variants of GNU ld only accept -v.
4010      # Break only if it was the GNU/non-GNU ld that we prefer.
4011      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
4012      *GNU* | *'with BFD'*)
4013	test no != "$with_gnu_ld" && break
4014	;;
4015      *)
4016	test yes != "$with_gnu_ld" && break
4017	;;
4018      esac
4019    fi
4020  done
4021  IFS=$lt_save_ifs
4022else
4023  lt_cv_path_LD=$LD # Let the user override the test with a path.
4024fi])
4025LD=$lt_cv_path_LD
4026if test -n "$LD"; then
4027  AC_MSG_RESULT($LD)
4028else
4029  AC_MSG_RESULT(no)
4030fi
4031test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4032_LT_PATH_LD_GNU
4033AC_SUBST([LD])
4034
4035_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
4036])# LT_PATH_LD
4037
4038# Old names:
4039AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
4040AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
4041dnl aclocal-1.4 backwards compatibility:
4042dnl AC_DEFUN([AM_PROG_LD], [])
4043dnl AC_DEFUN([AC_PROG_LD], [])
4044
4045
4046# _LT_PATH_LD_GNU
4047#- --------------
4048m4_defun([_LT_PATH_LD_GNU],
4049[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4050[# I'd rather use --version here, but apparently some GNU lds only accept -v.
4051case `$LD -v 2>&1 </dev/null` in
4052*GNU* | *'with BFD'*)
4053  lt_cv_prog_gnu_ld=yes
4054  ;;
4055*)
4056  lt_cv_prog_gnu_ld=no
4057  ;;
4058esac])
4059with_gnu_ld=$lt_cv_prog_gnu_ld
4060])# _LT_PATH_LD_GNU
4061
4062
4063# _LT_CMD_RELOAD
4064# --------------
4065# find reload flag for linker
4066#   -- PORTME Some linkers may need a different reload flag.
4067m4_defun([_LT_CMD_RELOAD],
4068[AC_CACHE_CHECK([for $LD option to reload object files],
4069  lt_cv_ld_reload_flag,
4070  [lt_cv_ld_reload_flag='-r'])
4071reload_flag=$lt_cv_ld_reload_flag
4072case $reload_flag in
4073"" | " "*) ;;
4074*) reload_flag=" $reload_flag" ;;
4075esac
4076reload_cmds='$LD$reload_flag -o $output$reload_objs'
4077case $host_os in
4078  cygwin* | mingw* | pw32* | cegcc*)
4079    if test yes != "$GCC"; then
4080      reload_cmds=false
4081    fi
4082    ;;
4083  darwin*)
4084    if test yes = "$GCC"; then
4085      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
4086    else
4087      reload_cmds='$LD$reload_flag -o $output$reload_objs'
4088    fi
4089    ;;
4090esac
4091_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
4092_LT_TAGDECL([], [reload_cmds], [2])dnl
4093])# _LT_CMD_RELOAD
4094
4095
4096# _LT_PATH_DD
4097# -----------
4098# find a working dd
4099m4_defun([_LT_PATH_DD],
4100[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
4101[printf 0123456789abcdef0123456789abcdef >conftest.i
4102cat conftest.i conftest.i >conftest2.i
4103: ${lt_DD:=$DD}
4104AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
4105[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
4106  cmp -s conftest.i conftest.out \
4107  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
4108fi])
4109rm -f conftest.i conftest2.i conftest.out])
4110])# _LT_PATH_DD
4111
4112
4113# _LT_CMD_TRUNCATE
4114# ----------------
4115# find command to truncate a binary pipe
4116m4_defun([_LT_CMD_TRUNCATE],
4117[m4_require([_LT_PATH_DD])
4118AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
4119[printf 0123456789abcdef0123456789abcdef >conftest.i
4120cat conftest.i conftest.i >conftest2.i
4121lt_cv_truncate_bin=
4122if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
4123  cmp -s conftest.i conftest.out \
4124  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
4125fi
4126rm -f conftest.i conftest2.i conftest.out
4127test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
4128_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
4129  [Command to truncate a binary pipe])
4130])# _LT_CMD_TRUNCATE
4131
4132
4133# _LT_CHECK_MAGIC_METHOD
4134# ----------------------
4135# how to check for library dependencies
4136#  -- PORTME fill in with the dynamic library characteristics
4137m4_defun([_LT_CHECK_MAGIC_METHOD],
4138[m4_require([_LT_DECL_EGREP])
4139m4_require([_LT_DECL_OBJDUMP])
4140AC_CACHE_CHECK([how to recognize dependent libraries],
4141lt_cv_deplibs_check_method,
4142[lt_cv_file_magic_cmd='$MAGIC_CMD'
4143lt_cv_file_magic_test_file=
4144lt_cv_deplibs_check_method='unknown'
4145# Need to set the preceding variable on all platforms that support
4146# interlibrary dependencies.
4147# 'none' -- dependencies not supported.
4148# 'unknown' -- same as none, but documents that we really don't know.
4149# 'pass_all' -- all dependencies passed with no checks.
4150# 'test_compile' -- check by making test program.
4151# 'file_magic [[regex]]' -- check by looking for files in library path
4152# that responds to the $file_magic_cmd with a given extended regex.
4153# If you have 'file' or equivalent on your system and you're not sure
4154# whether 'pass_all' will *always* work, you probably want this one.
4155
4156case $host_os in
4157aix[[4-9]]*)
4158  lt_cv_deplibs_check_method=pass_all
4159  ;;
4160
4161beos*)
4162  lt_cv_deplibs_check_method=pass_all
4163  ;;
4164
4165bsdi[[45]]*)
4166  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4167  lt_cv_file_magic_cmd='/usr/bin/file -L'
4168  lt_cv_file_magic_test_file=/shlib/libc.so
4169  ;;
4170
4171cygwin*)
4172  # func_win32_libid is a shell function defined in ltmain.sh
4173  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4174  lt_cv_file_magic_cmd='func_win32_libid'
4175  ;;
4176
4177mingw* | pw32*)
4178  # Base MSYS/MinGW do not provide the 'file' command needed by
4179  # func_win32_libid shell function, so use a weaker test based on 'objdump',
4180  # unless we find 'file', for example because we are cross-compiling.
4181  if ( file / ) >/dev/null 2>&1; then
4182    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4183    lt_cv_file_magic_cmd='func_win32_libid'
4184  else
4185    # Keep this pattern in sync with the one in func_win32_libid.
4186    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
4187    lt_cv_file_magic_cmd='$OBJDUMP -f'
4188  fi
4189  ;;
4190
4191cegcc*)
4192  # use the weaker test based on 'objdump'. See mingw*.
4193  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
4194  lt_cv_file_magic_cmd='$OBJDUMP -f'
4195  ;;
4196
4197darwin* | rhapsody*)
4198  lt_cv_deplibs_check_method=pass_all
4199  ;;
4200
4201freebsd* | dragonfly*)
4202  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4203    case $host_cpu in
4204    i*86 )
4205      # Not sure whether the presence of OpenBSD here was a mistake.
4206      # Let's accept both of them until this is cleared up.
4207      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
4208      lt_cv_file_magic_cmd=/usr/bin/file
4209      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4210      ;;
4211    esac
4212  else
4213    lt_cv_deplibs_check_method=pass_all
4214  fi
4215  ;;
4216
4217haiku*)
4218  lt_cv_deplibs_check_method=pass_all
4219  ;;
4220
4221hpux10.20* | hpux11*)
4222  lt_cv_file_magic_cmd=/usr/bin/file
4223  case $host_cpu in
4224  ia64*)
4225    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
4226    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
4227    ;;
4228  hppa*64*)
4229    [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]']
4230    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
4231    ;;
4232  *)
4233    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
4234    lt_cv_file_magic_test_file=/usr/lib/libc.sl
4235    ;;
4236  esac
4237  ;;
4238
4239interix[[3-9]]*)
4240  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
4241  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
4242  ;;
4243
4244irix5* | irix6* | nonstopux*)
4245  case $LD in
4246  *-32|*"-32 ") libmagic=32-bit;;
4247  *-n32|*"-n32 ") libmagic=N32;;
4248  *-64|*"-64 ") libmagic=64-bit;;
4249  *) libmagic=never-match;;
4250  esac
4251  lt_cv_deplibs_check_method=pass_all
4252  ;;
4253
4254# This must be glibc/ELF.
4255linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4256  lt_cv_deplibs_check_method=pass_all
4257  ;;
4258
4259netbsd*)
4260  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4261    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4262  else
4263    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
4264  fi
4265  ;;
4266
4267newos6*)
4268  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4269  lt_cv_file_magic_cmd=/usr/bin/file
4270  lt_cv_file_magic_test_file=/usr/lib/libnls.so
4271  ;;
4272
4273*nto* | *qnx*)
4274  lt_cv_deplibs_check_method=pass_all
4275  ;;
4276
4277openbsd* | bitrig*)
4278  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
4279    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
4280  else
4281    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4282  fi
4283  ;;
4284
4285osf3* | osf4* | osf5*)
4286  lt_cv_deplibs_check_method=pass_all
4287  ;;
4288
4289rdos*)
4290  lt_cv_deplibs_check_method=pass_all
4291  ;;
4292
4293solaris*)
4294  lt_cv_deplibs_check_method=pass_all
4295  ;;
4296
4297sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4298  lt_cv_deplibs_check_method=pass_all
4299  ;;
4300
4301sysv4 | sysv4.3*)
4302  case $host_vendor in
4303  motorola)
4304    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]]'
4305    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4306    ;;
4307  ncr)
4308    lt_cv_deplibs_check_method=pass_all
4309    ;;
4310  sequent)
4311    lt_cv_file_magic_cmd='/bin/file'
4312    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4313    ;;
4314  sni)
4315    lt_cv_file_magic_cmd='/bin/file'
4316    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4317    lt_cv_file_magic_test_file=/lib/libc.so
4318    ;;
4319  siemens)
4320    lt_cv_deplibs_check_method=pass_all
4321    ;;
4322  pc)
4323    lt_cv_deplibs_check_method=pass_all
4324    ;;
4325  esac
4326  ;;
4327
4328tpf*)
4329  lt_cv_deplibs_check_method=pass_all
4330  ;;
4331os2*)
4332  lt_cv_deplibs_check_method=pass_all
4333  ;;
4334esac
4335])
4336
4337file_magic_glob=
4338want_nocaseglob=no
4339if test "$build" = "$host"; then
4340  case $host_os in
4341  mingw* | pw32*)
4342    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
4343      want_nocaseglob=yes
4344    else
4345      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
4346    fi
4347    ;;
4348  esac
4349fi
4350
4351file_magic_cmd=$lt_cv_file_magic_cmd
4352deplibs_check_method=$lt_cv_deplibs_check_method
4353test -z "$deplibs_check_method" && deplibs_check_method=unknown
4354
4355_LT_DECL([], [deplibs_check_method], [1],
4356    [Method to check whether dependent libraries are shared objects])
4357_LT_DECL([], [file_magic_cmd], [1],
4358    [Command to use when deplibs_check_method = "file_magic"])
4359_LT_DECL([], [file_magic_glob], [1],
4360    [How to find potential files when deplibs_check_method = "file_magic"])
4361_LT_DECL([], [want_nocaseglob], [1],
4362    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
4363])# _LT_CHECK_MAGIC_METHOD
4364
4365
4366# LT_PATH_NM
4367# ----------
4368# find the pathname to a BSD- or MS-compatible name lister
4369AC_DEFUN([LT_PATH_NM],
4370[AC_REQUIRE([AC_PROG_CC])dnl
4371AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
4372[if test -n "$NM"; then
4373  # Let the user override the test.
4374  lt_cv_path_NM=$NM
4375else
4376  lt_nm_to_check=${ac_tool_prefix}nm
4377  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4378    lt_nm_to_check="$lt_nm_to_check nm"
4379  fi
4380  for lt_tmp_nm in $lt_nm_to_check; do
4381    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
4382    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4383      IFS=$lt_save_ifs
4384      test -z "$ac_dir" && ac_dir=.
4385      tmp_nm=$ac_dir/$lt_tmp_nm
4386      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
4387	# Check to see if the nm accepts a BSD-compat flag.
4388	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
4389	#   nm: unknown option "B" ignored
4390	# Tru64's nm complains that /dev/null is an invalid object file
4391	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
4392	case $build_os in
4393	mingw*) lt_bad_file=conftest.nm/nofile ;;
4394	*) lt_bad_file=/dev/null ;;
4395	esac
4396	case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
4397	*$lt_bad_file* | *'Invalid file or object type'*)
4398	  lt_cv_path_NM="$tmp_nm -B"
4399	  break 2
4400	  ;;
4401	*)
4402	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4403	  */dev/null*)
4404	    lt_cv_path_NM="$tmp_nm -p"
4405	    break 2
4406	    ;;
4407	  *)
4408	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4409	    continue # so that we can try to find one that supports BSD flags
4410	    ;;
4411	  esac
4412	  ;;
4413	esac
4414      fi
4415    done
4416    IFS=$lt_save_ifs
4417  done
4418  : ${lt_cv_path_NM=no}
4419fi])
4420if test no != "$lt_cv_path_NM"; then
4421  NM=$lt_cv_path_NM
4422else
4423  # Didn't find any BSD compatible name lister, look for dumpbin.
4424  if test -n "$DUMPBIN"; then :
4425    # Let the user override the test.
4426  else
4427    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
4428    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
4429    *COFF*)
4430      DUMPBIN="$DUMPBIN -symbols -headers"
4431      ;;
4432    *)
4433      DUMPBIN=:
4434      ;;
4435    esac
4436  fi
4437  AC_SUBST([DUMPBIN])
4438  if test : != "$DUMPBIN"; then
4439    NM=$DUMPBIN
4440  fi
4441fi
4442test -z "$NM" && NM=nm
4443AC_SUBST([NM])
4444_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
4445
4446AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
4447  [lt_cv_nm_interface="BSD nm"
4448  echo "int some_variable = 0;" > conftest.$ac_ext
4449  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
4450  (eval "$ac_compile" 2>conftest.err)
4451  cat conftest.err >&AS_MESSAGE_LOG_FD
4452  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
4453  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4454  cat conftest.err >&AS_MESSAGE_LOG_FD
4455  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
4456  cat conftest.out >&AS_MESSAGE_LOG_FD
4457  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4458    lt_cv_nm_interface="MS dumpbin"
4459  fi
4460  rm -f conftest*])
4461])# LT_PATH_NM
4462
4463# Old names:
4464AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
4465AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
4466dnl aclocal-1.4 backwards compatibility:
4467dnl AC_DEFUN([AM_PROG_NM], [])
4468dnl AC_DEFUN([AC_PROG_NM], [])
4469
4470# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4471# --------------------------------
4472# how to determine the name of the shared library
4473# associated with a specific link library.
4474#  -- PORTME fill in with the dynamic library characteristics
4475m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
4476[m4_require([_LT_DECL_EGREP])
4477m4_require([_LT_DECL_OBJDUMP])
4478m4_require([_LT_DECL_DLLTOOL])
4479AC_CACHE_CHECK([how to associate runtime and link libraries],
4480lt_cv_sharedlib_from_linklib_cmd,
4481[lt_cv_sharedlib_from_linklib_cmd='unknown'
4482
4483case $host_os in
4484cygwin* | mingw* | pw32* | cegcc*)
4485  # two different shell functions defined in ltmain.sh;
4486  # decide which one to use based on capabilities of $DLLTOOL
4487  case `$DLLTOOL --help 2>&1` in
4488  *--identify-strict*)
4489    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
4490    ;;
4491  *)
4492    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
4493    ;;
4494  esac
4495  ;;
4496*)
4497  # fallback: assume linklib IS sharedlib
4498  lt_cv_sharedlib_from_linklib_cmd=$ECHO
4499  ;;
4500esac
4501])
4502sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
4503test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
4504
4505_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
4506    [Command to associate shared and link libraries])
4507])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4508
4509
4510# _LT_PATH_MANIFEST_TOOL
4511# ----------------------
4512# locate the manifest tool
4513m4_defun([_LT_PATH_MANIFEST_TOOL],
4514[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
4515test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
4516AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
4517  [lt_cv_path_mainfest_tool=no
4518  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
4519  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
4520  cat conftest.err >&AS_MESSAGE_LOG_FD
4521  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
4522    lt_cv_path_mainfest_tool=yes
4523  fi
4524  rm -f conftest*])
4525if test yes != "$lt_cv_path_mainfest_tool"; then
4526  MANIFEST_TOOL=:
4527fi
4528_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
4529])# _LT_PATH_MANIFEST_TOOL
4530
4531
4532# _LT_DLL_DEF_P([FILE])
4533# ---------------------
4534# True iff FILE is a Windows DLL '.def' file.
4535# Keep in sync with func_dll_def_p in the libtool script
4536AC_DEFUN([_LT_DLL_DEF_P],
4537[dnl
4538  test DEF = "`$SED -n dnl
4539    -e '\''s/^[[	 ]]*//'\'' dnl Strip leading whitespace
4540    -e '\''/^\(;.*\)*$/d'\'' dnl      Delete empty lines and comments
4541    -e '\''s/^\(EXPORTS\|LIBRARY\)\([[	 ]].*\)*$/DEF/p'\'' dnl
4542    -e q dnl                          Only consider the first "real" line
4543    $1`" dnl
4544])# _LT_DLL_DEF_P
4545
4546
4547# LT_LIB_M
4548# --------
4549# check for math library
4550AC_DEFUN([LT_LIB_M],
4551[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4552LIBM=
4553case $host in
4554*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
4555  # These system don't have libm, or don't need it
4556  ;;
4557*-ncr-sysv4.3*)
4558  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
4559  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4560  ;;
4561*)
4562  AC_CHECK_LIB(m, cos, LIBM=-lm)
4563  ;;
4564esac
4565AC_SUBST([LIBM])
4566])# LT_LIB_M
4567
4568# Old name:
4569AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
4570dnl aclocal-1.4 backwards compatibility:
4571dnl AC_DEFUN([AC_CHECK_LIBM], [])
4572
4573
4574# _LT_COMPILER_NO_RTTI([TAGNAME])
4575# -------------------------------
4576m4_defun([_LT_COMPILER_NO_RTTI],
4577[m4_require([_LT_TAG_COMPILER])dnl
4578
4579_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4580
4581if test yes = "$GCC"; then
4582  case $cc_basename in
4583  nvcc*)
4584    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
4585  *)
4586    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
4587  esac
4588
4589  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4590    lt_cv_prog_compiler_rtti_exceptions,
4591    [-fno-rtti -fno-exceptions], [],
4592    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4593fi
4594_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
4595	[Compiler flag to turn off builtin functions])
4596])# _LT_COMPILER_NO_RTTI
4597
4598
4599# _LT_CMD_GLOBAL_SYMBOLS
4600# ----------------------
4601m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
4602[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4603AC_REQUIRE([AC_PROG_CC])dnl
4604AC_REQUIRE([AC_PROG_AWK])dnl
4605AC_REQUIRE([LT_PATH_NM])dnl
4606AC_REQUIRE([LT_PATH_LD])dnl
4607m4_require([_LT_DECL_SED])dnl
4608m4_require([_LT_DECL_EGREP])dnl
4609m4_require([_LT_TAG_COMPILER])dnl
4610
4611# Check for command to grab the raw symbol name followed by C symbol from nm.
4612AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4613AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4614[
4615# These are sane defaults that work on at least a few old systems.
4616# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4617
4618# Character class describing NM global symbol codes.
4619symcode='[[BCDEGRST]]'
4620
4621# Regexp to match symbols that can be accessed directly from C.
4622sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4623
4624# Define system-specific variables.
4625case $host_os in
4626aix*)
4627  symcode='[[BCDT]]'
4628  ;;
4629cygwin* | mingw* | pw32* | cegcc*)
4630  symcode='[[ABCDGISTW]]'
4631  ;;
4632hpux*)
4633  if test ia64 = "$host_cpu"; then
4634    symcode='[[ABCDEGRST]]'
4635  fi
4636  ;;
4637irix* | nonstopux*)
4638  symcode='[[BCDEGRST]]'
4639  ;;
4640osf*)
4641  symcode='[[BCDEGQRST]]'
4642  ;;
4643solaris*)
4644  symcode='[[BDRT]]'
4645  ;;
4646sco3.2v5*)
4647  symcode='[[DT]]'
4648  ;;
4649sysv4.2uw2*)
4650  symcode='[[DT]]'
4651  ;;
4652sysv5* | sco5v6* | unixware* | OpenUNIX*)
4653  symcode='[[ABDT]]'
4654  ;;
4655sysv4)
4656  symcode='[[DFNSTU]]'
4657  ;;
4658esac
4659
4660# If we're using GNU nm, then use its standard symbol codes.
4661case `$NM -V 2>&1` in
4662*GNU* | *'with BFD'*)
4663  symcode='[[ABCDGIRSTW]]' ;;
4664esac
4665
4666if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4667  # Gets list of data symbols to import.
4668  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
4669  # Adjust the below global symbol transforms to fixup imported variables.
4670  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
4671  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
4672  lt_c_name_lib_hook="\
4673  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
4674  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
4675else
4676  # Disable hooks by default.
4677  lt_cv_sys_global_symbol_to_import=
4678  lt_cdecl_hook=
4679  lt_c_name_hook=
4680  lt_c_name_lib_hook=
4681fi
4682
4683# Transform an extracted symbol line into a proper C declaration.
4684# Some systems (esp. on ia64) link data and code symbols differently,
4685# so use this general approach.
4686lt_cv_sys_global_symbol_to_cdecl="sed -n"\
4687$lt_cdecl_hook\
4688" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
4689" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
4690
4691# Transform an extracted symbol line into symbol name and symbol address
4692lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
4693$lt_c_name_hook\
4694" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
4695" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
4696
4697# Transform an extracted symbol line into symbol name with lib prefix and
4698# symbol address.
4699lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
4700$lt_c_name_lib_hook\
4701" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
4702" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
4703" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
4704
4705# Handle CRLF in mingw tool chain
4706opt_cr=
4707case $build_os in
4708mingw*)
4709  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4710  ;;
4711esac
4712
4713# Try without a prefix underscore, then with it.
4714for ac_symprfx in "" "_"; do
4715
4716  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4717  symxfrm="\\1 $ac_symprfx\\2 \\2"
4718
4719  # Write the raw and C identifiers.
4720  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4721    # Fake it for dumpbin and say T for any non-static function,
4722    # D for any global variable and I for any imported variable.
4723    # Also find C++ and __fastcall symbols from MSVC++,
4724    # which start with @ or ?.
4725    lt_cv_sys_global_symbol_pipe="$AWK ['"\
4726"     {last_section=section; section=\$ 3};"\
4727"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
4728"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4729"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
4730"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
4731"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
4732"     \$ 0!~/External *\|/{next};"\
4733"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4734"     {if(hide[section]) next};"\
4735"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
4736"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
4737"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
4738"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
4739"     ' prfx=^$ac_symprfx]"
4740  else
4741    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4742  fi
4743  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
4744
4745  # Check to see that the pipe works correctly.
4746  pipe_works=no
4747
4748  rm -f conftest*
4749  cat > conftest.$ac_ext <<_LT_EOF
4750#ifdef __cplusplus
4751extern "C" {
4752#endif
4753char nm_test_var;
4754void nm_test_func(void);
4755void nm_test_func(void){}
4756#ifdef __cplusplus
4757}
4758#endif
4759int main(){nm_test_var='a';nm_test_func();return(0);}
4760_LT_EOF
4761
4762  if AC_TRY_EVAL(ac_compile); then
4763    # Now try to grab the symbols.
4764    nlist=conftest.nm
4765    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
4766      # Try sorting and uniquifying the output.
4767      if sort "$nlist" | uniq > "$nlist"T; then
4768	mv -f "$nlist"T "$nlist"
4769      else
4770	rm -f "$nlist"T
4771      fi
4772
4773      # Make sure that we snagged all the symbols we need.
4774      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4775	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4776	  cat <<_LT_EOF > conftest.$ac_ext
4777/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
4778#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
4779/* DATA imports from DLLs on WIN32 can't be const, because runtime
4780   relocations are performed -- see ld's documentation on pseudo-relocs.  */
4781# define LT@&t@_DLSYM_CONST
4782#elif defined __osf__
4783/* This system does not cope well with relocations in const data.  */
4784# define LT@&t@_DLSYM_CONST
4785#else
4786# define LT@&t@_DLSYM_CONST const
4787#endif
4788
4789#ifdef __cplusplus
4790extern "C" {
4791#endif
4792
4793_LT_EOF
4794	  # Now generate the symbol file.
4795	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4796
4797	  cat <<_LT_EOF >> conftest.$ac_ext
4798
4799/* The mapping between symbol names and symbols.  */
4800LT@&t@_DLSYM_CONST struct {
4801  const char *name;
4802  void       *address;
4803}
4804lt__PROGRAM__LTX_preloaded_symbols[[]] =
4805{
4806  { "@PROGRAM@", (void *) 0 },
4807_LT_EOF
4808	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4809	  cat <<\_LT_EOF >> conftest.$ac_ext
4810  {0, (void *) 0}
4811};
4812
4813/* This works around a problem in FreeBSD linker */
4814#ifdef FREEBSD_WORKAROUND
4815static const void *lt_preloaded_setup() {
4816  return lt__PROGRAM__LTX_preloaded_symbols;
4817}
4818#endif
4819
4820#ifdef __cplusplus
4821}
4822#endif
4823_LT_EOF
4824	  # Now try linking the two files.
4825	  mv conftest.$ac_objext conftstm.$ac_objext
4826	  lt_globsym_save_LIBS=$LIBS
4827	  lt_globsym_save_CFLAGS=$CFLAGS
4828	  LIBS=conftstm.$ac_objext
4829	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4830	  if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
4831	    pipe_works=yes
4832	  fi
4833	  LIBS=$lt_globsym_save_LIBS
4834	  CFLAGS=$lt_globsym_save_CFLAGS
4835	else
4836	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4837	fi
4838      else
4839	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4840      fi
4841    else
4842      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4843    fi
4844  else
4845    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4846    cat conftest.$ac_ext >&5
4847  fi
4848  rm -rf conftest* conftst*
4849
4850  # Do not use the global_symbol_pipe unless it works.
4851  if test yes = "$pipe_works"; then
4852    break
4853  else
4854    lt_cv_sys_global_symbol_pipe=
4855  fi
4856done
4857])
4858if test -z "$lt_cv_sys_global_symbol_pipe"; then
4859  lt_cv_sys_global_symbol_to_cdecl=
4860fi
4861if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4862  AC_MSG_RESULT(failed)
4863else
4864  AC_MSG_RESULT(ok)
4865fi
4866
4867# Response file support.
4868if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4869  nm_file_list_spec='@'
4870elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
4871  nm_file_list_spec='@'
4872fi
4873
4874_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4875    [Take the output of nm and produce a listing of raw symbols and C names])
4876_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4877    [Transform the output of nm in a proper C declaration])
4878_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
4879    [Transform the output of nm into a list of symbols to manually relocate])
4880_LT_DECL([global_symbol_to_c_name_address],
4881    [lt_cv_sys_global_symbol_to_c_name_address], [1],
4882    [Transform the output of nm in a C name address pair])
4883_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4884    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4885    [Transform the output of nm in a C name address pair when lib prefix is needed])
4886_LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
4887    [The name lister interface])
4888_LT_DECL([], [nm_file_list_spec], [1],
4889    [Specify filename containing input files for $NM])
4890]) # _LT_CMD_GLOBAL_SYMBOLS
4891
4892
4893# _LT_COMPILER_PIC([TAGNAME])
4894# ---------------------------
4895m4_defun([_LT_COMPILER_PIC],
4896[m4_require([_LT_TAG_COMPILER])dnl
4897_LT_TAGVAR(lt_prog_compiler_wl, $1)=
4898_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4899_LT_TAGVAR(lt_prog_compiler_static, $1)=
4900
4901m4_if([$1], [CXX], [
4902  # C++ specific cases for pic, static, wl, etc.
4903  if test yes = "$GXX"; then
4904    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4905    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4906
4907    case $host_os in
4908    aix*)
4909      # All AIX code is PIC.
4910      if test ia64 = "$host_cpu"; then
4911	# AIX 5 now supports IA64 processor
4912	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4913      fi
4914      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4915      ;;
4916
4917    amigaos*)
4918      case $host_cpu in
4919      powerpc)
4920            # see comment about AmigaOS4 .so support
4921            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4922        ;;
4923      m68k)
4924            # FIXME: we need at least 68020 code to build shared libraries, but
4925            # adding the '-m68020' flag to GCC prevents building anything better,
4926            # like '-m68040'.
4927            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4928        ;;
4929      esac
4930      ;;
4931
4932    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4933      # PIC is the default for these OSes.
4934      ;;
4935    mingw* | cygwin* | os2* | pw32* | cegcc*)
4936      # This hack is so that the source file can tell whether it is being
4937      # built for inclusion in a dll (and should export symbols for example).
4938      # Although the cygwin gcc ignores -fPIC, still need this for old-style
4939      # (--disable-auto-import) libraries
4940      m4_if([$1], [GCJ], [],
4941	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4942      case $host_os in
4943      os2*)
4944	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4945	;;
4946      esac
4947      ;;
4948    darwin* | rhapsody*)
4949      # PIC is the default on this platform
4950      # Common symbols not allowed in MH_DYLIB files
4951      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4952      ;;
4953    *djgpp*)
4954      # DJGPP does not support shared libraries at all
4955      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4956      ;;
4957    haiku*)
4958      # PIC is the default for Haiku.
4959      # The "-static" flag exists, but is broken.
4960      _LT_TAGVAR(lt_prog_compiler_static, $1)=
4961      ;;
4962    interix[[3-9]]*)
4963      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4964      # Instead, we relocate shared libraries at runtime.
4965      ;;
4966    sysv4*MP*)
4967      if test -d /usr/nec; then
4968	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4969      fi
4970      ;;
4971    hpux*)
4972      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4973      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4974      # sets the default TLS model and affects inlining.
4975      case $host_cpu in
4976      hppa*64*)
4977	;;
4978      *)
4979	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4980	;;
4981      esac
4982      ;;
4983    *qnx* | *nto*)
4984      # QNX uses GNU C++, but need to define -shared option too, otherwise
4985      # it will coredump.
4986      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4987      ;;
4988    *)
4989      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4990      ;;
4991    esac
4992  else
4993    case $host_os in
4994      aix[[4-9]]*)
4995	# All AIX code is PIC.
4996	if test ia64 = "$host_cpu"; then
4997	  # AIX 5 now supports IA64 processor
4998	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4999	else
5000	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5001	fi
5002	;;
5003      chorus*)
5004	case $cc_basename in
5005	cxch68*)
5006	  # Green Hills C++ Compiler
5007	  # _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"
5008	  ;;
5009	esac
5010	;;
5011      mingw* | cygwin* | os2* | pw32* | cegcc*)
5012	# This hack is so that the source file can tell whether it is being
5013	# built for inclusion in a dll (and should export symbols for example).
5014	m4_if([$1], [GCJ], [],
5015	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5016	;;
5017      dgux*)
5018	case $cc_basename in
5019	  ec++*)
5020	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5021	    ;;
5022	  ghcx*)
5023	    # Green Hills C++ Compiler
5024	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5025	    ;;
5026	  *)
5027	    ;;
5028	esac
5029	;;
5030      freebsd* | dragonfly*)
5031	# FreeBSD uses GNU C++
5032	;;
5033      hpux9* | hpux10* | hpux11*)
5034	case $cc_basename in
5035	  CC*)
5036	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5037	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
5038	    if test ia64 != "$host_cpu"; then
5039	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5040	    fi
5041	    ;;
5042	  aCC*)
5043	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5044	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
5045	    case $host_cpu in
5046	    hppa*64*|ia64*)
5047	      # +Z the default
5048	      ;;
5049	    *)
5050	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5051	      ;;
5052	    esac
5053	    ;;
5054	  *)
5055	    ;;
5056	esac
5057	;;
5058      interix*)
5059	# This is c89, which is MS Visual C++ (no shared libs)
5060	# Anyone wants to do a port?
5061	;;
5062      irix5* | irix6* | nonstopux*)
5063	case $cc_basename in
5064	  CC*)
5065	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5066	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5067	    # CC pic flag -KPIC is the default.
5068	    ;;
5069	  *)
5070	    ;;
5071	esac
5072	;;
5073      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
5074	case $cc_basename in
5075	  KCC*)
5076	    # KAI C++ Compiler
5077	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5078	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5079	    ;;
5080	  ecpc* )
5081	    # old Intel C++ for x86_64, which still supported -KPIC.
5082	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5083	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5084	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5085	    ;;
5086	  icpc* )
5087	    # Intel C++, used to be incompatible with GCC.
5088	    # ICC 10 doesn't accept -KPIC any more.
5089	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5090	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5091	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5092	    ;;
5093	  pgCC* | pgcpp*)
5094	    # Portland Group C++ compiler
5095	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5096	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5097	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5098	    ;;
5099	  cxx*)
5100	    # Compaq C++
5101	    # Make sure the PIC flag is empty.  It appears that all Alpha
5102	    # Linux and Compaq Tru64 Unix objects are PIC.
5103	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5104	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5105	    ;;
5106	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
5107	    # IBM XL 8.0, 9.0 on PPC and BlueGene
5108	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5109	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5110	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5111	    ;;
5112	  *)
5113	    case `$CC -V 2>&1 | sed 5q` in
5114	    *Sun\ C*)
5115	      # Sun C++ 5.9
5116	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5117	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5118	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5119	      ;;
5120	    esac
5121	    ;;
5122	esac
5123	;;
5124      lynxos*)
5125	;;
5126      m88k*)
5127	;;
5128      mvs*)
5129	case $cc_basename in
5130	  cxx*)
5131	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5132	    ;;
5133	  *)
5134	    ;;
5135	esac
5136	;;
5137      netbsd*)
5138	;;
5139      *qnx* | *nto*)
5140        # QNX uses GNU C++, but need to define -shared option too, otherwise
5141        # it will coredump.
5142        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5143        ;;
5144      osf3* | osf4* | osf5*)
5145	case $cc_basename in
5146	  KCC*)
5147	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5148	    ;;
5149	  RCC*)
5150	    # Rational C++ 2.4.1
5151	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5152	    ;;
5153	  cxx*)
5154	    # Digital/Compaq C++
5155	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5156	    # Make sure the PIC flag is empty.  It appears that all Alpha
5157	    # Linux and Compaq Tru64 Unix objects are PIC.
5158	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5159	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5160	    ;;
5161	  *)
5162	    ;;
5163	esac
5164	;;
5165      psos*)
5166	;;
5167      solaris*)
5168	case $cc_basename in
5169	  CC* | sunCC*)
5170	    # Sun C++ 4.2, 5.x and Centerline C++
5171	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5172	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5173	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5174	    ;;
5175	  gcx*)
5176	    # Green Hills C++ Compiler
5177	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5178	    ;;
5179	  *)
5180	    ;;
5181	esac
5182	;;
5183      sunos4*)
5184	case $cc_basename in
5185	  CC*)
5186	    # Sun C++ 4.x
5187	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5188	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5189	    ;;
5190	  lcc*)
5191	    # Lucid
5192	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5193	    ;;
5194	  *)
5195	    ;;
5196	esac
5197	;;
5198      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5199	case $cc_basename in
5200	  CC*)
5201	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5202	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5203	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5204	    ;;
5205	esac
5206	;;
5207      tandem*)
5208	case $cc_basename in
5209	  NCC*)
5210	    # NonStop-UX NCC 3.20
5211	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5212	    ;;
5213	  *)
5214	    ;;
5215	esac
5216	;;
5217      vxworks*)
5218	;;
5219      *)
5220	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5221	;;
5222    esac
5223  fi
5224],
5225[
5226  if test yes = "$GCC"; then
5227    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5228    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5229
5230    case $host_os in
5231      aix*)
5232      # All AIX code is PIC.
5233      if test ia64 = "$host_cpu"; then
5234	# AIX 5 now supports IA64 processor
5235	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5236      fi
5237      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5238      ;;
5239
5240    amigaos*)
5241      case $host_cpu in
5242      powerpc)
5243            # see comment about AmigaOS4 .so support
5244            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5245        ;;
5246      m68k)
5247            # FIXME: we need at least 68020 code to build shared libraries, but
5248            # adding the '-m68020' flag to GCC prevents building anything better,
5249            # like '-m68040'.
5250            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5251        ;;
5252      esac
5253      ;;
5254
5255    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5256      # PIC is the default for these OSes.
5257      ;;
5258
5259    mingw* | cygwin* | pw32* | os2* | cegcc*)
5260      # This hack is so that the source file can tell whether it is being
5261      # built for inclusion in a dll (and should export symbols for example).
5262      # Although the cygwin gcc ignores -fPIC, still need this for old-style
5263      # (--disable-auto-import) libraries
5264      m4_if([$1], [GCJ], [],
5265	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5266      case $host_os in
5267      os2*)
5268	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
5269	;;
5270      esac
5271      ;;
5272
5273    darwin* | rhapsody*)
5274      # PIC is the default on this platform
5275      # Common symbols not allowed in MH_DYLIB files
5276      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5277      ;;
5278
5279    haiku*)
5280      # PIC is the default for Haiku.
5281      # The "-static" flag exists, but is broken.
5282      _LT_TAGVAR(lt_prog_compiler_static, $1)=
5283      ;;
5284
5285    hpux*)
5286      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5287      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
5288      # sets the default TLS model and affects inlining.
5289      case $host_cpu in
5290      hppa*64*)
5291	# +Z the default
5292	;;
5293      *)
5294	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5295	;;
5296      esac
5297      ;;
5298
5299    interix[[3-9]]*)
5300      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5301      # Instead, we relocate shared libraries at runtime.
5302      ;;
5303
5304    msdosdjgpp*)
5305      # Just because we use GCC doesn't mean we suddenly get shared libraries
5306      # on systems that don't support them.
5307      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5308      enable_shared=no
5309      ;;
5310
5311    *nto* | *qnx*)
5312      # QNX uses GNU C++, but need to define -shared option too, otherwise
5313      # it will coredump.
5314      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5315      ;;
5316
5317    sysv4*MP*)
5318      if test -d /usr/nec; then
5319	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5320      fi
5321      ;;
5322
5323    *)
5324      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5325      ;;
5326    esac
5327
5328    case $cc_basename in
5329    nvcc*) # Cuda Compiler Driver 2.2
5330      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
5331      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5332        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
5333      fi
5334      ;;
5335    esac
5336  else
5337    # PORTME Check for flag to pass linker flags through the system compiler.
5338    case $host_os in
5339    aix*)
5340      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5341      if test ia64 = "$host_cpu"; then
5342	# AIX 5 now supports IA64 processor
5343	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5344      else
5345	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5346      fi
5347      ;;
5348
5349    darwin* | rhapsody*)
5350      # PIC is the default on this platform
5351      # Common symbols not allowed in MH_DYLIB files
5352      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5353      case $cc_basename in
5354      nagfor*)
5355        # NAG Fortran compiler
5356        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
5357        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5358        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5359        ;;
5360      esac
5361      ;;
5362
5363    mingw* | cygwin* | pw32* | os2* | cegcc*)
5364      # This hack is so that the source file can tell whether it is being
5365      # built for inclusion in a dll (and should export symbols for example).
5366      m4_if([$1], [GCJ], [],
5367	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5368      case $host_os in
5369      os2*)
5370	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
5371	;;
5372      esac
5373      ;;
5374
5375    hpux9* | hpux10* | hpux11*)
5376      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5377      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5378      # not for PA HP-UX.
5379      case $host_cpu in
5380      hppa*64*|ia64*)
5381	# +Z the default
5382	;;
5383      *)
5384	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5385	;;
5386      esac
5387      # Is there a better lt_prog_compiler_static that works with the bundled CC?
5388      _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
5389      ;;
5390
5391    irix5* | irix6* | nonstopux*)
5392      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5393      # PIC (with -KPIC) is the default.
5394      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5395      ;;
5396
5397    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
5398      case $cc_basename in
5399      # old Intel for x86_64, which still supported -KPIC.
5400      ecc*)
5401	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5402	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5403	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5404        ;;
5405      # icc used to be incompatible with GCC.
5406      # ICC 10 doesn't accept -KPIC any more.
5407      icc* | ifort*)
5408	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5409	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5410	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5411        ;;
5412      # Lahey Fortran 8.1.
5413      lf95*)
5414	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5415	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
5416	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
5417	;;
5418      nagfor*)
5419	# NAG Fortran compiler
5420	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
5421	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5422	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5423	;;
5424      tcc*)
5425	# Fabrice Bellard et al's Tiny C Compiler
5426	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5427	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5428	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5429	;;
5430      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
5431        # Portland Group compilers (*not* the Pentium gcc compiler,
5432	# which looks to be a dead project)
5433	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5434	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5435	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5436        ;;
5437      ccc*)
5438        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5439        # All Alpha code is PIC.
5440        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5441        ;;
5442      xl* | bgxl* | bgf* | mpixl*)
5443	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
5444	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5445	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5446	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5447	;;
5448      *)
5449	case `$CC -V 2>&1 | sed 5q` in
5450	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
5451	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
5452	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5453	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5454	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
5455	  ;;
5456	*Sun\ F* | *Sun*Fortran*)
5457	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5458	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5459	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5460	  ;;
5461	*Sun\ C*)
5462	  # Sun C 5.9
5463	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5464	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5465	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5466	  ;;
5467        *Intel*\ [[CF]]*Compiler*)
5468	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5469	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5470	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5471	  ;;
5472	*Portland\ Group*)
5473	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5474	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5475	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5476	  ;;
5477	esac
5478	;;
5479      esac
5480      ;;
5481
5482    newsos6)
5483      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5484      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5485      ;;
5486
5487    *nto* | *qnx*)
5488      # QNX uses GNU C++, but need to define -shared option too, otherwise
5489      # it will coredump.
5490      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5491      ;;
5492
5493    osf3* | osf4* | osf5*)
5494      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5495      # All OSF/1 code is PIC.
5496      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5497      ;;
5498
5499    rdos*)
5500      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5501      ;;
5502
5503    solaris*)
5504      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5505      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5506      case $cc_basename in
5507      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
5508	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5509      *)
5510	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5511      esac
5512      ;;
5513
5514    sunos4*)
5515      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5516      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5517      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5518      ;;
5519
5520    sysv4 | sysv4.2uw2* | sysv4.3*)
5521      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5522      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5523      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5524      ;;
5525
5526    sysv4*MP*)
5527      if test -d /usr/nec; then
5528	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5529	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5530      fi
5531      ;;
5532
5533    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5534      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5535      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5536      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5537      ;;
5538
5539    unicos*)
5540      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5541      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5542      ;;
5543
5544    uts4*)
5545      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5546      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5547      ;;
5548
5549    *)
5550      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5551      ;;
5552    esac
5553  fi
5554])
5555case $host_os in
5556  # For platforms that do not support PIC, -DPIC is meaningless:
5557  *djgpp*)
5558    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5559    ;;
5560  *)
5561    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
5562    ;;
5563esac
5564
5565AC_CACHE_CHECK([for $compiler option to produce PIC],
5566  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
5567  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
5568_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
5569
5570#
5571# Check to make sure the PIC flag actually works.
5572#
5573if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5574  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
5575    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
5576    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
5577    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
5578     "" | " "*) ;;
5579     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5580     esac],
5581    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5582     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5583fi
5584_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
5585	[Additional compiler flags for building library objects])
5586
5587_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
5588	[How to pass a linker flag through the compiler])
5589#
5590# Check to make sure the static flag actually works.
5591#
5592wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
5593_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5594  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
5595  $lt_tmp_static_flag,
5596  [],
5597  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
5598_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
5599	[Compiler flag to prevent dynamic linking])
5600])# _LT_COMPILER_PIC
5601
5602
5603# _LT_LINKER_SHLIBS([TAGNAME])
5604# ----------------------------
5605# See if the linker supports building shared libraries.
5606m4_defun([_LT_LINKER_SHLIBS],
5607[AC_REQUIRE([LT_PATH_LD])dnl
5608AC_REQUIRE([LT_PATH_NM])dnl
5609m4_require([_LT_PATH_MANIFEST_TOOL])dnl
5610m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5611m4_require([_LT_DECL_EGREP])dnl
5612m4_require([_LT_DECL_SED])dnl
5613m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
5614m4_require([_LT_TAG_COMPILER])dnl
5615AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5616m4_if([$1], [CXX], [
5617  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5618  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5619  case $host_os in
5620  aix[[4-9]]*)
5621    # If we're using GNU nm, then we don't want the "-C" option.
5622    # -C means demangle to GNU nm, but means don't demangle to AIX nm.
5623    # Without the "-l" option, or with the "-B" option, AIX nm treats
5624    # weak defined symbols like other global defined symbols, whereas
5625    # GNU nm marks them as "W".
5626    # While the 'weak' keyword is ignored in the Export File, we need
5627    # it in the Import File for the 'aix-soname' feature, so we have
5628    # to replace the "-B" option with "-P" for AIX nm.
5629    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5630      _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'
5631    else
5632      _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'
5633    fi
5634    ;;
5635  pw32*)
5636    _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
5637    ;;
5638  cygwin* | mingw* | cegcc*)
5639    case $cc_basename in
5640    cl*)
5641      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5642      ;;
5643    *)
5644      _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'
5645      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5646      ;;
5647    esac
5648    ;;
5649  *)
5650    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5651    ;;
5652  esac
5653], [
5654  runpath_var=
5655  _LT_TAGVAR(allow_undefined_flag, $1)=
5656  _LT_TAGVAR(always_export_symbols, $1)=no
5657  _LT_TAGVAR(archive_cmds, $1)=
5658  _LT_TAGVAR(archive_expsym_cmds, $1)=
5659  _LT_TAGVAR(compiler_needs_object, $1)=no
5660  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5661  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5662  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5663  _LT_TAGVAR(hardcode_automatic, $1)=no
5664  _LT_TAGVAR(hardcode_direct, $1)=no
5665  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5666  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5667  _LT_TAGVAR(hardcode_libdir_separator, $1)=
5668  _LT_TAGVAR(hardcode_minus_L, $1)=no
5669  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5670  _LT_TAGVAR(inherit_rpath, $1)=no
5671  _LT_TAGVAR(link_all_deplibs, $1)=unknown
5672  _LT_TAGVAR(module_cmds, $1)=
5673  _LT_TAGVAR(module_expsym_cmds, $1)=
5674  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
5675  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5676  _LT_TAGVAR(thread_safe_flag_spec, $1)=
5677  _LT_TAGVAR(whole_archive_flag_spec, $1)=
5678  # include_expsyms should be a list of space-separated symbols to be *always*
5679  # included in the symbol list
5680  _LT_TAGVAR(include_expsyms, $1)=
5681  # exclude_expsyms can be an extended regexp of symbols to exclude
5682  # it will be wrapped by ' (' and ')$', so one must not match beginning or
5683  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
5684  # as well as any symbol that contains 'd'.
5685  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5686  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5687  # platforms (ab)use it in PIC code, but their linkers get confused if
5688  # the symbol is explicitly referenced.  Since portable code cannot
5689  # rely on this symbol name, it's probably fine to never include it in
5690  # preloaded symbol tables.
5691  # Exclude shared library initialization/finalization symbols.
5692dnl Note also adjust exclude_expsyms for C++ above.
5693  extract_expsyms_cmds=
5694
5695  case $host_os in
5696  cygwin* | mingw* | pw32* | cegcc*)
5697    # FIXME: the MSVC++ port hasn't been tested in a loooong time
5698    # When not using gcc, we currently assume that we are using
5699    # Microsoft Visual C++.
5700    if test yes != "$GCC"; then
5701      with_gnu_ld=no
5702    fi
5703    ;;
5704  interix*)
5705    # we just hope/assume this is gcc and not c89 (= MSVC++)
5706    with_gnu_ld=yes
5707    ;;
5708  openbsd* | bitrig*)
5709    with_gnu_ld=no
5710    ;;
5711  esac
5712
5713  _LT_TAGVAR(ld_shlibs, $1)=yes
5714
5715  # On some targets, GNU ld is compatible enough with the native linker
5716  # that we're better off using the native interface for both.
5717  lt_use_gnu_ld_interface=no
5718  if test yes = "$with_gnu_ld"; then
5719    case $host_os in
5720      aix*)
5721	# The AIX port of GNU ld has always aspired to compatibility
5722	# with the native linker.  However, as the warning in the GNU ld
5723	# block says, versions before 2.19.5* couldn't really create working
5724	# shared libraries, regardless of the interface used.
5725	case `$LD -v 2>&1` in
5726	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
5727	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
5728	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
5729	  *)
5730	    lt_use_gnu_ld_interface=yes
5731	    ;;
5732	esac
5733	;;
5734      *)
5735	lt_use_gnu_ld_interface=yes
5736	;;
5737    esac
5738  fi
5739
5740  if test yes = "$lt_use_gnu_ld_interface"; then
5741    # If archive_cmds runs LD, not CC, wlarc should be empty
5742    wlarc='$wl'
5743
5744    # Set some defaults for GNU ld with shared library support. These
5745    # are reset later if shared libraries are not supported. Putting them
5746    # here allows them to be overridden if necessary.
5747    runpath_var=LD_RUN_PATH
5748    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5749    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
5750    # ancient GNU ld didn't support --whole-archive et. al.
5751    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5752      _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
5753    else
5754      _LT_TAGVAR(whole_archive_flag_spec, $1)=
5755    fi
5756    supports_anon_versioning=no
5757    case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
5758      *GNU\ gold*) supports_anon_versioning=yes ;;
5759      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5760      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5761      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5762      *\ 2.11.*) ;; # other 2.11 versions
5763      *) supports_anon_versioning=yes ;;
5764    esac
5765
5766    # See if GNU ld supports shared libraries.
5767    case $host_os in
5768    aix[[3-9]]*)
5769      # On AIX/PPC, the GNU linker is very broken
5770      if test ia64 != "$host_cpu"; then
5771	_LT_TAGVAR(ld_shlibs, $1)=no
5772	cat <<_LT_EOF 1>&2
5773
5774*** Warning: the GNU linker, at least up to release 2.19, is reported
5775*** to be unable to reliably create shared libraries on AIX.
5776*** Therefore, libtool is disabling shared libraries support.  If you
5777*** really care for shared libraries, you may want to install binutils
5778*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
5779*** You will then need to restart the configuration process.
5780
5781_LT_EOF
5782      fi
5783      ;;
5784
5785    amigaos*)
5786      case $host_cpu in
5787      powerpc)
5788            # see comment about AmigaOS4 .so support
5789            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5790            _LT_TAGVAR(archive_expsym_cmds, $1)=''
5791        ;;
5792      m68k)
5793            _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)'
5794            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5795            _LT_TAGVAR(hardcode_minus_L, $1)=yes
5796        ;;
5797      esac
5798      ;;
5799
5800    beos*)
5801      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5802	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5803	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5804	# support --undefined.  This deserves some investigation.  FIXME
5805	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5806      else
5807	_LT_TAGVAR(ld_shlibs, $1)=no
5808      fi
5809      ;;
5810
5811    cygwin* | mingw* | pw32* | cegcc*)
5812      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5813      # as there is no search path for DLLs.
5814      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5815      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
5816      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5817      _LT_TAGVAR(always_export_symbols, $1)=no
5818      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5819      _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'
5820      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5821
5822      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5823        _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'
5824	# If the export-symbols file already is a .def file, use it as
5825	# is; otherwise, prepend EXPORTS...
5826	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
5827          cp $export_symbols $output_objdir/$soname.def;
5828        else
5829          echo EXPORTS > $output_objdir/$soname.def;
5830          cat $export_symbols >> $output_objdir/$soname.def;
5831        fi~
5832        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5833      else
5834	_LT_TAGVAR(ld_shlibs, $1)=no
5835      fi
5836      ;;
5837
5838    haiku*)
5839      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5840      _LT_TAGVAR(link_all_deplibs, $1)=yes
5841      ;;
5842
5843    os2*)
5844      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5845      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5846      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5847      shrext_cmds=.dll
5848      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5849	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5850	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5851	$ECHO EXPORTS >> $output_objdir/$libname.def~
5852	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
5853	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5854	emximp -o $lib $output_objdir/$libname.def'
5855      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5856	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5857	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5858	$ECHO EXPORTS >> $output_objdir/$libname.def~
5859	prefix_cmds="$SED"~
5860	if test EXPORTS = "`$SED 1q $export_symbols`"; then
5861	  prefix_cmds="$prefix_cmds -e 1d";
5862	fi~
5863	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
5864	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
5865	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5866	emximp -o $lib $output_objdir/$libname.def'
5867      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
5868      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5869      _LT_TAGVAR(file_list_spec, $1)='@'
5870      ;;
5871
5872    interix[[3-9]]*)
5873      _LT_TAGVAR(hardcode_direct, $1)=no
5874      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5875      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5876      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5877      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5878      # Instead, shared libraries are loaded at an image base (0x10000000 by
5879      # default) and relocated if they conflict, which is a slow very memory
5880      # consuming and fragmenting process.  To avoid this, we pick a random,
5881      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5882      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5883      _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'
5884      _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'
5885      ;;
5886
5887    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
5888      tmp_diet=no
5889      if test linux-dietlibc = "$host_os"; then
5890	case $cc_basename in
5891	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
5892	esac
5893      fi
5894      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5895	 && test no = "$tmp_diet"
5896      then
5897	tmp_addflag=' $pic_flag'
5898	tmp_sharedflag='-shared'
5899	case $cc_basename,$host_cpu in
5900        pgcc*)				# Portland Group C compiler
5901	  _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'
5902	  tmp_addflag=' $pic_flag'
5903	  ;;
5904	pgf77* | pgf90* | pgf95* | pgfortran*)
5905					# Portland Group f77 and f90 compilers
5906	  _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'
5907	  tmp_addflag=' $pic_flag -Mnomain' ;;
5908	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
5909	  tmp_addflag=' -i_dynamic' ;;
5910	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
5911	  tmp_addflag=' -i_dynamic -nofor_main' ;;
5912	ifc* | ifort*)			# Intel Fortran compiler
5913	  tmp_addflag=' -nofor_main' ;;
5914	lf95*)				# Lahey Fortran 8.1
5915	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
5916	  tmp_sharedflag='--shared' ;;
5917        nagfor*)                        # NAGFOR 5.3
5918          tmp_sharedflag='-Wl,-shared' ;;
5919	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
5920	  tmp_sharedflag='-qmkshrobj'
5921	  tmp_addflag= ;;
5922	nvcc*)	# Cuda Compiler Driver 2.2
5923	  _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'
5924	  _LT_TAGVAR(compiler_needs_object, $1)=yes
5925	  ;;
5926	esac
5927	case `$CC -V 2>&1 | sed 5q` in
5928	*Sun\ C*)			# Sun C 5.9
5929	  _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'
5930	  _LT_TAGVAR(compiler_needs_object, $1)=yes
5931	  tmp_sharedflag='-G' ;;
5932	*Sun\ F*)			# Sun Fortran 8.3
5933	  tmp_sharedflag='-G' ;;
5934	esac
5935	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5936
5937        if test yes = "$supports_anon_versioning"; then
5938          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5939            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5940            echo "local: *; };" >> $output_objdir/$libname.ver~
5941            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
5942        fi
5943
5944	case $cc_basename in
5945	tcc*)
5946	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
5947	  ;;
5948	xlf* | bgf* | bgxlf* | mpixlf*)
5949	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5950	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5951	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5952	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
5953	  if test yes = "$supports_anon_versioning"; then
5954	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5955              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5956              echo "local: *; };" >> $output_objdir/$libname.ver~
5957              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5958	  fi
5959	  ;;
5960	esac
5961      else
5962        _LT_TAGVAR(ld_shlibs, $1)=no
5963      fi
5964      ;;
5965
5966    netbsd*)
5967      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5968	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5969	wlarc=
5970      else
5971	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5972	_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'
5973      fi
5974      ;;
5975
5976    solaris*)
5977      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5978	_LT_TAGVAR(ld_shlibs, $1)=no
5979	cat <<_LT_EOF 1>&2
5980
5981*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5982*** create shared libraries on Solaris systems.  Therefore, libtool
5983*** is disabling shared libraries support.  We urge you to upgrade GNU
5984*** binutils to release 2.9.1 or newer.  Another option is to modify
5985*** your PATH or compiler configuration so that the native linker is
5986*** used, and then restart.
5987
5988_LT_EOF
5989      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5990	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5991	_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'
5992      else
5993	_LT_TAGVAR(ld_shlibs, $1)=no
5994      fi
5995      ;;
5996
5997    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5998      case `$LD -v 2>&1` in
5999        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
6000	_LT_TAGVAR(ld_shlibs, $1)=no
6001	cat <<_LT_EOF 1>&2
6002
6003*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
6004*** reliably create shared libraries on SCO systems.  Therefore, libtool
6005*** is disabling shared libraries support.  We urge you to upgrade GNU
6006*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
6007*** your PATH or compiler configuration so that the native linker is
6008*** used, and then restart.
6009
6010_LT_EOF
6011	;;
6012	*)
6013	  # For security reasons, it is highly recommended that you always
6014	  # use absolute paths for naming shared libraries, and exclude the
6015	  # DT_RUNPATH tag from executables and libraries.  But doing so
6016	  # requires that you compile everything twice, which is a pain.
6017	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6018	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6019	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6020	    _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'
6021	  else
6022	    _LT_TAGVAR(ld_shlibs, $1)=no
6023	  fi
6024	;;
6025      esac
6026      ;;
6027
6028    sunos4*)
6029      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6030      wlarc=
6031      _LT_TAGVAR(hardcode_direct, $1)=yes
6032      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6033      ;;
6034
6035    *)
6036      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6037	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6038	_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'
6039      else
6040	_LT_TAGVAR(ld_shlibs, $1)=no
6041      fi
6042      ;;
6043    esac
6044
6045    if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
6046      runpath_var=
6047      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6048      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6049      _LT_TAGVAR(whole_archive_flag_spec, $1)=
6050    fi
6051  else
6052    # PORTME fill in a description of your system's linker (not GNU ld)
6053    case $host_os in
6054    aix3*)
6055      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6056      _LT_TAGVAR(always_export_symbols, $1)=yes
6057      _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'
6058      # Note: this linker hardcodes the directories in LIBPATH if there
6059      # are no directories specified by -L.
6060      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6061      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
6062	# Neither direct hardcoding nor static linking is supported with a
6063	# broken collect2.
6064	_LT_TAGVAR(hardcode_direct, $1)=unsupported
6065      fi
6066      ;;
6067
6068    aix[[4-9]]*)
6069      if test ia64 = "$host_cpu"; then
6070	# On IA64, the linker does run time linking by default, so we don't
6071	# have to do anything special.
6072	aix_use_runtimelinking=no
6073	exp_sym_flag='-Bexport'
6074	no_entry_flag=
6075      else
6076	# If we're using GNU nm, then we don't want the "-C" option.
6077	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
6078	# Without the "-l" option, or with the "-B" option, AIX nm treats
6079	# weak defined symbols like other global defined symbols, whereas
6080	# GNU nm marks them as "W".
6081	# While the 'weak' keyword is ignored in the Export File, we need
6082	# it in the Import File for the 'aix-soname' feature, so we have
6083	# to replace the "-B" option with "-P" for AIX nm.
6084	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6085	  _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'
6086	else
6087	  _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'
6088	fi
6089	aix_use_runtimelinking=no
6090
6091	# Test if we are trying to use run time linking or normal
6092	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
6093	# have runtime linking enabled, and use it for executables.
6094	# For shared libraries, we enable/disable runtime linking
6095	# depending on the kind of the shared library created -
6096	# when "with_aix_soname,aix_use_runtimelinking" is:
6097	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
6098	# "aix,yes"  lib.so          shared, rtl:yes, for executables
6099	#            lib.a           static archive
6100	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
6101	#            lib.a(lib.so.V) shared, rtl:no,  for executables
6102	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
6103	#            lib.a(lib.so.V) shared, rtl:no
6104	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
6105	#            lib.a           static archive
6106	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6107	  for ld_flag in $LDFLAGS; do
6108	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
6109	    aix_use_runtimelinking=yes
6110	    break
6111	  fi
6112	  done
6113	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
6114	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
6115	    # so we don't have lib.a shared libs to link our executables.
6116	    # We have to force runtime linking in this case.
6117	    aix_use_runtimelinking=yes
6118	    LDFLAGS="$LDFLAGS -Wl,-brtl"
6119	  fi
6120	  ;;
6121	esac
6122
6123	exp_sym_flag='-bexport'
6124	no_entry_flag='-bnoentry'
6125      fi
6126
6127      # When large executables or shared objects are built, AIX ld can
6128      # have problems creating the table of contents.  If linking a library
6129      # or program results in "error TOC overflow" add -mminimal-toc to
6130      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6131      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6132
6133      _LT_TAGVAR(archive_cmds, $1)=''
6134      _LT_TAGVAR(hardcode_direct, $1)=yes
6135      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6136      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6137      _LT_TAGVAR(link_all_deplibs, $1)=yes
6138      _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
6139      case $with_aix_soname,$aix_use_runtimelinking in
6140      aix,*) ;; # traditional, no import file
6141      svr4,* | *,yes) # use import file
6142	# The Import File defines what to hardcode.
6143	_LT_TAGVAR(hardcode_direct, $1)=no
6144	_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6145	;;
6146      esac
6147
6148      if test yes = "$GCC"; then
6149	case $host_os in aix4.[[012]]|aix4.[[012]].*)
6150	# We only want to do this on AIX 4.2 and lower, the check
6151	# below for broken collect2 doesn't work under 4.3+
6152	  collect2name=`$CC -print-prog-name=collect2`
6153	  if test -f "$collect2name" &&
6154	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6155	  then
6156	  # We have reworked collect2
6157	  :
6158	  else
6159	  # We have old collect2
6160	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
6161	  # It fails to find uninstalled libraries when the uninstalled
6162	  # path is not listed in the libpath.  Setting hardcode_minus_L
6163	  # to unsupported forces relinking
6164	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
6165	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6166	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
6167	  fi
6168	  ;;
6169	esac
6170	shared_flag='-shared'
6171	if test yes = "$aix_use_runtimelinking"; then
6172	  shared_flag="$shared_flag "'$wl-G'
6173	fi
6174	# Need to ensure runtime linking is disabled for the traditional
6175	# shared library, or the linker may eventually find shared libraries
6176	# /with/ Import File - we do not want to mix them.
6177	shared_flag_aix='-shared'
6178	shared_flag_svr4='-shared $wl-G'
6179      else
6180	# not using gcc
6181	if test ia64 = "$host_cpu"; then
6182	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6183	# chokes on -Wl,-G. The following line is correct:
6184	  shared_flag='-G'
6185	else
6186	  if test yes = "$aix_use_runtimelinking"; then
6187	    shared_flag='$wl-G'
6188	  else
6189	    shared_flag='$wl-bM:SRE'
6190	  fi
6191	  shared_flag_aix='$wl-bM:SRE'
6192	  shared_flag_svr4='$wl-G'
6193	fi
6194      fi
6195
6196      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
6197      # It seems that -bexpall does not export symbols beginning with
6198      # underscore (_), so it is better to generate a list of symbols to export.
6199      _LT_TAGVAR(always_export_symbols, $1)=yes
6200      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
6201	# Warning - without using the other runtime loading flags (-brtl),
6202	# -berok will link without error, but may produce a broken library.
6203	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6204        # Determine the default libpath from the value encoded in an
6205        # empty executable.
6206        _LT_SYS_MODULE_PATH_AIX([$1])
6207        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
6208        _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
6209      else
6210	if test ia64 = "$host_cpu"; then
6211	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
6212	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6213	  _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"
6214	else
6215	 # Determine the default libpath from the value encoded in an
6216	 # empty executable.
6217	 _LT_SYS_MODULE_PATH_AIX([$1])
6218	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
6219	  # Warning - without using the other run time loading flags,
6220	  # -berok will link without error, but may produce a broken library.
6221	  _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
6222	  _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
6223	  if test yes = "$with_gnu_ld"; then
6224	    # We only use this code for GNU lds that support --whole-archive.
6225	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
6226	  else
6227	    # Exported symbols can be pulled into shared objects from archives
6228	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6229	  fi
6230	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6231	  _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
6232	  # -brtl affects multiple linker settings, -berok does not and is overridden later
6233	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
6234	  if test svr4 != "$with_aix_soname"; then
6235	    # This is similar to how AIX traditionally builds its shared libraries.
6236	    _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'
6237	  fi
6238	  if test aix != "$with_aix_soname"; then
6239	    _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'
6240	  else
6241	    # used by -dlpreopen to get the symbols
6242	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
6243	  fi
6244	  _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
6245	fi
6246      fi
6247      ;;
6248
6249    amigaos*)
6250      case $host_cpu in
6251      powerpc)
6252            # see comment about AmigaOS4 .so support
6253            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6254            _LT_TAGVAR(archive_expsym_cmds, $1)=''
6255        ;;
6256      m68k)
6257            _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)'
6258            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6259            _LT_TAGVAR(hardcode_minus_L, $1)=yes
6260        ;;
6261      esac
6262      ;;
6263
6264    bsdi[[45]]*)
6265      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6266      ;;
6267
6268    cygwin* | mingw* | pw32* | cegcc*)
6269      # When not using gcc, we currently assume that we are using
6270      # Microsoft Visual C++.
6271      # hardcode_libdir_flag_spec is actually meaningless, as there is
6272      # no search path for DLLs.
6273      case $cc_basename in
6274      cl*)
6275	# Native MSVC
6276	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6277	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6278	_LT_TAGVAR(always_export_symbols, $1)=yes
6279	_LT_TAGVAR(file_list_spec, $1)='@'
6280	# Tell ltmain to make .lib files, not .a files.
6281	libext=lib
6282	# Tell ltmain to make .dll files, not .so files.
6283	shrext_cmds=.dll
6284	# FIXME: Setting linknames here is a bad hack.
6285	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
6286	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
6287            cp "$export_symbols" "$output_objdir/$soname.def";
6288            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
6289          else
6290            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
6291          fi~
6292          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6293          linknames='
6294	# The linker will not automatically build a static lib if we build a DLL.
6295	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6296	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6297	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
6298	_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'
6299	# Don't use ranlib
6300	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6301	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6302          lt_tool_outputfile="@TOOL_OUTPUT@"~
6303          case $lt_outputfile in
6304            *.exe|*.EXE) ;;
6305            *)
6306              lt_outputfile=$lt_outputfile.exe
6307              lt_tool_outputfile=$lt_tool_outputfile.exe
6308              ;;
6309          esac~
6310          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
6311            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6312            $RM "$lt_outputfile.manifest";
6313          fi'
6314	;;
6315      *)
6316	# Assume MSVC wrapper
6317	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6318	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6319	# Tell ltmain to make .lib files, not .a files.
6320	libext=lib
6321	# Tell ltmain to make .dll files, not .so files.
6322	shrext_cmds=.dll
6323	# FIXME: Setting linknames here is a bad hack.
6324	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
6325	# The linker will automatically build a .lib file if we build a DLL.
6326	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6327	# FIXME: Should let the user specify the lib program.
6328	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
6329	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6330	;;
6331      esac
6332      ;;
6333
6334    darwin* | rhapsody*)
6335      _LT_DARWIN_LINKER_FEATURES($1)
6336      ;;
6337
6338    dgux*)
6339      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6340      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6341      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6342      ;;
6343
6344    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6345    # support.  Future versions do this automatically, but an explicit c++rt0.o
6346    # does not break anything, and helps significantly (at the cost of a little
6347    # extra space).
6348    freebsd2.2*)
6349      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6350      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6351      _LT_TAGVAR(hardcode_direct, $1)=yes
6352      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6353      ;;
6354
6355    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6356    freebsd2.*)
6357      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6358      _LT_TAGVAR(hardcode_direct, $1)=yes
6359      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6360      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6361      ;;
6362
6363    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6364    freebsd* | dragonfly*)
6365      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6366      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6367      _LT_TAGVAR(hardcode_direct, $1)=yes
6368      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6369      ;;
6370
6371    hpux9*)
6372      if test yes = "$GCC"; then
6373	_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'
6374      else
6375	_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'
6376      fi
6377      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
6378      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6379      _LT_TAGVAR(hardcode_direct, $1)=yes
6380
6381      # hardcode_minus_L: Not really in the search PATH,
6382      # but as the default location of the library.
6383      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6384      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6385      ;;
6386
6387    hpux10*)
6388      if test yes,no = "$GCC,$with_gnu_ld"; then
6389	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6390      else
6391	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6392      fi
6393      if test no = "$with_gnu_ld"; then
6394	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
6395	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6396	_LT_TAGVAR(hardcode_direct, $1)=yes
6397	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6398	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6399	# hardcode_minus_L: Not really in the search PATH,
6400	# but as the default location of the library.
6401	_LT_TAGVAR(hardcode_minus_L, $1)=yes
6402      fi
6403      ;;
6404
6405    hpux11*)
6406      if test yes,no = "$GCC,$with_gnu_ld"; then
6407	case $host_cpu in
6408	hppa*64*)
6409	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
6410	  ;;
6411	ia64*)
6412	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6413	  ;;
6414	*)
6415	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6416	  ;;
6417	esac
6418      else
6419	case $host_cpu in
6420	hppa*64*)
6421	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
6422	  ;;
6423	ia64*)
6424	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6425	  ;;
6426	*)
6427	m4_if($1, [], [
6428	  # Older versions of the 11.00 compiler do not understand -b yet
6429	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
6430	  _LT_LINKER_OPTION([if $CC understands -b],
6431	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
6432	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
6433	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
6434	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
6435	  ;;
6436	esac
6437      fi
6438      if test no = "$with_gnu_ld"; then
6439	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
6440	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6441
6442	case $host_cpu in
6443	hppa*64*|ia64*)
6444	  _LT_TAGVAR(hardcode_direct, $1)=no
6445	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6446	  ;;
6447	*)
6448	  _LT_TAGVAR(hardcode_direct, $1)=yes
6449	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6450	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6451
6452	  # hardcode_minus_L: Not really in the search PATH,
6453	  # but as the default location of the library.
6454	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
6455	  ;;
6456	esac
6457      fi
6458      ;;
6459
6460    irix5* | irix6* | nonstopux*)
6461      if test yes = "$GCC"; then
6462	_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'
6463	# Try to use the -exported_symbol ld option, if it does not
6464	# work, assume that -exports_file does not work either and
6465	# implicitly export all symbols.
6466	# This should be the same for all languages, so no per-tag cache variable.
6467	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
6468	  [lt_cv_irix_exported_symbol],
6469	  [save_LDFLAGS=$LDFLAGS
6470	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
6471	   AC_LINK_IFELSE(
6472	     [AC_LANG_SOURCE(
6473	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
6474			      [C++], [[int foo (void) { return 0; }]],
6475			      [Fortran 77], [[
6476      subroutine foo
6477      end]],
6478			      [Fortran], [[
6479      subroutine foo
6480      end]])])],
6481	      [lt_cv_irix_exported_symbol=yes],
6482	      [lt_cv_irix_exported_symbol=no])
6483           LDFLAGS=$save_LDFLAGS])
6484	if test yes = "$lt_cv_irix_exported_symbol"; then
6485          _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'
6486	fi
6487      else
6488	_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'
6489	_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'
6490      fi
6491      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6492      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6493      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6494      _LT_TAGVAR(inherit_rpath, $1)=yes
6495      _LT_TAGVAR(link_all_deplibs, $1)=yes
6496      ;;
6497
6498    linux*)
6499      case $cc_basename in
6500      tcc*)
6501	# Fabrice Bellard et al's Tiny C Compiler
6502	_LT_TAGVAR(ld_shlibs, $1)=yes
6503	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6504	;;
6505      esac
6506      ;;
6507
6508    netbsd*)
6509      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6510	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6511      else
6512	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6513      fi
6514      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6515      _LT_TAGVAR(hardcode_direct, $1)=yes
6516      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6517      ;;
6518
6519    newsos6)
6520      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6521      _LT_TAGVAR(hardcode_direct, $1)=yes
6522      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6523      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6524      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6525      ;;
6526
6527    *nto* | *qnx*)
6528      ;;
6529
6530    openbsd* | bitrig*)
6531      if test -f /usr/libexec/ld.so; then
6532	_LT_TAGVAR(hardcode_direct, $1)=yes
6533	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6534	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6535	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
6536	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6537	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
6538	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6539	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6540	else
6541	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6542	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6543	fi
6544      else
6545	_LT_TAGVAR(ld_shlibs, $1)=no
6546      fi
6547      ;;
6548
6549    os2*)
6550      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6551      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6552      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6553      shrext_cmds=.dll
6554      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6555	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6556	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6557	$ECHO EXPORTS >> $output_objdir/$libname.def~
6558	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
6559	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6560	emximp -o $lib $output_objdir/$libname.def'
6561      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6562	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6563	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6564	$ECHO EXPORTS >> $output_objdir/$libname.def~
6565	prefix_cmds="$SED"~
6566	if test EXPORTS = "`$SED 1q $export_symbols`"; then
6567	  prefix_cmds="$prefix_cmds -e 1d";
6568	fi~
6569	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
6570	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
6571	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6572	emximp -o $lib $output_objdir/$libname.def'
6573      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
6574      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6575      _LT_TAGVAR(file_list_spec, $1)='@'
6576      ;;
6577
6578    osf3*)
6579      if test yes = "$GCC"; then
6580	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
6581	_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'
6582      else
6583	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6584	_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'
6585      fi
6586      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6587      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6588      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6589      ;;
6590
6591    osf4* | osf5*)	# as osf3* with the addition of -msym flag
6592      if test yes = "$GCC"; then
6593	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
6594	_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'
6595	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6596      else
6597	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6598	_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'
6599	_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~
6600          $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'
6601
6602	# Both c and cxx compiler support -rpath directly
6603	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6604      fi
6605      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6606      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6607      ;;
6608
6609    solaris*)
6610      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
6611      if test yes = "$GCC"; then
6612	wlarc='$wl'
6613	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
6614	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6615          $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'
6616      else
6617	case `$CC -V 2>&1` in
6618	*"Compilers 5.0"*)
6619	  wlarc=''
6620	  _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
6621	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6622            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
6623	  ;;
6624	*)
6625	  wlarc='$wl'
6626	  _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
6627	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6628            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6629	  ;;
6630	esac
6631      fi
6632      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6633      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6634      case $host_os in
6635      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6636      *)
6637	# The compiler driver will combine and reorder linker options,
6638	# but understands '-z linker_flag'.  GCC discards it without '$wl',
6639	# but is careful enough not to reorder.
6640	# Supported since Solaris 2.6 (maybe 2.5.1?)
6641	if test yes = "$GCC"; then
6642	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
6643	else
6644	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6645	fi
6646	;;
6647      esac
6648      _LT_TAGVAR(link_all_deplibs, $1)=yes
6649      ;;
6650
6651    sunos4*)
6652      if test sequent = "$host_vendor"; then
6653	# Use $CC to link under sequent, because it throws in some extra .o
6654	# files that make .init and .fini sections work.
6655	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6656      else
6657	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6658      fi
6659      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6660      _LT_TAGVAR(hardcode_direct, $1)=yes
6661      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6662      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6663      ;;
6664
6665    sysv4)
6666      case $host_vendor in
6667	sni)
6668	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6669	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6670	;;
6671	siemens)
6672	  ## LD is ld it makes a PLAMLIB
6673	  ## CC just makes a GrossModule.
6674	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6675	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6676	  _LT_TAGVAR(hardcode_direct, $1)=no
6677        ;;
6678	motorola)
6679	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6680	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6681	;;
6682      esac
6683      runpath_var='LD_RUN_PATH'
6684      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6685      ;;
6686
6687    sysv4.3*)
6688      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6689      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6690      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6691      ;;
6692
6693    sysv4*MP*)
6694      if test -d /usr/nec; then
6695	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6696	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6697	runpath_var=LD_RUN_PATH
6698	hardcode_runpath_var=yes
6699	_LT_TAGVAR(ld_shlibs, $1)=yes
6700      fi
6701      ;;
6702
6703    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6704      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
6705      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6706      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6707      runpath_var='LD_RUN_PATH'
6708
6709      if test yes = "$GCC"; then
6710	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6711	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6712      else
6713	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6714	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6715      fi
6716      ;;
6717
6718    sysv5* | sco3.2v5* | sco5v6*)
6719      # Note: We CANNOT use -z defs as we might desire, because we do not
6720      # link with -lc, and that would cause any symbols used from libc to
6721      # always be unresolved, which means just about no library would
6722      # ever link correctly.  If we're not using GNU ld we use -z text
6723      # though, which does catch some bad symbols but isn't as heavy-handed
6724      # as -z defs.
6725      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
6726      _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
6727      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6728      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6729      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
6730      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6731      _LT_TAGVAR(link_all_deplibs, $1)=yes
6732      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
6733      runpath_var='LD_RUN_PATH'
6734
6735      if test yes = "$GCC"; then
6736	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6737	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6738      else
6739	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6740	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6741      fi
6742      ;;
6743
6744    uts4*)
6745      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6746      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6747      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6748      ;;
6749
6750    *)
6751      _LT_TAGVAR(ld_shlibs, $1)=no
6752      ;;
6753    esac
6754
6755    if test sni = "$host_vendor"; then
6756      case $host in
6757      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6758	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
6759	;;
6760      esac
6761    fi
6762  fi
6763])
6764AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6765test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
6766
6767_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6768
6769_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6770_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6771_LT_DECL([], [extract_expsyms_cmds], [2],
6772    [The commands to extract the exported symbol list from a shared archive])
6773
6774#
6775# Do we need to explicitly link libc?
6776#
6777case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6778x|xyes)
6779  # Assume -lc should be added
6780  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6781
6782  if test yes,yes = "$GCC,$enable_shared"; then
6783    case $_LT_TAGVAR(archive_cmds, $1) in
6784    *'~'*)
6785      # FIXME: we may have to deal with multi-command sequences.
6786      ;;
6787    '$CC '*)
6788      # Test whether the compiler implicitly links with -lc since on some
6789      # systems, -lgcc has to come before -lc. If gcc already passes -lc
6790      # to ld, don't add -lc before -lgcc.
6791      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
6792	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
6793	[$RM conftest*
6794	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6795
6796	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6797	  soname=conftest
6798	  lib=conftest
6799	  libobjs=conftest.$ac_objext
6800	  deplibs=
6801	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6802	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6803	  compiler_flags=-v
6804	  linker_flags=-v
6805	  verstring=
6806	  output_objdir=.
6807	  libname=conftest
6808	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6809	  _LT_TAGVAR(allow_undefined_flag, $1)=
6810	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6811	  then
6812	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6813	  else
6814	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6815	  fi
6816	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6817	else
6818	  cat conftest.err 1>&5
6819	fi
6820	$RM conftest*
6821	])
6822      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
6823      ;;
6824    esac
6825  fi
6826  ;;
6827esac
6828
6829_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6830    [Whether or not to add -lc for building shared libraries])
6831_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6832    [enable_shared_with_static_runtimes], [0],
6833    [Whether or not to disallow shared libs when runtime libs are static])
6834_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6835    [Compiler flag to allow reflexive dlopens])
6836_LT_TAGDECL([], [whole_archive_flag_spec], [1],
6837    [Compiler flag to generate shared objects directly from archives])
6838_LT_TAGDECL([], [compiler_needs_object], [1],
6839    [Whether the compiler copes with passing no objects directly])
6840_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6841    [Create an old-style archive from a shared archive])
6842_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6843    [Create a temporary old-style archive to link instead of a shared archive])
6844_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6845_LT_TAGDECL([], [archive_expsym_cmds], [2])
6846_LT_TAGDECL([], [module_cmds], [2],
6847    [Commands used to build a loadable module if different from building
6848    a shared archive.])
6849_LT_TAGDECL([], [module_expsym_cmds], [2])
6850_LT_TAGDECL([], [with_gnu_ld], [1],
6851    [Whether we are building with GNU ld or not])
6852_LT_TAGDECL([], [allow_undefined_flag], [1],
6853    [Flag that allows shared libraries with undefined symbols to be built])
6854_LT_TAGDECL([], [no_undefined_flag], [1],
6855    [Flag that enforces no undefined symbols])
6856_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6857    [Flag to hardcode $libdir into a binary during linking.
6858    This must work even if $libdir does not exist])
6859_LT_TAGDECL([], [hardcode_libdir_separator], [1],
6860    [Whether we need a single "-rpath" flag with a separated argument])
6861_LT_TAGDECL([], [hardcode_direct], [0],
6862    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
6863    DIR into the resulting binary])
6864_LT_TAGDECL([], [hardcode_direct_absolute], [0],
6865    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
6866    DIR into the resulting binary and the resulting library dependency is
6867    "absolute", i.e impossible to change by setting $shlibpath_var if the
6868    library is relocated])
6869_LT_TAGDECL([], [hardcode_minus_L], [0],
6870    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6871    into the resulting binary])
6872_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6873    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6874    into the resulting binary])
6875_LT_TAGDECL([], [hardcode_automatic], [0],
6876    [Set to "yes" if building a shared library automatically hardcodes DIR
6877    into the library and all subsequent libraries and executables linked
6878    against it])
6879_LT_TAGDECL([], [inherit_rpath], [0],
6880    [Set to yes if linker adds runtime paths of dependent libraries
6881    to runtime path list])
6882_LT_TAGDECL([], [link_all_deplibs], [0],
6883    [Whether libtool must link a program against all its dependency libraries])
6884_LT_TAGDECL([], [always_export_symbols], [0],
6885    [Set to "yes" if exported symbols are required])
6886_LT_TAGDECL([], [export_symbols_cmds], [2],
6887    [The commands to list exported symbols])
6888_LT_TAGDECL([], [exclude_expsyms], [1],
6889    [Symbols that should not be listed in the preloaded symbols])
6890_LT_TAGDECL([], [include_expsyms], [1],
6891    [Symbols that must always be exported])
6892_LT_TAGDECL([], [prelink_cmds], [2],
6893    [Commands necessary for linking programs (against libraries) with templates])
6894_LT_TAGDECL([], [postlink_cmds], [2],
6895    [Commands necessary for finishing linking programs])
6896_LT_TAGDECL([], [file_list_spec], [1],
6897    [Specify filename containing input files])
6898dnl FIXME: Not yet implemented
6899dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6900dnl    [Compiler flag to generate thread safe objects])
6901])# _LT_LINKER_SHLIBS
6902
6903
6904# _LT_LANG_C_CONFIG([TAG])
6905# ------------------------
6906# Ensure that the configuration variables for a C compiler are suitably
6907# defined.  These variables are subsequently used by _LT_CONFIG to write
6908# the compiler configuration to 'libtool'.
6909m4_defun([_LT_LANG_C_CONFIG],
6910[m4_require([_LT_DECL_EGREP])dnl
6911lt_save_CC=$CC
6912AC_LANG_PUSH(C)
6913
6914# Source file extension for C test sources.
6915ac_ext=c
6916
6917# Object file extension for compiled C test sources.
6918objext=o
6919_LT_TAGVAR(objext, $1)=$objext
6920
6921# Code to be used in simple compile tests
6922lt_simple_compile_test_code="int some_variable = 0;"
6923
6924# Code to be used in simple link tests
6925lt_simple_link_test_code='int main(){return(0);}'
6926
6927_LT_TAG_COMPILER
6928# Save the default compiler, since it gets overwritten when the other
6929# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6930compiler_DEFAULT=$CC
6931
6932# save warnings/boilerplate of simple test code
6933_LT_COMPILER_BOILERPLATE
6934_LT_LINKER_BOILERPLATE
6935
6936if test -n "$compiler"; then
6937  _LT_COMPILER_NO_RTTI($1)
6938  _LT_COMPILER_PIC($1)
6939  _LT_COMPILER_C_O($1)
6940  _LT_COMPILER_FILE_LOCKS($1)
6941  _LT_LINKER_SHLIBS($1)
6942  _LT_SYS_DYNAMIC_LINKER($1)
6943  _LT_LINKER_HARDCODE_LIBPATH($1)
6944  LT_SYS_DLOPEN_SELF
6945  _LT_CMD_STRIPLIB
6946
6947  # Report what library types will actually be built
6948  AC_MSG_CHECKING([if libtool supports shared libraries])
6949  AC_MSG_RESULT([$can_build_shared])
6950
6951  AC_MSG_CHECKING([whether to build shared libraries])
6952  test no = "$can_build_shared" && enable_shared=no
6953
6954  # On AIX, shared libraries and static libraries use the same namespace, and
6955  # are all built from PIC.
6956  case $host_os in
6957  aix3*)
6958    test yes = "$enable_shared" && enable_static=no
6959    if test -n "$RANLIB"; then
6960      archive_cmds="$archive_cmds~\$RANLIB \$lib"
6961      postinstall_cmds='$RANLIB $lib'
6962    fi
6963    ;;
6964
6965  aix[[4-9]]*)
6966    if test ia64 != "$host_cpu"; then
6967      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
6968      yes,aix,yes) ;;			# shared object as lib.so file only
6969      yes,svr4,*) ;;			# shared object as lib.so archive member only
6970      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
6971      esac
6972    fi
6973    ;;
6974  esac
6975  AC_MSG_RESULT([$enable_shared])
6976
6977  AC_MSG_CHECKING([whether to build static libraries])
6978  # Make sure either enable_shared or enable_static is yes.
6979  test yes = "$enable_shared" || enable_static=yes
6980  AC_MSG_RESULT([$enable_static])
6981
6982  _LT_CONFIG($1)
6983fi
6984AC_LANG_POP
6985CC=$lt_save_CC
6986])# _LT_LANG_C_CONFIG
6987
6988
6989# _LT_LANG_CXX_CONFIG([TAG])
6990# --------------------------
6991# Ensure that the configuration variables for a C++ compiler are suitably
6992# defined.  These variables are subsequently used by _LT_CONFIG to write
6993# the compiler configuration to 'libtool'.
6994m4_defun([_LT_LANG_CXX_CONFIG],
6995[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6996m4_require([_LT_DECL_EGREP])dnl
6997m4_require([_LT_PATH_MANIFEST_TOOL])dnl
6998if test -n "$CXX" && ( test no != "$CXX" &&
6999    ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
7000    (test g++ != "$CXX"))); then
7001  AC_PROG_CXXCPP
7002else
7003  _lt_caught_CXX_error=yes
7004fi
7005
7006AC_LANG_PUSH(C++)
7007_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7008_LT_TAGVAR(allow_undefined_flag, $1)=
7009_LT_TAGVAR(always_export_symbols, $1)=no
7010_LT_TAGVAR(archive_expsym_cmds, $1)=
7011_LT_TAGVAR(compiler_needs_object, $1)=no
7012_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7013_LT_TAGVAR(hardcode_direct, $1)=no
7014_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7015_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7016_LT_TAGVAR(hardcode_libdir_separator, $1)=
7017_LT_TAGVAR(hardcode_minus_L, $1)=no
7018_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7019_LT_TAGVAR(hardcode_automatic, $1)=no
7020_LT_TAGVAR(inherit_rpath, $1)=no
7021_LT_TAGVAR(module_cmds, $1)=
7022_LT_TAGVAR(module_expsym_cmds, $1)=
7023_LT_TAGVAR(link_all_deplibs, $1)=unknown
7024_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7025_LT_TAGVAR(reload_flag, $1)=$reload_flag
7026_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7027_LT_TAGVAR(no_undefined_flag, $1)=
7028_LT_TAGVAR(whole_archive_flag_spec, $1)=
7029_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7030
7031# Source file extension for C++ test sources.
7032ac_ext=cpp
7033
7034# Object file extension for compiled C++ test sources.
7035objext=o
7036_LT_TAGVAR(objext, $1)=$objext
7037
7038# No sense in running all these tests if we already determined that
7039# the CXX compiler isn't working.  Some variables (like enable_shared)
7040# are currently assumed to apply to all compilers on this platform,
7041# and will be corrupted by setting them based on a non-working compiler.
7042if test yes != "$_lt_caught_CXX_error"; then
7043  # Code to be used in simple compile tests
7044  lt_simple_compile_test_code="int some_variable = 0;"
7045
7046  # Code to be used in simple link tests
7047  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
7048
7049  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7050  _LT_TAG_COMPILER
7051
7052  # save warnings/boilerplate of simple test code
7053  _LT_COMPILER_BOILERPLATE
7054  _LT_LINKER_BOILERPLATE
7055
7056  # Allow CC to be a program name with arguments.
7057  lt_save_CC=$CC
7058  lt_save_CFLAGS=$CFLAGS
7059  lt_save_LD=$LD
7060  lt_save_GCC=$GCC
7061  GCC=$GXX
7062  lt_save_with_gnu_ld=$with_gnu_ld
7063  lt_save_path_LD=$lt_cv_path_LD
7064  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
7065    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
7066  else
7067    $as_unset lt_cv_prog_gnu_ld
7068  fi
7069  if test -n "${lt_cv_path_LDCXX+set}"; then
7070    lt_cv_path_LD=$lt_cv_path_LDCXX
7071  else
7072    $as_unset lt_cv_path_LD
7073  fi
7074  test -z "${LDCXX+set}" || LD=$LDCXX
7075  CC=${CXX-"c++"}
7076  CFLAGS=$CXXFLAGS
7077  compiler=$CC
7078  _LT_TAGVAR(compiler, $1)=$CC
7079  _LT_CC_BASENAME([$compiler])
7080
7081  if test -n "$compiler"; then
7082    # We don't want -fno-exception when compiling C++ code, so set the
7083    # no_builtin_flag separately
7084    if test yes = "$GXX"; then
7085      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
7086    else
7087      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
7088    fi
7089
7090    if test yes = "$GXX"; then
7091      # Set up default GNU C++ configuration
7092
7093      LT_PATH_LD
7094
7095      # Check if GNU C++ uses GNU ld as the underlying linker, since the
7096      # archiving commands below assume that GNU ld is being used.
7097      if test yes = "$with_gnu_ld"; then
7098        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7099        _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'
7100
7101        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7102        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7103
7104        # If archive_cmds runs LD, not CC, wlarc should be empty
7105        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
7106        #     investigate it a little bit more. (MM)
7107        wlarc='$wl'
7108
7109        # ancient GNU ld didn't support --whole-archive et. al.
7110        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
7111	  $GREP 'no-whole-archive' > /dev/null; then
7112          _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
7113        else
7114          _LT_TAGVAR(whole_archive_flag_spec, $1)=
7115        fi
7116      else
7117        with_gnu_ld=no
7118        wlarc=
7119
7120        # A generic and very simple default shared library creation
7121        # command for GNU C++ for the case where it uses the native
7122        # linker, instead of GNU ld.  If possible, this setting should
7123        # overridden to take advantage of the native linker features on
7124        # the platform it is being used on.
7125        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7126      fi
7127
7128      # Commands to make compiler produce verbose output that lists
7129      # what "hidden" libraries, object files and flags are used when
7130      # linking a shared library.
7131      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7132
7133    else
7134      GXX=no
7135      with_gnu_ld=no
7136      wlarc=
7137    fi
7138
7139    # PORTME: fill in a description of your system's C++ link characteristics
7140    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
7141    _LT_TAGVAR(ld_shlibs, $1)=yes
7142    case $host_os in
7143      aix3*)
7144        # FIXME: insert proper C++ library support
7145        _LT_TAGVAR(ld_shlibs, $1)=no
7146        ;;
7147      aix[[4-9]]*)
7148        if test ia64 = "$host_cpu"; then
7149          # On IA64, the linker does run time linking by default, so we don't
7150          # have to do anything special.
7151          aix_use_runtimelinking=no
7152          exp_sym_flag='-Bexport'
7153          no_entry_flag=
7154        else
7155          aix_use_runtimelinking=no
7156
7157          # Test if we are trying to use run time linking or normal
7158          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
7159          # have runtime linking enabled, and use it for executables.
7160          # For shared libraries, we enable/disable runtime linking
7161          # depending on the kind of the shared library created -
7162          # when "with_aix_soname,aix_use_runtimelinking" is:
7163          # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
7164          # "aix,yes"  lib.so          shared, rtl:yes, for executables
7165          #            lib.a           static archive
7166          # "both,no"  lib.so.V(shr.o) shared, rtl:yes
7167          #            lib.a(lib.so.V) shared, rtl:no,  for executables
7168          # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
7169          #            lib.a(lib.so.V) shared, rtl:no
7170          # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
7171          #            lib.a           static archive
7172          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
7173	    for ld_flag in $LDFLAGS; do
7174	      case $ld_flag in
7175	      *-brtl*)
7176	        aix_use_runtimelinking=yes
7177	        break
7178	        ;;
7179	      esac
7180	    done
7181	    if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
7182	      # With aix-soname=svr4, we create the lib.so.V shared archives only,
7183	      # so we don't have lib.a shared libs to link our executables.
7184	      # We have to force runtime linking in this case.
7185	      aix_use_runtimelinking=yes
7186	      LDFLAGS="$LDFLAGS -Wl,-brtl"
7187	    fi
7188	    ;;
7189          esac
7190
7191          exp_sym_flag='-bexport'
7192          no_entry_flag='-bnoentry'
7193        fi
7194
7195        # When large executables or shared objects are built, AIX ld can
7196        # have problems creating the table of contents.  If linking a library
7197        # or program results in "error TOC overflow" add -mminimal-toc to
7198        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
7199        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7200
7201        _LT_TAGVAR(archive_cmds, $1)=''
7202        _LT_TAGVAR(hardcode_direct, $1)=yes
7203        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7204        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7205        _LT_TAGVAR(link_all_deplibs, $1)=yes
7206        _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
7207        case $with_aix_soname,$aix_use_runtimelinking in
7208        aix,*) ;;	# no import file
7209        svr4,* | *,yes) # use import file
7210          # The Import File defines what to hardcode.
7211          _LT_TAGVAR(hardcode_direct, $1)=no
7212          _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7213          ;;
7214        esac
7215
7216        if test yes = "$GXX"; then
7217          case $host_os in aix4.[[012]]|aix4.[[012]].*)
7218          # We only want to do this on AIX 4.2 and lower, the check
7219          # below for broken collect2 doesn't work under 4.3+
7220	  collect2name=`$CC -print-prog-name=collect2`
7221	  if test -f "$collect2name" &&
7222	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
7223	  then
7224	    # We have reworked collect2
7225	    :
7226	  else
7227	    # We have old collect2
7228	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
7229	    # It fails to find uninstalled libraries when the uninstalled
7230	    # path is not listed in the libpath.  Setting hardcode_minus_L
7231	    # to unsupported forces relinking
7232	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
7233	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7234	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
7235	  fi
7236          esac
7237          shared_flag='-shared'
7238	  if test yes = "$aix_use_runtimelinking"; then
7239	    shared_flag=$shared_flag' $wl-G'
7240	  fi
7241	  # Need to ensure runtime linking is disabled for the traditional
7242	  # shared library, or the linker may eventually find shared libraries
7243	  # /with/ Import File - we do not want to mix them.
7244	  shared_flag_aix='-shared'
7245	  shared_flag_svr4='-shared $wl-G'
7246        else
7247          # not using gcc
7248          if test ia64 = "$host_cpu"; then
7249	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7250	  # chokes on -Wl,-G. The following line is correct:
7251	  shared_flag='-G'
7252          else
7253	    if test yes = "$aix_use_runtimelinking"; then
7254	      shared_flag='$wl-G'
7255	    else
7256	      shared_flag='$wl-bM:SRE'
7257	    fi
7258	    shared_flag_aix='$wl-bM:SRE'
7259	    shared_flag_svr4='$wl-G'
7260          fi
7261        fi
7262
7263        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
7264        # It seems that -bexpall does not export symbols beginning with
7265        # underscore (_), so it is better to generate a list of symbols to
7266	# export.
7267        _LT_TAGVAR(always_export_symbols, $1)=yes
7268	if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
7269          # Warning - without using the other runtime loading flags (-brtl),
7270          # -berok will link without error, but may produce a broken library.
7271          # The "-G" linker flag allows undefined symbols.
7272          _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
7273          # Determine the default libpath from the value encoded in an empty
7274          # executable.
7275          _LT_SYS_MODULE_PATH_AIX([$1])
7276          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
7277
7278          _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
7279        else
7280          if test ia64 = "$host_cpu"; then
7281	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
7282	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7283	    _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"
7284          else
7285	    # Determine the default libpath from the value encoded in an
7286	    # empty executable.
7287	    _LT_SYS_MODULE_PATH_AIX([$1])
7288	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
7289	    # Warning - without using the other run time loading flags,
7290	    # -berok will link without error, but may produce a broken library.
7291	    _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
7292	    _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
7293	    if test yes = "$with_gnu_ld"; then
7294	      # We only use this code for GNU lds that support --whole-archive.
7295	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
7296	    else
7297	      # Exported symbols can be pulled into shared objects from archives
7298	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7299	    fi
7300	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7301	    _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
7302	    # -brtl affects multiple linker settings, -berok does not and is overridden later
7303	    compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
7304	    if test svr4 != "$with_aix_soname"; then
7305	      # This is similar to how AIX traditionally builds its shared
7306	      # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
7307	      _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'
7308	    fi
7309	    if test aix != "$with_aix_soname"; then
7310	      _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'
7311	    else
7312	      # used by -dlpreopen to get the symbols
7313	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
7314	    fi
7315	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
7316          fi
7317        fi
7318        ;;
7319
7320      beos*)
7321	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7322	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7323	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
7324	  # support --undefined.  This deserves some investigation.  FIXME
7325	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7326	else
7327	  _LT_TAGVAR(ld_shlibs, $1)=no
7328	fi
7329	;;
7330
7331      chorus*)
7332        case $cc_basename in
7333          *)
7334	  # FIXME: insert proper C++ library support
7335	  _LT_TAGVAR(ld_shlibs, $1)=no
7336	  ;;
7337        esac
7338        ;;
7339
7340      cygwin* | mingw* | pw32* | cegcc*)
7341	case $GXX,$cc_basename in
7342	,cl* | no,cl*)
7343	  # Native MSVC
7344	  # hardcode_libdir_flag_spec is actually meaningless, as there is
7345	  # no search path for DLLs.
7346	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7347	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7348	  _LT_TAGVAR(always_export_symbols, $1)=yes
7349	  _LT_TAGVAR(file_list_spec, $1)='@'
7350	  # Tell ltmain to make .lib files, not .a files.
7351	  libext=lib
7352	  # Tell ltmain to make .dll files, not .so files.
7353	  shrext_cmds=.dll
7354	  # FIXME: Setting linknames here is a bad hack.
7355	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
7356	  _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
7357              cp "$export_symbols" "$output_objdir/$soname.def";
7358              echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
7359            else
7360              $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
7361            fi~
7362            $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
7363            linknames='
7364	  # The linker will not automatically build a static lib if we build a DLL.
7365	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7366	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7367	  # Don't use ranlib
7368	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
7369	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
7370            lt_tool_outputfile="@TOOL_OUTPUT@"~
7371            case $lt_outputfile in
7372              *.exe|*.EXE) ;;
7373              *)
7374                lt_outputfile=$lt_outputfile.exe
7375                lt_tool_outputfile=$lt_tool_outputfile.exe
7376                ;;
7377            esac~
7378            func_to_tool_file "$lt_outputfile"~
7379            if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
7380              $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
7381              $RM "$lt_outputfile.manifest";
7382            fi'
7383	  ;;
7384	*)
7385	  # g++
7386	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7387	  # as there is no search path for DLLs.
7388	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7389	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
7390	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7391	  _LT_TAGVAR(always_export_symbols, $1)=no
7392	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7393
7394	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
7395	    _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'
7396	    # If the export-symbols file already is a .def file, use it as
7397	    # is; otherwise, prepend EXPORTS...
7398	    _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
7399              cp $export_symbols $output_objdir/$soname.def;
7400            else
7401              echo EXPORTS > $output_objdir/$soname.def;
7402              cat $export_symbols >> $output_objdir/$soname.def;
7403            fi~
7404            $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'
7405	  else
7406	    _LT_TAGVAR(ld_shlibs, $1)=no
7407	  fi
7408	  ;;
7409	esac
7410	;;
7411      darwin* | rhapsody*)
7412        _LT_DARWIN_LINKER_FEATURES($1)
7413	;;
7414
7415      os2*)
7416	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7417	_LT_TAGVAR(hardcode_minus_L, $1)=yes
7418	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7419	shrext_cmds=.dll
7420	_LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
7421	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
7422	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
7423	  $ECHO EXPORTS >> $output_objdir/$libname.def~
7424	  emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
7425	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
7426	  emximp -o $lib $output_objdir/$libname.def'
7427	_LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
7428	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
7429	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
7430	  $ECHO EXPORTS >> $output_objdir/$libname.def~
7431	  prefix_cmds="$SED"~
7432	  if test EXPORTS = "`$SED 1q $export_symbols`"; then
7433	    prefix_cmds="$prefix_cmds -e 1d";
7434	  fi~
7435	  prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
7436	  cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
7437	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
7438	  emximp -o $lib $output_objdir/$libname.def'
7439	_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
7440	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7441	_LT_TAGVAR(file_list_spec, $1)='@'
7442	;;
7443
7444      dgux*)
7445        case $cc_basename in
7446          ec++*)
7447	    # FIXME: insert proper C++ library support
7448	    _LT_TAGVAR(ld_shlibs, $1)=no
7449	    ;;
7450          ghcx*)
7451	    # Green Hills C++ Compiler
7452	    # FIXME: insert proper C++ library support
7453	    _LT_TAGVAR(ld_shlibs, $1)=no
7454	    ;;
7455          *)
7456	    # FIXME: insert proper C++ library support
7457	    _LT_TAGVAR(ld_shlibs, $1)=no
7458	    ;;
7459        esac
7460        ;;
7461
7462      freebsd2.*)
7463        # C++ shared libraries reported to be fairly broken before
7464	# switch to ELF
7465        _LT_TAGVAR(ld_shlibs, $1)=no
7466        ;;
7467
7468      freebsd-elf*)
7469        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7470        ;;
7471
7472      freebsd* | dragonfly*)
7473        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
7474        # conventions
7475        _LT_TAGVAR(ld_shlibs, $1)=yes
7476        ;;
7477
7478      haiku*)
7479        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7480        _LT_TAGVAR(link_all_deplibs, $1)=yes
7481        ;;
7482
7483      hpux9*)
7484        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
7485        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7486        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
7487        _LT_TAGVAR(hardcode_direct, $1)=yes
7488        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7489				             # but as the default
7490				             # location of the library.
7491
7492        case $cc_basename in
7493          CC*)
7494            # FIXME: insert proper C++ library support
7495            _LT_TAGVAR(ld_shlibs, $1)=no
7496            ;;
7497          aCC*)
7498            _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'
7499            # Commands to make compiler produce verbose output that lists
7500            # what "hidden" libraries, object files and flags are used when
7501            # linking a shared library.
7502            #
7503            # There doesn't appear to be a way to prevent this compiler from
7504            # explicitly linking system object files so we need to strip them
7505            # from the output so that they don't get included in the library
7506            # dependencies.
7507            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"'
7508            ;;
7509          *)
7510            if test yes = "$GXX"; then
7511              _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'
7512            else
7513              # FIXME: insert proper C++ library support
7514              _LT_TAGVAR(ld_shlibs, $1)=no
7515            fi
7516            ;;
7517        esac
7518        ;;
7519
7520      hpux10*|hpux11*)
7521        if test no = "$with_gnu_ld"; then
7522	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
7523	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7524
7525          case $host_cpu in
7526            hppa*64*|ia64*)
7527              ;;
7528            *)
7529	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
7530              ;;
7531          esac
7532        fi
7533        case $host_cpu in
7534          hppa*64*|ia64*)
7535            _LT_TAGVAR(hardcode_direct, $1)=no
7536            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7537            ;;
7538          *)
7539            _LT_TAGVAR(hardcode_direct, $1)=yes
7540            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7541            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7542					         # but as the default
7543					         # location of the library.
7544            ;;
7545        esac
7546
7547        case $cc_basename in
7548          CC*)
7549	    # FIXME: insert proper C++ library support
7550	    _LT_TAGVAR(ld_shlibs, $1)=no
7551	    ;;
7552          aCC*)
7553	    case $host_cpu in
7554	      hppa*64*)
7555	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7556	        ;;
7557	      ia64*)
7558	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7559	        ;;
7560	      *)
7561	        _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'
7562	        ;;
7563	    esac
7564	    # Commands to make compiler produce verbose output that lists
7565	    # what "hidden" libraries, object files and flags are used when
7566	    # linking a shared library.
7567	    #
7568	    # There doesn't appear to be a way to prevent this compiler from
7569	    # explicitly linking system object files so we need to strip them
7570	    # from the output so that they don't get included in the library
7571	    # dependencies.
7572	    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"'
7573	    ;;
7574          *)
7575	    if test yes = "$GXX"; then
7576	      if test no = "$with_gnu_ld"; then
7577	        case $host_cpu in
7578	          hppa*64*)
7579	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7580	            ;;
7581	          ia64*)
7582	            _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'
7583	            ;;
7584	          *)
7585	            _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'
7586	            ;;
7587	        esac
7588	      fi
7589	    else
7590	      # FIXME: insert proper C++ library support
7591	      _LT_TAGVAR(ld_shlibs, $1)=no
7592	    fi
7593	    ;;
7594        esac
7595        ;;
7596
7597      interix[[3-9]]*)
7598	_LT_TAGVAR(hardcode_direct, $1)=no
7599	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7600	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7601	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
7602	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7603	# Instead, shared libraries are loaded at an image base (0x10000000 by
7604	# default) and relocated if they conflict, which is a slow very memory
7605	# consuming and fragmenting process.  To avoid this, we pick a random,
7606	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7607	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
7608	_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'
7609	_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'
7610	;;
7611      irix5* | irix6*)
7612        case $cc_basename in
7613          CC*)
7614	    # SGI C++
7615	    _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'
7616
7617	    # Archives containing C++ object files must be created using
7618	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
7619	    # necessary to make sure instantiated templates are included
7620	    # in the archive.
7621	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
7622	    ;;
7623          *)
7624	    if test yes = "$GXX"; then
7625	      if test no = "$with_gnu_ld"; then
7626	        _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'
7627	      else
7628	        _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'
7629	      fi
7630	    fi
7631	    _LT_TAGVAR(link_all_deplibs, $1)=yes
7632	    ;;
7633        esac
7634        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7635        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7636        _LT_TAGVAR(inherit_rpath, $1)=yes
7637        ;;
7638
7639      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
7640        case $cc_basename in
7641          KCC*)
7642	    # Kuck and Associates, Inc. (KAI) C++ Compiler
7643
7644	    # KCC will only create a shared library if the output file
7645	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
7646	    # to its proper name (with version) after linking.
7647	    _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'
7648	    _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'
7649	    # Commands to make compiler produce verbose output that lists
7650	    # what "hidden" libraries, object files and flags are used when
7651	    # linking a shared library.
7652	    #
7653	    # There doesn't appear to be a way to prevent this compiler from
7654	    # explicitly linking system object files so we need to strip them
7655	    # from the output so that they don't get included in the library
7656	    # dependencies.
7657	    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"'
7658
7659	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7660	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7661
7662	    # Archives containing C++ object files must be created using
7663	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
7664	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
7665	    ;;
7666	  icpc* | ecpc* )
7667	    # Intel C++
7668	    with_gnu_ld=yes
7669	    # version 8.0 and above of icpc choke on multiply defined symbols
7670	    # if we add $predep_objects and $postdep_objects, however 7.1 and
7671	    # earlier do not add the objects themselves.
7672	    case `$CC -V 2>&1` in
7673	      *"Version 7."*)
7674	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7675		_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'
7676		;;
7677	      *)  # Version 8.0 or newer
7678	        tmp_idyn=
7679	        case $host_cpu in
7680		  ia64*) tmp_idyn=' -i_dynamic';;
7681		esac
7682	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7683		_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'
7684		;;
7685	    esac
7686	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7687	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7688	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7689	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
7690	    ;;
7691          pgCC* | pgcpp*)
7692            # Portland Group C++ compiler
7693	    case `$CC -V` in
7694	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
7695	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7696               rm -rf $tpldir~
7697               $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7698               compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
7699	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7700                rm -rf $tpldir~
7701                $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7702                $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
7703                $RANLIB $oldlib'
7704	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7705                rm -rf $tpldir~
7706                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7707                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7708	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7709                rm -rf $tpldir~
7710                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7711                $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'
7712	      ;;
7713	    *) # Version 6 and above use weak symbols
7714	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7715	      _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'
7716	      ;;
7717	    esac
7718
7719	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
7720	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7721	    _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'
7722            ;;
7723	  cxx*)
7724	    # Compaq C++
7725	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7726	    _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'
7727
7728	    runpath_var=LD_RUN_PATH
7729	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7730	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7731
7732	    # Commands to make compiler produce verbose output that lists
7733	    # what "hidden" libraries, object files and flags are used when
7734	    # linking a shared library.
7735	    #
7736	    # There doesn't appear to be a way to prevent this compiler from
7737	    # explicitly linking system object files so we need to strip them
7738	    # from the output so that they don't get included in the library
7739	    # dependencies.
7740	    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'
7741	    ;;
7742	  xl* | mpixl* | bgxl*)
7743	    # IBM XL 8.0 on PPC, with GNU ld
7744	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7745	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7746	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7747	    if test yes = "$supports_anon_versioning"; then
7748	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7749                cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7750                echo "local: *; };" >> $output_objdir/$libname.ver~
7751                $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
7752	    fi
7753	    ;;
7754	  *)
7755	    case `$CC -V 2>&1 | sed 5q` in
7756	    *Sun\ C*)
7757	      # Sun C++ 5.9
7758	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7759	      _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7760	      _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'
7761	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7762	      _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'
7763	      _LT_TAGVAR(compiler_needs_object, $1)=yes
7764
7765	      # Not sure whether something based on
7766	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7767	      # would be better.
7768	      output_verbose_link_cmd='func_echo_all'
7769
7770	      # Archives containing C++ object files must be created using
7771	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7772	      # necessary to make sure instantiated templates are included
7773	      # in the archive.
7774	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7775	      ;;
7776	    esac
7777	    ;;
7778	esac
7779	;;
7780
7781      lynxos*)
7782        # FIXME: insert proper C++ library support
7783	_LT_TAGVAR(ld_shlibs, $1)=no
7784	;;
7785
7786      m88k*)
7787        # FIXME: insert proper C++ library support
7788        _LT_TAGVAR(ld_shlibs, $1)=no
7789	;;
7790
7791      mvs*)
7792        case $cc_basename in
7793          cxx*)
7794	    # FIXME: insert proper C++ library support
7795	    _LT_TAGVAR(ld_shlibs, $1)=no
7796	    ;;
7797	  *)
7798	    # FIXME: insert proper C++ library support
7799	    _LT_TAGVAR(ld_shlibs, $1)=no
7800	    ;;
7801	esac
7802	;;
7803
7804      netbsd*)
7805        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7806	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7807	  wlarc=
7808	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7809	  _LT_TAGVAR(hardcode_direct, $1)=yes
7810	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7811	fi
7812	# Workaround some broken pre-1.5 toolchains
7813	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7814	;;
7815
7816      *nto* | *qnx*)
7817        _LT_TAGVAR(ld_shlibs, $1)=yes
7818	;;
7819
7820      openbsd* | bitrig*)
7821	if test -f /usr/libexec/ld.so; then
7822	  _LT_TAGVAR(hardcode_direct, $1)=yes
7823	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7824	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7825	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7826	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7827	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
7828	    _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'
7829	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
7830	    _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
7831	  fi
7832	  output_verbose_link_cmd=func_echo_all
7833	else
7834	  _LT_TAGVAR(ld_shlibs, $1)=no
7835	fi
7836	;;
7837
7838      osf3* | osf4* | osf5*)
7839        case $cc_basename in
7840          KCC*)
7841	    # Kuck and Associates, Inc. (KAI) C++ Compiler
7842
7843	    # KCC will only create a shared library if the output file
7844	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
7845	    # to its proper name (with version) after linking.
7846	    _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'
7847
7848	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7849	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7850
7851	    # Archives containing C++ object files must be created using
7852	    # the KAI C++ compiler.
7853	    case $host in
7854	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7855	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7856	    esac
7857	    ;;
7858          RCC*)
7859	    # Rational C++ 2.4.1
7860	    # FIXME: insert proper C++ library support
7861	    _LT_TAGVAR(ld_shlibs, $1)=no
7862	    ;;
7863          cxx*)
7864	    case $host in
7865	      osf3*)
7866	        _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7867	        _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'
7868	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7869		;;
7870	      *)
7871	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7872	        _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'
7873	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7874                  echo "-hidden">> $lib.exp~
7875                  $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~
7876                  $RM $lib.exp'
7877	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7878		;;
7879	    esac
7880
7881	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7882
7883	    # Commands to make compiler produce verbose output that lists
7884	    # what "hidden" libraries, object files and flags are used when
7885	    # linking a shared library.
7886	    #
7887	    # There doesn't appear to be a way to prevent this compiler from
7888	    # explicitly linking system object files so we need to strip them
7889	    # from the output so that they don't get included in the library
7890	    # dependencies.
7891	    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"'
7892	    ;;
7893	  *)
7894	    if test yes,no = "$GXX,$with_gnu_ld"; then
7895	      _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7896	      case $host in
7897	        osf3*)
7898	          _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'
7899		  ;;
7900	        *)
7901	          _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'
7902		  ;;
7903	      esac
7904
7905	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7906	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7907
7908	      # Commands to make compiler produce verbose output that lists
7909	      # what "hidden" libraries, object files and flags are used when
7910	      # linking a shared library.
7911	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7912
7913	    else
7914	      # FIXME: insert proper C++ library support
7915	      _LT_TAGVAR(ld_shlibs, $1)=no
7916	    fi
7917	    ;;
7918        esac
7919        ;;
7920
7921      psos*)
7922        # FIXME: insert proper C++ library support
7923        _LT_TAGVAR(ld_shlibs, $1)=no
7924        ;;
7925
7926      sunos4*)
7927        case $cc_basename in
7928          CC*)
7929	    # Sun C++ 4.x
7930	    # FIXME: insert proper C++ library support
7931	    _LT_TAGVAR(ld_shlibs, $1)=no
7932	    ;;
7933          lcc*)
7934	    # Lucid
7935	    # FIXME: insert proper C++ library support
7936	    _LT_TAGVAR(ld_shlibs, $1)=no
7937	    ;;
7938          *)
7939	    # FIXME: insert proper C++ library support
7940	    _LT_TAGVAR(ld_shlibs, $1)=no
7941	    ;;
7942        esac
7943        ;;
7944
7945      solaris*)
7946        case $cc_basename in
7947          CC* | sunCC*)
7948	    # Sun C++ 4.2, 5.x and Centerline C++
7949            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7950	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7951	    _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7952	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7953              $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'
7954
7955	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7956	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7957	    case $host_os in
7958	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7959	      *)
7960		# The compiler driver will combine and reorder linker options,
7961		# but understands '-z linker_flag'.
7962	        # Supported since Solaris 2.6 (maybe 2.5.1?)
7963		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7964	        ;;
7965	    esac
7966	    _LT_TAGVAR(link_all_deplibs, $1)=yes
7967
7968	    output_verbose_link_cmd='func_echo_all'
7969
7970	    # Archives containing C++ object files must be created using
7971	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7972	    # necessary to make sure instantiated templates are included
7973	    # in the archive.
7974	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7975	    ;;
7976          gcx*)
7977	    # Green Hills C++ Compiler
7978	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7979
7980	    # The C++ compiler must be used to create the archive.
7981	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7982	    ;;
7983          *)
7984	    # GNU C++ compiler with Solaris linker
7985	    if test yes,no = "$GXX,$with_gnu_ld"; then
7986	      _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
7987	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7988	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7989	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7990                  $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'
7991
7992	        # Commands to make compiler produce verbose output that lists
7993	        # what "hidden" libraries, object files and flags are used when
7994	        # linking a shared library.
7995	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7996	      else
7997	        # g++ 2.7 appears to require '-G' NOT '-shared' on this
7998	        # platform.
7999	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
8000	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8001                  $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'
8002
8003	        # Commands to make compiler produce verbose output that lists
8004	        # what "hidden" libraries, object files and flags are used when
8005	        # linking a shared library.
8006	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8007	      fi
8008
8009	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
8010	      case $host_os in
8011		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
8012		*)
8013		  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
8014		  ;;
8015	      esac
8016	    fi
8017	    ;;
8018        esac
8019        ;;
8020
8021    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
8022      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
8023      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8024      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8025      runpath_var='LD_RUN_PATH'
8026
8027      case $cc_basename in
8028        CC*)
8029	  _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8030	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8031	  ;;
8032	*)
8033	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8034	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8035	  ;;
8036      esac
8037      ;;
8038
8039      sysv5* | sco3.2v5* | sco5v6*)
8040	# Note: We CANNOT use -z defs as we might desire, because we do not
8041	# link with -lc, and that would cause any symbols used from libc to
8042	# always be unresolved, which means just about no library would
8043	# ever link correctly.  If we're not using GNU ld we use -z text
8044	# though, which does catch some bad symbols but isn't as heavy-handed
8045	# as -z defs.
8046	_LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
8047	_LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
8048	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8049	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8050	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
8051	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
8052	_LT_TAGVAR(link_all_deplibs, $1)=yes
8053	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
8054	runpath_var='LD_RUN_PATH'
8055
8056	case $cc_basename in
8057          CC*)
8058	    _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8059	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8060	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
8061              '"$_LT_TAGVAR(old_archive_cmds, $1)"
8062	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
8063              '"$_LT_TAGVAR(reload_cmds, $1)"
8064	    ;;
8065	  *)
8066	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8067	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8068	    ;;
8069	esac
8070      ;;
8071
8072      tandem*)
8073        case $cc_basename in
8074          NCC*)
8075	    # NonStop-UX NCC 3.20
8076	    # FIXME: insert proper C++ library support
8077	    _LT_TAGVAR(ld_shlibs, $1)=no
8078	    ;;
8079          *)
8080	    # FIXME: insert proper C++ library support
8081	    _LT_TAGVAR(ld_shlibs, $1)=no
8082	    ;;
8083        esac
8084        ;;
8085
8086      vxworks*)
8087        # FIXME: insert proper C++ library support
8088        _LT_TAGVAR(ld_shlibs, $1)=no
8089        ;;
8090
8091      *)
8092        # FIXME: insert proper C++ library support
8093        _LT_TAGVAR(ld_shlibs, $1)=no
8094        ;;
8095    esac
8096
8097    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
8098    test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
8099
8100    _LT_TAGVAR(GCC, $1)=$GXX
8101    _LT_TAGVAR(LD, $1)=$LD
8102
8103    ## CAVEAT EMPTOR:
8104    ## There is no encapsulation within the following macros, do not change
8105    ## the running order or otherwise move them around unless you know exactly
8106    ## what you are doing...
8107    _LT_SYS_HIDDEN_LIBDEPS($1)
8108    _LT_COMPILER_PIC($1)
8109    _LT_COMPILER_C_O($1)
8110    _LT_COMPILER_FILE_LOCKS($1)
8111    _LT_LINKER_SHLIBS($1)
8112    _LT_SYS_DYNAMIC_LINKER($1)
8113    _LT_LINKER_HARDCODE_LIBPATH($1)
8114
8115    _LT_CONFIG($1)
8116  fi # test -n "$compiler"
8117
8118  CC=$lt_save_CC
8119  CFLAGS=$lt_save_CFLAGS
8120  LDCXX=$LD
8121  LD=$lt_save_LD
8122  GCC=$lt_save_GCC
8123  with_gnu_ld=$lt_save_with_gnu_ld
8124  lt_cv_path_LDCXX=$lt_cv_path_LD
8125  lt_cv_path_LD=$lt_save_path_LD
8126  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
8127  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
8128fi # test yes != "$_lt_caught_CXX_error"
8129
8130AC_LANG_POP
8131])# _LT_LANG_CXX_CONFIG
8132
8133
8134# _LT_FUNC_STRIPNAME_CNF
8135# ----------------------
8136# func_stripname_cnf prefix suffix name
8137# strip PREFIX and SUFFIX off of NAME.
8138# PREFIX and SUFFIX must not contain globbing or regex special
8139# characters, hashes, percent signs, but SUFFIX may contain a leading
8140# dot (in which case that matches only a dot).
8141#
8142# This function is identical to the (non-XSI) version of func_stripname,
8143# except this one can be used by m4 code that may be executed by configure,
8144# rather than the libtool script.
8145m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
8146AC_REQUIRE([_LT_DECL_SED])
8147AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
8148func_stripname_cnf ()
8149{
8150  case @S|@2 in
8151  .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
8152  *)  func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
8153  esac
8154} # func_stripname_cnf
8155])# _LT_FUNC_STRIPNAME_CNF
8156
8157
8158# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
8159# ---------------------------------
8160# Figure out "hidden" library dependencies from verbose
8161# compiler output when linking a shared library.
8162# Parse the compiler output and extract the necessary
8163# objects, libraries and library flags.
8164m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
8165[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
8166AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
8167# Dependencies to place before and after the object being linked:
8168_LT_TAGVAR(predep_objects, $1)=
8169_LT_TAGVAR(postdep_objects, $1)=
8170_LT_TAGVAR(predeps, $1)=
8171_LT_TAGVAR(postdeps, $1)=
8172_LT_TAGVAR(compiler_lib_search_path, $1)=
8173
8174dnl we can't use the lt_simple_compile_test_code here,
8175dnl because it contains code intended for an executable,
8176dnl not a library.  It's possible we should let each
8177dnl tag define a new lt_????_link_test_code variable,
8178dnl but it's only used here...
8179m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
8180int a;
8181void foo (void) { a = 0; }
8182_LT_EOF
8183], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
8184class Foo
8185{
8186public:
8187  Foo (void) { a = 0; }
8188private:
8189  int a;
8190};
8191_LT_EOF
8192], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
8193      subroutine foo
8194      implicit none
8195      integer*4 a
8196      a=0
8197      return
8198      end
8199_LT_EOF
8200], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
8201      subroutine foo
8202      implicit none
8203      integer a
8204      a=0
8205      return
8206      end
8207_LT_EOF
8208], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
8209public class foo {
8210  private int a;
8211  public void bar (void) {
8212    a = 0;
8213  }
8214};
8215_LT_EOF
8216], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
8217package foo
8218func foo() {
8219}
8220_LT_EOF
8221])
8222
8223_lt_libdeps_save_CFLAGS=$CFLAGS
8224case "$CC $CFLAGS " in #(
8225*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
8226*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
8227*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
8228esac
8229
8230dnl Parse the compiler output and extract the necessary
8231dnl objects, libraries and library flags.
8232if AC_TRY_EVAL(ac_compile); then
8233  # Parse the compiler output and extract the necessary
8234  # objects, libraries and library flags.
8235
8236  # Sentinel used to keep track of whether or not we are before
8237  # the conftest object file.
8238  pre_test_object_deps_done=no
8239
8240  for p in `eval "$output_verbose_link_cmd"`; do
8241    case $prev$p in
8242
8243    -L* | -R* | -l*)
8244       # Some compilers place space between "-{L,R}" and the path.
8245       # Remove the space.
8246       if test x-L = "$p" ||
8247          test x-R = "$p"; then
8248	 prev=$p
8249	 continue
8250       fi
8251
8252       # Expand the sysroot to ease extracting the directories later.
8253       if test -z "$prev"; then
8254         case $p in
8255         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
8256         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
8257         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
8258         esac
8259       fi
8260       case $p in
8261       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
8262       esac
8263       if test no = "$pre_test_object_deps_done"; then
8264	 case $prev in
8265	 -L | -R)
8266	   # Internal compiler library paths should come after those
8267	   # provided the user.  The postdeps already come after the
8268	   # user supplied libs so there is no need to process them.
8269	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
8270	     _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
8271	   else
8272	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
8273	   fi
8274	   ;;
8275	 # The "-l" case would never come before the object being
8276	 # linked, so don't bother handling this case.
8277	 esac
8278       else
8279	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
8280	   _LT_TAGVAR(postdeps, $1)=$prev$p
8281	 else
8282	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
8283	 fi
8284       fi
8285       prev=
8286       ;;
8287
8288    *.lto.$objext) ;; # Ignore GCC LTO objects
8289    *.$objext)
8290       # This assumes that the test object file only shows up
8291       # once in the compiler output.
8292       if test "$p" = "conftest.$objext"; then
8293	 pre_test_object_deps_done=yes
8294	 continue
8295       fi
8296
8297       if test no = "$pre_test_object_deps_done"; then
8298	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
8299	   _LT_TAGVAR(predep_objects, $1)=$p
8300	 else
8301	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
8302	 fi
8303       else
8304	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
8305	   _LT_TAGVAR(postdep_objects, $1)=$p
8306	 else
8307	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
8308	 fi
8309       fi
8310       ;;
8311
8312    *) ;; # Ignore the rest.
8313
8314    esac
8315  done
8316
8317  # Clean up.
8318  rm -f a.out a.exe
8319else
8320  echo "libtool.m4: error: problem compiling $1 test program"
8321fi
8322
8323$RM -f confest.$objext
8324CFLAGS=$_lt_libdeps_save_CFLAGS
8325
8326# PORTME: override above test on systems where it is broken
8327m4_if([$1], [CXX],
8328[case $host_os in
8329interix[[3-9]]*)
8330  # Interix 3.5 installs completely hosed .la files for C++, so rather than
8331  # hack all around it, let's just trust "g++" to DTRT.
8332  _LT_TAGVAR(predep_objects,$1)=
8333  _LT_TAGVAR(postdep_objects,$1)=
8334  _LT_TAGVAR(postdeps,$1)=
8335  ;;
8336esac
8337])
8338
8339case " $_LT_TAGVAR(postdeps, $1) " in
8340*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
8341esac
8342 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
8343if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
8344 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
8345fi
8346_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
8347    [The directories searched by this compiler when creating a shared library])
8348_LT_TAGDECL([], [predep_objects], [1],
8349    [Dependencies to place before and after the objects being linked to
8350    create a shared library])
8351_LT_TAGDECL([], [postdep_objects], [1])
8352_LT_TAGDECL([], [predeps], [1])
8353_LT_TAGDECL([], [postdeps], [1])
8354_LT_TAGDECL([], [compiler_lib_search_path], [1],
8355    [The library search path used internally by the compiler when linking
8356    a shared library])
8357])# _LT_SYS_HIDDEN_LIBDEPS
8358
8359
8360# _LT_LANG_F77_CONFIG([TAG])
8361# --------------------------
8362# Ensure that the configuration variables for a Fortran 77 compiler are
8363# suitably defined.  These variables are subsequently used by _LT_CONFIG
8364# to write the compiler configuration to 'libtool'.
8365m4_defun([_LT_LANG_F77_CONFIG],
8366[AC_LANG_PUSH(Fortran 77)
8367if test -z "$F77" || test no = "$F77"; then
8368  _lt_disable_F77=yes
8369fi
8370
8371_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8372_LT_TAGVAR(allow_undefined_flag, $1)=
8373_LT_TAGVAR(always_export_symbols, $1)=no
8374_LT_TAGVAR(archive_expsym_cmds, $1)=
8375_LT_TAGVAR(export_dynamic_flag_spec, $1)=
8376_LT_TAGVAR(hardcode_direct, $1)=no
8377_LT_TAGVAR(hardcode_direct_absolute, $1)=no
8378_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8379_LT_TAGVAR(hardcode_libdir_separator, $1)=
8380_LT_TAGVAR(hardcode_minus_L, $1)=no
8381_LT_TAGVAR(hardcode_automatic, $1)=no
8382_LT_TAGVAR(inherit_rpath, $1)=no
8383_LT_TAGVAR(module_cmds, $1)=
8384_LT_TAGVAR(module_expsym_cmds, $1)=
8385_LT_TAGVAR(link_all_deplibs, $1)=unknown
8386_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8387_LT_TAGVAR(reload_flag, $1)=$reload_flag
8388_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8389_LT_TAGVAR(no_undefined_flag, $1)=
8390_LT_TAGVAR(whole_archive_flag_spec, $1)=
8391_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8392
8393# Source file extension for f77 test sources.
8394ac_ext=f
8395
8396# Object file extension for compiled f77 test sources.
8397objext=o
8398_LT_TAGVAR(objext, $1)=$objext
8399
8400# No sense in running all these tests if we already determined that
8401# the F77 compiler isn't working.  Some variables (like enable_shared)
8402# are currently assumed to apply to all compilers on this platform,
8403# and will be corrupted by setting them based on a non-working compiler.
8404if test yes != "$_lt_disable_F77"; then
8405  # Code to be used in simple compile tests
8406  lt_simple_compile_test_code="\
8407      subroutine t
8408      return
8409      end
8410"
8411
8412  # Code to be used in simple link tests
8413  lt_simple_link_test_code="\
8414      program t
8415      end
8416"
8417
8418  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8419  _LT_TAG_COMPILER
8420
8421  # save warnings/boilerplate of simple test code
8422  _LT_COMPILER_BOILERPLATE
8423  _LT_LINKER_BOILERPLATE
8424
8425  # Allow CC to be a program name with arguments.
8426  lt_save_CC=$CC
8427  lt_save_GCC=$GCC
8428  lt_save_CFLAGS=$CFLAGS
8429  CC=${F77-"f77"}
8430  CFLAGS=$FFLAGS
8431  compiler=$CC
8432  _LT_TAGVAR(compiler, $1)=$CC
8433  _LT_CC_BASENAME([$compiler])
8434  GCC=$G77
8435  if test -n "$compiler"; then
8436    AC_MSG_CHECKING([if libtool supports shared libraries])
8437    AC_MSG_RESULT([$can_build_shared])
8438
8439    AC_MSG_CHECKING([whether to build shared libraries])
8440    test no = "$can_build_shared" && enable_shared=no
8441
8442    # On AIX, shared libraries and static libraries use the same namespace, and
8443    # are all built from PIC.
8444    case $host_os in
8445      aix3*)
8446        test yes = "$enable_shared" && enable_static=no
8447        if test -n "$RANLIB"; then
8448          archive_cmds="$archive_cmds~\$RANLIB \$lib"
8449          postinstall_cmds='$RANLIB $lib'
8450        fi
8451        ;;
8452      aix[[4-9]]*)
8453	if test ia64 != "$host_cpu"; then
8454	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
8455	  yes,aix,yes) ;;		# shared object as lib.so file only
8456	  yes,svr4,*) ;;		# shared object as lib.so archive member only
8457	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
8458	  esac
8459	fi
8460        ;;
8461    esac
8462    AC_MSG_RESULT([$enable_shared])
8463
8464    AC_MSG_CHECKING([whether to build static libraries])
8465    # Make sure either enable_shared or enable_static is yes.
8466    test yes = "$enable_shared" || enable_static=yes
8467    AC_MSG_RESULT([$enable_static])
8468
8469    _LT_TAGVAR(GCC, $1)=$G77
8470    _LT_TAGVAR(LD, $1)=$LD
8471
8472    ## CAVEAT EMPTOR:
8473    ## There is no encapsulation within the following macros, do not change
8474    ## the running order or otherwise move them around unless you know exactly
8475    ## what you are doing...
8476    _LT_COMPILER_PIC($1)
8477    _LT_COMPILER_C_O($1)
8478    _LT_COMPILER_FILE_LOCKS($1)
8479    _LT_LINKER_SHLIBS($1)
8480    _LT_SYS_DYNAMIC_LINKER($1)
8481    _LT_LINKER_HARDCODE_LIBPATH($1)
8482
8483    _LT_CONFIG($1)
8484  fi # test -n "$compiler"
8485
8486  GCC=$lt_save_GCC
8487  CC=$lt_save_CC
8488  CFLAGS=$lt_save_CFLAGS
8489fi # test yes != "$_lt_disable_F77"
8490
8491AC_LANG_POP
8492])# _LT_LANG_F77_CONFIG
8493
8494
8495# _LT_LANG_FC_CONFIG([TAG])
8496# -------------------------
8497# Ensure that the configuration variables for a Fortran compiler are
8498# suitably defined.  These variables are subsequently used by _LT_CONFIG
8499# to write the compiler configuration to 'libtool'.
8500m4_defun([_LT_LANG_FC_CONFIG],
8501[AC_LANG_PUSH(Fortran)
8502
8503if test -z "$FC" || test no = "$FC"; then
8504  _lt_disable_FC=yes
8505fi
8506
8507_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8508_LT_TAGVAR(allow_undefined_flag, $1)=
8509_LT_TAGVAR(always_export_symbols, $1)=no
8510_LT_TAGVAR(archive_expsym_cmds, $1)=
8511_LT_TAGVAR(export_dynamic_flag_spec, $1)=
8512_LT_TAGVAR(hardcode_direct, $1)=no
8513_LT_TAGVAR(hardcode_direct_absolute, $1)=no
8514_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8515_LT_TAGVAR(hardcode_libdir_separator, $1)=
8516_LT_TAGVAR(hardcode_minus_L, $1)=no
8517_LT_TAGVAR(hardcode_automatic, $1)=no
8518_LT_TAGVAR(inherit_rpath, $1)=no
8519_LT_TAGVAR(module_cmds, $1)=
8520_LT_TAGVAR(module_expsym_cmds, $1)=
8521_LT_TAGVAR(link_all_deplibs, $1)=unknown
8522_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8523_LT_TAGVAR(reload_flag, $1)=$reload_flag
8524_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8525_LT_TAGVAR(no_undefined_flag, $1)=
8526_LT_TAGVAR(whole_archive_flag_spec, $1)=
8527_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8528
8529# Source file extension for fc test sources.
8530ac_ext=${ac_fc_srcext-f}
8531
8532# Object file extension for compiled fc test sources.
8533objext=o
8534_LT_TAGVAR(objext, $1)=$objext
8535
8536# No sense in running all these tests if we already determined that
8537# the FC compiler isn't working.  Some variables (like enable_shared)
8538# are currently assumed to apply to all compilers on this platform,
8539# and will be corrupted by setting them based on a non-working compiler.
8540if test yes != "$_lt_disable_FC"; then
8541  # Code to be used in simple compile tests
8542  lt_simple_compile_test_code="\
8543      subroutine t
8544      return
8545      end
8546"
8547
8548  # Code to be used in simple link tests
8549  lt_simple_link_test_code="\
8550      program t
8551      end
8552"
8553
8554  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8555  _LT_TAG_COMPILER
8556
8557  # save warnings/boilerplate of simple test code
8558  _LT_COMPILER_BOILERPLATE
8559  _LT_LINKER_BOILERPLATE
8560
8561  # Allow CC to be a program name with arguments.
8562  lt_save_CC=$CC
8563  lt_save_GCC=$GCC
8564  lt_save_CFLAGS=$CFLAGS
8565  CC=${FC-"f95"}
8566  CFLAGS=$FCFLAGS
8567  compiler=$CC
8568  GCC=$ac_cv_fc_compiler_gnu
8569
8570  _LT_TAGVAR(compiler, $1)=$CC
8571  _LT_CC_BASENAME([$compiler])
8572
8573  if test -n "$compiler"; then
8574    AC_MSG_CHECKING([if libtool supports shared libraries])
8575    AC_MSG_RESULT([$can_build_shared])
8576
8577    AC_MSG_CHECKING([whether to build shared libraries])
8578    test no = "$can_build_shared" && enable_shared=no
8579
8580    # On AIX, shared libraries and static libraries use the same namespace, and
8581    # are all built from PIC.
8582    case $host_os in
8583      aix3*)
8584        test yes = "$enable_shared" && enable_static=no
8585        if test -n "$RANLIB"; then
8586          archive_cmds="$archive_cmds~\$RANLIB \$lib"
8587          postinstall_cmds='$RANLIB $lib'
8588        fi
8589        ;;
8590      aix[[4-9]]*)
8591	if test ia64 != "$host_cpu"; then
8592	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
8593	  yes,aix,yes) ;;		# shared object as lib.so file only
8594	  yes,svr4,*) ;;		# shared object as lib.so archive member only
8595	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
8596	  esac
8597	fi
8598        ;;
8599    esac
8600    AC_MSG_RESULT([$enable_shared])
8601
8602    AC_MSG_CHECKING([whether to build static libraries])
8603    # Make sure either enable_shared or enable_static is yes.
8604    test yes = "$enable_shared" || enable_static=yes
8605    AC_MSG_RESULT([$enable_static])
8606
8607    _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
8608    _LT_TAGVAR(LD, $1)=$LD
8609
8610    ## CAVEAT EMPTOR:
8611    ## There is no encapsulation within the following macros, do not change
8612    ## the running order or otherwise move them around unless you know exactly
8613    ## what you are doing...
8614    _LT_SYS_HIDDEN_LIBDEPS($1)
8615    _LT_COMPILER_PIC($1)
8616    _LT_COMPILER_C_O($1)
8617    _LT_COMPILER_FILE_LOCKS($1)
8618    _LT_LINKER_SHLIBS($1)
8619    _LT_SYS_DYNAMIC_LINKER($1)
8620    _LT_LINKER_HARDCODE_LIBPATH($1)
8621
8622    _LT_CONFIG($1)
8623  fi # test -n "$compiler"
8624
8625  GCC=$lt_save_GCC
8626  CC=$lt_save_CC
8627  CFLAGS=$lt_save_CFLAGS
8628fi # test yes != "$_lt_disable_FC"
8629
8630AC_LANG_POP
8631])# _LT_LANG_FC_CONFIG
8632
8633
8634# _LT_LANG_GCJ_CONFIG([TAG])
8635# --------------------------
8636# Ensure that the configuration variables for the GNU Java Compiler compiler
8637# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8638# to write the compiler configuration to 'libtool'.
8639m4_defun([_LT_LANG_GCJ_CONFIG],
8640[AC_REQUIRE([LT_PROG_GCJ])dnl
8641AC_LANG_SAVE
8642
8643# Source file extension for Java test sources.
8644ac_ext=java
8645
8646# Object file extension for compiled Java test sources.
8647objext=o
8648_LT_TAGVAR(objext, $1)=$objext
8649
8650# Code to be used in simple compile tests
8651lt_simple_compile_test_code="class foo {}"
8652
8653# Code to be used in simple link tests
8654lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
8655
8656# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8657_LT_TAG_COMPILER
8658
8659# save warnings/boilerplate of simple test code
8660_LT_COMPILER_BOILERPLATE
8661_LT_LINKER_BOILERPLATE
8662
8663# Allow CC to be a program name with arguments.
8664lt_save_CC=$CC
8665lt_save_CFLAGS=$CFLAGS
8666lt_save_GCC=$GCC
8667GCC=yes
8668CC=${GCJ-"gcj"}
8669CFLAGS=$GCJFLAGS
8670compiler=$CC
8671_LT_TAGVAR(compiler, $1)=$CC
8672_LT_TAGVAR(LD, $1)=$LD
8673_LT_CC_BASENAME([$compiler])
8674
8675# GCJ did not exist at the time GCC didn't implicitly link libc in.
8676_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8677
8678_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8679_LT_TAGVAR(reload_flag, $1)=$reload_flag
8680_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8681
8682if test -n "$compiler"; then
8683  _LT_COMPILER_NO_RTTI($1)
8684  _LT_COMPILER_PIC($1)
8685  _LT_COMPILER_C_O($1)
8686  _LT_COMPILER_FILE_LOCKS($1)
8687  _LT_LINKER_SHLIBS($1)
8688  _LT_LINKER_HARDCODE_LIBPATH($1)
8689
8690  _LT_CONFIG($1)
8691fi
8692
8693AC_LANG_RESTORE
8694
8695GCC=$lt_save_GCC
8696CC=$lt_save_CC
8697CFLAGS=$lt_save_CFLAGS
8698])# _LT_LANG_GCJ_CONFIG
8699
8700
8701# _LT_LANG_GO_CONFIG([TAG])
8702# --------------------------
8703# Ensure that the configuration variables for the GNU Go compiler
8704# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8705# to write the compiler configuration to 'libtool'.
8706m4_defun([_LT_LANG_GO_CONFIG],
8707[AC_REQUIRE([LT_PROG_GO])dnl
8708AC_LANG_SAVE
8709
8710# Source file extension for Go test sources.
8711ac_ext=go
8712
8713# Object file extension for compiled Go test sources.
8714objext=o
8715_LT_TAGVAR(objext, $1)=$objext
8716
8717# Code to be used in simple compile tests
8718lt_simple_compile_test_code="package main; func main() { }"
8719
8720# Code to be used in simple link tests
8721lt_simple_link_test_code='package main; func main() { }'
8722
8723# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8724_LT_TAG_COMPILER
8725
8726# save warnings/boilerplate of simple test code
8727_LT_COMPILER_BOILERPLATE
8728_LT_LINKER_BOILERPLATE
8729
8730# Allow CC to be a program name with arguments.
8731lt_save_CC=$CC
8732lt_save_CFLAGS=$CFLAGS
8733lt_save_GCC=$GCC
8734GCC=yes
8735CC=${GOC-"gccgo"}
8736CFLAGS=$GOFLAGS
8737compiler=$CC
8738_LT_TAGVAR(compiler, $1)=$CC
8739_LT_TAGVAR(LD, $1)=$LD
8740_LT_CC_BASENAME([$compiler])
8741
8742# Go did not exist at the time GCC didn't implicitly link libc in.
8743_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8744
8745_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8746_LT_TAGVAR(reload_flag, $1)=$reload_flag
8747_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8748
8749if test -n "$compiler"; then
8750  _LT_COMPILER_NO_RTTI($1)
8751  _LT_COMPILER_PIC($1)
8752  _LT_COMPILER_C_O($1)
8753  _LT_COMPILER_FILE_LOCKS($1)
8754  _LT_LINKER_SHLIBS($1)
8755  _LT_LINKER_HARDCODE_LIBPATH($1)
8756
8757  _LT_CONFIG($1)
8758fi
8759
8760AC_LANG_RESTORE
8761
8762GCC=$lt_save_GCC
8763CC=$lt_save_CC
8764CFLAGS=$lt_save_CFLAGS
8765])# _LT_LANG_GO_CONFIG
8766
8767
8768# _LT_LANG_RC_CONFIG([TAG])
8769# -------------------------
8770# Ensure that the configuration variables for the Windows resource compiler
8771# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8772# to write the compiler configuration to 'libtool'.
8773m4_defun([_LT_LANG_RC_CONFIG],
8774[AC_REQUIRE([LT_PROG_RC])dnl
8775AC_LANG_SAVE
8776
8777# Source file extension for RC test sources.
8778ac_ext=rc
8779
8780# Object file extension for compiled RC test sources.
8781objext=o
8782_LT_TAGVAR(objext, $1)=$objext
8783
8784# Code to be used in simple compile tests
8785lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8786
8787# Code to be used in simple link tests
8788lt_simple_link_test_code=$lt_simple_compile_test_code
8789
8790# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8791_LT_TAG_COMPILER
8792
8793# save warnings/boilerplate of simple test code
8794_LT_COMPILER_BOILERPLATE
8795_LT_LINKER_BOILERPLATE
8796
8797# Allow CC to be a program name with arguments.
8798lt_save_CC=$CC
8799lt_save_CFLAGS=$CFLAGS
8800lt_save_GCC=$GCC
8801GCC=
8802CC=${RC-"windres"}
8803CFLAGS=
8804compiler=$CC
8805_LT_TAGVAR(compiler, $1)=$CC
8806_LT_CC_BASENAME([$compiler])
8807_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8808
8809if test -n "$compiler"; then
8810  :
8811  _LT_CONFIG($1)
8812fi
8813
8814GCC=$lt_save_GCC
8815AC_LANG_RESTORE
8816CC=$lt_save_CC
8817CFLAGS=$lt_save_CFLAGS
8818])# _LT_LANG_RC_CONFIG
8819
8820
8821# LT_PROG_GCJ
8822# -----------
8823AC_DEFUN([LT_PROG_GCJ],
8824[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8825  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8826    [AC_CHECK_TOOL(GCJ, gcj,)
8827      test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
8828      AC_SUBST(GCJFLAGS)])])[]dnl
8829])
8830
8831# Old name:
8832AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8833dnl aclocal-1.4 backwards compatibility:
8834dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8835
8836
8837# LT_PROG_GO
8838# ----------
8839AC_DEFUN([LT_PROG_GO],
8840[AC_CHECK_TOOL(GOC, gccgo,)
8841])
8842
8843
8844# LT_PROG_RC
8845# ----------
8846AC_DEFUN([LT_PROG_RC],
8847[AC_CHECK_TOOL(RC, windres,)
8848])
8849
8850# Old name:
8851AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8852dnl aclocal-1.4 backwards compatibility:
8853dnl AC_DEFUN([LT_AC_PROG_RC], [])
8854
8855
8856# _LT_DECL_EGREP
8857# --------------
8858# If we don't have a new enough Autoconf to choose the best grep
8859# available, choose the one first in the user's PATH.
8860m4_defun([_LT_DECL_EGREP],
8861[AC_REQUIRE([AC_PROG_EGREP])dnl
8862AC_REQUIRE([AC_PROG_FGREP])dnl
8863test -z "$GREP" && GREP=grep
8864_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8865_LT_DECL([], [EGREP], [1], [An ERE matcher])
8866_LT_DECL([], [FGREP], [1], [A literal string matcher])
8867dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8868AC_SUBST([GREP])
8869])
8870
8871
8872# _LT_DECL_OBJDUMP
8873# --------------
8874# If we don't have a new enough Autoconf to choose the best objdump
8875# available, choose the one first in the user's PATH.
8876m4_defun([_LT_DECL_OBJDUMP],
8877[AC_CHECK_TOOL(OBJDUMP, objdump, false)
8878test -z "$OBJDUMP" && OBJDUMP=objdump
8879_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8880AC_SUBST([OBJDUMP])
8881])
8882
8883# _LT_DECL_DLLTOOL
8884# ----------------
8885# Ensure DLLTOOL variable is set.
8886m4_defun([_LT_DECL_DLLTOOL],
8887[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8888test -z "$DLLTOOL" && DLLTOOL=dlltool
8889_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
8890AC_SUBST([DLLTOOL])
8891])
8892
8893# _LT_DECL_SED
8894# ------------
8895# Check for a fully-functional sed program, that truncates
8896# as few characters as possible.  Prefer GNU sed if found.
8897m4_defun([_LT_DECL_SED],
8898[AC_PROG_SED
8899test -z "$SED" && SED=sed
8900Xsed="$SED -e 1s/^X//"
8901_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8902_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8903    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8904])# _LT_DECL_SED
8905
8906m4_ifndef([AC_PROG_SED], [
8907# NOTE: This macro has been submitted for inclusion into   #
8908#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
8909#  a released version of Autoconf we should remove this    #
8910#  macro and use it instead.                               #
8911
8912m4_defun([AC_PROG_SED],
8913[AC_MSG_CHECKING([for a sed that does not truncate output])
8914AC_CACHE_VAL(lt_cv_path_SED,
8915[# Loop through the user's path and test for sed and gsed.
8916# Then use that list of sed's as ones to test for truncation.
8917as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8918for as_dir in $PATH
8919do
8920  IFS=$as_save_IFS
8921  test -z "$as_dir" && as_dir=.
8922  for lt_ac_prog in sed gsed; do
8923    for ac_exec_ext in '' $ac_executable_extensions; do
8924      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8925        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8926      fi
8927    done
8928  done
8929done
8930IFS=$as_save_IFS
8931lt_ac_max=0
8932lt_ac_count=0
8933# Add /usr/xpg4/bin/sed as it is typically found on Solaris
8934# along with /bin/sed that truncates output.
8935for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8936  test ! -f "$lt_ac_sed" && continue
8937  cat /dev/null > conftest.in
8938  lt_ac_count=0
8939  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8940  # Check for GNU sed and select it if it is found.
8941  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8942    lt_cv_path_SED=$lt_ac_sed
8943    break
8944  fi
8945  while true; do
8946    cat conftest.in conftest.in >conftest.tmp
8947    mv conftest.tmp conftest.in
8948    cp conftest.in conftest.nl
8949    echo >>conftest.nl
8950    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8951    cmp -s conftest.out conftest.nl || break
8952    # 10000 chars as input seems more than enough
8953    test 10 -lt "$lt_ac_count" && break
8954    lt_ac_count=`expr $lt_ac_count + 1`
8955    if test "$lt_ac_count" -gt "$lt_ac_max"; then
8956      lt_ac_max=$lt_ac_count
8957      lt_cv_path_SED=$lt_ac_sed
8958    fi
8959  done
8960done
8961])
8962SED=$lt_cv_path_SED
8963AC_SUBST([SED])
8964AC_MSG_RESULT([$SED])
8965])#AC_PROG_SED
8966])#m4_ifndef
8967
8968# Old name:
8969AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8970dnl aclocal-1.4 backwards compatibility:
8971dnl AC_DEFUN([LT_AC_PROG_SED], [])
8972
8973
8974# _LT_CHECK_SHELL_FEATURES
8975# ------------------------
8976# Find out whether the shell is Bourne or XSI compatible,
8977# or has some other useful features.
8978m4_defun([_LT_CHECK_SHELL_FEATURES],
8979[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8980  lt_unset=unset
8981else
8982  lt_unset=false
8983fi
8984_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8985
8986# test EBCDIC or ASCII
8987case `echo X|tr X '\101'` in
8988 A) # ASCII based system
8989    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8990  lt_SP2NL='tr \040 \012'
8991  lt_NL2SP='tr \015\012 \040\040'
8992  ;;
8993 *) # EBCDIC based system
8994  lt_SP2NL='tr \100 \n'
8995  lt_NL2SP='tr \r\n \100\100'
8996  ;;
8997esac
8998_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8999_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
9000])# _LT_CHECK_SHELL_FEATURES
9001
9002
9003# _LT_PATH_CONVERSION_FUNCTIONS
9004# -----------------------------
9005# Determine what file name conversion functions should be used by
9006# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
9007# for certain cross-compile configurations and native mingw.
9008m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
9009[AC_REQUIRE([AC_CANONICAL_HOST])dnl
9010AC_REQUIRE([AC_CANONICAL_BUILD])dnl
9011AC_MSG_CHECKING([how to convert $build file names to $host format])
9012AC_CACHE_VAL(lt_cv_to_host_file_cmd,
9013[case $host in
9014  *-*-mingw* )
9015    case $build in
9016      *-*-mingw* ) # actually msys
9017        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
9018        ;;
9019      *-*-cygwin* )
9020        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
9021        ;;
9022      * ) # otherwise, assume *nix
9023        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
9024        ;;
9025    esac
9026    ;;
9027  *-*-cygwin* )
9028    case $build in
9029      *-*-mingw* ) # actually msys
9030        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
9031        ;;
9032      *-*-cygwin* )
9033        lt_cv_to_host_file_cmd=func_convert_file_noop
9034        ;;
9035      * ) # otherwise, assume *nix
9036        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
9037        ;;
9038    esac
9039    ;;
9040  * ) # unhandled hosts (and "normal" native builds)
9041    lt_cv_to_host_file_cmd=func_convert_file_noop
9042    ;;
9043esac
9044])
9045to_host_file_cmd=$lt_cv_to_host_file_cmd
9046AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
9047_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
9048         [0], [convert $build file names to $host format])dnl
9049
9050AC_MSG_CHECKING([how to convert $build file names to toolchain format])
9051AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
9052[#assume ordinary cross tools, or native build.
9053lt_cv_to_tool_file_cmd=func_convert_file_noop
9054case $host in
9055  *-*-mingw* )
9056    case $build in
9057      *-*-mingw* ) # actually msys
9058        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
9059        ;;
9060    esac
9061    ;;
9062esac
9063])
9064to_tool_file_cmd=$lt_cv_to_tool_file_cmd
9065AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
9066_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
9067         [0], [convert $build files to toolchain format])dnl
9068])# _LT_PATH_CONVERSION_FUNCTIONS
9069
9070# Helper functions for option handling.                    -*- Autoconf -*-
9071#
9072#   Copyright (C) 2004-2005, 2007-2009, 2011-2017 Free Software
9073#   Foundation, Inc.
9074#   Written by Gary V. Vaughan, 2004
9075#
9076# This file is free software; the Free Software Foundation gives
9077# unlimited permission to copy and/or distribute it, with or without
9078# modifications, as long as this notice is preserved.
9079
9080# serial 8 ltoptions.m4
9081
9082# This is to help aclocal find these macros, as it can't see m4_define.
9083AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
9084
9085
9086# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
9087# ------------------------------------------
9088m4_define([_LT_MANGLE_OPTION],
9089[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
9090
9091
9092# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
9093# ---------------------------------------
9094# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
9095# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
9096# saved as a flag.
9097m4_define([_LT_SET_OPTION],
9098[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
9099m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
9100        _LT_MANGLE_DEFUN([$1], [$2]),
9101    [m4_warning([Unknown $1 option '$2'])])[]dnl
9102])
9103
9104
9105# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
9106# ------------------------------------------------------------
9107# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9108m4_define([_LT_IF_OPTION],
9109[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
9110
9111
9112# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
9113# -------------------------------------------------------
9114# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
9115# are set.
9116m4_define([_LT_UNLESS_OPTIONS],
9117[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9118	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
9119		      [m4_define([$0_found])])])[]dnl
9120m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
9121])[]dnl
9122])
9123
9124
9125# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
9126# ----------------------------------------
9127# OPTION-LIST is a space-separated list of Libtool options associated
9128# with MACRO-NAME.  If any OPTION has a matching handler declared with
9129# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
9130# the unknown option and exit.
9131m4_defun([_LT_SET_OPTIONS],
9132[# Set options
9133m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9134    [_LT_SET_OPTION([$1], _LT_Option)])
9135
9136m4_if([$1],[LT_INIT],[
9137  dnl
9138  dnl Simply set some default values (i.e off) if boolean options were not
9139  dnl specified:
9140  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
9141  ])
9142  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
9143  ])
9144  dnl
9145  dnl If no reference was made to various pairs of opposing options, then
9146  dnl we run the default mode handler for the pair.  For example, if neither
9147  dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
9148  dnl archives by default:
9149  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
9150  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
9151  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
9152  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
9153		   [_LT_ENABLE_FAST_INSTALL])
9154  _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
9155		   [_LT_WITH_AIX_SONAME([aix])])
9156  ])
9157])# _LT_SET_OPTIONS
9158
9159
9160
9161# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
9162# -----------------------------------------
9163m4_define([_LT_MANGLE_DEFUN],
9164[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
9165
9166
9167# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
9168# -----------------------------------------------
9169m4_define([LT_OPTION_DEFINE],
9170[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
9171])# LT_OPTION_DEFINE
9172
9173
9174# dlopen
9175# ------
9176LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
9177])
9178
9179AU_DEFUN([AC_LIBTOOL_DLOPEN],
9180[_LT_SET_OPTION([LT_INIT], [dlopen])
9181AC_DIAGNOSE([obsolete],
9182[$0: Remove this warning and the call to _LT_SET_OPTION when you
9183put the 'dlopen' option into LT_INIT's first parameter.])
9184])
9185
9186dnl aclocal-1.4 backwards compatibility:
9187dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
9188
9189
9190# win32-dll
9191# ---------
9192# Declare package support for building win32 dll's.
9193LT_OPTION_DEFINE([LT_INIT], [win32-dll],
9194[enable_win32_dll=yes
9195
9196case $host in
9197*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
9198  AC_CHECK_TOOL(AS, as, false)
9199  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
9200  AC_CHECK_TOOL(OBJDUMP, objdump, false)
9201  ;;
9202esac
9203
9204test -z "$AS" && AS=as
9205_LT_DECL([], [AS],      [1], [Assembler program])dnl
9206
9207test -z "$DLLTOOL" && DLLTOOL=dlltool
9208_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
9209
9210test -z "$OBJDUMP" && OBJDUMP=objdump
9211_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
9212])# win32-dll
9213
9214AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
9215[AC_REQUIRE([AC_CANONICAL_HOST])dnl
9216_LT_SET_OPTION([LT_INIT], [win32-dll])
9217AC_DIAGNOSE([obsolete],
9218[$0: Remove this warning and the call to _LT_SET_OPTION when you
9219put the 'win32-dll' option into LT_INIT's first parameter.])
9220])
9221
9222dnl aclocal-1.4 backwards compatibility:
9223dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
9224
9225
9226# _LT_ENABLE_SHARED([DEFAULT])
9227# ----------------------------
9228# implement the --enable-shared flag, and supports the 'shared' and
9229# 'disable-shared' LT_INIT options.
9230# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
9231m4_define([_LT_ENABLE_SHARED],
9232[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
9233AC_ARG_ENABLE([shared],
9234    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
9235	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
9236    [p=${PACKAGE-default}
9237    case $enableval in
9238    yes) enable_shared=yes ;;
9239    no) enable_shared=no ;;
9240    *)
9241      enable_shared=no
9242      # Look at the argument we got.  We use all the common list separators.
9243      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
9244      for pkg in $enableval; do
9245	IFS=$lt_save_ifs
9246	if test "X$pkg" = "X$p"; then
9247	  enable_shared=yes
9248	fi
9249      done
9250      IFS=$lt_save_ifs
9251      ;;
9252    esac],
9253    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
9254
9255    _LT_DECL([build_libtool_libs], [enable_shared], [0],
9256	[Whether or not to build shared libraries])
9257])# _LT_ENABLE_SHARED
9258
9259LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
9260LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
9261
9262# Old names:
9263AC_DEFUN([AC_ENABLE_SHARED],
9264[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
9265])
9266
9267AC_DEFUN([AC_DISABLE_SHARED],
9268[_LT_SET_OPTION([LT_INIT], [disable-shared])
9269])
9270
9271AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9272AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9273
9274dnl aclocal-1.4 backwards compatibility:
9275dnl AC_DEFUN([AM_ENABLE_SHARED], [])
9276dnl AC_DEFUN([AM_DISABLE_SHARED], [])
9277
9278
9279
9280# _LT_ENABLE_STATIC([DEFAULT])
9281# ----------------------------
9282# implement the --enable-static flag, and support the 'static' and
9283# 'disable-static' LT_INIT options.
9284# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
9285m4_define([_LT_ENABLE_STATIC],
9286[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
9287AC_ARG_ENABLE([static],
9288    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
9289	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
9290    [p=${PACKAGE-default}
9291    case $enableval in
9292    yes) enable_static=yes ;;
9293    no) enable_static=no ;;
9294    *)
9295     enable_static=no
9296      # Look at the argument we got.  We use all the common list separators.
9297      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
9298      for pkg in $enableval; do
9299	IFS=$lt_save_ifs
9300	if test "X$pkg" = "X$p"; then
9301	  enable_static=yes
9302	fi
9303      done
9304      IFS=$lt_save_ifs
9305      ;;
9306    esac],
9307    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
9308
9309    _LT_DECL([build_old_libs], [enable_static], [0],
9310	[Whether or not to build static libraries])
9311])# _LT_ENABLE_STATIC
9312
9313LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
9314LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
9315
9316# Old names:
9317AC_DEFUN([AC_ENABLE_STATIC],
9318[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
9319])
9320
9321AC_DEFUN([AC_DISABLE_STATIC],
9322[_LT_SET_OPTION([LT_INIT], [disable-static])
9323])
9324
9325AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
9326AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
9327
9328dnl aclocal-1.4 backwards compatibility:
9329dnl AC_DEFUN([AM_ENABLE_STATIC], [])
9330dnl AC_DEFUN([AM_DISABLE_STATIC], [])
9331
9332
9333
9334# _LT_ENABLE_FAST_INSTALL([DEFAULT])
9335# ----------------------------------
9336# implement the --enable-fast-install flag, and support the 'fast-install'
9337# and 'disable-fast-install' LT_INIT options.
9338# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
9339m4_define([_LT_ENABLE_FAST_INSTALL],
9340[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
9341AC_ARG_ENABLE([fast-install],
9342    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
9343    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
9344    [p=${PACKAGE-default}
9345    case $enableval in
9346    yes) enable_fast_install=yes ;;
9347    no) enable_fast_install=no ;;
9348    *)
9349      enable_fast_install=no
9350      # Look at the argument we got.  We use all the common list separators.
9351      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
9352      for pkg in $enableval; do
9353	IFS=$lt_save_ifs
9354	if test "X$pkg" = "X$p"; then
9355	  enable_fast_install=yes
9356	fi
9357      done
9358      IFS=$lt_save_ifs
9359      ;;
9360    esac],
9361    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
9362
9363_LT_DECL([fast_install], [enable_fast_install], [0],
9364	 [Whether or not to optimize for fast installation])dnl
9365])# _LT_ENABLE_FAST_INSTALL
9366
9367LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
9368LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
9369
9370# Old names:
9371AU_DEFUN([AC_ENABLE_FAST_INSTALL],
9372[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
9373AC_DIAGNOSE([obsolete],
9374[$0: Remove this warning and the call to _LT_SET_OPTION when you put
9375the 'fast-install' option into LT_INIT's first parameter.])
9376])
9377
9378AU_DEFUN([AC_DISABLE_FAST_INSTALL],
9379[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
9380AC_DIAGNOSE([obsolete],
9381[$0: Remove this warning and the call to _LT_SET_OPTION when you put
9382the 'disable-fast-install' option into LT_INIT's first parameter.])
9383])
9384
9385dnl aclocal-1.4 backwards compatibility:
9386dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
9387dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
9388
9389
9390# _LT_WITH_AIX_SONAME([DEFAULT])
9391# ----------------------------------
9392# implement the --with-aix-soname flag, and support the `aix-soname=aix'
9393# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
9394# is either `aix', `both' or `svr4'.  If omitted, it defaults to `aix'.
9395m4_define([_LT_WITH_AIX_SONAME],
9396[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
9397shared_archive_member_spec=
9398case $host,$enable_shared in
9399power*-*-aix[[5-9]]*,yes)
9400  AC_MSG_CHECKING([which variant of shared library versioning to provide])
9401  AC_ARG_WITH([aix-soname],
9402    [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
9403      [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
9404    [case $withval in
9405    aix|svr4|both)
9406      ;;
9407    *)
9408      AC_MSG_ERROR([Unknown argument to --with-aix-soname])
9409      ;;
9410    esac
9411    lt_cv_with_aix_soname=$with_aix_soname],
9412    [AC_CACHE_VAL([lt_cv_with_aix_soname],
9413      [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
9414    with_aix_soname=$lt_cv_with_aix_soname])
9415  AC_MSG_RESULT([$with_aix_soname])
9416  if test aix != "$with_aix_soname"; then
9417    # For the AIX way of multilib, we name the shared archive member
9418    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
9419    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
9420    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
9421    # the AIX toolchain works better with OBJECT_MODE set (default 32).
9422    if test 64 = "${OBJECT_MODE-32}"; then
9423      shared_archive_member_spec=shr_64
9424    else
9425      shared_archive_member_spec=shr
9426    fi
9427  fi
9428  ;;
9429*)
9430  with_aix_soname=aix
9431  ;;
9432esac
9433
9434_LT_DECL([], [shared_archive_member_spec], [0],
9435    [Shared archive member basename, for filename based shared library versioning on AIX])dnl
9436])# _LT_WITH_AIX_SONAME
9437
9438LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
9439LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
9440LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
9441
9442
9443# _LT_WITH_PIC([MODE])
9444# --------------------
9445# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
9446# LT_INIT options.
9447# MODE is either 'yes' or 'no'.  If omitted, it defaults to 'both'.
9448m4_define([_LT_WITH_PIC],
9449[AC_ARG_WITH([pic],
9450    [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
9451	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
9452    [lt_p=${PACKAGE-default}
9453    case $withval in
9454    yes|no) pic_mode=$withval ;;
9455    *)
9456      pic_mode=default
9457      # Look at the argument we got.  We use all the common list separators.
9458      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
9459      for lt_pkg in $withval; do
9460	IFS=$lt_save_ifs
9461	if test "X$lt_pkg" = "X$lt_p"; then
9462	  pic_mode=yes
9463	fi
9464      done
9465      IFS=$lt_save_ifs
9466      ;;
9467    esac],
9468    [pic_mode=m4_default([$1], [default])])
9469
9470_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
9471])# _LT_WITH_PIC
9472
9473LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
9474LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
9475
9476# Old name:
9477AU_DEFUN([AC_LIBTOOL_PICMODE],
9478[_LT_SET_OPTION([LT_INIT], [pic-only])
9479AC_DIAGNOSE([obsolete],
9480[$0: Remove this warning and the call to _LT_SET_OPTION when you
9481put the 'pic-only' option into LT_INIT's first parameter.])
9482])
9483
9484dnl aclocal-1.4 backwards compatibility:
9485dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
9486
9487
9488m4_define([_LTDL_MODE], [])
9489LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
9490		 [m4_define([_LTDL_MODE], [nonrecursive])])
9491LT_OPTION_DEFINE([LTDL_INIT], [recursive],
9492		 [m4_define([_LTDL_MODE], [recursive])])
9493LT_OPTION_DEFINE([LTDL_INIT], [subproject],
9494		 [m4_define([_LTDL_MODE], [subproject])])
9495
9496m4_define([_LTDL_TYPE], [])
9497LT_OPTION_DEFINE([LTDL_INIT], [installable],
9498		 [m4_define([_LTDL_TYPE], [installable])])
9499LT_OPTION_DEFINE([LTDL_INIT], [convenience],
9500		 [m4_define([_LTDL_TYPE], [convenience])])
9501
9502# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
9503#
9504# Copyright (C) 2004-2005, 2007-2008, 2011-2017 Free Software
9505# Foundation, Inc.
9506# Written by Gary V. Vaughan, 2004
9507#
9508# This file is free software; the Free Software Foundation gives
9509# unlimited permission to copy and/or distribute it, with or without
9510# modifications, as long as this notice is preserved.
9511
9512# serial 6 ltsugar.m4
9513
9514# This is to help aclocal find these macros, as it can't see m4_define.
9515AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
9516
9517
9518# lt_join(SEP, ARG1, [ARG2...])
9519# -----------------------------
9520# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
9521# associated separator.
9522# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
9523# versions in m4sugar had bugs.
9524m4_define([lt_join],
9525[m4_if([$#], [1], [],
9526       [$#], [2], [[$2]],
9527       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
9528m4_define([_lt_join],
9529[m4_if([$#$2], [2], [],
9530       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
9531
9532
9533# lt_car(LIST)
9534# lt_cdr(LIST)
9535# ------------
9536# Manipulate m4 lists.
9537# These macros are necessary as long as will still need to support
9538# Autoconf-2.59, which quotes differently.
9539m4_define([lt_car], [[$1]])
9540m4_define([lt_cdr],
9541[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
9542       [$#], 1, [],
9543       [m4_dquote(m4_shift($@))])])
9544m4_define([lt_unquote], $1)
9545
9546
9547# lt_append(MACRO-NAME, STRING, [SEPARATOR])
9548# ------------------------------------------
9549# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
9550# Note that neither SEPARATOR nor STRING are expanded; they are appended
9551# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
9552# No SEPARATOR is output if MACRO-NAME was previously undefined (different
9553# than defined and empty).
9554#
9555# This macro is needed until we can rely on Autoconf 2.62, since earlier
9556# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
9557m4_define([lt_append],
9558[m4_define([$1],
9559	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9560
9561
9562
9563# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
9564# ----------------------------------------------------------
9565# Produce a SEP delimited list of all paired combinations of elements of
9566# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
9567# has the form PREFIXmINFIXSUFFIXn.
9568# Needed until we can rely on m4_combine added in Autoconf 2.62.
9569m4_define([lt_combine],
9570[m4_if(m4_eval([$# > 3]), [1],
9571       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
9572[[m4_foreach([_Lt_prefix], [$2],
9573	     [m4_foreach([_Lt_suffix],
9574		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
9575	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
9576
9577
9578# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
9579# -----------------------------------------------------------------------
9580# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
9581# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
9582m4_define([lt_if_append_uniq],
9583[m4_ifdef([$1],
9584	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
9585		 [lt_append([$1], [$2], [$3])$4],
9586		 [$5])],
9587	  [lt_append([$1], [$2], [$3])$4])])
9588
9589
9590# lt_dict_add(DICT, KEY, VALUE)
9591# -----------------------------
9592m4_define([lt_dict_add],
9593[m4_define([$1($2)], [$3])])
9594
9595
9596# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
9597# --------------------------------------------
9598m4_define([lt_dict_add_subkey],
9599[m4_define([$1($2:$3)], [$4])])
9600
9601
9602# lt_dict_fetch(DICT, KEY, [SUBKEY])
9603# ----------------------------------
9604m4_define([lt_dict_fetch],
9605[m4_ifval([$3],
9606	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
9607    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9608
9609
9610# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
9611# -----------------------------------------------------------------
9612m4_define([lt_if_dict_fetch],
9613[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
9614	[$5],
9615    [$6])])
9616
9617
9618# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
9619# --------------------------------------------------------------
9620m4_define([lt_dict_filter],
9621[m4_if([$5], [], [],
9622  [lt_join(m4_quote(m4_default([$4], [[, ]])),
9623           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
9624		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
9625])
9626
9627# ltversion.m4 -- version numbers			-*- Autoconf -*-
9628#
9629#   Copyright (C) 2004, 2011-2017 Free Software Foundation, Inc.
9630#   Written by Scott James Remnant, 2004
9631#
9632# This file is free software; the Free Software Foundation gives
9633# unlimited permission to copy and/or distribute it, with or without
9634# modifications, as long as this notice is preserved.
9635
9636# @configure_input@
9637
9638# serial 4219 ltversion.m4
9639# This file is part of GNU Libtool
9640
9641m4_define([LT_PACKAGE_VERSION], [2.4.6.40-6ca5-dirty])
9642m4_define([LT_PACKAGE_REVISION], [2.4.6.40])
9643
9644AC_DEFUN([LTVERSION_VERSION],
9645[macro_version='2.4.6.40-6ca5-dirty'
9646macro_revision='2.4.6.40'
9647_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
9648_LT_DECL(, macro_revision, 0)
9649])
9650
9651# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
9652#
9653#   Copyright (C) 2004-2005, 2007, 2009, 2011-2017 Free Software
9654#   Foundation, Inc.
9655#   Written by Scott James Remnant, 2004.
9656#
9657# This file is free software; the Free Software Foundation gives
9658# unlimited permission to copy and/or distribute it, with or without
9659# modifications, as long as this notice is preserved.
9660
9661# serial 5 lt~obsolete.m4
9662
9663# These exist entirely to fool aclocal when bootstrapping libtool.
9664#
9665# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
9666# which have later been changed to m4_define as they aren't part of the
9667# exported API, or moved to Autoconf or Automake where they belong.
9668#
9669# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
9670# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
9671# using a macro with the same name in our local m4/libtool.m4 it'll
9672# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
9673# and doesn't know about Autoconf macros at all.)
9674#
9675# So we provide this file, which has a silly filename so it's always
9676# included after everything else.  This provides aclocal with the
9677# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
9678# because those macros already exist, or will be overwritten later.
9679# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
9680#
9681# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
9682# Yes, that means every name once taken will need to remain here until
9683# we give up compatibility with versions before 1.7, at which point
9684# we need to keep only those names which we still refer to.
9685
9686# This is to help aclocal find these macros, as it can't see m4_define.
9687AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9688
9689m4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9690m4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
9691m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9692m4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
9693m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9694m4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
9695m4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
9696m4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9697m4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
9698m4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
9699m4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
9700m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9701m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9702m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9703m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9704m4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9705m4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
9706m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9707m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9708m4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
9709m4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
9710m4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9711m4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9712m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9713m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9714m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9715m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9716m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9717m4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
9718m4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
9719m4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
9720m4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9721m4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9722m4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
9723m4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
9724m4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9725m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9726m4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
9727m4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9728m4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
9729m4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
9730m4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
9731m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9732m4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9733m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9734m4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9735m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9736m4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9737m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9738m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9739m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9740m4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9741m4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
9742m4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9743m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],	[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
9744m4_ifndef([_LT_AC_PROG_CXXCPP],		[AC_DEFUN([_LT_AC_PROG_CXXCPP])])
9745m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],	[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
9746m4_ifndef([_LT_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
9747m4_ifndef([_LT_PROG_F77],		[AC_DEFUN([_LT_PROG_F77])])
9748m4_ifndef([_LT_PROG_FC],		[AC_DEFUN([_LT_PROG_FC])])
9749m4_ifndef([_LT_PROG_CXX],		[AC_DEFUN([_LT_PROG_CXX])])
9750
9751# nls.m4 serial 5 (gettext-0.18)
9752dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016 Free Software
9753dnl Foundation, Inc.
9754dnl This file is free software; the Free Software Foundation
9755dnl gives unlimited permission to copy and/or distribute it,
9756dnl with or without modifications, as long as this notice is preserved.
9757dnl
9758dnl This file can be used in projects which are not available under
9759dnl the GNU General Public License or the GNU Library General Public
9760dnl License but which still want to provide support for the GNU gettext
9761dnl functionality.
9762dnl Please note that the actual code of the GNU gettext library is covered
9763dnl by the GNU Library General Public License, and the rest of the GNU
9764dnl gettext package is covered by the GNU General Public License.
9765dnl They are *not* in the public domain.
9766
9767dnl Authors:
9768dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
9769dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
9770
9771AC_PREREQ([2.50])
9772
9773AC_DEFUN([AM_NLS],
9774[
9775  AC_MSG_CHECKING([whether NLS is requested])
9776  dnl Default is enabled NLS
9777  AC_ARG_ENABLE([nls],
9778    [  --disable-nls           do not use Native Language Support],
9779    USE_NLS=$enableval, USE_NLS=yes)
9780  AC_MSG_RESULT([$USE_NLS])
9781  AC_SUBST([USE_NLS])
9782])
9783
9784# pkg.m4 - Macros to locate and utilise pkg-config.   -*- Autoconf -*-
9785# serial 12 (pkg-config-0.29.2)
9786
9787dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
9788dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
9789dnl
9790dnl This program is free software; you can redistribute it and/or modify
9791dnl it under the terms of the GNU General Public License as published by
9792dnl the Free Software Foundation; either version 2 of the License, or
9793dnl (at your option) any later version.
9794dnl
9795dnl This program is distributed in the hope that it will be useful, but
9796dnl WITHOUT ANY WARRANTY; without even the implied warranty of
9797dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9798dnl General Public License for more details.
9799dnl
9800dnl You should have received a copy of the GNU General Public License
9801dnl along with this program; if not, write to the Free Software
9802dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
9803dnl 02111-1307, USA.
9804dnl
9805dnl As a special exception to the GNU General Public License, if you
9806dnl distribute this file as part of a program that contains a
9807dnl configuration script generated by Autoconf, you may include it under
9808dnl the same distribution terms that you use for the rest of that
9809dnl program.
9810
9811dnl PKG_PREREQ(MIN-VERSION)
9812dnl -----------------------
9813dnl Since: 0.29
9814dnl
9815dnl Verify that the version of the pkg-config macros are at least
9816dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
9817dnl installed version of pkg-config, this checks the developer's version
9818dnl of pkg.m4 when generating configure.
9819dnl
9820dnl To ensure that this macro is defined, also add:
9821dnl m4_ifndef([PKG_PREREQ],
9822dnl     [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
9823dnl
9824dnl See the "Since" comment for each macro you use to see what version
9825dnl of the macros you require.
9826m4_defun([PKG_PREREQ],
9827[m4_define([PKG_MACROS_VERSION], [0.29.2])
9828m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
9829    [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
9830])dnl PKG_PREREQ
9831
9832dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
9833dnl ----------------------------------
9834dnl Since: 0.16
9835dnl
9836dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
9837dnl first found in the path. Checks that the version of pkg-config found
9838dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
9839dnl used since that's the first version where most current features of
9840dnl pkg-config existed.
9841AC_DEFUN([PKG_PROG_PKG_CONFIG],
9842[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
9843m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
9844m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
9845AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
9846AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
9847AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
9848
9849if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9850	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
9851fi
9852if test -n "$PKG_CONFIG"; then
9853	_pkg_min_version=m4_default([$1], [0.9.0])
9854	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
9855	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9856		AC_MSG_RESULT([yes])
9857	else
9858		AC_MSG_RESULT([no])
9859		PKG_CONFIG=""
9860	fi
9861fi[]dnl
9862])dnl PKG_PROG_PKG_CONFIG
9863
9864dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
9865dnl -------------------------------------------------------------------
9866dnl Since: 0.18
9867dnl
9868dnl Check to see whether a particular set of modules exists. Similar to
9869dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
9870dnl
9871dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9872dnl only at the first occurence in configure.ac, so if the first place
9873dnl it's called might be skipped (such as if it is within an "if", you
9874dnl have to call PKG_CHECK_EXISTS manually
9875AC_DEFUN([PKG_CHECK_EXISTS],
9876[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9877if test -n "$PKG_CONFIG" && \
9878    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
9879  m4_default([$2], [:])
9880m4_ifvaln([$3], [else
9881  $3])dnl
9882fi])
9883
9884dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
9885dnl ---------------------------------------------
9886dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
9887dnl pkg_failed based on the result.
9888m4_define([_PKG_CONFIG],
9889[if test -n "$$1"; then
9890    pkg_cv_[]$1="$$1"
9891 elif test -n "$PKG_CONFIG"; then
9892    PKG_CHECK_EXISTS([$3],
9893                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
9894		      test "x$?" != "x0" && pkg_failed=yes ],
9895		     [pkg_failed=yes])
9896 else
9897    pkg_failed=untried
9898fi[]dnl
9899])dnl _PKG_CONFIG
9900
9901dnl _PKG_SHORT_ERRORS_SUPPORTED
9902dnl ---------------------------
9903dnl Internal check to see if pkg-config supports short errors.
9904AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
9905[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9906if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9907        _pkg_short_errors_supported=yes
9908else
9909        _pkg_short_errors_supported=no
9910fi[]dnl
9911])dnl _PKG_SHORT_ERRORS_SUPPORTED
9912
9913
9914dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
9915dnl   [ACTION-IF-NOT-FOUND])
9916dnl --------------------------------------------------------------
9917dnl Since: 0.4.0
9918dnl
9919dnl Note that if there is a possibility the first call to
9920dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
9921dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
9922AC_DEFUN([PKG_CHECK_MODULES],
9923[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9924AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
9925AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
9926
9927pkg_failed=no
9928AC_MSG_CHECKING([for $2])
9929
9930_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
9931_PKG_CONFIG([$1][_LIBS], [libs], [$2])
9932
9933m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
9934and $1[]_LIBS to avoid the need to call pkg-config.
9935See the pkg-config man page for more details.])
9936
9937if test $pkg_failed = yes; then
9938        AC_MSG_RESULT([no])
9939        _PKG_SHORT_ERRORS_SUPPORTED
9940        if test $_pkg_short_errors_supported = yes; then
9941	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
9942        else
9943	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
9944        fi
9945	# Put the nasty error message in config.log where it belongs
9946	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
9947
9948	m4_default([$4], [AC_MSG_ERROR(
9949[Package requirements ($2) were not met:
9950
9951$$1_PKG_ERRORS
9952
9953Consider adjusting the PKG_CONFIG_PATH environment variable if you
9954installed software in a non-standard prefix.
9955
9956_PKG_TEXT])[]dnl
9957        ])
9958elif test $pkg_failed = untried; then
9959        AC_MSG_RESULT([no])
9960	m4_default([$4], [AC_MSG_FAILURE(
9961[The pkg-config script could not be found or is too old.  Make sure it
9962is in your PATH or set the PKG_CONFIG environment variable to the full
9963path to pkg-config.
9964
9965_PKG_TEXT
9966
9967To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
9968        ])
9969else
9970	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
9971	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
9972        AC_MSG_RESULT([yes])
9973	$3
9974fi[]dnl
9975])dnl PKG_CHECK_MODULES
9976
9977
9978dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
9979dnl   [ACTION-IF-NOT-FOUND])
9980dnl ---------------------------------------------------------------------
9981dnl Since: 0.29
9982dnl
9983dnl Checks for existence of MODULES and gathers its build flags with
9984dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
9985dnl and VARIABLE-PREFIX_LIBS from --libs.
9986dnl
9987dnl Note that if there is a possibility the first call to
9988dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
9989dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
9990dnl configure.ac.
9991AC_DEFUN([PKG_CHECK_MODULES_STATIC],
9992[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9993_save_PKG_CONFIG=$PKG_CONFIG
9994PKG_CONFIG="$PKG_CONFIG --static"
9995PKG_CHECK_MODULES($@)
9996PKG_CONFIG=$_save_PKG_CONFIG[]dnl
9997])dnl PKG_CHECK_MODULES_STATIC
9998
9999
10000dnl PKG_INSTALLDIR([DIRECTORY])
10001dnl -------------------------
10002dnl Since: 0.27
10003dnl
10004dnl Substitutes the variable pkgconfigdir as the location where a module
10005dnl should install pkg-config .pc files. By default the directory is
10006dnl $libdir/pkgconfig, but the default can be changed by passing
10007dnl DIRECTORY. The user can override through the --with-pkgconfigdir
10008dnl parameter.
10009AC_DEFUN([PKG_INSTALLDIR],
10010[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
10011m4_pushdef([pkg_description],
10012    [pkg-config installation directory @<:@]pkg_default[@:>@])
10013AC_ARG_WITH([pkgconfigdir],
10014    [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
10015    [with_pkgconfigdir=]pkg_default)
10016AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
10017m4_popdef([pkg_default])
10018m4_popdef([pkg_description])
10019])dnl PKG_INSTALLDIR
10020
10021
10022dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
10023dnl --------------------------------
10024dnl Since: 0.27
10025dnl
10026dnl Substitutes the variable noarch_pkgconfigdir as the location where a
10027dnl module should install arch-independent pkg-config .pc files. By
10028dnl default the directory is $datadir/pkgconfig, but the default can be
10029dnl changed by passing DIRECTORY. The user can override through the
10030dnl --with-noarch-pkgconfigdir parameter.
10031AC_DEFUN([PKG_NOARCH_INSTALLDIR],
10032[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
10033m4_pushdef([pkg_description],
10034    [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
10035AC_ARG_WITH([noarch-pkgconfigdir],
10036    [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
10037    [with_noarch_pkgconfigdir=]pkg_default)
10038AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
10039m4_popdef([pkg_default])
10040m4_popdef([pkg_description])
10041])dnl PKG_NOARCH_INSTALLDIR
10042
10043
10044dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
10045dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
10046dnl -------------------------------------------
10047dnl Since: 0.28
10048dnl
10049dnl Retrieves the value of the pkg-config variable for the given module.
10050AC_DEFUN([PKG_CHECK_VAR],
10051[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
10052AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
10053
10054_PKG_CONFIG([$1], [variable="][$3]["], [$2])
10055AS_VAR_COPY([$1], [pkg_cv_][$1])
10056
10057AS_VAR_IF([$1], [""], [$5], [$4])dnl
10058])dnl PKG_CHECK_VAR
10059
10060# Copyright (C) 2002-2017 Free Software Foundation, Inc.
10061#
10062# This file is free software; the Free Software Foundation
10063# gives unlimited permission to copy and/or distribute it,
10064# with or without modifications, as long as this notice is preserved.
10065
10066# AM_AUTOMAKE_VERSION(VERSION)
10067# ----------------------------
10068# Automake X.Y traces this macro to ensure aclocal.m4 has been
10069# generated from the m4 files accompanying Automake X.Y.
10070# (This private macro should not be called outside this file.)
10071AC_DEFUN([AM_AUTOMAKE_VERSION],
10072[am__api_version='1.15'
10073dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
10074dnl require some minimum version.  Point them to the right macro.
10075m4_if([$1], [1.15.1], [],
10076      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
10077])
10078
10079# _AM_AUTOCONF_VERSION(VERSION)
10080# -----------------------------
10081# aclocal traces this macro to find the Autoconf version.
10082# This is a private macro too.  Using m4_define simplifies
10083# the logic in aclocal, which can simply ignore this definition.
10084m4_define([_AM_AUTOCONF_VERSION], [])
10085
10086# AM_SET_CURRENT_AUTOMAKE_VERSION
10087# -------------------------------
10088# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
10089# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
10090AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
10091[AM_AUTOMAKE_VERSION([1.15.1])dnl
10092m4_ifndef([AC_AUTOCONF_VERSION],
10093  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
10094_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
10095
10096# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
10097
10098# Copyright (C) 2001-2017 Free Software Foundation, Inc.
10099#
10100# This file is free software; the Free Software Foundation
10101# gives unlimited permission to copy and/or distribute it,
10102# with or without modifications, as long as this notice is preserved.
10103
10104# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
10105# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
10106# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
10107#
10108# Of course, Automake must honor this variable whenever it calls a
10109# tool from the auxiliary directory.  The problem is that $srcdir (and
10110# therefore $ac_aux_dir as well) can be either absolute or relative,
10111# depending on how configure is run.  This is pretty annoying, since
10112# it makes $ac_aux_dir quite unusable in subdirectories: in the top
10113# source directory, any form will work fine, but in subdirectories a
10114# relative path needs to be adjusted first.
10115#
10116# $ac_aux_dir/missing
10117#    fails when called from a subdirectory if $ac_aux_dir is relative
10118# $top_srcdir/$ac_aux_dir/missing
10119#    fails if $ac_aux_dir is absolute,
10120#    fails when called from a subdirectory in a VPATH build with
10121#          a relative $ac_aux_dir
10122#
10123# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
10124# are both prefixed by $srcdir.  In an in-source build this is usually
10125# harmless because $srcdir is '.', but things will broke when you
10126# start a VPATH build or use an absolute $srcdir.
10127#
10128# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
10129# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
10130#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
10131# and then we would define $MISSING as
10132#   MISSING="\${SHELL} $am_aux_dir/missing"
10133# This will work as long as MISSING is not called from configure, because
10134# unfortunately $(top_srcdir) has no meaning in configure.
10135# However there are other variables, like CC, which are often used in
10136# configure, and could therefore not use this "fixed" $ac_aux_dir.
10137#
10138# Another solution, used here, is to always expand $ac_aux_dir to an
10139# absolute PATH.  The drawback is that using absolute paths prevent a
10140# configured tree to be moved without reconfiguration.
10141
10142AC_DEFUN([AM_AUX_DIR_EXPAND],
10143[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
10144# Expand $ac_aux_dir to an absolute path.
10145am_aux_dir=`cd "$ac_aux_dir" && pwd`
10146])
10147
10148# AM_CONDITIONAL                                            -*- Autoconf -*-
10149
10150# Copyright (C) 1997-2017 Free Software Foundation, Inc.
10151#
10152# This file is free software; the Free Software Foundation
10153# gives unlimited permission to copy and/or distribute it,
10154# with or without modifications, as long as this notice is preserved.
10155
10156# AM_CONDITIONAL(NAME, SHELL-CONDITION)
10157# -------------------------------------
10158# Define a conditional.
10159AC_DEFUN([AM_CONDITIONAL],
10160[AC_PREREQ([2.52])dnl
10161 m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
10162       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
10163AC_SUBST([$1_TRUE])dnl
10164AC_SUBST([$1_FALSE])dnl
10165_AM_SUBST_NOTMAKE([$1_TRUE])dnl
10166_AM_SUBST_NOTMAKE([$1_FALSE])dnl
10167m4_define([_AM_COND_VALUE_$1], [$2])dnl
10168if $2; then
10169  $1_TRUE=
10170  $1_FALSE='#'
10171else
10172  $1_TRUE='#'
10173  $1_FALSE=
10174fi
10175AC_CONFIG_COMMANDS_PRE(
10176[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
10177  AC_MSG_ERROR([[conditional "$1" was never defined.
10178Usually this means the macro was only invoked conditionally.]])
10179fi])])
10180
10181# Copyright (C) 1999-2017 Free Software Foundation, Inc.
10182#
10183# This file is free software; the Free Software Foundation
10184# gives unlimited permission to copy and/or distribute it,
10185# with or without modifications, as long as this notice is preserved.
10186
10187
10188# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
10189# written in clear, in which case automake, when reading aclocal.m4,
10190# will think it sees a *use*, and therefore will trigger all it's
10191# C support machinery.  Also note that it means that autoscan, seeing
10192# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
10193
10194
10195# _AM_DEPENDENCIES(NAME)
10196# ----------------------
10197# See how the compiler implements dependency checking.
10198# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
10199# We try a few techniques and use that to set a single cache variable.
10200#
10201# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
10202# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
10203# dependency, and given that the user is not expected to run this macro,
10204# just rely on AC_PROG_CC.
10205AC_DEFUN([_AM_DEPENDENCIES],
10206[AC_REQUIRE([AM_SET_DEPDIR])dnl
10207AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
10208AC_REQUIRE([AM_MAKE_INCLUDE])dnl
10209AC_REQUIRE([AM_DEP_TRACK])dnl
10210
10211m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
10212      [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
10213      [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
10214      [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
10215      [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
10216      [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
10217                    [depcc="$$1"   am_compiler_list=])
10218
10219AC_CACHE_CHECK([dependency style of $depcc],
10220               [am_cv_$1_dependencies_compiler_type],
10221[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
10222  # We make a subdir and do the tests there.  Otherwise we can end up
10223  # making bogus files that we don't know about and never remove.  For
10224  # instance it was reported that on HP-UX the gcc test will end up
10225  # making a dummy file named 'D' -- because '-MD' means "put the output
10226  # in D".
10227  rm -rf conftest.dir
10228  mkdir conftest.dir
10229  # Copy depcomp to subdir because otherwise we won't find it if we're
10230  # using a relative directory.
10231  cp "$am_depcomp" conftest.dir
10232  cd conftest.dir
10233  # We will build objects and dependencies in a subdirectory because
10234  # it helps to detect inapplicable dependency modes.  For instance
10235  # both Tru64's cc and ICC support -MD to output dependencies as a
10236  # side effect of compilation, but ICC will put the dependencies in
10237  # the current directory while Tru64 will put them in the object
10238  # directory.
10239  mkdir sub
10240
10241  am_cv_$1_dependencies_compiler_type=none
10242  if test "$am_compiler_list" = ""; then
10243     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
10244  fi
10245  am__universal=false
10246  m4_case([$1], [CC],
10247    [case " $depcc " in #(
10248     *\ -arch\ *\ -arch\ *) am__universal=true ;;
10249     esac],
10250    [CXX],
10251    [case " $depcc " in #(
10252     *\ -arch\ *\ -arch\ *) am__universal=true ;;
10253     esac])
10254
10255  for depmode in $am_compiler_list; do
10256    # Setup a source with many dependencies, because some compilers
10257    # like to wrap large dependency lists on column 80 (with \), and
10258    # we should not choose a depcomp mode which is confused by this.
10259    #
10260    # We need to recreate these files for each test, as the compiler may
10261    # overwrite some of them when testing with obscure command lines.
10262    # This happens at least with the AIX C compiler.
10263    : > sub/conftest.c
10264    for i in 1 2 3 4 5 6; do
10265      echo '#include "conftst'$i'.h"' >> sub/conftest.c
10266      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
10267      # Solaris 10 /bin/sh.
10268      echo '/* dummy */' > sub/conftst$i.h
10269    done
10270    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
10271
10272    # We check with '-c' and '-o' for the sake of the "dashmstdout"
10273    # mode.  It turns out that the SunPro C++ compiler does not properly
10274    # handle '-M -o', and we need to detect this.  Also, some Intel
10275    # versions had trouble with output in subdirs.
10276    am__obj=sub/conftest.${OBJEXT-o}
10277    am__minus_obj="-o $am__obj"
10278    case $depmode in
10279    gcc)
10280      # This depmode causes a compiler race in universal mode.
10281      test "$am__universal" = false || continue
10282      ;;
10283    nosideeffect)
10284      # After this tag, mechanisms are not by side-effect, so they'll
10285      # only be used when explicitly requested.
10286      if test "x$enable_dependency_tracking" = xyes; then
10287	continue
10288      else
10289	break
10290      fi
10291      ;;
10292    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
10293      # This compiler won't grok '-c -o', but also, the minuso test has
10294      # not run yet.  These depmodes are late enough in the game, and
10295      # so weak that their functioning should not be impacted.
10296      am__obj=conftest.${OBJEXT-o}
10297      am__minus_obj=
10298      ;;
10299    none) break ;;
10300    esac
10301    if depmode=$depmode \
10302       source=sub/conftest.c object=$am__obj \
10303       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
10304       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
10305         >/dev/null 2>conftest.err &&
10306       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
10307       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
10308       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
10309       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
10310      # icc doesn't choke on unknown options, it will just issue warnings
10311      # or remarks (even with -Werror).  So we grep stderr for any message
10312      # that says an option was ignored or not supported.
10313      # When given -MP, icc 7.0 and 7.1 complain thusly:
10314      #   icc: Command line warning: ignoring option '-M'; no argument required
10315      # The diagnosis changed in icc 8.0:
10316      #   icc: Command line remark: option '-MP' not supported
10317      if (grep 'ignoring option' conftest.err ||
10318          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
10319        am_cv_$1_dependencies_compiler_type=$depmode
10320        break
10321      fi
10322    fi
10323  done
10324
10325  cd ..
10326  rm -rf conftest.dir
10327else
10328  am_cv_$1_dependencies_compiler_type=none
10329fi
10330])
10331AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
10332AM_CONDITIONAL([am__fastdep$1], [
10333  test "x$enable_dependency_tracking" != xno \
10334  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
10335])
10336
10337
10338# AM_SET_DEPDIR
10339# -------------
10340# Choose a directory name for dependency files.
10341# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
10342AC_DEFUN([AM_SET_DEPDIR],
10343[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
10344AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
10345])
10346
10347
10348# AM_DEP_TRACK
10349# ------------
10350AC_DEFUN([AM_DEP_TRACK],
10351[AC_ARG_ENABLE([dependency-tracking], [dnl
10352AS_HELP_STRING(
10353  [--enable-dependency-tracking],
10354  [do not reject slow dependency extractors])
10355AS_HELP_STRING(
10356  [--disable-dependency-tracking],
10357  [speeds up one-time build])])
10358if test "x$enable_dependency_tracking" != xno; then
10359  am_depcomp="$ac_aux_dir/depcomp"
10360  AMDEPBACKSLASH='\'
10361  am__nodep='_no'
10362fi
10363AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
10364AC_SUBST([AMDEPBACKSLASH])dnl
10365_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
10366AC_SUBST([am__nodep])dnl
10367_AM_SUBST_NOTMAKE([am__nodep])dnl
10368])
10369
10370# Generate code to set up dependency tracking.              -*- Autoconf -*-
10371
10372# Copyright (C) 1999-2017 Free Software Foundation, Inc.
10373#
10374# This file is free software; the Free Software Foundation
10375# gives unlimited permission to copy and/or distribute it,
10376# with or without modifications, as long as this notice is preserved.
10377
10378
10379# _AM_OUTPUT_DEPENDENCY_COMMANDS
10380# ------------------------------
10381AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
10382[{
10383  # Older Autoconf quotes --file arguments for eval, but not when files
10384  # are listed without --file.  Let's play safe and only enable the eval
10385  # if we detect the quoting.
10386  case $CONFIG_FILES in
10387  *\'*) eval set x "$CONFIG_FILES" ;;
10388  *)   set x $CONFIG_FILES ;;
10389  esac
10390  shift
10391  for mf
10392  do
10393    # Strip MF so we end up with the name of the file.
10394    mf=`echo "$mf" | sed -e 's/:.*$//'`
10395    # Check whether this is an Automake generated Makefile or not.
10396    # We used to match only the files named 'Makefile.in', but
10397    # some people rename them; so instead we look at the file content.
10398    # Grep'ing the first line is not enough: some people post-process
10399    # each Makefile.in and add a new line on top of each file to say so.
10400    # Grep'ing the whole file is not good either: AIX grep has a line
10401    # limit of 2048, but all sed's we know have understand at least 4000.
10402    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
10403      dirpart=`AS_DIRNAME("$mf")`
10404    else
10405      continue
10406    fi
10407    # Extract the definition of DEPDIR, am__include, and am__quote
10408    # from the Makefile without running 'make'.
10409    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
10410    test -z "$DEPDIR" && continue
10411    am__include=`sed -n 's/^am__include = //p' < "$mf"`
10412    test -z "$am__include" && continue
10413    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
10414    # Find all dependency output files, they are included files with
10415    # $(DEPDIR) in their names.  We invoke sed twice because it is the
10416    # simplest approach to changing $(DEPDIR) to its actual value in the
10417    # expansion.
10418    for file in `sed -n "
10419      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
10420	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
10421      # Make sure the directory exists.
10422      test -f "$dirpart/$file" && continue
10423      fdir=`AS_DIRNAME(["$file"])`
10424      AS_MKDIR_P([$dirpart/$fdir])
10425      # echo "creating $dirpart/$file"
10426      echo '# dummy' > "$dirpart/$file"
10427    done
10428  done
10429}
10430])# _AM_OUTPUT_DEPENDENCY_COMMANDS
10431
10432
10433# AM_OUTPUT_DEPENDENCY_COMMANDS
10434# -----------------------------
10435# This macro should only be invoked once -- use via AC_REQUIRE.
10436#
10437# This code is only required when automatic dependency tracking
10438# is enabled.  FIXME.  This creates each '.P' file that we will
10439# need in order to bootstrap the dependency handling code.
10440AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
10441[AC_CONFIG_COMMANDS([depfiles],
10442     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
10443     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
10444])
10445
10446# Do all the work for Automake.                             -*- Autoconf -*-
10447
10448# Copyright (C) 1996-2017 Free Software Foundation, Inc.
10449#
10450# This file is free software; the Free Software Foundation
10451# gives unlimited permission to copy and/or distribute it,
10452# with or without modifications, as long as this notice is preserved.
10453
10454# This macro actually does too much.  Some checks are only needed if
10455# your package does certain things.  But this isn't really a big deal.
10456
10457dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
10458m4_define([AC_PROG_CC],
10459m4_defn([AC_PROG_CC])
10460[_AM_PROG_CC_C_O
10461])
10462
10463# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
10464# AM_INIT_AUTOMAKE([OPTIONS])
10465# -----------------------------------------------
10466# The call with PACKAGE and VERSION arguments is the old style
10467# call (pre autoconf-2.50), which is being phased out.  PACKAGE
10468# and VERSION should now be passed to AC_INIT and removed from
10469# the call to AM_INIT_AUTOMAKE.
10470# We support both call styles for the transition.  After
10471# the next Automake release, Autoconf can make the AC_INIT
10472# arguments mandatory, and then we can depend on a new Autoconf
10473# release and drop the old call support.
10474AC_DEFUN([AM_INIT_AUTOMAKE],
10475[AC_PREREQ([2.65])dnl
10476dnl Autoconf wants to disallow AM_ names.  We explicitly allow
10477dnl the ones we care about.
10478m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
10479AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
10480AC_REQUIRE([AC_PROG_INSTALL])dnl
10481if test "`cd $srcdir && pwd`" != "`pwd`"; then
10482  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
10483  # is not polluted with repeated "-I."
10484  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
10485  # test to see if srcdir already configured
10486  if test -f $srcdir/config.status; then
10487    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
10488  fi
10489fi
10490
10491# test whether we have cygpath
10492if test -z "$CYGPATH_W"; then
10493  if (cygpath --version) >/dev/null 2>/dev/null; then
10494    CYGPATH_W='cygpath -w'
10495  else
10496    CYGPATH_W=echo
10497  fi
10498fi
10499AC_SUBST([CYGPATH_W])
10500
10501# Define the identity of the package.
10502dnl Distinguish between old-style and new-style calls.
10503m4_ifval([$2],
10504[AC_DIAGNOSE([obsolete],
10505             [$0: two- and three-arguments forms are deprecated.])
10506m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
10507 AC_SUBST([PACKAGE], [$1])dnl
10508 AC_SUBST([VERSION], [$2])],
10509[_AM_SET_OPTIONS([$1])dnl
10510dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
10511m4_if(
10512  m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
10513  [ok:ok],,
10514  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
10515 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
10516 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
10517
10518_AM_IF_OPTION([no-define],,
10519[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
10520 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
10521
10522# Some tools Automake needs.
10523AC_REQUIRE([AM_SANITY_CHECK])dnl
10524AC_REQUIRE([AC_ARG_PROGRAM])dnl
10525AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
10526AM_MISSING_PROG([AUTOCONF], [autoconf])
10527AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
10528AM_MISSING_PROG([AUTOHEADER], [autoheader])
10529AM_MISSING_PROG([MAKEINFO], [makeinfo])
10530AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
10531AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
10532AC_REQUIRE([AC_PROG_MKDIR_P])dnl
10533# For better backward compatibility.  To be removed once Automake 1.9.x
10534# dies out for good.  For more background, see:
10535# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
10536# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
10537AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
10538# We need awk for the "check" target (and possibly the TAP driver).  The
10539# system "awk" is bad on some platforms.
10540AC_REQUIRE([AC_PROG_AWK])dnl
10541AC_REQUIRE([AC_PROG_MAKE_SET])dnl
10542AC_REQUIRE([AM_SET_LEADING_DOT])dnl
10543_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
10544	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
10545			     [_AM_PROG_TAR([v7])])])
10546_AM_IF_OPTION([no-dependencies],,
10547[AC_PROVIDE_IFELSE([AC_PROG_CC],
10548		  [_AM_DEPENDENCIES([CC])],
10549		  [m4_define([AC_PROG_CC],
10550			     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
10551AC_PROVIDE_IFELSE([AC_PROG_CXX],
10552		  [_AM_DEPENDENCIES([CXX])],
10553		  [m4_define([AC_PROG_CXX],
10554			     m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
10555AC_PROVIDE_IFELSE([AC_PROG_OBJC],
10556		  [_AM_DEPENDENCIES([OBJC])],
10557		  [m4_define([AC_PROG_OBJC],
10558			     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
10559AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
10560		  [_AM_DEPENDENCIES([OBJCXX])],
10561		  [m4_define([AC_PROG_OBJCXX],
10562			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
10563])
10564AC_REQUIRE([AM_SILENT_RULES])dnl
10565dnl The testsuite driver may need to know about EXEEXT, so add the
10566dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
10567dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
10568AC_CONFIG_COMMANDS_PRE(dnl
10569[m4_provide_if([_AM_COMPILER_EXEEXT],
10570  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
10571
10572# POSIX will say in a future version that running "rm -f" with no argument
10573# is OK; and we want to be able to make that assumption in our Makefile
10574# recipes.  So use an aggressive probe to check that the usage we want is
10575# actually supported "in the wild" to an acceptable degree.
10576# See automake bug#10828.
10577# To make any issue more visible, cause the running configure to be aborted
10578# by default if the 'rm' program in use doesn't match our expectations; the
10579# user can still override this though.
10580if rm -f && rm -fr && rm -rf; then : OK; else
10581  cat >&2 <<'END'
10582Oops!
10583
10584Your 'rm' program seems unable to run without file operands specified
10585on the command line, even when the '-f' option is present.  This is contrary
10586to the behaviour of most rm programs out there, and not conforming with
10587the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
10588
10589Please tell bug-automake@gnu.org about your system, including the value
10590of your $PATH and any error possibly output before this message.  This
10591can help us improve future automake versions.
10592
10593END
10594  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
10595    echo 'Configuration will proceed anyway, since you have set the' >&2
10596    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
10597    echo >&2
10598  else
10599    cat >&2 <<'END'
10600Aborting the configuration process, to ensure you take notice of the issue.
10601
10602You can download and install GNU coreutils to get an 'rm' implementation
10603that behaves properly: <http://www.gnu.org/software/coreutils/>.
10604
10605If you want to complete the configuration process using your problematic
10606'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
10607to "yes", and re-run configure.
10608
10609END
10610    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
10611  fi
10612fi
10613dnl The trailing newline in this macro's definition is deliberate, for
10614dnl backward compatibility and to allow trailing 'dnl'-style comments
10615dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
10616])
10617
10618dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
10619dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
10620dnl mangled by Autoconf and run in a shell conditional statement.
10621m4_define([_AC_COMPILER_EXEEXT],
10622m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
10623
10624# When config.status generates a header, we must update the stamp-h file.
10625# This file resides in the same directory as the config header
10626# that is generated.  The stamp files are numbered to have different names.
10627
10628# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
10629# loop where config.status creates the headers, so we can generate
10630# our stamp files there.
10631AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
10632[# Compute $1's index in $config_headers.
10633_am_arg=$1
10634_am_stamp_count=1
10635for _am_header in $config_headers :; do
10636  case $_am_header in
10637    $_am_arg | $_am_arg:* )
10638      break ;;
10639    * )
10640      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
10641  esac
10642done
10643echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
10644
10645# Copyright (C) 2001-2017 Free Software Foundation, Inc.
10646#
10647# This file is free software; the Free Software Foundation
10648# gives unlimited permission to copy and/or distribute it,
10649# with or without modifications, as long as this notice is preserved.
10650
10651# AM_PROG_INSTALL_SH
10652# ------------------
10653# Define $install_sh.
10654AC_DEFUN([AM_PROG_INSTALL_SH],
10655[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10656if test x"${install_sh+set}" != xset; then
10657  case $am_aux_dir in
10658  *\ * | *\	*)
10659    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
10660  *)
10661    install_sh="\${SHELL} $am_aux_dir/install-sh"
10662  esac
10663fi
10664AC_SUBST([install_sh])])
10665
10666# Copyright (C) 2003-2017 Free Software Foundation, Inc.
10667#
10668# This file is free software; the Free Software Foundation
10669# gives unlimited permission to copy and/or distribute it,
10670# with or without modifications, as long as this notice is preserved.
10671
10672# Check whether the underlying file-system supports filenames
10673# with a leading dot.  For instance MS-DOS doesn't.
10674AC_DEFUN([AM_SET_LEADING_DOT],
10675[rm -rf .tst 2>/dev/null
10676mkdir .tst 2>/dev/null
10677if test -d .tst; then
10678  am__leading_dot=.
10679else
10680  am__leading_dot=_
10681fi
10682rmdir .tst 2>/dev/null
10683AC_SUBST([am__leading_dot])])
10684
10685# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
10686# From Jim Meyering
10687
10688# Copyright (C) 1996-2017 Free Software Foundation, Inc.
10689#
10690# This file is free software; the Free Software Foundation
10691# gives unlimited permission to copy and/or distribute it,
10692# with or without modifications, as long as this notice is preserved.
10693
10694# AM_MAINTAINER_MODE([DEFAULT-MODE])
10695# ----------------------------------
10696# Control maintainer-specific portions of Makefiles.
10697# Default is to disable them, unless 'enable' is passed literally.
10698# For symmetry, 'disable' may be passed as well.  Anyway, the user
10699# can override the default with the --enable/--disable switch.
10700AC_DEFUN([AM_MAINTAINER_MODE],
10701[m4_case(m4_default([$1], [disable]),
10702       [enable], [m4_define([am_maintainer_other], [disable])],
10703       [disable], [m4_define([am_maintainer_other], [enable])],
10704       [m4_define([am_maintainer_other], [enable])
10705        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
10706AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
10707  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
10708  AC_ARG_ENABLE([maintainer-mode],
10709    [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
10710      am_maintainer_other[ make rules and dependencies not useful
10711      (and sometimes confusing) to the casual installer])],
10712    [USE_MAINTAINER_MODE=$enableval],
10713    [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
10714  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
10715  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
10716  MAINT=$MAINTAINER_MODE_TRUE
10717  AC_SUBST([MAINT])dnl
10718]
10719)
10720
10721# Check to see how 'make' treats includes.	            -*- Autoconf -*-
10722
10723# Copyright (C) 2001-2017 Free Software Foundation, Inc.
10724#
10725# This file is free software; the Free Software Foundation
10726# gives unlimited permission to copy and/or distribute it,
10727# with or without modifications, as long as this notice is preserved.
10728
10729# AM_MAKE_INCLUDE()
10730# -----------------
10731# Check to see how make treats includes.
10732AC_DEFUN([AM_MAKE_INCLUDE],
10733[am_make=${MAKE-make}
10734cat > confinc << 'END'
10735am__doit:
10736	@echo this is the am__doit target
10737.PHONY: am__doit
10738END
10739# If we don't find an include directive, just comment out the code.
10740AC_MSG_CHECKING([for style of include used by $am_make])
10741am__include="#"
10742am__quote=
10743_am_result=none
10744# First try GNU make style include.
10745echo "include confinc" > confmf
10746# Ignore all kinds of additional output from 'make'.
10747case `$am_make -s -f confmf 2> /dev/null` in #(
10748*the\ am__doit\ target*)
10749  am__include=include
10750  am__quote=
10751  _am_result=GNU
10752  ;;
10753esac
10754# Now try BSD make style include.
10755if test "$am__include" = "#"; then
10756   echo '.include "confinc"' > confmf
10757   case `$am_make -s -f confmf 2> /dev/null` in #(
10758   *the\ am__doit\ target*)
10759     am__include=.include
10760     am__quote="\""
10761     _am_result=BSD
10762     ;;
10763   esac
10764fi
10765AC_SUBST([am__include])
10766AC_SUBST([am__quote])
10767AC_MSG_RESULT([$_am_result])
10768rm -f confinc confmf
10769])
10770
10771# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
10772
10773# Copyright (C) 1997-2017 Free Software Foundation, Inc.
10774#
10775# This file is free software; the Free Software Foundation
10776# gives unlimited permission to copy and/or distribute it,
10777# with or without modifications, as long as this notice is preserved.
10778
10779# AM_MISSING_PROG(NAME, PROGRAM)
10780# ------------------------------
10781AC_DEFUN([AM_MISSING_PROG],
10782[AC_REQUIRE([AM_MISSING_HAS_RUN])
10783$1=${$1-"${am_missing_run}$2"}
10784AC_SUBST($1)])
10785
10786# AM_MISSING_HAS_RUN
10787# ------------------
10788# Define MISSING if not defined so far and test if it is modern enough.
10789# If it is, set am_missing_run to use it, otherwise, to nothing.
10790AC_DEFUN([AM_MISSING_HAS_RUN],
10791[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10792AC_REQUIRE_AUX_FILE([missing])dnl
10793if test x"${MISSING+set}" != xset; then
10794  case $am_aux_dir in
10795  *\ * | *\	*)
10796    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
10797  *)
10798    MISSING="\${SHELL} $am_aux_dir/missing" ;;
10799  esac
10800fi
10801# Use eval to expand $SHELL
10802if eval "$MISSING --is-lightweight"; then
10803  am_missing_run="$MISSING "
10804else
10805  am_missing_run=
10806  AC_MSG_WARN(['missing' script is too old or missing])
10807fi
10808])
10809
10810# Helper functions for option handling.                     -*- Autoconf -*-
10811
10812# Copyright (C) 2001-2017 Free Software Foundation, Inc.
10813#
10814# This file is free software; the Free Software Foundation
10815# gives unlimited permission to copy and/or distribute it,
10816# with or without modifications, as long as this notice is preserved.
10817
10818# _AM_MANGLE_OPTION(NAME)
10819# -----------------------
10820AC_DEFUN([_AM_MANGLE_OPTION],
10821[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
10822
10823# _AM_SET_OPTION(NAME)
10824# --------------------
10825# Set option NAME.  Presently that only means defining a flag for this option.
10826AC_DEFUN([_AM_SET_OPTION],
10827[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
10828
10829# _AM_SET_OPTIONS(OPTIONS)
10830# ------------------------
10831# OPTIONS is a space-separated list of Automake options.
10832AC_DEFUN([_AM_SET_OPTIONS],
10833[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
10834
10835# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
10836# -------------------------------------------
10837# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
10838AC_DEFUN([_AM_IF_OPTION],
10839[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
10840
10841# Copyright (C) 1999-2017 Free Software Foundation, Inc.
10842#
10843# This file is free software; the Free Software Foundation
10844# gives unlimited permission to copy and/or distribute it,
10845# with or without modifications, as long as this notice is preserved.
10846
10847# _AM_PROG_CC_C_O
10848# ---------------
10849# Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
10850# to automatically call this.
10851AC_DEFUN([_AM_PROG_CC_C_O],
10852[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10853AC_REQUIRE_AUX_FILE([compile])dnl
10854AC_LANG_PUSH([C])dnl
10855AC_CACHE_CHECK(
10856  [whether $CC understands -c and -o together],
10857  [am_cv_prog_cc_c_o],
10858  [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
10859  # Make sure it works both with $CC and with simple cc.
10860  # Following AC_PROG_CC_C_O, we do the test twice because some
10861  # compilers refuse to overwrite an existing .o file with -o,
10862  # though they will create one.
10863  am_cv_prog_cc_c_o=yes
10864  for am_i in 1 2; do
10865    if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
10866         && test -f conftest2.$ac_objext; then
10867      : OK
10868    else
10869      am_cv_prog_cc_c_o=no
10870      break
10871    fi
10872  done
10873  rm -f core conftest*
10874  unset am_i])
10875if test "$am_cv_prog_cc_c_o" != yes; then
10876   # Losing compiler, so override with the script.
10877   # FIXME: It is wrong to rewrite CC.
10878   # But if we don't then we get into trouble of one sort or another.
10879   # A longer-term fix would be to have automake use am__CC in this case,
10880   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
10881   CC="$am_aux_dir/compile $CC"
10882fi
10883AC_LANG_POP([C])])
10884
10885# For backward compatibility.
10886AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
10887
10888# Copyright (C) 2001-2017 Free Software Foundation, Inc.
10889#
10890# This file is free software; the Free Software Foundation
10891# gives unlimited permission to copy and/or distribute it,
10892# with or without modifications, as long as this notice is preserved.
10893
10894# AM_RUN_LOG(COMMAND)
10895# -------------------
10896# Run COMMAND, save the exit status in ac_status, and log it.
10897# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
10898AC_DEFUN([AM_RUN_LOG],
10899[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
10900   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
10901   ac_status=$?
10902   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
10903   (exit $ac_status); }])
10904
10905# Check to make sure that the build environment is sane.    -*- Autoconf -*-
10906
10907# Copyright (C) 1996-2017 Free Software Foundation, Inc.
10908#
10909# This file is free software; the Free Software Foundation
10910# gives unlimited permission to copy and/or distribute it,
10911# with or without modifications, as long as this notice is preserved.
10912
10913# AM_SANITY_CHECK
10914# ---------------
10915AC_DEFUN([AM_SANITY_CHECK],
10916[AC_MSG_CHECKING([whether build environment is sane])
10917# Reject unsafe characters in $srcdir or the absolute working directory
10918# name.  Accept space and tab only in the latter.
10919am_lf='
10920'
10921case `pwd` in
10922  *[[\\\"\#\$\&\'\`$am_lf]]*)
10923    AC_MSG_ERROR([unsafe absolute working directory name]);;
10924esac
10925case $srcdir in
10926  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
10927    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
10928esac
10929
10930# Do 'set' in a subshell so we don't clobber the current shell's
10931# arguments.  Must try -L first in case configure is actually a
10932# symlink; some systems play weird games with the mod time of symlinks
10933# (eg FreeBSD returns the mod time of the symlink's containing
10934# directory).
10935if (
10936   am_has_slept=no
10937   for am_try in 1 2; do
10938     echo "timestamp, slept: $am_has_slept" > conftest.file
10939     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
10940     if test "$[*]" = "X"; then
10941	# -L didn't work.
10942	set X `ls -t "$srcdir/configure" conftest.file`
10943     fi
10944     if test "$[*]" != "X $srcdir/configure conftest.file" \
10945	&& test "$[*]" != "X conftest.file $srcdir/configure"; then
10946
10947	# If neither matched, then we have a broken ls.  This can happen
10948	# if, for instance, CONFIG_SHELL is bash and it inherits a
10949	# broken ls alias from the environment.  This has actually
10950	# happened.  Such a system could not be considered "sane".
10951	AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
10952  alias in your environment])
10953     fi
10954     if test "$[2]" = conftest.file || test $am_try -eq 2; then
10955       break
10956     fi
10957     # Just in case.
10958     sleep 1
10959     am_has_slept=yes
10960   done
10961   test "$[2]" = conftest.file
10962   )
10963then
10964   # Ok.
10965   :
10966else
10967   AC_MSG_ERROR([newly created file is older than distributed files!
10968Check your system clock])
10969fi
10970AC_MSG_RESULT([yes])
10971# If we didn't sleep, we still need to ensure time stamps of config.status and
10972# generated files are strictly newer.
10973am_sleep_pid=
10974if grep 'slept: no' conftest.file >/dev/null 2>&1; then
10975  ( sleep 1 ) &
10976  am_sleep_pid=$!
10977fi
10978AC_CONFIG_COMMANDS_PRE(
10979  [AC_MSG_CHECKING([that generated files are newer than configure])
10980   if test -n "$am_sleep_pid"; then
10981     # Hide warnings about reused PIDs.
10982     wait $am_sleep_pid 2>/dev/null
10983   fi
10984   AC_MSG_RESULT([done])])
10985rm -f conftest.file
10986])
10987
10988# Copyright (C) 2009-2017 Free Software Foundation, Inc.
10989#
10990# This file is free software; the Free Software Foundation
10991# gives unlimited permission to copy and/or distribute it,
10992# with or without modifications, as long as this notice is preserved.
10993
10994# AM_SILENT_RULES([DEFAULT])
10995# --------------------------
10996# Enable less verbose build rules; with the default set to DEFAULT
10997# ("yes" being less verbose, "no" or empty being verbose).
10998AC_DEFUN([AM_SILENT_RULES],
10999[AC_ARG_ENABLE([silent-rules], [dnl
11000AS_HELP_STRING(
11001  [--enable-silent-rules],
11002  [less verbose build output (undo: "make V=1")])
11003AS_HELP_STRING(
11004  [--disable-silent-rules],
11005  [verbose build output (undo: "make V=0")])dnl
11006])
11007case $enable_silent_rules in @%:@ (((
11008  yes) AM_DEFAULT_VERBOSITY=0;;
11009   no) AM_DEFAULT_VERBOSITY=1;;
11010    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
11011esac
11012dnl
11013dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
11014dnl do not support nested variable expansions.
11015dnl See automake bug#9928 and bug#10237.
11016am_make=${MAKE-make}
11017AC_CACHE_CHECK([whether $am_make supports nested variables],
11018   [am_cv_make_support_nested_variables],
11019   [if AS_ECHO([['TRUE=$(BAR$(V))
11020BAR0=false
11021BAR1=true
11022V=1
11023am__doit:
11024	@$(TRUE)
11025.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
11026  am_cv_make_support_nested_variables=yes
11027else
11028  am_cv_make_support_nested_variables=no
11029fi])
11030if test $am_cv_make_support_nested_variables = yes; then
11031  dnl Using '$V' instead of '$(V)' breaks IRIX make.
11032  AM_V='$(V)'
11033  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
11034else
11035  AM_V=$AM_DEFAULT_VERBOSITY
11036  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
11037fi
11038AC_SUBST([AM_V])dnl
11039AM_SUBST_NOTMAKE([AM_V])dnl
11040AC_SUBST([AM_DEFAULT_V])dnl
11041AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
11042AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
11043AM_BACKSLASH='\'
11044AC_SUBST([AM_BACKSLASH])dnl
11045_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
11046])
11047
11048# Copyright (C) 2001-2017 Free Software Foundation, Inc.
11049#
11050# This file is free software; the Free Software Foundation
11051# gives unlimited permission to copy and/or distribute it,
11052# with or without modifications, as long as this notice is preserved.
11053
11054# AM_PROG_INSTALL_STRIP
11055# ---------------------
11056# One issue with vendor 'install' (even GNU) is that you can't
11057# specify the program used to strip binaries.  This is especially
11058# annoying in cross-compiling environments, where the build's strip
11059# is unlikely to handle the host's binaries.
11060# Fortunately install-sh will honor a STRIPPROG variable, so we
11061# always use install-sh in "make install-strip", and initialize
11062# STRIPPROG with the value of the STRIP variable (set by the user).
11063AC_DEFUN([AM_PROG_INSTALL_STRIP],
11064[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
11065# Installed binaries are usually stripped using 'strip' when the user
11066# run "make install-strip".  However 'strip' might not be the right
11067# tool to use in cross-compilation environments, therefore Automake
11068# will honor the 'STRIP' environment variable to overrule this program.
11069dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
11070if test "$cross_compiling" != no; then
11071  AC_CHECK_TOOL([STRIP], [strip], :)
11072fi
11073INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
11074AC_SUBST([INSTALL_STRIP_PROGRAM])])
11075
11076# Copyright (C) 2006-2017 Free Software Foundation, Inc.
11077#
11078# This file is free software; the Free Software Foundation
11079# gives unlimited permission to copy and/or distribute it,
11080# with or without modifications, as long as this notice is preserved.
11081
11082# _AM_SUBST_NOTMAKE(VARIABLE)
11083# ---------------------------
11084# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
11085# This macro is traced by Automake.
11086AC_DEFUN([_AM_SUBST_NOTMAKE])
11087
11088# AM_SUBST_NOTMAKE(VARIABLE)
11089# --------------------------
11090# Public sister of _AM_SUBST_NOTMAKE.
11091AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
11092
11093# Check how to create a tarball.                            -*- Autoconf -*-
11094
11095# Copyright (C) 2004-2017 Free Software Foundation, Inc.
11096#
11097# This file is free software; the Free Software Foundation
11098# gives unlimited permission to copy and/or distribute it,
11099# with or without modifications, as long as this notice is preserved.
11100
11101# _AM_PROG_TAR(FORMAT)
11102# --------------------
11103# Check how to create a tarball in format FORMAT.
11104# FORMAT should be one of 'v7', 'ustar', or 'pax'.
11105#
11106# Substitute a variable $(am__tar) that is a command
11107# writing to stdout a FORMAT-tarball containing the directory
11108# $tardir.
11109#     tardir=directory && $(am__tar) > result.tar
11110#
11111# Substitute a variable $(am__untar) that extract such
11112# a tarball read from stdin.
11113#     $(am__untar) < result.tar
11114#
11115AC_DEFUN([_AM_PROG_TAR],
11116[# Always define AMTAR for backward compatibility.  Yes, it's still used
11117# in the wild :-(  We should find a proper way to deprecate it ...
11118AC_SUBST([AMTAR], ['$${TAR-tar}'])
11119
11120# We'll loop over all known methods to create a tar archive until one works.
11121_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
11122
11123m4_if([$1], [v7],
11124  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
11125
11126  [m4_case([$1],
11127    [ustar],
11128     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
11129      # There is notably a 21 bits limit for the UID and the GID.  In fact,
11130      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
11131      # and bug#13588).
11132      am_max_uid=2097151 # 2^21 - 1
11133      am_max_gid=$am_max_uid
11134      # The $UID and $GID variables are not portable, so we need to resort
11135      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
11136      # below are definitely unexpected, so allow the users to see them
11137      # (that is, avoid stderr redirection).
11138      am_uid=`id -u || echo unknown`
11139      am_gid=`id -g || echo unknown`
11140      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
11141      if test $am_uid -le $am_max_uid; then
11142         AC_MSG_RESULT([yes])
11143      else
11144         AC_MSG_RESULT([no])
11145         _am_tools=none
11146      fi
11147      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
11148      if test $am_gid -le $am_max_gid; then
11149         AC_MSG_RESULT([yes])
11150      else
11151        AC_MSG_RESULT([no])
11152        _am_tools=none
11153      fi],
11154
11155  [pax],
11156    [],
11157
11158  [m4_fatal([Unknown tar format])])
11159
11160  AC_MSG_CHECKING([how to create a $1 tar archive])
11161
11162  # Go ahead even if we have the value already cached.  We do so because we
11163  # need to set the values for the 'am__tar' and 'am__untar' variables.
11164  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
11165
11166  for _am_tool in $_am_tools; do
11167    case $_am_tool in
11168    gnutar)
11169      for _am_tar in tar gnutar gtar; do
11170        AM_RUN_LOG([$_am_tar --version]) && break
11171      done
11172      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
11173      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
11174      am__untar="$_am_tar -xf -"
11175      ;;
11176    plaintar)
11177      # Must skip GNU tar: if it does not support --format= it doesn't create
11178      # ustar tarball either.
11179      (tar --version) >/dev/null 2>&1 && continue
11180      am__tar='tar chf - "$$tardir"'
11181      am__tar_='tar chf - "$tardir"'
11182      am__untar='tar xf -'
11183      ;;
11184    pax)
11185      am__tar='pax -L -x $1 -w "$$tardir"'
11186      am__tar_='pax -L -x $1 -w "$tardir"'
11187      am__untar='pax -r'
11188      ;;
11189    cpio)
11190      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
11191      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
11192      am__untar='cpio -i -H $1 -d'
11193      ;;
11194    none)
11195      am__tar=false
11196      am__tar_=false
11197      am__untar=false
11198      ;;
11199    esac
11200
11201    # If the value was cached, stop now.  We just wanted to have am__tar
11202    # and am__untar set.
11203    test -n "${am_cv_prog_tar_$1}" && break
11204
11205    # tar/untar a dummy directory, and stop if the command works.
11206    rm -rf conftest.dir
11207    mkdir conftest.dir
11208    echo GrepMe > conftest.dir/file
11209    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
11210    rm -rf conftest.dir
11211    if test -s conftest.tar; then
11212      AM_RUN_LOG([$am__untar <conftest.tar])
11213      AM_RUN_LOG([cat conftest.dir/file])
11214      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
11215    fi
11216  done
11217  rm -rf conftest.dir
11218
11219  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
11220  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
11221
11222AC_SUBST([am__tar])
11223AC_SUBST([am__untar])
11224]) # _AM_PROG_TAR
11225
11226dnl Copyright (c) 2002-2015
11227dnl         The Xfce development team. All rights reserved.
11228dnl
11229dnl Written for Xfce by Benedikt Meurer <benny@xfce.org>.
11230dnl
11231dnl This program is free software; you can redistribute it and/or modify
11232dnl it under the terms of the GNU General Public License as published by
11233dnl the Free Software Foundation; either version 2 of the License, or
11234dnl (at your option) any later version.
11235dnl
11236dnl This program is distributed in the hope that it will be useful,
11237dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11238dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11239dnl GNU General Public License for more details.
11240dnl
11241dnl You should have received a copy of the GNU General Public License along
11242dnl with this program; if not, write to the Free Software Foundation, Inc.,
11243dnl 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
11244dnl
11245dnl xdt-depends
11246dnl -----------
11247dnl  Contains M4 macros to check for software dependencies.
11248dnl  Partly based on prior work of the XDG contributors.
11249dnl
11250
11251
11252
11253dnl We need recent a autoconf version
11254AC_PREREQ([2.60])
11255
11256
11257
11258dnl XDT_PROG_PKG_CONFIG()
11259dnl
11260dnl Checks for the freedesktop.org pkg-config
11261dnl utility and sets the PKG_CONFIG environment
11262dnl variable to the full path if found.
11263dnl
11264AC_DEFUN([XDT_PROG_PKG_CONFIG],
11265[
11266  # minimum supported version of pkg-config
11267  xdt_cv_PKG_CONFIG_MIN_VERSION=0.9.0
11268
11269  m4_ifdef([PKG_PROG_PKG_CONFIG],
11270    [
11271      PKG_PROG_PKG_CONFIG([$xdt_cv_PKG_CONFIG_MIN_VERSION])
11272
11273      if test x"$PKG_CONFIG" = x""; then
11274        echo
11275        echo "*** Your version of pkg-config is too old. You need atleast"
11276        echo "*** pkg-config $xdt_cv_PKG_CONFIG_MIN_VERSION or newer. You can download pkg-config"
11277        echo "*** from the freedesktop.org software repository at"
11278        echo "***"
11279        echo "***    http://www.freedesktop.org/software/pkgconfig"
11280        echo "***"
11281        exit 1;
11282      fi
11283    ],
11284    [
11285      echo
11286      echo "*** The pkg-config utility could not be found on your system."
11287      echo "*** Make sure it is in your path, or set the PKG_CONFIG"
11288      echo "*** environment variable to the full path to pkg-config."
11289      echo "*** You can download pkg-config from the freedesktop.org"
11290      echo "*** software repository at"
11291      echo "***"
11292      echo "***    http://www.freedesktop.org/software/pkgconfig"
11293      echo "***"
11294      exit 1
11295    ])
11296])
11297
11298
11299
11300dnl XDT_CHECK_PACKAGE(varname, package, version, [action-if], [action-if-not])
11301dnl
11302dnl Checks if "package" >= "version" is installed on the
11303dnl target system, using the pkg-config utility. If the
11304dnl dependency is met, "varname"_CFLAGS, "varname"_LIBS,
11305dnl "varname"_VERSION and "varname"_REQUIRED_VERSION
11306dnl will be set and marked for substition.
11307dnl
11308dnl "varname"_REQUIRED_VERSION will be set to the value of
11309dnl "version". This is mostly useful to automatically
11310dnl place the correct version information into the RPM
11311dnl .spec file.
11312dnl
11313dnl In addition, if the dependency is met, "action-if" will
11314dnl be executed if given.
11315dnl
11316dnl If the package check fails, "action-if-not" will be
11317dnl executed. If this parameter isn't specified, a diagnostic
11318dnl message will be printed and the configure script will
11319dnl be terminated with exit code 1.
11320dnl
11321AC_DEFUN([XDT_CHECK_PACKAGE],
11322[
11323  XDT_PROG_PKG_CONFIG()
11324
11325  AC_MSG_CHECKING([for $2 >= $3])
11326  if $PKG_CONFIG "--atleast-version=$3" "$2" >/dev/null 2>&1; then
11327    $1_VERSION=`$PKG_CONFIG --modversion "$2"`
11328    AC_MSG_RESULT([$$1_VERSION])
11329
11330    AC_MSG_CHECKING([$1_CFLAGS])
11331    $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
11332    AC_MSG_RESULT([$$1_CFLAGS])
11333
11334    AC_MSG_CHECKING([$1_LIBS])
11335    $1_LIBS=`$PKG_CONFIG --libs "$2"`
11336    AC_MSG_RESULT([$$1_LIBS])
11337
11338    $1_REQUIRED_VERSION=$3
11339
11340    AC_SUBST([$1_VERSION])
11341    AC_SUBST([$1_CFLAGS])
11342    AC_SUBST([$1_LIBS])
11343    AC_SUBST([$1_REQUIRED_VERSION])
11344
11345    ifelse([$4], , , [$4])
11346  elif $PKG_CONFIG --exists "$2" >/dev/null 2>&1; then
11347    xdt_cv_version=`$PKG_CONFIG --modversion "$2"`
11348    AC_MSG_RESULT([found, but $xdt_cv_version])
11349
11350    ifelse([$5], ,
11351    [
11352      echo "*** The required package $2 was found on your system,"
11353      echo "*** but the installed version ($xdt_cv_version) is too old."
11354      echo "*** Please upgrade $2 to atleast version $3, or adjust"
11355      echo "*** the PKG_CONFIG_PATH environment variable if you installed"
11356      echo "*** the new version of the package in a nonstandard prefix so"
11357      echo "*** pkg-config is able to find it."
11358      exit 1
11359    ], [$5])
11360  else
11361    AC_MSG_RESULT([not found])
11362
11363    ifelse([$5], ,
11364    [
11365      echo "*** The required package $2 was not found on your system."
11366      echo "*** Please install $2 (atleast version $3) or adjust"
11367      echo "*** the PKG_CONFIG_PATH environment variable if you"
11368      echo "*** installed the package in a nonstandard prefix so that"
11369      echo "*** pkg-config is able to find it."
11370      exit 1
11371    ], [$5])
11372  fi
11373])
11374
11375
11376
11377dnl XDT_CHECK_OPTIONAL_PACKAGE(varname, package, version, optionname, helpstring, [default])
11378dnl
11379dnl Checks for an optional dependency on "package" >= "version". "default"
11380dnl can be "yes" or "no" (defaults to "yes" if not specified) and controls
11381dnl whether configure should check this dependency by default, or only if
11382dnl the user explicitly enables it using a command line switch.
11383dnl
11384dnl This macro automatically adds a commandline switch based on the "optionname"
11385dnl parameter (--enable-optionname/--disable-optionname), which allows the
11386dnl user to explicitly control whether this optional dependency should be
11387dnl enabled or not. The "helpstring" parameter gives a brief(!) description
11388dnl about this dependency.
11389dnl
11390dnl If the user chose to enable this dependency and the required package
11391dnl was found, this macro defines the variable "varname"_FOUND and sets it
11392dnl to the string "yes", in addition to the 4 variables set by XDT_CHECK_PACKAGE.
11393dnl But "varname"_FOUND will not be marked for substition. Furthermore,
11394dnl a CPP define HAVE_"varname" will be placed in config.h (or added to
11395dnl the cc command line, depending on your configure.ac) and set to
11396dnl 1.
11397dnl
11398AC_DEFUN([XDT_CHECK_OPTIONAL_PACKAGE],
11399[
11400  AC_REQUIRE([XDT_PROG_PKG_CONFIG])
11401
11402  AC_ARG_ENABLE([$4],
11403AC_HELP_STRING([--enable-$4], [Enable checking for $5 (default=m4_default([$6], [yes]))])
11404AC_HELP_STRING([--disable-$4], [Disable checking for $5]),
11405    [xdt_cv_$1_check=$enableval], [xdt_cv_$1_check=m4_default([$6], [yes])])
11406
11407  if test x"$xdt_cv_$1_check" = x"yes"; then
11408    if $PKG_CONFIG --exists "$2 >= $3" >/dev/null 2>&1; then
11409      XDT_CHECK_PACKAGE([$1], [$2], [$3],
11410      [
11411        AC_DEFINE([HAVE_$1], [1], [Define if $2 >= $3 present])
11412        $1_FOUND="yes"
11413      ])
11414    else
11415      AC_MSG_CHECKING([for optional package $2 >= $3])
11416      AC_MSG_RESULT([not found])
11417    fi
11418  else
11419    AC_MSG_CHECKING([for optional package $2])
11420    AC_MSG_RESULT([disabled])
11421  fi
11422
11423  AM_CONDITIONAL([HAVE_$1], [test x"$$1_FOUND" = x"yes"])
11424])
11425
11426
11427
11428dnl XDT_CHECK_LIBX11()
11429dnl
11430dnl Executes various checks for X11. Sets LIBX11_CFLAGS, LIBX11_LDFLAGS
11431dnl and LIBX11_LIBS (and marks them for substitution). In addition
11432dnl HAVE_LIBX11 is set to 1 in config.h, if the X window system and
11433dnl the development files are detected on the target system.
11434dnl
11435AC_DEFUN([XDT_CHECK_LIBX11],
11436[
11437  AC_REQUIRE([AC_PATH_XTRA])
11438
11439  LIBX11_CFLAGS= LIBX11_LDFLAGS= LIBX11_LIBS=
11440  if test x"$no_x" != x"yes"; then
11441    AC_CHECK_LIB([X11], [main],
11442    [
11443      AC_DEFINE([HAVE_LIBX11], [1], [Define if libX11 is available])
11444      LIBX11_CFLAGS="$X_CFLAGS"
11445      for option in $X_PRE_LIBS $X_EXTRA_LIBS $X_LIBS; do
11446      	case "$option" in
11447        -L*)
11448          path=`echo $option | sed 's/^-L//'`
11449          if test x"$path" != x""; then
11450            LIBX11_LDFLAGS="$LIBX11_LDFLAGS -L$path"
11451          fi
11452          ;;
11453        *)
11454          LIBX11_LIBS="$LIBX11_LIBS $option"
11455          ;;
11456        esac
11457      done
11458      if ! echo $LIBX11_LIBS | grep -- '-lX11' >/dev/null; then
11459        LIBX11_LIBS="$LIBX11_LIBS -lX11"
11460      fi
11461    ], [], [$X_CFLAGS $X_PRE_LIBS $X_EXTRA_LIBS $X_LIBS])
11462  fi
11463  AC_SUBST([LIBX11_CFLAGS])
11464  AC_SUBST([LIBX11_LDFLAGS])
11465  AC_SUBST([LIBX11_LIBS])
11466])
11467
11468
11469
11470dnl XDT_CHECK_LIBX11_REQUIRE()
11471dnl
11472dnl Similar to XDT_CHECK_LIBX11(), but terminates with an error if
11473dnl the X window system and development files aren't detected on the
11474dnl target system.
11475dnl
11476AC_DEFUN([XDT_CHECK_LIBX11_REQUIRE],
11477[
11478  AC_REQUIRE([XDT_CHECK_LIBX11])
11479
11480  if test x"$no_x" = x"yes"; then
11481    AC_MSG_ERROR([X Window system libraries and header files are required])
11482  fi
11483])
11484
11485
11486
11487dnl XDT_CHECK_LIBSM()
11488dnl
11489dnl Checks whether the session management library is present on the
11490dnl target system, and sets LIBSM_CFLAGS, LIBSM_LDFLAGS and LIBSM_LIBS
11491dnl properly. In addition, HAVE_LIBSM will be set to 1 in config.h
11492dnl if libSM is detected.
11493dnl
11494AC_DEFUN([XDT_CHECK_LIBSM],
11495[
11496  AC_REQUIRE([XDT_CHECK_LIBX11])
11497
11498  LIBSM_CFLAGS= LIBSM_LDFLAGS= LIBSM_LIBS=
11499  if test x"$no_x" != x"yes"; then
11500    AC_CHECK_LIB([SM], [SmcSaveYourselfDone],
11501    [
11502      AC_DEFINE([HAVE_LIBSM], [1], [Define if libSM is available])
11503      LIBSM_CFLAGS="$LIBX11_CFLAGS"
11504      LIBSM_LDFLAGS="$LIBX11_LDFLAGS"
11505      LIBSM_LIBS="$LIBX11_LIBS"
11506      if ! echo $LIBSM_LIBS | grep -- '-lSM' >/dev/null; then
11507        LIBSM_LIBS="$LIBSM_LIBS -lSM -lICE"
11508      fi
11509    ], [], [$LIBX11_CFLAGS $LIBX11_LDFLAGS $LIBX11_LIBS -lICE])
11510  fi
11511  AC_SUBST([LIBSM_CFLAGS])
11512  AC_SUBST([LIBSM_LDFLAGS])
11513  AC_SUBST([LIBSM_LIBS])
11514])
11515
11516
11517
11518dnl XDT_CHECK_LIBXPM()
11519dnl
11520dnl Checks if the Xpm library is present on the target system, and
11521dnl sets LIBXPM_CFLAGS, LIBXPM_LDFLAGS and LIBXPM_LIBS. In addition,
11522dnl HAVE_LIBXPM will be set to 1 in config.h if libXpm is detected.
11523dnl
11524AC_DEFUN([XDT_CHECK_LIBXPM],
11525[
11526  AC_REQUIRE([XDT_CHECK_LIBX11])
11527
11528  LIBXPM_CFLAGS= LIBXPM_LDFLAGS= LIBXPM_LIBS=
11529  if test "$no_x" != "yes"; then
11530    AC_CHECK_LIB([Xpm], [main],
11531    [
11532      AC_DEFINE([HAVE_LIBXPM], [1], [Define if libXpm is available])
11533      LIBXPM_CFLAGS="$LIBX11_CFLAGS"
11534      LIBXPM_LDFLAGS="$LIBX11_LDFLAGS"
11535      LIBXPM_LIBS="$LIBX11_LIBS"
11536      if ! echo $LIBXPM_LIBS | grep -- '-lXpm' >/dev/null; then
11537        LIBXPM_LIBS="$LIBXPM_LIBS -lXpm"
11538      fi
11539    ], [], [$LIBX11_CFLAGS $LIBX11_LDFLAGS $LIBX11_LIBS -lXpm])
11540  fi
11541  AC_SUBST([LIBXPM_CFLAGS])
11542  AC_SUBST([LIBXPM_LDFLAGS])
11543  AC_SUBST([LIBXPM_LIBS])
11544])
11545
11546
11547
11548dnl XDT_CHECK_LIBXPM_REQUIRE()
11549dnl
11550dnl Similar to XDT_CHECK_LIBXPM(), but fails if the Xpm library isn't
11551dnl present on the target system.
11552dnl
11553AC_DEFUN([XDT_CHECK_LIBXPM_REQUIRE],
11554[
11555  AC_REQUIRE([XDT_CHECK_LIBX11_REQUIRE])
11556  AC_REQUIRE([XDT_CHECK_LIBXPM])
11557
11558  if test x"$LIBXPM_LIBS" = x""; then
11559    AC_MSG_ERROR([The Xpm library was not found on your system])
11560  fi
11561])
11562
11563
11564dnl Copyright (c) 2002-2015
11565dnl         The Xfce development team. All rights reserved.
11566dnl
11567dnl Written for Xfce by Benedikt Meurer <benny@xfce.org>.
11568dnl
11569dnl This program is free software; you can redistribute it and/or modify
11570dnl it under the terms of the GNU General Public License as published by
11571dnl the Free Software Foundation; either version 2 of the License, or
11572dnl (at your option) any later version.
11573dnl
11574dnl This program is distributed in the hope that it will be useful,
11575dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11576dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11577dnl GNU General Public License for more details.
11578dnl
11579dnl You should have received a copy of the GNU General Public License along
11580dnl with this program; if not, write to the Free Software Foundation, Inc.,
11581dnl 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
11582dnl
11583dnl xdt-depends
11584dnl -----------
11585dnl  Contains M4 macros to check for software dependencies.
11586dnl  Partly based on prior work of the XDG contributors.
11587dnl
11588
11589
11590
11591dnl We need recent a autoconf version
11592AC_PREREQ([2.60])
11593
11594
11595dnl XDT_SUPPORTED_FLAGS(VAR, FLAGS)
11596dnl
11597dnl For each token in FLAGS, checks to be sure the compiler supports
11598dnl the flag, and if so, adds each one to VAR.
11599dnl
11600AC_DEFUN([XDT_SUPPORTED_FLAGS],
11601[
11602  for flag in $2; do
11603    AC_MSG_CHECKING([if $CC supports $flag])
11604    saved_CFLAGS="$CFLAGS"
11605    CFLAGS="$CFLAGS $flag"
11606    AC_COMPILE_IFELSE([AC_LANG_SOURCE([ ])], [flag_supported=yes], [flag_supported=no])
11607    CFLAGS="$saved_CFLAGS"
11608    AC_MSG_RESULT([$flag_supported])
11609
11610    if test "x$flag_supported" = "xyes"; then
11611      $1="$$1 $flag"
11612    fi
11613  done
11614])
11615
11616
11617
11618dnl XDT_FEATURE_DEBUG(default_level=minimum)
11619dnl
11620AC_DEFUN([XDT_FEATURE_DEBUG],
11621[
11622  dnl weird indentation to keep output indentation correct
11623  AC_ARG_ENABLE([debug],
11624                AC_HELP_STRING([--enable-debug@<:@=no|minimum|yes|full@:>@],
11625                               [Build with debugging support @<:@default=m4_default([$1], [minimum])@:>@])
11626AC_HELP_STRING([--disable-debug], [Include no debugging support]),
11627                [enable_debug=$enableval], [enable_debug=m4_default([$1], [minimum])])
11628
11629  AC_MSG_CHECKING([whether to build with debugging support])
11630  if test x"$enable_debug" = x"full" -o x"$enable_debug" = x"yes"; then
11631    AC_DEFINE([DEBUG], [1], [Define for debugging support])
11632
11633    xdt_cv_additional_CFLAGS="-DXFCE_DISABLE_DEPRECATED \
11634                              -Wall -Wextra \
11635                              -Wno-missing-field-initializers \
11636                              -Wno-unused-parameter -Wold-style-definition \
11637                              -Wdeclaration-after-statement \
11638                              -Wmissing-declarations \
11639                              -Wmissing-noreturn -Wshadow -Wpointer-arith \
11640                              -Wcast-align -Wformat -Wformat-security -Wformat-y2k \
11641                              -Winit-self -Wmissing-include-dirs -Wundef \
11642                              -Wnested-externs"
11643    CPPFLAGS="$CPPFLAGS"
11644
11645    if test x`uname` = x"Linux"; then
11646      xdt_cv_additional_CFLAGS="$xdt_cv_additional_CFLAGS -fstack-protector"
11647    fi
11648
11649    dnl # signal.h inline is crapy on openbsd
11650    if test x`uname` != x"OpenBSD"; then
11651      xdt_cv_additional_CFLAGS="$xdt_cv_additional_CFLAGS -Wredundant-decls"
11652    fi
11653
11654    if test x"$enable_debug" = x"full"; then
11655      AC_DEFINE([DEBUG_TRACE], [1], [Define for tracing support])
11656      xdt_cv_additional_CFLAGS="$xdt_cv_additional_CFLAGS -O0 -g -Werror"
11657      CPPFLAGS="$CPPFLAGS -DG_ENABLE_DEBUG"
11658      AC_MSG_RESULT([full])
11659    else
11660      xdt_cv_additional_CFLAGS="$xdt_cv_additional_CFLAGS -g"
11661      AC_MSG_RESULT([yes])
11662    fi
11663
11664    XDT_SUPPORTED_FLAGS([supported_CFLAGS], [$xdt_cv_additional_CFLAGS])
11665
11666    ifelse([$CXX], , , [
11667      dnl FIXME: should test on c++ compiler, but the following line causes
11668      dnl        autoconf errors for projects that don't check for a
11669      dnl        c++ compiler at all.
11670      dnl AC_LANG_PUSH([C++])
11671      dnl XDT_SUPPORTED_FLAGS([supported_CXXFLAGS], [$xdt_cv_additional_CFLAGS])
11672      dnl AC_LANG_POP()
11673      dnl        instead, just use supported_CFLAGS...
11674      supported_CXXFLAGS="$supported_CFLAGS"
11675    ])
11676
11677    CFLAGS="$CFLAGS $supported_CFLAGS"
11678    CXXFLAGS="$CXXFLAGS $supported_CXXFLAGS"
11679  else
11680    CPPFLAGS="$CPPFLAGS -DNDEBUG"
11681
11682    if test x"$enable_debug" = x"no"; then
11683      CPPFLAGS="$CPPFLAGS -DG_DISABLE_CAST_CHECKS -DG_DISABLE_ASSERT"
11684      AC_MSG_RESULT([no])
11685    else
11686      AC_MSG_RESULT([minimum])
11687    fi
11688  fi
11689])
11690
11691
11692dnl XDT_FEATURE_VISIBILITY()
11693dnl
11694dnl Checks to see if the compiler supports the 'visibility' attribute
11695dnl If so, adds -DHAVE_GNUC_VISIBILTY to CPPFLAGS.  Also sets the
11696dnl automake conditional HAVE_GNUC_VISIBILITY.
11697dnl
11698AC_DEFUN([XDT_FEATURE_VISIBILITY],
11699[
11700  AC_ARG_ENABLE([visibility],
11701                AC_HELP_STRING([--disable-visibility],
11702                               [Don't use ELF visibility attributes]),
11703                [enable_visibility=$enableval], [enable_visibility=yes])
11704  have_gnuc_visibility=no
11705  if test "x$enable_visibility" != "xno"; then
11706    XDT_SUPPORTED_FLAGS([xdt_vis_test_cflags], [-Wall -Werror -Wno-unused-parameter])
11707    saved_CFLAGS="$CFLAGS"
11708    CFLAGS="$CFLAGS $xdt_vis_test_cflags"
11709    AC_MSG_CHECKING([whether $CC supports the GNUC visibility attribute])
11710    AC_COMPILE_IFELSE([AC_LANG_SOURCE(
11711    [
11712      void test_default (void);
11713      void test_hidden (void);
11714
11715      void __attribute__ ((visibility("default"))) test_default (void) {}
11716      void __attribute__ ((visibility("hidden"))) test_hidden (void) {}
11717
11718      int main (int argc, char **argv) {
11719        test_default ();
11720        test_hidden ();
11721        return 0;
11722      }
11723    ])],
11724    [
11725      have_gnuc_visibility=yes
11726      AC_MSG_RESULT([yes])
11727    ],
11728    [
11729      AC_MSG_RESULT([no])
11730    ])
11731    CFLAGS="$saved_CFLAGS"
11732  fi
11733
11734  if test "x$have_gnuc_visibility" = "xyes"; then
11735    CPPFLAGS="$CPPFLAGS -DHAVE_GNUC_VISIBILITY"
11736    xdt_vis_hidden_cflags=""
11737    XDT_SUPPORTED_FLAGS([xdt_vis_hidden_cflags], [-xldscope=hidden])
11738    if test "x$xdt_vis_hidden_cflags" = "x"; then
11739      XDT_SUPPORTED_FLAGS([xdt_vis_hidden_cflags], [-fvisibility=hidden])
11740    fi
11741    CFLAGS="$CFLAGS $xdt_vis_hidden_cflags"
11742  fi
11743
11744  AM_CONDITIONAL([HAVE_GNUC_VISIBILITY], [test "x$have_gnuc_visibility" = "xyes"])
11745])
11746
11747dnl XDT_FEATURE_LINKER_OPTS
11748dnl
11749dnl Checks for and enables any special linker optimizations.
11750dnl
11751AC_DEFUN([XDT_FEATURE_LINKER_OPTS],
11752[
11753  AC_ARG_ENABLE([linker-opts],
11754                AC_HELP_STRING([--disable-linker-opts],
11755                               [Disable linker optimizations]),
11756                [enable_linker_opts=$enableval], [enable_linker_opts=yes])
11757
11758  if test "x$enable_linker_opts" != "xno"; then
11759    if test x`uname` != x"OpenBSD"; then
11760      AC_MSG_CHECKING([whether $LD accepts --as-needed])
11761      case `$LD --as-needed -v 2>&1 </dev/null` in
11762      *GNU* | *'with BFD'*)
11763        LDFLAGS="$LDFLAGS -Wl,--as-needed"
11764        AC_MSG_RESULT([yes])
11765        ;;
11766      *)
11767        AC_MSG_RESULT([no])
11768        ;;
11769      esac
11770    fi
11771    AC_MSG_CHECKING([whether $LD accepts -O1])
11772    case `$LD -O1 -v 2>&1 </dev/null` in
11773    *GNU* | *'with BFD'*)
11774      LDFLAGS="$LDFLAGS -Wl,-O1"
11775      AC_MSG_RESULT([yes])
11776      ;;
11777    *)
11778      AC_MSG_RESULT([no])
11779      ;;
11780    esac
11781  fi
11782])
11783
11784dnl Copyright (c) 2002-2015
11785dnl         The Xfce development team. All rights reserved.
11786dnl
11787dnl Written for Xfce by Benedikt Meurer <benny@xfce.org>.
11788dnl
11789dnl This program is free software; you can redistribute it and/or modify
11790dnl it under the terms of the GNU General Public License as published by
11791dnl the Free Software Foundation; either version 2 of the License, or
11792dnl (at your option) any later version.
11793dnl
11794dnl This program is distributed in the hope that it will be useful,
11795dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11796dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11797dnl GNU General Public License for more details.
11798dnl
11799dnl You should have received a copy of the GNU General Public License along
11800dnl with this program; if not, write to the Free Software Foundation, Inc.,
11801dnl 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
11802dnl
11803dnl xdt-i18n
11804dnl --------
11805dnl  Internalization M4 macros.
11806dnl
11807
11808
11809dnl XDT_I18N(LINGUAS [, PACKAGE])
11810dnl
11811dnl This macro takes care of setting up everything for i18n support.
11812dnl
11813dnl If PACKAGE isn't specified, it defaults to the package tarname; see
11814dnl the description of AC_INIT() for an explanation of what makes up
11815dnl the package tarname. Normally, you don't need to specify PACKAGE,
11816dnl but you can stick with the default.
11817dnl
11818AC_DEFUN([XDT_I18N],
11819[
11820  dnl Substitute GETTEXT_PACKAGE variable
11821  GETTEXT_PACKAGE=m4_default([$2], [AC_PACKAGE_TARNAME()])
11822  AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [Name of default gettext domain])
11823  AC_SUBST([GETTEXT_PACKAGE])
11824
11825  dnl gettext and stuff
11826  ALL_LINGUAS="$1"
11827  AM_GLIB_GNU_GETTEXT()
11828
11829  dnl This is required on some Linux systems
11830  AC_CHECK_FUNC([bind_textdomain_codeset])
11831
11832  dnl Determine where to install locale files
11833  AC_MSG_CHECKING([for locales directory])
11834  AC_ARG_WITH([locales-dir],
11835  [
11836    AC_HELP_STRING([--with-locales-dir=DIR], [Install locales into DIR])
11837  ], [localedir=$withval],
11838  [
11839    if test x"$CATOBJEXT" = x".mo"; then
11840      localedir=$libdir/locale
11841    else
11842      localedir=$datadir/locale
11843    fi
11844  ])
11845  AC_MSG_RESULT([$localedir])
11846  AC_SUBST([localedir])
11847
11848  dnl Determine additional xgettext flags
11849  AC_MSG_CHECKING([for additional xgettext flags])
11850  if test x"$XGETTEXT_ARGS" = x""; then
11851    XGETTEXT_ARGS="--keyword=Q_ --from-code=UTF-8";
11852  else
11853    XGETTEXT_ARGS="$XGETTEXT_ARGS --keyword=Q_ --from-code=UTF-8";
11854  fi
11855  AC_SUBST([XGETTEXT_ARGS])
11856  AC_MSG_RESULT([$XGETTEXT_ARGS])
11857])
11858
11859
11860