aclocal.m4 revision c43cc173
1# generated automatically by aclocal 1.10 -*- Autoconf -*-
2
3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4# 2005, 2006  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_if(m4_PACKAGE_VERSION, [2.61],,
15[m4_fatal([this file was generated for autoconf 2.61.
16You have another version of autoconf.  If you want to use that,
17you should regenerate the build system entirely.], [63])])
18
19# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
20# 
21# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
22#
23# This program is free software; you can redistribute it and/or modify
24# it under the terms of the GNU General Public License as published by
25# the Free Software Foundation; either version 2 of the License, or
26# (at your option) any later version.
27#
28# This program is distributed in the hope that it will be useful, but
29# WITHOUT ANY WARRANTY; without even the implied warranty of
30# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
31# General Public License for more details.
32#
33# You should have received a copy of the GNU General Public License
34# along with this program; if not, write to the Free Software
35# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
36#
37# As a special exception to the GNU General Public License, if you
38# distribute this file as part of a program that contains a
39# configuration script generated by Autoconf, you may include it under
40# the same distribution terms that you use for the rest of that program.
41
42# PKG_PROG_PKG_CONFIG([MIN-VERSION])
43# ----------------------------------
44AC_DEFUN([PKG_PROG_PKG_CONFIG],
45[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
46m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
47AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
48if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
49	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
50fi
51if test -n "$PKG_CONFIG"; then
52	_pkg_min_version=m4_default([$1], [0.9.0])
53	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
54	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
55		AC_MSG_RESULT([yes])
56	else
57		AC_MSG_RESULT([no])
58		PKG_CONFIG=""
59	fi
60		
61fi[]dnl
62])# PKG_PROG_PKG_CONFIG
63
64# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
65#
66# Check to see whether a particular set of modules exists.  Similar
67# to PKG_CHECK_MODULES(), but does not set variables or print errors.
68#
69#
70# Similar to PKG_CHECK_MODULES, make sure that the first instance of
71# this or PKG_CHECK_MODULES is called, or make sure to call
72# PKG_CHECK_EXISTS manually
73# --------------------------------------------------------------
74AC_DEFUN([PKG_CHECK_EXISTS],
75[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
76if test -n "$PKG_CONFIG" && \
77    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
78  m4_ifval([$2], [$2], [:])
79m4_ifvaln([$3], [else
80  $3])dnl
81fi])
82
83
84# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
85# ---------------------------------------------
86m4_define([_PKG_CONFIG],
87[if test -n "$PKG_CONFIG"; then
88    if test -n "$$1"; then
89        pkg_cv_[]$1="$$1"
90    else
91        PKG_CHECK_EXISTS([$3],
92                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
93			 [pkg_failed=yes])
94    fi
95else
96	pkg_failed=untried
97fi[]dnl
98])# _PKG_CONFIG
99
100# _PKG_SHORT_ERRORS_SUPPORTED
101# -----------------------------
102AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
103[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
104if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
105        _pkg_short_errors_supported=yes
106else
107        _pkg_short_errors_supported=no
108fi[]dnl
109])# _PKG_SHORT_ERRORS_SUPPORTED
110
111
112# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
113# [ACTION-IF-NOT-FOUND])
114#
115#
116# Note that if there is a possibility the first call to
117# PKG_CHECK_MODULES might not happen, you should be sure to include an
118# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
119#
120#
121# --------------------------------------------------------------
122AC_DEFUN([PKG_CHECK_MODULES],
123[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
124AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
125AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
126
127pkg_failed=no
128AC_MSG_CHECKING([for $1])
129
130_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
131_PKG_CONFIG([$1][_LIBS], [libs], [$2])
132
133m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
134and $1[]_LIBS to avoid the need to call pkg-config.
135See the pkg-config man page for more details.])
136
137if test $pkg_failed = yes; then
138        _PKG_SHORT_ERRORS_SUPPORTED
139        if test $_pkg_short_errors_supported = yes; then
140	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
141        else 
142	        $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
143        fi
144	# Put the nasty error message in config.log where it belongs
145	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
146
147	ifelse([$4], , [AC_MSG_ERROR(dnl
148[Package requirements ($2) were not met:
149
150$$1_PKG_ERRORS
151
152Consider adjusting the PKG_CONFIG_PATH environment variable if you
153installed software in a non-standard prefix.
154
155_PKG_TEXT
156])],
157		[AC_MSG_RESULT([no])
158                $4])
159elif test $pkg_failed = untried; then
160	ifelse([$4], , [AC_MSG_FAILURE(dnl
161[The pkg-config script could not be found or is too old.  Make sure it
162is in your PATH or set the PKG_CONFIG environment variable to the full
163path to pkg-config.
164
165_PKG_TEXT
166
167To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
168		[$4])
169else
170	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
171	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
172        AC_MSG_RESULT([yes])
173	ifelse([$3], , :, [$3])
174fi[]dnl
175])# PKG_CHECK_MODULES
176
177dnl
178dnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
179dnl 
180dnl Permission is hereby granted, free of charge, to any person obtaining a
181dnl copy of this software and associated documentation files (the
182dnl "Software"), to deal in the Software without restriction, including
183dnl without limitation the rights to use, copy, modify, merge, publish,
184dnl distribute, and/or sell copies of the Software, and to permit persons
185dnl to whom the Software is furnished to do so, provided that the above
186dnl copyright notice(s) and this permission notice appear in all copies of
187dnl the Software and that both the above copyright notice(s) and this
188dnl permission notice appear in supporting documentation.
189dnl
190dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
191dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
192dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
193dnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
194dnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
195dnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
196dnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
197dnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
198dnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
199dnl
200dnl Except as contained in this notice, the name of a copyright holder
201dnl shall not be used in advertising or otherwise to promote the sale, use
202dnl or other dealings in this Software without prior written authorization
203dnl of the copyright holder.
204
205# XORG_MACROS_VERSION(required-version)
206# -------------------------------------
207# Minimum version: 1.1.0
208#
209# If you're using a macro added in Version 1.1 or newer, include this in
210# your configure.ac with the minimum required version, such as:
211# XORG_MACROS_VERSION(1.1)
212#
213# To force at least a version with this macro defined, also add:
214# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])])
215#
216#
217# See the "minimum version" comment for each macro you use to see what 
218# version you require.
219AC_DEFUN([XORG_MACROS_VERSION],[
220	[XORG_MACROS_needed_version=$1
221	XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'`
222	XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
223	AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}])
224	[XORG_MACROS_version=1.1.5
225	XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
226	XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
227	if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
228		AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x])
229	fi
230	if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then
231		AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer])
232	fi
233	AC_MSG_RESULT([yes, $XORG_MACROS_version])
234]) # XORG_MACROS_VERSION
235
236# XORG_PROG_RAWCPP()
237# ------------------
238# Minimum version: 1.0.0
239#
240# Find cpp program and necessary flags for use in pre-processing text files
241# such as man pages and config files
242AC_DEFUN([XORG_PROG_RAWCPP],[
243AC_REQUIRE([AC_PROG_CPP])
244AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
245   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
246
247# Check for flag to avoid builtin definitions - assumes unix is predefined,
248# which is not the best choice for supporting other OS'es, but covers most
249# of the ones we need for now.
250AC_MSG_CHECKING([if $RAWCPP requires -undef])
251AC_LANG_CONFTEST([Does cpp redefine unix ?])
252if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
253	AC_MSG_RESULT([no])
254else
255	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
256		RAWCPPFLAGS=-undef
257		AC_MSG_RESULT([yes])
258	else
259		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
260	fi
261fi
262rm -f conftest.$ac_ext
263
264AC_MSG_CHECKING([if $RAWCPP requires -traditional])
265AC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
266if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
267	AC_MSG_RESULT([no])
268else
269	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
270		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
271		AC_MSG_RESULT([yes])
272	else
273		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
274	fi
275fi
276rm -f conftest.$ac_ext
277AC_SUBST(RAWCPPFLAGS)
278]) # XORG_PROG_RAWCPP
279
280# XORG_MANPAGE_SECTIONS()
281# -----------------------
282# Minimum version: 1.0.0
283#
284# Determine which sections man pages go in for the different man page types
285# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
286# Not sure if there's any better way than just hardcoding by OS name.
287# Override default settings by setting environment variables
288
289AC_DEFUN([XORG_MANPAGE_SECTIONS],[
290AC_REQUIRE([AC_CANONICAL_HOST])
291
292if test x$APP_MAN_SUFFIX = x    ; then
293    APP_MAN_SUFFIX=1
294fi
295if test x$APP_MAN_DIR = x    ; then
296    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
297fi
298
299if test x$LIB_MAN_SUFFIX = x    ; then
300    LIB_MAN_SUFFIX=3
301fi
302if test x$LIB_MAN_DIR = x    ; then
303    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
304fi
305
306if test x$FILE_MAN_SUFFIX = x    ; then
307    case $host_os in
308	solaris*)	FILE_MAN_SUFFIX=4  ;;
309	*)		FILE_MAN_SUFFIX=5  ;;
310    esac
311fi
312if test x$FILE_MAN_DIR = x    ; then
313    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
314fi
315
316if test x$MISC_MAN_SUFFIX = x    ; then
317    case $host_os in
318	solaris*)	MISC_MAN_SUFFIX=5  ;;
319	*)		MISC_MAN_SUFFIX=7  ;;
320    esac
321fi
322if test x$MISC_MAN_DIR = x    ; then
323    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
324fi
325
326if test x$DRIVER_MAN_SUFFIX = x    ; then
327    case $host_os in
328	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
329	*)		DRIVER_MAN_SUFFIX=4  ;;
330    esac
331fi
332if test x$DRIVER_MAN_DIR = x    ; then
333    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
334fi
335
336if test x$ADMIN_MAN_SUFFIX = x    ; then
337    case $host_os in
338	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
339	*)		ADMIN_MAN_SUFFIX=8  ;;
340    esac
341fi
342if test x$ADMIN_MAN_DIR = x    ; then
343    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
344fi
345
346
347AC_SUBST([APP_MAN_SUFFIX])
348AC_SUBST([LIB_MAN_SUFFIX])
349AC_SUBST([FILE_MAN_SUFFIX])
350AC_SUBST([MISC_MAN_SUFFIX])
351AC_SUBST([DRIVER_MAN_SUFFIX])
352AC_SUBST([ADMIN_MAN_SUFFIX])
353AC_SUBST([APP_MAN_DIR])
354AC_SUBST([LIB_MAN_DIR])
355AC_SUBST([FILE_MAN_DIR])
356AC_SUBST([MISC_MAN_DIR])
357AC_SUBST([DRIVER_MAN_DIR])
358AC_SUBST([ADMIN_MAN_DIR])
359]) # XORG_MANPAGE_SECTIONS
360
361# XORG_CHECK_LINUXDOC
362# -------------------
363# Minimum version: 1.0.0
364#
365# Defines the variable MAKE_TEXT if the necessary tools and
366# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
367# Whether or not the necessary tools and files are found can be checked
368# with the AM_CONDITIONAL "BUILD_LINUXDOC"
369AC_DEFUN([XORG_CHECK_LINUXDOC],[
370XORG_SGML_PATH=$prefix/share/sgml
371HAVE_DEFS_ENT=
372
373AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
374
375AC_PATH_PROG(LINUXDOC, linuxdoc)
376AC_PATH_PROG(PS2PDF, ps2pdf)
377
378AC_MSG_CHECKING([Whether to build documentation])
379
380if test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
381   BUILDDOC=yes
382else
383   BUILDDOC=no
384fi
385
386AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
387
388AC_MSG_RESULT([$BUILDDOC])
389
390AC_MSG_CHECKING([Whether to build pdf documentation])
391
392if test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
393   BUILDPDFDOC=yes
394else
395   BUILDPDFDOC=no
396fi
397
398AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
399
400AC_MSG_RESULT([$BUILDPDFDOC])
401
402MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
403MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
404MAKE_PDF="$PS2PDF"
405MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
406
407AC_SUBST(MAKE_TEXT)
408AC_SUBST(MAKE_PS)
409AC_SUBST(MAKE_PDF)
410AC_SUBST(MAKE_HTML)
411]) # XORG_CHECK_LINUXDOC
412
413# XORG_CHECK_DOCBOOK
414# -------------------
415# Minimum version: 1.0.0
416#
417# Checks for the ability to build output formats from SGML DocBook source.
418# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
419# indicates whether the necessary tools and files are found and, if set,
420# $(MAKE_XXX) blah.sgml will produce blah.xxx.
421AC_DEFUN([XORG_CHECK_DOCBOOK],[
422XORG_SGML_PATH=$prefix/share/sgml
423HAVE_DEFS_ENT=
424BUILDTXTDOC=no
425BUILDPDFDOC=no
426BUILDPSDOC=no
427BUILDHTMLDOC=no
428
429AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
430
431AC_PATH_PROG(DOCBOOKPS, docbook2ps)
432AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
433AC_PATH_PROG(DOCBOOKHTML, docbook2html)
434AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
435
436AC_MSG_CHECKING([Whether to build text documentation])
437if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
438   test x$BUILD_TXTDOC != xno; then
439	BUILDTXTDOC=yes
440fi
441AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
442AC_MSG_RESULT([$BUILDTXTDOC])
443
444AC_MSG_CHECKING([Whether to build PDF documentation])
445if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
446   test x$BUILD_PDFDOC != xno; then
447	BUILDPDFDOC=yes
448fi
449AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
450AC_MSG_RESULT([$BUILDPDFDOC])
451
452AC_MSG_CHECKING([Whether to build PostScript documentation])
453if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
454   test x$BUILD_PSDOC != xno; then
455	BUILDPSDOC=yes
456fi
457AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
458AC_MSG_RESULT([$BUILDPSDOC])
459
460AC_MSG_CHECKING([Whether to build HTML documentation])
461if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
462   test x$BUILD_HTMLDOC != xno; then
463	BUILDHTMLDOC=yes
464fi
465AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
466AC_MSG_RESULT([$BUILDHTMLDOC])
467
468MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
469MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
470MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
471MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
472
473AC_SUBST(MAKE_TEXT)
474AC_SUBST(MAKE_PS)
475AC_SUBST(MAKE_PDF)
476AC_SUBST(MAKE_HTML)
477]) # XORG_CHECK_DOCBOOK
478
479# XORG_CHECK_MALLOC_ZERO
480# ----------------------
481# Minimum version: 1.0.0
482#
483# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
484# malloc(0) returns NULL.  Packages should add one of these cflags to
485# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
486AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
487AC_ARG_ENABLE(malloc0returnsnull,
488	AC_HELP_STRING([--enable-malloc0returnsnull],
489		       [malloc(0) returns NULL (default: auto)]),
490	[MALLOC_ZERO_RETURNS_NULL=$enableval],
491	[MALLOC_ZERO_RETURNS_NULL=auto])
492
493AC_MSG_CHECKING([whether malloc(0) returns NULL])
494if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
495	AC_RUN_IFELSE([
496char *malloc();
497char *realloc();
498char *calloc();
499main() {
500    char *m0, *r0, *c0, *p;
501    m0 = malloc(0);
502    p = malloc(10);
503    r0 = realloc(p,0);
504    c0 = calloc(0);
505    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
506}],
507		[MALLOC_ZERO_RETURNS_NULL=yes],
508		[MALLOC_ZERO_RETURNS_NULL=no])
509fi
510AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
511
512if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
513	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
514	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
515	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
516else
517	MALLOC_ZERO_CFLAGS=""
518	XMALLOC_ZERO_CFLAGS=""
519	XTMALLOC_ZERO_CFLAGS=""
520fi
521
522AC_SUBST([MALLOC_ZERO_CFLAGS])
523AC_SUBST([XMALLOC_ZERO_CFLAGS])
524AC_SUBST([XTMALLOC_ZERO_CFLAGS])
525]) # XORG_CHECK_MALLOC_ZERO
526
527# XORG_WITH_LINT()
528# ----------------
529# Minimum version: 1.1.0
530#
531# Sets up flags for source checkers such as lint and sparse if --with-lint
532# is specified.   (Use --with-lint=sparse for sparse.)
533# Sets $LINT to name of source checker passed with --with-lint (default: lint)
534# Sets $LINT_FLAGS to flags to pass to source checker
535# Sets LINT automake conditional if enabled (default: disabled)
536#
537AC_DEFUN([XORG_WITH_LINT],[
538
539# Allow checking code with lint, sparse, etc.
540AC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint],
541		[Use a lint-style source code checker (default: disabled)])],
542		[use_lint=$withval], [use_lint=no])
543if test "x$use_lint" = "xyes" ; then
544	LINT="lint"
545else
546	LINT="$use_lint"
547fi
548if test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
549    case $LINT in
550	lint|*/lint)
551	    case $host_os in
552		solaris*)
553			LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
554			;;
555	    esac
556	    ;;
557    esac
558fi
559
560AC_SUBST(LINT)
561AC_SUBST(LINT_FLAGS)
562AM_CONDITIONAL(LINT, [test x$LINT != xno])
563
564]) # XORG_WITH_LINT
565
566# XORG_LINT_LIBRARY(LIBNAME)
567# --------------------------
568# Minimum version: 1.1.0
569#
570# Sets up flags for building lint libraries for checking programs that call
571# functions in the library.
572# Disabled by default, enable with --enable-lint-library
573# Sets: 
574#	@LINTLIB@		- name of lint library file to make
575#	MAKE_LINT_LIB		- automake conditional
576#
577
578AC_DEFUN([XORG_LINT_LIBRARY],[
579AC_REQUIRE([XORG_WITH_LINT])
580# Build lint "library" for more indepth checks of programs calling this library
581AC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library],
582	[Create lint library (default: disabled)])],
583	[make_lint_lib=$enableval], [make_lint_lib=no])
584if test "x$make_lint_lib" != "xno" ; then
585	if test "x$LINT" = "xno" ; then
586		AC_MSG_ERROR([Cannot make lint library without --with-lint])
587	fi
588	if test "x$make_lint_lib" = "xyes" ; then
589		LINTLIB=llib-l$1.ln
590	else
591		LINTLIB=$make_lint_lib
592	fi
593fi
594AC_SUBST(LINTLIB)
595AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
596
597]) # XORG_LINT_LIBRARY
598
599dnl Copyright 2005 Red Hat, Inc
600dnl
601dnl Permission to use, copy, modify, distribute, and sell this software and its
602dnl documentation for any purpose is hereby granted without fee, provided that
603dnl the above copyright notice appear in all copies and that both that
604dnl copyright notice and this permission notice appear in supporting
605dnl documentation.
606dnl
607dnl The above copyright notice and this permission notice shall be included
608dnl in all copies or substantial portions of the Software.
609dnl
610dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
611dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
612dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
613dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
614dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
615dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
616dnl OTHER DEALINGS IN THE SOFTWARE.
617dnl
618dnl Except as contained in this notice, the name of the copyright holders shall
619dnl not be used in advertising or otherwise to promote the sale, use or
620dnl other dealings in this Software without prior written authorization
621dnl from the copyright holders.
622dnl
623
624# XORG_RELEASE_VERSION
625# --------------------
626# Adds --with/without-release-string and changes the PACKAGE and
627# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
628# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
629# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
630 
631AC_DEFUN([XORG_RELEASE_VERSION],[
632	AC_ARG_WITH(release-version,
633			AC_HELP_STRING([--with-release-version=STRING],
634				[Use release version string in package name]),
635			[RELEASE_VERSION="$withval"],
636			[RELEASE_VERSION=""])
637	if test "x$RELEASE_VERSION" != "x"; then
638		PACKAGE="$PACKAGE-$RELEASE_VERSION"
639		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
640		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
641	fi
642	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
643		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
644		[Major version of this package])
645	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2`
646	if test "x$PVM" = "x"; then
647		PVM="0"
648	fi
649	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
650		[$PVM],
651		[Minor version of this package])
652	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3`
653	if test "x$PVP" = "x"; then
654		PVP="0"
655	fi
656	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
657		[$PVP],
658		[Patch version of this package])
659])
660
661# Copyright (C) 2002, 2003, 2005, 2006  Free Software Foundation, Inc.
662#
663# This file is free software; the Free Software Foundation
664# gives unlimited permission to copy and/or distribute it,
665# with or without modifications, as long as this notice is preserved.
666
667# AM_AUTOMAKE_VERSION(VERSION)
668# ----------------------------
669# Automake X.Y traces this macro to ensure aclocal.m4 has been
670# generated from the m4 files accompanying Automake X.Y.
671# (This private macro should not be called outside this file.)
672AC_DEFUN([AM_AUTOMAKE_VERSION],
673[am__api_version='1.10'
674dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
675dnl require some minimum version.  Point them to the right macro.
676m4_if([$1], [1.10], [],
677      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
678])
679
680# _AM_AUTOCONF_VERSION(VERSION)
681# -----------------------------
682# aclocal traces this macro to find the Autoconf version.
683# This is a private macro too.  Using m4_define simplifies
684# the logic in aclocal, which can simply ignore this definition.
685m4_define([_AM_AUTOCONF_VERSION], [])
686
687# AM_SET_CURRENT_AUTOMAKE_VERSION
688# -------------------------------
689# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
690# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
691AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
692[AM_AUTOMAKE_VERSION([1.10])dnl
693_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)])
694
695# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
696
697# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
698#
699# This file is free software; the Free Software Foundation
700# gives unlimited permission to copy and/or distribute it,
701# with or without modifications, as long as this notice is preserved.
702
703# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
704# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
705# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
706#
707# Of course, Automake must honor this variable whenever it calls a
708# tool from the auxiliary directory.  The problem is that $srcdir (and
709# therefore $ac_aux_dir as well) can be either absolute or relative,
710# depending on how configure is run.  This is pretty annoying, since
711# it makes $ac_aux_dir quite unusable in subdirectories: in the top
712# source directory, any form will work fine, but in subdirectories a
713# relative path needs to be adjusted first.
714#
715# $ac_aux_dir/missing
716#    fails when called from a subdirectory if $ac_aux_dir is relative
717# $top_srcdir/$ac_aux_dir/missing
718#    fails if $ac_aux_dir is absolute,
719#    fails when called from a subdirectory in a VPATH build with
720#          a relative $ac_aux_dir
721#
722# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
723# are both prefixed by $srcdir.  In an in-source build this is usually
724# harmless because $srcdir is `.', but things will broke when you
725# start a VPATH build or use an absolute $srcdir.
726#
727# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
728# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
729#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
730# and then we would define $MISSING as
731#   MISSING="\${SHELL} $am_aux_dir/missing"
732# This will work as long as MISSING is not called from configure, because
733# unfortunately $(top_srcdir) has no meaning in configure.
734# However there are other variables, like CC, which are often used in
735# configure, and could therefore not use this "fixed" $ac_aux_dir.
736#
737# Another solution, used here, is to always expand $ac_aux_dir to an
738# absolute PATH.  The drawback is that using absolute paths prevent a
739# configured tree to be moved without reconfiguration.
740
741AC_DEFUN([AM_AUX_DIR_EXPAND],
742[dnl Rely on autoconf to set up CDPATH properly.
743AC_PREREQ([2.50])dnl
744# expand $ac_aux_dir to an absolute path
745am_aux_dir=`cd $ac_aux_dir && pwd`
746])
747
748# AM_CONDITIONAL                                            -*- Autoconf -*-
749
750# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
751# Free Software Foundation, Inc.
752#
753# This file is free software; the Free Software Foundation
754# gives unlimited permission to copy and/or distribute it,
755# with or without modifications, as long as this notice is preserved.
756
757# serial 8
758
759# AM_CONDITIONAL(NAME, SHELL-CONDITION)
760# -------------------------------------
761# Define a conditional.
762AC_DEFUN([AM_CONDITIONAL],
763[AC_PREREQ(2.52)dnl
764 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
765	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
766AC_SUBST([$1_TRUE])dnl
767AC_SUBST([$1_FALSE])dnl
768_AM_SUBST_NOTMAKE([$1_TRUE])dnl
769_AM_SUBST_NOTMAKE([$1_FALSE])dnl
770if $2; then
771  $1_TRUE=
772  $1_FALSE='#'
773else
774  $1_TRUE='#'
775  $1_FALSE=
776fi
777AC_CONFIG_COMMANDS_PRE(
778[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
779  AC_MSG_ERROR([[conditional "$1" was never defined.
780Usually this means the macro was only invoked conditionally.]])
781fi])])
782
783# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
784# Free Software Foundation, Inc.
785#
786# This file is free software; the Free Software Foundation
787# gives unlimited permission to copy and/or distribute it,
788# with or without modifications, as long as this notice is preserved.
789
790# serial 9
791
792# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
793# written in clear, in which case automake, when reading aclocal.m4,
794# will think it sees a *use*, and therefore will trigger all it's
795# C support machinery.  Also note that it means that autoscan, seeing
796# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
797
798
799# _AM_DEPENDENCIES(NAME)
800# ----------------------
801# See how the compiler implements dependency checking.
802# NAME is "CC", "CXX", "GCJ", or "OBJC".
803# We try a few techniques and use that to set a single cache variable.
804#
805# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
806# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
807# dependency, and given that the user is not expected to run this macro,
808# just rely on AC_PROG_CC.
809AC_DEFUN([_AM_DEPENDENCIES],
810[AC_REQUIRE([AM_SET_DEPDIR])dnl
811AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
812AC_REQUIRE([AM_MAKE_INCLUDE])dnl
813AC_REQUIRE([AM_DEP_TRACK])dnl
814
815ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
816       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
817       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
818       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
819       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
820                   [depcc="$$1"   am_compiler_list=])
821
822AC_CACHE_CHECK([dependency style of $depcc],
823               [am_cv_$1_dependencies_compiler_type],
824[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
825  # We make a subdir and do the tests there.  Otherwise we can end up
826  # making bogus files that we don't know about and never remove.  For
827  # instance it was reported that on HP-UX the gcc test will end up
828  # making a dummy file named `D' -- because `-MD' means `put the output
829  # in D'.
830  mkdir conftest.dir
831  # Copy depcomp to subdir because otherwise we won't find it if we're
832  # using a relative directory.
833  cp "$am_depcomp" conftest.dir
834  cd conftest.dir
835  # We will build objects and dependencies in a subdirectory because
836  # it helps to detect inapplicable dependency modes.  For instance
837  # both Tru64's cc and ICC support -MD to output dependencies as a
838  # side effect of compilation, but ICC will put the dependencies in
839  # the current directory while Tru64 will put them in the object
840  # directory.
841  mkdir sub
842
843  am_cv_$1_dependencies_compiler_type=none
844  if test "$am_compiler_list" = ""; then
845     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
846  fi
847  for depmode in $am_compiler_list; do
848    # Setup a source with many dependencies, because some compilers
849    # like to wrap large dependency lists on column 80 (with \), and
850    # we should not choose a depcomp mode which is confused by this.
851    #
852    # We need to recreate these files for each test, as the compiler may
853    # overwrite some of them when testing with obscure command lines.
854    # This happens at least with the AIX C compiler.
855    : > sub/conftest.c
856    for i in 1 2 3 4 5 6; do
857      echo '#include "conftst'$i'.h"' >> sub/conftest.c
858      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
859      # Solaris 8's {/usr,}/bin/sh.
860      touch sub/conftst$i.h
861    done
862    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
863
864    case $depmode in
865    nosideeffect)
866      # after this tag, mechanisms are not by side-effect, so they'll
867      # only be used when explicitly requested
868      if test "x$enable_dependency_tracking" = xyes; then
869	continue
870      else
871	break
872      fi
873      ;;
874    none) break ;;
875    esac
876    # We check with `-c' and `-o' for the sake of the "dashmstdout"
877    # mode.  It turns out that the SunPro C++ compiler does not properly
878    # handle `-M -o', and we need to detect this.
879    if depmode=$depmode \
880       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
881       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
882       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
883         >/dev/null 2>conftest.err &&
884       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
885       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
886       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
887       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
888      # icc doesn't choke on unknown options, it will just issue warnings
889      # or remarks (even with -Werror).  So we grep stderr for any message
890      # that says an option was ignored or not supported.
891      # When given -MP, icc 7.0 and 7.1 complain thusly:
892      #   icc: Command line warning: ignoring option '-M'; no argument required
893      # The diagnosis changed in icc 8.0:
894      #   icc: Command line remark: option '-MP' not supported
895      if (grep 'ignoring option' conftest.err ||
896          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
897        am_cv_$1_dependencies_compiler_type=$depmode
898        break
899      fi
900    fi
901  done
902
903  cd ..
904  rm -rf conftest.dir
905else
906  am_cv_$1_dependencies_compiler_type=none
907fi
908])
909AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
910AM_CONDITIONAL([am__fastdep$1], [
911  test "x$enable_dependency_tracking" != xno \
912  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
913])
914
915
916# AM_SET_DEPDIR
917# -------------
918# Choose a directory name for dependency files.
919# This macro is AC_REQUIREd in _AM_DEPENDENCIES
920AC_DEFUN([AM_SET_DEPDIR],
921[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
922AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
923])
924
925
926# AM_DEP_TRACK
927# ------------
928AC_DEFUN([AM_DEP_TRACK],
929[AC_ARG_ENABLE(dependency-tracking,
930[  --disable-dependency-tracking  speeds up one-time build
931  --enable-dependency-tracking   do not reject slow dependency extractors])
932if test "x$enable_dependency_tracking" != xno; then
933  am_depcomp="$ac_aux_dir/depcomp"
934  AMDEPBACKSLASH='\'
935fi
936AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
937AC_SUBST([AMDEPBACKSLASH])dnl
938_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
939])
940
941# Generate code to set up dependency tracking.              -*- Autoconf -*-
942
943# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
944# Free Software Foundation, Inc.
945#
946# This file is free software; the Free Software Foundation
947# gives unlimited permission to copy and/or distribute it,
948# with or without modifications, as long as this notice is preserved.
949
950#serial 3
951
952# _AM_OUTPUT_DEPENDENCY_COMMANDS
953# ------------------------------
954AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
955[for mf in $CONFIG_FILES; do
956  # Strip MF so we end up with the name of the file.
957  mf=`echo "$mf" | sed -e 's/:.*$//'`
958  # Check whether this is an Automake generated Makefile or not.
959  # We used to match only the files named `Makefile.in', but
960  # some people rename them; so instead we look at the file content.
961  # Grep'ing the first line is not enough: some people post-process
962  # each Makefile.in and add a new line on top of each file to say so.
963  # Grep'ing the whole file is not good either: AIX grep has a line
964  # limit of 2048, but all sed's we know have understand at least 4000.
965  if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
966    dirpart=`AS_DIRNAME("$mf")`
967  else
968    continue
969  fi
970  # Extract the definition of DEPDIR, am__include, and am__quote
971  # from the Makefile without running `make'.
972  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
973  test -z "$DEPDIR" && continue
974  am__include=`sed -n 's/^am__include = //p' < "$mf"`
975  test -z "am__include" && continue
976  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
977  # When using ansi2knr, U may be empty or an underscore; expand it
978  U=`sed -n 's/^U = //p' < "$mf"`
979  # Find all dependency output files, they are included files with
980  # $(DEPDIR) in their names.  We invoke sed twice because it is the
981  # simplest approach to changing $(DEPDIR) to its actual value in the
982  # expansion.
983  for file in `sed -n "
984    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
985       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
986    # Make sure the directory exists.
987    test -f "$dirpart/$file" && continue
988    fdir=`AS_DIRNAME(["$file"])`
989    AS_MKDIR_P([$dirpart/$fdir])
990    # echo "creating $dirpart/$file"
991    echo '# dummy' > "$dirpart/$file"
992  done
993done
994])# _AM_OUTPUT_DEPENDENCY_COMMANDS
995
996
997# AM_OUTPUT_DEPENDENCY_COMMANDS
998# -----------------------------
999# This macro should only be invoked once -- use via AC_REQUIRE.
1000#
1001# This code is only required when automatic dependency tracking
1002# is enabled.  FIXME.  This creates each `.P' file that we will
1003# need in order to bootstrap the dependency handling code.
1004AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1005[AC_CONFIG_COMMANDS([depfiles],
1006     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1007     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1008])
1009
1010# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
1011# Free Software Foundation, Inc.
1012#
1013# This file is free software; the Free Software Foundation
1014# gives unlimited permission to copy and/or distribute it,
1015# with or without modifications, as long as this notice is preserved.
1016
1017# serial 8
1018
1019# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
1020AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
1021
1022# Do all the work for Automake.                             -*- Autoconf -*-
1023
1024# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
1025# 2005, 2006 Free Software Foundation, Inc.
1026#
1027# This file is free software; the Free Software Foundation
1028# gives unlimited permission to copy and/or distribute it,
1029# with or without modifications, as long as this notice is preserved.
1030
1031# serial 12
1032
1033# This macro actually does too much.  Some checks are only needed if
1034# your package does certain things.  But this isn't really a big deal.
1035
1036# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1037# AM_INIT_AUTOMAKE([OPTIONS])
1038# -----------------------------------------------
1039# The call with PACKAGE and VERSION arguments is the old style
1040# call (pre autoconf-2.50), which is being phased out.  PACKAGE
1041# and VERSION should now be passed to AC_INIT and removed from
1042# the call to AM_INIT_AUTOMAKE.
1043# We support both call styles for the transition.  After
1044# the next Automake release, Autoconf can make the AC_INIT
1045# arguments mandatory, and then we can depend on a new Autoconf
1046# release and drop the old call support.
1047AC_DEFUN([AM_INIT_AUTOMAKE],
1048[AC_PREREQ([2.60])dnl
1049dnl Autoconf wants to disallow AM_ names.  We explicitly allow
1050dnl the ones we care about.
1051m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1052AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1053AC_REQUIRE([AC_PROG_INSTALL])dnl
1054if test "`cd $srcdir && pwd`" != "`pwd`"; then
1055  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
1056  # is not polluted with repeated "-I."
1057  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
1058  # test to see if srcdir already configured
1059  if test -f $srcdir/config.status; then
1060    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1061  fi
1062fi
1063
1064# test whether we have cygpath
1065if test -z "$CYGPATH_W"; then
1066  if (cygpath --version) >/dev/null 2>/dev/null; then
1067    CYGPATH_W='cygpath -w'
1068  else
1069    CYGPATH_W=echo
1070  fi
1071fi
1072AC_SUBST([CYGPATH_W])
1073
1074# Define the identity of the package.
1075dnl Distinguish between old-style and new-style calls.
1076m4_ifval([$2],
1077[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1078 AC_SUBST([PACKAGE], [$1])dnl
1079 AC_SUBST([VERSION], [$2])],
1080[_AM_SET_OPTIONS([$1])dnl
1081dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
1082m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
1083  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1084 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1085 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1086
1087_AM_IF_OPTION([no-define],,
1088[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
1089 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
1090
1091# Some tools Automake needs.
1092AC_REQUIRE([AM_SANITY_CHECK])dnl
1093AC_REQUIRE([AC_ARG_PROGRAM])dnl
1094AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
1095AM_MISSING_PROG(AUTOCONF, autoconf)
1096AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
1097AM_MISSING_PROG(AUTOHEADER, autoheader)
1098AM_MISSING_PROG(MAKEINFO, makeinfo)
1099AM_PROG_INSTALL_SH
1100AM_PROG_INSTALL_STRIP
1101AC_REQUIRE([AM_PROG_MKDIR_P])dnl
1102# We need awk for the "check" target.  The system "awk" is bad on
1103# some platforms.
1104AC_REQUIRE([AC_PROG_AWK])dnl
1105AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1106AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1107_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1108              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1109	      		     [_AM_PROG_TAR([v7])])])
1110_AM_IF_OPTION([no-dependencies],,
1111[AC_PROVIDE_IFELSE([AC_PROG_CC],
1112                  [_AM_DEPENDENCIES(CC)],
1113                  [define([AC_PROG_CC],
1114                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
1115AC_PROVIDE_IFELSE([AC_PROG_CXX],
1116                  [_AM_DEPENDENCIES(CXX)],
1117                  [define([AC_PROG_CXX],
1118                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1119AC_PROVIDE_IFELSE([AC_PROG_OBJC],
1120                  [_AM_DEPENDENCIES(OBJC)],
1121                  [define([AC_PROG_OBJC],
1122                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
1123])
1124])
1125
1126
1127# When config.status generates a header, we must update the stamp-h file.
1128# This file resides in the same directory as the config header
1129# that is generated.  The stamp files are numbered to have different names.
1130
1131# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1132# loop where config.status creates the headers, so we can generate
1133# our stamp files there.
1134AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1135[# Compute $1's index in $config_headers.
1136_am_stamp_count=1
1137for _am_header in $config_headers :; do
1138  case $_am_header in
1139    $1 | $1:* )
1140      break ;;
1141    * )
1142      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1143  esac
1144done
1145echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
1146
1147# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
1148#
1149# This file is free software; the Free Software Foundation
1150# gives unlimited permission to copy and/or distribute it,
1151# with or without modifications, as long as this notice is preserved.
1152
1153# AM_PROG_INSTALL_SH
1154# ------------------
1155# Define $install_sh.
1156AC_DEFUN([AM_PROG_INSTALL_SH],
1157[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1158install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
1159AC_SUBST(install_sh)])
1160
1161# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
1162#
1163# This file is free software; the Free Software Foundation
1164# gives unlimited permission to copy and/or distribute it,
1165# with or without modifications, as long as this notice is preserved.
1166
1167# serial 2
1168
1169# Check whether the underlying file-system supports filenames
1170# with a leading dot.  For instance MS-DOS doesn't.
1171AC_DEFUN([AM_SET_LEADING_DOT],
1172[rm -rf .tst 2>/dev/null
1173mkdir .tst 2>/dev/null
1174if test -d .tst; then
1175  am__leading_dot=.
1176else
1177  am__leading_dot=_
1178fi
1179rmdir .tst 2>/dev/null
1180AC_SUBST([am__leading_dot])])
1181
1182# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1183
1184# serial 48 AC_PROG_LIBTOOL
1185
1186
1187# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
1188# -----------------------------------------------------------
1189# If this macro is not defined by Autoconf, define it here.
1190m4_ifdef([AC_PROVIDE_IFELSE],
1191         [],
1192         [m4_define([AC_PROVIDE_IFELSE],
1193	         [m4_ifdef([AC_PROVIDE_$1],
1194		           [$2], [$3])])])
1195
1196
1197# AC_PROG_LIBTOOL
1198# ---------------
1199AC_DEFUN([AC_PROG_LIBTOOL],
1200[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
1201dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
1202dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
1203  AC_PROVIDE_IFELSE([AC_PROG_CXX],
1204    [AC_LIBTOOL_CXX],
1205    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
1206  ])])
1207dnl And a similar setup for Fortran 77 support
1208  AC_PROVIDE_IFELSE([AC_PROG_F77],
1209    [AC_LIBTOOL_F77],
1210    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
1211])])
1212
1213dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
1214dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
1215dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
1216  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1217    [AC_LIBTOOL_GCJ],
1218    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1219      [AC_LIBTOOL_GCJ],
1220      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
1221	[AC_LIBTOOL_GCJ],
1222      [ifdef([AC_PROG_GCJ],
1223	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
1224       ifdef([A][M_PROG_GCJ],
1225	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
1226       ifdef([LT_AC_PROG_GCJ],
1227	     [define([LT_AC_PROG_GCJ],
1228		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
1229])])# AC_PROG_LIBTOOL
1230
1231
1232# _AC_PROG_LIBTOOL
1233# ----------------
1234AC_DEFUN([_AC_PROG_LIBTOOL],
1235[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
1236AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
1237AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
1238AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
1239
1240# This can be used to rebuild libtool when needed
1241LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
1242
1243# Always use our own libtool.
1244LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1245AC_SUBST(LIBTOOL)dnl
1246
1247# Prevent multiple expansion
1248define([AC_PROG_LIBTOOL], [])
1249])# _AC_PROG_LIBTOOL
1250
1251
1252# AC_LIBTOOL_SETUP
1253# ----------------
1254AC_DEFUN([AC_LIBTOOL_SETUP],
1255[AC_PREREQ(2.50)dnl
1256AC_REQUIRE([AC_ENABLE_SHARED])dnl
1257AC_REQUIRE([AC_ENABLE_STATIC])dnl
1258AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
1259AC_REQUIRE([AC_CANONICAL_HOST])dnl
1260AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1261AC_REQUIRE([AC_PROG_CC])dnl
1262AC_REQUIRE([AC_PROG_LD])dnl
1263AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
1264AC_REQUIRE([AC_PROG_NM])dnl
1265
1266AC_REQUIRE([AC_PROG_LN_S])dnl
1267AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
1268# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
1269AC_REQUIRE([AC_OBJEXT])dnl
1270AC_REQUIRE([AC_EXEEXT])dnl
1271dnl
1272
1273AC_LIBTOOL_SYS_MAX_CMD_LEN
1274AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1275AC_LIBTOOL_OBJDIR
1276
1277AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1278_LT_AC_PROG_ECHO_BACKSLASH
1279
1280case $host_os in
1281aix3*)
1282  # AIX sometimes has problems with the GCC collect2 program.  For some
1283  # reason, if we set the COLLECT_NAMES environment variable, the problems
1284  # vanish in a puff of smoke.
1285  if test "X${COLLECT_NAMES+set}" != Xset; then
1286    COLLECT_NAMES=
1287    export COLLECT_NAMES
1288  fi
1289  ;;
1290esac
1291
1292# Sed substitution that helps us do robust quoting.  It backslashifies
1293# metacharacters that are still active within double-quoted strings.
1294Xsed='sed -e 1s/^X//'
1295[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
1296
1297# Same as above, but do not quote variable references.
1298[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
1299
1300# Sed substitution to delay expansion of an escaped shell variable in a
1301# double_quote_subst'ed string.
1302delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1303
1304# Sed substitution to avoid accidental globbing in evaled expressions
1305no_glob_subst='s/\*/\\\*/g'
1306
1307# Constants:
1308rm="rm -f"
1309
1310# Global variables:
1311default_ofile=libtool
1312can_build_shared=yes
1313
1314# All known linkers require a `.a' archive for static linking (except MSVC,
1315# which needs '.lib').
1316libext=a
1317ltmain="$ac_aux_dir/ltmain.sh"
1318ofile="$default_ofile"
1319with_gnu_ld="$lt_cv_prog_gnu_ld"
1320
1321AC_CHECK_TOOL(AR, ar, false)
1322AC_CHECK_TOOL(RANLIB, ranlib, :)
1323AC_CHECK_TOOL(STRIP, strip, :)
1324
1325old_CC="$CC"
1326old_CFLAGS="$CFLAGS"
1327
1328# Set sane defaults for various variables
1329test -z "$AR" && AR=ar
1330test -z "$AR_FLAGS" && AR_FLAGS=cru
1331test -z "$AS" && AS=as
1332test -z "$CC" && CC=cc
1333test -z "$LTCC" && LTCC=$CC
1334test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1335test -z "$DLLTOOL" && DLLTOOL=dlltool
1336test -z "$LD" && LD=ld
1337test -z "$LN_S" && LN_S="ln -s"
1338test -z "$MAGIC_CMD" && MAGIC_CMD=file
1339test -z "$NM" && NM=nm
1340test -z "$SED" && SED=sed
1341test -z "$OBJDUMP" && OBJDUMP=objdump
1342test -z "$RANLIB" && RANLIB=:
1343test -z "$STRIP" && STRIP=:
1344test -z "$ac_objext" && ac_objext=o
1345
1346# Determine commands to create old-style static archives.
1347old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1348old_postinstall_cmds='chmod 644 $oldlib'
1349old_postuninstall_cmds=
1350
1351if test -n "$RANLIB"; then
1352  case $host_os in
1353  openbsd*)
1354    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1355    ;;
1356  *)
1357    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1358    ;;
1359  esac
1360  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1361fi
1362
1363_LT_CC_BASENAME([$compiler])
1364
1365# Only perform the check for file, if the check method requires it
1366case $deplibs_check_method in
1367file_magic*)
1368  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1369    AC_PATH_MAGIC
1370  fi
1371  ;;
1372esac
1373
1374AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1375AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1376enable_win32_dll=yes, enable_win32_dll=no)
1377
1378AC_ARG_ENABLE([libtool-lock],
1379    [AC_HELP_STRING([--disable-libtool-lock],
1380	[avoid locking (might break parallel builds)])])
1381test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1382
1383AC_ARG_WITH([pic],
1384    [AC_HELP_STRING([--with-pic],
1385	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
1386    [pic_mode="$withval"],
1387    [pic_mode=default])
1388test -z "$pic_mode" && pic_mode=default
1389
1390# Use C for the default configuration in the libtool script
1391tagname=
1392AC_LIBTOOL_LANG_C_CONFIG
1393_LT_AC_TAGCONFIG
1394])# AC_LIBTOOL_SETUP
1395
1396
1397# _LT_AC_SYS_COMPILER
1398# -------------------
1399AC_DEFUN([_LT_AC_SYS_COMPILER],
1400[AC_REQUIRE([AC_PROG_CC])dnl
1401
1402# If no C compiler was specified, use CC.
1403LTCC=${LTCC-"$CC"}
1404
1405# If no C compiler flags were specified, use CFLAGS.
1406LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1407
1408# Allow CC to be a program name with arguments.
1409compiler=$CC
1410])# _LT_AC_SYS_COMPILER
1411
1412
1413# _LT_CC_BASENAME(CC)
1414# -------------------
1415# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
1416AC_DEFUN([_LT_CC_BASENAME],
1417[for cc_temp in $1""; do
1418  case $cc_temp in
1419    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1420    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1421    \-*) ;;
1422    *) break;;
1423  esac
1424done
1425cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
1426])
1427
1428
1429# _LT_COMPILER_BOILERPLATE
1430# ------------------------
1431# Check for compiler boilerplate output or warnings with
1432# the simple compiler test code.
1433AC_DEFUN([_LT_COMPILER_BOILERPLATE],
1434[ac_outfile=conftest.$ac_objext
1435printf "$lt_simple_compile_test_code" >conftest.$ac_ext
1436eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1437_lt_compiler_boilerplate=`cat conftest.err`
1438$rm conftest*
1439])# _LT_COMPILER_BOILERPLATE
1440
1441
1442# _LT_LINKER_BOILERPLATE
1443# ----------------------
1444# Check for linker boilerplate output or warnings with
1445# the simple link test code.
1446AC_DEFUN([_LT_LINKER_BOILERPLATE],
1447[ac_outfile=conftest.$ac_objext
1448printf "$lt_simple_link_test_code" >conftest.$ac_ext
1449eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1450_lt_linker_boilerplate=`cat conftest.err`
1451$rm conftest*
1452])# _LT_LINKER_BOILERPLATE
1453
1454
1455# _LT_AC_SYS_LIBPATH_AIX
1456# ----------------------
1457# Links a minimal program and checks the executable
1458# for the system default hardcoded library path. In most cases,
1459# this is /usr/lib:/lib, but when the MPI compilers are used
1460# the location of the communication and MPI libs are included too.
1461# If we don't find anything, use the default library path according
1462# to the aix ld manual.
1463AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
1464[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1465aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
1466}'`
1467# Check for a 64-bit object if we didn't find anything.
1468if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
1469}'`; fi],[])
1470if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1471])# _LT_AC_SYS_LIBPATH_AIX
1472
1473
1474# _LT_AC_SHELL_INIT(ARG)
1475# ----------------------
1476AC_DEFUN([_LT_AC_SHELL_INIT],
1477[ifdef([AC_DIVERSION_NOTICE],
1478	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1479	 [AC_DIVERT_PUSH(NOTICE)])
1480$1
1481AC_DIVERT_POP
1482])# _LT_AC_SHELL_INIT
1483
1484
1485# _LT_AC_PROG_ECHO_BACKSLASH
1486# --------------------------
1487# Add some code to the start of the generated configure script which
1488# will find an echo command which doesn't interpret backslashes.
1489AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1490[_LT_AC_SHELL_INIT([
1491# Check that we are running under the correct shell.
1492SHELL=${CONFIG_SHELL-/bin/sh}
1493
1494case X$ECHO in
1495X*--fallback-echo)
1496  # Remove one level of quotation (which was required for Make).
1497  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1498  ;;
1499esac
1500
1501echo=${ECHO-echo}
1502if test "X[$]1" = X--no-reexec; then
1503  # Discard the --no-reexec flag, and continue.
1504  shift
1505elif test "X[$]1" = X--fallback-echo; then
1506  # Avoid inline document here, it may be left over
1507  :
1508elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
1509  # Yippee, $echo works!
1510  :
1511else
1512  # Restart under the correct shell.
1513  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1514fi
1515
1516if test "X[$]1" = X--fallback-echo; then
1517  # used as fallback echo
1518  shift
1519  cat <<EOF
1520[$]*
1521EOF
1522  exit 0
1523fi
1524
1525# The HP-UX ksh and POSIX shell print the target directory to stdout
1526# if CDPATH is set.
1527(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1528
1529if test -z "$ECHO"; then
1530if test "X${echo_test_string+set}" != Xset; then
1531# find a string as large as possible, as long as the shell can cope with it
1532  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1533    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1534    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
1535       echo_test_string=`eval $cmd` &&
1536       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1537    then
1538      break
1539    fi
1540  done
1541fi
1542
1543if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1544   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1545   test "X$echo_testing_string" = "X$echo_test_string"; then
1546  :
1547else
1548  # The Solaris, AIX, and Digital Unix default echo programs unquote
1549  # backslashes.  This makes it impossible to quote backslashes using
1550  #   echo "$something" | sed 's/\\/\\\\/g'
1551  #
1552  # So, first we look for a working echo in the user's PATH.
1553
1554  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1555  for dir in $PATH /usr/ucb; do
1556    IFS="$lt_save_ifs"
1557    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1558       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1559       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1560       test "X$echo_testing_string" = "X$echo_test_string"; then
1561      echo="$dir/echo"
1562      break
1563    fi
1564  done
1565  IFS="$lt_save_ifs"
1566
1567  if test "X$echo" = Xecho; then
1568    # We didn't find a better echo, so look for alternatives.
1569    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1570       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1571       test "X$echo_testing_string" = "X$echo_test_string"; then
1572      # This shell has a builtin print -r that does the trick.
1573      echo='print -r'
1574    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1575	 test "X$CONFIG_SHELL" != X/bin/ksh; then
1576      # If we have ksh, try running configure again with it.
1577      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1578      export ORIGINAL_CONFIG_SHELL
1579      CONFIG_SHELL=/bin/ksh
1580      export CONFIG_SHELL
1581      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1582    else
1583      # Try using printf.
1584      echo='printf %s\n'
1585      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1586	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1587	 test "X$echo_testing_string" = "X$echo_test_string"; then
1588	# Cool, printf works
1589	:
1590      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1591	   test "X$echo_testing_string" = 'X\t' &&
1592	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1593	   test "X$echo_testing_string" = "X$echo_test_string"; then
1594	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1595	export CONFIG_SHELL
1596	SHELL="$CONFIG_SHELL"
1597	export SHELL
1598	echo="$CONFIG_SHELL [$]0 --fallback-echo"
1599      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1600	   test "X$echo_testing_string" = 'X\t' &&
1601	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1602	   test "X$echo_testing_string" = "X$echo_test_string"; then
1603	echo="$CONFIG_SHELL [$]0 --fallback-echo"
1604      else
1605	# maybe with a smaller string...
1606	prev=:
1607
1608	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1609	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1610	  then
1611	    break
1612	  fi
1613	  prev="$cmd"
1614	done
1615
1616	if test "$prev" != 'sed 50q "[$]0"'; then
1617	  echo_test_string=`eval $prev`
1618	  export echo_test_string
1619	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1620	else
1621	  # Oops.  We lost completely, so just stick with echo.
1622	  echo=echo
1623	fi
1624      fi
1625    fi
1626  fi
1627fi
1628fi
1629
1630# Copy echo and quote the copy suitably for passing to libtool from
1631# the Makefile, instead of quoting the original, which is used later.
1632ECHO=$echo
1633if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1634   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1635fi
1636
1637AC_SUBST(ECHO)
1638])])# _LT_AC_PROG_ECHO_BACKSLASH
1639
1640
1641# _LT_AC_LOCK
1642# -----------
1643AC_DEFUN([_LT_AC_LOCK],
1644[AC_ARG_ENABLE([libtool-lock],
1645    [AC_HELP_STRING([--disable-libtool-lock],
1646	[avoid locking (might break parallel builds)])])
1647test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1648
1649# Some flags need to be propagated to the compiler or linker for good
1650# libtool support.
1651case $host in
1652ia64-*-hpux*)
1653  # Find out which ABI we are using.
1654  echo 'int i;' > conftest.$ac_ext
1655  if AC_TRY_EVAL(ac_compile); then
1656    case `/usr/bin/file conftest.$ac_objext` in
1657    *ELF-32*)
1658      HPUX_IA64_MODE="32"
1659      ;;
1660    *ELF-64*)
1661      HPUX_IA64_MODE="64"
1662      ;;
1663    esac
1664  fi
1665  rm -rf conftest*
1666  ;;
1667*-*-irix6*)
1668  # Find out which ABI we are using.
1669  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1670  if AC_TRY_EVAL(ac_compile); then
1671   if test "$lt_cv_prog_gnu_ld" = yes; then
1672    case `/usr/bin/file conftest.$ac_objext` in
1673    *32-bit*)
1674      LD="${LD-ld} -melf32bsmip"
1675      ;;
1676    *N32*)
1677      LD="${LD-ld} -melf32bmipn32"
1678      ;;
1679    *64-bit*)
1680      LD="${LD-ld} -melf64bmip"
1681      ;;
1682    esac
1683   else
1684    case `/usr/bin/file conftest.$ac_objext` in
1685    *32-bit*)
1686      LD="${LD-ld} -32"
1687      ;;
1688    *N32*)
1689      LD="${LD-ld} -n32"
1690      ;;
1691    *64-bit*)
1692      LD="${LD-ld} -64"
1693      ;;
1694    esac
1695   fi
1696  fi
1697  rm -rf conftest*
1698  ;;
1699
1700x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
1701  # Find out which ABI we are using.
1702  echo 'int i;' > conftest.$ac_ext
1703  if AC_TRY_EVAL(ac_compile); then
1704    case `/usr/bin/file conftest.o` in
1705    *32-bit*)
1706      case $host in
1707        x86_64-*linux*)
1708          LD="${LD-ld} -m elf_i386"
1709          ;;
1710        ppc64-*linux*|powerpc64-*linux*)
1711          LD="${LD-ld} -m elf32ppclinux"
1712          ;;
1713        s390x-*linux*)
1714          LD="${LD-ld} -m elf_s390"
1715          ;;
1716        sparc64-*linux*)
1717          LD="${LD-ld} -m elf32_sparc"
1718          ;;
1719      esac
1720      ;;
1721    *64-bit*)
1722      case $host in
1723        x86_64-*linux*)
1724          LD="${LD-ld} -m elf_x86_64"
1725          ;;
1726        ppc*-*linux*|powerpc*-*linux*)
1727          LD="${LD-ld} -m elf64ppc"
1728          ;;
1729        s390*-*linux*)
1730          LD="${LD-ld} -m elf64_s390"
1731          ;;
1732        sparc*-*linux*)
1733          LD="${LD-ld} -m elf64_sparc"
1734          ;;
1735      esac
1736      ;;
1737    esac
1738  fi
1739  rm -rf conftest*
1740  ;;
1741
1742*-*-sco3.2v5*)
1743  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1744  SAVE_CFLAGS="$CFLAGS"
1745  CFLAGS="$CFLAGS -belf"
1746  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1747    [AC_LANG_PUSH(C)
1748     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1749     AC_LANG_POP])
1750  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1751    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1752    CFLAGS="$SAVE_CFLAGS"
1753  fi
1754  ;;
1755sparc*-*solaris*)
1756  # Find out which ABI we are using.
1757  echo 'int i;' > conftest.$ac_ext
1758  if AC_TRY_EVAL(ac_compile); then
1759    case `/usr/bin/file conftest.o` in
1760    *64-bit*)
1761      case $lt_cv_prog_gnu_ld in
1762      yes*) LD="${LD-ld} -m elf64_sparc" ;;
1763      *)    LD="${LD-ld} -64" ;;
1764      esac
1765      ;;
1766    esac
1767  fi
1768  rm -rf conftest*
1769  ;;
1770
1771AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1772[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1773  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1774  AC_CHECK_TOOL(AS, as, false)
1775  AC_CHECK_TOOL(OBJDUMP, objdump, false)
1776  ;;
1777  ])
1778esac
1779
1780need_locks="$enable_libtool_lock"
1781
1782])# _LT_AC_LOCK
1783
1784
1785# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1786#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1787# ----------------------------------------------------------------
1788# Check whether the given compiler option works
1789AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
1790[AC_REQUIRE([LT_AC_PROG_SED])
1791AC_CACHE_CHECK([$1], [$2],
1792  [$2=no
1793  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1794   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1795   lt_compiler_flag="$3"
1796   # Insert the option either (1) after the last *FLAGS variable, or
1797   # (2) before a word containing "conftest.", or (3) at the end.
1798   # Note that $ac_compile itself does not contain backslashes and begins
1799   # with a dollar sign (not a hyphen), so the echo should work correctly.
1800   # The option is referenced via a variable to avoid confusing sed.
1801   lt_compile=`echo "$ac_compile" | $SED \
1802   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1803   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1804   -e 's:$: $lt_compiler_flag:'`
1805   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1806   (eval "$lt_compile" 2>conftest.err)
1807   ac_status=$?
1808   cat conftest.err >&AS_MESSAGE_LOG_FD
1809   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1810   if (exit $ac_status) && test -s "$ac_outfile"; then
1811     # The compiler can only warn and ignore the option if not recognized
1812     # So say no if there are warnings other than the usual output.
1813     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
1814     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1815     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1816       $2=yes
1817     fi
1818   fi
1819   $rm conftest*
1820])
1821
1822if test x"[$]$2" = xyes; then
1823    ifelse([$5], , :, [$5])
1824else
1825    ifelse([$6], , :, [$6])
1826fi
1827])# AC_LIBTOOL_COMPILER_OPTION
1828
1829
1830# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1831#                          [ACTION-SUCCESS], [ACTION-FAILURE])
1832# ------------------------------------------------------------
1833# Check whether the given compiler option works
1834AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
1835[AC_CACHE_CHECK([$1], [$2],
1836  [$2=no
1837   save_LDFLAGS="$LDFLAGS"
1838   LDFLAGS="$LDFLAGS $3"
1839   printf "$lt_simple_link_test_code" > conftest.$ac_ext
1840   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1841     # The linker can only warn and ignore the option if not recognized
1842     # So say no if there are warnings
1843     if test -s conftest.err; then
1844       # Append any errors to the config.log.
1845       cat conftest.err 1>&AS_MESSAGE_LOG_FD
1846       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
1847       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1848       if diff conftest.exp conftest.er2 >/dev/null; then
1849         $2=yes
1850       fi
1851     else
1852       $2=yes
1853     fi
1854   fi
1855   $rm conftest*
1856   LDFLAGS="$save_LDFLAGS"
1857])
1858
1859if test x"[$]$2" = xyes; then
1860    ifelse([$4], , :, [$4])
1861else
1862    ifelse([$5], , :, [$5])
1863fi
1864])# AC_LIBTOOL_LINKER_OPTION
1865
1866
1867# AC_LIBTOOL_SYS_MAX_CMD_LEN
1868# --------------------------
1869AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
1870[# find the maximum length of command line arguments
1871AC_MSG_CHECKING([the maximum length of command line arguments])
1872AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1873  i=0
1874  teststring="ABCD"
1875
1876  case $build_os in
1877  msdosdjgpp*)
1878    # On DJGPP, this test can blow up pretty badly due to problems in libc
1879    # (any single argument exceeding 2000 bytes causes a buffer overrun
1880    # during glob expansion).  Even if it were fixed, the result of this
1881    # check would be larger than it should be.
1882    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
1883    ;;
1884
1885  gnu*)
1886    # Under GNU Hurd, this test is not required because there is
1887    # no limit to the length of command line arguments.
1888    # Libtool will interpret -1 as no limit whatsoever
1889    lt_cv_sys_max_cmd_len=-1;
1890    ;;
1891
1892  cygwin* | mingw*)
1893    # On Win9x/ME, this test blows up -- it succeeds, but takes
1894    # about 5 minutes as the teststring grows exponentially.
1895    # Worse, since 9x/ME are not pre-emptively multitasking,
1896    # you end up with a "frozen" computer, even though with patience
1897    # the test eventually succeeds (with a max line length of 256k).
1898    # Instead, let's just punt: use the minimum linelength reported by
1899    # all of the supported platforms: 8192 (on NT/2K/XP).
1900    lt_cv_sys_max_cmd_len=8192;
1901    ;;
1902
1903  amigaos*)
1904    # On AmigaOS with pdksh, this test takes hours, literally.
1905    # So we just punt and use a minimum line length of 8192.
1906    lt_cv_sys_max_cmd_len=8192;
1907    ;;
1908
1909  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1910    # This has been around since 386BSD, at least.  Likely further.
1911    if test -x /sbin/sysctl; then
1912      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1913    elif test -x /usr/sbin/sysctl; then
1914      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1915    else
1916      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
1917    fi
1918    # And add a safety zone
1919    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1920    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1921    ;;
1922
1923  interix*)
1924    # We know the value 262144 and hardcode it with a safety zone (like BSD)
1925    lt_cv_sys_max_cmd_len=196608
1926    ;;
1927
1928  osf*)
1929    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1930    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1931    # nice to cause kernel panics so lets avoid the loop below.
1932    # First set a reasonable default.
1933    lt_cv_sys_max_cmd_len=16384
1934    #
1935    if test -x /sbin/sysconfig; then
1936      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1937        *1*) lt_cv_sys_max_cmd_len=-1 ;;
1938      esac
1939    fi
1940    ;;
1941  sco3.2v5*)
1942    lt_cv_sys_max_cmd_len=102400
1943    ;;
1944  sysv5* | sco5v6* | sysv4.2uw2*)
1945    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1946    if test -n "$kargmax"; then
1947      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ 	]]//'`
1948    else
1949      lt_cv_sys_max_cmd_len=32768
1950    fi
1951    ;;
1952  *)
1953    # If test is not a shell built-in, we'll probably end up computing a
1954    # maximum length that is only half of the actual maximum length, but
1955    # we can't tell.
1956    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1957    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
1958	       = "XX$teststring") >/dev/null 2>&1 &&
1959	    new_result=`expr "X$teststring" : ".*" 2>&1` &&
1960	    lt_cv_sys_max_cmd_len=$new_result &&
1961	    test $i != 17 # 1/2 MB should be enough
1962    do
1963      i=`expr $i + 1`
1964      teststring=$teststring$teststring
1965    done
1966    teststring=
1967    # Add a significant safety factor because C++ compilers can tack on massive
1968    # amounts of additional arguments before passing them to the linker.
1969    # It appears as though 1/2 is a usable value.
1970    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1971    ;;
1972  esac
1973])
1974if test -n $lt_cv_sys_max_cmd_len ; then
1975  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1976else
1977  AC_MSG_RESULT(none)
1978fi
1979])# AC_LIBTOOL_SYS_MAX_CMD_LEN
1980
1981
1982# _LT_AC_CHECK_DLFCN
1983# ------------------
1984AC_DEFUN([_LT_AC_CHECK_DLFCN],
1985[AC_CHECK_HEADERS(dlfcn.h)dnl
1986])# _LT_AC_CHECK_DLFCN
1987
1988
1989# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1990#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1991# ---------------------------------------------------------------------
1992AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1993[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1994if test "$cross_compiling" = yes; then :
1995  [$4]
1996else
1997  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1998  lt_status=$lt_dlunknown
1999  cat > conftest.$ac_ext <<EOF
2000[#line __oline__ "configure"
2001#include "confdefs.h"
2002
2003#if HAVE_DLFCN_H
2004#include <dlfcn.h>
2005#endif
2006
2007#include <stdio.h>
2008
2009#ifdef RTLD_GLOBAL
2010#  define LT_DLGLOBAL		RTLD_GLOBAL
2011#else
2012#  ifdef DL_GLOBAL
2013#    define LT_DLGLOBAL		DL_GLOBAL
2014#  else
2015#    define LT_DLGLOBAL		0
2016#  endif
2017#endif
2018
2019/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2020   find out it does not work in some platform. */
2021#ifndef LT_DLLAZY_OR_NOW
2022#  ifdef RTLD_LAZY
2023#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
2024#  else
2025#    ifdef DL_LAZY
2026#      define LT_DLLAZY_OR_NOW		DL_LAZY
2027#    else
2028#      ifdef RTLD_NOW
2029#        define LT_DLLAZY_OR_NOW	RTLD_NOW
2030#      else
2031#        ifdef DL_NOW
2032#          define LT_DLLAZY_OR_NOW	DL_NOW
2033#        else
2034#          define LT_DLLAZY_OR_NOW	0
2035#        endif
2036#      endif
2037#    endif
2038#  endif
2039#endif
2040
2041#ifdef __cplusplus
2042extern "C" void exit (int);
2043#endif
2044
2045void fnord() { int i=42;}
2046int main ()
2047{
2048  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2049  int status = $lt_dlunknown;
2050
2051  if (self)
2052    {
2053      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
2054      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
2055      /* dlclose (self); */
2056    }
2057  else
2058    puts (dlerror ());
2059
2060    exit (status);
2061}]
2062EOF
2063  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
2064    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
2065    lt_status=$?
2066    case x$lt_status in
2067      x$lt_dlno_uscore) $1 ;;
2068      x$lt_dlneed_uscore) $2 ;;
2069      x$lt_dlunknown|x*) $3 ;;
2070    esac
2071  else :
2072    # compilation failed
2073    $3
2074  fi
2075fi
2076rm -fr conftest*
2077])# _LT_AC_TRY_DLOPEN_SELF
2078
2079
2080# AC_LIBTOOL_DLOPEN_SELF
2081# ----------------------
2082AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
2083[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
2084if test "x$enable_dlopen" != xyes; then
2085  enable_dlopen=unknown
2086  enable_dlopen_self=unknown
2087  enable_dlopen_self_static=unknown
2088else
2089  lt_cv_dlopen=no
2090  lt_cv_dlopen_libs=
2091
2092  case $host_os in
2093  beos*)
2094    lt_cv_dlopen="load_add_on"
2095    lt_cv_dlopen_libs=
2096    lt_cv_dlopen_self=yes
2097    ;;
2098
2099  mingw* | pw32*)
2100    lt_cv_dlopen="LoadLibrary"
2101    lt_cv_dlopen_libs=
2102   ;;
2103
2104  cygwin*)
2105    lt_cv_dlopen="dlopen"
2106    lt_cv_dlopen_libs=
2107   ;;
2108
2109  darwin*)
2110  # if libdl is installed we need to link against it
2111    AC_CHECK_LIB([dl], [dlopen],
2112		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2113    lt_cv_dlopen="dyld"
2114    lt_cv_dlopen_libs=
2115    lt_cv_dlopen_self=yes
2116    ])
2117   ;;
2118
2119  *)
2120    AC_CHECK_FUNC([shl_load],
2121	  [lt_cv_dlopen="shl_load"],
2122      [AC_CHECK_LIB([dld], [shl_load],
2123	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
2124	[AC_CHECK_FUNC([dlopen],
2125	      [lt_cv_dlopen="dlopen"],
2126	  [AC_CHECK_LIB([dl], [dlopen],
2127		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2128	    [AC_CHECK_LIB([svld], [dlopen],
2129		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2130	      [AC_CHECK_LIB([dld], [dld_link],
2131		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
2132	      ])
2133	    ])
2134	  ])
2135	])
2136      ])
2137    ;;
2138  esac
2139
2140  if test "x$lt_cv_dlopen" != xno; then
2141    enable_dlopen=yes
2142  else
2143    enable_dlopen=no
2144  fi
2145
2146  case $lt_cv_dlopen in
2147  dlopen)
2148    save_CPPFLAGS="$CPPFLAGS"
2149    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2150
2151    save_LDFLAGS="$LDFLAGS"
2152    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2153
2154    save_LIBS="$LIBS"
2155    LIBS="$lt_cv_dlopen_libs $LIBS"
2156
2157    AC_CACHE_CHECK([whether a program can dlopen itself],
2158	  lt_cv_dlopen_self, [dnl
2159	  _LT_AC_TRY_DLOPEN_SELF(
2160	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2161	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2162    ])
2163
2164    if test "x$lt_cv_dlopen_self" = xyes; then
2165      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2166      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2167    	  lt_cv_dlopen_self_static, [dnl
2168	  _LT_AC_TRY_DLOPEN_SELF(
2169	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2170	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
2171      ])
2172    fi
2173
2174    CPPFLAGS="$save_CPPFLAGS"
2175    LDFLAGS="$save_LDFLAGS"
2176    LIBS="$save_LIBS"
2177    ;;
2178  esac
2179
2180  case $lt_cv_dlopen_self in
2181  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2182  *) enable_dlopen_self=unknown ;;
2183  esac
2184
2185  case $lt_cv_dlopen_self_static in
2186  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2187  *) enable_dlopen_self_static=unknown ;;
2188  esac
2189fi
2190])# AC_LIBTOOL_DLOPEN_SELF
2191
2192
2193# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
2194# ---------------------------------
2195# Check to see if options -c and -o are simultaneously supported by compiler
2196AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
2197[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
2198AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2199  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2200  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2201   $rm -r conftest 2>/dev/null
2202   mkdir conftest
2203   cd conftest
2204   mkdir out
2205   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
2206
2207   lt_compiler_flag="-o out/conftest2.$ac_objext"
2208   # Insert the option either (1) after the last *FLAGS variable, or
2209   # (2) before a word containing "conftest.", or (3) at the end.
2210   # Note that $ac_compile itself does not contain backslashes and begins
2211   # with a dollar sign (not a hyphen), so the echo should work correctly.
2212   lt_compile=`echo "$ac_compile" | $SED \
2213   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2214   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2215   -e 's:$: $lt_compiler_flag:'`
2216   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2217   (eval "$lt_compile" 2>out/conftest.err)
2218   ac_status=$?
2219   cat out/conftest.err >&AS_MESSAGE_LOG_FD
2220   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2221   if (exit $ac_status) && test -s out/conftest2.$ac_objext
2222   then
2223     # The compiler can only warn and ignore the option if not recognized
2224     # So say no if there are warnings
2225     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
2226     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2227     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2228       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2229     fi
2230   fi
2231   chmod u+w . 2>&AS_MESSAGE_LOG_FD
2232   $rm conftest*
2233   # SGI C++ compiler will create directory out/ii_files/ for
2234   # template instantiation
2235   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
2236   $rm out/* && rmdir out
2237   cd ..
2238   rmdir conftest
2239   $rm conftest*
2240])
2241])# AC_LIBTOOL_PROG_CC_C_O
2242
2243
2244# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
2245# -----------------------------------------
2246# Check to see if we can do hard links to lock some files if needed
2247AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
2248[AC_REQUIRE([_LT_AC_LOCK])dnl
2249
2250hard_links="nottested"
2251if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2252  # do not overwrite the value of need_locks provided by the user
2253  AC_MSG_CHECKING([if we can lock with hard links])
2254  hard_links=yes
2255  $rm conftest*
2256  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2257  touch conftest.a
2258  ln conftest.a conftest.b 2>&5 || hard_links=no
2259  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2260  AC_MSG_RESULT([$hard_links])
2261  if test "$hard_links" = no; then
2262    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2263    need_locks=warn
2264  fi
2265else
2266  need_locks=no
2267fi
2268])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
2269
2270
2271# AC_LIBTOOL_OBJDIR
2272# -----------------
2273AC_DEFUN([AC_LIBTOOL_OBJDIR],
2274[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2275[rm -f .libs 2>/dev/null
2276mkdir .libs 2>/dev/null
2277if test -d .libs; then
2278  lt_cv_objdir=.libs
2279else
2280  # MS-DOS does not allow filenames that begin with a dot.
2281  lt_cv_objdir=_libs
2282fi
2283rmdir .libs 2>/dev/null])
2284objdir=$lt_cv_objdir
2285])# AC_LIBTOOL_OBJDIR
2286
2287
2288# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
2289# ----------------------------------------------
2290# Check hardcoding attributes.
2291AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
2292[AC_MSG_CHECKING([how to hardcode library paths into programs])
2293_LT_AC_TAGVAR(hardcode_action, $1)=
2294if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
2295   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
2296   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2297
2298  # We can hardcode non-existant directories.
2299  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
2300     # If the only mechanism to avoid hardcoding is shlibpath_var, we
2301     # have to relink, otherwise we might link with an installed library
2302     # when we should be linking with a yet-to-be-installed one
2303     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2304     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
2305    # Linking always hardcodes the temporary library directory.
2306    _LT_AC_TAGVAR(hardcode_action, $1)=relink
2307  else
2308    # We can link without hardcoding, and we can hardcode nonexisting dirs.
2309    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
2310  fi
2311else
2312  # We cannot hardcode anything, or else we can only hardcode existing
2313  # directories.
2314  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
2315fi
2316AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
2317
2318if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
2319  # Fast installation is not supported
2320  enable_fast_install=no
2321elif test "$shlibpath_overrides_runpath" = yes ||
2322     test "$enable_shared" = no; then
2323  # Fast installation is not necessary
2324  enable_fast_install=needless
2325fi
2326])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
2327
2328
2329# AC_LIBTOOL_SYS_LIB_STRIP
2330# ------------------------
2331AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
2332[striplib=
2333old_striplib=
2334AC_MSG_CHECKING([whether stripping libraries is possible])
2335if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2336  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2337  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2338  AC_MSG_RESULT([yes])
2339else
2340# FIXME - insert some real tests, host_os isn't really good enough
2341  case $host_os in
2342   darwin*)
2343       if test -n "$STRIP" ; then
2344         striplib="$STRIP -x"
2345         AC_MSG_RESULT([yes])
2346       else
2347  AC_MSG_RESULT([no])
2348fi
2349       ;;
2350   *)
2351  AC_MSG_RESULT([no])
2352    ;;
2353  esac
2354fi
2355])# AC_LIBTOOL_SYS_LIB_STRIP
2356
2357
2358# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2359# -----------------------------
2360# PORTME Fill in your ld.so characteristics
2361AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
2362[AC_MSG_CHECKING([dynamic linker characteristics])
2363library_names_spec=
2364libname_spec='lib$name'
2365soname_spec=
2366shrext_cmds=".so"
2367postinstall_cmds=
2368postuninstall_cmds=
2369finish_cmds=
2370finish_eval=
2371shlibpath_var=
2372shlibpath_overrides_runpath=unknown
2373version_type=none
2374dynamic_linker="$host_os ld.so"
2375sys_lib_dlsearch_path_spec="/lib /usr/lib"
2376if test "$GCC" = yes; then
2377  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2378  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
2379    # if the path contains ";" then we assume it to be the separator
2380    # otherwise default to the standard path separator (i.e. ":") - it is
2381    # assumed that no part of a normal pathname contains ";" but that should
2382    # okay in the real world where ";" in dirpaths is itself problematic.
2383    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2384  else
2385    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2386  fi
2387else
2388  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2389fi
2390need_lib_prefix=unknown
2391hardcode_into_libs=no
2392
2393# when you set need_version to no, make sure it does not cause -set_version
2394# flags to be left without arguments
2395need_version=unknown
2396
2397case $host_os in
2398aix3*)
2399  version_type=linux
2400  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2401  shlibpath_var=LIBPATH
2402
2403  # AIX 3 has no versioning support, so we append a major version to the name.
2404  soname_spec='${libname}${release}${shared_ext}$major'
2405  ;;
2406
2407aix4* | aix5*)
2408  version_type=linux
2409  need_lib_prefix=no
2410  need_version=no
2411  hardcode_into_libs=yes
2412  if test "$host_cpu" = ia64; then
2413    # AIX 5 supports IA64
2414    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2415    shlibpath_var=LD_LIBRARY_PATH
2416  else
2417    # With GCC up to 2.95.x, collect2 would create an import file
2418    # for dependence libraries.  The import file would start with
2419    # the line `#! .'.  This would cause the generated library to
2420    # depend on `.', always an invalid library.  This was fixed in
2421    # development snapshots of GCC prior to 3.0.
2422    case $host_os in
2423      aix4 | aix4.[[01]] | aix4.[[01]].*)
2424      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2425	   echo ' yes '
2426	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2427	:
2428      else
2429	can_build_shared=no
2430      fi
2431      ;;
2432    esac
2433    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2434    # soname into executable. Probably we can add versioning support to
2435    # collect2, so additional links can be useful in future.
2436    if test "$aix_use_runtimelinking" = yes; then
2437      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2438      # instead of lib<name>.a to let people know that these are not
2439      # typical AIX shared libraries.
2440      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2441    else
2442      # We preserve .a as extension for shared libraries through AIX4.2
2443      # and later when we are not doing run time linking.
2444      library_names_spec='${libname}${release}.a $libname.a'
2445      soname_spec='${libname}${release}${shared_ext}$major'
2446    fi
2447    shlibpath_var=LIBPATH
2448  fi
2449  ;;
2450
2451amigaos*)
2452  library_names_spec='$libname.ixlibrary $libname.a'
2453  # Create ${libname}_ixlibrary.a entries in /sys/libs.
2454  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'
2455  ;;
2456
2457beos*)
2458  library_names_spec='${libname}${shared_ext}'
2459  dynamic_linker="$host_os ld.so"
2460  shlibpath_var=LIBRARY_PATH
2461  ;;
2462
2463bsdi[[45]]*)
2464  version_type=linux
2465  need_version=no
2466  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2467  soname_spec='${libname}${release}${shared_ext}$major'
2468  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2469  shlibpath_var=LD_LIBRARY_PATH
2470  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2471  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2472  # the default ld.so.conf also contains /usr/contrib/lib and
2473  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2474  # libtool to hard-code these into programs
2475  ;;
2476
2477cygwin* | mingw* | pw32*)
2478  version_type=windows
2479  shrext_cmds=".dll"
2480  need_version=no
2481  need_lib_prefix=no
2482
2483  case $GCC,$host_os in
2484  yes,cygwin* | yes,mingw* | yes,pw32*)
2485    library_names_spec='$libname.dll.a'
2486    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2487    postinstall_cmds='base_file=`basename \${file}`~
2488      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
2489      dldir=$destdir/`dirname \$dlpath`~
2490      test -d \$dldir || mkdir -p \$dldir~
2491      $install_prog $dir/$dlname \$dldir/$dlname~
2492      chmod a+x \$dldir/$dlname'
2493    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2494      dlpath=$dir/\$dldll~
2495       $rm \$dlpath'
2496    shlibpath_overrides_runpath=yes
2497
2498    case $host_os in
2499    cygwin*)
2500      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2501      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2502      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2503      ;;
2504    mingw*)
2505      # MinGW DLLs use traditional 'lib' prefix
2506      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2507      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2508      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
2509        # It is most probably a Windows format PATH printed by
2510        # mingw gcc, but we are running on Cygwin. Gcc prints its search
2511        # path with ; separators, and with drive letters. We can handle the
2512        # drive letters (cygwin fileutils understands them), so leave them,
2513        # especially as we might pass files found there to a mingw objdump,
2514        # which wouldn't understand a cygwinified path. Ahh.
2515        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2516      else
2517        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2518      fi
2519      ;;
2520    pw32*)
2521      # pw32 DLLs use 'pw' prefix rather than 'lib'
2522      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2523      ;;
2524    esac
2525    ;;
2526
2527  *)
2528    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2529    ;;
2530  esac
2531  dynamic_linker='Win32 ld.exe'
2532  # FIXME: first we should search . and the directory the executable is in
2533  shlibpath_var=PATH
2534  ;;
2535
2536darwin* | rhapsody*)
2537  dynamic_linker="$host_os dyld"
2538  version_type=darwin
2539  need_lib_prefix=no
2540  need_version=no
2541  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2542  soname_spec='${libname}${release}${major}$shared_ext'
2543  shlibpath_overrides_runpath=yes
2544  shlibpath_var=DYLD_LIBRARY_PATH
2545  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2546  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
2547  if test "$GCC" = yes; then
2548    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
2549  else
2550    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
2551  fi
2552  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2553  ;;
2554
2555dgux*)
2556  version_type=linux
2557  need_lib_prefix=no
2558  need_version=no
2559  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2560  soname_spec='${libname}${release}${shared_ext}$major'
2561  shlibpath_var=LD_LIBRARY_PATH
2562  ;;
2563
2564freebsd1*)
2565  dynamic_linker=no
2566  ;;
2567
2568kfreebsd*-gnu)
2569  version_type=linux
2570  need_lib_prefix=no
2571  need_version=no
2572  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2573  soname_spec='${libname}${release}${shared_ext}$major'
2574  shlibpath_var=LD_LIBRARY_PATH
2575  shlibpath_overrides_runpath=no
2576  hardcode_into_libs=yes
2577  dynamic_linker='GNU ld.so'
2578  ;;
2579
2580freebsd* | dragonfly*)
2581  # DragonFly does not have aout.  When/if they implement a new
2582  # versioning mechanism, adjust this.
2583  if test -x /usr/bin/objformat; then
2584    objformat=`/usr/bin/objformat`
2585  else
2586    case $host_os in
2587    freebsd[[123]]*) objformat=aout ;;
2588    *) objformat=elf ;;
2589    esac
2590  fi
2591  version_type=freebsd-$objformat
2592  case $version_type in
2593    freebsd-elf*)
2594      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2595      need_version=no
2596      need_lib_prefix=no
2597      ;;
2598    freebsd-*)
2599      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2600      need_version=yes
2601      ;;
2602  esac
2603  shlibpath_var=LD_LIBRARY_PATH
2604  case $host_os in
2605  freebsd2*)
2606    shlibpath_overrides_runpath=yes
2607    ;;
2608  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2609    shlibpath_overrides_runpath=yes
2610    hardcode_into_libs=yes
2611    ;;
2612  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2613  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2614    shlibpath_overrides_runpath=no
2615    hardcode_into_libs=yes
2616    ;;
2617  freebsd*) # from 4.6 on
2618    shlibpath_overrides_runpath=yes
2619    hardcode_into_libs=yes
2620    ;;
2621  esac
2622  ;;
2623
2624gnu*)
2625  version_type=linux
2626  need_lib_prefix=no
2627  need_version=no
2628  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2629  soname_spec='${libname}${release}${shared_ext}$major'
2630  shlibpath_var=LD_LIBRARY_PATH
2631  hardcode_into_libs=yes
2632  ;;
2633
2634hpux9* | hpux10* | hpux11*)
2635  # Give a soname corresponding to the major version so that dld.sl refuses to
2636  # link against other versions.
2637  version_type=sunos
2638  need_lib_prefix=no
2639  need_version=no
2640  case $host_cpu in
2641  ia64*)
2642    shrext_cmds='.so'
2643    hardcode_into_libs=yes
2644    dynamic_linker="$host_os dld.so"
2645    shlibpath_var=LD_LIBRARY_PATH
2646    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2647    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2648    soname_spec='${libname}${release}${shared_ext}$major'
2649    if test "X$HPUX_IA64_MODE" = X32; then
2650      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2651    else
2652      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2653    fi
2654    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2655    ;;
2656   hppa*64*)
2657     shrext_cmds='.sl'
2658     hardcode_into_libs=yes
2659     dynamic_linker="$host_os dld.sl"
2660     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2661     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2662     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2663     soname_spec='${libname}${release}${shared_ext}$major'
2664     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2665     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2666     ;;
2667   *)
2668    shrext_cmds='.sl'
2669    dynamic_linker="$host_os dld.sl"
2670    shlibpath_var=SHLIB_PATH
2671    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2672    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2673    soname_spec='${libname}${release}${shared_ext}$major'
2674    ;;
2675  esac
2676  # HP-UX runs *really* slowly unless shared libraries are mode 555.
2677  postinstall_cmds='chmod 555 $lib'
2678  ;;
2679
2680interix3*)
2681  version_type=linux
2682  need_lib_prefix=no
2683  need_version=no
2684  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2685  soname_spec='${libname}${release}${shared_ext}$major'
2686  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2687  shlibpath_var=LD_LIBRARY_PATH
2688  shlibpath_overrides_runpath=no
2689  hardcode_into_libs=yes
2690  ;;
2691
2692irix5* | irix6* | nonstopux*)
2693  case $host_os in
2694    nonstopux*) version_type=nonstopux ;;
2695    *)
2696	if test "$lt_cv_prog_gnu_ld" = yes; then
2697		version_type=linux
2698	else
2699		version_type=irix
2700	fi ;;
2701  esac
2702  need_lib_prefix=no
2703  need_version=no
2704  soname_spec='${libname}${release}${shared_ext}$major'
2705  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2706  case $host_os in
2707  irix5* | nonstopux*)
2708    libsuff= shlibsuff=
2709    ;;
2710  *)
2711    case $LD in # libtool.m4 will add one of these switches to LD
2712    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2713      libsuff= shlibsuff= libmagic=32-bit;;
2714    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2715      libsuff=32 shlibsuff=N32 libmagic=N32;;
2716    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2717      libsuff=64 shlibsuff=64 libmagic=64-bit;;
2718    *) libsuff= shlibsuff= libmagic=never-match;;
2719    esac
2720    ;;
2721  esac
2722  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2723  shlibpath_overrides_runpath=no
2724  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2725  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2726  hardcode_into_libs=yes
2727  ;;
2728
2729# No shared lib support for Linux oldld, aout, or coff.
2730linux*oldld* | linux*aout* | linux*coff*)
2731  dynamic_linker=no
2732  ;;
2733
2734# This must be Linux ELF.
2735linux*)
2736  version_type=linux
2737  need_lib_prefix=no
2738  need_version=no
2739  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2740  soname_spec='${libname}${release}${shared_ext}$major'
2741  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2742  shlibpath_var=LD_LIBRARY_PATH
2743  shlibpath_overrides_runpath=no
2744  # This implies no fast_install, which is unacceptable.
2745  # Some rework will be needed to allow for fast_install
2746  # before this can be enabled.
2747  hardcode_into_libs=yes
2748
2749  # Append ld.so.conf contents to the search path
2750  if test -f /etc/ld.so.conf; then
2751    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
2752    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2753  fi
2754
2755  # We used to test for /lib/ld.so.1 and disable shared libraries on
2756  # powerpc, because MkLinux only supported shared libraries with the
2757  # GNU dynamic linker.  Since this was broken with cross compilers,
2758  # most powerpc-linux boxes support dynamic linking these days and
2759  # people can always --disable-shared, the test was removed, and we
2760  # assume the GNU/Linux dynamic linker is in use.
2761  dynamic_linker='GNU/Linux ld.so'
2762  ;;
2763
2764knetbsd*-gnu)
2765  version_type=linux
2766  need_lib_prefix=no
2767  need_version=no
2768  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2769  soname_spec='${libname}${release}${shared_ext}$major'
2770  shlibpath_var=LD_LIBRARY_PATH
2771  shlibpath_overrides_runpath=no
2772  hardcode_into_libs=yes
2773  dynamic_linker='GNU ld.so'
2774  ;;
2775
2776netbsd*)
2777  version_type=sunos
2778  need_lib_prefix=no
2779  need_version=no
2780  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2781    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2782    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2783    dynamic_linker='NetBSD (a.out) ld.so'
2784  else
2785    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2786    soname_spec='${libname}${release}${shared_ext}$major'
2787    dynamic_linker='NetBSD ld.elf_so'
2788  fi
2789  shlibpath_var=LD_LIBRARY_PATH
2790  shlibpath_overrides_runpath=yes
2791  hardcode_into_libs=yes
2792  ;;
2793
2794newsos6)
2795  version_type=linux
2796  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2797  shlibpath_var=LD_LIBRARY_PATH
2798  shlibpath_overrides_runpath=yes
2799  ;;
2800
2801nto-qnx*)
2802  version_type=linux
2803  need_lib_prefix=no
2804  need_version=no
2805  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2806  soname_spec='${libname}${release}${shared_ext}$major'
2807  shlibpath_var=LD_LIBRARY_PATH
2808  shlibpath_overrides_runpath=yes
2809  ;;
2810
2811openbsd*)
2812  version_type=sunos
2813  sys_lib_dlsearch_path_spec="/usr/lib"
2814  need_lib_prefix=no
2815  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2816  case $host_os in
2817    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2818    *)                         need_version=no  ;;
2819  esac
2820  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2821  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2822  shlibpath_var=LD_LIBRARY_PATH
2823  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2824    case $host_os in
2825      openbsd2.[[89]] | openbsd2.[[89]].*)
2826	shlibpath_overrides_runpath=no
2827	;;
2828      *)
2829	shlibpath_overrides_runpath=yes
2830	;;
2831      esac
2832  else
2833    shlibpath_overrides_runpath=yes
2834  fi
2835  ;;
2836
2837os2*)
2838  libname_spec='$name'
2839  shrext_cmds=".dll"
2840  need_lib_prefix=no
2841  library_names_spec='$libname${shared_ext} $libname.a'
2842  dynamic_linker='OS/2 ld.exe'
2843  shlibpath_var=LIBPATH
2844  ;;
2845
2846osf3* | osf4* | osf5*)
2847  version_type=osf
2848  need_lib_prefix=no
2849  need_version=no
2850  soname_spec='${libname}${release}${shared_ext}$major'
2851  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2852  shlibpath_var=LD_LIBRARY_PATH
2853  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2854  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2855  ;;
2856
2857solaris*)
2858  version_type=linux
2859  need_lib_prefix=no
2860  need_version=no
2861  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2862  soname_spec='${libname}${release}${shared_ext}$major'
2863  shlibpath_var=LD_LIBRARY_PATH
2864  shlibpath_overrides_runpath=yes
2865  hardcode_into_libs=yes
2866  # ldd complains unless libraries are executable
2867  postinstall_cmds='chmod +x $lib'
2868  ;;
2869
2870sunos4*)
2871  version_type=sunos
2872  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2873  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2874  shlibpath_var=LD_LIBRARY_PATH
2875  shlibpath_overrides_runpath=yes
2876  if test "$with_gnu_ld" = yes; then
2877    need_lib_prefix=no
2878  fi
2879  need_version=yes
2880  ;;
2881
2882sysv4 | sysv4.3*)
2883  version_type=linux
2884  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2885  soname_spec='${libname}${release}${shared_ext}$major'
2886  shlibpath_var=LD_LIBRARY_PATH
2887  case $host_vendor in
2888    sni)
2889      shlibpath_overrides_runpath=no
2890      need_lib_prefix=no
2891      export_dynamic_flag_spec='${wl}-Blargedynsym'
2892      runpath_var=LD_RUN_PATH
2893      ;;
2894    siemens)
2895      need_lib_prefix=no
2896      ;;
2897    motorola)
2898      need_lib_prefix=no
2899      need_version=no
2900      shlibpath_overrides_runpath=no
2901      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2902      ;;
2903  esac
2904  ;;
2905
2906sysv4*MP*)
2907  if test -d /usr/nec ;then
2908    version_type=linux
2909    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2910    soname_spec='$libname${shared_ext}.$major'
2911    shlibpath_var=LD_LIBRARY_PATH
2912  fi
2913  ;;
2914
2915sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2916  version_type=freebsd-elf
2917  need_lib_prefix=no
2918  need_version=no
2919  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2920  soname_spec='${libname}${release}${shared_ext}$major'
2921  shlibpath_var=LD_LIBRARY_PATH
2922  hardcode_into_libs=yes
2923  if test "$with_gnu_ld" = yes; then
2924    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2925    shlibpath_overrides_runpath=no
2926  else
2927    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2928    shlibpath_overrides_runpath=yes
2929    case $host_os in
2930      sco3.2v5*)
2931        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2932	;;
2933    esac
2934  fi
2935  sys_lib_dlsearch_path_spec='/usr/lib'
2936  ;;
2937
2938uts4*)
2939  version_type=linux
2940  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2941  soname_spec='${libname}${release}${shared_ext}$major'
2942  shlibpath_var=LD_LIBRARY_PATH
2943  ;;
2944
2945*)
2946  dynamic_linker=no
2947  ;;
2948esac
2949AC_MSG_RESULT([$dynamic_linker])
2950test "$dynamic_linker" = no && can_build_shared=no
2951
2952variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2953if test "$GCC" = yes; then
2954  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2955fi
2956])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2957
2958
2959# _LT_AC_TAGCONFIG
2960# ----------------
2961AC_DEFUN([_LT_AC_TAGCONFIG],
2962[AC_ARG_WITH([tags],
2963    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
2964        [include additional configurations @<:@automatic@:>@])],
2965    [tagnames="$withval"])
2966
2967if test -f "$ltmain" && test -n "$tagnames"; then
2968  if test ! -f "${ofile}"; then
2969    AC_MSG_WARN([output file `$ofile' does not exist])
2970  fi
2971
2972  if test -z "$LTCC"; then
2973    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
2974    if test -z "$LTCC"; then
2975      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
2976    else
2977      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
2978    fi
2979  fi
2980  if test -z "$LTCFLAGS"; then
2981    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
2982  fi
2983
2984  # Extract list of available tagged configurations in $ofile.
2985  # Note that this assumes the entire list is on one line.
2986  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
2987
2988  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2989  for tagname in $tagnames; do
2990    IFS="$lt_save_ifs"
2991    # Check whether tagname contains only valid characters
2992    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
2993    "") ;;
2994    *)  AC_MSG_ERROR([invalid tag name: $tagname])
2995	;;
2996    esac
2997
2998    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
2999    then
3000      AC_MSG_ERROR([tag name \"$tagname\" already exists])
3001    fi
3002
3003    # Update the list of available tags.
3004    if test -n "$tagname"; then
3005      echo appending configuration tag \"$tagname\" to $ofile
3006
3007      case $tagname in
3008      CXX)
3009	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
3010	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
3011	    (test "X$CXX" != "Xg++"))) ; then
3012	  AC_LIBTOOL_LANG_CXX_CONFIG
3013	else
3014	  tagname=""
3015	fi
3016	;;
3017
3018      F77)
3019	if test -n "$F77" && test "X$F77" != "Xno"; then
3020	  AC_LIBTOOL_LANG_F77_CONFIG
3021	else
3022	  tagname=""
3023	fi
3024	;;
3025
3026      GCJ)
3027	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
3028	  AC_LIBTOOL_LANG_GCJ_CONFIG
3029	else
3030	  tagname=""
3031	fi
3032	;;
3033
3034      RC)
3035	AC_LIBTOOL_LANG_RC_CONFIG
3036	;;
3037
3038      *)
3039	AC_MSG_ERROR([Unsupported tag name: $tagname])
3040	;;
3041      esac
3042
3043      # Append the new tag name to the list of available tags.
3044      if test -n "$tagname" ; then
3045      available_tags="$available_tags $tagname"
3046    fi
3047    fi
3048  done
3049  IFS="$lt_save_ifs"
3050
3051  # Now substitute the updated list of available tags.
3052  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
3053    mv "${ofile}T" "$ofile"
3054    chmod +x "$ofile"
3055  else
3056    rm -f "${ofile}T"
3057    AC_MSG_ERROR([unable to update list of available tagged configurations.])
3058  fi
3059fi
3060])# _LT_AC_TAGCONFIG
3061
3062
3063# AC_LIBTOOL_DLOPEN
3064# -----------------
3065# enable checks for dlopen support
3066AC_DEFUN([AC_LIBTOOL_DLOPEN],
3067 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
3068])# AC_LIBTOOL_DLOPEN
3069
3070
3071# AC_LIBTOOL_WIN32_DLL
3072# --------------------
3073# declare package support for building win32 DLLs
3074AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
3075[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
3076])# AC_LIBTOOL_WIN32_DLL
3077
3078
3079# AC_ENABLE_SHARED([DEFAULT])
3080# ---------------------------
3081# implement the --enable-shared flag
3082# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
3083AC_DEFUN([AC_ENABLE_SHARED],
3084[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3085AC_ARG_ENABLE([shared],
3086    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
3087	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
3088    [p=${PACKAGE-default}
3089    case $enableval in
3090    yes) enable_shared=yes ;;
3091    no) enable_shared=no ;;
3092    *)
3093      enable_shared=no
3094      # Look at the argument we got.  We use all the common list separators.
3095      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3096      for pkg in $enableval; do
3097	IFS="$lt_save_ifs"
3098	if test "X$pkg" = "X$p"; then
3099	  enable_shared=yes
3100	fi
3101      done
3102      IFS="$lt_save_ifs"
3103      ;;
3104    esac],
3105    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
3106])# AC_ENABLE_SHARED
3107
3108
3109# AC_DISABLE_SHARED
3110# -----------------
3111# set the default shared flag to --disable-shared
3112AC_DEFUN([AC_DISABLE_SHARED],
3113[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3114AC_ENABLE_SHARED(no)
3115])# AC_DISABLE_SHARED
3116
3117
3118# AC_ENABLE_STATIC([DEFAULT])
3119# ---------------------------
3120# implement the --enable-static flag
3121# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
3122AC_DEFUN([AC_ENABLE_STATIC],
3123[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3124AC_ARG_ENABLE([static],
3125    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
3126	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
3127    [p=${PACKAGE-default}
3128    case $enableval in
3129    yes) enable_static=yes ;;
3130    no) enable_static=no ;;
3131    *)
3132     enable_static=no
3133      # Look at the argument we got.  We use all the common list separators.
3134      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3135      for pkg in $enableval; do
3136	IFS="$lt_save_ifs"
3137	if test "X$pkg" = "X$p"; then
3138	  enable_static=yes
3139	fi
3140      done
3141      IFS="$lt_save_ifs"
3142      ;;
3143    esac],
3144    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
3145])# AC_ENABLE_STATIC
3146
3147
3148# AC_DISABLE_STATIC
3149# -----------------
3150# set the default static flag to --disable-static
3151AC_DEFUN([AC_DISABLE_STATIC],
3152[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3153AC_ENABLE_STATIC(no)
3154])# AC_DISABLE_STATIC
3155
3156
3157# AC_ENABLE_FAST_INSTALL([DEFAULT])
3158# ---------------------------------
3159# implement the --enable-fast-install flag
3160# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
3161AC_DEFUN([AC_ENABLE_FAST_INSTALL],
3162[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3163AC_ARG_ENABLE([fast-install],
3164    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
3165    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
3166    [p=${PACKAGE-default}
3167    case $enableval in
3168    yes) enable_fast_install=yes ;;
3169    no) enable_fast_install=no ;;
3170    *)
3171      enable_fast_install=no
3172      # Look at the argument we got.  We use all the common list separators.
3173      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3174      for pkg in $enableval; do
3175	IFS="$lt_save_ifs"
3176	if test "X$pkg" = "X$p"; then
3177	  enable_fast_install=yes
3178	fi
3179      done
3180      IFS="$lt_save_ifs"
3181      ;;
3182    esac],
3183    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
3184])# AC_ENABLE_FAST_INSTALL
3185
3186
3187# AC_DISABLE_FAST_INSTALL
3188# -----------------------
3189# set the default to --disable-fast-install
3190AC_DEFUN([AC_DISABLE_FAST_INSTALL],
3191[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3192AC_ENABLE_FAST_INSTALL(no)
3193])# AC_DISABLE_FAST_INSTALL
3194
3195
3196# AC_LIBTOOL_PICMODE([MODE])
3197# --------------------------
3198# implement the --with-pic flag
3199# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
3200AC_DEFUN([AC_LIBTOOL_PICMODE],
3201[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3202pic_mode=ifelse($#,1,$1,default)
3203])# AC_LIBTOOL_PICMODE
3204
3205
3206# AC_PROG_EGREP
3207# -------------
3208# This is predefined starting with Autoconf 2.54, so this conditional
3209# definition can be removed once we require Autoconf 2.54 or later.
3210m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
3211[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
3212   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3213    then ac_cv_prog_egrep='grep -E'
3214    else ac_cv_prog_egrep='egrep'
3215    fi])
3216 EGREP=$ac_cv_prog_egrep
3217 AC_SUBST([EGREP])
3218])])
3219
3220
3221# AC_PATH_TOOL_PREFIX
3222# -------------------
3223# find a file program which can recognise shared library
3224AC_DEFUN([AC_PATH_TOOL_PREFIX],
3225[AC_REQUIRE([AC_PROG_EGREP])dnl
3226AC_MSG_CHECKING([for $1])
3227AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3228[case $MAGIC_CMD in
3229[[\\/*] |  ?:[\\/]*])
3230  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3231  ;;
3232*)
3233  lt_save_MAGIC_CMD="$MAGIC_CMD"
3234  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3235dnl $ac_dummy forces splitting on constant user-supplied paths.
3236dnl POSIX.2 word splitting is done only on the output of word expansions,
3237dnl not every word.  This closes a longstanding sh security hole.
3238  ac_dummy="ifelse([$2], , $PATH, [$2])"
3239  for ac_dir in $ac_dummy; do
3240    IFS="$lt_save_ifs"
3241    test -z "$ac_dir" && ac_dir=.
3242    if test -f $ac_dir/$1; then
3243      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3244      if test -n "$file_magic_test_file"; then
3245	case $deplibs_check_method in
3246	"file_magic "*)
3247	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3248	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3249	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3250	    $EGREP "$file_magic_regex" > /dev/null; then
3251	    :
3252	  else
3253	    cat <<EOF 1>&2
3254
3255*** Warning: the command libtool uses to detect shared libraries,
3256*** $file_magic_cmd, produces output that libtool cannot recognize.
3257*** The result is that libtool may fail to recognize shared libraries
3258*** as such.  This will affect the creation of libtool libraries that
3259*** depend on shared libraries, but programs linked with such libtool
3260*** libraries will work regardless of this problem.  Nevertheless, you
3261*** may want to report the problem to your system manager and/or to
3262*** bug-libtool@gnu.org
3263
3264EOF
3265	  fi ;;
3266	esac
3267      fi
3268      break
3269    fi
3270  done
3271  IFS="$lt_save_ifs"
3272  MAGIC_CMD="$lt_save_MAGIC_CMD"
3273  ;;
3274esac])
3275MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3276if test -n "$MAGIC_CMD"; then
3277  AC_MSG_RESULT($MAGIC_CMD)
3278else
3279  AC_MSG_RESULT(no)
3280fi
3281])# AC_PATH_TOOL_PREFIX
3282
3283
3284# AC_PATH_MAGIC
3285# -------------
3286# find a file program which can recognise a shared library
3287AC_DEFUN([AC_PATH_MAGIC],
3288[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3289if test -z "$lt_cv_path_MAGIC_CMD"; then
3290  if test -n "$ac_tool_prefix"; then
3291    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3292  else
3293    MAGIC_CMD=:
3294  fi
3295fi
3296])# AC_PATH_MAGIC
3297
3298
3299# AC_PROG_LD
3300# ----------
3301# find the pathname to the GNU or non-GNU linker
3302AC_DEFUN([AC_PROG_LD],
3303[AC_ARG_WITH([gnu-ld],
3304    [AC_HELP_STRING([--with-gnu-ld],
3305	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
3306    [test "$withval" = no || with_gnu_ld=yes],
3307    [with_gnu_ld=no])
3308AC_REQUIRE([LT_AC_PROG_SED])dnl
3309AC_REQUIRE([AC_PROG_CC])dnl
3310AC_REQUIRE([AC_CANONICAL_HOST])dnl
3311AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3312ac_prog=ld
3313if test "$GCC" = yes; then
3314  # Check if gcc -print-prog-name=ld gives a path.
3315  AC_MSG_CHECKING([for ld used by $CC])
3316  case $host in
3317  *-*-mingw*)
3318    # gcc leaves a trailing carriage return which upsets mingw
3319    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3320  *)
3321    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3322  esac
3323  case $ac_prog in
3324    # Accept absolute paths.
3325    [[\\/]]* | ?:[[\\/]]*)
3326      re_direlt='/[[^/]][[^/]]*/\.\./'
3327      # Canonicalize the pathname of ld
3328      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
3329      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3330	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
3331      done
3332      test -z "$LD" && LD="$ac_prog"
3333      ;;
3334  "")
3335    # If it fails, then pretend we aren't using GCC.
3336    ac_prog=ld
3337    ;;
3338  *)
3339    # If it is relative, then search for the first ld in PATH.
3340    with_gnu_ld=unknown
3341    ;;
3342  esac
3343elif test "$with_gnu_ld" = yes; then
3344  AC_MSG_CHECKING([for GNU ld])
3345else
3346  AC_MSG_CHECKING([for non-GNU ld])
3347fi
3348AC_CACHE_VAL(lt_cv_path_LD,
3349[if test -z "$LD"; then
3350  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3351  for ac_dir in $PATH; do
3352    IFS="$lt_save_ifs"
3353    test -z "$ac_dir" && ac_dir=.
3354    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3355      lt_cv_path_LD="$ac_dir/$ac_prog"
3356      # Check to see if the program is GNU ld.  I'd rather use --version,
3357      # but apparently some variants of GNU ld only accept -v.
3358      # Break only if it was the GNU/non-GNU ld that we prefer.
3359      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3360      *GNU* | *'with BFD'*)
3361	test "$with_gnu_ld" != no && break
3362	;;
3363      *)
3364	test "$with_gnu_ld" != yes && break
3365	;;
3366      esac
3367    fi
3368  done
3369  IFS="$lt_save_ifs"
3370else
3371  lt_cv_path_LD="$LD" # Let the user override the test with a path.
3372fi])
3373LD="$lt_cv_path_LD"
3374if test -n "$LD"; then
3375  AC_MSG_RESULT($LD)
3376else
3377  AC_MSG_RESULT(no)
3378fi
3379test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3380AC_PROG_LD_GNU
3381])# AC_PROG_LD
3382
3383
3384# AC_PROG_LD_GNU
3385# --------------
3386AC_DEFUN([AC_PROG_LD_GNU],
3387[AC_REQUIRE([AC_PROG_EGREP])dnl
3388AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3389[# I'd rather use --version here, but apparently some GNU lds only accept -v.
3390case `$LD -v 2>&1 </dev/null` in
3391*GNU* | *'with BFD'*)
3392  lt_cv_prog_gnu_ld=yes
3393  ;;
3394*)
3395  lt_cv_prog_gnu_ld=no
3396  ;;
3397esac])
3398with_gnu_ld=$lt_cv_prog_gnu_ld
3399])# AC_PROG_LD_GNU
3400
3401
3402# AC_PROG_LD_RELOAD_FLAG
3403# ----------------------
3404# find reload flag for linker
3405#   -- PORTME Some linkers may need a different reload flag.
3406AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3407[AC_CACHE_CHECK([for $LD option to reload object files],
3408  lt_cv_ld_reload_flag,
3409  [lt_cv_ld_reload_flag='-r'])
3410reload_flag=$lt_cv_ld_reload_flag
3411case $reload_flag in
3412"" | " "*) ;;
3413*) reload_flag=" $reload_flag" ;;
3414esac
3415reload_cmds='$LD$reload_flag -o $output$reload_objs'
3416case $host_os in
3417  darwin*)
3418    if test "$GCC" = yes; then
3419      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3420    else
3421      reload_cmds='$LD$reload_flag -o $output$reload_objs'
3422    fi
3423    ;;
3424esac
3425])# AC_PROG_LD_RELOAD_FLAG
3426
3427
3428# AC_DEPLIBS_CHECK_METHOD
3429# -----------------------
3430# how to check for library dependencies
3431#  -- PORTME fill in with the dynamic library characteristics
3432AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3433[AC_CACHE_CHECK([how to recognise dependent libraries],
3434lt_cv_deplibs_check_method,
3435[lt_cv_file_magic_cmd='$MAGIC_CMD'
3436lt_cv_file_magic_test_file=
3437lt_cv_deplibs_check_method='unknown'
3438# Need to set the preceding variable on all platforms that support
3439# interlibrary dependencies.
3440# 'none' -- dependencies not supported.
3441# `unknown' -- same as none, but documents that we really don't know.
3442# 'pass_all' -- all dependencies passed with no checks.
3443# 'test_compile' -- check by making test program.
3444# 'file_magic [[regex]]' -- check by looking for files in library path
3445# which responds to the $file_magic_cmd with a given extended regex.
3446# If you have `file' or equivalent on your system and you're not sure
3447# whether `pass_all' will *always* work, you probably want this one.
3448
3449case $host_os in
3450aix4* | aix5*)
3451  lt_cv_deplibs_check_method=pass_all
3452  ;;
3453
3454beos*)
3455  lt_cv_deplibs_check_method=pass_all
3456  ;;
3457
3458bsdi[[45]]*)
3459  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3460  lt_cv_file_magic_cmd='/usr/bin/file -L'
3461  lt_cv_file_magic_test_file=/shlib/libc.so
3462  ;;
3463
3464cygwin*)
3465  # func_win32_libid is a shell function defined in ltmain.sh
3466  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3467  lt_cv_file_magic_cmd='func_win32_libid'
3468  ;;
3469
3470mingw* | pw32*)
3471  # Base MSYS/MinGW do not provide the 'file' command needed by
3472  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
3473  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3474  lt_cv_file_magic_cmd='$OBJDUMP -f'
3475  ;;
3476
3477darwin* | rhapsody*)
3478  lt_cv_deplibs_check_method=pass_all
3479  ;;
3480
3481freebsd* | kfreebsd*-gnu | dragonfly*)
3482  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3483    case $host_cpu in
3484    i*86 )
3485      # Not sure whether the presence of OpenBSD here was a mistake.
3486      # Let's accept both of them until this is cleared up.
3487      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3488      lt_cv_file_magic_cmd=/usr/bin/file
3489      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3490      ;;
3491    esac
3492  else
3493    lt_cv_deplibs_check_method=pass_all
3494  fi
3495  ;;
3496
3497gnu*)
3498  lt_cv_deplibs_check_method=pass_all
3499  ;;
3500
3501hpux10.20* | hpux11*)
3502  lt_cv_file_magic_cmd=/usr/bin/file
3503  case $host_cpu in
3504  ia64*)
3505    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3506    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3507    ;;
3508  hppa*64*)
3509    [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]']
3510    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3511    ;;
3512  *)
3513    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3514    lt_cv_file_magic_test_file=/usr/lib/libc.sl
3515    ;;
3516  esac
3517  ;;
3518
3519interix3*)
3520  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3521  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3522  ;;
3523
3524irix5* | irix6* | nonstopux*)
3525  case $LD in
3526  *-32|*"-32 ") libmagic=32-bit;;
3527  *-n32|*"-n32 ") libmagic=N32;;
3528  *-64|*"-64 ") libmagic=64-bit;;
3529  *) libmagic=never-match;;
3530  esac
3531  lt_cv_deplibs_check_method=pass_all
3532  ;;
3533
3534# This must be Linux ELF.
3535linux*)
3536  lt_cv_deplibs_check_method=pass_all
3537  ;;
3538
3539netbsd*)
3540  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3541    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3542  else
3543    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3544  fi
3545  ;;
3546
3547newos6*)
3548  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3549  lt_cv_file_magic_cmd=/usr/bin/file
3550  lt_cv_file_magic_test_file=/usr/lib/libnls.so
3551  ;;
3552
3553nto-qnx*)
3554  lt_cv_deplibs_check_method=unknown
3555  ;;
3556
3557openbsd*)
3558  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3559    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3560  else
3561    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3562  fi
3563  ;;
3564
3565osf3* | osf4* | osf5*)
3566  lt_cv_deplibs_check_method=pass_all
3567  ;;
3568
3569solaris*)
3570  lt_cv_deplibs_check_method=pass_all
3571  ;;
3572
3573sysv4 | sysv4.3*)
3574  case $host_vendor in
3575  motorola)
3576    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]]'
3577    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3578    ;;
3579  ncr)
3580    lt_cv_deplibs_check_method=pass_all
3581    ;;
3582  sequent)
3583    lt_cv_file_magic_cmd='/bin/file'
3584    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3585    ;;
3586  sni)
3587    lt_cv_file_magic_cmd='/bin/file'
3588    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3589    lt_cv_file_magic_test_file=/lib/libc.so
3590    ;;
3591  siemens)
3592    lt_cv_deplibs_check_method=pass_all
3593    ;;
3594  pc)
3595    lt_cv_deplibs_check_method=pass_all
3596    ;;
3597  esac
3598  ;;
3599
3600sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3601  lt_cv_deplibs_check_method=pass_all
3602  ;;
3603esac
3604])
3605file_magic_cmd=$lt_cv_file_magic_cmd
3606deplibs_check_method=$lt_cv_deplibs_check_method
3607test -z "$deplibs_check_method" && deplibs_check_method=unknown
3608])# AC_DEPLIBS_CHECK_METHOD
3609
3610
3611# AC_PROG_NM
3612# ----------
3613# find the pathname to a BSD-compatible name lister
3614AC_DEFUN([AC_PROG_NM],
3615[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
3616[if test -n "$NM"; then
3617  # Let the user override the test.
3618  lt_cv_path_NM="$NM"
3619else
3620  lt_nm_to_check="${ac_tool_prefix}nm"
3621  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 
3622    lt_nm_to_check="$lt_nm_to_check nm"
3623  fi
3624  for lt_tmp_nm in $lt_nm_to_check; do
3625    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3626    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3627      IFS="$lt_save_ifs"
3628      test -z "$ac_dir" && ac_dir=.
3629      tmp_nm="$ac_dir/$lt_tmp_nm"
3630      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3631	# Check to see if the nm accepts a BSD-compat flag.
3632	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
3633	#   nm: unknown option "B" ignored
3634	# Tru64's nm complains that /dev/null is an invalid object file
3635	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3636	*/dev/null* | *'Invalid file or object type'*)
3637	  lt_cv_path_NM="$tmp_nm -B"
3638	  break
3639	  ;;
3640	*)
3641	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3642	  */dev/null*)
3643	    lt_cv_path_NM="$tmp_nm -p"
3644	    break
3645	    ;;
3646	  *)
3647	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3648	    continue # so that we can try to find one that supports BSD flags
3649	    ;;
3650	  esac
3651	  ;;
3652	esac
3653      fi
3654    done
3655    IFS="$lt_save_ifs"
3656  done
3657  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3658fi])
3659NM="$lt_cv_path_NM"
3660])# AC_PROG_NM
3661
3662
3663# AC_CHECK_LIBM
3664# -------------
3665# check for math library
3666AC_DEFUN([AC_CHECK_LIBM],
3667[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3668LIBM=
3669case $host in
3670*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3671  # These system don't have libm, or don't need it
3672  ;;
3673*-ncr-sysv4.3*)
3674  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3675  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3676  ;;
3677*)
3678  AC_CHECK_LIB(m, cos, LIBM="-lm")
3679  ;;
3680esac
3681])# AC_CHECK_LIBM
3682
3683
3684# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
3685# -----------------------------------
3686# sets LIBLTDL to the link flags for the libltdl convenience library and
3687# LTDLINCL to the include flags for the libltdl header and adds
3688# --enable-ltdl-convenience to the configure arguments.  Note that
3689# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
3690# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
3691# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
3692# (note the single quotes!).  If your package is not flat and you're not
3693# using automake, define top_builddir and top_srcdir appropriately in
3694# the Makefiles.
3695AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3696[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3697  case $enable_ltdl_convenience in
3698  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3699  "") enable_ltdl_convenience=yes
3700      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3701  esac
3702  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3703  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3704  # For backwards non-gettext consistent compatibility...
3705  INCLTDL="$LTDLINCL"
3706])# AC_LIBLTDL_CONVENIENCE
3707
3708
3709# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
3710# -----------------------------------
3711# sets LIBLTDL to the link flags for the libltdl installable library and
3712# LTDLINCL to the include flags for the libltdl header and adds
3713# --enable-ltdl-install to the configure arguments.  Note that
3714# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
3715# and an installed libltdl is not found, it is assumed to be `libltdl'.
3716# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
3717# '${top_srcdir}/' (note the single quotes!).  If your package is not
3718# flat and you're not using automake, define top_builddir and top_srcdir
3719# appropriately in the Makefiles.
3720# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3721AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3722[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3723  AC_CHECK_LIB(ltdl, lt_dlinit,
3724  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3725  [if test x"$enable_ltdl_install" = xno; then
3726     AC_MSG_WARN([libltdl not installed, but installation disabled])
3727   else
3728     enable_ltdl_install=yes
3729   fi
3730  ])
3731  if test x"$enable_ltdl_install" = x"yes"; then
3732    ac_configure_args="$ac_configure_args --enable-ltdl-install"
3733    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3734    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3735  else
3736    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3737    LIBLTDL="-lltdl"
3738    LTDLINCL=
3739  fi
3740  # For backwards non-gettext consistent compatibility...
3741  INCLTDL="$LTDLINCL"
3742])# AC_LIBLTDL_INSTALLABLE
3743
3744
3745# AC_LIBTOOL_CXX
3746# --------------
3747# enable support for C++ libraries
3748AC_DEFUN([AC_LIBTOOL_CXX],
3749[AC_REQUIRE([_LT_AC_LANG_CXX])
3750])# AC_LIBTOOL_CXX
3751
3752
3753# _LT_AC_LANG_CXX
3754# ---------------
3755AC_DEFUN([_LT_AC_LANG_CXX],
3756[AC_REQUIRE([AC_PROG_CXX])
3757AC_REQUIRE([_LT_AC_PROG_CXXCPP])
3758_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
3759])# _LT_AC_LANG_CXX
3760
3761# _LT_AC_PROG_CXXCPP
3762# ------------------
3763AC_DEFUN([_LT_AC_PROG_CXXCPP],
3764[
3765AC_REQUIRE([AC_PROG_CXX])
3766if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
3767    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
3768    (test "X$CXX" != "Xg++"))) ; then
3769  AC_PROG_CXXCPP
3770fi
3771])# _LT_AC_PROG_CXXCPP
3772
3773# AC_LIBTOOL_F77
3774# --------------
3775# enable support for Fortran 77 libraries
3776AC_DEFUN([AC_LIBTOOL_F77],
3777[AC_REQUIRE([_LT_AC_LANG_F77])
3778])# AC_LIBTOOL_F77
3779
3780
3781# _LT_AC_LANG_F77
3782# ---------------
3783AC_DEFUN([_LT_AC_LANG_F77],
3784[AC_REQUIRE([AC_PROG_F77])
3785_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
3786])# _LT_AC_LANG_F77
3787
3788
3789# AC_LIBTOOL_GCJ
3790# --------------
3791# enable support for GCJ libraries
3792AC_DEFUN([AC_LIBTOOL_GCJ],
3793[AC_REQUIRE([_LT_AC_LANG_GCJ])
3794])# AC_LIBTOOL_GCJ
3795
3796
3797# _LT_AC_LANG_GCJ
3798# ---------------
3799AC_DEFUN([_LT_AC_LANG_GCJ],
3800[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
3801  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
3802    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
3803      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
3804	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
3805	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
3806_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
3807])# _LT_AC_LANG_GCJ
3808
3809
3810# AC_LIBTOOL_RC
3811# -------------
3812# enable support for Windows resource files
3813AC_DEFUN([AC_LIBTOOL_RC],
3814[AC_REQUIRE([LT_AC_PROG_RC])
3815_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
3816])# AC_LIBTOOL_RC
3817
3818
3819# AC_LIBTOOL_LANG_C_CONFIG
3820# ------------------------
3821# Ensure that the configuration vars for the C compiler are
3822# suitably defined.  Those variables are subsequently used by
3823# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3824AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
3825AC_DEFUN([_LT_AC_LANG_C_CONFIG],
3826[lt_save_CC="$CC"
3827AC_LANG_PUSH(C)
3828
3829# Source file extension for C test sources.
3830ac_ext=c
3831
3832# Object file extension for compiled C test sources.
3833objext=o
3834_LT_AC_TAGVAR(objext, $1)=$objext
3835
3836# Code to be used in simple compile tests
3837lt_simple_compile_test_code="int some_variable = 0;\n"
3838
3839# Code to be used in simple link tests
3840lt_simple_link_test_code='int main(){return(0);}\n'
3841
3842_LT_AC_SYS_COMPILER
3843
3844# save warnings/boilerplate of simple test code
3845_LT_COMPILER_BOILERPLATE
3846_LT_LINKER_BOILERPLATE
3847
3848AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3849AC_LIBTOOL_PROG_COMPILER_PIC($1)
3850AC_LIBTOOL_PROG_CC_C_O($1)
3851AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3852AC_LIBTOOL_PROG_LD_SHLIBS($1)
3853AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3854AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3855AC_LIBTOOL_SYS_LIB_STRIP
3856AC_LIBTOOL_DLOPEN_SELF
3857
3858# Report which library types will actually be built
3859AC_MSG_CHECKING([if libtool supports shared libraries])
3860AC_MSG_RESULT([$can_build_shared])
3861
3862AC_MSG_CHECKING([whether to build shared libraries])
3863test "$can_build_shared" = "no" && enable_shared=no
3864
3865# On AIX, shared libraries and static libraries use the same namespace, and
3866# are all built from PIC.
3867case $host_os in
3868aix3*)
3869  test "$enable_shared" = yes && enable_static=no
3870  if test -n "$RANLIB"; then
3871    archive_cmds="$archive_cmds~\$RANLIB \$lib"
3872    postinstall_cmds='$RANLIB $lib'
3873  fi
3874  ;;
3875
3876aix4* | aix5*)
3877  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3878    test "$enable_shared" = yes && enable_static=no
3879  fi
3880    ;;
3881esac
3882AC_MSG_RESULT([$enable_shared])
3883
3884AC_MSG_CHECKING([whether to build static libraries])
3885# Make sure either enable_shared or enable_static is yes.
3886test "$enable_shared" = yes || enable_static=yes
3887AC_MSG_RESULT([$enable_static])
3888
3889AC_LIBTOOL_CONFIG($1)
3890
3891AC_LANG_POP
3892CC="$lt_save_CC"
3893])# AC_LIBTOOL_LANG_C_CONFIG
3894
3895
3896# AC_LIBTOOL_LANG_CXX_CONFIG
3897# --------------------------
3898# Ensure that the configuration vars for the C compiler are
3899# suitably defined.  Those variables are subsequently used by
3900# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3901AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
3902AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
3903[AC_LANG_PUSH(C++)
3904AC_REQUIRE([AC_PROG_CXX])
3905AC_REQUIRE([_LT_AC_PROG_CXXCPP])
3906
3907_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3908_LT_AC_TAGVAR(allow_undefined_flag, $1)=
3909_LT_AC_TAGVAR(always_export_symbols, $1)=no
3910_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3911_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3912_LT_AC_TAGVAR(hardcode_direct, $1)=no
3913_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3914_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3915_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3916_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3917_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3918_LT_AC_TAGVAR(hardcode_automatic, $1)=no
3919_LT_AC_TAGVAR(module_cmds, $1)=
3920_LT_AC_TAGVAR(module_expsym_cmds, $1)=
3921_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3922_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3923_LT_AC_TAGVAR(no_undefined_flag, $1)=
3924_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3925_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3926
3927# Dependencies to place before and after the object being linked:
3928_LT_AC_TAGVAR(predep_objects, $1)=
3929_LT_AC_TAGVAR(postdep_objects, $1)=
3930_LT_AC_TAGVAR(predeps, $1)=
3931_LT_AC_TAGVAR(postdeps, $1)=
3932_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
3933
3934# Source file extension for C++ test sources.
3935ac_ext=cpp
3936
3937# Object file extension for compiled C++ test sources.
3938objext=o
3939_LT_AC_TAGVAR(objext, $1)=$objext
3940
3941# Code to be used in simple compile tests
3942lt_simple_compile_test_code="int some_variable = 0;\n"
3943
3944# Code to be used in simple link tests
3945lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
3946
3947# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3948_LT_AC_SYS_COMPILER
3949
3950# save warnings/boilerplate of simple test code
3951_LT_COMPILER_BOILERPLATE
3952_LT_LINKER_BOILERPLATE
3953
3954# Allow CC to be a program name with arguments.
3955lt_save_CC=$CC
3956lt_save_LD=$LD
3957lt_save_GCC=$GCC
3958GCC=$GXX
3959lt_save_with_gnu_ld=$with_gnu_ld
3960lt_save_path_LD=$lt_cv_path_LD
3961if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
3962  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
3963else
3964  $as_unset lt_cv_prog_gnu_ld
3965fi
3966if test -n "${lt_cv_path_LDCXX+set}"; then
3967  lt_cv_path_LD=$lt_cv_path_LDCXX
3968else
3969  $as_unset lt_cv_path_LD
3970fi
3971test -z "${LDCXX+set}" || LD=$LDCXX
3972CC=${CXX-"c++"}
3973compiler=$CC
3974_LT_AC_TAGVAR(compiler, $1)=$CC
3975_LT_CC_BASENAME([$compiler])
3976
3977# We don't want -fno-exception wen compiling C++ code, so set the
3978# no_builtin_flag separately
3979if test "$GXX" = yes; then
3980  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3981else
3982  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3983fi
3984
3985if test "$GXX" = yes; then
3986  # Set up default GNU C++ configuration
3987
3988  AC_PROG_LD
3989
3990  # Check if GNU C++ uses GNU ld as the underlying linker, since the
3991  # archiving commands below assume that GNU ld is being used.
3992  if test "$with_gnu_ld" = yes; then
3993    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3994    _LT_AC_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'
3995
3996    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3997    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3998
3999    # If archive_cmds runs LD, not CC, wlarc should be empty
4000    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
4001    #     investigate it a little bit more. (MM)
4002    wlarc='${wl}'
4003
4004    # ancient GNU ld didn't support --whole-archive et. al.
4005    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
4006	grep 'no-whole-archive' > /dev/null; then
4007      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4008    else
4009      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4010    fi
4011  else
4012    with_gnu_ld=no
4013    wlarc=
4014
4015    # A generic and very simple default shared library creation
4016    # command for GNU C++ for the case where it uses the native
4017    # linker, instead of GNU ld.  If possible, this setting should
4018    # overridden to take advantage of the native linker features on
4019    # the platform it is being used on.
4020    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
4021  fi
4022
4023  # Commands to make compiler produce verbose output that lists
4024  # what "hidden" libraries, object files and flags are used when
4025  # linking a shared library.
4026  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4027
4028else
4029  GXX=no
4030  with_gnu_ld=no
4031  wlarc=
4032fi
4033
4034# PORTME: fill in a description of your system's C++ link characteristics
4035AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4036_LT_AC_TAGVAR(ld_shlibs, $1)=yes
4037case $host_os in
4038  aix3*)
4039    # FIXME: insert proper C++ library support
4040    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4041    ;;
4042  aix4* | aix5*)
4043    if test "$host_cpu" = ia64; then
4044      # On IA64, the linker does run time linking by default, so we don't
4045      # have to do anything special.
4046      aix_use_runtimelinking=no
4047      exp_sym_flag='-Bexport'
4048      no_entry_flag=""
4049    else
4050      aix_use_runtimelinking=no
4051
4052      # Test if we are trying to use run time linking or normal
4053      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
4054      # need to do runtime linking.
4055      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
4056	for ld_flag in $LDFLAGS; do
4057	  case $ld_flag in
4058	  *-brtl*)
4059	    aix_use_runtimelinking=yes
4060	    break
4061	    ;;
4062	  esac
4063	done
4064	;;
4065      esac
4066
4067      exp_sym_flag='-bexport'
4068      no_entry_flag='-bnoentry'
4069    fi
4070
4071    # When large executables or shared objects are built, AIX ld can
4072    # have problems creating the table of contents.  If linking a library
4073    # or program results in "error TOC overflow" add -mminimal-toc to
4074    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
4075    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4076
4077    _LT_AC_TAGVAR(archive_cmds, $1)=''
4078    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4079    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
4080    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4081
4082    if test "$GXX" = yes; then
4083      case $host_os in aix4.[[012]]|aix4.[[012]].*)
4084      # We only want to do this on AIX 4.2 and lower, the check
4085      # below for broken collect2 doesn't work under 4.3+
4086	collect2name=`${CC} -print-prog-name=collect2`
4087	if test -f "$collect2name" && \
4088	   strings "$collect2name" | grep resolve_lib_name >/dev/null
4089	then
4090	  # We have reworked collect2
4091	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4092	else
4093	  # We have old collect2
4094	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
4095	  # It fails to find uninstalled libraries when the uninstalled
4096	  # path is not listed in the libpath.  Setting hardcode_minus_L
4097	  # to unsupported forces relinking
4098	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4099	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4100	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4101	fi
4102	;;
4103      esac
4104      shared_flag='-shared'
4105      if test "$aix_use_runtimelinking" = yes; then
4106	shared_flag="$shared_flag "'${wl}-G'
4107      fi
4108    else
4109      # not using gcc
4110      if test "$host_cpu" = ia64; then
4111	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4112	# chokes on -Wl,-G. The following line is correct:
4113	shared_flag='-G'
4114      else
4115	if test "$aix_use_runtimelinking" = yes; then
4116	  shared_flag='${wl}-G'
4117	else
4118	  shared_flag='${wl}-bM:SRE'
4119	fi
4120      fi
4121    fi
4122
4123    # It seems that -bexpall does not export symbols beginning with
4124    # underscore (_), so it is better to generate a list of symbols to export.
4125    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
4126    if test "$aix_use_runtimelinking" = yes; then
4127      # Warning - without using the other runtime loading flags (-brtl),
4128      # -berok will link without error, but may produce a broken library.
4129      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
4130      # Determine the default libpath from the value encoded in an empty executable.
4131      _LT_AC_SYS_LIBPATH_AIX
4132      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4133
4134      _LT_AC_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 "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
4135     else
4136      if test "$host_cpu" = ia64; then
4137	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4138	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4139	_LT_AC_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"
4140      else
4141	# Determine the default libpath from the value encoded in an empty executable.
4142	_LT_AC_SYS_LIBPATH_AIX
4143	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4144	# Warning - without using the other run time loading flags,
4145	# -berok will link without error, but may produce a broken library.
4146	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4147	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4148	# Exported symbols can be pulled into shared objects from archives
4149	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
4150	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
4151	# This is similar to how AIX traditionally builds its shared libraries.
4152	_LT_AC_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'
4153      fi
4154    fi
4155    ;;
4156
4157  beos*)
4158    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
4159      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4160      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4161      # support --undefined.  This deserves some investigation.  FIXME
4162      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4163    else
4164      _LT_AC_TAGVAR(ld_shlibs, $1)=no
4165    fi
4166    ;;
4167
4168  chorus*)
4169    case $cc_basename in
4170      *)
4171	# FIXME: insert proper C++ library support
4172	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4173	;;
4174    esac
4175    ;;
4176
4177  cygwin* | mingw* | pw32*)
4178    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4179    # as there is no search path for DLLs.
4180    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4181    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4182    _LT_AC_TAGVAR(always_export_symbols, $1)=no
4183    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4184
4185    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
4186      _LT_AC_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'
4187      # If the export-symbols file already is a .def file (1st line
4188      # is EXPORTS), use it as is; otherwise, prepend...
4189      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4190	cp $export_symbols $output_objdir/$soname.def;
4191      else
4192	echo EXPORTS > $output_objdir/$soname.def;
4193	cat $export_symbols >> $output_objdir/$soname.def;
4194      fi~
4195      $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'
4196    else
4197      _LT_AC_TAGVAR(ld_shlibs, $1)=no
4198    fi
4199  ;;
4200      darwin* | rhapsody*)
4201        case $host_os in
4202        rhapsody* | darwin1.[[012]])
4203         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
4204         ;;
4205       *) # Darwin 1.3 on
4206         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
4207           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
4208         else
4209           case ${MACOSX_DEPLOYMENT_TARGET} in
4210             10.[[012]])
4211               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
4212               ;;
4213             10.*)
4214               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
4215               ;;
4216           esac
4217         fi
4218         ;;
4219        esac
4220      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4221      _LT_AC_TAGVAR(hardcode_direct, $1)=no
4222      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
4223      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4224      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
4225      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4226
4227    if test "$GXX" = yes ; then
4228      lt_int_apple_cc_single_mod=no
4229      output_verbose_link_cmd='echo'
4230      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
4231       lt_int_apple_cc_single_mod=yes
4232      fi
4233      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
4234       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
4235      else
4236          _LT_AC_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'
4237        fi
4238        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4239        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
4240          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
4241            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4242          else
4243            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4244          fi
4245            _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4246      else
4247      case $cc_basename in
4248        xlc*)
4249         output_verbose_link_cmd='echo'
4250          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
4251          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4252          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
4253          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4254          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4255          ;;
4256       *)
4257         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4258          ;;
4259      esac
4260      fi
4261        ;;
4262
4263  dgux*)
4264    case $cc_basename in
4265      ec++*)
4266	# FIXME: insert proper C++ library support
4267	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4268	;;
4269      ghcx*)
4270	# Green Hills C++ Compiler
4271	# FIXME: insert proper C++ library support
4272	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4273	;;
4274      *)
4275	# FIXME: insert proper C++ library support
4276	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4277	;;
4278    esac
4279    ;;
4280  freebsd[[12]]*)
4281    # C++ shared libraries reported to be fairly broken before switch to ELF
4282    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4283    ;;
4284  freebsd-elf*)
4285    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4286    ;;
4287  freebsd* | kfreebsd*-gnu | dragonfly*)
4288    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
4289    # conventions
4290    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
4291    ;;
4292  gnu*)
4293    ;;
4294  hpux9*)
4295    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4296    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4297    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4298    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4299    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4300				# but as the default
4301				# location of the library.
4302
4303    case $cc_basename in
4304    CC*)
4305      # FIXME: insert proper C++ library support
4306      _LT_AC_TAGVAR(ld_shlibs, $1)=no
4307      ;;
4308    aCC*)
4309      _LT_AC_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'
4310      # Commands to make compiler produce verbose output that lists
4311      # what "hidden" libraries, object files and flags are used when
4312      # linking a shared library.
4313      #
4314      # There doesn't appear to be a way to prevent this compiler from
4315      # explicitly linking system object files so we need to strip them
4316      # from the output so that they don't get included in the library
4317      # dependencies.
4318      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 $list'
4319      ;;
4320    *)
4321      if test "$GXX" = yes; then
4322        _LT_AC_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'
4323      else
4324        # FIXME: insert proper C++ library support
4325        _LT_AC_TAGVAR(ld_shlibs, $1)=no
4326      fi
4327      ;;
4328    esac
4329    ;;
4330  hpux10*|hpux11*)
4331    if test $with_gnu_ld = no; then
4332      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4333      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4334
4335      case $host_cpu in
4336      hppa*64*|ia64*)
4337	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
4338        ;;
4339      *)
4340	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4341        ;;
4342      esac
4343    fi
4344    case $host_cpu in
4345    hppa*64*|ia64*)
4346      _LT_AC_TAGVAR(hardcode_direct, $1)=no
4347      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4348      ;;
4349    *)
4350      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4351      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4352					      # but as the default
4353					      # location of the library.
4354      ;;
4355    esac
4356
4357    case $cc_basename in
4358      CC*)
4359	# FIXME: insert proper C++ library support
4360	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4361	;;
4362      aCC*)
4363	case $host_cpu in
4364	hppa*64*)
4365	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4366	  ;;
4367	ia64*)
4368	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4369	  ;;
4370	*)
4371	  _LT_AC_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'
4372	  ;;
4373	esac
4374	# Commands to make compiler produce verbose output that lists
4375	# what "hidden" libraries, object files and flags are used when
4376	# linking a shared library.
4377	#
4378	# There doesn't appear to be a way to prevent this compiler from
4379	# explicitly linking system object files so we need to strip them
4380	# from the output so that they don't get included in the library
4381	# dependencies.
4382	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 $list'
4383	;;
4384      *)
4385	if test "$GXX" = yes; then
4386	  if test $with_gnu_ld = no; then
4387	    case $host_cpu in
4388	    hppa*64*)
4389	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4390	      ;;
4391	    ia64*)
4392	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4393	      ;;
4394	    *)
4395	      _LT_AC_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'
4396	      ;;
4397	    esac
4398	  fi
4399	else
4400	  # FIXME: insert proper C++ library support
4401	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
4402	fi
4403	;;
4404    esac
4405    ;;
4406  interix3*)
4407    _LT_AC_TAGVAR(hardcode_direct, $1)=no
4408    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4409    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4410    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4411    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4412    # Instead, shared libraries are loaded at an image base (0x10000000 by
4413    # default) and relocated if they conflict, which is a slow very memory
4414    # consuming and fragmenting process.  To avoid this, we pick a random,
4415    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4416    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
4417    _LT_AC_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'
4418    _LT_AC_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'
4419    ;;
4420  irix5* | irix6*)
4421    case $cc_basename in
4422      CC*)
4423	# SGI C++
4424	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4425
4426	# Archives containing C++ object files must be created using
4427	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
4428	# necessary to make sure instantiated templates are included
4429	# in the archive.
4430	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
4431	;;
4432      *)
4433	if test "$GXX" = yes; then
4434	  if test "$with_gnu_ld" = no; then
4435	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4436	  else
4437	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
4438	  fi
4439	fi
4440	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4441	;;
4442    esac
4443    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4444    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4445    ;;
4446  linux*)
4447    case $cc_basename in
4448      KCC*)
4449	# Kuck and Associates, Inc. (KAI) C++ Compiler
4450
4451	# KCC will only create a shared library if the output file
4452	# ends with ".so" (or ".sl" for HP-UX), so rename the library
4453	# to its proper name (with version) after linking.
4454	_LT_AC_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'
4455	_LT_AC_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'
4456	# Commands to make compiler produce verbose output that lists
4457	# what "hidden" libraries, object files and flags are used when
4458	# linking a shared library.
4459	#
4460	# There doesn't appear to be a way to prevent this compiler from
4461	# explicitly linking system object files so we need to strip them
4462	# from the output so that they don't get included in the library
4463	# dependencies.
4464	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 $list'
4465
4466	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
4467	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4468
4469	# Archives containing C++ object files must be created using
4470	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
4471	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4472	;;
4473      icpc*)
4474	# Intel C++
4475	with_gnu_ld=yes
4476	# version 8.0 and above of icpc choke on multiply defined symbols
4477	# if we add $predep_objects and $postdep_objects, however 7.1 and
4478	# earlier do not add the objects themselves.
4479	case `$CC -V 2>&1` in
4480	*"Version 7."*)
4481  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4482  	  _LT_AC_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'
4483	  ;;
4484	*)  # Version 8.0 or newer
4485	  tmp_idyn=
4486	  case $host_cpu in
4487	    ia64*) tmp_idyn=' -i_dynamic';;
4488	  esac
4489  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4490	  _LT_AC_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'
4491	  ;;
4492	esac
4493	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4494	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4495	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4496	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
4497	;;
4498      pgCC*)
4499        # Portland Group C++ compiler
4500	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
4501  	_LT_AC_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'
4502
4503	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
4504	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4505	_LT_AC_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'
4506        ;;
4507      cxx*)
4508	# Compaq C++
4509	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4510	_LT_AC_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'
4511
4512	runpath_var=LD_RUN_PATH
4513	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4514	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4515
4516	# Commands to make compiler produce verbose output that lists
4517	# what "hidden" libraries, object files and flags are used when
4518	# linking a shared library.
4519	#
4520	# There doesn't appear to be a way to prevent this compiler from
4521	# explicitly linking system object files so we need to strip them
4522	# from the output so that they don't get included in the library
4523	# dependencies.
4524	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4525	;;
4526    esac
4527    ;;
4528  lynxos*)
4529    # FIXME: insert proper C++ library support
4530    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4531    ;;
4532  m88k*)
4533    # FIXME: insert proper C++ library support
4534    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4535    ;;
4536  mvs*)
4537    case $cc_basename in
4538      cxx*)
4539	# FIXME: insert proper C++ library support
4540	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4541	;;
4542      *)
4543	# FIXME: insert proper C++ library support
4544	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4545	;;
4546    esac
4547    ;;
4548  netbsd*)
4549    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4550      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
4551      wlarc=
4552      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4553      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4554      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4555    fi
4556    # Workaround some broken pre-1.5 toolchains
4557    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
4558    ;;
4559  openbsd2*)
4560    # C++ shared libraries are fairly broken
4561    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4562    ;;
4563  openbsd*)
4564    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4565    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4566    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
4567    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4568    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4569      _LT_AC_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'
4570      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4571      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4572    fi
4573    output_verbose_link_cmd='echo'
4574    ;;
4575  osf3*)
4576    case $cc_basename in
4577      KCC*)
4578	# Kuck and Associates, Inc. (KAI) C++ Compiler
4579
4580	# KCC will only create a shared library if the output file
4581	# ends with ".so" (or ".sl" for HP-UX), so rename the library
4582	# to its proper name (with version) after linking.
4583	_LT_AC_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'
4584
4585	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4586	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4587
4588	# Archives containing C++ object files must be created using
4589	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
4590	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4591
4592	;;
4593      RCC*)
4594	# Rational C++ 2.4.1
4595	# FIXME: insert proper C++ library support
4596	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4597	;;
4598      cxx*)
4599	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4600	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4601
4602	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4603	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4604
4605	# Commands to make compiler produce verbose output that lists
4606	# what "hidden" libraries, object files and flags are used when
4607	# linking a shared library.
4608	#
4609	# There doesn't appear to be a way to prevent this compiler from
4610	# explicitly linking system object files so we need to strip them
4611	# from the output so that they don't get included in the library
4612	# dependencies.
4613	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4614	;;
4615      *)
4616	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4617	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4618	  _LT_AC_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 ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4619
4620	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4621	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4622
4623	  # Commands to make compiler produce verbose output that lists
4624	  # what "hidden" libraries, object files and flags are used when
4625	  # linking a shared library.
4626	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4627
4628	else
4629	  # FIXME: insert proper C++ library support
4630	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
4631	fi
4632	;;
4633    esac
4634    ;;
4635  osf4* | osf5*)
4636    case $cc_basename in
4637      KCC*)
4638	# Kuck and Associates, Inc. (KAI) C++ Compiler
4639
4640	# KCC will only create a shared library if the output file
4641	# ends with ".so" (or ".sl" for HP-UX), so rename the library
4642	# to its proper name (with version) after linking.
4643	_LT_AC_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'
4644
4645	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4646	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4647
4648	# Archives containing C++ object files must be created using
4649	# the KAI C++ compiler.
4650	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
4651	;;
4652      RCC*)
4653	# Rational C++ 2.4.1
4654	# FIXME: insert proper C++ library support
4655	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4656	;;
4657      cxx*)
4658	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4659	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4660	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
4661	  echo "-hidden">> $lib.exp~
4662	  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version	$verstring` -update_registry ${output_objdir}/so_locations -o $lib~
4663	  $rm $lib.exp'
4664
4665	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4666	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4667
4668	# Commands to make compiler produce verbose output that lists
4669	# what "hidden" libraries, object files and flags are used when
4670	# linking a shared library.
4671	#
4672	# There doesn't appear to be a way to prevent this compiler from
4673	# explicitly linking system object files so we need to strip them
4674	# from the output so that they don't get included in the library
4675	# dependencies.
4676	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4677	;;
4678      *)
4679	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4680	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4681	 _LT_AC_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` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4682
4683	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4684	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4685
4686	  # Commands to make compiler produce verbose output that lists
4687	  # what "hidden" libraries, object files and flags are used when
4688	  # linking a shared library.
4689	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4690
4691	else
4692	  # FIXME: insert proper C++ library support
4693	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
4694	fi
4695	;;
4696    esac
4697    ;;
4698  psos*)
4699    # FIXME: insert proper C++ library support
4700    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4701    ;;
4702  sunos4*)
4703    case $cc_basename in
4704      CC*)
4705	# Sun C++ 4.x
4706	# FIXME: insert proper C++ library support
4707	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4708	;;
4709      lcc*)
4710	# Lucid
4711	# FIXME: insert proper C++ library support
4712	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4713	;;
4714      *)
4715	# FIXME: insert proper C++ library support
4716	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4717	;;
4718    esac
4719    ;;
4720  solaris*)
4721    case $cc_basename in
4722      CC*)
4723	# Sun C++ 4.2, 5.x and Centerline C++
4724        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
4725	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
4726	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4727	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4728	$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'
4729
4730	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4731	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4732	case $host_os in
4733	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4734	  *)
4735	    # The C++ compiler is used as linker so we must use $wl
4736	    # flag to pass the commands to the underlying system
4737	    # linker. We must also pass each convience library through
4738	    # to the system linker between allextract/defaultextract.
4739	    # The C++ compiler will combine linker options so we
4740	    # cannot just pass the convience library names through
4741	    # without $wl.
4742	    # Supported since Solaris 2.6 (maybe 2.5.1?)
4743	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
4744	    ;;
4745	esac
4746	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4747
4748	output_verbose_link_cmd='echo'
4749
4750	# Archives containing C++ object files must be created using
4751	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
4752	# necessary to make sure instantiated templates are included
4753	# in the archive.
4754	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
4755	;;
4756      gcx*)
4757	# Green Hills C++ Compiler
4758	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4759
4760	# The C++ compiler must be used to create the archive.
4761	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
4762	;;
4763      *)
4764	# GNU C++ compiler with Solaris linker
4765	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4766	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
4767	  if $CC --version | grep -v '^2\.7' > /dev/null; then
4768	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4769	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4770		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4771
4772	    # Commands to make compiler produce verbose output that lists
4773	    # what "hidden" libraries, object files and flags are used when
4774	    # linking a shared library.
4775	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4776	  else
4777	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
4778	    # platform.
4779	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4780	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4781		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4782
4783	    # Commands to make compiler produce verbose output that lists
4784	    # what "hidden" libraries, object files and flags are used when
4785	    # linking a shared library.
4786	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4787	  fi
4788
4789	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
4790	fi
4791	;;
4792    esac
4793    ;;
4794  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
4795    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4796    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4797    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4798    runpath_var='LD_RUN_PATH'
4799
4800    case $cc_basename in
4801      CC*)
4802	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4803	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4804	;;
4805      *)
4806	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4807	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4808	;;
4809    esac
4810    ;;
4811  sysv5* | sco3.2v5* | sco5v6*)
4812    # Note: We can NOT use -z defs as we might desire, because we do not
4813    # link with -lc, and that would cause any symbols used from libc to
4814    # always be unresolved, which means just about no library would
4815    # ever link correctly.  If we're not using GNU ld we use -z text
4816    # though, which does catch some bad symbols but isn't as heavy-handed
4817    # as -z defs.
4818    # For security reasons, it is highly recommended that you always
4819    # use absolute paths for naming shared libraries, and exclude the
4820    # DT_RUNPATH tag from executables and libraries.  But doing so
4821    # requires that you compile everything twice, which is a pain.
4822    # So that behaviour is only enabled if SCOABSPATH is set to a
4823    # non-empty value in the environment.  Most likely only useful for
4824    # creating official distributions of packages.
4825    # This is a hack until libtool officially supports absolute path
4826    # names for shared libraries.
4827    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4828    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
4829    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4830    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4831    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
4832    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
4833    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4834    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
4835    runpath_var='LD_RUN_PATH'
4836
4837    case $cc_basename in
4838      CC*)
4839	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4840	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4841	;;
4842      *)
4843	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4844	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4845	;;
4846    esac
4847    ;;
4848  tandem*)
4849    case $cc_basename in
4850      NCC*)
4851	# NonStop-UX NCC 3.20
4852	# FIXME: insert proper C++ library support
4853	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4854	;;
4855      *)
4856	# FIXME: insert proper C++ library support
4857	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4858	;;
4859    esac
4860    ;;
4861  vxworks*)
4862    # FIXME: insert proper C++ library support
4863    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4864    ;;
4865  *)
4866    # FIXME: insert proper C++ library support
4867    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4868    ;;
4869esac
4870AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
4871test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4872
4873_LT_AC_TAGVAR(GCC, $1)="$GXX"
4874_LT_AC_TAGVAR(LD, $1)="$LD"
4875
4876AC_LIBTOOL_POSTDEP_PREDEP($1)
4877AC_LIBTOOL_PROG_COMPILER_PIC($1)
4878AC_LIBTOOL_PROG_CC_C_O($1)
4879AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4880AC_LIBTOOL_PROG_LD_SHLIBS($1)
4881AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4882AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4883
4884AC_LIBTOOL_CONFIG($1)
4885
4886AC_LANG_POP
4887CC=$lt_save_CC
4888LDCXX=$LD
4889LD=$lt_save_LD
4890GCC=$lt_save_GCC
4891with_gnu_ldcxx=$with_gnu_ld
4892with_gnu_ld=$lt_save_with_gnu_ld
4893lt_cv_path_LDCXX=$lt_cv_path_LD
4894lt_cv_path_LD=$lt_save_path_LD
4895lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
4896lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
4897])# AC_LIBTOOL_LANG_CXX_CONFIG
4898
4899# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
4900# ------------------------------------
4901# Figure out "hidden" library dependencies from verbose
4902# compiler output when linking a shared library.
4903# Parse the compiler output and extract the necessary
4904# objects, libraries and library flags.
4905AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
4906dnl we can't use the lt_simple_compile_test_code here,
4907dnl because it contains code intended for an executable,
4908dnl not a library.  It's possible we should let each
4909dnl tag define a new lt_????_link_test_code variable,
4910dnl but it's only used here...
4911ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
4912int a;
4913void foo (void) { a = 0; }
4914EOF
4915],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
4916class Foo
4917{
4918public:
4919  Foo (void) { a = 0; }
4920private:
4921  int a;
4922};
4923EOF
4924],[$1],[F77],[cat > conftest.$ac_ext <<EOF
4925      subroutine foo
4926      implicit none
4927      integer*4 a
4928      a=0
4929      return
4930      end
4931EOF
4932],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
4933public class foo {
4934  private int a;
4935  public void bar (void) {
4936    a = 0;
4937  }
4938};
4939EOF
4940])
4941dnl Parse the compiler output and extract the necessary
4942dnl objects, libraries and library flags.
4943if AC_TRY_EVAL(ac_compile); then
4944  # Parse the compiler output and extract the necessary
4945  # objects, libraries and library flags.
4946
4947  # Sentinel used to keep track of whether or not we are before
4948  # the conftest object file.
4949  pre_test_object_deps_done=no
4950
4951  # The `*' in the case matches for architectures that use `case' in
4952  # $output_verbose_cmd can trigger glob expansion during the loop
4953  # eval without this substitution.
4954  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
4955
4956  for p in `eval $output_verbose_link_cmd`; do
4957    case $p in
4958
4959    -L* | -R* | -l*)
4960       # Some compilers place space between "-{L,R}" and the path.
4961       # Remove the space.
4962       if test $p = "-L" \
4963	  || test $p = "-R"; then
4964	 prev=$p
4965	 continue
4966       else
4967	 prev=
4968       fi
4969
4970       if test "$pre_test_object_deps_done" = no; then
4971	 case $p in
4972	 -L* | -R*)
4973	   # Internal compiler library paths should come after those
4974	   # provided the user.  The postdeps already come after the
4975	   # user supplied libs so there is no need to process them.
4976	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
4977	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
4978	   else
4979	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
4980	   fi
4981	   ;;
4982	 # The "-l" case would never come before the object being
4983	 # linked, so don't bother handling this case.
4984	 esac
4985       else
4986	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
4987	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
4988	 else
4989	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
4990	 fi
4991       fi
4992       ;;
4993
4994    *.$objext)
4995       # This assumes that the test object file only shows up
4996       # once in the compiler output.
4997       if test "$p" = "conftest.$objext"; then
4998	 pre_test_object_deps_done=yes
4999	 continue
5000       fi
5001
5002       if test "$pre_test_object_deps_done" = no; then
5003	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
5004	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
5005	 else
5006	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
5007	 fi
5008       else
5009	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
5010	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
5011	 else
5012	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
5013	 fi
5014       fi
5015       ;;
5016
5017    *) ;; # Ignore the rest.
5018
5019    esac
5020  done
5021
5022  # Clean up.
5023  rm -f a.out a.exe
5024else
5025  echo "libtool.m4: error: problem compiling $1 test program"
5026fi
5027
5028$rm -f confest.$objext
5029
5030# PORTME: override above test on systems where it is broken
5031ifelse([$1],[CXX],
5032[case $host_os in
5033interix3*)
5034  # Interix 3.5 installs completely hosed .la files for C++, so rather than
5035  # hack all around it, let's just trust "g++" to DTRT.
5036  _LT_AC_TAGVAR(predep_objects,$1)=
5037  _LT_AC_TAGVAR(postdep_objects,$1)=
5038  _LT_AC_TAGVAR(postdeps,$1)=
5039  ;;
5040
5041solaris*)
5042  case $cc_basename in
5043  CC*)
5044    # Adding this requires a known-good setup of shared libraries for
5045    # Sun compiler versions before 5.6, else PIC objects from an old
5046    # archive will be linked into the output, leading to subtle bugs.
5047    _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
5048    ;;
5049  esac
5050  ;;
5051esac
5052])
5053
5054case " $_LT_AC_TAGVAR(postdeps, $1) " in
5055*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
5056esac
5057])# AC_LIBTOOL_POSTDEP_PREDEP
5058
5059# AC_LIBTOOL_LANG_F77_CONFIG
5060# --------------------------
5061# Ensure that the configuration vars for the C compiler are
5062# suitably defined.  Those variables are subsequently used by
5063# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5064AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
5065AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
5066[AC_REQUIRE([AC_PROG_F77])
5067AC_LANG_PUSH(Fortran 77)
5068
5069_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5070_LT_AC_TAGVAR(allow_undefined_flag, $1)=
5071_LT_AC_TAGVAR(always_export_symbols, $1)=no
5072_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5073_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5074_LT_AC_TAGVAR(hardcode_direct, $1)=no
5075_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5076_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5077_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5078_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5079_LT_AC_TAGVAR(hardcode_automatic, $1)=no
5080_LT_AC_TAGVAR(module_cmds, $1)=
5081_LT_AC_TAGVAR(module_expsym_cmds, $1)=
5082_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5083_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5084_LT_AC_TAGVAR(no_undefined_flag, $1)=
5085_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5086_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5087
5088# Source file extension for f77 test sources.
5089ac_ext=f
5090
5091# Object file extension for compiled f77 test sources.
5092objext=o
5093_LT_AC_TAGVAR(objext, $1)=$objext
5094
5095# Code to be used in simple compile tests
5096lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
5097
5098# Code to be used in simple link tests
5099lt_simple_link_test_code="      program t\n      end\n"
5100
5101# ltmain only uses $CC for tagged configurations so make sure $CC is set.
5102_LT_AC_SYS_COMPILER
5103
5104# save warnings/boilerplate of simple test code
5105_LT_COMPILER_BOILERPLATE
5106_LT_LINKER_BOILERPLATE
5107
5108# Allow CC to be a program name with arguments.
5109lt_save_CC="$CC"
5110CC=${F77-"f77"}
5111compiler=$CC
5112_LT_AC_TAGVAR(compiler, $1)=$CC
5113_LT_CC_BASENAME([$compiler])
5114
5115AC_MSG_CHECKING([if libtool supports shared libraries])
5116AC_MSG_RESULT([$can_build_shared])
5117
5118AC_MSG_CHECKING([whether to build shared libraries])
5119test "$can_build_shared" = "no" && enable_shared=no
5120
5121# On AIX, shared libraries and static libraries use the same namespace, and
5122# are all built from PIC.
5123case $host_os in
5124aix3*)
5125  test "$enable_shared" = yes && enable_static=no
5126  if test -n "$RANLIB"; then
5127    archive_cmds="$archive_cmds~\$RANLIB \$lib"
5128    postinstall_cmds='$RANLIB $lib'
5129  fi
5130  ;;
5131aix4* | aix5*)
5132  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5133    test "$enable_shared" = yes && enable_static=no
5134  fi
5135  ;;
5136esac
5137AC_MSG_RESULT([$enable_shared])
5138
5139AC_MSG_CHECKING([whether to build static libraries])
5140# Make sure either enable_shared or enable_static is yes.
5141test "$enable_shared" = yes || enable_static=yes
5142AC_MSG_RESULT([$enable_static])
5143
5144_LT_AC_TAGVAR(GCC, $1)="$G77"
5145_LT_AC_TAGVAR(LD, $1)="$LD"
5146
5147AC_LIBTOOL_PROG_COMPILER_PIC($1)
5148AC_LIBTOOL_PROG_CC_C_O($1)
5149AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5150AC_LIBTOOL_PROG_LD_SHLIBS($1)
5151AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5152AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5153
5154AC_LIBTOOL_CONFIG($1)
5155
5156AC_LANG_POP
5157CC="$lt_save_CC"
5158])# AC_LIBTOOL_LANG_F77_CONFIG
5159
5160
5161# AC_LIBTOOL_LANG_GCJ_CONFIG
5162# --------------------------
5163# Ensure that the configuration vars for the C compiler are
5164# suitably defined.  Those variables are subsequently used by
5165# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5166AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
5167AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
5168[AC_LANG_SAVE
5169
5170# Source file extension for Java test sources.
5171ac_ext=java
5172
5173# Object file extension for compiled Java test sources.
5174objext=o
5175_LT_AC_TAGVAR(objext, $1)=$objext
5176
5177# Code to be used in simple compile tests
5178lt_simple_compile_test_code="class foo {}\n"
5179
5180# Code to be used in simple link tests
5181lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
5182
5183# ltmain only uses $CC for tagged configurations so make sure $CC is set.
5184_LT_AC_SYS_COMPILER
5185
5186# save warnings/boilerplate of simple test code
5187_LT_COMPILER_BOILERPLATE
5188_LT_LINKER_BOILERPLATE
5189
5190# Allow CC to be a program name with arguments.
5191lt_save_CC="$CC"
5192CC=${GCJ-"gcj"}
5193compiler=$CC
5194_LT_AC_TAGVAR(compiler, $1)=$CC
5195_LT_CC_BASENAME([$compiler])
5196
5197# GCJ did not exist at the time GCC didn't implicitly link libc in.
5198_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5199
5200_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5201
5202AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
5203AC_LIBTOOL_PROG_COMPILER_PIC($1)
5204AC_LIBTOOL_PROG_CC_C_O($1)
5205AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5206AC_LIBTOOL_PROG_LD_SHLIBS($1)
5207AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5208AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5209
5210AC_LIBTOOL_CONFIG($1)
5211
5212AC_LANG_RESTORE
5213CC="$lt_save_CC"
5214])# AC_LIBTOOL_LANG_GCJ_CONFIG
5215
5216
5217# AC_LIBTOOL_LANG_RC_CONFIG
5218# -------------------------
5219# Ensure that the configuration vars for the Windows resource compiler are
5220# suitably defined.  Those variables are subsequently used by
5221# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5222AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
5223AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
5224[AC_LANG_SAVE
5225
5226# Source file extension for RC test sources.
5227ac_ext=rc
5228
5229# Object file extension for compiled RC test sources.
5230objext=o
5231_LT_AC_TAGVAR(objext, $1)=$objext
5232
5233# Code to be used in simple compile tests
5234lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
5235
5236# Code to be used in simple link tests
5237lt_simple_link_test_code="$lt_simple_compile_test_code"
5238
5239# ltmain only uses $CC for tagged configurations so make sure $CC is set.
5240_LT_AC_SYS_COMPILER
5241
5242# save warnings/boilerplate of simple test code
5243_LT_COMPILER_BOILERPLATE
5244_LT_LINKER_BOILERPLATE
5245
5246# Allow CC to be a program name with arguments.
5247lt_save_CC="$CC"
5248CC=${RC-"windres"}
5249compiler=$CC
5250_LT_AC_TAGVAR(compiler, $1)=$CC
5251_LT_CC_BASENAME([$compiler])
5252_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
5253
5254AC_LIBTOOL_CONFIG($1)
5255
5256AC_LANG_RESTORE
5257CC="$lt_save_CC"
5258])# AC_LIBTOOL_LANG_RC_CONFIG
5259
5260
5261# AC_LIBTOOL_CONFIG([TAGNAME])
5262# ----------------------------
5263# If TAGNAME is not passed, then create an initial libtool script
5264# with a default configuration from the untagged config vars.  Otherwise
5265# add code to config.status for appending the configuration named by
5266# TAGNAME from the matching tagged config vars.
5267AC_DEFUN([AC_LIBTOOL_CONFIG],
5268[# The else clause should only fire when bootstrapping the
5269# libtool distribution, otherwise you forgot to ship ltmain.sh
5270# with your package, and you will get complaints that there are
5271# no rules to generate ltmain.sh.
5272if test -f "$ltmain"; then
5273  # See if we are running on zsh, and set the options which allow our commands through
5274  # without removal of \ escapes.
5275  if test -n "${ZSH_VERSION+set}" ; then
5276    setopt NO_GLOB_SUBST
5277  fi
5278  # Now quote all the things that may contain metacharacters while being
5279  # careful not to overquote the AC_SUBSTed values.  We take copies of the
5280  # variables and quote the copies for generation of the libtool script.
5281  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
5282    SED SHELL STRIP \
5283    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
5284    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
5285    deplibs_check_method reload_flag reload_cmds need_locks \
5286    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
5287    lt_cv_sys_global_symbol_to_c_name_address \
5288    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
5289    old_postinstall_cmds old_postuninstall_cmds \
5290    _LT_AC_TAGVAR(compiler, $1) \
5291    _LT_AC_TAGVAR(CC, $1) \
5292    _LT_AC_TAGVAR(LD, $1) \
5293    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
5294    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
5295    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
5296    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
5297    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
5298    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
5299    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
5300    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
5301    _LT_AC_TAGVAR(old_archive_cmds, $1) \
5302    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
5303    _LT_AC_TAGVAR(predep_objects, $1) \
5304    _LT_AC_TAGVAR(postdep_objects, $1) \
5305    _LT_AC_TAGVAR(predeps, $1) \
5306    _LT_AC_TAGVAR(postdeps, $1) \
5307    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
5308    _LT_AC_TAGVAR(archive_cmds, $1) \
5309    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
5310    _LT_AC_TAGVAR(postinstall_cmds, $1) \
5311    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
5312    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
5313    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
5314    _LT_AC_TAGVAR(no_undefined_flag, $1) \
5315    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
5316    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
5317    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
5318    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
5319    _LT_AC_TAGVAR(hardcode_automatic, $1) \
5320    _LT_AC_TAGVAR(module_cmds, $1) \
5321    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
5322    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
5323    _LT_AC_TAGVAR(exclude_expsyms, $1) \
5324    _LT_AC_TAGVAR(include_expsyms, $1); do
5325
5326    case $var in
5327    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
5328    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
5329    _LT_AC_TAGVAR(archive_cmds, $1) | \
5330    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
5331    _LT_AC_TAGVAR(module_cmds, $1) | \
5332    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
5333    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
5334    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
5335    extract_expsyms_cmds | reload_cmds | finish_cmds | \
5336    postinstall_cmds | postuninstall_cmds | \
5337    old_postinstall_cmds | old_postuninstall_cmds | \
5338    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
5339      # Double-quote double-evaled strings.
5340      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
5341      ;;
5342    *)
5343      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
5344      ;;
5345    esac
5346  done
5347
5348  case $lt_echo in
5349  *'\[$]0 --fallback-echo"')
5350    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
5351    ;;
5352  esac
5353
5354ifelse([$1], [],
5355  [cfgfile="${ofile}T"
5356  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
5357  $rm -f "$cfgfile"
5358  AC_MSG_NOTICE([creating $ofile])],
5359  [cfgfile="$ofile"])
5360
5361  cat <<__EOF__ >> "$cfgfile"
5362ifelse([$1], [],
5363[#! $SHELL
5364
5365# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
5366# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
5367# NOTE: Changes made to this file will be lost: look at ltmain.sh.
5368#
5369# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
5370# Free Software Foundation, Inc.
5371#
5372# This file is part of GNU Libtool:
5373# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5374#
5375# This program is free software; you can redistribute it and/or modify
5376# it under the terms of the GNU General Public License as published by
5377# the Free Software Foundation; either version 2 of the License, or
5378# (at your option) any later version.
5379#
5380# This program is distributed in the hope that it will be useful, but
5381# WITHOUT ANY WARRANTY; without even the implied warranty of
5382# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
5383# General Public License for more details.
5384#
5385# You should have received a copy of the GNU General Public License
5386# along with this program; if not, write to the Free Software
5387# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
5388#
5389# As a special exception to the GNU General Public License, if you
5390# distribute this file as part of a program that contains a
5391# configuration script generated by Autoconf, you may include it under
5392# the same distribution terms that you use for the rest of that program.
5393
5394# A sed program that does not truncate output.
5395SED=$lt_SED
5396
5397# Sed that helps us avoid accidentally triggering echo(1) options like -n.
5398Xsed="$SED -e 1s/^X//"
5399
5400# The HP-UX ksh and POSIX shell print the target directory to stdout
5401# if CDPATH is set.
5402(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5403
5404# The names of the tagged configurations supported by this script.
5405available_tags=
5406
5407# ### BEGIN LIBTOOL CONFIG],
5408[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
5409
5410# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5411
5412# Shell to use when invoking shell scripts.
5413SHELL=$lt_SHELL
5414
5415# Whether or not to build shared libraries.
5416build_libtool_libs=$enable_shared
5417
5418# Whether or not to build static libraries.
5419build_old_libs=$enable_static
5420
5421# Whether or not to add -lc for building shared libraries.
5422build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
5423
5424# Whether or not to disallow shared libs when runtime libs are static
5425allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
5426
5427# Whether or not to optimize for fast installation.
5428fast_install=$enable_fast_install
5429
5430# The host system.
5431host_alias=$host_alias
5432host=$host
5433host_os=$host_os
5434
5435# The build system.
5436build_alias=$build_alias
5437build=$build
5438build_os=$build_os
5439
5440# An echo program that does not interpret backslashes.
5441echo=$lt_echo
5442
5443# The archiver.
5444AR=$lt_AR
5445AR_FLAGS=$lt_AR_FLAGS
5446
5447# A C compiler.
5448LTCC=$lt_LTCC
5449
5450# LTCC compiler flags.
5451LTCFLAGS=$lt_LTCFLAGS
5452
5453# A language-specific compiler.
5454CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
5455
5456# Is the compiler the GNU C compiler?
5457with_gcc=$_LT_AC_TAGVAR(GCC, $1)
5458
5459# An ERE matcher.
5460EGREP=$lt_EGREP
5461
5462# The linker used to build libraries.
5463LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
5464
5465# Whether we need hard or soft links.
5466LN_S=$lt_LN_S
5467
5468# A BSD-compatible nm program.
5469NM=$lt_NM
5470
5471# A symbol stripping program
5472STRIP=$lt_STRIP
5473
5474# Used to examine libraries when file_magic_cmd begins "file"
5475MAGIC_CMD=$MAGIC_CMD
5476
5477# Used on cygwin: DLL creation program.
5478DLLTOOL="$DLLTOOL"
5479
5480# Used on cygwin: object dumper.
5481OBJDUMP="$OBJDUMP"
5482
5483# Used on cygwin: assembler.
5484AS="$AS"
5485
5486# The name of the directory that contains temporary libtool files.
5487objdir=$objdir
5488
5489# How to create reloadable object files.
5490reload_flag=$lt_reload_flag
5491reload_cmds=$lt_reload_cmds
5492
5493# How to pass a linker flag through the compiler.
5494wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
5495
5496# Object file suffix (normally "o").
5497objext="$ac_objext"
5498
5499# Old archive suffix (normally "a").
5500libext="$libext"
5501
5502# Shared library suffix (normally ".so").
5503shrext_cmds='$shrext_cmds'
5504
5505# Executable file suffix (normally "").
5506exeext="$exeext"
5507
5508# Additional compiler flags for building library objects.
5509pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
5510pic_mode=$pic_mode
5511
5512# What is the maximum length of a command?
5513max_cmd_len=$lt_cv_sys_max_cmd_len
5514
5515# Does compiler simultaneously support -c and -o options?
5516compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
5517
5518# Must we lock files when doing compilation?
5519need_locks=$lt_need_locks
5520
5521# Do we need the lib prefix for modules?
5522need_lib_prefix=$need_lib_prefix
5523
5524# Do we need a version for libraries?
5525need_version=$need_version
5526
5527# Whether dlopen is supported.
5528dlopen_support=$enable_dlopen
5529
5530# Whether dlopen of programs is supported.
5531dlopen_self=$enable_dlopen_self
5532
5533# Whether dlopen of statically linked programs is supported.
5534dlopen_self_static=$enable_dlopen_self_static
5535
5536# Compiler flag to prevent dynamic linking.
5537link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
5538
5539# Compiler flag to turn off builtin functions.
5540no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
5541
5542# Compiler flag to allow reflexive dlopens.
5543export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
5544
5545# Compiler flag to generate shared objects directly from archives.
5546whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
5547
5548# Compiler flag to generate thread-safe objects.
5549thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
5550
5551# Library versioning type.
5552version_type=$version_type
5553
5554# Format of library name prefix.
5555libname_spec=$lt_libname_spec
5556
5557# List of archive names.  First name is the real one, the rest are links.
5558# The last name is the one that the linker finds with -lNAME.
5559library_names_spec=$lt_library_names_spec
5560
5561# The coded name of the library, if different from the real name.
5562soname_spec=$lt_soname_spec
5563
5564# Commands used to build and install an old-style archive.
5565RANLIB=$lt_RANLIB
5566old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
5567old_postinstall_cmds=$lt_old_postinstall_cmds
5568old_postuninstall_cmds=$lt_old_postuninstall_cmds
5569
5570# Create an old-style archive from a shared archive.
5571old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
5572
5573# Create a temporary old-style archive to link instead of a shared archive.
5574old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
5575
5576# Commands used to build and install a shared archive.
5577archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
5578archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
5579postinstall_cmds=$lt_postinstall_cmds
5580postuninstall_cmds=$lt_postuninstall_cmds
5581
5582# Commands used to build a loadable module (assumed same as above if empty)
5583module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
5584module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
5585
5586# Commands to strip libraries.
5587old_striplib=$lt_old_striplib
5588striplib=$lt_striplib
5589
5590# Dependencies to place before the objects being linked to create a
5591# shared library.
5592predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
5593
5594# Dependencies to place after the objects being linked to create a
5595# shared library.
5596postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
5597
5598# Dependencies to place before the objects being linked to create a
5599# shared library.
5600predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
5601
5602# Dependencies to place after the objects being linked to create a
5603# shared library.
5604postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
5605
5606# The library search path used internally by the compiler when linking
5607# a shared library.
5608compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
5609
5610# Method to check whether dependent libraries are shared objects.
5611deplibs_check_method=$lt_deplibs_check_method
5612
5613# Command to use when deplibs_check_method == file_magic.
5614file_magic_cmd=$lt_file_magic_cmd
5615
5616# Flag that allows shared libraries with undefined symbols to be built.
5617allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
5618
5619# Flag that forces no undefined symbols.
5620no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
5621
5622# Commands used to finish a libtool library installation in a directory.
5623finish_cmds=$lt_finish_cmds
5624
5625# Same as above, but a single script fragment to be evaled but not shown.
5626finish_eval=$lt_finish_eval
5627
5628# Take the output of nm and produce a listing of raw symbols and C names.
5629global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
5630
5631# Transform the output of nm in a proper C declaration
5632global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
5633
5634# Transform the output of nm in a C name address pair
5635global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
5636
5637# This is the shared library runtime path variable.
5638runpath_var=$runpath_var
5639
5640# This is the shared library path variable.
5641shlibpath_var=$shlibpath_var
5642
5643# Is shlibpath searched before the hard-coded library search path?
5644shlibpath_overrides_runpath=$shlibpath_overrides_runpath
5645
5646# How to hardcode a shared library path into an executable.
5647hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
5648
5649# Whether we should hardcode library paths into libraries.
5650hardcode_into_libs=$hardcode_into_libs
5651
5652# Flag to hardcode \$libdir into a binary during linking.
5653# This must work even if \$libdir does not exist.
5654hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
5655
5656# If ld is used when linking, flag to hardcode \$libdir into
5657# a binary during linking. This must work even if \$libdir does
5658# not exist.
5659hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
5660
5661# Whether we need a single -rpath flag with a separated argument.
5662hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
5663
5664# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
5665# resulting binary.
5666hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
5667
5668# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
5669# resulting binary.
5670hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
5671
5672# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
5673# the resulting binary.
5674hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
5675
5676# Set to yes if building a shared library automatically hardcodes DIR into the library
5677# and all subsequent libraries and executables linked against it.
5678hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
5679
5680# Variables whose values should be saved in libtool wrapper scripts and
5681# restored at relink time.
5682variables_saved_for_relink="$variables_saved_for_relink"
5683
5684# Whether libtool must link a program against all its dependency libraries.
5685link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
5686
5687# Compile-time system search path for libraries
5688sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
5689
5690# Run-time system search path for libraries
5691sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
5692
5693# Fix the shell variable \$srcfile for the compiler.
5694fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
5695
5696# Set to yes if exported symbols are required.
5697always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
5698
5699# The commands to list exported symbols.
5700export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
5701
5702# The commands to extract the exported symbol list from a shared archive.
5703extract_expsyms_cmds=$lt_extract_expsyms_cmds
5704
5705# Symbols that should not be listed in the preloaded symbols.
5706exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
5707
5708# Symbols that must always be exported.
5709include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
5710
5711ifelse([$1],[],
5712[# ### END LIBTOOL CONFIG],
5713[# ### END LIBTOOL TAG CONFIG: $tagname])
5714
5715__EOF__
5716
5717ifelse([$1],[], [
5718  case $host_os in
5719  aix3*)
5720    cat <<\EOF >> "$cfgfile"
5721
5722# AIX sometimes has problems with the GCC collect2 program.  For some
5723# reason, if we set the COLLECT_NAMES environment variable, the problems
5724# vanish in a puff of smoke.
5725if test "X${COLLECT_NAMES+set}" != Xset; then
5726  COLLECT_NAMES=
5727  export COLLECT_NAMES
5728fi
5729EOF
5730    ;;
5731  esac
5732
5733  # We use sed instead of cat because bash on DJGPP gets confused if
5734  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
5735  # text mode, it properly converts lines to CR/LF.  This bash problem
5736  # is reportedly fixed, but why not run on old versions too?
5737  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
5738
5739  mv -f "$cfgfile" "$ofile" || \
5740    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
5741  chmod +x "$ofile"
5742])
5743else
5744  # If there is no Makefile yet, we rely on a make rule to execute
5745  # `config.status --recheck' to rerun these tests and create the
5746  # libtool script then.
5747  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
5748  if test -f "$ltmain_in"; then
5749    test -f Makefile && make "$ltmain"
5750  fi
5751fi
5752])# AC_LIBTOOL_CONFIG
5753
5754
5755# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
5756# -------------------------------------------
5757AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
5758[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
5759
5760_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5761
5762if test "$GCC" = yes; then
5763  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5764
5765  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5766    lt_cv_prog_compiler_rtti_exceptions,
5767    [-fno-rtti -fno-exceptions], [],
5768    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5769fi
5770])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
5771
5772
5773# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5774# ---------------------------------
5775AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
5776[AC_REQUIRE([AC_CANONICAL_HOST])
5777AC_REQUIRE([AC_PROG_NM])
5778AC_REQUIRE([AC_OBJEXT])
5779# Check for command to grab the raw symbol name followed by C symbol from nm.
5780AC_MSG_CHECKING([command to parse $NM output from $compiler object])
5781AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5782[
5783# These are sane defaults that work on at least a few old systems.
5784# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
5785
5786# Character class describing NM global symbol codes.
5787symcode='[[BCDEGRST]]'
5788
5789# Regexp to match symbols that can be accessed directly from C.
5790sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5791
5792# Transform an extracted symbol line into a proper C declaration
5793lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
5794
5795# Transform an extracted symbol line into symbol name and symbol address
5796lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
5797
5798# Define system-specific variables.
5799case $host_os in
5800aix*)
5801  symcode='[[BCDT]]'
5802  ;;
5803cygwin* | mingw* | pw32*)
5804  symcode='[[ABCDGISTW]]'
5805  ;;
5806hpux*) # Its linker distinguishes data from code symbols
5807  if test "$host_cpu" = ia64; then
5808    symcode='[[ABCDEGRST]]'
5809  fi
5810  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5811  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
5812  ;;
5813linux*)
5814  if test "$host_cpu" = ia64; then
5815    symcode='[[ABCDGIRSTW]]'
5816    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5817    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
5818  fi
5819  ;;
5820irix* | nonstopux*)
5821  symcode='[[BCDEGRST]]'
5822  ;;
5823osf*)
5824  symcode='[[BCDEGQRST]]'
5825  ;;
5826solaris*)
5827  symcode='[[BDRT]]'
5828  ;;
5829sco3.2v5*)
5830  symcode='[[DT]]'
5831  ;;
5832sysv4.2uw2*)
5833  symcode='[[DT]]'
5834  ;;
5835sysv5* | sco5v6* | unixware* | OpenUNIX*)
5836  symcode='[[ABDT]]'
5837  ;;
5838sysv4)
5839  symcode='[[DFNSTU]]'
5840  ;;
5841esac
5842
5843# Handle CRLF in mingw tool chain
5844opt_cr=
5845case $build_os in
5846mingw*)
5847  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5848  ;;
5849esac
5850
5851# If we're using GNU nm, then use its standard symbol codes.
5852case `$NM -V 2>&1` in
5853*GNU* | *'with BFD'*)
5854  symcode='[[ABCDGIRSTW]]' ;;
5855esac
5856
5857# Try without a prefix undercore, then with it.
5858for ac_symprfx in "" "_"; do
5859
5860  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5861  symxfrm="\\1 $ac_symprfx\\2 \\2"
5862
5863  # Write the raw and C identifiers.
5864  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
5865
5866  # Check to see that the pipe works correctly.
5867  pipe_works=no
5868
5869  rm -f conftest*
5870  cat > conftest.$ac_ext <<EOF
5871#ifdef __cplusplus
5872extern "C" {
5873#endif
5874char nm_test_var;
5875void nm_test_func(){}
5876#ifdef __cplusplus
5877}
5878#endif
5879int main(){nm_test_var='a';nm_test_func();return(0);}
5880EOF
5881
5882  if AC_TRY_EVAL(ac_compile); then
5883    # Now try to grab the symbols.
5884    nlist=conftest.nm
5885    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
5886      # Try sorting and uniquifying the output.
5887      if sort "$nlist" | uniq > "$nlist"T; then
5888	mv -f "$nlist"T "$nlist"
5889      else
5890	rm -f "$nlist"T
5891      fi
5892
5893      # Make sure that we snagged all the symbols we need.
5894      if grep ' nm_test_var$' "$nlist" >/dev/null; then
5895	if grep ' nm_test_func$' "$nlist" >/dev/null; then
5896	  cat <<EOF > conftest.$ac_ext
5897#ifdef __cplusplus
5898extern "C" {
5899#endif
5900
5901EOF
5902	  # Now generate the symbol file.
5903	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
5904
5905	  cat <<EOF >> conftest.$ac_ext
5906#if defined (__STDC__) && __STDC__
5907# define lt_ptr_t void *
5908#else
5909# define lt_ptr_t char *
5910# define const
5911#endif
5912
5913/* The mapping between symbol names and symbols. */
5914const struct {
5915  const char *name;
5916  lt_ptr_t address;
5917}
5918lt_preloaded_symbols[[]] =
5919{
5920EOF
5921	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
5922	  cat <<\EOF >> conftest.$ac_ext
5923  {0, (lt_ptr_t) 0}
5924};
5925
5926#ifdef __cplusplus
5927}
5928#endif
5929EOF
5930	  # Now try linking the two files.
5931	  mv conftest.$ac_objext conftstm.$ac_objext
5932	  lt_save_LIBS="$LIBS"
5933	  lt_save_CFLAGS="$CFLAGS"
5934	  LIBS="conftstm.$ac_objext"
5935	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5936	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5937	    pipe_works=yes
5938	  fi
5939	  LIBS="$lt_save_LIBS"
5940	  CFLAGS="$lt_save_CFLAGS"
5941	else
5942	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5943	fi
5944      else
5945	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5946      fi
5947    else
5948      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5949    fi
5950  else
5951    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5952    cat conftest.$ac_ext >&5
5953  fi
5954  rm -f conftest* conftst*
5955
5956  # Do not use the global_symbol_pipe unless it works.
5957  if test "$pipe_works" = yes; then
5958    break
5959  else
5960    lt_cv_sys_global_symbol_pipe=
5961  fi
5962done
5963])
5964if test -z "$lt_cv_sys_global_symbol_pipe"; then
5965  lt_cv_sys_global_symbol_to_cdecl=
5966fi
5967if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5968  AC_MSG_RESULT(failed)
5969else
5970  AC_MSG_RESULT(ok)
5971fi
5972]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5973
5974
5975# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
5976# ---------------------------------------
5977AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
5978[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
5979_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5980_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
5981
5982AC_MSG_CHECKING([for $compiler option to produce PIC])
5983 ifelse([$1],[CXX],[
5984  # C++ specific cases for pic, static, wl, etc.
5985  if test "$GXX" = yes; then
5986    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5987    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5988
5989    case $host_os in
5990    aix*)
5991      # All AIX code is PIC.
5992      if test "$host_cpu" = ia64; then
5993	# AIX 5 now supports IA64 processor
5994	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5995      fi
5996      ;;
5997    amigaos*)
5998      # FIXME: we need at least 68020 code to build shared libraries, but
5999      # adding the `-m68020' flag to GCC prevents building anything better,
6000      # like `-m68040'.
6001      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6002      ;;
6003    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6004      # PIC is the default for these OSes.
6005      ;;
6006    mingw* | os2* | pw32*)
6007      # This hack is so that the source file can tell whether it is being
6008      # built for inclusion in a dll (and should export symbols for example).
6009      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
6010      ;;
6011    darwin* | rhapsody*)
6012      # PIC is the default on this platform
6013      # Common symbols not allowed in MH_DYLIB files
6014      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6015      ;;
6016    *djgpp*)
6017      # DJGPP does not support shared libraries at all
6018      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6019      ;;
6020    interix3*)
6021      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
6022      # Instead, we relocate shared libraries at runtime.
6023      ;;
6024    sysv4*MP*)
6025      if test -d /usr/nec; then
6026	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6027      fi
6028      ;;
6029    hpux*)
6030      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6031      # not for PA HP-UX.
6032      case $host_cpu in
6033      hppa*64*|ia64*)
6034	;;
6035      *)
6036	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6037	;;
6038      esac
6039      ;;
6040    *)
6041      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6042      ;;
6043    esac
6044  else
6045    case $host_os in
6046      aix4* | aix5*)
6047	# All AIX code is PIC.
6048	if test "$host_cpu" = ia64; then
6049	  # AIX 5 now supports IA64 processor
6050	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6051	else
6052	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6053	fi
6054	;;
6055      chorus*)
6056	case $cc_basename in
6057	cxch68*)
6058	  # Green Hills C++ Compiler
6059	  # _LT_AC_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"
6060	  ;;
6061	esac
6062	;;
6063       darwin*)
6064         # PIC is the default on this platform
6065         # Common symbols not allowed in MH_DYLIB files
6066         case $cc_basename in
6067           xlc*)
6068           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
6069           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6070           ;;
6071         esac
6072       ;;
6073      dgux*)
6074	case $cc_basename in
6075	  ec++*)
6076	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6077	    ;;
6078	  ghcx*)
6079	    # Green Hills C++ Compiler
6080	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6081	    ;;
6082	  *)
6083	    ;;
6084	esac
6085	;;
6086      freebsd* | kfreebsd*-gnu | dragonfly*)
6087	# FreeBSD uses GNU C++
6088	;;
6089      hpux9* | hpux10* | hpux11*)
6090	case $cc_basename in
6091	  CC*)
6092	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6093	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6094	    if test "$host_cpu" != ia64; then
6095	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6096	    fi
6097	    ;;
6098	  aCC*)
6099	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6100	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6101	    case $host_cpu in
6102	    hppa*64*|ia64*)
6103	      # +Z the default
6104	      ;;
6105	    *)
6106	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6107	      ;;
6108	    esac
6109	    ;;
6110	  *)
6111	    ;;
6112	esac
6113	;;
6114      interix*)
6115	# This is c89, which is MS Visual C++ (no shared libs)
6116	# Anyone wants to do a port?
6117	;;
6118      irix5* | irix6* | nonstopux*)
6119	case $cc_basename in
6120	  CC*)
6121	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6122	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6123	    # CC pic flag -KPIC is the default.
6124	    ;;
6125	  *)
6126	    ;;
6127	esac
6128	;;
6129      linux*)
6130	case $cc_basename in
6131	  KCC*)
6132	    # KAI C++ Compiler
6133	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6134	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6135	    ;;
6136	  icpc* | ecpc*)
6137	    # Intel C++
6138	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6139	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6140	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6141	    ;;
6142	  pgCC*)
6143	    # Portland Group C++ compiler.
6144	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6145	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6146	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6147	    ;;
6148	  cxx*)
6149	    # Compaq C++
6150	    # Make sure the PIC flag is empty.  It appears that all Alpha
6151	    # Linux and Compaq Tru64 Unix objects are PIC.
6152	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6153	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6154	    ;;
6155	  *)
6156	    ;;
6157	esac
6158	;;
6159      lynxos*)
6160	;;
6161      m88k*)
6162	;;
6163      mvs*)
6164	case $cc_basename in
6165	  cxx*)
6166	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
6167	    ;;
6168	  *)
6169	    ;;
6170	esac
6171	;;
6172      netbsd*)
6173	;;
6174      osf3* | osf4* | osf5*)
6175	case $cc_basename in
6176	  KCC*)
6177	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6178	    ;;
6179	  RCC*)
6180	    # Rational C++ 2.4.1
6181	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6182	    ;;
6183	  cxx*)
6184	    # Digital/Compaq C++
6185	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6186	    # Make sure the PIC flag is empty.  It appears that all Alpha
6187	    # Linux and Compaq Tru64 Unix objects are PIC.
6188	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6189	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6190	    ;;
6191	  *)
6192	    ;;
6193	esac
6194	;;
6195      psos*)
6196	;;
6197      solaris*)
6198	case $cc_basename in
6199	  CC*)
6200	    # Sun C++ 4.2, 5.x and Centerline C++
6201	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6202	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6203	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6204	    ;;
6205	  gcx*)
6206	    # Green Hills C++ Compiler
6207	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6208	    ;;
6209	  *)
6210	    ;;
6211	esac
6212	;;
6213      sunos4*)
6214	case $cc_basename in
6215	  CC*)
6216	    # Sun C++ 4.x
6217	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6218	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6219	    ;;
6220	  lcc*)
6221	    # Lucid
6222	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6223	    ;;
6224	  *)
6225	    ;;
6226	esac
6227	;;
6228      tandem*)
6229	case $cc_basename in
6230	  NCC*)
6231	    # NonStop-UX NCC 3.20
6232	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6233	    ;;
6234	  *)
6235	    ;;
6236	esac
6237	;;
6238      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6239	case $cc_basename in
6240	  CC*)
6241	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6242	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6243	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6244	    ;;
6245	esac
6246	;;
6247      vxworks*)
6248	;;
6249      *)
6250	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6251	;;
6252    esac
6253  fi
6254],
6255[
6256  if test "$GCC" = yes; then
6257    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6258    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6259
6260    case $host_os in
6261      aix*)
6262      # All AIX code is PIC.
6263      if test "$host_cpu" = ia64; then
6264	# AIX 5 now supports IA64 processor
6265	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6266      fi
6267      ;;
6268
6269    amigaos*)
6270      # FIXME: we need at least 68020 code to build shared libraries, but
6271      # adding the `-m68020' flag to GCC prevents building anything better,
6272      # like `-m68040'.
6273      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6274      ;;
6275
6276    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6277      # PIC is the default for these OSes.
6278      ;;
6279
6280    mingw* | pw32* | os2*)
6281      # This hack is so that the source file can tell whether it is being
6282      # built for inclusion in a dll (and should export symbols for example).
6283      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
6284      ;;
6285
6286    darwin* | rhapsody*)
6287      # PIC is the default on this platform
6288      # Common symbols not allowed in MH_DYLIB files
6289      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6290      ;;
6291
6292    interix3*)
6293      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
6294      # Instead, we relocate shared libraries at runtime.
6295      ;;
6296
6297    msdosdjgpp*)
6298      # Just because we use GCC doesn't mean we suddenly get shared libraries
6299      # on systems that don't support them.
6300      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6301      enable_shared=no
6302      ;;
6303
6304    sysv4*MP*)
6305      if test -d /usr/nec; then
6306	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6307      fi
6308      ;;
6309
6310    hpux*)
6311      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6312      # not for PA HP-UX.
6313      case $host_cpu in
6314      hppa*64*|ia64*)
6315	# +Z the default
6316	;;
6317      *)
6318	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6319	;;
6320      esac
6321      ;;
6322
6323    *)
6324      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6325      ;;
6326    esac
6327  else
6328    # PORTME Check for flag to pass linker flags through the system compiler.
6329    case $host_os in
6330    aix*)
6331      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6332      if test "$host_cpu" = ia64; then
6333	# AIX 5 now supports IA64 processor
6334	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6335      else
6336	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6337      fi
6338      ;;
6339      darwin*)
6340        # PIC is the default on this platform
6341        # Common symbols not allowed in MH_DYLIB files
6342       case $cc_basename in
6343         xlc*)
6344         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
6345         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6346         ;;
6347       esac
6348       ;;
6349
6350    mingw* | pw32* | os2*)
6351      # This hack is so that the source file can tell whether it is being
6352      # built for inclusion in a dll (and should export symbols for example).
6353      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
6354      ;;
6355
6356    hpux9* | hpux10* | hpux11*)
6357      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6358      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6359      # not for PA HP-UX.
6360      case $host_cpu in
6361      hppa*64*|ia64*)
6362	# +Z the default
6363	;;
6364      *)
6365	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6366	;;
6367      esac
6368      # Is there a better lt_prog_compiler_static that works with the bundled CC?
6369      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6370      ;;
6371
6372    irix5* | irix6* | nonstopux*)
6373      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6374      # PIC (with -KPIC) is the default.
6375      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6376      ;;
6377
6378    newsos6)
6379      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6380      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6381      ;;
6382
6383    linux*)
6384      case $cc_basename in
6385      icc* | ecc*)
6386	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6387	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6388	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6389        ;;
6390      pgcc* | pgf77* | pgf90* | pgf95*)
6391        # Portland Group compilers (*not* the Pentium gcc compiler,
6392	# which looks to be a dead project)
6393	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6394	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6395	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6396        ;;
6397      ccc*)
6398        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6399        # All Alpha code is PIC.
6400        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6401        ;;
6402      esac
6403      ;;
6404
6405    osf3* | osf4* | osf5*)
6406      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6407      # All OSF/1 code is PIC.
6408      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6409      ;;
6410
6411    solaris*)
6412      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6413      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6414      case $cc_basename in
6415      f77* | f90* | f95*)
6416	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
6417      *)
6418	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
6419      esac
6420      ;;
6421
6422    sunos4*)
6423      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6424      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6425      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6426      ;;
6427
6428    sysv4 | sysv4.2uw2* | sysv4.3*)
6429      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6430      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6431      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6432      ;;
6433
6434    sysv4*MP*)
6435      if test -d /usr/nec ;then
6436	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
6437	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6438      fi
6439      ;;
6440
6441    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6442      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6443      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6444      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6445      ;;
6446
6447    unicos*)
6448      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6449      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6450      ;;
6451
6452    uts4*)
6453      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6454      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6455      ;;
6456
6457    *)
6458      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6459      ;;
6460    esac
6461  fi
6462])
6463AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
6464
6465#
6466# Check to make sure the PIC flag actually works.
6467#
6468if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
6469  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
6470    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
6471    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
6472    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
6473     "" | " "*) ;;
6474     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
6475     esac],
6476    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6477     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
6478fi
6479case $host_os in
6480  # For platforms which do not support PIC, -DPIC is meaningless:
6481  *djgpp*)
6482    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6483    ;;
6484  *)
6485    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
6486    ;;
6487esac
6488
6489#
6490# Check to make sure the static flag actually works.
6491#
6492wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
6493AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
6494  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
6495  $lt_tmp_static_flag,
6496  [],
6497  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
6498])
6499
6500
6501# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
6502# ------------------------------------
6503# See if the linker supports building shared libraries.
6504AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
6505[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6506ifelse([$1],[CXX],[
6507  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6508  case $host_os in
6509  aix4* | aix5*)
6510    # If we're using GNU nm, then we don't want the "-C" option.
6511    # -C means demangle to AIX nm, but means don't demangle with GNU nm
6512    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6513      _LT_AC_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'
6514    else
6515      _LT_AC_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'
6516    fi
6517    ;;
6518  pw32*)
6519    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
6520  ;;
6521  cygwin* | mingw*)
6522    _LT_AC_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'
6523  ;;
6524  *)
6525    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6526  ;;
6527  esac
6528],[
6529  runpath_var=
6530  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6531  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6532  _LT_AC_TAGVAR(archive_cmds, $1)=
6533  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
6534  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
6535  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
6536  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
6537  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6538  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
6539  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6540  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6541  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6542  _LT_AC_TAGVAR(hardcode_direct, $1)=no
6543  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6544  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6545  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
6546  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
6547  _LT_AC_TAGVAR(module_cmds, $1)=
6548  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
6549  _LT_AC_TAGVAR(always_export_symbols, $1)=no
6550  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6551  # include_expsyms should be a list of space-separated symbols to be *always*
6552  # included in the symbol list
6553  _LT_AC_TAGVAR(include_expsyms, $1)=
6554  # exclude_expsyms can be an extended regexp of symbols to exclude
6555  # it will be wrapped by ` (' and `)$', so one must not match beginning or
6556  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
6557  # as well as any symbol that contains `d'.
6558  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
6559  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
6560  # platforms (ab)use it in PIC code, but their linkers get confused if
6561  # the symbol is explicitly referenced.  Since portable code cannot
6562  # rely on this symbol name, it's probably fine to never include it in
6563  # preloaded symbol tables.
6564  extract_expsyms_cmds=
6565  # Just being paranoid about ensuring that cc_basename is set.
6566  _LT_CC_BASENAME([$compiler])
6567  case $host_os in
6568  cygwin* | mingw* | pw32*)
6569    # FIXME: the MSVC++ port hasn't been tested in a loooong time
6570    # When not using gcc, we currently assume that we are using
6571    # Microsoft Visual C++.
6572    if test "$GCC" != yes; then
6573      with_gnu_ld=no
6574    fi
6575    ;;
6576  interix*)
6577    # we just hope/assume this is gcc and not c89 (= MSVC++)
6578    with_gnu_ld=yes
6579    ;;
6580  openbsd*)
6581    with_gnu_ld=no
6582    ;;
6583  esac
6584
6585  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
6586  if test "$with_gnu_ld" = yes; then
6587    # If archive_cmds runs LD, not CC, wlarc should be empty
6588    wlarc='${wl}'
6589
6590    # Set some defaults for GNU ld with shared library support. These
6591    # are reset later if shared libraries are not supported. Putting them
6592    # here allows them to be overridden if necessary.
6593    runpath_var=LD_RUN_PATH
6594    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6595    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6596    # ancient GNU ld didn't support --whole-archive et. al.
6597    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
6598	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6599      else
6600  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6601    fi
6602    supports_anon_versioning=no
6603    case `$LD -v 2>/dev/null` in
6604      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6605      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6606      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6607      *\ 2.11.*) ;; # other 2.11 versions
6608      *) supports_anon_versioning=yes ;;
6609    esac
6610
6611    # See if GNU ld supports shared libraries.
6612    case $host_os in
6613    aix3* | aix4* | aix5*)
6614      # On AIX/PPC, the GNU linker is very broken
6615      if test "$host_cpu" != ia64; then
6616	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6617	cat <<EOF 1>&2
6618
6619*** Warning: the GNU linker, at least up to release 2.9.1, is reported
6620*** to be unable to reliably create shared libraries on AIX.
6621*** Therefore, libtool is disabling shared libraries support.  If you
6622*** really care for shared libraries, you may want to modify your PATH
6623*** so that a non-GNU linker is found, and then restart.
6624
6625EOF
6626      fi
6627      ;;
6628
6629    amigaos*)
6630      _LT_AC_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)'
6631      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6632      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6633
6634      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
6635      # that the semantics of dynamic libraries on AmigaOS, at least up
6636      # to version 4, is to share data among multiple programs linked
6637      # with the same dynamic library.  Since this doesn't match the
6638      # behavior of shared libraries on other platforms, we can't use
6639      # them.
6640      _LT_AC_TAGVAR(ld_shlibs, $1)=no
6641      ;;
6642
6643    beos*)
6644      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6645	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6646	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6647	# support --undefined.  This deserves some investigation.  FIXME
6648	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6649      else
6650	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6651      fi
6652      ;;
6653
6654    cygwin* | mingw* | pw32*)
6655      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6656      # as there is no search path for DLLs.
6657      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6658      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6659      _LT_AC_TAGVAR(always_export_symbols, $1)=no
6660      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6661      _LT_AC_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'
6662
6663      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
6664        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6665	# If the export-symbols file already is a .def file (1st line
6666	# is EXPORTS), use it as is; otherwise, prepend...
6667	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6668	  cp $export_symbols $output_objdir/$soname.def;
6669	else
6670	  echo EXPORTS > $output_objdir/$soname.def;
6671	  cat $export_symbols >> $output_objdir/$soname.def;
6672	fi~
6673	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6674      else
6675	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6676      fi
6677      ;;
6678
6679    interix3*)
6680      _LT_AC_TAGVAR(hardcode_direct, $1)=no
6681      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6682      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6683      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6684      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6685      # Instead, shared libraries are loaded at an image base (0x10000000 by
6686      # default) and relocated if they conflict, which is a slow very memory
6687      # consuming and fragmenting process.  To avoid this, we pick a random,
6688      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6689      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
6690      _LT_AC_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'
6691      _LT_AC_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'
6692      ;;
6693
6694    linux*)
6695      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6696	tmp_addflag=
6697	case $cc_basename,$host_cpu in
6698	pgcc*)				# Portland Group C compiler
6699	  _LT_AC_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'
6700	  tmp_addflag=' $pic_flag'
6701	  ;;
6702	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
6703	  _LT_AC_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'
6704	  tmp_addflag=' $pic_flag -Mnomain' ;;
6705	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
6706	  tmp_addflag=' -i_dynamic' ;;
6707	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
6708	  tmp_addflag=' -i_dynamic -nofor_main' ;;
6709	ifc* | ifort*)			# Intel Fortran compiler
6710	  tmp_addflag=' -nofor_main' ;;
6711	esac
6712	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6713
6714	if test $supports_anon_versioning = yes; then
6715	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
6716  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6717  $echo "local: *; };" >> $output_objdir/$libname.ver~
6718	  $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6719	fi
6720      else
6721	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6722      fi
6723      ;;
6724
6725    netbsd*)
6726      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6727	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6728	wlarc=
6729      else
6730	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6731	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6732      fi
6733      ;;
6734
6735    solaris*)
6736      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
6737	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6738	cat <<EOF 1>&2
6739
6740*** Warning: The releases 2.8.* of the GNU linker cannot reliably
6741*** create shared libraries on Solaris systems.  Therefore, libtool
6742*** is disabling shared libraries support.  We urge you to upgrade GNU
6743*** binutils to release 2.9.1 or newer.  Another option is to modify
6744*** your PATH or compiler configuration so that the native linker is
6745*** used, and then restart.
6746
6747EOF
6748      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6749	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6750	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6751      else
6752	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6753      fi
6754      ;;
6755
6756    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
6757      case `$LD -v 2>&1` in
6758        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 
6759	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6760	cat <<_LT_EOF 1>&2
6761
6762*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
6763*** reliably create shared libraries on SCO systems.  Therefore, libtool
6764*** is disabling shared libraries support.  We urge you to upgrade GNU
6765*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
6766*** your PATH or compiler configuration so that the native linker is
6767*** used, and then restart.
6768
6769_LT_EOF
6770	;;
6771	*)
6772	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6773	    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
6774	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
6775	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
6776	  else
6777	    _LT_AC_TAGVAR(ld_shlibs, $1)=no
6778	  fi
6779	;;
6780      esac
6781      ;;
6782
6783    sunos4*)
6784      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6785      wlarc=
6786      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6787      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6788      ;;
6789
6790    *)
6791      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6792	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6793	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6794      else
6795	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6796      fi
6797      ;;
6798    esac
6799
6800    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
6801      runpath_var=
6802      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6803      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
6804      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6805    fi
6806  else
6807    # PORTME fill in a description of your system's linker (not GNU ld)
6808    case $host_os in
6809    aix3*)
6810      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6811      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6812      _LT_AC_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'
6813      # Note: this linker hardcodes the directories in LIBPATH if there
6814      # are no directories specified by -L.
6815      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6816      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
6817	# Neither direct hardcoding nor static linking is supported with a
6818	# broken collect2.
6819	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6820      fi
6821      ;;
6822
6823    aix4* | aix5*)
6824      if test "$host_cpu" = ia64; then
6825	# On IA64, the linker does run time linking by default, so we don't
6826	# have to do anything special.
6827	aix_use_runtimelinking=no
6828	exp_sym_flag='-Bexport'
6829	no_entry_flag=""
6830      else
6831	# If we're using GNU nm, then we don't want the "-C" option.
6832	# -C means demangle to AIX nm, but means don't demangle with GNU nm
6833	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6834	  _LT_AC_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'
6835	else
6836	  _LT_AC_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'
6837	fi
6838	aix_use_runtimelinking=no
6839
6840	# Test if we are trying to use run time linking or normal
6841	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
6842	# need to do runtime linking.
6843	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
6844	  for ld_flag in $LDFLAGS; do
6845  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6846  	    aix_use_runtimelinking=yes
6847  	    break
6848  	  fi
6849	  done
6850	  ;;
6851	esac
6852
6853	exp_sym_flag='-bexport'
6854	no_entry_flag='-bnoentry'
6855      fi
6856
6857      # When large executables or shared objects are built, AIX ld can
6858      # have problems creating the table of contents.  If linking a library
6859      # or program results in "error TOC overflow" add -mminimal-toc to
6860      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6861      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6862
6863      _LT_AC_TAGVAR(archive_cmds, $1)=''
6864      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6865      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6866      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6867
6868      if test "$GCC" = yes; then
6869	case $host_os in aix4.[[012]]|aix4.[[012]].*)
6870	# We only want to do this on AIX 4.2 and lower, the check
6871	# below for broken collect2 doesn't work under 4.3+
6872	  collect2name=`${CC} -print-prog-name=collect2`
6873	  if test -f "$collect2name" && \
6874  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
6875	  then
6876  	  # We have reworked collect2
6877  	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6878	  else
6879  	  # We have old collect2
6880  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6881  	  # It fails to find uninstalled libraries when the uninstalled
6882  	  # path is not listed in the libpath.  Setting hardcode_minus_L
6883  	  # to unsupported forces relinking
6884  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6885  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6886  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6887	  fi
6888	  ;;
6889	esac
6890	shared_flag='-shared'
6891	if test "$aix_use_runtimelinking" = yes; then
6892	  shared_flag="$shared_flag "'${wl}-G'
6893	fi
6894      else
6895	# not using gcc
6896	if test "$host_cpu" = ia64; then
6897  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6898  	# chokes on -Wl,-G. The following line is correct:
6899	  shared_flag='-G'
6900	else
6901	  if test "$aix_use_runtimelinking" = yes; then
6902	    shared_flag='${wl}-G'
6903	  else
6904	    shared_flag='${wl}-bM:SRE'
6905	  fi
6906	fi
6907      fi
6908
6909      # It seems that -bexpall does not export symbols beginning with
6910      # underscore (_), so it is better to generate a list of symbols to export.
6911      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6912      if test "$aix_use_runtimelinking" = yes; then
6913	# Warning - without using the other runtime loading flags (-brtl),
6914	# -berok will link without error, but may produce a broken library.
6915	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
6916       # Determine the default libpath from the value encoded in an empty executable.
6917       _LT_AC_SYS_LIBPATH_AIX
6918       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6919	_LT_AC_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 "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6920       else
6921	if test "$host_cpu" = ia64; then
6922	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6923	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6924	  _LT_AC_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"
6925	else
6926	 # Determine the default libpath from the value encoded in an empty executable.
6927	 _LT_AC_SYS_LIBPATH_AIX
6928	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6929	  # Warning - without using the other run time loading flags,
6930	  # -berok will link without error, but may produce a broken library.
6931	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6932	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6933	  # Exported symbols can be pulled into shared objects from archives
6934	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6935	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6936	  # This is similar to how AIX traditionally builds its shared libraries.
6937	  _LT_AC_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'
6938	fi
6939      fi
6940      ;;
6941
6942    amigaos*)
6943      _LT_AC_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)'
6944      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6945      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6946      # see comment about different semantics on the GNU ld section
6947      _LT_AC_TAGVAR(ld_shlibs, $1)=no
6948      ;;
6949
6950    bsdi[[45]]*)
6951      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6952      ;;
6953
6954    cygwin* | mingw* | pw32*)
6955      # When not using gcc, we currently assume that we are using
6956      # Microsoft Visual C++.
6957      # hardcode_libdir_flag_spec is actually meaningless, as there is
6958      # no search path for DLLs.
6959      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6960      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6961      # Tell ltmain to make .lib files, not .a files.
6962      libext=lib
6963      # Tell ltmain to make .dll files, not .so files.
6964      shrext_cmds=".dll"
6965      # FIXME: Setting linknames here is a bad hack.
6966      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
6967      # The linker will automatically build a .lib file if we build a DLL.
6968      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
6969      # FIXME: Should let the user specify the lib program.
6970      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
6971      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
6972      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6973      ;;
6974
6975    darwin* | rhapsody*)
6976      case $host_os in
6977        rhapsody* | darwin1.[[012]])
6978         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
6979         ;;
6980       *) # Darwin 1.3 on
6981         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
6982           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
6983         else
6984           case ${MACOSX_DEPLOYMENT_TARGET} in
6985             10.[[012]])
6986               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
6987               ;;
6988             10.*)
6989               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
6990               ;;
6991           esac
6992         fi
6993         ;;
6994      esac
6995      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6996      _LT_AC_TAGVAR(hardcode_direct, $1)=no
6997      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
6998      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6999      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
7000      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7001    if test "$GCC" = yes ; then
7002    	output_verbose_link_cmd='echo'
7003        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
7004      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
7005      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
7006      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
7007      _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
7008    else
7009      case $cc_basename in
7010        xlc*)
7011         output_verbose_link_cmd='echo'
7012         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
7013         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
7014          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
7015         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
7016          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
7017          ;;
7018       *)
7019         _LT_AC_TAGVAR(ld_shlibs, $1)=no
7020          ;;
7021      esac
7022    fi
7023      ;;
7024
7025    dgux*)
7026      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7027      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7028      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7029      ;;
7030
7031    freebsd1*)
7032      _LT_AC_TAGVAR(ld_shlibs, $1)=no
7033      ;;
7034
7035    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
7036    # support.  Future versions do this automatically, but an explicit c++rt0.o
7037    # does not break anything, and helps significantly (at the cost of a little
7038    # extra space).
7039    freebsd2.2*)
7040      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
7041      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7042      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7043      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7044      ;;
7045
7046    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
7047    freebsd2*)
7048      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7049      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7050      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7051      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7052      ;;
7053
7054    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
7055    freebsd* | kfreebsd*-gnu | dragonfly*)
7056      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
7057      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7058      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7059      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7060      ;;
7061
7062    hpux9*)
7063      if test "$GCC" = yes; then
7064	_LT_AC_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'
7065      else
7066	_LT_AC_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'
7067      fi
7068      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7069      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7070      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7071
7072      # hardcode_minus_L: Not really in the search PATH,
7073      # but as the default location of the library.
7074      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7075      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7076      ;;
7077
7078    hpux10*)
7079      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
7080	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7081      else
7082	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
7083      fi
7084      if test "$with_gnu_ld" = no; then
7085	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7086	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7087
7088	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
7089	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7090
7091	# hardcode_minus_L: Not really in the search PATH,
7092	# but as the default location of the library.
7093	_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7094      fi
7095      ;;
7096
7097    hpux11*)
7098      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
7099	case $host_cpu in
7100	hppa*64*)
7101	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7102	  ;;
7103	ia64*)
7104	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7105	  ;;
7106	*)
7107	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7108	  ;;
7109	esac
7110      else
7111	case $host_cpu in
7112	hppa*64*)
7113	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7114	  ;;
7115	ia64*)
7116	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7117	  ;;
7118	*)
7119	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7120	  ;;
7121	esac
7122      fi
7123      if test "$with_gnu_ld" = no; then
7124	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7125	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7126
7127	case $host_cpu in
7128	hppa*64*|ia64*)
7129	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
7130	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
7131	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7132	  ;;
7133	*)
7134	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7135	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7136
7137	  # hardcode_minus_L: Not really in the search PATH,
7138	  # but as the default location of the library.
7139	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7140	  ;;
7141	esac
7142      fi
7143      ;;
7144
7145    irix5* | irix6* | nonstopux*)
7146      if test "$GCC" = yes; then
7147	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7148      else
7149	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
7150	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
7151      fi
7152      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7153      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7154      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7155      ;;
7156
7157    netbsd*)
7158      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
7159	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
7160      else
7161	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
7162      fi
7163      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7164      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7165      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7166      ;;
7167
7168    newsos6)
7169      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7170      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7171      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7172      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7173      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7174      ;;
7175
7176    openbsd*)
7177      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7178      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7179      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7180	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7181	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
7182	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7183	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7184      else
7185       case $host_os in
7186	 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
7187	   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7188	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7189	   ;;
7190	 *)
7191	   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7192	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7193	   ;;
7194       esac
7195      fi
7196      ;;
7197
7198    os2*)
7199      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7200      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7201      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7202      _LT_AC_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'
7203      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
7204      ;;
7205
7206    osf3*)
7207      if test "$GCC" = yes; then
7208	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7209	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7210      else
7211	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7212	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
7213      fi
7214      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7215      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7216      ;;
7217
7218    osf4* | osf5*)	# as osf3* with the addition of -msym flag
7219      if test "$GCC" = yes; then
7220	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7221	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7222	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7223      else
7224	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7225	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
7226	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
7227	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
7228
7229	# Both c and cxx compiler support -rpath directly
7230	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7231      fi
7232      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7233      ;;
7234
7235    solaris*)
7236      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
7237      if test "$GCC" = yes; then
7238	wlarc='${wl}'
7239	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7240	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
7241	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
7242      else
7243	wlarc=''
7244	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
7245	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
7246  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
7247      fi
7248      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7249      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7250      case $host_os in
7251      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7252      *)
7253 	# The compiler driver will combine linker options so we
7254 	# cannot just pass the convience library names through
7255 	# without $wl, iff we do not link with $LD.
7256 	# Luckily, gcc supports the same syntax we need for Sun Studio.
7257 	# Supported since Solaris 2.6 (maybe 2.5.1?)
7258 	case $wlarc in
7259 	'')
7260 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
7261 	*)
7262 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
7263 	esac ;;
7264      esac
7265      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7266      ;;
7267
7268    sunos4*)
7269      if test "x$host_vendor" = xsequent; then
7270	# Use $CC to link under sequent, because it throws in some extra .o
7271	# files that make .init and .fini sections work.
7272	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
7273      else
7274	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
7275      fi
7276      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7277      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7278      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7279      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7280      ;;
7281
7282    sysv4)
7283      case $host_vendor in
7284	sni)
7285	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7286	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
7287	;;
7288	siemens)
7289	  ## LD is ld it makes a PLAMLIB
7290	  ## CC just makes a GrossModule.
7291	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
7292	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
7293	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
7294        ;;
7295	motorola)
7296	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7297	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
7298	;;
7299      esac
7300      runpath_var='LD_RUN_PATH'
7301      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7302      ;;
7303
7304    sysv4.3*)
7305      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7306      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7307      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
7308      ;;
7309
7310    sysv4*MP*)
7311      if test -d /usr/nec; then
7312	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7313	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7314	runpath_var=LD_RUN_PATH
7315	hardcode_runpath_var=yes
7316	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
7317      fi
7318      ;;
7319
7320    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
7321      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7322      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7323      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7324      runpath_var='LD_RUN_PATH'
7325
7326      if test "$GCC" = yes; then
7327	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7328	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7329      else
7330	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7331	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7332      fi
7333      ;;
7334
7335    sysv5* | sco3.2v5* | sco5v6*)
7336      # Note: We can NOT use -z defs as we might desire, because we do not
7337      # link with -lc, and that would cause any symbols used from libc to
7338      # always be unresolved, which means just about no library would
7339      # ever link correctly.  If we're not using GNU ld we use -z text
7340      # though, which does catch some bad symbols but isn't as heavy-handed
7341      # as -z defs.
7342      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7343      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7344      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7345      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7346      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
7347      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
7348      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7349      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7350      runpath_var='LD_RUN_PATH'
7351
7352      if test "$GCC" = yes; then
7353	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7354	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7355      else
7356	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7357	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7358      fi
7359      ;;
7360
7361    uts4*)
7362      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7363      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7364      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7365      ;;
7366
7367    *)
7368      _LT_AC_TAGVAR(ld_shlibs, $1)=no
7369      ;;
7370    esac
7371  fi
7372])
7373AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
7374test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7375
7376#
7377# Do we need to explicitly link libc?
7378#
7379case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
7380x|xyes)
7381  # Assume -lc should be added
7382  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7383
7384  if test "$enable_shared" = yes && test "$GCC" = yes; then
7385    case $_LT_AC_TAGVAR(archive_cmds, $1) in
7386    *'~'*)
7387      # FIXME: we may have to deal with multi-command sequences.
7388      ;;
7389    '$CC '*)
7390      # Test whether the compiler implicitly links with -lc since on some
7391      # systems, -lgcc has to come before -lc. If gcc already passes -lc
7392      # to ld, don't add -lc before -lgcc.
7393      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
7394      $rm conftest*
7395      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
7396
7397      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
7398        soname=conftest
7399        lib=conftest
7400        libobjs=conftest.$ac_objext
7401        deplibs=
7402        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
7403	pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
7404        compiler_flags=-v
7405        linker_flags=-v
7406        verstring=
7407        output_objdir=.
7408        libname=conftest
7409        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
7410        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
7411        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
7412        then
7413	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7414        else
7415	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7416        fi
7417        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
7418      else
7419        cat conftest.err 1>&5
7420      fi
7421      $rm conftest*
7422      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
7423      ;;
7424    esac
7425  fi
7426  ;;
7427esac
7428])# AC_LIBTOOL_PROG_LD_SHLIBS
7429
7430
7431# _LT_AC_FILE_LTDLL_C
7432# -------------------
7433# Be careful that the start marker always follows a newline.
7434AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
7435# /* ltdll.c starts here */
7436# #define WIN32_LEAN_AND_MEAN
7437# #include <windows.h>
7438# #undef WIN32_LEAN_AND_MEAN
7439# #include <stdio.h>
7440#
7441# #ifndef __CYGWIN__
7442# #  ifdef __CYGWIN32__
7443# #    define __CYGWIN__ __CYGWIN32__
7444# #  endif
7445# #endif
7446#
7447# #ifdef __cplusplus
7448# extern "C" {
7449# #endif
7450# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7451# #ifdef __cplusplus
7452# }
7453# #endif
7454#
7455# #ifdef __CYGWIN__
7456# #include <cygwin/cygwin_dll.h>
7457# DECLARE_CYGWIN_DLL( DllMain );
7458# #endif
7459# HINSTANCE __hDllInstance_base;
7460#
7461# BOOL APIENTRY
7462# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7463# {
7464#   __hDllInstance_base = hInst;
7465#   return TRUE;
7466# }
7467# /* ltdll.c ends here */
7468])# _LT_AC_FILE_LTDLL_C
7469
7470
7471# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
7472# ---------------------------------
7473AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
7474
7475
7476# old names
7477AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
7478AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
7479AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
7480AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
7481AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
7482AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
7483AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
7484
7485# This is just to silence aclocal about the macro not being used
7486ifelse([AC_DISABLE_FAST_INSTALL])
7487
7488AC_DEFUN([LT_AC_PROG_GCJ],
7489[AC_CHECK_TOOL(GCJ, gcj, no)
7490  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7491  AC_SUBST(GCJFLAGS)
7492])
7493
7494AC_DEFUN([LT_AC_PROG_RC],
7495[AC_CHECK_TOOL(RC, windres, no)
7496])
7497
7498# NOTE: This macro has been submitted for inclusion into   #
7499#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
7500#  a released version of Autoconf we should remove this    #
7501#  macro and use it instead.                               #
7502# LT_AC_PROG_SED
7503# --------------
7504# Check for a fully-functional sed program, that truncates
7505# as few characters as possible.  Prefer GNU sed if found.
7506AC_DEFUN([LT_AC_PROG_SED],
7507[AC_MSG_CHECKING([for a sed that does not truncate output])
7508AC_CACHE_VAL(lt_cv_path_SED,
7509[# Loop through the user's path and test for sed and gsed.
7510# Then use that list of sed's as ones to test for truncation.
7511as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7512for as_dir in $PATH
7513do
7514  IFS=$as_save_IFS
7515  test -z "$as_dir" && as_dir=.
7516  for lt_ac_prog in sed gsed; do
7517    for ac_exec_ext in '' $ac_executable_extensions; do
7518      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7519        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7520      fi
7521    done
7522  done
7523done
7524lt_ac_max=0
7525lt_ac_count=0
7526# Add /usr/xpg4/bin/sed as it is typically found on Solaris
7527# along with /bin/sed that truncates output.
7528for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7529  test ! -f $lt_ac_sed && continue
7530  cat /dev/null > conftest.in
7531  lt_ac_count=0
7532  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7533  # Check for GNU sed and select it if it is found.
7534  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7535    lt_cv_path_SED=$lt_ac_sed
7536    break
7537  fi
7538  while true; do
7539    cat conftest.in conftest.in >conftest.tmp
7540    mv conftest.tmp conftest.in
7541    cp conftest.in conftest.nl
7542    echo >>conftest.nl
7543    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7544    cmp -s conftest.out conftest.nl || break
7545    # 10000 chars as input seems more than enough
7546    test $lt_ac_count -gt 10 && break
7547    lt_ac_count=`expr $lt_ac_count + 1`
7548    if test $lt_ac_count -gt $lt_ac_max; then
7549      lt_ac_max=$lt_ac_count
7550      lt_cv_path_SED=$lt_ac_sed
7551    fi
7552  done
7553done
7554])
7555SED=$lt_cv_path_SED
7556AC_MSG_RESULT([$SED])
7557])
7558
7559# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
7560# From Jim Meyering
7561
7562# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
7563# Free Software Foundation, Inc.
7564#
7565# This file is free software; the Free Software Foundation
7566# gives unlimited permission to copy and/or distribute it,
7567# with or without modifications, as long as this notice is preserved.
7568
7569# serial 4
7570
7571AC_DEFUN([AM_MAINTAINER_MODE],
7572[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
7573  dnl maintainer-mode is disabled by default
7574  AC_ARG_ENABLE(maintainer-mode,
7575[  --enable-maintainer-mode  enable make rules and dependencies not useful
7576			  (and sometimes confusing) to the casual installer],
7577      USE_MAINTAINER_MODE=$enableval,
7578      USE_MAINTAINER_MODE=no)
7579  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
7580  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
7581  MAINT=$MAINTAINER_MODE_TRUE
7582  AC_SUBST(MAINT)dnl
7583]
7584)
7585
7586AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
7587
7588# Check to see how 'make' treats includes.	            -*- Autoconf -*-
7589
7590# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
7591#
7592# This file is free software; the Free Software Foundation
7593# gives unlimited permission to copy and/or distribute it,
7594# with or without modifications, as long as this notice is preserved.
7595
7596# serial 3
7597
7598# AM_MAKE_INCLUDE()
7599# -----------------
7600# Check to see how make treats includes.
7601AC_DEFUN([AM_MAKE_INCLUDE],
7602[am_make=${MAKE-make}
7603cat > confinc << 'END'
7604am__doit:
7605	@echo done
7606.PHONY: am__doit
7607END
7608# If we don't find an include directive, just comment out the code.
7609AC_MSG_CHECKING([for style of include used by $am_make])
7610am__include="#"
7611am__quote=
7612_am_result=none
7613# First try GNU make style include.
7614echo "include confinc" > confmf
7615# We grep out `Entering directory' and `Leaving directory'
7616# messages which can occur if `w' ends up in MAKEFLAGS.
7617# In particular we don't look at `^make:' because GNU make might
7618# be invoked under some other name (usually "gmake"), in which
7619# case it prints its new name instead of `make'.
7620if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
7621   am__include=include
7622   am__quote=
7623   _am_result=GNU
7624fi
7625# Now try BSD make style include.
7626if test "$am__include" = "#"; then
7627   echo '.include "confinc"' > confmf
7628   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
7629      am__include=.include
7630      am__quote="\""
7631      _am_result=BSD
7632   fi
7633fi
7634AC_SUBST([am__include])
7635AC_SUBST([am__quote])
7636AC_MSG_RESULT([$_am_result])
7637rm -f confinc confmf
7638])
7639
7640# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
7641
7642# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
7643# Free Software Foundation, Inc.
7644#
7645# This file is free software; the Free Software Foundation
7646# gives unlimited permission to copy and/or distribute it,
7647# with or without modifications, as long as this notice is preserved.
7648
7649# serial 5
7650
7651# AM_MISSING_PROG(NAME, PROGRAM)
7652# ------------------------------
7653AC_DEFUN([AM_MISSING_PROG],
7654[AC_REQUIRE([AM_MISSING_HAS_RUN])
7655$1=${$1-"${am_missing_run}$2"}
7656AC_SUBST($1)])
7657
7658
7659# AM_MISSING_HAS_RUN
7660# ------------------
7661# Define MISSING if not defined so far and test if it supports --run.
7662# If it does, set am_missing_run to use it, otherwise, to nothing.
7663AC_DEFUN([AM_MISSING_HAS_RUN],
7664[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7665AC_REQUIRE_AUX_FILE([missing])dnl
7666test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
7667# Use eval to expand $SHELL
7668if eval "$MISSING --run true"; then
7669  am_missing_run="$MISSING --run "
7670else
7671  am_missing_run=
7672  AC_MSG_WARN([`missing' script is too old or missing])
7673fi
7674])
7675
7676# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
7677#
7678# This file is free software; the Free Software Foundation
7679# gives unlimited permission to copy and/or distribute it,
7680# with or without modifications, as long as this notice is preserved.
7681
7682# AM_PROG_MKDIR_P
7683# ---------------
7684# Check for `mkdir -p'.
7685AC_DEFUN([AM_PROG_MKDIR_P],
7686[AC_PREREQ([2.60])dnl
7687AC_REQUIRE([AC_PROG_MKDIR_P])dnl
7688dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
7689dnl while keeping a definition of mkdir_p for backward compatibility.
7690dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
7691dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
7692dnl Makefile.ins that do not define MKDIR_P, so we do our own
7693dnl adjustment using top_builddir (which is defined more often than
7694dnl MKDIR_P).
7695AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
7696case $mkdir_p in
7697  [[\\/$]]* | ?:[[\\/]]*) ;;
7698  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
7699esac
7700])
7701
7702# Helper functions for option handling.                     -*- Autoconf -*-
7703
7704# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
7705#
7706# This file is free software; the Free Software Foundation
7707# gives unlimited permission to copy and/or distribute it,
7708# with or without modifications, as long as this notice is preserved.
7709
7710# serial 3
7711
7712# _AM_MANGLE_OPTION(NAME)
7713# -----------------------
7714AC_DEFUN([_AM_MANGLE_OPTION],
7715[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
7716
7717# _AM_SET_OPTION(NAME)
7718# ------------------------------
7719# Set option NAME.  Presently that only means defining a flag for this option.
7720AC_DEFUN([_AM_SET_OPTION],
7721[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
7722
7723# _AM_SET_OPTIONS(OPTIONS)
7724# ----------------------------------
7725# OPTIONS is a space-separated list of Automake options.
7726AC_DEFUN([_AM_SET_OPTIONS],
7727[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
7728
7729# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
7730# -------------------------------------------
7731# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
7732AC_DEFUN([_AM_IF_OPTION],
7733[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
7734
7735# Check to make sure that the build environment is sane.    -*- Autoconf -*-
7736
7737# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
7738# Free Software Foundation, Inc.
7739#
7740# This file is free software; the Free Software Foundation
7741# gives unlimited permission to copy and/or distribute it,
7742# with or without modifications, as long as this notice is preserved.
7743
7744# serial 4
7745
7746# AM_SANITY_CHECK
7747# ---------------
7748AC_DEFUN([AM_SANITY_CHECK],
7749[AC_MSG_CHECKING([whether build environment is sane])
7750# Just in case
7751sleep 1
7752echo timestamp > conftest.file
7753# Do `set' in a subshell so we don't clobber the current shell's
7754# arguments.  Must try -L first in case configure is actually a
7755# symlink; some systems play weird games with the mod time of symlinks
7756# (eg FreeBSD returns the mod time of the symlink's containing
7757# directory).
7758if (
7759   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
7760   if test "$[*]" = "X"; then
7761      # -L didn't work.
7762      set X `ls -t $srcdir/configure conftest.file`
7763   fi
7764   rm -f conftest.file
7765   if test "$[*]" != "X $srcdir/configure conftest.file" \
7766      && test "$[*]" != "X conftest.file $srcdir/configure"; then
7767
7768      # If neither matched, then we have a broken ls.  This can happen
7769      # if, for instance, CONFIG_SHELL is bash and it inherits a
7770      # broken ls alias from the environment.  This has actually
7771      # happened.  Such a system could not be considered "sane".
7772      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
7773alias in your environment])
7774   fi
7775
7776   test "$[2]" = conftest.file
7777   )
7778then
7779   # Ok.
7780   :
7781else
7782   AC_MSG_ERROR([newly created file is older than distributed files!
7783Check your system clock])
7784fi
7785AC_MSG_RESULT(yes)])
7786
7787# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
7788#
7789# This file is free software; the Free Software Foundation
7790# gives unlimited permission to copy and/or distribute it,
7791# with or without modifications, as long as this notice is preserved.
7792
7793# AM_PROG_INSTALL_STRIP
7794# ---------------------
7795# One issue with vendor `install' (even GNU) is that you can't
7796# specify the program used to strip binaries.  This is especially
7797# annoying in cross-compiling environments, where the build's strip
7798# is unlikely to handle the host's binaries.
7799# Fortunately install-sh will honor a STRIPPROG variable, so we
7800# always use install-sh in `make install-strip', and initialize
7801# STRIPPROG with the value of the STRIP variable (set by the user).
7802AC_DEFUN([AM_PROG_INSTALL_STRIP],
7803[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
7804# Installed binaries are usually stripped using `strip' when the user
7805# run `make install-strip'.  However `strip' might not be the right
7806# tool to use in cross-compilation environments, therefore Automake
7807# will honor the `STRIP' environment variable to overrule this program.
7808dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
7809if test "$cross_compiling" != no; then
7810  AC_CHECK_TOOL([STRIP], [strip], :)
7811fi
7812INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
7813AC_SUBST([INSTALL_STRIP_PROGRAM])])
7814
7815# Copyright (C) 2006  Free Software Foundation, Inc.
7816#
7817# This file is free software; the Free Software Foundation
7818# gives unlimited permission to copy and/or distribute it,
7819# with or without modifications, as long as this notice is preserved.
7820
7821# _AM_SUBST_NOTMAKE(VARIABLE)
7822# ---------------------------
7823# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in.
7824# This macro is traced by Automake.
7825AC_DEFUN([_AM_SUBST_NOTMAKE])
7826
7827# Check how to create a tarball.                            -*- Autoconf -*-
7828
7829# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
7830#
7831# This file is free software; the Free Software Foundation
7832# gives unlimited permission to copy and/or distribute it,
7833# with or without modifications, as long as this notice is preserved.
7834
7835# serial 2
7836
7837# _AM_PROG_TAR(FORMAT)
7838# --------------------
7839# Check how to create a tarball in format FORMAT.
7840# FORMAT should be one of `v7', `ustar', or `pax'.
7841#
7842# Substitute a variable $(am__tar) that is a command
7843# writing to stdout a FORMAT-tarball containing the directory
7844# $tardir.
7845#     tardir=directory && $(am__tar) > result.tar
7846#
7847# Substitute a variable $(am__untar) that extract such
7848# a tarball read from stdin.
7849#     $(am__untar) < result.tar
7850AC_DEFUN([_AM_PROG_TAR],
7851[# Always define AMTAR for backward compatibility.
7852AM_MISSING_PROG([AMTAR], [tar])
7853m4_if([$1], [v7],
7854     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
7855     [m4_case([$1], [ustar],, [pax],,
7856              [m4_fatal([Unknown tar format])])
7857AC_MSG_CHECKING([how to create a $1 tar archive])
7858# Loop over all known methods to create a tar archive until one works.
7859_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
7860_am_tools=${am_cv_prog_tar_$1-$_am_tools}
7861# Do not fold the above two line into one, because Tru64 sh and
7862# Solaris sh will not grok spaces in the rhs of `-'.
7863for _am_tool in $_am_tools
7864do
7865  case $_am_tool in
7866  gnutar)
7867    for _am_tar in tar gnutar gtar;
7868    do
7869      AM_RUN_LOG([$_am_tar --version]) && break
7870    done
7871    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
7872    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
7873    am__untar="$_am_tar -xf -"
7874    ;;
7875  plaintar)
7876    # Must skip GNU tar: if it does not support --format= it doesn't create
7877    # ustar tarball either.
7878    (tar --version) >/dev/null 2>&1 && continue
7879    am__tar='tar chf - "$$tardir"'
7880    am__tar_='tar chf - "$tardir"'
7881    am__untar='tar xf -'
7882    ;;
7883  pax)
7884    am__tar='pax -L -x $1 -w "$$tardir"'
7885    am__tar_='pax -L -x $1 -w "$tardir"'
7886    am__untar='pax -r'
7887    ;;
7888  cpio)
7889    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
7890    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
7891    am__untar='cpio -i -H $1 -d'
7892    ;;
7893  none)
7894    am__tar=false
7895    am__tar_=false
7896    am__untar=false
7897    ;;
7898  esac
7899
7900  # If the value was cached, stop now.  We just wanted to have am__tar
7901  # and am__untar set.
7902  test -n "${am_cv_prog_tar_$1}" && break
7903
7904  # tar/untar a dummy directory, and stop if the command works
7905  rm -rf conftest.dir
7906  mkdir conftest.dir
7907  echo GrepMe > conftest.dir/file
7908  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
7909  rm -rf conftest.dir
7910  if test -s conftest.tar; then
7911    AM_RUN_LOG([$am__untar <conftest.tar])
7912    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
7913  fi
7914done
7915rm -rf conftest.dir
7916
7917AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
7918AC_MSG_RESULT([$am_cv_prog_tar_$1])])
7919AC_SUBST([am__tar])
7920AC_SUBST([am__untar])
7921]) # _AM_PROG_TAR
7922
7923