1
# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4
# 2005, 2006, 2007, 2008, 2009 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.
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
14
m4_ifndef([AC_AUTOCONF_VERSION],
15
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
17
[m4_warning([this file was generated for autoconf 2.65.
18
You have another version of autoconf. It may work, but is not guaranteed to.
19
If you have problems, you may need to regenerate the build system entirely.
20
To do so, use the procedure documented by the package, typically `autoreconf'.])])
22
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
23
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
25
# This file is free software, distributed under the terms of the GNU
26
# General Public License. As a special exception to the GNU General
27
# Public License, this file may be distributed as part of a program
28
# that contains a configuration script generated by Autoconf, under
29
# the same distribution terms as the rest of that program.
31
# This file can be copied and used freely without restrictions. It can
32
# be used in projects which are not available under the GNU Public License
33
# but which still want to provide support for the GNU gettext functionality.
35
# Macro to add for using GNU gettext.
36
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
38
# Modified to never use included libintl.
39
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
41
# Major rework to remove unused code
42
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
44
# Added better handling of ALL_LINGUAS from GNU gettext version
45
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
47
# Modified to require ngettext
48
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
50
# We need this here as well, since someone might use autoconf-2.5x
51
# to configure GLib then an older version to configure a package
52
# using AM_GLIB_GNU_GETTEXT
56
dnl We go to great lengths to make sure that aclocal won't
57
dnl try to pull in the installed version of these macros
58
dnl when running aclocal in the glib directory.
60
m4_copy([AC_DEFUN],[glib_DEFUN])
61
m4_copy([AC_REQUIRE],[glib_REQUIRE])
63
dnl At the end, if we're not within glib, we'll define the public
64
dnl definitions in terms of our private definitions.
69
glib_DEFUN([GLIB_LC_MESSAGES],
70
[AC_CHECK_HEADERS([locale.h])
71
if test $ac_cv_header_locale_h = yes; then
72
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
73
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
74
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
75
if test $am_cv_val_LC_MESSAGES = yes; then
76
AC_DEFINE(HAVE_LC_MESSAGES, 1,
77
[Define if your <locale.h> file defines LC_MESSAGES.])
81
# GLIB_PATH_PROG_WITH_TEST
82
#----------------------------
83
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
84
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
85
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
86
[# Extract the first word of "$2", so it can be a program name with args.
87
set dummy $2; ac_word=[$]2
88
AC_MSG_CHECKING([for $ac_word])
89
AC_CACHE_VAL(ac_cv_path_$1,
92
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
95
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
96
for ac_dir in ifelse([$5], , $PATH, [$5]); do
97
test -z "$ac_dir" && ac_dir=.
98
if test -f $ac_dir/$ac_word; then
100
ac_cv_path_$1="$ac_dir/$ac_word"
106
dnl If no 4th arg is given, leave the cache variable unset,
107
dnl so AC_PATH_PROGS will keep looking.
108
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
113
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
123
glib_DEFUN([GLIB_WITH_NLS],
124
dnl NLS is obligatory
128
gt_cv_have_gettext=no
134
AC_CHECK_HEADER(libintl.h,
135
[gt_cv_func_dgettext_libintl="no"
136
libintl_extra_libs=""
139
# First check in libc
141
AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
145
[return !ngettext ("","", 1)],
146
gt_cv_func_ngettext_libc=yes,
147
gt_cv_func_ngettext_libc=no)
150
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
151
AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
155
[return !dgettext ("","")],
156
gt_cv_func_dgettext_libc=yes,
157
gt_cv_func_dgettext_libc=no)
161
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
162
AC_CHECK_FUNCS(bind_textdomain_codeset)
166
# If we don't have everything we want, check in libintl
168
if test "$gt_cv_func_dgettext_libc" != "yes" \
169
|| test "$gt_cv_func_ngettext_libc" != "yes" \
170
|| test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
172
AC_CHECK_LIB(intl, bindtextdomain,
173
[AC_CHECK_LIB(intl, ngettext,
174
[AC_CHECK_LIB(intl, dgettext,
175
gt_cv_func_dgettext_libintl=yes)])])
177
if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
178
AC_MSG_CHECKING([if -liconv is needed to use gettext])
180
AC_CHECK_LIB(intl, ngettext,
181
[AC_CHECK_LIB(intl, dcgettext,
182
[gt_cv_func_dgettext_libintl=yes
183
libintl_extra_libs=-liconv],
189
# If we found libintl, then check in it for bind_textdomain_codeset();
190
# we'll prefer libc if neither have bind_textdomain_codeset(),
191
# and both have dgettext and ngettext
193
if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
194
glib_save_LIBS="$LIBS"
195
LIBS="$LIBS -lintl $libintl_extra_libs"
196
unset ac_cv_func_bind_textdomain_codeset
197
AC_CHECK_FUNCS(bind_textdomain_codeset)
198
LIBS="$glib_save_LIBS"
200
if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
201
gt_cv_func_dgettext_libc=no
203
if test "$gt_cv_func_dgettext_libc" = "yes" \
204
&& test "$gt_cv_func_ngettext_libc" = "yes"; then
205
gt_cv_func_dgettext_libintl=no
211
if test "$gt_cv_func_dgettext_libc" = "yes" \
212
|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
213
gt_cv_have_gettext=yes
216
if test "$gt_cv_func_dgettext_libintl" = "yes"; then
217
INTLLIBS="-lintl $libintl_extra_libs"
220
if test "$gt_cv_have_gettext" = "yes"; then
221
AC_DEFINE(HAVE_GETTEXT,1,
222
[Define if the GNU gettext() function is already present or preinstalled.])
223
GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
224
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
225
if test "$MSGFMT" != "no"; then
226
glib_save_LIBS="$LIBS"
227
LIBS="$LIBS $INTLLIBS"
228
AC_CHECK_FUNCS(dcgettext)
230
AC_MSG_CHECKING([if msgfmt accepts -c])
231
GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
234
"Content-Type: text/plain; charset=UTF-8\n"
235
"Project-Id-Version: test 1.0\n"
236
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
237
"Last-Translator: test <foo@bar.xx>\n"
238
"Language-Team: C <LL@li.org>\n"
239
"MIME-Version: 1.0\n"
240
"Content-Transfer-Encoding: 8bit\n"
241
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
242
AC_SUBST(MSGFMT_OPTS)
243
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
244
GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
245
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
246
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
247
return _nl_msg_cat_cntr],
252
dnl On Solaris, if bind_textdomain_codeset is in libc,
253
dnl GNU format message catalog is always supported,
254
dnl since both are added to the libc all together.
255
dnl Hence, we'd like to go with DATADIRNAME=share and
256
dnl and CATOBJEXT=.gmo in this case.
257
AC_CHECK_FUNC(bind_textdomain_codeset,
268
LIBS="$glib_save_LIBS"
271
gt_cv_have_gettext=no
276
if test "$gt_cv_have_gettext" = "yes" ; then
277
AC_DEFINE(ENABLE_NLS, 1,
278
[always defined to indicate that i18n is enabled])
281
dnl Test whether we really found GNU xgettext.
282
if test "$XGETTEXT" != ":"; then
283
dnl If it is not GNU xgettext we define it as : so that the
284
dnl Makefiles still can work.
285
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
289
[found xgettext program is not GNU xgettext; ignore it])
294
# We need to process the po/ directory.
298
[case "$CONFIG_FILES" in *po/Makefile.in*)
299
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
302
dnl These rules are solely for the distribution goal. While doing this
303
dnl we only have to keep exactly one list of the available catalogs
305
for lang in $ALL_LINGUAS; do
306
GMOFILES="$GMOFILES $lang.gmo"
307
POFILES="$POFILES $lang.po"
310
dnl Make all variables we use known to autoconf.
313
AC_SUBST(DATADIRNAME)
317
AC_SUBST(PO_IN_DATADIR_TRUE)
318
AC_SUBST(PO_IN_DATADIR_FALSE)
323
# AM_GLIB_GNU_GETTEXT
324
# -------------------
325
# Do checks necessary for use of gettext. If a suitable implementation
326
# of gettext is found in either in libintl or in the C library,
327
# it will set INTLLIBS to the libraries needed for use of gettext
328
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
329
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
330
# on various variables needed by the Makefile.in.in installed by
333
glib_DEFUN([GLIB_GNU_GETTEXT],
334
[AC_REQUIRE([AC_PROG_CC])dnl
335
AC_REQUIRE([AC_HEADER_STDC])dnl
340
if test "$gt_cv_have_gettext" = "yes"; then
341
if test "x$ALL_LINGUAS" = "x"; then
344
AC_MSG_CHECKING(for catalogs to be installed)
346
for presentlang in $ALL_LINGUAS; do
348
if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
349
desiredlanguages="$LINGUAS"
351
desiredlanguages="$ALL_LINGUAS"
353
for desiredlang in $desiredlanguages; do
354
# Use the presentlang catalog if desiredlang is
355
# a. equal to presentlang, or
356
# b. a variant of presentlang (because in this case,
357
# presentlang can be used as a fallback for messages
358
# which are not translated in the desiredlang catalog).
359
case "$desiredlang" in
360
"$presentlang"*) useit=yes;;
363
if test $useit = yes; then
364
NEW_LINGUAS="$NEW_LINGUAS $presentlang"
368
AC_MSG_RESULT($LINGUAS)
371
dnl Construct list of names of catalog files to be constructed.
372
if test -n "$LINGUAS"; then
373
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
377
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
378
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
379
dnl Try to locate is.
381
if test -n "$ac_aux_dir"; then
382
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
384
if test -z "$MKINSTALLDIRS"; then
385
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
387
AC_SUBST(MKINSTALLDIRS)
389
dnl Generate list of files to be processed by xgettext which will
390
dnl be included in po/Makefile.
391
test -d po || mkdir po
392
if test "x$srcdir" != "x."; then
393
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
394
posrcprefix="$srcdir/"
396
posrcprefix="../$srcdir/"
402
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
403
< $srcdir/po/POTFILES.in > po/POTFILES
406
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
407
# -------------------------------
408
# Define VARIABLE to the location where catalog files will
409
# be installed by po/Makefile.
410
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
411
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
412
glib_save_prefix="$prefix"
413
glib_save_exec_prefix="$exec_prefix"
414
glib_save_datarootdir="$datarootdir"
415
test "x$prefix" = xNONE && prefix=$ac_default_prefix
416
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
417
datarootdir=`eval echo "${datarootdir}"`
418
if test "x$CATOBJEXT" = "x.mo" ; then
419
localedir=`eval echo "${libdir}/locale"`
421
localedir=`eval echo "${datadir}/locale"`
423
prefix="$glib_save_prefix"
424
exec_prefix="$glib_save_exec_prefix"
425
datarootdir="$glib_save_datarootdir"
426
AC_DEFINE_UNQUOTED($1, "$localedir",
427
[Define the location where the catalogs will be installed])
431
dnl Now the definitions that aclocal will find
433
ifdef(glib_configure_in,[],[
434
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
435
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
438
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
440
# Create a temporary file with TEST-FILE as its contents and pass the
441
# file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
442
# 0 and perform ACTION-IF-FAIL for any other exit status.
443
AC_DEFUN([GLIB_RUN_PROG],
444
[cat >conftest.foo <<_ACEOF
447
if AC_RUN_LOG([$1 conftest.foo]); then
448
m4_ifval([$3], [$3], [:])
449
m4_ifvaln([$4], [else $4])dnl
450
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
451
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
455
dnl -*- mode: autoconf -*-
460
dnl GTK_DOC_CHECK([minimum-gtk-doc-version])
461
AC_DEFUN([GTK_DOC_CHECK],
463
AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
464
AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
465
dnl for overriding the documentation installation directory
466
AC_ARG_WITH([html-dir],
467
AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
468
[with_html_dir='${datadir}/gtk-doc/html'])
469
HTML_DIR="$with_html_dir"
472
dnl enable/disable documentation building
473
AC_ARG_ENABLE([gtk-doc],
474
AS_HELP_STRING([--enable-gtk-doc],
475
[use gtk-doc to build documentation [[default=no]]]),,
478
if test x$enable_gtk_doc = xyes; then
480
[PKG_CHECK_EXISTS([gtk-doc],,
481
AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))],
482
[PKG_CHECK_EXISTS([gtk-doc >= $1],,
483
AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build gtk-doc]))])
486
AC_MSG_CHECKING([whether to build gtk-doc documentation])
487
AC_MSG_RESULT($enable_gtk_doc)
489
AC_PATH_PROGS(GTKDOC_CHECK,gtkdoc-check,)
491
AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
492
AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
496
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
497
# serial 40 IT_PROG_INTLTOOL
498
AC_DEFUN([IT_PROG_INTLTOOL], [
500
AC_REQUIRE([AM_NLS])dnl
502
case "$am__api_version" in
504
AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
510
if test -n "$1"; then
511
AC_MSG_CHECKING([for intltool >= $1])
513
INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
514
INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
515
[INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
517
AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
518
test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
519
AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
522
AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
523
AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
524
AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
525
if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
526
AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
529
INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
530
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
531
INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
532
INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
533
INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
534
INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
535
INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
536
INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
537
INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
538
INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
539
INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
540
INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@'
541
INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
542
INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
543
INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
544
INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
545
INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
546
INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
547
INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
549
_IT_SUBST(INTLTOOL_DESKTOP_RULE)
550
_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
551
_IT_SUBST(INTLTOOL_KEYS_RULE)
552
_IT_SUBST(INTLTOOL_PROP_RULE)
553
_IT_SUBST(INTLTOOL_OAF_RULE)
554
_IT_SUBST(INTLTOOL_PONG_RULE)
555
_IT_SUBST(INTLTOOL_SERVER_RULE)
556
_IT_SUBST(INTLTOOL_SHEET_RULE)
557
_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
558
_IT_SUBST(INTLTOOL_UI_RULE)
559
_IT_SUBST(INTLTOOL_XAM_RULE)
560
_IT_SUBST(INTLTOOL_KBD_RULE)
561
_IT_SUBST(INTLTOOL_XML_RULE)
562
_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
563
_IT_SUBST(INTLTOOL_CAVES_RULE)
564
_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
565
_IT_SUBST(INTLTOOL_THEME_RULE)
566
_IT_SUBST(INTLTOOL_SERVICE_RULE)
567
_IT_SUBST(INTLTOOL_POLICY_RULE)
569
# Check the gettext tools to make sure they are GNU
570
AC_PATH_PROG(XGETTEXT, xgettext)
571
AC_PATH_PROG(MSGMERGE, msgmerge)
572
AC_PATH_PROG(MSGFMT, msgfmt)
573
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
574
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
575
AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
577
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
578
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
579
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
580
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
581
AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
584
AC_PATH_PROG(INTLTOOL_PERL, perl)
585
if test -z "$INTLTOOL_PERL"; then
586
AC_MSG_ERROR([perl not found])
588
AC_MSG_CHECKING([for perl >= 5.8.1])
589
$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
590
if test $? -ne 0; then
591
AC_MSG_ERROR([perl 5.8.1 is required for intltool])
593
IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
594
AC_MSG_RESULT([$IT_PERL_VERSION])
596
if test "x$2" != "xno-xml"; then
597
AC_MSG_CHECKING([for XML::Parser])
598
if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
601
AC_MSG_ERROR([XML::Parser perl module is required for intltool])
605
# Substitute ALL_LINGUAS so we can use it in po/Makefile
606
AC_SUBST(ALL_LINGUAS)
608
# Set DATADIRNAME correctly if it is not set yet
609
# (copied from glib-gettext.m4)
610
if test -z "$DATADIRNAME"; then
612
[AC_LANG_PROGRAM([[]],
613
[[extern int _nl_msg_cat_cntr;
614
return _nl_msg_cat_cntr]])],
618
dnl On Solaris, if bind_textdomain_codeset is in libc,
619
dnl GNU format message catalog is always supported,
620
dnl since both are added to the libc all together.
621
dnl Hence, we'd like to go with DATADIRNAME=share
623
AC_CHECK_FUNC(bind_textdomain_codeset,
624
[DATADIRNAME=share], [DATADIRNAME=lib])
631
AC_SUBST(DATADIRNAME)
638
# IT_PO_SUBDIR(DIRNAME)
639
# ---------------------
640
# All po subdirs have to be declared with this macro; the subdir "po" is
641
# declared by IT_PROG_INTLTOOL.
643
AC_DEFUN([IT_PO_SUBDIR],
644
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
646
dnl The following CONFIG_COMMANDS should be exetuted at the very end
647
dnl of config.status.
648
AC_CONFIG_COMMANDS_PRE([
649
AC_CONFIG_COMMANDS([$1/stamp-it], [
650
if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
651
AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
653
rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
658
'"s|^| $ac_top_srcdir/|" \
659
"$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
661
[sed '/^POTFILES =/,/[^\\]$/ {
665
' "$1/Makefile.in" >"$1/Makefile"]
666
rm -f "$1/Makefile.tmp"
667
mv "$1/stamp-it.tmp" "$1/stamp-it"
672
# _IT_SUBST(VARIABLE)
673
# -------------------
674
# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
676
AC_DEFUN([_IT_SUBST],
679
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
684
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
685
# A hint is needed for aclocal from Automake <= 1.9.4:
686
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
689
dnl -*- mode: autoconf -*-
690
dnl Copyright 2009 Johan Dahlin
692
dnl This file is free software; the author(s) gives unlimited
693
dnl permission to copy and/or distribute it, with or without
694
dnl modifications, as long as this notice is preserved.
699
m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
701
AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
702
AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
703
AC_BEFORE([LT_INIT],[$0])dnl setup libtool first
705
dnl enable/disable introspection
706
m4_if([$2], [require],
708
enable_introspection=yes
710
AC_ARG_ENABLE(introspection,
711
AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]],
712
[Enable introspection for this build]),,
713
[enable_introspection=auto])
716
AC_MSG_CHECKING([for gobject-introspection])
718
dnl presence/version checking
719
AS_CASE([$enable_introspection],
721
found_introspection="no (disabled, use --enable-introspection to enable)"
724
PKG_CHECK_EXISTS([gobject-introspection-1.0],,
725
AC_MSG_ERROR([gobject-introspection-1.0 is not installed]))
726
PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1],
727
found_introspection=yes,
728
AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME]))
731
PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no)
734
AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@])
737
AC_MSG_RESULT([$found_introspection])
739
INTROSPECTION_SCANNER=
740
INTROSPECTION_COMPILER=
741
INTROSPECTION_GENERATE=
742
INTROSPECTION_GIRDIR=
743
INTROSPECTION_TYPELIBDIR=
744
if test "x$found_introspection" = "xyes"; then
745
INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
746
INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
747
INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
748
INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
749
INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
750
INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
751
INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
752
INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
754
AC_SUBST(INTROSPECTION_SCANNER)
755
AC_SUBST(INTROSPECTION_COMPILER)
756
AC_SUBST(INTROSPECTION_GENERATE)
757
AC_SUBST(INTROSPECTION_GIRDIR)
758
AC_SUBST(INTROSPECTION_TYPELIBDIR)
759
AC_SUBST(INTROSPECTION_CFLAGS)
760
AC_SUBST(INTROSPECTION_LIBS)
761
AC_SUBST(INTROSPECTION_MAKEFILE)
763
AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
768
dnl GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version])
770
AC_DEFUN([GOBJECT_INTROSPECTION_CHECK],
772
_GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1])
776
dnl GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version])
779
AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE],
781
_GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require])
784
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
786
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
787
# 2006, 2007, 2008 Free Software Foundation, Inc.
788
# Written by Gordon Matzigkeit, 1996
790
# This file is free software; the Free Software Foundation gives
791
# unlimited permission to copy and/or distribute it, with or without
792
# modifications, as long as this notice is preserved.
794
m4_define([_LT_COPYING], [dnl
795
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
796
# 2006, 2007, 2008 Free Software Foundation, Inc.
797
# Written by Gordon Matzigkeit, 1996
799
# This file is part of GNU Libtool.
801
# GNU Libtool is free software; you can redistribute it and/or
802
# modify it under the terms of the GNU General Public License as
803
# published by the Free Software Foundation; either version 2 of
804
# the License, or (at your option) any later version.
806
# As a special exception to the GNU General Public License,
807
# if you distribute this file as part of a program or library that
808
# is built using GNU Libtool, you may include this file under the
809
# same distribution terms that you use for the rest of that program.
811
# GNU Libtool is distributed in the hope that it will be useful,
812
# but WITHOUT ANY WARRANTY; without even the implied warranty of
813
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
814
# GNU General Public License for more details.
816
# You should have received a copy of the GNU General Public License
817
# along with GNU Libtool; see the file COPYING. If not, a copy
818
# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
819
# obtained by writing to the Free Software Foundation, Inc.,
820
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
828
# Complain and exit if this libtool version is less that VERSION.
829
m4_defun([LT_PREREQ],
830
[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
832
[m4_fatal([Libtool version $1 or higher is required],
839
# Complain if the absolute build directory name contains unusual characters
840
m4_defun([_LT_CHECK_BUILDDIR],
843
AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
851
[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
852
AC_BEFORE([$0], [LT_LANG])dnl
853
AC_BEFORE([$0], [LT_OUTPUT])dnl
854
AC_BEFORE([$0], [LTDL_INIT])dnl
855
m4_require([_LT_CHECK_BUILDDIR])dnl
857
dnl Autoconf doesn't catch unexpanded LT_ macros by default:
858
m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
859
m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
860
dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
861
dnl unless we require an AC_DEFUNed macro:
862
AC_REQUIRE([LTOPTIONS_VERSION])dnl
863
AC_REQUIRE([LTSUGAR_VERSION])dnl
864
AC_REQUIRE([LTVERSION_VERSION])dnl
865
AC_REQUIRE([LTOBSOLETE_VERSION])dnl
866
m4_require([_LT_PROG_LTMAIN])dnl
869
_LT_SET_OPTIONS([$0], [$1])
871
# This can be used to rebuild libtool when needed
872
LIBTOOL_DEPS="$ltmain"
874
# Always use our own libtool.
875
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
885
AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
886
AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
887
dnl aclocal-1.4 backwards compatibility:
888
dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
889
dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
892
# _LT_CC_BASENAME(CC)
893
# -------------------
894
# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
895
m4_defun([_LT_CC_BASENAME],
896
[for cc_temp in $1""; do
898
compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
899
distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
904
cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
908
# _LT_FILEUTILS_DEFAULTS
909
# ----------------------
910
# It is okay to use these file commands and assume they have been set
911
# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
912
m4_defun([_LT_FILEUTILS_DEFAULTS],
916
])# _LT_FILEUTILS_DEFAULTS
921
m4_defun([_LT_SETUP],
922
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
923
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
924
_LT_DECL([], [host_alias], [0], [The host system])dnl
925
_LT_DECL([], [host], [0])dnl
926
_LT_DECL([], [host_os], [0])dnl
928
_LT_DECL([], [build_alias], [0], [The build system])dnl
929
_LT_DECL([], [build], [0])dnl
930
_LT_DECL([], [build_os], [0])dnl
932
AC_REQUIRE([AC_PROG_CC])dnl
933
AC_REQUIRE([LT_PATH_LD])dnl
934
AC_REQUIRE([LT_PATH_NM])dnl
936
AC_REQUIRE([AC_PROG_LN_S])dnl
937
test -z "$LN_S" && LN_S="ln -s"
938
_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
940
AC_REQUIRE([LT_CMD_MAX_LEN])dnl
941
_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
942
_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
944
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
945
m4_require([_LT_CHECK_SHELL_FEATURES])dnl
946
m4_require([_LT_CMD_RELOAD])dnl
947
m4_require([_LT_CHECK_MAGIC_METHOD])dnl
948
m4_require([_LT_CMD_OLD_ARCHIVE])dnl
949
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
951
_LT_CONFIG_LIBTOOL_INIT([
952
# See if we are running on zsh, and set the options which allow our
953
# commands through without removal of \ escapes INIT.
954
if test -n "\${ZSH_VERSION+set}" ; then
958
if test -n "${ZSH_VERSION+set}" ; then
964
m4_require([_LT_TAG_COMPILER])dnl
965
_LT_PROG_ECHO_BACKSLASH
969
# AIX sometimes has problems with the GCC collect2 program. For some
970
# reason, if we set the COLLECT_NAMES environment variable, the problems
971
# vanish in a puff of smoke.
972
if test "X${COLLECT_NAMES+set}" != Xset; then
979
# Sed substitution that helps us do robust quoting. It backslashifies
980
# metacharacters that are still active within double-quoted strings.
981
sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
983
# Same as above, but do not quote variable references.
984
double_quote_subst='s/\([["`\\]]\)/\\\1/g'
986
# Sed substitution to delay expansion of an escaped shell variable in a
987
# double_quote_subst'ed string.
988
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
990
# Sed substitution to delay expansion of an escaped single quote.
991
delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
993
# Sed substitution to avoid accidental globbing in evaled expressions
994
no_glob_subst='s/\*/\\\*/g'
1000
# All known linkers require a `.a' archive for static linking (except MSVC,
1001
# which needs '.lib').
1004
with_gnu_ld="$lt_cv_prog_gnu_ld"
1007
old_CFLAGS="$CFLAGS"
1009
# Set sane defaults for various variables
1010
test -z "$CC" && CC=cc
1011
test -z "$LTCC" && LTCC=$CC
1012
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1013
test -z "$LD" && LD=ld
1014
test -z "$ac_objext" && ac_objext=o
1016
_LT_CC_BASENAME([$compiler])
1018
# Only perform the check for file, if the check method requires it
1019
test -z "$MAGIC_CMD" && MAGIC_CMD=file
1020
case $deplibs_check_method in
1022
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1028
# Use C for the default configuration in the libtool script
1029
LT_SUPPORTED_TAG([CC])
1031
_LT_LANG_DEFAULT_CONFIG
1038
# Note that this code is called both from `configure', and `config.status'
1039
# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
1040
# `config.status' has no value for ac_aux_dir unless we are using Automake,
1041
# so we pass a copy along to make sure it has a sensible value anyway.
1042
m4_defun([_LT_PROG_LTMAIN],
1043
[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
1044
_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
1045
ltmain="$ac_aux_dir/ltmain.sh"
1050
# So that we can recreate a full libtool script including additional
1051
# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
1052
# in macros and then make a single call at the end using the `libtool'
1056
# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
1057
# ----------------------------------------
1058
# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1059
m4_define([_LT_CONFIG_LIBTOOL_INIT],
1061
[m4_append([_LT_OUTPUT_LIBTOOL_INIT],
1066
m4_define([_LT_OUTPUT_LIBTOOL_INIT])
1069
# _LT_CONFIG_LIBTOOL([COMMANDS])
1070
# ------------------------------
1071
# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1072
m4_define([_LT_CONFIG_LIBTOOL],
1074
[m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
1079
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
1082
# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
1083
# -----------------------------------------------------
1084
m4_defun([_LT_CONFIG_SAVE_COMMANDS],
1085
[_LT_CONFIG_LIBTOOL([$1])
1086
_LT_CONFIG_LIBTOOL_INIT([$2])
1090
# _LT_FORMAT_COMMENT([COMMENT])
1091
# -----------------------------
1092
# Add leading comment marks to the start of each line, and a trailing
1093
# full-stop to the whole comment if one is not present already.
1094
m4_define([_LT_FORMAT_COMMENT],
1096
m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
1097
[['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
1104
# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
1105
# -------------------------------------------------------------------
1106
# CONFIGNAME is the name given to the value in the libtool script.
1107
# VARNAME is the (base) name used in the configure script.
1108
# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
1109
# VARNAME. Any other value will be used directly.
1110
m4_define([_LT_DECL],
1111
[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
1112
[lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
1113
[m4_ifval([$1], [$1], [$2])])
1114
lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
1116
[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
1117
lt_dict_add_subkey([lt_decl_dict], [$2],
1118
[tagged?], [m4_ifval([$5], [yes], [no])])])
1122
# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
1123
# --------------------------------------------------------
1124
m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
1127
# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
1128
# ------------------------------------------------
1129
m4_define([lt_decl_tag_varnames],
1130
[_lt_decl_filter([tagged?], [yes], $@)])
1133
# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
1134
# ---------------------------------------------------------
1135
m4_define([_lt_decl_filter],
1137
[0], [m4_fatal([$0: too few arguments: $#])],
1138
[1], [m4_fatal([$0: too few arguments: $#: $1])],
1139
[2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
1140
[3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
1141
[lt_dict_filter([lt_decl_dict], $@)])[]dnl
1145
# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
1146
# --------------------------------------------------
1147
m4_define([lt_decl_quote_varnames],
1148
[_lt_decl_filter([value], [1], $@)])
1151
# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
1152
# ---------------------------------------------------
1153
m4_define([lt_decl_dquote_varnames],
1154
[_lt_decl_filter([value], [2], $@)])
1157
# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
1158
# ---------------------------------------------------
1159
m4_define([lt_decl_varnames_tagged],
1160
[m4_assert([$# <= 2])dnl
1161
_$0(m4_quote(m4_default([$1], [[, ]])),
1162
m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
1163
m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
1164
m4_define([_lt_decl_varnames_tagged],
1165
[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
1168
# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
1169
# ------------------------------------------------
1170
m4_define([lt_decl_all_varnames],
1171
[_$0(m4_quote(m4_default([$1], [[, ]])),
1173
m4_quote(lt_decl_varnames),
1174
m4_quote(m4_shift($@))))[]dnl
1176
m4_define([_lt_decl_all_varnames],
1177
[lt_join($@, lt_decl_varnames_tagged([$1],
1178
lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
1182
# _LT_CONFIG_STATUS_DECLARE([VARNAME])
1183
# ------------------------------------
1184
# Quote a variable value, and forward it to `config.status' so that its
1185
# declaration there will have the same value as in `configure'. VARNAME
1186
# must have a single quote delimited value for this to work.
1187
m4_define([_LT_CONFIG_STATUS_DECLARE],
1188
[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
1191
# _LT_CONFIG_STATUS_DECLARATIONS
1192
# ------------------------------
1193
# We delimit libtool config variables with single quotes, so when
1194
# we write them to config.status, we have to be sure to quote all
1195
# embedded single quotes properly. In configure, this macro expands
1196
# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
1198
# <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
1199
m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
1200
[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
1201
[m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
1206
# Output comment and list of tags supported by the script
1207
m4_defun([_LT_LIBTOOL_TAGS],
1208
[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
1209
available_tags="_LT_TAGS"dnl
1213
# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
1214
# -----------------------------------
1215
# Extract the dictionary values for VARNAME (optionally with TAG) and
1216
# expand to a commented shell variable setting:
1218
# # Some comment about what VAR is for.
1219
# visible_name=$lt_internal_name
1220
m4_define([_LT_LIBTOOL_DECLARE],
1221
[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
1222
[description])))[]dnl
1223
m4_pushdef([_libtool_name],
1224
m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
1225
m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
1226
[0], [_libtool_name=[$]$1],
1227
[1], [_libtool_name=$lt_[]$1],
1228
[2], [_libtool_name=$lt_[]$1],
1229
[_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
1230
m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
1234
# _LT_LIBTOOL_CONFIG_VARS
1235
# -----------------------
1236
# Produce commented declarations of non-tagged libtool config variables
1237
# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
1238
# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
1239
# section) are produced by _LT_LIBTOOL_TAG_VARS.
1240
m4_defun([_LT_LIBTOOL_CONFIG_VARS],
1241
[m4_foreach([_lt_var],
1242
m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
1243
[m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
1246
# _LT_LIBTOOL_TAG_VARS(TAG)
1247
# -------------------------
1248
m4_define([_LT_LIBTOOL_TAG_VARS],
1249
[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
1250
[m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
1253
# _LT_TAGVAR(VARNAME, [TAGNAME])
1254
# ------------------------------
1255
m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
1258
# _LT_CONFIG_COMMANDS
1259
# -------------------
1260
# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
1261
# variables for single and double quote escaping we saved from calls
1262
# to _LT_DECL, we can put quote escaped variables declarations
1263
# into `config.status', and then the shell code to quote escape them in
1264
# for loops in `config.status'. Finally, any additional code accumulated
1265
# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
1266
m4_defun([_LT_CONFIG_COMMANDS],
1267
[AC_PROVIDE_IFELSE([LT_OUTPUT],
1268
dnl If the libtool generation code has been placed in $CONFIG_LT,
1269
dnl instead of duplicating it all over again into config.status,
1270
dnl then we will have config.status run $CONFIG_LT later, so it
1271
dnl needs to know what name is stored there:
1272
[AC_CONFIG_COMMANDS([libtool],
1273
[$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
1274
dnl If the libtool generation code is destined for config.status,
1275
dnl expand the accumulated commands and init code now:
1276
[AC_CONFIG_COMMANDS([libtool],
1277
[_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
1278
])#_LT_CONFIG_COMMANDS
1282
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
1285
# The HP-UX ksh and POSIX shell print the target directory to stdout
1287
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1289
sed_quote_subst='$sed_quote_subst'
1290
double_quote_subst='$double_quote_subst'
1291
delay_variable_subst='$delay_variable_subst'
1292
_LT_CONFIG_STATUS_DECLARATIONS
1294
LTCFLAGS='$LTCFLAGS'
1295
compiler='$compiler_DEFAULT'
1297
# Quote evaled strings.
1298
for var in lt_decl_all_varnames([[ \
1299
]], lt_decl_quote_varnames); do
1300
case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
1301
*[[\\\\\\\`\\"\\\$]]*)
1302
eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
1305
eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1310
# Double-quote double-evaled strings.
1311
for var in lt_decl_all_varnames([[ \
1312
]], lt_decl_dquote_varnames); do
1313
case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
1314
*[[\\\\\\\`\\"\\\$]]*)
1315
eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
1318
eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1323
# Fix-up fallback echo if it was mangled by the above quoting rules.
1325
*'\\\[$]0 --fallback-echo"')dnl "
1326
lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
1330
_LT_OUTPUT_LIBTOOL_INIT
1336
# This macro allows early generation of the libtool script (before
1337
# AC_OUTPUT is called), incase it is used in configure for compilation
1339
AC_DEFUN([LT_OUTPUT],
1340
[: ${CONFIG_LT=./config.lt}
1341
AC_MSG_NOTICE([creating $CONFIG_LT])
1342
cat >"$CONFIG_LT" <<_LTEOF
1344
# Generated by $as_me.
1345
# Run this file to recreate a libtool stub with the current configuration.
1348
SHELL=\${CONFIG_SHELL-$SHELL}
1351
cat >>"$CONFIG_LT" <<\_LTEOF
1355
exec AS_MESSAGE_FD>&1
1356
exec AS_MESSAGE_LOG_FD>>config.log
1359
AS_BOX([Running $as_me.])
1360
} >&AS_MESSAGE_LOG_FD
1363
\`$as_me' creates a local libtool stub from the current configuration,
1364
for use in further configure time tests before the real libtool is
1367
Usage: $[0] [[OPTIONS]]
1369
-h, --help print this help, then exit
1370
-V, --version print version number, then exit
1371
-q, --quiet do not print progress messages
1372
-d, --debug don't remove temporary files
1374
Report bugs to <bug-libtool@gnu.org>."
1377
m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
1378
m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1379
configured by $[0], generated by m4_PACKAGE_STRING.
1381
Copyright (C) 2008 Free Software Foundation, Inc.
1382
This config.lt script is free software; the Free Software Foundation
1383
gives unlimited permision to copy, distribute and modify it."
1385
while test $[#] != 0
1388
--version | --v* | -V )
1389
echo "$lt_cl_version"; exit 0 ;;
1390
--help | --h* | -h )
1391
echo "$lt_cl_help"; exit 0 ;;
1392
--debug | --d* | -d )
1394
--quiet | --q* | --silent | --s* | -q )
1397
-*) AC_MSG_ERROR([unrecognized option: $[1]
1398
Try \`$[0] --help' for more information.]) ;;
1400
*) AC_MSG_ERROR([unrecognized argument: $[1]
1401
Try \`$[0] --help' for more information.]) ;;
1406
if $lt_cl_silent; then
1407
exec AS_MESSAGE_FD>/dev/null
1411
cat >>"$CONFIG_LT" <<_LTEOF
1412
_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
1415
cat >>"$CONFIG_LT" <<\_LTEOF
1416
AC_MSG_NOTICE([creating $ofile])
1417
_LT_OUTPUT_LIBTOOL_COMMANDS
1420
chmod +x "$CONFIG_LT"
1422
# configure is writing to config.log, but config.lt does its own redirection,
1423
# appending to config.log, which fails on DOS, as config.log is still kept
1424
# open by configure. Here we exec the FD to /dev/null, effectively closing
1425
# config.log, so it can be properly (re)opened and appended to by config.lt.
1426
if test "$no_create" != yes; then
1428
test "$silent" = yes &&
1429
lt_config_lt_args="$lt_config_lt_args --quiet"
1430
exec AS_MESSAGE_LOG_FD>/dev/null
1431
$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
1432
exec AS_MESSAGE_LOG_FD>>config.log
1433
$lt_cl_success || AS_EXIT(1)
1440
# If TAG is the built-in tag, create an initial libtool script with a
1441
# default configuration from the untagged config vars. Otherwise add code
1442
# to config.status for appending the configuration named by TAG from the
1443
# matching tagged config vars.
1444
m4_defun([_LT_CONFIG],
1445
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1446
_LT_CONFIG_SAVE_COMMANDS([
1447
m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
1448
m4_if(_LT_TAG, [C], [
1449
# See if we are running on zsh, and set the options which allow our
1450
# commands through without removal of \ escapes.
1451
if test -n "${ZSH_VERSION+set}" ; then
1452
setopt NO_GLOB_SUBST
1456
trap "$RM \"$cfgfile\"; exit 1" 1 2 15
1459
cat <<_LT_EOF >> "$cfgfile"
1462
# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
1463
# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
1464
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1465
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
1470
# ### BEGIN LIBTOOL CONFIG
1471
_LT_LIBTOOL_CONFIG_VARS
1472
_LT_LIBTOOL_TAG_VARS
1473
# ### END LIBTOOL CONFIG
1479
cat <<\_LT_EOF >> "$cfgfile"
1480
# AIX sometimes has problems with the GCC collect2 program. For some
1481
# reason, if we set the COLLECT_NAMES environment variable, the problems
1482
# vanish in a puff of smoke.
1483
if test "X${COLLECT_NAMES+set}" != Xset; then
1485
export COLLECT_NAMES
1493
# We use sed instead of cat because bash on DJGPP gets confused if
1494
# if finds mixed CR/LF and LF-only lines. Since sed operates in
1495
# text mode, it properly converts lines to CR/LF. This bash problem
1496
# is reportedly fixed, but why not run on old versions too?
1497
sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
1498
|| (rm -f "$cfgfile"; exit 1)
1500
_LT_PROG_XSI_SHELLFNS
1502
sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
1503
|| (rm -f "$cfgfile"; exit 1)
1505
mv -f "$cfgfile" "$ofile" ||
1506
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
1509
[cat <<_LT_EOF >> "$ofile"
1511
dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
1512
dnl in a comment (ie after a #).
1513
# ### BEGIN LIBTOOL TAG CONFIG: $1
1514
_LT_LIBTOOL_TAG_VARS(_LT_TAG)
1515
# ### END LIBTOOL TAG CONFIG: $1
1522
TIMESTAMP='$TIMESTAMP'
1524
ofile='$ofile'], [])
1525
])dnl /_LT_CONFIG_SAVE_COMMANDS
1529
# LT_SUPPORTED_TAG(TAG)
1530
# ---------------------
1531
# Trace this macro to discover what tags are supported by the libtool
1532
# --tag option, using:
1533
# autoconf --trace 'LT_SUPPORTED_TAG:$1'
1534
AC_DEFUN([LT_SUPPORTED_TAG], [])
1537
# C support is built-in for now
1538
m4_define([_LT_LANG_C_enabled], [])
1539
m4_define([_LT_TAGS], [])
1544
# Enable libtool support for the given language if not already enabled.
1546
[AC_BEFORE([$0], [LT_OUTPUT])dnl
1549
[C++], [_LT_LANG(CXX)],
1550
[Java], [_LT_LANG(GCJ)],
1551
[Fortran 77], [_LT_LANG(F77)],
1552
[Fortran], [_LT_LANG(FC)],
1553
[Windows Resource], [_LT_LANG(RC)],
1554
[m4_ifdef([_LT_LANG_]$1[_CONFIG],
1556
[m4_fatal([$0: unsupported language: "$1"])])])dnl
1560
# _LT_LANG(LANGNAME)
1561
# ------------------
1562
m4_defun([_LT_LANG],
1563
[m4_ifdef([_LT_LANG_]$1[_enabled], [],
1564
[LT_SUPPORTED_TAG([$1])dnl
1565
m4_append([_LT_TAGS], [$1 ])dnl
1566
m4_define([_LT_LANG_]$1[_enabled], [])dnl
1567
_LT_LANG_$1_CONFIG($1)])dnl
1571
# _LT_LANG_DEFAULT_CONFIG
1572
# -----------------------
1573
m4_defun([_LT_LANG_DEFAULT_CONFIG],
1574
[AC_PROVIDE_IFELSE([AC_PROG_CXX],
1576
[m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
1578
AC_PROVIDE_IFELSE([AC_PROG_F77],
1580
[m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
1582
AC_PROVIDE_IFELSE([AC_PROG_FC],
1584
[m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
1586
dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
1587
dnl pulling things in needlessly.
1588
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1590
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1592
[AC_PROVIDE_IFELSE([LT_PROG_GCJ],
1594
[m4_ifdef([AC_PROG_GCJ],
1595
[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
1596
m4_ifdef([A][M_PROG_GCJ],
1597
[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
1598
m4_ifdef([LT_PROG_GCJ],
1599
[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
1601
AC_PROVIDE_IFELSE([LT_PROG_RC],
1603
[m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
1604
])# _LT_LANG_DEFAULT_CONFIG
1607
AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
1608
AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
1609
AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
1610
AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
1611
dnl aclocal-1.4 backwards compatibility:
1612
dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
1613
dnl AC_DEFUN([AC_LIBTOOL_F77], [])
1614
dnl AC_DEFUN([AC_LIBTOOL_FC], [])
1615
dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
1620
m4_defun([_LT_TAG_COMPILER],
1621
[AC_REQUIRE([AC_PROG_CC])dnl
1623
_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
1624
_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
1625
_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
1626
_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
1628
# If no C compiler was specified, use CC.
1631
# If no C compiler flags were specified, use CFLAGS.
1632
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1634
# Allow CC to be a program name with arguments.
1636
])# _LT_TAG_COMPILER
1639
# _LT_COMPILER_BOILERPLATE
1640
# ------------------------
1641
# Check for compiler boilerplate output or warnings with
1642
# the simple compiler test code.
1643
m4_defun([_LT_COMPILER_BOILERPLATE],
1644
[m4_require([_LT_DECL_SED])dnl
1645
ac_outfile=conftest.$ac_objext
1646
echo "$lt_simple_compile_test_code" >conftest.$ac_ext
1647
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1648
_lt_compiler_boilerplate=`cat conftest.err`
1650
])# _LT_COMPILER_BOILERPLATE
1653
# _LT_LINKER_BOILERPLATE
1654
# ----------------------
1655
# Check for linker boilerplate output or warnings with
1656
# the simple link test code.
1657
m4_defun([_LT_LINKER_BOILERPLATE],
1658
[m4_require([_LT_DECL_SED])dnl
1659
ac_outfile=conftest.$ac_objext
1660
echo "$lt_simple_link_test_code" >conftest.$ac_ext
1661
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1662
_lt_linker_boilerplate=`cat conftest.err`
1664
])# _LT_LINKER_BOILERPLATE
1666
# _LT_REQUIRED_DARWIN_CHECKS
1667
# -------------------------
1668
m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
1670
rhapsody* | darwin*)
1671
AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1672
AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1673
AC_CHECK_TOOL([LIPO], [lipo], [:])
1674
AC_CHECK_TOOL([OTOOL], [otool], [:])
1675
AC_CHECK_TOOL([OTOOL64], [otool64], [:])
1676
_LT_DECL([], [DSYMUTIL], [1],
1677
[Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1678
_LT_DECL([], [NMEDIT], [1],
1679
[Tool to change global to local symbols on Mac OS X])
1680
_LT_DECL([], [LIPO], [1],
1681
[Tool to manipulate fat objects and archives on Mac OS X])
1682
_LT_DECL([], [OTOOL], [1],
1683
[ldd/readelf like tool for Mach-O binaries on Mac OS X])
1684
_LT_DECL([], [OTOOL64], [1],
1685
[ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
1687
AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1688
[lt_cv_apple_cc_single_mod=no
1689
if test -z "${LT_MULTI_MODULE}"; then
1690
# By default we will add the -single_module flag. You can override
1691
# by either setting the environment variable LT_MULTI_MODULE
1692
# non-empty at configure time, or by adding -multi_module to the
1694
rm -rf libconftest.dylib*
1695
echo "int foo(void){return 1;}" > conftest.c
1696
echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1697
-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1698
$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1699
-dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1701
if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
1702
lt_cv_apple_cc_single_mod=yes
1704
cat conftest.err >&AS_MESSAGE_LOG_FD
1706
rm -rf libconftest.dylib*
1709
AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1710
[lt_cv_ld_exported_symbols_list],
1711
[lt_cv_ld_exported_symbols_list=no
1712
save_LDFLAGS=$LDFLAGS
1713
echo "_main" > conftest.sym
1714
LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1715
AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1716
[lt_cv_ld_exported_symbols_list=yes],
1717
[lt_cv_ld_exported_symbols_list=no])
1718
LDFLAGS="$save_LDFLAGS"
1721
rhapsody* | darwin1.[[012]])
1722
_lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
1724
_lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1725
darwin*) # darwin 5.x on
1726
# if running on 10.5 or later, the deployment target defaults
1727
# to the OS version, if on x86, and 10.4, the deployment
1728
# target defaults to 10.4. Don't you love it?
1729
case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1730
10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1731
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1733
_lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1735
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1739
if test "$lt_cv_apple_cc_single_mod" = "yes"; then
1740
_lt_dar_single_mod='$single_module'
1742
if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
1743
_lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
1745
_lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
1747
if test "$DSYMUTIL" != ":"; then
1748
_lt_dsymutil='~$DSYMUTIL $lib || :'
1757
# _LT_DARWIN_LINKER_FEATURES
1758
# --------------------------
1759
# Checks for linker and compiler features on darwin
1760
m4_defun([_LT_DARWIN_LINKER_FEATURES],
1762
m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1763
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
1764
_LT_TAGVAR(hardcode_direct, $1)=no
1765
_LT_TAGVAR(hardcode_automatic, $1)=yes
1766
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1767
_LT_TAGVAR(whole_archive_flag_spec, $1)=''
1768
_LT_TAGVAR(link_all_deplibs, $1)=yes
1769
_LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1770
case $cc_basename in
1771
ifort*) _lt_dar_can_shared=yes ;;
1772
*) _lt_dar_can_shared=$GCC ;;
1774
if test "$_lt_dar_can_shared" = "yes"; then
1775
output_verbose_link_cmd=echo
1776
_LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
1777
_LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1778
_LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
1779
_LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
1781
[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1782
_LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
1783
_LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
1787
_LT_TAGVAR(ld_shlibs, $1)=no
1791
# _LT_SYS_MODULE_PATH_AIX
1792
# -----------------------
1793
# Links a minimal program and checks the executable
1794
# for the system default hardcoded library path. In most cases,
1795
# this is /usr/lib:/lib, but when the MPI compilers are used
1796
# the location of the communication and MPI libs are included too.
1797
# If we don't find anything, use the default library path according
1798
# to the aix ld manual.
1799
m4_defun([_LT_SYS_MODULE_PATH_AIX],
1800
[m4_require([_LT_DECL_SED])dnl
1801
AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1802
lt_aix_libpath_sed='
1803
/Import File Strings/,/^$/ {
1809
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1810
# Check for a 64-bit object if we didn't find anything.
1811
if test -z "$aix_libpath"; then
1812
aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1814
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1815
])# _LT_SYS_MODULE_PATH_AIX
1818
# _LT_SHELL_INIT(ARG)
1819
# -------------------
1820
m4_define([_LT_SHELL_INIT],
1821
[ifdef([AC_DIVERSION_NOTICE],
1822
[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1823
[AC_DIVERT_PUSH(NOTICE)])
1829
# _LT_PROG_ECHO_BACKSLASH
1830
# -----------------------
1831
# Add some code to the start of the generated configure script which
1832
# will find an echo command which doesn't interpret backslashes.
1833
m4_defun([_LT_PROG_ECHO_BACKSLASH],
1835
# Check that we are running under the correct shell.
1836
SHELL=${CONFIG_SHELL-/bin/sh}
1840
# Remove one level of quotation (which was required for Make).
1841
ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1845
ECHO=${lt_ECHO-echo}
1846
if test "X[$]1" = X--no-reexec; then
1847
# Discard the --no-reexec flag, and continue.
1849
elif test "X[$]1" = X--fallback-echo; then
1850
# Avoid inline document here, it may be left over
1852
elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
1853
# Yippee, $ECHO works!
1856
# Restart under the correct shell.
1857
exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1860
if test "X[$]1" = X--fallback-echo; then
1861
# used as fallback echo
1869
# The HP-UX ksh and POSIX shell print the target directory to stdout
1871
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1873
if test -z "$lt_ECHO"; then
1874
if test "X${echo_test_string+set}" != Xset; then
1875
# find a string as large as possible, as long as the shell can cope with it
1876
for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1877
# expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1878
if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
1879
{ test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
1886
if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1887
echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1888
test "X$echo_testing_string" = "X$echo_test_string"; then
1891
# The Solaris, AIX, and Digital Unix default echo programs unquote
1892
# backslashes. This makes it impossible to quote backslashes using
1893
# echo "$something" | sed 's/\\/\\\\/g'
1895
# So, first we look for a working echo in the user's PATH.
1897
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1898
for dir in $PATH /usr/ucb; do
1900
if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1901
test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1902
echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1903
test "X$echo_testing_string" = "X$echo_test_string"; then
1910
if test "X$ECHO" = Xecho; then
1911
# We didn't find a better echo, so look for alternatives.
1912
if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
1913
echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
1914
test "X$echo_testing_string" = "X$echo_test_string"; then
1915
# This shell has a builtin print -r that does the trick.
1917
elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
1918
test "X$CONFIG_SHELL" != X/bin/ksh; then
1919
# If we have ksh, try running configure again with it.
1920
ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1921
export ORIGINAL_CONFIG_SHELL
1922
CONFIG_SHELL=/bin/ksh
1924
exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1928
if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1929
echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1930
test "X$echo_testing_string" = "X$echo_test_string"; then
1931
# Cool, printf works
1933
elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1934
test "X$echo_testing_string" = 'X\t' &&
1935
echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1936
test "X$echo_testing_string" = "X$echo_test_string"; then
1937
CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1939
SHELL="$CONFIG_SHELL"
1941
ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1942
elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1943
test "X$echo_testing_string" = 'X\t' &&
1944
echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1945
test "X$echo_testing_string" = "X$echo_test_string"; then
1946
ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1948
# maybe with a smaller string...
1951
for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1952
if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
1959
if test "$prev" != 'sed 50q "[$]0"'; then
1960
echo_test_string=`eval $prev`
1961
export echo_test_string
1962
exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1964
# Oops. We lost completely, so just stick with echo.
1973
# Copy echo and quote the copy suitably for passing to libtool from
1974
# the Makefile, instead of quoting the original, which is used later.
1976
if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1977
lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1982
_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1983
_LT_DECL([], [ECHO], [1],
1984
[An echo program that does not interpret backslashes])
1985
])# _LT_PROG_ECHO_BACKSLASH
1990
m4_defun([_LT_ENABLE_LOCK],
1991
[AC_ARG_ENABLE([libtool-lock],
1992
[AS_HELP_STRING([--disable-libtool-lock],
1993
[avoid locking (might break parallel builds)])])
1994
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1996
# Some flags need to be propagated to the compiler or linker for good
2000
# Find out which ABI we are using.
2001
echo 'int i;' > conftest.$ac_ext
2002
if AC_TRY_EVAL(ac_compile); then
2003
case `/usr/bin/file conftest.$ac_objext` in
2015
# Find out which ABI we are using.
2016
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
2017
if AC_TRY_EVAL(ac_compile); then
2018
if test "$lt_cv_prog_gnu_ld" = yes; then
2019
case `/usr/bin/file conftest.$ac_objext` in
2021
LD="${LD-ld} -melf32bsmip"
2024
LD="${LD-ld} -melf32bmipn32"
2027
LD="${LD-ld} -melf64bmip"
2031
case `/usr/bin/file conftest.$ac_objext` in
2047
x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
2048
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
2049
# Find out which ABI we are using.
2050
echo 'int i;' > conftest.$ac_ext
2051
if AC_TRY_EVAL(ac_compile); then
2052
case `/usr/bin/file conftest.o` in
2055
x86_64-*kfreebsd*-gnu)
2056
LD="${LD-ld} -m elf_i386_fbsd"
2059
LD="${LD-ld} -m elf_i386"
2061
ppc64-*linux*|powerpc64-*linux*)
2062
LD="${LD-ld} -m elf32ppclinux"
2065
LD="${LD-ld} -m elf_s390"
2068
LD="${LD-ld} -m elf32_sparc"
2074
x86_64-*kfreebsd*-gnu)
2075
LD="${LD-ld} -m elf_x86_64_fbsd"
2078
LD="${LD-ld} -m elf_x86_64"
2080
ppc*-*linux*|powerpc*-*linux*)
2081
LD="${LD-ld} -m elf64ppc"
2083
s390*-*linux*|s390*-*tpf*)
2084
LD="${LD-ld} -m elf64_s390"
2087
LD="${LD-ld} -m elf64_sparc"
2097
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
2098
SAVE_CFLAGS="$CFLAGS"
2099
CFLAGS="$CFLAGS -belf"
2100
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2102
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2104
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2105
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2106
CFLAGS="$SAVE_CFLAGS"
2110
# Find out which ABI we are using.
2111
echo 'int i;' > conftest.$ac_ext
2112
if AC_TRY_EVAL(ac_compile); then
2113
case `/usr/bin/file conftest.o` in
2115
case $lt_cv_prog_gnu_ld in
2116
yes*) LD="${LD-ld} -m elf64_sparc" ;;
2118
if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2130
need_locks="$enable_libtool_lock"
2134
# _LT_CMD_OLD_ARCHIVE
2135
# -------------------
2136
m4_defun([_LT_CMD_OLD_ARCHIVE],
2137
[AC_CHECK_TOOL(AR, ar, false)
2138
test -z "$AR" && AR=ar
2139
test -z "$AR_FLAGS" && AR_FLAGS=cru
2140
_LT_DECL([], [AR], [1], [The archiver])
2141
_LT_DECL([], [AR_FLAGS], [1])
2143
AC_CHECK_TOOL(STRIP, strip, :)
2144
test -z "$STRIP" && STRIP=:
2145
_LT_DECL([], [STRIP], [1], [A symbol stripping program])
2147
AC_CHECK_TOOL(RANLIB, ranlib, :)
2148
test -z "$RANLIB" && RANLIB=:
2149
_LT_DECL([], [RANLIB], [1],
2150
[Commands used to install an old-style archive])
2152
# Determine commands to create old-style static archives.
2153
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
2154
old_postinstall_cmds='chmod 644 $oldlib'
2155
old_postuninstall_cmds=
2157
if test -n "$RANLIB"; then
2160
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
2163
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
2166
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
2168
_LT_DECL([], [old_postinstall_cmds], [2])
2169
_LT_DECL([], [old_postuninstall_cmds], [2])
2170
_LT_TAGDECL([], [old_archive_cmds], [2],
2171
[Commands used to build an old-style archive])
2172
])# _LT_CMD_OLD_ARCHIVE
2175
# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2176
# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2177
# ----------------------------------------------------------------
2178
# Check whether the given compiler option works
2179
AC_DEFUN([_LT_COMPILER_OPTION],
2180
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2181
m4_require([_LT_DECL_SED])dnl
2182
AC_CACHE_CHECK([$1], [$2],
2184
m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2185
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2186
lt_compiler_flag="$3"
2187
# Insert the option either (1) after the last *FLAGS variable, or
2188
# (2) before a word containing "conftest.", or (3) at the end.
2189
# Note that $ac_compile itself does not contain backslashes and begins
2190
# with a dollar sign (not a hyphen), so the echo should work correctly.
2191
# The option is referenced via a variable to avoid confusing sed.
2192
lt_compile=`echo "$ac_compile" | $SED \
2193
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2194
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2195
-e 's:$: $lt_compiler_flag:'`
2196
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2197
(eval "$lt_compile" 2>conftest.err)
2199
cat conftest.err >&AS_MESSAGE_LOG_FD
2200
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2201
if (exit $ac_status) && test -s "$ac_outfile"; then
2202
# The compiler can only warn and ignore the option if not recognized
2203
# So say no if there are warnings other than the usual output.
2204
$ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
2205
$SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2206
if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2213
if test x"[$]$2" = xyes; then
2214
m4_if([$5], , :, [$5])
2216
m4_if([$6], , :, [$6])
2218
])# _LT_COMPILER_OPTION
2221
AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
2222
dnl aclocal-1.4 backwards compatibility:
2223
dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
2226
# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2227
# [ACTION-SUCCESS], [ACTION-FAILURE])
2228
# ----------------------------------------------------
2229
# Check whether the given linker option works
2230
AC_DEFUN([_LT_LINKER_OPTION],
2231
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2232
m4_require([_LT_DECL_SED])dnl
2233
AC_CACHE_CHECK([$1], [$2],
2235
save_LDFLAGS="$LDFLAGS"
2236
LDFLAGS="$LDFLAGS $3"
2237
echo "$lt_simple_link_test_code" > conftest.$ac_ext
2238
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2239
# The linker can only warn and ignore the option if not recognized
2240
# So say no if there are warnings
2241
if test -s conftest.err; then
2242
# Append any errors to the config.log.
2243
cat conftest.err 1>&AS_MESSAGE_LOG_FD
2244
$ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
2245
$SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2246
if diff conftest.exp conftest.er2 >/dev/null; then
2254
LDFLAGS="$save_LDFLAGS"
2257
if test x"[$]$2" = xyes; then
2258
m4_if([$4], , :, [$4])
2260
m4_if([$5], , :, [$5])
2262
])# _LT_LINKER_OPTION
2265
AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
2266
dnl aclocal-1.4 backwards compatibility:
2267
dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
2272
AC_DEFUN([LT_CMD_MAX_LEN],
2273
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2274
# find the maximum length of command line arguments
2275
AC_MSG_CHECKING([the maximum length of command line arguments])
2276
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2282
# On DJGPP, this test can blow up pretty badly due to problems in libc
2283
# (any single argument exceeding 2000 bytes causes a buffer overrun
2284
# during glob expansion). Even if it were fixed, the result of this
2285
# check would be larger than it should be.
2286
lt_cv_sys_max_cmd_len=12288; # 12K is about right
2290
# Under GNU Hurd, this test is not required because there is
2291
# no limit to the length of command line arguments.
2292
# Libtool will interpret -1 as no limit whatsoever
2293
lt_cv_sys_max_cmd_len=-1;
2296
cygwin* | mingw* | cegcc*)
2297
# On Win9x/ME, this test blows up -- it succeeds, but takes
2298
# about 5 minutes as the teststring grows exponentially.
2299
# Worse, since 9x/ME are not pre-emptively multitasking,
2300
# you end up with a "frozen" computer, even though with patience
2301
# the test eventually succeeds (with a max line length of 256k).
2302
# Instead, let's just punt: use the minimum linelength reported by
2303
# all of the supported platforms: 8192 (on NT/2K/XP).
2304
lt_cv_sys_max_cmd_len=8192;
2308
# On AmigaOS with pdksh, this test takes hours, literally.
2309
# So we just punt and use a minimum line length of 8192.
2310
lt_cv_sys_max_cmd_len=8192;
2313
netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2314
# This has been around since 386BSD, at least. Likely further.
2315
if test -x /sbin/sysctl; then
2316
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2317
elif test -x /usr/sbin/sysctl; then
2318
lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2320
lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
2322
# And add a safety zone
2323
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2324
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2328
# We know the value 262144 and hardcode it with a safety zone (like BSD)
2329
lt_cv_sys_max_cmd_len=196608
2333
# Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2334
# due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2335
# nice to cause kernel panics so lets avoid the loop below.
2336
# First set a reasonable default.
2337
lt_cv_sys_max_cmd_len=16384
2339
if test -x /sbin/sysconfig; then
2340
case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2341
*1*) lt_cv_sys_max_cmd_len=-1 ;;
2346
lt_cv_sys_max_cmd_len=102400
2348
sysv5* | sco5v6* | sysv4.2uw2*)
2349
kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2350
if test -n "$kargmax"; then
2351
lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
2353
lt_cv_sys_max_cmd_len=32768
2357
lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
2358
if test -n "$lt_cv_sys_max_cmd_len"; then
2359
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2360
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2362
# Make teststring a little bigger before we do anything with it.
2363
# a 1K string should be a reasonable start.
2364
for i in 1 2 3 4 5 6 7 8 ; do
2365
teststring=$teststring$teststring
2367
SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2368
# If test is not a shell built-in, we'll probably end up computing a
2369
# maximum length that is only half of the actual maximum length, but
2371
while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
2372
= "XX$teststring$teststring"; } >/dev/null 2>&1 &&
2373
test $i != 17 # 1/2 MB should be enough
2376
teststring=$teststring$teststring
2378
# Only check the string length outside the loop.
2379
lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
2381
# Add a significant safety factor because C++ compilers can tack on
2382
# massive amounts of additional arguments before passing them to the
2383
# linker. It appears as though 1/2 is a usable value.
2384
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2389
if test -n $lt_cv_sys_max_cmd_len ; then
2390
AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2394
max_cmd_len=$lt_cv_sys_max_cmd_len
2395
_LT_DECL([], [max_cmd_len], [0],
2396
[What is the maximum length of a command?])
2400
AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
2401
dnl aclocal-1.4 backwards compatibility:
2402
dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
2407
m4_defun([_LT_HEADER_DLFCN],
2408
[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
2409
])# _LT_HEADER_DLFCN
2412
# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2413
# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2414
# ----------------------------------------------------------------
2415
m4_defun([_LT_TRY_DLOPEN_SELF],
2416
[m4_require([_LT_HEADER_DLFCN])dnl
2417
if test "$cross_compiling" = yes; then :
2420
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2421
lt_status=$lt_dlunknown
2422
cat > conftest.$ac_ext <<_LT_EOF
2423
[#line __oline__ "configure"
2424
#include "confdefs.h"
2433
# define LT_DLGLOBAL RTLD_GLOBAL
2436
# define LT_DLGLOBAL DL_GLOBAL
2438
# define LT_DLGLOBAL 0
2442
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2443
find out it does not work in some platform. */
2444
#ifndef LT_DLLAZY_OR_NOW
2446
# define LT_DLLAZY_OR_NOW RTLD_LAZY
2449
# define LT_DLLAZY_OR_NOW DL_LAZY
2452
# define LT_DLLAZY_OR_NOW RTLD_NOW
2455
# define LT_DLLAZY_OR_NOW DL_NOW
2457
# define LT_DLLAZY_OR_NOW 0
2464
void fnord() { int i=42;}
2467
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2468
int status = $lt_dlunknown;
2472
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
2473
else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
2474
/* dlclose (self); */
2482
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
2483
(./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
2486
x$lt_dlno_uscore) $1 ;;
2487
x$lt_dlneed_uscore) $2 ;;
2488
x$lt_dlunknown|x*) $3 ;;
2491
# compilation failed
2496
])# _LT_TRY_DLOPEN_SELF
2499
# LT_SYS_DLOPEN_SELF
2500
# ------------------
2501
AC_DEFUN([LT_SYS_DLOPEN_SELF],
2502
[m4_require([_LT_HEADER_DLFCN])dnl
2503
if test "x$enable_dlopen" != xyes; then
2504
enable_dlopen=unknown
2505
enable_dlopen_self=unknown
2506
enable_dlopen_self_static=unknown
2513
lt_cv_dlopen="load_add_on"
2515
lt_cv_dlopen_self=yes
2518
mingw* | pw32* | cegcc*)
2519
lt_cv_dlopen="LoadLibrary"
2524
lt_cv_dlopen="dlopen"
2529
# if libdl is installed we need to link against it
2530
AC_CHECK_LIB([dl], [dlopen],
2531
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2534
lt_cv_dlopen_self=yes
2539
AC_CHECK_FUNC([shl_load],
2540
[lt_cv_dlopen="shl_load"],
2541
[AC_CHECK_LIB([dld], [shl_load],
2542
[lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
2543
[AC_CHECK_FUNC([dlopen],
2544
[lt_cv_dlopen="dlopen"],
2545
[AC_CHECK_LIB([dl], [dlopen],
2546
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2547
[AC_CHECK_LIB([svld], [dlopen],
2548
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2549
[AC_CHECK_LIB([dld], [dld_link],
2550
[lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
2559
if test "x$lt_cv_dlopen" != xno; then
2565
case $lt_cv_dlopen in
2567
save_CPPFLAGS="$CPPFLAGS"
2568
test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2570
save_LDFLAGS="$LDFLAGS"
2571
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2574
LIBS="$lt_cv_dlopen_libs $LIBS"
2576
AC_CACHE_CHECK([whether a program can dlopen itself],
2577
lt_cv_dlopen_self, [dnl
2578
_LT_TRY_DLOPEN_SELF(
2579
lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2580
lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2583
if test "x$lt_cv_dlopen_self" = xyes; then
2584
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2585
AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2586
lt_cv_dlopen_self_static, [dnl
2587
_LT_TRY_DLOPEN_SELF(
2588
lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2589
lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
2593
CPPFLAGS="$save_CPPFLAGS"
2594
LDFLAGS="$save_LDFLAGS"
2599
case $lt_cv_dlopen_self in
2600
yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2601
*) enable_dlopen_self=unknown ;;
2604
case $lt_cv_dlopen_self_static in
2605
yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2606
*) enable_dlopen_self_static=unknown ;;
2609
_LT_DECL([dlopen_support], [enable_dlopen], [0],
2610
[Whether dlopen is supported])
2611
_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2612
[Whether dlopen of programs is supported])
2613
_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2614
[Whether dlopen of statically linked programs is supported])
2615
])# LT_SYS_DLOPEN_SELF
2618
AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2619
dnl aclocal-1.4 backwards compatibility:
2620
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2623
# _LT_COMPILER_C_O([TAGNAME])
2624
# ---------------------------
2625
# Check to see if options -c and -o are simultaneously supported by compiler.
2626
# This macro does not hard code the compiler like AC_PROG_CC_C_O.
2627
m4_defun([_LT_COMPILER_C_O],
2628
[m4_require([_LT_DECL_SED])dnl
2629
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2630
m4_require([_LT_TAG_COMPILER])dnl
2631
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2632
[_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2633
[_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2634
$RM -r conftest 2>/dev/null
2638
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2640
lt_compiler_flag="-o out/conftest2.$ac_objext"
2641
# Insert the option either (1) after the last *FLAGS variable, or
2642
# (2) before a word containing "conftest.", or (3) at the end.
2643
# Note that $ac_compile itself does not contain backslashes and begins
2644
# with a dollar sign (not a hyphen), so the echo should work correctly.
2645
lt_compile=`echo "$ac_compile" | $SED \
2646
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2647
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2648
-e 's:$: $lt_compiler_flag:'`
2649
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2650
(eval "$lt_compile" 2>out/conftest.err)
2652
cat out/conftest.err >&AS_MESSAGE_LOG_FD
2653
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2654
if (exit $ac_status) && test -s out/conftest2.$ac_objext
2656
# The compiler can only warn and ignore the option if not recognized
2657
# So say no if there are warnings
2658
$ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
2659
$SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2660
if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2661
_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2664
chmod u+w . 2>&AS_MESSAGE_LOG_FD
2666
# SGI C++ compiler will create directory out/ii_files/ for
2667
# template instantiation
2668
test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2669
$RM out/* && rmdir out
2674
_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2675
[Does compiler simultaneously support -c and -o options?])
2676
])# _LT_COMPILER_C_O
2679
# _LT_COMPILER_FILE_LOCKS([TAGNAME])
2680
# ----------------------------------
2681
# Check to see if we can do hard links to lock some files if needed
2682
m4_defun([_LT_COMPILER_FILE_LOCKS],
2683
[m4_require([_LT_ENABLE_LOCK])dnl
2684
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2685
_LT_COMPILER_C_O([$1])
2687
hard_links="nottested"
2688
if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2689
# do not overwrite the value of need_locks provided by the user
2690
AC_MSG_CHECKING([if we can lock with hard links])
2693
ln conftest.a conftest.b 2>/dev/null && hard_links=no
2695
ln conftest.a conftest.b 2>&5 || hard_links=no
2696
ln conftest.a conftest.b 2>/dev/null && hard_links=no
2697
AC_MSG_RESULT([$hard_links])
2698
if test "$hard_links" = no; then
2699
AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2705
_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2706
])# _LT_COMPILER_FILE_LOCKS
2711
m4_defun([_LT_CHECK_OBJDIR],
2712
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2713
[rm -f .libs 2>/dev/null
2714
mkdir .libs 2>/dev/null
2715
if test -d .libs; then
2718
# MS-DOS does not allow filenames that begin with a dot.
2721
rmdir .libs 2>/dev/null])
2722
objdir=$lt_cv_objdir
2723
_LT_DECL([], [objdir], [0],
2724
[The name of the directory that contains temporary libtool files])dnl
2725
m4_pattern_allow([LT_OBJDIR])dnl
2726
AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
2727
[Define to the sub-directory in which libtool stores uninstalled libraries.])
2728
])# _LT_CHECK_OBJDIR
2731
# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2732
# --------------------------------------
2733
# Check hardcoding attributes.
2734
m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2735
[AC_MSG_CHECKING([how to hardcode library paths into programs])
2736
_LT_TAGVAR(hardcode_action, $1)=
2737
if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2738
test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2739
test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2741
# We can hardcode non-existent directories.
2742
if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
2743
# If the only mechanism to avoid hardcoding is shlibpath_var, we
2744
# have to relink, otherwise we might link with an installed library
2745
# when we should be linking with a yet-to-be-installed one
2746
## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2747
test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
2748
# Linking always hardcodes the temporary library directory.
2749
_LT_TAGVAR(hardcode_action, $1)=relink
2751
# We can link without hardcoding, and we can hardcode nonexisting dirs.
2752
_LT_TAGVAR(hardcode_action, $1)=immediate
2755
# We cannot hardcode anything, or else we can only hardcode existing
2757
_LT_TAGVAR(hardcode_action, $1)=unsupported
2759
AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2761
if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2762
test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2763
# Fast installation is not supported
2764
enable_fast_install=no
2765
elif test "$shlibpath_overrides_runpath" = yes ||
2766
test "$enable_shared" = no; then
2767
# Fast installation is not necessary
2768
enable_fast_install=needless
2770
_LT_TAGDECL([], [hardcode_action], [0],
2771
[How to hardcode a shared library path into an executable])
2772
])# _LT_LINKER_HARDCODE_LIBPATH
2777
m4_defun([_LT_CMD_STRIPLIB],
2778
[m4_require([_LT_DECL_EGREP])
2781
AC_MSG_CHECKING([whether stripping libraries is possible])
2782
if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2783
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2784
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2785
AC_MSG_RESULT([yes])
2787
# FIXME - insert some real tests, host_os isn't really good enough
2790
if test -n "$STRIP" ; then
2791
striplib="$STRIP -x"
2792
old_striplib="$STRIP -S"
2793
AC_MSG_RESULT([yes])
2803
_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2804
_LT_DECL([], [striplib], [1])
2805
])# _LT_CMD_STRIPLIB
2808
# _LT_SYS_DYNAMIC_LINKER([TAG])
2809
# -----------------------------
2810
# PORTME Fill in your ld.so characteristics
2811
m4_defun([_LT_SYS_DYNAMIC_LINKER],
2812
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2813
m4_require([_LT_DECL_EGREP])dnl
2814
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2815
m4_require([_LT_DECL_OBJDUMP])dnl
2816
m4_require([_LT_DECL_SED])dnl
2817
AC_MSG_CHECKING([dynamic linker characteristics])
2820
if test "$GCC" = yes; then
2822
darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2823
*) lt_awk_arg="/^libraries:/" ;;
2825
lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2826
if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
2827
# if the path contains ";" then we assume it to be the separator
2828
# otherwise default to the standard path separator (i.e. ":") - it is
2829
# assumed that no part of a normal pathname contains ";" but that should
2830
# okay in the real world where ";" in dirpaths is itself problematic.
2831
lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
2833
lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2835
# Ok, now we have the path, separated by spaces, we can step through it
2836
# and add multilib dir if necessary.
2837
lt_tmp_lt_search_path_spec=
2838
lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2839
for lt_sys_path in $lt_search_path_spec; do
2840
if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2841
lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2843
test -d "$lt_sys_path" && \
2844
lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2847
lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
2848
BEGIN {RS=" "; FS="/|\n";} {
2851
for (lt_i = NF; lt_i > 0; lt_i--) {
2852
if ($lt_i != "" && $lt_i != ".") {
2853
if ($lt_i == "..") {
2856
if (lt_count == 0) {
2857
lt_foo="/" $lt_i lt_foo;
2864
if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2865
if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2867
sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
2869
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2872
libname_spec='lib$name'
2880
shlibpath_overrides_runpath=unknown
2882
dynamic_linker="$host_os ld.so"
2883
sys_lib_dlsearch_path_spec="/lib /usr/lib"
2884
need_lib_prefix=unknown
2885
hardcode_into_libs=no
2887
# when you set need_version to no, make sure it does not cause -set_version
2888
# flags to be left without arguments
2889
need_version=unknown
2894
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2895
shlibpath_var=LIBPATH
2897
# AIX 3 has no versioning support, so we append a major version to the name.
2898
soname_spec='${libname}${release}${shared_ext}$major'
2905
hardcode_into_libs=yes
2906
if test "$host_cpu" = ia64; then
2907
# AIX 5 supports IA64
2908
library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2909
shlibpath_var=LD_LIBRARY_PATH
2911
# With GCC up to 2.95.x, collect2 would create an import file
2912
# for dependence libraries. The import file would start with
2913
# the line `#! .'. This would cause the generated library to
2914
# depend on `.', always an invalid library. This was fixed in
2915
# development snapshots of GCC prior to 3.0.
2917
aix4 | aix4.[[01]] | aix4.[[01]].*)
2918
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2920
echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2927
# AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2928
# soname into executable. Probably we can add versioning support to
2929
# collect2, so additional links can be useful in future.
2930
if test "$aix_use_runtimelinking" = yes; then
2931
# If using run time linking (on AIX 4.2 or later) use lib<name>.so
2932
# instead of lib<name>.a to let people know that these are not
2933
# typical AIX shared libraries.
2934
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2936
# We preserve .a as extension for shared libraries through AIX4.2
2937
# and later when we are not doing run time linking.
2938
library_names_spec='${libname}${release}.a $libname.a'
2939
soname_spec='${libname}${release}${shared_ext}$major'
2941
shlibpath_var=LIBPATH
2948
# Since July 2007 AmigaOS4 officially supports .so libraries.
2949
# When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2950
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2953
library_names_spec='$libname.ixlibrary $libname.a'
2954
# Create ${libname}_ixlibrary.a entries in /sys/libs.
2955
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'
2961
library_names_spec='${libname}${shared_ext}'
2962
dynamic_linker="$host_os ld.so"
2963
shlibpath_var=LIBRARY_PATH
2969
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2970
soname_spec='${libname}${release}${shared_ext}$major'
2971
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2972
shlibpath_var=LD_LIBRARY_PATH
2973
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2974
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2975
# the default ld.so.conf also contains /usr/contrib/lib and
2976
# /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2977
# libtool to hard-code these into programs
2980
cygwin* | mingw* | pw32* | cegcc*)
2981
version_type=windows
2986
case $GCC,$host_os in
2987
yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
2988
library_names_spec='$libname.dll.a'
2989
# DLL is installed to $(libdir)/../bin by postinstall_cmds
2990
postinstall_cmds='base_file=`basename \${file}`~
2991
dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2992
dldir=$destdir/`dirname \$dlpath`~
2993
test -d \$dldir || mkdir -p \$dldir~
2994
$install_prog $dir/$dlname \$dldir/$dlname~
2995
chmod a+x \$dldir/$dlname~
2996
if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2997
eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2999
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3000
dlpath=$dir/\$dldll~
3002
shlibpath_overrides_runpath=yes
3006
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
3007
soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3008
sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
3011
# MinGW DLLs use traditional 'lib' prefix
3012
soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3013
sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
3014
if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
3015
# It is most probably a Windows format PATH printed by
3016
# mingw gcc, but we are running on Cygwin. Gcc prints its search
3017
# path with ; separators, and with drive letters. We can handle the
3018
# drive letters (cygwin fileutils understands them), so leave them,
3019
# especially as we might pass files found there to a mingw objdump,
3020
# which wouldn't understand a cygwinified path. Ahh.
3021
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3023
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3027
# pw32 DLLs use 'pw' prefix rather than 'lib'
3028
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3034
library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3037
dynamic_linker='Win32 ld.exe'
3038
# FIXME: first we should search . and the directory the executable is in
3042
darwin* | rhapsody*)
3043
dynamic_linker="$host_os dyld"
3047
library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
3048
soname_spec='${libname}${release}${major}$shared_ext'
3049
shlibpath_overrides_runpath=yes
3050
shlibpath_var=DYLD_LIBRARY_PATH
3051
shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
3053
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
3054
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3061
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
3062
soname_spec='${libname}${release}${shared_ext}$major'
3063
shlibpath_var=LD_LIBRARY_PATH
3070
freebsd* | dragonfly*)
3071
# DragonFly does not have aout. When/if they implement a new
3072
# versioning mechanism, adjust this.
3073
if test -x /usr/bin/objformat; then
3074
objformat=`/usr/bin/objformat`
3077
freebsd[[123]]*) objformat=aout ;;
3081
version_type=freebsd-$objformat
3082
case $version_type in
3084
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3089
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3093
shlibpath_var=LD_LIBRARY_PATH
3096
shlibpath_overrides_runpath=yes
3098
freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3099
shlibpath_overrides_runpath=yes
3100
hardcode_into_libs=yes
3102
freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3103
freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
3104
shlibpath_overrides_runpath=no
3105
hardcode_into_libs=yes
3107
*) # from 4.6 on, and DragonFly
3108
shlibpath_overrides_runpath=yes
3109
hardcode_into_libs=yes
3118
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3119
soname_spec='${libname}${release}${shared_ext}$major'
3120
shlibpath_var=LD_LIBRARY_PATH
3121
hardcode_into_libs=yes
3124
hpux9* | hpux10* | hpux11*)
3125
# Give a soname corresponding to the major version so that dld.sl refuses to
3126
# link against other versions.
3133
hardcode_into_libs=yes
3134
dynamic_linker="$host_os dld.so"
3135
shlibpath_var=LD_LIBRARY_PATH
3136
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3137
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3138
soname_spec='${libname}${release}${shared_ext}$major'
3139
if test "X$HPUX_IA64_MODE" = X32; then
3140
sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3142
sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3144
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3148
hardcode_into_libs=yes
3149
dynamic_linker="$host_os dld.sl"
3150
shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3151
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3152
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3153
soname_spec='${libname}${release}${shared_ext}$major'
3154
sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3155
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3159
dynamic_linker="$host_os dld.sl"
3160
shlibpath_var=SHLIB_PATH
3161
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3162
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3163
soname_spec='${libname}${release}${shared_ext}$major'
3166
# HP-UX runs *really* slowly unless shared libraries are mode 555.
3167
postinstall_cmds='chmod 555 $lib'
3174
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3175
soname_spec='${libname}${release}${shared_ext}$major'
3176
dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3177
shlibpath_var=LD_LIBRARY_PATH
3178
shlibpath_overrides_runpath=no
3179
hardcode_into_libs=yes
3182
irix5* | irix6* | nonstopux*)
3184
nonstopux*) version_type=nonstopux ;;
3186
if test "$lt_cv_prog_gnu_ld" = yes; then
3194
soname_spec='${libname}${release}${shared_ext}$major'
3195
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3197
irix5* | nonstopux*)
3201
case $LD in # libtool.m4 will add one of these switches to LD
3202
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3203
libsuff= shlibsuff= libmagic=32-bit;;
3204
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3205
libsuff=32 shlibsuff=N32 libmagic=N32;;
3206
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3207
libsuff=64 shlibsuff=64 libmagic=64-bit;;
3208
*) libsuff= shlibsuff= libmagic=never-match;;
3212
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3213
shlibpath_overrides_runpath=no
3214
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3215
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3216
hardcode_into_libs=yes
3219
# No shared lib support for Linux oldld, aout, or coff.
3220
linux*oldld* | linux*aout* | linux*coff*)
3224
# This must be Linux ELF.
3225
linux* | k*bsd*-gnu | kopensolaris*-gnu)
3229
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3230
soname_spec='${libname}${release}${shared_ext}$major'
3231
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3232
shlibpath_var=LD_LIBRARY_PATH
3233
shlibpath_overrides_runpath=no
3234
# Some binutils ld are patched to set DT_RUNPATH
3235
save_LDFLAGS=$LDFLAGS
3237
eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
3238
LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
3239
AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3240
[AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
3241
[shlibpath_overrides_runpath=yes])])
3242
LDFLAGS=$save_LDFLAGS
3245
# This implies no fast_install, which is unacceptable.
3246
# Some rework will be needed to allow for fast_install
3247
# before this can be enabled.
3248
hardcode_into_libs=yes
3250
# Append ld.so.conf contents to the search path
3251
if test -f /etc/ld.so.conf; then
3252
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
3253
sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
3256
# We used to test for /lib/ld.so.1 and disable shared libraries on
3257
# powerpc, because MkLinux only supported shared libraries with the
3258
# GNU dynamic linker. Since this was broken with cross compilers,
3259
# most powerpc-linux boxes support dynamic linking these days and
3260
# people can always --disable-shared, the test was removed, and we
3261
# assume the GNU/Linux dynamic linker is in use.
3262
dynamic_linker='GNU/Linux ld.so'
3269
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3270
soname_spec='${libname}${release}${shared_ext}$major'
3271
shlibpath_var=LD_LIBRARY_PATH
3272
shlibpath_overrides_runpath=no
3273
hardcode_into_libs=yes
3274
dynamic_linker='NetBSD ld.elf_so'
3281
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
3282
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3283
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3284
dynamic_linker='NetBSD (a.out) ld.so'
3286
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3287
soname_spec='${libname}${release}${shared_ext}$major'
3288
dynamic_linker='NetBSD ld.elf_so'
3290
shlibpath_var=LD_LIBRARY_PATH
3291
shlibpath_overrides_runpath=yes
3292
hardcode_into_libs=yes
3297
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3298
shlibpath_var=LD_LIBRARY_PATH
3299
shlibpath_overrides_runpath=yes
3306
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3307
soname_spec='${libname}${release}${shared_ext}$major'
3308
shlibpath_var=LD_LIBRARY_PATH
3309
shlibpath_overrides_runpath=no
3310
hardcode_into_libs=yes
3311
dynamic_linker='ldqnx.so'
3316
sys_lib_dlsearch_path_spec="/usr/lib"
3318
# Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
3320
openbsd3.3 | openbsd3.3.*) need_version=yes ;;
3321
*) need_version=no ;;
3323
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3324
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3325
shlibpath_var=LD_LIBRARY_PATH
3326
if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3328
openbsd2.[[89]] | openbsd2.[[89]].*)
3329
shlibpath_overrides_runpath=no
3332
shlibpath_overrides_runpath=yes
3336
shlibpath_overrides_runpath=yes
3341
libname_spec='$name'
3344
library_names_spec='$libname${shared_ext} $libname.a'
3345
dynamic_linker='OS/2 ld.exe'
3346
shlibpath_var=LIBPATH
3349
osf3* | osf4* | osf5*)
3353
soname_spec='${libname}${release}${shared_ext}$major'
3354
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3355
shlibpath_var=LD_LIBRARY_PATH
3356
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3357
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3368
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3369
soname_spec='${libname}${release}${shared_ext}$major'
3370
shlibpath_var=LD_LIBRARY_PATH
3371
shlibpath_overrides_runpath=yes
3372
hardcode_into_libs=yes
3373
# ldd complains unless libraries are executable
3374
postinstall_cmds='chmod +x $lib'
3379
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3380
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3381
shlibpath_var=LD_LIBRARY_PATH
3382
shlibpath_overrides_runpath=yes
3383
if test "$with_gnu_ld" = yes; then
3391
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3392
soname_spec='${libname}${release}${shared_ext}$major'
3393
shlibpath_var=LD_LIBRARY_PATH
3394
case $host_vendor in
3396
shlibpath_overrides_runpath=no
3398
runpath_var=LD_RUN_PATH
3406
shlibpath_overrides_runpath=no
3407
sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3413
if test -d /usr/nec ;then
3415
library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
3416
soname_spec='$libname${shared_ext}.$major'
3417
shlibpath_var=LD_LIBRARY_PATH
3421
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3422
version_type=freebsd-elf
3425
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3426
soname_spec='${libname}${release}${shared_ext}$major'
3427
shlibpath_var=LD_LIBRARY_PATH
3428
shlibpath_overrides_runpath=yes
3429
hardcode_into_libs=yes
3430
if test "$with_gnu_ld" = yes; then
3431
sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3433
sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3436
sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3440
sys_lib_dlsearch_path_spec='/usr/lib'
3444
# TPF is a cross-target only. Preferred cross-host = GNU/Linux.
3448
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3449
shlibpath_var=LD_LIBRARY_PATH
3450
shlibpath_overrides_runpath=no
3451
hardcode_into_libs=yes
3456
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3457
soname_spec='${libname}${release}${shared_ext}$major'
3458
shlibpath_var=LD_LIBRARY_PATH
3465
AC_MSG_RESULT([$dynamic_linker])
3466
test "$dynamic_linker" = no && can_build_shared=no
3468
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3469
if test "$GCC" = yes; then
3470
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3473
if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
3474
sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
3476
if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
3477
sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
3480
_LT_DECL([], [variables_saved_for_relink], [1],
3481
[Variables whose values should be saved in libtool wrapper scripts and
3482
restored at link time])
3483
_LT_DECL([], [need_lib_prefix], [0],
3484
[Do we need the "lib" prefix for modules?])
3485
_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3486
_LT_DECL([], [version_type], [0], [Library versioning type])
3487
_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
3488
_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3489
_LT_DECL([], [shlibpath_overrides_runpath], [0],
3490
[Is shlibpath searched before the hard-coded library search path?])
3491
_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3492
_LT_DECL([], [library_names_spec], [1],
3493
[[List of archive names. First name is the real one, the rest are links.
3494
The last name is the one that the linker finds with -lNAME]])
3495
_LT_DECL([], [soname_spec], [1],
3496
[[The coded name of the library, if different from the real name]])
3497
_LT_DECL([], [postinstall_cmds], [2],
3498
[Command to use after installation of a shared archive])
3499
_LT_DECL([], [postuninstall_cmds], [2],
3500
[Command to use after uninstallation of a shared archive])
3501
_LT_DECL([], [finish_cmds], [2],
3502
[Commands used to finish a libtool library installation in a directory])
3503
_LT_DECL([], [finish_eval], [1],
3504
[[As "finish_cmds", except a single script fragment to be evaled but
3506
_LT_DECL([], [hardcode_into_libs], [0],
3507
[Whether we should hardcode library paths into libraries])
3508
_LT_DECL([], [sys_lib_search_path_spec], [2],
3509
[Compile-time system search path for libraries])
3510
_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
3511
[Run-time system search path for libraries])
3512
])# _LT_SYS_DYNAMIC_LINKER
3515
# _LT_PATH_TOOL_PREFIX(TOOL)
3516
# --------------------------
3517
# find a file program which can recognize shared library
3518
AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3519
[m4_require([_LT_DECL_EGREP])dnl
3520
AC_MSG_CHECKING([for $1])
3521
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3523
[[\\/*] | ?:[\\/]*])
3524
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3527
lt_save_MAGIC_CMD="$MAGIC_CMD"
3528
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3529
dnl $ac_dummy forces splitting on constant user-supplied paths.
3530
dnl POSIX.2 word splitting is done only on the output of word expansions,
3531
dnl not every word. This closes a longstanding sh security hole.
3532
ac_dummy="m4_if([$2], , $PATH, [$2])"
3533
for ac_dir in $ac_dummy; do
3535
test -z "$ac_dir" && ac_dir=.
3536
if test -f $ac_dir/$1; then
3537
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3538
if test -n "$file_magic_test_file"; then
3539
case $deplibs_check_method in
3541
file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3542
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3543
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3544
$EGREP "$file_magic_regex" > /dev/null; then
3549
*** Warning: the command libtool uses to detect shared libraries,
3550
*** $file_magic_cmd, produces output that libtool cannot recognize.
3551
*** The result is that libtool may fail to recognize shared libraries
3552
*** as such. This will affect the creation of libtool libraries that
3553
*** depend on shared libraries, but programs linked with such libtool
3554
*** libraries will work regardless of this problem. Nevertheless, you
3555
*** may want to report the problem to your system manager and/or to
3556
*** bug-libtool@gnu.org
3566
MAGIC_CMD="$lt_save_MAGIC_CMD"
3569
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3570
if test -n "$MAGIC_CMD"; then
3571
AC_MSG_RESULT($MAGIC_CMD)
3575
_LT_DECL([], [MAGIC_CMD], [0],
3576
[Used to examine libraries when file_magic_cmd begins with "file"])dnl
3577
])# _LT_PATH_TOOL_PREFIX
3580
AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3581
dnl aclocal-1.4 backwards compatibility:
3582
dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3587
# find a file program which can recognize a shared library
3588
m4_defun([_LT_PATH_MAGIC],
3589
[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3590
if test -z "$lt_cv_path_MAGIC_CMD"; then
3591
if test -n "$ac_tool_prefix"; then
3592
_LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3602
# find the pathname to the GNU or non-GNU linker
3603
AC_DEFUN([LT_PATH_LD],
3604
[AC_REQUIRE([AC_PROG_CC])dnl
3605
AC_REQUIRE([AC_CANONICAL_HOST])dnl
3606
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3607
m4_require([_LT_DECL_SED])dnl
3608
m4_require([_LT_DECL_EGREP])dnl
3610
AC_ARG_WITH([gnu-ld],
3611
[AS_HELP_STRING([--with-gnu-ld],
3612
[assume the C compiler uses GNU ld @<:@default=no@:>@])],
3613
[test "$withval" = no || with_gnu_ld=yes],
3614
[with_gnu_ld=no])dnl
3617
if test "$GCC" = yes; then
3618
# Check if gcc -print-prog-name=ld gives a path.
3619
AC_MSG_CHECKING([for ld used by $CC])
3622
# gcc leaves a trailing carriage return which upsets mingw
3623
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3625
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3628
# Accept absolute paths.
3629
[[\\/]]* | ?:[[\\/]]*)
3630
re_direlt='/[[^/]][[^/]]*/\.\./'
3631
# Canonicalize the pathname of ld
3632
ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3633
while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3634
ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3636
test -z "$LD" && LD="$ac_prog"
3639
# If it fails, then pretend we aren't using GCC.
3643
# If it is relative, then search for the first ld in PATH.
3647
elif test "$with_gnu_ld" = yes; then
3648
AC_MSG_CHECKING([for GNU ld])
3650
AC_MSG_CHECKING([for non-GNU ld])
3652
AC_CACHE_VAL(lt_cv_path_LD,
3653
[if test -z "$LD"; then
3654
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3655
for ac_dir in $PATH; do
3657
test -z "$ac_dir" && ac_dir=.
3658
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3659
lt_cv_path_LD="$ac_dir/$ac_prog"
3660
# Check to see if the program is GNU ld. I'd rather use --version,
3661
# but apparently some variants of GNU ld only accept -v.
3662
# Break only if it was the GNU/non-GNU ld that we prefer.
3663
case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3664
*GNU* | *'with BFD'*)
3665
test "$with_gnu_ld" != no && break
3668
test "$with_gnu_ld" != yes && break
3675
lt_cv_path_LD="$LD" # Let the user override the test with a path.
3678
if test -n "$LD"; then
3683
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3687
_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3691
AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3692
AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3693
dnl aclocal-1.4 backwards compatibility:
3694
dnl AC_DEFUN([AM_PROG_LD], [])
3695
dnl AC_DEFUN([AC_PROG_LD], [])
3700
m4_defun([_LT_PATH_LD_GNU],
3701
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3702
[# I'd rather use --version here, but apparently some GNU lds only accept -v.
3703
case `$LD -v 2>&1 </dev/null` in
3704
*GNU* | *'with BFD'*)
3705
lt_cv_prog_gnu_ld=yes
3708
lt_cv_prog_gnu_ld=no
3711
with_gnu_ld=$lt_cv_prog_gnu_ld
3717
# find reload flag for linker
3718
# -- PORTME Some linkers may need a different reload flag.
3719
m4_defun([_LT_CMD_RELOAD],
3720
[AC_CACHE_CHECK([for $LD option to reload object files],
3721
lt_cv_ld_reload_flag,
3722
[lt_cv_ld_reload_flag='-r'])
3723
reload_flag=$lt_cv_ld_reload_flag
3724
case $reload_flag in
3726
*) reload_flag=" $reload_flag" ;;
3728
reload_cmds='$LD$reload_flag -o $output$reload_objs'
3731
if test "$GCC" = yes; then
3732
reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3734
reload_cmds='$LD$reload_flag -o $output$reload_objs'
3738
_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3739
_LT_DECL([], [reload_cmds], [2])dnl
3743
# _LT_CHECK_MAGIC_METHOD
3744
# ----------------------
3745
# how to check for library dependencies
3746
# -- PORTME fill in with the dynamic library characteristics
3747
m4_defun([_LT_CHECK_MAGIC_METHOD],
3748
[m4_require([_LT_DECL_EGREP])
3749
m4_require([_LT_DECL_OBJDUMP])
3750
AC_CACHE_CHECK([how to recognize dependent libraries],
3751
lt_cv_deplibs_check_method,
3752
[lt_cv_file_magic_cmd='$MAGIC_CMD'
3753
lt_cv_file_magic_test_file=
3754
lt_cv_deplibs_check_method='unknown'
3755
# Need to set the preceding variable on all platforms that support
3756
# interlibrary dependencies.
3757
# 'none' -- dependencies not supported.
3758
# `unknown' -- same as none, but documents that we really don't know.
3759
# 'pass_all' -- all dependencies passed with no checks.
3760
# 'test_compile' -- check by making test program.
3761
# 'file_magic [[regex]]' -- check by looking for files in library path
3762
# which responds to the $file_magic_cmd with a given extended regex.
3763
# If you have `file' or equivalent on your system and you're not sure
3764
# whether `pass_all' will *always* work, you probably want this one.
3768
lt_cv_deplibs_check_method=pass_all
3772
lt_cv_deplibs_check_method=pass_all
3776
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3777
lt_cv_file_magic_cmd='/usr/bin/file -L'
3778
lt_cv_file_magic_test_file=/shlib/libc.so
3782
# func_win32_libid is a shell function defined in ltmain.sh
3783
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3784
lt_cv_file_magic_cmd='func_win32_libid'
3788
# Base MSYS/MinGW do not provide the 'file' command needed by
3789
# func_win32_libid shell function, so use a weaker test based on 'objdump',
3790
# unless we find 'file', for example because we are cross-compiling.
3791
if ( file / ) >/dev/null 2>&1; then
3792
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3793
lt_cv_file_magic_cmd='func_win32_libid'
3795
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3796
lt_cv_file_magic_cmd='$OBJDUMP -f'
3801
# use the weaker test based on 'objdump'. See mingw*.
3802
lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3803
lt_cv_file_magic_cmd='$OBJDUMP -f'
3806
darwin* | rhapsody*)
3807
lt_cv_deplibs_check_method=pass_all
3810
freebsd* | dragonfly*)
3811
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3814
# Not sure whether the presence of OpenBSD here was a mistake.
3815
# Let's accept both of them until this is cleared up.
3816
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3817
lt_cv_file_magic_cmd=/usr/bin/file
3818
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3822
lt_cv_deplibs_check_method=pass_all
3827
lt_cv_deplibs_check_method=pass_all
3830
hpux10.20* | hpux11*)
3831
lt_cv_file_magic_cmd=/usr/bin/file
3834
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3835
lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3838
[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]']
3839
lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3842
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3843
lt_cv_file_magic_test_file=/usr/lib/libc.sl
3849
# PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3850
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3853
irix5* | irix6* | nonstopux*)
3855
*-32|*"-32 ") libmagic=32-bit;;
3856
*-n32|*"-n32 ") libmagic=N32;;
3857
*-64|*"-64 ") libmagic=64-bit;;
3858
*) libmagic=never-match;;
3860
lt_cv_deplibs_check_method=pass_all
3863
# This must be Linux ELF.
3864
linux* | k*bsd*-gnu | kopensolaris*-gnu)
3865
lt_cv_deplibs_check_method=pass_all
3868
netbsd* | netbsdelf*-gnu)
3869
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3870
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3872
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3877
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3878
lt_cv_file_magic_cmd=/usr/bin/file
3879
lt_cv_file_magic_test_file=/usr/lib/libnls.so
3883
lt_cv_deplibs_check_method=pass_all
3887
if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3888
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3890
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3894
osf3* | osf4* | osf5*)
3895
lt_cv_deplibs_check_method=pass_all
3899
lt_cv_deplibs_check_method=pass_all
3903
lt_cv_deplibs_check_method=pass_all
3906
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3907
lt_cv_deplibs_check_method=pass_all
3911
case $host_vendor in
3913
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]]'
3914
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3917
lt_cv_deplibs_check_method=pass_all
3920
lt_cv_file_magic_cmd='/bin/file'
3921
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3924
lt_cv_file_magic_cmd='/bin/file'
3925
lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3926
lt_cv_file_magic_test_file=/lib/libc.so
3929
lt_cv_deplibs_check_method=pass_all
3932
lt_cv_deplibs_check_method=pass_all
3938
lt_cv_deplibs_check_method=pass_all
3942
file_magic_cmd=$lt_cv_file_magic_cmd
3943
deplibs_check_method=$lt_cv_deplibs_check_method
3944
test -z "$deplibs_check_method" && deplibs_check_method=unknown
3946
_LT_DECL([], [deplibs_check_method], [1],
3947
[Method to check whether dependent libraries are shared objects])
3948
_LT_DECL([], [file_magic_cmd], [1],
3949
[Command to use when deplibs_check_method == "file_magic"])
3950
])# _LT_CHECK_MAGIC_METHOD
3955
# find the pathname to a BSD- or MS-compatible name lister
3956
AC_DEFUN([LT_PATH_NM],
3957
[AC_REQUIRE([AC_PROG_CC])dnl
3958
AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3959
[if test -n "$NM"; then
3960
# Let the user override the test.
3963
lt_nm_to_check="${ac_tool_prefix}nm"
3964
if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3965
lt_nm_to_check="$lt_nm_to_check nm"
3967
for lt_tmp_nm in $lt_nm_to_check; do
3968
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3969
for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3971
test -z "$ac_dir" && ac_dir=.
3972
tmp_nm="$ac_dir/$lt_tmp_nm"
3973
if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3974
# Check to see if the nm accepts a BSD-compat flag.
3975
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
3976
# nm: unknown option "B" ignored
3977
# Tru64's nm complains that /dev/null is an invalid object file
3978
case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3979
*/dev/null* | *'Invalid file or object type'*)
3980
lt_cv_path_NM="$tmp_nm -B"
3984
case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3986
lt_cv_path_NM="$tmp_nm -p"
3990
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3991
continue # so that we can try to find one that supports BSD flags
4000
: ${lt_cv_path_NM=no}
4002
if test "$lt_cv_path_NM" != "no"; then
4005
# Didn't find any BSD compatible name lister, look for dumpbin.
4006
AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
4008
if test "$DUMPBIN" != ":"; then
4012
test -z "$NM" && NM=nm
4014
_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
4016
AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
4017
[lt_cv_nm_interface="BSD nm"
4018
echo "int some_variable = 0;" > conftest.$ac_ext
4019
(eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
4020
(eval "$ac_compile" 2>conftest.err)
4021
cat conftest.err >&AS_MESSAGE_LOG_FD
4022
(eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
4023
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4024
cat conftest.err >&AS_MESSAGE_LOG_FD
4025
(eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
4026
cat conftest.out >&AS_MESSAGE_LOG_FD
4027
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4028
lt_cv_nm_interface="MS dumpbin"
4034
AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
4035
AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
4036
dnl aclocal-1.4 backwards compatibility:
4037
dnl AC_DEFUN([AM_PROG_NM], [])
4038
dnl AC_DEFUN([AC_PROG_NM], [])
4043
# check for math library
4044
AC_DEFUN([LT_LIB_M],
4045
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4048
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
4049
# These system don't have libm, or don't need it
4052
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4053
AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4056
AC_CHECK_LIB(m, cos, LIBM="-lm")
4063
AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
4064
dnl aclocal-1.4 backwards compatibility:
4065
dnl AC_DEFUN([AC_CHECK_LIBM], [])
4068
# _LT_COMPILER_NO_RTTI([TAGNAME])
4069
# -------------------------------
4070
m4_defun([_LT_COMPILER_NO_RTTI],
4071
[m4_require([_LT_TAG_COMPILER])dnl
4073
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4075
if test "$GCC" = yes; then
4076
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4078
_LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4079
lt_cv_prog_compiler_rtti_exceptions,
4080
[-fno-rtti -fno-exceptions], [],
4081
[_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4083
_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
4084
[Compiler flag to turn off builtin functions])
4085
])# _LT_COMPILER_NO_RTTI
4088
# _LT_CMD_GLOBAL_SYMBOLS
4089
# ----------------------
4090
m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
4091
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4092
AC_REQUIRE([AC_PROG_CC])dnl
4093
AC_REQUIRE([LT_PATH_NM])dnl
4094
AC_REQUIRE([LT_PATH_LD])dnl
4095
m4_require([_LT_DECL_SED])dnl
4096
m4_require([_LT_DECL_EGREP])dnl
4097
m4_require([_LT_TAG_COMPILER])dnl
4099
# Check for command to grab the raw symbol name followed by C symbol from nm.
4100
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4101
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4103
# These are sane defaults that work on at least a few old systems.
4104
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
4106
# Character class describing NM global symbol codes.
4107
symcode='[[BCDEGRST]]'
4109
# Regexp to match symbols that can be accessed directly from C.
4110
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4112
# Define system-specific variables.
4117
cygwin* | mingw* | pw32* | cegcc*)
4118
symcode='[[ABCDGISTW]]'
4121
if test "$host_cpu" = ia64; then
4122
symcode='[[ABCDEGRST]]'
4126
symcode='[[BCDEGRST]]'
4129
symcode='[[BCDEGQRST]]'
4140
sysv5* | sco5v6* | unixware* | OpenUNIX*)
4144
symcode='[[DFNSTU]]'
4148
# If we're using GNU nm, then use its standard symbol codes.
4149
case `$NM -V 2>&1` in
4150
*GNU* | *'with BFD'*)
4151
symcode='[[ABCDGIRSTW]]' ;;
4154
# Transform an extracted symbol line into a proper C declaration.
4155
# Some systems (esp. on ia64) link data and code symbols differently,
4156
# so use this general approach.
4157
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4159
# Transform an extracted symbol line into symbol name and symbol address
4160
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
4161
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
4163
# Handle CRLF in mingw tool chain
4167
opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4171
# Try without a prefix underscore, then with it.
4172
for ac_symprfx in "" "_"; do
4174
# Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4175
symxfrm="\\1 $ac_symprfx\\2 \\2"
4177
# Write the raw and C identifiers.
4178
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4179
# Fake it for dumpbin and say T for any non-static function
4180
# and D for any global variable.
4181
# Also find C++ and __fastcall symbols from MSVC++,
4182
# which start with @ or ?.
4183
lt_cv_sys_global_symbol_pipe="$AWK ['"\
4184
" {last_section=section; section=\$ 3};"\
4185
" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4186
" \$ 0!~/External *\|/{next};"\
4187
" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4188
" {if(hide[section]) next};"\
4189
" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
4190
" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
4191
" s[1]~/^[@?]/{print s[1], s[1]; next};"\
4192
" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
4193
" ' prfx=^$ac_symprfx]"
4195
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4198
# Check to see that the pipe works correctly.
4202
cat > conftest.$ac_ext <<_LT_EOF
4207
void nm_test_func(void);
4208
void nm_test_func(void){}
4212
int main(){nm_test_var='a';nm_test_func();return(0);}
4215
if AC_TRY_EVAL(ac_compile); then
4216
# Now try to grab the symbols.
4218
if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4219
# Try sorting and uniquifying the output.
4220
if sort "$nlist" | uniq > "$nlist"T; then
4221
mv -f "$nlist"T "$nlist"
4226
# Make sure that we snagged all the symbols we need.
4227
if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4228
if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4229
cat <<_LT_EOF > conftest.$ac_ext
4235
# Now generate the symbol file.
4236
eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4238
cat <<_LT_EOF >> conftest.$ac_ext
4240
/* The mapping between symbol names and symbols. */
4245
lt__PROGRAM__LTX_preloaded_symbols[[]] =
4247
{ "@PROGRAM@", (void *) 0 },
4249
$SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4250
cat <<\_LT_EOF >> conftest.$ac_ext
4254
/* This works around a problem in FreeBSD linker */
4255
#ifdef FREEBSD_WORKAROUND
4256
static const void *lt_preloaded_setup() {
4257
return lt__PROGRAM__LTX_preloaded_symbols;
4265
# Now try linking the two files.
4266
mv conftest.$ac_objext conftstm.$ac_objext
4267
lt_save_LIBS="$LIBS"
4268
lt_save_CFLAGS="$CFLAGS"
4269
LIBS="conftstm.$ac_objext"
4270
CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4271
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4274
LIBS="$lt_save_LIBS"
4275
CFLAGS="$lt_save_CFLAGS"
4277
echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4280
echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4283
echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4286
echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4287
cat conftest.$ac_ext >&5
4289
rm -rf conftest* conftst*
4291
# Do not use the global_symbol_pipe unless it works.
4292
if test "$pipe_works" = yes; then
4295
lt_cv_sys_global_symbol_pipe=
4299
if test -z "$lt_cv_sys_global_symbol_pipe"; then
4300
lt_cv_sys_global_symbol_to_cdecl=
4302
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4303
AC_MSG_RESULT(failed)
4308
_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4309
[Take the output of nm and produce a listing of raw symbols and C names])
4310
_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4311
[Transform the output of nm in a proper C declaration])
4312
_LT_DECL([global_symbol_to_c_name_address],
4313
[lt_cv_sys_global_symbol_to_c_name_address], [1],
4314
[Transform the output of nm in a C name address pair])
4315
_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4316
[lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4317
[Transform the output of nm in a C name address pair when lib prefix is needed])
4318
]) # _LT_CMD_GLOBAL_SYMBOLS
4321
# _LT_COMPILER_PIC([TAGNAME])
4322
# ---------------------------
4323
m4_defun([_LT_COMPILER_PIC],
4324
[m4_require([_LT_TAG_COMPILER])dnl
4325
_LT_TAGVAR(lt_prog_compiler_wl, $1)=
4326
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4327
_LT_TAGVAR(lt_prog_compiler_static, $1)=
4329
AC_MSG_CHECKING([for $compiler option to produce PIC])
4330
m4_if([$1], [CXX], [
4331
# C++ specific cases for pic, static, wl, etc.
4332
if test "$GXX" = yes; then
4333
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4334
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4338
# All AIX code is PIC.
4339
if test "$host_cpu" = ia64; then
4340
# AIX 5 now supports IA64 processor
4341
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4348
# see comment about AmigaOS4 .so support
4349
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4352
# FIXME: we need at least 68020 code to build shared libraries, but
4353
# adding the `-m68020' flag to GCC prevents building anything better,
4355
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4360
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4361
# PIC is the default for these OSes.
4363
mingw* | cygwin* | os2* | pw32* | cegcc*)
4364
# This hack is so that the source file can tell whether it is being
4365
# built for inclusion in a dll (and should export symbols for example).
4366
# Although the cygwin gcc ignores -fPIC, still need this for old-style
4367
# (--disable-auto-import) libraries
4368
m4_if([$1], [GCJ], [],
4369
[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4371
darwin* | rhapsody*)
4372
# PIC is the default on this platform
4373
# Common symbols not allowed in MH_DYLIB files
4374
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4377
# DJGPP does not support shared libraries at all
4378
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4381
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
4382
# Instead, we relocate shared libraries at runtime.
4385
if test -d /usr/nec; then
4386
_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4390
# PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4391
# PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4392
# sets the default TLS model and affects inlining.
4397
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4402
# QNX uses GNU C++, but need to define -shared option too, otherwise
4404
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4407
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4413
# All AIX code is PIC.
4414
if test "$host_cpu" = ia64; then
4415
# AIX 5 now supports IA64 processor
4416
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4418
_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4422
case $cc_basename in
4424
# Green Hills C++ Compiler
4425
# _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
4430
case $cc_basename in
4432
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4435
# Green Hills C++ Compiler
4436
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4442
freebsd* | dragonfly*)
4443
# FreeBSD uses GNU C++
4445
hpux9* | hpux10* | hpux11*)
4446
case $cc_basename in
4448
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4449
_LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4450
if test "$host_cpu" != ia64; then
4451
_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4455
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4456
_LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4462
_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4471
# This is c89, which is MS Visual C++ (no shared libs)
4472
# Anyone wants to do a port?
4474
irix5* | irix6* | nonstopux*)
4475
case $cc_basename in
4477
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4478
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4479
# CC pic flag -KPIC is the default.
4485
linux* | k*bsd*-gnu | kopensolaris*-gnu)
4486
case $cc_basename in
4489
_LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4490
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4493
# old Intel C++ for x86_64 which still supported -KPIC.
4494
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4495
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4496
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4499
# Intel C++, used to be incompatible with GCC.
4500
# ICC 10 doesn't accept -KPIC any more.
4501
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4502
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4503
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4506
# Portland Group C++ compiler
4507
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4508
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4509
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4513
# Make sure the PIC flag is empty. It appears that all Alpha
4514
# Linux and Compaq Tru64 Unix objects are PIC.
4515
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4516
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4520
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4521
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4522
_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4525
case `$CC -V 2>&1 | sed 5q` in
4528
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4529
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4530
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4541
case $cc_basename in
4543
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4549
netbsd* | netbsdelf*-gnu)
4552
# QNX uses GNU C++, but need to define -shared option too, otherwise
4554
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4556
osf3* | osf4* | osf5*)
4557
case $cc_basename in
4559
_LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4562
# Rational C++ 2.4.1
4563
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4566
# Digital/Compaq C++
4567
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4568
# Make sure the PIC flag is empty. It appears that all Alpha
4569
# Linux and Compaq Tru64 Unix objects are PIC.
4570
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4571
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4580
case $cc_basename in
4582
# Sun C++ 4.2, 5.x and Centerline C++
4583
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4584
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4585
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4588
# Green Hills C++ Compiler
4589
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4596
case $cc_basename in
4599
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4600
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4604
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4610
sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4611
case $cc_basename in
4613
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4614
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4615
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4620
case $cc_basename in
4622
# NonStop-UX NCC 3.20
4623
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4632
_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4638
if test "$GCC" = yes; then
4639
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4640
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4644
# All AIX code is PIC.
4645
if test "$host_cpu" = ia64; then
4646
# AIX 5 now supports IA64 processor
4647
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4654
# see comment about AmigaOS4 .so support
4655
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4658
# FIXME: we need at least 68020 code to build shared libraries, but
4659
# adding the `-m68020' flag to GCC prevents building anything better,
4661
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4666
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4667
# PIC is the default for these OSes.
4670
mingw* | cygwin* | pw32* | os2* | cegcc*)
4671
# This hack is so that the source file can tell whether it is being
4672
# built for inclusion in a dll (and should export symbols for example).
4673
# Although the cygwin gcc ignores -fPIC, still need this for old-style
4674
# (--disable-auto-import) libraries
4675
m4_if([$1], [GCJ], [],
4676
[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4679
darwin* | rhapsody*)
4680
# PIC is the default on this platform
4681
# Common symbols not allowed in MH_DYLIB files
4682
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4686
# PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4687
# PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4688
# sets the default TLS model and affects inlining.
4694
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4700
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
4701
# Instead, we relocate shared libraries at runtime.
4705
# Just because we use GCC doesn't mean we suddenly get shared libraries
4706
# on systems that don't support them.
4707
_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4712
# QNX uses GNU C++, but need to define -shared option too, otherwise
4714
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4718
if test -d /usr/nec; then
4719
_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4724
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4728
# PORTME Check for flag to pass linker flags through the system compiler.
4731
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4732
if test "$host_cpu" = ia64; then
4733
# AIX 5 now supports IA64 processor
4734
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4736
_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4740
mingw* | cygwin* | pw32* | os2* | cegcc*)
4741
# This hack is so that the source file can tell whether it is being
4742
# built for inclusion in a dll (and should export symbols for example).
4743
m4_if([$1], [GCJ], [],
4744
[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4747
hpux9* | hpux10* | hpux11*)
4748
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4749
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4756
_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4759
# Is there a better lt_prog_compiler_static that works with the bundled CC?
4760
_LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4763
irix5* | irix6* | nonstopux*)
4764
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4765
# PIC (with -KPIC) is the default.
4766
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4769
linux* | k*bsd*-gnu | kopensolaris*-gnu)
4770
case $cc_basename in
4771
# old Intel for x86_64 which still supported -KPIC.
4773
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4774
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4775
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4777
# icc used to be incompatible with GCC.
4778
# ICC 10 doesn't accept -KPIC any more.
4780
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4781
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4782
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4784
# Lahey Fortran 8.1.
4786
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4787
_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4788
_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4790
pgcc* | pgf77* | pgf90* | pgf95*)
4791
# Portland Group compilers (*not* the Pentium gcc compiler,
4792
# which looks to be a dead project)
4793
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4794
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4795
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4798
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4799
# All Alpha code is PIC.
4800
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4803
# IBM XL C 8.0/Fortran 10.1 on PPC
4804
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4805
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4806
_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4809
case `$CC -V 2>&1 | sed 5q` in
4812
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4813
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4814
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4817
# Sun Fortran 8.3 passes all unrecognized flags to the linker
4818
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4819
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4820
_LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4828
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4829
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4833
# QNX uses GNU C++, but need to define -shared option too, otherwise
4835
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4838
osf3* | osf4* | osf5*)
4839
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4840
# All OSF/1 code is PIC.
4841
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4845
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4849
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4850
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4851
case $cc_basename in
4853
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4855
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4860
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4861
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4862
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4865
sysv4 | sysv4.2uw2* | sysv4.3*)
4866
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4867
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4868
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4872
if test -d /usr/nec ;then
4873
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4874
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4878
sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4879
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4880
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4881
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4885
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4886
_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4890
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4891
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4895
_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4901
# For platforms which do not support PIC, -DPIC is meaningless:
4903
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4906
_LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4909
AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4910
_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4911
[How to pass a linker flag through the compiler])
4914
# Check to make sure the PIC flag actually works.
4916
if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4917
_LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4918
[_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4919
[$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4920
[case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4922
*) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4924
[_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4925
_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4927
_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4928
[Additional compiler flags for building library objects])
4931
# Check to make sure the static flag actually works.
4933
wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4934
_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4935
_LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4936
$lt_tmp_static_flag,
4938
[_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4939
_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4940
[Compiler flag to prevent dynamic linking])
4941
])# _LT_COMPILER_PIC
4944
# _LT_LINKER_SHLIBS([TAGNAME])
4945
# ----------------------------
4946
# See if the linker supports building shared libraries.
4947
m4_defun([_LT_LINKER_SHLIBS],
4948
[AC_REQUIRE([LT_PATH_LD])dnl
4949
AC_REQUIRE([LT_PATH_NM])dnl
4950
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4951
m4_require([_LT_DECL_EGREP])dnl
4952
m4_require([_LT_DECL_SED])dnl
4953
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4954
m4_require([_LT_TAG_COMPILER])dnl
4955
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4956
m4_if([$1], [CXX], [
4957
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4960
# If we're using GNU nm, then we don't want the "-C" option.
4961
# -C means demangle to AIX nm, but means don't demangle with GNU nm
4962
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4963
_LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4965
_LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4969
_LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4971
cygwin* | mingw* | cegcc*)
4972
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
4974
linux* | k*bsd*-gnu)
4975
_LT_TAGVAR(link_all_deplibs, $1)=no
4978
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4981
_LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4984
_LT_TAGVAR(allow_undefined_flag, $1)=
4985
_LT_TAGVAR(always_export_symbols, $1)=no
4986
_LT_TAGVAR(archive_cmds, $1)=
4987
_LT_TAGVAR(archive_expsym_cmds, $1)=
4988
_LT_TAGVAR(compiler_needs_object, $1)=no
4989
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4990
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
4991
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4992
_LT_TAGVAR(hardcode_automatic, $1)=no
4993
_LT_TAGVAR(hardcode_direct, $1)=no
4994
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
4995
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4996
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4997
_LT_TAGVAR(hardcode_libdir_separator, $1)=
4998
_LT_TAGVAR(hardcode_minus_L, $1)=no
4999
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5000
_LT_TAGVAR(inherit_rpath, $1)=no
5001
_LT_TAGVAR(link_all_deplibs, $1)=unknown
5002
_LT_TAGVAR(module_cmds, $1)=
5003
_LT_TAGVAR(module_expsym_cmds, $1)=
5004
_LT_TAGVAR(old_archive_from_new_cmds, $1)=
5005
_LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5006
_LT_TAGVAR(thread_safe_flag_spec, $1)=
5007
_LT_TAGVAR(whole_archive_flag_spec, $1)=
5008
# include_expsyms should be a list of space-separated symbols to be *always*
5009
# included in the symbol list
5010
_LT_TAGVAR(include_expsyms, $1)=
5011
# exclude_expsyms can be an extended regexp of symbols to exclude
5012
# it will be wrapped by ` (' and `)$', so one must not match beginning or
5013
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5014
# as well as any symbol that contains `d'.
5015
_LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5016
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5017
# platforms (ab)use it in PIC code, but their linkers get confused if
5018
# the symbol is explicitly referenced. Since portable code cannot
5019
# rely on this symbol name, it's probably fine to never include it in
5020
# preloaded symbol tables.
5021
# Exclude shared library initialization/finalization symbols.
5022
dnl Note also adjust exclude_expsyms for C++ above.
5023
extract_expsyms_cmds=
5026
cygwin* | mingw* | pw32* | cegcc*)
5027
# FIXME: the MSVC++ port hasn't been tested in a loooong time
5028
# When not using gcc, we currently assume that we are using
5029
# Microsoft Visual C++.
5030
if test "$GCC" != yes; then
5035
# we just hope/assume this is gcc and not c89 (= MSVC++)
5041
linux* | k*bsd*-gnu)
5042
_LT_TAGVAR(link_all_deplibs, $1)=no
5046
_LT_TAGVAR(ld_shlibs, $1)=yes
5047
if test "$with_gnu_ld" = yes; then
5048
# If archive_cmds runs LD, not CC, wlarc should be empty
5051
# Set some defaults for GNU ld with shared library support. These
5052
# are reset later if shared libraries are not supported. Putting them
5053
# here allows them to be overridden if necessary.
5054
runpath_var=LD_RUN_PATH
5055
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5056
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5057
# ancient GNU ld didn't support --whole-archive et. al.
5058
if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5059
_LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5061
_LT_TAGVAR(whole_archive_flag_spec, $1)=
5063
supports_anon_versioning=no
5064
case `$LD -v 2>&1` in
5065
*GNU\ gold*) supports_anon_versioning=yes ;;
5066
*\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5067
*\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5068
*\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5069
*\ 2.11.*) ;; # other 2.11 versions
5070
*) supports_anon_versioning=yes ;;
5073
# See if GNU ld supports shared libraries.
5076
# On AIX/PPC, the GNU linker is very broken
5077
if test "$host_cpu" != ia64; then
5078
_LT_TAGVAR(ld_shlibs, $1)=no
5081
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
5082
*** to be unable to reliably create shared libraries on AIX.
5083
*** Therefore, libtool is disabling shared libraries support. If you
5084
*** really care for shared libraries, you may want to modify your PATH
5085
*** so that a non-GNU linker is found, and then restart.
5094
# see comment about AmigaOS4 .so support
5095
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5096
_LT_TAGVAR(archive_expsym_cmds, $1)=''
5099
_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5100
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5101
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5107
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5108
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5109
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5110
# support --undefined. This deserves some investigation. FIXME
5111
_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5113
_LT_TAGVAR(ld_shlibs, $1)=no
5117
cygwin* | mingw* | pw32* | cegcc*)
5118
# _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5119
# as there is no search path for DLLs.
5120
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5121
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5122
_LT_TAGVAR(always_export_symbols, $1)=no
5123
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5124
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
5126
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5127
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5128
# If the export-symbols file already is a .def file (1st line
5129
# is EXPORTS), use it as is; otherwise, prepend...
5130
_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5131
cp $export_symbols $output_objdir/$soname.def;
5133
echo EXPORTS > $output_objdir/$soname.def;
5134
cat $export_symbols >> $output_objdir/$soname.def;
5136
$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5138
_LT_TAGVAR(ld_shlibs, $1)=no
5143
_LT_TAGVAR(hardcode_direct, $1)=no
5144
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5145
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5146
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5147
# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5148
# Instead, shared libraries are loaded at an image base (0x10000000 by
5149
# default) and relocated if they conflict, which is a slow very memory
5150
# consuming and fragmenting process. To avoid this, we pick a random,
5151
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5152
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
5153
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5154
_LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5157
gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
5159
if test "$host_os" = linux-dietlibc; then
5160
case $cc_basename in
5161
diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
5164
if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5165
&& test "$tmp_diet" = no
5168
tmp_sharedflag='-shared'
5169
case $cc_basename,$host_cpu in
5170
pgcc*) # Portland Group C compiler
5171
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
5172
tmp_addflag=' $pic_flag'
5174
pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
5175
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
5176
tmp_addflag=' $pic_flag -Mnomain' ;;
5177
ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
5178
tmp_addflag=' -i_dynamic' ;;
5179
efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
5180
tmp_addflag=' -i_dynamic -nofor_main' ;;
5181
ifc* | ifort*) # Intel Fortran compiler
5182
tmp_addflag=' -nofor_main' ;;
5183
lf95*) # Lahey Fortran 8.1
5184
_LT_TAGVAR(whole_archive_flag_spec, $1)=
5185
tmp_sharedflag='--shared' ;;
5186
xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
5187
tmp_sharedflag='-qmkshrobj'
5190
case `$CC -V 2>&1 | sed 5q` in
5191
*Sun\ C*) # Sun C 5.9
5192
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
5193
_LT_TAGVAR(compiler_needs_object, $1)=yes
5194
tmp_sharedflag='-G' ;;
5195
*Sun\ F*) # Sun Fortran 8.3
5196
tmp_sharedflag='-G' ;;
5198
_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5200
if test "x$supports_anon_versioning" = xyes; then
5201
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5202
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5203
echo "local: *; };" >> $output_objdir/$libname.ver~
5204
$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5207
case $cc_basename in
5209
# IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5210
_LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5211
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5212
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
5213
_LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
5214
if test "x$supports_anon_versioning" = xyes; then
5215
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5216
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5217
echo "local: *; };" >> $output_objdir/$libname.ver~
5218
$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5223
_LT_TAGVAR(ld_shlibs, $1)=no
5227
netbsd* | netbsdelf*-gnu)
5228
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5229
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5232
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5233
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5238
if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5239
_LT_TAGVAR(ld_shlibs, $1)=no
5242
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5243
*** create shared libraries on Solaris systems. Therefore, libtool
5244
*** is disabling shared libraries support. We urge you to upgrade GNU
5245
*** binutils to release 2.9.1 or newer. Another option is to modify
5246
*** your PATH or compiler configuration so that the native linker is
5247
*** used, and then restart.
5250
elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5251
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5252
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5254
_LT_TAGVAR(ld_shlibs, $1)=no
5258
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5259
case `$LD -v 2>&1` in
5260
*\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5261
_LT_TAGVAR(ld_shlibs, $1)=no
5264
*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5265
*** reliably create shared libraries on SCO systems. Therefore, libtool
5266
*** is disabling shared libraries support. We urge you to upgrade GNU
5267
*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
5268
*** your PATH or compiler configuration so that the native linker is
5269
*** used, and then restart.
5274
# For security reasons, it is highly recommended that you always
5275
# use absolute paths for naming shared libraries, and exclude the
5276
# DT_RUNPATH tag from executables and libraries. But doing so
5277
# requires that you compile everything twice, which is a pain.
5278
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5279
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5280
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5281
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5283
_LT_TAGVAR(ld_shlibs, $1)=no
5290
_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5292
_LT_TAGVAR(hardcode_direct, $1)=yes
5293
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5297
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5298
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5299
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5301
_LT_TAGVAR(ld_shlibs, $1)=no
5306
if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
5308
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5309
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
5310
_LT_TAGVAR(whole_archive_flag_spec, $1)=
5313
# PORTME fill in a description of your system's linker (not GNU ld)
5316
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5317
_LT_TAGVAR(always_export_symbols, $1)=yes
5318
_LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
5319
# Note: this linker hardcodes the directories in LIBPATH if there
5320
# are no directories specified by -L.
5321
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5322
if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5323
# Neither direct hardcoding nor static linking is supported with a
5325
_LT_TAGVAR(hardcode_direct, $1)=unsupported
5330
if test "$host_cpu" = ia64; then
5331
# On IA64, the linker does run time linking by default, so we don't
5332
# have to do anything special.
5333
aix_use_runtimelinking=no
5334
exp_sym_flag='-Bexport'
5337
# If we're using GNU nm, then we don't want the "-C" option.
5338
# -C means demangle to AIX nm, but means don't demangle with GNU nm
5339
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5340
_LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5342
_LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5344
aix_use_runtimelinking=no
5346
# Test if we are trying to use run time linking or normal
5347
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
5348
# need to do runtime linking.
5349
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5350
for ld_flag in $LDFLAGS; do
5351
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5352
aix_use_runtimelinking=yes
5359
exp_sym_flag='-bexport'
5360
no_entry_flag='-bnoentry'
5363
# When large executables or shared objects are built, AIX ld can
5364
# have problems creating the table of contents. If linking a library
5365
# or program results in "error TOC overflow" add -mminimal-toc to
5366
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5367
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5369
_LT_TAGVAR(archive_cmds, $1)=''
5370
_LT_TAGVAR(hardcode_direct, $1)=yes
5371
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5372
_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5373
_LT_TAGVAR(link_all_deplibs, $1)=yes
5374
_LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5376
if test "$GCC" = yes; then
5377
case $host_os in aix4.[[012]]|aix4.[[012]].*)
5378
# We only want to do this on AIX 4.2 and lower, the check
5379
# below for broken collect2 doesn't work under 4.3+
5380
collect2name=`${CC} -print-prog-name=collect2`
5381
if test -f "$collect2name" &&
5382
strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5384
# We have reworked collect2
5387
# We have old collect2
5388
_LT_TAGVAR(hardcode_direct, $1)=unsupported
5389
# It fails to find uninstalled libraries when the uninstalled
5390
# path is not listed in the libpath. Setting hardcode_minus_L
5391
# to unsupported forces relinking
5392
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5393
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5394
_LT_TAGVAR(hardcode_libdir_separator, $1)=
5398
shared_flag='-shared'
5399
if test "$aix_use_runtimelinking" = yes; then
5400
shared_flag="$shared_flag "'${wl}-G'
5402
_LT_TAGVAR(link_all_deplibs, $1)=no
5405
if test "$host_cpu" = ia64; then
5406
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5407
# chokes on -Wl,-G. The following line is correct:
5410
if test "$aix_use_runtimelinking" = yes; then
5411
shared_flag='${wl}-G'
5413
shared_flag='${wl}-bM:SRE'
5418
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5419
# It seems that -bexpall does not export symbols beginning with
5420
# underscore (_), so it is better to generate a list of symbols to export.
5421
_LT_TAGVAR(always_export_symbols, $1)=yes
5422
if test "$aix_use_runtimelinking" = yes; then
5423
# Warning - without using the other runtime loading flags (-brtl),
5424
# -berok will link without error, but may produce a broken library.
5425
_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5426
# Determine the default libpath from the value encoded in an
5428
_LT_SYS_MODULE_PATH_AIX
5429
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5430
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5432
if test "$host_cpu" = ia64; then
5433
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5434
_LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5435
_LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
5437
# Determine the default libpath from the value encoded in an
5439
_LT_SYS_MODULE_PATH_AIX
5440
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5441
# Warning - without using the other run time loading flags,
5442
# -berok will link without error, but may produce a broken library.
5443
_LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5444
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5445
# Exported symbols can be pulled into shared objects from archives
5446
_LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5447
_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5448
# This is similar to how AIX traditionally builds its shared libraries.
5449
_LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5457
# see comment about AmigaOS4 .so support
5458
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5459
_LT_TAGVAR(archive_expsym_cmds, $1)=''
5462
_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5463
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5464
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5470
_LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5473
cygwin* | mingw* | pw32* | cegcc*)
5474
# When not using gcc, we currently assume that we are using
5475
# Microsoft Visual C++.
5476
# hardcode_libdir_flag_spec is actually meaningless, as there is
5477
# no search path for DLLs.
5478
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5479
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5480
# Tell ltmain to make .lib files, not .a files.
5482
# Tell ltmain to make .dll files, not .so files.
5484
# FIXME: Setting linknames here is a bad hack.
5485
_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5486
# The linker will automatically build a .lib file if we build a DLL.
5487
_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5488
# FIXME: Should let the user specify the lib program.
5489
_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5490
_LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
5491
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5494
darwin* | rhapsody*)
5495
_LT_DARWIN_LINKER_FEATURES($1)
5499
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5500
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5501
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5505
_LT_TAGVAR(ld_shlibs, $1)=no
5508
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5509
# support. Future versions do this automatically, but an explicit c++rt0.o
5510
# does not break anything, and helps significantly (at the cost of a little
5513
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5514
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5515
_LT_TAGVAR(hardcode_direct, $1)=yes
5516
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5519
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
5521
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5522
_LT_TAGVAR(hardcode_direct, $1)=yes
5523
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5524
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5527
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5528
freebsd* | dragonfly*)
5529
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5530
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5531
_LT_TAGVAR(hardcode_direct, $1)=yes
5532
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5536
if test "$GCC" = yes; then
5537
_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5539
_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5541
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5542
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5543
_LT_TAGVAR(hardcode_direct, $1)=yes
5545
# hardcode_minus_L: Not really in the search PATH,
5546
# but as the default location of the library.
5547
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5548
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5552
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5553
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5555
_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5557
if test "$with_gnu_ld" = no; then
5558
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5559
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5560
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5561
_LT_TAGVAR(hardcode_direct, $1)=yes
5562
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5563
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5564
# hardcode_minus_L: Not really in the search PATH,
5565
# but as the default location of the library.
5566
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5571
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5574
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5577
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5580
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5586
_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5589
_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5592
_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5596
if test "$with_gnu_ld" = no; then
5597
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5598
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5602
_LT_TAGVAR(hardcode_direct, $1)=no
5603
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5606
_LT_TAGVAR(hardcode_direct, $1)=yes
5607
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5608
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5610
# hardcode_minus_L: Not really in the search PATH,
5611
# but as the default location of the library.
5612
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5618
irix5* | irix6* | nonstopux*)
5619
if test "$GCC" = yes; then
5620
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5621
# Try to use the -exported_symbol ld option, if it does not
5622
# work, assume that -exports_file does not work either and
5623
# implicitly export all symbols.
5624
save_LDFLAGS="$LDFLAGS"
5625
LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
5626
AC_LINK_IFELSE(int foo(void) {},
5627
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
5629
LDFLAGS="$save_LDFLAGS"
5631
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
5632
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
5634
_LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5635
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5636
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5637
_LT_TAGVAR(inherit_rpath, $1)=yes
5638
_LT_TAGVAR(link_all_deplibs, $1)=yes
5641
netbsd* | netbsdelf*-gnu)
5642
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5643
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
5645
_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
5647
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5648
_LT_TAGVAR(hardcode_direct, $1)=yes
5649
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5653
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5654
_LT_TAGVAR(hardcode_direct, $1)=yes
5655
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5656
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5657
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5664
if test -f /usr/libexec/ld.so; then
5665
_LT_TAGVAR(hardcode_direct, $1)=yes
5666
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5667
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5668
if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5669
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5670
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
5671
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5672
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5675
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5676
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5677
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5680
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5681
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5686
_LT_TAGVAR(ld_shlibs, $1)=no
5691
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5692
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5693
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5694
_LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
5695
_LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5699
if test "$GCC" = yes; then
5700
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5701
_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5703
_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5704
_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
5706
_LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5707
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5708
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5711
osf4* | osf5*) # as osf3* with the addition of -msym flag
5712
if test "$GCC" = yes; then
5713
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5714
_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5715
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5717
_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5718
_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
5719
_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
5720
$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
5722
# Both c and cxx compiler support -rpath directly
5723
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5725
_LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5726
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5730
_LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5731
if test "$GCC" = yes; then
5733
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5734
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5735
$CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5737
case `$CC -V 2>&1` in
5740
_LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5741
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5742
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5746
_LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5747
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5748
$CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5752
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5753
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5755
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5757
# The compiler driver will combine and reorder linker options,
5758
# but understands `-z linker_flag'. GCC discards it without `$wl',
5759
# but is careful enough not to reorder.
5760
# Supported since Solaris 2.6 (maybe 2.5.1?)
5761
if test "$GCC" = yes; then
5762
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
5764
_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5768
_LT_TAGVAR(link_all_deplibs, $1)=yes
5772
if test "x$host_vendor" = xsequent; then
5773
# Use $CC to link under sequent, because it throws in some extra .o
5774
# files that make .init and .fini sections work.
5775
_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5777
_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5779
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5780
_LT_TAGVAR(hardcode_direct, $1)=yes
5781
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5782
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5786
case $host_vendor in
5788
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5789
_LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5792
## LD is ld it makes a PLAMLIB
5793
## CC just makes a GrossModule.
5794
_LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5795
_LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5796
_LT_TAGVAR(hardcode_direct, $1)=no
5799
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5800
_LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5803
runpath_var='LD_RUN_PATH'
5804
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5808
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5809
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5810
_LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5814
if test -d /usr/nec; then
5815
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5816
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5817
runpath_var=LD_RUN_PATH
5818
hardcode_runpath_var=yes
5819
_LT_TAGVAR(ld_shlibs, $1)=yes
5823
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5824
_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5825
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5826
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5827
runpath_var='LD_RUN_PATH'
5829
if test "$GCC" = yes; then
5830
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5831
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5833
_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5834
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5838
sysv5* | sco3.2v5* | sco5v6*)
5839
# Note: We can NOT use -z defs as we might desire, because we do not
5840
# link with -lc, and that would cause any symbols used from libc to
5841
# always be unresolved, which means just about no library would
5842
# ever link correctly. If we're not using GNU ld we use -z text
5843
# though, which does catch some bad symbols but isn't as heavy-handed
5845
_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5846
_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5847
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5848
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5849
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
5850
_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5851
_LT_TAGVAR(link_all_deplibs, $1)=yes
5852
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5853
runpath_var='LD_RUN_PATH'
5855
if test "$GCC" = yes; then
5856
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5857
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5859
_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5860
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5865
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5866
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5867
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5871
_LT_TAGVAR(ld_shlibs, $1)=no
5875
if test x$host_vendor = xsni; then
5877
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5878
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
5884
AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5885
test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5887
_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
5889
_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
5890
_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
5891
_LT_DECL([], [extract_expsyms_cmds], [2],
5892
[The commands to extract the exported symbol list from a shared archive])
5895
# Do we need to explicitly link libc?
5897
case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
5899
# Assume -lc should be added
5900
_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5902
if test "$enable_shared" = yes && test "$GCC" = yes; then
5903
case $_LT_TAGVAR(archive_cmds, $1) in
5905
# FIXME: we may have to deal with multi-command sequences.
5908
# Test whether the compiler implicitly links with -lc since on some
5909
# systems, -lgcc has to come before -lc. If gcc already passes -lc
5910
# to ld, don't add -lc before -lgcc.
5911
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
5913
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5915
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5918
libobjs=conftest.$ac_objext
5920
wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5921
pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5927
lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5928
_LT_TAGVAR(allow_undefined_flag, $1)=
5929
if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5931
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5933
_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5935
_LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5937
cat conftest.err 1>&5
5940
AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
5947
_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
5948
[Whether or not to add -lc for building shared libraries])
5949
_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
5950
[enable_shared_with_static_runtimes], [0],
5951
[Whether or not to disallow shared libs when runtime libs are static])
5952
_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
5953
[Compiler flag to allow reflexive dlopens])
5954
_LT_TAGDECL([], [whole_archive_flag_spec], [1],
5955
[Compiler flag to generate shared objects directly from archives])
5956
_LT_TAGDECL([], [compiler_needs_object], [1],
5957
[Whether the compiler copes with passing no objects directly])
5958
_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
5959
[Create an old-style archive from a shared archive])
5960
_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
5961
[Create a temporary old-style archive to link instead of a shared archive])
5962
_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
5963
_LT_TAGDECL([], [archive_expsym_cmds], [2])
5964
_LT_TAGDECL([], [module_cmds], [2],
5965
[Commands used to build a loadable module if different from building
5967
_LT_TAGDECL([], [module_expsym_cmds], [2])
5968
_LT_TAGDECL([], [with_gnu_ld], [1],
5969
[Whether we are building with GNU ld or not])
5970
_LT_TAGDECL([], [allow_undefined_flag], [1],
5971
[Flag that allows shared libraries with undefined symbols to be built])
5972
_LT_TAGDECL([], [no_undefined_flag], [1],
5973
[Flag that enforces no undefined symbols])
5974
_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
5975
[Flag to hardcode $libdir into a binary during linking.
5976
This must work even if $libdir does not exist])
5977
_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
5978
[[If ld is used when linking, flag to hardcode $libdir into a binary
5979
during linking. This must work even if $libdir does not exist]])
5980
_LT_TAGDECL([], [hardcode_libdir_separator], [1],
5981
[Whether we need a single "-rpath" flag with a separated argument])
5982
_LT_TAGDECL([], [hardcode_direct], [0],
5983
[Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5984
DIR into the resulting binary])
5985
_LT_TAGDECL([], [hardcode_direct_absolute], [0],
5986
[Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5987
DIR into the resulting binary and the resulting library dependency is
5988
"absolute", i.e impossible to change by setting ${shlibpath_var} if the
5989
library is relocated])
5990
_LT_TAGDECL([], [hardcode_minus_L], [0],
5991
[Set to "yes" if using the -LDIR flag during linking hardcodes DIR
5992
into the resulting binary])
5993
_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
5994
[Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
5995
into the resulting binary])
5996
_LT_TAGDECL([], [hardcode_automatic], [0],
5997
[Set to "yes" if building a shared library automatically hardcodes DIR
5998
into the library and all subsequent libraries and executables linked
6000
_LT_TAGDECL([], [inherit_rpath], [0],
6001
[Set to yes if linker adds runtime paths of dependent libraries
6002
to runtime path list])
6003
_LT_TAGDECL([], [link_all_deplibs], [0],
6004
[Whether libtool must link a program against all its dependency libraries])
6005
_LT_TAGDECL([], [fix_srcfile_path], [1],
6006
[Fix the shell variable $srcfile for the compiler])
6007
_LT_TAGDECL([], [always_export_symbols], [0],
6008
[Set to "yes" if exported symbols are required])
6009
_LT_TAGDECL([], [export_symbols_cmds], [2],
6010
[The commands to list exported symbols])
6011
_LT_TAGDECL([], [exclude_expsyms], [1],
6012
[Symbols that should not be listed in the preloaded symbols])
6013
_LT_TAGDECL([], [include_expsyms], [1],
6014
[Symbols that must always be exported])
6015
_LT_TAGDECL([], [prelink_cmds], [2],
6016
[Commands necessary for linking programs (against libraries) with templates])
6017
_LT_TAGDECL([], [file_list_spec], [1],
6018
[Specify filename containing input files])
6019
dnl FIXME: Not yet implemented
6020
dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6021
dnl [Compiler flag to generate thread safe objects])
6022
])# _LT_LINKER_SHLIBS
6025
# _LT_LANG_C_CONFIG([TAG])
6026
# ------------------------
6027
# Ensure that the configuration variables for a C compiler are suitably
6028
# defined. These variables are subsequently used by _LT_CONFIG to write
6029
# the compiler configuration to `libtool'.
6030
m4_defun([_LT_LANG_C_CONFIG],
6031
[m4_require([_LT_DECL_EGREP])dnl
6035
# Source file extension for C test sources.
6038
# Object file extension for compiled C test sources.
6040
_LT_TAGVAR(objext, $1)=$objext
6042
# Code to be used in simple compile tests
6043
lt_simple_compile_test_code="int some_variable = 0;"
6045
# Code to be used in simple link tests
6046
lt_simple_link_test_code='int main(){return(0);}'
6049
# Save the default compiler, since it gets overwritten when the other
6050
# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6051
compiler_DEFAULT=$CC
6053
# save warnings/boilerplate of simple test code
6054
_LT_COMPILER_BOILERPLATE
6055
_LT_LINKER_BOILERPLATE
6057
if test -n "$compiler"; then
6058
_LT_COMPILER_NO_RTTI($1)
6059
_LT_COMPILER_PIC($1)
6060
_LT_COMPILER_C_O($1)
6061
_LT_COMPILER_FILE_LOCKS($1)
6062
_LT_LINKER_SHLIBS($1)
6063
_LT_SYS_DYNAMIC_LINKER($1)
6064
_LT_LINKER_HARDCODE_LIBPATH($1)
6068
# Report which library types will actually be built
6069
AC_MSG_CHECKING([if libtool supports shared libraries])
6070
AC_MSG_RESULT([$can_build_shared])
6072
AC_MSG_CHECKING([whether to build shared libraries])
6073
test "$can_build_shared" = "no" && enable_shared=no
6075
# On AIX, shared libraries and static libraries use the same namespace, and
6076
# are all built from PIC.
6079
test "$enable_shared" = yes && enable_static=no
6080
if test -n "$RANLIB"; then
6081
archive_cmds="$archive_cmds~\$RANLIB \$lib"
6082
postinstall_cmds='$RANLIB $lib'
6087
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6088
test "$enable_shared" = yes && enable_static=no
6092
AC_MSG_RESULT([$enable_shared])
6094
AC_MSG_CHECKING([whether to build static libraries])
6095
# Make sure either enable_shared or enable_static is yes.
6096
test "$enable_shared" = yes || enable_static=yes
6097
AC_MSG_RESULT([$enable_static])
6103
])# _LT_LANG_C_CONFIG
6108
# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
6109
# compiler, we have our own version here.
6110
m4_defun([_LT_PROG_CXX],
6112
pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
6114
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
6115
( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
6116
(test "X$CXX" != "Xg++"))) ; then
6119
_lt_caught_CXX_error=yes
6121
popdef([AC_MSG_ERROR])
6124
dnl aclocal-1.4 backwards compatibility:
6125
dnl AC_DEFUN([_LT_PROG_CXX], [])
6128
# _LT_LANG_CXX_CONFIG([TAG])
6129
# --------------------------
6130
# Ensure that the configuration variables for a C++ compiler are suitably
6131
# defined. These variables are subsequently used by _LT_CONFIG to write
6132
# the compiler configuration to `libtool'.
6133
m4_defun([_LT_LANG_CXX_CONFIG],
6134
[AC_REQUIRE([_LT_PROG_CXX])dnl
6135
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6136
m4_require([_LT_DECL_EGREP])dnl
6139
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6140
_LT_TAGVAR(allow_undefined_flag, $1)=
6141
_LT_TAGVAR(always_export_symbols, $1)=no
6142
_LT_TAGVAR(archive_expsym_cmds, $1)=
6143
_LT_TAGVAR(compiler_needs_object, $1)=no
6144
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6145
_LT_TAGVAR(hardcode_direct, $1)=no
6146
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6147
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6148
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6149
_LT_TAGVAR(hardcode_libdir_separator, $1)=
6150
_LT_TAGVAR(hardcode_minus_L, $1)=no
6151
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6152
_LT_TAGVAR(hardcode_automatic, $1)=no
6153
_LT_TAGVAR(inherit_rpath, $1)=no
6154
_LT_TAGVAR(module_cmds, $1)=
6155
_LT_TAGVAR(module_expsym_cmds, $1)=
6156
_LT_TAGVAR(link_all_deplibs, $1)=unknown
6157
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6158
_LT_TAGVAR(no_undefined_flag, $1)=
6159
_LT_TAGVAR(whole_archive_flag_spec, $1)=
6160
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6162
# Source file extension for C++ test sources.
6165
# Object file extension for compiled C++ test sources.
6167
_LT_TAGVAR(objext, $1)=$objext
6169
# No sense in running all these tests if we already determined that
6170
# the CXX compiler isn't working. Some variables (like enable_shared)
6171
# are currently assumed to apply to all compilers on this platform,
6172
# and will be corrupted by setting them based on a non-working compiler.
6173
if test "$_lt_caught_CXX_error" != yes; then
6174
# Code to be used in simple compile tests
6175
lt_simple_compile_test_code="int some_variable = 0;"
6177
# Code to be used in simple link tests
6178
lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6180
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
6183
# save warnings/boilerplate of simple test code
6184
_LT_COMPILER_BOILERPLATE
6185
_LT_LINKER_BOILERPLATE
6187
# Allow CC to be a program name with arguments.
6192
lt_save_with_gnu_ld=$with_gnu_ld
6193
lt_save_path_LD=$lt_cv_path_LD
6194
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6195
lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6197
$as_unset lt_cv_prog_gnu_ld
6199
if test -n "${lt_cv_path_LDCXX+set}"; then
6200
lt_cv_path_LD=$lt_cv_path_LDCXX
6202
$as_unset lt_cv_path_LD
6204
test -z "${LDCXX+set}" || LD=$LDCXX
6207
_LT_TAGVAR(compiler, $1)=$CC
6208
_LT_CC_BASENAME([$compiler])
6210
if test -n "$compiler"; then
6211
# We don't want -fno-exception when compiling C++ code, so set the
6212
# no_builtin_flag separately
6213
if test "$GXX" = yes; then
6214
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6216
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6219
if test "$GXX" = yes; then
6220
# Set up default GNU C++ configuration
6224
# Check if GNU C++ uses GNU ld as the underlying linker, since the
6225
# archiving commands below assume that GNU ld is being used.
6226
if test "$with_gnu_ld" = yes; then
6227
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6228
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6230
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6231
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6233
# If archive_cmds runs LD, not CC, wlarc should be empty
6234
# XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6235
# investigate it a little bit more. (MM)
6238
# ancient GNU ld didn't support --whole-archive et. al.
6239
if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6240
$GREP 'no-whole-archive' > /dev/null; then
6241
_LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6243
_LT_TAGVAR(whole_archive_flag_spec, $1)=
6249
# A generic and very simple default shared library creation
6250
# command for GNU C++ for the case where it uses the native
6251
# linker, instead of GNU ld. If possible, this setting should
6252
# overridden to take advantage of the native linker features on
6253
# the platform it is being used on.
6254
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6257
# Commands to make compiler produce verbose output that lists
6258
# what "hidden" libraries, object files and flags are used when
6259
# linking a shared library.
6260
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6268
# PORTME: fill in a description of your system's C++ link characteristics
6269
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6270
_LT_TAGVAR(ld_shlibs, $1)=yes
6273
# FIXME: insert proper C++ library support
6274
_LT_TAGVAR(ld_shlibs, $1)=no
6277
if test "$host_cpu" = ia64; then
6278
# On IA64, the linker does run time linking by default, so we don't
6279
# have to do anything special.
6280
aix_use_runtimelinking=no
6281
exp_sym_flag='-Bexport'
6284
aix_use_runtimelinking=no
6286
# Test if we are trying to use run time linking or normal
6287
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
6288
# need to do runtime linking.
6289
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6290
for ld_flag in $LDFLAGS; do
6293
aix_use_runtimelinking=yes
6301
exp_sym_flag='-bexport'
6302
no_entry_flag='-bnoentry'
6305
# When large executables or shared objects are built, AIX ld can
6306
# have problems creating the table of contents. If linking a library
6307
# or program results in "error TOC overflow" add -mminimal-toc to
6308
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6309
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6311
_LT_TAGVAR(archive_cmds, $1)=''
6312
_LT_TAGVAR(hardcode_direct, $1)=yes
6313
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6314
_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6315
_LT_TAGVAR(link_all_deplibs, $1)=yes
6316
_LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6318
if test "$GXX" = yes; then
6319
case $host_os in aix4.[[012]]|aix4.[[012]].*)
6320
# We only want to do this on AIX 4.2 and lower, the check
6321
# below for broken collect2 doesn't work under 4.3+
6322
collect2name=`${CC} -print-prog-name=collect2`
6323
if test -f "$collect2name" &&
6324
strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6326
# We have reworked collect2
6329
# We have old collect2
6330
_LT_TAGVAR(hardcode_direct, $1)=unsupported
6331
# It fails to find uninstalled libraries when the uninstalled
6332
# path is not listed in the libpath. Setting hardcode_minus_L
6333
# to unsupported forces relinking
6334
_LT_TAGVAR(hardcode_minus_L, $1)=yes
6335
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6336
_LT_TAGVAR(hardcode_libdir_separator, $1)=
6339
shared_flag='-shared'
6340
if test "$aix_use_runtimelinking" = yes; then
6341
shared_flag="$shared_flag "'${wl}-G'
6345
if test "$host_cpu" = ia64; then
6346
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6347
# chokes on -Wl,-G. The following line is correct:
6350
if test "$aix_use_runtimelinking" = yes; then
6351
shared_flag='${wl}-G'
6353
shared_flag='${wl}-bM:SRE'
6358
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6359
# It seems that -bexpall does not export symbols beginning with
6360
# underscore (_), so it is better to generate a list of symbols to
6362
_LT_TAGVAR(always_export_symbols, $1)=yes
6363
if test "$aix_use_runtimelinking" = yes; then
6364
# Warning - without using the other runtime loading flags (-brtl),
6365
# -berok will link without error, but may produce a broken library.
6366
_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6367
# Determine the default libpath from the value encoded in an empty
6369
_LT_SYS_MODULE_PATH_AIX
6370
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6372
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6374
if test "$host_cpu" = ia64; then
6375
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6376
_LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6377
_LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
6379
# Determine the default libpath from the value encoded in an
6381
_LT_SYS_MODULE_PATH_AIX
6382
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6383
# Warning - without using the other run time loading flags,
6384
# -berok will link without error, but may produce a broken library.
6385
_LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6386
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6387
# Exported symbols can be pulled into shared objects from archives
6388
_LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6389
_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6390
# This is similar to how AIX traditionally builds its shared
6392
_LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6398
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6399
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6400
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6401
# support --undefined. This deserves some investigation. FIXME
6402
_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6404
_LT_TAGVAR(ld_shlibs, $1)=no
6409
case $cc_basename in
6411
# FIXME: insert proper C++ library support
6412
_LT_TAGVAR(ld_shlibs, $1)=no
6417
cygwin* | mingw* | pw32* | cegcc*)
6418
# _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6419
# as there is no search path for DLLs.
6420
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6421
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6422
_LT_TAGVAR(always_export_symbols, $1)=no
6423
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6425
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6426
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6427
# If the export-symbols file already is a .def file (1st line
6428
# is EXPORTS), use it as is; otherwise, prepend...
6429
_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6430
cp $export_symbols $output_objdir/$soname.def;
6432
echo EXPORTS > $output_objdir/$soname.def;
6433
cat $export_symbols >> $output_objdir/$soname.def;
6435
$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'
6437
_LT_TAGVAR(ld_shlibs, $1)=no
6440
darwin* | rhapsody*)
6441
_LT_DARWIN_LINKER_FEATURES($1)
6445
case $cc_basename in
6447
# FIXME: insert proper C++ library support
6448
_LT_TAGVAR(ld_shlibs, $1)=no
6451
# Green Hills C++ Compiler
6452
# FIXME: insert proper C++ library support
6453
_LT_TAGVAR(ld_shlibs, $1)=no
6456
# FIXME: insert proper C++ library support
6457
_LT_TAGVAR(ld_shlibs, $1)=no
6463
# C++ shared libraries reported to be fairly broken before
6465
_LT_TAGVAR(ld_shlibs, $1)=no
6469
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6472
freebsd* | dragonfly*)
6473
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6475
_LT_TAGVAR(ld_shlibs, $1)=yes
6482
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6483
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6484
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6485
_LT_TAGVAR(hardcode_direct, $1)=yes
6486
_LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6487
# but as the default
6488
# location of the library.
6490
case $cc_basename in
6492
# FIXME: insert proper C++ library support
6493
_LT_TAGVAR(ld_shlibs, $1)=no
6496
_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6497
# Commands to make compiler produce verbose output that lists
6498
# what "hidden" libraries, object files and flags are used when
6499
# linking a shared library.
6501
# There doesn't appear to be a way to prevent this compiler from
6502
# explicitly linking system object files so we need to strip them
6503
# from the output so that they don't get included in the library
6505
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
6508
if test "$GXX" = yes; then
6509
_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6511
# FIXME: insert proper C++ library support
6512
_LT_TAGVAR(ld_shlibs, $1)=no
6519
if test $with_gnu_ld = no; then
6520
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6521
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6527
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6533
_LT_TAGVAR(hardcode_direct, $1)=no
6534
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6537
_LT_TAGVAR(hardcode_direct, $1)=yes
6538
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6539
_LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6540
# but as the default
6541
# location of the library.
6545
case $cc_basename in
6547
# FIXME: insert proper C++ library support
6548
_LT_TAGVAR(ld_shlibs, $1)=no
6553
_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6556
_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6559
_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6562
# Commands to make compiler produce verbose output that lists
6563
# what "hidden" libraries, object files and flags are used when
6564
# linking a shared library.
6566
# There doesn't appear to be a way to prevent this compiler from
6567
# explicitly linking system object files so we need to strip them
6568
# from the output so that they don't get included in the library
6570
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
6573
if test "$GXX" = yes; then
6574
if test $with_gnu_ld = no; then
6577
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6580
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6583
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6588
# FIXME: insert proper C++ library support
6589
_LT_TAGVAR(ld_shlibs, $1)=no
6596
_LT_TAGVAR(hardcode_direct, $1)=no
6597
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6598
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6599
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6600
# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6601
# Instead, shared libraries are loaded at an image base (0x10000000 by
6602
# default) and relocated if they conflict, which is a slow very memory
6603
# consuming and fragmenting process. To avoid this, we pick a random,
6604
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6605
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
6606
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6607
_LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6610
case $cc_basename in
6613
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6615
# Archives containing C++ object files must be created using
6616
# "CC -ar", where "CC" is the IRIX C++ compiler. This is
6617
# necessary to make sure instantiated templates are included
6619
_LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6622
if test "$GXX" = yes; then
6623
if test "$with_gnu_ld" = no; then
6624
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6626
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
6629
_LT_TAGVAR(link_all_deplibs, $1)=yes
6632
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6633
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6634
_LT_TAGVAR(inherit_rpath, $1)=yes
6637
linux* | k*bsd*-gnu | kopensolaris*-gnu)
6638
case $cc_basename in
6640
# Kuck and Associates, Inc. (KAI) C++ Compiler
6642
# KCC will only create a shared library if the output file
6643
# ends with ".so" (or ".sl" for HP-UX), so rename the library
6644
# to its proper name (with version) after linking.
6645
_LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
6646
_LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
6647
# Commands to make compiler produce verbose output that lists
6648
# what "hidden" libraries, object files and flags are used when
6649
# linking a shared library.
6651
# There doesn't appear to be a way to prevent this compiler from
6652
# explicitly linking system object files so we need to strip them
6653
# from the output so that they don't get included in the library
6655
output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
6657
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6658
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6660
# Archives containing C++ object files must be created using
6661
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
6662
_LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6667
# version 8.0 and above of icpc choke on multiply defined symbols
6668
# if we add $predep_objects and $postdep_objects, however 7.1 and
6669
# earlier do not add the objects themselves.
6670
case `$CC -V 2>&1` in
6672
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6673
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6675
*) # Version 8.0 or newer
6678
ia64*) tmp_idyn=' -i_dynamic';;
6680
_LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6681
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6684
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6685
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6686
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6687
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6690
# Portland Group C++ compiler
6692
*pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
6693
_LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
6695
$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
6696
compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
6697
_LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
6699
$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
6700
$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
6702
_LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
6704
$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6705
$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6706
_LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
6708
$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6709
$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
6711
*) # Version 6 will use weak symbols
6712
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6713
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
6717
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6718
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6719
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
6723
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6724
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
6726
runpath_var=LD_RUN_PATH
6727
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6728
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6730
# Commands to make compiler produce verbose output that lists
6731
# what "hidden" libraries, object files and flags are used when
6732
# linking a shared library.
6734
# There doesn't appear to be a way to prevent this compiler from
6735
# explicitly linking system object files so we need to strip them
6736
# from the output so that they don't get included in the library
6738
output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
6741
# IBM XL 8.0 on PPC, with GNU ld
6742
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6743
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6744
_LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6745
if test "x$supports_anon_versioning" = xyes; then
6746
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6747
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6748
echo "local: *; };" >> $output_objdir/$libname.ver~
6749
$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6753
case `$CC -V 2>&1 | sed 5q` in
6756
_LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6757
_LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6758
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
6759
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6760
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
6761
_LT_TAGVAR(compiler_needs_object, $1)=yes
6763
# Not sure whether something based on
6764
# $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
6766
output_verbose_link_cmd='echo'
6768
# Archives containing C++ object files must be created using
6769
# "CC -xar", where "CC" is the Sun C++ compiler. This is
6770
# necessary to make sure instantiated templates are included
6772
_LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6780
# FIXME: insert proper C++ library support
6781
_LT_TAGVAR(ld_shlibs, $1)=no
6785
# FIXME: insert proper C++ library support
6786
_LT_TAGVAR(ld_shlibs, $1)=no
6790
case $cc_basename in
6792
# FIXME: insert proper C++ library support
6793
_LT_TAGVAR(ld_shlibs, $1)=no
6796
# FIXME: insert proper C++ library support
6797
_LT_TAGVAR(ld_shlibs, $1)=no
6803
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6804
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6806
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6807
_LT_TAGVAR(hardcode_direct, $1)=yes
6808
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6810
# Workaround some broken pre-1.5 toolchains
6811
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6815
_LT_TAGVAR(ld_shlibs, $1)=yes
6819
# C++ shared libraries are fairly broken
6820
_LT_TAGVAR(ld_shlibs, $1)=no
6824
if test -f /usr/libexec/ld.so; then
6825
_LT_TAGVAR(hardcode_direct, $1)=yes
6826
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6827
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6828
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6829
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6830
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6831
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
6832
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6833
_LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6835
output_verbose_link_cmd=echo
6837
_LT_TAGVAR(ld_shlibs, $1)=no
6841
osf3* | osf4* | osf5*)
6842
case $cc_basename in
6844
# Kuck and Associates, Inc. (KAI) C++ Compiler
6846
# KCC will only create a shared library if the output file
6847
# ends with ".so" (or ".sl" for HP-UX), so rename the library
6848
# to its proper name (with version) after linking.
6849
_LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
6851
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6852
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6854
# Archives containing C++ object files must be created using
6855
# the KAI C++ compiler.
6857
osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
6858
*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
6862
# Rational C++ 2.4.1
6863
# FIXME: insert proper C++ library support
6864
_LT_TAGVAR(ld_shlibs, $1)=no
6869
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6870
_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6871
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6874
_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6875
_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6876
_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6877
echo "-hidden">> $lib.exp~
6878
$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
6880
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6884
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6886
# Commands to make compiler produce verbose output that lists
6887
# what "hidden" libraries, object files and flags are used when
6888
# linking a shared library.
6890
# There doesn't appear to be a way to prevent this compiler from
6891
# explicitly linking system object files so we need to strip them
6892
# from the output so that they don't get included in the library
6894
output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
6897
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6898
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6901
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6904
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6908
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6909
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6911
# Commands to make compiler produce verbose output that lists
6912
# what "hidden" libraries, object files and flags are used when
6913
# linking a shared library.
6914
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6917
# FIXME: insert proper C++ library support
6918
_LT_TAGVAR(ld_shlibs, $1)=no
6925
# FIXME: insert proper C++ library support
6926
_LT_TAGVAR(ld_shlibs, $1)=no
6930
case $cc_basename in
6933
# FIXME: insert proper C++ library support
6934
_LT_TAGVAR(ld_shlibs, $1)=no
6938
# FIXME: insert proper C++ library support
6939
_LT_TAGVAR(ld_shlibs, $1)=no
6942
# FIXME: insert proper C++ library support
6943
_LT_TAGVAR(ld_shlibs, $1)=no
6949
case $cc_basename in
6951
# Sun C++ 4.2, 5.x and Centerline C++
6952
_LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6953
_LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6954
_LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6955
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6956
$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'
6958
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6959
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6961
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6963
# The compiler driver will combine and reorder linker options,
6964
# but understands `-z linker_flag'.
6965
# Supported since Solaris 2.6 (maybe 2.5.1?)
6966
_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6969
_LT_TAGVAR(link_all_deplibs, $1)=yes
6971
output_verbose_link_cmd='echo'
6973
# Archives containing C++ object files must be created using
6974
# "CC -xar", where "CC" is the Sun C++ compiler. This is
6975
# necessary to make sure instantiated templates are included
6977
_LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6980
# Green Hills C++ Compiler
6981
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6983
# The C++ compiler must be used to create the archive.
6984
_LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6987
# GNU C++ compiler with Solaris linker
6988
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6989
_LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6990
if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6991
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6992
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6993
$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6995
# Commands to make compiler produce verbose output that lists
6996
# what "hidden" libraries, object files and flags are used when
6997
# linking a shared library.
6998
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
7000
# g++ 2.7 appears to require `-G' NOT `-shared' on this
7002
_LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7003
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7004
$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7006
# Commands to make compiler produce verbose output that lists
7007
# what "hidden" libraries, object files and flags are used when
7008
# linking a shared library.
7009
output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
7012
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
7014
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7016
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7024
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7025
_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7026
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7027
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7028
runpath_var='LD_RUN_PATH'
7030
case $cc_basename in
7032
_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7033
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7036
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7037
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7042
sysv5* | sco3.2v5* | sco5v6*)
7043
# Note: We can NOT use -z defs as we might desire, because we do not
7044
# link with -lc, and that would cause any symbols used from libc to
7045
# always be unresolved, which means just about no library would
7046
# ever link correctly. If we're not using GNU ld we use -z text
7047
# though, which does catch some bad symbols but isn't as heavy-handed
7049
_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7050
_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7051
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7052
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7053
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7054
_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7055
_LT_TAGVAR(link_all_deplibs, $1)=yes
7056
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7057
runpath_var='LD_RUN_PATH'
7059
case $cc_basename in
7061
_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7062
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7065
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7066
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7072
case $cc_basename in
7074
# NonStop-UX NCC 3.20
7075
# FIXME: insert proper C++ library support
7076
_LT_TAGVAR(ld_shlibs, $1)=no
7079
# FIXME: insert proper C++ library support
7080
_LT_TAGVAR(ld_shlibs, $1)=no
7086
# FIXME: insert proper C++ library support
7087
_LT_TAGVAR(ld_shlibs, $1)=no
7091
# FIXME: insert proper C++ library support
7092
_LT_TAGVAR(ld_shlibs, $1)=no
7096
AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7097
test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7099
_LT_TAGVAR(GCC, $1)="$GXX"
7100
_LT_TAGVAR(LD, $1)="$LD"
7103
## There is no encapsulation within the following macros, do not change
7104
## the running order or otherwise move them around unless you know exactly
7105
## what you are doing...
7106
_LT_SYS_HIDDEN_LIBDEPS($1)
7107
_LT_COMPILER_PIC($1)
7108
_LT_COMPILER_C_O($1)
7109
_LT_COMPILER_FILE_LOCKS($1)
7110
_LT_LINKER_SHLIBS($1)
7111
_LT_SYS_DYNAMIC_LINKER($1)
7112
_LT_LINKER_HARDCODE_LIBPATH($1)
7115
fi # test -n "$compiler"
7121
with_gnu_ld=$lt_save_with_gnu_ld
7122
lt_cv_path_LDCXX=$lt_cv_path_LD
7123
lt_cv_path_LD=$lt_save_path_LD
7124
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7125
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7126
fi # test "$_lt_caught_CXX_error" != yes
7129
])# _LT_LANG_CXX_CONFIG
7132
# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7133
# ---------------------------------
7134
# Figure out "hidden" library dependencies from verbose
7135
# compiler output when linking a shared library.
7136
# Parse the compiler output and extract the necessary
7137
# objects, libraries and library flags.
7138
m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7139
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7140
# Dependencies to place before and after the object being linked:
7141
_LT_TAGVAR(predep_objects, $1)=
7142
_LT_TAGVAR(postdep_objects, $1)=
7143
_LT_TAGVAR(predeps, $1)=
7144
_LT_TAGVAR(postdeps, $1)=
7145
_LT_TAGVAR(compiler_lib_search_path, $1)=
7147
dnl we can't use the lt_simple_compile_test_code here,
7148
dnl because it contains code intended for an executable,
7149
dnl not a library. It's possible we should let each
7150
dnl tag define a new lt_????_link_test_code variable,
7151
dnl but it's only used here...
7152
m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7154
void foo (void) { a = 0; }
7156
], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7160
Foo (void) { a = 0; }
7165
], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7173
], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7181
], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7184
public void bar (void) {
7190
dnl Parse the compiler output and extract the necessary
7191
dnl objects, libraries and library flags.
7192
if AC_TRY_EVAL(ac_compile); then
7193
# Parse the compiler output and extract the necessary
7194
# objects, libraries and library flags.
7196
# Sentinel used to keep track of whether or not we are before
7197
# the conftest object file.
7198
pre_test_object_deps_done=no
7200
for p in `eval "$output_verbose_link_cmd"`; do
7204
# Some compilers place space between "-{L,R}" and the path.
7206
if test $p = "-L" ||
7207
test $p = "-R"; then
7214
if test "$pre_test_object_deps_done" = no; then
7217
# Internal compiler library paths should come after those
7218
# provided the user. The postdeps already come after the
7219
# user supplied libs so there is no need to process them.
7220
if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7221
_LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
7223
_LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
7226
# The "-l" case would never come before the object being
7227
# linked, so don't bother handling this case.
7230
if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7231
_LT_TAGVAR(postdeps, $1)="${prev}${p}"
7233
_LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
7239
# This assumes that the test object file only shows up
7240
# once in the compiler output.
7241
if test "$p" = "conftest.$objext"; then
7242
pre_test_object_deps_done=yes
7246
if test "$pre_test_object_deps_done" = no; then
7247
if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7248
_LT_TAGVAR(predep_objects, $1)="$p"
7250
_LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7253
if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7254
_LT_TAGVAR(postdep_objects, $1)="$p"
7256
_LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7261
*) ;; # Ignore the rest.
7269
echo "libtool.m4: error: problem compiling $1 test program"
7272
$RM -f confest.$objext
7274
# PORTME: override above test on systems where it is broken
7278
# Interix 3.5 installs completely hosed .la files for C++, so rather than
7279
# hack all around it, let's just trust "g++" to DTRT.
7280
_LT_TAGVAR(predep_objects,$1)=
7281
_LT_TAGVAR(postdep_objects,$1)=
7282
_LT_TAGVAR(postdeps,$1)=
7286
case `$CC -V 2>&1 | sed 5q` in
7290
# The more standards-conforming stlport4 library is
7291
# incompatible with the Cstd library. Avoid specifying
7292
# it if it's in CXXFLAGS. Ignore libCrun as
7293
# -library=stlport4 depends on it.
7294
case " $CXX $CXXFLAGS " in
7295
*" -library=stlport4 "*)
7296
solaris_use_stlport4=yes
7300
if test "$solaris_use_stlport4" != yes; then
7301
_LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7308
case $cc_basename in
7310
# The more standards-conforming stlport4 library is
7311
# incompatible with the Cstd library. Avoid specifying
7312
# it if it's in CXXFLAGS. Ignore libCrun as
7313
# -library=stlport4 depends on it.
7314
case " $CXX $CXXFLAGS " in
7315
*" -library=stlport4 "*)
7316
solaris_use_stlport4=yes
7320
# Adding this requires a known-good setup of shared libraries for
7321
# Sun compiler versions before 5.6, else PIC objects from an old
7322
# archive will be linked into the output, leading to subtle bugs.
7323
if test "$solaris_use_stlport4" != yes; then
7324
_LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7332
case " $_LT_TAGVAR(postdeps, $1) " in
7333
*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7335
_LT_TAGVAR(compiler_lib_search_dirs, $1)=
7336
if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7337
_LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
7339
_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7340
[The directories searched by this compiler when creating a shared library])
7341
_LT_TAGDECL([], [predep_objects], [1],
7342
[Dependencies to place before and after the objects being linked to
7343
create a shared library])
7344
_LT_TAGDECL([], [postdep_objects], [1])
7345
_LT_TAGDECL([], [predeps], [1])
7346
_LT_TAGDECL([], [postdeps], [1])
7347
_LT_TAGDECL([], [compiler_lib_search_path], [1],
7348
[The library search path used internally by the compiler when linking
7350
])# _LT_SYS_HIDDEN_LIBDEPS
7355
# Since AC_PROG_F77 is broken, in that it returns the empty string
7356
# if there is no fortran compiler, we have our own version here.
7357
m4_defun([_LT_PROG_F77],
7359
pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
7361
if test -z "$F77" || test "X$F77" = "Xno"; then
7364
popdef([AC_MSG_ERROR])
7367
dnl aclocal-1.4 backwards compatibility:
7368
dnl AC_DEFUN([_LT_PROG_F77], [])
7371
# _LT_LANG_F77_CONFIG([TAG])
7372
# --------------------------
7373
# Ensure that the configuration variables for a Fortran 77 compiler are
7374
# suitably defined. These variables are subsequently used by _LT_CONFIG
7375
# to write the compiler configuration to `libtool'.
7376
m4_defun([_LT_LANG_F77_CONFIG],
7377
[AC_REQUIRE([_LT_PROG_F77])dnl
7378
AC_LANG_PUSH(Fortran 77)
7380
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7381
_LT_TAGVAR(allow_undefined_flag, $1)=
7382
_LT_TAGVAR(always_export_symbols, $1)=no
7383
_LT_TAGVAR(archive_expsym_cmds, $1)=
7384
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7385
_LT_TAGVAR(hardcode_direct, $1)=no
7386
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7387
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7388
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7389
_LT_TAGVAR(hardcode_libdir_separator, $1)=
7390
_LT_TAGVAR(hardcode_minus_L, $1)=no
7391
_LT_TAGVAR(hardcode_automatic, $1)=no
7392
_LT_TAGVAR(inherit_rpath, $1)=no
7393
_LT_TAGVAR(module_cmds, $1)=
7394
_LT_TAGVAR(module_expsym_cmds, $1)=
7395
_LT_TAGVAR(link_all_deplibs, $1)=unknown
7396
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7397
_LT_TAGVAR(no_undefined_flag, $1)=
7398
_LT_TAGVAR(whole_archive_flag_spec, $1)=
7399
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7401
# Source file extension for f77 test sources.
7404
# Object file extension for compiled f77 test sources.
7406
_LT_TAGVAR(objext, $1)=$objext
7408
# No sense in running all these tests if we already determined that
7409
# the F77 compiler isn't working. Some variables (like enable_shared)
7410
# are currently assumed to apply to all compilers on this platform,
7411
# and will be corrupted by setting them based on a non-working compiler.
7412
if test "$_lt_disable_F77" != yes; then
7413
# Code to be used in simple compile tests
7414
lt_simple_compile_test_code="\
7420
# Code to be used in simple link tests
7421
lt_simple_link_test_code="\
7426
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7429
# save warnings/boilerplate of simple test code
7430
_LT_COMPILER_BOILERPLATE
7431
_LT_LINKER_BOILERPLATE
7433
# Allow CC to be a program name with arguments.
7438
_LT_TAGVAR(compiler, $1)=$CC
7439
_LT_CC_BASENAME([$compiler])
7441
if test -n "$compiler"; then
7442
AC_MSG_CHECKING([if libtool supports shared libraries])
7443
AC_MSG_RESULT([$can_build_shared])
7445
AC_MSG_CHECKING([whether to build shared libraries])
7446
test "$can_build_shared" = "no" && enable_shared=no
7448
# On AIX, shared libraries and static libraries use the same namespace, and
7449
# are all built from PIC.
7452
test "$enable_shared" = yes && enable_static=no
7453
if test -n "$RANLIB"; then
7454
archive_cmds="$archive_cmds~\$RANLIB \$lib"
7455
postinstall_cmds='$RANLIB $lib'
7459
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7460
test "$enable_shared" = yes && enable_static=no
7464
AC_MSG_RESULT([$enable_shared])
7466
AC_MSG_CHECKING([whether to build static libraries])
7467
# Make sure either enable_shared or enable_static is yes.
7468
test "$enable_shared" = yes || enable_static=yes
7469
AC_MSG_RESULT([$enable_static])
7471
_LT_TAGVAR(GCC, $1)="$G77"
7472
_LT_TAGVAR(LD, $1)="$LD"
7475
## There is no encapsulation within the following macros, do not change
7476
## the running order or otherwise move them around unless you know exactly
7477
## what you are doing...
7478
_LT_COMPILER_PIC($1)
7479
_LT_COMPILER_C_O($1)
7480
_LT_COMPILER_FILE_LOCKS($1)
7481
_LT_LINKER_SHLIBS($1)
7482
_LT_SYS_DYNAMIC_LINKER($1)
7483
_LT_LINKER_HARDCODE_LIBPATH($1)
7486
fi # test -n "$compiler"
7490
fi # test "$_lt_disable_F77" != yes
7493
])# _LT_LANG_F77_CONFIG
7498
# Since AC_PROG_FC is broken, in that it returns the empty string
7499
# if there is no fortran compiler, we have our own version here.
7500
m4_defun([_LT_PROG_FC],
7502
pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
7504
if test -z "$FC" || test "X$FC" = "Xno"; then
7507
popdef([AC_MSG_ERROR])
7510
dnl aclocal-1.4 backwards compatibility:
7511
dnl AC_DEFUN([_LT_PROG_FC], [])
7514
# _LT_LANG_FC_CONFIG([TAG])
7515
# -------------------------
7516
# Ensure that the configuration variables for a Fortran compiler are
7517
# suitably defined. These variables are subsequently used by _LT_CONFIG
7518
# to write the compiler configuration to `libtool'.
7519
m4_defun([_LT_LANG_FC_CONFIG],
7520
[AC_REQUIRE([_LT_PROG_FC])dnl
7521
AC_LANG_PUSH(Fortran)
7523
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7524
_LT_TAGVAR(allow_undefined_flag, $1)=
7525
_LT_TAGVAR(always_export_symbols, $1)=no
7526
_LT_TAGVAR(archive_expsym_cmds, $1)=
7527
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7528
_LT_TAGVAR(hardcode_direct, $1)=no
7529
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7530
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7531
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7532
_LT_TAGVAR(hardcode_libdir_separator, $1)=
7533
_LT_TAGVAR(hardcode_minus_L, $1)=no
7534
_LT_TAGVAR(hardcode_automatic, $1)=no
7535
_LT_TAGVAR(inherit_rpath, $1)=no
7536
_LT_TAGVAR(module_cmds, $1)=
7537
_LT_TAGVAR(module_expsym_cmds, $1)=
7538
_LT_TAGVAR(link_all_deplibs, $1)=unknown
7539
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7540
_LT_TAGVAR(no_undefined_flag, $1)=
7541
_LT_TAGVAR(whole_archive_flag_spec, $1)=
7542
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7544
# Source file extension for fc test sources.
7545
ac_ext=${ac_fc_srcext-f}
7547
# Object file extension for compiled fc test sources.
7549
_LT_TAGVAR(objext, $1)=$objext
7551
# No sense in running all these tests if we already determined that
7552
# the FC compiler isn't working. Some variables (like enable_shared)
7553
# are currently assumed to apply to all compilers on this platform,
7554
# and will be corrupted by setting them based on a non-working compiler.
7555
if test "$_lt_disable_FC" != yes; then
7556
# Code to be used in simple compile tests
7557
lt_simple_compile_test_code="\
7563
# Code to be used in simple link tests
7564
lt_simple_link_test_code="\
7569
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7572
# save warnings/boilerplate of simple test code
7573
_LT_COMPILER_BOILERPLATE
7574
_LT_LINKER_BOILERPLATE
7576
# Allow CC to be a program name with arguments.
7581
GCC=$ac_cv_fc_compiler_gnu
7583
_LT_TAGVAR(compiler, $1)=$CC
7584
_LT_CC_BASENAME([$compiler])
7586
if test -n "$compiler"; then
7587
AC_MSG_CHECKING([if libtool supports shared libraries])
7588
AC_MSG_RESULT([$can_build_shared])
7590
AC_MSG_CHECKING([whether to build shared libraries])
7591
test "$can_build_shared" = "no" && enable_shared=no
7593
# On AIX, shared libraries and static libraries use the same namespace, and
7594
# are all built from PIC.
7597
test "$enable_shared" = yes && enable_static=no
7598
if test -n "$RANLIB"; then
7599
archive_cmds="$archive_cmds~\$RANLIB \$lib"
7600
postinstall_cmds='$RANLIB $lib'
7604
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7605
test "$enable_shared" = yes && enable_static=no
7609
AC_MSG_RESULT([$enable_shared])
7611
AC_MSG_CHECKING([whether to build static libraries])
7612
# Make sure either enable_shared or enable_static is yes.
7613
test "$enable_shared" = yes || enable_static=yes
7614
AC_MSG_RESULT([$enable_static])
7616
_LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
7617
_LT_TAGVAR(LD, $1)="$LD"
7620
## There is no encapsulation within the following macros, do not change
7621
## the running order or otherwise move them around unless you know exactly
7622
## what you are doing...
7623
_LT_SYS_HIDDEN_LIBDEPS($1)
7624
_LT_COMPILER_PIC($1)
7625
_LT_COMPILER_C_O($1)
7626
_LT_COMPILER_FILE_LOCKS($1)
7627
_LT_LINKER_SHLIBS($1)
7628
_LT_SYS_DYNAMIC_LINKER($1)
7629
_LT_LINKER_HARDCODE_LIBPATH($1)
7632
fi # test -n "$compiler"
7636
fi # test "$_lt_disable_FC" != yes
7639
])# _LT_LANG_FC_CONFIG
7642
# _LT_LANG_GCJ_CONFIG([TAG])
7643
# --------------------------
7644
# Ensure that the configuration variables for the GNU Java Compiler compiler
7645
# are suitably defined. These variables are subsequently used by _LT_CONFIG
7646
# to write the compiler configuration to `libtool'.
7647
m4_defun([_LT_LANG_GCJ_CONFIG],
7648
[AC_REQUIRE([LT_PROG_GCJ])dnl
7651
# Source file extension for Java test sources.
7654
# Object file extension for compiled Java test sources.
7656
_LT_TAGVAR(objext, $1)=$objext
7658
# Code to be used in simple compile tests
7659
lt_simple_compile_test_code="class foo {}"
7661
# Code to be used in simple link tests
7662
lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7664
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7667
# save warnings/boilerplate of simple test code
7668
_LT_COMPILER_BOILERPLATE
7669
_LT_LINKER_BOILERPLATE
7671
# Allow CC to be a program name with arguments.
7677
_LT_TAGVAR(compiler, $1)=$CC
7678
_LT_TAGVAR(LD, $1)="$LD"
7679
_LT_CC_BASENAME([$compiler])
7681
# GCJ did not exist at the time GCC didn't implicitly link libc in.
7682
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7684
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7686
if test -n "$compiler"; then
7687
_LT_COMPILER_NO_RTTI($1)
7688
_LT_COMPILER_PIC($1)
7689
_LT_COMPILER_C_O($1)
7690
_LT_COMPILER_FILE_LOCKS($1)
7691
_LT_LINKER_SHLIBS($1)
7692
_LT_LINKER_HARDCODE_LIBPATH($1)
7701
])# _LT_LANG_GCJ_CONFIG
7704
# _LT_LANG_RC_CONFIG([TAG])
7705
# -------------------------
7706
# Ensure that the configuration variables for the Windows resource compiler
7707
# are suitably defined. These variables are subsequently used by _LT_CONFIG
7708
# to write the compiler configuration to `libtool'.
7709
m4_defun([_LT_LANG_RC_CONFIG],
7710
[AC_REQUIRE([LT_PROG_RC])dnl
7713
# Source file extension for RC test sources.
7716
# Object file extension for compiled RC test sources.
7718
_LT_TAGVAR(objext, $1)=$objext
7720
# Code to be used in simple compile tests
7721
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
7723
# Code to be used in simple link tests
7724
lt_simple_link_test_code="$lt_simple_compile_test_code"
7726
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7729
# save warnings/boilerplate of simple test code
7730
_LT_COMPILER_BOILERPLATE
7731
_LT_LINKER_BOILERPLATE
7733
# Allow CC to be a program name with arguments.
7739
_LT_TAGVAR(compiler, $1)=$CC
7740
_LT_CC_BASENAME([$compiler])
7741
_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
7743
if test -n "$compiler"; then
7751
])# _LT_LANG_RC_CONFIG
7756
AC_DEFUN([LT_PROG_GCJ],
7757
[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
7758
[m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
7759
[AC_CHECK_TOOL(GCJ, gcj,)
7760
test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7761
AC_SUBST(GCJFLAGS)])])[]dnl
7765
AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
7766
dnl aclocal-1.4 backwards compatibility:
7767
dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
7772
AC_DEFUN([LT_PROG_RC],
7773
[AC_CHECK_TOOL(RC, windres,)
7777
AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
7778
dnl aclocal-1.4 backwards compatibility:
7779
dnl AC_DEFUN([LT_AC_PROG_RC], [])
7784
# If we don't have a new enough Autoconf to choose the best grep
7785
# available, choose the one first in the user's PATH.
7786
m4_defun([_LT_DECL_EGREP],
7787
[AC_REQUIRE([AC_PROG_EGREP])dnl
7788
AC_REQUIRE([AC_PROG_FGREP])dnl
7789
test -z "$GREP" && GREP=grep
7790
_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
7791
_LT_DECL([], [EGREP], [1], [An ERE matcher])
7792
_LT_DECL([], [FGREP], [1], [A literal string matcher])
7793
dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
7800
# If we don't have a new enough Autoconf to choose the best objdump
7801
# available, choose the one first in the user's PATH.
7802
m4_defun([_LT_DECL_OBJDUMP],
7803
[AC_CHECK_TOOL(OBJDUMP, objdump, false)
7804
test -z "$OBJDUMP" && OBJDUMP=objdump
7805
_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
7812
# Check for a fully-functional sed program, that truncates
7813
# as few characters as possible. Prefer GNU sed if found.
7814
m4_defun([_LT_DECL_SED],
7816
test -z "$SED" && SED=sed
7817
Xsed="$SED -e 1s/^X//"
7818
_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
7819
_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
7820
[Sed that helps us avoid accidentally triggering echo(1) options like -n])
7823
m4_ifndef([AC_PROG_SED], [
7824
# NOTE: This macro has been submitted for inclusion into #
7825
# GNU Autoconf as AC_PROG_SED. When it is available in #
7826
# a released version of Autoconf we should remove this #
7827
# macro and use it instead. #
7829
m4_defun([AC_PROG_SED],
7830
[AC_MSG_CHECKING([for a sed that does not truncate output])
7831
AC_CACHE_VAL(lt_cv_path_SED,
7832
[# Loop through the user's path and test for sed and gsed.
7833
# Then use that list of sed's as ones to test for truncation.
7834
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7838
test -z "$as_dir" && as_dir=.
7839
for lt_ac_prog in sed gsed; do
7840
for ac_exec_ext in '' $ac_executable_extensions; do
7841
if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7842
lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7850
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
7851
# along with /bin/sed that truncates output.
7852
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7853
test ! -f $lt_ac_sed && continue
7854
cat /dev/null > conftest.in
7856
echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7857
# Check for GNU sed and select it if it is found.
7858
if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7859
lt_cv_path_SED=$lt_ac_sed
7863
cat conftest.in conftest.in >conftest.tmp
7864
mv conftest.tmp conftest.in
7865
cp conftest.in conftest.nl
7867
$lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7868
cmp -s conftest.out conftest.nl || break
7869
# 10000 chars as input seems more than enough
7870
test $lt_ac_count -gt 10 && break
7871
lt_ac_count=`expr $lt_ac_count + 1`
7872
if test $lt_ac_count -gt $lt_ac_max; then
7873
lt_ac_max=$lt_ac_count
7874
lt_cv_path_SED=$lt_ac_sed
7881
AC_MSG_RESULT([$SED])
7886
AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
7887
dnl aclocal-1.4 backwards compatibility:
7888
dnl AC_DEFUN([LT_AC_PROG_SED], [])
7891
# _LT_CHECK_SHELL_FEATURES
7892
# ------------------------
7893
# Find out whether the shell is Bourne or XSI compatible,
7894
# or has some other useful features.
7895
m4_defun([_LT_CHECK_SHELL_FEATURES],
7896
[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7897
# Try some XSI features
7900
test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
7902
&& eval 'test $(( 1 + 1 )) -eq 2 \
7903
&& test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7905
AC_MSG_RESULT([$xsi_shell])
7906
_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7908
AC_MSG_CHECKING([whether the shell understands "+="])
7910
( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7912
&& lt_shell_append=yes
7913
AC_MSG_RESULT([$lt_shell_append])
7914
_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
7916
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7921
_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
7923
# test EBCDIC or ASCII
7924
case `echo X|tr X '\101'` in
7925
A) # ASCII based system
7926
# \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7927
lt_SP2NL='tr \040 \012'
7928
lt_NL2SP='tr \015\012 \040\040'
7930
*) # EBCDIC based system
7931
lt_SP2NL='tr \100 \n'
7932
lt_NL2SP='tr \r\n \100\100'
7935
_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
7936
_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
7937
])# _LT_CHECK_SHELL_FEATURES
7940
# _LT_PROG_XSI_SHELLFNS
7941
# ---------------------
7942
# Bourne and XSI compatible variants of some useful shell functions.
7943
m4_defun([_LT_PROG_XSI_SHELLFNS],
7946
cat << \_LT_EOF >> "$cfgfile"
7948
# func_dirname file append nondir_replacement
7949
# Compute the dirname of FILE. If nonempty, add APPEND to the result,
7950
# otherwise set result to NONDIR_REPLACEMENT.
7954
*/*) func_dirname_result="${1%/*}${2}" ;;
7955
* ) func_dirname_result="${3}" ;;
7959
# func_basename file
7962
func_basename_result="${1##*/}"
7965
# func_dirname_and_basename file append nondir_replacement
7966
# perform func_basename and func_dirname in a single function
7968
# dirname: Compute the dirname of FILE. If nonempty,
7969
# add APPEND to the result, otherwise set result
7970
# to NONDIR_REPLACEMENT.
7971
# value returned in "$func_dirname_result"
7972
# basename: Compute filename of FILE.
7973
# value retuned in "$func_basename_result"
7974
# Implementation must be kept synchronized with func_dirname
7975
# and func_basename. For efficiency, we do not delegate to
7976
# those functions but instead duplicate the functionality here.
7977
func_dirname_and_basename ()
7980
*/*) func_dirname_result="${1%/*}${2}" ;;
7981
* ) func_dirname_result="${3}" ;;
7983
func_basename_result="${1##*/}"
7986
# func_stripname prefix suffix name
7987
# strip PREFIX and SUFFIX off of NAME.
7988
# PREFIX and SUFFIX must not contain globbing or regex special
7989
# characters, hashes, percent signs, but SUFFIX may contain a leading
7990
# dot (in which case that matches only a dot).
7993
# pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7994
# positional parameters, so assign one to ordinary parameter first.
7995
func_stripname_result=${3}
7996
func_stripname_result=${func_stripname_result#"${1}"}
7997
func_stripname_result=${func_stripname_result%"${2}"}
8003
func_opt_split_opt=${1%%=*}
8004
func_opt_split_arg=${1#*=}
8011
*.lo) func_lo2o_result=${1%.lo}.${objext} ;;
8012
*) func_lo2o_result=${1} ;;
8016
# func_xform libobj-or-source
8019
func_xform_result=${1%.*}.lo
8022
# func_arith arithmetic-term...
8025
func_arith_result=$(( $[*] ))
8029
# STRING may not start with a hyphen.
8032
func_len_result=${#1}
8037
*) # Bourne compatible functions.
8038
cat << \_LT_EOF >> "$cfgfile"
8040
# func_dirname file append nondir_replacement
8041
# Compute the dirname of FILE. If nonempty, add APPEND to the result,
8042
# otherwise set result to NONDIR_REPLACEMENT.
8045
# Extract subdirectory from the argument.
8046
func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
8047
if test "X$func_dirname_result" = "X${1}"; then
8048
func_dirname_result="${3}"
8050
func_dirname_result="$func_dirname_result${2}"
8054
# func_basename file
8057
func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
8060
dnl func_dirname_and_basename
8061
dnl A portable version of this function is already defined in general.m4sh
8062
dnl so there is no need for it here.
8064
# func_stripname prefix suffix name
8065
# strip PREFIX and SUFFIX off of NAME.
8066
# PREFIX and SUFFIX must not contain globbing or regex special
8067
# characters, hashes, percent signs, but SUFFIX may contain a leading
8068
# dot (in which case that matches only a dot).
8069
# func_strip_suffix prefix name
8073
.*) func_stripname_result=`$ECHO "X${3}" \
8074
| $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
8075
*) func_stripname_result=`$ECHO "X${3}" \
8076
| $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
8081
my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
8082
my_sed_long_arg='1s/^-[[^=]]*=//'
8087
func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
8088
func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
8094
func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
8097
# func_xform libobj-or-source
8100
func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
8103
# func_arith arithmetic-term...
8106
func_arith_result=`expr "$[@]"`
8110
# STRING may not start with a hyphen.
8113
func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
8119
case $lt_shell_append in
8121
cat << \_LT_EOF >> "$cfgfile"
8123
# func_append var value
8124
# Append VALUE to the end of shell variable VAR.
8132
cat << \_LT_EOF >> "$cfgfile"
8134
# func_append var value
8135
# Append VALUE to the end of shell variable VAR.
8138
eval "$[1]=\$$[1]\$[2]"
8146
# Helper functions for option handling. -*- Autoconf -*-
8148
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
8149
# Written by Gary V. Vaughan, 2004
8151
# This file is free software; the Free Software Foundation gives
8152
# unlimited permission to copy and/or distribute it, with or without
8153
# modifications, as long as this notice is preserved.
8155
# serial 6 ltoptions.m4
8157
# This is to help aclocal find these macros, as it can't see m4_define.
8158
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
8161
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
8162
# ------------------------------------------
8163
m4_define([_LT_MANGLE_OPTION],
8164
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
8167
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
8168
# ---------------------------------------
8169
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
8170
# matching handler defined, dispatch to it. Other OPTION-NAMEs are
8172
m4_define([_LT_SET_OPTION],
8173
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
8174
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
8175
_LT_MANGLE_DEFUN([$1], [$2]),
8176
[m4_warning([Unknown $1 option `$2'])])[]dnl
8180
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
8181
# ------------------------------------------------------------
8182
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8183
m4_define([_LT_IF_OPTION],
8184
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
8187
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
8188
# -------------------------------------------------------
8189
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
8191
m4_define([_LT_UNLESS_OPTIONS],
8192
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8193
[m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
8194
[m4_define([$0_found])])])[]dnl
8195
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
8200
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
8201
# ----------------------------------------
8202
# OPTION-LIST is a space-separated list of Libtool options associated
8203
# with MACRO-NAME. If any OPTION has a matching handler declared with
8204
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
8205
# the unknown option and exit.
8206
m4_defun([_LT_SET_OPTIONS],
8208
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8209
[_LT_SET_OPTION([$1], _LT_Option)])
8211
m4_if([$1],[LT_INIT],[
8213
dnl Simply set some default values (i.e off) if boolean options were not
8215
_LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
8217
_LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
8220
dnl If no reference was made to various pairs of opposing options, then
8221
dnl we run the default mode handler for the pair. For example, if neither
8222
dnl `shared' nor `disable-shared' was passed, we enable building of shared
8223
dnl archives by default:
8224
_LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
8225
_LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
8226
_LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
8227
_LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
8228
[_LT_ENABLE_FAST_INSTALL])
8234
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
8235
# -----------------------------------------
8236
m4_define([_LT_MANGLE_DEFUN],
8237
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
8240
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
8241
# -----------------------------------------------
8242
m4_define([LT_OPTION_DEFINE],
8243
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
8244
])# LT_OPTION_DEFINE
8249
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
8252
AU_DEFUN([AC_LIBTOOL_DLOPEN],
8253
[_LT_SET_OPTION([LT_INIT], [dlopen])
8254
AC_DIAGNOSE([obsolete],
8255
[$0: Remove this warning and the call to _LT_SET_OPTION when you
8256
put the `dlopen' option into LT_INIT's first parameter.])
8259
dnl aclocal-1.4 backwards compatibility:
8260
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
8265
# Declare package support for building win32 dll's.
8266
LT_OPTION_DEFINE([LT_INIT], [win32-dll],
8267
[enable_win32_dll=yes
8270
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
8271
AC_CHECK_TOOL(AS, as, false)
8272
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8273
AC_CHECK_TOOL(OBJDUMP, objdump, false)
8277
test -z "$AS" && AS=as
8278
_LT_DECL([], [AS], [0], [Assembler program])dnl
8280
test -z "$DLLTOOL" && DLLTOOL=dlltool
8281
_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
8283
test -z "$OBJDUMP" && OBJDUMP=objdump
8284
_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
8287
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
8288
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8289
_LT_SET_OPTION([LT_INIT], [win32-dll])
8290
AC_DIAGNOSE([obsolete],
8291
[$0: Remove this warning and the call to _LT_SET_OPTION when you
8292
put the `win32-dll' option into LT_INIT's first parameter.])
8295
dnl aclocal-1.4 backwards compatibility:
8296
dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
8299
# _LT_ENABLE_SHARED([DEFAULT])
8300
# ----------------------------
8301
# implement the --enable-shared flag, and supports the `shared' and
8302
# `disable-shared' LT_INIT options.
8303
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
8304
m4_define([_LT_ENABLE_SHARED],
8305
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
8306
AC_ARG_ENABLE([shared],
8307
[AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
8308
[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
8309
[p=${PACKAGE-default}
8311
yes) enable_shared=yes ;;
8312
no) enable_shared=no ;;
8315
# Look at the argument we got. We use all the common list separators.
8316
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8317
for pkg in $enableval; do
8319
if test "X$pkg" = "X$p"; then
8326
[enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
8328
_LT_DECL([build_libtool_libs], [enable_shared], [0],
8329
[Whether or not to build shared libraries])
8330
])# _LT_ENABLE_SHARED
8332
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
8333
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
8336
AC_DEFUN([AC_ENABLE_SHARED],
8337
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
8340
AC_DEFUN([AC_DISABLE_SHARED],
8341
[_LT_SET_OPTION([LT_INIT], [disable-shared])
8344
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
8345
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
8347
dnl aclocal-1.4 backwards compatibility:
8348
dnl AC_DEFUN([AM_ENABLE_SHARED], [])
8349
dnl AC_DEFUN([AM_DISABLE_SHARED], [])
8353
# _LT_ENABLE_STATIC([DEFAULT])
8354
# ----------------------------
8355
# implement the --enable-static flag, and support the `static' and
8356
# `disable-static' LT_INIT options.
8357
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
8358
m4_define([_LT_ENABLE_STATIC],
8359
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
8360
AC_ARG_ENABLE([static],
8361
[AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
8362
[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
8363
[p=${PACKAGE-default}
8365
yes) enable_static=yes ;;
8366
no) enable_static=no ;;
8369
# Look at the argument we got. We use all the common list separators.
8370
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8371
for pkg in $enableval; do
8373
if test "X$pkg" = "X$p"; then
8380
[enable_static=]_LT_ENABLE_STATIC_DEFAULT)
8382
_LT_DECL([build_old_libs], [enable_static], [0],
8383
[Whether or not to build static libraries])
8384
])# _LT_ENABLE_STATIC
8386
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
8387
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
8390
AC_DEFUN([AC_ENABLE_STATIC],
8391
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
8394
AC_DEFUN([AC_DISABLE_STATIC],
8395
[_LT_SET_OPTION([LT_INIT], [disable-static])
8398
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
8399
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
8401
dnl aclocal-1.4 backwards compatibility:
8402
dnl AC_DEFUN([AM_ENABLE_STATIC], [])
8403
dnl AC_DEFUN([AM_DISABLE_STATIC], [])
8407
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
8408
# ----------------------------------
8409
# implement the --enable-fast-install flag, and support the `fast-install'
8410
# and `disable-fast-install' LT_INIT options.
8411
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
8412
m4_define([_LT_ENABLE_FAST_INSTALL],
8413
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
8414
AC_ARG_ENABLE([fast-install],
8415
[AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
8416
[optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
8417
[p=${PACKAGE-default}
8419
yes) enable_fast_install=yes ;;
8420
no) enable_fast_install=no ;;
8422
enable_fast_install=no
8423
# Look at the argument we got. We use all the common list separators.
8424
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8425
for pkg in $enableval; do
8427
if test "X$pkg" = "X$p"; then
8428
enable_fast_install=yes
8434
[enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
8436
_LT_DECL([fast_install], [enable_fast_install], [0],
8437
[Whether or not to optimize for fast installation])dnl
8438
])# _LT_ENABLE_FAST_INSTALL
8440
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
8441
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
8444
AU_DEFUN([AC_ENABLE_FAST_INSTALL],
8445
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
8446
AC_DIAGNOSE([obsolete],
8447
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
8448
the `fast-install' option into LT_INIT's first parameter.])
8451
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
8452
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
8453
AC_DIAGNOSE([obsolete],
8454
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
8455
the `disable-fast-install' option into LT_INIT's first parameter.])
8458
dnl aclocal-1.4 backwards compatibility:
8459
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
8460
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
8463
# _LT_WITH_PIC([MODE])
8464
# --------------------
8465
# implement the --with-pic flag, and support the `pic-only' and `no-pic'
8467
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
8468
m4_define([_LT_WITH_PIC],
8470
[AS_HELP_STRING([--with-pic],
8471
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
8472
[pic_mode="$withval"],
8475
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
8477
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
8480
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
8481
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
8484
AU_DEFUN([AC_LIBTOOL_PICMODE],
8485
[_LT_SET_OPTION([LT_INIT], [pic-only])
8486
AC_DIAGNOSE([obsolete],
8487
[$0: Remove this warning and the call to _LT_SET_OPTION when you
8488
put the `pic-only' option into LT_INIT's first parameter.])
8491
dnl aclocal-1.4 backwards compatibility:
8492
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
8495
m4_define([_LTDL_MODE], [])
8496
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
8497
[m4_define([_LTDL_MODE], [nonrecursive])])
8498
LT_OPTION_DEFINE([LTDL_INIT], [recursive],
8499
[m4_define([_LTDL_MODE], [recursive])])
8500
LT_OPTION_DEFINE([LTDL_INIT], [subproject],
8501
[m4_define([_LTDL_MODE], [subproject])])
8503
m4_define([_LTDL_TYPE], [])
8504
LT_OPTION_DEFINE([LTDL_INIT], [installable],
8505
[m4_define([_LTDL_TYPE], [installable])])
8506
LT_OPTION_DEFINE([LTDL_INIT], [convenience],
8507
[m4_define([_LTDL_TYPE], [convenience])])
8509
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
8511
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
8512
# Written by Gary V. Vaughan, 2004
8514
# This file is free software; the Free Software Foundation gives
8515
# unlimited permission to copy and/or distribute it, with or without
8516
# modifications, as long as this notice is preserved.
8518
# serial 6 ltsugar.m4
8520
# This is to help aclocal find these macros, as it can't see m4_define.
8521
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
8524
# lt_join(SEP, ARG1, [ARG2...])
8525
# -----------------------------
8526
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
8527
# associated separator.
8528
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
8529
# versions in m4sugar had bugs.
8530
m4_define([lt_join],
8531
[m4_if([$#], [1], [],
8533
[m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
8534
m4_define([_lt_join],
8535
[m4_if([$#$2], [2], [],
8536
[m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
8542
# Manipulate m4 lists.
8543
# These macros are necessary as long as will still need to support
8544
# Autoconf-2.59 which quotes differently.
8545
m4_define([lt_car], [[$1]])
8547
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
8549
[m4_dquote(m4_shift($@))])])
8550
m4_define([lt_unquote], $1)
8553
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
8554
# ------------------------------------------
8555
# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
8556
# Note that neither SEPARATOR nor STRING are expanded; they are appended
8557
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
8558
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
8559
# than defined and empty).
8561
# This macro is needed until we can rely on Autoconf 2.62, since earlier
8562
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
8563
m4_define([lt_append],
8565
m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
8569
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
8570
# ----------------------------------------------------------
8571
# Produce a SEP delimited list of all paired combinations of elements of
8572
# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
8573
# has the form PREFIXmINFIXSUFFIXn.
8574
# Needed until we can rely on m4_combine added in Autoconf 2.62.
8575
m4_define([lt_combine],
8576
[m4_if(m4_eval([$# > 3]), [1],
8577
[m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
8578
[[m4_foreach([_Lt_prefix], [$2],
8579
[m4_foreach([_Lt_suffix],
8580
]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
8581
[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
8584
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
8585
# -----------------------------------------------------------------------
8586
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
8587
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
8588
m4_define([lt_if_append_uniq],
8590
[m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
8591
[lt_append([$1], [$2], [$3])$4],
8593
[lt_append([$1], [$2], [$3])$4])])
8596
# lt_dict_add(DICT, KEY, VALUE)
8597
# -----------------------------
8598
m4_define([lt_dict_add],
8599
[m4_define([$1($2)], [$3])])
8602
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
8603
# --------------------------------------------
8604
m4_define([lt_dict_add_subkey],
8605
[m4_define([$1($2:$3)], [$4])])
8608
# lt_dict_fetch(DICT, KEY, [SUBKEY])
8609
# ----------------------------------
8610
m4_define([lt_dict_fetch],
8612
m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
8613
m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
8616
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
8617
# -----------------------------------------------------------------
8618
m4_define([lt_if_dict_fetch],
8619
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
8624
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
8625
# --------------------------------------------------------------
8626
m4_define([lt_dict_filter],
8627
[m4_if([$5], [], [],
8628
[lt_join(m4_quote(m4_default([$4], [[, ]])),
8629
lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
8630
[lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
8633
# ltversion.m4 -- version numbers -*- Autoconf -*-
8635
# Copyright (C) 2004 Free Software Foundation, Inc.
8636
# Written by Scott James Remnant, 2004
8638
# This file is free software; the Free Software Foundation gives
8639
# unlimited permission to copy and/or distribute it, with or without
8640
# modifications, as long as this notice is preserved.
8642
# Generated from ltversion.in.
8644
# serial 3017 ltversion.m4
8645
# This file is part of GNU Libtool
8647
m4_define([LT_PACKAGE_VERSION], [2.2.6b])
8648
m4_define([LT_PACKAGE_REVISION], [1.3017])
8650
AC_DEFUN([LTVERSION_VERSION],
8651
[macro_version='2.2.6b'
8652
macro_revision='1.3017'
8653
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
8654
_LT_DECL(, macro_revision, 0)
8657
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
8659
# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
8660
# Written by Scott James Remnant, 2004.
8662
# This file is free software; the Free Software Foundation gives
8663
# unlimited permission to copy and/or distribute it, with or without
8664
# modifications, as long as this notice is preserved.
8666
# serial 4 lt~obsolete.m4
8668
# These exist entirely to fool aclocal when bootstrapping libtool.
8670
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
8671
# which have later been changed to m4_define as they aren't part of the
8672
# exported API, or moved to Autoconf or Automake where they belong.
8674
# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
8675
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
8676
# using a macro with the same name in our local m4/libtool.m4 it'll
8677
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
8678
# and doesn't know about Autoconf macros at all.)
8680
# So we provide this file, which has a silly filename so it's always
8681
# included after everything else. This provides aclocal with the
8682
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
8683
# because those macros already exist, or will be overwritten later.
8684
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
8686
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
8687
# Yes, that means every name once taken will need to remain here until
8688
# we give up compatibility with versions before 1.7, at which point
8689
# we need to keep only those names which we still refer to.
8691
# This is to help aclocal find these macros, as it can't see m4_define.
8692
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
8694
m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
8695
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
8696
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
8697
m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
8698
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
8699
m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
8700
m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
8701
m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
8702
m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
8703
m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
8704
m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
8705
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
8706
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
8707
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
8708
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
8709
m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
8710
m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
8711
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
8712
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
8713
m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
8714
m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
8715
m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
8716
m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
8717
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
8718
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
8719
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
8720
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
8721
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
8722
m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
8723
m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
8724
m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
8725
m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
8726
m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
8727
m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
8728
m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
8729
m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
8730
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
8731
m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
8732
m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
8733
m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
8734
m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
8735
m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
8736
m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])])
8737
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
8738
m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
8739
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
8740
m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
8741
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
8742
m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
8743
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
8744
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
8745
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
8746
m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
8747
m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
8748
m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
8750
# nls.m4 serial 3 (gettext-0.15)
8751
dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
8752
dnl This file is free software; the Free Software Foundation
8753
dnl gives unlimited permission to copy and/or distribute it,
8754
dnl with or without modifications, as long as this notice is preserved.
8756
dnl This file can can be used in projects which are not available under
8757
dnl the GNU General Public License or the GNU Library General Public
8758
dnl License but which still want to provide support for the GNU gettext
8760
dnl Please note that the actual code of the GNU gettext library is covered
8761
dnl by the GNU Library General Public License, and the rest of the GNU
8762
dnl gettext package package is covered by the GNU General Public License.
8763
dnl They are *not* in the public domain.
8766
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
8767
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
8773
AC_MSG_CHECKING([whether NLS is requested])
8774
dnl Default is enabled NLS
8776
[ --disable-nls do not use Native Language Support],
8777
USE_NLS=$enableval, USE_NLS=yes)
8778
AC_MSG_RESULT($USE_NLS)
8782
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
8784
# Copyright Ā© 2004 Scott James Remnant <scott@netsplit.com>.
8786
# This program is free software; you can redistribute it and/or modify
8787
# it under the terms of the GNU General Public License as published by
8788
# the Free Software Foundation; either version 2 of the License, or
8789
# (at your option) any later version.
8791
# This program is distributed in the hope that it will be useful, but
8792
# WITHOUT ANY WARRANTY; without even the implied warranty of
8793
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
8794
# General Public License for more details.
8796
# You should have received a copy of the GNU General Public License
8797
# along with this program; if not, write to the Free Software
8798
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
8800
# As a special exception to the GNU General Public License, if you
8801
# distribute this file as part of a program that contains a
8802
# configuration script generated by Autoconf, you may include it under
8803
# the same distribution terms that you use for the rest of that program.
8805
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
8806
# ----------------------------------
8807
AC_DEFUN([PKG_PROG_PKG_CONFIG],
8808
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
8809
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
8810
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
8811
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
8812
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
8814
if test -n "$PKG_CONFIG"; then
8815
_pkg_min_version=m4_default([$1], [0.9.0])
8816
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
8817
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
8818
AC_MSG_RESULT([yes])
8825
])# PKG_PROG_PKG_CONFIG
8827
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
8829
# Check to see whether a particular set of modules exists. Similar
8830
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
8833
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
8834
# this or PKG_CHECK_MODULES is called, or make sure to call
8835
# PKG_CHECK_EXISTS manually
8836
# --------------------------------------------------------------
8837
AC_DEFUN([PKG_CHECK_EXISTS],
8838
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8839
if test -n "$PKG_CONFIG" && \
8840
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
8841
m4_ifval([$2], [$2], [:])
8842
m4_ifvaln([$3], [else
8847
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
8848
# ---------------------------------------------
8849
m4_define([_PKG_CONFIG],
8850
[if test -n "$PKG_CONFIG"; then
8851
if test -n "$$1"; then
8854
PKG_CHECK_EXISTS([$3],
8855
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
8863
# _PKG_SHORT_ERRORS_SUPPORTED
8864
# -----------------------------
8865
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
8866
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
8867
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8868
_pkg_short_errors_supported=yes
8870
_pkg_short_errors_supported=no
8872
])# _PKG_SHORT_ERRORS_SUPPORTED
8875
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
8876
# [ACTION-IF-NOT-FOUND])
8879
# Note that if there is a possibility the first call to
8880
# PKG_CHECK_MODULES might not happen, you should be sure to include an
8881
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
8884
# --------------------------------------------------------------
8885
AC_DEFUN([PKG_CHECK_MODULES],
8886
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8887
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
8888
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
8891
AC_MSG_CHECKING([for $1])
8893
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
8894
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
8896
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
8897
and $1[]_LIBS to avoid the need to call pkg-config.
8898
See the pkg-config man page for more details.])
8900
if test $pkg_failed = yes; then
8901
_PKG_SHORT_ERRORS_SUPPORTED
8902
if test $_pkg_short_errors_supported = yes; then
8903
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
8905
$1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
8907
# Put the nasty error message in config.log where it belongs
8908
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
8910
ifelse([$4], , [AC_MSG_ERROR(dnl
8911
[Package requirements ($2) were not met:
8915
Consider adjusting the PKG_CONFIG_PATH environment variable if you
8916
installed software in a non-standard prefix.
8920
[AC_MSG_RESULT([no])
8922
elif test $pkg_failed = untried; then
8923
ifelse([$4], , [AC_MSG_FAILURE(dnl
8924
[The pkg-config script could not be found or is too old. Make sure it
8925
is in your PATH or set the PKG_CONFIG environment variable to the full
8930
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
8933
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
8934
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
8935
AC_MSG_RESULT([yes])
8936
ifelse([$3], , :, [$3])
8938
])# PKG_CHECK_MODULES
8940
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
8942
# This file is free software; the Free Software Foundation
8943
# gives unlimited permission to copy and/or distribute it,
8944
# with or without modifications, as long as this notice is preserved.
8946
# AM_AUTOMAKE_VERSION(VERSION)
8947
# ----------------------------
8948
# Automake X.Y traces this macro to ensure aclocal.m4 has been
8949
# generated from the m4 files accompanying Automake X.Y.
8950
# (This private macro should not be called outside this file.)
8951
AC_DEFUN([AM_AUTOMAKE_VERSION],
8952
[am__api_version='1.11'
8953
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
8954
dnl require some minimum version. Point them to the right macro.
8955
m4_if([$1], [1.11.1], [],
8956
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
8959
# _AM_AUTOCONF_VERSION(VERSION)
8960
# -----------------------------
8961
# aclocal traces this macro to find the Autoconf version.
8962
# This is a private macro too. Using m4_define simplifies
8963
# the logic in aclocal, which can simply ignore this definition.
8964
m4_define([_AM_AUTOCONF_VERSION], [])
8966
# AM_SET_CURRENT_AUTOMAKE_VERSION
8967
# -------------------------------
8968
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
8969
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
8970
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
8971
[AM_AUTOMAKE_VERSION([1.11.1])dnl
8972
m4_ifndef([AC_AUTOCONF_VERSION],
8973
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
8974
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
8976
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
8978
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
8980
# This file is free software; the Free Software Foundation
8981
# gives unlimited permission to copy and/or distribute it,
8982
# with or without modifications, as long as this notice is preserved.
8984
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
8985
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
8986
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
8988
# Of course, Automake must honor this variable whenever it calls a
8989
# tool from the auxiliary directory. The problem is that $srcdir (and
8990
# therefore $ac_aux_dir as well) can be either absolute or relative,
8991
# depending on how configure is run. This is pretty annoying, since
8992
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
8993
# source directory, any form will work fine, but in subdirectories a
8994
# relative path needs to be adjusted first.
8996
# $ac_aux_dir/missing
8997
# fails when called from a subdirectory if $ac_aux_dir is relative
8998
# $top_srcdir/$ac_aux_dir/missing
8999
# fails if $ac_aux_dir is absolute,
9000
# fails when called from a subdirectory in a VPATH build with
9001
# a relative $ac_aux_dir
9003
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
9004
# are both prefixed by $srcdir. In an in-source build this is usually
9005
# harmless because $srcdir is `.', but things will broke when you
9006
# start a VPATH build or use an absolute $srcdir.
9008
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
9009
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
9010
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
9011
# and then we would define $MISSING as
9012
# MISSING="\${SHELL} $am_aux_dir/missing"
9013
# This will work as long as MISSING is not called from configure, because
9014
# unfortunately $(top_srcdir) has no meaning in configure.
9015
# However there are other variables, like CC, which are often used in
9016
# configure, and could therefore not use this "fixed" $ac_aux_dir.
9018
# Another solution, used here, is to always expand $ac_aux_dir to an
9019
# absolute PATH. The drawback is that using absolute paths prevent a
9020
# configured tree to be moved without reconfiguration.
9022
AC_DEFUN([AM_AUX_DIR_EXPAND],
9023
[dnl Rely on autoconf to set up CDPATH properly.
9024
AC_PREREQ([2.50])dnl
9025
# expand $ac_aux_dir to an absolute path
9026
am_aux_dir=`cd $ac_aux_dir && pwd`
9029
# AM_CONDITIONAL -*- Autoconf -*-
9031
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
9032
# Free Software Foundation, Inc.
9034
# This file is free software; the Free Software Foundation
9035
# gives unlimited permission to copy and/or distribute it,
9036
# with or without modifications, as long as this notice is preserved.
9040
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
9041
# -------------------------------------
9042
# Define a conditional.
9043
AC_DEFUN([AM_CONDITIONAL],
9045
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
9046
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
9047
AC_SUBST([$1_TRUE])dnl
9048
AC_SUBST([$1_FALSE])dnl
9049
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
9050
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
9051
m4_define([_AM_COND_VALUE_$1], [$2])dnl
9059
AC_CONFIG_COMMANDS_PRE(
9060
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
9061
AC_MSG_ERROR([[conditional "$1" was never defined.
9062
Usually this means the macro was only invoked conditionally.]])
9065
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
9066
# Free Software Foundation, Inc.
9068
# This file is free software; the Free Software Foundation
9069
# gives unlimited permission to copy and/or distribute it,
9070
# with or without modifications, as long as this notice is preserved.
9074
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
9075
# written in clear, in which case automake, when reading aclocal.m4,
9076
# will think it sees a *use*, and therefore will trigger all it's
9077
# C support machinery. Also note that it means that autoscan, seeing
9078
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
9081
# _AM_DEPENDENCIES(NAME)
9082
# ----------------------
9083
# See how the compiler implements dependency checking.
9084
# NAME is "CC", "CXX", "GCJ", or "OBJC".
9085
# We try a few techniques and use that to set a single cache variable.
9087
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
9088
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
9089
# dependency, and given that the user is not expected to run this macro,
9090
# just rely on AC_PROG_CC.
9091
AC_DEFUN([_AM_DEPENDENCIES],
9092
[AC_REQUIRE([AM_SET_DEPDIR])dnl
9093
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
9094
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
9095
AC_REQUIRE([AM_DEP_TRACK])dnl
9097
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
9098
[$1], CXX, [depcc="$CXX" am_compiler_list=],
9099
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
9100
[$1], UPC, [depcc="$UPC" am_compiler_list=],
9101
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
9102
[depcc="$$1" am_compiler_list=])
9104
AC_CACHE_CHECK([dependency style of $depcc],
9105
[am_cv_$1_dependencies_compiler_type],
9106
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
9107
# We make a subdir and do the tests there. Otherwise we can end up
9108
# making bogus files that we don't know about and never remove. For
9109
# instance it was reported that on HP-UX the gcc test will end up
9110
# making a dummy file named `D' -- because `-MD' means `put the output
9113
# Copy depcomp to subdir because otherwise we won't find it if we're
9114
# using a relative directory.
9115
cp "$am_depcomp" conftest.dir
9117
# We will build objects and dependencies in a subdirectory because
9118
# it helps to detect inapplicable dependency modes. For instance
9119
# both Tru64's cc and ICC support -MD to output dependencies as a
9120
# side effect of compilation, but ICC will put the dependencies in
9121
# the current directory while Tru64 will put them in the object
9125
am_cv_$1_dependencies_compiler_type=none
9126
if test "$am_compiler_list" = ""; then
9127
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
9131
[case " $depcc " in #(
9132
*\ -arch\ *\ -arch\ *) am__universal=true ;;
9135
[case " $depcc " in #(
9136
*\ -arch\ *\ -arch\ *) am__universal=true ;;
9139
for depmode in $am_compiler_list; do
9140
# Setup a source with many dependencies, because some compilers
9141
# like to wrap large dependency lists on column 80 (with \), and
9142
# we should not choose a depcomp mode which is confused by this.
9144
# We need to recreate these files for each test, as the compiler may
9145
# overwrite some of them when testing with obscure command lines.
9146
# This happens at least with the AIX C compiler.
9148
for i in 1 2 3 4 5 6; do
9149
echo '#include "conftst'$i'.h"' >> sub/conftest.c
9150
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
9151
# Solaris 8's {/usr,}/bin/sh.
9152
touch sub/conftst$i.h
9154
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
9156
# We check with `-c' and `-o' for the sake of the "dashmstdout"
9157
# mode. It turns out that the SunPro C++ compiler does not properly
9158
# handle `-M -o', and we need to detect this. Also, some Intel
9159
# versions had trouble with output in subdirs
9160
am__obj=sub/conftest.${OBJEXT-o}
9161
am__minus_obj="-o $am__obj"
9164
# This depmode causes a compiler race in universal mode.
9165
test "$am__universal" = false || continue
9168
# after this tag, mechanisms are not by side-effect, so they'll
9169
# only be used when explicitly requested
9170
if test "x$enable_dependency_tracking" = xyes; then
9176
msvisualcpp | msvcmsys)
9177
# This compiler won't grok `-c -o', but also, the minuso test has
9178
# not run yet. These depmodes are late enough in the game, and
9179
# so weak that their functioning should not be impacted.
9180
am__obj=conftest.${OBJEXT-o}
9185
if depmode=$depmode \
9186
source=sub/conftest.c object=$am__obj \
9187
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
9188
$SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
9189
>/dev/null 2>conftest.err &&
9190
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
9191
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
9192
grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
9193
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
9194
# icc doesn't choke on unknown options, it will just issue warnings
9195
# or remarks (even with -Werror). So we grep stderr for any message
9196
# that says an option was ignored or not supported.
9197
# When given -MP, icc 7.0 and 7.1 complain thusly:
9198
# icc: Command line warning: ignoring option '-M'; no argument required
9199
# The diagnosis changed in icc 8.0:
9200
# icc: Command line remark: option '-MP' not supported
9201
if (grep 'ignoring option' conftest.err ||
9202
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
9203
am_cv_$1_dependencies_compiler_type=$depmode
9212
am_cv_$1_dependencies_compiler_type=none
9215
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
9216
AM_CONDITIONAL([am__fastdep$1], [
9217
test "x$enable_dependency_tracking" != xno \
9218
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
9224
# Choose a directory name for dependency files.
9225
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
9226
AC_DEFUN([AM_SET_DEPDIR],
9227
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9228
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
9234
AC_DEFUN([AM_DEP_TRACK],
9235
[AC_ARG_ENABLE(dependency-tracking,
9236
[ --disable-dependency-tracking speeds up one-time build
9237
--enable-dependency-tracking do not reject slow dependency extractors])
9238
if test "x$enable_dependency_tracking" != xno; then
9239
am_depcomp="$ac_aux_dir/depcomp"
9242
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
9243
AC_SUBST([AMDEPBACKSLASH])dnl
9244
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
9247
# Generate code to set up dependency tracking. -*- Autoconf -*-
9249
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
9250
# Free Software Foundation, Inc.
9252
# This file is free software; the Free Software Foundation
9253
# gives unlimited permission to copy and/or distribute it,
9254
# with or without modifications, as long as this notice is preserved.
9258
# _AM_OUTPUT_DEPENDENCY_COMMANDS
9259
# ------------------------------
9260
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
9262
# Autoconf 2.62 quotes --file arguments for eval, but not when files
9263
# are listed without --file. Let's play safe and only enable the eval
9264
# if we detect the quoting.
9265
case $CONFIG_FILES in
9266
*\'*) eval set x "$CONFIG_FILES" ;;
9267
*) set x $CONFIG_FILES ;;
9272
# Strip MF so we end up with the name of the file.
9273
mf=`echo "$mf" | sed -e 's/:.*$//'`
9274
# Check whether this is an Automake generated Makefile or not.
9275
# We used to match only the files named `Makefile.in', but
9276
# some people rename them; so instead we look at the file content.
9277
# Grep'ing the first line is not enough: some people post-process
9278
# each Makefile.in and add a new line on top of each file to say so.
9279
# Grep'ing the whole file is not good either: AIX grep has a line
9280
# limit of 2048, but all sed's we know have understand at least 4000.
9281
if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
9282
dirpart=`AS_DIRNAME("$mf")`
9286
# Extract the definition of DEPDIR, am__include, and am__quote
9287
# from the Makefile without running `make'.
9288
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
9289
test -z "$DEPDIR" && continue
9290
am__include=`sed -n 's/^am__include = //p' < "$mf"`
9291
test -z "am__include" && continue
9292
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
9293
# When using ansi2knr, U may be empty or an underscore; expand it
9294
U=`sed -n 's/^U = //p' < "$mf"`
9295
# Find all dependency output files, they are included files with
9296
# $(DEPDIR) in their names. We invoke sed twice because it is the
9297
# simplest approach to changing $(DEPDIR) to its actual value in the
9299
for file in `sed -n "
9300
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
9301
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
9302
# Make sure the directory exists.
9303
test -f "$dirpart/$file" && continue
9304
fdir=`AS_DIRNAME(["$file"])`
9305
AS_MKDIR_P([$dirpart/$fdir])
9306
# echo "creating $dirpart/$file"
9307
echo '# dummy' > "$dirpart/$file"
9311
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
9314
# AM_OUTPUT_DEPENDENCY_COMMANDS
9315
# -----------------------------
9316
# This macro should only be invoked once -- use via AC_REQUIRE.
9318
# This code is only required when automatic dependency tracking
9319
# is enabled. FIXME. This creates each `.P' file that we will
9320
# need in order to bootstrap the dependency handling code.
9321
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
9322
[AC_CONFIG_COMMANDS([depfiles],
9323
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
9324
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
9327
# Do all the work for Automake. -*- Autoconf -*-
9329
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
9330
# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
9332
# This file is free software; the Free Software Foundation
9333
# gives unlimited permission to copy and/or distribute it,
9334
# with or without modifications, as long as this notice is preserved.
9338
# This macro actually does too much. Some checks are only needed if
9339
# your package does certain things. But this isn't really a big deal.
9341
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
9342
# AM_INIT_AUTOMAKE([OPTIONS])
9343
# -----------------------------------------------
9344
# The call with PACKAGE and VERSION arguments is the old style
9345
# call (pre autoconf-2.50), which is being phased out. PACKAGE
9346
# and VERSION should now be passed to AC_INIT and removed from
9347
# the call to AM_INIT_AUTOMAKE.
9348
# We support both call styles for the transition. After
9349
# the next Automake release, Autoconf can make the AC_INIT
9350
# arguments mandatory, and then we can depend on a new Autoconf
9351
# release and drop the old call support.
9352
AC_DEFUN([AM_INIT_AUTOMAKE],
9353
[AC_PREREQ([2.62])dnl
9354
dnl Autoconf wants to disallow AM_ names. We explicitly allow
9355
dnl the ones we care about.
9356
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
9357
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
9358
AC_REQUIRE([AC_PROG_INSTALL])dnl
9359
if test "`cd $srcdir && pwd`" != "`pwd`"; then
9360
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output
9361
# is not polluted with repeated "-I."
9362
AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
9363
# test to see if srcdir already configured
9364
if test -f $srcdir/config.status; then
9365
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
9369
# test whether we have cygpath
9370
if test -z "$CYGPATH_W"; then
9371
if (cygpath --version) >/dev/null 2>/dev/null; then
9372
CYGPATH_W='cygpath -w'
9377
AC_SUBST([CYGPATH_W])
9379
# Define the identity of the package.
9380
dnl Distinguish between old-style and new-style calls.
9382
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
9383
AC_SUBST([PACKAGE], [$1])dnl
9384
AC_SUBST([VERSION], [$2])],
9385
[_AM_SET_OPTIONS([$1])dnl
9386
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
9387
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
9388
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
9389
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
9390
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
9392
_AM_IF_OPTION([no-define],,
9393
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
9394
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
9396
# Some tools Automake needs.
9397
AC_REQUIRE([AM_SANITY_CHECK])dnl
9398
AC_REQUIRE([AC_ARG_PROGRAM])dnl
9399
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
9400
AM_MISSING_PROG(AUTOCONF, autoconf)
9401
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
9402
AM_MISSING_PROG(AUTOHEADER, autoheader)
9403
AM_MISSING_PROG(MAKEINFO, makeinfo)
9404
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9405
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
9406
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
9407
# We need awk for the "check" target. The system "awk" is bad on
9409
AC_REQUIRE([AC_PROG_AWK])dnl
9410
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
9411
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9412
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
9413
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
9414
[_AM_PROG_TAR([v7])])])
9415
_AM_IF_OPTION([no-dependencies],,
9416
[AC_PROVIDE_IFELSE([AC_PROG_CC],
9417
[_AM_DEPENDENCIES(CC)],
9418
[define([AC_PROG_CC],
9419
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
9420
AC_PROVIDE_IFELSE([AC_PROG_CXX],
9421
[_AM_DEPENDENCIES(CXX)],
9422
[define([AC_PROG_CXX],
9423
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
9424
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
9425
[_AM_DEPENDENCIES(OBJC)],
9426
[define([AC_PROG_OBJC],
9427
defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
9429
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
9430
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
9431
dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
9432
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
9433
AC_CONFIG_COMMANDS_PRE(dnl
9434
[m4_provide_if([_AM_COMPILER_EXEEXT],
9435
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
9438
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
9439
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
9440
dnl mangled by Autoconf and run in a shell conditional statement.
9441
m4_define([_AC_COMPILER_EXEEXT],
9442
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
9445
# When config.status generates a header, we must update the stamp-h file.
9446
# This file resides in the same directory as the config header
9447
# that is generated. The stamp files are numbered to have different names.
9449
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
9450
# loop where config.status creates the headers, so we can generate
9451
# our stamp files there.
9452
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
9453
[# Compute $1's index in $config_headers.
9456
for _am_header in $config_headers :; do
9458
$_am_arg | $_am_arg:* )
9461
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
9464
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
9466
# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
9468
# This file is free software; the Free Software Foundation
9469
# gives unlimited permission to copy and/or distribute it,
9470
# with or without modifications, as long as this notice is preserved.
9472
# AM_PROG_INSTALL_SH
9473
# ------------------
9474
# Define $install_sh.
9475
AC_DEFUN([AM_PROG_INSTALL_SH],
9476
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9477
if test x"${install_sh}" != xset; then
9480
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
9482
install_sh="\${SHELL} $am_aux_dir/install-sh"
9485
AC_SUBST(install_sh)])
9487
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
9489
# This file is free software; the Free Software Foundation
9490
# gives unlimited permission to copy and/or distribute it,
9491
# with or without modifications, as long as this notice is preserved.
9495
# Check whether the underlying file-system supports filenames
9496
# with a leading dot. For instance MS-DOS doesn't.
9497
AC_DEFUN([AM_SET_LEADING_DOT],
9498
[rm -rf .tst 2>/dev/null
9499
mkdir .tst 2>/dev/null
9500
if test -d .tst; then
9505
rmdir .tst 2>/dev/null
9506
AC_SUBST([am__leading_dot])])
9508
# Check to see how 'make' treats includes. -*- Autoconf -*-
9510
# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
9512
# This file is free software; the Free Software Foundation
9513
# gives unlimited permission to copy and/or distribute it,
9514
# with or without modifications, as long as this notice is preserved.
9520
# Check to see how make treats includes.
9521
AC_DEFUN([AM_MAKE_INCLUDE],
9522
[am_make=${MAKE-make}
9523
cat > confinc << 'END'
9525
@echo this is the am__doit target
9528
# If we don't find an include directive, just comment out the code.
9529
AC_MSG_CHECKING([for style of include used by $am_make])
9533
# First try GNU make style include.
9534
echo "include confinc" > confmf
9535
# Ignore all kinds of additional output from `make'.
9536
case `$am_make -s -f confmf 2> /dev/null` in #(
9537
*the\ am__doit\ target*)
9543
# Now try BSD make style include.
9544
if test "$am__include" = "#"; then
9545
echo '.include "confinc"' > confmf
9546
case `$am_make -s -f confmf 2> /dev/null` in #(
9547
*the\ am__doit\ target*)
9548
am__include=.include
9554
AC_SUBST([am__include])
9555
AC_SUBST([am__quote])
9556
AC_MSG_RESULT([$_am_result])
9557
rm -f confinc confmf
9560
# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
9561
# Free Software Foundation, Inc.
9563
# This file is free software; the Free Software Foundation
9564
# gives unlimited permission to copy and/or distribute it,
9565
# with or without modifications, as long as this notice is preserved.
9571
# Like AC_PROG_CC_C_O, but changed for automake.
9572
AC_DEFUN([AM_PROG_CC_C_O],
9573
[AC_REQUIRE([AC_PROG_CC_C_O])dnl
9574
AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9575
AC_REQUIRE_AUX_FILE([compile])dnl
9576
# FIXME: we rely on the cache variable name because
9577
# there is no other way.
9579
am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
9580
eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
9581
if test "$am_t" != yes; then
9582
# Losing compiler, so override with the script.
9583
# FIXME: It is wrong to rewrite CC.
9584
# But if we don't then we get into trouble of one sort or another.
9585
# A longer-term fix would be to have automake use am__CC in this case,
9586
# and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
9587
CC="$am_aux_dir/compile $CC"
9589
dnl Make sure AC_PROG_CC is never called again, or it will override our
9591
m4_define([AC_PROG_CC],
9592
[m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
9595
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
9597
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
9598
# Free Software Foundation, Inc.
9600
# This file is free software; the Free Software Foundation
9601
# gives unlimited permission to copy and/or distribute it,
9602
# with or without modifications, as long as this notice is preserved.
9606
# AM_MISSING_PROG(NAME, PROGRAM)
9607
# ------------------------------
9608
AC_DEFUN([AM_MISSING_PROG],
9609
[AC_REQUIRE([AM_MISSING_HAS_RUN])
9610
$1=${$1-"${am_missing_run}$2"}
9614
# AM_MISSING_HAS_RUN
9615
# ------------------
9616
# Define MISSING if not defined so far and test if it supports --run.
9617
# If it does, set am_missing_run to use it, otherwise, to nothing.
9618
AC_DEFUN([AM_MISSING_HAS_RUN],
9619
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9620
AC_REQUIRE_AUX_FILE([missing])dnl
9621
if test x"${MISSING+set}" != xset; then
9624
MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
9626
MISSING="\${SHELL} $am_aux_dir/missing" ;;
9629
# Use eval to expand $SHELL
9630
if eval "$MISSING --run true"; then
9631
am_missing_run="$MISSING --run "
9634
AC_MSG_WARN([`missing' script is too old or missing])
9638
# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
9640
# This file is free software; the Free Software Foundation
9641
# gives unlimited permission to copy and/or distribute it,
9642
# with or without modifications, as long as this notice is preserved.
9646
# Check for `mkdir -p'.
9647
AC_DEFUN([AM_PROG_MKDIR_P],
9648
[AC_PREREQ([2.60])dnl
9649
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
9650
dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
9651
dnl while keeping a definition of mkdir_p for backward compatibility.
9652
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
9653
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
9654
dnl Makefile.ins that do not define MKDIR_P, so we do our own
9655
dnl adjustment using top_builddir (which is defined more often than
9657
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
9659
[[\\/$]]* | ?:[[\\/]]*) ;;
9660
*/*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
9664
# Helper functions for option handling. -*- Autoconf -*-
9666
# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
9668
# This file is free software; the Free Software Foundation
9669
# gives unlimited permission to copy and/or distribute it,
9670
# with or without modifications, as long as this notice is preserved.
9674
# _AM_MANGLE_OPTION(NAME)
9675
# -----------------------
9676
AC_DEFUN([_AM_MANGLE_OPTION],
9677
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
9679
# _AM_SET_OPTION(NAME)
9680
# ------------------------------
9681
# Set option NAME. Presently that only means defining a flag for this option.
9682
AC_DEFUN([_AM_SET_OPTION],
9683
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
9685
# _AM_SET_OPTIONS(OPTIONS)
9686
# ----------------------------------
9687
# OPTIONS is a space-separated list of Automake options.
9688
AC_DEFUN([_AM_SET_OPTIONS],
9689
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
9691
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
9692
# -------------------------------------------
9693
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9694
AC_DEFUN([_AM_IF_OPTION],
9695
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
9697
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
9699
# This file is free software; the Free Software Foundation
9700
# gives unlimited permission to copy and/or distribute it,
9701
# with or without modifications, as long as this notice is preserved.
9703
# AM_RUN_LOG(COMMAND)
9704
# -------------------
9705
# Run COMMAND, save the exit status in ac_status, and log it.
9706
# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
9707
AC_DEFUN([AM_RUN_LOG],
9708
[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
9709
($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
9711
echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
9712
(exit $ac_status); }])
9714
# Check to make sure that the build environment is sane. -*- Autoconf -*-
9716
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
9717
# Free Software Foundation, Inc.
9719
# This file is free software; the Free Software Foundation
9720
# gives unlimited permission to copy and/or distribute it,
9721
# with or without modifications, as long as this notice is preserved.
9727
AC_DEFUN([AM_SANITY_CHECK],
9728
[AC_MSG_CHECKING([whether build environment is sane])
9731
echo timestamp > conftest.file
9732
# Reject unsafe characters in $srcdir or the absolute working directory
9733
# name. Accept space and tab only in the latter.
9737
*[[\\\"\#\$\&\'\`$am_lf]]*)
9738
AC_MSG_ERROR([unsafe absolute working directory name]);;
9741
*[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
9742
AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
9745
# Do `set' in a subshell so we don't clobber the current shell's
9746
# arguments. Must try -L first in case configure is actually a
9747
# symlink; some systems play weird games with the mod time of symlinks
9748
# (eg FreeBSD returns the mod time of the symlink's containing
9751
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
9752
if test "$[*]" = "X"; then
9754
set X `ls -t "$srcdir/configure" conftest.file`
9757
if test "$[*]" != "X $srcdir/configure conftest.file" \
9758
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
9760
# If neither matched, then we have a broken ls. This can happen
9761
# if, for instance, CONFIG_SHELL is bash and it inherits a
9762
# broken ls alias from the environment. This has actually
9763
# happened. Such a system could not be considered "sane".
9764
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
9765
alias in your environment])
9768
test "$[2]" = conftest.file
9774
AC_MSG_ERROR([newly created file is older than distributed files!
9775
Check your system clock])
9777
AC_MSG_RESULT(yes)])
9779
# Copyright (C) 2009 Free Software Foundation, Inc.
9781
# This file is free software; the Free Software Foundation
9782
# gives unlimited permission to copy and/or distribute it,
9783
# with or without modifications, as long as this notice is preserved.
9787
# AM_SILENT_RULES([DEFAULT])
9788
# --------------------------
9789
# Enable less verbose build rules; with the default set to DEFAULT
9790
# (`yes' being less verbose, `no' or empty being verbose).
9791
AC_DEFUN([AM_SILENT_RULES],
9792
[AC_ARG_ENABLE([silent-rules],
9793
[ --enable-silent-rules less verbose build output (undo: `make V=1')
9794
--disable-silent-rules verbose build output (undo: `make V=0')])
9795
case $enable_silent_rules in
9796
yes) AM_DEFAULT_VERBOSITY=0;;
9797
no) AM_DEFAULT_VERBOSITY=1;;
9798
*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
9800
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
9802
AC_SUBST([AM_BACKSLASH])dnl
9803
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
9806
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
9808
# This file is free software; the Free Software Foundation
9809
# gives unlimited permission to copy and/or distribute it,
9810
# with or without modifications, as long as this notice is preserved.
9812
# AM_PROG_INSTALL_STRIP
9813
# ---------------------
9814
# One issue with vendor `install' (even GNU) is that you can't
9815
# specify the program used to strip binaries. This is especially
9816
# annoying in cross-compiling environments, where the build's strip
9817
# is unlikely to handle the host's binaries.
9818
# Fortunately install-sh will honor a STRIPPROG variable, so we
9819
# always use install-sh in `make install-strip', and initialize
9820
# STRIPPROG with the value of the STRIP variable (set by the user).
9821
AC_DEFUN([AM_PROG_INSTALL_STRIP],
9822
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9823
# Installed binaries are usually stripped using `strip' when the user
9824
# run `make install-strip'. However `strip' might not be the right
9825
# tool to use in cross-compilation environments, therefore Automake
9826
# will honor the `STRIP' environment variable to overrule this program.
9827
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
9828
if test "$cross_compiling" != no; then
9829
AC_CHECK_TOOL([STRIP], [strip], :)
9831
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
9832
AC_SUBST([INSTALL_STRIP_PROGRAM])])
9834
# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
9836
# This file is free software; the Free Software Foundation
9837
# gives unlimited permission to copy and/or distribute it,
9838
# with or without modifications, as long as this notice is preserved.
9842
# _AM_SUBST_NOTMAKE(VARIABLE)
9843
# ---------------------------
9844
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
9845
# This macro is traced by Automake.
9846
AC_DEFUN([_AM_SUBST_NOTMAKE])
9848
# AM_SUBST_NOTMAKE(VARIABLE)
9849
# ---------------------------
9850
# Public sister of _AM_SUBST_NOTMAKE.
9851
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
9853
# Check how to create a tarball. -*- Autoconf -*-
9855
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
9857
# This file is free software; the Free Software Foundation
9858
# gives unlimited permission to copy and/or distribute it,
9859
# with or without modifications, as long as this notice is preserved.
9863
# _AM_PROG_TAR(FORMAT)
9864
# --------------------
9865
# Check how to create a tarball in format FORMAT.
9866
# FORMAT should be one of `v7', `ustar', or `pax'.
9868
# Substitute a variable $(am__tar) that is a command
9869
# writing to stdout a FORMAT-tarball containing the directory
9871
# tardir=directory && $(am__tar) > result.tar
9873
# Substitute a variable $(am__untar) that extract such
9874
# a tarball read from stdin.
9875
# $(am__untar) < result.tar
9876
AC_DEFUN([_AM_PROG_TAR],
9877
[# Always define AMTAR for backward compatibility.
9878
AM_MISSING_PROG([AMTAR], [tar])
9880
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
9881
[m4_case([$1], [ustar],, [pax],,
9882
[m4_fatal([Unknown tar format])])
9883
AC_MSG_CHECKING([how to create a $1 tar archive])
9884
# Loop over all known methods to create a tar archive until one works.
9885
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
9886
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
9887
# Do not fold the above two line into one, because Tru64 sh and
9888
# Solaris sh will not grok spaces in the rhs of `-'.
9889
for _am_tool in $_am_tools
9893
for _am_tar in tar gnutar gtar;
9895
AM_RUN_LOG([$_am_tar --version]) && break
9897
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
9898
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
9899
am__untar="$_am_tar -xf -"
9902
# Must skip GNU tar: if it does not support --format= it doesn't create
9903
# ustar tarball either.
9904
(tar --version) >/dev/null 2>&1 && continue
9905
am__tar='tar chf - "$$tardir"'
9906
am__tar_='tar chf - "$tardir"'
9907
am__untar='tar xf -'
9910
am__tar='pax -L -x $1 -w "$$tardir"'
9911
am__tar_='pax -L -x $1 -w "$tardir"'
9915
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
9916
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
9917
am__untar='cpio -i -H $1 -d'
9926
# If the value was cached, stop now. We just wanted to have am__tar
9927
# and am__untar set.
9928
test -n "${am_cv_prog_tar_$1}" && break
9930
# tar/untar a dummy directory, and stop if the command works
9933
echo GrepMe > conftest.dir/file
9934
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
9936
if test -s conftest.tar; then
9937
AM_RUN_LOG([$am__untar <conftest.tar])
9938
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
9943
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
9944
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
9946
AC_SUBST([am__untar])