1# generated automatically by aclocal 1.10.2 -*- Autoconf -*-
2
3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4# 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
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_AUTOCONF_VERSION],
15  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
17[m4_warning([this file was generated for autoconf 2.63.
18You have another version of autoconf.  It may work, but is not guaranteed to.
19If you have problems, you may need to regenerate the build system entirely.
20To do so, use the procedure documented by the package, typically `autoreconf'.])])
21
22# Copyright (C) 1995-2002 Free Software Foundation, Inc.
23# Copyright (C) 2001-2003,2004 Red Hat, Inc.
24#
25# This file is free software, distributed under the terms of the GNU
26# General Public License.  As a special exception to the GNU General
27# Public License, this file may be distributed as part of a program
28# that contains a configuration script generated by Autoconf, under
29# the same distribution terms as the rest of that program.
30#
31# This file can be copied and used freely without restrictions.  It can
32# be used in projects which are not available under the GNU Public License
33# but which still want to provide support for the GNU gettext functionality.
34#
35# Macro to add for using GNU gettext.
36# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
37#
38# Modified to never use included libintl.
39# Owen Taylor <otaylor@redhat.com>, 12/15/1998
40#
41# Major rework to remove unused code
42# Owen Taylor <otaylor@redhat.com>, 12/11/2002
43#
44# Added better handling of ALL_LINGUAS from GNU gettext version
45# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
46#
47# Modified to require ngettext
48# Matthias Clasen <mclasen@redhat.com> 08/06/2004
49#
50# We need this here as well, since someone might use autoconf-2.5x
51# to configure GLib then an older version to configure a package
52# using AM_GLIB_GNU_GETTEXT
53AC_PREREQ(2.53)
54
55dnl
56dnl We go to great lengths to make sure that aclocal won't
57dnl try to pull in the installed version of these macros
58dnl when running aclocal in the glib directory.
59dnl
60m4_copy([AC_DEFUN],[glib_DEFUN])
61m4_copy([AC_REQUIRE],[glib_REQUIRE])
62dnl
63dnl At the end, if we're not within glib, we'll define the public
64dnl definitions in terms of our private definitions.
65dnl
66
67# GLIB_LC_MESSAGES
68#--------------------
69glib_DEFUN([GLIB_LC_MESSAGES],
70  [AC_CHECK_HEADERS([locale.h])
71    if test $ac_cv_header_locale_h = yes; then
72    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
73      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
74       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
75    if test $am_cv_val_LC_MESSAGES = yes; then
76      AC_DEFINE(HAVE_LC_MESSAGES, 1,
77        [Define if your <locale.h> file defines LC_MESSAGES.])
78    fi
79  fi])
80
81# GLIB_PATH_PROG_WITH_TEST
82#----------------------------
83dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
84dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
85glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
86[# Extract the first word of "$2", so it can be a program name with args.
87set dummy $2; ac_word=[$]2
88AC_MSG_CHECKING([for $ac_word])
89AC_CACHE_VAL(ac_cv_path_$1,
90[case "[$]$1" in
91  /*)
92  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
93  ;;
94  *)
95  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
96  for ac_dir in ifelse([$5], , $PATH, [$5]); do
97    test -z "$ac_dir" && ac_dir=.
98    if test -f $ac_dir/$ac_word; then
99      if [$3]; then
100	ac_cv_path_$1="$ac_dir/$ac_word"
101	break
102      fi
103    fi
104  done
105  IFS="$ac_save_ifs"
106dnl If no 4th arg is given, leave the cache variable unset,
107dnl so AC_PATH_PROGS will keep looking.
108ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
109])dnl
110  ;;
111esac])dnl
112$1="$ac_cv_path_$1"
113if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
114  AC_MSG_RESULT([$]$1)
115else
116  AC_MSG_RESULT(no)
117fi
118AC_SUBST($1)dnl
119])
120
121# GLIB_WITH_NLS
122#-----------------
123glib_DEFUN([GLIB_WITH_NLS],
124  dnl NLS is obligatory
125  [USE_NLS=yes
126    AC_SUBST(USE_NLS)
127
128    gt_cv_have_gettext=no
129
130    CATOBJEXT=NONE
131    XGETTEXT=:
132    INTLLIBS=
133
134    AC_CHECK_HEADER(libintl.h,
135     [gt_cv_func_dgettext_libintl="no"
136      libintl_extra_libs=""
137
138      #
139      # First check in libc
140      #
141      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
142        [AC_TRY_LINK([
143#include <libintl.h>
144],
145         [return !ngettext ("","", 1)],
146	  gt_cv_func_ngettext_libc=yes,
147          gt_cv_func_ngettext_libc=no)
148        ])
149
150      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
151	      AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
152        	[AC_TRY_LINK([
153#include <libintl.h>
154],
155	          [return !dgettext ("","")],
156		  gt_cv_func_dgettext_libc=yes,
157	          gt_cv_func_dgettext_libc=no)
158        	])
159      fi
160
161      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
162        AC_CHECK_FUNCS(bind_textdomain_codeset)
163      fi
164
165      #
166      # If we don't have everything we want, check in libintl
167      #
168      if test "$gt_cv_func_dgettext_libc" != "yes" \
169	 || test "$gt_cv_func_ngettext_libc" != "yes" \
170         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
171
172        AC_CHECK_LIB(intl, bindtextdomain,
173	    [AC_CHECK_LIB(intl, ngettext,
174		    [AC_CHECK_LIB(intl, dgettext,
175			          gt_cv_func_dgettext_libintl=yes)])])
176
177	if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
178	  AC_MSG_CHECKING([if -liconv is needed to use gettext])
179	  AC_MSG_RESULT([])
180  	  AC_CHECK_LIB(intl, ngettext,
181          	[AC_CHECK_LIB(intl, dcgettext,
182		       [gt_cv_func_dgettext_libintl=yes
183			libintl_extra_libs=-liconv],
184			:,-liconv)],
185		:,-liconv)
186        fi
187
188        #
189        # If we found libintl, then check in it for bind_textdomain_codeset();
190        # we'll prefer libc if neither have bind_textdomain_codeset(),
191        # and both have dgettext and ngettext
192        #
193        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
194          glib_save_LIBS="$LIBS"
195          LIBS="$LIBS -lintl $libintl_extra_libs"
196          unset ac_cv_func_bind_textdomain_codeset
197          AC_CHECK_FUNCS(bind_textdomain_codeset)
198          LIBS="$glib_save_LIBS"
199
200          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
201            gt_cv_func_dgettext_libc=no
202          else
203            if test "$gt_cv_func_dgettext_libc" = "yes" \
204		&& test "$gt_cv_func_ngettext_libc" = "yes"; then
205              gt_cv_func_dgettext_libintl=no
206            fi
207          fi
208        fi
209      fi
210
211      if test "$gt_cv_func_dgettext_libc" = "yes" \
212	|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
213        gt_cv_have_gettext=yes
214      fi
215
216      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
217        INTLLIBS="-lintl $libintl_extra_libs"
218      fi
219
220      if test "$gt_cv_have_gettext" = "yes"; then
221	AC_DEFINE(HAVE_GETTEXT,1,
222	  [Define if the GNU gettext() function is already present or preinstalled.])
223	GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
224	  [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
225	if test "$MSGFMT" != "no"; then
226          glib_save_LIBS="$LIBS"
227          LIBS="$LIBS $INTLLIBS"
228	  AC_CHECK_FUNCS(dcgettext)
229	  MSGFMT_OPTS=
230	  AC_MSG_CHECKING([if msgfmt accepts -c])
231	  GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
232msgid ""
233msgstr ""
234"Content-Type: text/plain; charset=UTF-8\n"
235"Project-Id-Version: test 1.0\n"
236"PO-Revision-Date: 2007-02-15 12:01+0100\n"
237"Last-Translator: test <foo@bar.xx>\n"
238"Language-Team: C <LL@li.org>\n"
239"MIME-Version: 1.0\n"
240"Content-Transfer-Encoding: 8bit\n"
241], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
242	  AC_SUBST(MSGFMT_OPTS)
243	  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
244	  GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
245	    [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
246	  AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
247			 return _nl_msg_cat_cntr],
248	    [CATOBJEXT=.gmo
249             DATADIRNAME=share],
250	    [case $host in
251	    *-*-solaris*)
252	    dnl On Solaris, if bind_textdomain_codeset is in libc,
253	    dnl GNU format message catalog is always supported,
254            dnl since both are added to the libc all together.
255	    dnl Hence, we'd like to go with DATADIRNAME=share and
256	    dnl and CATOBJEXT=.gmo in this case.
257            AC_CHECK_FUNC(bind_textdomain_codeset,
258	      [CATOBJEXT=.gmo
259               DATADIRNAME=share],
260	      [CATOBJEXT=.mo
261               DATADIRNAME=lib])
262	    ;;
263	    *)
264	    CATOBJEXT=.mo
265            DATADIRNAME=lib
266	    ;;
267	    esac])
268          LIBS="$glib_save_LIBS"
269	  INSTOBJEXT=.mo
270	else
271	  gt_cv_have_gettext=no
272	fi
273      fi
274    ])
275
276    if test "$gt_cv_have_gettext" = "yes" ; then
277      AC_DEFINE(ENABLE_NLS, 1,
278        [always defined to indicate that i18n is enabled])
279    fi
280
281    dnl Test whether we really found GNU xgettext.
282    if test "$XGETTEXT" != ":"; then
283      dnl If it is not GNU xgettext we define it as : so that the
284      dnl Makefiles still can work.
285      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
286        : ;
287      else
288        AC_MSG_RESULT(
289	  [found xgettext program is not GNU xgettext; ignore it])
290        XGETTEXT=":"
291      fi
292    fi
293
294    # We need to process the po/ directory.
295    POSUB=po
296
297    AC_OUTPUT_COMMANDS(
298      [case "$CONFIG_FILES" in *po/Makefile.in*)
299        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
300      esac])
301
302    dnl These rules are solely for the distribution goal.  While doing this
303    dnl we only have to keep exactly one list of the available catalogs
304    dnl in configure.in.
305    for lang in $ALL_LINGUAS; do
306      GMOFILES="$GMOFILES $lang.gmo"
307      POFILES="$POFILES $lang.po"
308    done
309
310    dnl Make all variables we use known to autoconf.
311    AC_SUBST(CATALOGS)
312    AC_SUBST(CATOBJEXT)
313    AC_SUBST(DATADIRNAME)
314    AC_SUBST(GMOFILES)
315    AC_SUBST(INSTOBJEXT)
316    AC_SUBST(INTLLIBS)
317    AC_SUBST(PO_IN_DATADIR_TRUE)
318    AC_SUBST(PO_IN_DATADIR_FALSE)
319    AC_SUBST(POFILES)
320    AC_SUBST(POSUB)
321  ])
322
323# AM_GLIB_GNU_GETTEXT
324# -------------------
325# Do checks necessary for use of gettext. If a suitable implementation
326# of gettext is found in either in libintl or in the C library,
327# it will set INTLLIBS to the libraries needed for use of gettext
328# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
329# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
330# on various variables needed by the Makefile.in.in installed by
331# glib-gettextize.
332dnl
333glib_DEFUN([GLIB_GNU_GETTEXT],
334  [AC_REQUIRE([AC_PROG_CC])dnl
335   AC_REQUIRE([AC_HEADER_STDC])dnl
336
337   GLIB_LC_MESSAGES
338   GLIB_WITH_NLS
339
340   if test "$gt_cv_have_gettext" = "yes"; then
341     if test "x$ALL_LINGUAS" = "x"; then
342       LINGUAS=
343     else
344       AC_MSG_CHECKING(for catalogs to be installed)
345       NEW_LINGUAS=
346       for presentlang in $ALL_LINGUAS; do
347         useit=no
348         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
349           desiredlanguages="$LINGUAS"
350         else
351           desiredlanguages="$ALL_LINGUAS"
352         fi
353         for desiredlang in $desiredlanguages; do
354 	   # Use the presentlang catalog if desiredlang is
355           #   a. equal to presentlang, or
356           #   b. a variant of presentlang (because in this case,
357           #      presentlang can be used as a fallback for messages
358           #      which are not translated in the desiredlang catalog).
359           case "$desiredlang" in
360             "$presentlang"*) useit=yes;;
361           esac
362         done
363         if test $useit = yes; then
364           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
365         fi
366       done
367       LINGUAS=$NEW_LINGUAS
368       AC_MSG_RESULT($LINGUAS)
369     fi
370
371     dnl Construct list of names of catalog files to be constructed.
372     if test -n "$LINGUAS"; then
373       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
374     fi
375   fi
376
377   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
378   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
379   dnl Try to locate is.
380   MKINSTALLDIRS=
381   if test -n "$ac_aux_dir"; then
382     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
383   fi
384   if test -z "$MKINSTALLDIRS"; then
385     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
386   fi
387   AC_SUBST(MKINSTALLDIRS)
388
389   dnl Generate list of files to be processed by xgettext which will
390   dnl be included in po/Makefile.
391   test -d po || mkdir po
392   if test "x$srcdir" != "x."; then
393     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
394       posrcprefix="$srcdir/"
395     else
396       posrcprefix="../$srcdir/"
397     fi
398   else
399     posrcprefix="../"
400   fi
401   rm -f po/POTFILES
402   sed -e "/^#/d" -e "/^\$/d" -e "s,.*,	$posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
403	< $srcdir/po/POTFILES.in > po/POTFILES
404  ])
405
406# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
407# -------------------------------
408# Define VARIABLE to the location where catalog files will
409# be installed by po/Makefile.
410glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
411[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
412glib_save_prefix="$prefix"
413glib_save_exec_prefix="$exec_prefix"
414glib_save_datarootdir="$datarootdir"
415test "x$prefix" = xNONE && prefix=$ac_default_prefix
416test "x$exec_prefix" = xNONE && exec_prefix=$prefix
417datarootdir=`eval echo "${datarootdir}"`
418if test "x$CATOBJEXT" = "x.mo" ; then
419  localedir=`eval echo "${libdir}/locale"`
420else
421  localedir=`eval echo "${datadir}/locale"`
422fi
423prefix="$glib_save_prefix"
424exec_prefix="$glib_save_exec_prefix"
425datarootdir="$glib_save_datarootdir"
426AC_DEFINE_UNQUOTED($1, "$localedir",
427  [Define the location where the catalogs will be installed])
428])
429
430dnl
431dnl Now the definitions that aclocal will find
432dnl
433ifdef(glib_configure_in,[],[
434AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
435AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
436])dnl
437
438# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
439#
440# Create a temporary file with TEST-FILE as its contents and pass the
441# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
442# 0 and perform ACTION-IF-FAIL for any other exit status.
443AC_DEFUN([GLIB_RUN_PROG],
444[cat >conftest.foo <<_ACEOF
445$2
446_ACEOF
447if AC_RUN_LOG([$1 conftest.foo]); then
448  m4_ifval([$3], [$3], [:])
449m4_ifvaln([$4], [else $4])dnl
450echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
451sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
452fi])
453
454
455
456dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
457# serial 40 IT_PROG_INTLTOOL
458AC_DEFUN([IT_PROG_INTLTOOL], [
459AC_PREREQ([2.50])dnl
460AC_REQUIRE([AM_NLS])dnl
461
462case "$am__api_version" in
463    1.[01234])
464	AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
465    ;;
466    *)
467    ;;
468esac
469
470if test -n "$1"; then
471    AC_MSG_CHECKING([for intltool >= $1])
472
473    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
474    INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
475    [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
476    ]
477    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
478    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
479	AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
480fi
481
482AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
483AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
484AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
485if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
486    AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
487fi
488
489  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
490INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
491     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
492     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
493      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
494     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
495   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
496    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
497INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
498       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
499      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
500      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@'
501      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
502      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
503    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
504  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
505    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
506    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
507   INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
508
509_IT_SUBST(INTLTOOL_DESKTOP_RULE)
510_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
511_IT_SUBST(INTLTOOL_KEYS_RULE)
512_IT_SUBST(INTLTOOL_PROP_RULE)
513_IT_SUBST(INTLTOOL_OAF_RULE)
514_IT_SUBST(INTLTOOL_PONG_RULE)
515_IT_SUBST(INTLTOOL_SERVER_RULE)
516_IT_SUBST(INTLTOOL_SHEET_RULE)
517_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
518_IT_SUBST(INTLTOOL_UI_RULE)
519_IT_SUBST(INTLTOOL_XAM_RULE)
520_IT_SUBST(INTLTOOL_KBD_RULE)
521_IT_SUBST(INTLTOOL_XML_RULE)
522_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
523_IT_SUBST(INTLTOOL_CAVES_RULE)
524_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
525_IT_SUBST(INTLTOOL_THEME_RULE)
526_IT_SUBST(INTLTOOL_SERVICE_RULE)
527_IT_SUBST(INTLTOOL_POLICY_RULE)
528
529# Check the gettext tools to make sure they are GNU
530AC_PATH_PROG(XGETTEXT, xgettext)
531AC_PATH_PROG(MSGMERGE, msgmerge)
532AC_PATH_PROG(MSGFMT, msgfmt)
533AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
534if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
535    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
536fi
537xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
538mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
539mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
540if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
541    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
542fi
543
544AC_PATH_PROG(INTLTOOL_PERL, perl)
545if test -z "$INTLTOOL_PERL"; then
546   AC_MSG_ERROR([perl not found])
547fi
548AC_MSG_CHECKING([for perl >= 5.8.1])
549$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
550if test $? -ne 0; then
551   AC_MSG_ERROR([perl 5.8.1 is required for intltool])
552else
553   IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
554   AC_MSG_RESULT([$IT_PERL_VERSION])
555fi
556if test "x$2" != "xno-xml"; then
557   AC_MSG_CHECKING([for XML::Parser])
558   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
559       AC_MSG_RESULT([ok])
560   else
561       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
562   fi
563fi
564
565# Substitute ALL_LINGUAS so we can use it in po/Makefile
566AC_SUBST(ALL_LINGUAS)
567
568# Set DATADIRNAME correctly if it is not set yet
569# (copied from glib-gettext.m4)
570if test -z "$DATADIRNAME"; then
571  AC_LINK_IFELSE(
572    [AC_LANG_PROGRAM([[]],
573                     [[extern int _nl_msg_cat_cntr;
574                       return _nl_msg_cat_cntr]])],
575    [DATADIRNAME=share],
576    [case $host in
577    *-*-solaris*)
578    dnl On Solaris, if bind_textdomain_codeset is in libc,
579    dnl GNU format message catalog is always supported,
580    dnl since both are added to the libc all together.
581    dnl Hence, we'd like to go with DATADIRNAME=share
582    dnl in this case.
583    AC_CHECK_FUNC(bind_textdomain_codeset,
584      [DATADIRNAME=share], [DATADIRNAME=lib])
585    ;;
586    *)
587    [DATADIRNAME=lib]
588    ;;
589    esac])
590fi
591AC_SUBST(DATADIRNAME)
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 exetuted 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 Free Software Foundation, Inc.
653#   Written by Gordon Matzigkeit, 1996
654#
655# This file is free software; the Free Software Foundation gives
656# unlimited permission to copy and/or distribute it, with or without
657# modifications, as long as this notice is preserved.
658
659m4_define([_LT_COPYING], [dnl
660#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
661#                 2006, 2007, 2008 Free Software Foundation, Inc.
662#   Written by Gordon Matzigkeit, 1996
663#
664#   This file is part of GNU Libtool.
665#
666# GNU Libtool is free software; you can redistribute it and/or
667# modify it under the terms of the GNU General Public License as
668# published by the Free Software Foundation; either version 2 of
669# the License, or (at your option) any later version.
670#
671# As a special exception to the GNU General Public License,
672# if you distribute this file as part of a program or library that
673# is built using GNU Libtool, you may include this file under the
674# same distribution terms that you use for the rest of that program.
675#
676# GNU Libtool is distributed in the hope that it will be useful,
677# but WITHOUT ANY WARRANTY; without even the implied warranty of
678# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
679# GNU General Public License for more details.
680#
681# You should have received a copy of the GNU General Public License
682# along with GNU Libtool; see the file COPYING.  If not, a copy
683# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
684# obtained by writing to the Free Software Foundation, Inc.,
685# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
686])
687
688# serial 56 LT_INIT
689
690
691# LT_PREREQ(VERSION)
692# ------------------
693# Complain and exit if this libtool version is less that VERSION.
694m4_defun([LT_PREREQ],
695[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
696       [m4_default([$3],
697		   [m4_fatal([Libtool version $1 or higher is required],
698		             63)])],
699       [$2])])
700
701
702# _LT_CHECK_BUILDDIR
703# ------------------
704# Complain if the absolute build directory name contains unusual characters
705m4_defun([_LT_CHECK_BUILDDIR],
706[case `pwd` in
707  *\ * | *\	*)
708    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
709esac
710])
711
712
713# LT_INIT([OPTIONS])
714# ------------------
715AC_DEFUN([LT_INIT],
716[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
717AC_BEFORE([$0], [LT_LANG])dnl
718AC_BEFORE([$0], [LT_OUTPUT])dnl
719AC_BEFORE([$0], [LTDL_INIT])dnl
720m4_require([_LT_CHECK_BUILDDIR])dnl
721
722dnl Autoconf doesn't catch unexpanded LT_ macros by default:
723m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
724m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
725dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
726dnl unless we require an AC_DEFUNed macro:
727AC_REQUIRE([LTOPTIONS_VERSION])dnl
728AC_REQUIRE([LTSUGAR_VERSION])dnl
729AC_REQUIRE([LTVERSION_VERSION])dnl
730AC_REQUIRE([LTOBSOLETE_VERSION])dnl
731m4_require([_LT_PROG_LTMAIN])dnl
732
733dnl Parse OPTIONS
734_LT_SET_OPTIONS([$0], [$1])
735
736# This can be used to rebuild libtool when needed
737LIBTOOL_DEPS="$ltmain"
738
739# Always use our own libtool.
740LIBTOOL='$(SHELL) $(top_builddir)/libtool'
741AC_SUBST(LIBTOOL)dnl
742
743_LT_SETUP
744
745# Only expand once:
746m4_define([LT_INIT])
747])# LT_INIT
748
749# Old names:
750AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
751AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
752dnl aclocal-1.4 backwards compatibility:
753dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
754dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
755
756
757# _LT_CC_BASENAME(CC)
758# -------------------
759# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
760m4_defun([_LT_CC_BASENAME],
761[for cc_temp in $1""; do
762  case $cc_temp in
763    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
764    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
765    \-*) ;;
766    *) break;;
767  esac
768done
769cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
770])
771
772
773# _LT_FILEUTILS_DEFAULTS
774# ----------------------
775# It is okay to use these file commands and assume they have been set
776# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
777m4_defun([_LT_FILEUTILS_DEFAULTS],
778[: ${CP="cp -f"}
779: ${MV="mv -f"}
780: ${RM="rm -f"}
781])# _LT_FILEUTILS_DEFAULTS
782
783
784# _LT_SETUP
785# ---------
786m4_defun([_LT_SETUP],
787[AC_REQUIRE([AC_CANONICAL_HOST])dnl
788AC_REQUIRE([AC_CANONICAL_BUILD])dnl
789_LT_DECL([], [host_alias], [0], [The host system])dnl
790_LT_DECL([], [host], [0])dnl
791_LT_DECL([], [host_os], [0])dnl
792dnl
793_LT_DECL([], [build_alias], [0], [The build system])dnl
794_LT_DECL([], [build], [0])dnl
795_LT_DECL([], [build_os], [0])dnl
796dnl
797AC_REQUIRE([AC_PROG_CC])dnl
798AC_REQUIRE([LT_PATH_LD])dnl
799AC_REQUIRE([LT_PATH_NM])dnl
800dnl
801AC_REQUIRE([AC_PROG_LN_S])dnl
802test -z "$LN_S" && LN_S="ln -s"
803_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
804dnl
805AC_REQUIRE([LT_CMD_MAX_LEN])dnl
806_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
807_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
808dnl
809m4_require([_LT_FILEUTILS_DEFAULTS])dnl
810m4_require([_LT_CHECK_SHELL_FEATURES])dnl
811m4_require([_LT_CMD_RELOAD])dnl
812m4_require([_LT_CHECK_MAGIC_METHOD])dnl
813m4_require([_LT_CMD_OLD_ARCHIVE])dnl
814m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
815
816_LT_CONFIG_LIBTOOL_INIT([
817# See if we are running on zsh, and set the options which allow our
818# commands through without removal of \ escapes INIT.
819if test -n "\${ZSH_VERSION+set}" ; then
820   setopt NO_GLOB_SUBST
821fi
822])
823if test -n "${ZSH_VERSION+set}" ; then
824   setopt NO_GLOB_SUBST
825fi
826
827_LT_CHECK_OBJDIR
828
829m4_require([_LT_TAG_COMPILER])dnl
830_LT_PROG_ECHO_BACKSLASH
831
832case $host_os in
833aix3*)
834  # AIX sometimes has problems with the GCC collect2 program.  For some
835  # reason, if we set the COLLECT_NAMES environment variable, the problems
836  # vanish in a puff of smoke.
837  if test "X${COLLECT_NAMES+set}" != Xset; then
838    COLLECT_NAMES=
839    export COLLECT_NAMES
840  fi
841  ;;
842esac
843
844# Sed substitution that helps us do robust quoting.  It backslashifies
845# metacharacters that are still active within double-quoted strings.
846sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
847
848# Same as above, but do not quote variable references.
849double_quote_subst='s/\([["`\\]]\)/\\\1/g'
850
851# Sed substitution to delay expansion of an escaped shell variable in a
852# double_quote_subst'ed string.
853delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
854
855# Sed substitution to delay expansion of an escaped single quote.
856delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
857
858# Sed substitution to avoid accidental globbing in evaled expressions
859no_glob_subst='s/\*/\\\*/g'
860
861# Global variables:
862ofile=libtool
863can_build_shared=yes
864
865# All known linkers require a `.a' archive for static linking (except MSVC,
866# which needs '.lib').
867libext=a
868
869with_gnu_ld="$lt_cv_prog_gnu_ld"
870
871old_CC="$CC"
872old_CFLAGS="$CFLAGS"
873
874# Set sane defaults for various variables
875test -z "$CC" && CC=cc
876test -z "$LTCC" && LTCC=$CC
877test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
878test -z "$LD" && LD=ld
879test -z "$ac_objext" && ac_objext=o
880
881_LT_CC_BASENAME([$compiler])
882
883# Only perform the check for file, if the check method requires it
884test -z "$MAGIC_CMD" && MAGIC_CMD=file
885case $deplibs_check_method in
886file_magic*)
887  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
888    _LT_PATH_MAGIC
889  fi
890  ;;
891esac
892
893# Use C for the default configuration in the libtool script
894LT_SUPPORTED_TAG([CC])
895_LT_LANG_C_CONFIG
896_LT_LANG_DEFAULT_CONFIG
897_LT_CONFIG_COMMANDS
898])# _LT_SETUP
899
900
901# _LT_PROG_LTMAIN
902# ---------------
903# Note that this code is called both from `configure', and `config.status'
904# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
905# `config.status' has no value for ac_aux_dir unless we are using Automake,
906# so we pass a copy along to make sure it has a sensible value anyway.
907m4_defun([_LT_PROG_LTMAIN],
908[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
909_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
910ltmain="$ac_aux_dir/ltmain.sh"
911])# _LT_PROG_LTMAIN
912
913
914
915# So that we can recreate a full libtool script including additional
916# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
917# in macros and then make a single call at the end using the `libtool'
918# label.
919
920
921# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
922# ----------------------------------------
923# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
924m4_define([_LT_CONFIG_LIBTOOL_INIT],
925[m4_ifval([$1],
926          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
927                     [$1
928])])])
929
930# Initialize.
931m4_define([_LT_OUTPUT_LIBTOOL_INIT])
932
933
934# _LT_CONFIG_LIBTOOL([COMMANDS])
935# ------------------------------
936# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
937m4_define([_LT_CONFIG_LIBTOOL],
938[m4_ifval([$1],
939          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
940                     [$1
941])])])
942
943# Initialize.
944m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
945
946
947# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
948# -----------------------------------------------------
949m4_defun([_LT_CONFIG_SAVE_COMMANDS],
950[_LT_CONFIG_LIBTOOL([$1])
951_LT_CONFIG_LIBTOOL_INIT([$2])
952])
953
954
955# _LT_FORMAT_COMMENT([COMMENT])
956# -----------------------------
957# Add leading comment marks to the start of each line, and a trailing
958# full-stop to the whole comment if one is not present already.
959m4_define([_LT_FORMAT_COMMENT],
960[m4_ifval([$1], [
961m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
962              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
963)])
964
965
966
967
968
969# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
970# -------------------------------------------------------------------
971# CONFIGNAME is the name given to the value in the libtool script.
972# VARNAME is the (base) name used in the configure script.
973# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
974# VARNAME.  Any other value will be used directly.
975m4_define([_LT_DECL],
976[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
977    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
978	[m4_ifval([$1], [$1], [$2])])
979    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
980    m4_ifval([$4],
981	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
982    lt_dict_add_subkey([lt_decl_dict], [$2],
983	[tagged?], [m4_ifval([$5], [yes], [no])])])
984])
985
986
987# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
988# --------------------------------------------------------
989m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
990
991
992# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
993# ------------------------------------------------
994m4_define([lt_decl_tag_varnames],
995[_lt_decl_filter([tagged?], [yes], $@)])
996
997
998# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
999# ---------------------------------------------------------
1000m4_define([_lt_decl_filter],
1001[m4_case([$#],
1002  [0], [m4_fatal([$0: too few arguments: $#])],
1003  [1], [m4_fatal([$0: too few arguments: $#: $1])],
1004  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
1005  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
1006  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
1007])
1008
1009
1010# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
1011# --------------------------------------------------
1012m4_define([lt_decl_quote_varnames],
1013[_lt_decl_filter([value], [1], $@)])
1014
1015
1016# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
1017# ---------------------------------------------------
1018m4_define([lt_decl_dquote_varnames],
1019[_lt_decl_filter([value], [2], $@)])
1020
1021
1022# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
1023# ---------------------------------------------------
1024m4_define([lt_decl_varnames_tagged],
1025[m4_assert([$# <= 2])dnl
1026_$0(m4_quote(m4_default([$1], [[, ]])),
1027    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
1028    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
1029m4_define([_lt_decl_varnames_tagged],
1030[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
1031
1032
1033# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
1034# ------------------------------------------------
1035m4_define([lt_decl_all_varnames],
1036[_$0(m4_quote(m4_default([$1], [[, ]])),
1037     m4_if([$2], [],
1038	   m4_quote(lt_decl_varnames),
1039	m4_quote(m4_shift($@))))[]dnl
1040])
1041m4_define([_lt_decl_all_varnames],
1042[lt_join($@, lt_decl_varnames_tagged([$1],
1043			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
1044])
1045
1046
1047# _LT_CONFIG_STATUS_DECLARE([VARNAME])
1048# ------------------------------------
1049# Quote a variable value, and forward it to `config.status' so that its
1050# declaration there will have the same value as in `configure'.  VARNAME
1051# must have a single quote delimited value for this to work.
1052m4_define([_LT_CONFIG_STATUS_DECLARE],
1053[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
1054
1055
1056# _LT_CONFIG_STATUS_DECLARATIONS
1057# ------------------------------
1058# We delimit libtool config variables with single quotes, so when
1059# we write them to config.status, we have to be sure to quote all
1060# embedded single quotes properly.  In configure, this macro expands
1061# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
1062#
1063#    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
1064m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
1065[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
1066    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
1067
1068
1069# _LT_LIBTOOL_TAGS
1070# ----------------
1071# Output comment and list of tags supported by the script
1072m4_defun([_LT_LIBTOOL_TAGS],
1073[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
1074available_tags="_LT_TAGS"dnl
1075])
1076
1077
1078# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
1079# -----------------------------------
1080# Extract the dictionary values for VARNAME (optionally with TAG) and
1081# expand to a commented shell variable setting:
1082#
1083#    # Some comment about what VAR is for.
1084#    visible_name=$lt_internal_name
1085m4_define([_LT_LIBTOOL_DECLARE],
1086[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
1087					   [description])))[]dnl
1088m4_pushdef([_libtool_name],
1089    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
1090m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
1091    [0], [_libtool_name=[$]$1],
1092    [1], [_libtool_name=$lt_[]$1],
1093    [2], [_libtool_name=$lt_[]$1],
1094    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
1095m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
1096])
1097
1098
1099# _LT_LIBTOOL_CONFIG_VARS
1100# -----------------------
1101# Produce commented declarations of non-tagged libtool config variables
1102# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
1103# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
1104# section) are produced by _LT_LIBTOOL_TAG_VARS.
1105m4_defun([_LT_LIBTOOL_CONFIG_VARS],
1106[m4_foreach([_lt_var],
1107    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
1108    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
1109
1110
1111# _LT_LIBTOOL_TAG_VARS(TAG)
1112# -------------------------
1113m4_define([_LT_LIBTOOL_TAG_VARS],
1114[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
1115    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
1116
1117
1118# _LT_TAGVAR(VARNAME, [TAGNAME])
1119# ------------------------------
1120m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
1121
1122
1123# _LT_CONFIG_COMMANDS
1124# -------------------
1125# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
1126# variables for single and double quote escaping we saved from calls
1127# to _LT_DECL, we can put quote escaped variables declarations
1128# into `config.status', and then the shell code to quote escape them in
1129# for loops in `config.status'.  Finally, any additional code accumulated
1130# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
1131m4_defun([_LT_CONFIG_COMMANDS],
1132[AC_PROVIDE_IFELSE([LT_OUTPUT],
1133	dnl If the libtool generation code has been placed in $CONFIG_LT,
1134	dnl instead of duplicating it all over again into config.status,
1135	dnl then we will have config.status run $CONFIG_LT later, so it
1136	dnl needs to know what name is stored there:
1137        [AC_CONFIG_COMMANDS([libtool],
1138            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
1139    dnl If the libtool generation code is destined for config.status,
1140    dnl expand the accumulated commands and init code now:
1141    [AC_CONFIG_COMMANDS([libtool],
1142        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
1143])#_LT_CONFIG_COMMANDS
1144
1145
1146# Initialize.
1147m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
1148[
1149
1150# The HP-UX ksh and POSIX shell print the target directory to stdout
1151# if CDPATH is set.
1152(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1153
1154sed_quote_subst='$sed_quote_subst'
1155double_quote_subst='$double_quote_subst'
1156delay_variable_subst='$delay_variable_subst'
1157_LT_CONFIG_STATUS_DECLARATIONS
1158LTCC='$LTCC'
1159LTCFLAGS='$LTCFLAGS'
1160compiler='$compiler_DEFAULT'
1161
1162# Quote evaled strings.
1163for var in lt_decl_all_varnames([[ \
1164]], lt_decl_quote_varnames); do
1165    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
1166    *[[\\\\\\\`\\"\\\$]]*)
1167      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
1168      ;;
1169    *)
1170      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1171      ;;
1172    esac
1173done
1174
1175# Double-quote double-evaled strings.
1176for var in lt_decl_all_varnames([[ \
1177]], lt_decl_dquote_varnames); do
1178    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
1179    *[[\\\\\\\`\\"\\\$]]*)
1180      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
1181      ;;
1182    *)
1183      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1184      ;;
1185    esac
1186done
1187
1188# Fix-up fallback echo if it was mangled by the above quoting rules.
1189case \$lt_ECHO in
1190*'\\\[$]0 --fallback-echo"')dnl "
1191  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
1192  ;;
1193esac
1194
1195_LT_OUTPUT_LIBTOOL_INIT
1196])
1197
1198
1199# LT_OUTPUT
1200# ---------
1201# This macro allows early generation of the libtool script (before
1202# AC_OUTPUT is called), incase it is used in configure for compilation
1203# tests.
1204AC_DEFUN([LT_OUTPUT],
1205[: ${CONFIG_LT=./config.lt}
1206AC_MSG_NOTICE([creating $CONFIG_LT])
1207cat >"$CONFIG_LT" <<_LTEOF
1208#! $SHELL
1209# Generated by $as_me.
1210# Run this file to recreate a libtool stub with the current configuration.
1211
1212lt_cl_silent=false
1213SHELL=\${CONFIG_SHELL-$SHELL}
1214_LTEOF
1215
1216cat >>"$CONFIG_LT" <<\_LTEOF
1217AS_SHELL_SANITIZE
1218_AS_PREPARE
1219
1220exec AS_MESSAGE_FD>&1
1221exec AS_MESSAGE_LOG_FD>>config.log
1222{
1223  echo
1224  AS_BOX([Running $as_me.])
1225} >&AS_MESSAGE_LOG_FD
1226
1227lt_cl_help="\
1228\`$as_me' creates a local libtool stub from the current configuration,
1229for use in further configure time tests before the real libtool is
1230generated.
1231
1232Usage: $[0] [[OPTIONS]]
1233
1234  -h, --help      print this help, then exit
1235  -V, --version   print version number, then exit
1236  -q, --quiet     do not print progress messages
1237  -d, --debug     don't remove temporary files
1238
1239Report bugs to <bug-libtool@gnu.org>."
1240
1241lt_cl_version="\
1242m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
1243m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1244configured by $[0], generated by m4_PACKAGE_STRING.
1245
1246Copyright (C) 2008 Free Software Foundation, Inc.
1247This config.lt script is free software; the Free Software Foundation
1248gives unlimited permision to copy, distribute and modify it."
1249
1250while test $[#] != 0
1251do
1252  case $[1] in
1253    --version | --v* | -V )
1254      echo "$lt_cl_version"; exit 0 ;;
1255    --help | --h* | -h )
1256      echo "$lt_cl_help"; exit 0 ;;
1257    --debug | --d* | -d )
1258      debug=: ;;
1259    --quiet | --q* | --silent | --s* | -q )
1260      lt_cl_silent=: ;;
1261
1262    -*) AC_MSG_ERROR([unrecognized option: $[1]
1263Try \`$[0] --help' for more information.]) ;;
1264
1265    *) AC_MSG_ERROR([unrecognized argument: $[1]
1266Try \`$[0] --help' for more information.]) ;;
1267  esac
1268  shift
1269done
1270
1271if $lt_cl_silent; then
1272  exec AS_MESSAGE_FD>/dev/null
1273fi
1274_LTEOF
1275
1276cat >>"$CONFIG_LT" <<_LTEOF
1277_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
1278_LTEOF
1279
1280cat >>"$CONFIG_LT" <<\_LTEOF
1281AC_MSG_NOTICE([creating $ofile])
1282_LT_OUTPUT_LIBTOOL_COMMANDS
1283AS_EXIT(0)
1284_LTEOF
1285chmod +x "$CONFIG_LT"
1286
1287# configure is writing to config.log, but config.lt does its own redirection,
1288# appending to config.log, which fails on DOS, as config.log is still kept
1289# open by configure.  Here we exec the FD to /dev/null, effectively closing
1290# config.log, so it can be properly (re)opened and appended to by config.lt.
1291if test "$no_create" != yes; then
1292  lt_cl_success=:
1293  test "$silent" = yes &&
1294    lt_config_lt_args="$lt_config_lt_args --quiet"
1295  exec AS_MESSAGE_LOG_FD>/dev/null
1296  $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
1297  exec AS_MESSAGE_LOG_FD>>config.log
1298  $lt_cl_success || AS_EXIT(1)
1299fi
1300])# LT_OUTPUT
1301
1302
1303# _LT_CONFIG(TAG)
1304# ---------------
1305# If TAG is the built-in tag, create an initial libtool script with a
1306# default configuration from the untagged config vars.  Otherwise add code
1307# to config.status for appending the configuration named by TAG from the
1308# matching tagged config vars.
1309m4_defun([_LT_CONFIG],
1310[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1311_LT_CONFIG_SAVE_COMMANDS([
1312  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
1313  m4_if(_LT_TAG, [C], [
1314    # See if we are running on zsh, and set the options which allow our
1315    # commands through without removal of \ escapes.
1316    if test -n "${ZSH_VERSION+set}" ; then
1317      setopt NO_GLOB_SUBST
1318    fi
1319
1320    cfgfile="${ofile}T"
1321    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
1322    $RM "$cfgfile"
1323
1324    cat <<_LT_EOF >> "$cfgfile"
1325#! $SHELL
1326
1327# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
1328# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
1329# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1330# NOTE: Changes made to this file will be lost: look at ltmain.sh.
1331#
1332_LT_COPYING
1333_LT_LIBTOOL_TAGS
1334
1335# ### BEGIN LIBTOOL CONFIG
1336_LT_LIBTOOL_CONFIG_VARS
1337_LT_LIBTOOL_TAG_VARS
1338# ### END LIBTOOL CONFIG
1339
1340_LT_EOF
1341
1342  case $host_os in
1343  aix3*)
1344    cat <<\_LT_EOF >> "$cfgfile"
1345# AIX sometimes has problems with the GCC collect2 program.  For some
1346# reason, if we set the COLLECT_NAMES environment variable, the problems
1347# vanish in a puff of smoke.
1348if test "X${COLLECT_NAMES+set}" != Xset; then
1349  COLLECT_NAMES=
1350  export COLLECT_NAMES
1351fi
1352_LT_EOF
1353    ;;
1354  esac
1355
1356  _LT_PROG_LTMAIN
1357
1358  # We use sed instead of cat because bash on DJGPP gets confused if
1359  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
1360  # text mode, it properly converts lines to CR/LF.  This bash problem
1361  # is reportedly fixed, but why not run on old versions too?
1362  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
1363    || (rm -f "$cfgfile"; exit 1)
1364
1365  _LT_PROG_XSI_SHELLFNS
1366
1367  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
1368    || (rm -f "$cfgfile"; exit 1)
1369
1370  mv -f "$cfgfile" "$ofile" ||
1371    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
1372  chmod +x "$ofile"
1373],
1374[cat <<_LT_EOF >> "$ofile"
1375
1376dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
1377dnl in a comment (ie after a #).
1378# ### BEGIN LIBTOOL TAG CONFIG: $1
1379_LT_LIBTOOL_TAG_VARS(_LT_TAG)
1380# ### END LIBTOOL TAG CONFIG: $1
1381_LT_EOF
1382])dnl /m4_if
1383],
1384[m4_if([$1], [], [
1385    PACKAGE='$PACKAGE'
1386    VERSION='$VERSION'
1387    TIMESTAMP='$TIMESTAMP'
1388    RM='$RM'
1389    ofile='$ofile'], [])
1390])dnl /_LT_CONFIG_SAVE_COMMANDS
1391])# _LT_CONFIG
1392
1393
1394# LT_SUPPORTED_TAG(TAG)
1395# ---------------------
1396# Trace this macro to discover what tags are supported by the libtool
1397# --tag option, using:
1398#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
1399AC_DEFUN([LT_SUPPORTED_TAG], [])
1400
1401
1402# C support is built-in for now
1403m4_define([_LT_LANG_C_enabled], [])
1404m4_define([_LT_TAGS], [])
1405
1406
1407# LT_LANG(LANG)
1408# -------------
1409# Enable libtool support for the given language if not already enabled.
1410AC_DEFUN([LT_LANG],
1411[AC_BEFORE([$0], [LT_OUTPUT])dnl
1412m4_case([$1],
1413  [C],			[_LT_LANG(C)],
1414  [C++],		[_LT_LANG(CXX)],
1415  [Java],		[_LT_LANG(GCJ)],
1416  [Fortran 77],		[_LT_LANG(F77)],
1417  [Fortran],		[_LT_LANG(FC)],
1418  [Windows Resource],	[_LT_LANG(RC)],
1419  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
1420    [_LT_LANG($1)],
1421    [m4_fatal([$0: unsupported language: "$1"])])])dnl
1422])# LT_LANG
1423
1424
1425# _LT_LANG(LANGNAME)
1426# ------------------
1427m4_defun([_LT_LANG],
1428[m4_ifdef([_LT_LANG_]$1[_enabled], [],
1429  [LT_SUPPORTED_TAG([$1])dnl
1430  m4_append([_LT_TAGS], [$1 ])dnl
1431  m4_define([_LT_LANG_]$1[_enabled], [])dnl
1432  _LT_LANG_$1_CONFIG($1)])dnl
1433])# _LT_LANG
1434
1435
1436# _LT_LANG_DEFAULT_CONFIG
1437# -----------------------
1438m4_defun([_LT_LANG_DEFAULT_CONFIG],
1439[AC_PROVIDE_IFELSE([AC_PROG_CXX],
1440  [LT_LANG(CXX)],
1441  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
1442
1443AC_PROVIDE_IFELSE([AC_PROG_F77],
1444  [LT_LANG(F77)],
1445  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
1446
1447AC_PROVIDE_IFELSE([AC_PROG_FC],
1448  [LT_LANG(FC)],
1449  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
1450
1451dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
1452dnl pulling things in needlessly.
1453AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1454  [LT_LANG(GCJ)],
1455  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1456    [LT_LANG(GCJ)],
1457    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
1458      [LT_LANG(GCJ)],
1459      [m4_ifdef([AC_PROG_GCJ],
1460	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
1461       m4_ifdef([A][M_PROG_GCJ],
1462	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
1463       m4_ifdef([LT_PROG_GCJ],
1464	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
1465
1466AC_PROVIDE_IFELSE([LT_PROG_RC],
1467  [LT_LANG(RC)],
1468  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
1469])# _LT_LANG_DEFAULT_CONFIG
1470
1471# Obsolete macros:
1472AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
1473AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
1474AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
1475AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
1476dnl aclocal-1.4 backwards compatibility:
1477dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
1478dnl AC_DEFUN([AC_LIBTOOL_F77], [])
1479dnl AC_DEFUN([AC_LIBTOOL_FC], [])
1480dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
1481
1482
1483# _LT_TAG_COMPILER
1484# ----------------
1485m4_defun([_LT_TAG_COMPILER],
1486[AC_REQUIRE([AC_PROG_CC])dnl
1487
1488_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
1489_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
1490_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
1491_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
1492
1493# If no C compiler was specified, use CC.
1494LTCC=${LTCC-"$CC"}
1495
1496# If no C compiler flags were specified, use CFLAGS.
1497LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1498
1499# Allow CC to be a program name with arguments.
1500compiler=$CC
1501])# _LT_TAG_COMPILER
1502
1503
1504# _LT_COMPILER_BOILERPLATE
1505# ------------------------
1506# Check for compiler boilerplate output or warnings with
1507# the simple compiler test code.
1508m4_defun([_LT_COMPILER_BOILERPLATE],
1509[m4_require([_LT_DECL_SED])dnl
1510ac_outfile=conftest.$ac_objext
1511echo "$lt_simple_compile_test_code" >conftest.$ac_ext
1512eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1513_lt_compiler_boilerplate=`cat conftest.err`
1514$RM conftest*
1515])# _LT_COMPILER_BOILERPLATE
1516
1517
1518# _LT_LINKER_BOILERPLATE
1519# ----------------------
1520# Check for linker boilerplate output or warnings with
1521# the simple link test code.
1522m4_defun([_LT_LINKER_BOILERPLATE],
1523[m4_require([_LT_DECL_SED])dnl
1524ac_outfile=conftest.$ac_objext
1525echo "$lt_simple_link_test_code" >conftest.$ac_ext
1526eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1527_lt_linker_boilerplate=`cat conftest.err`
1528$RM -r conftest*
1529])# _LT_LINKER_BOILERPLATE
1530
1531# _LT_REQUIRED_DARWIN_CHECKS
1532# -------------------------
1533m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
1534  case $host_os in
1535    rhapsody* | darwin*)
1536    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1537    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1538    AC_CHECK_TOOL([LIPO], [lipo], [:])
1539    AC_CHECK_TOOL([OTOOL], [otool], [:])
1540    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
1541    _LT_DECL([], [DSYMUTIL], [1],
1542      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1543    _LT_DECL([], [NMEDIT], [1],
1544      [Tool to change global to local symbols on Mac OS X])
1545    _LT_DECL([], [LIPO], [1],
1546      [Tool to manipulate fat objects and archives on Mac OS X])
1547    _LT_DECL([], [OTOOL], [1],
1548      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
1549    _LT_DECL([], [OTOOL64], [1],
1550      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
1551
1552    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1553      [lt_cv_apple_cc_single_mod=no
1554      if test -z "${LT_MULTI_MODULE}"; then
1555	# By default we will add the -single_module flag. You can override
1556	# by either setting the environment variable LT_MULTI_MODULE
1557	# non-empty at configure time, or by adding -multi_module to the
1558	# link flags.
1559	rm -rf libconftest.dylib*
1560	echo "int foo(void){return 1;}" > conftest.c
1561	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1562-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1563	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1564	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1565        _lt_result=$?
1566	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
1567	  lt_cv_apple_cc_single_mod=yes
1568	else
1569	  cat conftest.err >&AS_MESSAGE_LOG_FD
1570	fi
1571	rm -rf libconftest.dylib*
1572	rm -f conftest.*
1573      fi])
1574    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1575      [lt_cv_ld_exported_symbols_list],
1576      [lt_cv_ld_exported_symbols_list=no
1577      save_LDFLAGS=$LDFLAGS
1578      echo "_main" > conftest.sym
1579      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1580      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1581	[lt_cv_ld_exported_symbols_list=yes],
1582	[lt_cv_ld_exported_symbols_list=no])
1583	LDFLAGS="$save_LDFLAGS"
1584    ])
1585    case $host_os in
1586    rhapsody* | darwin1.[[012]])
1587      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
1588    darwin1.*)
1589      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1590    darwin*) # darwin 5.x on
1591      # if running on 10.5 or later, the deployment target defaults
1592      # to the OS version, if on x86, and 10.4, the deployment
1593      # target defaults to 10.4. Don't you love it?
1594      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1595	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1596	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1597	10.[[012]]*)
1598	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1599	10.*)
1600	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1601      esac
1602    ;;
1603  esac
1604    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
1605      _lt_dar_single_mod='$single_module'
1606    fi
1607    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
1608      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
1609    else
1610      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
1611    fi
1612    if test "$DSYMUTIL" != ":"; then
1613      _lt_dsymutil='~$DSYMUTIL $lib || :'
1614    else
1615      _lt_dsymutil=
1616    fi
1617    ;;
1618  esac
1619])
1620
1621
1622# _LT_DARWIN_LINKER_FEATURES
1623# --------------------------
1624# Checks for linker and compiler features on darwin
1625m4_defun([_LT_DARWIN_LINKER_FEATURES],
1626[
1627  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1628  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1629  _LT_TAGVAR(hardcode_direct, $1)=no
1630  _LT_TAGVAR(hardcode_automatic, $1)=yes
1631  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1632  _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1633  _LT_TAGVAR(link_all_deplibs, $1)=yes
1634  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1635  case $cc_basename in
1636     ifort*) _lt_dar_can_shared=yes ;;
1637     *) _lt_dar_can_shared=$GCC ;;
1638  esac
1639  if test "$_lt_dar_can_shared" = "yes"; then
1640    output_verbose_link_cmd=echo
1641    _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}"
1642    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1643    _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}"
1644    _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}"
1645    m4_if([$1], [CXX],
1646[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1647      _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}"
1648      _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}"
1649    fi
1650],[])
1651  else
1652  _LT_TAGVAR(ld_shlibs, $1)=no
1653  fi
1654])
1655
1656# _LT_SYS_MODULE_PATH_AIX
1657# -----------------------
1658# Links a minimal program and checks the executable
1659# for the system default hardcoded library path. In most cases,
1660# this is /usr/lib:/lib, but when the MPI compilers are used
1661# the location of the communication and MPI libs are included too.
1662# If we don't find anything, use the default library path according
1663# to the aix ld manual.
1664m4_defun([_LT_SYS_MODULE_PATH_AIX],
1665[m4_require([_LT_DECL_SED])dnl
1666AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1667lt_aix_libpath_sed='
1668    /Import File Strings/,/^$/ {
1669	/^0/ {
1670	    s/^0  *\(.*\)$/\1/
1671	    p
1672	}
1673    }'
1674aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1675# Check for a 64-bit object if we didn't find anything.
1676if test -z "$aix_libpath"; then
1677  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1678fi],[])
1679if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1680])# _LT_SYS_MODULE_PATH_AIX
1681
1682
1683# _LT_SHELL_INIT(ARG)
1684# -------------------
1685m4_define([_LT_SHELL_INIT],
1686[ifdef([AC_DIVERSION_NOTICE],
1687	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1688	 [AC_DIVERT_PUSH(NOTICE)])
1689$1
1690AC_DIVERT_POP
1691])# _LT_SHELL_INIT
1692
1693
1694# _LT_PROG_ECHO_BACKSLASH
1695# -----------------------
1696# Add some code to the start of the generated configure script which
1697# will find an echo command which doesn't interpret backslashes.
1698m4_defun([_LT_PROG_ECHO_BACKSLASH],
1699[_LT_SHELL_INIT([
1700# Check that we are running under the correct shell.
1701SHELL=${CONFIG_SHELL-/bin/sh}
1702
1703case X$lt_ECHO in
1704X*--fallback-echo)
1705  # Remove one level of quotation (which was required for Make).
1706  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1707  ;;
1708esac
1709
1710ECHO=${lt_ECHO-echo}
1711if test "X[$]1" = X--no-reexec; then
1712  # Discard the --no-reexec flag, and continue.
1713  shift
1714elif test "X[$]1" = X--fallback-echo; then
1715  # Avoid inline document here, it may be left over
1716  :
1717elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
1718  # Yippee, $ECHO works!
1719  :
1720else
1721  # Restart under the correct shell.
1722  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1723fi
1724
1725if test "X[$]1" = X--fallback-echo; then
1726  # used as fallback echo
1727  shift
1728  cat <<_LT_EOF
1729[$]*
1730_LT_EOF
1731  exit 0
1732fi
1733
1734# The HP-UX ksh and POSIX shell print the target directory to stdout
1735# if CDPATH is set.
1736(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1737
1738if test -z "$lt_ECHO"; then
1739  if test "X${echo_test_string+set}" != Xset; then
1740    # find a string as large as possible, as long as the shell can cope with it
1741    for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1742      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1743      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
1744	 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
1745      then
1746        break
1747      fi
1748    done
1749  fi
1750
1751  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1752     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1753     test "X$echo_testing_string" = "X$echo_test_string"; then
1754    :
1755  else
1756    # The Solaris, AIX, and Digital Unix default echo programs unquote
1757    # backslashes.  This makes it impossible to quote backslashes using
1758    #   echo "$something" | sed 's/\\/\\\\/g'
1759    #
1760    # So, first we look for a working echo in the user's PATH.
1761
1762    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1763    for dir in $PATH /usr/ucb; do
1764      IFS="$lt_save_ifs"
1765      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1766         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1767         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1768         test "X$echo_testing_string" = "X$echo_test_string"; then
1769        ECHO="$dir/echo"
1770        break
1771      fi
1772    done
1773    IFS="$lt_save_ifs"
1774
1775    if test "X$ECHO" = Xecho; then
1776      # We didn't find a better echo, so look for alternatives.
1777      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
1778         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
1779         test "X$echo_testing_string" = "X$echo_test_string"; then
1780        # This shell has a builtin print -r that does the trick.
1781        ECHO='print -r'
1782      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
1783	   test "X$CONFIG_SHELL" != X/bin/ksh; then
1784        # If we have ksh, try running configure again with it.
1785        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1786        export ORIGINAL_CONFIG_SHELL
1787        CONFIG_SHELL=/bin/ksh
1788        export CONFIG_SHELL
1789        exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1790      else
1791        # Try using printf.
1792        ECHO='printf %s\n'
1793        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1794	   echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1795	   test "X$echo_testing_string" = "X$echo_test_string"; then
1796	  # Cool, printf works
1797	  :
1798        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1799	     test "X$echo_testing_string" = 'X\t' &&
1800	     echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1801	     test "X$echo_testing_string" = "X$echo_test_string"; then
1802	  CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1803	  export CONFIG_SHELL
1804	  SHELL="$CONFIG_SHELL"
1805	  export SHELL
1806	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1807        elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1808	     test "X$echo_testing_string" = 'X\t' &&
1809	     echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1810	     test "X$echo_testing_string" = "X$echo_test_string"; then
1811	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1812        else
1813	  # maybe with a smaller string...
1814	  prev=:
1815
1816	  for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1817	    if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
1818	    then
1819	      break
1820	    fi
1821	    prev="$cmd"
1822	  done
1823
1824	  if test "$prev" != 'sed 50q "[$]0"'; then
1825	    echo_test_string=`eval $prev`
1826	    export echo_test_string
1827	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1828	  else
1829	    # Oops.  We lost completely, so just stick with echo.
1830	    ECHO=echo
1831	  fi
1832        fi
1833      fi
1834    fi
1835  fi
1836fi
1837
1838# Copy echo and quote the copy suitably for passing to libtool from
1839# the Makefile, instead of quoting the original, which is used later.
1840lt_ECHO=$ECHO
1841if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1842   lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1843fi
1844
1845AC_SUBST(lt_ECHO)
1846])
1847_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1848_LT_DECL([], [ECHO], [1],
1849    [An echo program that does not interpret backslashes])
1850])# _LT_PROG_ECHO_BACKSLASH
1851
1852
1853# _LT_ENABLE_LOCK
1854# ---------------
1855m4_defun([_LT_ENABLE_LOCK],
1856[AC_ARG_ENABLE([libtool-lock],
1857  [AS_HELP_STRING([--disable-libtool-lock],
1858    [avoid locking (might break parallel builds)])])
1859test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1860
1861# Some flags need to be propagated to the compiler or linker for good
1862# libtool support.
1863case $host in
1864ia64-*-hpux*)
1865  # Find out which ABI we are using.
1866  echo 'int i;' > conftest.$ac_ext
1867  if AC_TRY_EVAL(ac_compile); then
1868    case `/usr/bin/file conftest.$ac_objext` in
1869      *ELF-32*)
1870	HPUX_IA64_MODE="32"
1871	;;
1872      *ELF-64*)
1873	HPUX_IA64_MODE="64"
1874	;;
1875    esac
1876  fi
1877  rm -rf conftest*
1878  ;;
1879*-*-irix6*)
1880  # Find out which ABI we are using.
1881  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1882  if AC_TRY_EVAL(ac_compile); then
1883    if test "$lt_cv_prog_gnu_ld" = yes; then
1884      case `/usr/bin/file conftest.$ac_objext` in
1885	*32-bit*)
1886	  LD="${LD-ld} -melf32bsmip"
1887	  ;;
1888	*N32*)
1889	  LD="${LD-ld} -melf32bmipn32"
1890	  ;;
1891	*64-bit*)
1892	  LD="${LD-ld} -melf64bmip"
1893	;;
1894      esac
1895    else
1896      case `/usr/bin/file conftest.$ac_objext` in
1897	*32-bit*)
1898	  LD="${LD-ld} -32"
1899	  ;;
1900	*N32*)
1901	  LD="${LD-ld} -n32"
1902	  ;;
1903	*64-bit*)
1904	  LD="${LD-ld} -64"
1905	  ;;
1906      esac
1907    fi
1908  fi
1909  rm -rf conftest*
1910  ;;
1911
1912x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1913s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1914  # Find out which ABI we are using.
1915  echo 'int i;' > conftest.$ac_ext
1916  if AC_TRY_EVAL(ac_compile); then
1917    case `/usr/bin/file conftest.o` in
1918      *32-bit*)
1919	case $host in
1920	  x86_64-*kfreebsd*-gnu)
1921	    LD="${LD-ld} -m elf_i386_fbsd"
1922	    ;;
1923	  x86_64-*linux*)
1924	    LD="${LD-ld} -m elf_i386"
1925	    ;;
1926	  ppc64-*linux*|powerpc64-*linux*)
1927	    LD="${LD-ld} -m elf32ppclinux"
1928	    ;;
1929	  s390x-*linux*)
1930	    LD="${LD-ld} -m elf_s390"
1931	    ;;
1932	  sparc64-*linux*)
1933	    LD="${LD-ld} -m elf32_sparc"
1934	    ;;
1935	esac
1936	;;
1937      *64-bit*)
1938	case $host in
1939	  x86_64-*kfreebsd*-gnu)
1940	    LD="${LD-ld} -m elf_x86_64_fbsd"
1941	    ;;
1942	  x86_64-*linux*)
1943	    LD="${LD-ld} -m elf_x86_64"
1944	    ;;
1945	  ppc*-*linux*|powerpc*-*linux*)
1946	    LD="${LD-ld} -m elf64ppc"
1947	    ;;
1948	  s390*-*linux*|s390*-*tpf*)
1949	    LD="${LD-ld} -m elf64_s390"
1950	    ;;
1951	  sparc*-*linux*)
1952	    LD="${LD-ld} -m elf64_sparc"
1953	    ;;
1954	esac
1955	;;
1956    esac
1957  fi
1958  rm -rf conftest*
1959  ;;
1960
1961*-*-sco3.2v5*)
1962  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1963  SAVE_CFLAGS="$CFLAGS"
1964  CFLAGS="$CFLAGS -belf"
1965  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1966    [AC_LANG_PUSH(C)
1967     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1968     AC_LANG_POP])
1969  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1970    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1971    CFLAGS="$SAVE_CFLAGS"
1972  fi
1973  ;;
1974sparc*-*solaris*)
1975  # Find out which ABI we are using.
1976  echo 'int i;' > conftest.$ac_ext
1977  if AC_TRY_EVAL(ac_compile); then
1978    case `/usr/bin/file conftest.o` in
1979    *64-bit*)
1980      case $lt_cv_prog_gnu_ld in
1981      yes*) LD="${LD-ld} -m elf64_sparc" ;;
1982      *)
1983	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1984	  LD="${LD-ld} -64"
1985	fi
1986	;;
1987      esac
1988      ;;
1989    esac
1990  fi
1991  rm -rf conftest*
1992  ;;
1993esac
1994
1995need_locks="$enable_libtool_lock"
1996])# _LT_ENABLE_LOCK
1997
1998
1999# _LT_CMD_OLD_ARCHIVE
2000# -------------------
2001m4_defun([_LT_CMD_OLD_ARCHIVE],
2002[AC_CHECK_TOOL(AR, ar, false)
2003test -z "$AR" && AR=ar
2004test -z "$AR_FLAGS" && AR_FLAGS=cru
2005_LT_DECL([], [AR], [1], [The archiver])
2006_LT_DECL([], [AR_FLAGS], [1])
2007
2008AC_CHECK_TOOL(STRIP, strip, :)
2009test -z "$STRIP" && STRIP=:
2010_LT_DECL([], [STRIP], [1], [A symbol stripping program])
2011
2012AC_CHECK_TOOL(RANLIB, ranlib, :)
2013test -z "$RANLIB" && RANLIB=:
2014_LT_DECL([], [RANLIB], [1],
2015    [Commands used to install an old-style archive])
2016
2017# Determine commands to create old-style static archives.
2018old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
2019old_postinstall_cmds='chmod 644 $oldlib'
2020old_postuninstall_cmds=
2021
2022if test -n "$RANLIB"; then
2023  case $host_os in
2024  openbsd*)
2025    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
2026    ;;
2027  *)
2028    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
2029    ;;
2030  esac
2031  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
2032fi
2033_LT_DECL([], [old_postinstall_cmds], [2])
2034_LT_DECL([], [old_postuninstall_cmds], [2])
2035_LT_TAGDECL([], [old_archive_cmds], [2],
2036    [Commands used to build an old-style archive])
2037])# _LT_CMD_OLD_ARCHIVE
2038
2039
2040# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2041#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2042# ----------------------------------------------------------------
2043# Check whether the given compiler option works
2044AC_DEFUN([_LT_COMPILER_OPTION],
2045[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2046m4_require([_LT_DECL_SED])dnl
2047AC_CACHE_CHECK([$1], [$2],
2048  [$2=no
2049   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2050   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2051   lt_compiler_flag="$3"
2052   # Insert the option either (1) after the last *FLAGS variable, or
2053   # (2) before a word containing "conftest.", or (3) at the end.
2054   # Note that $ac_compile itself does not contain backslashes and begins
2055   # with a dollar sign (not a hyphen), so the echo should work correctly.
2056   # The option is referenced via a variable to avoid confusing sed.
2057   lt_compile=`echo "$ac_compile" | $SED \
2058   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2059   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2060   -e 's:$: $lt_compiler_flag:'`
2061   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2062   (eval "$lt_compile" 2>conftest.err)
2063   ac_status=$?
2064   cat conftest.err >&AS_MESSAGE_LOG_FD
2065   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2066   if (exit $ac_status) && test -s "$ac_outfile"; then
2067     # The compiler can only warn and ignore the option if not recognized
2068     # So say no if there are warnings other than the usual output.
2069     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
2070     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2071     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2072       $2=yes
2073     fi
2074   fi
2075   $RM conftest*
2076])
2077
2078if test x"[$]$2" = xyes; then
2079    m4_if([$5], , :, [$5])
2080else
2081    m4_if([$6], , :, [$6])
2082fi
2083])# _LT_COMPILER_OPTION
2084
2085# Old name:
2086AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
2087dnl aclocal-1.4 backwards compatibility:
2088dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
2089
2090
2091# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2092#                  [ACTION-SUCCESS], [ACTION-FAILURE])
2093# ----------------------------------------------------
2094# Check whether the given linker option works
2095AC_DEFUN([_LT_LINKER_OPTION],
2096[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2097m4_require([_LT_DECL_SED])dnl
2098AC_CACHE_CHECK([$1], [$2],
2099  [$2=no
2100   save_LDFLAGS="$LDFLAGS"
2101   LDFLAGS="$LDFLAGS $3"
2102   echo "$lt_simple_link_test_code" > conftest.$ac_ext
2103   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2104     # The linker can only warn and ignore the option if not recognized
2105     # So say no if there are warnings
2106     if test -s conftest.err; then
2107       # Append any errors to the config.log.
2108       cat conftest.err 1>&AS_MESSAGE_LOG_FD
2109       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
2110       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2111       if diff conftest.exp conftest.er2 >/dev/null; then
2112         $2=yes
2113       fi
2114     else
2115       $2=yes
2116     fi
2117   fi
2118   $RM -r conftest*
2119   LDFLAGS="$save_LDFLAGS"
2120])
2121
2122if test x"[$]$2" = xyes; then
2123    m4_if([$4], , :, [$4])
2124else
2125    m4_if([$5], , :, [$5])
2126fi
2127])# _LT_LINKER_OPTION
2128
2129# Old name:
2130AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
2131dnl aclocal-1.4 backwards compatibility:
2132dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
2133
2134
2135# LT_CMD_MAX_LEN
2136#---------------
2137AC_DEFUN([LT_CMD_MAX_LEN],
2138[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2139# find the maximum length of command line arguments
2140AC_MSG_CHECKING([the maximum length of command line arguments])
2141AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2142  i=0
2143  teststring="ABCD"
2144
2145  case $build_os in
2146  msdosdjgpp*)
2147    # On DJGPP, this test can blow up pretty badly due to problems in libc
2148    # (any single argument exceeding 2000 bytes causes a buffer overrun
2149    # during glob expansion).  Even if it were fixed, the result of this
2150    # check would be larger than it should be.
2151    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
2152    ;;
2153
2154  gnu*)
2155    # Under GNU Hurd, this test is not required because there is
2156    # no limit to the length of command line arguments.
2157    # Libtool will interpret -1 as no limit whatsoever
2158    lt_cv_sys_max_cmd_len=-1;
2159    ;;
2160
2161  cygwin* | mingw* | cegcc*)
2162    # On Win9x/ME, this test blows up -- it succeeds, but takes
2163    # about 5 minutes as the teststring grows exponentially.
2164    # Worse, since 9x/ME are not pre-emptively multitasking,
2165    # you end up with a "frozen" computer, even though with patience
2166    # the test eventually succeeds (with a max line length of 256k).
2167    # Instead, let's just punt: use the minimum linelength reported by
2168    # all of the supported platforms: 8192 (on NT/2K/XP).
2169    lt_cv_sys_max_cmd_len=8192;
2170    ;;
2171
2172  amigaos*)
2173    # On AmigaOS with pdksh, this test takes hours, literally.
2174    # So we just punt and use a minimum line length of 8192.
2175    lt_cv_sys_max_cmd_len=8192;
2176    ;;
2177
2178  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2179    # This has been around since 386BSD, at least.  Likely further.
2180    if test -x /sbin/sysctl; then
2181      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2182    elif test -x /usr/sbin/sysctl; then
2183      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2184    else
2185      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
2186    fi
2187    # And add a safety zone
2188    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2189    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2190    ;;
2191
2192  interix*)
2193    # We know the value 262144 and hardcode it with a safety zone (like BSD)
2194    lt_cv_sys_max_cmd_len=196608
2195    ;;
2196
2197  osf*)
2198    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2199    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2200    # nice to cause kernel panics so lets avoid the loop below.
2201    # First set a reasonable default.
2202    lt_cv_sys_max_cmd_len=16384
2203    #
2204    if test -x /sbin/sysconfig; then
2205      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2206        *1*) lt_cv_sys_max_cmd_len=-1 ;;
2207      esac
2208    fi
2209    ;;
2210  sco3.2v5*)
2211    lt_cv_sys_max_cmd_len=102400
2212    ;;
2213  sysv5* | sco5v6* | sysv4.2uw2*)
2214    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2215    if test -n "$kargmax"; then
2216      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
2217    else
2218      lt_cv_sys_max_cmd_len=32768
2219    fi
2220    ;;
2221  *)
2222    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
2223    if test -n "$lt_cv_sys_max_cmd_len"; then
2224      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2225      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2226    else
2227      # Make teststring a little bigger before we do anything with it.
2228      # a 1K string should be a reasonable start.
2229      for i in 1 2 3 4 5 6 7 8 ; do
2230        teststring=$teststring$teststring
2231      done
2232      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2233      # If test is not a shell built-in, we'll probably end up computing a
2234      # maximum length that is only half of the actual maximum length, but
2235      # we can't tell.
2236      while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
2237	         = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
2238	      test $i != 17 # 1/2 MB should be enough
2239      do
2240        i=`expr $i + 1`
2241        teststring=$teststring$teststring
2242      done
2243      # Only check the string length outside the loop.
2244      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
2245      teststring=
2246      # Add a significant safety factor because C++ compilers can tack on
2247      # massive amounts of additional arguments before passing them to the
2248      # linker.  It appears as though 1/2 is a usable value.
2249      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2250    fi
2251    ;;
2252  esac
2253])
2254if test -n $lt_cv_sys_max_cmd_len ; then
2255  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2256else
2257  AC_MSG_RESULT(none)
2258fi
2259max_cmd_len=$lt_cv_sys_max_cmd_len
2260_LT_DECL([], [max_cmd_len], [0],
2261    [What is the maximum length of a command?])
2262])# LT_CMD_MAX_LEN
2263
2264# Old name:
2265AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
2266dnl aclocal-1.4 backwards compatibility:
2267dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
2268
2269
2270# _LT_HEADER_DLFCN
2271# ----------------
2272m4_defun([_LT_HEADER_DLFCN],
2273[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
2274])# _LT_HEADER_DLFCN
2275
2276
2277# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2278#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2279# ----------------------------------------------------------------
2280m4_defun([_LT_TRY_DLOPEN_SELF],
2281[m4_require([_LT_HEADER_DLFCN])dnl
2282if test "$cross_compiling" = yes; then :
2283  [$4]
2284else
2285  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2286  lt_status=$lt_dlunknown
2287  cat > conftest.$ac_ext <<_LT_EOF
2288[#line __oline__ "configure"
2289#include "confdefs.h"
2290
2291#if HAVE_DLFCN_H
2292#include <dlfcn.h>
2293#endif
2294
2295#include <stdio.h>
2296
2297#ifdef RTLD_GLOBAL
2298#  define LT_DLGLOBAL		RTLD_GLOBAL
2299#else
2300#  ifdef DL_GLOBAL
2301#    define LT_DLGLOBAL		DL_GLOBAL
2302#  else
2303#    define LT_DLGLOBAL		0
2304#  endif
2305#endif
2306
2307/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2308   find out it does not work in some platform. */
2309#ifndef LT_DLLAZY_OR_NOW
2310#  ifdef RTLD_LAZY
2311#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
2312#  else
2313#    ifdef DL_LAZY
2314#      define LT_DLLAZY_OR_NOW		DL_LAZY
2315#    else
2316#      ifdef RTLD_NOW
2317#        define LT_DLLAZY_OR_NOW	RTLD_NOW
2318#      else
2319#        ifdef DL_NOW
2320#          define LT_DLLAZY_OR_NOW	DL_NOW
2321#        else
2322#          define LT_DLLAZY_OR_NOW	0
2323#        endif
2324#      endif
2325#    endif
2326#  endif
2327#endif
2328
2329void fnord() { int i=42;}
2330int main ()
2331{
2332  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2333  int status = $lt_dlunknown;
2334
2335  if (self)
2336    {
2337      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
2338      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
2339      /* dlclose (self); */
2340    }
2341  else
2342    puts (dlerror ());
2343
2344  return status;
2345}]
2346_LT_EOF
2347  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
2348    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
2349    lt_status=$?
2350    case x$lt_status in
2351      x$lt_dlno_uscore) $1 ;;
2352      x$lt_dlneed_uscore) $2 ;;
2353      x$lt_dlunknown|x*) $3 ;;
2354    esac
2355  else :
2356    # compilation failed
2357    $3
2358  fi
2359fi
2360rm -fr conftest*
2361])# _LT_TRY_DLOPEN_SELF
2362
2363
2364# LT_SYS_DLOPEN_SELF
2365# ------------------
2366AC_DEFUN([LT_SYS_DLOPEN_SELF],
2367[m4_require([_LT_HEADER_DLFCN])dnl
2368if test "x$enable_dlopen" != xyes; then
2369  enable_dlopen=unknown
2370  enable_dlopen_self=unknown
2371  enable_dlopen_self_static=unknown
2372else
2373  lt_cv_dlopen=no
2374  lt_cv_dlopen_libs=
2375
2376  case $host_os in
2377  beos*)
2378    lt_cv_dlopen="load_add_on"
2379    lt_cv_dlopen_libs=
2380    lt_cv_dlopen_self=yes
2381    ;;
2382
2383  mingw* | pw32* | cegcc*)
2384    lt_cv_dlopen="LoadLibrary"
2385    lt_cv_dlopen_libs=
2386    ;;
2387
2388  cygwin*)
2389    lt_cv_dlopen="dlopen"
2390    lt_cv_dlopen_libs=
2391    ;;
2392
2393  darwin*)
2394  # if libdl is installed we need to link against it
2395    AC_CHECK_LIB([dl], [dlopen],
2396		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2397    lt_cv_dlopen="dyld"
2398    lt_cv_dlopen_libs=
2399    lt_cv_dlopen_self=yes
2400    ])
2401    ;;
2402
2403  *)
2404    AC_CHECK_FUNC([shl_load],
2405	  [lt_cv_dlopen="shl_load"],
2406      [AC_CHECK_LIB([dld], [shl_load],
2407	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
2408	[AC_CHECK_FUNC([dlopen],
2409	      [lt_cv_dlopen="dlopen"],
2410	  [AC_CHECK_LIB([dl], [dlopen],
2411		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2412	    [AC_CHECK_LIB([svld], [dlopen],
2413		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2414	      [AC_CHECK_LIB([dld], [dld_link],
2415		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
2416	      ])
2417	    ])
2418	  ])
2419	])
2420      ])
2421    ;;
2422  esac
2423
2424  if test "x$lt_cv_dlopen" != xno; then
2425    enable_dlopen=yes
2426  else
2427    enable_dlopen=no
2428  fi
2429
2430  case $lt_cv_dlopen in
2431  dlopen)
2432    save_CPPFLAGS="$CPPFLAGS"
2433    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2434
2435    save_LDFLAGS="$LDFLAGS"
2436    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2437
2438    save_LIBS="$LIBS"
2439    LIBS="$lt_cv_dlopen_libs $LIBS"
2440
2441    AC_CACHE_CHECK([whether a program can dlopen itself],
2442	  lt_cv_dlopen_self, [dnl
2443	  _LT_TRY_DLOPEN_SELF(
2444	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2445	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2446    ])
2447
2448    if test "x$lt_cv_dlopen_self" = xyes; then
2449      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2450      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2451	  lt_cv_dlopen_self_static, [dnl
2452	  _LT_TRY_DLOPEN_SELF(
2453	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2454	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
2455      ])
2456    fi
2457
2458    CPPFLAGS="$save_CPPFLAGS"
2459    LDFLAGS="$save_LDFLAGS"
2460    LIBS="$save_LIBS"
2461    ;;
2462  esac
2463
2464  case $lt_cv_dlopen_self in
2465  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2466  *) enable_dlopen_self=unknown ;;
2467  esac
2468
2469  case $lt_cv_dlopen_self_static in
2470  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2471  *) enable_dlopen_self_static=unknown ;;
2472  esac
2473fi
2474_LT_DECL([dlopen_support], [enable_dlopen], [0],
2475	 [Whether dlopen is supported])
2476_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2477	 [Whether dlopen of programs is supported])
2478_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2479	 [Whether dlopen of statically linked programs is supported])
2480])# LT_SYS_DLOPEN_SELF
2481
2482# Old name:
2483AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2484dnl aclocal-1.4 backwards compatibility:
2485dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2486
2487
2488# _LT_COMPILER_C_O([TAGNAME])
2489# ---------------------------
2490# Check to see if options -c and -o are simultaneously supported by compiler.
2491# This macro does not hard code the compiler like AC_PROG_CC_C_O.
2492m4_defun([_LT_COMPILER_C_O],
2493[m4_require([_LT_DECL_SED])dnl
2494m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2495m4_require([_LT_TAG_COMPILER])dnl
2496AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2497  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2498  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2499   $RM -r conftest 2>/dev/null
2500   mkdir conftest
2501   cd conftest
2502   mkdir out
2503   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2504
2505   lt_compiler_flag="-o out/conftest2.$ac_objext"
2506   # Insert the option either (1) after the last *FLAGS variable, or
2507   # (2) before a word containing "conftest.", or (3) at the end.
2508   # Note that $ac_compile itself does not contain backslashes and begins
2509   # with a dollar sign (not a hyphen), so the echo should work correctly.
2510   lt_compile=`echo "$ac_compile" | $SED \
2511   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2512   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2513   -e 's:$: $lt_compiler_flag:'`
2514   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2515   (eval "$lt_compile" 2>out/conftest.err)
2516   ac_status=$?
2517   cat out/conftest.err >&AS_MESSAGE_LOG_FD
2518   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2519   if (exit $ac_status) && test -s out/conftest2.$ac_objext
2520   then
2521     # The compiler can only warn and ignore the option if not recognized
2522     # So say no if there are warnings
2523     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
2524     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2525     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2526       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2527     fi
2528   fi
2529   chmod u+w . 2>&AS_MESSAGE_LOG_FD
2530   $RM conftest*
2531   # SGI C++ compiler will create directory out/ii_files/ for
2532   # template instantiation
2533   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2534   $RM out/* && rmdir out
2535   cd ..
2536   $RM -r conftest
2537   $RM conftest*
2538])
2539_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2540	[Does compiler simultaneously support -c and -o options?])
2541])# _LT_COMPILER_C_O
2542
2543
2544# _LT_COMPILER_FILE_LOCKS([TAGNAME])
2545# ----------------------------------
2546# Check to see if we can do hard links to lock some files if needed
2547m4_defun([_LT_COMPILER_FILE_LOCKS],
2548[m4_require([_LT_ENABLE_LOCK])dnl
2549m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2550_LT_COMPILER_C_O([$1])
2551
2552hard_links="nottested"
2553if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2554  # do not overwrite the value of need_locks provided by the user
2555  AC_MSG_CHECKING([if we can lock with hard links])
2556  hard_links=yes
2557  $RM conftest*
2558  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2559  touch conftest.a
2560  ln conftest.a conftest.b 2>&5 || hard_links=no
2561  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2562  AC_MSG_RESULT([$hard_links])
2563  if test "$hard_links" = no; then
2564    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2565    need_locks=warn
2566  fi
2567else
2568  need_locks=no
2569fi
2570_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2571])# _LT_COMPILER_FILE_LOCKS
2572
2573
2574# _LT_CHECK_OBJDIR
2575# ----------------
2576m4_defun([_LT_CHECK_OBJDIR],
2577[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2578[rm -f .libs 2>/dev/null
2579mkdir .libs 2>/dev/null
2580if test -d .libs; then
2581  lt_cv_objdir=.libs
2582else
2583  # MS-DOS does not allow filenames that begin with a dot.
2584  lt_cv_objdir=_libs
2585fi
2586rmdir .libs 2>/dev/null])
2587objdir=$lt_cv_objdir
2588_LT_DECL([], [objdir], [0],
2589         [The name of the directory that contains temporary libtool files])dnl
2590m4_pattern_allow([LT_OBJDIR])dnl
2591AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
2592  [Define to the sub-directory in which libtool stores uninstalled libraries.])
2593])# _LT_CHECK_OBJDIR
2594
2595
2596# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2597# --------------------------------------
2598# Check hardcoding attributes.
2599m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2600[AC_MSG_CHECKING([how to hardcode library paths into programs])
2601_LT_TAGVAR(hardcode_action, $1)=
2602if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2603   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2604   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2605
2606  # We can hardcode non-existent directories.
2607  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
2608     # If the only mechanism to avoid hardcoding is shlibpath_var, we
2609     # have to relink, otherwise we might link with an installed library
2610     # when we should be linking with a yet-to-be-installed one
2611     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2612     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
2613    # Linking always hardcodes the temporary library directory.
2614    _LT_TAGVAR(hardcode_action, $1)=relink
2615  else
2616    # We can link without hardcoding, and we can hardcode nonexisting dirs.
2617    _LT_TAGVAR(hardcode_action, $1)=immediate
2618  fi
2619else
2620  # We cannot hardcode anything, or else we can only hardcode existing
2621  # directories.
2622  _LT_TAGVAR(hardcode_action, $1)=unsupported
2623fi
2624AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2625
2626if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2627   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2628  # Fast installation is not supported
2629  enable_fast_install=no
2630elif test "$shlibpath_overrides_runpath" = yes ||
2631     test "$enable_shared" = no; then
2632  # Fast installation is not necessary
2633  enable_fast_install=needless
2634fi
2635_LT_TAGDECL([], [hardcode_action], [0],
2636    [How to hardcode a shared library path into an executable])
2637])# _LT_LINKER_HARDCODE_LIBPATH
2638
2639
2640# _LT_CMD_STRIPLIB
2641# ----------------
2642m4_defun([_LT_CMD_STRIPLIB],
2643[m4_require([_LT_DECL_EGREP])
2644striplib=
2645old_striplib=
2646AC_MSG_CHECKING([whether stripping libraries is possible])
2647if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2648  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2649  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2650  AC_MSG_RESULT([yes])
2651else
2652# FIXME - insert some real tests, host_os isn't really good enough
2653  case $host_os in
2654  darwin*)
2655    if test -n "$STRIP" ; then
2656      striplib="$STRIP -x"
2657      old_striplib="$STRIP -S"
2658      AC_MSG_RESULT([yes])
2659    else
2660      AC_MSG_RESULT([no])
2661    fi
2662    ;;
2663  *)
2664    AC_MSG_RESULT([no])
2665    ;;
2666  esac
2667fi
2668_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2669_LT_DECL([], [striplib], [1])
2670])# _LT_CMD_STRIPLIB
2671
2672
2673# _LT_SYS_DYNAMIC_LINKER([TAG])
2674# -----------------------------
2675# PORTME Fill in your ld.so characteristics
2676m4_defun([_LT_SYS_DYNAMIC_LINKER],
2677[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2678m4_require([_LT_DECL_EGREP])dnl
2679m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2680m4_require([_LT_DECL_OBJDUMP])dnl
2681m4_require([_LT_DECL_SED])dnl
2682AC_MSG_CHECKING([dynamic linker characteristics])
2683m4_if([$1],
2684	[], [
2685if test "$GCC" = yes; then
2686  case $host_os in
2687    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2688    *) lt_awk_arg="/^libraries:/" ;;
2689  esac
2690  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2691  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
2692    # if the path contains ";" then we assume it to be the separator
2693    # otherwise default to the standard path separator (i.e. ":") - it is
2694    # assumed that no part of a normal pathname contains ";" but that should
2695    # okay in the real world where ";" in dirpaths is itself problematic.
2696    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
2697  else
2698    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2699  fi
2700  # Ok, now we have the path, separated by spaces, we can step through it
2701  # and add multilib dir if necessary.
2702  lt_tmp_lt_search_path_spec=
2703  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2704  for lt_sys_path in $lt_search_path_spec; do
2705    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2706      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2707    else
2708      test -d "$lt_sys_path" && \
2709	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2710    fi
2711  done
2712  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
2713BEGIN {RS=" "; FS="/|\n";} {
2714  lt_foo="";
2715  lt_count=0;
2716  for (lt_i = NF; lt_i > 0; lt_i--) {
2717    if ($lt_i != "" && $lt_i != ".") {
2718      if ($lt_i == "..") {
2719        lt_count++;
2720      } else {
2721        if (lt_count == 0) {
2722          lt_foo="/" $lt_i lt_foo;
2723        } else {
2724          lt_count--;
2725        }
2726      }
2727    }
2728  }
2729  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2730  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2731}'`
2732  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
2733else
2734  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2735fi])
2736library_names_spec=
2737libname_spec='lib$name'
2738soname_spec=
2739shrext_cmds=".so"
2740postinstall_cmds=
2741postuninstall_cmds=
2742finish_cmds=
2743finish_eval=
2744shlibpath_var=
2745shlibpath_overrides_runpath=unknown
2746version_type=none
2747dynamic_linker="$host_os ld.so"
2748sys_lib_dlsearch_path_spec="/lib /usr/lib"
2749need_lib_prefix=unknown
2750hardcode_into_libs=no
2751
2752# when you set need_version to no, make sure it does not cause -set_version
2753# flags to be left without arguments
2754need_version=unknown
2755
2756case $host_os in
2757aix3*)
2758  version_type=linux
2759  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2760  shlibpath_var=LIBPATH
2761
2762  # AIX 3 has no versioning support, so we append a major version to the name.
2763  soname_spec='${libname}${release}${shared_ext}$major'
2764  ;;
2765
2766aix[[4-9]]*)
2767  version_type=linux
2768  need_lib_prefix=no
2769  need_version=no
2770  hardcode_into_libs=yes
2771  if test "$host_cpu" = ia64; then
2772    # AIX 5 supports IA64
2773    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2774    shlibpath_var=LD_LIBRARY_PATH
2775  else
2776    # With GCC up to 2.95.x, collect2 would create an import file
2777    # for dependence libraries.  The import file would start with
2778    # the line `#! .'.  This would cause the generated library to
2779    # depend on `.', always an invalid library.  This was fixed in
2780    # development snapshots of GCC prior to 3.0.
2781    case $host_os in
2782      aix4 | aix4.[[01]] | aix4.[[01]].*)
2783      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2784	   echo ' yes '
2785	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2786	:
2787      else
2788	can_build_shared=no
2789      fi
2790      ;;
2791    esac
2792    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2793    # soname into executable. Probably we can add versioning support to
2794    # collect2, so additional links can be useful in future.
2795    if test "$aix_use_runtimelinking" = yes; then
2796      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2797      # instead of lib<name>.a to let people know that these are not
2798      # typical AIX shared libraries.
2799      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2800    else
2801      # We preserve .a as extension for shared libraries through AIX4.2
2802      # and later when we are not doing run time linking.
2803      library_names_spec='${libname}${release}.a $libname.a'
2804      soname_spec='${libname}${release}${shared_ext}$major'
2805    fi
2806    shlibpath_var=LIBPATH
2807  fi
2808  ;;
2809
2810amigaos*)
2811  case $host_cpu in
2812  powerpc)
2813    # Since July 2007 AmigaOS4 officially supports .so libraries.
2814    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2815    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2816    ;;
2817  m68k)
2818    library_names_spec='$libname.ixlibrary $libname.a'
2819    # Create ${libname}_ixlibrary.a entries in /sys/libs.
2820    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''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'
2821    ;;
2822  esac
2823  ;;
2824
2825beos*)
2826  library_names_spec='${libname}${shared_ext}'
2827  dynamic_linker="$host_os ld.so"
2828  shlibpath_var=LIBRARY_PATH
2829  ;;
2830
2831bsdi[[45]]*)
2832  version_type=linux
2833  need_version=no
2834  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2835  soname_spec='${libname}${release}${shared_ext}$major'
2836  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2837  shlibpath_var=LD_LIBRARY_PATH
2838  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2839  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2840  # the default ld.so.conf also contains /usr/contrib/lib and
2841  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2842  # libtool to hard-code these into programs
2843  ;;
2844
2845cygwin* | mingw* | pw32* | cegcc*)
2846  version_type=windows
2847  shrext_cmds=".dll"
2848  need_version=no
2849  need_lib_prefix=no
2850
2851  case $GCC,$host_os in
2852  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
2853    library_names_spec='$libname.dll.a'
2854    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2855    postinstall_cmds='base_file=`basename \${file}`~
2856      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2857      dldir=$destdir/`dirname \$dlpath`~
2858      test -d \$dldir || mkdir -p \$dldir~
2859      $install_prog $dir/$dlname \$dldir/$dlname~
2860      chmod a+x \$dldir/$dlname~
2861      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2862        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2863      fi'
2864    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2865      dlpath=$dir/\$dldll~
2866       $RM \$dlpath'
2867    shlibpath_overrides_runpath=yes
2868
2869    case $host_os in
2870    cygwin*)
2871      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2872      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2873      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2874      ;;
2875    mingw* | cegcc*)
2876      # MinGW DLLs use traditional 'lib' prefix
2877      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2878      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2879      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2880        # It is most probably a Windows format PATH printed by
2881        # mingw gcc, but we are running on Cygwin. Gcc prints its search
2882        # path with ; separators, and with drive letters. We can handle the
2883        # drive letters (cygwin fileutils understands them), so leave them,
2884        # especially as we might pass files found there to a mingw objdump,
2885        # which wouldn't understand a cygwinified path. Ahh.
2886        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2887      else
2888        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2889      fi
2890      ;;
2891    pw32*)
2892      # pw32 DLLs use 'pw' prefix rather than 'lib'
2893      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2894      ;;
2895    esac
2896    ;;
2897
2898  *)
2899    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2900    ;;
2901  esac
2902  dynamic_linker='Win32 ld.exe'
2903  # FIXME: first we should search . and the directory the executable is in
2904  shlibpath_var=PATH
2905  ;;
2906
2907darwin* | rhapsody*)
2908  dynamic_linker="$host_os dyld"
2909  version_type=darwin
2910  need_lib_prefix=no
2911  need_version=no
2912  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2913  soname_spec='${libname}${release}${major}$shared_ext'
2914  shlibpath_overrides_runpath=yes
2915  shlibpath_var=DYLD_LIBRARY_PATH
2916  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2917m4_if([$1], [],[
2918  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2919  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2920  ;;
2921
2922dgux*)
2923  version_type=linux
2924  need_lib_prefix=no
2925  need_version=no
2926  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2927  soname_spec='${libname}${release}${shared_ext}$major'
2928  shlibpath_var=LD_LIBRARY_PATH
2929  ;;
2930
2931freebsd1*)
2932  dynamic_linker=no
2933  ;;
2934
2935freebsd* | dragonfly*)
2936  # DragonFly does not have aout.  When/if they implement a new
2937  # versioning mechanism, adjust this.
2938  if test -x /usr/bin/objformat; then
2939    objformat=`/usr/bin/objformat`
2940  else
2941    case $host_os in
2942    freebsd[[123]]*) objformat=aout ;;
2943    *) objformat=elf ;;
2944    esac
2945  fi
2946  version_type=freebsd-$objformat
2947  case $version_type in
2948    freebsd-elf*)
2949      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2950      need_version=no
2951      need_lib_prefix=no
2952      ;;
2953    freebsd-*)
2954      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2955      need_version=yes
2956      ;;
2957  esac
2958  shlibpath_var=LD_LIBRARY_PATH
2959  case $host_os in
2960  freebsd2*)
2961    shlibpath_overrides_runpath=yes
2962    ;;
2963  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2964    shlibpath_overrides_runpath=yes
2965    hardcode_into_libs=yes
2966    ;;
2967  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2968  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2969    shlibpath_overrides_runpath=no
2970    hardcode_into_libs=yes
2971    ;;
2972  *) # from 4.6 on, and DragonFly
2973    shlibpath_overrides_runpath=yes
2974    hardcode_into_libs=yes
2975    ;;
2976  esac
2977  ;;
2978
2979gnu*)
2980  version_type=linux
2981  need_lib_prefix=no
2982  need_version=no
2983  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2984  soname_spec='${libname}${release}${shared_ext}$major'
2985  shlibpath_var=LD_LIBRARY_PATH
2986  hardcode_into_libs=yes
2987  ;;
2988
2989hpux9* | hpux10* | hpux11*)
2990  # Give a soname corresponding to the major version so that dld.sl refuses to
2991  # link against other versions.
2992  version_type=sunos
2993  need_lib_prefix=no
2994  need_version=no
2995  case $host_cpu in
2996  ia64*)
2997    shrext_cmds='.so'
2998    hardcode_into_libs=yes
2999    dynamic_linker="$host_os dld.so"
3000    shlibpath_var=LD_LIBRARY_PATH
3001    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3002    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3003    soname_spec='${libname}${release}${shared_ext}$major'
3004    if test "X$HPUX_IA64_MODE" = X32; then
3005      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3006    else
3007      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3008    fi
3009    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3010    ;;
3011  hppa*64*)
3012    shrext_cmds='.sl'
3013    hardcode_into_libs=yes
3014    dynamic_linker="$host_os dld.sl"
3015    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3016    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3017    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3018    soname_spec='${libname}${release}${shared_ext}$major'
3019    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3020    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3021    ;;
3022  *)
3023    shrext_cmds='.sl'
3024    dynamic_linker="$host_os dld.sl"
3025    shlibpath_var=SHLIB_PATH
3026    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3027    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3028    soname_spec='${libname}${release}${shared_ext}$major'
3029    ;;
3030  esac
3031  # HP-UX runs *really* slowly unless shared libraries are mode 555.
3032  postinstall_cmds='chmod 555 $lib'
3033  ;;
3034
3035interix[[3-9]]*)
3036  version_type=linux
3037  need_lib_prefix=no
3038  need_version=no
3039  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3040  soname_spec='${libname}${release}${shared_ext}$major'
3041  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3042  shlibpath_var=LD_LIBRARY_PATH
3043  shlibpath_overrides_runpath=no
3044  hardcode_into_libs=yes
3045  ;;
3046
3047irix5* | irix6* | nonstopux*)
3048  case $host_os in
3049    nonstopux*) version_type=nonstopux ;;
3050    *)
3051	if test "$lt_cv_prog_gnu_ld" = yes; then
3052		version_type=linux
3053	else
3054		version_type=irix
3055	fi ;;
3056  esac
3057  need_lib_prefix=no
3058  need_version=no
3059  soname_spec='${libname}${release}${shared_ext}$major'
3060  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3061  case $host_os in
3062  irix5* | nonstopux*)
3063    libsuff= shlibsuff=
3064    ;;
3065  *)
3066    case $LD in # libtool.m4 will add one of these switches to LD
3067    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3068      libsuff= shlibsuff= libmagic=32-bit;;
3069    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3070      libsuff=32 shlibsuff=N32 libmagic=N32;;
3071    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3072      libsuff=64 shlibsuff=64 libmagic=64-bit;;
3073    *) libsuff= shlibsuff= libmagic=never-match;;
3074    esac
3075    ;;
3076  esac
3077  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3078  shlibpath_overrides_runpath=no
3079  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3080  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3081  hardcode_into_libs=yes
3082  ;;
3083
3084# No shared lib support for Linux oldld, aout, or coff.
3085linux*oldld* | linux*aout* | linux*coff*)
3086  dynamic_linker=no
3087  ;;
3088
3089# This must be Linux ELF.
3090linux* | k*bsd*-gnu)
3091  version_type=linux
3092  need_lib_prefix=no
3093  need_version=no
3094  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3095  soname_spec='${libname}${release}${shared_ext}$major'
3096  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3097  shlibpath_var=LD_LIBRARY_PATH
3098  shlibpath_overrides_runpath=no
3099  # Some binutils ld are patched to set DT_RUNPATH
3100  save_LDFLAGS=$LDFLAGS
3101  save_libdir=$libdir
3102  eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
3103       LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
3104  AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3105    [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
3106       [shlibpath_overrides_runpath=yes])])
3107  LDFLAGS=$save_LDFLAGS
3108  libdir=$save_libdir
3109
3110  # This implies no fast_install, which is unacceptable.
3111  # Some rework will be needed to allow for fast_install
3112  # before this can be enabled.
3113  hardcode_into_libs=yes
3114
3115  # Append ld.so.conf contents to the search path
3116  if test -f /etc/ld.so.conf; then
3117    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;/^$/d' | tr '\n' ' '`
3118    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
3119  fi
3120
3121  # We used to test for /lib/ld.so.1 and disable shared libraries on
3122  # powerpc, because MkLinux only supported shared libraries with the
3123  # GNU dynamic linker.  Since this was broken with cross compilers,
3124  # most powerpc-linux boxes support dynamic linking these days and
3125  # people can always --disable-shared, the test was removed, and we
3126  # assume the GNU/Linux dynamic linker is in use.
3127  dynamic_linker='GNU/Linux ld.so'
3128  ;;
3129
3130netbsd*)
3131  version_type=sunos
3132  need_lib_prefix=no
3133  need_version=no
3134  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
3135    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3136    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3137    dynamic_linker='NetBSD (a.out) ld.so'
3138  else
3139    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3140    soname_spec='${libname}${release}${shared_ext}$major'
3141    dynamic_linker='NetBSD ld.elf_so'
3142  fi
3143  shlibpath_var=LD_LIBRARY_PATH
3144  shlibpath_overrides_runpath=yes
3145  hardcode_into_libs=yes
3146  ;;
3147
3148newsos6)
3149  version_type=linux
3150  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3151  shlibpath_var=LD_LIBRARY_PATH
3152  shlibpath_overrides_runpath=yes
3153  ;;
3154
3155*nto* | *qnx*)
3156  version_type=qnx
3157  need_lib_prefix=no
3158  need_version=no
3159  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3160  soname_spec='${libname}${release}${shared_ext}$major'
3161  shlibpath_var=LD_LIBRARY_PATH
3162  shlibpath_overrides_runpath=no
3163  hardcode_into_libs=yes
3164  dynamic_linker='ldqnx.so'
3165  ;;
3166
3167openbsd*)
3168  version_type=sunos
3169  sys_lib_dlsearch_path_spec="/usr/lib"
3170  need_lib_prefix=no
3171  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
3172  case $host_os in
3173    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
3174    *)				need_version=no  ;;
3175  esac
3176  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3177  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3178  shlibpath_var=LD_LIBRARY_PATH
3179  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3180    case $host_os in
3181      openbsd2.[[89]] | openbsd2.[[89]].*)
3182	shlibpath_overrides_runpath=no
3183	;;
3184      *)
3185	shlibpath_overrides_runpath=yes
3186	;;
3187      esac
3188  else
3189    shlibpath_overrides_runpath=yes
3190  fi
3191  ;;
3192
3193os2*)
3194  libname_spec='$name'
3195  shrext_cmds=".dll"
3196  need_lib_prefix=no
3197  library_names_spec='$libname${shared_ext} $libname.a'
3198  dynamic_linker='OS/2 ld.exe'
3199  shlibpath_var=LIBPATH
3200  ;;
3201
3202osf3* | osf4* | osf5*)
3203  version_type=osf
3204  need_lib_prefix=no
3205  need_version=no
3206  soname_spec='${libname}${release}${shared_ext}$major'
3207  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3208  shlibpath_var=LD_LIBRARY_PATH
3209  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3210  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3211  ;;
3212
3213rdos*)
3214  dynamic_linker=no
3215  ;;
3216
3217solaris*)
3218  version_type=linux
3219  need_lib_prefix=no
3220  need_version=no
3221  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3222  soname_spec='${libname}${release}${shared_ext}$major'
3223  shlibpath_var=LD_LIBRARY_PATH
3224  shlibpath_overrides_runpath=yes
3225  hardcode_into_libs=yes
3226  # ldd complains unless libraries are executable
3227  postinstall_cmds='chmod +x $lib'
3228  ;;
3229
3230sunos4*)
3231  version_type=sunos
3232  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3233  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3234  shlibpath_var=LD_LIBRARY_PATH
3235  shlibpath_overrides_runpath=yes
3236  if test "$with_gnu_ld" = yes; then
3237    need_lib_prefix=no
3238  fi
3239  need_version=yes
3240  ;;
3241
3242sysv4 | sysv4.3*)
3243  version_type=linux
3244  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3245  soname_spec='${libname}${release}${shared_ext}$major'
3246  shlibpath_var=LD_LIBRARY_PATH
3247  case $host_vendor in
3248    sni)
3249      shlibpath_overrides_runpath=no
3250      need_lib_prefix=no
3251      runpath_var=LD_RUN_PATH
3252      ;;
3253    siemens)
3254      need_lib_prefix=no
3255      ;;
3256    motorola)
3257      need_lib_prefix=no
3258      need_version=no
3259      shlibpath_overrides_runpath=no
3260      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3261      ;;
3262  esac
3263  ;;
3264
3265sysv4*MP*)
3266  if test -d /usr/nec ;then
3267    version_type=linux
3268    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
3269    soname_spec='$libname${shared_ext}.$major'
3270    shlibpath_var=LD_LIBRARY_PATH
3271  fi
3272  ;;
3273
3274sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3275  version_type=freebsd-elf
3276  need_lib_prefix=no
3277  need_version=no
3278  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3279  soname_spec='${libname}${release}${shared_ext}$major'
3280  shlibpath_var=LD_LIBRARY_PATH
3281  shlibpath_overrides_runpath=yes
3282  hardcode_into_libs=yes
3283  if test "$with_gnu_ld" = yes; then
3284    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3285  else
3286    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3287    case $host_os in
3288      sco3.2v5*)
3289        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3290	;;
3291    esac
3292  fi
3293  sys_lib_dlsearch_path_spec='/usr/lib'
3294  ;;
3295
3296tpf*)
3297  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
3298  version_type=linux
3299  need_lib_prefix=no
3300  need_version=no
3301  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3302  shlibpath_var=LD_LIBRARY_PATH
3303  shlibpath_overrides_runpath=no
3304  hardcode_into_libs=yes
3305  ;;
3306
3307uts4*)
3308  version_type=linux
3309  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3310  soname_spec='${libname}${release}${shared_ext}$major'
3311  shlibpath_var=LD_LIBRARY_PATH
3312  ;;
3313
3314*)
3315  dynamic_linker=no
3316  ;;
3317esac
3318AC_MSG_RESULT([$dynamic_linker])
3319test "$dynamic_linker" = no && can_build_shared=no
3320
3321variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3322if test "$GCC" = yes; then
3323  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3324fi
3325
3326if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
3327  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
3328fi
3329if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
3330  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
3331fi
3332
3333_LT_DECL([], [variables_saved_for_relink], [1],
3334    [Variables whose values should be saved in libtool wrapper scripts and
3335    restored at link time])
3336_LT_DECL([], [need_lib_prefix], [0],
3337    [Do we need the "lib" prefix for modules?])
3338_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3339_LT_DECL([], [version_type], [0], [Library versioning type])
3340_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
3341_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3342_LT_DECL([], [shlibpath_overrides_runpath], [0],
3343    [Is shlibpath searched before the hard-coded library search path?])
3344_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3345_LT_DECL([], [library_names_spec], [1],
3346    [[List of archive names.  First name is the real one, the rest are links.
3347    The last name is the one that the linker finds with -lNAME]])
3348_LT_DECL([], [soname_spec], [1],
3349    [[The coded name of the library, if different from the real name]])
3350_LT_DECL([], [postinstall_cmds], [2],
3351    [Command to use after installation of a shared archive])
3352_LT_DECL([], [postuninstall_cmds], [2],
3353    [Command to use after uninstallation of a shared archive])
3354_LT_DECL([], [finish_cmds], [2],
3355    [Commands used to finish a libtool library installation in a directory])
3356_LT_DECL([], [finish_eval], [1],
3357    [[As "finish_cmds", except a single script fragment to be evaled but
3358    not shown]])
3359_LT_DECL([], [hardcode_into_libs], [0],
3360    [Whether we should hardcode library paths into libraries])
3361_LT_DECL([], [sys_lib_search_path_spec], [2],
3362    [Compile-time system search path for libraries])
3363_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
3364    [Run-time system search path for libraries])
3365])# _LT_SYS_DYNAMIC_LINKER
3366
3367
3368# _LT_PATH_TOOL_PREFIX(TOOL)
3369# --------------------------
3370# find a file program which can recognize shared library
3371AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3372[m4_require([_LT_DECL_EGREP])dnl
3373AC_MSG_CHECKING([for $1])
3374AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3375[case $MAGIC_CMD in
3376[[\\/*] |  ?:[\\/]*])
3377  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3378  ;;
3379*)
3380  lt_save_MAGIC_CMD="$MAGIC_CMD"
3381  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3382dnl $ac_dummy forces splitting on constant user-supplied paths.
3383dnl POSIX.2 word splitting is done only on the output of word expansions,
3384dnl not every word.  This closes a longstanding sh security hole.
3385  ac_dummy="m4_if([$2], , $PATH, [$2])"
3386  for ac_dir in $ac_dummy; do
3387    IFS="$lt_save_ifs"
3388    test -z "$ac_dir" && ac_dir=.
3389    if test -f $ac_dir/$1; then
3390      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3391      if test -n "$file_magic_test_file"; then
3392	case $deplibs_check_method in
3393	"file_magic "*)
3394	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3395	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3396	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3397	    $EGREP "$file_magic_regex" > /dev/null; then
3398	    :
3399	  else
3400	    cat <<_LT_EOF 1>&2
3401
3402*** Warning: the command libtool uses to detect shared libraries,
3403*** $file_magic_cmd, produces output that libtool cannot recognize.
3404*** The result is that libtool may fail to recognize shared libraries
3405*** as such.  This will affect the creation of libtool libraries that
3406*** depend on shared libraries, but programs linked with such libtool
3407*** libraries will work regardless of this problem.  Nevertheless, you
3408*** may want to report the problem to your system manager and/or to
3409*** bug-libtool@gnu.org
3410
3411_LT_EOF
3412	  fi ;;
3413	esac
3414      fi
3415      break
3416    fi
3417  done
3418  IFS="$lt_save_ifs"
3419  MAGIC_CMD="$lt_save_MAGIC_CMD"
3420  ;;
3421esac])
3422MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3423if test -n "$MAGIC_CMD"; then
3424  AC_MSG_RESULT($MAGIC_CMD)
3425else
3426  AC_MSG_RESULT(no)
3427fi
3428_LT_DECL([], [MAGIC_CMD], [0],
3429	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3430])# _LT_PATH_TOOL_PREFIX
3431
3432# Old name:
3433AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3434dnl aclocal-1.4 backwards compatibility:
3435dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3436
3437
3438# _LT_PATH_MAGIC
3439# --------------
3440# find a file program which can recognize a shared library
3441m4_defun([_LT_PATH_MAGIC],
3442[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3443if test -z "$lt_cv_path_MAGIC_CMD"; then
3444  if test -n "$ac_tool_prefix"; then
3445    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3446  else
3447    MAGIC_CMD=:
3448  fi
3449fi
3450])# _LT_PATH_MAGIC
3451
3452
3453# LT_PATH_LD
3454# ----------
3455# find the pathname to the GNU or non-GNU linker
3456AC_DEFUN([LT_PATH_LD],
3457[AC_REQUIRE([AC_PROG_CC])dnl
3458AC_REQUIRE([AC_CANONICAL_HOST])dnl
3459AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3460m4_require([_LT_DECL_SED])dnl
3461m4_require([_LT_DECL_EGREP])dnl
3462
3463AC_ARG_WITH([gnu-ld],
3464    [AS_HELP_STRING([--with-gnu-ld],
3465	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
3466    [test "$withval" = no || with_gnu_ld=yes],
3467    [with_gnu_ld=no])dnl
3468
3469ac_prog=ld
3470if test "$GCC" = yes; then
3471  # Check if gcc -print-prog-name=ld gives a path.
3472  AC_MSG_CHECKING([for ld used by $CC])
3473  case $host in
3474  *-*-mingw*)
3475    # gcc leaves a trailing carriage return which upsets mingw
3476    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3477  *)
3478    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3479  esac
3480  case $ac_prog in
3481    # Accept absolute paths.
3482    [[\\/]]* | ?:[[\\/]]*)
3483      re_direlt='/[[^/]][[^/]]*/\.\./'
3484      # Canonicalize the pathname of ld
3485      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3486      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3487	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3488      done
3489      test -z "$LD" && LD="$ac_prog"
3490      ;;
3491  "")
3492    # If it fails, then pretend we aren't using GCC.
3493    ac_prog=ld
3494    ;;
3495  *)
3496    # If it is relative, then search for the first ld in PATH.
3497    with_gnu_ld=unknown
3498    ;;
3499  esac
3500elif test "$with_gnu_ld" = yes; then
3501  AC_MSG_CHECKING([for GNU ld])
3502else
3503  AC_MSG_CHECKING([for non-GNU ld])
3504fi
3505AC_CACHE_VAL(lt_cv_path_LD,
3506[if test -z "$LD"; then
3507  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3508  for ac_dir in $PATH; do
3509    IFS="$lt_save_ifs"
3510    test -z "$ac_dir" && ac_dir=.
3511    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3512      lt_cv_path_LD="$ac_dir/$ac_prog"
3513      # Check to see if the program is GNU ld.  I'd rather use --version,
3514      # but apparently some variants of GNU ld only accept -v.
3515      # Break only if it was the GNU/non-GNU ld that we prefer.
3516      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3517      *GNU* | *'with BFD'*)
3518	test "$with_gnu_ld" != no && break
3519	;;
3520      *)
3521	test "$with_gnu_ld" != yes && break
3522	;;
3523      esac
3524    fi
3525  done
3526  IFS="$lt_save_ifs"
3527else
3528  lt_cv_path_LD="$LD" # Let the user override the test with a path.
3529fi])
3530LD="$lt_cv_path_LD"
3531if test -n "$LD"; then
3532  AC_MSG_RESULT($LD)
3533else
3534  AC_MSG_RESULT(no)
3535fi
3536test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3537_LT_PATH_LD_GNU
3538AC_SUBST([LD])
3539
3540_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3541])# LT_PATH_LD
3542
3543# Old names:
3544AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3545AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3546dnl aclocal-1.4 backwards compatibility:
3547dnl AC_DEFUN([AM_PROG_LD], [])
3548dnl AC_DEFUN([AC_PROG_LD], [])
3549
3550
3551# _LT_PATH_LD_GNU
3552#- --------------
3553m4_defun([_LT_PATH_LD_GNU],
3554[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3555[# I'd rather use --version here, but apparently some GNU lds only accept -v.
3556case `$LD -v 2>&1 </dev/null` in
3557*GNU* | *'with BFD'*)
3558  lt_cv_prog_gnu_ld=yes
3559  ;;
3560*)
3561  lt_cv_prog_gnu_ld=no
3562  ;;
3563esac])
3564with_gnu_ld=$lt_cv_prog_gnu_ld
3565])# _LT_PATH_LD_GNU
3566
3567
3568# _LT_CMD_RELOAD
3569# --------------
3570# find reload flag for linker
3571#   -- PORTME Some linkers may need a different reload flag.
3572m4_defun([_LT_CMD_RELOAD],
3573[AC_CACHE_CHECK([for $LD option to reload object files],
3574  lt_cv_ld_reload_flag,
3575  [lt_cv_ld_reload_flag='-r'])
3576reload_flag=$lt_cv_ld_reload_flag
3577case $reload_flag in
3578"" | " "*) ;;
3579*) reload_flag=" $reload_flag" ;;
3580esac
3581reload_cmds='$LD$reload_flag -o $output$reload_objs'
3582case $host_os in
3583  darwin*)
3584    if test "$GCC" = yes; then
3585      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3586    else
3587      reload_cmds='$LD$reload_flag -o $output$reload_objs'
3588    fi
3589    ;;
3590esac
3591_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3592_LT_DECL([], [reload_cmds], [2])dnl
3593])# _LT_CMD_RELOAD
3594
3595
3596# _LT_CHECK_MAGIC_METHOD
3597# ----------------------
3598# how to check for library dependencies
3599#  -- PORTME fill in with the dynamic library characteristics
3600m4_defun([_LT_CHECK_MAGIC_METHOD],
3601[m4_require([_LT_DECL_EGREP])
3602m4_require([_LT_DECL_OBJDUMP])
3603AC_CACHE_CHECK([how to recognize dependent libraries],
3604lt_cv_deplibs_check_method,
3605[lt_cv_file_magic_cmd='$MAGIC_CMD'
3606lt_cv_file_magic_test_file=
3607lt_cv_deplibs_check_method='unknown'
3608# Need to set the preceding variable on all platforms that support
3609# interlibrary dependencies.
3610# 'none' -- dependencies not supported.
3611# `unknown' -- same as none, but documents that we really don't know.
3612# 'pass_all' -- all dependencies passed with no checks.
3613# 'test_compile' -- check by making test program.
3614# 'file_magic [[regex]]' -- check by looking for files in library path
3615# which responds to the $file_magic_cmd with a given extended regex.
3616# If you have `file' or equivalent on your system and you're not sure
3617# whether `pass_all' will *always* work, you probably want this one.
3618
3619case $host_os in
3620aix[[4-9]]*)
3621  lt_cv_deplibs_check_method=pass_all
3622  ;;
3623
3624beos*)
3625  lt_cv_deplibs_check_method=pass_all
3626  ;;
3627
3628bsdi[[45]]*)
3629  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3630  lt_cv_file_magic_cmd='/usr/bin/file -L'
3631  lt_cv_file_magic_test_file=/shlib/libc.so
3632  ;;
3633
3634cygwin*)
3635  # func_win32_libid is a shell function defined in ltmain.sh
3636  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3637  lt_cv_file_magic_cmd='func_win32_libid'
3638  ;;
3639
3640mingw* | pw32*)
3641  # Base MSYS/MinGW do not provide the 'file' command needed by
3642  # func_win32_libid shell function, so use a weaker test based on 'objdump',
3643  # unless we find 'file', for example because we are cross-compiling.
3644  if ( file / ) >/dev/null 2>&1; then
3645    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3646    lt_cv_file_magic_cmd='func_win32_libid'
3647  else
3648    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3649    lt_cv_file_magic_cmd='$OBJDUMP -f'
3650  fi
3651  ;;
3652
3653cegcc)
3654  # use the weaker test based on 'objdump'. See mingw*.
3655  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3656  lt_cv_file_magic_cmd='$OBJDUMP -f'
3657  ;;
3658
3659darwin* | rhapsody*)
3660  lt_cv_deplibs_check_method=pass_all
3661  ;;
3662
3663freebsd* | dragonfly*)
3664  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3665    case $host_cpu in
3666    i*86 )
3667      # Not sure whether the presence of OpenBSD here was a mistake.
3668      # Let's accept both of them until this is cleared up.
3669      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3670      lt_cv_file_magic_cmd=/usr/bin/file
3671      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3672      ;;
3673    esac
3674  else
3675    lt_cv_deplibs_check_method=pass_all
3676  fi
3677  ;;
3678
3679gnu*)
3680  lt_cv_deplibs_check_method=pass_all
3681  ;;
3682
3683hpux10.20* | hpux11*)
3684  lt_cv_file_magic_cmd=/usr/bin/file
3685  case $host_cpu in
3686  ia64*)
3687    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3688    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3689    ;;
3690  hppa*64*)
3691    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
3692    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3693    ;;
3694  *)
3695    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3696    lt_cv_file_magic_test_file=/usr/lib/libc.sl
3697    ;;
3698  esac
3699  ;;
3700
3701interix[[3-9]]*)
3702  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3703  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3704  ;;
3705
3706irix5* | irix6* | nonstopux*)
3707  case $LD in
3708  *-32|*"-32 ") libmagic=32-bit;;
3709  *-n32|*"-n32 ") libmagic=N32;;
3710  *-64|*"-64 ") libmagic=64-bit;;
3711  *) libmagic=never-match;;
3712  esac
3713  lt_cv_deplibs_check_method=pass_all
3714  ;;
3715
3716# This must be Linux ELF.
3717linux* | k*bsd*-gnu)
3718  lt_cv_deplibs_check_method=pass_all
3719  ;;
3720
3721netbsd*)
3722  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3723    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3724  else
3725    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3726  fi
3727  ;;
3728
3729newos6*)
3730  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3731  lt_cv_file_magic_cmd=/usr/bin/file
3732  lt_cv_file_magic_test_file=/usr/lib/libnls.so
3733  ;;
3734
3735*nto* | *qnx*)
3736  lt_cv_deplibs_check_method=pass_all
3737  ;;
3738
3739openbsd*)
3740  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3741    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3742  else
3743    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3744  fi
3745  ;;
3746
3747osf3* | osf4* | osf5*)
3748  lt_cv_deplibs_check_method=pass_all
3749  ;;
3750
3751rdos*)
3752  lt_cv_deplibs_check_method=pass_all
3753  ;;
3754
3755solaris*)
3756  lt_cv_deplibs_check_method=pass_all
3757  ;;
3758
3759sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3760  lt_cv_deplibs_check_method=pass_all
3761  ;;
3762
3763sysv4 | sysv4.3*)
3764  case $host_vendor in
3765  motorola)
3766    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]]'
3767    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3768    ;;
3769  ncr)
3770    lt_cv_deplibs_check_method=pass_all
3771    ;;
3772  sequent)
3773    lt_cv_file_magic_cmd='/bin/file'
3774    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3775    ;;
3776  sni)
3777    lt_cv_file_magic_cmd='/bin/file'
3778    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3779    lt_cv_file_magic_test_file=/lib/libc.so
3780    ;;
3781  siemens)
3782    lt_cv_deplibs_check_method=pass_all
3783    ;;
3784  pc)
3785    lt_cv_deplibs_check_method=pass_all
3786    ;;
3787  esac
3788  ;;
3789
3790tpf*)
3791  lt_cv_deplibs_check_method=pass_all
3792  ;;
3793esac
3794])
3795file_magic_cmd=$lt_cv_file_magic_cmd
3796deplibs_check_method=$lt_cv_deplibs_check_method
3797test -z "$deplibs_check_method" && deplibs_check_method=unknown
3798
3799_LT_DECL([], [deplibs_check_method], [1],
3800    [Method to check whether dependent libraries are shared objects])
3801_LT_DECL([], [file_magic_cmd], [1],
3802    [Command to use when deplibs_check_method == "file_magic"])
3803])# _LT_CHECK_MAGIC_METHOD
3804
3805
3806# LT_PATH_NM
3807# ----------
3808# find the pathname to a BSD- or MS-compatible name lister
3809AC_DEFUN([LT_PATH_NM],
3810[AC_REQUIRE([AC_PROG_CC])dnl
3811AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3812[if test -n "$NM"; then
3813  # Let the user override the test.
3814  lt_cv_path_NM="$NM"
3815else
3816  lt_nm_to_check="${ac_tool_prefix}nm"
3817  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3818    lt_nm_to_check="$lt_nm_to_check nm"
3819  fi
3820  for lt_tmp_nm in $lt_nm_to_check; do
3821    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3822    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3823      IFS="$lt_save_ifs"
3824      test -z "$ac_dir" && ac_dir=.
3825      tmp_nm="$ac_dir/$lt_tmp_nm"
3826      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3827	# Check to see if the nm accepts a BSD-compat flag.
3828	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
3829	#   nm: unknown option "B" ignored
3830	# Tru64's nm complains that /dev/null is an invalid object file
3831	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3832	*/dev/null* | *'Invalid file or object type'*)
3833	  lt_cv_path_NM="$tmp_nm -B"
3834	  break
3835	  ;;
3836	*)
3837	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3838	  */dev/null*)
3839	    lt_cv_path_NM="$tmp_nm -p"
3840	    break
3841	    ;;
3842	  *)
3843	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3844	    continue # so that we can try to find one that supports BSD flags
3845	    ;;
3846	  esac
3847	  ;;
3848	esac
3849      fi
3850    done
3851    IFS="$lt_save_ifs"
3852  done
3853  : ${lt_cv_path_NM=no}
3854fi])
3855if test "$lt_cv_path_NM" != "no"; then
3856  NM="$lt_cv_path_NM"
3857else
3858  # Didn't find any BSD compatible name lister, look for dumpbin.
3859  AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
3860  AC_SUBST([DUMPBIN])
3861  if test "$DUMPBIN" != ":"; then
3862    NM="$DUMPBIN"
3863  fi
3864fi
3865test -z "$NM" && NM=nm
3866AC_SUBST([NM])
3867_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3868
3869AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3870  [lt_cv_nm_interface="BSD nm"
3871  echo "int some_variable = 0;" > conftest.$ac_ext
3872  (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3873  (eval "$ac_compile" 2>conftest.err)
3874  cat conftest.err >&AS_MESSAGE_LOG_FD
3875  (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3876  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3877  cat conftest.err >&AS_MESSAGE_LOG_FD
3878  (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
3879  cat conftest.out >&AS_MESSAGE_LOG_FD
3880  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3881    lt_cv_nm_interface="MS dumpbin"
3882  fi
3883  rm -f conftest*])
3884])# LT_PATH_NM
3885
3886# Old names:
3887AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3888AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3889dnl aclocal-1.4 backwards compatibility:
3890dnl AC_DEFUN([AM_PROG_NM], [])
3891dnl AC_DEFUN([AC_PROG_NM], [])
3892
3893
3894# LT_LIB_M
3895# --------
3896# check for math library
3897AC_DEFUN([LT_LIB_M],
3898[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3899LIBM=
3900case $host in
3901*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3902  # These system don't have libm, or don't need it
3903  ;;
3904*-ncr-sysv4.3*)
3905  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3906  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3907  ;;
3908*)
3909  AC_CHECK_LIB(m, cos, LIBM="-lm")
3910  ;;
3911esac
3912AC_SUBST([LIBM])
3913])# LT_LIB_M
3914
3915# Old name:
3916AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3917dnl aclocal-1.4 backwards compatibility:
3918dnl AC_DEFUN([AC_CHECK_LIBM], [])
3919
3920
3921# _LT_COMPILER_NO_RTTI([TAGNAME])
3922# -------------------------------
3923m4_defun([_LT_COMPILER_NO_RTTI],
3924[m4_require([_LT_TAG_COMPILER])dnl
3925
3926_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3927
3928if test "$GCC" = yes; then
3929  _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3930
3931  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3932    lt_cv_prog_compiler_rtti_exceptions,
3933    [-fno-rtti -fno-exceptions], [],
3934    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3935fi
3936_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3937	[Compiler flag to turn off builtin functions])
3938])# _LT_COMPILER_NO_RTTI
3939
3940
3941# _LT_CMD_GLOBAL_SYMBOLS
3942# ----------------------
3943m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3944[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3945AC_REQUIRE([AC_PROG_CC])dnl
3946AC_REQUIRE([LT_PATH_NM])dnl
3947AC_REQUIRE([LT_PATH_LD])dnl
3948m4_require([_LT_DECL_SED])dnl
3949m4_require([_LT_DECL_EGREP])dnl
3950m4_require([_LT_TAG_COMPILER])dnl
3951
3952# Check for command to grab the raw symbol name followed by C symbol from nm.
3953AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3954AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3955[
3956# These are sane defaults that work on at least a few old systems.
3957# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3958
3959# Character class describing NM global symbol codes.
3960symcode='[[BCDEGRST]]'
3961
3962# Regexp to match symbols that can be accessed directly from C.
3963sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3964
3965# Define system-specific variables.
3966case $host_os in
3967aix*)
3968  symcode='[[BCDT]]'
3969  ;;
3970cygwin* | mingw* | pw32* | cegcc*)
3971  symcode='[[ABCDGISTW]]'
3972  ;;
3973hpux*)
3974  if test "$host_cpu" = ia64; then
3975    symcode='[[ABCDEGRST]]'
3976  fi
3977  ;;
3978irix* | nonstopux*)
3979  symcode='[[BCDEGRST]]'
3980  ;;
3981osf*)
3982  symcode='[[BCDEGQRST]]'
3983  ;;
3984solaris*)
3985  symcode='[[BDRT]]'
3986  ;;
3987sco3.2v5*)
3988  symcode='[[DT]]'
3989  ;;
3990sysv4.2uw2*)
3991  symcode='[[DT]]'
3992  ;;
3993sysv5* | sco5v6* | unixware* | OpenUNIX*)
3994  symcode='[[ABDT]]'
3995  ;;
3996sysv4)
3997  symcode='[[DFNSTU]]'
3998  ;;
3999esac
4000
4001# If we're using GNU nm, then use its standard symbol codes.
4002case `$NM -V 2>&1` in
4003*GNU* | *'with BFD'*)
4004  symcode='[[ABCDGIRSTW]]' ;;
4005esac
4006
4007# Transform an extracted symbol line into a proper C declaration.
4008# Some systems (esp. on ia64) link data and code symbols differently,
4009# so use this general approach.
4010lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4011
4012# Transform an extracted symbol line into symbol name and symbol address
4013lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
4014lt_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'"
4015
4016# Handle CRLF in mingw tool chain
4017opt_cr=
4018case $build_os in
4019mingw*)
4020  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4021  ;;
4022esac
4023
4024# Try without a prefix underscore, then with it.
4025for ac_symprfx in "" "_"; do
4026
4027  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4028  symxfrm="\\1 $ac_symprfx\\2 \\2"
4029
4030  # Write the raw and C identifiers.
4031  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4032    # Fake it for dumpbin and say T for any non-static function
4033    # and D for any global variable.
4034    # Also find C++ and __fastcall symbols from MSVC++,
4035    # which start with @ or ?.
4036    lt_cv_sys_global_symbol_pipe="$AWK ['"\
4037"     {last_section=section; section=\$ 3};"\
4038"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4039"     \$ 0!~/External *\|/{next};"\
4040"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4041"     {if(hide[section]) next};"\
4042"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
4043"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
4044"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
4045"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
4046"     ' prfx=^$ac_symprfx]"
4047  else
4048    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4049  fi
4050
4051  # Check to see that the pipe works correctly.
4052  pipe_works=no
4053
4054  rm -f conftest*
4055  cat > conftest.$ac_ext <<_LT_EOF
4056#ifdef __cplusplus
4057extern "C" {
4058#endif
4059char nm_test_var;
4060void nm_test_func(void);
4061void nm_test_func(void){}
4062#ifdef __cplusplus
4063}
4064#endif
4065int main(){nm_test_var='a';nm_test_func();return(0);}
4066_LT_EOF
4067
4068  if AC_TRY_EVAL(ac_compile); then
4069    # Now try to grab the symbols.
4070    nlist=conftest.nm
4071    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4072      # Try sorting and uniquifying the output.
4073      if sort "$nlist" | uniq > "$nlist"T; then
4074	mv -f "$nlist"T "$nlist"
4075      else
4076	rm -f "$nlist"T
4077      fi
4078
4079      # Make sure that we snagged all the symbols we need.
4080      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4081	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4082	  cat <<_LT_EOF > conftest.$ac_ext
4083#ifdef __cplusplus
4084extern "C" {
4085#endif
4086
4087_LT_EOF
4088	  # Now generate the symbol file.
4089	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4090
4091	  cat <<_LT_EOF >> conftest.$ac_ext
4092
4093/* The mapping between symbol names and symbols.  */
4094const struct {
4095  const char *name;
4096  void       *address;
4097}
4098lt__PROGRAM__LTX_preloaded_symbols[[]] =
4099{
4100  { "@PROGRAM@", (void *) 0 },
4101_LT_EOF
4102	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4103	  cat <<\_LT_EOF >> conftest.$ac_ext
4104  {0, (void *) 0}
4105};
4106
4107/* This works around a problem in FreeBSD linker */
4108#ifdef FREEBSD_WORKAROUND
4109static const void *lt_preloaded_setup() {
4110  return lt__PROGRAM__LTX_preloaded_symbols;
4111}
4112#endif
4113
4114#ifdef __cplusplus
4115}
4116#endif
4117_LT_EOF
4118	  # Now try linking the two files.
4119	  mv conftest.$ac_objext conftstm.$ac_objext
4120	  lt_save_LIBS="$LIBS"
4121	  lt_save_CFLAGS="$CFLAGS"
4122	  LIBS="conftstm.$ac_objext"
4123	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4124	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4125	    pipe_works=yes
4126	  fi
4127	  LIBS="$lt_save_LIBS"
4128	  CFLAGS="$lt_save_CFLAGS"
4129	else
4130	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4131	fi
4132      else
4133	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4134      fi
4135    else
4136      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4137    fi
4138  else
4139    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4140    cat conftest.$ac_ext >&5
4141  fi
4142  rm -rf conftest* conftst*
4143
4144  # Do not use the global_symbol_pipe unless it works.
4145  if test "$pipe_works" = yes; then
4146    break
4147  else
4148    lt_cv_sys_global_symbol_pipe=
4149  fi
4150done
4151])
4152if test -z "$lt_cv_sys_global_symbol_pipe"; then
4153  lt_cv_sys_global_symbol_to_cdecl=
4154fi
4155if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4156  AC_MSG_RESULT(failed)
4157else
4158  AC_MSG_RESULT(ok)
4159fi
4160
4161_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4162    [Take the output of nm and produce a listing of raw symbols and C names])
4163_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4164    [Transform the output of nm in a proper C declaration])
4165_LT_DECL([global_symbol_to_c_name_address],
4166    [lt_cv_sys_global_symbol_to_c_name_address], [1],
4167    [Transform the output of nm in a C name address pair])
4168_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4169    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4170    [Transform the output of nm in a C name address pair when lib prefix is needed])
4171]) # _LT_CMD_GLOBAL_SYMBOLS
4172
4173
4174# _LT_COMPILER_PIC([TAGNAME])
4175# ---------------------------
4176m4_defun([_LT_COMPILER_PIC],
4177[m4_require([_LT_TAG_COMPILER])dnl
4178_LT_TAGVAR(lt_prog_compiler_wl, $1)=
4179_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4180_LT_TAGVAR(lt_prog_compiler_static, $1)=
4181
4182AC_MSG_CHECKING([for $compiler option to produce PIC])
4183m4_if([$1], [CXX], [
4184  # C++ specific cases for pic, static, wl, etc.
4185  if test "$GXX" = yes; then
4186    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4187    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4188
4189    case $host_os in
4190    aix*)
4191      # All AIX code is PIC.
4192      if test "$host_cpu" = ia64; then
4193	# AIX 5 now supports IA64 processor
4194	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4195      fi
4196      ;;
4197
4198    amigaos*)
4199      case $host_cpu in
4200      powerpc)
4201            # see comment about AmigaOS4 .so support
4202            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4203        ;;
4204      m68k)
4205            # FIXME: we need at least 68020 code to build shared libraries, but
4206            # adding the `-m68020' flag to GCC prevents building anything better,
4207            # like `-m68040'.
4208            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4209        ;;
4210      esac
4211      ;;
4212
4213    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4214      # PIC is the default for these OSes.
4215      ;;
4216    mingw* | cygwin* | os2* | pw32* | cegcc*)
4217      # This hack is so that the source file can tell whether it is being
4218      # built for inclusion in a dll (and should export symbols for example).
4219      # Although the cygwin gcc ignores -fPIC, still need this for old-style
4220      # (--disable-auto-import) libraries
4221      m4_if([$1], [GCJ], [],
4222	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4223      ;;
4224    darwin* | rhapsody*)
4225      # PIC is the default on this platform
4226      # Common symbols not allowed in MH_DYLIB files
4227      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4228      ;;
4229    *djgpp*)
4230      # DJGPP does not support shared libraries at all
4231      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4232      ;;
4233    interix[[3-9]]*)
4234      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4235      # Instead, we relocate shared libraries at runtime.
4236      ;;
4237    sysv4*MP*)
4238      if test -d /usr/nec; then
4239	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4240      fi
4241      ;;
4242    hpux*)
4243      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4244      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4245      # sets the default TLS model and affects inlining.
4246      case $host_cpu in
4247      hppa*64*)
4248	;;
4249      *)
4250	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4251	;;
4252      esac
4253      ;;
4254    *qnx* | *nto*)
4255      # QNX uses GNU C++, but need to define -shared option too, otherwise
4256      # it will coredump.
4257      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4258      ;;
4259    *)
4260      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4261      ;;
4262    esac
4263  else
4264    case $host_os in
4265      aix[[4-9]]*)
4266	# All AIX code is PIC.
4267	if test "$host_cpu" = ia64; then
4268	  # AIX 5 now supports IA64 processor
4269	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4270	else
4271	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4272	fi
4273	;;
4274      chorus*)
4275	case $cc_basename in
4276	cxch68*)
4277	  # Green Hills C++ Compiler
4278	  # _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"
4279	  ;;
4280	esac
4281	;;
4282      dgux*)
4283	case $cc_basename in
4284	  ec++*)
4285	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4286	    ;;
4287	  ghcx*)
4288	    # Green Hills C++ Compiler
4289	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4290	    ;;
4291	  *)
4292	    ;;
4293	esac
4294	;;
4295      freebsd* | dragonfly*)
4296	# FreeBSD uses GNU C++
4297	;;
4298      hpux9* | hpux10* | hpux11*)
4299	case $cc_basename in
4300	  CC*)
4301	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4302	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4303	    if test "$host_cpu" != ia64; then
4304	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4305	    fi
4306	    ;;
4307	  aCC*)
4308	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4309	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4310	    case $host_cpu in
4311	    hppa*64*|ia64*)
4312	      # +Z the default
4313	      ;;
4314	    *)
4315	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4316	      ;;
4317	    esac
4318	    ;;
4319	  *)
4320	    ;;
4321	esac
4322	;;
4323      interix*)
4324	# This is c89, which is MS Visual C++ (no shared libs)
4325	# Anyone wants to do a port?
4326	;;
4327      irix5* | irix6* | nonstopux*)
4328	case $cc_basename in
4329	  CC*)
4330	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4331	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4332	    # CC pic flag -KPIC is the default.
4333	    ;;
4334	  *)
4335	    ;;
4336	esac
4337	;;
4338      linux* | k*bsd*-gnu)
4339	case $cc_basename in
4340	  KCC*)
4341	    # KAI C++ Compiler
4342	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4343	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4344	    ;;
4345	  ecpc* )
4346	    # old Intel C++ for x86_64 which still supported -KPIC.
4347	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4348	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4349	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4350	    ;;
4351	  icpc* )
4352	    # Intel C++, used to be incompatible with GCC.
4353	    # ICC 10 doesn't accept -KPIC any more.
4354	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4355	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4356	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4357	    ;;
4358	  pgCC* | pgcpp*)
4359	    # Portland Group C++ compiler
4360	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4361	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4362	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4363	    ;;
4364	  cxx*)
4365	    # Compaq C++
4366	    # Make sure the PIC flag is empty.  It appears that all Alpha
4367	    # Linux and Compaq Tru64 Unix objects are PIC.
4368	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4369	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4370	    ;;
4371	  xlc* | xlC*)
4372	    # IBM XL 8.0 on PPC
4373	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4374	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4375	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4376	    ;;
4377	  *)
4378	    case `$CC -V 2>&1 | sed 5q` in
4379	    *Sun\ C*)
4380	      # Sun C++ 5.9
4381	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4382	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4383	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4384	      ;;
4385	    esac
4386	    ;;
4387	esac
4388	;;
4389      lynxos*)
4390	;;
4391      m88k*)
4392	;;
4393      mvs*)
4394	case $cc_basename in
4395	  cxx*)
4396	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4397	    ;;
4398	  *)
4399	    ;;
4400	esac
4401	;;
4402      netbsd*)
4403	;;
4404      *qnx* | *nto*)
4405        # QNX uses GNU C++, but need to define -shared option too, otherwise
4406        # it will coredump.
4407        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4408        ;;
4409      osf3* | osf4* | osf5*)
4410	case $cc_basename in
4411	  KCC*)
4412	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4413	    ;;
4414	  RCC*)
4415	    # Rational C++ 2.4.1
4416	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4417	    ;;
4418	  cxx*)
4419	    # Digital/Compaq C++
4420	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4421	    # Make sure the PIC flag is empty.  It appears that all Alpha
4422	    # Linux and Compaq Tru64 Unix objects are PIC.
4423	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4424	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4425	    ;;
4426	  *)
4427	    ;;
4428	esac
4429	;;
4430      psos*)
4431	;;
4432      solaris*)
4433	case $cc_basename in
4434	  CC*)
4435	    # Sun C++ 4.2, 5.x and Centerline C++
4436	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4437	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4438	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4439	    ;;
4440	  gcx*)
4441	    # Green Hills C++ Compiler
4442	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4443	    ;;
4444	  *)
4445	    ;;
4446	esac
4447	;;
4448      sunos4*)
4449	case $cc_basename in
4450	  CC*)
4451	    # Sun C++ 4.x
4452	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4453	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4454	    ;;
4455	  lcc*)
4456	    # Lucid
4457	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4458	    ;;
4459	  *)
4460	    ;;
4461	esac
4462	;;
4463      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4464	case $cc_basename in
4465	  CC*)
4466	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4467	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4468	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4469	    ;;
4470	esac
4471	;;
4472      tandem*)
4473	case $cc_basename in
4474	  NCC*)
4475	    # NonStop-UX NCC 3.20
4476	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4477	    ;;
4478	  *)
4479	    ;;
4480	esac
4481	;;
4482      vxworks*)
4483	;;
4484      *)
4485	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4486	;;
4487    esac
4488  fi
4489],
4490[
4491  if test "$GCC" = yes; then
4492    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4493    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4494
4495    case $host_os in
4496      aix*)
4497      # All AIX code is PIC.
4498      if test "$host_cpu" = ia64; then
4499	# AIX 5 now supports IA64 processor
4500	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4501      fi
4502      ;;
4503
4504    amigaos*)
4505      case $host_cpu in
4506      powerpc)
4507            # see comment about AmigaOS4 .so support
4508            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4509        ;;
4510      m68k)
4511            # FIXME: we need at least 68020 code to build shared libraries, but
4512            # adding the `-m68020' flag to GCC prevents building anything better,
4513            # like `-m68040'.
4514            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4515        ;;
4516      esac
4517      ;;
4518
4519    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4520      # PIC is the default for these OSes.
4521      ;;
4522
4523    mingw* | cygwin* | pw32* | os2* | cegcc*)
4524      # This hack is so that the source file can tell whether it is being
4525      # built for inclusion in a dll (and should export symbols for example).
4526      # Although the cygwin gcc ignores -fPIC, still need this for old-style
4527      # (--disable-auto-import) libraries
4528      m4_if([$1], [GCJ], [],
4529	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4530      ;;
4531
4532    darwin* | rhapsody*)
4533      # PIC is the default on this platform
4534      # Common symbols not allowed in MH_DYLIB files
4535      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4536      ;;
4537
4538    hpux*)
4539      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4540      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4541      # sets the default TLS model and affects inlining.
4542      case $host_cpu in
4543      hppa*64*)
4544	# +Z the default
4545	;;
4546      *)
4547	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4548	;;
4549      esac
4550      ;;
4551
4552    interix[[3-9]]*)
4553      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4554      # Instead, we relocate shared libraries at runtime.
4555      ;;
4556
4557    msdosdjgpp*)
4558      # Just because we use GCC doesn't mean we suddenly get shared libraries
4559      # on systems that don't support them.
4560      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4561      enable_shared=no
4562      ;;
4563
4564    *nto* | *qnx*)
4565      # QNX uses GNU C++, but need to define -shared option too, otherwise
4566      # it will coredump.
4567      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4568      ;;
4569
4570    sysv4*MP*)
4571      if test -d /usr/nec; then
4572	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4573      fi
4574      ;;
4575
4576    *)
4577      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4578      ;;
4579    esac
4580  else
4581    # PORTME Check for flag to pass linker flags through the system compiler.
4582    case $host_os in
4583    aix*)
4584      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4585      if test "$host_cpu" = ia64; then
4586	# AIX 5 now supports IA64 processor
4587	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4588      else
4589	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4590      fi
4591      ;;
4592
4593    mingw* | cygwin* | pw32* | os2* | cegcc*)
4594      # This hack is so that the source file can tell whether it is being
4595      # built for inclusion in a dll (and should export symbols for example).
4596      m4_if([$1], [GCJ], [],
4597	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4598      ;;
4599
4600    hpux9* | hpux10* | hpux11*)
4601      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4602      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4603      # not for PA HP-UX.
4604      case $host_cpu in
4605      hppa*64*|ia64*)
4606	# +Z the default
4607	;;
4608      *)
4609	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4610	;;
4611      esac
4612      # Is there a better lt_prog_compiler_static that works with the bundled CC?
4613      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4614      ;;
4615
4616    irix5* | irix6* | nonstopux*)
4617      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4618      # PIC (with -KPIC) is the default.
4619      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4620      ;;
4621
4622    linux* | k*bsd*-gnu)
4623      case $cc_basename in
4624      # old Intel for x86_64 which still supported -KPIC.
4625      ecc*)
4626	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4627	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4628	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4629        ;;
4630      # icc used to be incompatible with GCC.
4631      # ICC 10 doesn't accept -KPIC any more.
4632      icc* | ifort*)
4633	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4634	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4635	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4636        ;;
4637      # Lahey Fortran 8.1.
4638      lf95*)
4639	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4640	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4641	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4642	;;
4643      pgcc* | pgf77* | pgf90* | pgf95*)
4644        # Portland Group compilers (*not* the Pentium gcc compiler,
4645	# which looks to be a dead project)
4646	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4647	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4648	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4649        ;;
4650      ccc*)
4651        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4652        # All Alpha code is PIC.
4653        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4654        ;;
4655      xl*)
4656	# IBM XL C 8.0/Fortran 10.1 on PPC
4657	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4658	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4659	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4660	;;
4661      *)
4662	case `$CC -V 2>&1 | sed 5q` in
4663	*Sun\ C*)
4664	  # Sun C 5.9
4665	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4666	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4667	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4668	  ;;
4669	*Sun\ F*)
4670	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
4671	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4672	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4673	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4674	  ;;
4675	esac
4676	;;
4677      esac
4678      ;;
4679
4680    newsos6)
4681      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4682      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4683      ;;
4684
4685    *nto* | *qnx*)
4686      # QNX uses GNU C++, but need to define -shared option too, otherwise
4687      # it will coredump.
4688      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4689      ;;
4690
4691    osf3* | osf4* | osf5*)
4692      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4693      # All OSF/1 code is PIC.
4694      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4695      ;;
4696
4697    rdos*)
4698      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4699      ;;
4700
4701    solaris*)
4702      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4703      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4704      case $cc_basename in
4705      f77* | f90* | f95*)
4706	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4707      *)
4708	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4709      esac
4710      ;;
4711
4712    sunos4*)
4713      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4714      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4715      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4716      ;;
4717
4718    sysv4 | sysv4.2uw2* | sysv4.3*)
4719      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4720      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4721      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4722      ;;
4723
4724    sysv4*MP*)
4725      if test -d /usr/nec ;then
4726	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4727	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4728      fi
4729      ;;
4730
4731    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4732      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4733      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4734      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4735      ;;
4736
4737    unicos*)
4738      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4739      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4740      ;;
4741
4742    uts4*)
4743      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4744      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4745      ;;
4746
4747    *)
4748      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4749      ;;
4750    esac
4751  fi
4752])
4753case $host_os in
4754  # For platforms which do not support PIC, -DPIC is meaningless:
4755  *djgpp*)
4756    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4757    ;;
4758  *)
4759    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4760    ;;
4761esac
4762AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4763_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4764	[How to pass a linker flag through the compiler])
4765
4766#
4767# Check to make sure the PIC flag actually works.
4768#
4769if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4770  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4771    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4772    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4773    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4774     "" | " "*) ;;
4775     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4776     esac],
4777    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4778     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4779fi
4780_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4781	[Additional compiler flags for building library objects])
4782
4783#
4784# Check to make sure the static flag actually works.
4785#
4786wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4787_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4788  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4789  $lt_tmp_static_flag,
4790  [],
4791  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4792_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4793	[Compiler flag to prevent dynamic linking])
4794])# _LT_COMPILER_PIC
4795
4796
4797# _LT_LINKER_SHLIBS([TAGNAME])
4798# ----------------------------
4799# See if the linker supports building shared libraries.
4800m4_defun([_LT_LINKER_SHLIBS],
4801[AC_REQUIRE([LT_PATH_LD])dnl
4802AC_REQUIRE([LT_PATH_NM])dnl
4803m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4804m4_require([_LT_DECL_EGREP])dnl
4805m4_require([_LT_DECL_SED])dnl
4806m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4807m4_require([_LT_TAG_COMPILER])dnl
4808AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4809m4_if([$1], [CXX], [
4810  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4811  case $host_os in
4812  aix[[4-9]]*)
4813    # If we're using GNU nm, then we don't want the "-C" option.
4814    # -C means demangle to AIX nm, but means don't demangle with GNU nm
4815    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4816      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4817    else
4818      _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'
4819    fi
4820    ;;
4821  pw32*)
4822    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4823  ;;
4824  cygwin* | mingw* | cegcc*)
4825    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
4826  ;;
4827  *)
4828    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4829  ;;
4830  esac
4831  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4832], [
4833  runpath_var=
4834  _LT_TAGVAR(allow_undefined_flag, $1)=
4835  _LT_TAGVAR(always_export_symbols, $1)=no
4836  _LT_TAGVAR(archive_cmds, $1)=
4837  _LT_TAGVAR(archive_expsym_cmds, $1)=
4838  _LT_TAGVAR(compiler_needs_object, $1)=no
4839  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4840  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4841  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4842  _LT_TAGVAR(hardcode_automatic, $1)=no
4843  _LT_TAGVAR(hardcode_direct, $1)=no
4844  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4845  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4846  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4847  _LT_TAGVAR(hardcode_libdir_separator, $1)=
4848  _LT_TAGVAR(hardcode_minus_L, $1)=no
4849  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4850  _LT_TAGVAR(inherit_rpath, $1)=no
4851  _LT_TAGVAR(link_all_deplibs, $1)=unknown
4852  _LT_TAGVAR(module_cmds, $1)=
4853  _LT_TAGVAR(module_expsym_cmds, $1)=
4854  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4855  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4856  _LT_TAGVAR(thread_safe_flag_spec, $1)=
4857  _LT_TAGVAR(whole_archive_flag_spec, $1)=
4858  # include_expsyms should be a list of space-separated symbols to be *always*
4859  # included in the symbol list
4860  _LT_TAGVAR(include_expsyms, $1)=
4861  # exclude_expsyms can be an extended regexp of symbols to exclude
4862  # it will be wrapped by ` (' and `)$', so one must not match beginning or
4863  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4864  # as well as any symbol that contains `d'.
4865  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4866  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4867  # platforms (ab)use it in PIC code, but their linkers get confused if
4868  # the symbol is explicitly referenced.  Since portable code cannot
4869  # rely on this symbol name, it's probably fine to never include it in
4870  # preloaded symbol tables.
4871  # Exclude shared library initialization/finalization symbols.
4872dnl Note also adjust exclude_expsyms for C++ above.
4873  extract_expsyms_cmds=
4874
4875  case $host_os in
4876  cygwin* | mingw* | pw32* | cegcc*)
4877    # FIXME: the MSVC++ port hasn't been tested in a loooong time
4878    # When not using gcc, we currently assume that we are using
4879    # Microsoft Visual C++.
4880    if test "$GCC" != yes; then
4881      with_gnu_ld=no
4882    fi
4883    ;;
4884  interix*)
4885    # we just hope/assume this is gcc and not c89 (= MSVC++)
4886    with_gnu_ld=yes
4887    ;;
4888  openbsd*)
4889    with_gnu_ld=no
4890    ;;
4891  esac
4892
4893  _LT_TAGVAR(ld_shlibs, $1)=yes
4894  if test "$with_gnu_ld" = yes; then
4895    # If archive_cmds runs LD, not CC, wlarc should be empty
4896    wlarc='${wl}'
4897
4898    # Set some defaults for GNU ld with shared library support. These
4899    # are reset later if shared libraries are not supported. Putting them
4900    # here allows them to be overridden if necessary.
4901    runpath_var=LD_RUN_PATH
4902    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4903    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4904    # ancient GNU ld didn't support --whole-archive et. al.
4905    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4906      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4907    else
4908      _LT_TAGVAR(whole_archive_flag_spec, $1)=
4909    fi
4910    supports_anon_versioning=no
4911    case `$LD -v 2>&1` in
4912      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4913      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4914      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4915      *\ 2.11.*) ;; # other 2.11 versions
4916      *) supports_anon_versioning=yes ;;
4917    esac
4918
4919    # See if GNU ld supports shared libraries.
4920    case $host_os in
4921    aix[[3-9]]*)
4922      # On AIX/PPC, the GNU linker is very broken
4923      if test "$host_cpu" != ia64; then
4924	_LT_TAGVAR(ld_shlibs, $1)=no
4925	cat <<_LT_EOF 1>&2
4926
4927*** Warning: the GNU linker, at least up to release 2.9.1, is reported
4928*** to be unable to reliably create shared libraries on AIX.
4929*** Therefore, libtool is disabling shared libraries support.  If you
4930*** really care for shared libraries, you may want to modify your PATH
4931*** so that a non-GNU linker is found, and then restart.
4932
4933_LT_EOF
4934      fi
4935      ;;
4936
4937    amigaos*)
4938      case $host_cpu in
4939      powerpc)
4940            # see comment about AmigaOS4 .so support
4941            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4942            _LT_TAGVAR(archive_expsym_cmds, $1)=''
4943        ;;
4944      m68k)
4945            _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)'
4946            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4947            _LT_TAGVAR(hardcode_minus_L, $1)=yes
4948        ;;
4949      esac
4950      ;;
4951
4952    beos*)
4953      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4954	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4955	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4956	# support --undefined.  This deserves some investigation.  FIXME
4957	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4958      else
4959	_LT_TAGVAR(ld_shlibs, $1)=no
4960      fi
4961      ;;
4962
4963    cygwin* | mingw* | pw32* | cegcc*)
4964      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4965      # as there is no search path for DLLs.
4966      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4967      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4968      _LT_TAGVAR(always_export_symbols, $1)=no
4969      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4970      _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'
4971
4972      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4973        _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'
4974	# If the export-symbols file already is a .def file (1st line
4975	# is EXPORTS), use it as is; otherwise, prepend...
4976	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4977	  cp $export_symbols $output_objdir/$soname.def;
4978	else
4979	  echo EXPORTS > $output_objdir/$soname.def;
4980	  cat $export_symbols >> $output_objdir/$soname.def;
4981	fi~
4982	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4983      else
4984	_LT_TAGVAR(ld_shlibs, $1)=no
4985      fi
4986      ;;
4987
4988    interix[[3-9]]*)
4989      _LT_TAGVAR(hardcode_direct, $1)=no
4990      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4991      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4992      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4993      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4994      # Instead, shared libraries are loaded at an image base (0x10000000 by
4995      # default) and relocated if they conflict, which is a slow very memory
4996      # consuming and fragmenting process.  To avoid this, we pick a random,
4997      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4998      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
4999      _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'
5000      _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'
5001      ;;
5002
5003    gnu* | linux* | tpf* | k*bsd*-gnu)
5004      tmp_diet=no
5005      if test "$host_os" = linux-dietlibc; then
5006	case $cc_basename in
5007	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
5008	esac
5009      fi
5010      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5011	 && test "$tmp_diet" = no
5012      then
5013	tmp_addflag=
5014	tmp_sharedflag='-shared'
5015	case $cc_basename,$host_cpu in
5016        pgcc*)				# Portland Group C compiler
5017	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
5018	  tmp_addflag=' $pic_flag'
5019	  ;;
5020	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
5021	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
5022	  tmp_addflag=' $pic_flag -Mnomain' ;;
5023	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
5024	  tmp_addflag=' -i_dynamic' ;;
5025	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
5026	  tmp_addflag=' -i_dynamic -nofor_main' ;;
5027	ifc* | ifort*)			# Intel Fortran compiler
5028	  tmp_addflag=' -nofor_main' ;;
5029	lf95*)				# Lahey Fortran 8.1
5030	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
5031	  tmp_sharedflag='--shared' ;;
5032	xl[[cC]]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
5033	  tmp_sharedflag='-qmkshrobj'
5034	  tmp_addflag= ;;
5035	esac
5036	case `$CC -V 2>&1 | sed 5q` in
5037	*Sun\ C*)			# Sun C 5.9
5038	  _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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
5039	  _LT_TAGVAR(compiler_needs_object, $1)=yes
5040	  tmp_sharedflag='-G' ;;
5041	*Sun\ F*)			# Sun Fortran 8.3
5042	  tmp_sharedflag='-G' ;;
5043	esac
5044	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5045
5046        if test "x$supports_anon_versioning" = xyes; then
5047          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5048	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5049	    echo "local: *; };" >> $output_objdir/$libname.ver~
5050	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5051        fi
5052
5053	case $cc_basename in
5054	xlf*)
5055	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5056	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5057	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5058	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
5059	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
5060	  if test "x$supports_anon_versioning" = xyes; then
5061	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5062	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5063	      echo "local: *; };" >> $output_objdir/$libname.ver~
5064	      $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5065	  fi
5066	  ;;
5067	esac
5068      else
5069        _LT_TAGVAR(ld_shlibs, $1)=no
5070      fi
5071      ;;
5072
5073    netbsd*)
5074      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5075	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5076	wlarc=
5077      else
5078	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5079	_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'
5080      fi
5081      ;;
5082
5083    solaris*)
5084      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5085	_LT_TAGVAR(ld_shlibs, $1)=no
5086	cat <<_LT_EOF 1>&2
5087
5088*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5089*** create shared libraries on Solaris systems.  Therefore, libtool
5090*** is disabling shared libraries support.  We urge you to upgrade GNU
5091*** binutils to release 2.9.1 or newer.  Another option is to modify
5092*** your PATH or compiler configuration so that the native linker is
5093*** used, and then restart.
5094
5095_LT_EOF
5096      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5097	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5098	_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'
5099      else
5100	_LT_TAGVAR(ld_shlibs, $1)=no
5101      fi
5102      ;;
5103
5104    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5105      case `$LD -v 2>&1` in
5106        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5107	_LT_TAGVAR(ld_shlibs, $1)=no
5108	cat <<_LT_EOF 1>&2
5109
5110*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5111*** reliably create shared libraries on SCO systems.  Therefore, libtool
5112*** is disabling shared libraries support.  We urge you to upgrade GNU
5113*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
5114*** your PATH or compiler configuration so that the native linker is
5115*** used, and then restart.
5116
5117_LT_EOF
5118	;;
5119	*)
5120	  # For security reasons, it is highly recommended that you always
5121	  # use absolute paths for naming shared libraries, and exclude the
5122	  # DT_RUNPATH tag from executables and libraries.  But doing so
5123	  # requires that you compile everything twice, which is a pain.
5124	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5125	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5126	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5127	    _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'
5128	  else
5129	    _LT_TAGVAR(ld_shlibs, $1)=no
5130	  fi
5131	;;
5132      esac
5133      ;;
5134
5135    sunos4*)
5136      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5137      wlarc=
5138      _LT_TAGVAR(hardcode_direct, $1)=yes
5139      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5140      ;;
5141
5142    *)
5143      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5144	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5145	_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'
5146      else
5147	_LT_TAGVAR(ld_shlibs, $1)=no
5148      fi
5149      ;;
5150    esac
5151
5152    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
5153      runpath_var=
5154      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5155      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5156      _LT_TAGVAR(whole_archive_flag_spec, $1)=
5157    fi
5158  else
5159    # PORTME fill in a description of your system's linker (not GNU ld)
5160    case $host_os in
5161    aix3*)
5162      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5163      _LT_TAGVAR(always_export_symbols, $1)=yes
5164      _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'
5165      # Note: this linker hardcodes the directories in LIBPATH if there
5166      # are no directories specified by -L.
5167      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5168      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5169	# Neither direct hardcoding nor static linking is supported with a
5170	# broken collect2.
5171	_LT_TAGVAR(hardcode_direct, $1)=unsupported
5172      fi
5173      ;;
5174
5175    aix[[4-9]]*)
5176      if test "$host_cpu" = ia64; then
5177	# On IA64, the linker does run time linking by default, so we don't
5178	# have to do anything special.
5179	aix_use_runtimelinking=no
5180	exp_sym_flag='-Bexport'
5181	no_entry_flag=""
5182      else
5183	# If we're using GNU nm, then we don't want the "-C" option.
5184	# -C means demangle to AIX nm, but means don't demangle with GNU nm
5185	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5186	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5187	else
5188	  _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'
5189	fi
5190	aix_use_runtimelinking=no
5191
5192	# Test if we are trying to use run time linking or normal
5193	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
5194	# need to do runtime linking.
5195	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5196	  for ld_flag in $LDFLAGS; do
5197	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5198	    aix_use_runtimelinking=yes
5199	    break
5200	  fi
5201	  done
5202	  ;;
5203	esac
5204
5205	exp_sym_flag='-bexport'
5206	no_entry_flag='-bnoentry'
5207      fi
5208
5209      # When large executables or shared objects are built, AIX ld can
5210      # have problems creating the table of contents.  If linking a library
5211      # or program results in "error TOC overflow" add -mminimal-toc to
5212      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5213      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5214
5215      _LT_TAGVAR(archive_cmds, $1)=''
5216      _LT_TAGVAR(hardcode_direct, $1)=yes
5217      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5218      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5219      _LT_TAGVAR(link_all_deplibs, $1)=yes
5220      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5221
5222      if test "$GCC" = yes; then
5223	case $host_os in aix4.[[012]]|aix4.[[012]].*)
5224	# We only want to do this on AIX 4.2 and lower, the check
5225	# below for broken collect2 doesn't work under 4.3+
5226	  collect2name=`${CC} -print-prog-name=collect2`
5227	  if test -f "$collect2name" &&
5228	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5229	  then
5230	  # We have reworked collect2
5231	  :
5232	  else
5233	  # We have old collect2
5234	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
5235	  # It fails to find uninstalled libraries when the uninstalled
5236	  # path is not listed in the libpath.  Setting hardcode_minus_L
5237	  # to unsupported forces relinking
5238	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
5239	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5240	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
5241	  fi
5242	  ;;
5243	esac
5244	shared_flag='-shared'
5245	if test "$aix_use_runtimelinking" = yes; then
5246	  shared_flag="$shared_flag "'${wl}-G'
5247	fi
5248      else
5249	# not using gcc
5250	if test "$host_cpu" = ia64; then
5251	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5252	# chokes on -Wl,-G. The following line is correct:
5253	  shared_flag='-G'
5254	else
5255	  if test "$aix_use_runtimelinking" = yes; then
5256	    shared_flag='${wl}-G'
5257	  else
5258	    shared_flag='${wl}-bM:SRE'
5259	  fi
5260	fi
5261      fi
5262
5263      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5264      # It seems that -bexpall does not export symbols beginning with
5265      # underscore (_), so it is better to generate a list of symbols to export.
5266      _LT_TAGVAR(always_export_symbols, $1)=yes
5267      if test "$aix_use_runtimelinking" = yes; then
5268	# Warning - without using the other runtime loading flags (-brtl),
5269	# -berok will link without error, but may produce a broken library.
5270	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5271        # Determine the default libpath from the value encoded in an
5272        # empty executable.
5273        _LT_SYS_MODULE_PATH_AIX
5274        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5275        _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 $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5276      else
5277	if test "$host_cpu" = ia64; then
5278	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5279	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5280	  _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"
5281	else
5282	 # Determine the default libpath from the value encoded in an
5283	 # empty executable.
5284	 _LT_SYS_MODULE_PATH_AIX
5285	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5286	  # Warning - without using the other run time loading flags,
5287	  # -berok will link without error, but may produce a broken library.
5288	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5289	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5290	  # Exported symbols can be pulled into shared objects from archives
5291	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5292	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5293	  # This is similar to how AIX traditionally builds its shared libraries.
5294	  _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'
5295	fi
5296      fi
5297      ;;
5298
5299    amigaos*)
5300      case $host_cpu in
5301      powerpc)
5302            # see comment about AmigaOS4 .so support
5303            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5304            _LT_TAGVAR(archive_expsym_cmds, $1)=''
5305        ;;
5306      m68k)
5307            _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)'
5308            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5309            _LT_TAGVAR(hardcode_minus_L, $1)=yes
5310        ;;
5311      esac
5312      ;;
5313
5314    bsdi[[45]]*)
5315      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5316      ;;
5317
5318    cygwin* | mingw* | pw32* | cegcc*)
5319      # When not using gcc, we currently assume that we are using
5320      # Microsoft Visual C++.
5321      # hardcode_libdir_flag_spec is actually meaningless, as there is
5322      # no search path for DLLs.
5323      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5324      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5325      # Tell ltmain to make .lib files, not .a files.
5326      libext=lib
5327      # Tell ltmain to make .dll files, not .so files.
5328      shrext_cmds=".dll"
5329      # FIXME: Setting linknames here is a bad hack.
5330      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5331      # The linker will automatically build a .lib file if we build a DLL.
5332      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5333      # FIXME: Should let the user specify the lib program.
5334      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5335      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
5336      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5337      ;;
5338
5339    darwin* | rhapsody*)
5340      _LT_DARWIN_LINKER_FEATURES($1)
5341      ;;
5342
5343    dgux*)
5344      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5345      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5346      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5347      ;;
5348
5349    freebsd1*)
5350      _LT_TAGVAR(ld_shlibs, $1)=no
5351      ;;
5352
5353    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5354    # support.  Future versions do this automatically, but an explicit c++rt0.o
5355    # does not break anything, and helps significantly (at the cost of a little
5356    # extra space).
5357    freebsd2.2*)
5358      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5359      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5360      _LT_TAGVAR(hardcode_direct, $1)=yes
5361      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5362      ;;
5363
5364    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5365    freebsd2*)
5366      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5367      _LT_TAGVAR(hardcode_direct, $1)=yes
5368      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5369      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5370      ;;
5371
5372    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5373    freebsd* | dragonfly*)
5374      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5375      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5376      _LT_TAGVAR(hardcode_direct, $1)=yes
5377      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5378      ;;
5379
5380    hpux9*)
5381      if test "$GCC" = yes; then
5382	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5383      else
5384	_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'
5385      fi
5386      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5387      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5388      _LT_TAGVAR(hardcode_direct, $1)=yes
5389
5390      # hardcode_minus_L: Not really in the search PATH,
5391      # but as the default location of the library.
5392      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5393      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5394      ;;
5395
5396    hpux10*)
5397      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5398	_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5399      else
5400	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5401      fi
5402      if test "$with_gnu_ld" = no; then
5403	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5404	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5405	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5406	_LT_TAGVAR(hardcode_direct, $1)=yes
5407	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5408	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5409	# hardcode_minus_L: Not really in the search PATH,
5410	# but as the default location of the library.
5411	_LT_TAGVAR(hardcode_minus_L, $1)=yes
5412      fi
5413      ;;
5414
5415    hpux11*)
5416      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5417	case $host_cpu in
5418	hppa*64*)
5419	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5420	  ;;
5421	ia64*)
5422	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5423	  ;;
5424	*)
5425	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5426	  ;;
5427	esac
5428      else
5429	case $host_cpu in
5430	hppa*64*)
5431	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5432	  ;;
5433	ia64*)
5434	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5435	  ;;
5436	*)
5437	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5438	  ;;
5439	esac
5440      fi
5441      if test "$with_gnu_ld" = no; then
5442	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5443	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5444
5445	case $host_cpu in
5446	hppa*64*|ia64*)
5447	  _LT_TAGVAR(hardcode_direct, $1)=no
5448	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5449	  ;;
5450	*)
5451	  _LT_TAGVAR(hardcode_direct, $1)=yes
5452	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5453	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5454
5455	  # hardcode_minus_L: Not really in the search PATH,
5456	  # but as the default location of the library.
5457	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
5458	  ;;
5459	esac
5460      fi
5461      ;;
5462
5463    irix5* | irix6* | nonstopux*)
5464      if test "$GCC" = yes; then
5465	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5466	# Try to use the -exported_symbol ld option, if it does not
5467	# work, assume that -exports_file does not work either and
5468	# implicitly export all symbols.
5469        save_LDFLAGS="$LDFLAGS"
5470        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
5471        AC_LINK_IFELSE(int foo(void) {},
5472          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
5473        )
5474        LDFLAGS="$save_LDFLAGS"
5475      else
5476	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
5477	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
5478      fi
5479      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5480      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5481      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5482      _LT_TAGVAR(inherit_rpath, $1)=yes
5483      _LT_TAGVAR(link_all_deplibs, $1)=yes
5484      ;;
5485
5486    netbsd*)
5487      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5488	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5489      else
5490	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5491      fi
5492      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5493      _LT_TAGVAR(hardcode_direct, $1)=yes
5494      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5495      ;;
5496
5497    newsos6)
5498      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5499      _LT_TAGVAR(hardcode_direct, $1)=yes
5500      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5501      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5502      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5503      ;;
5504
5505    *nto* | *qnx*)
5506      ;;
5507
5508    openbsd*)
5509      if test -f /usr/libexec/ld.so; then
5510	_LT_TAGVAR(hardcode_direct, $1)=yes
5511	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5512	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5513	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5514	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5515	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
5516	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5517	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5518	else
5519	  case $host_os in
5520	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5521	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5522	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5523	     ;;
5524	   *)
5525	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5526	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5527	     ;;
5528	  esac
5529	fi
5530      else
5531	_LT_TAGVAR(ld_shlibs, $1)=no
5532      fi
5533      ;;
5534
5535    os2*)
5536      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5537      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5538      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5539      _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'
5540      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5541      ;;
5542
5543    osf3*)
5544      if test "$GCC" = yes; then
5545	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5546	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5547      else
5548	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5549	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
5550      fi
5551      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5552      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5553      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5554      ;;
5555
5556    osf4* | osf5*)	# as osf3* with the addition of -msym flag
5557      if test "$GCC" = yes; then
5558	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5559	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5560	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5561      else
5562	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5563	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
5564	_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~
5565	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
5566
5567	# Both c and cxx compiler support -rpath directly
5568	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5569      fi
5570      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5571      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5572      ;;
5573
5574    solaris*)
5575      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5576      if test "$GCC" = yes; then
5577	wlarc='${wl}'
5578	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5579	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5580	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5581      else
5582	case `$CC -V 2>&1` in
5583	*"Compilers 5.0"*)
5584	  wlarc=''
5585	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5586	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5587	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5588	  ;;
5589	*)
5590	  wlarc='${wl}'
5591	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5592	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5593	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5594	  ;;
5595	esac
5596      fi
5597      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5598      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5599      case $host_os in
5600      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5601      *)
5602	# The compiler driver will combine and reorder linker options,
5603	# but understands `-z linker_flag'.  GCC discards it without `$wl',
5604	# but is careful enough not to reorder.
5605	# Supported since Solaris 2.6 (maybe 2.5.1?)
5606	if test "$GCC" = yes; then
5607	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
5608	else
5609	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5610	fi
5611	;;
5612      esac
5613      _LT_TAGVAR(link_all_deplibs, $1)=yes
5614      ;;
5615
5616    sunos4*)
5617      if test "x$host_vendor" = xsequent; then
5618	# Use $CC to link under sequent, because it throws in some extra .o
5619	# files that make .init and .fini sections work.
5620	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5621      else
5622	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5623      fi
5624      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5625      _LT_TAGVAR(hardcode_direct, $1)=yes
5626      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5627      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5628      ;;
5629
5630    sysv4)
5631      case $host_vendor in
5632	sni)
5633	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5634	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5635	;;
5636	siemens)
5637	  ## LD is ld it makes a PLAMLIB
5638	  ## CC just makes a GrossModule.
5639	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5640	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5641	  _LT_TAGVAR(hardcode_direct, $1)=no
5642        ;;
5643	motorola)
5644	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5645	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5646	;;
5647      esac
5648      runpath_var='LD_RUN_PATH'
5649      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5650      ;;
5651
5652    sysv4.3*)
5653      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5654      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5655      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5656      ;;
5657
5658    sysv4*MP*)
5659      if test -d /usr/nec; then
5660	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5661	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5662	runpath_var=LD_RUN_PATH
5663	hardcode_runpath_var=yes
5664	_LT_TAGVAR(ld_shlibs, $1)=yes
5665      fi
5666      ;;
5667
5668    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5669      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5670      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5671      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5672      runpath_var='LD_RUN_PATH'
5673
5674      if test "$GCC" = yes; then
5675	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5676	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5677      else
5678	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5679	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5680      fi
5681      ;;
5682
5683    sysv5* | sco3.2v5* | sco5v6*)
5684      # Note: We can NOT use -z defs as we might desire, because we do not
5685      # link with -lc, and that would cause any symbols used from libc to
5686      # always be unresolved, which means just about no library would
5687      # ever link correctly.  If we're not using GNU ld we use -z text
5688      # though, which does catch some bad symbols but isn't as heavy-handed
5689      # as -z defs.
5690      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5691      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5692      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5693      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5694      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
5695      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5696      _LT_TAGVAR(link_all_deplibs, $1)=yes
5697      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5698      runpath_var='LD_RUN_PATH'
5699
5700      if test "$GCC" = yes; then
5701	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5702	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5703      else
5704	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5705	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5706      fi
5707      ;;
5708
5709    uts4*)
5710      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5711      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5712      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5713      ;;
5714
5715    *)
5716      _LT_TAGVAR(ld_shlibs, $1)=no
5717      ;;
5718    esac
5719
5720    if test x$host_vendor = xsni; then
5721      case $host in
5722      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5723	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
5724	;;
5725      esac
5726    fi
5727  fi
5728])
5729AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5730test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5731
5732_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
5733
5734_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
5735_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
5736_LT_DECL([], [extract_expsyms_cmds], [2],
5737    [The commands to extract the exported symbol list from a shared archive])
5738
5739#
5740# Do we need to explicitly link libc?
5741#
5742case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
5743x|xyes)
5744  # Assume -lc should be added
5745  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5746
5747  if test "$enable_shared" = yes && test "$GCC" = yes; then
5748    case $_LT_TAGVAR(archive_cmds, $1) in
5749    *'~'*)
5750      # FIXME: we may have to deal with multi-command sequences.
5751      ;;
5752    '$CC '*)
5753      # Test whether the compiler implicitly links with -lc since on some
5754      # systems, -lgcc has to come before -lc. If gcc already passes -lc
5755      # to ld, don't add -lc before -lgcc.
5756      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
5757      $RM conftest*
5758      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5759
5760      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5761        soname=conftest
5762        lib=conftest
5763        libobjs=conftest.$ac_objext
5764        deplibs=
5765        wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5766	pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5767        compiler_flags=-v
5768        linker_flags=-v
5769        verstring=
5770        output_objdir=.
5771        libname=conftest
5772        lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5773        _LT_TAGVAR(allow_undefined_flag, $1)=
5774        if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5775        then
5776	  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5777        else
5778	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5779        fi
5780        _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5781      else
5782        cat conftest.err 1>&5
5783      fi
5784      $RM conftest*
5785      AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
5786      ;;
5787    esac
5788  fi
5789  ;;
5790esac
5791
5792_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
5793    [Whether or not to add -lc for building shared libraries])
5794_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
5795    [enable_shared_with_static_runtimes], [0],
5796    [Whether or not to disallow shared libs when runtime libs are static])
5797_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
5798    [Compiler flag to allow reflexive dlopens])
5799_LT_TAGDECL([], [whole_archive_flag_spec], [1],
5800    [Compiler flag to generate shared objects directly from archives])
5801_LT_TAGDECL([], [compiler_needs_object], [1],
5802    [Whether the compiler copes with passing no objects directly])
5803_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
5804    [Create an old-style archive from a shared archive])
5805_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
5806    [Create a temporary old-style archive to link instead of a shared archive])
5807_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
5808_LT_TAGDECL([], [archive_expsym_cmds], [2])
5809_LT_TAGDECL([], [module_cmds], [2],
5810    [Commands used to build a loadable module if different from building
5811    a shared archive.])
5812_LT_TAGDECL([], [module_expsym_cmds], [2])
5813_LT_TAGDECL([], [with_gnu_ld], [1],
5814    [Whether we are building with GNU ld or not])
5815_LT_TAGDECL([], [allow_undefined_flag], [1],
5816    [Flag that allows shared libraries with undefined symbols to be built])
5817_LT_TAGDECL([], [no_undefined_flag], [1],
5818    [Flag that enforces no undefined symbols])
5819_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
5820    [Flag to hardcode $libdir into a binary during linking.
5821    This must work even if $libdir does not exist])
5822_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
5823    [[If ld is used when linking, flag to hardcode $libdir into a binary
5824    during linking.  This must work even if $libdir does not exist]])
5825_LT_TAGDECL([], [hardcode_libdir_separator], [1],
5826    [Whether we need a single "-rpath" flag with a separated argument])
5827_LT_TAGDECL([], [hardcode_direct], [0],
5828    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5829    DIR into the resulting binary])
5830_LT_TAGDECL([], [hardcode_direct_absolute], [0],
5831    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5832    DIR into the resulting binary and the resulting library dependency is
5833    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
5834    library is relocated])
5835_LT_TAGDECL([], [hardcode_minus_L], [0],
5836    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
5837    into the resulting binary])
5838_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
5839    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
5840    into the resulting binary])
5841_LT_TAGDECL([], [hardcode_automatic], [0],
5842    [Set to "yes" if building a shared library automatically hardcodes DIR
5843    into the library and all subsequent libraries and executables linked
5844    against it])
5845_LT_TAGDECL([], [inherit_rpath], [0],
5846    [Set to yes if linker adds runtime paths of dependent libraries
5847    to runtime path list])
5848_LT_TAGDECL([], [link_all_deplibs], [0],
5849    [Whether libtool must link a program against all its dependency libraries])
5850_LT_TAGDECL([], [fix_srcfile_path], [1],
5851    [Fix the shell variable $srcfile for the compiler])
5852_LT_TAGDECL([], [always_export_symbols], [0],
5853    [Set to "yes" if exported symbols are required])
5854_LT_TAGDECL([], [export_symbols_cmds], [2],
5855    [The commands to list exported symbols])
5856_LT_TAGDECL([], [exclude_expsyms], [1],
5857    [Symbols that should not be listed in the preloaded symbols])
5858_LT_TAGDECL([], [include_expsyms], [1],
5859    [Symbols that must always be exported])
5860_LT_TAGDECL([], [prelink_cmds], [2],
5861    [Commands necessary for linking programs (against libraries) with templates])
5862_LT_TAGDECL([], [file_list_spec], [1],
5863    [Specify filename containing input files])
5864dnl FIXME: Not yet implemented
5865dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
5866dnl    [Compiler flag to generate thread safe objects])
5867])# _LT_LINKER_SHLIBS
5868
5869
5870# _LT_LANG_C_CONFIG([TAG])
5871# ------------------------
5872# Ensure that the configuration variables for a C compiler are suitably
5873# defined.  These variables are subsequently used by _LT_CONFIG to write
5874# the compiler configuration to `libtool'.
5875m4_defun([_LT_LANG_C_CONFIG],
5876[m4_require([_LT_DECL_EGREP])dnl
5877lt_save_CC="$CC"
5878AC_LANG_PUSH(C)
5879
5880# Source file extension for C test sources.
5881ac_ext=c
5882
5883# Object file extension for compiled C test sources.
5884objext=o
5885_LT_TAGVAR(objext, $1)=$objext
5886
5887# Code to be used in simple compile tests
5888lt_simple_compile_test_code="int some_variable = 0;"
5889
5890# Code to be used in simple link tests
5891lt_simple_link_test_code='int main(){return(0);}'
5892
5893_LT_TAG_COMPILER
5894# Save the default compiler, since it gets overwritten when the other
5895# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
5896compiler_DEFAULT=$CC
5897
5898# save warnings/boilerplate of simple test code
5899_LT_COMPILER_BOILERPLATE
5900_LT_LINKER_BOILERPLATE
5901
5902if test -n "$compiler"; then
5903  _LT_COMPILER_NO_RTTI($1)
5904  _LT_COMPILER_PIC($1)
5905  _LT_COMPILER_C_O($1)
5906  _LT_COMPILER_FILE_LOCKS($1)
5907  _LT_LINKER_SHLIBS($1)
5908  _LT_SYS_DYNAMIC_LINKER($1)
5909  _LT_LINKER_HARDCODE_LIBPATH($1)
5910  LT_SYS_DLOPEN_SELF
5911  _LT_CMD_STRIPLIB
5912
5913  # Report which library types will actually be built
5914  AC_MSG_CHECKING([if libtool supports shared libraries])
5915  AC_MSG_RESULT([$can_build_shared])
5916
5917  AC_MSG_CHECKING([whether to build shared libraries])
5918  test "$can_build_shared" = "no" && enable_shared=no
5919
5920  # On AIX, shared libraries and static libraries use the same namespace, and
5921  # are all built from PIC.
5922  case $host_os in
5923  aix3*)
5924    test "$enable_shared" = yes && enable_static=no
5925    if test -n "$RANLIB"; then
5926      archive_cmds="$archive_cmds~\$RANLIB \$lib"
5927      postinstall_cmds='$RANLIB $lib'
5928    fi
5929    ;;
5930
5931  aix[[4-9]]*)
5932    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5933      test "$enable_shared" = yes && enable_static=no
5934    fi
5935    ;;
5936  esac
5937  AC_MSG_RESULT([$enable_shared])
5938
5939  AC_MSG_CHECKING([whether to build static libraries])
5940  # Make sure either enable_shared or enable_static is yes.
5941  test "$enable_shared" = yes || enable_static=yes
5942  AC_MSG_RESULT([$enable_static])
5943
5944  _LT_CONFIG($1)
5945fi
5946AC_LANG_POP
5947CC="$lt_save_CC"
5948])# _LT_LANG_C_CONFIG
5949
5950
5951# _LT_PROG_CXX
5952# ------------
5953# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
5954# compiler, we have our own version here.
5955m4_defun([_LT_PROG_CXX],
5956[
5957pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
5958AC_PROG_CXX
5959if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5960    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5961    (test "X$CXX" != "Xg++"))) ; then
5962  AC_PROG_CXXCPP
5963else
5964  _lt_caught_CXX_error=yes
5965fi
5966popdef([AC_MSG_ERROR])
5967])# _LT_PROG_CXX
5968
5969dnl aclocal-1.4 backwards compatibility:
5970dnl AC_DEFUN([_LT_PROG_CXX], [])
5971
5972
5973# _LT_LANG_CXX_CONFIG([TAG])
5974# --------------------------
5975# Ensure that the configuration variables for a C++ compiler are suitably
5976# defined.  These variables are subsequently used by _LT_CONFIG to write
5977# the compiler configuration to `libtool'.
5978m4_defun([_LT_LANG_CXX_CONFIG],
5979[AC_REQUIRE([_LT_PROG_CXX])dnl
5980m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5981m4_require([_LT_DECL_EGREP])dnl
5982
5983AC_LANG_PUSH(C++)
5984_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5985_LT_TAGVAR(allow_undefined_flag, $1)=
5986_LT_TAGVAR(always_export_symbols, $1)=no
5987_LT_TAGVAR(archive_expsym_cmds, $1)=
5988_LT_TAGVAR(compiler_needs_object, $1)=no
5989_LT_TAGVAR(export_dynamic_flag_spec, $1)=
5990_LT_TAGVAR(hardcode_direct, $1)=no
5991_LT_TAGVAR(hardcode_direct_absolute, $1)=no
5992_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5993_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5994_LT_TAGVAR(hardcode_libdir_separator, $1)=
5995_LT_TAGVAR(hardcode_minus_L, $1)=no
5996_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5997_LT_TAGVAR(hardcode_automatic, $1)=no
5998_LT_TAGVAR(inherit_rpath, $1)=no
5999_LT_TAGVAR(module_cmds, $1)=
6000_LT_TAGVAR(module_expsym_cmds, $1)=
6001_LT_TAGVAR(link_all_deplibs, $1)=unknown
6002_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6003_LT_TAGVAR(no_undefined_flag, $1)=
6004_LT_TAGVAR(whole_archive_flag_spec, $1)=
6005_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6006
6007# Source file extension for C++ test sources.
6008ac_ext=cpp
6009
6010# Object file extension for compiled C++ test sources.
6011objext=o
6012_LT_TAGVAR(objext, $1)=$objext
6013
6014# No sense in running all these tests if we already determined that
6015# the CXX compiler isn't working.  Some variables (like enable_shared)
6016# are currently assumed to apply to all compilers on this platform,
6017# and will be corrupted by setting them based on a non-working compiler.
6018if test "$_lt_caught_CXX_error" != yes; then
6019  # Code to be used in simple compile tests
6020  lt_simple_compile_test_code="int some_variable = 0;"
6021
6022  # Code to be used in simple link tests
6023  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6024
6025  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6026  _LT_TAG_COMPILER
6027
6028  # save warnings/boilerplate of simple test code
6029  _LT_COMPILER_BOILERPLATE
6030  _LT_LINKER_BOILERPLATE
6031
6032  # Allow CC to be a program name with arguments.
6033  lt_save_CC=$CC
6034  lt_save_LD=$LD
6035  lt_save_GCC=$GCC
6036  GCC=$GXX
6037  lt_save_with_gnu_ld=$with_gnu_ld
6038  lt_save_path_LD=$lt_cv_path_LD
6039  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6040    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6041  else
6042    $as_unset lt_cv_prog_gnu_ld
6043  fi
6044  if test -n "${lt_cv_path_LDCXX+set}"; then
6045    lt_cv_path_LD=$lt_cv_path_LDCXX
6046  else
6047    $as_unset lt_cv_path_LD
6048  fi
6049  test -z "${LDCXX+set}" || LD=$LDCXX
6050  CC=${CXX-"c++"}
6051  compiler=$CC
6052  _LT_TAGVAR(compiler, $1)=$CC
6053  _LT_CC_BASENAME([$compiler])
6054
6055  if test -n "$compiler"; then
6056    # We don't want -fno-exception when compiling C++ code, so set the
6057    # no_builtin_flag separately
6058    if test "$GXX" = yes; then
6059      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6060    else
6061      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6062    fi
6063
6064    if test "$GXX" = yes; then
6065      # Set up default GNU C++ configuration
6066
6067      LT_PATH_LD
6068
6069      # Check if GNU C++ uses GNU ld as the underlying linker, since the
6070      # archiving commands below assume that GNU ld is being used.
6071      if test "$with_gnu_ld" = yes; then
6072        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6073        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6074
6075        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6076        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6077
6078        # If archive_cmds runs LD, not CC, wlarc should be empty
6079        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6080        #     investigate it a little bit more. (MM)
6081        wlarc='${wl}'
6082
6083        # ancient GNU ld didn't support --whole-archive et. al.
6084        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6085	  $GREP 'no-whole-archive' > /dev/null; then
6086          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6087        else
6088          _LT_TAGVAR(whole_archive_flag_spec, $1)=
6089        fi
6090      else
6091        with_gnu_ld=no
6092        wlarc=
6093
6094        # A generic and very simple default shared library creation
6095        # command for GNU C++ for the case where it uses the native
6096        # linker, instead of GNU ld.  If possible, this setting should
6097        # overridden to take advantage of the native linker features on
6098        # the platform it is being used on.
6099        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6100      fi
6101
6102      # Commands to make compiler produce verbose output that lists
6103      # what "hidden" libraries, object files and flags are used when
6104      # linking a shared library.
6105      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6106
6107    else
6108      GXX=no
6109      with_gnu_ld=no
6110      wlarc=
6111    fi
6112
6113    # PORTME: fill in a description of your system's C++ link characteristics
6114    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6115    _LT_TAGVAR(ld_shlibs, $1)=yes
6116    case $host_os in
6117      aix3*)
6118        # FIXME: insert proper C++ library support
6119        _LT_TAGVAR(ld_shlibs, $1)=no
6120        ;;
6121      aix[[4-9]]*)
6122        if test "$host_cpu" = ia64; then
6123          # On IA64, the linker does run time linking by default, so we don't
6124          # have to do anything special.
6125          aix_use_runtimelinking=no
6126          exp_sym_flag='-Bexport'
6127          no_entry_flag=""
6128        else
6129          aix_use_runtimelinking=no
6130
6131          # Test if we are trying to use run time linking or normal
6132          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6133          # need to do runtime linking.
6134          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6135	    for ld_flag in $LDFLAGS; do
6136	      case $ld_flag in
6137	      *-brtl*)
6138	        aix_use_runtimelinking=yes
6139	        break
6140	        ;;
6141	      esac
6142	    done
6143	    ;;
6144          esac
6145
6146          exp_sym_flag='-bexport'
6147          no_entry_flag='-bnoentry'
6148        fi
6149
6150        # When large executables or shared objects are built, AIX ld can
6151        # have problems creating the table of contents.  If linking a library
6152        # or program results in "error TOC overflow" add -mminimal-toc to
6153        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6154        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6155
6156        _LT_TAGVAR(archive_cmds, $1)=''
6157        _LT_TAGVAR(hardcode_direct, $1)=yes
6158        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6159        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6160        _LT_TAGVAR(link_all_deplibs, $1)=yes
6161        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6162
6163        if test "$GXX" = yes; then
6164          case $host_os in aix4.[[012]]|aix4.[[012]].*)
6165          # We only want to do this on AIX 4.2 and lower, the check
6166          # below for broken collect2 doesn't work under 4.3+
6167	  collect2name=`${CC} -print-prog-name=collect2`
6168	  if test -f "$collect2name" &&
6169	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6170	  then
6171	    # We have reworked collect2
6172	    :
6173	  else
6174	    # We have old collect2
6175	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
6176	    # It fails to find uninstalled libraries when the uninstalled
6177	    # path is not listed in the libpath.  Setting hardcode_minus_L
6178	    # to unsupported forces relinking
6179	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
6180	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6181	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
6182	  fi
6183          esac
6184          shared_flag='-shared'
6185	  if test "$aix_use_runtimelinking" = yes; then
6186	    shared_flag="$shared_flag "'${wl}-G'
6187	  fi
6188        else
6189          # not using gcc
6190          if test "$host_cpu" = ia64; then
6191	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6192	  # chokes on -Wl,-G. The following line is correct:
6193	  shared_flag='-G'
6194          else
6195	    if test "$aix_use_runtimelinking" = yes; then
6196	      shared_flag='${wl}-G'
6197	    else
6198	      shared_flag='${wl}-bM:SRE'
6199	    fi
6200          fi
6201        fi
6202
6203        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6204        # It seems that -bexpall does not export symbols beginning with
6205        # underscore (_), so it is better to generate a list of symbols to
6206	# export.
6207        _LT_TAGVAR(always_export_symbols, $1)=yes
6208        if test "$aix_use_runtimelinking" = yes; then
6209          # Warning - without using the other runtime loading flags (-brtl),
6210          # -berok will link without error, but may produce a broken library.
6211          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6212          # Determine the default libpath from the value encoded in an empty
6213          # executable.
6214          _LT_SYS_MODULE_PATH_AIX
6215          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6216
6217          _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 $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6218        else
6219          if test "$host_cpu" = ia64; then
6220	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6221	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6222	    _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"
6223          else
6224	    # Determine the default libpath from the value encoded in an
6225	    # empty executable.
6226	    _LT_SYS_MODULE_PATH_AIX
6227	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6228	    # Warning - without using the other run time loading flags,
6229	    # -berok will link without error, but may produce a broken library.
6230	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6231	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6232	    # Exported symbols can be pulled into shared objects from archives
6233	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6234	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6235	    # This is similar to how AIX traditionally builds its shared
6236	    # libraries.
6237	    _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'
6238          fi
6239        fi
6240        ;;
6241
6242      beos*)
6243	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6244	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6245	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6246	  # support --undefined.  This deserves some investigation.  FIXME
6247	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6248	else
6249	  _LT_TAGVAR(ld_shlibs, $1)=no
6250	fi
6251	;;
6252
6253      chorus*)
6254        case $cc_basename in
6255          *)
6256	  # FIXME: insert proper C++ library support
6257	  _LT_TAGVAR(ld_shlibs, $1)=no
6258	  ;;
6259        esac
6260        ;;
6261
6262      cygwin* | mingw* | pw32* | cegcc*)
6263        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6264        # as there is no search path for DLLs.
6265        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6266        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6267        _LT_TAGVAR(always_export_symbols, $1)=no
6268        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6269
6270        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6271          _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'
6272          # If the export-symbols file already is a .def file (1st line
6273          # is EXPORTS), use it as is; otherwise, prepend...
6274          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6275	    cp $export_symbols $output_objdir/$soname.def;
6276          else
6277	    echo EXPORTS > $output_objdir/$soname.def;
6278	    cat $export_symbols >> $output_objdir/$soname.def;
6279          fi~
6280          $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'
6281        else
6282          _LT_TAGVAR(ld_shlibs, $1)=no
6283        fi
6284        ;;
6285      darwin* | rhapsody*)
6286        _LT_DARWIN_LINKER_FEATURES($1)
6287	;;
6288
6289      dgux*)
6290        case $cc_basename in
6291          ec++*)
6292	    # FIXME: insert proper C++ library support
6293	    _LT_TAGVAR(ld_shlibs, $1)=no
6294	    ;;
6295          ghcx*)
6296	    # Green Hills C++ Compiler
6297	    # FIXME: insert proper C++ library support
6298	    _LT_TAGVAR(ld_shlibs, $1)=no
6299	    ;;
6300          *)
6301	    # FIXME: insert proper C++ library support
6302	    _LT_TAGVAR(ld_shlibs, $1)=no
6303	    ;;
6304        esac
6305        ;;
6306
6307      freebsd[[12]]*)
6308        # C++ shared libraries reported to be fairly broken before
6309	# switch to ELF
6310        _LT_TAGVAR(ld_shlibs, $1)=no
6311        ;;
6312
6313      freebsd-elf*)
6314        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6315        ;;
6316
6317      freebsd* | dragonfly*)
6318        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6319        # conventions
6320        _LT_TAGVAR(ld_shlibs, $1)=yes
6321        ;;
6322
6323      gnu*)
6324        ;;
6325
6326      hpux9*)
6327        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6328        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6329        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6330        _LT_TAGVAR(hardcode_direct, $1)=yes
6331        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6332				             # but as the default
6333				             # location of the library.
6334
6335        case $cc_basename in
6336          CC*)
6337            # FIXME: insert proper C++ library support
6338            _LT_TAGVAR(ld_shlibs, $1)=no
6339            ;;
6340          aCC*)
6341            _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'
6342            # Commands to make compiler produce verbose output that lists
6343            # what "hidden" libraries, object files and flags are used when
6344            # linking a shared library.
6345            #
6346            # There doesn't appear to be a way to prevent this compiler from
6347            # explicitly linking system object files so we need to strip them
6348            # from the output so that they don't get included in the library
6349            # dependencies.
6350            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; $ECHO "X$list" | $Xsed'
6351            ;;
6352          *)
6353            if test "$GXX" = yes; then
6354              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${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'
6355            else
6356              # FIXME: insert proper C++ library support
6357              _LT_TAGVAR(ld_shlibs, $1)=no
6358            fi
6359            ;;
6360        esac
6361        ;;
6362
6363      hpux10*|hpux11*)
6364        if test $with_gnu_ld = no; then
6365	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6366	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6367
6368          case $host_cpu in
6369            hppa*64*|ia64*)
6370              ;;
6371            *)
6372	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6373              ;;
6374          esac
6375        fi
6376        case $host_cpu in
6377          hppa*64*|ia64*)
6378            _LT_TAGVAR(hardcode_direct, $1)=no
6379            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6380            ;;
6381          *)
6382            _LT_TAGVAR(hardcode_direct, $1)=yes
6383            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6384            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6385					         # but as the default
6386					         # location of the library.
6387            ;;
6388        esac
6389
6390        case $cc_basename in
6391          CC*)
6392	    # FIXME: insert proper C++ library support
6393	    _LT_TAGVAR(ld_shlibs, $1)=no
6394	    ;;
6395          aCC*)
6396	    case $host_cpu in
6397	      hppa*64*)
6398	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6399	        ;;
6400	      ia64*)
6401	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6402	        ;;
6403	      *)
6404	        _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'
6405	        ;;
6406	    esac
6407	    # Commands to make compiler produce verbose output that lists
6408	    # what "hidden" libraries, object files and flags are used when
6409	    # linking a shared library.
6410	    #
6411	    # There doesn't appear to be a way to prevent this compiler from
6412	    # explicitly linking system object files so we need to strip them
6413	    # from the output so that they don't get included in the library
6414	    # dependencies.
6415	    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; $ECHO "X$list" | $Xsed'
6416	    ;;
6417          *)
6418	    if test "$GXX" = yes; then
6419	      if test $with_gnu_ld = no; then
6420	        case $host_cpu in
6421	          hppa*64*)
6422	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6423	            ;;
6424	          ia64*)
6425	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6426	            ;;
6427	          *)
6428	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6429	            ;;
6430	        esac
6431	      fi
6432	    else
6433	      # FIXME: insert proper C++ library support
6434	      _LT_TAGVAR(ld_shlibs, $1)=no
6435	    fi
6436	    ;;
6437        esac
6438        ;;
6439
6440      interix[[3-9]]*)
6441	_LT_TAGVAR(hardcode_direct, $1)=no
6442	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6443	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6444	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6445	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6446	# Instead, shared libraries are loaded at an image base (0x10000000 by
6447	# default) and relocated if they conflict, which is a slow very memory
6448	# consuming and fragmenting process.  To avoid this, we pick a random,
6449	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6450	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
6451	_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'
6452	_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'
6453	;;
6454      irix5* | irix6*)
6455        case $cc_basename in
6456          CC*)
6457	    # SGI C++
6458	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6459
6460	    # Archives containing C++ object files must be created using
6461	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
6462	    # necessary to make sure instantiated templates are included
6463	    # in the archive.
6464	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6465	    ;;
6466          *)
6467	    if test "$GXX" = yes; then
6468	      if test "$with_gnu_ld" = no; then
6469	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6470	      else
6471	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
6472	      fi
6473	    fi
6474	    _LT_TAGVAR(link_all_deplibs, $1)=yes
6475	    ;;
6476        esac
6477        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6478        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6479        _LT_TAGVAR(inherit_rpath, $1)=yes
6480        ;;
6481
6482      linux* | k*bsd*-gnu)
6483        case $cc_basename in
6484          KCC*)
6485	    # Kuck and Associates, Inc. (KAI) C++ Compiler
6486
6487	    # KCC will only create a shared library if the output file
6488	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
6489	    # to its proper name (with version) after linking.
6490	    _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'
6491	    _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'
6492	    # Commands to make compiler produce verbose output that lists
6493	    # what "hidden" libraries, object files and flags are used when
6494	    # linking a shared library.
6495	    #
6496	    # There doesn't appear to be a way to prevent this compiler from
6497	    # explicitly linking system object files so we need to strip them
6498	    # from the output so that they don't get included in the library
6499	    # dependencies.
6500	    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; $ECHO "X$list" | $Xsed'
6501
6502	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6503	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6504
6505	    # Archives containing C++ object files must be created using
6506	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6507	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6508	    ;;
6509	  icpc* | ecpc* )
6510	    # Intel C++
6511	    with_gnu_ld=yes
6512	    # version 8.0 and above of icpc choke on multiply defined symbols
6513	    # if we add $predep_objects and $postdep_objects, however 7.1 and
6514	    # earlier do not add the objects themselves.
6515	    case `$CC -V 2>&1` in
6516	      *"Version 7."*)
6517	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6518		_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'
6519		;;
6520	      *)  # Version 8.0 or newer
6521	        tmp_idyn=
6522	        case $host_cpu in
6523		  ia64*) tmp_idyn=' -i_dynamic';;
6524		esac
6525	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6526		_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'
6527		;;
6528	    esac
6529	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6530	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6531	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6532	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6533	    ;;
6534          pgCC* | pgcpp*)
6535            # Portland Group C++ compiler
6536	    case `$CC -V` in
6537	    *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
6538	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
6539		rm -rf $tpldir~
6540		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
6541		compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
6542	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
6543		rm -rf $tpldir~
6544		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
6545		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
6546		$RANLIB $oldlib'
6547	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
6548		rm -rf $tpldir~
6549		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6550		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6551	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
6552		rm -rf $tpldir~
6553		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6554		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
6555	      ;;
6556	    *) # Version 6 will use weak symbols
6557	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6558	      _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'
6559	      ;;
6560	    esac
6561
6562	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6563	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6564	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
6565            ;;
6566	  cxx*)
6567	    # Compaq C++
6568	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6569	    _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'
6570
6571	    runpath_var=LD_RUN_PATH
6572	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6573	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6574
6575	    # Commands to make compiler produce verbose output that lists
6576	    # what "hidden" libraries, object files and flags are used when
6577	    # linking a shared library.
6578	    #
6579	    # There doesn't appear to be a way to prevent this compiler from
6580	    # explicitly linking system object files so we need to strip them
6581	    # from the output so that they don't get included in the library
6582	    # dependencies.
6583	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
6584	    ;;
6585	  xl*)
6586	    # IBM XL 8.0 on PPC, with GNU ld
6587	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6588	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6589	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6590	    if test "x$supports_anon_versioning" = xyes; then
6591	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6592		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6593		echo "local: *; };" >> $output_objdir/$libname.ver~
6594		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6595	    fi
6596	    ;;
6597	  *)
6598	    case `$CC -V 2>&1 | sed 5q` in
6599	    *Sun\ C*)
6600	      # Sun C++ 5.9
6601	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6602	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6603	      _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'
6604	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6605	      _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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
6606	      _LT_TAGVAR(compiler_needs_object, $1)=yes
6607
6608	      # Not sure whether something based on
6609	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
6610	      # would be better.
6611	      output_verbose_link_cmd='echo'
6612
6613	      # Archives containing C++ object files must be created using
6614	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
6615	      # necessary to make sure instantiated templates are included
6616	      # in the archive.
6617	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6618	      ;;
6619	    esac
6620	    ;;
6621	esac
6622	;;
6623
6624      lynxos*)
6625        # FIXME: insert proper C++ library support
6626	_LT_TAGVAR(ld_shlibs, $1)=no
6627	;;
6628
6629      m88k*)
6630        # FIXME: insert proper C++ library support
6631        _LT_TAGVAR(ld_shlibs, $1)=no
6632	;;
6633
6634      mvs*)
6635        case $cc_basename in
6636          cxx*)
6637	    # FIXME: insert proper C++ library support
6638	    _LT_TAGVAR(ld_shlibs, $1)=no
6639	    ;;
6640	  *)
6641	    # FIXME: insert proper C++ library support
6642	    _LT_TAGVAR(ld_shlibs, $1)=no
6643	    ;;
6644	esac
6645	;;
6646
6647      netbsd*)
6648        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6649	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6650	  wlarc=
6651	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6652	  _LT_TAGVAR(hardcode_direct, $1)=yes
6653	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6654	fi
6655	# Workaround some broken pre-1.5 toolchains
6656	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6657	;;
6658
6659      *nto* | *qnx*)
6660        _LT_TAGVAR(ld_shlibs, $1)=yes
6661	;;
6662
6663      openbsd2*)
6664        # C++ shared libraries are fairly broken
6665	_LT_TAGVAR(ld_shlibs, $1)=no
6666	;;
6667
6668      openbsd*)
6669	if test -f /usr/libexec/ld.so; then
6670	  _LT_TAGVAR(hardcode_direct, $1)=yes
6671	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6672	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6673	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6674	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6675	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6676	    _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'
6677	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6678	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6679	  fi
6680	  output_verbose_link_cmd=echo
6681	else
6682	  _LT_TAGVAR(ld_shlibs, $1)=no
6683	fi
6684	;;
6685
6686      osf3* | osf4* | osf5*)
6687        case $cc_basename in
6688          KCC*)
6689	    # Kuck and Associates, Inc. (KAI) C++ Compiler
6690
6691	    # KCC will only create a shared library if the output file
6692	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
6693	    # to its proper name (with version) after linking.
6694	    _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'
6695
6696	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6697	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6698
6699	    # Archives containing C++ object files must be created using
6700	    # the KAI C++ compiler.
6701	    case $host in
6702	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
6703	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
6704	    esac
6705	    ;;
6706          RCC*)
6707	    # Rational C++ 2.4.1
6708	    # FIXME: insert proper C++ library support
6709	    _LT_TAGVAR(ld_shlibs, $1)=no
6710	    ;;
6711          cxx*)
6712	    case $host in
6713	      osf3*)
6714	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6715	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6716	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6717		;;
6718	      *)
6719	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6720	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6721	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6722	          echo "-hidden">> $lib.exp~
6723	          $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 "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
6724	          $RM $lib.exp'
6725	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6726		;;
6727	    esac
6728
6729	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6730
6731	    # Commands to make compiler produce verbose output that lists
6732	    # what "hidden" libraries, object files and flags are used when
6733	    # linking a shared library.
6734	    #
6735	    # There doesn't appear to be a way to prevent this compiler from
6736	    # explicitly linking system object files so we need to strip them
6737	    # from the output so that they don't get included in the library
6738	    # dependencies.
6739	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
6740	    ;;
6741	  *)
6742	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6743	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6744	      case $host in
6745	        osf3*)
6746	          _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" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6747		  ;;
6748	        *)
6749	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6750		  ;;
6751	      esac
6752
6753	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6754	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6755
6756	      # Commands to make compiler produce verbose output that lists
6757	      # what "hidden" libraries, object files and flags are used when
6758	      # linking a shared library.
6759	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6760
6761	    else
6762	      # FIXME: insert proper C++ library support
6763	      _LT_TAGVAR(ld_shlibs, $1)=no
6764	    fi
6765	    ;;
6766        esac
6767        ;;
6768
6769      psos*)
6770        # FIXME: insert proper C++ library support
6771        _LT_TAGVAR(ld_shlibs, $1)=no
6772        ;;
6773
6774      sunos4*)
6775        case $cc_basename in
6776          CC*)
6777	    # Sun C++ 4.x
6778	    # FIXME: insert proper C++ library support
6779	    _LT_TAGVAR(ld_shlibs, $1)=no
6780	    ;;
6781          lcc*)
6782	    # Lucid
6783	    # FIXME: insert proper C++ library support
6784	    _LT_TAGVAR(ld_shlibs, $1)=no
6785	    ;;
6786          *)
6787	    # FIXME: insert proper C++ library support
6788	    _LT_TAGVAR(ld_shlibs, $1)=no
6789	    ;;
6790        esac
6791        ;;
6792
6793      solaris*)
6794        case $cc_basename in
6795          CC*)
6796	    # Sun C++ 4.2, 5.x and Centerline C++
6797            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6798	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6799	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6800	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6801	      $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'
6802
6803	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6804	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6805	    case $host_os in
6806	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6807	      *)
6808		# The compiler driver will combine and reorder linker options,
6809		# but understands `-z linker_flag'.
6810	        # Supported since Solaris 2.6 (maybe 2.5.1?)
6811		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6812	        ;;
6813	    esac
6814	    _LT_TAGVAR(link_all_deplibs, $1)=yes
6815
6816	    output_verbose_link_cmd='echo'
6817
6818	    # Archives containing C++ object files must be created using
6819	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
6820	    # necessary to make sure instantiated templates are included
6821	    # in the archive.
6822	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6823	    ;;
6824          gcx*)
6825	    # Green Hills C++ Compiler
6826	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6827
6828	    # The C++ compiler must be used to create the archive.
6829	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6830	    ;;
6831          *)
6832	    # GNU C++ compiler with Solaris linker
6833	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6834	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6835	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6836	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6837	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6838		  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6839
6840	        # Commands to make compiler produce verbose output that lists
6841	        # what "hidden" libraries, object files and flags are used when
6842	        # linking a shared library.
6843	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6844	      else
6845	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
6846	        # platform.
6847	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6848	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6849		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6850
6851	        # Commands to make compiler produce verbose output that lists
6852	        # what "hidden" libraries, object files and flags are used when
6853	        # linking a shared library.
6854	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6855	      fi
6856
6857	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6858	      case $host_os in
6859		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6860		*)
6861		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6862		  ;;
6863	      esac
6864	    fi
6865	    ;;
6866        esac
6867        ;;
6868
6869    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6870      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6871      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6872      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6873      runpath_var='LD_RUN_PATH'
6874
6875      case $cc_basename in
6876        CC*)
6877	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6878	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6879	  ;;
6880	*)
6881	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6882	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6883	  ;;
6884      esac
6885      ;;
6886
6887      sysv5* | sco3.2v5* | sco5v6*)
6888	# Note: We can NOT use -z defs as we might desire, because we do not
6889	# link with -lc, and that would cause any symbols used from libc to
6890	# always be unresolved, which means just about no library would
6891	# ever link correctly.  If we're not using GNU ld we use -z text
6892	# though, which does catch some bad symbols but isn't as heavy-handed
6893	# as -z defs.
6894	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6895	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6896	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6897	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6898	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6899	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6900	_LT_TAGVAR(link_all_deplibs, $1)=yes
6901	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6902	runpath_var='LD_RUN_PATH'
6903
6904	case $cc_basename in
6905          CC*)
6906	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6907	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6908	    ;;
6909	  *)
6910	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6911	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6912	    ;;
6913	esac
6914      ;;
6915
6916      tandem*)
6917        case $cc_basename in
6918          NCC*)
6919	    # NonStop-UX NCC 3.20
6920	    # FIXME: insert proper C++ library support
6921	    _LT_TAGVAR(ld_shlibs, $1)=no
6922	    ;;
6923          *)
6924	    # FIXME: insert proper C++ library support
6925	    _LT_TAGVAR(ld_shlibs, $1)=no
6926	    ;;
6927        esac
6928        ;;
6929
6930      vxworks*)
6931        # FIXME: insert proper C++ library support
6932        _LT_TAGVAR(ld_shlibs, $1)=no
6933        ;;
6934
6935      *)
6936        # FIXME: insert proper C++ library support
6937        _LT_TAGVAR(ld_shlibs, $1)=no
6938        ;;
6939    esac
6940
6941    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6942    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6943
6944    _LT_TAGVAR(GCC, $1)="$GXX"
6945    _LT_TAGVAR(LD, $1)="$LD"
6946
6947    ## CAVEAT EMPTOR:
6948    ## There is no encapsulation within the following macros, do not change
6949    ## the running order or otherwise move them around unless you know exactly
6950    ## what you are doing...
6951    _LT_SYS_HIDDEN_LIBDEPS($1)
6952    _LT_COMPILER_PIC($1)
6953    _LT_COMPILER_C_O($1)
6954    _LT_COMPILER_FILE_LOCKS($1)
6955    _LT_LINKER_SHLIBS($1)
6956    _LT_SYS_DYNAMIC_LINKER($1)
6957    _LT_LINKER_HARDCODE_LIBPATH($1)
6958
6959    _LT_CONFIG($1)
6960  fi # test -n "$compiler"
6961
6962  CC=$lt_save_CC
6963  LDCXX=$LD
6964  LD=$lt_save_LD
6965  GCC=$lt_save_GCC
6966  with_gnu_ld=$lt_save_with_gnu_ld
6967  lt_cv_path_LDCXX=$lt_cv_path_LD
6968  lt_cv_path_LD=$lt_save_path_LD
6969  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6970  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6971fi # test "$_lt_caught_CXX_error" != yes
6972
6973AC_LANG_POP
6974])# _LT_LANG_CXX_CONFIG
6975
6976
6977# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
6978# ---------------------------------
6979# Figure out "hidden" library dependencies from verbose
6980# compiler output when linking a shared library.
6981# Parse the compiler output and extract the necessary
6982# objects, libraries and library flags.
6983m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
6984[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6985# Dependencies to place before and after the object being linked:
6986_LT_TAGVAR(predep_objects, $1)=
6987_LT_TAGVAR(postdep_objects, $1)=
6988_LT_TAGVAR(predeps, $1)=
6989_LT_TAGVAR(postdeps, $1)=
6990_LT_TAGVAR(compiler_lib_search_path, $1)=
6991
6992dnl we can't use the lt_simple_compile_test_code here,
6993dnl because it contains code intended for an executable,
6994dnl not a library.  It's possible we should let each
6995dnl tag define a new lt_????_link_test_code variable,
6996dnl but it's only used here...
6997m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
6998int a;
6999void foo (void) { a = 0; }
7000_LT_EOF
7001], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7002class Foo
7003{
7004public:
7005  Foo (void) { a = 0; }
7006private:
7007  int a;
7008};
7009_LT_EOF
7010], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7011      subroutine foo
7012      implicit none
7013      integer*4 a
7014      a=0
7015      return
7016      end
7017_LT_EOF
7018], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7019      subroutine foo
7020      implicit none
7021      integer a
7022      a=0
7023      return
7024      end
7025_LT_EOF
7026], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7027public class foo {
7028  private int a;
7029  public void bar (void) {
7030    a = 0;
7031  }
7032};
7033_LT_EOF
7034])
7035dnl Parse the compiler output and extract the necessary
7036dnl objects, libraries and library flags.
7037if AC_TRY_EVAL(ac_compile); then
7038  # Parse the compiler output and extract the necessary
7039  # objects, libraries and library flags.
7040
7041  # Sentinel used to keep track of whether or not we are before
7042  # the conftest object file.
7043  pre_test_object_deps_done=no
7044
7045  for p in `eval "$output_verbose_link_cmd"`; do
7046    case $p in
7047
7048    -L* | -R* | -l*)
7049       # Some compilers place space between "-{L,R}" and the path.
7050       # Remove the space.
7051       if test $p = "-L" ||
7052          test $p = "-R"; then
7053	 prev=$p
7054	 continue
7055       else
7056	 prev=
7057       fi
7058
7059       if test "$pre_test_object_deps_done" = no; then
7060	 case $p in
7061	 -L* | -R*)
7062	   # Internal compiler library paths should come after those
7063	   # provided the user.  The postdeps already come after the
7064	   # user supplied libs so there is no need to process them.
7065	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7066	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
7067	   else
7068	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
7069	   fi
7070	   ;;
7071	 # The "-l" case would never come before the object being
7072	 # linked, so don't bother handling this case.
7073	 esac
7074       else
7075	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7076	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
7077	 else
7078	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
7079	 fi
7080       fi
7081       ;;
7082
7083    *.$objext)
7084       # This assumes that the test object file only shows up
7085       # once in the compiler output.
7086       if test "$p" = "conftest.$objext"; then
7087	 pre_test_object_deps_done=yes
7088	 continue
7089       fi
7090
7091       if test "$pre_test_object_deps_done" = no; then
7092	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7093	   _LT_TAGVAR(predep_objects, $1)="$p"
7094	 else
7095	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7096	 fi
7097       else
7098	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7099	   _LT_TAGVAR(postdep_objects, $1)="$p"
7100	 else
7101	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7102	 fi
7103       fi
7104       ;;
7105
7106    *) ;; # Ignore the rest.
7107
7108    esac
7109  done
7110
7111  # Clean up.
7112  rm -f a.out a.exe
7113else
7114  echo "libtool.m4: error: problem compiling $1 test program"
7115fi
7116
7117$RM -f confest.$objext
7118
7119# PORTME: override above test on systems where it is broken
7120m4_if([$1], [CXX],
7121[case $host_os in
7122interix[[3-9]]*)
7123  # Interix 3.5 installs completely hosed .la files for C++, so rather than
7124  # hack all around it, let's just trust "g++" to DTRT.
7125  _LT_TAGVAR(predep_objects,$1)=
7126  _LT_TAGVAR(postdep_objects,$1)=
7127  _LT_TAGVAR(postdeps,$1)=
7128  ;;
7129
7130linux*)
7131  case `$CC -V 2>&1 | sed 5q` in
7132  *Sun\ C*)
7133    # Sun C++ 5.9
7134
7135    # The more standards-conforming stlport4 library is
7136    # incompatible with the Cstd library. Avoid specifying
7137    # it if it's in CXXFLAGS. Ignore libCrun as
7138    # -library=stlport4 depends on it.
7139    case " $CXX $CXXFLAGS " in
7140    *" -library=stlport4 "*)
7141      solaris_use_stlport4=yes
7142      ;;
7143    esac
7144
7145    if test "$solaris_use_stlport4" != yes; then
7146      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7147    fi
7148    ;;
7149  esac
7150  ;;
7151
7152solaris*)
7153  case $cc_basename in
7154  CC*)
7155    # The more standards-conforming stlport4 library is
7156    # incompatible with the Cstd library. Avoid specifying
7157    # it if it's in CXXFLAGS. Ignore libCrun as
7158    # -library=stlport4 depends on it.
7159    case " $CXX $CXXFLAGS " in
7160    *" -library=stlport4 "*)
7161      solaris_use_stlport4=yes
7162      ;;
7163    esac
7164
7165    # Adding this requires a known-good setup of shared libraries for
7166    # Sun compiler versions before 5.6, else PIC objects from an old
7167    # archive will be linked into the output, leading to subtle bugs.
7168    if test "$solaris_use_stlport4" != yes; then
7169      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7170    fi
7171    ;;
7172  esac
7173  ;;
7174esac
7175])
7176
7177case " $_LT_TAGVAR(postdeps, $1) " in
7178*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7179esac
7180 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7181if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7182 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
7183fi
7184_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7185    [The directories searched by this compiler when creating a shared library])
7186_LT_TAGDECL([], [predep_objects], [1],
7187    [Dependencies to place before and after the objects being linked to
7188    create a shared library])
7189_LT_TAGDECL([], [postdep_objects], [1])
7190_LT_TAGDECL([], [predeps], [1])
7191_LT_TAGDECL([], [postdeps], [1])
7192_LT_TAGDECL([], [compiler_lib_search_path], [1],
7193    [The library search path used internally by the compiler when linking
7194    a shared library])
7195])# _LT_SYS_HIDDEN_LIBDEPS
7196
7197
7198# _LT_PROG_F77
7199# ------------
7200# Since AC_PROG_F77 is broken, in that it returns the empty string
7201# if there is no fortran compiler, we have our own version here.
7202m4_defun([_LT_PROG_F77],
7203[
7204pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
7205AC_PROG_F77
7206if test -z "$F77" || test "X$F77" = "Xno"; then
7207  _lt_disable_F77=yes
7208fi
7209popdef([AC_MSG_ERROR])
7210])# _LT_PROG_F77
7211
7212dnl aclocal-1.4 backwards compatibility:
7213dnl AC_DEFUN([_LT_PROG_F77], [])
7214
7215
7216# _LT_LANG_F77_CONFIG([TAG])
7217# --------------------------
7218# Ensure that the configuration variables for a Fortran 77 compiler are
7219# suitably defined.  These variables are subsequently used by _LT_CONFIG
7220# to write the compiler configuration to `libtool'.
7221m4_defun([_LT_LANG_F77_CONFIG],
7222[AC_REQUIRE([_LT_PROG_F77])dnl
7223AC_LANG_PUSH(Fortran 77)
7224
7225_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7226_LT_TAGVAR(allow_undefined_flag, $1)=
7227_LT_TAGVAR(always_export_symbols, $1)=no
7228_LT_TAGVAR(archive_expsym_cmds, $1)=
7229_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7230_LT_TAGVAR(hardcode_direct, $1)=no
7231_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7232_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7233_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7234_LT_TAGVAR(hardcode_libdir_separator, $1)=
7235_LT_TAGVAR(hardcode_minus_L, $1)=no
7236_LT_TAGVAR(hardcode_automatic, $1)=no
7237_LT_TAGVAR(inherit_rpath, $1)=no
7238_LT_TAGVAR(module_cmds, $1)=
7239_LT_TAGVAR(module_expsym_cmds, $1)=
7240_LT_TAGVAR(link_all_deplibs, $1)=unknown
7241_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7242_LT_TAGVAR(no_undefined_flag, $1)=
7243_LT_TAGVAR(whole_archive_flag_spec, $1)=
7244_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7245
7246# Source file extension for f77 test sources.
7247ac_ext=f
7248
7249# Object file extension for compiled f77 test sources.
7250objext=o
7251_LT_TAGVAR(objext, $1)=$objext
7252
7253# No sense in running all these tests if we already determined that
7254# the F77 compiler isn't working.  Some variables (like enable_shared)
7255# are currently assumed to apply to all compilers on this platform,
7256# and will be corrupted by setting them based on a non-working compiler.
7257if test "$_lt_disable_F77" != yes; then
7258  # Code to be used in simple compile tests
7259  lt_simple_compile_test_code="\
7260      subroutine t
7261      return
7262      end
7263"
7264
7265  # Code to be used in simple link tests
7266  lt_simple_link_test_code="\
7267      program t
7268      end
7269"
7270
7271  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7272  _LT_TAG_COMPILER
7273
7274  # save warnings/boilerplate of simple test code
7275  _LT_COMPILER_BOILERPLATE
7276  _LT_LINKER_BOILERPLATE
7277
7278  # Allow CC to be a program name with arguments.
7279  lt_save_CC="$CC"
7280  lt_save_GCC=$GCC
7281  CC=${F77-"f77"}
7282  compiler=$CC
7283  _LT_TAGVAR(compiler, $1)=$CC
7284  _LT_CC_BASENAME([$compiler])
7285  GCC=$G77
7286  if test -n "$compiler"; then
7287    AC_MSG_CHECKING([if libtool supports shared libraries])
7288    AC_MSG_RESULT([$can_build_shared])
7289
7290    AC_MSG_CHECKING([whether to build shared libraries])
7291    test "$can_build_shared" = "no" && enable_shared=no
7292
7293    # On AIX, shared libraries and static libraries use the same namespace, and
7294    # are all built from PIC.
7295    case $host_os in
7296      aix3*)
7297        test "$enable_shared" = yes && enable_static=no
7298        if test -n "$RANLIB"; then
7299          archive_cmds="$archive_cmds~\$RANLIB \$lib"
7300          postinstall_cmds='$RANLIB $lib'
7301        fi
7302        ;;
7303      aix[[4-9]]*)
7304	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7305	  test "$enable_shared" = yes && enable_static=no
7306	fi
7307        ;;
7308    esac
7309    AC_MSG_RESULT([$enable_shared])
7310
7311    AC_MSG_CHECKING([whether to build static libraries])
7312    # Make sure either enable_shared or enable_static is yes.
7313    test "$enable_shared" = yes || enable_static=yes
7314    AC_MSG_RESULT([$enable_static])
7315
7316    _LT_TAGVAR(GCC, $1)="$G77"
7317    _LT_TAGVAR(LD, $1)="$LD"
7318
7319    ## CAVEAT EMPTOR:
7320    ## There is no encapsulation within the following macros, do not change
7321    ## the running order or otherwise move them around unless you know exactly
7322    ## what you are doing...
7323    _LT_COMPILER_PIC($1)
7324    _LT_COMPILER_C_O($1)
7325    _LT_COMPILER_FILE_LOCKS($1)
7326    _LT_LINKER_SHLIBS($1)
7327    _LT_SYS_DYNAMIC_LINKER($1)
7328    _LT_LINKER_HARDCODE_LIBPATH($1)
7329
7330    _LT_CONFIG($1)
7331  fi # test -n "$compiler"
7332
7333  GCC=$lt_save_GCC
7334  CC="$lt_save_CC"
7335fi # test "$_lt_disable_F77" != yes
7336
7337AC_LANG_POP
7338])# _LT_LANG_F77_CONFIG
7339
7340
7341# _LT_PROG_FC
7342# -----------
7343# Since AC_PROG_FC is broken, in that it returns the empty string
7344# if there is no fortran compiler, we have our own version here.
7345m4_defun([_LT_PROG_FC],
7346[
7347pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
7348AC_PROG_FC
7349if test -z "$FC" || test "X$FC" = "Xno"; then
7350  _lt_disable_FC=yes
7351fi
7352popdef([AC_MSG_ERROR])
7353])# _LT_PROG_FC
7354
7355dnl aclocal-1.4 backwards compatibility:
7356dnl AC_DEFUN([_LT_PROG_FC], [])
7357
7358
7359# _LT_LANG_FC_CONFIG([TAG])
7360# -------------------------
7361# Ensure that the configuration variables for a Fortran compiler are
7362# suitably defined.  These variables are subsequently used by _LT_CONFIG
7363# to write the compiler configuration to `libtool'.
7364m4_defun([_LT_LANG_FC_CONFIG],
7365[AC_REQUIRE([_LT_PROG_FC])dnl
7366AC_LANG_PUSH(Fortran)
7367
7368_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7369_LT_TAGVAR(allow_undefined_flag, $1)=
7370_LT_TAGVAR(always_export_symbols, $1)=no
7371_LT_TAGVAR(archive_expsym_cmds, $1)=
7372_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7373_LT_TAGVAR(hardcode_direct, $1)=no
7374_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7375_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7376_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7377_LT_TAGVAR(hardcode_libdir_separator, $1)=
7378_LT_TAGVAR(hardcode_minus_L, $1)=no
7379_LT_TAGVAR(hardcode_automatic, $1)=no
7380_LT_TAGVAR(inherit_rpath, $1)=no
7381_LT_TAGVAR(module_cmds, $1)=
7382_LT_TAGVAR(module_expsym_cmds, $1)=
7383_LT_TAGVAR(link_all_deplibs, $1)=unknown
7384_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7385_LT_TAGVAR(no_undefined_flag, $1)=
7386_LT_TAGVAR(whole_archive_flag_spec, $1)=
7387_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7388
7389# Source file extension for fc test sources.
7390ac_ext=${ac_fc_srcext-f}
7391
7392# Object file extension for compiled fc test sources.
7393objext=o
7394_LT_TAGVAR(objext, $1)=$objext
7395
7396# No sense in running all these tests if we already determined that
7397# the FC compiler isn't working.  Some variables (like enable_shared)
7398# are currently assumed to apply to all compilers on this platform,
7399# and will be corrupted by setting them based on a non-working compiler.
7400if test "$_lt_disable_FC" != yes; then
7401  # Code to be used in simple compile tests
7402  lt_simple_compile_test_code="\
7403      subroutine t
7404      return
7405      end
7406"
7407
7408  # Code to be used in simple link tests
7409  lt_simple_link_test_code="\
7410      program t
7411      end
7412"
7413
7414  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7415  _LT_TAG_COMPILER
7416
7417  # save warnings/boilerplate of simple test code
7418  _LT_COMPILER_BOILERPLATE
7419  _LT_LINKER_BOILERPLATE
7420
7421  # Allow CC to be a program name with arguments.
7422  lt_save_CC="$CC"
7423  lt_save_GCC=$GCC
7424  CC=${FC-"f95"}
7425  compiler=$CC
7426  GCC=$ac_cv_fc_compiler_gnu
7427
7428  _LT_TAGVAR(compiler, $1)=$CC
7429  _LT_CC_BASENAME([$compiler])
7430
7431  if test -n "$compiler"; then
7432    AC_MSG_CHECKING([if libtool supports shared libraries])
7433    AC_MSG_RESULT([$can_build_shared])
7434
7435    AC_MSG_CHECKING([whether to build shared libraries])
7436    test "$can_build_shared" = "no" && enable_shared=no
7437
7438    # On AIX, shared libraries and static libraries use the same namespace, and
7439    # are all built from PIC.
7440    case $host_os in
7441      aix3*)
7442        test "$enable_shared" = yes && enable_static=no
7443        if test -n "$RANLIB"; then
7444          archive_cmds="$archive_cmds~\$RANLIB \$lib"
7445          postinstall_cmds='$RANLIB $lib'
7446        fi
7447        ;;
7448      aix[[4-9]]*)
7449	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7450	  test "$enable_shared" = yes && enable_static=no
7451	fi
7452        ;;
7453    esac
7454    AC_MSG_RESULT([$enable_shared])
7455
7456    AC_MSG_CHECKING([whether to build static libraries])
7457    # Make sure either enable_shared or enable_static is yes.
7458    test "$enable_shared" = yes || enable_static=yes
7459    AC_MSG_RESULT([$enable_static])
7460
7461    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
7462    _LT_TAGVAR(LD, $1)="$LD"
7463
7464    ## CAVEAT EMPTOR:
7465    ## There is no encapsulation within the following macros, do not change
7466    ## the running order or otherwise move them around unless you know exactly
7467    ## what you are doing...
7468    _LT_SYS_HIDDEN_LIBDEPS($1)
7469    _LT_COMPILER_PIC($1)
7470    _LT_COMPILER_C_O($1)
7471    _LT_COMPILER_FILE_LOCKS($1)
7472    _LT_LINKER_SHLIBS($1)
7473    _LT_SYS_DYNAMIC_LINKER($1)
7474    _LT_LINKER_HARDCODE_LIBPATH($1)
7475
7476    _LT_CONFIG($1)
7477  fi # test -n "$compiler"
7478
7479  GCC=$lt_save_GCC
7480  CC="$lt_save_CC"
7481fi # test "$_lt_disable_FC" != yes
7482
7483AC_LANG_POP
7484])# _LT_LANG_FC_CONFIG
7485
7486
7487# _LT_LANG_GCJ_CONFIG([TAG])
7488# --------------------------
7489# Ensure that the configuration variables for the GNU Java Compiler compiler
7490# are suitably defined.  These variables are subsequently used by _LT_CONFIG
7491# to write the compiler configuration to `libtool'.
7492m4_defun([_LT_LANG_GCJ_CONFIG],
7493[AC_REQUIRE([LT_PROG_GCJ])dnl
7494AC_LANG_SAVE
7495
7496# Source file extension for Java test sources.
7497ac_ext=java
7498
7499# Object file extension for compiled Java test sources.
7500objext=o
7501_LT_TAGVAR(objext, $1)=$objext
7502
7503# Code to be used in simple compile tests
7504lt_simple_compile_test_code="class foo {}"
7505
7506# Code to be used in simple link tests
7507lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7508
7509# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7510_LT_TAG_COMPILER
7511
7512# save warnings/boilerplate of simple test code
7513_LT_COMPILER_BOILERPLATE
7514_LT_LINKER_BOILERPLATE
7515
7516# Allow CC to be a program name with arguments.
7517lt_save_CC="$CC"
7518lt_save_GCC=$GCC
7519GCC=yes
7520CC=${GCJ-"gcj"}
7521compiler=$CC
7522_LT_TAGVAR(compiler, $1)=$CC
7523_LT_TAGVAR(LD, $1)="$LD"
7524_LT_CC_BASENAME([$compiler])
7525
7526# GCJ did not exist at the time GCC didn't implicitly link libc in.
7527_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7528
7529_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7530
7531if test -n "$compiler"; then
7532  _LT_COMPILER_NO_RTTI($1)
7533  _LT_COMPILER_PIC($1)
7534  _LT_COMPILER_C_O($1)
7535  _LT_COMPILER_FILE_LOCKS($1)
7536  _LT_LINKER_SHLIBS($1)
7537  _LT_LINKER_HARDCODE_LIBPATH($1)
7538
7539  _LT_CONFIG($1)
7540fi
7541
7542AC_LANG_RESTORE
7543
7544GCC=$lt_save_GCC
7545CC="$lt_save_CC"
7546])# _LT_LANG_GCJ_CONFIG
7547
7548
7549# _LT_LANG_RC_CONFIG([TAG])
7550# -------------------------
7551# Ensure that the configuration variables for the Windows resource compiler
7552# are suitably defined.  These variables are subsequently used by _LT_CONFIG
7553# to write the compiler configuration to `libtool'.
7554m4_defun([_LT_LANG_RC_CONFIG],
7555[AC_REQUIRE([LT_PROG_RC])dnl
7556AC_LANG_SAVE
7557
7558# Source file extension for RC test sources.
7559ac_ext=rc
7560
7561# Object file extension for compiled RC test sources.
7562objext=o
7563_LT_TAGVAR(objext, $1)=$objext
7564
7565# Code to be used in simple compile tests
7566lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
7567
7568# Code to be used in simple link tests
7569lt_simple_link_test_code="$lt_simple_compile_test_code"
7570
7571# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7572_LT_TAG_COMPILER
7573
7574# save warnings/boilerplate of simple test code
7575_LT_COMPILER_BOILERPLATE
7576_LT_LINKER_BOILERPLATE
7577
7578# Allow CC to be a program name with arguments.
7579lt_save_CC="$CC"
7580lt_save_GCC=$GCC
7581GCC=
7582CC=${RC-"windres"}
7583compiler=$CC
7584_LT_TAGVAR(compiler, $1)=$CC
7585_LT_CC_BASENAME([$compiler])
7586_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
7587
7588if test -n "$compiler"; then
7589  :
7590  _LT_CONFIG($1)
7591fi
7592
7593GCC=$lt_save_GCC
7594AC_LANG_RESTORE
7595CC="$lt_save_CC"
7596])# _LT_LANG_RC_CONFIG
7597
7598
7599# LT_PROG_GCJ
7600# -----------
7601AC_DEFUN([LT_PROG_GCJ],
7602[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
7603  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
7604    [AC_CHECK_TOOL(GCJ, gcj,)
7605      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7606      AC_SUBST(GCJFLAGS)])])[]dnl
7607])
7608
7609# Old name:
7610AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
7611dnl aclocal-1.4 backwards compatibility:
7612dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
7613
7614
7615# LT_PROG_RC
7616# ----------
7617AC_DEFUN([LT_PROG_RC],
7618[AC_CHECK_TOOL(RC, windres,)
7619])
7620
7621# Old name:
7622AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
7623dnl aclocal-1.4 backwards compatibility:
7624dnl AC_DEFUN([LT_AC_PROG_RC], [])
7625
7626
7627# _LT_DECL_EGREP
7628# --------------
7629# If we don't have a new enough Autoconf to choose the best grep
7630# available, choose the one first in the user's PATH.
7631m4_defun([_LT_DECL_EGREP],
7632[AC_REQUIRE([AC_PROG_EGREP])dnl
7633AC_REQUIRE([AC_PROG_FGREP])dnl
7634test -z "$GREP" && GREP=grep
7635_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
7636_LT_DECL([], [EGREP], [1], [An ERE matcher])
7637_LT_DECL([], [FGREP], [1], [A literal string matcher])
7638dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
7639AC_SUBST([GREP])
7640])
7641
7642
7643# _LT_DECL_OBJDUMP
7644# --------------
7645# If we don't have a new enough Autoconf to choose the best objdump
7646# available, choose the one first in the user's PATH.
7647m4_defun([_LT_DECL_OBJDUMP],
7648[AC_CHECK_TOOL(OBJDUMP, objdump, false)
7649test -z "$OBJDUMP" && OBJDUMP=objdump
7650_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
7651AC_SUBST([OBJDUMP])
7652])
7653
7654
7655# _LT_DECL_SED
7656# ------------
7657# Check for a fully-functional sed program, that truncates
7658# as few characters as possible.  Prefer GNU sed if found.
7659m4_defun([_LT_DECL_SED],
7660[AC_PROG_SED
7661test -z "$SED" && SED=sed
7662Xsed="$SED -e 1s/^X//"
7663_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
7664_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
7665    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
7666])# _LT_DECL_SED
7667
7668m4_ifndef([AC_PROG_SED], [
7669# NOTE: This macro has been submitted for inclusion into   #
7670#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
7671#  a released version of Autoconf we should remove this    #
7672#  macro and use it instead.                               #
7673
7674m4_defun([AC_PROG_SED],
7675[AC_MSG_CHECKING([for a sed that does not truncate output])
7676AC_CACHE_VAL(lt_cv_path_SED,
7677[# Loop through the user's path and test for sed and gsed.
7678# Then use that list of sed's as ones to test for truncation.
7679as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7680for as_dir in $PATH
7681do
7682  IFS=$as_save_IFS
7683  test -z "$as_dir" && as_dir=.
7684  for lt_ac_prog in sed gsed; do
7685    for ac_exec_ext in '' $ac_executable_extensions; do
7686      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7687        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7688      fi
7689    done
7690  done
7691done
7692IFS=$as_save_IFS
7693lt_ac_max=0
7694lt_ac_count=0
7695# Add /usr/xpg4/bin/sed as it is typically found on Solaris
7696# along with /bin/sed that truncates output.
7697for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7698  test ! -f $lt_ac_sed && continue
7699  cat /dev/null > conftest.in
7700  lt_ac_count=0
7701  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7702  # Check for GNU sed and select it if it is found.
7703  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7704    lt_cv_path_SED=$lt_ac_sed
7705    break
7706  fi
7707  while true; do
7708    cat conftest.in conftest.in >conftest.tmp
7709    mv conftest.tmp conftest.in
7710    cp conftest.in conftest.nl
7711    echo >>conftest.nl
7712    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7713    cmp -s conftest.out conftest.nl || break
7714    # 10000 chars as input seems more than enough
7715    test $lt_ac_count -gt 10 && break
7716    lt_ac_count=`expr $lt_ac_count + 1`
7717    if test $lt_ac_count -gt $lt_ac_max; then
7718      lt_ac_max=$lt_ac_count
7719      lt_cv_path_SED=$lt_ac_sed
7720    fi
7721  done
7722done
7723])
7724SED=$lt_cv_path_SED
7725AC_SUBST([SED])
7726AC_MSG_RESULT([$SED])
7727])#AC_PROG_SED
7728])#m4_ifndef
7729
7730# Old name:
7731AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
7732dnl aclocal-1.4 backwards compatibility:
7733dnl AC_DEFUN([LT_AC_PROG_SED], [])
7734
7735
7736# _LT_CHECK_SHELL_FEATURES
7737# ------------------------
7738# Find out whether the shell is Bourne or XSI compatible,
7739# or has some other useful features.
7740m4_defun([_LT_CHECK_SHELL_FEATURES],
7741[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7742# Try some XSI features
7743xsi_shell=no
7744( _lt_dummy="a/b/c"
7745  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
7746      = c,a/b,, \
7747    && eval 'test $(( 1 + 1 )) -eq 2 \
7748    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7749  && xsi_shell=yes
7750AC_MSG_RESULT([$xsi_shell])
7751_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7752
7753AC_MSG_CHECKING([whether the shell understands "+="])
7754lt_shell_append=no
7755( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7756    >/dev/null 2>&1 \
7757  && lt_shell_append=yes
7758AC_MSG_RESULT([$lt_shell_append])
7759_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
7760
7761if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7762  lt_unset=unset
7763else
7764  lt_unset=false
7765fi
7766_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
7767
7768# test EBCDIC or ASCII
7769case `echo X|tr X '\101'` in
7770 A) # ASCII based system
7771    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7772  lt_SP2NL='tr \040 \012'
7773  lt_NL2SP='tr \015\012 \040\040'
7774  ;;
7775 *) # EBCDIC based system
7776  lt_SP2NL='tr \100 \n'
7777  lt_NL2SP='tr \r\n \100\100'
7778  ;;
7779esac
7780_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
7781_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
7782])# _LT_CHECK_SHELL_FEATURES
7783
7784
7785# _LT_PROG_XSI_SHELLFNS
7786# ---------------------
7787# Bourne and XSI compatible variants of some useful shell functions.
7788m4_defun([_LT_PROG_XSI_SHELLFNS],
7789[case $xsi_shell in
7790  yes)
7791    cat << \_LT_EOF >> "$cfgfile"
7792
7793# func_dirname file append nondir_replacement
7794# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
7795# otherwise set result to NONDIR_REPLACEMENT.
7796func_dirname ()
7797{
7798  case ${1} in
7799    */*) func_dirname_result="${1%/*}${2}" ;;
7800    *  ) func_dirname_result="${3}" ;;
7801  esac
7802}
7803
7804# func_basename file
7805func_basename ()
7806{
7807  func_basename_result="${1##*/}"
7808}
7809
7810# func_dirname_and_basename file append nondir_replacement
7811# perform func_basename and func_dirname in a single function
7812# call:
7813#   dirname:  Compute the dirname of FILE.  If nonempty,
7814#             add APPEND to the result, otherwise set result
7815#             to NONDIR_REPLACEMENT.
7816#             value returned in "$func_dirname_result"
7817#   basename: Compute filename of FILE.
7818#             value retuned in "$func_basename_result"
7819# Implementation must be kept synchronized with func_dirname
7820# and func_basename. For efficiency, we do not delegate to
7821# those functions but instead duplicate the functionality here.
7822func_dirname_and_basename ()
7823{
7824  case ${1} in
7825    */*) func_dirname_result="${1%/*}${2}" ;;
7826    *  ) func_dirname_result="${3}" ;;
7827  esac
7828  func_basename_result="${1##*/}"
7829}
7830
7831# func_stripname prefix suffix name
7832# strip PREFIX and SUFFIX off of NAME.
7833# PREFIX and SUFFIX must not contain globbing or regex special
7834# characters, hashes, percent signs, but SUFFIX may contain a leading
7835# dot (in which case that matches only a dot).
7836func_stripname ()
7837{
7838  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7839  # positional parameters, so assign one to ordinary parameter first.
7840  func_stripname_result=${3}
7841  func_stripname_result=${func_stripname_result#"${1}"}
7842  func_stripname_result=${func_stripname_result%"${2}"}
7843}
7844
7845# func_opt_split
7846func_opt_split ()
7847{
7848  func_opt_split_opt=${1%%=*}
7849  func_opt_split_arg=${1#*=}
7850}
7851
7852# func_lo2o object
7853func_lo2o ()
7854{
7855  case ${1} in
7856    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7857    *)    func_lo2o_result=${1} ;;
7858  esac
7859}
7860
7861# func_xform libobj-or-source
7862func_xform ()
7863{
7864  func_xform_result=${1%.*}.lo
7865}
7866
7867# func_arith arithmetic-term...
7868func_arith ()
7869{
7870  func_arith_result=$(( $[*] ))
7871}
7872
7873# func_len string
7874# STRING may not start with a hyphen.
7875func_len ()
7876{
7877  func_len_result=${#1}
7878}
7879
7880_LT_EOF
7881    ;;
7882  *) # Bourne compatible functions.
7883    cat << \_LT_EOF >> "$cfgfile"
7884
7885# func_dirname file append nondir_replacement
7886# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
7887# otherwise set result to NONDIR_REPLACEMENT.
7888func_dirname ()
7889{
7890  # Extract subdirectory from the argument.
7891  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
7892  if test "X$func_dirname_result" = "X${1}"; then
7893    func_dirname_result="${3}"
7894  else
7895    func_dirname_result="$func_dirname_result${2}"
7896  fi
7897}
7898
7899# func_basename file
7900func_basename ()
7901{
7902  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
7903}
7904
7905dnl func_dirname_and_basename
7906dnl A portable version of this function is already defined in general.m4sh
7907dnl so there is no need for it here.
7908
7909# func_stripname prefix suffix name
7910# strip PREFIX and SUFFIX off of NAME.
7911# PREFIX and SUFFIX must not contain globbing or regex special
7912# characters, hashes, percent signs, but SUFFIX may contain a leading
7913# dot (in which case that matches only a dot).
7914# func_strip_suffix prefix name
7915func_stripname ()
7916{
7917  case ${2} in
7918    .*) func_stripname_result=`$ECHO "X${3}" \
7919           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
7920    *)  func_stripname_result=`$ECHO "X${3}" \
7921           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
7922  esac
7923}
7924
7925# sed scripts:
7926my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
7927my_sed_long_arg='1s/^-[[^=]]*=//'
7928
7929# func_opt_split
7930func_opt_split ()
7931{
7932  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
7933  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
7934}
7935
7936# func_lo2o object
7937func_lo2o ()
7938{
7939  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
7940}
7941
7942# func_xform libobj-or-source
7943func_xform ()
7944{
7945  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
7946}
7947
7948# func_arith arithmetic-term...
7949func_arith ()
7950{
7951  func_arith_result=`expr "$[@]"`
7952}
7953
7954# func_len string
7955# STRING may not start with a hyphen.
7956func_len ()
7957{
7958  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
7959}
7960
7961_LT_EOF
7962esac
7963
7964case $lt_shell_append in
7965  yes)
7966    cat << \_LT_EOF >> "$cfgfile"
7967
7968# func_append var value
7969# Append VALUE to the end of shell variable VAR.
7970func_append ()
7971{
7972  eval "$[1]+=\$[2]"
7973}
7974_LT_EOF
7975    ;;
7976  *)
7977    cat << \_LT_EOF >> "$cfgfile"
7978
7979# func_append var value
7980# Append VALUE to the end of shell variable VAR.
7981func_append ()
7982{
7983  eval "$[1]=\$$[1]\$[2]"
7984}
7985
7986_LT_EOF
7987    ;;
7988  esac
7989])
7990
7991# Helper functions for option handling.                    -*- Autoconf -*-
7992#
7993#   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
7994#   Written by Gary V. Vaughan, 2004
7995#
7996# This file is free software; the Free Software Foundation gives
7997# unlimited permission to copy and/or distribute it, with or without
7998# modifications, as long as this notice is preserved.
7999
8000# serial 6 ltoptions.m4
8001
8002# This is to help aclocal find these macros, as it can't see m4_define.
8003AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
8004
8005
8006# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
8007# ------------------------------------------
8008m4_define([_LT_MANGLE_OPTION],
8009[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
8010
8011
8012# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
8013# ---------------------------------------
8014# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
8015# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
8016# saved as a flag.
8017m4_define([_LT_SET_OPTION],
8018[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
8019m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
8020        _LT_MANGLE_DEFUN([$1], [$2]),
8021    [m4_warning([Unknown $1 option `$2'])])[]dnl
8022])
8023
8024
8025# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
8026# ------------------------------------------------------------
8027# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8028m4_define([_LT_IF_OPTION],
8029[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
8030
8031
8032# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
8033# -------------------------------------------------------
8034# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
8035# are set.
8036m4_define([_LT_UNLESS_OPTIONS],
8037[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8038	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
8039		      [m4_define([$0_found])])])[]dnl
8040m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
8041])[]dnl
8042])
8043
8044
8045# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
8046# ----------------------------------------
8047# OPTION-LIST is a space-separated list of Libtool options associated
8048# with MACRO-NAME.  If any OPTION has a matching handler declared with
8049# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
8050# the unknown option and exit.
8051m4_defun([_LT_SET_OPTIONS],
8052[# Set options
8053m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8054    [_LT_SET_OPTION([$1], _LT_Option)])
8055
8056m4_if([$1],[LT_INIT],[
8057  dnl
8058  dnl Simply set some default values (i.e off) if boolean options were not
8059  dnl specified:
8060  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
8061  ])
8062  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
8063  ])
8064  dnl
8065  dnl If no reference was made to various pairs of opposing options, then
8066  dnl we run the default mode handler for the pair.  For example, if neither
8067  dnl `shared' nor `disable-shared' was passed, we enable building of shared
8068  dnl archives by default:
8069  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
8070  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
8071  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
8072  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
8073  		   [_LT_ENABLE_FAST_INSTALL])
8074  ])
8075])# _LT_SET_OPTIONS
8076
8077
8078
8079# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
8080# -----------------------------------------
8081m4_define([_LT_MANGLE_DEFUN],
8082[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
8083
8084
8085# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
8086# -----------------------------------------------
8087m4_define([LT_OPTION_DEFINE],
8088[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
8089])# LT_OPTION_DEFINE
8090
8091
8092# dlopen
8093# ------
8094LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
8095])
8096
8097AU_DEFUN([AC_LIBTOOL_DLOPEN],
8098[_LT_SET_OPTION([LT_INIT], [dlopen])
8099AC_DIAGNOSE([obsolete],
8100[$0: Remove this warning and the call to _LT_SET_OPTION when you
8101put the `dlopen' option into LT_INIT's first parameter.])
8102])
8103
8104dnl aclocal-1.4 backwards compatibility:
8105dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
8106
8107
8108# win32-dll
8109# ---------
8110# Declare package support for building win32 dll's.
8111LT_OPTION_DEFINE([LT_INIT], [win32-dll],
8112[enable_win32_dll=yes
8113
8114case $host in
8115*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
8116  AC_CHECK_TOOL(AS, as, false)
8117  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8118  AC_CHECK_TOOL(OBJDUMP, objdump, false)
8119  ;;
8120esac
8121
8122test -z "$AS" && AS=as
8123_LT_DECL([], [AS],      [0], [Assembler program])dnl
8124
8125test -z "$DLLTOOL" && DLLTOOL=dlltool
8126_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
8127
8128test -z "$OBJDUMP" && OBJDUMP=objdump
8129_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
8130])# win32-dll
8131
8132AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
8133[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8134_LT_SET_OPTION([LT_INIT], [win32-dll])
8135AC_DIAGNOSE([obsolete],
8136[$0: Remove this warning and the call to _LT_SET_OPTION when you
8137put the `win32-dll' option into LT_INIT's first parameter.])
8138])
8139
8140dnl aclocal-1.4 backwards compatibility:
8141dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
8142
8143
8144# _LT_ENABLE_SHARED([DEFAULT])
8145# ----------------------------
8146# implement the --enable-shared flag, and supports the `shared' and
8147# `disable-shared' LT_INIT options.
8148# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
8149m4_define([_LT_ENABLE_SHARED],
8150[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
8151AC_ARG_ENABLE([shared],
8152    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
8153	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
8154    [p=${PACKAGE-default}
8155    case $enableval in
8156    yes) enable_shared=yes ;;
8157    no) enable_shared=no ;;
8158    *)
8159      enable_shared=no
8160      # Look at the argument we got.  We use all the common list separators.
8161      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8162      for pkg in $enableval; do
8163	IFS="$lt_save_ifs"
8164	if test "X$pkg" = "X$p"; then
8165	  enable_shared=yes
8166	fi
8167      done
8168      IFS="$lt_save_ifs"
8169      ;;
8170    esac],
8171    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
8172
8173    _LT_DECL([build_libtool_libs], [enable_shared], [0],
8174	[Whether or not to build shared libraries])
8175])# _LT_ENABLE_SHARED
8176
8177LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
8178LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
8179
8180# Old names:
8181AC_DEFUN([AC_ENABLE_SHARED],
8182[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
8183])
8184
8185AC_DEFUN([AC_DISABLE_SHARED],
8186[_LT_SET_OPTION([LT_INIT], [disable-shared])
8187])
8188
8189AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
8190AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
8191
8192dnl aclocal-1.4 backwards compatibility:
8193dnl AC_DEFUN([AM_ENABLE_SHARED], [])
8194dnl AC_DEFUN([AM_DISABLE_SHARED], [])
8195
8196
8197
8198# _LT_ENABLE_STATIC([DEFAULT])
8199# ----------------------------
8200# implement the --enable-static flag, and support the `static' and
8201# `disable-static' LT_INIT options.
8202# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
8203m4_define([_LT_ENABLE_STATIC],
8204[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
8205AC_ARG_ENABLE([static],
8206    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
8207	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
8208    [p=${PACKAGE-default}
8209    case $enableval in
8210    yes) enable_static=yes ;;
8211    no) enable_static=no ;;
8212    *)
8213     enable_static=no
8214      # Look at the argument we got.  We use all the common list separators.
8215      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8216      for pkg in $enableval; do
8217	IFS="$lt_save_ifs"
8218	if test "X$pkg" = "X$p"; then
8219	  enable_static=yes
8220	fi
8221      done
8222      IFS="$lt_save_ifs"
8223      ;;
8224    esac],
8225    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
8226
8227    _LT_DECL([build_old_libs], [enable_static], [0],
8228	[Whether or not to build static libraries])
8229])# _LT_ENABLE_STATIC
8230
8231LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
8232LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
8233
8234# Old names:
8235AC_DEFUN([AC_ENABLE_STATIC],
8236[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
8237])
8238
8239AC_DEFUN([AC_DISABLE_STATIC],
8240[_LT_SET_OPTION([LT_INIT], [disable-static])
8241])
8242
8243AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
8244AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
8245
8246dnl aclocal-1.4 backwards compatibility:
8247dnl AC_DEFUN([AM_ENABLE_STATIC], [])
8248dnl AC_DEFUN([AM_DISABLE_STATIC], [])
8249
8250
8251
8252# _LT_ENABLE_FAST_INSTALL([DEFAULT])
8253# ----------------------------------
8254# implement the --enable-fast-install flag, and support the `fast-install'
8255# and `disable-fast-install' LT_INIT options.
8256# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
8257m4_define([_LT_ENABLE_FAST_INSTALL],
8258[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
8259AC_ARG_ENABLE([fast-install],
8260    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
8261    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
8262    [p=${PACKAGE-default}
8263    case $enableval in
8264    yes) enable_fast_install=yes ;;
8265    no) enable_fast_install=no ;;
8266    *)
8267      enable_fast_install=no
8268      # Look at the argument we got.  We use all the common list separators.
8269      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8270      for pkg in $enableval; do
8271	IFS="$lt_save_ifs"
8272	if test "X$pkg" = "X$p"; then
8273	  enable_fast_install=yes
8274	fi
8275      done
8276      IFS="$lt_save_ifs"
8277      ;;
8278    esac],
8279    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
8280
8281_LT_DECL([fast_install], [enable_fast_install], [0],
8282	 [Whether or not to optimize for fast installation])dnl
8283])# _LT_ENABLE_FAST_INSTALL
8284
8285LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
8286LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
8287
8288# Old names:
8289AU_DEFUN([AC_ENABLE_FAST_INSTALL],
8290[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
8291AC_DIAGNOSE([obsolete],
8292[$0: Remove this warning and the call to _LT_SET_OPTION when you put
8293the `fast-install' option into LT_INIT's first parameter.])
8294])
8295
8296AU_DEFUN([AC_DISABLE_FAST_INSTALL],
8297[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
8298AC_DIAGNOSE([obsolete],
8299[$0: Remove this warning and the call to _LT_SET_OPTION when you put
8300the `disable-fast-install' option into LT_INIT's first parameter.])
8301])
8302
8303dnl aclocal-1.4 backwards compatibility:
8304dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
8305dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
8306
8307
8308# _LT_WITH_PIC([MODE])
8309# --------------------
8310# implement the --with-pic flag, and support the `pic-only' and `no-pic'
8311# LT_INIT options.
8312# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
8313m4_define([_LT_WITH_PIC],
8314[AC_ARG_WITH([pic],
8315    [AS_HELP_STRING([--with-pic],
8316	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
8317    [pic_mode="$withval"],
8318    [pic_mode=default])
8319
8320test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
8321
8322_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
8323])# _LT_WITH_PIC
8324
8325LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
8326LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
8327
8328# Old name:
8329AU_DEFUN([AC_LIBTOOL_PICMODE],
8330[_LT_SET_OPTION([LT_INIT], [pic-only])
8331AC_DIAGNOSE([obsolete],
8332[$0: Remove this warning and the call to _LT_SET_OPTION when you
8333put the `pic-only' option into LT_INIT's first parameter.])
8334])
8335
8336dnl aclocal-1.4 backwards compatibility:
8337dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
8338
8339
8340m4_define([_LTDL_MODE], [])
8341LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
8342		 [m4_define([_LTDL_MODE], [nonrecursive])])
8343LT_OPTION_DEFINE([LTDL_INIT], [recursive],
8344		 [m4_define([_LTDL_MODE], [recursive])])
8345LT_OPTION_DEFINE([LTDL_INIT], [subproject],
8346		 [m4_define([_LTDL_MODE], [subproject])])
8347
8348m4_define([_LTDL_TYPE], [])
8349LT_OPTION_DEFINE([LTDL_INIT], [installable],
8350		 [m4_define([_LTDL_TYPE], [installable])])
8351LT_OPTION_DEFINE([LTDL_INIT], [convenience],
8352		 [m4_define([_LTDL_TYPE], [convenience])])
8353
8354# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
8355#
8356# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
8357# Written by Gary V. Vaughan, 2004
8358#
8359# This file is free software; the Free Software Foundation gives
8360# unlimited permission to copy and/or distribute it, with or without
8361# modifications, as long as this notice is preserved.
8362
8363# serial 6 ltsugar.m4
8364
8365# This is to help aclocal find these macros, as it can't see m4_define.
8366AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
8367
8368
8369# lt_join(SEP, ARG1, [ARG2...])
8370# -----------------------------
8371# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
8372# associated separator.
8373# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
8374# versions in m4sugar had bugs.
8375m4_define([lt_join],
8376[m4_if([$#], [1], [],
8377       [$#], [2], [[$2]],
8378       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
8379m4_define([_lt_join],
8380[m4_if([$#$2], [2], [],
8381       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
8382
8383
8384# lt_car(LIST)
8385# lt_cdr(LIST)
8386# ------------
8387# Manipulate m4 lists.
8388# These macros are necessary as long as will still need to support
8389# Autoconf-2.59 which quotes differently.
8390m4_define([lt_car], [[$1]])
8391m4_define([lt_cdr],
8392[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
8393       [$#], 1, [],
8394       [m4_dquote(m4_shift($@))])])
8395m4_define([lt_unquote], $1)
8396
8397
8398# lt_append(MACRO-NAME, STRING, [SEPARATOR])
8399# ------------------------------------------
8400# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
8401# Note that neither SEPARATOR nor STRING are expanded; they are appended
8402# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
8403# No SEPARATOR is output if MACRO-NAME was previously undefined (different
8404# than defined and empty).
8405#
8406# This macro is needed until we can rely on Autoconf 2.62, since earlier
8407# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
8408m4_define([lt_append],
8409[m4_define([$1],
8410	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
8411
8412
8413
8414# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
8415# ----------------------------------------------------------
8416# Produce a SEP delimited list of all paired combinations of elements of
8417# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
8418# has the form PREFIXmINFIXSUFFIXn.
8419# Needed until we can rely on m4_combine added in Autoconf 2.62.
8420m4_define([lt_combine],
8421[m4_if(m4_eval([$# > 3]), [1],
8422       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
8423[[m4_foreach([_Lt_prefix], [$2],
8424	     [m4_foreach([_Lt_suffix],
8425		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
8426	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
8427
8428
8429# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
8430# -----------------------------------------------------------------------
8431# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
8432# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
8433m4_define([lt_if_append_uniq],
8434[m4_ifdef([$1],
8435	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
8436		 [lt_append([$1], [$2], [$3])$4],
8437		 [$5])],
8438	  [lt_append([$1], [$2], [$3])$4])])
8439
8440
8441# lt_dict_add(DICT, KEY, VALUE)
8442# -----------------------------
8443m4_define([lt_dict_add],
8444[m4_define([$1($2)], [$3])])
8445
8446
8447# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
8448# --------------------------------------------
8449m4_define([lt_dict_add_subkey],
8450[m4_define([$1($2:$3)], [$4])])
8451
8452
8453# lt_dict_fetch(DICT, KEY, [SUBKEY])
8454# ----------------------------------
8455m4_define([lt_dict_fetch],
8456[m4_ifval([$3],
8457	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
8458    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
8459
8460
8461# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
8462# -----------------------------------------------------------------
8463m4_define([lt_if_dict_fetch],
8464[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
8465	[$5],
8466    [$6])])
8467
8468
8469# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
8470# --------------------------------------------------------------
8471m4_define([lt_dict_filter],
8472[m4_if([$5], [], [],
8473  [lt_join(m4_quote(m4_default([$4], [[, ]])),
8474           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
8475		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
8476])
8477
8478# ltversion.m4 -- version numbers			-*- Autoconf -*-
8479#
8480#   Copyright (C) 2004 Free Software Foundation, Inc.
8481#   Written by Scott James Remnant, 2004
8482#
8483# This file is free software; the Free Software Foundation gives
8484# unlimited permission to copy and/or distribute it, with or without
8485# modifications, as long as this notice is preserved.
8486
8487# Generated from ltversion.in.
8488
8489# serial 3012 ltversion.m4
8490# This file is part of GNU Libtool
8491
8492m4_define([LT_PACKAGE_VERSION], [2.2.6])
8493m4_define([LT_PACKAGE_REVISION], [1.3012])
8494
8495AC_DEFUN([LTVERSION_VERSION],
8496[macro_version='2.2.6'
8497macro_revision='1.3012'
8498_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
8499_LT_DECL(, macro_revision, 0)
8500])
8501
8502# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
8503#
8504#   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
8505#   Written by Scott James Remnant, 2004.
8506#
8507# This file is free software; the Free Software Foundation gives
8508# unlimited permission to copy and/or distribute it, with or without
8509# modifications, as long as this notice is preserved.
8510
8511# serial 4 lt~obsolete.m4
8512
8513# These exist entirely to fool aclocal when bootstrapping libtool.
8514#
8515# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
8516# which have later been changed to m4_define as they aren't part of the
8517# exported API, or moved to Autoconf or Automake where they belong.
8518#
8519# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
8520# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
8521# using a macro with the same name in our local m4/libtool.m4 it'll
8522# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
8523# and doesn't know about Autoconf macros at all.)
8524#
8525# So we provide this file, which has a silly filename so it's always
8526# included after everything else.  This provides aclocal with the
8527# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
8528# because those macros already exist, or will be overwritten later.
8529# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
8530#
8531# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
8532# Yes, that means every name once taken will need to remain here until
8533# we give up compatibility with versions before 1.7, at which point
8534# we need to keep only those names which we still refer to.
8535
8536# This is to help aclocal find these macros, as it can't see m4_define.
8537AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
8538
8539m4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
8540m4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
8541m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
8542m4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
8543m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
8544m4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
8545m4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
8546m4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
8547m4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
8548m4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
8549m4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
8550m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
8551m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
8552m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
8553m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
8554m4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
8555m4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
8556m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
8557m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
8558m4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
8559m4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
8560m4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
8561m4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
8562m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
8563m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
8564m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
8565m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
8566m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
8567m4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
8568m4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
8569m4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
8570m4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
8571m4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
8572m4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
8573m4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
8574m4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
8575m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
8576m4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
8577m4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
8578m4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
8579m4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
8580m4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
8581m4_ifndef([AC_LIBTOOL_RC],		[AC_DEFUN([AC_LIBTOOL_RC])])
8582m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
8583m4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
8584m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
8585m4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
8586m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
8587m4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
8588m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
8589m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
8590m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
8591m4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
8592m4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
8593m4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
8594
8595# nls.m4 serial 3 (gettext-0.15)
8596dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
8597dnl This file is free software; the Free Software Foundation
8598dnl gives unlimited permission to copy and/or distribute it,
8599dnl with or without modifications, as long as this notice is preserved.
8600dnl
8601dnl This file can can be used in projects which are not available under
8602dnl the GNU General Public License or the GNU Library General Public
8603dnl License but which still want to provide support for the GNU gettext
8604dnl functionality.
8605dnl Please note that the actual code of the GNU gettext library is covered
8606dnl by the GNU Library General Public License, and the rest of the GNU
8607dnl gettext package package is covered by the GNU General Public License.
8608dnl They are *not* in the public domain.
8609
8610dnl Authors:
8611dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
8612dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
8613
8614AC_PREREQ(2.50)
8615
8616AC_DEFUN([AM_NLS],
8617[
8618  AC_MSG_CHECKING([whether NLS is requested])
8619  dnl Default is enabled NLS
8620  AC_ARG_ENABLE(nls,
8621    [  --disable-nls           do not use Native Language Support],
8622    USE_NLS=$enableval, USE_NLS=yes)
8623  AC_MSG_RESULT($USE_NLS)
8624  AC_SUBST(USE_NLS)
8625])
8626
8627# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
8628#
8629# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
8630#
8631# This program is free software; you can redistribute it and/or modify
8632# it under the terms of the GNU General Public License as published by
8633# the Free Software Foundation; either version 2 of the License, or
8634# (at your option) any later version.
8635#
8636# This program is distributed in the hope that it will be useful, but
8637# WITHOUT ANY WARRANTY; without even the implied warranty of
8638# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
8639# General Public License for more details.
8640#
8641# You should have received a copy of the GNU General Public License
8642# along with this program; if not, write to the Free Software
8643# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
8644#
8645# As a special exception to the GNU General Public License, if you
8646# distribute this file as part of a program that contains a
8647# configuration script generated by Autoconf, you may include it under
8648# the same distribution terms that you use for the rest of that program.
8649
8650# PKG_PROG_PKG_CONFIG([MIN-VERSION])
8651# ----------------------------------
8652AC_DEFUN([PKG_PROG_PKG_CONFIG],
8653[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
8654m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
8655AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
8656if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
8657	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
8658fi
8659if test -n "$PKG_CONFIG"; then
8660	_pkg_min_version=m4_default([$1], [0.9.0])
8661	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
8662	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
8663		AC_MSG_RESULT([yes])
8664	else
8665		AC_MSG_RESULT([no])
8666		PKG_CONFIG=""
8667	fi
8668
8669fi[]dnl
8670])# PKG_PROG_PKG_CONFIG
8671
8672# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
8673#
8674# Check to see whether a particular set of modules exists.  Similar
8675# to PKG_CHECK_MODULES(), but does not set variables or print errors.
8676#
8677#
8678# Similar to PKG_CHECK_MODULES, make sure that the first instance of
8679# this or PKG_CHECK_MODULES is called, or make sure to call
8680# PKG_CHECK_EXISTS manually
8681# --------------------------------------------------------------
8682AC_DEFUN([PKG_CHECK_EXISTS],
8683[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8684if test -n "$PKG_CONFIG" && \
8685    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
8686  m4_ifval([$2], [$2], [:])
8687m4_ifvaln([$3], [else
8688  $3])dnl
8689fi])
8690
8691
8692# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
8693# ---------------------------------------------
8694m4_define([_PKG_CONFIG],
8695[if test -n "$$1"; then
8696    pkg_cv_[]$1="$$1"
8697 elif test -n "$PKG_CONFIG"; then
8698    PKG_CHECK_EXISTS([$3],
8699                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
8700		     [pkg_failed=yes])
8701 else
8702    pkg_failed=untried
8703fi[]dnl
8704])# _PKG_CONFIG
8705
8706# _PKG_SHORT_ERRORS_SUPPORTED
8707# -----------------------------
8708AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
8709[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
8710if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8711        _pkg_short_errors_supported=yes
8712else
8713        _pkg_short_errors_supported=no
8714fi[]dnl
8715])# _PKG_SHORT_ERRORS_SUPPORTED
8716
8717
8718# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
8719# [ACTION-IF-NOT-FOUND])
8720#
8721#
8722# Note that if there is a possibility the first call to
8723# PKG_CHECK_MODULES might not happen, you should be sure to include an
8724# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
8725#
8726#
8727# --------------------------------------------------------------
8728AC_DEFUN([PKG_CHECK_MODULES],
8729[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8730AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
8731AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
8732
8733pkg_failed=no
8734AC_MSG_CHECKING([for $1])
8735
8736_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
8737_PKG_CONFIG([$1][_LIBS], [libs], [$2])
8738
8739m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
8740and $1[]_LIBS to avoid the need to call pkg-config.
8741See the pkg-config man page for more details.])
8742
8743if test $pkg_failed = yes; then
8744        _PKG_SHORT_ERRORS_SUPPORTED
8745        if test $_pkg_short_errors_supported = yes; then
8746	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
8747        else
8748	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
8749        fi
8750	# Put the nasty error message in config.log where it belongs
8751	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
8752
8753	ifelse([$4], , [AC_MSG_ERROR(dnl
8754[Package requirements ($2) were not met:
8755
8756$$1_PKG_ERRORS
8757
8758Consider adjusting the PKG_CONFIG_PATH environment variable if you
8759installed software in a non-standard prefix.
8760
8761_PKG_TEXT
8762])],
8763		[AC_MSG_RESULT([no])
8764                $4])
8765elif test $pkg_failed = untried; then
8766	ifelse([$4], , [AC_MSG_FAILURE(dnl
8767[The pkg-config script could not be found or is too old.  Make sure it
8768is in your PATH or set the PKG_CONFIG environment variable to the full
8769path to pkg-config.
8770
8771_PKG_TEXT
8772
8773To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
8774		[$4])
8775else
8776	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
8777	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
8778        AC_MSG_RESULT([yes])
8779	ifelse([$3], , :, [$3])
8780fi[]dnl
8781])# PKG_CHECK_MODULES
8782
8783# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
8784#
8785# This file is free software; the Free Software Foundation
8786# gives unlimited permission to copy and/or distribute it,
8787# with or without modifications, as long as this notice is preserved.
8788
8789# AM_AUTOMAKE_VERSION(VERSION)
8790# ----------------------------
8791# Automake X.Y traces this macro to ensure aclocal.m4 has been
8792# generated from the m4 files accompanying Automake X.Y.
8793# (This private macro should not be called outside this file.)
8794AC_DEFUN([AM_AUTOMAKE_VERSION],
8795[am__api_version='1.10'
8796dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
8797dnl require some minimum version.  Point them to the right macro.
8798m4_if([$1], [1.10.2], [],
8799      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
8800])
8801
8802# _AM_AUTOCONF_VERSION(VERSION)
8803# -----------------------------
8804# aclocal traces this macro to find the Autoconf version.
8805# This is a private macro too.  Using m4_define simplifies
8806# the logic in aclocal, which can simply ignore this definition.
8807m4_define([_AM_AUTOCONF_VERSION], [])
8808
8809# AM_SET_CURRENT_AUTOMAKE_VERSION
8810# -------------------------------
8811# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
8812# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
8813AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
8814[AM_AUTOMAKE_VERSION([1.10.2])dnl
8815m4_ifndef([AC_AUTOCONF_VERSION],
8816  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
8817_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
8818
8819# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
8820
8821# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
8822#
8823# This file is free software; the Free Software Foundation
8824# gives unlimited permission to copy and/or distribute it,
8825# with or without modifications, as long as this notice is preserved.
8826
8827# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
8828# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
8829# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
8830#
8831# Of course, Automake must honor this variable whenever it calls a
8832# tool from the auxiliary directory.  The problem is that $srcdir (and
8833# therefore $ac_aux_dir as well) can be either absolute or relative,
8834# depending on how configure is run.  This is pretty annoying, since
8835# it makes $ac_aux_dir quite unusable in subdirectories: in the top
8836# source directory, any form will work fine, but in subdirectories a
8837# relative path needs to be adjusted first.
8838#
8839# $ac_aux_dir/missing
8840#    fails when called from a subdirectory if $ac_aux_dir is relative
8841# $top_srcdir/$ac_aux_dir/missing
8842#    fails if $ac_aux_dir is absolute,
8843#    fails when called from a subdirectory in a VPATH build with
8844#          a relative $ac_aux_dir
8845#
8846# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
8847# are both prefixed by $srcdir.  In an in-source build this is usually
8848# harmless because $srcdir is `.', but things will broke when you
8849# start a VPATH build or use an absolute $srcdir.
8850#
8851# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
8852# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
8853#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
8854# and then we would define $MISSING as
8855#   MISSING="\${SHELL} $am_aux_dir/missing"
8856# This will work as long as MISSING is not called from configure, because
8857# unfortunately $(top_srcdir) has no meaning in configure.
8858# However there are other variables, like CC, which are often used in
8859# configure, and could therefore not use this "fixed" $ac_aux_dir.
8860#
8861# Another solution, used here, is to always expand $ac_aux_dir to an
8862# absolute PATH.  The drawback is that using absolute paths prevent a
8863# configured tree to be moved without reconfiguration.
8864
8865AC_DEFUN([AM_AUX_DIR_EXPAND],
8866[dnl Rely on autoconf to set up CDPATH properly.
8867AC_PREREQ([2.50])dnl
8868# expand $ac_aux_dir to an absolute path
8869am_aux_dir=`cd $ac_aux_dir && pwd`
8870])
8871
8872
8873# Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2005
8874# Free Software Foundation, Inc.
8875#
8876# This file is free software; the Free Software Foundation
8877# gives unlimited permission to copy and/or distribute it,
8878# with or without modifications, as long as this notice is preserved.
8879
8880# serial 4
8881
8882# This was merged into AC_PROG_CC in Autoconf.
8883
8884AU_DEFUN([AM_PROG_CC_STDC],
8885[AC_PROG_CC
8886AC_DIAGNOSE([obsolete], [$0:
8887	your code should no longer depend upon `am_cv_prog_cc_stdc', but upon
8888	`ac_cv_prog_cc_stdc'.  Remove this warning and the assignment when
8889	you adjust the code.  You can also remove the above call to
8890	AC_PROG_CC if you already called it elsewhere.])
8891am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
8892])
8893AU_DEFUN([fp_PROG_CC_STDC])
8894
8895# AM_CONDITIONAL                                            -*- Autoconf -*-
8896
8897# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
8898# Free Software Foundation, Inc.
8899#
8900# This file is free software; the Free Software Foundation
8901# gives unlimited permission to copy and/or distribute it,
8902# with or without modifications, as long as this notice is preserved.
8903
8904# serial 8
8905
8906# AM_CONDITIONAL(NAME, SHELL-CONDITION)
8907# -------------------------------------
8908# Define a conditional.
8909AC_DEFUN([AM_CONDITIONAL],
8910[AC_PREREQ(2.52)dnl
8911 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
8912	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
8913AC_SUBST([$1_TRUE])dnl
8914AC_SUBST([$1_FALSE])dnl
8915_AM_SUBST_NOTMAKE([$1_TRUE])dnl
8916_AM_SUBST_NOTMAKE([$1_FALSE])dnl
8917if $2; then
8918  $1_TRUE=
8919  $1_FALSE='#'
8920else
8921  $1_TRUE='#'
8922  $1_FALSE=
8923fi
8924AC_CONFIG_COMMANDS_PRE(
8925[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
8926  AC_MSG_ERROR([[conditional "$1" was never defined.
8927Usually this means the macro was only invoked conditionally.]])
8928fi])])
8929
8930# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
8931# Free Software Foundation, Inc.
8932#
8933# This file is free software; the Free Software Foundation
8934# gives unlimited permission to copy and/or distribute it,
8935# with or without modifications, as long as this notice is preserved.
8936
8937# serial 9
8938
8939# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
8940# written in clear, in which case automake, when reading aclocal.m4,
8941# will think it sees a *use*, and therefore will trigger all it's
8942# C support machinery.  Also note that it means that autoscan, seeing
8943# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
8944
8945
8946# _AM_DEPENDENCIES(NAME)
8947# ----------------------
8948# See how the compiler implements dependency checking.
8949# NAME is "CC", "CXX", "GCJ", or "OBJC".
8950# We try a few techniques and use that to set a single cache variable.
8951#
8952# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
8953# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
8954# dependency, and given that the user is not expected to run this macro,
8955# just rely on AC_PROG_CC.
8956AC_DEFUN([_AM_DEPENDENCIES],
8957[AC_REQUIRE([AM_SET_DEPDIR])dnl
8958AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
8959AC_REQUIRE([AM_MAKE_INCLUDE])dnl
8960AC_REQUIRE([AM_DEP_TRACK])dnl
8961
8962ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
8963       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
8964       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
8965       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
8966       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
8967                   [depcc="$$1"   am_compiler_list=])
8968
8969AC_CACHE_CHECK([dependency style of $depcc],
8970               [am_cv_$1_dependencies_compiler_type],
8971[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
8972  # We make a subdir and do the tests there.  Otherwise we can end up
8973  # making bogus files that we don't know about and never remove.  For
8974  # instance it was reported that on HP-UX the gcc test will end up
8975  # making a dummy file named `D' -- because `-MD' means `put the output
8976  # in D'.
8977  mkdir conftest.dir
8978  # Copy depcomp to subdir because otherwise we won't find it if we're
8979  # using a relative directory.
8980  cp "$am_depcomp" conftest.dir
8981  cd conftest.dir
8982  # We will build objects and dependencies in a subdirectory because
8983  # it helps to detect inapplicable dependency modes.  For instance
8984  # both Tru64's cc and ICC support -MD to output dependencies as a
8985  # side effect of compilation, but ICC will put the dependencies in
8986  # the current directory while Tru64 will put them in the object
8987  # directory.
8988  mkdir sub
8989
8990  am_cv_$1_dependencies_compiler_type=none
8991  if test "$am_compiler_list" = ""; then
8992     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
8993  fi
8994  for depmode in $am_compiler_list; do
8995    # Setup a source with many dependencies, because some compilers
8996    # like to wrap large dependency lists on column 80 (with \), and
8997    # we should not choose a depcomp mode which is confused by this.
8998    #
8999    # We need to recreate these files for each test, as the compiler may
9000    # overwrite some of them when testing with obscure command lines.
9001    # This happens at least with the AIX C compiler.
9002    : > sub/conftest.c
9003    for i in 1 2 3 4 5 6; do
9004      echo '#include "conftst'$i'.h"' >> sub/conftest.c
9005      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
9006      # Solaris 8's {/usr,}/bin/sh.
9007      touch sub/conftst$i.h
9008    done
9009    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
9010
9011    case $depmode in
9012    nosideeffect)
9013      # after this tag, mechanisms are not by side-effect, so they'll
9014      # only be used when explicitly requested
9015      if test "x$enable_dependency_tracking" = xyes; then
9016	continue
9017      else
9018	break
9019      fi
9020      ;;
9021    none) break ;;
9022    esac
9023    # We check with `-c' and `-o' for the sake of the "dashmstdout"
9024    # mode.  It turns out that the SunPro C++ compiler does not properly
9025    # handle `-M -o', and we need to detect this.
9026    if depmode=$depmode \
9027       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
9028       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
9029       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
9030         >/dev/null 2>conftest.err &&
9031       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
9032       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
9033       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
9034       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
9035      # icc doesn't choke on unknown options, it will just issue warnings
9036      # or remarks (even with -Werror).  So we grep stderr for any message
9037      # that says an option was ignored or not supported.
9038      # When given -MP, icc 7.0 and 7.1 complain thusly:
9039      #   icc: Command line warning: ignoring option '-M'; no argument required
9040      # The diagnosis changed in icc 8.0:
9041      #   icc: Command line remark: option '-MP' not supported
9042      if (grep 'ignoring option' conftest.err ||
9043          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
9044        am_cv_$1_dependencies_compiler_type=$depmode
9045        break
9046      fi
9047    fi
9048  done
9049
9050  cd ..
9051  rm -rf conftest.dir
9052else
9053  am_cv_$1_dependencies_compiler_type=none
9054fi
9055])
9056AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
9057AM_CONDITIONAL([am__fastdep$1], [
9058  test "x$enable_dependency_tracking" != xno \
9059  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
9060])
9061
9062
9063# AM_SET_DEPDIR
9064# -------------
9065# Choose a directory name for dependency files.
9066# This macro is AC_REQUIREd in _AM_DEPENDENCIES
9067AC_DEFUN([AM_SET_DEPDIR],
9068[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9069AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
9070])
9071
9072
9073# AM_DEP_TRACK
9074# ------------
9075AC_DEFUN([AM_DEP_TRACK],
9076[AC_ARG_ENABLE(dependency-tracking,
9077[  --disable-dependency-tracking  speeds up one-time build
9078  --enable-dependency-tracking   do not reject slow dependency extractors])
9079if test "x$enable_dependency_tracking" != xno; then
9080  am_depcomp="$ac_aux_dir/depcomp"
9081  AMDEPBACKSLASH='\'
9082fi
9083AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
9084AC_SUBST([AMDEPBACKSLASH])dnl
9085_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
9086])
9087
9088# Generate code to set up dependency tracking.              -*- Autoconf -*-
9089
9090# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
9091# Free Software Foundation, Inc.
9092#
9093# This file is free software; the Free Software Foundation
9094# gives unlimited permission to copy and/or distribute it,
9095# with or without modifications, as long as this notice is preserved.
9096
9097#serial 4
9098
9099# _AM_OUTPUT_DEPENDENCY_COMMANDS
9100# ------------------------------
9101AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
9102[# Autoconf 2.62 quotes --file arguments for eval, but not when files
9103# are listed without --file.  Let's play safe and only enable the eval
9104# if we detect the quoting.
9105case $CONFIG_FILES in
9106*\'*) eval set x "$CONFIG_FILES" ;;
9107*)   set x $CONFIG_FILES ;;
9108esac
9109shift
9110for mf
9111do
9112  # Strip MF so we end up with the name of the file.
9113  mf=`echo "$mf" | sed -e 's/:.*$//'`
9114  # Check whether this is an Automake generated Makefile or not.
9115  # We used to match only the files named `Makefile.in', but
9116  # some people rename them; so instead we look at the file content.
9117  # Grep'ing the first line is not enough: some people post-process
9118  # each Makefile.in and add a new line on top of each file to say so.
9119  # Grep'ing the whole file is not good either: AIX grep has a line
9120  # limit of 2048, but all sed's we know have understand at least 4000.
9121  if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
9122    dirpart=`AS_DIRNAME("$mf")`
9123  else
9124    continue
9125  fi
9126  # Extract the definition of DEPDIR, am__include, and am__quote
9127  # from the Makefile without running `make'.
9128  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
9129  test -z "$DEPDIR" && continue
9130  am__include=`sed -n 's/^am__include = //p' < "$mf"`
9131  test -z "am__include" && continue
9132  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
9133  # When using ansi2knr, U may be empty or an underscore; expand it
9134  U=`sed -n 's/^U = //p' < "$mf"`
9135  # Find all dependency output files, they are included files with
9136  # $(DEPDIR) in their names.  We invoke sed twice because it is the
9137  # simplest approach to changing $(DEPDIR) to its actual value in the
9138  # expansion.
9139  for file in `sed -n "
9140    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
9141       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
9142    # Make sure the directory exists.
9143    test -f "$dirpart/$file" && continue
9144    fdir=`AS_DIRNAME(["$file"])`
9145    AS_MKDIR_P([$dirpart/$fdir])
9146    # echo "creating $dirpart/$file"
9147    echo '# dummy' > "$dirpart/$file"
9148  done
9149done
9150])# _AM_OUTPUT_DEPENDENCY_COMMANDS
9151
9152
9153# AM_OUTPUT_DEPENDENCY_COMMANDS
9154# -----------------------------
9155# This macro should only be invoked once -- use via AC_REQUIRE.
9156#
9157# This code is only required when automatic dependency tracking
9158# is enabled.  FIXME.  This creates each `.P' file that we will
9159# need in order to bootstrap the dependency handling code.
9160AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
9161[AC_CONFIG_COMMANDS([depfiles],
9162     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
9163     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
9164])
9165
9166# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
9167# Free Software Foundation, Inc.
9168#
9169# This file is free software; the Free Software Foundation
9170# gives unlimited permission to copy and/or distribute it,
9171# with or without modifications, as long as this notice is preserved.
9172
9173# serial 8
9174
9175# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
9176AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
9177
9178# Do all the work for Automake.                             -*- Autoconf -*-
9179
9180# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
9181# 2005, 2006, 2008 Free Software Foundation, Inc.
9182#
9183# This file is free software; the Free Software Foundation
9184# gives unlimited permission to copy and/or distribute it,
9185# with or without modifications, as long as this notice is preserved.
9186
9187# serial 13
9188
9189# This macro actually does too much.  Some checks are only needed if
9190# your package does certain things.  But this isn't really a big deal.
9191
9192# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
9193# AM_INIT_AUTOMAKE([OPTIONS])
9194# -----------------------------------------------
9195# The call with PACKAGE and VERSION arguments is the old style
9196# call (pre autoconf-2.50), which is being phased out.  PACKAGE
9197# and VERSION should now be passed to AC_INIT and removed from
9198# the call to AM_INIT_AUTOMAKE.
9199# We support both call styles for the transition.  After
9200# the next Automake release, Autoconf can make the AC_INIT
9201# arguments mandatory, and then we can depend on a new Autoconf
9202# release and drop the old call support.
9203AC_DEFUN([AM_INIT_AUTOMAKE],
9204[AC_PREREQ([2.60])dnl
9205dnl Autoconf wants to disallow AM_ names.  We explicitly allow
9206dnl the ones we care about.
9207m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
9208AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
9209AC_REQUIRE([AC_PROG_INSTALL])dnl
9210if test "`cd $srcdir && pwd`" != "`pwd`"; then
9211  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
9212  # is not polluted with repeated "-I."
9213  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
9214  # test to see if srcdir already configured
9215  if test -f $srcdir/config.status; then
9216    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
9217  fi
9218fi
9219
9220# test whether we have cygpath
9221if test -z "$CYGPATH_W"; then
9222  if (cygpath --version) >/dev/null 2>/dev/null; then
9223    CYGPATH_W='cygpath -w'
9224  else
9225    CYGPATH_W=echo
9226  fi
9227fi
9228AC_SUBST([CYGPATH_W])
9229
9230# Define the identity of the package.
9231dnl Distinguish between old-style and new-style calls.
9232m4_ifval([$2],
9233[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
9234 AC_SUBST([PACKAGE], [$1])dnl
9235 AC_SUBST([VERSION], [$2])],
9236[_AM_SET_OPTIONS([$1])dnl
9237dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
9238m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
9239  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
9240 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
9241 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
9242
9243_AM_IF_OPTION([no-define],,
9244[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
9245 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
9246
9247# Some tools Automake needs.
9248AC_REQUIRE([AM_SANITY_CHECK])dnl
9249AC_REQUIRE([AC_ARG_PROGRAM])dnl
9250AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
9251AM_MISSING_PROG(AUTOCONF, autoconf)
9252AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
9253AM_MISSING_PROG(AUTOHEADER, autoheader)
9254AM_MISSING_PROG(MAKEINFO, makeinfo)
9255AM_PROG_INSTALL_SH
9256AM_PROG_INSTALL_STRIP
9257AC_REQUIRE([AM_PROG_MKDIR_P])dnl
9258# We need awk for the "check" target.  The system "awk" is bad on
9259# some platforms.
9260AC_REQUIRE([AC_PROG_AWK])dnl
9261AC_REQUIRE([AC_PROG_MAKE_SET])dnl
9262AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9263_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
9264              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
9265	      		     [_AM_PROG_TAR([v7])])])
9266_AM_IF_OPTION([no-dependencies],,
9267[AC_PROVIDE_IFELSE([AC_PROG_CC],
9268                  [_AM_DEPENDENCIES(CC)],
9269                  [define([AC_PROG_CC],
9270                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
9271AC_PROVIDE_IFELSE([AC_PROG_CXX],
9272                  [_AM_DEPENDENCIES(CXX)],
9273                  [define([AC_PROG_CXX],
9274                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
9275AC_PROVIDE_IFELSE([AC_PROG_OBJC],
9276                  [_AM_DEPENDENCIES(OBJC)],
9277                  [define([AC_PROG_OBJC],
9278                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
9279])
9280])
9281
9282
9283# When config.status generates a header, we must update the stamp-h file.
9284# This file resides in the same directory as the config header
9285# that is generated.  The stamp files are numbered to have different names.
9286
9287# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
9288# loop where config.status creates the headers, so we can generate
9289# our stamp files there.
9290AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
9291[# Compute $1's index in $config_headers.
9292_am_arg=$1
9293_am_stamp_count=1
9294for _am_header in $config_headers :; do
9295  case $_am_header in
9296    $_am_arg | $_am_arg:* )
9297      break ;;
9298    * )
9299      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
9300  esac
9301done
9302echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
9303
9304# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
9305#
9306# This file is free software; the Free Software Foundation
9307# gives unlimited permission to copy and/or distribute it,
9308# with or without modifications, as long as this notice is preserved.
9309
9310# AM_PROG_INSTALL_SH
9311# ------------------
9312# Define $install_sh.
9313AC_DEFUN([AM_PROG_INSTALL_SH],
9314[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9315install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
9316AC_SUBST(install_sh)])
9317
9318# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
9319#
9320# This file is free software; the Free Software Foundation
9321# gives unlimited permission to copy and/or distribute it,
9322# with or without modifications, as long as this notice is preserved.
9323
9324# serial 2
9325
9326# Check whether the underlying file-system supports filenames
9327# with a leading dot.  For instance MS-DOS doesn't.
9328AC_DEFUN([AM_SET_LEADING_DOT],
9329[rm -rf .tst 2>/dev/null
9330mkdir .tst 2>/dev/null
9331if test -d .tst; then
9332  am__leading_dot=.
9333else
9334  am__leading_dot=_
9335fi
9336rmdir .tst 2>/dev/null
9337AC_SUBST([am__leading_dot])])
9338
9339# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
9340# From Jim Meyering
9341
9342# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
9343# Free Software Foundation, Inc.
9344#
9345# This file is free software; the Free Software Foundation
9346# gives unlimited permission to copy and/or distribute it,
9347# with or without modifications, as long as this notice is preserved.
9348
9349# serial 4
9350
9351AC_DEFUN([AM_MAINTAINER_MODE],
9352[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
9353  dnl maintainer-mode is disabled by default
9354  AC_ARG_ENABLE(maintainer-mode,
9355[  --enable-maintainer-mode  enable make rules and dependencies not useful
9356			  (and sometimes confusing) to the casual installer],
9357      USE_MAINTAINER_MODE=$enableval,
9358      USE_MAINTAINER_MODE=no)
9359  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
9360  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
9361  MAINT=$MAINTAINER_MODE_TRUE
9362  AC_SUBST(MAINT)dnl
9363]
9364)
9365
9366AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
9367
9368# Check to see how 'make' treats includes.	            -*- Autoconf -*-
9369
9370# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
9371#
9372# This file is free software; the Free Software Foundation
9373# gives unlimited permission to copy and/or distribute it,
9374# with or without modifications, as long as this notice is preserved.
9375
9376# serial 3
9377
9378# AM_MAKE_INCLUDE()
9379# -----------------
9380# Check to see how make treats includes.
9381AC_DEFUN([AM_MAKE_INCLUDE],
9382[am_make=${MAKE-make}
9383cat > confinc << 'END'
9384am__doit:
9385	@echo done
9386.PHONY: am__doit
9387END
9388# If we don't find an include directive, just comment out the code.
9389AC_MSG_CHECKING([for style of include used by $am_make])
9390am__include="#"
9391am__quote=
9392_am_result=none
9393# First try GNU make style include.
9394echo "include confinc" > confmf
9395# We grep out `Entering directory' and `Leaving directory'
9396# messages which can occur if `w' ends up in MAKEFLAGS.
9397# In particular we don't look at `^make:' because GNU make might
9398# be invoked under some other name (usually "gmake"), in which
9399# case it prints its new name instead of `make'.
9400if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
9401   am__include=include
9402   am__quote=
9403   _am_result=GNU
9404fi
9405# Now try BSD make style include.
9406if test "$am__include" = "#"; then
9407   echo '.include "confinc"' > confmf
9408   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
9409      am__include=.include
9410      am__quote="\""
9411      _am_result=BSD
9412   fi
9413fi
9414AC_SUBST([am__include])
9415AC_SUBST([am__quote])
9416AC_MSG_RESULT([$_am_result])
9417rm -f confinc confmf
9418])
9419
9420# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
9421
9422# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
9423# Free Software Foundation, Inc.
9424#
9425# This file is free software; the Free Software Foundation
9426# gives unlimited permission to copy and/or distribute it,
9427# with or without modifications, as long as this notice is preserved.
9428
9429# serial 5
9430
9431# AM_MISSING_PROG(NAME, PROGRAM)
9432# ------------------------------
9433AC_DEFUN([AM_MISSING_PROG],
9434[AC_REQUIRE([AM_MISSING_HAS_RUN])
9435$1=${$1-"${am_missing_run}$2"}
9436AC_SUBST($1)])
9437
9438
9439# AM_MISSING_HAS_RUN
9440# ------------------
9441# Define MISSING if not defined so far and test if it supports --run.
9442# If it does, set am_missing_run to use it, otherwise, to nothing.
9443AC_DEFUN([AM_MISSING_HAS_RUN],
9444[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9445AC_REQUIRE_AUX_FILE([missing])dnl
9446test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
9447# Use eval to expand $SHELL
9448if eval "$MISSING --run true"; then
9449  am_missing_run="$MISSING --run "
9450else
9451  am_missing_run=
9452  AC_MSG_WARN([`missing' script is too old or missing])
9453fi
9454])
9455
9456# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
9457#
9458# This file is free software; the Free Software Foundation
9459# gives unlimited permission to copy and/or distribute it,
9460# with or without modifications, as long as this notice is preserved.
9461
9462# AM_PROG_MKDIR_P
9463# ---------------
9464# Check for `mkdir -p'.
9465AC_DEFUN([AM_PROG_MKDIR_P],
9466[AC_PREREQ([2.60])dnl
9467AC_REQUIRE([AC_PROG_MKDIR_P])dnl
9468dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
9469dnl while keeping a definition of mkdir_p for backward compatibility.
9470dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
9471dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
9472dnl Makefile.ins that do not define MKDIR_P, so we do our own
9473dnl adjustment using top_builddir (which is defined more often than
9474dnl MKDIR_P).
9475AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
9476case $mkdir_p in
9477  [[\\/$]]* | ?:[[\\/]]*) ;;
9478  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
9479esac
9480])
9481
9482# Helper functions for option handling.                     -*- Autoconf -*-
9483
9484# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
9485#
9486# This file is free software; the Free Software Foundation
9487# gives unlimited permission to copy and/or distribute it,
9488# with or without modifications, as long as this notice is preserved.
9489
9490# serial 4
9491
9492# _AM_MANGLE_OPTION(NAME)
9493# -----------------------
9494AC_DEFUN([_AM_MANGLE_OPTION],
9495[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
9496
9497# _AM_SET_OPTION(NAME)
9498# ------------------------------
9499# Set option NAME.  Presently that only means defining a flag for this option.
9500AC_DEFUN([_AM_SET_OPTION],
9501[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
9502
9503# _AM_SET_OPTIONS(OPTIONS)
9504# ----------------------------------
9505# OPTIONS is a space-separated list of Automake options.
9506AC_DEFUN([_AM_SET_OPTIONS],
9507[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
9508
9509# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
9510# -------------------------------------------
9511# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9512AC_DEFUN([_AM_IF_OPTION],
9513[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
9514
9515# Check to make sure that the build environment is sane.    -*- Autoconf -*-
9516
9517# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
9518# Free Software Foundation, Inc.
9519#
9520# This file is free software; the Free Software Foundation
9521# gives unlimited permission to copy and/or distribute it,
9522# with or without modifications, as long as this notice is preserved.
9523
9524# serial 4
9525
9526# AM_SANITY_CHECK
9527# ---------------
9528AC_DEFUN([AM_SANITY_CHECK],
9529[AC_MSG_CHECKING([whether build environment is sane])
9530# Just in case
9531sleep 1
9532echo timestamp > conftest.file
9533# Do `set' in a subshell so we don't clobber the current shell's
9534# arguments.  Must try -L first in case configure is actually a
9535# symlink; some systems play weird games with the mod time of symlinks
9536# (eg FreeBSD returns the mod time of the symlink's containing
9537# directory).
9538if (
9539   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
9540   if test "$[*]" = "X"; then
9541      # -L didn't work.
9542      set X `ls -t $srcdir/configure conftest.file`
9543   fi
9544   rm -f conftest.file
9545   if test "$[*]" != "X $srcdir/configure conftest.file" \
9546      && test "$[*]" != "X conftest.file $srcdir/configure"; then
9547
9548      # If neither matched, then we have a broken ls.  This can happen
9549      # if, for instance, CONFIG_SHELL is bash and it inherits a
9550      # broken ls alias from the environment.  This has actually
9551      # happened.  Such a system could not be considered "sane".
9552      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
9553alias in your environment])
9554   fi
9555
9556   test "$[2]" = conftest.file
9557   )
9558then
9559   # Ok.
9560   :
9561else
9562   AC_MSG_ERROR([newly created file is older than distributed files!
9563Check your system clock])
9564fi
9565AC_MSG_RESULT(yes)])
9566
9567# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
9568#
9569# This file is free software; the Free Software Foundation
9570# gives unlimited permission to copy and/or distribute it,
9571# with or without modifications, as long as this notice is preserved.
9572
9573# AM_PROG_INSTALL_STRIP
9574# ---------------------
9575# One issue with vendor `install' (even GNU) is that you can't
9576# specify the program used to strip binaries.  This is especially
9577# annoying in cross-compiling environments, where the build's strip
9578# is unlikely to handle the host's binaries.
9579# Fortunately install-sh will honor a STRIPPROG variable, so we
9580# always use install-sh in `make install-strip', and initialize
9581# STRIPPROG with the value of the STRIP variable (set by the user).
9582AC_DEFUN([AM_PROG_INSTALL_STRIP],
9583[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9584# Installed binaries are usually stripped using `strip' when the user
9585# run `make install-strip'.  However `strip' might not be the right
9586# tool to use in cross-compilation environments, therefore Automake
9587# will honor the `STRIP' environment variable to overrule this program.
9588dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
9589if test "$cross_compiling" != no; then
9590  AC_CHECK_TOOL([STRIP], [strip], :)
9591fi
9592INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
9593AC_SUBST([INSTALL_STRIP_PROGRAM])])
9594
9595# Copyright (C) 2006  Free Software Foundation, Inc.
9596#
9597# This file is free software; the Free Software Foundation
9598# gives unlimited permission to copy and/or distribute it,
9599# with or without modifications, as long as this notice is preserved.
9600
9601# _AM_SUBST_NOTMAKE(VARIABLE)
9602# ---------------------------
9603# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
9604# This macro is traced by Automake.
9605AC_DEFUN([_AM_SUBST_NOTMAKE])
9606
9607# Check how to create a tarball.                            -*- Autoconf -*-
9608
9609# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
9610#
9611# This file is free software; the Free Software Foundation
9612# gives unlimited permission to copy and/or distribute it,
9613# with or without modifications, as long as this notice is preserved.
9614
9615# serial 2
9616
9617# _AM_PROG_TAR(FORMAT)
9618# --------------------
9619# Check how to create a tarball in format FORMAT.
9620# FORMAT should be one of `v7', `ustar', or `pax'.
9621#
9622# Substitute a variable $(am__tar) that is a command
9623# writing to stdout a FORMAT-tarball containing the directory
9624# $tardir.
9625#     tardir=directory && $(am__tar) > result.tar
9626#
9627# Substitute a variable $(am__untar) that extract such
9628# a tarball read from stdin.
9629#     $(am__untar) < result.tar
9630AC_DEFUN([_AM_PROG_TAR],
9631[# Always define AMTAR for backward compatibility.
9632AM_MISSING_PROG([AMTAR], [tar])
9633m4_if([$1], [v7],
9634     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
9635     [m4_case([$1], [ustar],, [pax],,
9636              [m4_fatal([Unknown tar format])])
9637AC_MSG_CHECKING([how to create a $1 tar archive])
9638# Loop over all known methods to create a tar archive until one works.
9639_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
9640_am_tools=${am_cv_prog_tar_$1-$_am_tools}
9641# Do not fold the above two line into one, because Tru64 sh and
9642# Solaris sh will not grok spaces in the rhs of `-'.
9643for _am_tool in $_am_tools
9644do
9645  case $_am_tool in
9646  gnutar)
9647    for _am_tar in tar gnutar gtar;
9648    do
9649      AM_RUN_LOG([$_am_tar --version]) && break
9650    done
9651    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
9652    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
9653    am__untar="$_am_tar -xf -"
9654    ;;
9655  plaintar)
9656    # Must skip GNU tar: if it does not support --format= it doesn't create
9657    # ustar tarball either.
9658    (tar --version) >/dev/null 2>&1 && continue
9659    am__tar='tar chf - "$$tardir"'
9660    am__tar_='tar chf - "$tardir"'
9661    am__untar='tar xf -'
9662    ;;
9663  pax)
9664    am__tar='pax -L -x $1 -w "$$tardir"'
9665    am__tar_='pax -L -x $1 -w "$tardir"'
9666    am__untar='pax -r'
9667    ;;
9668  cpio)
9669    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
9670    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
9671    am__untar='cpio -i -H $1 -d'
9672    ;;
9673  none)
9674    am__tar=false
9675    am__tar_=false
9676    am__untar=false
9677    ;;
9678  esac
9679
9680  # If the value was cached, stop now.  We just wanted to have am__tar
9681  # and am__untar set.
9682  test -n "${am_cv_prog_tar_$1}" && break
9683
9684  # tar/untar a dummy directory, and stop if the command works
9685  rm -rf conftest.dir
9686  mkdir conftest.dir
9687  echo GrepMe > conftest.dir/file
9688  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
9689  rm -rf conftest.dir
9690  if test -s conftest.tar; then
9691    AM_RUN_LOG([$am__untar <conftest.tar])
9692    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
9693  fi
9694done
9695rm -rf conftest.dir
9696
9697AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
9698AC_MSG_RESULT([$am_cv_prog_tar_$1])])
9699AC_SUBST([am__tar])
9700AC_SUBST([am__untar])
9701]) # _AM_PROG_TAR
9702
9703