1# generated automatically by aclocal 1.15 -*- Autoconf -*-
2
3# Copyright (C) 1996-2014 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
122# GLIB_WITH_NLS
123#-----------------
124glib_DEFUN([GLIB_WITH_NLS],
125  dnl NLS is obligatory
126  [USE_NLS=yes
127    AC_SUBST(USE_NLS)
128
129    gt_cv_have_gettext=no
130
131    CATOBJEXT=NONE
132    XGETTEXT=:
133    INTLLIBS=
134
135    AC_CHECK_HEADER(libintl.h,
136     [gt_cv_func_dgettext_libintl="no"
137      libintl_extra_libs=""
138
139      #
140      # First check in libc
141      #
142      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
143        [AC_TRY_LINK([
144#include <libintl.h>
145],
146         [return !ngettext ("","", 1)],
147	  gt_cv_func_ngettext_libc=yes,
148          gt_cv_func_ngettext_libc=no)
149        ])
150
151      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
152	      AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
153        	[AC_TRY_LINK([
154#include <libintl.h>
155],
156	          [return !dgettext ("","")],
157		  gt_cv_func_dgettext_libc=yes,
158	          gt_cv_func_dgettext_libc=no)
159        	])
160      fi
161
162      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
163        AC_CHECK_FUNCS(bind_textdomain_codeset)
164      fi
165
166      #
167      # If we don't have everything we want, check in libintl
168      #
169      if test "$gt_cv_func_dgettext_libc" != "yes" \
170	 || test "$gt_cv_func_ngettext_libc" != "yes" \
171         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
172
173        AC_CHECK_LIB(intl, bindtextdomain,
174	    [AC_CHECK_LIB(intl, ngettext,
175		    [AC_CHECK_LIB(intl, dgettext,
176			          gt_cv_func_dgettext_libintl=yes)])])
177
178	if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
179	  AC_MSG_CHECKING([if -liconv is needed to use gettext])
180	  AC_MSG_RESULT([])
181  	  AC_CHECK_LIB(intl, ngettext,
182          	[AC_CHECK_LIB(intl, dcgettext,
183		       [gt_cv_func_dgettext_libintl=yes
184			libintl_extra_libs=-liconv],
185			:,-liconv)],
186		:,-liconv)
187        fi
188
189        #
190        # If we found libintl, then check in it for bind_textdomain_codeset();
191        # we'll prefer libc if neither have bind_textdomain_codeset(),
192        # and both have dgettext and ngettext
193        #
194        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
195          glib_save_LIBS="$LIBS"
196          LIBS="$LIBS -lintl $libintl_extra_libs"
197          unset ac_cv_func_bind_textdomain_codeset
198          AC_CHECK_FUNCS(bind_textdomain_codeset)
199          LIBS="$glib_save_LIBS"
200
201          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
202            gt_cv_func_dgettext_libc=no
203          else
204            if test "$gt_cv_func_dgettext_libc" = "yes" \
205		&& test "$gt_cv_func_ngettext_libc" = "yes"; then
206              gt_cv_func_dgettext_libintl=no
207            fi
208          fi
209        fi
210      fi
211
212      if test "$gt_cv_func_dgettext_libc" = "yes" \
213	|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
214        gt_cv_have_gettext=yes
215      fi
216
217      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
218        INTLLIBS="-lintl $libintl_extra_libs"
219      fi
220
221      if test "$gt_cv_have_gettext" = "yes"; then
222	AC_DEFINE(HAVE_GETTEXT,1,
223	  [Define if the GNU gettext() function is already present or preinstalled.])
224	GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
225	  [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
226	if test "$MSGFMT" != "no"; then
227          glib_save_LIBS="$LIBS"
228          LIBS="$LIBS $INTLLIBS"
229	  AC_CHECK_FUNCS(dcgettext)
230	  MSGFMT_OPTS=
231	  AC_MSG_CHECKING([if msgfmt accepts -c])
232	  GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
233msgid ""
234msgstr ""
235"Content-Type: text/plain; charset=UTF-8\n"
236"Project-Id-Version: test 1.0\n"
237"PO-Revision-Date: 2007-02-15 12:01+0100\n"
238"Last-Translator: test <foo@bar.xx>\n"
239"Language-Team: C <LL@li.org>\n"
240"MIME-Version: 1.0\n"
241"Content-Transfer-Encoding: 8bit\n"
242], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
243	  AC_SUBST(MSGFMT_OPTS)
244	  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
245	  GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
246	    [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
247	  AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
248			 return _nl_msg_cat_cntr],
249	    [CATOBJEXT=.gmo
250             DATADIRNAME=share],
251	    [case $host in
252	    *-*-solaris*)
253	    dnl On Solaris, if bind_textdomain_codeset is in libc,
254	    dnl GNU format message catalog is always supported,
255            dnl since both are added to the libc all together.
256	    dnl Hence, we'd like to go with DATADIRNAME=share and
257	    dnl and CATOBJEXT=.gmo in this case.
258            AC_CHECK_FUNC(bind_textdomain_codeset,
259	      [CATOBJEXT=.gmo
260               DATADIRNAME=share],
261	      [CATOBJEXT=.mo
262               DATADIRNAME=lib])
263	    ;;
264	    *-*-openbsd*)
265	    CATOBJEXT=.mo
266            DATADIRNAME=share
267	    ;;
268	    *)
269	    CATOBJEXT=.mo
270            DATADIRNAME=lib
271	    ;;
272	    esac])
273          LIBS="$glib_save_LIBS"
274	  INSTOBJEXT=.mo
275	else
276	  gt_cv_have_gettext=no
277	fi
278      fi
279    ])
280
281    if test "$gt_cv_have_gettext" = "yes" ; then
282      AC_DEFINE(ENABLE_NLS, 1,
283        [always defined to indicate that i18n is enabled])
284    fi
285
286    dnl Test whether we really found GNU xgettext.
287    if test "$XGETTEXT" != ":"; then
288      dnl If it is not GNU xgettext we define it as : so that the
289      dnl Makefiles still can work.
290      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
291        : ;
292      else
293        AC_MSG_RESULT(
294	  [found xgettext program is not GNU xgettext; ignore it])
295        XGETTEXT=":"
296      fi
297    fi
298
299    # We need to process the po/ directory.
300    POSUB=po
301
302    AC_OUTPUT_COMMANDS(
303      [case "$CONFIG_FILES" in *po/Makefile.in*)
304        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
305      esac])
306
307    dnl These rules are solely for the distribution goal.  While doing this
308    dnl we only have to keep exactly one list of the available catalogs
309    dnl in configure.ac.
310    for lang in $ALL_LINGUAS; do
311      GMOFILES="$GMOFILES $lang.gmo"
312      POFILES="$POFILES $lang.po"
313    done
314
315    dnl Make all variables we use known to autoconf.
316    AC_SUBST(CATALOGS)
317    AC_SUBST(CATOBJEXT)
318    AC_SUBST(DATADIRNAME)
319    AC_SUBST(GMOFILES)
320    AC_SUBST(INSTOBJEXT)
321    AC_SUBST(INTLLIBS)
322    AC_SUBST(PO_IN_DATADIR_TRUE)
323    AC_SUBST(PO_IN_DATADIR_FALSE)
324    AC_SUBST(POFILES)
325    AC_SUBST(POSUB)
326  ])
327
328# AM_GLIB_GNU_GETTEXT
329# -------------------
330# Do checks necessary for use of gettext. If a suitable implementation
331# of gettext is found in either in libintl or in the C library,
332# it will set INTLLIBS to the libraries needed for use of gettext
333# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
334# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
335# on various variables needed by the Makefile.in.in installed by
336# glib-gettextize.
337dnl
338glib_DEFUN([GLIB_GNU_GETTEXT],
339  [AC_REQUIRE([AC_PROG_CC])dnl
340
341   GLIB_LC_MESSAGES
342   GLIB_WITH_NLS
343
344   if test "$gt_cv_have_gettext" = "yes"; then
345     if test "x$ALL_LINGUAS" = "x"; then
346       LINGUAS=
347     else
348       AC_MSG_CHECKING(for catalogs to be installed)
349       NEW_LINGUAS=
350       for presentlang in $ALL_LINGUAS; do
351         useit=no
352         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
353           desiredlanguages="$LINGUAS"
354         else
355           desiredlanguages="$ALL_LINGUAS"
356         fi
357         for desiredlang in $desiredlanguages; do
358 	   # Use the presentlang catalog if desiredlang is
359           #   a. equal to presentlang, or
360           #   b. a variant of presentlang (because in this case,
361           #      presentlang can be used as a fallback for messages
362           #      which are not translated in the desiredlang catalog).
363           case "$desiredlang" in
364             "$presentlang"*) useit=yes;;
365           esac
366         done
367         if test $useit = yes; then
368           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
369         fi
370       done
371       LINGUAS=$NEW_LINGUAS
372       AC_MSG_RESULT($LINGUAS)
373     fi
374
375     dnl Construct list of names of catalog files to be constructed.
376     if test -n "$LINGUAS"; then
377       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
378     fi
379   fi
380
381   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
382   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
383   dnl Try to locate is.
384   MKINSTALLDIRS=
385   if test -n "$ac_aux_dir"; then
386     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
387   fi
388   if test -z "$MKINSTALLDIRS"; then
389     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
390   fi
391   AC_SUBST(MKINSTALLDIRS)
392
393   dnl Generate list of files to be processed by xgettext which will
394   dnl be included in po/Makefile.
395   test -d po || mkdir po
396   if test "x$srcdir" != "x."; then
397     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
398       posrcprefix="$srcdir/"
399     else
400       posrcprefix="../$srcdir/"
401     fi
402   else
403     posrcprefix="../"
404   fi
405   rm -f po/POTFILES
406   sed -e "/^#/d" -e "/^\$/d" -e "s,.*,	$posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
407	< $srcdir/po/POTFILES.in > po/POTFILES
408  ])
409
410# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
411# -------------------------------
412# Define VARIABLE to the location where catalog files will
413# be installed by po/Makefile.
414glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
415[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
416glib_save_prefix="$prefix"
417glib_save_exec_prefix="$exec_prefix"
418glib_save_datarootdir="$datarootdir"
419test "x$prefix" = xNONE && prefix=$ac_default_prefix
420test "x$exec_prefix" = xNONE && exec_prefix=$prefix
421datarootdir=`eval echo "${datarootdir}"`
422if test "x$CATOBJEXT" = "x.mo" ; then
423  localedir=`eval echo "${libdir}/locale"`
424else
425  localedir=`eval echo "${datadir}/locale"`
426fi
427prefix="$glib_save_prefix"
428exec_prefix="$glib_save_exec_prefix"
429datarootdir="$glib_save_datarootdir"
430AC_DEFINE_UNQUOTED($1, "$localedir",
431  [Define the location where the catalogs will be installed])
432])
433
434dnl
435dnl Now the definitions that aclocal will find
436dnl
437ifdef(glib_configure_ac,[],[
438AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
439AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
440])dnl
441
442# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
443#
444# Create a temporary file with TEST-FILE as its contents and pass the
445# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
446# 0 and perform ACTION-IF-FAIL for any other exit status.
447AC_DEFUN([GLIB_RUN_PROG],
448[cat >conftest.foo <<_ACEOF
449$2
450_ACEOF
451if AC_RUN_LOG([$1 conftest.foo]); then
452  m4_ifval([$3], [$3], [:])
453m4_ifvaln([$4], [else $4])dnl
454echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
455sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
456fi])
457
458
459
460dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
461# serial 42 IT_PROG_INTLTOOL
462AC_DEFUN([IT_PROG_INTLTOOL], [
463AC_PREREQ([2.50])dnl
464AC_REQUIRE([AM_NLS])dnl
465
466case "$am__api_version" in
467    1.[01234])
468	AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
469    ;;
470    *)
471    ;;
472esac
473
474INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
475INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
476INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
477if test -n "$1"; then
478    AC_MSG_CHECKING([for intltool >= $1])
479    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
480    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
481	AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
482fi
483
484AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
485AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
486AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
487if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
488    AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
489fi
490
491if test -z "$AM_DEFAULT_VERBOSITY"; then
492  AM_DEFAULT_VERBOSITY=1
493fi
494AC_SUBST([AM_DEFAULT_VERBOSITY])
495
496INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
497INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
498INTLTOOL__v_MERGE_0='@echo "  ITMRG " [$]@;'
499AC_SUBST(INTLTOOL_V_MERGE)
500AC_SUBST(INTLTOOL__v_MERGE_)
501AC_SUBST(INTLTOOL__v_MERGE_0)
502
503INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
504intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
505intltool__v_merge_options_0='-q'
506AC_SUBST(INTLTOOL_V_MERGE_OPTIONS)
507AC_SUBST(intltool__v_merge_options_)
508AC_SUBST(intltool__v_merge_options_0)
509
510  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 $< [$]@'
511INTLTOOL_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 $< [$]@'
512     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 $< [$]@'
513     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 $< [$]@'
514      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 $< [$]@'
515     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 $< [$]@'
516   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 $< [$]@'
517    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 $< [$]@'
518INTLTOOL_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 $< [$]@'
519       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 $< [$]@'
520      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 $< [$]@'
521if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
522      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 $< [$]@'
523else
524      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'
525fi
526      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 $< [$]@'
527      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 $< [$]@'
528    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 $< [$]@'
529  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 $< [$]@'
530    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 $< [$]@'
531    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 $< [$]@'
532   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 $< [$]@'
533
534_IT_SUBST(INTLTOOL_DESKTOP_RULE)
535_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
536_IT_SUBST(INTLTOOL_KEYS_RULE)
537_IT_SUBST(INTLTOOL_PROP_RULE)
538_IT_SUBST(INTLTOOL_OAF_RULE)
539_IT_SUBST(INTLTOOL_PONG_RULE)
540_IT_SUBST(INTLTOOL_SERVER_RULE)
541_IT_SUBST(INTLTOOL_SHEET_RULE)
542_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
543_IT_SUBST(INTLTOOL_UI_RULE)
544_IT_SUBST(INTLTOOL_XAM_RULE)
545_IT_SUBST(INTLTOOL_KBD_RULE)
546_IT_SUBST(INTLTOOL_XML_RULE)
547_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
548_IT_SUBST(INTLTOOL_CAVES_RULE)
549_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
550_IT_SUBST(INTLTOOL_THEME_RULE)
551_IT_SUBST(INTLTOOL_SERVICE_RULE)
552_IT_SUBST(INTLTOOL_POLICY_RULE)
553
554# Check the gettext tools to make sure they are GNU
555AC_PATH_PROG(XGETTEXT, xgettext)
556AC_PATH_PROG(MSGMERGE, msgmerge)
557AC_PATH_PROG(MSGFMT, msgfmt)
558AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
559if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
560    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
561fi
562xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
563mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
564mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
565if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
566    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
567fi
568
569AC_PATH_PROG(INTLTOOL_PERL, perl)
570if test -z "$INTLTOOL_PERL"; then
571   AC_MSG_ERROR([perl not found])
572fi
573AC_MSG_CHECKING([for perl >= 5.8.1])
574$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
575if test $? -ne 0; then
576   AC_MSG_ERROR([perl 5.8.1 is required for intltool])
577else
578   IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"`
579   AC_MSG_RESULT([$IT_PERL_VERSION])
580fi
581if test "x$2" != "xno-xml"; then
582   AC_MSG_CHECKING([for XML::Parser])
583   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
584       AC_MSG_RESULT([ok])
585   else
586       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
587   fi
588fi
589
590# Substitute ALL_LINGUAS so we can use it in po/Makefile
591AC_SUBST(ALL_LINGUAS)
592
593IT_PO_SUBDIR([po])
594
595])
596
597
598# IT_PO_SUBDIR(DIRNAME)
599# ---------------------
600# All po subdirs have to be declared with this macro; the subdir "po" is
601# declared by IT_PROG_INTLTOOL.
602#
603AC_DEFUN([IT_PO_SUBDIR],
604[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
605dnl
606dnl The following CONFIG_COMMANDS should be executed at the very end
607dnl of config.status.
608AC_CONFIG_COMMANDS_PRE([
609  AC_CONFIG_COMMANDS([$1/stamp-it], [
610    if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
611       AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
612    fi
613    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
614    >"$1/stamp-it.tmp"
615    [sed '/^#/d
616	 s/^[[].*] *//
617	 /^[ 	]*$/d
618	'"s|^|	$ac_top_srcdir/|" \
619      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
620    ]
621    [sed '/^POTFILES =/,/[^\\]$/ {
622		/^POTFILES =/!d
623		r $1/POTFILES
624	  }
625	 ' "$1/Makefile.in" >"$1/Makefile"]
626    rm -f "$1/Makefile.tmp"
627    mv "$1/stamp-it.tmp" "$1/stamp-it"
628  ])
629])dnl
630])
631
632# _IT_SUBST(VARIABLE)
633# -------------------
634# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
635#
636AC_DEFUN([_IT_SUBST],
637[
638AC_SUBST([$1])
639m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
640]
641)
642
643# deprecated macros
644AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
645# A hint is needed for aclocal from Automake <= 1.9.4:
646# AC_DEFUN([AC_PROG_INTLTOOL], ...)
647
648
649# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
650#
651#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
652#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
653#                 Foundation, Inc.
654#   Written by Gordon Matzigkeit, 1996
655#
656# This file is free software; the Free Software Foundation gives
657# unlimited permission to copy and/or distribute it, with or without
658# modifications, as long as this notice is preserved.
659
660m4_define([_LT_COPYING], [dnl
661#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
662#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
663#                 Foundation, Inc.
664#   Written by Gordon Matzigkeit, 1996
665#
666#   This file is part of GNU Libtool.
667#
668# GNU Libtool is free software; you can redistribute it and/or
669# modify it under the terms of the GNU General Public License as
670# published by the Free Software Foundation; either version 2 of
671# the License, or (at your option) any later version.
672#
673# As a special exception to the GNU General Public License,
674# if you distribute this file as part of a program or library that
675# is built using GNU Libtool, you may include this file under the
676# same distribution terms that you use for the rest of that program.
677#
678# GNU Libtool is distributed in the hope that it will be useful,
679# but WITHOUT ANY WARRANTY; without even the implied warranty of
680# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
681# GNU General Public License for more details.
682#
683# You should have received a copy of the GNU General Public License
684# along with GNU Libtool; see the file COPYING.  If not, a copy
685# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
686# obtained by writing to the Free Software Foundation, Inc.,
687# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
688])
689
690# serial 57 LT_INIT
691
692
693# LT_PREREQ(VERSION)
694# ------------------
695# Complain and exit if this libtool version is less that VERSION.
696m4_defun([LT_PREREQ],
697[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
698       [m4_default([$3],
699		   [m4_fatal([Libtool version $1 or higher is required],
700		             63)])],
701       [$2])])
702
703
704# _LT_CHECK_BUILDDIR
705# ------------------
706# Complain if the absolute build directory name contains unusual characters
707m4_defun([_LT_CHECK_BUILDDIR],
708[case `pwd` in
709  *\ * | *\	*)
710    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
711esac
712])
713
714
715# LT_INIT([OPTIONS])
716# ------------------
717AC_DEFUN([LT_INIT],
718[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
719AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
720AC_BEFORE([$0], [LT_LANG])dnl
721AC_BEFORE([$0], [LT_OUTPUT])dnl
722AC_BEFORE([$0], [LTDL_INIT])dnl
723m4_require([_LT_CHECK_BUILDDIR])dnl
724
725dnl Autoconf doesn't catch unexpanded LT_ macros by default:
726m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
727m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
728dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
729dnl unless we require an AC_DEFUNed macro:
730AC_REQUIRE([LTOPTIONS_VERSION])dnl
731AC_REQUIRE([LTSUGAR_VERSION])dnl
732AC_REQUIRE([LTVERSION_VERSION])dnl
733AC_REQUIRE([LTOBSOLETE_VERSION])dnl
734m4_require([_LT_PROG_LTMAIN])dnl
735
736_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
737
738dnl Parse OPTIONS
739_LT_SET_OPTIONS([$0], [$1])
740
741# This can be used to rebuild libtool when needed
742LIBTOOL_DEPS="$ltmain"
743
744# Always use our own libtool.
745LIBTOOL='$(SHELL) $(top_builddir)/libtool'
746AC_SUBST(LIBTOOL)dnl
747
748_LT_SETUP
749
750# Only expand once:
751m4_define([LT_INIT])
752])# LT_INIT
753
754# Old names:
755AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
756AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
757dnl aclocal-1.4 backwards compatibility:
758dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
759dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
760
761
762# _LT_CC_BASENAME(CC)
763# -------------------
764# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
765m4_defun([_LT_CC_BASENAME],
766[for cc_temp in $1""; do
767  case $cc_temp in
768    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
769    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
770    \-*) ;;
771    *) break;;
772  esac
773done
774cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
775])
776
777
778# _LT_FILEUTILS_DEFAULTS
779# ----------------------
780# It is okay to use these file commands and assume they have been set
781# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
782m4_defun([_LT_FILEUTILS_DEFAULTS],
783[: ${CP="cp -f"}
784: ${MV="mv -f"}
785: ${RM="rm -f"}
786])# _LT_FILEUTILS_DEFAULTS
787
788
789# _LT_SETUP
790# ---------
791m4_defun([_LT_SETUP],
792[AC_REQUIRE([AC_CANONICAL_HOST])dnl
793AC_REQUIRE([AC_CANONICAL_BUILD])dnl
794AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
795AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
796
797_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
798dnl
799_LT_DECL([], [host_alias], [0], [The host system])dnl
800_LT_DECL([], [host], [0])dnl
801_LT_DECL([], [host_os], [0])dnl
802dnl
803_LT_DECL([], [build_alias], [0], [The build system])dnl
804_LT_DECL([], [build], [0])dnl
805_LT_DECL([], [build_os], [0])dnl
806dnl
807AC_REQUIRE([AC_PROG_CC])dnl
808AC_REQUIRE([LT_PATH_LD])dnl
809AC_REQUIRE([LT_PATH_NM])dnl
810dnl
811AC_REQUIRE([AC_PROG_LN_S])dnl
812test -z "$LN_S" && LN_S="ln -s"
813_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
814dnl
815AC_REQUIRE([LT_CMD_MAX_LEN])dnl
816_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
817_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
818dnl
819m4_require([_LT_FILEUTILS_DEFAULTS])dnl
820m4_require([_LT_CHECK_SHELL_FEATURES])dnl
821m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
822m4_require([_LT_CMD_RELOAD])dnl
823m4_require([_LT_CHECK_MAGIC_METHOD])dnl
824m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
825m4_require([_LT_CMD_OLD_ARCHIVE])dnl
826m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
827m4_require([_LT_WITH_SYSROOT])dnl
828
829_LT_CONFIG_LIBTOOL_INIT([
830# See if we are running on zsh, and set the options which allow our
831# commands through without removal of \ escapes INIT.
832if test -n "\${ZSH_VERSION+set}" ; then
833   setopt NO_GLOB_SUBST
834fi
835])
836if test -n "${ZSH_VERSION+set}" ; then
837   setopt NO_GLOB_SUBST
838fi
839
840_LT_CHECK_OBJDIR
841
842m4_require([_LT_TAG_COMPILER])dnl
843
844case $host_os in
845aix3*)
846  # AIX sometimes has problems with the GCC collect2 program.  For some
847  # reason, if we set the COLLECT_NAMES environment variable, the problems
848  # vanish in a puff of smoke.
849  if test "X${COLLECT_NAMES+set}" != Xset; then
850    COLLECT_NAMES=
851    export COLLECT_NAMES
852  fi
853  ;;
854esac
855
856# Global variables:
857ofile=libtool
858can_build_shared=yes
859
860# All known linkers require a `.a' archive for static linking (except MSVC,
861# which needs '.lib').
862libext=a
863
864with_gnu_ld="$lt_cv_prog_gnu_ld"
865
866old_CC="$CC"
867old_CFLAGS="$CFLAGS"
868
869# Set sane defaults for various variables
870test -z "$CC" && CC=cc
871test -z "$LTCC" && LTCC=$CC
872test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
873test -z "$LD" && LD=ld
874test -z "$ac_objext" && ac_objext=o
875
876_LT_CC_BASENAME([$compiler])
877
878# Only perform the check for file, if the check method requires it
879test -z "$MAGIC_CMD" && MAGIC_CMD=file
880case $deplibs_check_method in
881file_magic*)
882  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
883    _LT_PATH_MAGIC
884  fi
885  ;;
886esac
887
888# Use C for the default configuration in the libtool script
889LT_SUPPORTED_TAG([CC])
890_LT_LANG_C_CONFIG
891_LT_LANG_DEFAULT_CONFIG
892_LT_CONFIG_COMMANDS
893])# _LT_SETUP
894
895
896# _LT_PREPARE_SED_QUOTE_VARS
897# --------------------------
898# Define a few sed substitution that help us do robust quoting.
899m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
900[# Backslashify metacharacters that are still active within
901# double-quoted strings.
902sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
903
904# Same as above, but do not quote variable references.
905double_quote_subst='s/\([["`\\]]\)/\\\1/g'
906
907# Sed substitution to delay expansion of an escaped shell variable in a
908# double_quote_subst'ed string.
909delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
910
911# Sed substitution to delay expansion of an escaped single quote.
912delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
913
914# Sed substitution to avoid accidental globbing in evaled expressions
915no_glob_subst='s/\*/\\\*/g'
916])
917
918# _LT_PROG_LTMAIN
919# ---------------
920# Note that this code is called both from `configure', and `config.status'
921# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
922# `config.status' has no value for ac_aux_dir unless we are using Automake,
923# so we pass a copy along to make sure it has a sensible value anyway.
924m4_defun([_LT_PROG_LTMAIN],
925[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
926_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
927ltmain="$ac_aux_dir/ltmain.sh"
928])# _LT_PROG_LTMAIN
929
930
931
932# So that we can recreate a full libtool script including additional
933# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
934# in macros and then make a single call at the end using the `libtool'
935# label.
936
937
938# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
939# ----------------------------------------
940# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
941m4_define([_LT_CONFIG_LIBTOOL_INIT],
942[m4_ifval([$1],
943          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
944                     [$1
945])])])
946
947# Initialize.
948m4_define([_LT_OUTPUT_LIBTOOL_INIT])
949
950
951# _LT_CONFIG_LIBTOOL([COMMANDS])
952# ------------------------------
953# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
954m4_define([_LT_CONFIG_LIBTOOL],
955[m4_ifval([$1],
956          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
957                     [$1
958])])])
959
960# Initialize.
961m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
962
963
964# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
965# -----------------------------------------------------
966m4_defun([_LT_CONFIG_SAVE_COMMANDS],
967[_LT_CONFIG_LIBTOOL([$1])
968_LT_CONFIG_LIBTOOL_INIT([$2])
969])
970
971
972# _LT_FORMAT_COMMENT([COMMENT])
973# -----------------------------
974# Add leading comment marks to the start of each line, and a trailing
975# full-stop to the whole comment if one is not present already.
976m4_define([_LT_FORMAT_COMMENT],
977[m4_ifval([$1], [
978m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
979              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
980)])
981
982
983
984
985
986# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
987# -------------------------------------------------------------------
988# CONFIGNAME is the name given to the value in the libtool script.
989# VARNAME is the (base) name used in the configure script.
990# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
991# VARNAME.  Any other value will be used directly.
992m4_define([_LT_DECL],
993[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
994    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
995	[m4_ifval([$1], [$1], [$2])])
996    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
997    m4_ifval([$4],
998	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
999    lt_dict_add_subkey([lt_decl_dict], [$2],
1000	[tagged?], [m4_ifval([$5], [yes], [no])])])
1001])
1002
1003
1004# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
1005# --------------------------------------------------------
1006m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
1007
1008
1009# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
1010# ------------------------------------------------
1011m4_define([lt_decl_tag_varnames],
1012[_lt_decl_filter([tagged?], [yes], $@)])
1013
1014
1015# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
1016# ---------------------------------------------------------
1017m4_define([_lt_decl_filter],
1018[m4_case([$#],
1019  [0], [m4_fatal([$0: too few arguments: $#])],
1020  [1], [m4_fatal([$0: too few arguments: $#: $1])],
1021  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
1022  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
1023  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
1024])
1025
1026
1027# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
1028# --------------------------------------------------
1029m4_define([lt_decl_quote_varnames],
1030[_lt_decl_filter([value], [1], $@)])
1031
1032
1033# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
1034# ---------------------------------------------------
1035m4_define([lt_decl_dquote_varnames],
1036[_lt_decl_filter([value], [2], $@)])
1037
1038
1039# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
1040# ---------------------------------------------------
1041m4_define([lt_decl_varnames_tagged],
1042[m4_assert([$# <= 2])dnl
1043_$0(m4_quote(m4_default([$1], [[, ]])),
1044    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
1045    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
1046m4_define([_lt_decl_varnames_tagged],
1047[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
1048
1049
1050# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
1051# ------------------------------------------------
1052m4_define([lt_decl_all_varnames],
1053[_$0(m4_quote(m4_default([$1], [[, ]])),
1054     m4_if([$2], [],
1055	   m4_quote(lt_decl_varnames),
1056	m4_quote(m4_shift($@))))[]dnl
1057])
1058m4_define([_lt_decl_all_varnames],
1059[lt_join($@, lt_decl_varnames_tagged([$1],
1060			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
1061])
1062
1063
1064# _LT_CONFIG_STATUS_DECLARE([VARNAME])
1065# ------------------------------------
1066# Quote a variable value, and forward it to `config.status' so that its
1067# declaration there will have the same value as in `configure'.  VARNAME
1068# must have a single quote delimited value for this to work.
1069m4_define([_LT_CONFIG_STATUS_DECLARE],
1070[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
1071
1072
1073# _LT_CONFIG_STATUS_DECLARATIONS
1074# ------------------------------
1075# We delimit libtool config variables with single quotes, so when
1076# we write them to config.status, we have to be sure to quote all
1077# embedded single quotes properly.  In configure, this macro expands
1078# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
1079#
1080#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
1081m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
1082[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
1083    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
1084
1085
1086# _LT_LIBTOOL_TAGS
1087# ----------------
1088# Output comment and list of tags supported by the script
1089m4_defun([_LT_LIBTOOL_TAGS],
1090[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
1091available_tags="_LT_TAGS"dnl
1092])
1093
1094
1095# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
1096# -----------------------------------
1097# Extract the dictionary values for VARNAME (optionally with TAG) and
1098# expand to a commented shell variable setting:
1099#
1100#    # Some comment about what VAR is for.
1101#    visible_name=$lt_internal_name
1102m4_define([_LT_LIBTOOL_DECLARE],
1103[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
1104					   [description])))[]dnl
1105m4_pushdef([_libtool_name],
1106    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
1107m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
1108    [0], [_libtool_name=[$]$1],
1109    [1], [_libtool_name=$lt_[]$1],
1110    [2], [_libtool_name=$lt_[]$1],
1111    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
1112m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
1113])
1114
1115
1116# _LT_LIBTOOL_CONFIG_VARS
1117# -----------------------
1118# Produce commented declarations of non-tagged libtool config variables
1119# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
1120# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
1121# section) are produced by _LT_LIBTOOL_TAG_VARS.
1122m4_defun([_LT_LIBTOOL_CONFIG_VARS],
1123[m4_foreach([_lt_var],
1124    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
1125    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
1126
1127
1128# _LT_LIBTOOL_TAG_VARS(TAG)
1129# -------------------------
1130m4_define([_LT_LIBTOOL_TAG_VARS],
1131[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
1132    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
1133
1134
1135# _LT_TAGVAR(VARNAME, [TAGNAME])
1136# ------------------------------
1137m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
1138
1139
1140# _LT_CONFIG_COMMANDS
1141# -------------------
1142# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
1143# variables for single and double quote escaping we saved from calls
1144# to _LT_DECL, we can put quote escaped variables declarations
1145# into `config.status', and then the shell code to quote escape them in
1146# for loops in `config.status'.  Finally, any additional code accumulated
1147# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
1148m4_defun([_LT_CONFIG_COMMANDS],
1149[AC_PROVIDE_IFELSE([LT_OUTPUT],
1150	dnl If the libtool generation code has been placed in $CONFIG_LT,
1151	dnl instead of duplicating it all over again into config.status,
1152	dnl then we will have config.status run $CONFIG_LT later, so it
1153	dnl needs to know what name is stored there:
1154        [AC_CONFIG_COMMANDS([libtool],
1155            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
1156    dnl If the libtool generation code is destined for config.status,
1157    dnl expand the accumulated commands and init code now:
1158    [AC_CONFIG_COMMANDS([libtool],
1159        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
1160])#_LT_CONFIG_COMMANDS
1161
1162
1163# Initialize.
1164m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
1165[
1166
1167# The HP-UX ksh and POSIX shell print the target directory to stdout
1168# if CDPATH is set.
1169(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1170
1171sed_quote_subst='$sed_quote_subst'
1172double_quote_subst='$double_quote_subst'
1173delay_variable_subst='$delay_variable_subst'
1174_LT_CONFIG_STATUS_DECLARATIONS
1175LTCC='$LTCC'
1176LTCFLAGS='$LTCFLAGS'
1177compiler='$compiler_DEFAULT'
1178
1179# A function that is used when there is no print builtin or printf.
1180func_fallback_echo ()
1181{
1182  eval 'cat <<_LTECHO_EOF
1183\$[]1
1184_LTECHO_EOF'
1185}
1186
1187# Quote evaled strings.
1188for var in lt_decl_all_varnames([[ \
1189]], lt_decl_quote_varnames); do
1190    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1191    *[[\\\\\\\`\\"\\\$]]*)
1192      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
1193      ;;
1194    *)
1195      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1196      ;;
1197    esac
1198done
1199
1200# Double-quote double-evaled strings.
1201for var in lt_decl_all_varnames([[ \
1202]], lt_decl_dquote_varnames); do
1203    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1204    *[[\\\\\\\`\\"\\\$]]*)
1205      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
1206      ;;
1207    *)
1208      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1209      ;;
1210    esac
1211done
1212
1213_LT_OUTPUT_LIBTOOL_INIT
1214])
1215
1216# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
1217# ------------------------------------
1218# Generate a child script FILE with all initialization necessary to
1219# reuse the environment learned by the parent script, and make the
1220# file executable.  If COMMENT is supplied, it is inserted after the
1221# `#!' sequence but before initialization text begins.  After this
1222# macro, additional text can be appended to FILE to form the body of
1223# the child script.  The macro ends with non-zero status if the
1224# file could not be fully written (such as if the disk is full).
1225m4_ifdef([AS_INIT_GENERATED],
1226[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
1227[m4_defun([_LT_GENERATED_FILE_INIT],
1228[m4_require([AS_PREPARE])]dnl
1229[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
1230[lt_write_fail=0
1231cat >$1 <<_ASEOF || lt_write_fail=1
1232#! $SHELL
1233# Generated by $as_me.
1234$2
1235SHELL=\${CONFIG_SHELL-$SHELL}
1236export SHELL
1237_ASEOF
1238cat >>$1 <<\_ASEOF || lt_write_fail=1
1239AS_SHELL_SANITIZE
1240_AS_PREPARE
1241exec AS_MESSAGE_FD>&1
1242_ASEOF
1243test $lt_write_fail = 0 && chmod +x $1[]dnl
1244m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
1245
1246# LT_OUTPUT
1247# ---------
1248# This macro allows early generation of the libtool script (before
1249# AC_OUTPUT is called), incase it is used in configure for compilation
1250# tests.
1251AC_DEFUN([LT_OUTPUT],
1252[: ${CONFIG_LT=./config.lt}
1253AC_MSG_NOTICE([creating $CONFIG_LT])
1254_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
1255[# Run this file to recreate a libtool stub with the current configuration.])
1256
1257cat >>"$CONFIG_LT" <<\_LTEOF
1258lt_cl_silent=false
1259exec AS_MESSAGE_LOG_FD>>config.log
1260{
1261  echo
1262  AS_BOX([Running $as_me.])
1263} >&AS_MESSAGE_LOG_FD
1264
1265lt_cl_help="\
1266\`$as_me' creates a local libtool stub from the current configuration,
1267for use in further configure time tests before the real libtool is
1268generated.
1269
1270Usage: $[0] [[OPTIONS]]
1271
1272  -h, --help      print this help, then exit
1273  -V, --version   print version number, then exit
1274  -q, --quiet     do not print progress messages
1275  -d, --debug     don't remove temporary files
1276
1277Report bugs to <bug-libtool@gnu.org>."
1278
1279lt_cl_version="\
1280m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
1281m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1282configured by $[0], generated by m4_PACKAGE_STRING.
1283
1284Copyright (C) 2011 Free Software Foundation, Inc.
1285This config.lt script is free software; the Free Software Foundation
1286gives unlimited permision to copy, distribute and modify it."
1287
1288while test $[#] != 0
1289do
1290  case $[1] in
1291    --version | --v* | -V )
1292      echo "$lt_cl_version"; exit 0 ;;
1293    --help | --h* | -h )
1294      echo "$lt_cl_help"; exit 0 ;;
1295    --debug | --d* | -d )
1296      debug=: ;;
1297    --quiet | --q* | --silent | --s* | -q )
1298      lt_cl_silent=: ;;
1299
1300    -*) AC_MSG_ERROR([unrecognized option: $[1]
1301Try \`$[0] --help' for more information.]) ;;
1302
1303    *) AC_MSG_ERROR([unrecognized argument: $[1]
1304Try \`$[0] --help' for more information.]) ;;
1305  esac
1306  shift
1307done
1308
1309if $lt_cl_silent; then
1310  exec AS_MESSAGE_FD>/dev/null
1311fi
1312_LTEOF
1313
1314cat >>"$CONFIG_LT" <<_LTEOF
1315_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
1316_LTEOF
1317
1318cat >>"$CONFIG_LT" <<\_LTEOF
1319AC_MSG_NOTICE([creating $ofile])
1320_LT_OUTPUT_LIBTOOL_COMMANDS
1321AS_EXIT(0)
1322_LTEOF
1323chmod +x "$CONFIG_LT"
1324
1325# configure is writing to config.log, but config.lt does its own redirection,
1326# appending to config.log, which fails on DOS, as config.log is still kept
1327# open by configure.  Here we exec the FD to /dev/null, effectively closing
1328# config.log, so it can be properly (re)opened and appended to by config.lt.
1329lt_cl_success=:
1330test "$silent" = yes &&
1331  lt_config_lt_args="$lt_config_lt_args --quiet"
1332exec AS_MESSAGE_LOG_FD>/dev/null
1333$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
1334exec AS_MESSAGE_LOG_FD>>config.log
1335$lt_cl_success || AS_EXIT(1)
1336])# LT_OUTPUT
1337
1338
1339# _LT_CONFIG(TAG)
1340# ---------------
1341# If TAG is the built-in tag, create an initial libtool script with a
1342# default configuration from the untagged config vars.  Otherwise add code
1343# to config.status for appending the configuration named by TAG from the
1344# matching tagged config vars.
1345m4_defun([_LT_CONFIG],
1346[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1347_LT_CONFIG_SAVE_COMMANDS([
1348  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
1349  m4_if(_LT_TAG, [C], [
1350    # See if we are running on zsh, and set the options which allow our
1351    # commands through without removal of \ escapes.
1352    if test -n "${ZSH_VERSION+set}" ; then
1353      setopt NO_GLOB_SUBST
1354    fi
1355
1356    cfgfile="${ofile}T"
1357    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
1358    $RM "$cfgfile"
1359
1360    cat <<_LT_EOF >> "$cfgfile"
1361#! $SHELL
1362
1363# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
1364# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
1365# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1366# NOTE: Changes made to this file will be lost: look at ltmain.sh.
1367#
1368_LT_COPYING
1369_LT_LIBTOOL_TAGS
1370
1371# ### BEGIN LIBTOOL CONFIG
1372_LT_LIBTOOL_CONFIG_VARS
1373_LT_LIBTOOL_TAG_VARS
1374# ### END LIBTOOL CONFIG
1375
1376_LT_EOF
1377
1378  case $host_os in
1379  aix3*)
1380    cat <<\_LT_EOF >> "$cfgfile"
1381# AIX sometimes has problems with the GCC collect2 program.  For some
1382# reason, if we set the COLLECT_NAMES environment variable, the problems
1383# vanish in a puff of smoke.
1384if test "X${COLLECT_NAMES+set}" != Xset; then
1385  COLLECT_NAMES=
1386  export COLLECT_NAMES
1387fi
1388_LT_EOF
1389    ;;
1390  esac
1391
1392  _LT_PROG_LTMAIN
1393
1394  # We use sed instead of cat because bash on DJGPP gets confused if
1395  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
1396  # text mode, it properly converts lines to CR/LF.  This bash problem
1397  # is reportedly fixed, but why not run on old versions too?
1398  sed '$q' "$ltmain" >> "$cfgfile" \
1399     || (rm -f "$cfgfile"; exit 1)
1400
1401  _LT_PROG_REPLACE_SHELLFNS
1402
1403   mv -f "$cfgfile" "$ofile" ||
1404    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
1405  chmod +x "$ofile"
1406],
1407[cat <<_LT_EOF >> "$ofile"
1408
1409dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
1410dnl in a comment (ie after a #).
1411# ### BEGIN LIBTOOL TAG CONFIG: $1
1412_LT_LIBTOOL_TAG_VARS(_LT_TAG)
1413# ### END LIBTOOL TAG CONFIG: $1
1414_LT_EOF
1415])dnl /m4_if
1416],
1417[m4_if([$1], [], [
1418    PACKAGE='$PACKAGE'
1419    VERSION='$VERSION'
1420    TIMESTAMP='$TIMESTAMP'
1421    RM='$RM'
1422    ofile='$ofile'], [])
1423])dnl /_LT_CONFIG_SAVE_COMMANDS
1424])# _LT_CONFIG
1425
1426
1427# LT_SUPPORTED_TAG(TAG)
1428# ---------------------
1429# Trace this macro to discover what tags are supported by the libtool
1430# --tag option, using:
1431#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
1432AC_DEFUN([LT_SUPPORTED_TAG], [])
1433
1434
1435# C support is built-in for now
1436m4_define([_LT_LANG_C_enabled], [])
1437m4_define([_LT_TAGS], [])
1438
1439
1440# LT_LANG(LANG)
1441# -------------
1442# Enable libtool support for the given language if not already enabled.
1443AC_DEFUN([LT_LANG],
1444[AC_BEFORE([$0], [LT_OUTPUT])dnl
1445m4_case([$1],
1446  [C],			[_LT_LANG(C)],
1447  [C++],		[_LT_LANG(CXX)],
1448  [Go],			[_LT_LANG(GO)],
1449  [Java],		[_LT_LANG(GCJ)],
1450  [Fortran 77],		[_LT_LANG(F77)],
1451  [Fortran],		[_LT_LANG(FC)],
1452  [Windows Resource],	[_LT_LANG(RC)],
1453  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
1454    [_LT_LANG($1)],
1455    [m4_fatal([$0: unsupported language: "$1"])])])dnl
1456])# LT_LANG
1457
1458
1459# _LT_LANG(LANGNAME)
1460# ------------------
1461m4_defun([_LT_LANG],
1462[m4_ifdef([_LT_LANG_]$1[_enabled], [],
1463  [LT_SUPPORTED_TAG([$1])dnl
1464  m4_append([_LT_TAGS], [$1 ])dnl
1465  m4_define([_LT_LANG_]$1[_enabled], [])dnl
1466  _LT_LANG_$1_CONFIG($1)])dnl
1467])# _LT_LANG
1468
1469
1470m4_ifndef([AC_PROG_GO], [
1471# NOTE: This macro has been submitted for inclusion into   #
1472#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
1473#  a released version of Autoconf we should remove this    #
1474#  macro and use it instead.                               #
1475m4_defun([AC_PROG_GO],
1476[AC_LANG_PUSH(Go)dnl
1477AC_ARG_VAR([GOC],     [Go compiler command])dnl
1478AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
1479_AC_ARG_VAR_LDFLAGS()dnl
1480AC_CHECK_TOOL(GOC, gccgo)
1481if test -z "$GOC"; then
1482  if test -n "$ac_tool_prefix"; then
1483    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
1484  fi
1485fi
1486if test -z "$GOC"; then
1487  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
1488fi
1489])#m4_defun
1490])#m4_ifndef
1491
1492
1493# _LT_LANG_DEFAULT_CONFIG
1494# -----------------------
1495m4_defun([_LT_LANG_DEFAULT_CONFIG],
1496[AC_PROVIDE_IFELSE([AC_PROG_CXX],
1497  [LT_LANG(CXX)],
1498  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
1499
1500AC_PROVIDE_IFELSE([AC_PROG_F77],
1501  [LT_LANG(F77)],
1502  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
1503
1504AC_PROVIDE_IFELSE([AC_PROG_FC],
1505  [LT_LANG(FC)],
1506  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
1507
1508dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
1509dnl pulling things in needlessly.
1510AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1511  [LT_LANG(GCJ)],
1512  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1513    [LT_LANG(GCJ)],
1514    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
1515      [LT_LANG(GCJ)],
1516      [m4_ifdef([AC_PROG_GCJ],
1517	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
1518       m4_ifdef([A][M_PROG_GCJ],
1519	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
1520       m4_ifdef([LT_PROG_GCJ],
1521	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
1522
1523AC_PROVIDE_IFELSE([AC_PROG_GO],
1524  [LT_LANG(GO)],
1525  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
1526
1527AC_PROVIDE_IFELSE([LT_PROG_RC],
1528  [LT_LANG(RC)],
1529  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
1530])# _LT_LANG_DEFAULT_CONFIG
1531
1532# Obsolete macros:
1533AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
1534AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
1535AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
1536AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
1537AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
1538dnl aclocal-1.4 backwards compatibility:
1539dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
1540dnl AC_DEFUN([AC_LIBTOOL_F77], [])
1541dnl AC_DEFUN([AC_LIBTOOL_FC], [])
1542dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
1543dnl AC_DEFUN([AC_LIBTOOL_RC], [])
1544
1545
1546# _LT_TAG_COMPILER
1547# ----------------
1548m4_defun([_LT_TAG_COMPILER],
1549[AC_REQUIRE([AC_PROG_CC])dnl
1550
1551_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
1552_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
1553_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
1554_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
1555
1556# If no C compiler was specified, use CC.
1557LTCC=${LTCC-"$CC"}
1558
1559# If no C compiler flags were specified, use CFLAGS.
1560LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1561
1562# Allow CC to be a program name with arguments.
1563compiler=$CC
1564])# _LT_TAG_COMPILER
1565
1566
1567# _LT_COMPILER_BOILERPLATE
1568# ------------------------
1569# Check for compiler boilerplate output or warnings with
1570# the simple compiler test code.
1571m4_defun([_LT_COMPILER_BOILERPLATE],
1572[m4_require([_LT_DECL_SED])dnl
1573ac_outfile=conftest.$ac_objext
1574echo "$lt_simple_compile_test_code" >conftest.$ac_ext
1575eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1576_lt_compiler_boilerplate=`cat conftest.err`
1577$RM conftest*
1578])# _LT_COMPILER_BOILERPLATE
1579
1580
1581# _LT_LINKER_BOILERPLATE
1582# ----------------------
1583# Check for linker boilerplate output or warnings with
1584# the simple link test code.
1585m4_defun([_LT_LINKER_BOILERPLATE],
1586[m4_require([_LT_DECL_SED])dnl
1587ac_outfile=conftest.$ac_objext
1588echo "$lt_simple_link_test_code" >conftest.$ac_ext
1589eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1590_lt_linker_boilerplate=`cat conftest.err`
1591$RM -r conftest*
1592])# _LT_LINKER_BOILERPLATE
1593
1594# _LT_REQUIRED_DARWIN_CHECKS
1595# -------------------------
1596m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
1597  case $host_os in
1598    rhapsody* | darwin*)
1599    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1600    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1601    AC_CHECK_TOOL([LIPO], [lipo], [:])
1602    AC_CHECK_TOOL([OTOOL], [otool], [:])
1603    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
1604    _LT_DECL([], [DSYMUTIL], [1],
1605      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1606    _LT_DECL([], [NMEDIT], [1],
1607      [Tool to change global to local symbols on Mac OS X])
1608    _LT_DECL([], [LIPO], [1],
1609      [Tool to manipulate fat objects and archives on Mac OS X])
1610    _LT_DECL([], [OTOOL], [1],
1611      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
1612    _LT_DECL([], [OTOOL64], [1],
1613      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
1614
1615    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1616      [lt_cv_apple_cc_single_mod=no
1617      if test -z "${LT_MULTI_MODULE}"; then
1618	# By default we will add the -single_module flag. You can override
1619	# by either setting the environment variable LT_MULTI_MODULE
1620	# non-empty at configure time, or by adding -multi_module to the
1621	# link flags.
1622	rm -rf libconftest.dylib*
1623	echo "int foo(void){return 1;}" > conftest.c
1624	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1625-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1626	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1627	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1628        _lt_result=$?
1629	# If there is a non-empty error log, and "single_module"
1630	# appears in it, assume the flag caused a linker warning
1631        if test -s conftest.err && $GREP single_module conftest.err; then
1632	  cat conftest.err >&AS_MESSAGE_LOG_FD
1633	# Otherwise, if the output was created with a 0 exit code from
1634	# the compiler, it worked.
1635	elif test -f libconftest.dylib && test $_lt_result -eq 0; then
1636	  lt_cv_apple_cc_single_mod=yes
1637	else
1638	  cat conftest.err >&AS_MESSAGE_LOG_FD
1639	fi
1640	rm -rf libconftest.dylib*
1641	rm -f conftest.*
1642      fi])
1643
1644    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1645      [lt_cv_ld_exported_symbols_list],
1646      [lt_cv_ld_exported_symbols_list=no
1647      save_LDFLAGS=$LDFLAGS
1648      echo "_main" > conftest.sym
1649      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1650      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1651	[lt_cv_ld_exported_symbols_list=yes],
1652	[lt_cv_ld_exported_symbols_list=no])
1653	LDFLAGS="$save_LDFLAGS"
1654    ])
1655
1656    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
1657      [lt_cv_ld_force_load=no
1658      cat > conftest.c << _LT_EOF
1659int forced_loaded() { return 2;}
1660_LT_EOF
1661      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
1662      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1663      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1664      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1665      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
1666      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
1667      cat > conftest.c << _LT_EOF
1668int main() { return 0;}
1669_LT_EOF
1670      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
1671      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
1672      _lt_result=$?
1673      if test -s conftest.err && $GREP force_load conftest.err; then
1674	cat conftest.err >&AS_MESSAGE_LOG_FD
1675      elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
1676	lt_cv_ld_force_load=yes
1677      else
1678	cat conftest.err >&AS_MESSAGE_LOG_FD
1679      fi
1680        rm -f conftest.err libconftest.a conftest conftest.c
1681        rm -rf conftest.dSYM
1682    ])
1683    case $host_os in
1684    rhapsody* | darwin1.[[012]])
1685      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
1686    darwin1.*)
1687      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1688    darwin*) # darwin 5.x on
1689      # if running on 10.5 or later, the deployment target defaults
1690      # to the OS version, if on x86, and 10.4, the deployment
1691      # target defaults to 10.4. Don't you love it?
1692      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1693	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1694	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1695	10.[[012]]*)
1696	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1697	10.*)
1698	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1699      esac
1700    ;;
1701  esac
1702    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
1703      _lt_dar_single_mod='$single_module'
1704    fi
1705    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
1706      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
1707    else
1708      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
1709    fi
1710    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
1711      _lt_dsymutil='~$DSYMUTIL $lib || :'
1712    else
1713      _lt_dsymutil=
1714    fi
1715    ;;
1716  esac
1717])
1718
1719
1720# _LT_DARWIN_LINKER_FEATURES([TAG])
1721# ---------------------------------
1722# Checks for linker and compiler features on darwin
1723m4_defun([_LT_DARWIN_LINKER_FEATURES],
1724[
1725  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1726  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1727  _LT_TAGVAR(hardcode_direct, $1)=no
1728  _LT_TAGVAR(hardcode_automatic, $1)=yes
1729  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1730  if test "$lt_cv_ld_force_load" = "yes"; then
1731    _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\"`'
1732    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
1733                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
1734  else
1735    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1736  fi
1737  _LT_TAGVAR(link_all_deplibs, $1)=yes
1738  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1739  case $cc_basename in
1740     ifort*) _lt_dar_can_shared=yes ;;
1741     *) _lt_dar_can_shared=$GCC ;;
1742  esac
1743  if test "$_lt_dar_can_shared" = "yes"; then
1744    output_verbose_link_cmd=func_echo_all
1745    _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}"
1746    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1747    _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}"
1748    _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}"
1749    m4_if([$1], [CXX],
1750[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1751      _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}"
1752      _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}"
1753    fi
1754],[])
1755  else
1756  _LT_TAGVAR(ld_shlibs, $1)=no
1757  fi
1758])
1759
1760# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1761# ----------------------------------
1762# Links a minimal program and checks the executable
1763# for the system default hardcoded library path. In most cases,
1764# this is /usr/lib:/lib, but when the MPI compilers are used
1765# the location of the communication and MPI libs are included too.
1766# If we don't find anything, use the default library path according
1767# to the aix ld manual.
1768# Store the results from the different compilers for each TAGNAME.
1769# Allow to override them for all tags through lt_cv_aix_libpath.
1770m4_defun([_LT_SYS_MODULE_PATH_AIX],
1771[m4_require([_LT_DECL_SED])dnl
1772if test "${lt_cv_aix_libpath+set}" = set; then
1773  aix_libpath=$lt_cv_aix_libpath
1774else
1775  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1776  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1777  lt_aix_libpath_sed='[
1778      /Import File Strings/,/^$/ {
1779	  /^0/ {
1780	      s/^0  *\([^ ]*\) *$/\1/
1781	      p
1782	  }
1783      }]'
1784  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1785  # Check for a 64-bit object if we didn't find anything.
1786  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1787    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1788  fi],[])
1789  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1790    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
1791  fi
1792  ])
1793  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1794fi
1795])# _LT_SYS_MODULE_PATH_AIX
1796
1797
1798# _LT_SHELL_INIT(ARG)
1799# -------------------
1800m4_define([_LT_SHELL_INIT],
1801[m4_divert_text([M4SH-INIT], [$1
1802])])# _LT_SHELL_INIT
1803
1804
1805
1806# _LT_PROG_ECHO_BACKSLASH
1807# -----------------------
1808# Find how we can fake an echo command that does not interpret backslash.
1809# In particular, with Autoconf 2.60 or later we add some code to the start
1810# of the generated configure script which will find a shell with a builtin
1811# printf (which we can use as an echo command).
1812m4_defun([_LT_PROG_ECHO_BACKSLASH],
1813[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1814ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1815ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1816
1817AC_MSG_CHECKING([how to print strings])
1818# Test print first, because it will be a builtin if present.
1819if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
1820   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1821  ECHO='print -r --'
1822elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1823  ECHO='printf %s\n'
1824else
1825  # Use this function as a fallback that always works.
1826  func_fallback_echo ()
1827  {
1828    eval 'cat <<_LTECHO_EOF
1829$[]1
1830_LTECHO_EOF'
1831  }
1832  ECHO='func_fallback_echo'
1833fi
1834
1835# func_echo_all arg...
1836# Invoke $ECHO with all args, space-separated.
1837func_echo_all ()
1838{
1839    $ECHO "$*"
1840}
1841
1842case "$ECHO" in
1843  printf*) AC_MSG_RESULT([printf]) ;;
1844  print*) AC_MSG_RESULT([print -r]) ;;
1845  *) AC_MSG_RESULT([cat]) ;;
1846esac
1847
1848m4_ifdef([_AS_DETECT_SUGGESTED],
1849[_AS_DETECT_SUGGESTED([
1850  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
1851    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1852    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1853    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1854    PATH=/empty FPATH=/empty; export PATH FPATH
1855    test "X`printf %s $ECHO`" = "X$ECHO" \
1856      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
1857
1858_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1859_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
1860])# _LT_PROG_ECHO_BACKSLASH
1861
1862
1863# _LT_WITH_SYSROOT
1864# ----------------
1865AC_DEFUN([_LT_WITH_SYSROOT],
1866[AC_MSG_CHECKING([for sysroot])
1867AC_ARG_WITH([sysroot],
1868[  --with-sysroot[=DIR] Search for dependent libraries within DIR
1869                        (or the compiler's sysroot if not specified).],
1870[], [with_sysroot=no])
1871
1872dnl lt_sysroot will always be passed unquoted.  We quote it here
1873dnl in case the user passed a directory name.
1874lt_sysroot=
1875case ${with_sysroot} in #(
1876 yes)
1877   if test "$GCC" = yes; then
1878     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
1879   fi
1880   ;; #(
1881 /*)
1882   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
1883   ;; #(
1884 no|'')
1885   ;; #(
1886 *)
1887   AC_MSG_RESULT([${with_sysroot}])
1888   AC_MSG_ERROR([The sysroot must be an absolute path.])
1889   ;;
1890esac
1891
1892 AC_MSG_RESULT([${lt_sysroot:-no}])
1893_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
1894[dependent libraries, and in which our libraries should be installed.])])
1895
1896# _LT_ENABLE_LOCK
1897# ---------------
1898m4_defun([_LT_ENABLE_LOCK],
1899[AC_ARG_ENABLE([libtool-lock],
1900  [AS_HELP_STRING([--disable-libtool-lock],
1901    [avoid locking (might break parallel builds)])])
1902test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1903
1904# Some flags need to be propagated to the compiler or linker for good
1905# libtool support.
1906case $host in
1907ia64-*-hpux*)
1908  # Find out which ABI we are using.
1909  echo 'int i;' > conftest.$ac_ext
1910  if AC_TRY_EVAL(ac_compile); then
1911    case `/usr/bin/file conftest.$ac_objext` in
1912      *ELF-32*)
1913	HPUX_IA64_MODE="32"
1914	;;
1915      *ELF-64*)
1916	HPUX_IA64_MODE="64"
1917	;;
1918    esac
1919  fi
1920  rm -rf conftest*
1921  ;;
1922*-*-irix6*)
1923  # Find out which ABI we are using.
1924  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1925  if AC_TRY_EVAL(ac_compile); then
1926    if test "$lt_cv_prog_gnu_ld" = yes; then
1927      case `/usr/bin/file conftest.$ac_objext` in
1928	*32-bit*)
1929	  LD="${LD-ld} -melf32bsmip"
1930	  ;;
1931	*N32*)
1932	  LD="${LD-ld} -melf32bmipn32"
1933	  ;;
1934	*64-bit*)
1935	  LD="${LD-ld} -melf64bmip"
1936	;;
1937      esac
1938    else
1939      case `/usr/bin/file conftest.$ac_objext` in
1940	*32-bit*)
1941	  LD="${LD-ld} -32"
1942	  ;;
1943	*N32*)
1944	  LD="${LD-ld} -n32"
1945	  ;;
1946	*64-bit*)
1947	  LD="${LD-ld} -64"
1948	  ;;
1949      esac
1950    fi
1951  fi
1952  rm -rf conftest*
1953  ;;
1954
1955x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
1956s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1957  # Find out which ABI we are using.
1958  echo 'int i;' > conftest.$ac_ext
1959  if AC_TRY_EVAL(ac_compile); then
1960    case `/usr/bin/file conftest.o` in
1961      *32-bit*)
1962	case $host in
1963	  x86_64-*kfreebsd*-gnu)
1964	    LD="${LD-ld} -m elf_i386_fbsd"
1965	    ;;
1966	  x86_64-*linux*)
1967	    LD="${LD-ld} -m elf_i386"
1968	    ;;
1969	  powerpc64le-*linux*)
1970	    LD="${LD-ld} -m elf32lppclinux"
1971	    ;;
1972	  powerpc64-*linux*)
1973	    LD="${LD-ld} -m elf32ppclinux"
1974	    ;;
1975	  s390x-*linux*)
1976	    LD="${LD-ld} -m elf_s390"
1977	    ;;
1978	  sparc64-*linux*)
1979	    LD="${LD-ld} -m elf32_sparc"
1980	    ;;
1981	esac
1982	;;
1983      *64-bit*)
1984	case $host in
1985	  x86_64-*kfreebsd*-gnu)
1986	    LD="${LD-ld} -m elf_x86_64_fbsd"
1987	    ;;
1988	  x86_64-*linux*)
1989	    LD="${LD-ld} -m elf_x86_64"
1990	    ;;
1991	  powerpcle-*linux*)
1992	    LD="${LD-ld} -m elf64lppc"
1993	    ;;
1994	  powerpc-*linux*)
1995	    LD="${LD-ld} -m elf64ppc"
1996	    ;;
1997	  s390*-*linux*|s390*-*tpf*)
1998	    LD="${LD-ld} -m elf64_s390"
1999	    ;;
2000	  sparc*-*linux*)
2001	    LD="${LD-ld} -m elf64_sparc"
2002	    ;;
2003	esac
2004	;;
2005    esac
2006  fi
2007  rm -rf conftest*
2008  ;;
2009
2010*-*-sco3.2v5*)
2011  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2012  SAVE_CFLAGS="$CFLAGS"
2013  CFLAGS="$CFLAGS -belf"
2014  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2015    [AC_LANG_PUSH(C)
2016     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2017     AC_LANG_POP])
2018  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2019    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2020    CFLAGS="$SAVE_CFLAGS"
2021  fi
2022  ;;
2023*-*solaris*)
2024  # Find out which ABI we are using.
2025  echo 'int i;' > conftest.$ac_ext
2026  if AC_TRY_EVAL(ac_compile); then
2027    case `/usr/bin/file conftest.o` in
2028    *64-bit*)
2029      case $lt_cv_prog_gnu_ld in
2030      yes*)
2031        case $host in
2032        i?86-*-solaris*)
2033          LD="${LD-ld} -m elf_x86_64"
2034          ;;
2035        sparc*-*-solaris*)
2036          LD="${LD-ld} -m elf64_sparc"
2037          ;;
2038        esac
2039        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
2040        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
2041          LD="${LD-ld}_sol2"
2042        fi
2043        ;;
2044      *)
2045	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2046	  LD="${LD-ld} -64"
2047	fi
2048	;;
2049      esac
2050      ;;
2051    esac
2052  fi
2053  rm -rf conftest*
2054  ;;
2055esac
2056
2057need_locks="$enable_libtool_lock"
2058])# _LT_ENABLE_LOCK
2059
2060
2061# _LT_PROG_AR
2062# -----------
2063m4_defun([_LT_PROG_AR],
2064[AC_CHECK_TOOLS(AR, [ar], false)
2065: ${AR=ar}
2066: ${AR_FLAGS=cru}
2067_LT_DECL([], [AR], [1], [The archiver])
2068_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
2069
2070AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
2071  [lt_cv_ar_at_file=no
2072   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
2073     [echo conftest.$ac_objext > conftest.lst
2074      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
2075      AC_TRY_EVAL([lt_ar_try])
2076      if test "$ac_status" -eq 0; then
2077	# Ensure the archiver fails upon bogus file names.
2078	rm -f conftest.$ac_objext libconftest.a
2079	AC_TRY_EVAL([lt_ar_try])
2080	if test "$ac_status" -ne 0; then
2081          lt_cv_ar_at_file=@
2082        fi
2083      fi
2084      rm -f conftest.* libconftest.a
2085     ])
2086  ])
2087
2088if test "x$lt_cv_ar_at_file" = xno; then
2089  archiver_list_spec=
2090else
2091  archiver_list_spec=$lt_cv_ar_at_file
2092fi
2093_LT_DECL([], [archiver_list_spec], [1],
2094  [How to feed a file listing to the archiver])
2095])# _LT_PROG_AR
2096
2097
2098# _LT_CMD_OLD_ARCHIVE
2099# -------------------
2100m4_defun([_LT_CMD_OLD_ARCHIVE],
2101[_LT_PROG_AR
2102
2103AC_CHECK_TOOL(STRIP, strip, :)
2104test -z "$STRIP" && STRIP=:
2105_LT_DECL([], [STRIP], [1], [A symbol stripping program])
2106
2107AC_CHECK_TOOL(RANLIB, ranlib, :)
2108test -z "$RANLIB" && RANLIB=:
2109_LT_DECL([], [RANLIB], [1],
2110    [Commands used to install an old-style archive])
2111
2112# Determine commands to create old-style static archives.
2113old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
2114old_postinstall_cmds='chmod 644 $oldlib'
2115old_postuninstall_cmds=
2116
2117if test -n "$RANLIB"; then
2118  case $host_os in
2119  openbsd*)
2120    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
2121    ;;
2122  *)
2123    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
2124    ;;
2125  esac
2126  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
2127fi
2128
2129case $host_os in
2130  darwin*)
2131    lock_old_archive_extraction=yes ;;
2132  *)
2133    lock_old_archive_extraction=no ;;
2134esac
2135_LT_DECL([], [old_postinstall_cmds], [2])
2136_LT_DECL([], [old_postuninstall_cmds], [2])
2137_LT_TAGDECL([], [old_archive_cmds], [2],
2138    [Commands used to build an old-style archive])
2139_LT_DECL([], [lock_old_archive_extraction], [0],
2140    [Whether to use a lock for old archive extraction])
2141])# _LT_CMD_OLD_ARCHIVE
2142
2143
2144# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2145#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2146# ----------------------------------------------------------------
2147# Check whether the given compiler option works
2148AC_DEFUN([_LT_COMPILER_OPTION],
2149[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2150m4_require([_LT_DECL_SED])dnl
2151AC_CACHE_CHECK([$1], [$2],
2152  [$2=no
2153   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2154   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2155   lt_compiler_flag="$3"
2156   # Insert the option either (1) after the last *FLAGS variable, or
2157   # (2) before a word containing "conftest.", or (3) at the end.
2158   # Note that $ac_compile itself does not contain backslashes and begins
2159   # with a dollar sign (not a hyphen), so the echo should work correctly.
2160   # The option is referenced via a variable to avoid confusing sed.
2161   lt_compile=`echo "$ac_compile" | $SED \
2162   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2163   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2164   -e 's:$: $lt_compiler_flag:'`
2165   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2166   (eval "$lt_compile" 2>conftest.err)
2167   ac_status=$?
2168   cat conftest.err >&AS_MESSAGE_LOG_FD
2169   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2170   if (exit $ac_status) && test -s "$ac_outfile"; then
2171     # The compiler can only warn and ignore the option if not recognized
2172     # So say no if there are warnings other than the usual output.
2173     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
2174     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2175     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2176       $2=yes
2177     fi
2178   fi
2179   $RM conftest*
2180])
2181
2182if test x"[$]$2" = xyes; then
2183    m4_if([$5], , :, [$5])
2184else
2185    m4_if([$6], , :, [$6])
2186fi
2187])# _LT_COMPILER_OPTION
2188
2189# Old name:
2190AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
2191dnl aclocal-1.4 backwards compatibility:
2192dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
2193
2194
2195# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2196#                  [ACTION-SUCCESS], [ACTION-FAILURE])
2197# ----------------------------------------------------
2198# Check whether the given linker option works
2199AC_DEFUN([_LT_LINKER_OPTION],
2200[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2201m4_require([_LT_DECL_SED])dnl
2202AC_CACHE_CHECK([$1], [$2],
2203  [$2=no
2204   save_LDFLAGS="$LDFLAGS"
2205   LDFLAGS="$LDFLAGS $3"
2206   echo "$lt_simple_link_test_code" > conftest.$ac_ext
2207   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2208     # The linker can only warn and ignore the option if not recognized
2209     # So say no if there are warnings
2210     if test -s conftest.err; then
2211       # Append any errors to the config.log.
2212       cat conftest.err 1>&AS_MESSAGE_LOG_FD
2213       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
2214       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2215       if diff conftest.exp conftest.er2 >/dev/null; then
2216         $2=yes
2217       fi
2218     else
2219       $2=yes
2220     fi
2221   fi
2222   $RM -r conftest*
2223   LDFLAGS="$save_LDFLAGS"
2224])
2225
2226if test x"[$]$2" = xyes; then
2227    m4_if([$4], , :, [$4])
2228else
2229    m4_if([$5], , :, [$5])
2230fi
2231])# _LT_LINKER_OPTION
2232
2233# Old name:
2234AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
2235dnl aclocal-1.4 backwards compatibility:
2236dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
2237
2238
2239# LT_CMD_MAX_LEN
2240#---------------
2241AC_DEFUN([LT_CMD_MAX_LEN],
2242[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2243# find the maximum length of command line arguments
2244AC_MSG_CHECKING([the maximum length of command line arguments])
2245AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2246  i=0
2247  teststring="ABCD"
2248
2249  case $build_os in
2250  msdosdjgpp*)
2251    # On DJGPP, this test can blow up pretty badly due to problems in libc
2252    # (any single argument exceeding 2000 bytes causes a buffer overrun
2253    # during glob expansion).  Even if it were fixed, the result of this
2254    # check would be larger than it should be.
2255    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
2256    ;;
2257
2258  gnu*)
2259    # Under GNU Hurd, this test is not required because there is
2260    # no limit to the length of command line arguments.
2261    # Libtool will interpret -1 as no limit whatsoever
2262    lt_cv_sys_max_cmd_len=-1;
2263    ;;
2264
2265  cygwin* | mingw* | cegcc*)
2266    # On Win9x/ME, this test blows up -- it succeeds, but takes
2267    # about 5 minutes as the teststring grows exponentially.
2268    # Worse, since 9x/ME are not pre-emptively multitasking,
2269    # you end up with a "frozen" computer, even though with patience
2270    # the test eventually succeeds (with a max line length of 256k).
2271    # Instead, let's just punt: use the minimum linelength reported by
2272    # all of the supported platforms: 8192 (on NT/2K/XP).
2273    lt_cv_sys_max_cmd_len=8192;
2274    ;;
2275
2276  mint*)
2277    # On MiNT this can take a long time and run out of memory.
2278    lt_cv_sys_max_cmd_len=8192;
2279    ;;
2280
2281  amigaos*)
2282    # On AmigaOS with pdksh, this test takes hours, literally.
2283    # So we just punt and use a minimum line length of 8192.
2284    lt_cv_sys_max_cmd_len=8192;
2285    ;;
2286
2287  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2288    # This has been around since 386BSD, at least.  Likely further.
2289    if test -x /sbin/sysctl; then
2290      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2291    elif test -x /usr/sbin/sysctl; then
2292      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2293    else
2294      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
2295    fi
2296    # And add a safety zone
2297    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2298    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2299    ;;
2300
2301  interix*)
2302    # We know the value 262144 and hardcode it with a safety zone (like BSD)
2303    lt_cv_sys_max_cmd_len=196608
2304    ;;
2305
2306  os2*)
2307    # The test takes a long time on OS/2.
2308    lt_cv_sys_max_cmd_len=8192
2309    ;;
2310
2311  osf*)
2312    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2313    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2314    # nice to cause kernel panics so lets avoid the loop below.
2315    # First set a reasonable default.
2316    lt_cv_sys_max_cmd_len=16384
2317    #
2318    if test -x /sbin/sysconfig; then
2319      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2320        *1*) lt_cv_sys_max_cmd_len=-1 ;;
2321      esac
2322    fi
2323    ;;
2324  sco3.2v5*)
2325    lt_cv_sys_max_cmd_len=102400
2326    ;;
2327  sysv5* | sco5v6* | sysv4.2uw2*)
2328    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2329    if test -n "$kargmax"; then
2330      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
2331    else
2332      lt_cv_sys_max_cmd_len=32768
2333    fi
2334    ;;
2335  *)
2336    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
2337    if test -n "$lt_cv_sys_max_cmd_len"; then
2338      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2339      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2340    else
2341      # Make teststring a little bigger before we do anything with it.
2342      # a 1K string should be a reasonable start.
2343      for i in 1 2 3 4 5 6 7 8 ; do
2344        teststring=$teststring$teststring
2345      done
2346      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2347      # If test is not a shell built-in, we'll probably end up computing a
2348      # maximum length that is only half of the actual maximum length, but
2349      # we can't tell.
2350      while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
2351	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
2352	      test $i != 17 # 1/2 MB should be enough
2353      do
2354        i=`expr $i + 1`
2355        teststring=$teststring$teststring
2356      done
2357      # Only check the string length outside the loop.
2358      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
2359      teststring=
2360      # Add a significant safety factor because C++ compilers can tack on
2361      # massive amounts of additional arguments before passing them to the
2362      # linker.  It appears as though 1/2 is a usable value.
2363      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2364    fi
2365    ;;
2366  esac
2367])
2368if test -n $lt_cv_sys_max_cmd_len ; then
2369  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2370else
2371  AC_MSG_RESULT(none)
2372fi
2373max_cmd_len=$lt_cv_sys_max_cmd_len
2374_LT_DECL([], [max_cmd_len], [0],
2375    [What is the maximum length of a command?])
2376])# LT_CMD_MAX_LEN
2377
2378# Old name:
2379AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
2380dnl aclocal-1.4 backwards compatibility:
2381dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
2382
2383
2384# _LT_HEADER_DLFCN
2385# ----------------
2386m4_defun([_LT_HEADER_DLFCN],
2387[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
2388])# _LT_HEADER_DLFCN
2389
2390
2391# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2392#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2393# ----------------------------------------------------------------
2394m4_defun([_LT_TRY_DLOPEN_SELF],
2395[m4_require([_LT_HEADER_DLFCN])dnl
2396if test "$cross_compiling" = yes; then :
2397  [$4]
2398else
2399  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2400  lt_status=$lt_dlunknown
2401  cat > conftest.$ac_ext <<_LT_EOF
2402[#line $LINENO "configure"
2403#include "confdefs.h"
2404
2405#if HAVE_DLFCN_H
2406#include <dlfcn.h>
2407#endif
2408
2409#include <stdio.h>
2410
2411#ifdef RTLD_GLOBAL
2412#  define LT_DLGLOBAL		RTLD_GLOBAL
2413#else
2414#  ifdef DL_GLOBAL
2415#    define LT_DLGLOBAL		DL_GLOBAL
2416#  else
2417#    define LT_DLGLOBAL		0
2418#  endif
2419#endif
2420
2421/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2422   find out it does not work in some platform. */
2423#ifndef LT_DLLAZY_OR_NOW
2424#  ifdef RTLD_LAZY
2425#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
2426#  else
2427#    ifdef DL_LAZY
2428#      define LT_DLLAZY_OR_NOW		DL_LAZY
2429#    else
2430#      ifdef RTLD_NOW
2431#        define LT_DLLAZY_OR_NOW	RTLD_NOW
2432#      else
2433#        ifdef DL_NOW
2434#          define LT_DLLAZY_OR_NOW	DL_NOW
2435#        else
2436#          define LT_DLLAZY_OR_NOW	0
2437#        endif
2438#      endif
2439#    endif
2440#  endif
2441#endif
2442
2443/* When -fvisbility=hidden is used, assume the code has been annotated
2444   correspondingly for the symbols needed.  */
2445#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
2446int fnord () __attribute__((visibility("default")));
2447#endif
2448
2449int fnord () { return 42; }
2450int main ()
2451{
2452  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2453  int status = $lt_dlunknown;
2454
2455  if (self)
2456    {
2457      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
2458      else
2459        {
2460	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
2461          else puts (dlerror ());
2462	}
2463      /* dlclose (self); */
2464    }
2465  else
2466    puts (dlerror ());
2467
2468  return status;
2469}]
2470_LT_EOF
2471  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
2472    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
2473    lt_status=$?
2474    case x$lt_status in
2475      x$lt_dlno_uscore) $1 ;;
2476      x$lt_dlneed_uscore) $2 ;;
2477      x$lt_dlunknown|x*) $3 ;;
2478    esac
2479  else :
2480    # compilation failed
2481    $3
2482  fi
2483fi
2484rm -fr conftest*
2485])# _LT_TRY_DLOPEN_SELF
2486
2487
2488# LT_SYS_DLOPEN_SELF
2489# ------------------
2490AC_DEFUN([LT_SYS_DLOPEN_SELF],
2491[m4_require([_LT_HEADER_DLFCN])dnl
2492if test "x$enable_dlopen" != xyes; then
2493  enable_dlopen=unknown
2494  enable_dlopen_self=unknown
2495  enable_dlopen_self_static=unknown
2496else
2497  lt_cv_dlopen=no
2498  lt_cv_dlopen_libs=
2499
2500  case $host_os in
2501  beos*)
2502    lt_cv_dlopen="load_add_on"
2503    lt_cv_dlopen_libs=
2504    lt_cv_dlopen_self=yes
2505    ;;
2506
2507  mingw* | pw32* | cegcc*)
2508    lt_cv_dlopen="LoadLibrary"
2509    lt_cv_dlopen_libs=
2510    ;;
2511
2512  cygwin*)
2513    lt_cv_dlopen="dlopen"
2514    lt_cv_dlopen_libs=
2515    ;;
2516
2517  darwin*)
2518  # if libdl is installed we need to link against it
2519    AC_CHECK_LIB([dl], [dlopen],
2520		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2521    lt_cv_dlopen="dyld"
2522    lt_cv_dlopen_libs=
2523    lt_cv_dlopen_self=yes
2524    ])
2525    ;;
2526
2527  *)
2528    AC_CHECK_FUNC([shl_load],
2529	  [lt_cv_dlopen="shl_load"],
2530      [AC_CHECK_LIB([dld], [shl_load],
2531	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
2532	[AC_CHECK_FUNC([dlopen],
2533	      [lt_cv_dlopen="dlopen"],
2534	  [AC_CHECK_LIB([dl], [dlopen],
2535		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2536	    [AC_CHECK_LIB([svld], [dlopen],
2537		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2538	      [AC_CHECK_LIB([dld], [dld_link],
2539		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
2540	      ])
2541	    ])
2542	  ])
2543	])
2544      ])
2545    ;;
2546  esac
2547
2548  if test "x$lt_cv_dlopen" != xno; then
2549    enable_dlopen=yes
2550  else
2551    enable_dlopen=no
2552  fi
2553
2554  case $lt_cv_dlopen in
2555  dlopen)
2556    save_CPPFLAGS="$CPPFLAGS"
2557    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2558
2559    save_LDFLAGS="$LDFLAGS"
2560    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2561
2562    save_LIBS="$LIBS"
2563    LIBS="$lt_cv_dlopen_libs $LIBS"
2564
2565    AC_CACHE_CHECK([whether a program can dlopen itself],
2566	  lt_cv_dlopen_self, [dnl
2567	  _LT_TRY_DLOPEN_SELF(
2568	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2569	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2570    ])
2571
2572    if test "x$lt_cv_dlopen_self" = xyes; then
2573      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2574      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2575	  lt_cv_dlopen_self_static, [dnl
2576	  _LT_TRY_DLOPEN_SELF(
2577	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2578	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
2579      ])
2580    fi
2581
2582    CPPFLAGS="$save_CPPFLAGS"
2583    LDFLAGS="$save_LDFLAGS"
2584    LIBS="$save_LIBS"
2585    ;;
2586  esac
2587
2588  case $lt_cv_dlopen_self in
2589  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2590  *) enable_dlopen_self=unknown ;;
2591  esac
2592
2593  case $lt_cv_dlopen_self_static in
2594  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2595  *) enable_dlopen_self_static=unknown ;;
2596  esac
2597fi
2598_LT_DECL([dlopen_support], [enable_dlopen], [0],
2599	 [Whether dlopen is supported])
2600_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2601	 [Whether dlopen of programs is supported])
2602_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2603	 [Whether dlopen of statically linked programs is supported])
2604])# LT_SYS_DLOPEN_SELF
2605
2606# Old name:
2607AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2608dnl aclocal-1.4 backwards compatibility:
2609dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2610
2611
2612# _LT_COMPILER_C_O([TAGNAME])
2613# ---------------------------
2614# Check to see if options -c and -o are simultaneously supported by compiler.
2615# This macro does not hard code the compiler like AC_PROG_CC_C_O.
2616m4_defun([_LT_COMPILER_C_O],
2617[m4_require([_LT_DECL_SED])dnl
2618m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2619m4_require([_LT_TAG_COMPILER])dnl
2620AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2621  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2622  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2623   $RM -r conftest 2>/dev/null
2624   mkdir conftest
2625   cd conftest
2626   mkdir out
2627   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2628
2629   lt_compiler_flag="-o out/conftest2.$ac_objext"
2630   # Insert the option either (1) after the last *FLAGS variable, or
2631   # (2) before a word containing "conftest.", or (3) at the end.
2632   # Note that $ac_compile itself does not contain backslashes and begins
2633   # with a dollar sign (not a hyphen), so the echo should work correctly.
2634   lt_compile=`echo "$ac_compile" | $SED \
2635   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2636   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2637   -e 's:$: $lt_compiler_flag:'`
2638   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2639   (eval "$lt_compile" 2>out/conftest.err)
2640   ac_status=$?
2641   cat out/conftest.err >&AS_MESSAGE_LOG_FD
2642   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2643   if (exit $ac_status) && test -s out/conftest2.$ac_objext
2644   then
2645     # The compiler can only warn and ignore the option if not recognized
2646     # So say no if there are warnings
2647     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
2648     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2649     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2650       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2651     fi
2652   fi
2653   chmod u+w . 2>&AS_MESSAGE_LOG_FD
2654   $RM conftest*
2655   # SGI C++ compiler will create directory out/ii_files/ for
2656   # template instantiation
2657   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2658   $RM out/* && rmdir out
2659   cd ..
2660   $RM -r conftest
2661   $RM conftest*
2662])
2663_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2664	[Does compiler simultaneously support -c and -o options?])
2665])# _LT_COMPILER_C_O
2666
2667
2668# _LT_COMPILER_FILE_LOCKS([TAGNAME])
2669# ----------------------------------
2670# Check to see if we can do hard links to lock some files if needed
2671m4_defun([_LT_COMPILER_FILE_LOCKS],
2672[m4_require([_LT_ENABLE_LOCK])dnl
2673m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2674_LT_COMPILER_C_O([$1])
2675
2676hard_links="nottested"
2677if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2678  # do not overwrite the value of need_locks provided by the user
2679  AC_MSG_CHECKING([if we can lock with hard links])
2680  hard_links=yes
2681  $RM conftest*
2682  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2683  touch conftest.a
2684  ln conftest.a conftest.b 2>&5 || hard_links=no
2685  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2686  AC_MSG_RESULT([$hard_links])
2687  if test "$hard_links" = no; then
2688    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2689    need_locks=warn
2690  fi
2691else
2692  need_locks=no
2693fi
2694_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2695])# _LT_COMPILER_FILE_LOCKS
2696
2697
2698# _LT_CHECK_OBJDIR
2699# ----------------
2700m4_defun([_LT_CHECK_OBJDIR],
2701[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2702[rm -f .libs 2>/dev/null
2703mkdir .libs 2>/dev/null
2704if test -d .libs; then
2705  lt_cv_objdir=.libs
2706else
2707  # MS-DOS does not allow filenames that begin with a dot.
2708  lt_cv_objdir=_libs
2709fi
2710rmdir .libs 2>/dev/null])
2711objdir=$lt_cv_objdir
2712_LT_DECL([], [objdir], [0],
2713         [The name of the directory that contains temporary libtool files])dnl
2714m4_pattern_allow([LT_OBJDIR])dnl
2715AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
2716  [Define to the sub-directory in which libtool stores uninstalled libraries.])
2717])# _LT_CHECK_OBJDIR
2718
2719
2720# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2721# --------------------------------------
2722# Check hardcoding attributes.
2723m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2724[AC_MSG_CHECKING([how to hardcode library paths into programs])
2725_LT_TAGVAR(hardcode_action, $1)=
2726if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2727   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2728   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2729
2730  # We can hardcode non-existent directories.
2731  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
2732     # If the only mechanism to avoid hardcoding is shlibpath_var, we
2733     # have to relink, otherwise we might link with an installed library
2734     # when we should be linking with a yet-to-be-installed one
2735     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2736     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
2737    # Linking always hardcodes the temporary library directory.
2738    _LT_TAGVAR(hardcode_action, $1)=relink
2739  else
2740    # We can link without hardcoding, and we can hardcode nonexisting dirs.
2741    _LT_TAGVAR(hardcode_action, $1)=immediate
2742  fi
2743else
2744  # We cannot hardcode anything, or else we can only hardcode existing
2745  # directories.
2746  _LT_TAGVAR(hardcode_action, $1)=unsupported
2747fi
2748AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2749
2750if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2751   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2752  # Fast installation is not supported
2753  enable_fast_install=no
2754elif test "$shlibpath_overrides_runpath" = yes ||
2755     test "$enable_shared" = no; then
2756  # Fast installation is not necessary
2757  enable_fast_install=needless
2758fi
2759_LT_TAGDECL([], [hardcode_action], [0],
2760    [How to hardcode a shared library path into an executable])
2761])# _LT_LINKER_HARDCODE_LIBPATH
2762
2763
2764# _LT_CMD_STRIPLIB
2765# ----------------
2766m4_defun([_LT_CMD_STRIPLIB],
2767[m4_require([_LT_DECL_EGREP])
2768striplib=
2769old_striplib=
2770AC_MSG_CHECKING([whether stripping libraries is possible])
2771if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2772  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2773  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2774  AC_MSG_RESULT([yes])
2775else
2776# FIXME - insert some real tests, host_os isn't really good enough
2777  case $host_os in
2778  darwin*)
2779    if test -n "$STRIP" ; then
2780      striplib="$STRIP -x"
2781      old_striplib="$STRIP -S"
2782      AC_MSG_RESULT([yes])
2783    else
2784      AC_MSG_RESULT([no])
2785    fi
2786    ;;
2787  *)
2788    AC_MSG_RESULT([no])
2789    ;;
2790  esac
2791fi
2792_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2793_LT_DECL([], [striplib], [1])
2794])# _LT_CMD_STRIPLIB
2795
2796
2797# _LT_SYS_DYNAMIC_LINKER([TAG])
2798# -----------------------------
2799# PORTME Fill in your ld.so characteristics
2800m4_defun([_LT_SYS_DYNAMIC_LINKER],
2801[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2802m4_require([_LT_DECL_EGREP])dnl
2803m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2804m4_require([_LT_DECL_OBJDUMP])dnl
2805m4_require([_LT_DECL_SED])dnl
2806m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2807AC_MSG_CHECKING([dynamic linker characteristics])
2808m4_if([$1],
2809	[], [
2810if test "$GCC" = yes; then
2811  case $host_os in
2812    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2813    *) lt_awk_arg="/^libraries:/" ;;
2814  esac
2815  case $host_os in
2816    mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
2817    *) lt_sed_strip_eq="s,=/,/,g" ;;
2818  esac
2819  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
2820  case $lt_search_path_spec in
2821  *\;*)
2822    # if the path contains ";" then we assume it to be the separator
2823    # otherwise default to the standard path separator (i.e. ":") - it is
2824    # assumed that no part of a normal pathname contains ";" but that should
2825    # okay in the real world where ";" in dirpaths is itself problematic.
2826    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
2827    ;;
2828  *)
2829    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
2830    ;;
2831  esac
2832  # Ok, now we have the path, separated by spaces, we can step through it
2833  # and add multilib dir if necessary.
2834  lt_tmp_lt_search_path_spec=
2835  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2836  for lt_sys_path in $lt_search_path_spec; do
2837    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2838      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2839    else
2840      test -d "$lt_sys_path" && \
2841	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2842    fi
2843  done
2844  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
2845BEGIN {RS=" "; FS="/|\n";} {
2846  lt_foo="";
2847  lt_count=0;
2848  for (lt_i = NF; lt_i > 0; lt_i--) {
2849    if ($lt_i != "" && $lt_i != ".") {
2850      if ($lt_i == "..") {
2851        lt_count++;
2852      } else {
2853        if (lt_count == 0) {
2854          lt_foo="/" $lt_i lt_foo;
2855        } else {
2856          lt_count--;
2857        }
2858      }
2859    }
2860  }
2861  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2862  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2863}'`
2864  # AWK program above erroneously prepends '/' to C:/dos/paths
2865  # for these hosts.
2866  case $host_os in
2867    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
2868      $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
2869  esac
2870  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
2871else
2872  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2873fi])
2874library_names_spec=
2875libname_spec='lib$name'
2876soname_spec=
2877shrext_cmds=".so"
2878postinstall_cmds=
2879postuninstall_cmds=
2880finish_cmds=
2881finish_eval=
2882shlibpath_var=
2883shlibpath_overrides_runpath=unknown
2884version_type=none
2885dynamic_linker="$host_os ld.so"
2886sys_lib_dlsearch_path_spec="/lib /usr/lib"
2887need_lib_prefix=unknown
2888hardcode_into_libs=no
2889
2890# when you set need_version to no, make sure it does not cause -set_version
2891# flags to be left without arguments
2892need_version=unknown
2893
2894case $host_os in
2895aix3*)
2896  version_type=linux # correct to gnu/linux during the next big refactor
2897  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2898  shlibpath_var=LIBPATH
2899
2900  # AIX 3 has no versioning support, so we append a major version to the name.
2901  soname_spec='${libname}${release}${shared_ext}$major'
2902  ;;
2903
2904aix[[4-9]]*)
2905  version_type=linux # correct to gnu/linux during the next big refactor
2906  need_lib_prefix=no
2907  need_version=no
2908  hardcode_into_libs=yes
2909  if test "$host_cpu" = ia64; then
2910    # AIX 5 supports IA64
2911    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2912    shlibpath_var=LD_LIBRARY_PATH
2913  else
2914    # With GCC up to 2.95.x, collect2 would create an import file
2915    # for dependence libraries.  The import file would start with
2916    # the line `#! .'.  This would cause the generated library to
2917    # depend on `.', always an invalid library.  This was fixed in
2918    # development snapshots of GCC prior to 3.0.
2919    case $host_os in
2920      aix4 | aix4.[[01]] | aix4.[[01]].*)
2921      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2922	   echo ' yes '
2923	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2924	:
2925      else
2926	can_build_shared=no
2927      fi
2928      ;;
2929    esac
2930    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2931    # soname into executable. Probably we can add versioning support to
2932    # collect2, so additional links can be useful in future.
2933    if test "$aix_use_runtimelinking" = yes; then
2934      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2935      # instead of lib<name>.a to let people know that these are not
2936      # typical AIX shared libraries.
2937      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2938    else
2939      # We preserve .a as extension for shared libraries through AIX4.2
2940      # and later when we are not doing run time linking.
2941      library_names_spec='${libname}${release}.a $libname.a'
2942      soname_spec='${libname}${release}${shared_ext}$major'
2943    fi
2944    shlibpath_var=LIBPATH
2945  fi
2946  ;;
2947
2948amigaos*)
2949  case $host_cpu in
2950  powerpc)
2951    # Since July 2007 AmigaOS4 officially supports .so libraries.
2952    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2953    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2954    ;;
2955  m68k)
2956    library_names_spec='$libname.ixlibrary $libname.a'
2957    # Create ${libname}_ixlibrary.a entries in /sys/libs.
2958    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $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'
2959    ;;
2960  esac
2961  ;;
2962
2963beos*)
2964  library_names_spec='${libname}${shared_ext}'
2965  dynamic_linker="$host_os ld.so"
2966  shlibpath_var=LIBRARY_PATH
2967  ;;
2968
2969bsdi[[45]]*)
2970  version_type=linux # correct to gnu/linux during the next big refactor
2971  need_version=no
2972  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2973  soname_spec='${libname}${release}${shared_ext}$major'
2974  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2975  shlibpath_var=LD_LIBRARY_PATH
2976  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2977  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2978  # the default ld.so.conf also contains /usr/contrib/lib and
2979  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2980  # libtool to hard-code these into programs
2981  ;;
2982
2983cygwin* | mingw* | pw32* | cegcc*)
2984  version_type=windows
2985  shrext_cmds=".dll"
2986  need_version=no
2987  need_lib_prefix=no
2988
2989  case $GCC,$cc_basename in
2990  yes,*)
2991    # gcc
2992    library_names_spec='$libname.dll.a'
2993    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2994    postinstall_cmds='base_file=`basename \${file}`~
2995      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2996      dldir=$destdir/`dirname \$dlpath`~
2997      test -d \$dldir || mkdir -p \$dldir~
2998      $install_prog $dir/$dlname \$dldir/$dlname~
2999      chmod a+x \$dldir/$dlname~
3000      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
3001        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
3002      fi'
3003    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3004      dlpath=$dir/\$dldll~
3005       $RM \$dlpath'
3006    shlibpath_overrides_runpath=yes
3007
3008    case $host_os in
3009    cygwin*)
3010      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
3011      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3012m4_if([$1], [],[
3013      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
3014      ;;
3015    mingw* | cegcc*)
3016      # MinGW DLLs use traditional 'lib' prefix
3017      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3018      ;;
3019    pw32*)
3020      # pw32 DLLs use 'pw' prefix rather than 'lib'
3021      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3022      ;;
3023    esac
3024    dynamic_linker='Win32 ld.exe'
3025    ;;
3026
3027  *,cl*)
3028    # Native MSVC
3029    libname_spec='$name'
3030    soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3031    library_names_spec='${libname}.dll.lib'
3032
3033    case $build_os in
3034    mingw*)
3035      sys_lib_search_path_spec=
3036      lt_save_ifs=$IFS
3037      IFS=';'
3038      for lt_path in $LIB
3039      do
3040        IFS=$lt_save_ifs
3041        # Let DOS variable expansion print the short 8.3 style file name.
3042        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
3043        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
3044      done
3045      IFS=$lt_save_ifs
3046      # Convert to MSYS style.
3047      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
3048      ;;
3049    cygwin*)
3050      # Convert to unix form, then to dos form, then back to unix form
3051      # but this time dos style (no spaces!) so that the unix form looks
3052      # like /cygdrive/c/PROGRA~1:/cygdr...
3053      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
3054      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
3055      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3056      ;;
3057    *)
3058      sys_lib_search_path_spec="$LIB"
3059      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
3060        # It is most probably a Windows format PATH.
3061        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3062      else
3063        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3064      fi
3065      # FIXME: find the short name or the path components, as spaces are
3066      # common. (e.g. "Program Files" -> "PROGRA~1")
3067      ;;
3068    esac
3069
3070    # DLL is installed to $(libdir)/../bin by postinstall_cmds
3071    postinstall_cmds='base_file=`basename \${file}`~
3072      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3073      dldir=$destdir/`dirname \$dlpath`~
3074      test -d \$dldir || mkdir -p \$dldir~
3075      $install_prog $dir/$dlname \$dldir/$dlname'
3076    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3077      dlpath=$dir/\$dldll~
3078       $RM \$dlpath'
3079    shlibpath_overrides_runpath=yes
3080    dynamic_linker='Win32 link.exe'
3081    ;;
3082
3083  *)
3084    # Assume MSVC wrapper
3085    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3086    dynamic_linker='Win32 ld.exe'
3087    ;;
3088  esac
3089  # FIXME: first we should search . and the directory the executable is in
3090  shlibpath_var=PATH
3091  ;;
3092
3093darwin* | rhapsody*)
3094  dynamic_linker="$host_os dyld"
3095  version_type=darwin
3096  need_lib_prefix=no
3097  need_version=no
3098  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
3099  soname_spec='${libname}${release}${major}$shared_ext'
3100  shlibpath_overrides_runpath=yes
3101  shlibpath_var=DYLD_LIBRARY_PATH
3102  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
3103m4_if([$1], [],[
3104  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
3105  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3106  ;;
3107
3108dgux*)
3109  version_type=linux # correct to gnu/linux during the next big refactor
3110  need_lib_prefix=no
3111  need_version=no
3112  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
3113  soname_spec='${libname}${release}${shared_ext}$major'
3114  shlibpath_var=LD_LIBRARY_PATH
3115  ;;
3116
3117freebsd* | dragonfly*)
3118  # DragonFly does not have aout.  When/if they implement a new
3119  # versioning mechanism, adjust this.
3120  if test -x /usr/bin/objformat; then
3121    objformat=`/usr/bin/objformat`
3122  else
3123    case $host_os in
3124    freebsd[[23]].*) objformat=aout ;;
3125    *) objformat=elf ;;
3126    esac
3127  fi
3128  version_type=freebsd-$objformat
3129  case $version_type in
3130    freebsd-elf*)
3131      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3132      need_version=no
3133      need_lib_prefix=no
3134      ;;
3135    freebsd-*)
3136      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3137      need_version=yes
3138      ;;
3139  esac
3140  shlibpath_var=LD_LIBRARY_PATH
3141  case $host_os in
3142  freebsd2.*)
3143    shlibpath_overrides_runpath=yes
3144    ;;
3145  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3146    shlibpath_overrides_runpath=yes
3147    hardcode_into_libs=yes
3148    ;;
3149  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3150  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
3151    shlibpath_overrides_runpath=no
3152    hardcode_into_libs=yes
3153    ;;
3154  *) # from 4.6 on, and DragonFly
3155    shlibpath_overrides_runpath=yes
3156    hardcode_into_libs=yes
3157    ;;
3158  esac
3159  ;;
3160
3161gnu*)
3162  version_type=linux # correct to gnu/linux during the next big refactor
3163  need_lib_prefix=no
3164  need_version=no
3165  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3166  soname_spec='${libname}${release}${shared_ext}$major'
3167  shlibpath_var=LD_LIBRARY_PATH
3168  shlibpath_overrides_runpath=no
3169  hardcode_into_libs=yes
3170  ;;
3171
3172haiku*)
3173  version_type=linux # correct to gnu/linux during the next big refactor
3174  need_lib_prefix=no
3175  need_version=no
3176  dynamic_linker="$host_os runtime_loader"
3177  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3178  soname_spec='${libname}${release}${shared_ext}$major'
3179  shlibpath_var=LIBRARY_PATH
3180  shlibpath_overrides_runpath=yes
3181  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
3182  hardcode_into_libs=yes
3183  ;;
3184
3185hpux9* | hpux10* | hpux11*)
3186  # Give a soname corresponding to the major version so that dld.sl refuses to
3187  # link against other versions.
3188  version_type=sunos
3189  need_lib_prefix=no
3190  need_version=no
3191  case $host_cpu in
3192  ia64*)
3193    shrext_cmds='.so'
3194    hardcode_into_libs=yes
3195    dynamic_linker="$host_os dld.so"
3196    shlibpath_var=LD_LIBRARY_PATH
3197    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3198    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3199    soname_spec='${libname}${release}${shared_ext}$major'
3200    if test "X$HPUX_IA64_MODE" = X32; then
3201      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3202    else
3203      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3204    fi
3205    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3206    ;;
3207  hppa*64*)
3208    shrext_cmds='.sl'
3209    hardcode_into_libs=yes
3210    dynamic_linker="$host_os dld.sl"
3211    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3212    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3213    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3214    soname_spec='${libname}${release}${shared_ext}$major'
3215    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3216    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3217    ;;
3218  *)
3219    shrext_cmds='.sl'
3220    dynamic_linker="$host_os dld.sl"
3221    shlibpath_var=SHLIB_PATH
3222    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
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    ;;
3226  esac
3227  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
3228  postinstall_cmds='chmod 555 $lib'
3229  # or fails outright, so override atomically:
3230  install_override_mode=555
3231  ;;
3232
3233interix[[3-9]]*)
3234  version_type=linux # correct to gnu/linux during the next big refactor
3235  need_lib_prefix=no
3236  need_version=no
3237  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3238  soname_spec='${libname}${release}${shared_ext}$major'
3239  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3240  shlibpath_var=LD_LIBRARY_PATH
3241  shlibpath_overrides_runpath=no
3242  hardcode_into_libs=yes
3243  ;;
3244
3245irix5* | irix6* | nonstopux*)
3246  case $host_os in
3247    nonstopux*) version_type=nonstopux ;;
3248    *)
3249	if test "$lt_cv_prog_gnu_ld" = yes; then
3250		version_type=linux # correct to gnu/linux during the next big refactor
3251	else
3252		version_type=irix
3253	fi ;;
3254  esac
3255  need_lib_prefix=no
3256  need_version=no
3257  soname_spec='${libname}${release}${shared_ext}$major'
3258  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3259  case $host_os in
3260  irix5* | nonstopux*)
3261    libsuff= shlibsuff=
3262    ;;
3263  *)
3264    case $LD in # libtool.m4 will add one of these switches to LD
3265    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3266      libsuff= shlibsuff= libmagic=32-bit;;
3267    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3268      libsuff=32 shlibsuff=N32 libmagic=N32;;
3269    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3270      libsuff=64 shlibsuff=64 libmagic=64-bit;;
3271    *) libsuff= shlibsuff= libmagic=never-match;;
3272    esac
3273    ;;
3274  esac
3275  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3276  shlibpath_overrides_runpath=no
3277  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3278  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3279  hardcode_into_libs=yes
3280  ;;
3281
3282# No shared lib support for Linux oldld, aout, or coff.
3283linux*oldld* | linux*aout* | linux*coff*)
3284  dynamic_linker=no
3285  ;;
3286
3287# This must be glibc/ELF.
3288linux* | k*bsd*-gnu | kopensolaris*-gnu)
3289  version_type=linux # correct to gnu/linux during the next big refactor
3290  need_lib_prefix=no
3291  need_version=no
3292  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3293  soname_spec='${libname}${release}${shared_ext}$major'
3294  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3295  shlibpath_var=LD_LIBRARY_PATH
3296  shlibpath_overrides_runpath=no
3297
3298  # Some binutils ld are patched to set DT_RUNPATH
3299  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
3300    [lt_cv_shlibpath_overrides_runpath=no
3301    save_LDFLAGS=$LDFLAGS
3302    save_libdir=$libdir
3303    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
3304	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
3305    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3306      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
3307	 [lt_cv_shlibpath_overrides_runpath=yes])])
3308    LDFLAGS=$save_LDFLAGS
3309    libdir=$save_libdir
3310    ])
3311  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
3312
3313  # This implies no fast_install, which is unacceptable.
3314  # Some rework will be needed to allow for fast_install
3315  # before this can be enabled.
3316  hardcode_into_libs=yes
3317
3318  # Add ABI-specific directories to the system library path.
3319  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
3320
3321  # Append ld.so.conf contents to the search path
3322  if test -f /etc/ld.so.conf; then
3323    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' ' '`
3324    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
3325
3326  fi
3327
3328  # We used to test for /lib/ld.so.1 and disable shared libraries on
3329  # powerpc, because MkLinux only supported shared libraries with the
3330  # GNU dynamic linker.  Since this was broken with cross compilers,
3331  # most powerpc-linux boxes support dynamic linking these days and
3332  # people can always --disable-shared, the test was removed, and we
3333  # assume the GNU/Linux dynamic linker is in use.
3334  dynamic_linker='GNU/Linux ld.so'
3335  ;;
3336
3337netbsd*)
3338  version_type=sunos
3339  need_lib_prefix=no
3340  need_version=no
3341  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
3342    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3343    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3344    dynamic_linker='NetBSD (a.out) ld.so'
3345  else
3346    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3347    soname_spec='${libname}${release}${shared_ext}$major'
3348    dynamic_linker='NetBSD ld.elf_so'
3349  fi
3350  shlibpath_var=LD_LIBRARY_PATH
3351  shlibpath_overrides_runpath=yes
3352  hardcode_into_libs=yes
3353  ;;
3354
3355newsos6)
3356  version_type=linux # correct to gnu/linux during the next big refactor
3357  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3358  shlibpath_var=LD_LIBRARY_PATH
3359  shlibpath_overrides_runpath=yes
3360  ;;
3361
3362*nto* | *qnx*)
3363  version_type=qnx
3364  need_lib_prefix=no
3365  need_version=no
3366  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3367  soname_spec='${libname}${release}${shared_ext}$major'
3368  shlibpath_var=LD_LIBRARY_PATH
3369  shlibpath_overrides_runpath=no
3370  hardcode_into_libs=yes
3371  dynamic_linker='ldqnx.so'
3372  ;;
3373
3374openbsd*)
3375  version_type=sunos
3376  sys_lib_dlsearch_path_spec="/usr/lib"
3377  need_lib_prefix=no
3378  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
3379  case $host_os in
3380    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
3381    *)				need_version=no  ;;
3382  esac
3383  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3384  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3385  shlibpath_var=LD_LIBRARY_PATH
3386  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3387    case $host_os in
3388      openbsd2.[[89]] | openbsd2.[[89]].*)
3389	shlibpath_overrides_runpath=no
3390	;;
3391      *)
3392	shlibpath_overrides_runpath=yes
3393	;;
3394      esac
3395  else
3396    shlibpath_overrides_runpath=yes
3397  fi
3398  ;;
3399
3400os2*)
3401  libname_spec='$name'
3402  shrext_cmds=".dll"
3403  need_lib_prefix=no
3404  library_names_spec='$libname${shared_ext} $libname.a'
3405  dynamic_linker='OS/2 ld.exe'
3406  shlibpath_var=LIBPATH
3407  ;;
3408
3409osf3* | osf4* | osf5*)
3410  version_type=osf
3411  need_lib_prefix=no
3412  need_version=no
3413  soname_spec='${libname}${release}${shared_ext}$major'
3414  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3415  shlibpath_var=LD_LIBRARY_PATH
3416  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3417  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3418  ;;
3419
3420rdos*)
3421  dynamic_linker=no
3422  ;;
3423
3424solaris*)
3425  version_type=linux # correct to gnu/linux during the next big refactor
3426  need_lib_prefix=no
3427  need_version=no
3428  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3429  soname_spec='${libname}${release}${shared_ext}$major'
3430  shlibpath_var=LD_LIBRARY_PATH
3431  shlibpath_overrides_runpath=yes
3432  hardcode_into_libs=yes
3433  # ldd complains unless libraries are executable
3434  postinstall_cmds='chmod +x $lib'
3435  ;;
3436
3437sunos4*)
3438  version_type=sunos
3439  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3440  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3441  shlibpath_var=LD_LIBRARY_PATH
3442  shlibpath_overrides_runpath=yes
3443  if test "$with_gnu_ld" = yes; then
3444    need_lib_prefix=no
3445  fi
3446  need_version=yes
3447  ;;
3448
3449sysv4 | sysv4.3*)
3450  version_type=linux # correct to gnu/linux during the next big refactor
3451  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3452  soname_spec='${libname}${release}${shared_ext}$major'
3453  shlibpath_var=LD_LIBRARY_PATH
3454  case $host_vendor in
3455    sni)
3456      shlibpath_overrides_runpath=no
3457      need_lib_prefix=no
3458      runpath_var=LD_RUN_PATH
3459      ;;
3460    siemens)
3461      need_lib_prefix=no
3462      ;;
3463    motorola)
3464      need_lib_prefix=no
3465      need_version=no
3466      shlibpath_overrides_runpath=no
3467      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3468      ;;
3469  esac
3470  ;;
3471
3472sysv4*MP*)
3473  if test -d /usr/nec ;then
3474    version_type=linux # correct to gnu/linux during the next big refactor
3475    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
3476    soname_spec='$libname${shared_ext}.$major'
3477    shlibpath_var=LD_LIBRARY_PATH
3478  fi
3479  ;;
3480
3481sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3482  version_type=freebsd-elf
3483  need_lib_prefix=no
3484  need_version=no
3485  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3486  soname_spec='${libname}${release}${shared_ext}$major'
3487  shlibpath_var=LD_LIBRARY_PATH
3488  shlibpath_overrides_runpath=yes
3489  hardcode_into_libs=yes
3490  if test "$with_gnu_ld" = yes; then
3491    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3492  else
3493    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3494    case $host_os in
3495      sco3.2v5*)
3496        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3497	;;
3498    esac
3499  fi
3500  sys_lib_dlsearch_path_spec='/usr/lib'
3501  ;;
3502
3503tpf*)
3504  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
3505  version_type=linux # correct to gnu/linux during the next big refactor
3506  need_lib_prefix=no
3507  need_version=no
3508  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3509  shlibpath_var=LD_LIBRARY_PATH
3510  shlibpath_overrides_runpath=no
3511  hardcode_into_libs=yes
3512  ;;
3513
3514uts4*)
3515  version_type=linux # correct to gnu/linux during the next big refactor
3516  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3517  soname_spec='${libname}${release}${shared_ext}$major'
3518  shlibpath_var=LD_LIBRARY_PATH
3519  ;;
3520
3521*)
3522  dynamic_linker=no
3523  ;;
3524esac
3525AC_MSG_RESULT([$dynamic_linker])
3526test "$dynamic_linker" = no && can_build_shared=no
3527
3528variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3529if test "$GCC" = yes; then
3530  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3531fi
3532
3533if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
3534  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
3535fi
3536if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
3537  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
3538fi
3539
3540_LT_DECL([], [variables_saved_for_relink], [1],
3541    [Variables whose values should be saved in libtool wrapper scripts and
3542    restored at link time])
3543_LT_DECL([], [need_lib_prefix], [0],
3544    [Do we need the "lib" prefix for modules?])
3545_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3546_LT_DECL([], [version_type], [0], [Library versioning type])
3547_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
3548_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3549_LT_DECL([], [shlibpath_overrides_runpath], [0],
3550    [Is shlibpath searched before the hard-coded library search path?])
3551_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3552_LT_DECL([], [library_names_spec], [1],
3553    [[List of archive names.  First name is the real one, the rest are links.
3554    The last name is the one that the linker finds with -lNAME]])
3555_LT_DECL([], [soname_spec], [1],
3556    [[The coded name of the library, if different from the real name]])
3557_LT_DECL([], [install_override_mode], [1],
3558    [Permission mode override for installation of shared libraries])
3559_LT_DECL([], [postinstall_cmds], [2],
3560    [Command to use after installation of a shared archive])
3561_LT_DECL([], [postuninstall_cmds], [2],
3562    [Command to use after uninstallation of a shared archive])
3563_LT_DECL([], [finish_cmds], [2],
3564    [Commands used to finish a libtool library installation in a directory])
3565_LT_DECL([], [finish_eval], [1],
3566    [[As "finish_cmds", except a single script fragment to be evaled but
3567    not shown]])
3568_LT_DECL([], [hardcode_into_libs], [0],
3569    [Whether we should hardcode library paths into libraries])
3570_LT_DECL([], [sys_lib_search_path_spec], [2],
3571    [Compile-time system search path for libraries])
3572_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
3573    [Run-time system search path for libraries])
3574])# _LT_SYS_DYNAMIC_LINKER
3575
3576
3577# _LT_PATH_TOOL_PREFIX(TOOL)
3578# --------------------------
3579# find a file program which can recognize shared library
3580AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3581[m4_require([_LT_DECL_EGREP])dnl
3582AC_MSG_CHECKING([for $1])
3583AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3584[case $MAGIC_CMD in
3585[[\\/*] |  ?:[\\/]*])
3586  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3587  ;;
3588*)
3589  lt_save_MAGIC_CMD="$MAGIC_CMD"
3590  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3591dnl $ac_dummy forces splitting on constant user-supplied paths.
3592dnl POSIX.2 word splitting is done only on the output of word expansions,
3593dnl not every word.  This closes a longstanding sh security hole.
3594  ac_dummy="m4_if([$2], , $PATH, [$2])"
3595  for ac_dir in $ac_dummy; do
3596    IFS="$lt_save_ifs"
3597    test -z "$ac_dir" && ac_dir=.
3598    if test -f $ac_dir/$1; then
3599      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3600      if test -n "$file_magic_test_file"; then
3601	case $deplibs_check_method in
3602	"file_magic "*)
3603	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3604	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3605	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3606	    $EGREP "$file_magic_regex" > /dev/null; then
3607	    :
3608	  else
3609	    cat <<_LT_EOF 1>&2
3610
3611*** Warning: the command libtool uses to detect shared libraries,
3612*** $file_magic_cmd, produces output that libtool cannot recognize.
3613*** The result is that libtool may fail to recognize shared libraries
3614*** as such.  This will affect the creation of libtool libraries that
3615*** depend on shared libraries, but programs linked with such libtool
3616*** libraries will work regardless of this problem.  Nevertheless, you
3617*** may want to report the problem to your system manager and/or to
3618*** bug-libtool@gnu.org
3619
3620_LT_EOF
3621	  fi ;;
3622	esac
3623      fi
3624      break
3625    fi
3626  done
3627  IFS="$lt_save_ifs"
3628  MAGIC_CMD="$lt_save_MAGIC_CMD"
3629  ;;
3630esac])
3631MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3632if test -n "$MAGIC_CMD"; then
3633  AC_MSG_RESULT($MAGIC_CMD)
3634else
3635  AC_MSG_RESULT(no)
3636fi
3637_LT_DECL([], [MAGIC_CMD], [0],
3638	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3639])# _LT_PATH_TOOL_PREFIX
3640
3641# Old name:
3642AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3643dnl aclocal-1.4 backwards compatibility:
3644dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3645
3646
3647# _LT_PATH_MAGIC
3648# --------------
3649# find a file program which can recognize a shared library
3650m4_defun([_LT_PATH_MAGIC],
3651[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3652if test -z "$lt_cv_path_MAGIC_CMD"; then
3653  if test -n "$ac_tool_prefix"; then
3654    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3655  else
3656    MAGIC_CMD=:
3657  fi
3658fi
3659])# _LT_PATH_MAGIC
3660
3661
3662# LT_PATH_LD
3663# ----------
3664# find the pathname to the GNU or non-GNU linker
3665AC_DEFUN([LT_PATH_LD],
3666[AC_REQUIRE([AC_PROG_CC])dnl
3667AC_REQUIRE([AC_CANONICAL_HOST])dnl
3668AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3669m4_require([_LT_DECL_SED])dnl
3670m4_require([_LT_DECL_EGREP])dnl
3671m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
3672
3673AC_ARG_WITH([gnu-ld],
3674    [AS_HELP_STRING([--with-gnu-ld],
3675	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
3676    [test "$withval" = no || with_gnu_ld=yes],
3677    [with_gnu_ld=no])dnl
3678
3679ac_prog=ld
3680if test "$GCC" = yes; then
3681  # Check if gcc -print-prog-name=ld gives a path.
3682  AC_MSG_CHECKING([for ld used by $CC])
3683  case $host in
3684  *-*-mingw*)
3685    # gcc leaves a trailing carriage return which upsets mingw
3686    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3687  *)
3688    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3689  esac
3690  case $ac_prog in
3691    # Accept absolute paths.
3692    [[\\/]]* | ?:[[\\/]]*)
3693      re_direlt='/[[^/]][[^/]]*/\.\./'
3694      # Canonicalize the pathname of ld
3695      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3696      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3697	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3698      done
3699      test -z "$LD" && LD="$ac_prog"
3700      ;;
3701  "")
3702    # If it fails, then pretend we aren't using GCC.
3703    ac_prog=ld
3704    ;;
3705  *)
3706    # If it is relative, then search for the first ld in PATH.
3707    with_gnu_ld=unknown
3708    ;;
3709  esac
3710elif test "$with_gnu_ld" = yes; then
3711  AC_MSG_CHECKING([for GNU ld])
3712else
3713  AC_MSG_CHECKING([for non-GNU ld])
3714fi
3715AC_CACHE_VAL(lt_cv_path_LD,
3716[if test -z "$LD"; then
3717  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3718  for ac_dir in $PATH; do
3719    IFS="$lt_save_ifs"
3720    test -z "$ac_dir" && ac_dir=.
3721    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3722      lt_cv_path_LD="$ac_dir/$ac_prog"
3723      # Check to see if the program is GNU ld.  I'd rather use --version,
3724      # but apparently some variants of GNU ld only accept -v.
3725      # Break only if it was the GNU/non-GNU ld that we prefer.
3726      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3727      *GNU* | *'with BFD'*)
3728	test "$with_gnu_ld" != no && break
3729	;;
3730      *)
3731	test "$with_gnu_ld" != yes && break
3732	;;
3733      esac
3734    fi
3735  done
3736  IFS="$lt_save_ifs"
3737else
3738  lt_cv_path_LD="$LD" # Let the user override the test with a path.
3739fi])
3740LD="$lt_cv_path_LD"
3741if test -n "$LD"; then
3742  AC_MSG_RESULT($LD)
3743else
3744  AC_MSG_RESULT(no)
3745fi
3746test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3747_LT_PATH_LD_GNU
3748AC_SUBST([LD])
3749
3750_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3751])# LT_PATH_LD
3752
3753# Old names:
3754AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3755AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3756dnl aclocal-1.4 backwards compatibility:
3757dnl AC_DEFUN([AM_PROG_LD], [])
3758dnl AC_DEFUN([AC_PROG_LD], [])
3759
3760
3761# _LT_PATH_LD_GNU
3762#- --------------
3763m4_defun([_LT_PATH_LD_GNU],
3764[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3765[# I'd rather use --version here, but apparently some GNU lds only accept -v.
3766case `$LD -v 2>&1 </dev/null` in
3767*GNU* | *'with BFD'*)
3768  lt_cv_prog_gnu_ld=yes
3769  ;;
3770*)
3771  lt_cv_prog_gnu_ld=no
3772  ;;
3773esac])
3774with_gnu_ld=$lt_cv_prog_gnu_ld
3775])# _LT_PATH_LD_GNU
3776
3777
3778# _LT_CMD_RELOAD
3779# --------------
3780# find reload flag for linker
3781#   -- PORTME Some linkers may need a different reload flag.
3782m4_defun([_LT_CMD_RELOAD],
3783[AC_CACHE_CHECK([for $LD option to reload object files],
3784  lt_cv_ld_reload_flag,
3785  [lt_cv_ld_reload_flag='-r'])
3786reload_flag=$lt_cv_ld_reload_flag
3787case $reload_flag in
3788"" | " "*) ;;
3789*) reload_flag=" $reload_flag" ;;
3790esac
3791reload_cmds='$LD$reload_flag -o $output$reload_objs'
3792case $host_os in
3793  cygwin* | mingw* | pw32* | cegcc*)
3794    if test "$GCC" != yes; then
3795      reload_cmds=false
3796    fi
3797    ;;
3798  darwin*)
3799    if test "$GCC" = yes; then
3800      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3801    else
3802      reload_cmds='$LD$reload_flag -o $output$reload_objs'
3803    fi
3804    ;;
3805esac
3806_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3807_LT_TAGDECL([], [reload_cmds], [2])dnl
3808])# _LT_CMD_RELOAD
3809
3810
3811# _LT_CHECK_MAGIC_METHOD
3812# ----------------------
3813# how to check for library dependencies
3814#  -- PORTME fill in with the dynamic library characteristics
3815m4_defun([_LT_CHECK_MAGIC_METHOD],
3816[m4_require([_LT_DECL_EGREP])
3817m4_require([_LT_DECL_OBJDUMP])
3818AC_CACHE_CHECK([how to recognize dependent libraries],
3819lt_cv_deplibs_check_method,
3820[lt_cv_file_magic_cmd='$MAGIC_CMD'
3821lt_cv_file_magic_test_file=
3822lt_cv_deplibs_check_method='unknown'
3823# Need to set the preceding variable on all platforms that support
3824# interlibrary dependencies.
3825# 'none' -- dependencies not supported.
3826# `unknown' -- same as none, but documents that we really don't know.
3827# 'pass_all' -- all dependencies passed with no checks.
3828# 'test_compile' -- check by making test program.
3829# 'file_magic [[regex]]' -- check by looking for files in library path
3830# which responds to the $file_magic_cmd with a given extended regex.
3831# If you have `file' or equivalent on your system and you're not sure
3832# whether `pass_all' will *always* work, you probably want this one.
3833
3834case $host_os in
3835aix[[4-9]]*)
3836  lt_cv_deplibs_check_method=pass_all
3837  ;;
3838
3839beos*)
3840  lt_cv_deplibs_check_method=pass_all
3841  ;;
3842
3843bsdi[[45]]*)
3844  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3845  lt_cv_file_magic_cmd='/usr/bin/file -L'
3846  lt_cv_file_magic_test_file=/shlib/libc.so
3847  ;;
3848
3849cygwin*)
3850  # func_win32_libid is a shell function defined in ltmain.sh
3851  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3852  lt_cv_file_magic_cmd='func_win32_libid'
3853  ;;
3854
3855mingw* | pw32*)
3856  # Base MSYS/MinGW do not provide the 'file' command needed by
3857  # func_win32_libid shell function, so use a weaker test based on 'objdump',
3858  # unless we find 'file', for example because we are cross-compiling.
3859  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
3860  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
3861    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3862    lt_cv_file_magic_cmd='func_win32_libid'
3863  else
3864    # Keep this pattern in sync with the one in func_win32_libid.
3865    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
3866    lt_cv_file_magic_cmd='$OBJDUMP -f'
3867  fi
3868  ;;
3869
3870cegcc*)
3871  # use the weaker test based on 'objdump'. See mingw*.
3872  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3873  lt_cv_file_magic_cmd='$OBJDUMP -f'
3874  ;;
3875
3876darwin* | rhapsody*)
3877  lt_cv_deplibs_check_method=pass_all
3878  ;;
3879
3880freebsd* | dragonfly*)
3881  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3882    case $host_cpu in
3883    i*86 )
3884      # Not sure whether the presence of OpenBSD here was a mistake.
3885      # Let's accept both of them until this is cleared up.
3886      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3887      lt_cv_file_magic_cmd=/usr/bin/file
3888      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3889      ;;
3890    esac
3891  else
3892    lt_cv_deplibs_check_method=pass_all
3893  fi
3894  ;;
3895
3896gnu*)
3897  lt_cv_deplibs_check_method=pass_all
3898  ;;
3899
3900haiku*)
3901  lt_cv_deplibs_check_method=pass_all
3902  ;;
3903
3904hpux10.20* | hpux11*)
3905  lt_cv_file_magic_cmd=/usr/bin/file
3906  case $host_cpu in
3907  ia64*)
3908    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3909    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3910    ;;
3911  hppa*64*)
3912    [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]']
3913    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3914    ;;
3915  *)
3916    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
3917    lt_cv_file_magic_test_file=/usr/lib/libc.sl
3918    ;;
3919  esac
3920  ;;
3921
3922interix[[3-9]]*)
3923  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3924  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3925  ;;
3926
3927irix5* | irix6* | nonstopux*)
3928  case $LD in
3929  *-32|*"-32 ") libmagic=32-bit;;
3930  *-n32|*"-n32 ") libmagic=N32;;
3931  *-64|*"-64 ") libmagic=64-bit;;
3932  *) libmagic=never-match;;
3933  esac
3934  lt_cv_deplibs_check_method=pass_all
3935  ;;
3936
3937# This must be glibc/ELF.
3938linux* | k*bsd*-gnu | kopensolaris*-gnu)
3939  lt_cv_deplibs_check_method=pass_all
3940  ;;
3941
3942netbsd*)
3943  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3944    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3945  else
3946    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3947  fi
3948  ;;
3949
3950newos6*)
3951  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3952  lt_cv_file_magic_cmd=/usr/bin/file
3953  lt_cv_file_magic_test_file=/usr/lib/libnls.so
3954  ;;
3955
3956*nto* | *qnx*)
3957  lt_cv_deplibs_check_method=pass_all
3958  ;;
3959
3960openbsd*)
3961  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3962    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3963  else
3964    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3965  fi
3966  ;;
3967
3968osf3* | osf4* | osf5*)
3969  lt_cv_deplibs_check_method=pass_all
3970  ;;
3971
3972rdos*)
3973  lt_cv_deplibs_check_method=pass_all
3974  ;;
3975
3976solaris*)
3977  lt_cv_deplibs_check_method=pass_all
3978  ;;
3979
3980sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3981  lt_cv_deplibs_check_method=pass_all
3982  ;;
3983
3984sysv4 | sysv4.3*)
3985  case $host_vendor in
3986  motorola)
3987    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]]'
3988    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3989    ;;
3990  ncr)
3991    lt_cv_deplibs_check_method=pass_all
3992    ;;
3993  sequent)
3994    lt_cv_file_magic_cmd='/bin/file'
3995    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3996    ;;
3997  sni)
3998    lt_cv_file_magic_cmd='/bin/file'
3999    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4000    lt_cv_file_magic_test_file=/lib/libc.so
4001    ;;
4002  siemens)
4003    lt_cv_deplibs_check_method=pass_all
4004    ;;
4005  pc)
4006    lt_cv_deplibs_check_method=pass_all
4007    ;;
4008  esac
4009  ;;
4010
4011tpf*)
4012  lt_cv_deplibs_check_method=pass_all
4013  ;;
4014esac
4015])
4016
4017file_magic_glob=
4018want_nocaseglob=no
4019if test "$build" = "$host"; then
4020  case $host_os in
4021  mingw* | pw32*)
4022    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
4023      want_nocaseglob=yes
4024    else
4025      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
4026    fi
4027    ;;
4028  esac
4029fi
4030
4031file_magic_cmd=$lt_cv_file_magic_cmd
4032deplibs_check_method=$lt_cv_deplibs_check_method
4033test -z "$deplibs_check_method" && deplibs_check_method=unknown
4034
4035_LT_DECL([], [deplibs_check_method], [1],
4036    [Method to check whether dependent libraries are shared objects])
4037_LT_DECL([], [file_magic_cmd], [1],
4038    [Command to use when deplibs_check_method = "file_magic"])
4039_LT_DECL([], [file_magic_glob], [1],
4040    [How to find potential files when deplibs_check_method = "file_magic"])
4041_LT_DECL([], [want_nocaseglob], [1],
4042    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
4043])# _LT_CHECK_MAGIC_METHOD
4044
4045
4046# LT_PATH_NM
4047# ----------
4048# find the pathname to a BSD- or MS-compatible name lister
4049AC_DEFUN([LT_PATH_NM],
4050[AC_REQUIRE([AC_PROG_CC])dnl
4051AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
4052[if test -n "$NM"; then
4053  # Let the user override the test.
4054  lt_cv_path_NM="$NM"
4055else
4056  lt_nm_to_check="${ac_tool_prefix}nm"
4057  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4058    lt_nm_to_check="$lt_nm_to_check nm"
4059  fi
4060  for lt_tmp_nm in $lt_nm_to_check; do
4061    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4062    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4063      IFS="$lt_save_ifs"
4064      test -z "$ac_dir" && ac_dir=.
4065      tmp_nm="$ac_dir/$lt_tmp_nm"
4066      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4067	# Check to see if the nm accepts a BSD-compat flag.
4068	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
4069	#   nm: unknown option "B" ignored
4070	# Tru64's nm complains that /dev/null is an invalid object file
4071	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4072	*/dev/null* | *'Invalid file or object type'*)
4073	  lt_cv_path_NM="$tmp_nm -B"
4074	  break
4075	  ;;
4076	*)
4077	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4078	  */dev/null*)
4079	    lt_cv_path_NM="$tmp_nm -p"
4080	    break
4081	    ;;
4082	  *)
4083	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4084	    continue # so that we can try to find one that supports BSD flags
4085	    ;;
4086	  esac
4087	  ;;
4088	esac
4089      fi
4090    done
4091    IFS="$lt_save_ifs"
4092  done
4093  : ${lt_cv_path_NM=no}
4094fi])
4095if test "$lt_cv_path_NM" != "no"; then
4096  NM="$lt_cv_path_NM"
4097else
4098  # Didn't find any BSD compatible name lister, look for dumpbin.
4099  if test -n "$DUMPBIN"; then :
4100    # Let the user override the test.
4101  else
4102    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
4103    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
4104    *COFF*)
4105      DUMPBIN="$DUMPBIN -symbols"
4106      ;;
4107    *)
4108      DUMPBIN=:
4109      ;;
4110    esac
4111  fi
4112  AC_SUBST([DUMPBIN])
4113  if test "$DUMPBIN" != ":"; then
4114    NM="$DUMPBIN"
4115  fi
4116fi
4117test -z "$NM" && NM=nm
4118AC_SUBST([NM])
4119_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
4120
4121AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
4122  [lt_cv_nm_interface="BSD nm"
4123  echo "int some_variable = 0;" > conftest.$ac_ext
4124  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
4125  (eval "$ac_compile" 2>conftest.err)
4126  cat conftest.err >&AS_MESSAGE_LOG_FD
4127  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
4128  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4129  cat conftest.err >&AS_MESSAGE_LOG_FD
4130  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
4131  cat conftest.out >&AS_MESSAGE_LOG_FD
4132  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4133    lt_cv_nm_interface="MS dumpbin"
4134  fi
4135  rm -f conftest*])
4136])# LT_PATH_NM
4137
4138# Old names:
4139AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
4140AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
4141dnl aclocal-1.4 backwards compatibility:
4142dnl AC_DEFUN([AM_PROG_NM], [])
4143dnl AC_DEFUN([AC_PROG_NM], [])
4144
4145# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4146# --------------------------------
4147# how to determine the name of the shared library
4148# associated with a specific link library.
4149#  -- PORTME fill in with the dynamic library characteristics
4150m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
4151[m4_require([_LT_DECL_EGREP])
4152m4_require([_LT_DECL_OBJDUMP])
4153m4_require([_LT_DECL_DLLTOOL])
4154AC_CACHE_CHECK([how to associate runtime and link libraries],
4155lt_cv_sharedlib_from_linklib_cmd,
4156[lt_cv_sharedlib_from_linklib_cmd='unknown'
4157
4158case $host_os in
4159cygwin* | mingw* | pw32* | cegcc*)
4160  # two different shell functions defined in ltmain.sh
4161  # decide which to use based on capabilities of $DLLTOOL
4162  case `$DLLTOOL --help 2>&1` in
4163  *--identify-strict*)
4164    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
4165    ;;
4166  *)
4167    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
4168    ;;
4169  esac
4170  ;;
4171*)
4172  # fallback: assume linklib IS sharedlib
4173  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
4174  ;;
4175esac
4176])
4177sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
4178test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
4179
4180_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
4181    [Command to associate shared and link libraries])
4182])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4183
4184
4185# _LT_PATH_MANIFEST_TOOL
4186# ----------------------
4187# locate the manifest tool
4188m4_defun([_LT_PATH_MANIFEST_TOOL],
4189[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
4190test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
4191AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
4192  [lt_cv_path_mainfest_tool=no
4193  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
4194  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
4195  cat conftest.err >&AS_MESSAGE_LOG_FD
4196  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
4197    lt_cv_path_mainfest_tool=yes
4198  fi
4199  rm -f conftest*])
4200if test "x$lt_cv_path_mainfest_tool" != xyes; then
4201  MANIFEST_TOOL=:
4202fi
4203_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
4204])# _LT_PATH_MANIFEST_TOOL
4205
4206
4207# LT_LIB_M
4208# --------
4209# check for math library
4210AC_DEFUN([LT_LIB_M],
4211[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4212LIBM=
4213case $host in
4214*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
4215  # These system don't have libm, or don't need it
4216  ;;
4217*-ncr-sysv4.3*)
4218  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4219  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4220  ;;
4221*)
4222  AC_CHECK_LIB(m, cos, LIBM="-lm")
4223  ;;
4224esac
4225AC_SUBST([LIBM])
4226])# LT_LIB_M
4227
4228# Old name:
4229AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
4230dnl aclocal-1.4 backwards compatibility:
4231dnl AC_DEFUN([AC_CHECK_LIBM], [])
4232
4233
4234# _LT_COMPILER_NO_RTTI([TAGNAME])
4235# -------------------------------
4236m4_defun([_LT_COMPILER_NO_RTTI],
4237[m4_require([_LT_TAG_COMPILER])dnl
4238
4239_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4240
4241if test "$GCC" = yes; then
4242  case $cc_basename in
4243  nvcc*)
4244    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
4245  *)
4246    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
4247  esac
4248
4249  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4250    lt_cv_prog_compiler_rtti_exceptions,
4251    [-fno-rtti -fno-exceptions], [],
4252    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4253fi
4254_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
4255	[Compiler flag to turn off builtin functions])
4256])# _LT_COMPILER_NO_RTTI
4257
4258
4259# _LT_CMD_GLOBAL_SYMBOLS
4260# ----------------------
4261m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
4262[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4263AC_REQUIRE([AC_PROG_CC])dnl
4264AC_REQUIRE([AC_PROG_AWK])dnl
4265AC_REQUIRE([LT_PATH_NM])dnl
4266AC_REQUIRE([LT_PATH_LD])dnl
4267m4_require([_LT_DECL_SED])dnl
4268m4_require([_LT_DECL_EGREP])dnl
4269m4_require([_LT_TAG_COMPILER])dnl
4270
4271# Check for command to grab the raw symbol name followed by C symbol from nm.
4272AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4273AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4274[
4275# These are sane defaults that work on at least a few old systems.
4276# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4277
4278# Character class describing NM global symbol codes.
4279symcode='[[BCDEGRST]]'
4280
4281# Regexp to match symbols that can be accessed directly from C.
4282sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4283
4284# Define system-specific variables.
4285case $host_os in
4286aix*)
4287  symcode='[[BCDT]]'
4288  ;;
4289cygwin* | mingw* | pw32* | cegcc*)
4290  symcode='[[ABCDGISTW]]'
4291  ;;
4292hpux*)
4293  if test "$host_cpu" = ia64; then
4294    symcode='[[ABCDEGRST]]'
4295  fi
4296  ;;
4297irix* | nonstopux*)
4298  symcode='[[BCDEGRST]]'
4299  ;;
4300osf*)
4301  symcode='[[BCDEGQRST]]'
4302  ;;
4303solaris*)
4304  symcode='[[BDRT]]'
4305  ;;
4306sco3.2v5*)
4307  symcode='[[DT]]'
4308  ;;
4309sysv4.2uw2*)
4310  symcode='[[DT]]'
4311  ;;
4312sysv5* | sco5v6* | unixware* | OpenUNIX*)
4313  symcode='[[ABDT]]'
4314  ;;
4315sysv4)
4316  symcode='[[DFNSTU]]'
4317  ;;
4318esac
4319
4320# If we're using GNU nm, then use its standard symbol codes.
4321case `$NM -V 2>&1` in
4322*GNU* | *'with BFD'*)
4323  symcode='[[ABCDGIRSTW]]' ;;
4324esac
4325
4326# Transform an extracted symbol line into a proper C declaration.
4327# Some systems (esp. on ia64) link data and code symbols differently,
4328# so use this general approach.
4329lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4330
4331# Transform an extracted symbol line into symbol name and symbol address
4332lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
4333lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
4334
4335# Handle CRLF in mingw tool chain
4336opt_cr=
4337case $build_os in
4338mingw*)
4339  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4340  ;;
4341esac
4342
4343# Try without a prefix underscore, then with it.
4344for ac_symprfx in "" "_"; do
4345
4346  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4347  symxfrm="\\1 $ac_symprfx\\2 \\2"
4348
4349  # Write the raw and C identifiers.
4350  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4351    # Fake it for dumpbin and say T for any non-static function
4352    # and D for any global variable.
4353    # Also find C++ and __fastcall symbols from MSVC++,
4354    # which start with @ or ?.
4355    lt_cv_sys_global_symbol_pipe="$AWK ['"\
4356"     {last_section=section; section=\$ 3};"\
4357"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
4358"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4359"     \$ 0!~/External *\|/{next};"\
4360"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4361"     {if(hide[section]) next};"\
4362"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
4363"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
4364"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
4365"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
4366"     ' prfx=^$ac_symprfx]"
4367  else
4368    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4369  fi
4370  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
4371
4372  # Check to see that the pipe works correctly.
4373  pipe_works=no
4374
4375  rm -f conftest*
4376  cat > conftest.$ac_ext <<_LT_EOF
4377#ifdef __cplusplus
4378extern "C" {
4379#endif
4380char nm_test_var;
4381void nm_test_func(void);
4382void nm_test_func(void){}
4383#ifdef __cplusplus
4384}
4385#endif
4386int main(){nm_test_var='a';nm_test_func();return(0);}
4387_LT_EOF
4388
4389  if AC_TRY_EVAL(ac_compile); then
4390    # Now try to grab the symbols.
4391    nlist=conftest.nm
4392    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
4393      # Try sorting and uniquifying the output.
4394      if sort "$nlist" | uniq > "$nlist"T; then
4395	mv -f "$nlist"T "$nlist"
4396      else
4397	rm -f "$nlist"T
4398      fi
4399
4400      # Make sure that we snagged all the symbols we need.
4401      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4402	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4403	  cat <<_LT_EOF > conftest.$ac_ext
4404/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
4405#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
4406/* DATA imports from DLLs on WIN32 con't be const, because runtime
4407   relocations are performed -- see ld's documentation on pseudo-relocs.  */
4408# define LT@&t@_DLSYM_CONST
4409#elif defined(__osf__)
4410/* This system does not cope well with relocations in const data.  */
4411# define LT@&t@_DLSYM_CONST
4412#else
4413# define LT@&t@_DLSYM_CONST const
4414#endif
4415
4416#ifdef __cplusplus
4417extern "C" {
4418#endif
4419
4420_LT_EOF
4421	  # Now generate the symbol file.
4422	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4423
4424	  cat <<_LT_EOF >> conftest.$ac_ext
4425
4426/* The mapping between symbol names and symbols.  */
4427LT@&t@_DLSYM_CONST struct {
4428  const char *name;
4429  void       *address;
4430}
4431lt__PROGRAM__LTX_preloaded_symbols[[]] =
4432{
4433  { "@PROGRAM@", (void *) 0 },
4434_LT_EOF
4435	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4436	  cat <<\_LT_EOF >> conftest.$ac_ext
4437  {0, (void *) 0}
4438};
4439
4440/* This works around a problem in FreeBSD linker */
4441#ifdef FREEBSD_WORKAROUND
4442static const void *lt_preloaded_setup() {
4443  return lt__PROGRAM__LTX_preloaded_symbols;
4444}
4445#endif
4446
4447#ifdef __cplusplus
4448}
4449#endif
4450_LT_EOF
4451	  # Now try linking the two files.
4452	  mv conftest.$ac_objext conftstm.$ac_objext
4453	  lt_globsym_save_LIBS=$LIBS
4454	  lt_globsym_save_CFLAGS=$CFLAGS
4455	  LIBS="conftstm.$ac_objext"
4456	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4457	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4458	    pipe_works=yes
4459	  fi
4460	  LIBS=$lt_globsym_save_LIBS
4461	  CFLAGS=$lt_globsym_save_CFLAGS
4462	else
4463	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4464	fi
4465      else
4466	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4467      fi
4468    else
4469      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4470    fi
4471  else
4472    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4473    cat conftest.$ac_ext >&5
4474  fi
4475  rm -rf conftest* conftst*
4476
4477  # Do not use the global_symbol_pipe unless it works.
4478  if test "$pipe_works" = yes; then
4479    break
4480  else
4481    lt_cv_sys_global_symbol_pipe=
4482  fi
4483done
4484])
4485if test -z "$lt_cv_sys_global_symbol_pipe"; then
4486  lt_cv_sys_global_symbol_to_cdecl=
4487fi
4488if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4489  AC_MSG_RESULT(failed)
4490else
4491  AC_MSG_RESULT(ok)
4492fi
4493
4494# Response file support.
4495if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4496  nm_file_list_spec='@'
4497elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
4498  nm_file_list_spec='@'
4499fi
4500
4501_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4502    [Take the output of nm and produce a listing of raw symbols and C names])
4503_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4504    [Transform the output of nm in a proper C declaration])
4505_LT_DECL([global_symbol_to_c_name_address],
4506    [lt_cv_sys_global_symbol_to_c_name_address], [1],
4507    [Transform the output of nm in a C name address pair])
4508_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4509    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4510    [Transform the output of nm in a C name address pair when lib prefix is needed])
4511_LT_DECL([], [nm_file_list_spec], [1],
4512    [Specify filename containing input files for $NM])
4513]) # _LT_CMD_GLOBAL_SYMBOLS
4514
4515
4516# _LT_COMPILER_PIC([TAGNAME])
4517# ---------------------------
4518m4_defun([_LT_COMPILER_PIC],
4519[m4_require([_LT_TAG_COMPILER])dnl
4520_LT_TAGVAR(lt_prog_compiler_wl, $1)=
4521_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4522_LT_TAGVAR(lt_prog_compiler_static, $1)=
4523
4524m4_if([$1], [CXX], [
4525  # C++ specific cases for pic, static, wl, etc.
4526  if test "$GXX" = yes; then
4527    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4528    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4529
4530    case $host_os in
4531    aix*)
4532      # All AIX code is PIC.
4533      if test "$host_cpu" = ia64; then
4534	# AIX 5 now supports IA64 processor
4535	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4536      fi
4537      ;;
4538
4539    amigaos*)
4540      case $host_cpu in
4541      powerpc)
4542            # see comment about AmigaOS4 .so support
4543            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4544        ;;
4545      m68k)
4546            # FIXME: we need at least 68020 code to build shared libraries, but
4547            # adding the `-m68020' flag to GCC prevents building anything better,
4548            # like `-m68040'.
4549            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4550        ;;
4551      esac
4552      ;;
4553
4554    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4555      # PIC is the default for these OSes.
4556      ;;
4557    mingw* | cygwin* | os2* | pw32* | cegcc*)
4558      # This hack is so that the source file can tell whether it is being
4559      # built for inclusion in a dll (and should export symbols for example).
4560      # Although the cygwin gcc ignores -fPIC, still need this for old-style
4561      # (--disable-auto-import) libraries
4562      m4_if([$1], [GCJ], [],
4563	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4564      ;;
4565    darwin* | rhapsody*)
4566      # PIC is the default on this platform
4567      # Common symbols not allowed in MH_DYLIB files
4568      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4569      ;;
4570    *djgpp*)
4571      # DJGPP does not support shared libraries at all
4572      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4573      ;;
4574    haiku*)
4575      # PIC is the default for Haiku.
4576      # The "-static" flag exists, but is broken.
4577      _LT_TAGVAR(lt_prog_compiler_static, $1)=
4578      ;;
4579    interix[[3-9]]*)
4580      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4581      # Instead, we relocate shared libraries at runtime.
4582      ;;
4583    sysv4*MP*)
4584      if test -d /usr/nec; then
4585	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4586      fi
4587      ;;
4588    hpux*)
4589      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4590      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4591      # sets the default TLS model and affects inlining.
4592      case $host_cpu in
4593      hppa*64*)
4594	;;
4595      *)
4596	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4597	;;
4598      esac
4599      ;;
4600    *qnx* | *nto*)
4601      # QNX uses GNU C++, but need to define -shared option too, otherwise
4602      # it will coredump.
4603      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4604      ;;
4605    *)
4606      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4607      ;;
4608    esac
4609  else
4610    case $host_os in
4611      aix[[4-9]]*)
4612	# All AIX code is PIC.
4613	if test "$host_cpu" = ia64; then
4614	  # AIX 5 now supports IA64 processor
4615	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4616	else
4617	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4618	fi
4619	;;
4620      chorus*)
4621	case $cc_basename in
4622	cxch68*)
4623	  # Green Hills C++ Compiler
4624	  # _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"
4625	  ;;
4626	esac
4627	;;
4628      mingw* | cygwin* | os2* | pw32* | cegcc*)
4629	# This hack is so that the source file can tell whether it is being
4630	# built for inclusion in a dll (and should export symbols for example).
4631	m4_if([$1], [GCJ], [],
4632	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4633	;;
4634      dgux*)
4635	case $cc_basename in
4636	  ec++*)
4637	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4638	    ;;
4639	  ghcx*)
4640	    # Green Hills C++ Compiler
4641	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4642	    ;;
4643	  *)
4644	    ;;
4645	esac
4646	;;
4647      freebsd* | dragonfly*)
4648	# FreeBSD uses GNU C++
4649	;;
4650      hpux9* | hpux10* | hpux11*)
4651	case $cc_basename in
4652	  CC*)
4653	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4654	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4655	    if test "$host_cpu" != ia64; then
4656	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4657	    fi
4658	    ;;
4659	  aCC*)
4660	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4661	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4662	    case $host_cpu in
4663	    hppa*64*|ia64*)
4664	      # +Z the default
4665	      ;;
4666	    *)
4667	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4668	      ;;
4669	    esac
4670	    ;;
4671	  *)
4672	    ;;
4673	esac
4674	;;
4675      interix*)
4676	# This is c89, which is MS Visual C++ (no shared libs)
4677	# Anyone wants to do a port?
4678	;;
4679      irix5* | irix6* | nonstopux*)
4680	case $cc_basename in
4681	  CC*)
4682	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4683	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4684	    # CC pic flag -KPIC is the default.
4685	    ;;
4686	  *)
4687	    ;;
4688	esac
4689	;;
4690      linux* | k*bsd*-gnu | kopensolaris*-gnu)
4691	case $cc_basename in
4692	  KCC*)
4693	    # KAI C++ Compiler
4694	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4695	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4696	    ;;
4697	  ecpc* )
4698	    # old Intel C++ for x86_64 which still supported -KPIC.
4699	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4700	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4701	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4702	    ;;
4703	  icpc* )
4704	    # Intel C++, used to be incompatible with GCC.
4705	    # ICC 10 doesn't accept -KPIC any more.
4706	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4707	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4708	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4709	    ;;
4710	  pgCC* | pgcpp*)
4711	    # Portland Group C++ compiler
4712	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4713	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4714	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4715	    ;;
4716	  cxx*)
4717	    # Compaq C++
4718	    # Make sure the PIC flag is empty.  It appears that all Alpha
4719	    # Linux and Compaq Tru64 Unix objects are PIC.
4720	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4721	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4722	    ;;
4723	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
4724	    # IBM XL 8.0, 9.0 on PPC and BlueGene
4725	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4726	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4727	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4728	    ;;
4729	  *)
4730	    case `$CC -V 2>&1 | sed 5q` in
4731	    *Sun\ C*)
4732	      # Sun C++ 5.9
4733	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4734	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4735	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4736	      ;;
4737	    esac
4738	    ;;
4739	esac
4740	;;
4741      lynxos*)
4742	;;
4743      m88k*)
4744	;;
4745      mvs*)
4746	case $cc_basename in
4747	  cxx*)
4748	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4749	    ;;
4750	  *)
4751	    ;;
4752	esac
4753	;;
4754      netbsd*)
4755	;;
4756      *qnx* | *nto*)
4757        # QNX uses GNU C++, but need to define -shared option too, otherwise
4758        # it will coredump.
4759        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4760        ;;
4761      osf3* | osf4* | osf5*)
4762	case $cc_basename in
4763	  KCC*)
4764	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4765	    ;;
4766	  RCC*)
4767	    # Rational C++ 2.4.1
4768	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4769	    ;;
4770	  cxx*)
4771	    # Digital/Compaq C++
4772	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4773	    # Make sure the PIC flag is empty.  It appears that all Alpha
4774	    # Linux and Compaq Tru64 Unix objects are PIC.
4775	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4776	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4777	    ;;
4778	  *)
4779	    ;;
4780	esac
4781	;;
4782      psos*)
4783	;;
4784      solaris*)
4785	case $cc_basename in
4786	  CC* | sunCC*)
4787	    # Sun C++ 4.2, 5.x and Centerline C++
4788	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4789	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4790	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4791	    ;;
4792	  gcx*)
4793	    # Green Hills C++ Compiler
4794	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4795	    ;;
4796	  *)
4797	    ;;
4798	esac
4799	;;
4800      sunos4*)
4801	case $cc_basename in
4802	  CC*)
4803	    # Sun C++ 4.x
4804	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4805	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4806	    ;;
4807	  lcc*)
4808	    # Lucid
4809	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4810	    ;;
4811	  *)
4812	    ;;
4813	esac
4814	;;
4815      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4816	case $cc_basename in
4817	  CC*)
4818	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4819	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4820	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4821	    ;;
4822	esac
4823	;;
4824      tandem*)
4825	case $cc_basename in
4826	  NCC*)
4827	    # NonStop-UX NCC 3.20
4828	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4829	    ;;
4830	  *)
4831	    ;;
4832	esac
4833	;;
4834      vxworks*)
4835	;;
4836      *)
4837	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4838	;;
4839    esac
4840  fi
4841],
4842[
4843  if test "$GCC" = yes; then
4844    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4845    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4846
4847    case $host_os in
4848      aix*)
4849      # All AIX code is PIC.
4850      if test "$host_cpu" = ia64; then
4851	# AIX 5 now supports IA64 processor
4852	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4853      fi
4854      ;;
4855
4856    amigaos*)
4857      case $host_cpu in
4858      powerpc)
4859            # see comment about AmigaOS4 .so support
4860            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4861        ;;
4862      m68k)
4863            # FIXME: we need at least 68020 code to build shared libraries, but
4864            # adding the `-m68020' flag to GCC prevents building anything better,
4865            # like `-m68040'.
4866            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4867        ;;
4868      esac
4869      ;;
4870
4871    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4872      # PIC is the default for these OSes.
4873      ;;
4874
4875    mingw* | cygwin* | pw32* | os2* | cegcc*)
4876      # This hack is so that the source file can tell whether it is being
4877      # built for inclusion in a dll (and should export symbols for example).
4878      # Although the cygwin gcc ignores -fPIC, still need this for old-style
4879      # (--disable-auto-import) libraries
4880      m4_if([$1], [GCJ], [],
4881	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4882      ;;
4883
4884    darwin* | rhapsody*)
4885      # PIC is the default on this platform
4886      # Common symbols not allowed in MH_DYLIB files
4887      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4888      ;;
4889
4890    haiku*)
4891      # PIC is the default for Haiku.
4892      # The "-static" flag exists, but is broken.
4893      _LT_TAGVAR(lt_prog_compiler_static, $1)=
4894      ;;
4895
4896    hpux*)
4897      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4898      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4899      # sets the default TLS model and affects inlining.
4900      case $host_cpu in
4901      hppa*64*)
4902	# +Z the default
4903	;;
4904      *)
4905	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4906	;;
4907      esac
4908      ;;
4909
4910    interix[[3-9]]*)
4911      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4912      # Instead, we relocate shared libraries at runtime.
4913      ;;
4914
4915    msdosdjgpp*)
4916      # Just because we use GCC doesn't mean we suddenly get shared libraries
4917      # on systems that don't support them.
4918      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4919      enable_shared=no
4920      ;;
4921
4922    *nto* | *qnx*)
4923      # QNX uses GNU C++, but need to define -shared option too, otherwise
4924      # it will coredump.
4925      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4926      ;;
4927
4928    sysv4*MP*)
4929      if test -d /usr/nec; then
4930	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4931      fi
4932      ;;
4933
4934    *)
4935      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4936      ;;
4937    esac
4938
4939    case $cc_basename in
4940    nvcc*) # Cuda Compiler Driver 2.2
4941      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
4942      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4943        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
4944      fi
4945      ;;
4946    esac
4947  else
4948    # PORTME Check for flag to pass linker flags through the system compiler.
4949    case $host_os in
4950    aix*)
4951      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4952      if test "$host_cpu" = ia64; then
4953	# AIX 5 now supports IA64 processor
4954	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4955      else
4956	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4957      fi
4958      ;;
4959
4960    mingw* | cygwin* | pw32* | os2* | cegcc*)
4961      # This hack is so that the source file can tell whether it is being
4962      # built for inclusion in a dll (and should export symbols for example).
4963      m4_if([$1], [GCJ], [],
4964	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4965      ;;
4966
4967    hpux9* | hpux10* | hpux11*)
4968      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4969      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4970      # not for PA HP-UX.
4971      case $host_cpu in
4972      hppa*64*|ia64*)
4973	# +Z the default
4974	;;
4975      *)
4976	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4977	;;
4978      esac
4979      # Is there a better lt_prog_compiler_static that works with the bundled CC?
4980      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4981      ;;
4982
4983    irix5* | irix6* | nonstopux*)
4984      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4985      # PIC (with -KPIC) is the default.
4986      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4987      ;;
4988
4989    linux* | k*bsd*-gnu | kopensolaris*-gnu)
4990      case $cc_basename in
4991      # old Intel for x86_64 which still supported -KPIC.
4992      ecc*)
4993	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4994	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4995	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4996        ;;
4997      # icc used to be incompatible with GCC.
4998      # ICC 10 doesn't accept -KPIC any more.
4999      icc* | ifort*)
5000	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5001	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5002	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5003        ;;
5004      # Lahey Fortran 8.1.
5005      lf95*)
5006	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5007	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
5008	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
5009	;;
5010      nagfor*)
5011	# NAG Fortran compiler
5012	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
5013	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5014	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5015	;;
5016      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
5017        # Portland Group compilers (*not* the Pentium gcc compiler,
5018	# which looks to be a dead project)
5019	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5020	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5021	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5022        ;;
5023      ccc*)
5024        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5025        # All Alpha code is PIC.
5026        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5027        ;;
5028      xl* | bgxl* | bgf* | mpixl*)
5029	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
5030	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5031	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5032	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5033	;;
5034      *)
5035	case `$CC -V 2>&1 | sed 5q` in
5036	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
5037	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
5038	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5039	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5040	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
5041	  ;;
5042	*Sun\ F* | *Sun*Fortran*)
5043	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5044	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5045	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5046	  ;;
5047	*Sun\ C*)
5048	  # Sun C 5.9
5049	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5050	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5051	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5052	  ;;
5053        *Intel*\ [[CF]]*Compiler*)
5054	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5055	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5056	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5057	  ;;
5058	*Portland\ Group*)
5059	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5060	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5061	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5062	  ;;
5063	esac
5064	;;
5065      esac
5066      ;;
5067
5068    newsos6)
5069      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5070      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5071      ;;
5072
5073    *nto* | *qnx*)
5074      # QNX uses GNU C++, but need to define -shared option too, otherwise
5075      # it will coredump.
5076      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5077      ;;
5078
5079    osf3* | osf4* | osf5*)
5080      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5081      # All OSF/1 code is PIC.
5082      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5083      ;;
5084
5085    rdos*)
5086      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5087      ;;
5088
5089    solaris*)
5090      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5091      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5092      case $cc_basename in
5093      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
5094	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5095      *)
5096	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5097      esac
5098      ;;
5099
5100    sunos4*)
5101      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5102      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5103      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5104      ;;
5105
5106    sysv4 | sysv4.2uw2* | sysv4.3*)
5107      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5108      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5109      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5110      ;;
5111
5112    sysv4*MP*)
5113      if test -d /usr/nec ;then
5114	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5115	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5116      fi
5117      ;;
5118
5119    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5120      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5121      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5122      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5123      ;;
5124
5125    unicos*)
5126      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5127      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5128      ;;
5129
5130    uts4*)
5131      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5132      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5133      ;;
5134
5135    *)
5136      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5137      ;;
5138    esac
5139  fi
5140])
5141case $host_os in
5142  # For platforms which do not support PIC, -DPIC is meaningless:
5143  *djgpp*)
5144    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5145    ;;
5146  *)
5147    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
5148    ;;
5149esac
5150
5151AC_CACHE_CHECK([for $compiler option to produce PIC],
5152  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
5153  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
5154_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
5155
5156#
5157# Check to make sure the PIC flag actually works.
5158#
5159if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5160  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
5161    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
5162    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
5163    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
5164     "" | " "*) ;;
5165     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5166     esac],
5167    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5168     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5169fi
5170_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
5171	[Additional compiler flags for building library objects])
5172
5173_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
5174	[How to pass a linker flag through the compiler])
5175#
5176# Check to make sure the static flag actually works.
5177#
5178wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
5179_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5180  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
5181  $lt_tmp_static_flag,
5182  [],
5183  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
5184_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
5185	[Compiler flag to prevent dynamic linking])
5186])# _LT_COMPILER_PIC
5187
5188
5189# _LT_LINKER_SHLIBS([TAGNAME])
5190# ----------------------------
5191# See if the linker supports building shared libraries.
5192m4_defun([_LT_LINKER_SHLIBS],
5193[AC_REQUIRE([LT_PATH_LD])dnl
5194AC_REQUIRE([LT_PATH_NM])dnl
5195m4_require([_LT_PATH_MANIFEST_TOOL])dnl
5196m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5197m4_require([_LT_DECL_EGREP])dnl
5198m4_require([_LT_DECL_SED])dnl
5199m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
5200m4_require([_LT_TAG_COMPILER])dnl
5201AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5202m4_if([$1], [CXX], [
5203  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5204  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5205  case $host_os in
5206  aix[[4-9]]*)
5207    # If we're using GNU nm, then we don't want the "-C" option.
5208    # -C means demangle to AIX nm, but means don't demangle with GNU nm
5209    # Also, AIX nm treats weak defined symbols like other global defined
5210    # symbols, whereas GNU nm marks them as "W".
5211    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5212      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5213    else
5214      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5215    fi
5216    ;;
5217  pw32*)
5218    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5219    ;;
5220  cygwin* | mingw* | cegcc*)
5221    case $cc_basename in
5222    cl*)
5223      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5224      ;;
5225    *)
5226      _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'
5227      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5228      ;;
5229    esac
5230    ;;
5231  *)
5232    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5233    ;;
5234  esac
5235], [
5236  runpath_var=
5237  _LT_TAGVAR(allow_undefined_flag, $1)=
5238  _LT_TAGVAR(always_export_symbols, $1)=no
5239  _LT_TAGVAR(archive_cmds, $1)=
5240  _LT_TAGVAR(archive_expsym_cmds, $1)=
5241  _LT_TAGVAR(compiler_needs_object, $1)=no
5242  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5243  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5244  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5245  _LT_TAGVAR(hardcode_automatic, $1)=no
5246  _LT_TAGVAR(hardcode_direct, $1)=no
5247  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5248  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5249  _LT_TAGVAR(hardcode_libdir_separator, $1)=
5250  _LT_TAGVAR(hardcode_minus_L, $1)=no
5251  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5252  _LT_TAGVAR(inherit_rpath, $1)=no
5253  _LT_TAGVAR(link_all_deplibs, $1)=unknown
5254  _LT_TAGVAR(module_cmds, $1)=
5255  _LT_TAGVAR(module_expsym_cmds, $1)=
5256  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
5257  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5258  _LT_TAGVAR(thread_safe_flag_spec, $1)=
5259  _LT_TAGVAR(whole_archive_flag_spec, $1)=
5260  # include_expsyms should be a list of space-separated symbols to be *always*
5261  # included in the symbol list
5262  _LT_TAGVAR(include_expsyms, $1)=
5263  # exclude_expsyms can be an extended regexp of symbols to exclude
5264  # it will be wrapped by ` (' and `)$', so one must not match beginning or
5265  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5266  # as well as any symbol that contains `d'.
5267  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5268  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5269  # platforms (ab)use it in PIC code, but their linkers get confused if
5270  # the symbol is explicitly referenced.  Since portable code cannot
5271  # rely on this symbol name, it's probably fine to never include it in
5272  # preloaded symbol tables.
5273  # Exclude shared library initialization/finalization symbols.
5274dnl Note also adjust exclude_expsyms for C++ above.
5275  extract_expsyms_cmds=
5276
5277  case $host_os in
5278  cygwin* | mingw* | pw32* | cegcc*)
5279    # FIXME: the MSVC++ port hasn't been tested in a loooong time
5280    # When not using gcc, we currently assume that we are using
5281    # Microsoft Visual C++.
5282    if test "$GCC" != yes; then
5283      with_gnu_ld=no
5284    fi
5285    ;;
5286  interix*)
5287    # we just hope/assume this is gcc and not c89 (= MSVC++)
5288    with_gnu_ld=yes
5289    ;;
5290  openbsd*)
5291    with_gnu_ld=no
5292    ;;
5293  esac
5294
5295  _LT_TAGVAR(ld_shlibs, $1)=yes
5296
5297  # On some targets, GNU ld is compatible enough with the native linker
5298  # that we're better off using the native interface for both.
5299  lt_use_gnu_ld_interface=no
5300  if test "$with_gnu_ld" = yes; then
5301    case $host_os in
5302      aix*)
5303	# The AIX port of GNU ld has always aspired to compatibility
5304	# with the native linker.  However, as the warning in the GNU ld
5305	# block says, versions before 2.19.5* couldn't really create working
5306	# shared libraries, regardless of the interface used.
5307	case `$LD -v 2>&1` in
5308	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
5309	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
5310	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
5311	  *)
5312	    lt_use_gnu_ld_interface=yes
5313	    ;;
5314	esac
5315	;;
5316      *)
5317	lt_use_gnu_ld_interface=yes
5318	;;
5319    esac
5320  fi
5321
5322  if test "$lt_use_gnu_ld_interface" = yes; then
5323    # If archive_cmds runs LD, not CC, wlarc should be empty
5324    wlarc='${wl}'
5325
5326    # Set some defaults for GNU ld with shared library support. These
5327    # are reset later if shared libraries are not supported. Putting them
5328    # here allows them to be overridden if necessary.
5329    runpath_var=LD_RUN_PATH
5330    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5331    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5332    # ancient GNU ld didn't support --whole-archive et. al.
5333    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5334      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5335    else
5336      _LT_TAGVAR(whole_archive_flag_spec, $1)=
5337    fi
5338    supports_anon_versioning=no
5339    case `$LD -v 2>&1` in
5340      *GNU\ gold*) supports_anon_versioning=yes ;;
5341      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5342      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5343      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5344      *\ 2.11.*) ;; # other 2.11 versions
5345      *) supports_anon_versioning=yes ;;
5346    esac
5347
5348    # See if GNU ld supports shared libraries.
5349    case $host_os in
5350    aix[[3-9]]*)
5351      # On AIX/PPC, the GNU linker is very broken
5352      if test "$host_cpu" != ia64; then
5353	_LT_TAGVAR(ld_shlibs, $1)=no
5354	cat <<_LT_EOF 1>&2
5355
5356*** Warning: the GNU linker, at least up to release 2.19, is reported
5357*** to be unable to reliably create shared libraries on AIX.
5358*** Therefore, libtool is disabling shared libraries support.  If you
5359*** really care for shared libraries, you may want to install binutils
5360*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
5361*** You will then need to restart the configuration process.
5362
5363_LT_EOF
5364      fi
5365      ;;
5366
5367    amigaos*)
5368      case $host_cpu in
5369      powerpc)
5370            # see comment about AmigaOS4 .so support
5371            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5372            _LT_TAGVAR(archive_expsym_cmds, $1)=''
5373        ;;
5374      m68k)
5375            _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)'
5376            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5377            _LT_TAGVAR(hardcode_minus_L, $1)=yes
5378        ;;
5379      esac
5380      ;;
5381
5382    beos*)
5383      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5384	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5385	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5386	# support --undefined.  This deserves some investigation.  FIXME
5387	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5388      else
5389	_LT_TAGVAR(ld_shlibs, $1)=no
5390      fi
5391      ;;
5392
5393    cygwin* | mingw* | pw32* | cegcc*)
5394      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5395      # as there is no search path for DLLs.
5396      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5397      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
5398      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5399      _LT_TAGVAR(always_export_symbols, $1)=no
5400      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5401      _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'
5402      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5403
5404      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5405        _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'
5406	# If the export-symbols file already is a .def file (1st line
5407	# is EXPORTS), use it as is; otherwise, prepend...
5408	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5409	  cp $export_symbols $output_objdir/$soname.def;
5410	else
5411	  echo EXPORTS > $output_objdir/$soname.def;
5412	  cat $export_symbols >> $output_objdir/$soname.def;
5413	fi~
5414	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5415      else
5416	_LT_TAGVAR(ld_shlibs, $1)=no
5417      fi
5418      ;;
5419
5420    haiku*)
5421      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5422      _LT_TAGVAR(link_all_deplibs, $1)=yes
5423      ;;
5424
5425    interix[[3-9]]*)
5426      _LT_TAGVAR(hardcode_direct, $1)=no
5427      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5428      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5429      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5430      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5431      # Instead, shared libraries are loaded at an image base (0x10000000 by
5432      # default) and relocated if they conflict, which is a slow very memory
5433      # consuming and fragmenting process.  To avoid this, we pick a random,
5434      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5435      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5436      _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'
5437      _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'
5438      ;;
5439
5440    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
5441      tmp_diet=no
5442      if test "$host_os" = linux-dietlibc; then
5443	case $cc_basename in
5444	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
5445	esac
5446      fi
5447      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5448	 && test "$tmp_diet" = no
5449      then
5450	tmp_addflag=' $pic_flag'
5451	tmp_sharedflag='-shared'
5452	case $cc_basename,$host_cpu in
5453        pgcc*)				# Portland Group C compiler
5454	  _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'
5455	  tmp_addflag=' $pic_flag'
5456	  ;;
5457	pgf77* | pgf90* | pgf95* | pgfortran*)
5458					# Portland Group f77 and f90 compilers
5459	  _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'
5460	  tmp_addflag=' $pic_flag -Mnomain' ;;
5461	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
5462	  tmp_addflag=' -i_dynamic' ;;
5463	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
5464	  tmp_addflag=' -i_dynamic -nofor_main' ;;
5465	ifc* | ifort*)			# Intel Fortran compiler
5466	  tmp_addflag=' -nofor_main' ;;
5467	lf95*)				# Lahey Fortran 8.1
5468	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
5469	  tmp_sharedflag='--shared' ;;
5470	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
5471	  tmp_sharedflag='-qmkshrobj'
5472	  tmp_addflag= ;;
5473	nvcc*)	# Cuda Compiler Driver 2.2
5474	  _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'
5475	  _LT_TAGVAR(compiler_needs_object, $1)=yes
5476	  ;;
5477	esac
5478	case `$CC -V 2>&1 | sed 5q` in
5479	*Sun\ C*)			# Sun C 5.9
5480	  _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'
5481	  _LT_TAGVAR(compiler_needs_object, $1)=yes
5482	  tmp_sharedflag='-G' ;;
5483	*Sun\ F*)			# Sun Fortran 8.3
5484	  tmp_sharedflag='-G' ;;
5485	esac
5486	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5487
5488        if test "x$supports_anon_versioning" = xyes; then
5489          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5490	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5491	    echo "local: *; };" >> $output_objdir/$libname.ver~
5492	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5493        fi
5494
5495	case $cc_basename in
5496	xlf* | bgf* | bgxlf* | mpixlf*)
5497	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5498	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5499	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5500	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
5501	  if test "x$supports_anon_versioning" = xyes; then
5502	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5503	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5504	      echo "local: *; };" >> $output_objdir/$libname.ver~
5505	      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5506	  fi
5507	  ;;
5508	esac
5509      else
5510        _LT_TAGVAR(ld_shlibs, $1)=no
5511      fi
5512      ;;
5513
5514    netbsd*)
5515      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5516	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5517	wlarc=
5518      else
5519	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5520	_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'
5521      fi
5522      ;;
5523
5524    solaris*)
5525      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5526	_LT_TAGVAR(ld_shlibs, $1)=no
5527	cat <<_LT_EOF 1>&2
5528
5529*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5530*** create shared libraries on Solaris systems.  Therefore, libtool
5531*** is disabling shared libraries support.  We urge you to upgrade GNU
5532*** binutils to release 2.9.1 or newer.  Another option is to modify
5533*** your PATH or compiler configuration so that the native linker is
5534*** used, and then restart.
5535
5536_LT_EOF
5537      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5538	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5539	_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'
5540      else
5541	_LT_TAGVAR(ld_shlibs, $1)=no
5542      fi
5543      ;;
5544
5545    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5546      case `$LD -v 2>&1` in
5547        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5548	_LT_TAGVAR(ld_shlibs, $1)=no
5549	cat <<_LT_EOF 1>&2
5550
5551*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5552*** reliably create shared libraries on SCO systems.  Therefore, libtool
5553*** is disabling shared libraries support.  We urge you to upgrade GNU
5554*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
5555*** your PATH or compiler configuration so that the native linker is
5556*** used, and then restart.
5557
5558_LT_EOF
5559	;;
5560	*)
5561	  # For security reasons, it is highly recommended that you always
5562	  # use absolute paths for naming shared libraries, and exclude the
5563	  # DT_RUNPATH tag from executables and libraries.  But doing so
5564	  # requires that you compile everything twice, which is a pain.
5565	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5566	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5567	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5568	    _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'
5569	  else
5570	    _LT_TAGVAR(ld_shlibs, $1)=no
5571	  fi
5572	;;
5573      esac
5574      ;;
5575
5576    sunos4*)
5577      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5578      wlarc=
5579      _LT_TAGVAR(hardcode_direct, $1)=yes
5580      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5581      ;;
5582
5583    *)
5584      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5585	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5586	_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'
5587      else
5588	_LT_TAGVAR(ld_shlibs, $1)=no
5589      fi
5590      ;;
5591    esac
5592
5593    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
5594      runpath_var=
5595      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5596      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5597      _LT_TAGVAR(whole_archive_flag_spec, $1)=
5598    fi
5599  else
5600    # PORTME fill in a description of your system's linker (not GNU ld)
5601    case $host_os in
5602    aix3*)
5603      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5604      _LT_TAGVAR(always_export_symbols, $1)=yes
5605      _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'
5606      # Note: this linker hardcodes the directories in LIBPATH if there
5607      # are no directories specified by -L.
5608      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5609      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5610	# Neither direct hardcoding nor static linking is supported with a
5611	# broken collect2.
5612	_LT_TAGVAR(hardcode_direct, $1)=unsupported
5613      fi
5614      ;;
5615
5616    aix[[4-9]]*)
5617      if test "$host_cpu" = ia64; then
5618	# On IA64, the linker does run time linking by default, so we don't
5619	# have to do anything special.
5620	aix_use_runtimelinking=no
5621	exp_sym_flag='-Bexport'
5622	no_entry_flag=""
5623      else
5624	# If we're using GNU nm, then we don't want the "-C" option.
5625	# -C means demangle to AIX nm, but means don't demangle with GNU nm
5626	# Also, AIX nm treats weak defined symbols like other global
5627	# defined symbols, whereas GNU nm marks them as "W".
5628	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5629	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5630	else
5631	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5632	fi
5633	aix_use_runtimelinking=no
5634
5635	# Test if we are trying to use run time linking or normal
5636	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
5637	# need to do runtime linking.
5638	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5639	  for ld_flag in $LDFLAGS; do
5640	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5641	    aix_use_runtimelinking=yes
5642	    break
5643	  fi
5644	  done
5645	  ;;
5646	esac
5647
5648	exp_sym_flag='-bexport'
5649	no_entry_flag='-bnoentry'
5650      fi
5651
5652      # When large executables or shared objects are built, AIX ld can
5653      # have problems creating the table of contents.  If linking a library
5654      # or program results in "error TOC overflow" add -mminimal-toc to
5655      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5656      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5657
5658      _LT_TAGVAR(archive_cmds, $1)=''
5659      _LT_TAGVAR(hardcode_direct, $1)=yes
5660      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5661      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5662      _LT_TAGVAR(link_all_deplibs, $1)=yes
5663      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5664
5665      if test "$GCC" = yes; then
5666	case $host_os in aix4.[[012]]|aix4.[[012]].*)
5667	# We only want to do this on AIX 4.2 and lower, the check
5668	# below for broken collect2 doesn't work under 4.3+
5669	  collect2name=`${CC} -print-prog-name=collect2`
5670	  if test -f "$collect2name" &&
5671	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5672	  then
5673	  # We have reworked collect2
5674	  :
5675	  else
5676	  # We have old collect2
5677	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
5678	  # It fails to find uninstalled libraries when the uninstalled
5679	  # path is not listed in the libpath.  Setting hardcode_minus_L
5680	  # to unsupported forces relinking
5681	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
5682	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5683	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
5684	  fi
5685	  ;;
5686	esac
5687	shared_flag='-shared'
5688	if test "$aix_use_runtimelinking" = yes; then
5689	  shared_flag="$shared_flag "'${wl}-G'
5690	fi
5691      else
5692	# not using gcc
5693	if test "$host_cpu" = ia64; then
5694	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5695	# chokes on -Wl,-G. The following line is correct:
5696	  shared_flag='-G'
5697	else
5698	  if test "$aix_use_runtimelinking" = yes; then
5699	    shared_flag='${wl}-G'
5700	  else
5701	    shared_flag='${wl}-bM:SRE'
5702	  fi
5703	fi
5704      fi
5705
5706      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5707      # It seems that -bexpall does not export symbols beginning with
5708      # underscore (_), so it is better to generate a list of symbols to export.
5709      _LT_TAGVAR(always_export_symbols, $1)=yes
5710      if test "$aix_use_runtimelinking" = yes; then
5711	# Warning - without using the other runtime loading flags (-brtl),
5712	# -berok will link without error, but may produce a broken library.
5713	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5714        # Determine the default libpath from the value encoded in an
5715        # empty executable.
5716        _LT_SYS_MODULE_PATH_AIX([$1])
5717        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5718        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5719      else
5720	if test "$host_cpu" = ia64; then
5721	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5722	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5723	  _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"
5724	else
5725	 # Determine the default libpath from the value encoded in an
5726	 # empty executable.
5727	 _LT_SYS_MODULE_PATH_AIX([$1])
5728	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5729	  # Warning - without using the other run time loading flags,
5730	  # -berok will link without error, but may produce a broken library.
5731	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5732	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5733	  if test "$with_gnu_ld" = yes; then
5734	    # We only use this code for GNU lds that support --whole-archive.
5735	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5736	  else
5737	    # Exported symbols can be pulled into shared objects from archives
5738	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5739	  fi
5740	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5741	  # This is similar to how AIX traditionally builds its shared libraries.
5742	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5743	fi
5744      fi
5745      ;;
5746
5747    amigaos*)
5748      case $host_cpu in
5749      powerpc)
5750            # see comment about AmigaOS4 .so support
5751            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5752            _LT_TAGVAR(archive_expsym_cmds, $1)=''
5753        ;;
5754      m68k)
5755            _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)'
5756            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5757            _LT_TAGVAR(hardcode_minus_L, $1)=yes
5758        ;;
5759      esac
5760      ;;
5761
5762    bsdi[[45]]*)
5763      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5764      ;;
5765
5766    cygwin* | mingw* | pw32* | cegcc*)
5767      # When not using gcc, we currently assume that we are using
5768      # Microsoft Visual C++.
5769      # hardcode_libdir_flag_spec is actually meaningless, as there is
5770      # no search path for DLLs.
5771      case $cc_basename in
5772      cl*)
5773	# Native MSVC
5774	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5775	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5776	_LT_TAGVAR(always_export_symbols, $1)=yes
5777	_LT_TAGVAR(file_list_spec, $1)='@'
5778	# Tell ltmain to make .lib files, not .a files.
5779	libext=lib
5780	# Tell ltmain to make .dll files, not .so files.
5781	shrext_cmds=".dll"
5782	# FIXME: Setting linknames here is a bad hack.
5783	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
5784	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5785	    sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
5786	  else
5787	    sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
5788	  fi~
5789	  $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5790	  linknames='
5791	# The linker will not automatically build a static lib if we build a DLL.
5792	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5793	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5794	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5795	_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'
5796	# Don't use ranlib
5797	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
5798	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5799	  lt_tool_outputfile="@TOOL_OUTPUT@"~
5800	  case $lt_outputfile in
5801	    *.exe|*.EXE) ;;
5802	    *)
5803	      lt_outputfile="$lt_outputfile.exe"
5804	      lt_tool_outputfile="$lt_tool_outputfile.exe"
5805	      ;;
5806	  esac~
5807	  if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
5808	    $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5809	    $RM "$lt_outputfile.manifest";
5810	  fi'
5811	;;
5812      *)
5813	# Assume MSVC wrapper
5814	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5815	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5816	# Tell ltmain to make .lib files, not .a files.
5817	libext=lib
5818	# Tell ltmain to make .dll files, not .so files.
5819	shrext_cmds=".dll"
5820	# FIXME: Setting linknames here is a bad hack.
5821	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5822	# The linker will automatically build a .lib file if we build a DLL.
5823	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5824	# FIXME: Should let the user specify the lib program.
5825	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5826	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5827	;;
5828      esac
5829      ;;
5830
5831    darwin* | rhapsody*)
5832      _LT_DARWIN_LINKER_FEATURES($1)
5833      ;;
5834
5835    dgux*)
5836      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5837      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5838      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5839      ;;
5840
5841    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5842    # support.  Future versions do this automatically, but an explicit c++rt0.o
5843    # does not break anything, and helps significantly (at the cost of a little
5844    # extra space).
5845    freebsd2.2*)
5846      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5847      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5848      _LT_TAGVAR(hardcode_direct, $1)=yes
5849      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5850      ;;
5851
5852    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5853    freebsd2.*)
5854      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5855      _LT_TAGVAR(hardcode_direct, $1)=yes
5856      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5857      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5858      ;;
5859
5860    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5861    freebsd* | dragonfly*)
5862      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5863      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5864      _LT_TAGVAR(hardcode_direct, $1)=yes
5865      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5866      ;;
5867
5868    hpux9*)
5869      if test "$GCC" = yes; then
5870	_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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5871      else
5872	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5873      fi
5874      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5875      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5876      _LT_TAGVAR(hardcode_direct, $1)=yes
5877
5878      # hardcode_minus_L: Not really in the search PATH,
5879      # but as the default location of the library.
5880      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5881      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5882      ;;
5883
5884    hpux10*)
5885      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5886	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5887      else
5888	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5889      fi
5890      if test "$with_gnu_ld" = no; then
5891	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5892	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5893	_LT_TAGVAR(hardcode_direct, $1)=yes
5894	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5895	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5896	# hardcode_minus_L: Not really in the search PATH,
5897	# but as the default location of the library.
5898	_LT_TAGVAR(hardcode_minus_L, $1)=yes
5899      fi
5900      ;;
5901
5902    hpux11*)
5903      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5904	case $host_cpu in
5905	hppa*64*)
5906	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5907	  ;;
5908	ia64*)
5909	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5910	  ;;
5911	*)
5912	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5913	  ;;
5914	esac
5915      else
5916	case $host_cpu in
5917	hppa*64*)
5918	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5919	  ;;
5920	ia64*)
5921	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5922	  ;;
5923	*)
5924	m4_if($1, [], [
5925	  # Older versions of the 11.00 compiler do not understand -b yet
5926	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
5927	  _LT_LINKER_OPTION([if $CC understands -b],
5928	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
5929	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
5930	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
5931	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
5932	  ;;
5933	esac
5934      fi
5935      if test "$with_gnu_ld" = no; then
5936	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5937	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5938
5939	case $host_cpu in
5940	hppa*64*|ia64*)
5941	  _LT_TAGVAR(hardcode_direct, $1)=no
5942	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5943	  ;;
5944	*)
5945	  _LT_TAGVAR(hardcode_direct, $1)=yes
5946	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5947	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5948
5949	  # hardcode_minus_L: Not really in the search PATH,
5950	  # but as the default location of the library.
5951	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
5952	  ;;
5953	esac
5954      fi
5955      ;;
5956
5957    irix5* | irix6* | nonstopux*)
5958      if test "$GCC" = yes; then
5959	_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'
5960	# Try to use the -exported_symbol ld option, if it does not
5961	# work, assume that -exports_file does not work either and
5962	# implicitly export all symbols.
5963	# This should be the same for all languages, so no per-tag cache variable.
5964	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
5965	  [lt_cv_irix_exported_symbol],
5966	  [save_LDFLAGS="$LDFLAGS"
5967	   LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
5968	   AC_LINK_IFELSE(
5969	     [AC_LANG_SOURCE(
5970	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
5971			      [C++], [[int foo (void) { return 0; }]],
5972			      [Fortran 77], [[
5973      subroutine foo
5974      end]],
5975			      [Fortran], [[
5976      subroutine foo
5977      end]])])],
5978	      [lt_cv_irix_exported_symbol=yes],
5979	      [lt_cv_irix_exported_symbol=no])
5980           LDFLAGS="$save_LDFLAGS"])
5981	if test "$lt_cv_irix_exported_symbol" = yes; then
5982          _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'
5983	fi
5984      else
5985	_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'
5986	_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'
5987      fi
5988      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5989      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5990      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5991      _LT_TAGVAR(inherit_rpath, $1)=yes
5992      _LT_TAGVAR(link_all_deplibs, $1)=yes
5993      ;;
5994
5995    netbsd*)
5996      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5997	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5998      else
5999	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6000      fi
6001      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6002      _LT_TAGVAR(hardcode_direct, $1)=yes
6003      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6004      ;;
6005
6006    newsos6)
6007      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6008      _LT_TAGVAR(hardcode_direct, $1)=yes
6009      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6010      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6011      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6012      ;;
6013
6014    *nto* | *qnx*)
6015      ;;
6016
6017    openbsd*)
6018      if test -f /usr/libexec/ld.so; then
6019	_LT_TAGVAR(hardcode_direct, $1)=yes
6020	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6021	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6022	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6023	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6024	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6025	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6026	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6027	else
6028	  case $host_os in
6029	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6030	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6031	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6032	     ;;
6033	   *)
6034	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6035	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6036	     ;;
6037	  esac
6038	fi
6039      else
6040	_LT_TAGVAR(ld_shlibs, $1)=no
6041      fi
6042      ;;
6043
6044    os2*)
6045      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6046      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6047      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6048      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
6049      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6050      ;;
6051
6052    osf3*)
6053      if test "$GCC" = yes; then
6054	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6055	_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'
6056      else
6057	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6058	_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'
6059      fi
6060      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6061      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6062      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6063      ;;
6064
6065    osf4* | osf5*)	# as osf3* with the addition of -msym flag
6066      if test "$GCC" = yes; then
6067	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6068	_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'
6069	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6070      else
6071	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6072	_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'
6073	_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~
6074	$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'
6075
6076	# Both c and cxx compiler support -rpath directly
6077	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6078      fi
6079      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6080      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6081      ;;
6082
6083    solaris*)
6084      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
6085      if test "$GCC" = yes; then
6086	wlarc='${wl}'
6087	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6088	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6089	  $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'
6090      else
6091	case `$CC -V 2>&1` in
6092	*"Compilers 5.0"*)
6093	  wlarc=''
6094	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6095	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6096	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
6097	  ;;
6098	*)
6099	  wlarc='${wl}'
6100	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
6101	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6102	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6103	  ;;
6104	esac
6105      fi
6106      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6107      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6108      case $host_os in
6109      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6110      *)
6111	# The compiler driver will combine and reorder linker options,
6112	# but understands `-z linker_flag'.  GCC discards it without `$wl',
6113	# but is careful enough not to reorder.
6114	# Supported since Solaris 2.6 (maybe 2.5.1?)
6115	if test "$GCC" = yes; then
6116	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6117	else
6118	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6119	fi
6120	;;
6121      esac
6122      _LT_TAGVAR(link_all_deplibs, $1)=yes
6123      ;;
6124
6125    sunos4*)
6126      if test "x$host_vendor" = xsequent; then
6127	# Use $CC to link under sequent, because it throws in some extra .o
6128	# files that make .init and .fini sections work.
6129	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6130      else
6131	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6132      fi
6133      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6134      _LT_TAGVAR(hardcode_direct, $1)=yes
6135      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6136      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6137      ;;
6138
6139    sysv4)
6140      case $host_vendor in
6141	sni)
6142	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6143	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6144	;;
6145	siemens)
6146	  ## LD is ld it makes a PLAMLIB
6147	  ## CC just makes a GrossModule.
6148	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6149	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6150	  _LT_TAGVAR(hardcode_direct, $1)=no
6151        ;;
6152	motorola)
6153	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6154	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6155	;;
6156      esac
6157      runpath_var='LD_RUN_PATH'
6158      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6159      ;;
6160
6161    sysv4.3*)
6162      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6163      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6164      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6165      ;;
6166
6167    sysv4*MP*)
6168      if test -d /usr/nec; then
6169	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6170	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6171	runpath_var=LD_RUN_PATH
6172	hardcode_runpath_var=yes
6173	_LT_TAGVAR(ld_shlibs, $1)=yes
6174      fi
6175      ;;
6176
6177    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6178      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6179      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6180      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6181      runpath_var='LD_RUN_PATH'
6182
6183      if test "$GCC" = yes; then
6184	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6185	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6186      else
6187	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6188	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6189      fi
6190      ;;
6191
6192    sysv5* | sco3.2v5* | sco5v6*)
6193      # Note: We can NOT use -z defs as we might desire, because we do not
6194      # link with -lc, and that would cause any symbols used from libc to
6195      # always be unresolved, which means just about no library would
6196      # ever link correctly.  If we're not using GNU ld we use -z text
6197      # though, which does catch some bad symbols but isn't as heavy-handed
6198      # as -z defs.
6199      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6200      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6201      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6202      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6203      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6204      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6205      _LT_TAGVAR(link_all_deplibs, $1)=yes
6206      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6207      runpath_var='LD_RUN_PATH'
6208
6209      if test "$GCC" = yes; then
6210	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6211	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6212      else
6213	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6214	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6215      fi
6216      ;;
6217
6218    uts4*)
6219      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6220      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6221      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6222      ;;
6223
6224    *)
6225      _LT_TAGVAR(ld_shlibs, $1)=no
6226      ;;
6227    esac
6228
6229    if test x$host_vendor = xsni; then
6230      case $host in
6231      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6232	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
6233	;;
6234      esac
6235    fi
6236  fi
6237])
6238AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6239test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6240
6241_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6242
6243_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6244_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6245_LT_DECL([], [extract_expsyms_cmds], [2],
6246    [The commands to extract the exported symbol list from a shared archive])
6247
6248#
6249# Do we need to explicitly link libc?
6250#
6251case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6252x|xyes)
6253  # Assume -lc should be added
6254  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6255
6256  if test "$enable_shared" = yes && test "$GCC" = yes; then
6257    case $_LT_TAGVAR(archive_cmds, $1) in
6258    *'~'*)
6259      # FIXME: we may have to deal with multi-command sequences.
6260      ;;
6261    '$CC '*)
6262      # Test whether the compiler implicitly links with -lc since on some
6263      # systems, -lgcc has to come before -lc. If gcc already passes -lc
6264      # to ld, don't add -lc before -lgcc.
6265      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
6266	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
6267	[$RM conftest*
6268	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6269
6270	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6271	  soname=conftest
6272	  lib=conftest
6273	  libobjs=conftest.$ac_objext
6274	  deplibs=
6275	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6276	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6277	  compiler_flags=-v
6278	  linker_flags=-v
6279	  verstring=
6280	  output_objdir=.
6281	  libname=conftest
6282	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6283	  _LT_TAGVAR(allow_undefined_flag, $1)=
6284	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6285	  then
6286	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6287	  else
6288	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6289	  fi
6290	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6291	else
6292	  cat conftest.err 1>&5
6293	fi
6294	$RM conftest*
6295	])
6296      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
6297      ;;
6298    esac
6299  fi
6300  ;;
6301esac
6302
6303_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6304    [Whether or not to add -lc for building shared libraries])
6305_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6306    [enable_shared_with_static_runtimes], [0],
6307    [Whether or not to disallow shared libs when runtime libs are static])
6308_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6309    [Compiler flag to allow reflexive dlopens])
6310_LT_TAGDECL([], [whole_archive_flag_spec], [1],
6311    [Compiler flag to generate shared objects directly from archives])
6312_LT_TAGDECL([], [compiler_needs_object], [1],
6313    [Whether the compiler copes with passing no objects directly])
6314_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6315    [Create an old-style archive from a shared archive])
6316_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6317    [Create a temporary old-style archive to link instead of a shared archive])
6318_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6319_LT_TAGDECL([], [archive_expsym_cmds], [2])
6320_LT_TAGDECL([], [module_cmds], [2],
6321    [Commands used to build a loadable module if different from building
6322    a shared archive.])
6323_LT_TAGDECL([], [module_expsym_cmds], [2])
6324_LT_TAGDECL([], [with_gnu_ld], [1],
6325    [Whether we are building with GNU ld or not])
6326_LT_TAGDECL([], [allow_undefined_flag], [1],
6327    [Flag that allows shared libraries with undefined symbols to be built])
6328_LT_TAGDECL([], [no_undefined_flag], [1],
6329    [Flag that enforces no undefined symbols])
6330_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6331    [Flag to hardcode $libdir into a binary during linking.
6332    This must work even if $libdir does not exist])
6333_LT_TAGDECL([], [hardcode_libdir_separator], [1],
6334    [Whether we need a single "-rpath" flag with a separated argument])
6335_LT_TAGDECL([], [hardcode_direct], [0],
6336    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6337    DIR into the resulting binary])
6338_LT_TAGDECL([], [hardcode_direct_absolute], [0],
6339    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6340    DIR into the resulting binary and the resulting library dependency is
6341    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
6342    library is relocated])
6343_LT_TAGDECL([], [hardcode_minus_L], [0],
6344    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6345    into the resulting binary])
6346_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6347    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6348    into the resulting binary])
6349_LT_TAGDECL([], [hardcode_automatic], [0],
6350    [Set to "yes" if building a shared library automatically hardcodes DIR
6351    into the library and all subsequent libraries and executables linked
6352    against it])
6353_LT_TAGDECL([], [inherit_rpath], [0],
6354    [Set to yes if linker adds runtime paths of dependent libraries
6355    to runtime path list])
6356_LT_TAGDECL([], [link_all_deplibs], [0],
6357    [Whether libtool must link a program against all its dependency libraries])
6358_LT_TAGDECL([], [always_export_symbols], [0],
6359    [Set to "yes" if exported symbols are required])
6360_LT_TAGDECL([], [export_symbols_cmds], [2],
6361    [The commands to list exported symbols])
6362_LT_TAGDECL([], [exclude_expsyms], [1],
6363    [Symbols that should not be listed in the preloaded symbols])
6364_LT_TAGDECL([], [include_expsyms], [1],
6365    [Symbols that must always be exported])
6366_LT_TAGDECL([], [prelink_cmds], [2],
6367    [Commands necessary for linking programs (against libraries) with templates])
6368_LT_TAGDECL([], [postlink_cmds], [2],
6369    [Commands necessary for finishing linking programs])
6370_LT_TAGDECL([], [file_list_spec], [1],
6371    [Specify filename containing input files])
6372dnl FIXME: Not yet implemented
6373dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6374dnl    [Compiler flag to generate thread safe objects])
6375])# _LT_LINKER_SHLIBS
6376
6377
6378# _LT_LANG_C_CONFIG([TAG])
6379# ------------------------
6380# Ensure that the configuration variables for a C compiler are suitably
6381# defined.  These variables are subsequently used by _LT_CONFIG to write
6382# the compiler configuration to `libtool'.
6383m4_defun([_LT_LANG_C_CONFIG],
6384[m4_require([_LT_DECL_EGREP])dnl
6385lt_save_CC="$CC"
6386AC_LANG_PUSH(C)
6387
6388# Source file extension for C test sources.
6389ac_ext=c
6390
6391# Object file extension for compiled C test sources.
6392objext=o
6393_LT_TAGVAR(objext, $1)=$objext
6394
6395# Code to be used in simple compile tests
6396lt_simple_compile_test_code="int some_variable = 0;"
6397
6398# Code to be used in simple link tests
6399lt_simple_link_test_code='int main(){return(0);}'
6400
6401_LT_TAG_COMPILER
6402# Save the default compiler, since it gets overwritten when the other
6403# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6404compiler_DEFAULT=$CC
6405
6406# save warnings/boilerplate of simple test code
6407_LT_COMPILER_BOILERPLATE
6408_LT_LINKER_BOILERPLATE
6409
6410if test -n "$compiler"; then
6411  _LT_COMPILER_NO_RTTI($1)
6412  _LT_COMPILER_PIC($1)
6413  _LT_COMPILER_C_O($1)
6414  _LT_COMPILER_FILE_LOCKS($1)
6415  _LT_LINKER_SHLIBS($1)
6416  _LT_SYS_DYNAMIC_LINKER($1)
6417  _LT_LINKER_HARDCODE_LIBPATH($1)
6418  LT_SYS_DLOPEN_SELF
6419  _LT_CMD_STRIPLIB
6420
6421  # Report which library types will actually be built
6422  AC_MSG_CHECKING([if libtool supports shared libraries])
6423  AC_MSG_RESULT([$can_build_shared])
6424
6425  AC_MSG_CHECKING([whether to build shared libraries])
6426  test "$can_build_shared" = "no" && enable_shared=no
6427
6428  # On AIX, shared libraries and static libraries use the same namespace, and
6429  # are all built from PIC.
6430  case $host_os in
6431  aix3*)
6432    test "$enable_shared" = yes && enable_static=no
6433    if test -n "$RANLIB"; then
6434      archive_cmds="$archive_cmds~\$RANLIB \$lib"
6435      postinstall_cmds='$RANLIB $lib'
6436    fi
6437    ;;
6438
6439  aix[[4-9]]*)
6440    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6441      test "$enable_shared" = yes && enable_static=no
6442    fi
6443    ;;
6444  esac
6445  AC_MSG_RESULT([$enable_shared])
6446
6447  AC_MSG_CHECKING([whether to build static libraries])
6448  # Make sure either enable_shared or enable_static is yes.
6449  test "$enable_shared" = yes || enable_static=yes
6450  AC_MSG_RESULT([$enable_static])
6451
6452  _LT_CONFIG($1)
6453fi
6454AC_LANG_POP
6455CC="$lt_save_CC"
6456])# _LT_LANG_C_CONFIG
6457
6458
6459# _LT_LANG_CXX_CONFIG([TAG])
6460# --------------------------
6461# Ensure that the configuration variables for a C++ compiler are suitably
6462# defined.  These variables are subsequently used by _LT_CONFIG to write
6463# the compiler configuration to `libtool'.
6464m4_defun([_LT_LANG_CXX_CONFIG],
6465[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6466m4_require([_LT_DECL_EGREP])dnl
6467m4_require([_LT_PATH_MANIFEST_TOOL])dnl
6468if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
6469    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
6470    (test "X$CXX" != "Xg++"))) ; then
6471  AC_PROG_CXXCPP
6472else
6473  _lt_caught_CXX_error=yes
6474fi
6475
6476AC_LANG_PUSH(C++)
6477_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6478_LT_TAGVAR(allow_undefined_flag, $1)=
6479_LT_TAGVAR(always_export_symbols, $1)=no
6480_LT_TAGVAR(archive_expsym_cmds, $1)=
6481_LT_TAGVAR(compiler_needs_object, $1)=no
6482_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6483_LT_TAGVAR(hardcode_direct, $1)=no
6484_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6485_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6486_LT_TAGVAR(hardcode_libdir_separator, $1)=
6487_LT_TAGVAR(hardcode_minus_L, $1)=no
6488_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6489_LT_TAGVAR(hardcode_automatic, $1)=no
6490_LT_TAGVAR(inherit_rpath, $1)=no
6491_LT_TAGVAR(module_cmds, $1)=
6492_LT_TAGVAR(module_expsym_cmds, $1)=
6493_LT_TAGVAR(link_all_deplibs, $1)=unknown
6494_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6495_LT_TAGVAR(reload_flag, $1)=$reload_flag
6496_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
6497_LT_TAGVAR(no_undefined_flag, $1)=
6498_LT_TAGVAR(whole_archive_flag_spec, $1)=
6499_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6500
6501# Source file extension for C++ test sources.
6502ac_ext=cpp
6503
6504# Object file extension for compiled C++ test sources.
6505objext=o
6506_LT_TAGVAR(objext, $1)=$objext
6507
6508# No sense in running all these tests if we already determined that
6509# the CXX compiler isn't working.  Some variables (like enable_shared)
6510# are currently assumed to apply to all compilers on this platform,
6511# and will be corrupted by setting them based on a non-working compiler.
6512if test "$_lt_caught_CXX_error" != yes; then
6513  # Code to be used in simple compile tests
6514  lt_simple_compile_test_code="int some_variable = 0;"
6515
6516  # Code to be used in simple link tests
6517  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6518
6519  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6520  _LT_TAG_COMPILER
6521
6522  # save warnings/boilerplate of simple test code
6523  _LT_COMPILER_BOILERPLATE
6524  _LT_LINKER_BOILERPLATE
6525
6526  # Allow CC to be a program name with arguments.
6527  lt_save_CC=$CC
6528  lt_save_CFLAGS=$CFLAGS
6529  lt_save_LD=$LD
6530  lt_save_GCC=$GCC
6531  GCC=$GXX
6532  lt_save_with_gnu_ld=$with_gnu_ld
6533  lt_save_path_LD=$lt_cv_path_LD
6534  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6535    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6536  else
6537    $as_unset lt_cv_prog_gnu_ld
6538  fi
6539  if test -n "${lt_cv_path_LDCXX+set}"; then
6540    lt_cv_path_LD=$lt_cv_path_LDCXX
6541  else
6542    $as_unset lt_cv_path_LD
6543  fi
6544  test -z "${LDCXX+set}" || LD=$LDCXX
6545  CC=${CXX-"c++"}
6546  CFLAGS=$CXXFLAGS
6547  compiler=$CC
6548  _LT_TAGVAR(compiler, $1)=$CC
6549  _LT_CC_BASENAME([$compiler])
6550
6551  if test -n "$compiler"; then
6552    # We don't want -fno-exception when compiling C++ code, so set the
6553    # no_builtin_flag separately
6554    if test "$GXX" = yes; then
6555      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6556    else
6557      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6558    fi
6559
6560    if test "$GXX" = yes; then
6561      # Set up default GNU C++ configuration
6562
6563      LT_PATH_LD
6564
6565      # Check if GNU C++ uses GNU ld as the underlying linker, since the
6566      # archiving commands below assume that GNU ld is being used.
6567      if test "$with_gnu_ld" = yes; then
6568        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6569        _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'
6570
6571        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6572        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6573
6574        # If archive_cmds runs LD, not CC, wlarc should be empty
6575        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6576        #     investigate it a little bit more. (MM)
6577        wlarc='${wl}'
6578
6579        # ancient GNU ld didn't support --whole-archive et. al.
6580        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6581	  $GREP 'no-whole-archive' > /dev/null; then
6582          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6583        else
6584          _LT_TAGVAR(whole_archive_flag_spec, $1)=
6585        fi
6586      else
6587        with_gnu_ld=no
6588        wlarc=
6589
6590        # A generic and very simple default shared library creation
6591        # command for GNU C++ for the case where it uses the native
6592        # linker, instead of GNU ld.  If possible, this setting should
6593        # overridden to take advantage of the native linker features on
6594        # the platform it is being used on.
6595        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6596      fi
6597
6598      # Commands to make compiler produce verbose output that lists
6599      # what "hidden" libraries, object files and flags are used when
6600      # linking a shared library.
6601      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6602
6603    else
6604      GXX=no
6605      with_gnu_ld=no
6606      wlarc=
6607    fi
6608
6609    # PORTME: fill in a description of your system's C++ link characteristics
6610    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6611    _LT_TAGVAR(ld_shlibs, $1)=yes
6612    case $host_os in
6613      aix3*)
6614        # FIXME: insert proper C++ library support
6615        _LT_TAGVAR(ld_shlibs, $1)=no
6616        ;;
6617      aix[[4-9]]*)
6618        if test "$host_cpu" = ia64; then
6619          # On IA64, the linker does run time linking by default, so we don't
6620          # have to do anything special.
6621          aix_use_runtimelinking=no
6622          exp_sym_flag='-Bexport'
6623          no_entry_flag=""
6624        else
6625          aix_use_runtimelinking=no
6626
6627          # Test if we are trying to use run time linking or normal
6628          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6629          # need to do runtime linking.
6630          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6631	    for ld_flag in $LDFLAGS; do
6632	      case $ld_flag in
6633	      *-brtl*)
6634	        aix_use_runtimelinking=yes
6635	        break
6636	        ;;
6637	      esac
6638	    done
6639	    ;;
6640          esac
6641
6642          exp_sym_flag='-bexport'
6643          no_entry_flag='-bnoentry'
6644        fi
6645
6646        # When large executables or shared objects are built, AIX ld can
6647        # have problems creating the table of contents.  If linking a library
6648        # or program results in "error TOC overflow" add -mminimal-toc to
6649        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6650        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6651
6652        _LT_TAGVAR(archive_cmds, $1)=''
6653        _LT_TAGVAR(hardcode_direct, $1)=yes
6654        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6655        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6656        _LT_TAGVAR(link_all_deplibs, $1)=yes
6657        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6658
6659        if test "$GXX" = yes; then
6660          case $host_os in aix4.[[012]]|aix4.[[012]].*)
6661          # We only want to do this on AIX 4.2 and lower, the check
6662          # below for broken collect2 doesn't work under 4.3+
6663	  collect2name=`${CC} -print-prog-name=collect2`
6664	  if test -f "$collect2name" &&
6665	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6666	  then
6667	    # We have reworked collect2
6668	    :
6669	  else
6670	    # We have old collect2
6671	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
6672	    # It fails to find uninstalled libraries when the uninstalled
6673	    # path is not listed in the libpath.  Setting hardcode_minus_L
6674	    # to unsupported forces relinking
6675	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
6676	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6677	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
6678	  fi
6679          esac
6680          shared_flag='-shared'
6681	  if test "$aix_use_runtimelinking" = yes; then
6682	    shared_flag="$shared_flag "'${wl}-G'
6683	  fi
6684        else
6685          # not using gcc
6686          if test "$host_cpu" = ia64; then
6687	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6688	  # chokes on -Wl,-G. The following line is correct:
6689	  shared_flag='-G'
6690          else
6691	    if test "$aix_use_runtimelinking" = yes; then
6692	      shared_flag='${wl}-G'
6693	    else
6694	      shared_flag='${wl}-bM:SRE'
6695	    fi
6696          fi
6697        fi
6698
6699        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6700        # It seems that -bexpall does not export symbols beginning with
6701        # underscore (_), so it is better to generate a list of symbols to
6702	# export.
6703        _LT_TAGVAR(always_export_symbols, $1)=yes
6704        if test "$aix_use_runtimelinking" = yes; then
6705          # Warning - without using the other runtime loading flags (-brtl),
6706          # -berok will link without error, but may produce a broken library.
6707          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6708          # Determine the default libpath from the value encoded in an empty
6709          # executable.
6710          _LT_SYS_MODULE_PATH_AIX([$1])
6711          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6712
6713          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6714        else
6715          if test "$host_cpu" = ia64; then
6716	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6717	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6718	    _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"
6719          else
6720	    # Determine the default libpath from the value encoded in an
6721	    # empty executable.
6722	    _LT_SYS_MODULE_PATH_AIX([$1])
6723	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6724	    # Warning - without using the other run time loading flags,
6725	    # -berok will link without error, but may produce a broken library.
6726	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6727	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6728	    if test "$with_gnu_ld" = yes; then
6729	      # We only use this code for GNU lds that support --whole-archive.
6730	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6731	    else
6732	      # Exported symbols can be pulled into shared objects from archives
6733	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6734	    fi
6735	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6736	    # This is similar to how AIX traditionally builds its shared
6737	    # libraries.
6738	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6739          fi
6740        fi
6741        ;;
6742
6743      beos*)
6744	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6745	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6746	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6747	  # support --undefined.  This deserves some investigation.  FIXME
6748	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6749	else
6750	  _LT_TAGVAR(ld_shlibs, $1)=no
6751	fi
6752	;;
6753
6754      chorus*)
6755        case $cc_basename in
6756          *)
6757	  # FIXME: insert proper C++ library support
6758	  _LT_TAGVAR(ld_shlibs, $1)=no
6759	  ;;
6760        esac
6761        ;;
6762
6763      cygwin* | mingw* | pw32* | cegcc*)
6764	case $GXX,$cc_basename in
6765	,cl* | no,cl*)
6766	  # Native MSVC
6767	  # hardcode_libdir_flag_spec is actually meaningless, as there is
6768	  # no search path for DLLs.
6769	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6770	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6771	  _LT_TAGVAR(always_export_symbols, $1)=yes
6772	  _LT_TAGVAR(file_list_spec, $1)='@'
6773	  # Tell ltmain to make .lib files, not .a files.
6774	  libext=lib
6775	  # Tell ltmain to make .dll files, not .so files.
6776	  shrext_cmds=".dll"
6777	  # FIXME: Setting linknames here is a bad hack.
6778	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6779	  _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6780	      $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6781	    else
6782	      $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6783	    fi~
6784	    $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6785	    linknames='
6786	  # The linker will not automatically build a static lib if we build a DLL.
6787	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6788	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6789	  # Don't use ranlib
6790	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6791	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6792	    lt_tool_outputfile="@TOOL_OUTPUT@"~
6793	    case $lt_outputfile in
6794	      *.exe|*.EXE) ;;
6795	      *)
6796		lt_outputfile="$lt_outputfile.exe"
6797		lt_tool_outputfile="$lt_tool_outputfile.exe"
6798		;;
6799	    esac~
6800	    func_to_tool_file "$lt_outputfile"~
6801	    if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6802	      $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6803	      $RM "$lt_outputfile.manifest";
6804	    fi'
6805	  ;;
6806	*)
6807	  # g++
6808	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6809	  # as there is no search path for DLLs.
6810	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6811	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
6812	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6813	  _LT_TAGVAR(always_export_symbols, $1)=no
6814	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6815
6816	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6817	    _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'
6818	    # If the export-symbols file already is a .def file (1st line
6819	    # is EXPORTS), use it as is; otherwise, prepend...
6820	    _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6821	      cp $export_symbols $output_objdir/$soname.def;
6822	    else
6823	      echo EXPORTS > $output_objdir/$soname.def;
6824	      cat $export_symbols >> $output_objdir/$soname.def;
6825	    fi~
6826	    $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'
6827	  else
6828	    _LT_TAGVAR(ld_shlibs, $1)=no
6829	  fi
6830	  ;;
6831	esac
6832	;;
6833      darwin* | rhapsody*)
6834        _LT_DARWIN_LINKER_FEATURES($1)
6835	;;
6836
6837      dgux*)
6838        case $cc_basename in
6839          ec++*)
6840	    # FIXME: insert proper C++ library support
6841	    _LT_TAGVAR(ld_shlibs, $1)=no
6842	    ;;
6843          ghcx*)
6844	    # Green Hills C++ Compiler
6845	    # FIXME: insert proper C++ library support
6846	    _LT_TAGVAR(ld_shlibs, $1)=no
6847	    ;;
6848          *)
6849	    # FIXME: insert proper C++ library support
6850	    _LT_TAGVAR(ld_shlibs, $1)=no
6851	    ;;
6852        esac
6853        ;;
6854
6855      freebsd2.*)
6856        # C++ shared libraries reported to be fairly broken before
6857	# switch to ELF
6858        _LT_TAGVAR(ld_shlibs, $1)=no
6859        ;;
6860
6861      freebsd-elf*)
6862        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6863        ;;
6864
6865      freebsd* | dragonfly*)
6866        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6867        # conventions
6868        _LT_TAGVAR(ld_shlibs, $1)=yes
6869        ;;
6870
6871      gnu*)
6872        ;;
6873
6874      haiku*)
6875        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6876        _LT_TAGVAR(link_all_deplibs, $1)=yes
6877        ;;
6878
6879      hpux9*)
6880        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6881        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6882        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6883        _LT_TAGVAR(hardcode_direct, $1)=yes
6884        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6885				             # but as the default
6886				             # location of the library.
6887
6888        case $cc_basename in
6889          CC*)
6890            # FIXME: insert proper C++ library support
6891            _LT_TAGVAR(ld_shlibs, $1)=no
6892            ;;
6893          aCC*)
6894            _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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6895            # Commands to make compiler produce verbose output that lists
6896            # what "hidden" libraries, object files and flags are used when
6897            # linking a shared library.
6898            #
6899            # There doesn't appear to be a way to prevent this compiler from
6900            # explicitly linking system object files so we need to strip them
6901            # from the output so that they don't get included in the library
6902            # dependencies.
6903            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"'
6904            ;;
6905          *)
6906            if test "$GXX" = yes; then
6907              _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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6908            else
6909              # FIXME: insert proper C++ library support
6910              _LT_TAGVAR(ld_shlibs, $1)=no
6911            fi
6912            ;;
6913        esac
6914        ;;
6915
6916      hpux10*|hpux11*)
6917        if test $with_gnu_ld = no; then
6918	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6919	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6920
6921          case $host_cpu in
6922            hppa*64*|ia64*)
6923              ;;
6924            *)
6925	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6926              ;;
6927          esac
6928        fi
6929        case $host_cpu in
6930          hppa*64*|ia64*)
6931            _LT_TAGVAR(hardcode_direct, $1)=no
6932            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6933            ;;
6934          *)
6935            _LT_TAGVAR(hardcode_direct, $1)=yes
6936            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6937            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6938					         # but as the default
6939					         # location of the library.
6940            ;;
6941        esac
6942
6943        case $cc_basename in
6944          CC*)
6945	    # FIXME: insert proper C++ library support
6946	    _LT_TAGVAR(ld_shlibs, $1)=no
6947	    ;;
6948          aCC*)
6949	    case $host_cpu in
6950	      hppa*64*)
6951	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6952	        ;;
6953	      ia64*)
6954	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6955	        ;;
6956	      *)
6957	        _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'
6958	        ;;
6959	    esac
6960	    # Commands to make compiler produce verbose output that lists
6961	    # what "hidden" libraries, object files and flags are used when
6962	    # linking a shared library.
6963	    #
6964	    # There doesn't appear to be a way to prevent this compiler from
6965	    # explicitly linking system object files so we need to strip them
6966	    # from the output so that they don't get included in the library
6967	    # dependencies.
6968	    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"'
6969	    ;;
6970          *)
6971	    if test "$GXX" = yes; then
6972	      if test $with_gnu_ld = no; then
6973	        case $host_cpu in
6974	          hppa*64*)
6975	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6976	            ;;
6977	          ia64*)
6978	            _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'
6979	            ;;
6980	          *)
6981	            _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'
6982	            ;;
6983	        esac
6984	      fi
6985	    else
6986	      # FIXME: insert proper C++ library support
6987	      _LT_TAGVAR(ld_shlibs, $1)=no
6988	    fi
6989	    ;;
6990        esac
6991        ;;
6992
6993      interix[[3-9]]*)
6994	_LT_TAGVAR(hardcode_direct, $1)=no
6995	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6996	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6997	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6998	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6999	# Instead, shared libraries are loaded at an image base (0x10000000 by
7000	# default) and relocated if they conflict, which is a slow very memory
7001	# consuming and fragmenting process.  To avoid this, we pick a random,
7002	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7003	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
7004	_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'
7005	_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'
7006	;;
7007      irix5* | irix6*)
7008        case $cc_basename in
7009          CC*)
7010	    # SGI C++
7011	    _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'
7012
7013	    # Archives containing C++ object files must be created using
7014	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
7015	    # necessary to make sure instantiated templates are included
7016	    # in the archive.
7017	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
7018	    ;;
7019          *)
7020	    if test "$GXX" = yes; then
7021	      if test "$with_gnu_ld" = no; then
7022	        _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'
7023	      else
7024	        _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'
7025	      fi
7026	    fi
7027	    _LT_TAGVAR(link_all_deplibs, $1)=yes
7028	    ;;
7029        esac
7030        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7031        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7032        _LT_TAGVAR(inherit_rpath, $1)=yes
7033        ;;
7034
7035      linux* | k*bsd*-gnu | kopensolaris*-gnu)
7036        case $cc_basename in
7037          KCC*)
7038	    # Kuck and Associates, Inc. (KAI) C++ Compiler
7039
7040	    # KCC will only create a shared library if the output file
7041	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
7042	    # to its proper name (with version) after linking.
7043	    _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'
7044	    _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'
7045	    # Commands to make compiler produce verbose output that lists
7046	    # what "hidden" libraries, object files and flags are used when
7047	    # linking a shared library.
7048	    #
7049	    # There doesn't appear to be a way to prevent this compiler from
7050	    # explicitly linking system object files so we need to strip them
7051	    # from the output so that they don't get included in the library
7052	    # dependencies.
7053	    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"'
7054
7055	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7056	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7057
7058	    # Archives containing C++ object files must be created using
7059	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
7060	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
7061	    ;;
7062	  icpc* | ecpc* )
7063	    # Intel C++
7064	    with_gnu_ld=yes
7065	    # version 8.0 and above of icpc choke on multiply defined symbols
7066	    # if we add $predep_objects and $postdep_objects, however 7.1 and
7067	    # earlier do not add the objects themselves.
7068	    case `$CC -V 2>&1` in
7069	      *"Version 7."*)
7070	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7071		_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'
7072		;;
7073	      *)  # Version 8.0 or newer
7074	        tmp_idyn=
7075	        case $host_cpu in
7076		  ia64*) tmp_idyn=' -i_dynamic';;
7077		esac
7078	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7079		_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'
7080		;;
7081	    esac
7082	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7083	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7084	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7085	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7086	    ;;
7087          pgCC* | pgcpp*)
7088            # Portland Group C++ compiler
7089	    case `$CC -V` in
7090	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
7091	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7092		rm -rf $tpldir~
7093		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7094		compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
7095	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7096		rm -rf $tpldir~
7097		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7098		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
7099		$RANLIB $oldlib'
7100	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7101		rm -rf $tpldir~
7102		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7103		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7104	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7105		rm -rf $tpldir~
7106		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7107		$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'
7108	      ;;
7109	    *) # Version 6 and above use weak symbols
7110	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7111	      _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'
7112	      ;;
7113	    esac
7114
7115	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7116	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7117	    _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'
7118            ;;
7119	  cxx*)
7120	    # Compaq C++
7121	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7122	    _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'
7123
7124	    runpath_var=LD_RUN_PATH
7125	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7126	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
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	    #
7132	    # There doesn't appear to be a way to prevent this compiler from
7133	    # explicitly linking system object files so we need to strip them
7134	    # from the output so that they don't get included in the library
7135	    # dependencies.
7136	    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'
7137	    ;;
7138	  xl* | mpixl* | bgxl*)
7139	    # IBM XL 8.0 on PPC, with GNU ld
7140	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7141	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7142	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7143	    if test "x$supports_anon_versioning" = xyes; then
7144	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7145		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7146		echo "local: *; };" >> $output_objdir/$libname.ver~
7147		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7148	    fi
7149	    ;;
7150	  *)
7151	    case `$CC -V 2>&1 | sed 5q` in
7152	    *Sun\ C*)
7153	      # Sun C++ 5.9
7154	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7155	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7156	      _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'
7157	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7158	      _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'
7159	      _LT_TAGVAR(compiler_needs_object, $1)=yes
7160
7161	      # Not sure whether something based on
7162	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7163	      # would be better.
7164	      output_verbose_link_cmd='func_echo_all'
7165
7166	      # Archives containing C++ object files must be created using
7167	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7168	      # necessary to make sure instantiated templates are included
7169	      # in the archive.
7170	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7171	      ;;
7172	    esac
7173	    ;;
7174	esac
7175	;;
7176
7177      lynxos*)
7178        # FIXME: insert proper C++ library support
7179	_LT_TAGVAR(ld_shlibs, $1)=no
7180	;;
7181
7182      m88k*)
7183        # FIXME: insert proper C++ library support
7184        _LT_TAGVAR(ld_shlibs, $1)=no
7185	;;
7186
7187      mvs*)
7188        case $cc_basename in
7189          cxx*)
7190	    # FIXME: insert proper C++ library support
7191	    _LT_TAGVAR(ld_shlibs, $1)=no
7192	    ;;
7193	  *)
7194	    # FIXME: insert proper C++ library support
7195	    _LT_TAGVAR(ld_shlibs, $1)=no
7196	    ;;
7197	esac
7198	;;
7199
7200      netbsd*)
7201        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7202	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7203	  wlarc=
7204	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7205	  _LT_TAGVAR(hardcode_direct, $1)=yes
7206	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7207	fi
7208	# Workaround some broken pre-1.5 toolchains
7209	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7210	;;
7211
7212      *nto* | *qnx*)
7213        _LT_TAGVAR(ld_shlibs, $1)=yes
7214	;;
7215
7216      openbsd2*)
7217        # C++ shared libraries are fairly broken
7218	_LT_TAGVAR(ld_shlibs, $1)=no
7219	;;
7220
7221      openbsd*)
7222	if test -f /usr/libexec/ld.so; then
7223	  _LT_TAGVAR(hardcode_direct, $1)=yes
7224	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7225	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7226	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7227	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7228	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7229	    _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'
7230	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7231	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7232	  fi
7233	  output_verbose_link_cmd=func_echo_all
7234	else
7235	  _LT_TAGVAR(ld_shlibs, $1)=no
7236	fi
7237	;;
7238
7239      osf3* | osf4* | osf5*)
7240        case $cc_basename in
7241          KCC*)
7242	    # Kuck and Associates, Inc. (KAI) C++ Compiler
7243
7244	    # KCC will only create a shared library if the output file
7245	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
7246	    # to its proper name (with version) after linking.
7247	    _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'
7248
7249	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7250	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7251
7252	    # Archives containing C++ object files must be created using
7253	    # the KAI C++ compiler.
7254	    case $host in
7255	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7256	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7257	    esac
7258	    ;;
7259          RCC*)
7260	    # Rational C++ 2.4.1
7261	    # FIXME: insert proper C++ library support
7262	    _LT_TAGVAR(ld_shlibs, $1)=no
7263	    ;;
7264          cxx*)
7265	    case $host in
7266	      osf3*)
7267	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7268	        _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'
7269	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7270		;;
7271	      *)
7272	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7273	        _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'
7274	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7275	          echo "-hidden">> $lib.exp~
7276	          $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~
7277	          $RM $lib.exp'
7278	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7279		;;
7280	    esac
7281
7282	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7283
7284	    # Commands to make compiler produce verbose output that lists
7285	    # what "hidden" libraries, object files and flags are used when
7286	    # linking a shared library.
7287	    #
7288	    # There doesn't appear to be a way to prevent this compiler from
7289	    # explicitly linking system object files so we need to strip them
7290	    # from the output so that they don't get included in the library
7291	    # dependencies.
7292	    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"'
7293	    ;;
7294	  *)
7295	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7296	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7297	      case $host in
7298	        osf3*)
7299	          _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'
7300		  ;;
7301	        *)
7302	          _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'
7303		  ;;
7304	      esac
7305
7306	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7307	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7308
7309	      # Commands to make compiler produce verbose output that lists
7310	      # what "hidden" libraries, object files and flags are used when
7311	      # linking a shared library.
7312	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7313
7314	    else
7315	      # FIXME: insert proper C++ library support
7316	      _LT_TAGVAR(ld_shlibs, $1)=no
7317	    fi
7318	    ;;
7319        esac
7320        ;;
7321
7322      psos*)
7323        # FIXME: insert proper C++ library support
7324        _LT_TAGVAR(ld_shlibs, $1)=no
7325        ;;
7326
7327      sunos4*)
7328        case $cc_basename in
7329          CC*)
7330	    # Sun C++ 4.x
7331	    # FIXME: insert proper C++ library support
7332	    _LT_TAGVAR(ld_shlibs, $1)=no
7333	    ;;
7334          lcc*)
7335	    # Lucid
7336	    # FIXME: insert proper C++ library support
7337	    _LT_TAGVAR(ld_shlibs, $1)=no
7338	    ;;
7339          *)
7340	    # FIXME: insert proper C++ library support
7341	    _LT_TAGVAR(ld_shlibs, $1)=no
7342	    ;;
7343        esac
7344        ;;
7345
7346      solaris*)
7347        case $cc_basename in
7348          CC* | sunCC*)
7349	    # Sun C++ 4.2, 5.x and Centerline C++
7350            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7351	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7352	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7353	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7354	      $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'
7355
7356	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7357	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7358	    case $host_os in
7359	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7360	      *)
7361		# The compiler driver will combine and reorder linker options,
7362		# but understands `-z linker_flag'.
7363	        # Supported since Solaris 2.6 (maybe 2.5.1?)
7364		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7365	        ;;
7366	    esac
7367	    _LT_TAGVAR(link_all_deplibs, $1)=yes
7368
7369	    output_verbose_link_cmd='func_echo_all'
7370
7371	    # Archives containing C++ object files must be created using
7372	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7373	    # necessary to make sure instantiated templates are included
7374	    # in the archive.
7375	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7376	    ;;
7377          gcx*)
7378	    # Green Hills C++ Compiler
7379	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7380
7381	    # The C++ compiler must be used to create the archive.
7382	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7383	    ;;
7384          *)
7385	    # GNU C++ compiler with Solaris linker
7386	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7387	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
7388	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7389	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7390	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7391		  $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7392
7393	        # Commands to make compiler produce verbose output that lists
7394	        # what "hidden" libraries, object files and flags are used when
7395	        # linking a shared library.
7396	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7397	      else
7398	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
7399	        # platform.
7400	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7401	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7402		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7403
7404	        # Commands to make compiler produce verbose output that lists
7405	        # what "hidden" libraries, object files and flags are used when
7406	        # linking a shared library.
7407	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7408	      fi
7409
7410	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
7411	      case $host_os in
7412		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7413		*)
7414		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7415		  ;;
7416	      esac
7417	    fi
7418	    ;;
7419        esac
7420        ;;
7421
7422    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7423      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7424      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7425      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7426      runpath_var='LD_RUN_PATH'
7427
7428      case $cc_basename in
7429        CC*)
7430	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7431	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7432	  ;;
7433	*)
7434	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7435	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7436	  ;;
7437      esac
7438      ;;
7439
7440      sysv5* | sco3.2v5* | sco5v6*)
7441	# Note: We can NOT use -z defs as we might desire, because we do not
7442	# link with -lc, and that would cause any symbols used from libc to
7443	# always be unresolved, which means just about no library would
7444	# ever link correctly.  If we're not using GNU ld we use -z text
7445	# though, which does catch some bad symbols but isn't as heavy-handed
7446	# as -z defs.
7447	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7448	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7449	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7450	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7451	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7452	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7453	_LT_TAGVAR(link_all_deplibs, $1)=yes
7454	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7455	runpath_var='LD_RUN_PATH'
7456
7457	case $cc_basename in
7458          CC*)
7459	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7460	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7461	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
7462	      '"$_LT_TAGVAR(old_archive_cmds, $1)"
7463	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
7464	      '"$_LT_TAGVAR(reload_cmds, $1)"
7465	    ;;
7466	  *)
7467	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7468	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7469	    ;;
7470	esac
7471      ;;
7472
7473      tandem*)
7474        case $cc_basename in
7475          NCC*)
7476	    # NonStop-UX NCC 3.20
7477	    # FIXME: insert proper C++ library support
7478	    _LT_TAGVAR(ld_shlibs, $1)=no
7479	    ;;
7480          *)
7481	    # FIXME: insert proper C++ library support
7482	    _LT_TAGVAR(ld_shlibs, $1)=no
7483	    ;;
7484        esac
7485        ;;
7486
7487      vxworks*)
7488        # FIXME: insert proper C++ library support
7489        _LT_TAGVAR(ld_shlibs, $1)=no
7490        ;;
7491
7492      *)
7493        # FIXME: insert proper C++ library support
7494        _LT_TAGVAR(ld_shlibs, $1)=no
7495        ;;
7496    esac
7497
7498    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7499    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7500
7501    _LT_TAGVAR(GCC, $1)="$GXX"
7502    _LT_TAGVAR(LD, $1)="$LD"
7503
7504    ## CAVEAT EMPTOR:
7505    ## There is no encapsulation within the following macros, do not change
7506    ## the running order or otherwise move them around unless you know exactly
7507    ## what you are doing...
7508    _LT_SYS_HIDDEN_LIBDEPS($1)
7509    _LT_COMPILER_PIC($1)
7510    _LT_COMPILER_C_O($1)
7511    _LT_COMPILER_FILE_LOCKS($1)
7512    _LT_LINKER_SHLIBS($1)
7513    _LT_SYS_DYNAMIC_LINKER($1)
7514    _LT_LINKER_HARDCODE_LIBPATH($1)
7515
7516    _LT_CONFIG($1)
7517  fi # test -n "$compiler"
7518
7519  CC=$lt_save_CC
7520  CFLAGS=$lt_save_CFLAGS
7521  LDCXX=$LD
7522  LD=$lt_save_LD
7523  GCC=$lt_save_GCC
7524  with_gnu_ld=$lt_save_with_gnu_ld
7525  lt_cv_path_LDCXX=$lt_cv_path_LD
7526  lt_cv_path_LD=$lt_save_path_LD
7527  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7528  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7529fi # test "$_lt_caught_CXX_error" != yes
7530
7531AC_LANG_POP
7532])# _LT_LANG_CXX_CONFIG
7533
7534
7535# _LT_FUNC_STRIPNAME_CNF
7536# ----------------------
7537# func_stripname_cnf prefix suffix name
7538# strip PREFIX and SUFFIX off of NAME.
7539# PREFIX and SUFFIX must not contain globbing or regex special
7540# characters, hashes, percent signs, but SUFFIX may contain a leading
7541# dot (in which case that matches only a dot).
7542#
7543# This function is identical to the (non-XSI) version of func_stripname,
7544# except this one can be used by m4 code that may be executed by configure,
7545# rather than the libtool script.
7546m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
7547AC_REQUIRE([_LT_DECL_SED])
7548AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
7549func_stripname_cnf ()
7550{
7551  case ${2} in
7552  .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
7553  *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
7554  esac
7555} # func_stripname_cnf
7556])# _LT_FUNC_STRIPNAME_CNF
7557
7558# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7559# ---------------------------------
7560# Figure out "hidden" library dependencies from verbose
7561# compiler output when linking a shared library.
7562# Parse the compiler output and extract the necessary
7563# objects, libraries and library flags.
7564m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7565[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7566AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
7567# Dependencies to place before and after the object being linked:
7568_LT_TAGVAR(predep_objects, $1)=
7569_LT_TAGVAR(postdep_objects, $1)=
7570_LT_TAGVAR(predeps, $1)=
7571_LT_TAGVAR(postdeps, $1)=
7572_LT_TAGVAR(compiler_lib_search_path, $1)=
7573
7574dnl we can't use the lt_simple_compile_test_code here,
7575dnl because it contains code intended for an executable,
7576dnl not a library.  It's possible we should let each
7577dnl tag define a new lt_????_link_test_code variable,
7578dnl but it's only used here...
7579m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7580int a;
7581void foo (void) { a = 0; }
7582_LT_EOF
7583], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7584class Foo
7585{
7586public:
7587  Foo (void) { a = 0; }
7588private:
7589  int a;
7590};
7591_LT_EOF
7592], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7593      subroutine foo
7594      implicit none
7595      integer*4 a
7596      a=0
7597      return
7598      end
7599_LT_EOF
7600], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7601      subroutine foo
7602      implicit none
7603      integer a
7604      a=0
7605      return
7606      end
7607_LT_EOF
7608], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7609public class foo {
7610  private int a;
7611  public void bar (void) {
7612    a = 0;
7613  }
7614};
7615_LT_EOF
7616], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
7617package foo
7618func foo() {
7619}
7620_LT_EOF
7621])
7622
7623_lt_libdeps_save_CFLAGS=$CFLAGS
7624case "$CC $CFLAGS " in #(
7625*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
7626*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
7627*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
7628esac
7629
7630dnl Parse the compiler output and extract the necessary
7631dnl objects, libraries and library flags.
7632if AC_TRY_EVAL(ac_compile); then
7633  # Parse the compiler output and extract the necessary
7634  # objects, libraries and library flags.
7635
7636  # Sentinel used to keep track of whether or not we are before
7637  # the conftest object file.
7638  pre_test_object_deps_done=no
7639
7640  for p in `eval "$output_verbose_link_cmd"`; do
7641    case ${prev}${p} in
7642
7643    -L* | -R* | -l*)
7644       # Some compilers place space between "-{L,R}" and the path.
7645       # Remove the space.
7646       if test $p = "-L" ||
7647          test $p = "-R"; then
7648	 prev=$p
7649	 continue
7650       fi
7651
7652       # Expand the sysroot to ease extracting the directories later.
7653       if test -z "$prev"; then
7654         case $p in
7655         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
7656         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
7657         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
7658         esac
7659       fi
7660       case $p in
7661       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
7662       esac
7663       if test "$pre_test_object_deps_done" = no; then
7664	 case ${prev} in
7665	 -L | -R)
7666	   # Internal compiler library paths should come after those
7667	   # provided the user.  The postdeps already come after the
7668	   # user supplied libs so there is no need to process them.
7669	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7670	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
7671	   else
7672	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
7673	   fi
7674	   ;;
7675	 # The "-l" case would never come before the object being
7676	 # linked, so don't bother handling this case.
7677	 esac
7678       else
7679	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7680	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
7681	 else
7682	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
7683	 fi
7684       fi
7685       prev=
7686       ;;
7687
7688    *.lto.$objext) ;; # Ignore GCC LTO objects
7689    *.$objext)
7690       # This assumes that the test object file only shows up
7691       # once in the compiler output.
7692       if test "$p" = "conftest.$objext"; then
7693	 pre_test_object_deps_done=yes
7694	 continue
7695       fi
7696
7697       if test "$pre_test_object_deps_done" = no; then
7698	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7699	   _LT_TAGVAR(predep_objects, $1)="$p"
7700	 else
7701	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7702	 fi
7703       else
7704	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7705	   _LT_TAGVAR(postdep_objects, $1)="$p"
7706	 else
7707	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7708	 fi
7709       fi
7710       ;;
7711
7712    *) ;; # Ignore the rest.
7713
7714    esac
7715  done
7716
7717  # Clean up.
7718  rm -f a.out a.exe
7719else
7720  echo "libtool.m4: error: problem compiling $1 test program"
7721fi
7722
7723$RM -f confest.$objext
7724CFLAGS=$_lt_libdeps_save_CFLAGS
7725
7726# PORTME: override above test on systems where it is broken
7727m4_if([$1], [CXX],
7728[case $host_os in
7729interix[[3-9]]*)
7730  # Interix 3.5 installs completely hosed .la files for C++, so rather than
7731  # hack all around it, let's just trust "g++" to DTRT.
7732  _LT_TAGVAR(predep_objects,$1)=
7733  _LT_TAGVAR(postdep_objects,$1)=
7734  _LT_TAGVAR(postdeps,$1)=
7735  ;;
7736
7737linux*)
7738  case `$CC -V 2>&1 | sed 5q` in
7739  *Sun\ C*)
7740    # Sun C++ 5.9
7741
7742    # The more standards-conforming stlport4 library is
7743    # incompatible with the Cstd library. Avoid specifying
7744    # it if it's in CXXFLAGS. Ignore libCrun as
7745    # -library=stlport4 depends on it.
7746    case " $CXX $CXXFLAGS " in
7747    *" -library=stlport4 "*)
7748      solaris_use_stlport4=yes
7749      ;;
7750    esac
7751
7752    if test "$solaris_use_stlport4" != yes; then
7753      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7754    fi
7755    ;;
7756  esac
7757  ;;
7758
7759solaris*)
7760  case $cc_basename in
7761  CC* | sunCC*)
7762    # The more standards-conforming stlport4 library is
7763    # incompatible with the Cstd library. Avoid specifying
7764    # it if it's in CXXFLAGS. Ignore libCrun as
7765    # -library=stlport4 depends on it.
7766    case " $CXX $CXXFLAGS " in
7767    *" -library=stlport4 "*)
7768      solaris_use_stlport4=yes
7769      ;;
7770    esac
7771
7772    # Adding this requires a known-good setup of shared libraries for
7773    # Sun compiler versions before 5.6, else PIC objects from an old
7774    # archive will be linked into the output, leading to subtle bugs.
7775    if test "$solaris_use_stlport4" != yes; then
7776      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7777    fi
7778    ;;
7779  esac
7780  ;;
7781esac
7782])
7783
7784case " $_LT_TAGVAR(postdeps, $1) " in
7785*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7786esac
7787 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7788if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7789 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
7790fi
7791_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7792    [The directories searched by this compiler when creating a shared library])
7793_LT_TAGDECL([], [predep_objects], [1],
7794    [Dependencies to place before and after the objects being linked to
7795    create a shared library])
7796_LT_TAGDECL([], [postdep_objects], [1])
7797_LT_TAGDECL([], [predeps], [1])
7798_LT_TAGDECL([], [postdeps], [1])
7799_LT_TAGDECL([], [compiler_lib_search_path], [1],
7800    [The library search path used internally by the compiler when linking
7801    a shared library])
7802])# _LT_SYS_HIDDEN_LIBDEPS
7803
7804
7805# _LT_LANG_F77_CONFIG([TAG])
7806# --------------------------
7807# Ensure that the configuration variables for a Fortran 77 compiler are
7808# suitably defined.  These variables are subsequently used by _LT_CONFIG
7809# to write the compiler configuration to `libtool'.
7810m4_defun([_LT_LANG_F77_CONFIG],
7811[AC_LANG_PUSH(Fortran 77)
7812if test -z "$F77" || test "X$F77" = "Xno"; then
7813  _lt_disable_F77=yes
7814fi
7815
7816_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7817_LT_TAGVAR(allow_undefined_flag, $1)=
7818_LT_TAGVAR(always_export_symbols, $1)=no
7819_LT_TAGVAR(archive_expsym_cmds, $1)=
7820_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7821_LT_TAGVAR(hardcode_direct, $1)=no
7822_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7823_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7824_LT_TAGVAR(hardcode_libdir_separator, $1)=
7825_LT_TAGVAR(hardcode_minus_L, $1)=no
7826_LT_TAGVAR(hardcode_automatic, $1)=no
7827_LT_TAGVAR(inherit_rpath, $1)=no
7828_LT_TAGVAR(module_cmds, $1)=
7829_LT_TAGVAR(module_expsym_cmds, $1)=
7830_LT_TAGVAR(link_all_deplibs, $1)=unknown
7831_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7832_LT_TAGVAR(reload_flag, $1)=$reload_flag
7833_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7834_LT_TAGVAR(no_undefined_flag, $1)=
7835_LT_TAGVAR(whole_archive_flag_spec, $1)=
7836_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7837
7838# Source file extension for f77 test sources.
7839ac_ext=f
7840
7841# Object file extension for compiled f77 test sources.
7842objext=o
7843_LT_TAGVAR(objext, $1)=$objext
7844
7845# No sense in running all these tests if we already determined that
7846# the F77 compiler isn't working.  Some variables (like enable_shared)
7847# are currently assumed to apply to all compilers on this platform,
7848# and will be corrupted by setting them based on a non-working compiler.
7849if test "$_lt_disable_F77" != yes; then
7850  # Code to be used in simple compile tests
7851  lt_simple_compile_test_code="\
7852      subroutine t
7853      return
7854      end
7855"
7856
7857  # Code to be used in simple link tests
7858  lt_simple_link_test_code="\
7859      program t
7860      end
7861"
7862
7863  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7864  _LT_TAG_COMPILER
7865
7866  # save warnings/boilerplate of simple test code
7867  _LT_COMPILER_BOILERPLATE
7868  _LT_LINKER_BOILERPLATE
7869
7870  # Allow CC to be a program name with arguments.
7871  lt_save_CC="$CC"
7872  lt_save_GCC=$GCC
7873  lt_save_CFLAGS=$CFLAGS
7874  CC=${F77-"f77"}
7875  CFLAGS=$FFLAGS
7876  compiler=$CC
7877  _LT_TAGVAR(compiler, $1)=$CC
7878  _LT_CC_BASENAME([$compiler])
7879  GCC=$G77
7880  if test -n "$compiler"; then
7881    AC_MSG_CHECKING([if libtool supports shared libraries])
7882    AC_MSG_RESULT([$can_build_shared])
7883
7884    AC_MSG_CHECKING([whether to build shared libraries])
7885    test "$can_build_shared" = "no" && enable_shared=no
7886
7887    # On AIX, shared libraries and static libraries use the same namespace, and
7888    # are all built from PIC.
7889    case $host_os in
7890      aix3*)
7891        test "$enable_shared" = yes && enable_static=no
7892        if test -n "$RANLIB"; then
7893          archive_cmds="$archive_cmds~\$RANLIB \$lib"
7894          postinstall_cmds='$RANLIB $lib'
7895        fi
7896        ;;
7897      aix[[4-9]]*)
7898	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7899	  test "$enable_shared" = yes && enable_static=no
7900	fi
7901        ;;
7902    esac
7903    AC_MSG_RESULT([$enable_shared])
7904
7905    AC_MSG_CHECKING([whether to build static libraries])
7906    # Make sure either enable_shared or enable_static is yes.
7907    test "$enable_shared" = yes || enable_static=yes
7908    AC_MSG_RESULT([$enable_static])
7909
7910    _LT_TAGVAR(GCC, $1)="$G77"
7911    _LT_TAGVAR(LD, $1)="$LD"
7912
7913    ## CAVEAT EMPTOR:
7914    ## There is no encapsulation within the following macros, do not change
7915    ## the running order or otherwise move them around unless you know exactly
7916    ## what you are doing...
7917    _LT_COMPILER_PIC($1)
7918    _LT_COMPILER_C_O($1)
7919    _LT_COMPILER_FILE_LOCKS($1)
7920    _LT_LINKER_SHLIBS($1)
7921    _LT_SYS_DYNAMIC_LINKER($1)
7922    _LT_LINKER_HARDCODE_LIBPATH($1)
7923
7924    _LT_CONFIG($1)
7925  fi # test -n "$compiler"
7926
7927  GCC=$lt_save_GCC
7928  CC="$lt_save_CC"
7929  CFLAGS="$lt_save_CFLAGS"
7930fi # test "$_lt_disable_F77" != yes
7931
7932AC_LANG_POP
7933])# _LT_LANG_F77_CONFIG
7934
7935
7936# _LT_LANG_FC_CONFIG([TAG])
7937# -------------------------
7938# Ensure that the configuration variables for a Fortran compiler are
7939# suitably defined.  These variables are subsequently used by _LT_CONFIG
7940# to write the compiler configuration to `libtool'.
7941m4_defun([_LT_LANG_FC_CONFIG],
7942[AC_LANG_PUSH(Fortran)
7943
7944if test -z "$FC" || test "X$FC" = "Xno"; then
7945  _lt_disable_FC=yes
7946fi
7947
7948_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7949_LT_TAGVAR(allow_undefined_flag, $1)=
7950_LT_TAGVAR(always_export_symbols, $1)=no
7951_LT_TAGVAR(archive_expsym_cmds, $1)=
7952_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7953_LT_TAGVAR(hardcode_direct, $1)=no
7954_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7955_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7956_LT_TAGVAR(hardcode_libdir_separator, $1)=
7957_LT_TAGVAR(hardcode_minus_L, $1)=no
7958_LT_TAGVAR(hardcode_automatic, $1)=no
7959_LT_TAGVAR(inherit_rpath, $1)=no
7960_LT_TAGVAR(module_cmds, $1)=
7961_LT_TAGVAR(module_expsym_cmds, $1)=
7962_LT_TAGVAR(link_all_deplibs, $1)=unknown
7963_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7964_LT_TAGVAR(reload_flag, $1)=$reload_flag
7965_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7966_LT_TAGVAR(no_undefined_flag, $1)=
7967_LT_TAGVAR(whole_archive_flag_spec, $1)=
7968_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7969
7970# Source file extension for fc test sources.
7971ac_ext=${ac_fc_srcext-f}
7972
7973# Object file extension for compiled fc test sources.
7974objext=o
7975_LT_TAGVAR(objext, $1)=$objext
7976
7977# No sense in running all these tests if we already determined that
7978# the FC compiler isn't working.  Some variables (like enable_shared)
7979# are currently assumed to apply to all compilers on this platform,
7980# and will be corrupted by setting them based on a non-working compiler.
7981if test "$_lt_disable_FC" != yes; then
7982  # Code to be used in simple compile tests
7983  lt_simple_compile_test_code="\
7984      subroutine t
7985      return
7986      end
7987"
7988
7989  # Code to be used in simple link tests
7990  lt_simple_link_test_code="\
7991      program t
7992      end
7993"
7994
7995  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7996  _LT_TAG_COMPILER
7997
7998  # save warnings/boilerplate of simple test code
7999  _LT_COMPILER_BOILERPLATE
8000  _LT_LINKER_BOILERPLATE
8001
8002  # Allow CC to be a program name with arguments.
8003  lt_save_CC="$CC"
8004  lt_save_GCC=$GCC
8005  lt_save_CFLAGS=$CFLAGS
8006  CC=${FC-"f95"}
8007  CFLAGS=$FCFLAGS
8008  compiler=$CC
8009  GCC=$ac_cv_fc_compiler_gnu
8010
8011  _LT_TAGVAR(compiler, $1)=$CC
8012  _LT_CC_BASENAME([$compiler])
8013
8014  if test -n "$compiler"; then
8015    AC_MSG_CHECKING([if libtool supports shared libraries])
8016    AC_MSG_RESULT([$can_build_shared])
8017
8018    AC_MSG_CHECKING([whether to build shared libraries])
8019    test "$can_build_shared" = "no" && enable_shared=no
8020
8021    # On AIX, shared libraries and static libraries use the same namespace, and
8022    # are all built from PIC.
8023    case $host_os in
8024      aix3*)
8025        test "$enable_shared" = yes && enable_static=no
8026        if test -n "$RANLIB"; then
8027          archive_cmds="$archive_cmds~\$RANLIB \$lib"
8028          postinstall_cmds='$RANLIB $lib'
8029        fi
8030        ;;
8031      aix[[4-9]]*)
8032	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8033	  test "$enable_shared" = yes && enable_static=no
8034	fi
8035        ;;
8036    esac
8037    AC_MSG_RESULT([$enable_shared])
8038
8039    AC_MSG_CHECKING([whether to build static libraries])
8040    # Make sure either enable_shared or enable_static is yes.
8041    test "$enable_shared" = yes || enable_static=yes
8042    AC_MSG_RESULT([$enable_static])
8043
8044    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
8045    _LT_TAGVAR(LD, $1)="$LD"
8046
8047    ## CAVEAT EMPTOR:
8048    ## There is no encapsulation within the following macros, do not change
8049    ## the running order or otherwise move them around unless you know exactly
8050    ## what you are doing...
8051    _LT_SYS_HIDDEN_LIBDEPS($1)
8052    _LT_COMPILER_PIC($1)
8053    _LT_COMPILER_C_O($1)
8054    _LT_COMPILER_FILE_LOCKS($1)
8055    _LT_LINKER_SHLIBS($1)
8056    _LT_SYS_DYNAMIC_LINKER($1)
8057    _LT_LINKER_HARDCODE_LIBPATH($1)
8058
8059    _LT_CONFIG($1)
8060  fi # test -n "$compiler"
8061
8062  GCC=$lt_save_GCC
8063  CC=$lt_save_CC
8064  CFLAGS=$lt_save_CFLAGS
8065fi # test "$_lt_disable_FC" != yes
8066
8067AC_LANG_POP
8068])# _LT_LANG_FC_CONFIG
8069
8070
8071# _LT_LANG_GCJ_CONFIG([TAG])
8072# --------------------------
8073# Ensure that the configuration variables for the GNU Java Compiler compiler
8074# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8075# to write the compiler configuration to `libtool'.
8076m4_defun([_LT_LANG_GCJ_CONFIG],
8077[AC_REQUIRE([LT_PROG_GCJ])dnl
8078AC_LANG_SAVE
8079
8080# Source file extension for Java test sources.
8081ac_ext=java
8082
8083# Object file extension for compiled Java test sources.
8084objext=o
8085_LT_TAGVAR(objext, $1)=$objext
8086
8087# Code to be used in simple compile tests
8088lt_simple_compile_test_code="class foo {}"
8089
8090# Code to be used in simple link tests
8091lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
8092
8093# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8094_LT_TAG_COMPILER
8095
8096# save warnings/boilerplate of simple test code
8097_LT_COMPILER_BOILERPLATE
8098_LT_LINKER_BOILERPLATE
8099
8100# Allow CC to be a program name with arguments.
8101lt_save_CC=$CC
8102lt_save_CFLAGS=$CFLAGS
8103lt_save_GCC=$GCC
8104GCC=yes
8105CC=${GCJ-"gcj"}
8106CFLAGS=$GCJFLAGS
8107compiler=$CC
8108_LT_TAGVAR(compiler, $1)=$CC
8109_LT_TAGVAR(LD, $1)="$LD"
8110_LT_CC_BASENAME([$compiler])
8111
8112# GCJ did not exist at the time GCC didn't implicitly link libc in.
8113_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8114
8115_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8116_LT_TAGVAR(reload_flag, $1)=$reload_flag
8117_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8118
8119if test -n "$compiler"; then
8120  _LT_COMPILER_NO_RTTI($1)
8121  _LT_COMPILER_PIC($1)
8122  _LT_COMPILER_C_O($1)
8123  _LT_COMPILER_FILE_LOCKS($1)
8124  _LT_LINKER_SHLIBS($1)
8125  _LT_LINKER_HARDCODE_LIBPATH($1)
8126
8127  _LT_CONFIG($1)
8128fi
8129
8130AC_LANG_RESTORE
8131
8132GCC=$lt_save_GCC
8133CC=$lt_save_CC
8134CFLAGS=$lt_save_CFLAGS
8135])# _LT_LANG_GCJ_CONFIG
8136
8137
8138# _LT_LANG_GO_CONFIG([TAG])
8139# --------------------------
8140# Ensure that the configuration variables for the GNU Go compiler
8141# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8142# to write the compiler configuration to `libtool'.
8143m4_defun([_LT_LANG_GO_CONFIG],
8144[AC_REQUIRE([LT_PROG_GO])dnl
8145AC_LANG_SAVE
8146
8147# Source file extension for Go test sources.
8148ac_ext=go
8149
8150# Object file extension for compiled Go test sources.
8151objext=o
8152_LT_TAGVAR(objext, $1)=$objext
8153
8154# Code to be used in simple compile tests
8155lt_simple_compile_test_code="package main; func main() { }"
8156
8157# Code to be used in simple link tests
8158lt_simple_link_test_code='package main; func main() { }'
8159
8160# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8161_LT_TAG_COMPILER
8162
8163# save warnings/boilerplate of simple test code
8164_LT_COMPILER_BOILERPLATE
8165_LT_LINKER_BOILERPLATE
8166
8167# Allow CC to be a program name with arguments.
8168lt_save_CC=$CC
8169lt_save_CFLAGS=$CFLAGS
8170lt_save_GCC=$GCC
8171GCC=yes
8172CC=${GOC-"gccgo"}
8173CFLAGS=$GOFLAGS
8174compiler=$CC
8175_LT_TAGVAR(compiler, $1)=$CC
8176_LT_TAGVAR(LD, $1)="$LD"
8177_LT_CC_BASENAME([$compiler])
8178
8179# Go did not exist at the time GCC didn't implicitly link libc in.
8180_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8181
8182_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8183_LT_TAGVAR(reload_flag, $1)=$reload_flag
8184_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8185
8186if test -n "$compiler"; then
8187  _LT_COMPILER_NO_RTTI($1)
8188  _LT_COMPILER_PIC($1)
8189  _LT_COMPILER_C_O($1)
8190  _LT_COMPILER_FILE_LOCKS($1)
8191  _LT_LINKER_SHLIBS($1)
8192  _LT_LINKER_HARDCODE_LIBPATH($1)
8193
8194  _LT_CONFIG($1)
8195fi
8196
8197AC_LANG_RESTORE
8198
8199GCC=$lt_save_GCC
8200CC=$lt_save_CC
8201CFLAGS=$lt_save_CFLAGS
8202])# _LT_LANG_GO_CONFIG
8203
8204
8205# _LT_LANG_RC_CONFIG([TAG])
8206# -------------------------
8207# Ensure that the configuration variables for the Windows resource compiler
8208# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8209# to write the compiler configuration to `libtool'.
8210m4_defun([_LT_LANG_RC_CONFIG],
8211[AC_REQUIRE([LT_PROG_RC])dnl
8212AC_LANG_SAVE
8213
8214# Source file extension for RC test sources.
8215ac_ext=rc
8216
8217# Object file extension for compiled RC test sources.
8218objext=o
8219_LT_TAGVAR(objext, $1)=$objext
8220
8221# Code to be used in simple compile tests
8222lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8223
8224# Code to be used in simple link tests
8225lt_simple_link_test_code="$lt_simple_compile_test_code"
8226
8227# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8228_LT_TAG_COMPILER
8229
8230# save warnings/boilerplate of simple test code
8231_LT_COMPILER_BOILERPLATE
8232_LT_LINKER_BOILERPLATE
8233
8234# Allow CC to be a program name with arguments.
8235lt_save_CC="$CC"
8236lt_save_CFLAGS=$CFLAGS
8237lt_save_GCC=$GCC
8238GCC=
8239CC=${RC-"windres"}
8240CFLAGS=
8241compiler=$CC
8242_LT_TAGVAR(compiler, $1)=$CC
8243_LT_CC_BASENAME([$compiler])
8244_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8245
8246if test -n "$compiler"; then
8247  :
8248  _LT_CONFIG($1)
8249fi
8250
8251GCC=$lt_save_GCC
8252AC_LANG_RESTORE
8253CC=$lt_save_CC
8254CFLAGS=$lt_save_CFLAGS
8255])# _LT_LANG_RC_CONFIG
8256
8257
8258# LT_PROG_GCJ
8259# -----------
8260AC_DEFUN([LT_PROG_GCJ],
8261[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8262  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8263    [AC_CHECK_TOOL(GCJ, gcj,)
8264      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
8265      AC_SUBST(GCJFLAGS)])])[]dnl
8266])
8267
8268# Old name:
8269AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8270dnl aclocal-1.4 backwards compatibility:
8271dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8272
8273
8274# LT_PROG_GO
8275# ----------
8276AC_DEFUN([LT_PROG_GO],
8277[AC_CHECK_TOOL(GOC, gccgo,)
8278])
8279
8280
8281# LT_PROG_RC
8282# ----------
8283AC_DEFUN([LT_PROG_RC],
8284[AC_CHECK_TOOL(RC, windres,)
8285])
8286
8287# Old name:
8288AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8289dnl aclocal-1.4 backwards compatibility:
8290dnl AC_DEFUN([LT_AC_PROG_RC], [])
8291
8292
8293# _LT_DECL_EGREP
8294# --------------
8295# If we don't have a new enough Autoconf to choose the best grep
8296# available, choose the one first in the user's PATH.
8297m4_defun([_LT_DECL_EGREP],
8298[AC_REQUIRE([AC_PROG_EGREP])dnl
8299AC_REQUIRE([AC_PROG_FGREP])dnl
8300test -z "$GREP" && GREP=grep
8301_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8302_LT_DECL([], [EGREP], [1], [An ERE matcher])
8303_LT_DECL([], [FGREP], [1], [A literal string matcher])
8304dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8305AC_SUBST([GREP])
8306])
8307
8308
8309# _LT_DECL_OBJDUMP
8310# --------------
8311# If we don't have a new enough Autoconf to choose the best objdump
8312# available, choose the one first in the user's PATH.
8313m4_defun([_LT_DECL_OBJDUMP],
8314[AC_CHECK_TOOL(OBJDUMP, objdump, false)
8315test -z "$OBJDUMP" && OBJDUMP=objdump
8316_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8317AC_SUBST([OBJDUMP])
8318])
8319
8320# _LT_DECL_DLLTOOL
8321# ----------------
8322# Ensure DLLTOOL variable is set.
8323m4_defun([_LT_DECL_DLLTOOL],
8324[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8325test -z "$DLLTOOL" && DLLTOOL=dlltool
8326_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
8327AC_SUBST([DLLTOOL])
8328])
8329
8330# _LT_DECL_SED
8331# ------------
8332# Check for a fully-functional sed program, that truncates
8333# as few characters as possible.  Prefer GNU sed if found.
8334m4_defun([_LT_DECL_SED],
8335[AC_PROG_SED
8336test -z "$SED" && SED=sed
8337Xsed="$SED -e 1s/^X//"
8338_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8339_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8340    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8341])# _LT_DECL_SED
8342
8343m4_ifndef([AC_PROG_SED], [
8344# NOTE: This macro has been submitted for inclusion into   #
8345#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
8346#  a released version of Autoconf we should remove this    #
8347#  macro and use it instead.                               #
8348
8349m4_defun([AC_PROG_SED],
8350[AC_MSG_CHECKING([for a sed that does not truncate output])
8351AC_CACHE_VAL(lt_cv_path_SED,
8352[# Loop through the user's path and test for sed and gsed.
8353# Then use that list of sed's as ones to test for truncation.
8354as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8355for as_dir in $PATH
8356do
8357  IFS=$as_save_IFS
8358  test -z "$as_dir" && as_dir=.
8359  for lt_ac_prog in sed gsed; do
8360    for ac_exec_ext in '' $ac_executable_extensions; do
8361      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8362        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8363      fi
8364    done
8365  done
8366done
8367IFS=$as_save_IFS
8368lt_ac_max=0
8369lt_ac_count=0
8370# Add /usr/xpg4/bin/sed as it is typically found on Solaris
8371# along with /bin/sed that truncates output.
8372for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8373  test ! -f $lt_ac_sed && continue
8374  cat /dev/null > conftest.in
8375  lt_ac_count=0
8376  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8377  # Check for GNU sed and select it if it is found.
8378  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8379    lt_cv_path_SED=$lt_ac_sed
8380    break
8381  fi
8382  while true; do
8383    cat conftest.in conftest.in >conftest.tmp
8384    mv conftest.tmp conftest.in
8385    cp conftest.in conftest.nl
8386    echo >>conftest.nl
8387    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8388    cmp -s conftest.out conftest.nl || break
8389    # 10000 chars as input seems more than enough
8390    test $lt_ac_count -gt 10 && break
8391    lt_ac_count=`expr $lt_ac_count + 1`
8392    if test $lt_ac_count -gt $lt_ac_max; then
8393      lt_ac_max=$lt_ac_count
8394      lt_cv_path_SED=$lt_ac_sed
8395    fi
8396  done
8397done
8398])
8399SED=$lt_cv_path_SED
8400AC_SUBST([SED])
8401AC_MSG_RESULT([$SED])
8402])#AC_PROG_SED
8403])#m4_ifndef
8404
8405# Old name:
8406AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8407dnl aclocal-1.4 backwards compatibility:
8408dnl AC_DEFUN([LT_AC_PROG_SED], [])
8409
8410
8411# _LT_CHECK_SHELL_FEATURES
8412# ------------------------
8413# Find out whether the shell is Bourne or XSI compatible,
8414# or has some other useful features.
8415m4_defun([_LT_CHECK_SHELL_FEATURES],
8416[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
8417# Try some XSI features
8418xsi_shell=no
8419( _lt_dummy="a/b/c"
8420  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
8421      = c,a/b,b/c, \
8422    && eval 'test $(( 1 + 1 )) -eq 2 \
8423    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
8424  && xsi_shell=yes
8425AC_MSG_RESULT([$xsi_shell])
8426_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
8427
8428AC_MSG_CHECKING([whether the shell understands "+="])
8429lt_shell_append=no
8430( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
8431    >/dev/null 2>&1 \
8432  && lt_shell_append=yes
8433AC_MSG_RESULT([$lt_shell_append])
8434_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
8435
8436if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8437  lt_unset=unset
8438else
8439  lt_unset=false
8440fi
8441_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8442
8443# test EBCDIC or ASCII
8444case `echo X|tr X '\101'` in
8445 A) # ASCII based system
8446    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8447  lt_SP2NL='tr \040 \012'
8448  lt_NL2SP='tr \015\012 \040\040'
8449  ;;
8450 *) # EBCDIC based system
8451  lt_SP2NL='tr \100 \n'
8452  lt_NL2SP='tr \r\n \100\100'
8453  ;;
8454esac
8455_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8456_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8457])# _LT_CHECK_SHELL_FEATURES
8458
8459
8460# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
8461# ------------------------------------------------------
8462# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
8463# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
8464m4_defun([_LT_PROG_FUNCTION_REPLACE],
8465[dnl {
8466sed -e '/^$1 ()$/,/^} # $1 /c\
8467$1 ()\
8468{\
8469m4_bpatsubsts([$2], [$], [\\], [^\([	 ]\)], [\\\1])
8470} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
8471  && mv -f "$cfgfile.tmp" "$cfgfile" \
8472    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8473test 0 -eq $? || _lt_function_replace_fail=:
8474])
8475
8476
8477# _LT_PROG_REPLACE_SHELLFNS
8478# -------------------------
8479# Replace existing portable implementations of several shell functions with
8480# equivalent extended shell implementations where those features are available..
8481m4_defun([_LT_PROG_REPLACE_SHELLFNS],
8482[if test x"$xsi_shell" = xyes; then
8483  _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
8484    case ${1} in
8485      */*) func_dirname_result="${1%/*}${2}" ;;
8486      *  ) func_dirname_result="${3}" ;;
8487    esac])
8488
8489  _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
8490    func_basename_result="${1##*/}"])
8491
8492  _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
8493    case ${1} in
8494      */*) func_dirname_result="${1%/*}${2}" ;;
8495      *  ) func_dirname_result="${3}" ;;
8496    esac
8497    func_basename_result="${1##*/}"])
8498
8499  _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
8500    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
8501    # positional parameters, so assign one to ordinary parameter first.
8502    func_stripname_result=${3}
8503    func_stripname_result=${func_stripname_result#"${1}"}
8504    func_stripname_result=${func_stripname_result%"${2}"}])
8505
8506  _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
8507    func_split_long_opt_name=${1%%=*}
8508    func_split_long_opt_arg=${1#*=}])
8509
8510  _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
8511    func_split_short_opt_arg=${1#??}
8512    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
8513
8514  _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
8515    case ${1} in
8516      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
8517      *)    func_lo2o_result=${1} ;;
8518    esac])
8519
8520  _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
8521
8522  _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
8523
8524  _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
8525fi
8526
8527if test x"$lt_shell_append" = xyes; then
8528  _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
8529
8530  _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
8531    func_quote_for_eval "${2}"
8532dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
8533    eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
8534
8535  # Save a `func_append' function call where possible by direct use of '+='
8536  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
8537    && mv -f "$cfgfile.tmp" "$cfgfile" \
8538      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8539  test 0 -eq $? || _lt_function_replace_fail=:
8540else
8541  # Save a `func_append' function call even when '+=' is not available
8542  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
8543    && mv -f "$cfgfile.tmp" "$cfgfile" \
8544      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8545  test 0 -eq $? || _lt_function_replace_fail=:
8546fi
8547
8548if test x"$_lt_function_replace_fail" = x":"; then
8549  AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
8550fi
8551])
8552
8553# _LT_PATH_CONVERSION_FUNCTIONS
8554# -----------------------------
8555# Determine which file name conversion functions should be used by
8556# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
8557# for certain cross-compile configurations and native mingw.
8558m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
8559[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8560AC_REQUIRE([AC_CANONICAL_BUILD])dnl
8561AC_MSG_CHECKING([how to convert $build file names to $host format])
8562AC_CACHE_VAL(lt_cv_to_host_file_cmd,
8563[case $host in
8564  *-*-mingw* )
8565    case $build in
8566      *-*-mingw* ) # actually msys
8567        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8568        ;;
8569      *-*-cygwin* )
8570        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8571        ;;
8572      * ) # otherwise, assume *nix
8573        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8574        ;;
8575    esac
8576    ;;
8577  *-*-cygwin* )
8578    case $build in
8579      *-*-mingw* ) # actually msys
8580        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8581        ;;
8582      *-*-cygwin* )
8583        lt_cv_to_host_file_cmd=func_convert_file_noop
8584        ;;
8585      * ) # otherwise, assume *nix
8586        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8587        ;;
8588    esac
8589    ;;
8590  * ) # unhandled hosts (and "normal" native builds)
8591    lt_cv_to_host_file_cmd=func_convert_file_noop
8592    ;;
8593esac
8594])
8595to_host_file_cmd=$lt_cv_to_host_file_cmd
8596AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
8597_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
8598         [0], [convert $build file names to $host format])dnl
8599
8600AC_MSG_CHECKING([how to convert $build file names to toolchain format])
8601AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
8602[#assume ordinary cross tools, or native build.
8603lt_cv_to_tool_file_cmd=func_convert_file_noop
8604case $host in
8605  *-*-mingw* )
8606    case $build in
8607      *-*-mingw* ) # actually msys
8608        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8609        ;;
8610    esac
8611    ;;
8612esac
8613])
8614to_tool_file_cmd=$lt_cv_to_tool_file_cmd
8615AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
8616_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
8617         [0], [convert $build files to toolchain format])dnl
8618])# _LT_PATH_CONVERSION_FUNCTIONS
8619
8620# Helper functions for option handling.                    -*- Autoconf -*-
8621#
8622#   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
8623#   Inc.
8624#   Written by Gary V. Vaughan, 2004
8625#
8626# This file is free software; the Free Software Foundation gives
8627# unlimited permission to copy and/or distribute it, with or without
8628# modifications, as long as this notice is preserved.
8629
8630# serial 7 ltoptions.m4
8631
8632# This is to help aclocal find these macros, as it can't see m4_define.
8633AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
8634
8635
8636# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
8637# ------------------------------------------
8638m4_define([_LT_MANGLE_OPTION],
8639[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
8640
8641
8642# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
8643# ---------------------------------------
8644# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
8645# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
8646# saved as a flag.
8647m4_define([_LT_SET_OPTION],
8648[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
8649m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
8650        _LT_MANGLE_DEFUN([$1], [$2]),
8651    [m4_warning([Unknown $1 option `$2'])])[]dnl
8652])
8653
8654
8655# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
8656# ------------------------------------------------------------
8657# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8658m4_define([_LT_IF_OPTION],
8659[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
8660
8661
8662# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
8663# -------------------------------------------------------
8664# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
8665# are set.
8666m4_define([_LT_UNLESS_OPTIONS],
8667[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8668	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
8669		      [m4_define([$0_found])])])[]dnl
8670m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
8671])[]dnl
8672])
8673
8674
8675# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
8676# ----------------------------------------
8677# OPTION-LIST is a space-separated list of Libtool options associated
8678# with MACRO-NAME.  If any OPTION has a matching handler declared with
8679# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
8680# the unknown option and exit.
8681m4_defun([_LT_SET_OPTIONS],
8682[# Set options
8683m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8684    [_LT_SET_OPTION([$1], _LT_Option)])
8685
8686m4_if([$1],[LT_INIT],[
8687  dnl
8688  dnl Simply set some default values (i.e off) if boolean options were not
8689  dnl specified:
8690  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
8691  ])
8692  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
8693  ])
8694  dnl
8695  dnl If no reference was made to various pairs of opposing options, then
8696  dnl we run the default mode handler for the pair.  For example, if neither
8697  dnl `shared' nor `disable-shared' was passed, we enable building of shared
8698  dnl archives by default:
8699  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
8700  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
8701  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
8702  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
8703  		   [_LT_ENABLE_FAST_INSTALL])
8704  ])
8705])# _LT_SET_OPTIONS
8706
8707
8708
8709# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
8710# -----------------------------------------
8711m4_define([_LT_MANGLE_DEFUN],
8712[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
8713
8714
8715# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
8716# -----------------------------------------------
8717m4_define([LT_OPTION_DEFINE],
8718[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
8719])# LT_OPTION_DEFINE
8720
8721
8722# dlopen
8723# ------
8724LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
8725])
8726
8727AU_DEFUN([AC_LIBTOOL_DLOPEN],
8728[_LT_SET_OPTION([LT_INIT], [dlopen])
8729AC_DIAGNOSE([obsolete],
8730[$0: Remove this warning and the call to _LT_SET_OPTION when you
8731put the `dlopen' option into LT_INIT's first parameter.])
8732])
8733
8734dnl aclocal-1.4 backwards compatibility:
8735dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
8736
8737
8738# win32-dll
8739# ---------
8740# Declare package support for building win32 dll's.
8741LT_OPTION_DEFINE([LT_INIT], [win32-dll],
8742[enable_win32_dll=yes
8743
8744case $host in
8745*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
8746  AC_CHECK_TOOL(AS, as, false)
8747  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8748  AC_CHECK_TOOL(OBJDUMP, objdump, false)
8749  ;;
8750esac
8751
8752test -z "$AS" && AS=as
8753_LT_DECL([], [AS],      [1], [Assembler program])dnl
8754
8755test -z "$DLLTOOL" && DLLTOOL=dlltool
8756_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
8757
8758test -z "$OBJDUMP" && OBJDUMP=objdump
8759_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
8760])# win32-dll
8761
8762AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
8763[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8764_LT_SET_OPTION([LT_INIT], [win32-dll])
8765AC_DIAGNOSE([obsolete],
8766[$0: Remove this warning and the call to _LT_SET_OPTION when you
8767put the `win32-dll' option into LT_INIT's first parameter.])
8768])
8769
8770dnl aclocal-1.4 backwards compatibility:
8771dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
8772
8773
8774# _LT_ENABLE_SHARED([DEFAULT])
8775# ----------------------------
8776# implement the --enable-shared flag, and supports the `shared' and
8777# `disable-shared' LT_INIT options.
8778# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
8779m4_define([_LT_ENABLE_SHARED],
8780[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
8781AC_ARG_ENABLE([shared],
8782    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
8783	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
8784    [p=${PACKAGE-default}
8785    case $enableval in
8786    yes) enable_shared=yes ;;
8787    no) enable_shared=no ;;
8788    *)
8789      enable_shared=no
8790      # Look at the argument we got.  We use all the common list separators.
8791      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8792      for pkg in $enableval; do
8793	IFS="$lt_save_ifs"
8794	if test "X$pkg" = "X$p"; then
8795	  enable_shared=yes
8796	fi
8797      done
8798      IFS="$lt_save_ifs"
8799      ;;
8800    esac],
8801    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
8802
8803    _LT_DECL([build_libtool_libs], [enable_shared], [0],
8804	[Whether or not to build shared libraries])
8805])# _LT_ENABLE_SHARED
8806
8807LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
8808LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
8809
8810# Old names:
8811AC_DEFUN([AC_ENABLE_SHARED],
8812[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
8813])
8814
8815AC_DEFUN([AC_DISABLE_SHARED],
8816[_LT_SET_OPTION([LT_INIT], [disable-shared])
8817])
8818
8819AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
8820AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
8821
8822dnl aclocal-1.4 backwards compatibility:
8823dnl AC_DEFUN([AM_ENABLE_SHARED], [])
8824dnl AC_DEFUN([AM_DISABLE_SHARED], [])
8825
8826
8827
8828# _LT_ENABLE_STATIC([DEFAULT])
8829# ----------------------------
8830# implement the --enable-static flag, and support the `static' and
8831# `disable-static' LT_INIT options.
8832# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
8833m4_define([_LT_ENABLE_STATIC],
8834[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
8835AC_ARG_ENABLE([static],
8836    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
8837	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
8838    [p=${PACKAGE-default}
8839    case $enableval in
8840    yes) enable_static=yes ;;
8841    no) enable_static=no ;;
8842    *)
8843     enable_static=no
8844      # Look at the argument we got.  We use all the common list separators.
8845      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8846      for pkg in $enableval; do
8847	IFS="$lt_save_ifs"
8848	if test "X$pkg" = "X$p"; then
8849	  enable_static=yes
8850	fi
8851      done
8852      IFS="$lt_save_ifs"
8853      ;;
8854    esac],
8855    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
8856
8857    _LT_DECL([build_old_libs], [enable_static], [0],
8858	[Whether or not to build static libraries])
8859])# _LT_ENABLE_STATIC
8860
8861LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
8862LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
8863
8864# Old names:
8865AC_DEFUN([AC_ENABLE_STATIC],
8866[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
8867])
8868
8869AC_DEFUN([AC_DISABLE_STATIC],
8870[_LT_SET_OPTION([LT_INIT], [disable-static])
8871])
8872
8873AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
8874AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
8875
8876dnl aclocal-1.4 backwards compatibility:
8877dnl AC_DEFUN([AM_ENABLE_STATIC], [])
8878dnl AC_DEFUN([AM_DISABLE_STATIC], [])
8879
8880
8881
8882# _LT_ENABLE_FAST_INSTALL([DEFAULT])
8883# ----------------------------------
8884# implement the --enable-fast-install flag, and support the `fast-install'
8885# and `disable-fast-install' LT_INIT options.
8886# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
8887m4_define([_LT_ENABLE_FAST_INSTALL],
8888[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
8889AC_ARG_ENABLE([fast-install],
8890    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
8891    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
8892    [p=${PACKAGE-default}
8893    case $enableval in
8894    yes) enable_fast_install=yes ;;
8895    no) enable_fast_install=no ;;
8896    *)
8897      enable_fast_install=no
8898      # Look at the argument we got.  We use all the common list separators.
8899      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8900      for pkg in $enableval; do
8901	IFS="$lt_save_ifs"
8902	if test "X$pkg" = "X$p"; then
8903	  enable_fast_install=yes
8904	fi
8905      done
8906      IFS="$lt_save_ifs"
8907      ;;
8908    esac],
8909    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
8910
8911_LT_DECL([fast_install], [enable_fast_install], [0],
8912	 [Whether or not to optimize for fast installation])dnl
8913])# _LT_ENABLE_FAST_INSTALL
8914
8915LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
8916LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
8917
8918# Old names:
8919AU_DEFUN([AC_ENABLE_FAST_INSTALL],
8920[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
8921AC_DIAGNOSE([obsolete],
8922[$0: Remove this warning and the call to _LT_SET_OPTION when you put
8923the `fast-install' option into LT_INIT's first parameter.])
8924])
8925
8926AU_DEFUN([AC_DISABLE_FAST_INSTALL],
8927[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
8928AC_DIAGNOSE([obsolete],
8929[$0: Remove this warning and the call to _LT_SET_OPTION when you put
8930the `disable-fast-install' option into LT_INIT's first parameter.])
8931])
8932
8933dnl aclocal-1.4 backwards compatibility:
8934dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
8935dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
8936
8937
8938# _LT_WITH_PIC([MODE])
8939# --------------------
8940# implement the --with-pic flag, and support the `pic-only' and `no-pic'
8941# LT_INIT options.
8942# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
8943m4_define([_LT_WITH_PIC],
8944[AC_ARG_WITH([pic],
8945    [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
8946	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
8947    [lt_p=${PACKAGE-default}
8948    case $withval in
8949    yes|no) pic_mode=$withval ;;
8950    *)
8951      pic_mode=default
8952      # Look at the argument we got.  We use all the common list separators.
8953      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8954      for lt_pkg in $withval; do
8955	IFS="$lt_save_ifs"
8956	if test "X$lt_pkg" = "X$lt_p"; then
8957	  pic_mode=yes
8958	fi
8959      done
8960      IFS="$lt_save_ifs"
8961      ;;
8962    esac],
8963    [pic_mode=default])
8964
8965test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
8966
8967_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
8968])# _LT_WITH_PIC
8969
8970LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
8971LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
8972
8973# Old name:
8974AU_DEFUN([AC_LIBTOOL_PICMODE],
8975[_LT_SET_OPTION([LT_INIT], [pic-only])
8976AC_DIAGNOSE([obsolete],
8977[$0: Remove this warning and the call to _LT_SET_OPTION when you
8978put the `pic-only' option into LT_INIT's first parameter.])
8979])
8980
8981dnl aclocal-1.4 backwards compatibility:
8982dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
8983
8984
8985m4_define([_LTDL_MODE], [])
8986LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
8987		 [m4_define([_LTDL_MODE], [nonrecursive])])
8988LT_OPTION_DEFINE([LTDL_INIT], [recursive],
8989		 [m4_define([_LTDL_MODE], [recursive])])
8990LT_OPTION_DEFINE([LTDL_INIT], [subproject],
8991		 [m4_define([_LTDL_MODE], [subproject])])
8992
8993m4_define([_LTDL_TYPE], [])
8994LT_OPTION_DEFINE([LTDL_INIT], [installable],
8995		 [m4_define([_LTDL_TYPE], [installable])])
8996LT_OPTION_DEFINE([LTDL_INIT], [convenience],
8997		 [m4_define([_LTDL_TYPE], [convenience])])
8998
8999# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
9000#
9001# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9002# Written by Gary V. Vaughan, 2004
9003#
9004# This file is free software; the Free Software Foundation gives
9005# unlimited permission to copy and/or distribute it, with or without
9006# modifications, as long as this notice is preserved.
9007
9008# serial 6 ltsugar.m4
9009
9010# This is to help aclocal find these macros, as it can't see m4_define.
9011AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
9012
9013
9014# lt_join(SEP, ARG1, [ARG2...])
9015# -----------------------------
9016# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
9017# associated separator.
9018# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
9019# versions in m4sugar had bugs.
9020m4_define([lt_join],
9021[m4_if([$#], [1], [],
9022       [$#], [2], [[$2]],
9023       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
9024m4_define([_lt_join],
9025[m4_if([$#$2], [2], [],
9026       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
9027
9028
9029# lt_car(LIST)
9030# lt_cdr(LIST)
9031# ------------
9032# Manipulate m4 lists.
9033# These macros are necessary as long as will still need to support
9034# Autoconf-2.59 which quotes differently.
9035m4_define([lt_car], [[$1]])
9036m4_define([lt_cdr],
9037[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
9038       [$#], 1, [],
9039       [m4_dquote(m4_shift($@))])])
9040m4_define([lt_unquote], $1)
9041
9042
9043# lt_append(MACRO-NAME, STRING, [SEPARATOR])
9044# ------------------------------------------
9045# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
9046# Note that neither SEPARATOR nor STRING are expanded; they are appended
9047# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
9048# No SEPARATOR is output if MACRO-NAME was previously undefined (different
9049# than defined and empty).
9050#
9051# This macro is needed until we can rely on Autoconf 2.62, since earlier
9052# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
9053m4_define([lt_append],
9054[m4_define([$1],
9055	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9056
9057
9058
9059# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
9060# ----------------------------------------------------------
9061# Produce a SEP delimited list of all paired combinations of elements of
9062# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
9063# has the form PREFIXmINFIXSUFFIXn.
9064# Needed until we can rely on m4_combine added in Autoconf 2.62.
9065m4_define([lt_combine],
9066[m4_if(m4_eval([$# > 3]), [1],
9067       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
9068[[m4_foreach([_Lt_prefix], [$2],
9069	     [m4_foreach([_Lt_suffix],
9070		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
9071	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
9072
9073
9074# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
9075# -----------------------------------------------------------------------
9076# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
9077# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
9078m4_define([lt_if_append_uniq],
9079[m4_ifdef([$1],
9080	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
9081		 [lt_append([$1], [$2], [$3])$4],
9082		 [$5])],
9083	  [lt_append([$1], [$2], [$3])$4])])
9084
9085
9086# lt_dict_add(DICT, KEY, VALUE)
9087# -----------------------------
9088m4_define([lt_dict_add],
9089[m4_define([$1($2)], [$3])])
9090
9091
9092# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
9093# --------------------------------------------
9094m4_define([lt_dict_add_subkey],
9095[m4_define([$1($2:$3)], [$4])])
9096
9097
9098# lt_dict_fetch(DICT, KEY, [SUBKEY])
9099# ----------------------------------
9100m4_define([lt_dict_fetch],
9101[m4_ifval([$3],
9102	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
9103    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9104
9105
9106# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
9107# -----------------------------------------------------------------
9108m4_define([lt_if_dict_fetch],
9109[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
9110	[$5],
9111    [$6])])
9112
9113
9114# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
9115# --------------------------------------------------------------
9116m4_define([lt_dict_filter],
9117[m4_if([$5], [], [],
9118  [lt_join(m4_quote(m4_default([$4], [[, ]])),
9119           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
9120		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
9121])
9122
9123# ltversion.m4 -- version numbers			-*- Autoconf -*-
9124#
9125#   Copyright (C) 2004 Free Software Foundation, Inc.
9126#   Written by Scott James Remnant, 2004
9127#
9128# This file is free software; the Free Software Foundation gives
9129# unlimited permission to copy and/or distribute it, with or without
9130# modifications, as long as this notice is preserved.
9131
9132# @configure_input@
9133
9134# serial 3337 ltversion.m4
9135# This file is part of GNU Libtool
9136
9137m4_define([LT_PACKAGE_VERSION], [2.4.2])
9138m4_define([LT_PACKAGE_REVISION], [1.3337])
9139
9140AC_DEFUN([LTVERSION_VERSION],
9141[macro_version='2.4.2'
9142macro_revision='1.3337'
9143_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
9144_LT_DECL(, macro_revision, 0)
9145])
9146
9147# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
9148#
9149#   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
9150#   Written by Scott James Remnant, 2004.
9151#
9152# This file is free software; the Free Software Foundation gives
9153# unlimited permission to copy and/or distribute it, with or without
9154# modifications, as long as this notice is preserved.
9155
9156# serial 5 lt~obsolete.m4
9157
9158# These exist entirely to fool aclocal when bootstrapping libtool.
9159#
9160# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
9161# which have later been changed to m4_define as they aren't part of the
9162# exported API, or moved to Autoconf or Automake where they belong.
9163#
9164# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
9165# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
9166# using a macro with the same name in our local m4/libtool.m4 it'll
9167# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
9168# and doesn't know about Autoconf macros at all.)
9169#
9170# So we provide this file, which has a silly filename so it's always
9171# included after everything else.  This provides aclocal with the
9172# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
9173# because those macros already exist, or will be overwritten later.
9174# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
9175#
9176# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
9177# Yes, that means every name once taken will need to remain here until
9178# we give up compatibility with versions before 1.7, at which point
9179# we need to keep only those names which we still refer to.
9180
9181# This is to help aclocal find these macros, as it can't see m4_define.
9182AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9183
9184m4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9185m4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
9186m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9187m4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
9188m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9189m4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
9190m4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
9191m4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9192m4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
9193m4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
9194m4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
9195m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9196m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9197m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9198m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9199m4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9200m4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
9201m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9202m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9203m4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
9204m4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
9205m4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9206m4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9207m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9208m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9209m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9210m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9211m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9212m4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
9213m4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
9214m4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
9215m4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9216m4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9217m4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
9218m4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
9219m4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9220m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9221m4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
9222m4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9223m4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
9224m4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
9225m4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
9226m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9227m4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9228m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9229m4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9230m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9231m4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9232m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9233m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9234m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9235m4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9236m4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
9237m4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9238m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],	[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
9239m4_ifndef([_LT_AC_PROG_CXXCPP],		[AC_DEFUN([_LT_AC_PROG_CXXCPP])])
9240m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],	[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
9241m4_ifndef([_LT_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
9242m4_ifndef([_LT_PROG_F77],		[AC_DEFUN([_LT_PROG_F77])])
9243m4_ifndef([_LT_PROG_FC],		[AC_DEFUN([_LT_PROG_FC])])
9244m4_ifndef([_LT_PROG_CXX],		[AC_DEFUN([_LT_PROG_CXX])])
9245
9246# nls.m4 serial 5 (gettext-0.18)
9247dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014 Free Software Foundation,
9248dnl Inc.
9249dnl This file is free software; the Free Software Foundation
9250dnl gives unlimited permission to copy and/or distribute it,
9251dnl with or without modifications, as long as this notice is preserved.
9252dnl
9253dnl This file can can be used in projects which are not available under
9254dnl the GNU General Public License or the GNU Library General Public
9255dnl License but which still want to provide support for the GNU gettext
9256dnl functionality.
9257dnl Please note that the actual code of the GNU gettext library is covered
9258dnl by the GNU Library General Public License, and the rest of the GNU
9259dnl gettext package package is covered by the GNU General Public License.
9260dnl They are *not* in the public domain.
9261
9262dnl Authors:
9263dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
9264dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
9265
9266AC_PREREQ([2.50])
9267
9268AC_DEFUN([AM_NLS],
9269[
9270  AC_MSG_CHECKING([whether NLS is requested])
9271  dnl Default is enabled NLS
9272  AC_ARG_ENABLE([nls],
9273    [  --disable-nls           do not use Native Language Support],
9274    USE_NLS=$enableval, USE_NLS=yes)
9275  AC_MSG_RESULT([$USE_NLS])
9276  AC_SUBST([USE_NLS])
9277])
9278
9279# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
9280# serial 1 (pkg-config-0.24)
9281#
9282# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
9283#
9284# This program is free software; you can redistribute it and/or modify
9285# it under the terms of the GNU General Public License as published by
9286# the Free Software Foundation; either version 2 of the License, or
9287# (at your option) any later version.
9288#
9289# This program is distributed in the hope that it will be useful, but
9290# WITHOUT ANY WARRANTY; without even the implied warranty of
9291# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
9292# General Public License for more details.
9293#
9294# You should have received a copy of the GNU General Public License
9295# along with this program; if not, write to the Free Software
9296# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9297#
9298# As a special exception to the GNU General Public License, if you
9299# distribute this file as part of a program that contains a
9300# configuration script generated by Autoconf, you may include it under
9301# the same distribution terms that you use for the rest of that program.
9302
9303# PKG_PROG_PKG_CONFIG([MIN-VERSION])
9304# ----------------------------------
9305AC_DEFUN([PKG_PROG_PKG_CONFIG],
9306[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
9307m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
9308m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
9309AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
9310AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
9311AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
9312
9313if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9314	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
9315fi
9316if test -n "$PKG_CONFIG"; then
9317	_pkg_min_version=m4_default([$1], [0.9.0])
9318	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
9319	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9320		AC_MSG_RESULT([yes])
9321	else
9322		AC_MSG_RESULT([no])
9323		PKG_CONFIG=""
9324	fi
9325fi[]dnl
9326])# PKG_PROG_PKG_CONFIG
9327
9328# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
9329#
9330# Check to see whether a particular set of modules exists.  Similar
9331# to PKG_CHECK_MODULES(), but does not set variables or print errors.
9332#
9333# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9334# only at the first occurence in configure.ac, so if the first place
9335# it's called might be skipped (such as if it is within an "if", you
9336# have to call PKG_CHECK_EXISTS manually
9337# --------------------------------------------------------------
9338AC_DEFUN([PKG_CHECK_EXISTS],
9339[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9340if test -n "$PKG_CONFIG" && \
9341    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
9342  m4_default([$2], [:])
9343m4_ifvaln([$3], [else
9344  $3])dnl
9345fi])
9346
9347# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
9348# ---------------------------------------------
9349m4_define([_PKG_CONFIG],
9350[if test -n "$$1"; then
9351    pkg_cv_[]$1="$$1"
9352 elif test -n "$PKG_CONFIG"; then
9353    PKG_CHECK_EXISTS([$3],
9354                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
9355		      test "x$?" != "x0" && pkg_failed=yes ],
9356		     [pkg_failed=yes])
9357 else
9358    pkg_failed=untried
9359fi[]dnl
9360])# _PKG_CONFIG
9361
9362# _PKG_SHORT_ERRORS_SUPPORTED
9363# -----------------------------
9364AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
9365[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9366if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9367        _pkg_short_errors_supported=yes
9368else
9369        _pkg_short_errors_supported=no
9370fi[]dnl
9371])# _PKG_SHORT_ERRORS_SUPPORTED
9372
9373
9374# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
9375# [ACTION-IF-NOT-FOUND])
9376#
9377#
9378# Note that if there is a possibility the first call to
9379# PKG_CHECK_MODULES might not happen, you should be sure to include an
9380# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
9381#
9382#
9383# --------------------------------------------------------------
9384AC_DEFUN([PKG_CHECK_MODULES],
9385[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9386AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
9387AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
9388
9389pkg_failed=no
9390AC_MSG_CHECKING([for $1])
9391
9392_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
9393_PKG_CONFIG([$1][_LIBS], [libs], [$2])
9394
9395m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
9396and $1[]_LIBS to avoid the need to call pkg-config.
9397See the pkg-config man page for more details.])
9398
9399if test $pkg_failed = yes; then
9400   	AC_MSG_RESULT([no])
9401        _PKG_SHORT_ERRORS_SUPPORTED
9402        if test $_pkg_short_errors_supported = yes; then
9403	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
9404        else
9405	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
9406        fi
9407	# Put the nasty error message in config.log where it belongs
9408	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
9409
9410	m4_default([$4], [AC_MSG_ERROR(
9411[Package requirements ($2) were not met:
9412
9413$$1_PKG_ERRORS
9414
9415Consider adjusting the PKG_CONFIG_PATH environment variable if you
9416installed software in a non-standard prefix.
9417
9418_PKG_TEXT])[]dnl
9419        ])
9420elif test $pkg_failed = untried; then
9421     	AC_MSG_RESULT([no])
9422	m4_default([$4], [AC_MSG_FAILURE(
9423[The pkg-config script could not be found or is too old.  Make sure it
9424is in your PATH or set the PKG_CONFIG environment variable to the full
9425path to pkg-config.
9426
9427_PKG_TEXT
9428
9429To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
9430        ])
9431else
9432	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
9433	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
9434        AC_MSG_RESULT([yes])
9435	$3
9436fi[]dnl
9437])# PKG_CHECK_MODULES
9438
9439
9440# PKG_INSTALLDIR(DIRECTORY)
9441# -------------------------
9442# Substitutes the variable pkgconfigdir as the location where a module
9443# should install pkg-config .pc files. By default the directory is
9444# $libdir/pkgconfig, but the default can be changed by passing
9445# DIRECTORY. The user can override through the --with-pkgconfigdir
9446# parameter.
9447AC_DEFUN([PKG_INSTALLDIR],
9448[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
9449m4_pushdef([pkg_description],
9450    [pkg-config installation directory @<:@]pkg_default[@:>@])
9451AC_ARG_WITH([pkgconfigdir],
9452    [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
9453    [with_pkgconfigdir=]pkg_default)
9454AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
9455m4_popdef([pkg_default])
9456m4_popdef([pkg_description])
9457]) dnl PKG_INSTALLDIR
9458
9459
9460# PKG_NOARCH_INSTALLDIR(DIRECTORY)
9461# -------------------------
9462# Substitutes the variable noarch_pkgconfigdir as the location where a
9463# module should install arch-independent pkg-config .pc files. By
9464# default the directory is $datadir/pkgconfig, but the default can be
9465# changed by passing DIRECTORY. The user can override through the
9466# --with-noarch-pkgconfigdir parameter.
9467AC_DEFUN([PKG_NOARCH_INSTALLDIR],
9468[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
9469m4_pushdef([pkg_description],
9470    [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
9471AC_ARG_WITH([noarch-pkgconfigdir],
9472    [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
9473    [with_noarch_pkgconfigdir=]pkg_default)
9474AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
9475m4_popdef([pkg_default])
9476m4_popdef([pkg_description])
9477]) dnl PKG_NOARCH_INSTALLDIR
9478
9479
9480# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
9481# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
9482# -------------------------------------------
9483# Retrieves the value of the pkg-config variable for the given module.
9484AC_DEFUN([PKG_CHECK_VAR],
9485[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9486AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
9487
9488_PKG_CONFIG([$1], [variable="][$3]["], [$2])
9489AS_VAR_COPY([$1], [pkg_cv_][$1])
9490
9491AS_VAR_IF([$1], [""], [$5], [$4])dnl
9492])# PKG_CHECK_VAR
9493
9494# Copyright (C) 2002-2014 Free Software Foundation, Inc.
9495#
9496# This file is free software; the Free Software Foundation
9497# gives unlimited permission to copy and/or distribute it,
9498# with or without modifications, as long as this notice is preserved.
9499
9500# AM_AUTOMAKE_VERSION(VERSION)
9501# ----------------------------
9502# Automake X.Y traces this macro to ensure aclocal.m4 has been
9503# generated from the m4 files accompanying Automake X.Y.
9504# (This private macro should not be called outside this file.)
9505AC_DEFUN([AM_AUTOMAKE_VERSION],
9506[am__api_version='1.15'
9507dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
9508dnl require some minimum version.  Point them to the right macro.
9509m4_if([$1], [1.15], [],
9510      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
9511])
9512
9513# _AM_AUTOCONF_VERSION(VERSION)
9514# -----------------------------
9515# aclocal traces this macro to find the Autoconf version.
9516# This is a private macro too.  Using m4_define simplifies
9517# the logic in aclocal, which can simply ignore this definition.
9518m4_define([_AM_AUTOCONF_VERSION], [])
9519
9520# AM_SET_CURRENT_AUTOMAKE_VERSION
9521# -------------------------------
9522# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
9523# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
9524AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
9525[AM_AUTOMAKE_VERSION([1.15])dnl
9526m4_ifndef([AC_AUTOCONF_VERSION],
9527  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
9528_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
9529
9530# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
9531
9532# Copyright (C) 2001-2014 Free Software Foundation, Inc.
9533#
9534# This file is free software; the Free Software Foundation
9535# gives unlimited permission to copy and/or distribute it,
9536# with or without modifications, as long as this notice is preserved.
9537
9538# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
9539# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
9540# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
9541#
9542# Of course, Automake must honor this variable whenever it calls a
9543# tool from the auxiliary directory.  The problem is that $srcdir (and
9544# therefore $ac_aux_dir as well) can be either absolute or relative,
9545# depending on how configure is run.  This is pretty annoying, since
9546# it makes $ac_aux_dir quite unusable in subdirectories: in the top
9547# source directory, any form will work fine, but in subdirectories a
9548# relative path needs to be adjusted first.
9549#
9550# $ac_aux_dir/missing
9551#    fails when called from a subdirectory if $ac_aux_dir is relative
9552# $top_srcdir/$ac_aux_dir/missing
9553#    fails if $ac_aux_dir is absolute,
9554#    fails when called from a subdirectory in a VPATH build with
9555#          a relative $ac_aux_dir
9556#
9557# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
9558# are both prefixed by $srcdir.  In an in-source build this is usually
9559# harmless because $srcdir is '.', but things will broke when you
9560# start a VPATH build or use an absolute $srcdir.
9561#
9562# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
9563# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
9564#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
9565# and then we would define $MISSING as
9566#   MISSING="\${SHELL} $am_aux_dir/missing"
9567# This will work as long as MISSING is not called from configure, because
9568# unfortunately $(top_srcdir) has no meaning in configure.
9569# However there are other variables, like CC, which are often used in
9570# configure, and could therefore not use this "fixed" $ac_aux_dir.
9571#
9572# Another solution, used here, is to always expand $ac_aux_dir to an
9573# absolute PATH.  The drawback is that using absolute paths prevent a
9574# configured tree to be moved without reconfiguration.
9575
9576AC_DEFUN([AM_AUX_DIR_EXPAND],
9577[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
9578# Expand $ac_aux_dir to an absolute path.
9579am_aux_dir=`cd "$ac_aux_dir" && pwd`
9580])
9581
9582# AM_CONDITIONAL                                            -*- Autoconf -*-
9583
9584# Copyright (C) 1997-2014 Free Software Foundation, Inc.
9585#
9586# This file is free software; the Free Software Foundation
9587# gives unlimited permission to copy and/or distribute it,
9588# with or without modifications, as long as this notice is preserved.
9589
9590# AM_CONDITIONAL(NAME, SHELL-CONDITION)
9591# -------------------------------------
9592# Define a conditional.
9593AC_DEFUN([AM_CONDITIONAL],
9594[AC_PREREQ([2.52])dnl
9595 m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
9596       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
9597AC_SUBST([$1_TRUE])dnl
9598AC_SUBST([$1_FALSE])dnl
9599_AM_SUBST_NOTMAKE([$1_TRUE])dnl
9600_AM_SUBST_NOTMAKE([$1_FALSE])dnl
9601m4_define([_AM_COND_VALUE_$1], [$2])dnl
9602if $2; then
9603  $1_TRUE=
9604  $1_FALSE='#'
9605else
9606  $1_TRUE='#'
9607  $1_FALSE=
9608fi
9609AC_CONFIG_COMMANDS_PRE(
9610[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
9611  AC_MSG_ERROR([[conditional "$1" was never defined.
9612Usually this means the macro was only invoked conditionally.]])
9613fi])])
9614
9615# Copyright (C) 1999-2014 Free Software Foundation, Inc.
9616#
9617# This file is free software; the Free Software Foundation
9618# gives unlimited permission to copy and/or distribute it,
9619# with or without modifications, as long as this notice is preserved.
9620
9621
9622# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
9623# written in clear, in which case automake, when reading aclocal.m4,
9624# will think it sees a *use*, and therefore will trigger all it's
9625# C support machinery.  Also note that it means that autoscan, seeing
9626# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
9627
9628
9629# _AM_DEPENDENCIES(NAME)
9630# ----------------------
9631# See how the compiler implements dependency checking.
9632# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
9633# We try a few techniques and use that to set a single cache variable.
9634#
9635# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
9636# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
9637# dependency, and given that the user is not expected to run this macro,
9638# just rely on AC_PROG_CC.
9639AC_DEFUN([_AM_DEPENDENCIES],
9640[AC_REQUIRE([AM_SET_DEPDIR])dnl
9641AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
9642AC_REQUIRE([AM_MAKE_INCLUDE])dnl
9643AC_REQUIRE([AM_DEP_TRACK])dnl
9644
9645m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
9646      [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
9647      [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
9648      [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
9649      [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
9650      [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
9651                    [depcc="$$1"   am_compiler_list=])
9652
9653AC_CACHE_CHECK([dependency style of $depcc],
9654               [am_cv_$1_dependencies_compiler_type],
9655[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
9656  # We make a subdir and do the tests there.  Otherwise we can end up
9657  # making bogus files that we don't know about and never remove.  For
9658  # instance it was reported that on HP-UX the gcc test will end up
9659  # making a dummy file named 'D' -- because '-MD' means "put the output
9660  # in D".
9661  rm -rf conftest.dir
9662  mkdir conftest.dir
9663  # Copy depcomp to subdir because otherwise we won't find it if we're
9664  # using a relative directory.
9665  cp "$am_depcomp" conftest.dir
9666  cd conftest.dir
9667  # We will build objects and dependencies in a subdirectory because
9668  # it helps to detect inapplicable dependency modes.  For instance
9669  # both Tru64's cc and ICC support -MD to output dependencies as a
9670  # side effect of compilation, but ICC will put the dependencies in
9671  # the current directory while Tru64 will put them in the object
9672  # directory.
9673  mkdir sub
9674
9675  am_cv_$1_dependencies_compiler_type=none
9676  if test "$am_compiler_list" = ""; then
9677     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
9678  fi
9679  am__universal=false
9680  m4_case([$1], [CC],
9681    [case " $depcc " in #(
9682     *\ -arch\ *\ -arch\ *) am__universal=true ;;
9683     esac],
9684    [CXX],
9685    [case " $depcc " in #(
9686     *\ -arch\ *\ -arch\ *) am__universal=true ;;
9687     esac])
9688
9689  for depmode in $am_compiler_list; do
9690    # Setup a source with many dependencies, because some compilers
9691    # like to wrap large dependency lists on column 80 (with \), and
9692    # we should not choose a depcomp mode which is confused by this.
9693    #
9694    # We need to recreate these files for each test, as the compiler may
9695    # overwrite some of them when testing with obscure command lines.
9696    # This happens at least with the AIX C compiler.
9697    : > sub/conftest.c
9698    for i in 1 2 3 4 5 6; do
9699      echo '#include "conftst'$i'.h"' >> sub/conftest.c
9700      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
9701      # Solaris 10 /bin/sh.
9702      echo '/* dummy */' > sub/conftst$i.h
9703    done
9704    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
9705
9706    # We check with '-c' and '-o' for the sake of the "dashmstdout"
9707    # mode.  It turns out that the SunPro C++ compiler does not properly
9708    # handle '-M -o', and we need to detect this.  Also, some Intel
9709    # versions had trouble with output in subdirs.
9710    am__obj=sub/conftest.${OBJEXT-o}
9711    am__minus_obj="-o $am__obj"
9712    case $depmode in
9713    gcc)
9714      # This depmode causes a compiler race in universal mode.
9715      test "$am__universal" = false || continue
9716      ;;
9717    nosideeffect)
9718      # After this tag, mechanisms are not by side-effect, so they'll
9719      # only be used when explicitly requested.
9720      if test "x$enable_dependency_tracking" = xyes; then
9721	continue
9722      else
9723	break
9724      fi
9725      ;;
9726    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
9727      # This compiler won't grok '-c -o', but also, the minuso test has
9728      # not run yet.  These depmodes are late enough in the game, and
9729      # so weak that their functioning should not be impacted.
9730      am__obj=conftest.${OBJEXT-o}
9731      am__minus_obj=
9732      ;;
9733    none) break ;;
9734    esac
9735    if depmode=$depmode \
9736       source=sub/conftest.c object=$am__obj \
9737       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
9738       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
9739         >/dev/null 2>conftest.err &&
9740       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
9741       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
9742       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
9743       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
9744      # icc doesn't choke on unknown options, it will just issue warnings
9745      # or remarks (even with -Werror).  So we grep stderr for any message
9746      # that says an option was ignored or not supported.
9747      # When given -MP, icc 7.0 and 7.1 complain thusly:
9748      #   icc: Command line warning: ignoring option '-M'; no argument required
9749      # The diagnosis changed in icc 8.0:
9750      #   icc: Command line remark: option '-MP' not supported
9751      if (grep 'ignoring option' conftest.err ||
9752          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
9753        am_cv_$1_dependencies_compiler_type=$depmode
9754        break
9755      fi
9756    fi
9757  done
9758
9759  cd ..
9760  rm -rf conftest.dir
9761else
9762  am_cv_$1_dependencies_compiler_type=none
9763fi
9764])
9765AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
9766AM_CONDITIONAL([am__fastdep$1], [
9767  test "x$enable_dependency_tracking" != xno \
9768  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
9769])
9770
9771
9772# AM_SET_DEPDIR
9773# -------------
9774# Choose a directory name for dependency files.
9775# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
9776AC_DEFUN([AM_SET_DEPDIR],
9777[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9778AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
9779])
9780
9781
9782# AM_DEP_TRACK
9783# ------------
9784AC_DEFUN([AM_DEP_TRACK],
9785[AC_ARG_ENABLE([dependency-tracking], [dnl
9786AS_HELP_STRING(
9787  [--enable-dependency-tracking],
9788  [do not reject slow dependency extractors])
9789AS_HELP_STRING(
9790  [--disable-dependency-tracking],
9791  [speeds up one-time build])])
9792if test "x$enable_dependency_tracking" != xno; then
9793  am_depcomp="$ac_aux_dir/depcomp"
9794  AMDEPBACKSLASH='\'
9795  am__nodep='_no'
9796fi
9797AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
9798AC_SUBST([AMDEPBACKSLASH])dnl
9799_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
9800AC_SUBST([am__nodep])dnl
9801_AM_SUBST_NOTMAKE([am__nodep])dnl
9802])
9803
9804# Generate code to set up dependency tracking.              -*- Autoconf -*-
9805
9806# Copyright (C) 1999-2014 Free Software Foundation, Inc.
9807#
9808# This file is free software; the Free Software Foundation
9809# gives unlimited permission to copy and/or distribute it,
9810# with or without modifications, as long as this notice is preserved.
9811
9812
9813# _AM_OUTPUT_DEPENDENCY_COMMANDS
9814# ------------------------------
9815AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
9816[{
9817  # Older Autoconf quotes --file arguments for eval, but not when files
9818  # are listed without --file.  Let's play safe and only enable the eval
9819  # if we detect the quoting.
9820  case $CONFIG_FILES in
9821  *\'*) eval set x "$CONFIG_FILES" ;;
9822  *)   set x $CONFIG_FILES ;;
9823  esac
9824  shift
9825  for mf
9826  do
9827    # Strip MF so we end up with the name of the file.
9828    mf=`echo "$mf" | sed -e 's/:.*$//'`
9829    # Check whether this is an Automake generated Makefile or not.
9830    # We used to match only the files named 'Makefile.in', but
9831    # some people rename them; so instead we look at the file content.
9832    # Grep'ing the first line is not enough: some people post-process
9833    # each Makefile.in and add a new line on top of each file to say so.
9834    # Grep'ing the whole file is not good either: AIX grep has a line
9835    # limit of 2048, but all sed's we know have understand at least 4000.
9836    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
9837      dirpart=`AS_DIRNAME("$mf")`
9838    else
9839      continue
9840    fi
9841    # Extract the definition of DEPDIR, am__include, and am__quote
9842    # from the Makefile without running 'make'.
9843    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
9844    test -z "$DEPDIR" && continue
9845    am__include=`sed -n 's/^am__include = //p' < "$mf"`
9846    test -z "$am__include" && continue
9847    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
9848    # Find all dependency output files, they are included files with
9849    # $(DEPDIR) in their names.  We invoke sed twice because it is the
9850    # simplest approach to changing $(DEPDIR) to its actual value in the
9851    # expansion.
9852    for file in `sed -n "
9853      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
9854	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
9855      # Make sure the directory exists.
9856      test -f "$dirpart/$file" && continue
9857      fdir=`AS_DIRNAME(["$file"])`
9858      AS_MKDIR_P([$dirpart/$fdir])
9859      # echo "creating $dirpart/$file"
9860      echo '# dummy' > "$dirpart/$file"
9861    done
9862  done
9863}
9864])# _AM_OUTPUT_DEPENDENCY_COMMANDS
9865
9866
9867# AM_OUTPUT_DEPENDENCY_COMMANDS
9868# -----------------------------
9869# This macro should only be invoked once -- use via AC_REQUIRE.
9870#
9871# This code is only required when automatic dependency tracking
9872# is enabled.  FIXME.  This creates each '.P' file that we will
9873# need in order to bootstrap the dependency handling code.
9874AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
9875[AC_CONFIG_COMMANDS([depfiles],
9876     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
9877     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
9878])
9879
9880# Do all the work for Automake.                             -*- Autoconf -*-
9881
9882# Copyright (C) 1996-2014 Free Software Foundation, Inc.
9883#
9884# This file is free software; the Free Software Foundation
9885# gives unlimited permission to copy and/or distribute it,
9886# with or without modifications, as long as this notice is preserved.
9887
9888# This macro actually does too much.  Some checks are only needed if
9889# your package does certain things.  But this isn't really a big deal.
9890
9891dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
9892m4_define([AC_PROG_CC],
9893m4_defn([AC_PROG_CC])
9894[_AM_PROG_CC_C_O
9895])
9896
9897# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
9898# AM_INIT_AUTOMAKE([OPTIONS])
9899# -----------------------------------------------
9900# The call with PACKAGE and VERSION arguments is the old style
9901# call (pre autoconf-2.50), which is being phased out.  PACKAGE
9902# and VERSION should now be passed to AC_INIT and removed from
9903# the call to AM_INIT_AUTOMAKE.
9904# We support both call styles for the transition.  After
9905# the next Automake release, Autoconf can make the AC_INIT
9906# arguments mandatory, and then we can depend on a new Autoconf
9907# release and drop the old call support.
9908AC_DEFUN([AM_INIT_AUTOMAKE],
9909[AC_PREREQ([2.65])dnl
9910dnl Autoconf wants to disallow AM_ names.  We explicitly allow
9911dnl the ones we care about.
9912m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
9913AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
9914AC_REQUIRE([AC_PROG_INSTALL])dnl
9915if test "`cd $srcdir && pwd`" != "`pwd`"; then
9916  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
9917  # is not polluted with repeated "-I."
9918  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
9919  # test to see if srcdir already configured
9920  if test -f $srcdir/config.status; then
9921    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
9922  fi
9923fi
9924
9925# test whether we have cygpath
9926if test -z "$CYGPATH_W"; then
9927  if (cygpath --version) >/dev/null 2>/dev/null; then
9928    CYGPATH_W='cygpath -w'
9929  else
9930    CYGPATH_W=echo
9931  fi
9932fi
9933AC_SUBST([CYGPATH_W])
9934
9935# Define the identity of the package.
9936dnl Distinguish between old-style and new-style calls.
9937m4_ifval([$2],
9938[AC_DIAGNOSE([obsolete],
9939             [$0: two- and three-arguments forms are deprecated.])
9940m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
9941 AC_SUBST([PACKAGE], [$1])dnl
9942 AC_SUBST([VERSION], [$2])],
9943[_AM_SET_OPTIONS([$1])dnl
9944dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
9945m4_if(
9946  m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
9947  [ok:ok],,
9948  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
9949 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
9950 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
9951
9952_AM_IF_OPTION([no-define],,
9953[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
9954 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
9955
9956# Some tools Automake needs.
9957AC_REQUIRE([AM_SANITY_CHECK])dnl
9958AC_REQUIRE([AC_ARG_PROGRAM])dnl
9959AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
9960AM_MISSING_PROG([AUTOCONF], [autoconf])
9961AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
9962AM_MISSING_PROG([AUTOHEADER], [autoheader])
9963AM_MISSING_PROG([MAKEINFO], [makeinfo])
9964AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9965AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
9966AC_REQUIRE([AC_PROG_MKDIR_P])dnl
9967# For better backward compatibility.  To be removed once Automake 1.9.x
9968# dies out for good.  For more background, see:
9969# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
9970# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
9971AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
9972# We need awk for the "check" target (and possibly the TAP driver).  The
9973# system "awk" is bad on some platforms.
9974AC_REQUIRE([AC_PROG_AWK])dnl
9975AC_REQUIRE([AC_PROG_MAKE_SET])dnl
9976AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9977_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
9978	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
9979			     [_AM_PROG_TAR([v7])])])
9980_AM_IF_OPTION([no-dependencies],,
9981[AC_PROVIDE_IFELSE([AC_PROG_CC],
9982		  [_AM_DEPENDENCIES([CC])],
9983		  [m4_define([AC_PROG_CC],
9984			     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
9985AC_PROVIDE_IFELSE([AC_PROG_CXX],
9986		  [_AM_DEPENDENCIES([CXX])],
9987		  [m4_define([AC_PROG_CXX],
9988			     m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
9989AC_PROVIDE_IFELSE([AC_PROG_OBJC],
9990		  [_AM_DEPENDENCIES([OBJC])],
9991		  [m4_define([AC_PROG_OBJC],
9992			     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
9993AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
9994		  [_AM_DEPENDENCIES([OBJCXX])],
9995		  [m4_define([AC_PROG_OBJCXX],
9996			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
9997])
9998AC_REQUIRE([AM_SILENT_RULES])dnl
9999dnl The testsuite driver may need to know about EXEEXT, so add the
10000dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
10001dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
10002AC_CONFIG_COMMANDS_PRE(dnl
10003[m4_provide_if([_AM_COMPILER_EXEEXT],
10004  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
10005
10006# POSIX will say in a future version that running "rm -f" with no argument
10007# is OK; and we want to be able to make that assumption in our Makefile
10008# recipes.  So use an aggressive probe to check that the usage we want is
10009# actually supported "in the wild" to an acceptable degree.
10010# See automake bug#10828.
10011# To make any issue more visible, cause the running configure to be aborted
10012# by default if the 'rm' program in use doesn't match our expectations; the
10013# user can still override this though.
10014if rm -f && rm -fr && rm -rf; then : OK; else
10015  cat >&2 <<'END'
10016Oops!
10017
10018Your 'rm' program seems unable to run without file operands specified
10019on the command line, even when the '-f' option is present.  This is contrary
10020to the behaviour of most rm programs out there, and not conforming with
10021the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
10022
10023Please tell bug-automake@gnu.org about your system, including the value
10024of your $PATH and any error possibly output before this message.  This
10025can help us improve future automake versions.
10026
10027END
10028  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
10029    echo 'Configuration will proceed anyway, since you have set the' >&2
10030    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
10031    echo >&2
10032  else
10033    cat >&2 <<'END'
10034Aborting the configuration process, to ensure you take notice of the issue.
10035
10036You can download and install GNU coreutils to get an 'rm' implementation
10037that behaves properly: <http://www.gnu.org/software/coreutils/>.
10038
10039If you want to complete the configuration process using your problematic
10040'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
10041to "yes", and re-run configure.
10042
10043END
10044    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
10045  fi
10046fi
10047dnl The trailing newline in this macro's definition is deliberate, for
10048dnl backward compatibility and to allow trailing 'dnl'-style comments
10049dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
10050])
10051
10052dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
10053dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
10054dnl mangled by Autoconf and run in a shell conditional statement.
10055m4_define([_AC_COMPILER_EXEEXT],
10056m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
10057
10058# When config.status generates a header, we must update the stamp-h file.
10059# This file resides in the same directory as the config header
10060# that is generated.  The stamp files are numbered to have different names.
10061
10062# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
10063# loop where config.status creates the headers, so we can generate
10064# our stamp files there.
10065AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
10066[# Compute $1's index in $config_headers.
10067_am_arg=$1
10068_am_stamp_count=1
10069for _am_header in $config_headers :; do
10070  case $_am_header in
10071    $_am_arg | $_am_arg:* )
10072      break ;;
10073    * )
10074      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
10075  esac
10076done
10077echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
10078
10079# Copyright (C) 2001-2014 Free Software Foundation, Inc.
10080#
10081# This file is free software; the Free Software Foundation
10082# gives unlimited permission to copy and/or distribute it,
10083# with or without modifications, as long as this notice is preserved.
10084
10085# AM_PROG_INSTALL_SH
10086# ------------------
10087# Define $install_sh.
10088AC_DEFUN([AM_PROG_INSTALL_SH],
10089[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10090if test x"${install_sh+set}" != xset; then
10091  case $am_aux_dir in
10092  *\ * | *\	*)
10093    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
10094  *)
10095    install_sh="\${SHELL} $am_aux_dir/install-sh"
10096  esac
10097fi
10098AC_SUBST([install_sh])])
10099
10100# Copyright (C) 2003-2014 Free Software Foundation, Inc.
10101#
10102# This file is free software; the Free Software Foundation
10103# gives unlimited permission to copy and/or distribute it,
10104# with or without modifications, as long as this notice is preserved.
10105
10106# Check whether the underlying file-system supports filenames
10107# with a leading dot.  For instance MS-DOS doesn't.
10108AC_DEFUN([AM_SET_LEADING_DOT],
10109[rm -rf .tst 2>/dev/null
10110mkdir .tst 2>/dev/null
10111if test -d .tst; then
10112  am__leading_dot=.
10113else
10114  am__leading_dot=_
10115fi
10116rmdir .tst 2>/dev/null
10117AC_SUBST([am__leading_dot])])
10118
10119# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
10120# From Jim Meyering
10121
10122# Copyright (C) 1996-2014 Free Software Foundation, Inc.
10123#
10124# This file is free software; the Free Software Foundation
10125# gives unlimited permission to copy and/or distribute it,
10126# with or without modifications, as long as this notice is preserved.
10127
10128# AM_MAINTAINER_MODE([DEFAULT-MODE])
10129# ----------------------------------
10130# Control maintainer-specific portions of Makefiles.
10131# Default is to disable them, unless 'enable' is passed literally.
10132# For symmetry, 'disable' may be passed as well.  Anyway, the user
10133# can override the default with the --enable/--disable switch.
10134AC_DEFUN([AM_MAINTAINER_MODE],
10135[m4_case(m4_default([$1], [disable]),
10136       [enable], [m4_define([am_maintainer_other], [disable])],
10137       [disable], [m4_define([am_maintainer_other], [enable])],
10138       [m4_define([am_maintainer_other], [enable])
10139        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
10140AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
10141  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
10142  AC_ARG_ENABLE([maintainer-mode],
10143    [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
10144      am_maintainer_other[ make rules and dependencies not useful
10145      (and sometimes confusing) to the casual installer])],
10146    [USE_MAINTAINER_MODE=$enableval],
10147    [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
10148  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
10149  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
10150  MAINT=$MAINTAINER_MODE_TRUE
10151  AC_SUBST([MAINT])dnl
10152]
10153)
10154
10155# Check to see how 'make' treats includes.	            -*- Autoconf -*-
10156
10157# Copyright (C) 2001-2014 Free Software Foundation, Inc.
10158#
10159# This file is free software; the Free Software Foundation
10160# gives unlimited permission to copy and/or distribute it,
10161# with or without modifications, as long as this notice is preserved.
10162
10163# AM_MAKE_INCLUDE()
10164# -----------------
10165# Check to see how make treats includes.
10166AC_DEFUN([AM_MAKE_INCLUDE],
10167[am_make=${MAKE-make}
10168cat > confinc << 'END'
10169am__doit:
10170	@echo this is the am__doit target
10171.PHONY: am__doit
10172END
10173# If we don't find an include directive, just comment out the code.
10174AC_MSG_CHECKING([for style of include used by $am_make])
10175am__include="#"
10176am__quote=
10177_am_result=none
10178# First try GNU make style include.
10179echo "include confinc" > confmf
10180# Ignore all kinds of additional output from 'make'.
10181case `$am_make -s -f confmf 2> /dev/null` in #(
10182*the\ am__doit\ target*)
10183  am__include=include
10184  am__quote=
10185  _am_result=GNU
10186  ;;
10187esac
10188# Now try BSD make style include.
10189if test "$am__include" = "#"; then
10190   echo '.include "confinc"' > confmf
10191   case `$am_make -s -f confmf 2> /dev/null` in #(
10192   *the\ am__doit\ target*)
10193     am__include=.include
10194     am__quote="\""
10195     _am_result=BSD
10196     ;;
10197   esac
10198fi
10199AC_SUBST([am__include])
10200AC_SUBST([am__quote])
10201AC_MSG_RESULT([$_am_result])
10202rm -f confinc confmf
10203])
10204
10205# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
10206
10207# Copyright (C) 1997-2014 Free Software Foundation, Inc.
10208#
10209# This file is free software; the Free Software Foundation
10210# gives unlimited permission to copy and/or distribute it,
10211# with or without modifications, as long as this notice is preserved.
10212
10213# AM_MISSING_PROG(NAME, PROGRAM)
10214# ------------------------------
10215AC_DEFUN([AM_MISSING_PROG],
10216[AC_REQUIRE([AM_MISSING_HAS_RUN])
10217$1=${$1-"${am_missing_run}$2"}
10218AC_SUBST($1)])
10219
10220# AM_MISSING_HAS_RUN
10221# ------------------
10222# Define MISSING if not defined so far and test if it is modern enough.
10223# If it is, set am_missing_run to use it, otherwise, to nothing.
10224AC_DEFUN([AM_MISSING_HAS_RUN],
10225[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10226AC_REQUIRE_AUX_FILE([missing])dnl
10227if test x"${MISSING+set}" != xset; then
10228  case $am_aux_dir in
10229  *\ * | *\	*)
10230    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
10231  *)
10232    MISSING="\${SHELL} $am_aux_dir/missing" ;;
10233  esac
10234fi
10235# Use eval to expand $SHELL
10236if eval "$MISSING --is-lightweight"; then
10237  am_missing_run="$MISSING "
10238else
10239  am_missing_run=
10240  AC_MSG_WARN(['missing' script is too old or missing])
10241fi
10242])
10243
10244# Helper functions for option handling.                     -*- Autoconf -*-
10245
10246# Copyright (C) 2001-2014 Free Software Foundation, Inc.
10247#
10248# This file is free software; the Free Software Foundation
10249# gives unlimited permission to copy and/or distribute it,
10250# with or without modifications, as long as this notice is preserved.
10251
10252# _AM_MANGLE_OPTION(NAME)
10253# -----------------------
10254AC_DEFUN([_AM_MANGLE_OPTION],
10255[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
10256
10257# _AM_SET_OPTION(NAME)
10258# --------------------
10259# Set option NAME.  Presently that only means defining a flag for this option.
10260AC_DEFUN([_AM_SET_OPTION],
10261[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
10262
10263# _AM_SET_OPTIONS(OPTIONS)
10264# ------------------------
10265# OPTIONS is a space-separated list of Automake options.
10266AC_DEFUN([_AM_SET_OPTIONS],
10267[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
10268
10269# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
10270# -------------------------------------------
10271# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
10272AC_DEFUN([_AM_IF_OPTION],
10273[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
10274
10275# Copyright (C) 1999-2014 Free Software Foundation, Inc.
10276#
10277# This file is free software; the Free Software Foundation
10278# gives unlimited permission to copy and/or distribute it,
10279# with or without modifications, as long as this notice is preserved.
10280
10281# _AM_PROG_CC_C_O
10282# ---------------
10283# Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
10284# to automatically call this.
10285AC_DEFUN([_AM_PROG_CC_C_O],
10286[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10287AC_REQUIRE_AUX_FILE([compile])dnl
10288AC_LANG_PUSH([C])dnl
10289AC_CACHE_CHECK(
10290  [whether $CC understands -c and -o together],
10291  [am_cv_prog_cc_c_o],
10292  [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
10293  # Make sure it works both with $CC and with simple cc.
10294  # Following AC_PROG_CC_C_O, we do the test twice because some
10295  # compilers refuse to overwrite an existing .o file with -o,
10296  # though they will create one.
10297  am_cv_prog_cc_c_o=yes
10298  for am_i in 1 2; do
10299    if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
10300         && test -f conftest2.$ac_objext; then
10301      : OK
10302    else
10303      am_cv_prog_cc_c_o=no
10304      break
10305    fi
10306  done
10307  rm -f core conftest*
10308  unset am_i])
10309if test "$am_cv_prog_cc_c_o" != yes; then
10310   # Losing compiler, so override with the script.
10311   # FIXME: It is wrong to rewrite CC.
10312   # But if we don't then we get into trouble of one sort or another.
10313   # A longer-term fix would be to have automake use am__CC in this case,
10314   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
10315   CC="$am_aux_dir/compile $CC"
10316fi
10317AC_LANG_POP([C])])
10318
10319# For backward compatibility.
10320AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
10321
10322# Copyright (C) 2001-2014 Free Software Foundation, Inc.
10323#
10324# This file is free software; the Free Software Foundation
10325# gives unlimited permission to copy and/or distribute it,
10326# with or without modifications, as long as this notice is preserved.
10327
10328# AM_RUN_LOG(COMMAND)
10329# -------------------
10330# Run COMMAND, save the exit status in ac_status, and log it.
10331# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
10332AC_DEFUN([AM_RUN_LOG],
10333[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
10334   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
10335   ac_status=$?
10336   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
10337   (exit $ac_status); }])
10338
10339# Check to make sure that the build environment is sane.    -*- Autoconf -*-
10340
10341# Copyright (C) 1996-2014 Free Software Foundation, Inc.
10342#
10343# This file is free software; the Free Software Foundation
10344# gives unlimited permission to copy and/or distribute it,
10345# with or without modifications, as long as this notice is preserved.
10346
10347# AM_SANITY_CHECK
10348# ---------------
10349AC_DEFUN([AM_SANITY_CHECK],
10350[AC_MSG_CHECKING([whether build environment is sane])
10351# Reject unsafe characters in $srcdir or the absolute working directory
10352# name.  Accept space and tab only in the latter.
10353am_lf='
10354'
10355case `pwd` in
10356  *[[\\\"\#\$\&\'\`$am_lf]]*)
10357    AC_MSG_ERROR([unsafe absolute working directory name]);;
10358esac
10359case $srcdir in
10360  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
10361    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
10362esac
10363
10364# Do 'set' in a subshell so we don't clobber the current shell's
10365# arguments.  Must try -L first in case configure is actually a
10366# symlink; some systems play weird games with the mod time of symlinks
10367# (eg FreeBSD returns the mod time of the symlink's containing
10368# directory).
10369if (
10370   am_has_slept=no
10371   for am_try in 1 2; do
10372     echo "timestamp, slept: $am_has_slept" > conftest.file
10373     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
10374     if test "$[*]" = "X"; then
10375	# -L didn't work.
10376	set X `ls -t "$srcdir/configure" conftest.file`
10377     fi
10378     if test "$[*]" != "X $srcdir/configure conftest.file" \
10379	&& test "$[*]" != "X conftest.file $srcdir/configure"; then
10380
10381	# If neither matched, then we have a broken ls.  This can happen
10382	# if, for instance, CONFIG_SHELL is bash and it inherits a
10383	# broken ls alias from the environment.  This has actually
10384	# happened.  Such a system could not be considered "sane".
10385	AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
10386  alias in your environment])
10387     fi
10388     if test "$[2]" = conftest.file || test $am_try -eq 2; then
10389       break
10390     fi
10391     # Just in case.
10392     sleep 1
10393     am_has_slept=yes
10394   done
10395   test "$[2]" = conftest.file
10396   )
10397then
10398   # Ok.
10399   :
10400else
10401   AC_MSG_ERROR([newly created file is older than distributed files!
10402Check your system clock])
10403fi
10404AC_MSG_RESULT([yes])
10405# If we didn't sleep, we still need to ensure time stamps of config.status and
10406# generated files are strictly newer.
10407am_sleep_pid=
10408if grep 'slept: no' conftest.file >/dev/null 2>&1; then
10409  ( sleep 1 ) &
10410  am_sleep_pid=$!
10411fi
10412AC_CONFIG_COMMANDS_PRE(
10413  [AC_MSG_CHECKING([that generated files are newer than configure])
10414   if test -n "$am_sleep_pid"; then
10415     # Hide warnings about reused PIDs.
10416     wait $am_sleep_pid 2>/dev/null
10417   fi
10418   AC_MSG_RESULT([done])])
10419rm -f conftest.file
10420])
10421
10422# Copyright (C) 2009-2014 Free Software Foundation, Inc.
10423#
10424# This file is free software; the Free Software Foundation
10425# gives unlimited permission to copy and/or distribute it,
10426# with or without modifications, as long as this notice is preserved.
10427
10428# AM_SILENT_RULES([DEFAULT])
10429# --------------------------
10430# Enable less verbose build rules; with the default set to DEFAULT
10431# ("yes" being less verbose, "no" or empty being verbose).
10432AC_DEFUN([AM_SILENT_RULES],
10433[AC_ARG_ENABLE([silent-rules], [dnl
10434AS_HELP_STRING(
10435  [--enable-silent-rules],
10436  [less verbose build output (undo: "make V=1")])
10437AS_HELP_STRING(
10438  [--disable-silent-rules],
10439  [verbose build output (undo: "make V=0")])dnl
10440])
10441case $enable_silent_rules in @%:@ (((
10442  yes) AM_DEFAULT_VERBOSITY=0;;
10443   no) AM_DEFAULT_VERBOSITY=1;;
10444    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
10445esac
10446dnl
10447dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
10448dnl do not support nested variable expansions.
10449dnl See automake bug#9928 and bug#10237.
10450am_make=${MAKE-make}
10451AC_CACHE_CHECK([whether $am_make supports nested variables],
10452   [am_cv_make_support_nested_variables],
10453   [if AS_ECHO([['TRUE=$(BAR$(V))
10454BAR0=false
10455BAR1=true
10456V=1
10457am__doit:
10458	@$(TRUE)
10459.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
10460  am_cv_make_support_nested_variables=yes
10461else
10462  am_cv_make_support_nested_variables=no
10463fi])
10464if test $am_cv_make_support_nested_variables = yes; then
10465  dnl Using '$V' instead of '$(V)' breaks IRIX make.
10466  AM_V='$(V)'
10467  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
10468else
10469  AM_V=$AM_DEFAULT_VERBOSITY
10470  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
10471fi
10472AC_SUBST([AM_V])dnl
10473AM_SUBST_NOTMAKE([AM_V])dnl
10474AC_SUBST([AM_DEFAULT_V])dnl
10475AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
10476AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
10477AM_BACKSLASH='\'
10478AC_SUBST([AM_BACKSLASH])dnl
10479_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
10480])
10481
10482# Copyright (C) 2001-2014 Free Software Foundation, Inc.
10483#
10484# This file is free software; the Free Software Foundation
10485# gives unlimited permission to copy and/or distribute it,
10486# with or without modifications, as long as this notice is preserved.
10487
10488# AM_PROG_INSTALL_STRIP
10489# ---------------------
10490# One issue with vendor 'install' (even GNU) is that you can't
10491# specify the program used to strip binaries.  This is especially
10492# annoying in cross-compiling environments, where the build's strip
10493# is unlikely to handle the host's binaries.
10494# Fortunately install-sh will honor a STRIPPROG variable, so we
10495# always use install-sh in "make install-strip", and initialize
10496# STRIPPROG with the value of the STRIP variable (set by the user).
10497AC_DEFUN([AM_PROG_INSTALL_STRIP],
10498[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
10499# Installed binaries are usually stripped using 'strip' when the user
10500# run "make install-strip".  However 'strip' might not be the right
10501# tool to use in cross-compilation environments, therefore Automake
10502# will honor the 'STRIP' environment variable to overrule this program.
10503dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
10504if test "$cross_compiling" != no; then
10505  AC_CHECK_TOOL([STRIP], [strip], :)
10506fi
10507INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
10508AC_SUBST([INSTALL_STRIP_PROGRAM])])
10509
10510# Copyright (C) 2006-2014 Free Software Foundation, Inc.
10511#
10512# This file is free software; the Free Software Foundation
10513# gives unlimited permission to copy and/or distribute it,
10514# with or without modifications, as long as this notice is preserved.
10515
10516# _AM_SUBST_NOTMAKE(VARIABLE)
10517# ---------------------------
10518# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
10519# This macro is traced by Automake.
10520AC_DEFUN([_AM_SUBST_NOTMAKE])
10521
10522# AM_SUBST_NOTMAKE(VARIABLE)
10523# --------------------------
10524# Public sister of _AM_SUBST_NOTMAKE.
10525AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
10526
10527# Check how to create a tarball.                            -*- Autoconf -*-
10528
10529# Copyright (C) 2004-2014 Free Software Foundation, Inc.
10530#
10531# This file is free software; the Free Software Foundation
10532# gives unlimited permission to copy and/or distribute it,
10533# with or without modifications, as long as this notice is preserved.
10534
10535# _AM_PROG_TAR(FORMAT)
10536# --------------------
10537# Check how to create a tarball in format FORMAT.
10538# FORMAT should be one of 'v7', 'ustar', or 'pax'.
10539#
10540# Substitute a variable $(am__tar) that is a command
10541# writing to stdout a FORMAT-tarball containing the directory
10542# $tardir.
10543#     tardir=directory && $(am__tar) > result.tar
10544#
10545# Substitute a variable $(am__untar) that extract such
10546# a tarball read from stdin.
10547#     $(am__untar) < result.tar
10548#
10549AC_DEFUN([_AM_PROG_TAR],
10550[# Always define AMTAR for backward compatibility.  Yes, it's still used
10551# in the wild :-(  We should find a proper way to deprecate it ...
10552AC_SUBST([AMTAR], ['$${TAR-tar}'])
10553
10554# We'll loop over all known methods to create a tar archive until one works.
10555_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
10556
10557m4_if([$1], [v7],
10558  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
10559
10560  [m4_case([$1],
10561    [ustar],
10562     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
10563      # There is notably a 21 bits limit for the UID and the GID.  In fact,
10564      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
10565      # and bug#13588).
10566      am_max_uid=2097151 # 2^21 - 1
10567      am_max_gid=$am_max_uid
10568      # The $UID and $GID variables are not portable, so we need to resort
10569      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
10570      # below are definitely unexpected, so allow the users to see them
10571      # (that is, avoid stderr redirection).
10572      am_uid=`id -u || echo unknown`
10573      am_gid=`id -g || echo unknown`
10574      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
10575      if test $am_uid -le $am_max_uid; then
10576         AC_MSG_RESULT([yes])
10577      else
10578         AC_MSG_RESULT([no])
10579         _am_tools=none
10580      fi
10581      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
10582      if test $am_gid -le $am_max_gid; then
10583         AC_MSG_RESULT([yes])
10584      else
10585        AC_MSG_RESULT([no])
10586        _am_tools=none
10587      fi],
10588
10589  [pax],
10590    [],
10591
10592  [m4_fatal([Unknown tar format])])
10593
10594  AC_MSG_CHECKING([how to create a $1 tar archive])
10595
10596  # Go ahead even if we have the value already cached.  We do so because we
10597  # need to set the values for the 'am__tar' and 'am__untar' variables.
10598  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
10599
10600  for _am_tool in $_am_tools; do
10601    case $_am_tool in
10602    gnutar)
10603      for _am_tar in tar gnutar gtar; do
10604        AM_RUN_LOG([$_am_tar --version]) && break
10605      done
10606      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
10607      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
10608      am__untar="$_am_tar -xf -"
10609      ;;
10610    plaintar)
10611      # Must skip GNU tar: if it does not support --format= it doesn't create
10612      # ustar tarball either.
10613      (tar --version) >/dev/null 2>&1 && continue
10614      am__tar='tar chf - "$$tardir"'
10615      am__tar_='tar chf - "$tardir"'
10616      am__untar='tar xf -'
10617      ;;
10618    pax)
10619      am__tar='pax -L -x $1 -w "$$tardir"'
10620      am__tar_='pax -L -x $1 -w "$tardir"'
10621      am__untar='pax -r'
10622      ;;
10623    cpio)
10624      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
10625      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
10626      am__untar='cpio -i -H $1 -d'
10627      ;;
10628    none)
10629      am__tar=false
10630      am__tar_=false
10631      am__untar=false
10632      ;;
10633    esac
10634
10635    # If the value was cached, stop now.  We just wanted to have am__tar
10636    # and am__untar set.
10637    test -n "${am_cv_prog_tar_$1}" && break
10638
10639    # tar/untar a dummy directory, and stop if the command works.
10640    rm -rf conftest.dir
10641    mkdir conftest.dir
10642    echo GrepMe > conftest.dir/file
10643    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
10644    rm -rf conftest.dir
10645    if test -s conftest.tar; then
10646      AM_RUN_LOG([$am__untar <conftest.tar])
10647      AM_RUN_LOG([cat conftest.dir/file])
10648      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
10649    fi
10650  done
10651  rm -rf conftest.dir
10652
10653  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
10654  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
10655
10656AC_SUBST([am__tar])
10657AC_SUBST([am__untar])
10658]) # _AM_PROG_TAR
10659
10660dnl Copyright (c) 2002-2015
10661dnl         The Xfce development team. All rights reserved.
10662dnl
10663dnl Written for Xfce by Benedikt Meurer <benny@xfce.org>.
10664dnl
10665dnl This program is free software; you can redistribute it and/or modify
10666dnl it under the terms of the GNU General Public License as published by
10667dnl the Free Software Foundation; either version 2 of the License, or
10668dnl (at your option) any later version.
10669dnl
10670dnl This program is distributed in the hope that it will be useful,
10671dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
10672dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10673dnl GNU General Public License for more details.
10674dnl
10675dnl You should have received a copy of the GNU General Public License along
10676dnl with this program; if not, write to the Free Software Foundation, Inc.,
10677dnl 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
10678dnl
10679dnl xdt-depends
10680dnl -----------
10681dnl  Contains M4 macros to check for software dependencies.
10682dnl  Partly based on prior work of the XDG contributors.
10683dnl
10684
10685
10686
10687dnl We need recent a autoconf version
10688AC_PREREQ([2.60])
10689
10690
10691
10692dnl XDT_PROG_PKG_CONFIG()
10693dnl
10694dnl Checks for the freedesktop.org pkg-config
10695dnl utility and sets the PKG_CONFIG environment
10696dnl variable to the full path if found.
10697dnl
10698AC_DEFUN([XDT_PROG_PKG_CONFIG],
10699[
10700  # minimum supported version of pkg-config
10701  xdt_cv_PKG_CONFIG_MIN_VERSION=0.9.0
10702
10703  m4_ifdef([PKG_PROG_PKG_CONFIG],
10704    [
10705      PKG_PROG_PKG_CONFIG([$xdt_cv_PKG_CONFIG_MIN_VERSION])
10706
10707      if test x"$PKG_CONFIG" = x""; then
10708        echo
10709        echo "*** Your version of pkg-config is too old. You need atleast"
10710        echo "*** pkg-config $xdt_cv_PKG_CONFIG_MIN_VERSION or newer. You can download pkg-config"
10711        echo "*** from the freedesktop.org software repository at"
10712        echo "***"
10713        echo "***    http://www.freedesktop.org/software/pkgconfig"
10714        echo "***"
10715        exit 1;
10716      fi
10717    ],
10718    [
10719      echo
10720      echo "*** The pkg-config utility could not be found on your system."
10721      echo "*** Make sure it is in your path, or set the PKG_CONFIG"
10722      echo "*** environment variable to the full path to pkg-config."
10723      echo "*** You can download pkg-config from the freedesktop.org"
10724      echo "*** software repository at"
10725      echo "***"
10726      echo "***    http://www.freedesktop.org/software/pkgconfig"
10727      echo "***"
10728      exit 1
10729    ])
10730])
10731
10732
10733
10734dnl XDT_CHECK_PACKAGE(varname, package, version, [action-if], [action-if-not])
10735dnl
10736dnl Checks if "package" >= "version" is installed on the
10737dnl target system, using the pkg-config utility. If the
10738dnl dependency is met, "varname"_CFLAGS, "varname"_LIBS,
10739dnl "varname"_VERSION and "varname"_REQUIRED_VERSION
10740dnl will be set and marked for substition.
10741dnl
10742dnl "varname"_REQUIRED_VERSION will be set to the value of
10743dnl "version". This is mostly useful to automatically
10744dnl place the correct version information into the RPM
10745dnl .spec file.
10746dnl
10747dnl In addition, if the dependency is met, "action-if" will
10748dnl be executed if given.
10749dnl
10750dnl If the package check fails, "action-if-not" will be
10751dnl executed. If this parameter isn't specified, a diagnostic
10752dnl message will be printed and the configure script will
10753dnl be terminated with exit code 1.
10754dnl
10755AC_DEFUN([XDT_CHECK_PACKAGE],
10756[
10757  XDT_PROG_PKG_CONFIG()
10758
10759  AC_MSG_CHECKING([for $2 >= $3])
10760  if $PKG_CONFIG "--atleast-version=$3" "$2" >/dev/null 2>&1; then
10761    $1_VERSION=`$PKG_CONFIG --modversion "$2"`
10762    AC_MSG_RESULT([$$1_VERSION])
10763
10764    AC_MSG_CHECKING([$1_CFLAGS])
10765    $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
10766    AC_MSG_RESULT([$$1_CFLAGS])
10767
10768    AC_MSG_CHECKING([$1_LIBS])
10769    $1_LIBS=`$PKG_CONFIG --libs "$2"`
10770    AC_MSG_RESULT([$$1_LIBS])
10771
10772    $1_REQUIRED_VERSION=$3
10773
10774    AC_SUBST([$1_VERSION])
10775    AC_SUBST([$1_CFLAGS])
10776    AC_SUBST([$1_LIBS])
10777    AC_SUBST([$1_REQUIRED_VERSION])
10778
10779    ifelse([$4], , , [$4])
10780  elif $PKG_CONFIG --exists "$2" >/dev/null 2>&1; then
10781    xdt_cv_version=`$PKG_CONFIG --modversion "$2"`
10782    AC_MSG_RESULT([found, but $xdt_cv_version])
10783
10784    ifelse([$5], ,
10785    [
10786      echo "*** The required package $2 was found on your system,"
10787      echo "*** but the installed version ($xdt_cv_version) is too old."
10788      echo "*** Please upgrade $2 to atleast version $3, or adjust"
10789      echo "*** the PKG_CONFIG_PATH environment variable if you installed"
10790      echo "*** the new version of the package in a nonstandard prefix so"
10791      echo "*** pkg-config is able to find it."
10792      exit 1
10793    ], [$5])
10794  else
10795    AC_MSG_RESULT([not found])
10796
10797    ifelse([$5], ,
10798    [
10799      echo "*** The required package $2 was not found on your system."
10800      echo "*** Please install $2 (atleast version $3) or adjust"
10801      echo "*** the PKG_CONFIG_PATH environment variable if you"
10802      echo "*** installed the package in a nonstandard prefix so that"
10803      echo "*** pkg-config is able to find it."
10804      exit 1
10805    ], [$5])
10806  fi
10807])
10808
10809
10810
10811dnl XDT_CHECK_OPTIONAL_PACKAGE(varname, package, version, optionname, helpstring, [default])
10812dnl
10813dnl Checks for an optional dependency on "package" >= "version". "default"
10814dnl can be "yes" or "no" (defaults to "yes" if not specified) and controls
10815dnl whether configure should check this dependency by default, or only if
10816dnl the user explicitly enables it using a command line switch.
10817dnl
10818dnl This macro automatically adds a commandline switch based on the "optionname"
10819dnl parameter (--enable-optionname/--disable-optionname), which allows the
10820dnl user to explicitly control whether this optional dependency should be
10821dnl enabled or not. The "helpstring" parameter gives a brief(!) description
10822dnl about this dependency.
10823dnl
10824dnl If the user chose to enable this dependency and the required package
10825dnl was found, this macro defines the variable "varname"_FOUND and sets it
10826dnl to the string "yes", in addition to the 4 variables set by XDT_CHECK_PACKAGE.
10827dnl But "varname"_FOUND will not be marked for substition. Furthermore,
10828dnl a CPP define HAVE_"varname" will be placed in config.h (or added to
10829dnl the cc command line, depending on your configure.ac) and set to
10830dnl 1.
10831dnl
10832AC_DEFUN([XDT_CHECK_OPTIONAL_PACKAGE],
10833[
10834  AC_REQUIRE([XDT_PROG_PKG_CONFIG])
10835
10836  AC_ARG_ENABLE([$4],
10837AC_HELP_STRING([--enable-$4], [Enable checking for $5 (default=m4_default([$6], [yes]))])
10838AC_HELP_STRING([--disable-$4], [Disable checking for $5]),
10839    [xdt_cv_$1_check=$enableval], [xdt_cv_$1_check=m4_default([$6], [yes])])
10840
10841  if test x"$xdt_cv_$1_check" = x"yes"; then
10842    if $PKG_CONFIG --exists "$2 >= $3" >/dev/null 2>&1; then
10843      XDT_CHECK_PACKAGE([$1], [$2], [$3],
10844      [
10845        AC_DEFINE([HAVE_$1], [1], [Define if $2 >= $3 present])
10846        $1_FOUND="yes"
10847      ])
10848    else
10849      AC_MSG_CHECKING([for optional package $2 >= $3])
10850      AC_MSG_RESULT([not found])
10851    fi
10852  else
10853    AC_MSG_CHECKING([for optional package $2])
10854    AC_MSG_RESULT([disabled])
10855  fi
10856
10857  AM_CONDITIONAL([HAVE_$1], [test x"$$1_FOUND" = x"yes"])
10858])
10859
10860
10861
10862dnl XDT_CHECK_LIBX11()
10863dnl
10864dnl Executes various checks for X11. Sets LIBX11_CFLAGS, LIBX11_LDFLAGS
10865dnl and LIBX11_LIBS (and marks them for substitution). In addition
10866dnl HAVE_LIBX11 is set to 1 in config.h, if the X window system and
10867dnl the development files are detected on the target system.
10868dnl
10869AC_DEFUN([XDT_CHECK_LIBX11],
10870[
10871  AC_REQUIRE([AC_PATH_XTRA])
10872
10873  LIBX11_CFLAGS= LIBX11_LDFLAGS= LIBX11_LIBS=
10874  if test x"$no_x" != x"yes"; then
10875    AC_CHECK_LIB([X11], [main],
10876    [
10877      AC_DEFINE([HAVE_LIBX11], [1], [Define if libX11 is available])
10878      LIBX11_CFLAGS="$X_CFLAGS"
10879      for option in $X_PRE_LIBS $X_EXTRA_LIBS $X_LIBS; do
10880      	case "$option" in
10881        -L*)
10882          path=`echo $option | sed 's/^-L//'`
10883          if test x"$path" != x""; then
10884            LIBX11_LDFLAGS="$LIBX11_LDFLAGS -L$path"
10885          fi
10886          ;;
10887        *)
10888          LIBX11_LIBS="$LIBX11_LIBS $option"
10889          ;;
10890        esac
10891      done
10892      if ! echo $LIBX11_LIBS | grep -- '-lX11' >/dev/null; then
10893        LIBX11_LIBS="$LIBX11_LIBS -lX11"
10894      fi
10895    ], [], [$X_CFLAGS $X_PRE_LIBS $X_EXTRA_LIBS $X_LIBS])
10896  fi
10897  AC_SUBST([LIBX11_CFLAGS])
10898  AC_SUBST([LIBX11_LDFLAGS])
10899  AC_SUBST([LIBX11_LIBS])
10900])
10901
10902
10903
10904dnl XDT_CHECK_LIBX11_REQUIRE()
10905dnl
10906dnl Similar to XDT_CHECK_LIBX11(), but terminates with an error if
10907dnl the X window system and development files aren't detected on the
10908dnl target system.
10909dnl
10910AC_DEFUN([XDT_CHECK_LIBX11_REQUIRE],
10911[
10912  AC_REQUIRE([XDT_CHECK_LIBX11])
10913
10914  if test x"$no_x" = x"yes"; then
10915    AC_MSG_ERROR([X Window system libraries and header files are required])
10916  fi
10917])
10918
10919
10920
10921dnl XDT_CHECK_LIBSM()
10922dnl
10923dnl Checks whether the session management library is present on the
10924dnl target system, and sets LIBSM_CFLAGS, LIBSM_LDFLAGS and LIBSM_LIBS
10925dnl properly. In addition, HAVE_LIBSM will be set to 1 in config.h
10926dnl if libSM is detected.
10927dnl
10928AC_DEFUN([XDT_CHECK_LIBSM],
10929[
10930  AC_REQUIRE([XDT_CHECK_LIBX11])
10931
10932  LIBSM_CFLAGS= LIBSM_LDFLAGS= LIBSM_LIBS=
10933  if test x"$no_x" != x"yes"; then
10934    AC_CHECK_LIB([SM], [SmcSaveYourselfDone],
10935    [
10936      AC_DEFINE([HAVE_LIBSM], [1], [Define if libSM is available])
10937      LIBSM_CFLAGS="$LIBX11_CFLAGS"
10938      LIBSM_LDFLAGS="$LIBX11_LDFLAGS"
10939      LIBSM_LIBS="$LIBX11_LIBS"
10940      if ! echo $LIBSM_LIBS | grep -- '-lSM' >/dev/null; then
10941        LIBSM_LIBS="$LIBSM_LIBS -lSM -lICE"
10942      fi
10943    ], [], [$LIBX11_CFLAGS $LIBX11_LDFLAGS $LIBX11_LIBS -lICE])
10944  fi
10945  AC_SUBST([LIBSM_CFLAGS])
10946  AC_SUBST([LIBSM_LDFLAGS])
10947  AC_SUBST([LIBSM_LIBS])
10948])
10949
10950
10951
10952dnl XDT_CHECK_LIBXPM()
10953dnl
10954dnl Checks if the Xpm library is present on the target system, and
10955dnl sets LIBXPM_CFLAGS, LIBXPM_LDFLAGS and LIBXPM_LIBS. In addition,
10956dnl HAVE_LIBXPM will be set to 1 in config.h if libXpm is detected.
10957dnl
10958AC_DEFUN([XDT_CHECK_LIBXPM],
10959[
10960  AC_REQUIRE([XDT_CHECK_LIBX11])
10961
10962  LIBXPM_CFLAGS= LIBXPM_LDFLAGS= LIBXPM_LIBS=
10963  if test "$no_x" != "yes"; then
10964    AC_CHECK_LIB([Xpm], [main],
10965    [
10966      AC_DEFINE([HAVE_LIBXPM], [1], [Define if libXpm is available])
10967      LIBXPM_CFLAGS="$LIBX11_CFLAGS"
10968      LIBXPM_LDFLAGS="$LIBX11_LDFLAGS"
10969      LIBXPM_LIBS="$LIBX11_LIBS"
10970      if ! echo $LIBXPM_LIBS | grep -- '-lXpm' >/dev/null; then
10971        LIBXPM_LIBS="$LIBXPM_LIBS -lXpm"
10972      fi
10973    ], [], [$LIBX11_CFLAGS $LIBX11_LDFLAGS $LIBX11_LIBS -lXpm])
10974  fi
10975  AC_SUBST([LIBXPM_CFLAGS])
10976  AC_SUBST([LIBXPM_LDFLAGS])
10977  AC_SUBST([LIBXPM_LIBS])
10978])
10979
10980
10981
10982dnl XDT_CHECK_LIBXPM_REQUIRE()
10983dnl
10984dnl Similar to XDT_CHECK_LIBXPM(), but fails if the Xpm library isn't
10985dnl present on the target system.
10986dnl
10987AC_DEFUN([XDT_CHECK_LIBXPM_REQUIRE],
10988[
10989  AC_REQUIRE([XDT_CHECK_LIBX11_REQUIRE])
10990  AC_REQUIRE([XDT_CHECK_LIBXPM])
10991
10992  if test x"$LIBXPM_LIBS" = x""; then
10993    AC_MSG_ERROR([The Xpm library was not found on your system])
10994  fi
10995])
10996
10997
10998dnl Copyright (c) 2002-2015
10999dnl         The Xfce development team. All rights reserved.
11000dnl
11001dnl Written for Xfce by Benedikt Meurer <benny@xfce.org>.
11002dnl
11003dnl This program is free software; you can redistribute it and/or modify
11004dnl it under the terms of the GNU General Public License as published by
11005dnl the Free Software Foundation; either version 2 of the License, or
11006dnl (at your option) any later version.
11007dnl
11008dnl This program is distributed in the hope that it will be useful,
11009dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11010dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11011dnl GNU General Public License for more details.
11012dnl
11013dnl You should have received a copy of the GNU General Public License along
11014dnl with this program; if not, write to the Free Software Foundation, Inc.,
11015dnl 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
11016dnl
11017dnl xdt-i18n
11018dnl --------
11019dnl  Internalization M4 macros.
11020dnl
11021
11022
11023dnl XDT_I18N(LINGUAS [, PACKAGE])
11024dnl
11025dnl This macro takes care of setting up everything for i18n support.
11026dnl
11027dnl If PACKAGE isn't specified, it defaults to the package tarname; see
11028dnl the description of AC_INIT() for an explanation of what makes up
11029dnl the package tarname. Normally, you don't need to specify PACKAGE,
11030dnl but you can stick with the default.
11031dnl
11032AC_DEFUN([XDT_I18N],
11033[
11034  dnl Substitute GETTEXT_PACKAGE variable
11035  GETTEXT_PACKAGE=m4_default([$2], [AC_PACKAGE_TARNAME()])
11036  AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [Name of default gettext domain])
11037  AC_SUBST([GETTEXT_PACKAGE])
11038
11039  dnl gettext and stuff
11040  ALL_LINGUAS="$1"
11041  AM_GLIB_GNU_GETTEXT()
11042
11043  dnl This is required on some Linux systems
11044  AC_CHECK_FUNC([bind_textdomain_codeset])
11045
11046  dnl Determine where to install locale files
11047  AC_MSG_CHECKING([for locales directory])
11048  AC_ARG_WITH([locales-dir],
11049  [
11050    AC_HELP_STRING([--with-locales-dir=DIR], [Install locales into DIR])
11051  ], [localedir=$withval],
11052  [
11053    if test x"$CATOBJEXT" = x".mo"; then
11054      localedir=$libdir/locale
11055    else
11056      localedir=$datadir/locale
11057    fi
11058  ])
11059  AC_MSG_RESULT([$localedir])
11060  AC_SUBST([localedir])
11061
11062  dnl Determine additional xgettext flags
11063  AC_MSG_CHECKING([for additional xgettext flags])
11064  if test x"$XGETTEXT_ARGS" = x""; then
11065    XGETTEXT_ARGS="--keyword=Q_ --from-code=UTF-8";
11066  else
11067    XGETTEXT_ARGS="$XGETTEXT_ARGS --keyword=Q_ --from-code=UTF-8";
11068  fi
11069  AC_SUBST([XGETTEXT_ARGS])
11070  AC_MSG_RESULT([$XGETTEXT_ARGS])
11071])
11072
11073
11074