1
# generated automatically by aclocal 1.11 -*- 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.64],,
17
[m4_warning([this file was generated for autoconf 2.64.
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'.])])
23
dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas
24
dnl (i.e. pass to gconftool-2
25
dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where
26
dnl you should install foo.schemas files
29
AC_DEFUN([AM_GCONF_SOURCE_2],
31
if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
32
GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source`
34
GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE
37
AC_ARG_WITH([gconf-source],
38
AC_HELP_STRING([--with-gconf-source=sourceaddress],
39
[Config database for installing schema files.]),
40
[GCONF_SCHEMA_CONFIG_SOURCE="$withval"],)
42
AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE)
43
AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation])
45
if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then
46
GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas'
49
AC_ARG_WITH([gconf-schema-file-dir],
50
AC_HELP_STRING([--with-gconf-schema-file-dir=dir],
51
[Directory for installing schema files.]),
52
[GCONF_SCHEMA_FILE_DIR="$withval"],)
54
AC_SUBST(GCONF_SCHEMA_FILE_DIR)
55
AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files])
57
AC_ARG_ENABLE(schemas-install,
58
AC_HELP_STRING([--disable-schemas-install],
59
[Disable the schemas installation]),
62
*) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-install]) ;;
64
AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL], [test "$enable_schemas_install" != no])
67
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
68
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
70
# This file is free software, distributed under the terms of the GNU
71
# General Public License. As a special exception to the GNU General
72
# Public License, this file may be distributed as part of a program
73
# that contains a configuration script generated by Autoconf, under
74
# the same distribution terms as the rest of that program.
76
# This file can be copied and used freely without restrictions. It can
77
# be used in projects which are not available under the GNU Public License
78
# but which still want to provide support for the GNU gettext functionality.
80
# Macro to add for using GNU gettext.
81
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
83
# Modified to never use included libintl.
84
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
86
# Major rework to remove unused code
87
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
89
# Added better handling of ALL_LINGUAS from GNU gettext version
90
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
92
# Modified to require ngettext
93
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
95
# We need this here as well, since someone might use autoconf-2.5x
96
# to configure GLib then an older version to configure a package
97
# using AM_GLIB_GNU_GETTEXT
101
dnl We go to great lengths to make sure that aclocal won't
102
dnl try to pull in the installed version of these macros
103
dnl when running aclocal in the glib directory.
105
m4_copy([AC_DEFUN],[glib_DEFUN])
106
m4_copy([AC_REQUIRE],[glib_REQUIRE])
108
dnl At the end, if we're not within glib, we'll define the public
109
dnl definitions in terms of our private definitions.
113
#--------------------
114
glib_DEFUN([GLIB_LC_MESSAGES],
115
[AC_CHECK_HEADERS([locale.h])
116
if test $ac_cv_header_locale_h = yes; then
117
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
118
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
119
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
120
if test $am_cv_val_LC_MESSAGES = yes; then
121
AC_DEFINE(HAVE_LC_MESSAGES, 1,
122
[Define if your <locale.h> file defines LC_MESSAGES.])
126
# GLIB_PATH_PROG_WITH_TEST
127
#----------------------------
128
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
129
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
130
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
131
[# Extract the first word of "$2", so it can be a program name with args.
132
set dummy $2; ac_word=[$]2
133
AC_MSG_CHECKING([for $ac_word])
134
AC_CACHE_VAL(ac_cv_path_$1,
137
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
140
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
141
for ac_dir in ifelse([$5], , $PATH, [$5]); do
142
test -z "$ac_dir" && ac_dir=.
143
if test -f $ac_dir/$ac_word; then
145
ac_cv_path_$1="$ac_dir/$ac_word"
151
dnl If no 4th arg is given, leave the cache variable unset,
152
dnl so AC_PATH_PROGS will keep looking.
153
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
158
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
168
glib_DEFUN([GLIB_WITH_NLS],
169
dnl NLS is obligatory
173
gt_cv_have_gettext=no
179
AC_CHECK_HEADER(libintl.h,
180
[gt_cv_func_dgettext_libintl="no"
181
libintl_extra_libs=""
184
# First check in libc
186
AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
190
[return !ngettext ("","", 1)],
191
gt_cv_func_ngettext_libc=yes,
192
gt_cv_func_ngettext_libc=no)
195
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
196
AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
200
[return !dgettext ("","")],
201
gt_cv_func_dgettext_libc=yes,
202
gt_cv_func_dgettext_libc=no)
206
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
207
AC_CHECK_FUNCS(bind_textdomain_codeset)
211
# If we don't have everything we want, check in libintl
213
if test "$gt_cv_func_dgettext_libc" != "yes" \
214
|| test "$gt_cv_func_ngettext_libc" != "yes" \
215
|| test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
217
AC_CHECK_LIB(intl, bindtextdomain,
218
[AC_CHECK_LIB(intl, ngettext,
219
[AC_CHECK_LIB(intl, dgettext,
220
gt_cv_func_dgettext_libintl=yes)])])
222
if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
223
AC_MSG_CHECKING([if -liconv is needed to use gettext])
225
AC_CHECK_LIB(intl, ngettext,
226
[AC_CHECK_LIB(intl, dcgettext,
227
[gt_cv_func_dgettext_libintl=yes
228
libintl_extra_libs=-liconv],
234
# If we found libintl, then check in it for bind_textdomain_codeset();
235
# we'll prefer libc if neither have bind_textdomain_codeset(),
236
# and both have dgettext and ngettext
238
if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
239
glib_save_LIBS="$LIBS"
240
LIBS="$LIBS -lintl $libintl_extra_libs"
241
unset ac_cv_func_bind_textdomain_codeset
242
AC_CHECK_FUNCS(bind_textdomain_codeset)
243
LIBS="$glib_save_LIBS"
245
if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
246
gt_cv_func_dgettext_libc=no
248
if test "$gt_cv_func_dgettext_libc" = "yes" \
249
&& test "$gt_cv_func_ngettext_libc" = "yes"; then
250
gt_cv_func_dgettext_libintl=no
256
if test "$gt_cv_func_dgettext_libc" = "yes" \
257
|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
258
gt_cv_have_gettext=yes
261
if test "$gt_cv_func_dgettext_libintl" = "yes"; then
262
INTLLIBS="-lintl $libintl_extra_libs"
265
if test "$gt_cv_have_gettext" = "yes"; then
266
AC_DEFINE(HAVE_GETTEXT,1,
267
[Define if the GNU gettext() function is already present or preinstalled.])
268
GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
269
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
270
if test "$MSGFMT" != "no"; then
271
glib_save_LIBS="$LIBS"
272
LIBS="$LIBS $INTLLIBS"
273
AC_CHECK_FUNCS(dcgettext)
275
AC_MSG_CHECKING([if msgfmt accepts -c])
276
GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
279
"Content-Type: text/plain; charset=UTF-8\n"
280
"Project-Id-Version: test 1.0\n"
281
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
282
"Last-Translator: test <foo@bar.xx>\n"
283
"Language-Team: C <LL@li.org>\n"
284
"MIME-Version: 1.0\n"
285
"Content-Transfer-Encoding: 8bit\n"
286
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
287
AC_SUBST(MSGFMT_OPTS)
288
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
289
GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
290
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
291
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
292
return _nl_msg_cat_cntr],
297
dnl On Solaris, if bind_textdomain_codeset is in libc,
298
dnl GNU format message catalog is always supported,
299
dnl since both are added to the libc all together.
300
dnl Hence, we'd like to go with DATADIRNAME=share and
301
dnl and CATOBJEXT=.gmo in this case.
302
AC_CHECK_FUNC(bind_textdomain_codeset,
313
LIBS="$glib_save_LIBS"
316
gt_cv_have_gettext=no
321
if test "$gt_cv_have_gettext" = "yes" ; then
322
AC_DEFINE(ENABLE_NLS, 1,
323
[always defined to indicate that i18n is enabled])
326
dnl Test whether we really found GNU xgettext.
327
if test "$XGETTEXT" != ":"; then
328
dnl If it is not GNU xgettext we define it as : so that the
329
dnl Makefiles still can work.
330
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
334
[found xgettext program is not GNU xgettext; ignore it])
339
# We need to process the po/ directory.
343
[case "$CONFIG_FILES" in *po/Makefile.in*)
344
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
347
dnl These rules are solely for the distribution goal. While doing this
348
dnl we only have to keep exactly one list of the available catalogs
350
for lang in $ALL_LINGUAS; do
351
GMOFILES="$GMOFILES $lang.gmo"
352
POFILES="$POFILES $lang.po"
355
dnl Make all variables we use known to autoconf.
358
AC_SUBST(DATADIRNAME)
362
AC_SUBST(PO_IN_DATADIR_TRUE)
363
AC_SUBST(PO_IN_DATADIR_FALSE)
368
# AM_GLIB_GNU_GETTEXT
369
# -------------------
370
# Do checks necessary for use of gettext. If a suitable implementation
371
# of gettext is found in either in libintl or in the C library,
372
# it will set INTLLIBS to the libraries needed for use of gettext
373
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
374
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
375
# on various variables needed by the Makefile.in.in installed by
378
glib_DEFUN([GLIB_GNU_GETTEXT],
379
[AC_REQUIRE([AC_PROG_CC])dnl
380
AC_REQUIRE([AC_HEADER_STDC])dnl
385
if test "$gt_cv_have_gettext" = "yes"; then
386
if test "x$ALL_LINGUAS" = "x"; then
389
AC_MSG_CHECKING(for catalogs to be installed)
391
for presentlang in $ALL_LINGUAS; do
393
if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
394
desiredlanguages="$LINGUAS"
396
desiredlanguages="$ALL_LINGUAS"
398
for desiredlang in $desiredlanguages; do
399
# Use the presentlang catalog if desiredlang is
400
# a. equal to presentlang, or
401
# b. a variant of presentlang (because in this case,
402
# presentlang can be used as a fallback for messages
403
# which are not translated in the desiredlang catalog).
404
case "$desiredlang" in
405
"$presentlang"*) useit=yes;;
408
if test $useit = yes; then
409
NEW_LINGUAS="$NEW_LINGUAS $presentlang"
413
AC_MSG_RESULT($LINGUAS)
416
dnl Construct list of names of catalog files to be constructed.
417
if test -n "$LINGUAS"; then
418
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
422
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
423
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
424
dnl Try to locate is.
426
if test -n "$ac_aux_dir"; then
427
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
429
if test -z "$MKINSTALLDIRS"; then
430
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
432
AC_SUBST(MKINSTALLDIRS)
434
dnl Generate list of files to be processed by xgettext which will
435
dnl be included in po/Makefile.
436
test -d po || mkdir po
437
if test "x$srcdir" != "x."; then
438
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
439
posrcprefix="$srcdir/"
441
posrcprefix="../$srcdir/"
447
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
448
< $srcdir/po/POTFILES.in > po/POTFILES
451
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
452
# -------------------------------
453
# Define VARIABLE to the location where catalog files will
454
# be installed by po/Makefile.
455
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
456
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
457
glib_save_prefix="$prefix"
458
glib_save_exec_prefix="$exec_prefix"
459
glib_save_datarootdir="$datarootdir"
460
test "x$prefix" = xNONE && prefix=$ac_default_prefix
461
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
462
datarootdir=`eval echo "${datarootdir}"`
463
if test "x$CATOBJEXT" = "x.mo" ; then
464
localedir=`eval echo "${libdir}/locale"`
466
localedir=`eval echo "${datadir}/locale"`
468
prefix="$glib_save_prefix"
469
exec_prefix="$glib_save_exec_prefix"
470
datarootdir="$glib_save_datarootdir"
471
AC_DEFINE_UNQUOTED($1, "$localedir",
472
[Define the location where the catalogs will be installed])
476
dnl Now the definitions that aclocal will find
478
ifdef(glib_configure_in,[],[
479
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
480
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
483
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
485
# Create a temporary file with TEST-FILE as its contents and pass the
486
# file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
487
# 0 and perform ACTION-IF-FAIL for any other exit status.
488
AC_DEFUN([GLIB_RUN_PROG],
489
[cat >conftest.foo <<_ACEOF
492
if AC_RUN_LOG([$1 conftest.foo]); then
493
m4_ifval([$3], [$3], [:])
494
m4_ifvaln([$4], [else $4])dnl
495
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
496
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
501
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
502
# serial 40 IT_PROG_INTLTOOL
503
AC_DEFUN([IT_PROG_INTLTOOL], [
505
AC_REQUIRE([AM_NLS])dnl
507
case "$am__api_version" in
509
AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
515
if test -n "$1"; then
516
AC_MSG_CHECKING([for intltool >= $1])
518
INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
519
INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
520
[INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
522
AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
523
test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
524
AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
527
AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
528
AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
529
AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
530
if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
531
AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
534
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 $< [$]@'
535
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 $< [$]@'
536
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 $< [$]@'
537
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 $< [$]@'
538
INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
539
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 $< [$]@'
540
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 $< [$]@'
541
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 $< [$]@'
542
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 $< [$]@'
543
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 $< [$]@'
544
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 $< [$]@'
545
INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@'
546
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 $< [$]@'
547
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 $< [$]@'
548
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 $< [$]@'
549
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 $< [$]@'
550
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 $< [$]@'
551
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 $< [$]@'
552
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 $< [$]@'
554
_IT_SUBST(INTLTOOL_DESKTOP_RULE)
555
_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
556
_IT_SUBST(INTLTOOL_KEYS_RULE)
557
_IT_SUBST(INTLTOOL_PROP_RULE)
558
_IT_SUBST(INTLTOOL_OAF_RULE)
559
_IT_SUBST(INTLTOOL_PONG_RULE)
560
_IT_SUBST(INTLTOOL_SERVER_RULE)
561
_IT_SUBST(INTLTOOL_SHEET_RULE)
562
_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
563
_IT_SUBST(INTLTOOL_UI_RULE)
564
_IT_SUBST(INTLTOOL_XAM_RULE)
565
_IT_SUBST(INTLTOOL_KBD_RULE)
566
_IT_SUBST(INTLTOOL_XML_RULE)
567
_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
568
_IT_SUBST(INTLTOOL_CAVES_RULE)
569
_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
570
_IT_SUBST(INTLTOOL_THEME_RULE)
571
_IT_SUBST(INTLTOOL_SERVICE_RULE)
572
_IT_SUBST(INTLTOOL_POLICY_RULE)
574
# Check the gettext tools to make sure they are GNU
575
AC_PATH_PROG(XGETTEXT, xgettext)
576
AC_PATH_PROG(MSGMERGE, msgmerge)
577
AC_PATH_PROG(MSGFMT, msgfmt)
578
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
579
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
580
AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
582
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
583
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
584
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
585
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
586
AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
589
AC_PATH_PROG(INTLTOOL_PERL, perl)
590
if test -z "$INTLTOOL_PERL"; then
591
AC_MSG_ERROR([perl not found])
593
AC_MSG_CHECKING([for perl >= 5.8.1])
594
$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
595
if test $? -ne 0; then
596
AC_MSG_ERROR([perl 5.8.1 is required for intltool])
598
IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
599
AC_MSG_RESULT([$IT_PERL_VERSION])
601
if test "x$2" != "xno-xml"; then
602
AC_MSG_CHECKING([for XML::Parser])
603
if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
606
AC_MSG_ERROR([XML::Parser perl module is required for intltool])
610
# Substitute ALL_LINGUAS so we can use it in po/Makefile
611
AC_SUBST(ALL_LINGUAS)
613
# Set DATADIRNAME correctly if it is not set yet
614
# (copied from glib-gettext.m4)
615
if test -z "$DATADIRNAME"; then
617
[AC_LANG_PROGRAM([[]],
618
[[extern int _nl_msg_cat_cntr;
619
return _nl_msg_cat_cntr]])],
623
dnl On Solaris, if bind_textdomain_codeset is in libc,
624
dnl GNU format message catalog is always supported,
625
dnl since both are added to the libc all together.
626
dnl Hence, we'd like to go with DATADIRNAME=share
628
AC_CHECK_FUNC(bind_textdomain_codeset,
629
[DATADIRNAME=share], [DATADIRNAME=lib])
636
AC_SUBST(DATADIRNAME)
643
# IT_PO_SUBDIR(DIRNAME)
644
# ---------------------
645
# All po subdirs have to be declared with this macro; the subdir "po" is
646
# declared by IT_PROG_INTLTOOL.
648
AC_DEFUN([IT_PO_SUBDIR],
649
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
651
dnl The following CONFIG_COMMANDS should be exetuted at the very end
652
dnl of config.status.
653
AC_CONFIG_COMMANDS_PRE([
654
AC_CONFIG_COMMANDS([$1/stamp-it], [
655
if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
656
AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
658
rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
663
'"s|^| $ac_top_srcdir/|" \
664
"$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
666
[sed '/^POTFILES =/,/[^\\]$/ {
670
' "$1/Makefile.in" >"$1/Makefile"]
671
rm -f "$1/Makefile.tmp"
672
mv "$1/stamp-it.tmp" "$1/stamp-it"
677
# _IT_SUBST(VARIABLE)
678
# -------------------
679
# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
681
AC_DEFUN([_IT_SUBST],
684
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
689
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
690
# A hint is needed for aclocal from Automake <= 1.9.4:
691
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
694
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
696
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
697
# 2006, 2007, 2008 Free Software Foundation, Inc.
698
# Written by Gordon Matzigkeit, 1996
700
# This file is free software; the Free Software Foundation gives
701
# unlimited permission to copy and/or distribute it, with or without
702
# modifications, as long as this notice is preserved.
704
m4_define([_LT_COPYING], [dnl
705
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
706
# 2006, 2007, 2008 Free Software Foundation, Inc.
707
# Written by Gordon Matzigkeit, 1996
709
# This file is part of GNU Libtool.
711
# GNU Libtool is free software; you can redistribute it and/or
712
# modify it under the terms of the GNU General Public License as
713
# published by the Free Software Foundation; either version 2 of
714
# the License, or (at your option) any later version.
716
# As a special exception to the GNU General Public License,
717
# if you distribute this file as part of a program or library that
718
# is built using GNU Libtool, you may include this file under the
719
# same distribution terms that you use for the rest of that program.
721
# GNU Libtool is distributed in the hope that it will be useful,
722
# but WITHOUT ANY WARRANTY; without even the implied warranty of
723
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
724
# GNU General Public License for more details.
726
# You should have received a copy of the GNU General Public License
727
# along with GNU Libtool; see the file COPYING. If not, a copy
728
# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
729
# obtained by writing to the Free Software Foundation, Inc.,
730
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
738
# Complain and exit if this libtool version is less that VERSION.
739
m4_defun([LT_PREREQ],
740
[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
742
[m4_fatal([Libtool version $1 or higher is required],
749
# Complain if the absolute build directory name contains unusual characters
750
m4_defun([_LT_CHECK_BUILDDIR],
753
AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
761
[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
762
AC_BEFORE([$0], [LT_LANG])dnl
763
AC_BEFORE([$0], [LT_OUTPUT])dnl
764
AC_BEFORE([$0], [LTDL_INIT])dnl
765
m4_require([_LT_CHECK_BUILDDIR])dnl
767
dnl Autoconf doesn't catch unexpanded LT_ macros by default:
768
m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
769
m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
770
dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
771
dnl unless we require an AC_DEFUNed macro:
772
AC_REQUIRE([LTOPTIONS_VERSION])dnl
773
AC_REQUIRE([LTSUGAR_VERSION])dnl
774
AC_REQUIRE([LTVERSION_VERSION])dnl
775
AC_REQUIRE([LTOBSOLETE_VERSION])dnl
776
m4_require([_LT_PROG_LTMAIN])dnl
779
_LT_SET_OPTIONS([$0], [$1])
781
# This can be used to rebuild libtool when needed
782
LIBTOOL_DEPS="$ltmain"
784
# Always use our own libtool.
785
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
795
AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
796
AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
797
dnl aclocal-1.4 backwards compatibility:
798
dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
799
dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
802
# _LT_CC_BASENAME(CC)
803
# -------------------
804
# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
805
m4_defun([_LT_CC_BASENAME],
806
[for cc_temp in $1""; do
808
compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
809
distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
814
cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
818
# _LT_FILEUTILS_DEFAULTS
819
# ----------------------
820
# It is okay to use these file commands and assume they have been set
821
# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
822
m4_defun([_LT_FILEUTILS_DEFAULTS],
826
])# _LT_FILEUTILS_DEFAULTS
831
m4_defun([_LT_SETUP],
832
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
833
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
834
_LT_DECL([], [host_alias], [0], [The host system])dnl
835
_LT_DECL([], [host], [0])dnl
836
_LT_DECL([], [host_os], [0])dnl
838
_LT_DECL([], [build_alias], [0], [The build system])dnl
839
_LT_DECL([], [build], [0])dnl
840
_LT_DECL([], [build_os], [0])dnl
842
AC_REQUIRE([AC_PROG_CC])dnl
843
AC_REQUIRE([LT_PATH_LD])dnl
844
AC_REQUIRE([LT_PATH_NM])dnl
846
AC_REQUIRE([AC_PROG_LN_S])dnl
847
test -z "$LN_S" && LN_S="ln -s"
848
_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
850
AC_REQUIRE([LT_CMD_MAX_LEN])dnl
851
_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
852
_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
854
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
855
m4_require([_LT_CHECK_SHELL_FEATURES])dnl
856
m4_require([_LT_CMD_RELOAD])dnl
857
m4_require([_LT_CHECK_MAGIC_METHOD])dnl
858
m4_require([_LT_CMD_OLD_ARCHIVE])dnl
859
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
861
_LT_CONFIG_LIBTOOL_INIT([
862
# See if we are running on zsh, and set the options which allow our
863
# commands through without removal of \ escapes INIT.
864
if test -n "\${ZSH_VERSION+set}" ; then
868
if test -n "${ZSH_VERSION+set}" ; then
874
m4_require([_LT_TAG_COMPILER])dnl
875
_LT_PROG_ECHO_BACKSLASH
879
# AIX sometimes has problems with the GCC collect2 program. For some
880
# reason, if we set the COLLECT_NAMES environment variable, the problems
881
# vanish in a puff of smoke.
882
if test "X${COLLECT_NAMES+set}" != Xset; then
889
# Sed substitution that helps us do robust quoting. It backslashifies
890
# metacharacters that are still active within double-quoted strings.
891
sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
893
# Same as above, but do not quote variable references.
894
double_quote_subst='s/\([["`\\]]\)/\\\1/g'
896
# Sed substitution to delay expansion of an escaped shell variable in a
897
# double_quote_subst'ed string.
898
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
900
# Sed substitution to delay expansion of an escaped single quote.
901
delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
903
# Sed substitution to avoid accidental globbing in evaled expressions
904
no_glob_subst='s/\*/\\\*/g'
910
# All known linkers require a `.a' archive for static linking (except MSVC,
911
# which needs '.lib').
914
with_gnu_ld="$lt_cv_prog_gnu_ld"
919
# Set sane defaults for various variables
920
test -z "$CC" && CC=cc
921
test -z "$LTCC" && LTCC=$CC
922
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
923
test -z "$LD" && LD=ld
924
test -z "$ac_objext" && ac_objext=o
926
_LT_CC_BASENAME([$compiler])
928
# Only perform the check for file, if the check method requires it
929
test -z "$MAGIC_CMD" && MAGIC_CMD=file
930
case $deplibs_check_method in
932
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
938
# Use C for the default configuration in the libtool script
939
LT_SUPPORTED_TAG([CC])
941
_LT_LANG_DEFAULT_CONFIG
948
# Note that this code is called both from `configure', and `config.status'
949
# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
950
# `config.status' has no value for ac_aux_dir unless we are using Automake,
951
# so we pass a copy along to make sure it has a sensible value anyway.
952
m4_defun([_LT_PROG_LTMAIN],
953
[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
954
_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
955
ltmain="$ac_aux_dir/ltmain.sh"
960
# So that we can recreate a full libtool script including additional
961
# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
962
# in macros and then make a single call at the end using the `libtool'
966
# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
967
# ----------------------------------------
968
# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
969
m4_define([_LT_CONFIG_LIBTOOL_INIT],
971
[m4_append([_LT_OUTPUT_LIBTOOL_INIT],
976
m4_define([_LT_OUTPUT_LIBTOOL_INIT])
979
# _LT_CONFIG_LIBTOOL([COMMANDS])
980
# ------------------------------
981
# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
982
m4_define([_LT_CONFIG_LIBTOOL],
984
[m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
989
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
992
# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
993
# -----------------------------------------------------
994
m4_defun([_LT_CONFIG_SAVE_COMMANDS],
995
[_LT_CONFIG_LIBTOOL([$1])
996
_LT_CONFIG_LIBTOOL_INIT([$2])
1000
# _LT_FORMAT_COMMENT([COMMENT])
1001
# -----------------------------
1002
# Add leading comment marks to the start of each line, and a trailing
1003
# full-stop to the whole comment if one is not present already.
1004
m4_define([_LT_FORMAT_COMMENT],
1006
m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
1007
[['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
1014
# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
1015
# -------------------------------------------------------------------
1016
# CONFIGNAME is the name given to the value in the libtool script.
1017
# VARNAME is the (base) name used in the configure script.
1018
# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
1019
# VARNAME. Any other value will be used directly.
1020
m4_define([_LT_DECL],
1021
[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
1022
[lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
1023
[m4_ifval([$1], [$1], [$2])])
1024
lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
1026
[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
1027
lt_dict_add_subkey([lt_decl_dict], [$2],
1028
[tagged?], [m4_ifval([$5], [yes], [no])])])
1032
# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
1033
# --------------------------------------------------------
1034
m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
1037
# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
1038
# ------------------------------------------------
1039
m4_define([lt_decl_tag_varnames],
1040
[_lt_decl_filter([tagged?], [yes], $@)])
1043
# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
1044
# ---------------------------------------------------------
1045
m4_define([_lt_decl_filter],
1047
[0], [m4_fatal([$0: too few arguments: $#])],
1048
[1], [m4_fatal([$0: too few arguments: $#: $1])],
1049
[2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
1050
[3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
1051
[lt_dict_filter([lt_decl_dict], $@)])[]dnl
1055
# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
1056
# --------------------------------------------------
1057
m4_define([lt_decl_quote_varnames],
1058
[_lt_decl_filter([value], [1], $@)])
1061
# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
1062
# ---------------------------------------------------
1063
m4_define([lt_decl_dquote_varnames],
1064
[_lt_decl_filter([value], [2], $@)])
1067
# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
1068
# ---------------------------------------------------
1069
m4_define([lt_decl_varnames_tagged],
1070
[m4_assert([$# <= 2])dnl
1071
_$0(m4_quote(m4_default([$1], [[, ]])),
1072
m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
1073
m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
1074
m4_define([_lt_decl_varnames_tagged],
1075
[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
1078
# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
1079
# ------------------------------------------------
1080
m4_define([lt_decl_all_varnames],
1081
[_$0(m4_quote(m4_default([$1], [[, ]])),
1083
m4_quote(lt_decl_varnames),
1084
m4_quote(m4_shift($@))))[]dnl
1086
m4_define([_lt_decl_all_varnames],
1087
[lt_join($@, lt_decl_varnames_tagged([$1],
1088
lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
1092
# _LT_CONFIG_STATUS_DECLARE([VARNAME])
1093
# ------------------------------------
1094
# Quote a variable value, and forward it to `config.status' so that its
1095
# declaration there will have the same value as in `configure'. VARNAME
1096
# must have a single quote delimited value for this to work.
1097
m4_define([_LT_CONFIG_STATUS_DECLARE],
1098
[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
1101
# _LT_CONFIG_STATUS_DECLARATIONS
1102
# ------------------------------
1103
# We delimit libtool config variables with single quotes, so when
1104
# we write them to config.status, we have to be sure to quote all
1105
# embedded single quotes properly. In configure, this macro expands
1106
# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
1108
# <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
1109
m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
1110
[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
1111
[m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
1116
# Output comment and list of tags supported by the script
1117
m4_defun([_LT_LIBTOOL_TAGS],
1118
[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
1119
available_tags="_LT_TAGS"dnl
1123
# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
1124
# -----------------------------------
1125
# Extract the dictionary values for VARNAME (optionally with TAG) and
1126
# expand to a commented shell variable setting:
1128
# # Some comment about what VAR is for.
1129
# visible_name=$lt_internal_name
1130
m4_define([_LT_LIBTOOL_DECLARE],
1131
[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
1132
[description])))[]dnl
1133
m4_pushdef([_libtool_name],
1134
m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
1135
m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
1136
[0], [_libtool_name=[$]$1],
1137
[1], [_libtool_name=$lt_[]$1],
1138
[2], [_libtool_name=$lt_[]$1],
1139
[_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
1140
m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
1144
# _LT_LIBTOOL_CONFIG_VARS
1145
# -----------------------
1146
# Produce commented declarations of non-tagged libtool config variables
1147
# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
1148
# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
1149
# section) are produced by _LT_LIBTOOL_TAG_VARS.
1150
m4_defun([_LT_LIBTOOL_CONFIG_VARS],
1151
[m4_foreach([_lt_var],
1152
m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
1153
[m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
1156
# _LT_LIBTOOL_TAG_VARS(TAG)
1157
# -------------------------
1158
m4_define([_LT_LIBTOOL_TAG_VARS],
1159
[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
1160
[m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
1163
# _LT_TAGVAR(VARNAME, [TAGNAME])
1164
# ------------------------------
1165
m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
1168
# _LT_CONFIG_COMMANDS
1169
# -------------------
1170
# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
1171
# variables for single and double quote escaping we saved from calls
1172
# to _LT_DECL, we can put quote escaped variables declarations
1173
# into `config.status', and then the shell code to quote escape them in
1174
# for loops in `config.status'. Finally, any additional code accumulated
1175
# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
1176
m4_defun([_LT_CONFIG_COMMANDS],
1177
[AC_PROVIDE_IFELSE([LT_OUTPUT],
1178
dnl If the libtool generation code has been placed in $CONFIG_LT,
1179
dnl instead of duplicating it all over again into config.status,
1180
dnl then we will have config.status run $CONFIG_LT later, so it
1181
dnl needs to know what name is stored there:
1182
[AC_CONFIG_COMMANDS([libtool],
1183
[$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
1184
dnl If the libtool generation code is destined for config.status,
1185
dnl expand the accumulated commands and init code now:
1186
[AC_CONFIG_COMMANDS([libtool],
1187
[_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
1188
])#_LT_CONFIG_COMMANDS
1192
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
1195
# The HP-UX ksh and POSIX shell print the target directory to stdout
1197
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1199
sed_quote_subst='$sed_quote_subst'
1200
double_quote_subst='$double_quote_subst'
1201
delay_variable_subst='$delay_variable_subst'
1202
_LT_CONFIG_STATUS_DECLARATIONS
1204
LTCFLAGS='$LTCFLAGS'
1205
compiler='$compiler_DEFAULT'
1207
# Quote evaled strings.
1208
for var in lt_decl_all_varnames([[ \
1209
]], lt_decl_quote_varnames); do
1210
case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
1211
*[[\\\\\\\`\\"\\\$]]*)
1212
eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
1215
eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1220
# Double-quote double-evaled strings.
1221
for var in lt_decl_all_varnames([[ \
1222
]], lt_decl_dquote_varnames); do
1223
case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
1224
*[[\\\\\\\`\\"\\\$]]*)
1225
eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
1228
eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1233
# Fix-up fallback echo if it was mangled by the above quoting rules.
1235
*'\\\[$]0 --fallback-echo"')dnl "
1236
lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
1240
_LT_OUTPUT_LIBTOOL_INIT
1246
# This macro allows early generation of the libtool script (before
1247
# AC_OUTPUT is called), incase it is used in configure for compilation
1249
AC_DEFUN([LT_OUTPUT],
1250
[: ${CONFIG_LT=./config.lt}
1251
AC_MSG_NOTICE([creating $CONFIG_LT])
1252
cat >"$CONFIG_LT" <<_LTEOF
1254
# Generated by $as_me.
1255
# Run this file to recreate a libtool stub with the current configuration.
1258
SHELL=\${CONFIG_SHELL-$SHELL}
1261
cat >>"$CONFIG_LT" <<\_LTEOF
1265
exec AS_MESSAGE_FD>&1
1266
exec AS_MESSAGE_LOG_FD>>config.log
1269
AS_BOX([Running $as_me.])
1270
} >&AS_MESSAGE_LOG_FD
1273
\`$as_me' creates a local libtool stub from the current configuration,
1274
for use in further configure time tests before the real libtool is
1277
Usage: $[0] [[OPTIONS]]
1279
-h, --help print this help, then exit
1280
-V, --version print version number, then exit
1281
-q, --quiet do not print progress messages
1282
-d, --debug don't remove temporary files
1284
Report bugs to <bug-libtool@gnu.org>."
1287
m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
1288
m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1289
configured by $[0], generated by m4_PACKAGE_STRING.
1291
Copyright (C) 2008 Free Software Foundation, Inc.
1292
This config.lt script is free software; the Free Software Foundation
1293
gives unlimited permision to copy, distribute and modify it."
1295
while test $[#] != 0
1298
--version | --v* | -V )
1299
echo "$lt_cl_version"; exit 0 ;;
1300
--help | --h* | -h )
1301
echo "$lt_cl_help"; exit 0 ;;
1302
--debug | --d* | -d )
1304
--quiet | --q* | --silent | --s* | -q )
1307
-*) AC_MSG_ERROR([unrecognized option: $[1]
1308
Try \`$[0] --help' for more information.]) ;;
1310
*) AC_MSG_ERROR([unrecognized argument: $[1]
1311
Try \`$[0] --help' for more information.]) ;;
1316
if $lt_cl_silent; then
1317
exec AS_MESSAGE_FD>/dev/null
1321
cat >>"$CONFIG_LT" <<_LTEOF
1322
_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
1325
cat >>"$CONFIG_LT" <<\_LTEOF
1326
AC_MSG_NOTICE([creating $ofile])
1327
_LT_OUTPUT_LIBTOOL_COMMANDS
1330
chmod +x "$CONFIG_LT"
1332
# configure is writing to config.log, but config.lt does its own redirection,
1333
# appending to config.log, which fails on DOS, as config.log is still kept
1334
# open by configure. Here we exec the FD to /dev/null, effectively closing
1335
# config.log, so it can be properly (re)opened and appended to by config.lt.
1336
if test "$no_create" != yes; then
1338
test "$silent" = yes &&
1339
lt_config_lt_args="$lt_config_lt_args --quiet"
1340
exec AS_MESSAGE_LOG_FD>/dev/null
1341
$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
1342
exec AS_MESSAGE_LOG_FD>>config.log
1343
$lt_cl_success || AS_EXIT(1)
1350
# If TAG is the built-in tag, create an initial libtool script with a
1351
# default configuration from the untagged config vars. Otherwise add code
1352
# to config.status for appending the configuration named by TAG from the
1353
# matching tagged config vars.
1354
m4_defun([_LT_CONFIG],
1355
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1356
_LT_CONFIG_SAVE_COMMANDS([
1357
m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
1358
m4_if(_LT_TAG, [C], [
1359
# See if we are running on zsh, and set the options which allow our
1360
# commands through without removal of \ escapes.
1361
if test -n "${ZSH_VERSION+set}" ; then
1362
setopt NO_GLOB_SUBST
1366
trap "$RM \"$cfgfile\"; exit 1" 1 2 15
1369
cat <<_LT_EOF >> "$cfgfile"
1372
# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
1373
# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
1374
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1375
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
1380
# ### BEGIN LIBTOOL CONFIG
1381
_LT_LIBTOOL_CONFIG_VARS
1382
_LT_LIBTOOL_TAG_VARS
1383
# ### END LIBTOOL CONFIG
1389
cat <<\_LT_EOF >> "$cfgfile"
1390
# AIX sometimes has problems with the GCC collect2 program. For some
1391
# reason, if we set the COLLECT_NAMES environment variable, the problems
1392
# vanish in a puff of smoke.
1393
if test "X${COLLECT_NAMES+set}" != Xset; then
1395
export COLLECT_NAMES
1403
# We use sed instead of cat because bash on DJGPP gets confused if
1404
# if finds mixed CR/LF and LF-only lines. Since sed operates in
1405
# text mode, it properly converts lines to CR/LF. This bash problem
1406
# is reportedly fixed, but why not run on old versions too?
1407
sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
1408
|| (rm -f "$cfgfile"; exit 1)
1410
_LT_PROG_XSI_SHELLFNS
1412
sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
1413
|| (rm -f "$cfgfile"; exit 1)
1415
mv -f "$cfgfile" "$ofile" ||
1416
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
1419
[cat <<_LT_EOF >> "$ofile"
1421
dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
1422
dnl in a comment (ie after a #).
1423
# ### BEGIN LIBTOOL TAG CONFIG: $1
1424
_LT_LIBTOOL_TAG_VARS(_LT_TAG)
1425
# ### END LIBTOOL TAG CONFIG: $1
1432
TIMESTAMP='$TIMESTAMP'
1434
ofile='$ofile'], [])
1435
])dnl /_LT_CONFIG_SAVE_COMMANDS
1439
# LT_SUPPORTED_TAG(TAG)
1440
# ---------------------
1441
# Trace this macro to discover what tags are supported by the libtool
1442
# --tag option, using:
1443
# autoconf --trace 'LT_SUPPORTED_TAG:$1'
1444
AC_DEFUN([LT_SUPPORTED_TAG], [])
1447
# C support is built-in for now
1448
m4_define([_LT_LANG_C_enabled], [])
1449
m4_define([_LT_TAGS], [])
1454
# Enable libtool support for the given language if not already enabled.
1456
[AC_BEFORE([$0], [LT_OUTPUT])dnl
1459
[C++], [_LT_LANG(CXX)],
1460
[Java], [_LT_LANG(GCJ)],
1461
[Fortran 77], [_LT_LANG(F77)],
1462
[Fortran], [_LT_LANG(FC)],
1463
[Windows Resource], [_LT_LANG(RC)],
1464
[m4_ifdef([_LT_LANG_]$1[_CONFIG],
1466
[m4_fatal([$0: unsupported language: "$1"])])])dnl
1470
# _LT_LANG(LANGNAME)
1471
# ------------------
1472
m4_defun([_LT_LANG],
1473
[m4_ifdef([_LT_LANG_]$1[_enabled], [],
1474
[LT_SUPPORTED_TAG([$1])dnl
1475
m4_append([_LT_TAGS], [$1 ])dnl
1476
m4_define([_LT_LANG_]$1[_enabled], [])dnl
1477
_LT_LANG_$1_CONFIG($1)])dnl
1481
# _LT_LANG_DEFAULT_CONFIG
1482
# -----------------------
1483
m4_defun([_LT_LANG_DEFAULT_CONFIG],
1484
[AC_PROVIDE_IFELSE([AC_PROG_CXX],
1486
[m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
1488
AC_PROVIDE_IFELSE([AC_PROG_F77],
1490
[m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
1492
AC_PROVIDE_IFELSE([AC_PROG_FC],
1494
[m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
1496
dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
1497
dnl pulling things in needlessly.
1498
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1500
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1502
[AC_PROVIDE_IFELSE([LT_PROG_GCJ],
1504
[m4_ifdef([AC_PROG_GCJ],
1505
[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
1506
m4_ifdef([A][M_PROG_GCJ],
1507
[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
1508
m4_ifdef([LT_PROG_GCJ],
1509
[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
1511
AC_PROVIDE_IFELSE([LT_PROG_RC],
1513
[m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
1514
])# _LT_LANG_DEFAULT_CONFIG
1517
AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
1518
AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
1519
AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
1520
AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
1521
dnl aclocal-1.4 backwards compatibility:
1522
dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
1523
dnl AC_DEFUN([AC_LIBTOOL_F77], [])
1524
dnl AC_DEFUN([AC_LIBTOOL_FC], [])
1525
dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
1530
m4_defun([_LT_TAG_COMPILER],
1531
[AC_REQUIRE([AC_PROG_CC])dnl
1533
_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
1534
_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
1535
_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
1536
_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
1538
# If no C compiler was specified, use CC.
1541
# If no C compiler flags were specified, use CFLAGS.
1542
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1544
# Allow CC to be a program name with arguments.
1546
])# _LT_TAG_COMPILER
1549
# _LT_COMPILER_BOILERPLATE
1550
# ------------------------
1551
# Check for compiler boilerplate output or warnings with
1552
# the simple compiler test code.
1553
m4_defun([_LT_COMPILER_BOILERPLATE],
1554
[m4_require([_LT_DECL_SED])dnl
1555
ac_outfile=conftest.$ac_objext
1556
echo "$lt_simple_compile_test_code" >conftest.$ac_ext
1557
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1558
_lt_compiler_boilerplate=`cat conftest.err`
1560
])# _LT_COMPILER_BOILERPLATE
1563
# _LT_LINKER_BOILERPLATE
1564
# ----------------------
1565
# Check for linker boilerplate output or warnings with
1566
# the simple link test code.
1567
m4_defun([_LT_LINKER_BOILERPLATE],
1568
[m4_require([_LT_DECL_SED])dnl
1569
ac_outfile=conftest.$ac_objext
1570
echo "$lt_simple_link_test_code" >conftest.$ac_ext
1571
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1572
_lt_linker_boilerplate=`cat conftest.err`
1574
])# _LT_LINKER_BOILERPLATE
1576
# _LT_REQUIRED_DARWIN_CHECKS
1577
# -------------------------
1578
m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
1580
rhapsody* | darwin*)
1581
AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1582
AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1583
AC_CHECK_TOOL([LIPO], [lipo], [:])
1584
AC_CHECK_TOOL([OTOOL], [otool], [:])
1585
AC_CHECK_TOOL([OTOOL64], [otool64], [:])
1586
_LT_DECL([], [DSYMUTIL], [1],
1587
[Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1588
_LT_DECL([], [NMEDIT], [1],
1589
[Tool to change global to local symbols on Mac OS X])
1590
_LT_DECL([], [LIPO], [1],
1591
[Tool to manipulate fat objects and archives on Mac OS X])
1592
_LT_DECL([], [OTOOL], [1],
1593
[ldd/readelf like tool for Mach-O binaries on Mac OS X])
1594
_LT_DECL([], [OTOOL64], [1],
1595
[ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
1597
AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1598
[lt_cv_apple_cc_single_mod=no
1599
if test -z "${LT_MULTI_MODULE}"; then
1600
# By default we will add the -single_module flag. You can override
1601
# by either setting the environment variable LT_MULTI_MODULE
1602
# non-empty at configure time, or by adding -multi_module to the
1604
rm -rf libconftest.dylib*
1605
echo "int foo(void){return 1;}" > conftest.c
1606
echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1607
-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1608
$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1609
-dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1611
if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
1612
lt_cv_apple_cc_single_mod=yes
1614
cat conftest.err >&AS_MESSAGE_LOG_FD
1616
rm -rf libconftest.dylib*
1619
AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1620
[lt_cv_ld_exported_symbols_list],
1621
[lt_cv_ld_exported_symbols_list=no
1622
save_LDFLAGS=$LDFLAGS
1623
echo "_main" > conftest.sym
1624
LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1625
AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1626
[lt_cv_ld_exported_symbols_list=yes],
1627
[lt_cv_ld_exported_symbols_list=no])
1628
LDFLAGS="$save_LDFLAGS"
1631
rhapsody* | darwin1.[[012]])
1632
_lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
1634
_lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1635
darwin*) # darwin 5.x on
1636
# if running on 10.5 or later, the deployment target defaults
1637
# to the OS version, if on x86, and 10.4, the deployment
1638
# target defaults to 10.4. Don't you love it?
1639
case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1640
10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1641
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1643
_lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1645
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1649
if test "$lt_cv_apple_cc_single_mod" = "yes"; then
1650
_lt_dar_single_mod='$single_module'
1652
if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
1653
_lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
1655
_lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
1657
if test "$DSYMUTIL" != ":"; then
1658
_lt_dsymutil='~$DSYMUTIL $lib || :'
1667
# _LT_DARWIN_LINKER_FEATURES
1668
# --------------------------
1669
# Checks for linker and compiler features on darwin
1670
m4_defun([_LT_DARWIN_LINKER_FEATURES],
1672
m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1673
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
1674
_LT_TAGVAR(hardcode_direct, $1)=no
1675
_LT_TAGVAR(hardcode_automatic, $1)=yes
1676
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1677
_LT_TAGVAR(whole_archive_flag_spec, $1)=''
1678
_LT_TAGVAR(link_all_deplibs, $1)=yes
1679
_LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1680
case $cc_basename in
1681
ifort*) _lt_dar_can_shared=yes ;;
1682
*) _lt_dar_can_shared=$GCC ;;
1684
if test "$_lt_dar_can_shared" = "yes"; then
1685
output_verbose_link_cmd=echo
1686
_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}"
1687
_LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1688
_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}"
1689
_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}"
1691
[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1692
_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}"
1693
_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}"
1697
_LT_TAGVAR(ld_shlibs, $1)=no
1701
# _LT_SYS_MODULE_PATH_AIX
1702
# -----------------------
1703
# Links a minimal program and checks the executable
1704
# for the system default hardcoded library path. In most cases,
1705
# this is /usr/lib:/lib, but when the MPI compilers are used
1706
# the location of the communication and MPI libs are included too.
1707
# If we don't find anything, use the default library path according
1708
# to the aix ld manual.
1709
m4_defun([_LT_SYS_MODULE_PATH_AIX],
1710
[m4_require([_LT_DECL_SED])dnl
1711
AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1712
lt_aix_libpath_sed='
1713
/Import File Strings/,/^$/ {
1719
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1720
# Check for a 64-bit object if we didn't find anything.
1721
if test -z "$aix_libpath"; then
1722
aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1724
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1725
])# _LT_SYS_MODULE_PATH_AIX
1728
# _LT_SHELL_INIT(ARG)
1729
# -------------------
1730
m4_define([_LT_SHELL_INIT],
1731
[ifdef([AC_DIVERSION_NOTICE],
1732
[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1733
[AC_DIVERT_PUSH(NOTICE)])
1739
# _LT_PROG_ECHO_BACKSLASH
1740
# -----------------------
1741
# Add some code to the start of the generated configure script which
1742
# will find an echo command which doesn't interpret backslashes.
1743
m4_defun([_LT_PROG_ECHO_BACKSLASH],
1745
# Check that we are running under the correct shell.
1746
SHELL=${CONFIG_SHELL-/bin/sh}
1750
# Remove one level of quotation (which was required for Make).
1751
ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1755
ECHO=${lt_ECHO-echo}
1756
if test "X[$]1" = X--no-reexec; then
1757
# Discard the --no-reexec flag, and continue.
1759
elif test "X[$]1" = X--fallback-echo; then
1760
# Avoid inline document here, it may be left over
1762
elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
1763
# Yippee, $ECHO works!
1766
# Restart under the correct shell.
1767
exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1770
if test "X[$]1" = X--fallback-echo; then
1771
# used as fallback echo
1779
# The HP-UX ksh and POSIX shell print the target directory to stdout
1781
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1783
if test -z "$lt_ECHO"; then
1784
if test "X${echo_test_string+set}" != Xset; then
1785
# find a string as large as possible, as long as the shell can cope with it
1786
for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1787
# expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1788
if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
1789
{ test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
1796
if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1797
echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1798
test "X$echo_testing_string" = "X$echo_test_string"; then
1801
# The Solaris, AIX, and Digital Unix default echo programs unquote
1802
# backslashes. This makes it impossible to quote backslashes using
1803
# echo "$something" | sed 's/\\/\\\\/g'
1805
# So, first we look for a working echo in the user's PATH.
1807
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1808
for dir in $PATH /usr/ucb; do
1810
if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1811
test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1812
echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1813
test "X$echo_testing_string" = "X$echo_test_string"; then
1820
if test "X$ECHO" = Xecho; then
1821
# We didn't find a better echo, so look for alternatives.
1822
if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
1823
echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
1824
test "X$echo_testing_string" = "X$echo_test_string"; then
1825
# This shell has a builtin print -r that does the trick.
1827
elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
1828
test "X$CONFIG_SHELL" != X/bin/ksh; then
1829
# If we have ksh, try running configure again with it.
1830
ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1831
export ORIGINAL_CONFIG_SHELL
1832
CONFIG_SHELL=/bin/ksh
1834
exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1838
if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1839
echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1840
test "X$echo_testing_string" = "X$echo_test_string"; then
1841
# Cool, printf works
1843
elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1844
test "X$echo_testing_string" = 'X\t' &&
1845
echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1846
test "X$echo_testing_string" = "X$echo_test_string"; then
1847
CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1849
SHELL="$CONFIG_SHELL"
1851
ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1852
elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1853
test "X$echo_testing_string" = 'X\t' &&
1854
echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1855
test "X$echo_testing_string" = "X$echo_test_string"; then
1856
ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1858
# maybe with a smaller string...
1861
for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1862
if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
1869
if test "$prev" != 'sed 50q "[$]0"'; then
1870
echo_test_string=`eval $prev`
1871
export echo_test_string
1872
exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1874
# Oops. We lost completely, so just stick with echo.
1883
# Copy echo and quote the copy suitably for passing to libtool from
1884
# the Makefile, instead of quoting the original, which is used later.
1886
if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1887
lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1892
_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1893
_LT_DECL([], [ECHO], [1],
1894
[An echo program that does not interpret backslashes])
1895
])# _LT_PROG_ECHO_BACKSLASH
1900
m4_defun([_LT_ENABLE_LOCK],
1901
[AC_ARG_ENABLE([libtool-lock],
1902
[AS_HELP_STRING([--disable-libtool-lock],
1903
[avoid locking (might break parallel builds)])])
1904
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1906
# Some flags need to be propagated to the compiler or linker for good
1910
# Find out which ABI we are using.
1911
echo 'int i;' > conftest.$ac_ext
1912
if AC_TRY_EVAL(ac_compile); then
1913
case `/usr/bin/file conftest.$ac_objext` in
1925
# Find out which ABI we are using.
1926
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1927
if AC_TRY_EVAL(ac_compile); then
1928
if test "$lt_cv_prog_gnu_ld" = yes; then
1929
case `/usr/bin/file conftest.$ac_objext` in
1931
LD="${LD-ld} -melf32bsmip"
1934
LD="${LD-ld} -melf32bmipn32"
1937
LD="${LD-ld} -melf64bmip"
1941
case `/usr/bin/file conftest.$ac_objext` in
1957
x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1958
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1959
# Find out which ABI we are using.
1960
echo 'int i;' > conftest.$ac_ext
1961
if AC_TRY_EVAL(ac_compile); then
1962
case `/usr/bin/file conftest.o` in
1965
x86_64-*kfreebsd*-gnu)
1966
LD="${LD-ld} -m elf_i386_fbsd"
1969
LD="${LD-ld} -m elf_i386"
1971
ppc64-*linux*|powerpc64-*linux*)
1972
LD="${LD-ld} -m elf32ppclinux"
1975
LD="${LD-ld} -m elf_s390"
1978
LD="${LD-ld} -m elf32_sparc"
1984
x86_64-*kfreebsd*-gnu)
1985
LD="${LD-ld} -m elf_x86_64_fbsd"
1988
LD="${LD-ld} -m elf_x86_64"
1990
ppc*-*linux*|powerpc*-*linux*)
1991
LD="${LD-ld} -m elf64ppc"
1993
s390*-*linux*|s390*-*tpf*)
1994
LD="${LD-ld} -m elf64_s390"
1997
LD="${LD-ld} -m elf64_sparc"
2007
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
2008
SAVE_CFLAGS="$CFLAGS"
2009
CFLAGS="$CFLAGS -belf"
2010
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2012
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2014
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2015
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2016
CFLAGS="$SAVE_CFLAGS"
2020
# Find out which ABI we are using.
2021
echo 'int i;' > conftest.$ac_ext
2022
if AC_TRY_EVAL(ac_compile); then
2023
case `/usr/bin/file conftest.o` in
2025
case $lt_cv_prog_gnu_ld in
2026
yes*) LD="${LD-ld} -m elf64_sparc" ;;
2028
if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2040
need_locks="$enable_libtool_lock"
2044
# _LT_CMD_OLD_ARCHIVE
2045
# -------------------
2046
m4_defun([_LT_CMD_OLD_ARCHIVE],
2047
[AC_CHECK_TOOL(AR, ar, false)
2048
test -z "$AR" && AR=ar
2049
test -z "$AR_FLAGS" && AR_FLAGS=cru
2050
_LT_DECL([], [AR], [1], [The archiver])
2051
_LT_DECL([], [AR_FLAGS], [1])
2053
AC_CHECK_TOOL(STRIP, strip, :)
2054
test -z "$STRIP" && STRIP=:
2055
_LT_DECL([], [STRIP], [1], [A symbol stripping program])
2057
AC_CHECK_TOOL(RANLIB, ranlib, :)
2058
test -z "$RANLIB" && RANLIB=:
2059
_LT_DECL([], [RANLIB], [1],
2060
[Commands used to install an old-style archive])
2062
# Determine commands to create old-style static archives.
2063
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
2064
old_postinstall_cmds='chmod 644 $oldlib'
2065
old_postuninstall_cmds=
2067
if test -n "$RANLIB"; then
2070
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
2073
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
2076
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
2078
_LT_DECL([], [old_postinstall_cmds], [2])
2079
_LT_DECL([], [old_postuninstall_cmds], [2])
2080
_LT_TAGDECL([], [old_archive_cmds], [2],
2081
[Commands used to build an old-style archive])
2082
])# _LT_CMD_OLD_ARCHIVE
2085
# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2086
# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2087
# ----------------------------------------------------------------
2088
# Check whether the given compiler option works
2089
AC_DEFUN([_LT_COMPILER_OPTION],
2090
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2091
m4_require([_LT_DECL_SED])dnl
2092
AC_CACHE_CHECK([$1], [$2],
2094
m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2095
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2096
lt_compiler_flag="$3"
2097
# Insert the option either (1) after the last *FLAGS variable, or
2098
# (2) before a word containing "conftest.", or (3) at the end.
2099
# Note that $ac_compile itself does not contain backslashes and begins
2100
# with a dollar sign (not a hyphen), so the echo should work correctly.
2101
# The option is referenced via a variable to avoid confusing sed.
2102
lt_compile=`echo "$ac_compile" | $SED \
2103
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2104
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2105
-e 's:$: $lt_compiler_flag:'`
2106
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2107
(eval "$lt_compile" 2>conftest.err)
2109
cat conftest.err >&AS_MESSAGE_LOG_FD
2110
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2111
if (exit $ac_status) && test -s "$ac_outfile"; then
2112
# The compiler can only warn and ignore the option if not recognized
2113
# So say no if there are warnings other than the usual output.
2114
$ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
2115
$SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2116
if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2123
if test x"[$]$2" = xyes; then
2124
m4_if([$5], , :, [$5])
2126
m4_if([$6], , :, [$6])
2128
])# _LT_COMPILER_OPTION
2131
AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
2132
dnl aclocal-1.4 backwards compatibility:
2133
dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
2136
# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2137
# [ACTION-SUCCESS], [ACTION-FAILURE])
2138
# ----------------------------------------------------
2139
# Check whether the given linker option works
2140
AC_DEFUN([_LT_LINKER_OPTION],
2141
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2142
m4_require([_LT_DECL_SED])dnl
2143
AC_CACHE_CHECK([$1], [$2],
2145
save_LDFLAGS="$LDFLAGS"
2146
LDFLAGS="$LDFLAGS $3"
2147
echo "$lt_simple_link_test_code" > conftest.$ac_ext
2148
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2149
# The linker can only warn and ignore the option if not recognized
2150
# So say no if there are warnings
2151
if test -s conftest.err; then
2152
# Append any errors to the config.log.
2153
cat conftest.err 1>&AS_MESSAGE_LOG_FD
2154
$ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
2155
$SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2156
if diff conftest.exp conftest.er2 >/dev/null; then
2164
LDFLAGS="$save_LDFLAGS"
2167
if test x"[$]$2" = xyes; then
2168
m4_if([$4], , :, [$4])
2170
m4_if([$5], , :, [$5])
2172
])# _LT_LINKER_OPTION
2175
AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
2176
dnl aclocal-1.4 backwards compatibility:
2177
dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
2182
AC_DEFUN([LT_CMD_MAX_LEN],
2183
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2184
# find the maximum length of command line arguments
2185
AC_MSG_CHECKING([the maximum length of command line arguments])
2186
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2192
# On DJGPP, this test can blow up pretty badly due to problems in libc
2193
# (any single argument exceeding 2000 bytes causes a buffer overrun
2194
# during glob expansion). Even if it were fixed, the result of this
2195
# check would be larger than it should be.
2196
lt_cv_sys_max_cmd_len=12288; # 12K is about right
2200
# Under GNU Hurd, this test is not required because there is
2201
# no limit to the length of command line arguments.
2202
# Libtool will interpret -1 as no limit whatsoever
2203
lt_cv_sys_max_cmd_len=-1;
2206
cygwin* | mingw* | cegcc*)
2207
# On Win9x/ME, this test blows up -- it succeeds, but takes
2208
# about 5 minutes as the teststring grows exponentially.
2209
# Worse, since 9x/ME are not pre-emptively multitasking,
2210
# you end up with a "frozen" computer, even though with patience
2211
# the test eventually succeeds (with a max line length of 256k).
2212
# Instead, let's just punt: use the minimum linelength reported by
2213
# all of the supported platforms: 8192 (on NT/2K/XP).
2214
lt_cv_sys_max_cmd_len=8192;
2218
# On AmigaOS with pdksh, this test takes hours, literally.
2219
# So we just punt and use a minimum line length of 8192.
2220
lt_cv_sys_max_cmd_len=8192;
2223
netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2224
# This has been around since 386BSD, at least. Likely further.
2225
if test -x /sbin/sysctl; then
2226
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2227
elif test -x /usr/sbin/sysctl; then
2228
lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2230
lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
2232
# And add a safety zone
2233
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2234
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2238
# We know the value 262144 and hardcode it with a safety zone (like BSD)
2239
lt_cv_sys_max_cmd_len=196608
2243
# Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2244
# due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2245
# nice to cause kernel panics so lets avoid the loop below.
2246
# First set a reasonable default.
2247
lt_cv_sys_max_cmd_len=16384
2249
if test -x /sbin/sysconfig; then
2250
case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2251
*1*) lt_cv_sys_max_cmd_len=-1 ;;
2256
lt_cv_sys_max_cmd_len=102400
2258
sysv5* | sco5v6* | sysv4.2uw2*)
2259
kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2260
if test -n "$kargmax"; then
2261
lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
2263
lt_cv_sys_max_cmd_len=32768
2267
lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
2268
if test -n "$lt_cv_sys_max_cmd_len"; then
2269
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2270
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2272
# Make teststring a little bigger before we do anything with it.
2273
# a 1K string should be a reasonable start.
2274
for i in 1 2 3 4 5 6 7 8 ; do
2275
teststring=$teststring$teststring
2277
SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2278
# If test is not a shell built-in, we'll probably end up computing a
2279
# maximum length that is only half of the actual maximum length, but
2281
while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
2282
= "XX$teststring$teststring"; } >/dev/null 2>&1 &&
2283
test $i != 17 # 1/2 MB should be enough
2286
teststring=$teststring$teststring
2288
# Only check the string length outside the loop.
2289
lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
2291
# Add a significant safety factor because C++ compilers can tack on
2292
# massive amounts of additional arguments before passing them to the
2293
# linker. It appears as though 1/2 is a usable value.
2294
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2299
if test -n $lt_cv_sys_max_cmd_len ; then
2300
AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2304
max_cmd_len=$lt_cv_sys_max_cmd_len
2305
_LT_DECL([], [max_cmd_len], [0],
2306
[What is the maximum length of a command?])
2310
AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
2311
dnl aclocal-1.4 backwards compatibility:
2312
dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
2317
m4_defun([_LT_HEADER_DLFCN],
2318
[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
2319
])# _LT_HEADER_DLFCN
2322
# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2323
# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2324
# ----------------------------------------------------------------
2325
m4_defun([_LT_TRY_DLOPEN_SELF],
2326
[m4_require([_LT_HEADER_DLFCN])dnl
2327
if test "$cross_compiling" = yes; then :
2330
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2331
lt_status=$lt_dlunknown
2332
cat > conftest.$ac_ext <<_LT_EOF
2333
[#line __oline__ "configure"
2334
#include "confdefs.h"
2343
# define LT_DLGLOBAL RTLD_GLOBAL
2346
# define LT_DLGLOBAL DL_GLOBAL
2348
# define LT_DLGLOBAL 0
2352
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2353
find out it does not work in some platform. */
2354
#ifndef LT_DLLAZY_OR_NOW
2356
# define LT_DLLAZY_OR_NOW RTLD_LAZY
2359
# define LT_DLLAZY_OR_NOW DL_LAZY
2362
# define LT_DLLAZY_OR_NOW RTLD_NOW
2365
# define LT_DLLAZY_OR_NOW DL_NOW
2367
# define LT_DLLAZY_OR_NOW 0
2374
void fnord() { int i=42;}
2377
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2378
int status = $lt_dlunknown;
2382
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
2383
else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
2384
/* dlclose (self); */
2392
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
2393
(./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
2396
x$lt_dlno_uscore) $1 ;;
2397
x$lt_dlneed_uscore) $2 ;;
2398
x$lt_dlunknown|x*) $3 ;;
2401
# compilation failed
2406
])# _LT_TRY_DLOPEN_SELF
2409
# LT_SYS_DLOPEN_SELF
2410
# ------------------
2411
AC_DEFUN([LT_SYS_DLOPEN_SELF],
2412
[m4_require([_LT_HEADER_DLFCN])dnl
2413
if test "x$enable_dlopen" != xyes; then
2414
enable_dlopen=unknown
2415
enable_dlopen_self=unknown
2416
enable_dlopen_self_static=unknown
2423
lt_cv_dlopen="load_add_on"
2425
lt_cv_dlopen_self=yes
2428
mingw* | pw32* | cegcc*)
2429
lt_cv_dlopen="LoadLibrary"
2434
lt_cv_dlopen="dlopen"
2439
# if libdl is installed we need to link against it
2440
AC_CHECK_LIB([dl], [dlopen],
2441
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2444
lt_cv_dlopen_self=yes
2449
AC_CHECK_FUNC([shl_load],
2450
[lt_cv_dlopen="shl_load"],
2451
[AC_CHECK_LIB([dld], [shl_load],
2452
[lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
2453
[AC_CHECK_FUNC([dlopen],
2454
[lt_cv_dlopen="dlopen"],
2455
[AC_CHECK_LIB([dl], [dlopen],
2456
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2457
[AC_CHECK_LIB([svld], [dlopen],
2458
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2459
[AC_CHECK_LIB([dld], [dld_link],
2460
[lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
2469
if test "x$lt_cv_dlopen" != xno; then
2475
case $lt_cv_dlopen in
2477
save_CPPFLAGS="$CPPFLAGS"
2478
test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2480
save_LDFLAGS="$LDFLAGS"
2481
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2484
LIBS="$lt_cv_dlopen_libs $LIBS"
2486
AC_CACHE_CHECK([whether a program can dlopen itself],
2487
lt_cv_dlopen_self, [dnl
2488
_LT_TRY_DLOPEN_SELF(
2489
lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2490
lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2493
if test "x$lt_cv_dlopen_self" = xyes; then
2494
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2495
AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2496
lt_cv_dlopen_self_static, [dnl
2497
_LT_TRY_DLOPEN_SELF(
2498
lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2499
lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
2503
CPPFLAGS="$save_CPPFLAGS"
2504
LDFLAGS="$save_LDFLAGS"
2509
case $lt_cv_dlopen_self in
2510
yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2511
*) enable_dlopen_self=unknown ;;
2514
case $lt_cv_dlopen_self_static in
2515
yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2516
*) enable_dlopen_self_static=unknown ;;
2519
_LT_DECL([dlopen_support], [enable_dlopen], [0],
2520
[Whether dlopen is supported])
2521
_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2522
[Whether dlopen of programs is supported])
2523
_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2524
[Whether dlopen of statically linked programs is supported])
2525
])# LT_SYS_DLOPEN_SELF
2528
AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2529
dnl aclocal-1.4 backwards compatibility:
2530
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2533
# _LT_COMPILER_C_O([TAGNAME])
2534
# ---------------------------
2535
# Check to see if options -c and -o are simultaneously supported by compiler.
2536
# This macro does not hard code the compiler like AC_PROG_CC_C_O.
2537
m4_defun([_LT_COMPILER_C_O],
2538
[m4_require([_LT_DECL_SED])dnl
2539
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2540
m4_require([_LT_TAG_COMPILER])dnl
2541
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2542
[_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2543
[_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2544
$RM -r conftest 2>/dev/null
2548
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2550
lt_compiler_flag="-o out/conftest2.$ac_objext"
2551
# Insert the option either (1) after the last *FLAGS variable, or
2552
# (2) before a word containing "conftest.", or (3) at the end.
2553
# Note that $ac_compile itself does not contain backslashes and begins
2554
# with a dollar sign (not a hyphen), so the echo should work correctly.
2555
lt_compile=`echo "$ac_compile" | $SED \
2556
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2557
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2558
-e 's:$: $lt_compiler_flag:'`
2559
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2560
(eval "$lt_compile" 2>out/conftest.err)
2562
cat out/conftest.err >&AS_MESSAGE_LOG_FD
2563
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2564
if (exit $ac_status) && test -s out/conftest2.$ac_objext
2566
# The compiler can only warn and ignore the option if not recognized
2567
# So say no if there are warnings
2568
$ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
2569
$SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2570
if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2571
_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2574
chmod u+w . 2>&AS_MESSAGE_LOG_FD
2576
# SGI C++ compiler will create directory out/ii_files/ for
2577
# template instantiation
2578
test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2579
$RM out/* && rmdir out
2584
_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2585
[Does compiler simultaneously support -c and -o options?])
2586
])# _LT_COMPILER_C_O
2589
# _LT_COMPILER_FILE_LOCKS([TAGNAME])
2590
# ----------------------------------
2591
# Check to see if we can do hard links to lock some files if needed
2592
m4_defun([_LT_COMPILER_FILE_LOCKS],
2593
[m4_require([_LT_ENABLE_LOCK])dnl
2594
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2595
_LT_COMPILER_C_O([$1])
2597
hard_links="nottested"
2598
if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2599
# do not overwrite the value of need_locks provided by the user
2600
AC_MSG_CHECKING([if we can lock with hard links])
2603
ln conftest.a conftest.b 2>/dev/null && hard_links=no
2605
ln conftest.a conftest.b 2>&5 || hard_links=no
2606
ln conftest.a conftest.b 2>/dev/null && hard_links=no
2607
AC_MSG_RESULT([$hard_links])
2608
if test "$hard_links" = no; then
2609
AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2615
_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2616
])# _LT_COMPILER_FILE_LOCKS
2621
m4_defun([_LT_CHECK_OBJDIR],
2622
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2623
[rm -f .libs 2>/dev/null
2624
mkdir .libs 2>/dev/null
2625
if test -d .libs; then
2628
# MS-DOS does not allow filenames that begin with a dot.
2631
rmdir .libs 2>/dev/null])
2632
objdir=$lt_cv_objdir
2633
_LT_DECL([], [objdir], [0],
2634
[The name of the directory that contains temporary libtool files])dnl
2635
m4_pattern_allow([LT_OBJDIR])dnl
2636
AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
2637
[Define to the sub-directory in which libtool stores uninstalled libraries.])
2638
])# _LT_CHECK_OBJDIR
2641
# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2642
# --------------------------------------
2643
# Check hardcoding attributes.
2644
m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2645
[AC_MSG_CHECKING([how to hardcode library paths into programs])
2646
_LT_TAGVAR(hardcode_action, $1)=
2647
if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2648
test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2649
test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2651
# We can hardcode non-existent directories.
2652
if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
2653
# If the only mechanism to avoid hardcoding is shlibpath_var, we
2654
# have to relink, otherwise we might link with an installed library
2655
# when we should be linking with a yet-to-be-installed one
2656
## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2657
test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
2658
# Linking always hardcodes the temporary library directory.
2659
_LT_TAGVAR(hardcode_action, $1)=relink
2661
# We can link without hardcoding, and we can hardcode nonexisting dirs.
2662
_LT_TAGVAR(hardcode_action, $1)=immediate
2665
# We cannot hardcode anything, or else we can only hardcode existing
2667
_LT_TAGVAR(hardcode_action, $1)=unsupported
2669
AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2671
if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2672
test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2673
# Fast installation is not supported
2674
enable_fast_install=no
2675
elif test "$shlibpath_overrides_runpath" = yes ||
2676
test "$enable_shared" = no; then
2677
# Fast installation is not necessary
2678
enable_fast_install=needless
2680
_LT_TAGDECL([], [hardcode_action], [0],
2681
[How to hardcode a shared library path into an executable])
2682
])# _LT_LINKER_HARDCODE_LIBPATH
2687
m4_defun([_LT_CMD_STRIPLIB],
2688
[m4_require([_LT_DECL_EGREP])
2691
AC_MSG_CHECKING([whether stripping libraries is possible])
2692
if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2693
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2694
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2695
AC_MSG_RESULT([yes])
2697
# FIXME - insert some real tests, host_os isn't really good enough
2700
if test -n "$STRIP" ; then
2701
striplib="$STRIP -x"
2702
old_striplib="$STRIP -S"
2703
AC_MSG_RESULT([yes])
2713
_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2714
_LT_DECL([], [striplib], [1])
2715
])# _LT_CMD_STRIPLIB
2718
# _LT_SYS_DYNAMIC_LINKER([TAG])
2719
# -----------------------------
2720
# PORTME Fill in your ld.so characteristics
2721
m4_defun([_LT_SYS_DYNAMIC_LINKER],
2722
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2723
m4_require([_LT_DECL_EGREP])dnl
2724
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2725
m4_require([_LT_DECL_OBJDUMP])dnl
2726
m4_require([_LT_DECL_SED])dnl
2727
AC_MSG_CHECKING([dynamic linker characteristics])
2730
if test "$GCC" = yes; then
2732
darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2733
*) lt_awk_arg="/^libraries:/" ;;
2735
lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2736
if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
2737
# if the path contains ";" then we assume it to be the separator
2738
# otherwise default to the standard path separator (i.e. ":") - it is
2739
# assumed that no part of a normal pathname contains ";" but that should
2740
# okay in the real world where ";" in dirpaths is itself problematic.
2741
lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
2743
lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2745
# Ok, now we have the path, separated by spaces, we can step through it
2746
# and add multilib dir if necessary.
2747
lt_tmp_lt_search_path_spec=
2748
lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2749
for lt_sys_path in $lt_search_path_spec; do
2750
if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2751
lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2753
test -d "$lt_sys_path" && \
2754
lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2757
lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
2758
BEGIN {RS=" "; FS="/|\n";} {
2761
for (lt_i = NF; lt_i > 0; lt_i--) {
2762
if ($lt_i != "" && $lt_i != ".") {
2763
if ($lt_i == "..") {
2766
if (lt_count == 0) {
2767
lt_foo="/" $lt_i lt_foo;
2774
if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2775
if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2777
sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
2779
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2782
libname_spec='lib$name'
2790
shlibpath_overrides_runpath=unknown
2792
dynamic_linker="$host_os ld.so"
2793
sys_lib_dlsearch_path_spec="/lib /usr/lib"
2794
need_lib_prefix=unknown
2795
hardcode_into_libs=no
2797
# when you set need_version to no, make sure it does not cause -set_version
2798
# flags to be left without arguments
2799
need_version=unknown
2804
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2805
shlibpath_var=LIBPATH
2807
# AIX 3 has no versioning support, so we append a major version to the name.
2808
soname_spec='${libname}${release}${shared_ext}$major'
2815
hardcode_into_libs=yes
2816
if test "$host_cpu" = ia64; then
2817
# AIX 5 supports IA64
2818
library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2819
shlibpath_var=LD_LIBRARY_PATH
2821
# With GCC up to 2.95.x, collect2 would create an import file
2822
# for dependence libraries. The import file would start with
2823
# the line `#! .'. This would cause the generated library to
2824
# depend on `.', always an invalid library. This was fixed in
2825
# development snapshots of GCC prior to 3.0.
2827
aix4 | aix4.[[01]] | aix4.[[01]].*)
2828
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2830
echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2837
# AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2838
# soname into executable. Probably we can add versioning support to
2839
# collect2, so additional links can be useful in future.
2840
if test "$aix_use_runtimelinking" = yes; then
2841
# If using run time linking (on AIX 4.2 or later) use lib<name>.so
2842
# instead of lib<name>.a to let people know that these are not
2843
# typical AIX shared libraries.
2844
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2846
# We preserve .a as extension for shared libraries through AIX4.2
2847
# and later when we are not doing run time linking.
2848
library_names_spec='${libname}${release}.a $libname.a'
2849
soname_spec='${libname}${release}${shared_ext}$major'
2851
shlibpath_var=LIBPATH
2858
# Since July 2007 AmigaOS4 officially supports .so libraries.
2859
# When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2860
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2863
library_names_spec='$libname.ixlibrary $libname.a'
2864
# Create ${libname}_ixlibrary.a entries in /sys/libs.
2865
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'
2871
library_names_spec='${libname}${shared_ext}'
2872
dynamic_linker="$host_os ld.so"
2873
shlibpath_var=LIBRARY_PATH
2879
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2880
soname_spec='${libname}${release}${shared_ext}$major'
2881
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2882
shlibpath_var=LD_LIBRARY_PATH
2883
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2884
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2885
# the default ld.so.conf also contains /usr/contrib/lib and
2886
# /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2887
# libtool to hard-code these into programs
2890
cygwin* | mingw* | pw32* | cegcc*)
2891
version_type=windows
2896
case $GCC,$host_os in
2897
yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
2898
library_names_spec='$libname.dll.a'
2899
# DLL is installed to $(libdir)/../bin by postinstall_cmds
2900
postinstall_cmds='base_file=`basename \${file}`~
2901
dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2902
dldir=$destdir/`dirname \$dlpath`~
2903
test -d \$dldir || mkdir -p \$dldir~
2904
$install_prog $dir/$dlname \$dldir/$dlname~
2905
chmod a+x \$dldir/$dlname~
2906
if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2907
eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2909
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2910
dlpath=$dir/\$dldll~
2912
shlibpath_overrides_runpath=yes
2916
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
2917
soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2918
sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2921
# MinGW DLLs use traditional 'lib' prefix
2922
soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2923
sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2924
if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2925
# It is most probably a Windows format PATH printed by
2926
# mingw gcc, but we are running on Cygwin. Gcc prints its search
2927
# path with ; separators, and with drive letters. We can handle the
2928
# drive letters (cygwin fileutils understands them), so leave them,
2929
# especially as we might pass files found there to a mingw objdump,
2930
# which wouldn't understand a cygwinified path. Ahh.
2931
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2933
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2937
# pw32 DLLs use 'pw' prefix rather than 'lib'
2938
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2944
library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2947
dynamic_linker='Win32 ld.exe'
2948
# FIXME: first we should search . and the directory the executable is in
2952
darwin* | rhapsody*)
2953
dynamic_linker="$host_os dyld"
2957
library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2958
soname_spec='${libname}${release}${major}$shared_ext'
2959
shlibpath_overrides_runpath=yes
2960
shlibpath_var=DYLD_LIBRARY_PATH
2961
shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2963
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2964
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2971
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2972
soname_spec='${libname}${release}${shared_ext}$major'
2973
shlibpath_var=LD_LIBRARY_PATH
2980
freebsd* | dragonfly*)
2981
# DragonFly does not have aout. When/if they implement a new
2982
# versioning mechanism, adjust this.
2983
if test -x /usr/bin/objformat; then
2984
objformat=`/usr/bin/objformat`
2987
freebsd[[123]]*) objformat=aout ;;
2991
version_type=freebsd-$objformat
2992
case $version_type in
2994
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2999
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3003
shlibpath_var=LD_LIBRARY_PATH
3006
shlibpath_overrides_runpath=yes
3008
freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3009
shlibpath_overrides_runpath=yes
3010
hardcode_into_libs=yes
3012
freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3013
freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
3014
shlibpath_overrides_runpath=no
3015
hardcode_into_libs=yes
3017
*) # from 4.6 on, and DragonFly
3018
shlibpath_overrides_runpath=yes
3019
hardcode_into_libs=yes
3028
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3029
soname_spec='${libname}${release}${shared_ext}$major'
3030
shlibpath_var=LD_LIBRARY_PATH
3031
hardcode_into_libs=yes
3034
hpux9* | hpux10* | hpux11*)
3035
# Give a soname corresponding to the major version so that dld.sl refuses to
3036
# link against other versions.
3043
hardcode_into_libs=yes
3044
dynamic_linker="$host_os dld.so"
3045
shlibpath_var=LD_LIBRARY_PATH
3046
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3047
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3048
soname_spec='${libname}${release}${shared_ext}$major'
3049
if test "X$HPUX_IA64_MODE" = X32; then
3050
sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3052
sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3054
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3058
hardcode_into_libs=yes
3059
dynamic_linker="$host_os dld.sl"
3060
shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3061
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3062
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3063
soname_spec='${libname}${release}${shared_ext}$major'
3064
sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3065
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3069
dynamic_linker="$host_os dld.sl"
3070
shlibpath_var=SHLIB_PATH
3071
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3072
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3073
soname_spec='${libname}${release}${shared_ext}$major'
3076
# HP-UX runs *really* slowly unless shared libraries are mode 555.
3077
postinstall_cmds='chmod 555 $lib'
3084
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3085
soname_spec='${libname}${release}${shared_ext}$major'
3086
dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3087
shlibpath_var=LD_LIBRARY_PATH
3088
shlibpath_overrides_runpath=no
3089
hardcode_into_libs=yes
3092
irix5* | irix6* | nonstopux*)
3094
nonstopux*) version_type=nonstopux ;;
3096
if test "$lt_cv_prog_gnu_ld" = yes; then
3104
soname_spec='${libname}${release}${shared_ext}$major'
3105
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3107
irix5* | nonstopux*)
3111
case $LD in # libtool.m4 will add one of these switches to LD
3112
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3113
libsuff= shlibsuff= libmagic=32-bit;;
3114
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3115
libsuff=32 shlibsuff=N32 libmagic=N32;;
3116
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3117
libsuff=64 shlibsuff=64 libmagic=64-bit;;
3118
*) libsuff= shlibsuff= libmagic=never-match;;
3122
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3123
shlibpath_overrides_runpath=no
3124
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3125
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3126
hardcode_into_libs=yes
3129
# No shared lib support for Linux oldld, aout, or coff.
3130
linux*oldld* | linux*aout* | linux*coff*)
3134
# This must be Linux ELF.
3135
linux* | k*bsd*-gnu)
3139
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3140
soname_spec='${libname}${release}${shared_ext}$major'
3141
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3142
shlibpath_var=LD_LIBRARY_PATH
3143
shlibpath_overrides_runpath=no
3144
# Some binutils ld are patched to set DT_RUNPATH
3145
save_LDFLAGS=$LDFLAGS
3147
eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
3148
LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
3149
AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3150
[AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
3151
[shlibpath_overrides_runpath=yes])])
3152
LDFLAGS=$save_LDFLAGS
3155
# This implies no fast_install, which is unacceptable.
3156
# Some rework will be needed to allow for fast_install
3157
# before this can be enabled.
3158
hardcode_into_libs=yes
3160
# Append ld.so.conf contents to the search path
3161
if test -f /etc/ld.so.conf; then
3162
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' ' '`
3163
sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
3166
# We used to test for /lib/ld.so.1 and disable shared libraries on
3167
# powerpc, because MkLinux only supported shared libraries with the
3168
# GNU dynamic linker. Since this was broken with cross compilers,
3169
# most powerpc-linux boxes support dynamic linking these days and
3170
# people can always --disable-shared, the test was removed, and we
3171
# assume the GNU/Linux dynamic linker is in use.
3172
dynamic_linker='GNU/Linux ld.so'
3179
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3180
soname_spec='${libname}${release}${shared_ext}$major'
3181
shlibpath_var=LD_LIBRARY_PATH
3182
shlibpath_overrides_runpath=no
3183
hardcode_into_libs=yes
3184
dynamic_linker='NetBSD ld.elf_so'
3191
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
3192
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3193
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3194
dynamic_linker='NetBSD (a.out) ld.so'
3196
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3197
soname_spec='${libname}${release}${shared_ext}$major'
3198
dynamic_linker='NetBSD ld.elf_so'
3200
shlibpath_var=LD_LIBRARY_PATH
3201
shlibpath_overrides_runpath=yes
3202
hardcode_into_libs=yes
3207
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3208
shlibpath_var=LD_LIBRARY_PATH
3209
shlibpath_overrides_runpath=yes
3216
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3217
soname_spec='${libname}${release}${shared_ext}$major'
3218
shlibpath_var=LD_LIBRARY_PATH
3219
shlibpath_overrides_runpath=no
3220
hardcode_into_libs=yes
3221
dynamic_linker='ldqnx.so'
3226
sys_lib_dlsearch_path_spec="/usr/lib"
3228
# Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
3230
openbsd3.3 | openbsd3.3.*) need_version=yes ;;
3231
*) need_version=no ;;
3233
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3234
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3235
shlibpath_var=LD_LIBRARY_PATH
3236
if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3238
openbsd2.[[89]] | openbsd2.[[89]].*)
3239
shlibpath_overrides_runpath=no
3242
shlibpath_overrides_runpath=yes
3246
shlibpath_overrides_runpath=yes
3251
libname_spec='$name'
3254
library_names_spec='$libname${shared_ext} $libname.a'
3255
dynamic_linker='OS/2 ld.exe'
3256
shlibpath_var=LIBPATH
3259
osf3* | osf4* | osf5*)
3263
soname_spec='${libname}${release}${shared_ext}$major'
3264
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3265
shlibpath_var=LD_LIBRARY_PATH
3266
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3267
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3278
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3279
soname_spec='${libname}${release}${shared_ext}$major'
3280
shlibpath_var=LD_LIBRARY_PATH
3281
shlibpath_overrides_runpath=yes
3282
hardcode_into_libs=yes
3283
# ldd complains unless libraries are executable
3284
postinstall_cmds='chmod +x $lib'
3289
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3290
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3291
shlibpath_var=LD_LIBRARY_PATH
3292
shlibpath_overrides_runpath=yes
3293
if test "$with_gnu_ld" = yes; then
3301
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3302
soname_spec='${libname}${release}${shared_ext}$major'
3303
shlibpath_var=LD_LIBRARY_PATH
3304
case $host_vendor in
3306
shlibpath_overrides_runpath=no
3308
runpath_var=LD_RUN_PATH
3316
shlibpath_overrides_runpath=no
3317
sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3323
if test -d /usr/nec ;then
3325
library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
3326
soname_spec='$libname${shared_ext}.$major'
3327
shlibpath_var=LD_LIBRARY_PATH
3331
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3332
version_type=freebsd-elf
3335
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3336
soname_spec='${libname}${release}${shared_ext}$major'
3337
shlibpath_var=LD_LIBRARY_PATH
3338
shlibpath_overrides_runpath=yes
3339
hardcode_into_libs=yes
3340
if test "$with_gnu_ld" = yes; then
3341
sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3343
sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3346
sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3350
sys_lib_dlsearch_path_spec='/usr/lib'
3354
# TPF is a cross-target only. Preferred cross-host = GNU/Linux.
3358
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3359
shlibpath_var=LD_LIBRARY_PATH
3360
shlibpath_overrides_runpath=no
3361
hardcode_into_libs=yes
3366
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3367
soname_spec='${libname}${release}${shared_ext}$major'
3368
shlibpath_var=LD_LIBRARY_PATH
3375
AC_MSG_RESULT([$dynamic_linker])
3376
test "$dynamic_linker" = no && can_build_shared=no
3378
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3379
if test "$GCC" = yes; then
3380
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3383
if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
3384
sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
3386
if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
3387
sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
3390
_LT_DECL([], [variables_saved_for_relink], [1],
3391
[Variables whose values should be saved in libtool wrapper scripts and
3392
restored at link time])
3393
_LT_DECL([], [need_lib_prefix], [0],
3394
[Do we need the "lib" prefix for modules?])
3395
_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3396
_LT_DECL([], [version_type], [0], [Library versioning type])
3397
_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
3398
_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3399
_LT_DECL([], [shlibpath_overrides_runpath], [0],
3400
[Is shlibpath searched before the hard-coded library search path?])
3401
_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3402
_LT_DECL([], [library_names_spec], [1],
3403
[[List of archive names. First name is the real one, the rest are links.
3404
The last name is the one that the linker finds with -lNAME]])
3405
_LT_DECL([], [soname_spec], [1],
3406
[[The coded name of the library, if different from the real name]])
3407
_LT_DECL([], [postinstall_cmds], [2],
3408
[Command to use after installation of a shared archive])
3409
_LT_DECL([], [postuninstall_cmds], [2],
3410
[Command to use after uninstallation of a shared archive])
3411
_LT_DECL([], [finish_cmds], [2],
3412
[Commands used to finish a libtool library installation in a directory])
3413
_LT_DECL([], [finish_eval], [1],
3414
[[As "finish_cmds", except a single script fragment to be evaled but
3416
_LT_DECL([], [hardcode_into_libs], [0],
3417
[Whether we should hardcode library paths into libraries])
3418
_LT_DECL([], [sys_lib_search_path_spec], [2],
3419
[Compile-time system search path for libraries])
3420
_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
3421
[Run-time system search path for libraries])
3422
])# _LT_SYS_DYNAMIC_LINKER
3425
# _LT_PATH_TOOL_PREFIX(TOOL)
3426
# --------------------------
3427
# find a file program which can recognize shared library
3428
AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3429
[m4_require([_LT_DECL_EGREP])dnl
3430
AC_MSG_CHECKING([for $1])
3431
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3433
[[\\/*] | ?:[\\/]*])
3434
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3437
lt_save_MAGIC_CMD="$MAGIC_CMD"
3438
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3439
dnl $ac_dummy forces splitting on constant user-supplied paths.
3440
dnl POSIX.2 word splitting is done only on the output of word expansions,
3441
dnl not every word. This closes a longstanding sh security hole.
3442
ac_dummy="m4_if([$2], , $PATH, [$2])"
3443
for ac_dir in $ac_dummy; do
3445
test -z "$ac_dir" && ac_dir=.
3446
if test -f $ac_dir/$1; then
3447
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3448
if test -n "$file_magic_test_file"; then
3449
case $deplibs_check_method in
3451
file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3452
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3453
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3454
$EGREP "$file_magic_regex" > /dev/null; then
3459
*** Warning: the command libtool uses to detect shared libraries,
3460
*** $file_magic_cmd, produces output that libtool cannot recognize.
3461
*** The result is that libtool may fail to recognize shared libraries
3462
*** as such. This will affect the creation of libtool libraries that
3463
*** depend on shared libraries, but programs linked with such libtool
3464
*** libraries will work regardless of this problem. Nevertheless, you
3465
*** may want to report the problem to your system manager and/or to
3466
*** bug-libtool@gnu.org
3476
MAGIC_CMD="$lt_save_MAGIC_CMD"
3479
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3480
if test -n "$MAGIC_CMD"; then
3481
AC_MSG_RESULT($MAGIC_CMD)
3485
_LT_DECL([], [MAGIC_CMD], [0],
3486
[Used to examine libraries when file_magic_cmd begins with "file"])dnl
3487
])# _LT_PATH_TOOL_PREFIX
3490
AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3491
dnl aclocal-1.4 backwards compatibility:
3492
dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3497
# find a file program which can recognize a shared library
3498
m4_defun([_LT_PATH_MAGIC],
3499
[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3500
if test -z "$lt_cv_path_MAGIC_CMD"; then
3501
if test -n "$ac_tool_prefix"; then
3502
_LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3512
# find the pathname to the GNU or non-GNU linker
3513
AC_DEFUN([LT_PATH_LD],
3514
[AC_REQUIRE([AC_PROG_CC])dnl
3515
AC_REQUIRE([AC_CANONICAL_HOST])dnl
3516
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3517
m4_require([_LT_DECL_SED])dnl
3518
m4_require([_LT_DECL_EGREP])dnl
3520
AC_ARG_WITH([gnu-ld],
3521
[AS_HELP_STRING([--with-gnu-ld],
3522
[assume the C compiler uses GNU ld @<:@default=no@:>@])],
3523
[test "$withval" = no || with_gnu_ld=yes],
3524
[with_gnu_ld=no])dnl
3527
if test "$GCC" = yes; then
3528
# Check if gcc -print-prog-name=ld gives a path.
3529
AC_MSG_CHECKING([for ld used by $CC])
3532
# gcc leaves a trailing carriage return which upsets mingw
3533
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3535
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3538
# Accept absolute paths.
3539
[[\\/]]* | ?:[[\\/]]*)
3540
re_direlt='/[[^/]][[^/]]*/\.\./'
3541
# Canonicalize the pathname of ld
3542
ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3543
while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3544
ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3546
test -z "$LD" && LD="$ac_prog"
3549
# If it fails, then pretend we aren't using GCC.
3553
# If it is relative, then search for the first ld in PATH.
3557
elif test "$with_gnu_ld" = yes; then
3558
AC_MSG_CHECKING([for GNU ld])
3560
AC_MSG_CHECKING([for non-GNU ld])
3562
AC_CACHE_VAL(lt_cv_path_LD,
3563
[if test -z "$LD"; then
3564
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3565
for ac_dir in $PATH; do
3567
test -z "$ac_dir" && ac_dir=.
3568
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3569
lt_cv_path_LD="$ac_dir/$ac_prog"
3570
# Check to see if the program is GNU ld. I'd rather use --version,
3571
# but apparently some variants of GNU ld only accept -v.
3572
# Break only if it was the GNU/non-GNU ld that we prefer.
3573
case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3574
*GNU* | *'with BFD'*)
3575
test "$with_gnu_ld" != no && break
3578
test "$with_gnu_ld" != yes && break
3585
lt_cv_path_LD="$LD" # Let the user override the test with a path.
3588
if test -n "$LD"; then
3593
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3597
_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3601
AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3602
AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3603
dnl aclocal-1.4 backwards compatibility:
3604
dnl AC_DEFUN([AM_PROG_LD], [])
3605
dnl AC_DEFUN([AC_PROG_LD], [])
3610
m4_defun([_LT_PATH_LD_GNU],
3611
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3612
[# I'd rather use --version here, but apparently some GNU lds only accept -v.
3613
case `$LD -v 2>&1 </dev/null` in
3614
*GNU* | *'with BFD'*)
3615
lt_cv_prog_gnu_ld=yes
3618
lt_cv_prog_gnu_ld=no
3621
with_gnu_ld=$lt_cv_prog_gnu_ld
3627
# find reload flag for linker
3628
# -- PORTME Some linkers may need a different reload flag.
3629
m4_defun([_LT_CMD_RELOAD],
3630
[AC_CACHE_CHECK([for $LD option to reload object files],
3631
lt_cv_ld_reload_flag,
3632
[lt_cv_ld_reload_flag='-r'])
3633
reload_flag=$lt_cv_ld_reload_flag
3634
case $reload_flag in
3636
*) reload_flag=" $reload_flag" ;;
3638
reload_cmds='$LD$reload_flag -o $output$reload_objs'
3641
if test "$GCC" = yes; then
3642
reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3644
reload_cmds='$LD$reload_flag -o $output$reload_objs'
3648
_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3649
_LT_DECL([], [reload_cmds], [2])dnl
3653
# _LT_CHECK_MAGIC_METHOD
3654
# ----------------------
3655
# how to check for library dependencies
3656
# -- PORTME fill in with the dynamic library characteristics
3657
m4_defun([_LT_CHECK_MAGIC_METHOD],
3658
[m4_require([_LT_DECL_EGREP])
3659
m4_require([_LT_DECL_OBJDUMP])
3660
AC_CACHE_CHECK([how to recognize dependent libraries],
3661
lt_cv_deplibs_check_method,
3662
[lt_cv_file_magic_cmd='$MAGIC_CMD'
3663
lt_cv_file_magic_test_file=
3664
lt_cv_deplibs_check_method='unknown'
3665
# Need to set the preceding variable on all platforms that support
3666
# interlibrary dependencies.
3667
# 'none' -- dependencies not supported.
3668
# `unknown' -- same as none, but documents that we really don't know.
3669
# 'pass_all' -- all dependencies passed with no checks.
3670
# 'test_compile' -- check by making test program.
3671
# 'file_magic [[regex]]' -- check by looking for files in library path
3672
# which responds to the $file_magic_cmd with a given extended regex.
3673
# If you have `file' or equivalent on your system and you're not sure
3674
# whether `pass_all' will *always* work, you probably want this one.
3678
lt_cv_deplibs_check_method=pass_all
3682
lt_cv_deplibs_check_method=pass_all
3686
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3687
lt_cv_file_magic_cmd='/usr/bin/file -L'
3688
lt_cv_file_magic_test_file=/shlib/libc.so
3692
# func_win32_libid is a shell function defined in ltmain.sh
3693
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3694
lt_cv_file_magic_cmd='func_win32_libid'
3698
# Base MSYS/MinGW do not provide the 'file' command needed by
3699
# func_win32_libid shell function, so use a weaker test based on 'objdump',
3700
# unless we find 'file', for example because we are cross-compiling.
3701
if ( file / ) >/dev/null 2>&1; then
3702
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3703
lt_cv_file_magic_cmd='func_win32_libid'
3705
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3706
lt_cv_file_magic_cmd='$OBJDUMP -f'
3711
# use the weaker test based on 'objdump'. See mingw*.
3712
lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3713
lt_cv_file_magic_cmd='$OBJDUMP -f'
3716
darwin* | rhapsody*)
3717
lt_cv_deplibs_check_method=pass_all
3720
freebsd* | dragonfly*)
3721
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3724
# Not sure whether the presence of OpenBSD here was a mistake.
3725
# Let's accept both of them until this is cleared up.
3726
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3727
lt_cv_file_magic_cmd=/usr/bin/file
3728
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3732
lt_cv_deplibs_check_method=pass_all
3737
lt_cv_deplibs_check_method=pass_all
3740
hpux10.20* | hpux11*)
3741
lt_cv_file_magic_cmd=/usr/bin/file
3744
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3745
lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3748
[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]']
3749
lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3752
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3753
lt_cv_file_magic_test_file=/usr/lib/libc.sl
3759
# PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3760
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3763
irix5* | irix6* | nonstopux*)
3765
*-32|*"-32 ") libmagic=32-bit;;
3766
*-n32|*"-n32 ") libmagic=N32;;
3767
*-64|*"-64 ") libmagic=64-bit;;
3768
*) libmagic=never-match;;
3770
lt_cv_deplibs_check_method=pass_all
3773
# This must be Linux ELF.
3774
linux* | k*bsd*-gnu)
3775
lt_cv_deplibs_check_method=pass_all
3778
netbsd* | netbsdelf*-gnu)
3779
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3780
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3782
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3787
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3788
lt_cv_file_magic_cmd=/usr/bin/file
3789
lt_cv_file_magic_test_file=/usr/lib/libnls.so
3793
lt_cv_deplibs_check_method=pass_all
3797
if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3798
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3800
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3804
osf3* | osf4* | osf5*)
3805
lt_cv_deplibs_check_method=pass_all
3809
lt_cv_deplibs_check_method=pass_all
3813
lt_cv_deplibs_check_method=pass_all
3816
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3817
lt_cv_deplibs_check_method=pass_all
3821
case $host_vendor in
3823
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]]'
3824
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3827
lt_cv_deplibs_check_method=pass_all
3830
lt_cv_file_magic_cmd='/bin/file'
3831
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3834
lt_cv_file_magic_cmd='/bin/file'
3835
lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3836
lt_cv_file_magic_test_file=/lib/libc.so
3839
lt_cv_deplibs_check_method=pass_all
3842
lt_cv_deplibs_check_method=pass_all
3848
lt_cv_deplibs_check_method=pass_all
3852
file_magic_cmd=$lt_cv_file_magic_cmd
3853
deplibs_check_method=$lt_cv_deplibs_check_method
3854
test -z "$deplibs_check_method" && deplibs_check_method=unknown
3856
_LT_DECL([], [deplibs_check_method], [1],
3857
[Method to check whether dependent libraries are shared objects])
3858
_LT_DECL([], [file_magic_cmd], [1],
3859
[Command to use when deplibs_check_method == "file_magic"])
3860
])# _LT_CHECK_MAGIC_METHOD
3865
# find the pathname to a BSD- or MS-compatible name lister
3866
AC_DEFUN([LT_PATH_NM],
3867
[AC_REQUIRE([AC_PROG_CC])dnl
3868
AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3869
[if test -n "$NM"; then
3870
# Let the user override the test.
3873
lt_nm_to_check="${ac_tool_prefix}nm"
3874
if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3875
lt_nm_to_check="$lt_nm_to_check nm"
3877
for lt_tmp_nm in $lt_nm_to_check; do
3878
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3879
for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3881
test -z "$ac_dir" && ac_dir=.
3882
tmp_nm="$ac_dir/$lt_tmp_nm"
3883
if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3884
# Check to see if the nm accepts a BSD-compat flag.
3885
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
3886
# nm: unknown option "B" ignored
3887
# Tru64's nm complains that /dev/null is an invalid object file
3888
case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3889
*/dev/null* | *'Invalid file or object type'*)
3890
lt_cv_path_NM="$tmp_nm -B"
3894
case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3896
lt_cv_path_NM="$tmp_nm -p"
3900
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3901
continue # so that we can try to find one that supports BSD flags
3910
: ${lt_cv_path_NM=no}
3912
if test "$lt_cv_path_NM" != "no"; then
3915
# Didn't find any BSD compatible name lister, look for dumpbin.
3916
AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
3918
if test "$DUMPBIN" != ":"; then
3922
test -z "$NM" && NM=nm
3924
_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3926
AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3927
[lt_cv_nm_interface="BSD nm"
3928
echo "int some_variable = 0;" > conftest.$ac_ext
3929
(eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3930
(eval "$ac_compile" 2>conftest.err)
3931
cat conftest.err >&AS_MESSAGE_LOG_FD
3932
(eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3933
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3934
cat conftest.err >&AS_MESSAGE_LOG_FD
3935
(eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
3936
cat conftest.out >&AS_MESSAGE_LOG_FD
3937
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3938
lt_cv_nm_interface="MS dumpbin"
3944
AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3945
AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3946
dnl aclocal-1.4 backwards compatibility:
3947
dnl AC_DEFUN([AM_PROG_NM], [])
3948
dnl AC_DEFUN([AC_PROG_NM], [])
3953
# check for math library
3954
AC_DEFUN([LT_LIB_M],
3955
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3958
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3959
# These system don't have libm, or don't need it
3962
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3963
AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3966
AC_CHECK_LIB(m, cos, LIBM="-lm")
3973
AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3974
dnl aclocal-1.4 backwards compatibility:
3975
dnl AC_DEFUN([AC_CHECK_LIBM], [])
3978
# _LT_COMPILER_NO_RTTI([TAGNAME])
3979
# -------------------------------
3980
m4_defun([_LT_COMPILER_NO_RTTI],
3981
[m4_require([_LT_TAG_COMPILER])dnl
3983
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3985
if test "$GCC" = yes; then
3986
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3988
_LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3989
lt_cv_prog_compiler_rtti_exceptions,
3990
[-fno-rtti -fno-exceptions], [],
3991
[_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3993
_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3994
[Compiler flag to turn off builtin functions])
3995
])# _LT_COMPILER_NO_RTTI
3998
# _LT_CMD_GLOBAL_SYMBOLS
3999
# ----------------------
4000
m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
4001
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4002
AC_REQUIRE([AC_PROG_CC])dnl
4003
AC_REQUIRE([LT_PATH_NM])dnl
4004
AC_REQUIRE([LT_PATH_LD])dnl
4005
m4_require([_LT_DECL_SED])dnl
4006
m4_require([_LT_DECL_EGREP])dnl
4007
m4_require([_LT_TAG_COMPILER])dnl
4009
# Check for command to grab the raw symbol name followed by C symbol from nm.
4010
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4011
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4013
# These are sane defaults that work on at least a few old systems.
4014
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
4016
# Character class describing NM global symbol codes.
4017
symcode='[[BCDEGRST]]'
4019
# Regexp to match symbols that can be accessed directly from C.
4020
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4022
# Define system-specific variables.
4027
cygwin* | mingw* | pw32* | cegcc*)
4028
symcode='[[ABCDGISTW]]'
4031
if test "$host_cpu" = ia64; then
4032
symcode='[[ABCDEGRST]]'
4036
symcode='[[BCDEGRST]]'
4039
symcode='[[BCDEGQRST]]'
4050
sysv5* | sco5v6* | unixware* | OpenUNIX*)
4054
symcode='[[DFNSTU]]'
4058
# If we're using GNU nm, then use its standard symbol codes.
4059
case `$NM -V 2>&1` in
4060
*GNU* | *'with BFD'*)
4061
symcode='[[ABCDGIRSTW]]' ;;
4064
# Transform an extracted symbol line into a proper C declaration.
4065
# Some systems (esp. on ia64) link data and code symbols differently,
4066
# so use this general approach.
4067
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4069
# Transform an extracted symbol line into symbol name and symbol address
4070
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
4071
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'"
4073
# Handle CRLF in mingw tool chain
4077
opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4081
# Try without a prefix underscore, then with it.
4082
for ac_symprfx in "" "_"; do
4084
# Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4085
symxfrm="\\1 $ac_symprfx\\2 \\2"
4087
# Write the raw and C identifiers.
4088
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4089
# Fake it for dumpbin and say T for any non-static function
4090
# and D for any global variable.
4091
# Also find C++ and __fastcall symbols from MSVC++,
4092
# which start with @ or ?.
4093
lt_cv_sys_global_symbol_pipe="$AWK ['"\
4094
" {last_section=section; section=\$ 3};"\
4095
" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4096
" \$ 0!~/External *\|/{next};"\
4097
" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4098
" {if(hide[section]) next};"\
4099
" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
4100
" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
4101
" s[1]~/^[@?]/{print s[1], s[1]; next};"\
4102
" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
4103
" ' prfx=^$ac_symprfx]"
4105
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4108
# Check to see that the pipe works correctly.
4112
cat > conftest.$ac_ext <<_LT_EOF
4117
void nm_test_func(void);
4118
void nm_test_func(void){}
4122
int main(){nm_test_var='a';nm_test_func();return(0);}
4125
if AC_TRY_EVAL(ac_compile); then
4126
# Now try to grab the symbols.
4128
if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4129
# Try sorting and uniquifying the output.
4130
if sort "$nlist" | uniq > "$nlist"T; then
4131
mv -f "$nlist"T "$nlist"
4136
# Make sure that we snagged all the symbols we need.
4137
if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4138
if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4139
cat <<_LT_EOF > conftest.$ac_ext
4145
# Now generate the symbol file.
4146
eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4148
cat <<_LT_EOF >> conftest.$ac_ext
4150
/* The mapping between symbol names and symbols. */
4155
lt__PROGRAM__LTX_preloaded_symbols[[]] =
4157
{ "@PROGRAM@", (void *) 0 },
4159
$SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4160
cat <<\_LT_EOF >> conftest.$ac_ext
4164
/* This works around a problem in FreeBSD linker */
4165
#ifdef FREEBSD_WORKAROUND
4166
static const void *lt_preloaded_setup() {
4167
return lt__PROGRAM__LTX_preloaded_symbols;
4175
# Now try linking the two files.
4176
mv conftest.$ac_objext conftstm.$ac_objext
4177
lt_save_LIBS="$LIBS"
4178
lt_save_CFLAGS="$CFLAGS"
4179
LIBS="conftstm.$ac_objext"
4180
CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4181
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4184
LIBS="$lt_save_LIBS"
4185
CFLAGS="$lt_save_CFLAGS"
4187
echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4190
echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4193
echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4196
echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4197
cat conftest.$ac_ext >&5
4199
rm -rf conftest* conftst*
4201
# Do not use the global_symbol_pipe unless it works.
4202
if test "$pipe_works" = yes; then
4205
lt_cv_sys_global_symbol_pipe=
4209
if test -z "$lt_cv_sys_global_symbol_pipe"; then
4210
lt_cv_sys_global_symbol_to_cdecl=
4212
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4213
AC_MSG_RESULT(failed)
4218
_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4219
[Take the output of nm and produce a listing of raw symbols and C names])
4220
_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4221
[Transform the output of nm in a proper C declaration])
4222
_LT_DECL([global_symbol_to_c_name_address],
4223
[lt_cv_sys_global_symbol_to_c_name_address], [1],
4224
[Transform the output of nm in a C name address pair])
4225
_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4226
[lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4227
[Transform the output of nm in a C name address pair when lib prefix is needed])
4228
]) # _LT_CMD_GLOBAL_SYMBOLS
4231
# _LT_COMPILER_PIC([TAGNAME])
4232
# ---------------------------
4233
m4_defun([_LT_COMPILER_PIC],
4234
[m4_require([_LT_TAG_COMPILER])dnl
4235
_LT_TAGVAR(lt_prog_compiler_wl, $1)=
4236
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4237
_LT_TAGVAR(lt_prog_compiler_static, $1)=
4239
AC_MSG_CHECKING([for $compiler option to produce PIC])
4240
m4_if([$1], [CXX], [
4241
# C++ specific cases for pic, static, wl, etc.
4242
if test "$GXX" = yes; then
4243
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4244
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4248
# All AIX code is PIC.
4249
if test "$host_cpu" = ia64; then
4250
# AIX 5 now supports IA64 processor
4251
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4258
# see comment about AmigaOS4 .so support
4259
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4262
# FIXME: we need at least 68020 code to build shared libraries, but
4263
# adding the `-m68020' flag to GCC prevents building anything better,
4265
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4270
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4271
# PIC is the default for these OSes.
4273
mingw* | cygwin* | os2* | pw32* | cegcc*)
4274
# This hack is so that the source file can tell whether it is being
4275
# built for inclusion in a dll (and should export symbols for example).
4276
# Although the cygwin gcc ignores -fPIC, still need this for old-style
4277
# (--disable-auto-import) libraries
4278
m4_if([$1], [GCJ], [],
4279
[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4281
darwin* | rhapsody*)
4282
# PIC is the default on this platform
4283
# Common symbols not allowed in MH_DYLIB files
4284
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4287
# DJGPP does not support shared libraries at all
4288
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4291
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
4292
# Instead, we relocate shared libraries at runtime.
4295
if test -d /usr/nec; then
4296
_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4300
# PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4301
# PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4302
# sets the default TLS model and affects inlining.
4307
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4312
# QNX uses GNU C++, but need to define -shared option too, otherwise
4314
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4317
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4323
# All AIX code is PIC.
4324
if test "$host_cpu" = ia64; then
4325
# AIX 5 now supports IA64 processor
4326
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4328
_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4332
case $cc_basename in
4334
# Green Hills C++ Compiler
4335
# _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"
4340
case $cc_basename in
4342
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4345
# Green Hills C++ Compiler
4346
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4352
freebsd* | dragonfly*)
4353
# FreeBSD uses GNU C++
4355
hpux9* | hpux10* | hpux11*)
4356
case $cc_basename in
4358
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4359
_LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4360
if test "$host_cpu" != ia64; then
4361
_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4365
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4366
_LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4372
_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4381
# This is c89, which is MS Visual C++ (no shared libs)
4382
# Anyone wants to do a port?
4384
irix5* | irix6* | nonstopux*)
4385
case $cc_basename in
4387
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4388
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4389
# CC pic flag -KPIC is the default.
4395
linux* | k*bsd*-gnu)
4396
case $cc_basename in
4399
_LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4400
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4403
# old Intel C++ for x86_64 which still supported -KPIC.
4404
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4405
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4406
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4409
# Intel C++, used to be incompatible with GCC.
4410
# ICC 10 doesn't accept -KPIC any more.
4411
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4412
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4413
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4416
# Portland Group C++ compiler
4417
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4418
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4419
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4423
# Make sure the PIC flag is empty. It appears that all Alpha
4424
# Linux and Compaq Tru64 Unix objects are PIC.
4425
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4426
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4430
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4431
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4432
_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4435
case `$CC -V 2>&1 | sed 5q` in
4438
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4439
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4440
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4451
case $cc_basename in
4453
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4459
netbsd* | netbsdelf*-gnu)
4462
# QNX uses GNU C++, but need to define -shared option too, otherwise
4464
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4466
osf3* | osf4* | osf5*)
4467
case $cc_basename in
4469
_LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4472
# Rational C++ 2.4.1
4473
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4476
# Digital/Compaq C++
4477
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4478
# Make sure the PIC flag is empty. It appears that all Alpha
4479
# Linux and Compaq Tru64 Unix objects are PIC.
4480
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4481
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4490
case $cc_basename in
4492
# Sun C++ 4.2, 5.x and Centerline C++
4493
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4494
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4495
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4498
# Green Hills C++ Compiler
4499
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4506
case $cc_basename in
4509
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4510
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4514
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4520
sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4521
case $cc_basename in
4523
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4524
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4525
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4530
case $cc_basename in
4532
# NonStop-UX NCC 3.20
4533
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4542
_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4548
if test "$GCC" = yes; then
4549
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4550
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4554
# All AIX code is PIC.
4555
if test "$host_cpu" = ia64; then
4556
# AIX 5 now supports IA64 processor
4557
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4564
# see comment about AmigaOS4 .so support
4565
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4568
# FIXME: we need at least 68020 code to build shared libraries, but
4569
# adding the `-m68020' flag to GCC prevents building anything better,
4571
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4576
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4577
# PIC is the default for these OSes.
4580
mingw* | cygwin* | pw32* | os2* | cegcc*)
4581
# This hack is so that the source file can tell whether it is being
4582
# built for inclusion in a dll (and should export symbols for example).
4583
# Although the cygwin gcc ignores -fPIC, still need this for old-style
4584
# (--disable-auto-import) libraries
4585
m4_if([$1], [GCJ], [],
4586
[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4589
darwin* | rhapsody*)
4590
# PIC is the default on this platform
4591
# Common symbols not allowed in MH_DYLIB files
4592
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4596
# PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4597
# PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4598
# sets the default TLS model and affects inlining.
4604
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4610
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
4611
# Instead, we relocate shared libraries at runtime.
4615
# Just because we use GCC doesn't mean we suddenly get shared libraries
4616
# on systems that don't support them.
4617
_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4622
# QNX uses GNU C++, but need to define -shared option too, otherwise
4624
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4628
if test -d /usr/nec; then
4629
_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4634
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4638
# PORTME Check for flag to pass linker flags through the system compiler.
4641
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4642
if test "$host_cpu" = ia64; then
4643
# AIX 5 now supports IA64 processor
4644
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4646
_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4650
mingw* | cygwin* | pw32* | os2* | cegcc*)
4651
# This hack is so that the source file can tell whether it is being
4652
# built for inclusion in a dll (and should export symbols for example).
4653
m4_if([$1], [GCJ], [],
4654
[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4657
hpux9* | hpux10* | hpux11*)
4658
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4659
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4666
_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4669
# Is there a better lt_prog_compiler_static that works with the bundled CC?
4670
_LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4673
irix5* | irix6* | nonstopux*)
4674
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4675
# PIC (with -KPIC) is the default.
4676
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4679
linux* | k*bsd*-gnu)
4680
case $cc_basename in
4681
# old Intel for x86_64 which still supported -KPIC.
4683
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4684
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4685
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4687
# icc used to be incompatible with GCC.
4688
# ICC 10 doesn't accept -KPIC any more.
4690
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4691
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4692
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4694
# Lahey Fortran 8.1.
4696
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4697
_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4698
_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4700
pgcc* | pgf77* | pgf90* | pgf95*)
4701
# Portland Group compilers (*not* the Pentium gcc compiler,
4702
# which looks to be a dead project)
4703
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4704
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4705
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4708
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4709
# All Alpha code is PIC.
4710
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4713
# IBM XL C 8.0/Fortran 10.1 on PPC
4714
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4715
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4716
_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4719
case `$CC -V 2>&1 | sed 5q` in
4722
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4723
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4724
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4727
# Sun Fortran 8.3 passes all unrecognized flags to the linker
4728
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4729
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4730
_LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4738
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4739
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4743
# QNX uses GNU C++, but need to define -shared option too, otherwise
4745
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4748
osf3* | osf4* | osf5*)
4749
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4750
# All OSF/1 code is PIC.
4751
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4755
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4759
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4760
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4761
case $cc_basename in
4763
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4765
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4770
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4771
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4772
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4775
sysv4 | sysv4.2uw2* | sysv4.3*)
4776
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4777
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4778
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4782
if test -d /usr/nec ;then
4783
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4784
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4788
sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4789
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4790
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4791
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4795
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4796
_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4800
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4801
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4805
_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4811
# For platforms which do not support PIC, -DPIC is meaningless:
4813
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4816
_LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4819
AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4820
_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4821
[How to pass a linker flag through the compiler])
4824
# Check to make sure the PIC flag actually works.
4826
if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4827
_LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4828
[_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4829
[$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4830
[case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4832
*) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4834
[_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4835
_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4837
_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4838
[Additional compiler flags for building library objects])
4841
# Check to make sure the static flag actually works.
4843
wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4844
_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4845
_LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4846
$lt_tmp_static_flag,
4848
[_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4849
_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4850
[Compiler flag to prevent dynamic linking])
4851
])# _LT_COMPILER_PIC
4854
# _LT_LINKER_SHLIBS([TAGNAME])
4855
# ----------------------------
4856
# See if the linker supports building shared libraries.
4857
m4_defun([_LT_LINKER_SHLIBS],
4858
[AC_REQUIRE([LT_PATH_LD])dnl
4859
AC_REQUIRE([LT_PATH_NM])dnl
4860
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4861
m4_require([_LT_DECL_EGREP])dnl
4862
m4_require([_LT_DECL_SED])dnl
4863
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4864
m4_require([_LT_TAG_COMPILER])dnl
4865
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4866
m4_if([$1], [CXX], [
4867
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4870
# If we're using GNU nm, then we don't want the "-C" option.
4871
# -C means demangle to AIX nm, but means don't demangle with GNU nm
4872
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4873
_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'
4875
_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'
4879
_LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4881
cygwin* | mingw* | cegcc*)
4882
_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'
4884
linux* | k*bsd*-gnu)
4885
_LT_TAGVAR(link_all_deplibs, $1)=no
4888
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4891
_LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4894
_LT_TAGVAR(allow_undefined_flag, $1)=
4895
_LT_TAGVAR(always_export_symbols, $1)=no
4896
_LT_TAGVAR(archive_cmds, $1)=
4897
_LT_TAGVAR(archive_expsym_cmds, $1)=
4898
_LT_TAGVAR(compiler_needs_object, $1)=no
4899
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4900
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
4901
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4902
_LT_TAGVAR(hardcode_automatic, $1)=no
4903
_LT_TAGVAR(hardcode_direct, $1)=no
4904
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
4905
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4906
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4907
_LT_TAGVAR(hardcode_libdir_separator, $1)=
4908
_LT_TAGVAR(hardcode_minus_L, $1)=no
4909
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4910
_LT_TAGVAR(inherit_rpath, $1)=no
4911
_LT_TAGVAR(link_all_deplibs, $1)=unknown
4912
_LT_TAGVAR(module_cmds, $1)=
4913
_LT_TAGVAR(module_expsym_cmds, $1)=
4914
_LT_TAGVAR(old_archive_from_new_cmds, $1)=
4915
_LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4916
_LT_TAGVAR(thread_safe_flag_spec, $1)=
4917
_LT_TAGVAR(whole_archive_flag_spec, $1)=
4918
# include_expsyms should be a list of space-separated symbols to be *always*
4919
# included in the symbol list
4920
_LT_TAGVAR(include_expsyms, $1)=
4921
# exclude_expsyms can be an extended regexp of symbols to exclude
4922
# it will be wrapped by ` (' and `)$', so one must not match beginning or
4923
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4924
# as well as any symbol that contains `d'.
4925
_LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4926
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4927
# platforms (ab)use it in PIC code, but their linkers get confused if
4928
# the symbol is explicitly referenced. Since portable code cannot
4929
# rely on this symbol name, it's probably fine to never include it in
4930
# preloaded symbol tables.
4931
# Exclude shared library initialization/finalization symbols.
4932
dnl Note also adjust exclude_expsyms for C++ above.
4933
extract_expsyms_cmds=
4936
cygwin* | mingw* | pw32* | cegcc*)
4937
# FIXME: the MSVC++ port hasn't been tested in a loooong time
4938
# When not using gcc, we currently assume that we are using
4939
# Microsoft Visual C++.
4940
if test "$GCC" != yes; then
4945
# we just hope/assume this is gcc and not c89 (= MSVC++)
4951
linux* | k*bsd*-gnu)
4952
_LT_TAGVAR(link_all_deplibs, $1)=no
4956
_LT_TAGVAR(ld_shlibs, $1)=yes
4957
if test "$with_gnu_ld" = yes; then
4958
# If archive_cmds runs LD, not CC, wlarc should be empty
4961
# Set some defaults for GNU ld with shared library support. These
4962
# are reset later if shared libraries are not supported. Putting them
4963
# here allows them to be overridden if necessary.
4964
runpath_var=LD_RUN_PATH
4965
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4966
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4967
# ancient GNU ld didn't support --whole-archive et. al.
4968
if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4969
_LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4971
_LT_TAGVAR(whole_archive_flag_spec, $1)=
4973
supports_anon_versioning=no
4974
case `$LD -v 2>&1` in
4975
*\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4976
*\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4977
*\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4978
*\ 2.11.*) ;; # other 2.11 versions
4979
*) supports_anon_versioning=yes ;;
4982
# See if GNU ld supports shared libraries.
4985
# On AIX/PPC, the GNU linker is very broken
4986
if test "$host_cpu" != ia64; then
4987
_LT_TAGVAR(ld_shlibs, $1)=no
4990
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
4991
*** to be unable to reliably create shared libraries on AIX.
4992
*** Therefore, libtool is disabling shared libraries support. If you
4993
*** really care for shared libraries, you may want to modify your PATH
4994
*** so that a non-GNU linker is found, and then restart.
5003
# see comment about AmigaOS4 .so support
5004
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5005
_LT_TAGVAR(archive_expsym_cmds, $1)=''
5008
_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)'
5009
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5010
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5016
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5017
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5018
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5019
# support --undefined. This deserves some investigation. FIXME
5020
_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5022
_LT_TAGVAR(ld_shlibs, $1)=no
5026
cygwin* | mingw* | pw32* | cegcc*)
5027
# _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5028
# as there is no search path for DLLs.
5029
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5030
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5031
_LT_TAGVAR(always_export_symbols, $1)=no
5032
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5033
_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'
5035
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5036
_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'
5037
# If the export-symbols file already is a .def file (1st line
5038
# is EXPORTS), use it as is; otherwise, prepend...
5039
_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5040
cp $export_symbols $output_objdir/$soname.def;
5042
echo EXPORTS > $output_objdir/$soname.def;
5043
cat $export_symbols >> $output_objdir/$soname.def;
5045
$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5047
_LT_TAGVAR(ld_shlibs, $1)=no
5052
_LT_TAGVAR(hardcode_direct, $1)=no
5053
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5054
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5055
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5056
# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5057
# Instead, shared libraries are loaded at an image base (0x10000000 by
5058
# default) and relocated if they conflict, which is a slow very memory
5059
# consuming and fragmenting process. To avoid this, we pick a random,
5060
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5061
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
5062
_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'
5063
_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'
5066
gnu* | linux* | tpf* | k*bsd*-gnu)
5068
if test "$host_os" = linux-dietlibc; then
5069
case $cc_basename in
5070
diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
5073
if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5074
&& test "$tmp_diet" = no
5077
tmp_sharedflag='-shared'
5078
case $cc_basename,$host_cpu in
5079
pgcc*) # Portland Group C compiler
5080
_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'
5081
tmp_addflag=' $pic_flag'
5083
pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
5084
_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'
5085
tmp_addflag=' $pic_flag -Mnomain' ;;
5086
ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
5087
tmp_addflag=' -i_dynamic' ;;
5088
efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
5089
tmp_addflag=' -i_dynamic -nofor_main' ;;
5090
ifc* | ifort*) # Intel Fortran compiler
5091
tmp_addflag=' -nofor_main' ;;
5092
lf95*) # Lahey Fortran 8.1
5093
_LT_TAGVAR(whole_archive_flag_spec, $1)=
5094
tmp_sharedflag='--shared' ;;
5095
xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
5096
tmp_sharedflag='-qmkshrobj'
5099
case `$CC -V 2>&1 | sed 5q` in
5100
*Sun\ C*) # Sun C 5.9
5101
_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'
5102
_LT_TAGVAR(compiler_needs_object, $1)=yes
5103
tmp_sharedflag='-G' ;;
5104
*Sun\ F*) # Sun Fortran 8.3
5105
tmp_sharedflag='-G' ;;
5107
_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5109
if test "x$supports_anon_versioning" = xyes; then
5110
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5111
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5112
echo "local: *; };" >> $output_objdir/$libname.ver~
5113
$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5116
case $cc_basename in
5118
# IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5119
_LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5120
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5121
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
5122
_LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
5123
if test "x$supports_anon_versioning" = xyes; then
5124
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5125
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5126
echo "local: *; };" >> $output_objdir/$libname.ver~
5127
$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5132
_LT_TAGVAR(ld_shlibs, $1)=no
5136
netbsd* | netbsdelf*-gnu)
5137
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5138
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5141
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5142
_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'
5147
if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5148
_LT_TAGVAR(ld_shlibs, $1)=no
5151
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5152
*** create shared libraries on Solaris systems. Therefore, libtool
5153
*** is disabling shared libraries support. We urge you to upgrade GNU
5154
*** binutils to release 2.9.1 or newer. Another option is to modify
5155
*** your PATH or compiler configuration so that the native linker is
5156
*** used, and then restart.
5159
elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5160
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5161
_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'
5163
_LT_TAGVAR(ld_shlibs, $1)=no
5167
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5168
case `$LD -v 2>&1` in
5169
*\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5170
_LT_TAGVAR(ld_shlibs, $1)=no
5173
*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5174
*** reliably create shared libraries on SCO systems. Therefore, libtool
5175
*** is disabling shared libraries support. We urge you to upgrade GNU
5176
*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
5177
*** your PATH or compiler configuration so that the native linker is
5178
*** used, and then restart.
5183
# For security reasons, it is highly recommended that you always
5184
# use absolute paths for naming shared libraries, and exclude the
5185
# DT_RUNPATH tag from executables and libraries. But doing so
5186
# requires that you compile everything twice, which is a pain.
5187
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5188
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5189
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5190
_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'
5192
_LT_TAGVAR(ld_shlibs, $1)=no
5199
_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5201
_LT_TAGVAR(hardcode_direct, $1)=yes
5202
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5206
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5207
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5208
_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'
5210
_LT_TAGVAR(ld_shlibs, $1)=no
5215
if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
5217
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5218
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
5219
_LT_TAGVAR(whole_archive_flag_spec, $1)=
5222
# PORTME fill in a description of your system's linker (not GNU ld)
5225
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5226
_LT_TAGVAR(always_export_symbols, $1)=yes
5227
_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'
5228
# Note: this linker hardcodes the directories in LIBPATH if there
5229
# are no directories specified by -L.
5230
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5231
if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5232
# Neither direct hardcoding nor static linking is supported with a
5234
_LT_TAGVAR(hardcode_direct, $1)=unsupported
5239
if test "$host_cpu" = ia64; then
5240
# On IA64, the linker does run time linking by default, so we don't
5241
# have to do anything special.
5242
aix_use_runtimelinking=no
5243
exp_sym_flag='-Bexport'
5246
# If we're using GNU nm, then we don't want the "-C" option.
5247
# -C means demangle to AIX nm, but means don't demangle with GNU nm
5248
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5249
_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'
5251
_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'
5253
aix_use_runtimelinking=no
5255
# Test if we are trying to use run time linking or normal
5256
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
5257
# need to do runtime linking.
5258
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5259
for ld_flag in $LDFLAGS; do
5260
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5261
aix_use_runtimelinking=yes
5268
exp_sym_flag='-bexport'
5269
no_entry_flag='-bnoentry'
5272
# When large executables or shared objects are built, AIX ld can
5273
# have problems creating the table of contents. If linking a library
5274
# or program results in "error TOC overflow" add -mminimal-toc to
5275
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5276
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5278
_LT_TAGVAR(archive_cmds, $1)=''
5279
_LT_TAGVAR(hardcode_direct, $1)=yes
5280
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5281
_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5282
_LT_TAGVAR(link_all_deplibs, $1)=yes
5283
_LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5285
if test "$GCC" = yes; then
5286
case $host_os in aix4.[[012]]|aix4.[[012]].*)
5287
# We only want to do this on AIX 4.2 and lower, the check
5288
# below for broken collect2 doesn't work under 4.3+
5289
collect2name=`${CC} -print-prog-name=collect2`
5290
if test -f "$collect2name" &&
5291
strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5293
# We have reworked collect2
5296
# We have old collect2
5297
_LT_TAGVAR(hardcode_direct, $1)=unsupported
5298
# It fails to find uninstalled libraries when the uninstalled
5299
# path is not listed in the libpath. Setting hardcode_minus_L
5300
# to unsupported forces relinking
5301
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5302
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5303
_LT_TAGVAR(hardcode_libdir_separator, $1)=
5307
shared_flag='-shared'
5308
if test "$aix_use_runtimelinking" = yes; then
5309
shared_flag="$shared_flag "'${wl}-G'
5311
_LT_TAGVAR(link_all_deplibs, $1)=no
5314
if test "$host_cpu" = ia64; then
5315
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5316
# chokes on -Wl,-G. The following line is correct:
5319
if test "$aix_use_runtimelinking" = yes; then
5320
shared_flag='${wl}-G'
5322
shared_flag='${wl}-bM:SRE'
5327
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5328
# It seems that -bexpall does not export symbols beginning with
5329
# underscore (_), so it is better to generate a list of symbols to export.
5330
_LT_TAGVAR(always_export_symbols, $1)=yes
5331
if test "$aix_use_runtimelinking" = yes; then
5332
# Warning - without using the other runtime loading flags (-brtl),
5333
# -berok will link without error, but may produce a broken library.
5334
_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5335
# Determine the default libpath from the value encoded in an
5337
_LT_SYS_MODULE_PATH_AIX
5338
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5339
_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"
5341
if test "$host_cpu" = ia64; then
5342
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5343
_LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5344
_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"
5346
# Determine the default libpath from the value encoded in an
5348
_LT_SYS_MODULE_PATH_AIX
5349
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5350
# Warning - without using the other run time loading flags,
5351
# -berok will link without error, but may produce a broken library.
5352
_LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5353
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5354
# Exported symbols can be pulled into shared objects from archives
5355
_LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5356
_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5357
# This is similar to how AIX traditionally builds its shared libraries.
5358
_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'
5366
# see comment about AmigaOS4 .so support
5367
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5368
_LT_TAGVAR(archive_expsym_cmds, $1)=''
5371
_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)'
5372
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5373
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5379
_LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5382
cygwin* | mingw* | pw32* | cegcc*)
5383
# When not using gcc, we currently assume that we are using
5384
# Microsoft Visual C++.
5385
# hardcode_libdir_flag_spec is actually meaningless, as there is
5386
# no search path for DLLs.
5387
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5388
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5389
# Tell ltmain to make .lib files, not .a files.
5391
# Tell ltmain to make .dll files, not .so files.
5393
# FIXME: Setting linknames here is a bad hack.
5394
_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5395
# The linker will automatically build a .lib file if we build a DLL.
5396
_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5397
# FIXME: Should let the user specify the lib program.
5398
_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5399
_LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
5400
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5403
darwin* | rhapsody*)
5404
_LT_DARWIN_LINKER_FEATURES($1)
5408
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5409
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5410
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5414
_LT_TAGVAR(ld_shlibs, $1)=no
5417
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5418
# support. Future versions do this automatically, but an explicit c++rt0.o
5419
# does not break anything, and helps significantly (at the cost of a little
5422
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5423
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5424
_LT_TAGVAR(hardcode_direct, $1)=yes
5425
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5428
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
5430
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5431
_LT_TAGVAR(hardcode_direct, $1)=yes
5432
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5433
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5436
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5437
freebsd* | dragonfly*)
5438
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5439
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5440
_LT_TAGVAR(hardcode_direct, $1)=yes
5441
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5445
if test "$GCC" = yes; then
5446
_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'
5448
_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'
5450
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5451
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5452
_LT_TAGVAR(hardcode_direct, $1)=yes
5454
# hardcode_minus_L: Not really in the search PATH,
5455
# but as the default location of the library.
5456
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5457
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5461
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5462
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5464
_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5466
if test "$with_gnu_ld" = no; then
5467
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5468
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5469
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5470
_LT_TAGVAR(hardcode_direct, $1)=yes
5471
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5472
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5473
# hardcode_minus_L: Not really in the search PATH,
5474
# but as the default location of the library.
5475
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5480
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5483
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5486
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5489
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5495
_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5498
_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5501
_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5505
if test "$with_gnu_ld" = no; then
5506
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5507
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5511
_LT_TAGVAR(hardcode_direct, $1)=no
5512
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5515
_LT_TAGVAR(hardcode_direct, $1)=yes
5516
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5517
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5519
# hardcode_minus_L: Not really in the search PATH,
5520
# but as the default location of the library.
5521
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5527
irix5* | irix6* | nonstopux*)
5528
if test "$GCC" = yes; then
5529
_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'
5530
# Try to use the -exported_symbol ld option, if it does not
5531
# work, assume that -exports_file does not work either and
5532
# implicitly export all symbols.
5533
save_LDFLAGS="$LDFLAGS"
5534
LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
5535
AC_LINK_IFELSE(int foo(void) {},
5536
_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'
5538
LDFLAGS="$save_LDFLAGS"
5540
_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'
5541
_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'
5543
_LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5544
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5545
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5546
_LT_TAGVAR(inherit_rpath, $1)=yes
5547
_LT_TAGVAR(link_all_deplibs, $1)=yes
5550
netbsd* | netbsdelf*-gnu)
5551
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5552
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
5554
_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
5556
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5557
_LT_TAGVAR(hardcode_direct, $1)=yes
5558
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5562
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5563
_LT_TAGVAR(hardcode_direct, $1)=yes
5564
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5565
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5566
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5573
if test -f /usr/libexec/ld.so; then
5574
_LT_TAGVAR(hardcode_direct, $1)=yes
5575
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5576
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5577
if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5578
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5579
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
5580
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5581
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5584
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5585
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5586
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5589
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5590
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5595
_LT_TAGVAR(ld_shlibs, $1)=no
5600
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5601
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5602
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5603
_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'
5604
_LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5608
if test "$GCC" = yes; then
5609
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5610
_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'
5612
_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5613
_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'
5615
_LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5616
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5617
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5620
osf4* | osf5*) # as osf3* with the addition of -msym flag
5621
if test "$GCC" = yes; then
5622
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5623
_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'
5624
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5626
_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5627
_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'
5628
_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~
5629
$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'
5631
# Both c and cxx compiler support -rpath directly
5632
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5634
_LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5635
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5639
_LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5640
if test "$GCC" = yes; then
5642
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5643
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5644
$CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5646
case `$CC -V 2>&1` in
5649
_LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5650
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5651
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5655
_LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5656
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5657
$CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5661
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5662
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5664
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5666
# The compiler driver will combine and reorder linker options,
5667
# but understands `-z linker_flag'. GCC discards it without `$wl',
5668
# but is careful enough not to reorder.
5669
# Supported since Solaris 2.6 (maybe 2.5.1?)
5670
if test "$GCC" = yes; then
5671
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
5673
_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5677
_LT_TAGVAR(link_all_deplibs, $1)=yes
5681
if test "x$host_vendor" = xsequent; then
5682
# Use $CC to link under sequent, because it throws in some extra .o
5683
# files that make .init and .fini sections work.
5684
_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5686
_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5688
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5689
_LT_TAGVAR(hardcode_direct, $1)=yes
5690
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5691
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5695
case $host_vendor in
5697
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5698
_LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5701
## LD is ld it makes a PLAMLIB
5702
## CC just makes a GrossModule.
5703
_LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5704
_LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5705
_LT_TAGVAR(hardcode_direct, $1)=no
5708
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5709
_LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5712
runpath_var='LD_RUN_PATH'
5713
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5717
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5718
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5719
_LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5723
if test -d /usr/nec; then
5724
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5725
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5726
runpath_var=LD_RUN_PATH
5727
hardcode_runpath_var=yes
5728
_LT_TAGVAR(ld_shlibs, $1)=yes
5732
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5733
_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5734
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5735
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5736
runpath_var='LD_RUN_PATH'
5738
if test "$GCC" = yes; then
5739
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5740
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5742
_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5743
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5747
sysv5* | sco3.2v5* | sco5v6*)
5748
# Note: We can NOT use -z defs as we might desire, because we do not
5749
# link with -lc, and that would cause any symbols used from libc to
5750
# always be unresolved, which means just about no library would
5751
# ever link correctly. If we're not using GNU ld we use -z text
5752
# though, which does catch some bad symbols but isn't as heavy-handed
5754
_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5755
_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5756
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5757
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5758
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
5759
_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5760
_LT_TAGVAR(link_all_deplibs, $1)=yes
5761
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5762
runpath_var='LD_RUN_PATH'
5764
if test "$GCC" = yes; then
5765
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5766
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5768
_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5769
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5774
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5775
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5776
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5780
_LT_TAGVAR(ld_shlibs, $1)=no
5784
if test x$host_vendor = xsni; then
5786
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5787
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
5793
AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5794
test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5796
_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
5798
_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
5799
_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
5800
_LT_DECL([], [extract_expsyms_cmds], [2],
5801
[The commands to extract the exported symbol list from a shared archive])
5804
# Do we need to explicitly link libc?
5806
case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
5808
# Assume -lc should be added
5809
_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5811
if test "$enable_shared" = yes && test "$GCC" = yes; then
5812
case $_LT_TAGVAR(archive_cmds, $1) in
5814
# FIXME: we may have to deal with multi-command sequences.
5817
# Test whether the compiler implicitly links with -lc since on some
5818
# systems, -lgcc has to come before -lc. If gcc already passes -lc
5819
# to ld, don't add -lc before -lgcc.
5820
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
5822
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5824
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5827
libobjs=conftest.$ac_objext
5829
wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5830
pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5836
lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5837
_LT_TAGVAR(allow_undefined_flag, $1)=
5838
if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5840
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5842
_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5844
_LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5846
cat conftest.err 1>&5
5849
AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
5856
_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
5857
[Whether or not to add -lc for building shared libraries])
5858
_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
5859
[enable_shared_with_static_runtimes], [0],
5860
[Whether or not to disallow shared libs when runtime libs are static])
5861
_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
5862
[Compiler flag to allow reflexive dlopens])
5863
_LT_TAGDECL([], [whole_archive_flag_spec], [1],
5864
[Compiler flag to generate shared objects directly from archives])
5865
_LT_TAGDECL([], [compiler_needs_object], [1],
5866
[Whether the compiler copes with passing no objects directly])
5867
_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
5868
[Create an old-style archive from a shared archive])
5869
_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
5870
[Create a temporary old-style archive to link instead of a shared archive])
5871
_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
5872
_LT_TAGDECL([], [archive_expsym_cmds], [2])
5873
_LT_TAGDECL([], [module_cmds], [2],
5874
[Commands used to build a loadable module if different from building
5876
_LT_TAGDECL([], [module_expsym_cmds], [2])
5877
_LT_TAGDECL([], [with_gnu_ld], [1],
5878
[Whether we are building with GNU ld or not])
5879
_LT_TAGDECL([], [allow_undefined_flag], [1],
5880
[Flag that allows shared libraries with undefined symbols to be built])
5881
_LT_TAGDECL([], [no_undefined_flag], [1],
5882
[Flag that enforces no undefined symbols])
5883
_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
5884
[Flag to hardcode $libdir into a binary during linking.
5885
This must work even if $libdir does not exist])
5886
_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
5887
[[If ld is used when linking, flag to hardcode $libdir into a binary
5888
during linking. This must work even if $libdir does not exist]])
5889
_LT_TAGDECL([], [hardcode_libdir_separator], [1],
5890
[Whether we need a single "-rpath" flag with a separated argument])
5891
_LT_TAGDECL([], [hardcode_direct], [0],
5892
[Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5893
DIR into the resulting binary])
5894
_LT_TAGDECL([], [hardcode_direct_absolute], [0],
5895
[Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5896
DIR into the resulting binary and the resulting library dependency is
5897
"absolute", i.e impossible to change by setting ${shlibpath_var} if the
5898
library is relocated])
5899
_LT_TAGDECL([], [hardcode_minus_L], [0],
5900
[Set to "yes" if using the -LDIR flag during linking hardcodes DIR
5901
into the resulting binary])
5902
_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
5903
[Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
5904
into the resulting binary])
5905
_LT_TAGDECL([], [hardcode_automatic], [0],
5906
[Set to "yes" if building a shared library automatically hardcodes DIR
5907
into the library and all subsequent libraries and executables linked
5909
_LT_TAGDECL([], [inherit_rpath], [0],
5910
[Set to yes if linker adds runtime paths of dependent libraries
5911
to runtime path list])
5912
_LT_TAGDECL([], [link_all_deplibs], [0],
5913
[Whether libtool must link a program against all its dependency libraries])
5914
_LT_TAGDECL([], [fix_srcfile_path], [1],
5915
[Fix the shell variable $srcfile for the compiler])
5916
_LT_TAGDECL([], [always_export_symbols], [0],
5917
[Set to "yes" if exported symbols are required])
5918
_LT_TAGDECL([], [export_symbols_cmds], [2],
5919
[The commands to list exported symbols])
5920
_LT_TAGDECL([], [exclude_expsyms], [1],
5921
[Symbols that should not be listed in the preloaded symbols])
5922
_LT_TAGDECL([], [include_expsyms], [1],
5923
[Symbols that must always be exported])
5924
_LT_TAGDECL([], [prelink_cmds], [2],
5925
[Commands necessary for linking programs (against libraries) with templates])
5926
_LT_TAGDECL([], [file_list_spec], [1],
5927
[Specify filename containing input files])
5928
dnl FIXME: Not yet implemented
5929
dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
5930
dnl [Compiler flag to generate thread safe objects])
5931
])# _LT_LINKER_SHLIBS
5934
# _LT_LANG_C_CONFIG([TAG])
5935
# ------------------------
5936
# Ensure that the configuration variables for a C compiler are suitably
5937
# defined. These variables are subsequently used by _LT_CONFIG to write
5938
# the compiler configuration to `libtool'.
5939
m4_defun([_LT_LANG_C_CONFIG],
5940
[m4_require([_LT_DECL_EGREP])dnl
5944
# Source file extension for C test sources.
5947
# Object file extension for compiled C test sources.
5949
_LT_TAGVAR(objext, $1)=$objext
5951
# Code to be used in simple compile tests
5952
lt_simple_compile_test_code="int some_variable = 0;"
5954
# Code to be used in simple link tests
5955
lt_simple_link_test_code='int main(){return(0);}'
5958
# Save the default compiler, since it gets overwritten when the other
5959
# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
5960
compiler_DEFAULT=$CC
5962
# save warnings/boilerplate of simple test code
5963
_LT_COMPILER_BOILERPLATE
5964
_LT_LINKER_BOILERPLATE
5966
if test -n "$compiler"; then
5967
_LT_COMPILER_NO_RTTI($1)
5968
_LT_COMPILER_PIC($1)
5969
_LT_COMPILER_C_O($1)
5970
_LT_COMPILER_FILE_LOCKS($1)
5971
_LT_LINKER_SHLIBS($1)
5972
_LT_SYS_DYNAMIC_LINKER($1)
5973
_LT_LINKER_HARDCODE_LIBPATH($1)
5977
# Report which library types will actually be built
5978
AC_MSG_CHECKING([if libtool supports shared libraries])
5979
AC_MSG_RESULT([$can_build_shared])
5981
AC_MSG_CHECKING([whether to build shared libraries])
5982
test "$can_build_shared" = "no" && enable_shared=no
5984
# On AIX, shared libraries and static libraries use the same namespace, and
5985
# are all built from PIC.
5988
test "$enable_shared" = yes && enable_static=no
5989
if test -n "$RANLIB"; then
5990
archive_cmds="$archive_cmds~\$RANLIB \$lib"
5991
postinstall_cmds='$RANLIB $lib'
5996
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5997
test "$enable_shared" = yes && enable_static=no
6001
AC_MSG_RESULT([$enable_shared])
6003
AC_MSG_CHECKING([whether to build static libraries])
6004
# Make sure either enable_shared or enable_static is yes.
6005
test "$enable_shared" = yes || enable_static=yes
6006
AC_MSG_RESULT([$enable_static])
6012
])# _LT_LANG_C_CONFIG
6017
# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
6018
# compiler, we have our own version here.
6019
m4_defun([_LT_PROG_CXX],
6021
pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
6023
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
6024
( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
6025
(test "X$CXX" != "Xg++"))) ; then
6028
_lt_caught_CXX_error=yes
6030
popdef([AC_MSG_ERROR])
6033
dnl aclocal-1.4 backwards compatibility:
6034
dnl AC_DEFUN([_LT_PROG_CXX], [])
6037
# _LT_LANG_CXX_CONFIG([TAG])
6038
# --------------------------
6039
# Ensure that the configuration variables for a C++ compiler are suitably
6040
# defined. These variables are subsequently used by _LT_CONFIG to write
6041
# the compiler configuration to `libtool'.
6042
m4_defun([_LT_LANG_CXX_CONFIG],
6043
[AC_REQUIRE([_LT_PROG_CXX])dnl
6044
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6045
m4_require([_LT_DECL_EGREP])dnl
6048
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6049
_LT_TAGVAR(allow_undefined_flag, $1)=
6050
_LT_TAGVAR(always_export_symbols, $1)=no
6051
_LT_TAGVAR(archive_expsym_cmds, $1)=
6052
_LT_TAGVAR(compiler_needs_object, $1)=no
6053
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6054
_LT_TAGVAR(hardcode_direct, $1)=no
6055
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6056
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6057
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6058
_LT_TAGVAR(hardcode_libdir_separator, $1)=
6059
_LT_TAGVAR(hardcode_minus_L, $1)=no
6060
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6061
_LT_TAGVAR(hardcode_automatic, $1)=no
6062
_LT_TAGVAR(inherit_rpath, $1)=no
6063
_LT_TAGVAR(module_cmds, $1)=
6064
_LT_TAGVAR(module_expsym_cmds, $1)=
6065
_LT_TAGVAR(link_all_deplibs, $1)=unknown
6066
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6067
_LT_TAGVAR(no_undefined_flag, $1)=
6068
_LT_TAGVAR(whole_archive_flag_spec, $1)=
6069
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6071
# Source file extension for C++ test sources.
6074
# Object file extension for compiled C++ test sources.
6076
_LT_TAGVAR(objext, $1)=$objext
6078
# No sense in running all these tests if we already determined that
6079
# the CXX compiler isn't working. Some variables (like enable_shared)
6080
# are currently assumed to apply to all compilers on this platform,
6081
# and will be corrupted by setting them based on a non-working compiler.
6082
if test "$_lt_caught_CXX_error" != yes; then
6083
# Code to be used in simple compile tests
6084
lt_simple_compile_test_code="int some_variable = 0;"
6086
# Code to be used in simple link tests
6087
lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6089
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
6092
# save warnings/boilerplate of simple test code
6093
_LT_COMPILER_BOILERPLATE
6094
_LT_LINKER_BOILERPLATE
6096
# Allow CC to be a program name with arguments.
6101
lt_save_with_gnu_ld=$with_gnu_ld
6102
lt_save_path_LD=$lt_cv_path_LD
6103
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6104
lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6106
$as_unset lt_cv_prog_gnu_ld
6108
if test -n "${lt_cv_path_LDCXX+set}"; then
6109
lt_cv_path_LD=$lt_cv_path_LDCXX
6111
$as_unset lt_cv_path_LD
6113
test -z "${LDCXX+set}" || LD=$LDCXX
6116
_LT_TAGVAR(compiler, $1)=$CC
6117
_LT_CC_BASENAME([$compiler])
6119
if test -n "$compiler"; then
6120
# We don't want -fno-exception when compiling C++ code, so set the
6121
# no_builtin_flag separately
6122
if test "$GXX" = yes; then
6123
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6125
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6128
if test "$GXX" = yes; then
6129
# Set up default GNU C++ configuration
6133
# Check if GNU C++ uses GNU ld as the underlying linker, since the
6134
# archiving commands below assume that GNU ld is being used.
6135
if test "$with_gnu_ld" = yes; then
6136
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6137
_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'
6139
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6140
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6142
# If archive_cmds runs LD, not CC, wlarc should be empty
6143
# XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6144
# investigate it a little bit more. (MM)
6147
# ancient GNU ld didn't support --whole-archive et. al.
6148
if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6149
$GREP 'no-whole-archive' > /dev/null; then
6150
_LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6152
_LT_TAGVAR(whole_archive_flag_spec, $1)=
6158
# A generic and very simple default shared library creation
6159
# command for GNU C++ for the case where it uses the native
6160
# linker, instead of GNU ld. If possible, this setting should
6161
# overridden to take advantage of the native linker features on
6162
# the platform it is being used on.
6163
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6166
# Commands to make compiler produce verbose output that lists
6167
# what "hidden" libraries, object files and flags are used when
6168
# linking a shared library.
6169
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6177
# PORTME: fill in a description of your system's C++ link characteristics
6178
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6179
_LT_TAGVAR(ld_shlibs, $1)=yes
6182
# FIXME: insert proper C++ library support
6183
_LT_TAGVAR(ld_shlibs, $1)=no
6186
if test "$host_cpu" = ia64; then
6187
# On IA64, the linker does run time linking by default, so we don't
6188
# have to do anything special.
6189
aix_use_runtimelinking=no
6190
exp_sym_flag='-Bexport'
6193
aix_use_runtimelinking=no
6195
# Test if we are trying to use run time linking or normal
6196
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
6197
# need to do runtime linking.
6198
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6199
for ld_flag in $LDFLAGS; do
6202
aix_use_runtimelinking=yes
6210
exp_sym_flag='-bexport'
6211
no_entry_flag='-bnoentry'
6214
# When large executables or shared objects are built, AIX ld can
6215
# have problems creating the table of contents. If linking a library
6216
# or program results in "error TOC overflow" add -mminimal-toc to
6217
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6218
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6220
_LT_TAGVAR(archive_cmds, $1)=''
6221
_LT_TAGVAR(hardcode_direct, $1)=yes
6222
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6223
_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6224
_LT_TAGVAR(link_all_deplibs, $1)=yes
6225
_LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6227
if test "$GXX" = yes; then
6228
case $host_os in aix4.[[012]]|aix4.[[012]].*)
6229
# We only want to do this on AIX 4.2 and lower, the check
6230
# below for broken collect2 doesn't work under 4.3+
6231
collect2name=`${CC} -print-prog-name=collect2`
6232
if test -f "$collect2name" &&
6233
strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6235
# We have reworked collect2
6238
# We have old collect2
6239
_LT_TAGVAR(hardcode_direct, $1)=unsupported
6240
# It fails to find uninstalled libraries when the uninstalled
6241
# path is not listed in the libpath. Setting hardcode_minus_L
6242
# to unsupported forces relinking
6243
_LT_TAGVAR(hardcode_minus_L, $1)=yes
6244
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6245
_LT_TAGVAR(hardcode_libdir_separator, $1)=
6248
shared_flag='-shared'
6249
if test "$aix_use_runtimelinking" = yes; then
6250
shared_flag="$shared_flag "'${wl}-G'
6254
if test "$host_cpu" = ia64; then
6255
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6256
# chokes on -Wl,-G. The following line is correct:
6259
if test "$aix_use_runtimelinking" = yes; then
6260
shared_flag='${wl}-G'
6262
shared_flag='${wl}-bM:SRE'
6267
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6268
# It seems that -bexpall does not export symbols beginning with
6269
# underscore (_), so it is better to generate a list of symbols to
6271
_LT_TAGVAR(always_export_symbols, $1)=yes
6272
if test "$aix_use_runtimelinking" = yes; then
6273
# Warning - without using the other runtime loading flags (-brtl),
6274
# -berok will link without error, but may produce a broken library.
6275
_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6276
# Determine the default libpath from the value encoded in an empty
6278
_LT_SYS_MODULE_PATH_AIX
6279
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6281
_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"
6283
if test "$host_cpu" = ia64; then
6284
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6285
_LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6286
_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"
6288
# Determine the default libpath from the value encoded in an
6290
_LT_SYS_MODULE_PATH_AIX
6291
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6292
# Warning - without using the other run time loading flags,
6293
# -berok will link without error, but may produce a broken library.
6294
_LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6295
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6296
# Exported symbols can be pulled into shared objects from archives
6297
_LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6298
_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6299
# This is similar to how AIX traditionally builds its shared
6301
_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'
6307
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6308
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6309
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6310
# support --undefined. This deserves some investigation. FIXME
6311
_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6313
_LT_TAGVAR(ld_shlibs, $1)=no
6318
case $cc_basename in
6320
# FIXME: insert proper C++ library support
6321
_LT_TAGVAR(ld_shlibs, $1)=no
6326
cygwin* | mingw* | pw32* | cegcc*)
6327
# _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6328
# as there is no search path for DLLs.
6329
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6330
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6331
_LT_TAGVAR(always_export_symbols, $1)=no
6332
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6334
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6335
_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'
6336
# If the export-symbols file already is a .def file (1st line
6337
# is EXPORTS), use it as is; otherwise, prepend...
6338
_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6339
cp $export_symbols $output_objdir/$soname.def;
6341
echo EXPORTS > $output_objdir/$soname.def;
6342
cat $export_symbols >> $output_objdir/$soname.def;
6344
$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'
6346
_LT_TAGVAR(ld_shlibs, $1)=no
6349
darwin* | rhapsody*)
6350
_LT_DARWIN_LINKER_FEATURES($1)
6354
case $cc_basename in
6356
# FIXME: insert proper C++ library support
6357
_LT_TAGVAR(ld_shlibs, $1)=no
6360
# Green Hills C++ Compiler
6361
# FIXME: insert proper C++ library support
6362
_LT_TAGVAR(ld_shlibs, $1)=no
6365
# FIXME: insert proper C++ library support
6366
_LT_TAGVAR(ld_shlibs, $1)=no
6372
# C++ shared libraries reported to be fairly broken before
6374
_LT_TAGVAR(ld_shlibs, $1)=no
6378
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6381
freebsd* | dragonfly*)
6382
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6384
_LT_TAGVAR(ld_shlibs, $1)=yes
6391
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6392
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6393
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6394
_LT_TAGVAR(hardcode_direct, $1)=yes
6395
_LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6396
# but as the default
6397
# location of the library.
6399
case $cc_basename in
6401
# FIXME: insert proper C++ library support
6402
_LT_TAGVAR(ld_shlibs, $1)=no
6405
_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'
6406
# Commands to make compiler produce verbose output that lists
6407
# what "hidden" libraries, object files and flags are used when
6408
# linking a shared library.
6410
# There doesn't appear to be a way to prevent this compiler from
6411
# explicitly linking system object files so we need to strip them
6412
# from the output so that they don't get included in the library
6414
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'
6417
if test "$GXX" = yes; then
6418
_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'
6420
# FIXME: insert proper C++ library support
6421
_LT_TAGVAR(ld_shlibs, $1)=no
6428
if test $with_gnu_ld = no; then
6429
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6430
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6436
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6442
_LT_TAGVAR(hardcode_direct, $1)=no
6443
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6446
_LT_TAGVAR(hardcode_direct, $1)=yes
6447
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6448
_LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6449
# but as the default
6450
# location of the library.
6454
case $cc_basename in
6456
# FIXME: insert proper C++ library support
6457
_LT_TAGVAR(ld_shlibs, $1)=no
6462
_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6465
_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6468
_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'
6471
# Commands to make compiler produce verbose output that lists
6472
# what "hidden" libraries, object files and flags are used when
6473
# linking a shared library.
6475
# There doesn't appear to be a way to prevent this compiler from
6476
# explicitly linking system object files so we need to strip them
6477
# from the output so that they don't get included in the library
6479
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'
6482
if test "$GXX" = yes; then
6483
if test $with_gnu_ld = no; then
6486
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6489
_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'
6492
_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'
6497
# FIXME: insert proper C++ library support
6498
_LT_TAGVAR(ld_shlibs, $1)=no
6505
_LT_TAGVAR(hardcode_direct, $1)=no
6506
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6507
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6508
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6509
# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6510
# Instead, shared libraries are loaded at an image base (0x10000000 by
6511
# default) and relocated if they conflict, which is a slow very memory
6512
# consuming and fragmenting process. To avoid this, we pick a random,
6513
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6514
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
6515
_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'
6516
_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'
6519
case $cc_basename in
6522
_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'
6524
# Archives containing C++ object files must be created using
6525
# "CC -ar", where "CC" is the IRIX C++ compiler. This is
6526
# necessary to make sure instantiated templates are included
6528
_LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6531
if test "$GXX" = yes; then
6532
if test "$with_gnu_ld" = no; then
6533
_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'
6535
_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'
6538
_LT_TAGVAR(link_all_deplibs, $1)=yes
6541
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6542
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6543
_LT_TAGVAR(inherit_rpath, $1)=yes
6546
linux* | k*bsd*-gnu)
6547
case $cc_basename in
6549
# Kuck and Associates, Inc. (KAI) C++ Compiler
6551
# KCC will only create a shared library if the output file
6552
# ends with ".so" (or ".sl" for HP-UX), so rename the library
6553
# to its proper name (with version) after linking.
6554
_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'
6555
_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'
6556
# Commands to make compiler produce verbose output that lists
6557
# what "hidden" libraries, object files and flags are used when
6558
# linking a shared library.
6560
# There doesn't appear to be a way to prevent this compiler from
6561
# explicitly linking system object files so we need to strip them
6562
# from the output so that they don't get included in the library
6564
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'
6566
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6567
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6569
# Archives containing C++ object files must be created using
6570
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
6571
_LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6576
# version 8.0 and above of icpc choke on multiply defined symbols
6577
# if we add $predep_objects and $postdep_objects, however 7.1 and
6578
# earlier do not add the objects themselves.
6579
case `$CC -V 2>&1` in
6581
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6582
_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'
6584
*) # Version 8.0 or newer
6587
ia64*) tmp_idyn=' -i_dynamic';;
6589
_LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6590
_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'
6593
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6594
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6595
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6596
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6599
# Portland Group C++ compiler
6601
*pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
6602
_LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
6604
$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
6605
compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
6606
_LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
6608
$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
6609
$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
6611
_LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
6613
$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6614
$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6615
_LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
6617
$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6618
$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'
6620
*) # Version 6 will use weak symbols
6621
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6622
_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'
6626
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6627
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6628
_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'
6632
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6633
_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'
6635
runpath_var=LD_RUN_PATH
6636
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6637
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6639
# Commands to make compiler produce verbose output that lists
6640
# what "hidden" libraries, object files and flags are used when
6641
# linking a shared library.
6643
# There doesn't appear to be a way to prevent this compiler from
6644
# explicitly linking system object files so we need to strip them
6645
# from the output so that they don't get included in the library
6647
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'
6650
# IBM XL 8.0 on PPC, with GNU ld
6651
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6652
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6653
_LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6654
if test "x$supports_anon_versioning" = xyes; then
6655
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6656
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6657
echo "local: *; };" >> $output_objdir/$libname.ver~
6658
$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6662
case `$CC -V 2>&1 | sed 5q` in
6665
_LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6666
_LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6667
_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'
6668
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6669
_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'
6670
_LT_TAGVAR(compiler_needs_object, $1)=yes
6672
# Not sure whether something based on
6673
# $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
6675
output_verbose_link_cmd='echo'
6677
# Archives containing C++ object files must be created using
6678
# "CC -xar", where "CC" is the Sun C++ compiler. This is
6679
# necessary to make sure instantiated templates are included
6681
_LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6689
# FIXME: insert proper C++ library support
6690
_LT_TAGVAR(ld_shlibs, $1)=no
6694
# FIXME: insert proper C++ library support
6695
_LT_TAGVAR(ld_shlibs, $1)=no
6699
case $cc_basename in
6701
# FIXME: insert proper C++ library support
6702
_LT_TAGVAR(ld_shlibs, $1)=no
6705
# FIXME: insert proper C++ library support
6706
_LT_TAGVAR(ld_shlibs, $1)=no
6712
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6713
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6715
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6716
_LT_TAGVAR(hardcode_direct, $1)=yes
6717
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6719
# Workaround some broken pre-1.5 toolchains
6720
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6724
_LT_TAGVAR(ld_shlibs, $1)=yes
6728
# C++ shared libraries are fairly broken
6729
_LT_TAGVAR(ld_shlibs, $1)=no
6733
if test -f /usr/libexec/ld.so; then
6734
_LT_TAGVAR(hardcode_direct, $1)=yes
6735
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6736
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6737
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6738
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6739
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6740
_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'
6741
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6742
_LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6744
output_verbose_link_cmd=echo
6746
_LT_TAGVAR(ld_shlibs, $1)=no
6750
osf3* | osf4* | osf5*)
6751
case $cc_basename in
6753
# Kuck and Associates, Inc. (KAI) C++ Compiler
6755
# KCC will only create a shared library if the output file
6756
# ends with ".so" (or ".sl" for HP-UX), so rename the library
6757
# to its proper name (with version) after linking.
6758
_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'
6760
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6761
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6763
# Archives containing C++ object files must be created using
6764
# the KAI C++ compiler.
6766
osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
6767
*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
6771
# Rational C++ 2.4.1
6772
# FIXME: insert proper C++ library support
6773
_LT_TAGVAR(ld_shlibs, $1)=no
6778
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6779
_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'
6780
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6783
_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6784
_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'
6785
_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6786
echo "-hidden">> $lib.exp~
6787
$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~
6789
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6793
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6795
# Commands to make compiler produce verbose output that lists
6796
# what "hidden" libraries, object files and flags are used when
6797
# linking a shared library.
6799
# There doesn't appear to be a way to prevent this compiler from
6800
# explicitly linking system object files so we need to strip them
6801
# from the output so that they don't get included in the library
6803
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'
6806
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6807
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6810
_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'
6813
_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'
6817
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6818
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6820
# Commands to make compiler produce verbose output that lists
6821
# what "hidden" libraries, object files and flags are used when
6822
# linking a shared library.
6823
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6826
# FIXME: insert proper C++ library support
6827
_LT_TAGVAR(ld_shlibs, $1)=no
6834
# FIXME: insert proper C++ library support
6835
_LT_TAGVAR(ld_shlibs, $1)=no
6839
case $cc_basename in
6842
# FIXME: insert proper C++ library support
6843
_LT_TAGVAR(ld_shlibs, $1)=no
6847
# FIXME: insert proper C++ library support
6848
_LT_TAGVAR(ld_shlibs, $1)=no
6851
# FIXME: insert proper C++ library support
6852
_LT_TAGVAR(ld_shlibs, $1)=no
6858
case $cc_basename in
6860
# Sun C++ 4.2, 5.x and Centerline C++
6861
_LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6862
_LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6863
_LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6864
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6865
$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'
6867
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6868
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6870
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6872
# The compiler driver will combine and reorder linker options,
6873
# but understands `-z linker_flag'.
6874
# Supported since Solaris 2.6 (maybe 2.5.1?)
6875
_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6878
_LT_TAGVAR(link_all_deplibs, $1)=yes
6880
output_verbose_link_cmd='echo'
6882
# Archives containing C++ object files must be created using
6883
# "CC -xar", where "CC" is the Sun C++ compiler. This is
6884
# necessary to make sure instantiated templates are included
6886
_LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6889
# Green Hills C++ Compiler
6890
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6892
# The C++ compiler must be used to create the archive.
6893
_LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6896
# GNU C++ compiler with Solaris linker
6897
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6898
_LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6899
if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6900
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6901
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6902
$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6904
# Commands to make compiler produce verbose output that lists
6905
# what "hidden" libraries, object files and flags are used when
6906
# linking a shared library.
6907
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6909
# g++ 2.7 appears to require `-G' NOT `-shared' on this
6911
_LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6912
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6913
$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6915
# Commands to make compiler produce verbose output that lists
6916
# what "hidden" libraries, object files and flags are used when
6917
# linking a shared library.
6918
output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6921
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6923
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6925
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6933
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6934
_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6935
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6936
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6937
runpath_var='LD_RUN_PATH'
6939
case $cc_basename in
6941
_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6942
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6945
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6946
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6951
sysv5* | sco3.2v5* | sco5v6*)
6952
# Note: We can NOT use -z defs as we might desire, because we do not
6953
# link with -lc, and that would cause any symbols used from libc to
6954
# always be unresolved, which means just about no library would
6955
# ever link correctly. If we're not using GNU ld we use -z text
6956
# though, which does catch some bad symbols but isn't as heavy-handed
6958
_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6959
_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6960
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6961
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6962
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6963
_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6964
_LT_TAGVAR(link_all_deplibs, $1)=yes
6965
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6966
runpath_var='LD_RUN_PATH'
6968
case $cc_basename in
6970
_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6971
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6974
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6975
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6981
case $cc_basename in
6983
# NonStop-UX NCC 3.20
6984
# FIXME: insert proper C++ library support
6985
_LT_TAGVAR(ld_shlibs, $1)=no
6988
# FIXME: insert proper C++ library support
6989
_LT_TAGVAR(ld_shlibs, $1)=no
6995
# FIXME: insert proper C++ library support
6996
_LT_TAGVAR(ld_shlibs, $1)=no
7000
# FIXME: insert proper C++ library support
7001
_LT_TAGVAR(ld_shlibs, $1)=no
7005
AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7006
test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7008
_LT_TAGVAR(GCC, $1)="$GXX"
7009
_LT_TAGVAR(LD, $1)="$LD"
7012
## There is no encapsulation within the following macros, do not change
7013
## the running order or otherwise move them around unless you know exactly
7014
## what you are doing...
7015
_LT_SYS_HIDDEN_LIBDEPS($1)
7016
_LT_COMPILER_PIC($1)
7017
_LT_COMPILER_C_O($1)
7018
_LT_COMPILER_FILE_LOCKS($1)
7019
_LT_LINKER_SHLIBS($1)
7020
_LT_SYS_DYNAMIC_LINKER($1)
7021
_LT_LINKER_HARDCODE_LIBPATH($1)
7024
fi # test -n "$compiler"
7030
with_gnu_ld=$lt_save_with_gnu_ld
7031
lt_cv_path_LDCXX=$lt_cv_path_LD
7032
lt_cv_path_LD=$lt_save_path_LD
7033
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7034
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7035
fi # test "$_lt_caught_CXX_error" != yes
7038
])# _LT_LANG_CXX_CONFIG
7041
# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7042
# ---------------------------------
7043
# Figure out "hidden" library dependencies from verbose
7044
# compiler output when linking a shared library.
7045
# Parse the compiler output and extract the necessary
7046
# objects, libraries and library flags.
7047
m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7048
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7049
# Dependencies to place before and after the object being linked:
7050
_LT_TAGVAR(predep_objects, $1)=
7051
_LT_TAGVAR(postdep_objects, $1)=
7052
_LT_TAGVAR(predeps, $1)=
7053
_LT_TAGVAR(postdeps, $1)=
7054
_LT_TAGVAR(compiler_lib_search_path, $1)=
7056
dnl we can't use the lt_simple_compile_test_code here,
7057
dnl because it contains code intended for an executable,
7058
dnl not a library. It's possible we should let each
7059
dnl tag define a new lt_????_link_test_code variable,
7060
dnl but it's only used here...
7061
m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7063
void foo (void) { a = 0; }
7065
], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7069
Foo (void) { a = 0; }
7074
], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7082
], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7090
], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7093
public void bar (void) {
7099
dnl Parse the compiler output and extract the necessary
7100
dnl objects, libraries and library flags.
7101
if AC_TRY_EVAL(ac_compile); then
7102
# Parse the compiler output and extract the necessary
7103
# objects, libraries and library flags.
7105
# Sentinel used to keep track of whether or not we are before
7106
# the conftest object file.
7107
pre_test_object_deps_done=no
7109
for p in `eval "$output_verbose_link_cmd"`; do
7113
# Some compilers place space between "-{L,R}" and the path.
7115
if test $p = "-L" ||
7116
test $p = "-R"; then
7123
if test "$pre_test_object_deps_done" = no; then
7126
# Internal compiler library paths should come after those
7127
# provided the user. The postdeps already come after the
7128
# user supplied libs so there is no need to process them.
7129
if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7130
_LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
7132
_LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
7135
# The "-l" case would never come before the object being
7136
# linked, so don't bother handling this case.
7139
if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7140
_LT_TAGVAR(postdeps, $1)="${prev}${p}"
7142
_LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
7148
# This assumes that the test object file only shows up
7149
# once in the compiler output.
7150
if test "$p" = "conftest.$objext"; then
7151
pre_test_object_deps_done=yes
7155
if test "$pre_test_object_deps_done" = no; then
7156
if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7157
_LT_TAGVAR(predep_objects, $1)="$p"
7159
_LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7162
if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7163
_LT_TAGVAR(postdep_objects, $1)="$p"
7165
_LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7170
*) ;; # Ignore the rest.
7178
echo "libtool.m4: error: problem compiling $1 test program"
7181
$RM -f confest.$objext
7183
# PORTME: override above test on systems where it is broken
7187
# Interix 3.5 installs completely hosed .la files for C++, so rather than
7188
# hack all around it, let's just trust "g++" to DTRT.
7189
_LT_TAGVAR(predep_objects,$1)=
7190
_LT_TAGVAR(postdep_objects,$1)=
7191
_LT_TAGVAR(postdeps,$1)=
7195
case `$CC -V 2>&1 | sed 5q` in
7199
# The more standards-conforming stlport4 library is
7200
# incompatible with the Cstd library. Avoid specifying
7201
# it if it's in CXXFLAGS. Ignore libCrun as
7202
# -library=stlport4 depends on it.
7203
case " $CXX $CXXFLAGS " in
7204
*" -library=stlport4 "*)
7205
solaris_use_stlport4=yes
7209
if test "$solaris_use_stlport4" != yes; then
7210
_LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7217
case $cc_basename in
7219
# The more standards-conforming stlport4 library is
7220
# incompatible with the Cstd library. Avoid specifying
7221
# it if it's in CXXFLAGS. Ignore libCrun as
7222
# -library=stlport4 depends on it.
7223
case " $CXX $CXXFLAGS " in
7224
*" -library=stlport4 "*)
7225
solaris_use_stlport4=yes
7229
# Adding this requires a known-good setup of shared libraries for
7230
# Sun compiler versions before 5.6, else PIC objects from an old
7231
# archive will be linked into the output, leading to subtle bugs.
7232
if test "$solaris_use_stlport4" != yes; then
7233
_LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7241
case " $_LT_TAGVAR(postdeps, $1) " in
7242
*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7244
_LT_TAGVAR(compiler_lib_search_dirs, $1)=
7245
if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7246
_LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
7248
_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7249
[The directories searched by this compiler when creating a shared library])
7250
_LT_TAGDECL([], [predep_objects], [1],
7251
[Dependencies to place before and after the objects being linked to
7252
create a shared library])
7253
_LT_TAGDECL([], [postdep_objects], [1])
7254
_LT_TAGDECL([], [predeps], [1])
7255
_LT_TAGDECL([], [postdeps], [1])
7256
_LT_TAGDECL([], [compiler_lib_search_path], [1],
7257
[The library search path used internally by the compiler when linking
7259
])# _LT_SYS_HIDDEN_LIBDEPS
7264
# Since AC_PROG_F77 is broken, in that it returns the empty string
7265
# if there is no fortran compiler, we have our own version here.
7266
m4_defun([_LT_PROG_F77],
7268
pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
7270
if test -z "$F77" || test "X$F77" = "Xno"; then
7273
popdef([AC_MSG_ERROR])
7276
dnl aclocal-1.4 backwards compatibility:
7277
dnl AC_DEFUN([_LT_PROG_F77], [])
7280
# _LT_LANG_F77_CONFIG([TAG])
7281
# --------------------------
7282
# Ensure that the configuration variables for a Fortran 77 compiler are
7283
# suitably defined. These variables are subsequently used by _LT_CONFIG
7284
# to write the compiler configuration to `libtool'.
7285
m4_defun([_LT_LANG_F77_CONFIG],
7286
[AC_REQUIRE([_LT_PROG_F77])dnl
7287
AC_LANG_PUSH(Fortran 77)
7289
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7290
_LT_TAGVAR(allow_undefined_flag, $1)=
7291
_LT_TAGVAR(always_export_symbols, $1)=no
7292
_LT_TAGVAR(archive_expsym_cmds, $1)=
7293
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7294
_LT_TAGVAR(hardcode_direct, $1)=no
7295
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7296
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7297
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7298
_LT_TAGVAR(hardcode_libdir_separator, $1)=
7299
_LT_TAGVAR(hardcode_minus_L, $1)=no
7300
_LT_TAGVAR(hardcode_automatic, $1)=no
7301
_LT_TAGVAR(inherit_rpath, $1)=no
7302
_LT_TAGVAR(module_cmds, $1)=
7303
_LT_TAGVAR(module_expsym_cmds, $1)=
7304
_LT_TAGVAR(link_all_deplibs, $1)=unknown
7305
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7306
_LT_TAGVAR(no_undefined_flag, $1)=
7307
_LT_TAGVAR(whole_archive_flag_spec, $1)=
7308
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7310
# Source file extension for f77 test sources.
7313
# Object file extension for compiled f77 test sources.
7315
_LT_TAGVAR(objext, $1)=$objext
7317
# No sense in running all these tests if we already determined that
7318
# the F77 compiler isn't working. Some variables (like enable_shared)
7319
# are currently assumed to apply to all compilers on this platform,
7320
# and will be corrupted by setting them based on a non-working compiler.
7321
if test "$_lt_disable_F77" != yes; then
7322
# Code to be used in simple compile tests
7323
lt_simple_compile_test_code="\
7329
# Code to be used in simple link tests
7330
lt_simple_link_test_code="\
7335
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7338
# save warnings/boilerplate of simple test code
7339
_LT_COMPILER_BOILERPLATE
7340
_LT_LINKER_BOILERPLATE
7342
# Allow CC to be a program name with arguments.
7347
_LT_TAGVAR(compiler, $1)=$CC
7348
_LT_CC_BASENAME([$compiler])
7350
if test -n "$compiler"; then
7351
AC_MSG_CHECKING([if libtool supports shared libraries])
7352
AC_MSG_RESULT([$can_build_shared])
7354
AC_MSG_CHECKING([whether to build shared libraries])
7355
test "$can_build_shared" = "no" && enable_shared=no
7357
# On AIX, shared libraries and static libraries use the same namespace, and
7358
# are all built from PIC.
7361
test "$enable_shared" = yes && enable_static=no
7362
if test -n "$RANLIB"; then
7363
archive_cmds="$archive_cmds~\$RANLIB \$lib"
7364
postinstall_cmds='$RANLIB $lib'
7368
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7369
test "$enable_shared" = yes && enable_static=no
7373
AC_MSG_RESULT([$enable_shared])
7375
AC_MSG_CHECKING([whether to build static libraries])
7376
# Make sure either enable_shared or enable_static is yes.
7377
test "$enable_shared" = yes || enable_static=yes
7378
AC_MSG_RESULT([$enable_static])
7380
_LT_TAGVAR(GCC, $1)="$G77"
7381
_LT_TAGVAR(LD, $1)="$LD"
7384
## There is no encapsulation within the following macros, do not change
7385
## the running order or otherwise move them around unless you know exactly
7386
## what you are doing...
7387
_LT_COMPILER_PIC($1)
7388
_LT_COMPILER_C_O($1)
7389
_LT_COMPILER_FILE_LOCKS($1)
7390
_LT_LINKER_SHLIBS($1)
7391
_LT_SYS_DYNAMIC_LINKER($1)
7392
_LT_LINKER_HARDCODE_LIBPATH($1)
7395
fi # test -n "$compiler"
7399
fi # test "$_lt_disable_F77" != yes
7402
])# _LT_LANG_F77_CONFIG
7407
# Since AC_PROG_FC is broken, in that it returns the empty string
7408
# if there is no fortran compiler, we have our own version here.
7409
m4_defun([_LT_PROG_FC],
7411
pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
7413
if test -z "$FC" || test "X$FC" = "Xno"; then
7416
popdef([AC_MSG_ERROR])
7419
dnl aclocal-1.4 backwards compatibility:
7420
dnl AC_DEFUN([_LT_PROG_FC], [])
7423
# _LT_LANG_FC_CONFIG([TAG])
7424
# -------------------------
7425
# Ensure that the configuration variables for a Fortran compiler are
7426
# suitably defined. These variables are subsequently used by _LT_CONFIG
7427
# to write the compiler configuration to `libtool'.
7428
m4_defun([_LT_LANG_FC_CONFIG],
7429
[AC_REQUIRE([_LT_PROG_FC])dnl
7430
AC_LANG_PUSH(Fortran)
7432
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7433
_LT_TAGVAR(allow_undefined_flag, $1)=
7434
_LT_TAGVAR(always_export_symbols, $1)=no
7435
_LT_TAGVAR(archive_expsym_cmds, $1)=
7436
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7437
_LT_TAGVAR(hardcode_direct, $1)=no
7438
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7439
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7440
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7441
_LT_TAGVAR(hardcode_libdir_separator, $1)=
7442
_LT_TAGVAR(hardcode_minus_L, $1)=no
7443
_LT_TAGVAR(hardcode_automatic, $1)=no
7444
_LT_TAGVAR(inherit_rpath, $1)=no
7445
_LT_TAGVAR(module_cmds, $1)=
7446
_LT_TAGVAR(module_expsym_cmds, $1)=
7447
_LT_TAGVAR(link_all_deplibs, $1)=unknown
7448
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7449
_LT_TAGVAR(no_undefined_flag, $1)=
7450
_LT_TAGVAR(whole_archive_flag_spec, $1)=
7451
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7453
# Source file extension for fc test sources.
7454
ac_ext=${ac_fc_srcext-f}
7456
# Object file extension for compiled fc test sources.
7458
_LT_TAGVAR(objext, $1)=$objext
7460
# No sense in running all these tests if we already determined that
7461
# the FC compiler isn't working. Some variables (like enable_shared)
7462
# are currently assumed to apply to all compilers on this platform,
7463
# and will be corrupted by setting them based on a non-working compiler.
7464
if test "$_lt_disable_FC" != yes; then
7465
# Code to be used in simple compile tests
7466
lt_simple_compile_test_code="\
7472
# Code to be used in simple link tests
7473
lt_simple_link_test_code="\
7478
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7481
# save warnings/boilerplate of simple test code
7482
_LT_COMPILER_BOILERPLATE
7483
_LT_LINKER_BOILERPLATE
7485
# Allow CC to be a program name with arguments.
7490
GCC=$ac_cv_fc_compiler_gnu
7492
_LT_TAGVAR(compiler, $1)=$CC
7493
_LT_CC_BASENAME([$compiler])
7495
if test -n "$compiler"; then
7496
AC_MSG_CHECKING([if libtool supports shared libraries])
7497
AC_MSG_RESULT([$can_build_shared])
7499
AC_MSG_CHECKING([whether to build shared libraries])
7500
test "$can_build_shared" = "no" && enable_shared=no
7502
# On AIX, shared libraries and static libraries use the same namespace, and
7503
# are all built from PIC.
7506
test "$enable_shared" = yes && enable_static=no
7507
if test -n "$RANLIB"; then
7508
archive_cmds="$archive_cmds~\$RANLIB \$lib"
7509
postinstall_cmds='$RANLIB $lib'
7513
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7514
test "$enable_shared" = yes && enable_static=no
7518
AC_MSG_RESULT([$enable_shared])
7520
AC_MSG_CHECKING([whether to build static libraries])
7521
# Make sure either enable_shared or enable_static is yes.
7522
test "$enable_shared" = yes || enable_static=yes
7523
AC_MSG_RESULT([$enable_static])
7525
_LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
7526
_LT_TAGVAR(LD, $1)="$LD"
7529
## There is no encapsulation within the following macros, do not change
7530
## the running order or otherwise move them around unless you know exactly
7531
## what you are doing...
7532
_LT_SYS_HIDDEN_LIBDEPS($1)
7533
_LT_COMPILER_PIC($1)
7534
_LT_COMPILER_C_O($1)
7535
_LT_COMPILER_FILE_LOCKS($1)
7536
_LT_LINKER_SHLIBS($1)
7537
_LT_SYS_DYNAMIC_LINKER($1)
7538
_LT_LINKER_HARDCODE_LIBPATH($1)
7541
fi # test -n "$compiler"
7545
fi # test "$_lt_disable_FC" != yes
7548
])# _LT_LANG_FC_CONFIG
7551
# _LT_LANG_GCJ_CONFIG([TAG])
7552
# --------------------------
7553
# Ensure that the configuration variables for the GNU Java Compiler compiler
7554
# are suitably defined. These variables are subsequently used by _LT_CONFIG
7555
# to write the compiler configuration to `libtool'.
7556
m4_defun([_LT_LANG_GCJ_CONFIG],
7557
[AC_REQUIRE([LT_PROG_GCJ])dnl
7560
# Source file extension for Java test sources.
7563
# Object file extension for compiled Java test sources.
7565
_LT_TAGVAR(objext, $1)=$objext
7567
# Code to be used in simple compile tests
7568
lt_simple_compile_test_code="class foo {}"
7570
# Code to be used in simple link tests
7571
lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7573
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7576
# save warnings/boilerplate of simple test code
7577
_LT_COMPILER_BOILERPLATE
7578
_LT_LINKER_BOILERPLATE
7580
# Allow CC to be a program name with arguments.
7586
_LT_TAGVAR(compiler, $1)=$CC
7587
_LT_TAGVAR(LD, $1)="$LD"
7588
_LT_CC_BASENAME([$compiler])
7590
# GCJ did not exist at the time GCC didn't implicitly link libc in.
7591
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7593
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7595
if test -n "$compiler"; then
7596
_LT_COMPILER_NO_RTTI($1)
7597
_LT_COMPILER_PIC($1)
7598
_LT_COMPILER_C_O($1)
7599
_LT_COMPILER_FILE_LOCKS($1)
7600
_LT_LINKER_SHLIBS($1)
7601
_LT_LINKER_HARDCODE_LIBPATH($1)
7610
])# _LT_LANG_GCJ_CONFIG
7613
# _LT_LANG_RC_CONFIG([TAG])
7614
# -------------------------
7615
# Ensure that the configuration variables for the Windows resource compiler
7616
# are suitably defined. These variables are subsequently used by _LT_CONFIG
7617
# to write the compiler configuration to `libtool'.
7618
m4_defun([_LT_LANG_RC_CONFIG],
7619
[AC_REQUIRE([LT_PROG_RC])dnl
7622
# Source file extension for RC test sources.
7625
# Object file extension for compiled RC test sources.
7627
_LT_TAGVAR(objext, $1)=$objext
7629
# Code to be used in simple compile tests
7630
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
7632
# Code to be used in simple link tests
7633
lt_simple_link_test_code="$lt_simple_compile_test_code"
7635
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7638
# save warnings/boilerplate of simple test code
7639
_LT_COMPILER_BOILERPLATE
7640
_LT_LINKER_BOILERPLATE
7642
# Allow CC to be a program name with arguments.
7648
_LT_TAGVAR(compiler, $1)=$CC
7649
_LT_CC_BASENAME([$compiler])
7650
_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
7652
if test -n "$compiler"; then
7660
])# _LT_LANG_RC_CONFIG
7665
AC_DEFUN([LT_PROG_GCJ],
7666
[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
7667
[m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
7668
[AC_CHECK_TOOL(GCJ, gcj,)
7669
test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7670
AC_SUBST(GCJFLAGS)])])[]dnl
7674
AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
7675
dnl aclocal-1.4 backwards compatibility:
7676
dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
7681
AC_DEFUN([LT_PROG_RC],
7682
[AC_CHECK_TOOL(RC, windres,)
7686
AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
7687
dnl aclocal-1.4 backwards compatibility:
7688
dnl AC_DEFUN([LT_AC_PROG_RC], [])
7693
# If we don't have a new enough Autoconf to choose the best grep
7694
# available, choose the one first in the user's PATH.
7695
m4_defun([_LT_DECL_EGREP],
7696
[AC_REQUIRE([AC_PROG_EGREP])dnl
7697
AC_REQUIRE([AC_PROG_FGREP])dnl
7698
test -z "$GREP" && GREP=grep
7699
_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
7700
_LT_DECL([], [EGREP], [1], [An ERE matcher])
7701
_LT_DECL([], [FGREP], [1], [A literal string matcher])
7702
dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
7709
# If we don't have a new enough Autoconf to choose the best objdump
7710
# available, choose the one first in the user's PATH.
7711
m4_defun([_LT_DECL_OBJDUMP],
7712
[AC_CHECK_TOOL(OBJDUMP, objdump, false)
7713
test -z "$OBJDUMP" && OBJDUMP=objdump
7714
_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
7721
# Check for a fully-functional sed program, that truncates
7722
# as few characters as possible. Prefer GNU sed if found.
7723
m4_defun([_LT_DECL_SED],
7725
test -z "$SED" && SED=sed
7726
Xsed="$SED -e 1s/^X//"
7727
_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
7728
_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
7729
[Sed that helps us avoid accidentally triggering echo(1) options like -n])
7732
m4_ifndef([AC_PROG_SED], [
7733
# NOTE: This macro has been submitted for inclusion into #
7734
# GNU Autoconf as AC_PROG_SED. When it is available in #
7735
# a released version of Autoconf we should remove this #
7736
# macro and use it instead. #
7738
m4_defun([AC_PROG_SED],
7739
[AC_MSG_CHECKING([for a sed that does not truncate output])
7740
AC_CACHE_VAL(lt_cv_path_SED,
7741
[# Loop through the user's path and test for sed and gsed.
7742
# Then use that list of sed's as ones to test for truncation.
7743
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7747
test -z "$as_dir" && as_dir=.
7748
for lt_ac_prog in sed gsed; do
7749
for ac_exec_ext in '' $ac_executable_extensions; do
7750
if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7751
lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7759
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
7760
# along with /bin/sed that truncates output.
7761
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7762
test ! -f $lt_ac_sed && continue
7763
cat /dev/null > conftest.in
7765
echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7766
# Check for GNU sed and select it if it is found.
7767
if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7768
lt_cv_path_SED=$lt_ac_sed
7772
cat conftest.in conftest.in >conftest.tmp
7773
mv conftest.tmp conftest.in
7774
cp conftest.in conftest.nl
7776
$lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7777
cmp -s conftest.out conftest.nl || break
7778
# 10000 chars as input seems more than enough
7779
test $lt_ac_count -gt 10 && break
7780
lt_ac_count=`expr $lt_ac_count + 1`
7781
if test $lt_ac_count -gt $lt_ac_max; then
7782
lt_ac_max=$lt_ac_count
7783
lt_cv_path_SED=$lt_ac_sed
7790
AC_MSG_RESULT([$SED])
7795
AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
7796
dnl aclocal-1.4 backwards compatibility:
7797
dnl AC_DEFUN([LT_AC_PROG_SED], [])
7800
# _LT_CHECK_SHELL_FEATURES
7801
# ------------------------
7802
# Find out whether the shell is Bourne or XSI compatible,
7803
# or has some other useful features.
7804
m4_defun([_LT_CHECK_SHELL_FEATURES],
7805
[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7806
# Try some XSI features
7809
test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
7811
&& eval 'test $(( 1 + 1 )) -eq 2 \
7812
&& test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7814
AC_MSG_RESULT([$xsi_shell])
7815
_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7817
AC_MSG_CHECKING([whether the shell understands "+="])
7819
( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7821
&& lt_shell_append=yes
7822
AC_MSG_RESULT([$lt_shell_append])
7823
_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
7825
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7830
_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
7832
# test EBCDIC or ASCII
7833
case `echo X|tr X '\101'` in
7834
A) # ASCII based system
7835
# \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7836
lt_SP2NL='tr \040 \012'
7837
lt_NL2SP='tr \015\012 \040\040'
7839
*) # EBCDIC based system
7840
lt_SP2NL='tr \100 \n'
7841
lt_NL2SP='tr \r\n \100\100'
7844
_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
7845
_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
7846
])# _LT_CHECK_SHELL_FEATURES
7849
# _LT_PROG_XSI_SHELLFNS
7850
# ---------------------
7851
# Bourne and XSI compatible variants of some useful shell functions.
7852
m4_defun([_LT_PROG_XSI_SHELLFNS],
7855
cat << \_LT_EOF >> "$cfgfile"
7857
# func_dirname file append nondir_replacement
7858
# Compute the dirname of FILE. If nonempty, add APPEND to the result,
7859
# otherwise set result to NONDIR_REPLACEMENT.
7863
*/*) func_dirname_result="${1%/*}${2}" ;;
7864
* ) func_dirname_result="${3}" ;;
7868
# func_basename file
7871
func_basename_result="${1##*/}"
7874
# func_dirname_and_basename file append nondir_replacement
7875
# perform func_basename and func_dirname in a single function
7877
# dirname: Compute the dirname of FILE. If nonempty,
7878
# add APPEND to the result, otherwise set result
7879
# to NONDIR_REPLACEMENT.
7880
# value returned in "$func_dirname_result"
7881
# basename: Compute filename of FILE.
7882
# value retuned in "$func_basename_result"
7883
# Implementation must be kept synchronized with func_dirname
7884
# and func_basename. For efficiency, we do not delegate to
7885
# those functions but instead duplicate the functionality here.
7886
func_dirname_and_basename ()
7889
*/*) func_dirname_result="${1%/*}${2}" ;;
7890
* ) func_dirname_result="${3}" ;;
7892
func_basename_result="${1##*/}"
7895
# func_stripname prefix suffix name
7896
# strip PREFIX and SUFFIX off of NAME.
7897
# PREFIX and SUFFIX must not contain globbing or regex special
7898
# characters, hashes, percent signs, but SUFFIX may contain a leading
7899
# dot (in which case that matches only a dot).
7902
# pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7903
# positional parameters, so assign one to ordinary parameter first.
7904
func_stripname_result=${3}
7905
func_stripname_result=${func_stripname_result#"${1}"}
7906
func_stripname_result=${func_stripname_result%"${2}"}
7912
func_opt_split_opt=${1%%=*}
7913
func_opt_split_arg=${1#*=}
7920
*.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7921
*) func_lo2o_result=${1} ;;
7925
# func_xform libobj-or-source
7928
func_xform_result=${1%.*}.lo
7931
# func_arith arithmetic-term...
7934
func_arith_result=$(( $[*] ))
7938
# STRING may not start with a hyphen.
7941
func_len_result=${#1}
7946
*) # Bourne compatible functions.
7947
cat << \_LT_EOF >> "$cfgfile"
7949
# func_dirname file append nondir_replacement
7950
# Compute the dirname of FILE. If nonempty, add APPEND to the result,
7951
# otherwise set result to NONDIR_REPLACEMENT.
7954
# Extract subdirectory from the argument.
7955
func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
7956
if test "X$func_dirname_result" = "X${1}"; then
7957
func_dirname_result="${3}"
7959
func_dirname_result="$func_dirname_result${2}"
7963
# func_basename file
7966
func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
7969
dnl func_dirname_and_basename
7970
dnl A portable version of this function is already defined in general.m4sh
7971
dnl so there is no need for it here.
7973
# func_stripname prefix suffix name
7974
# strip PREFIX and SUFFIX off of NAME.
7975
# PREFIX and SUFFIX must not contain globbing or regex special
7976
# characters, hashes, percent signs, but SUFFIX may contain a leading
7977
# dot (in which case that matches only a dot).
7978
# func_strip_suffix prefix name
7982
.*) func_stripname_result=`$ECHO "X${3}" \
7983
| $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
7984
*) func_stripname_result=`$ECHO "X${3}" \
7985
| $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
7990
my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
7991
my_sed_long_arg='1s/^-[[^=]]*=//'
7996
func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
7997
func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
8003
func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
8006
# func_xform libobj-or-source
8009
func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
8012
# func_arith arithmetic-term...
8015
func_arith_result=`expr "$[@]"`
8019
# STRING may not start with a hyphen.
8022
func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
8028
case $lt_shell_append in
8030
cat << \_LT_EOF >> "$cfgfile"
8032
# func_append var value
8033
# Append VALUE to the end of shell variable VAR.
8041
cat << \_LT_EOF >> "$cfgfile"
8043
# func_append var value
8044
# Append VALUE to the end of shell variable VAR.
8047
eval "$[1]=\$$[1]\$[2]"
8055
# Helper functions for option handling. -*- Autoconf -*-
8057
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
8058
# Written by Gary V. Vaughan, 2004
8060
# This file is free software; the Free Software Foundation gives
8061
# unlimited permission to copy and/or distribute it, with or without
8062
# modifications, as long as this notice is preserved.
8064
# serial 6 ltoptions.m4
8066
# This is to help aclocal find these macros, as it can't see m4_define.
8067
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
8070
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
8071
# ------------------------------------------
8072
m4_define([_LT_MANGLE_OPTION],
8073
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
8076
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
8077
# ---------------------------------------
8078
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
8079
# matching handler defined, dispatch to it. Other OPTION-NAMEs are
8081
m4_define([_LT_SET_OPTION],
8082
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
8083
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
8084
_LT_MANGLE_DEFUN([$1], [$2]),
8085
[m4_warning([Unknown $1 option `$2'])])[]dnl
8089
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
8090
# ------------------------------------------------------------
8091
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8092
m4_define([_LT_IF_OPTION],
8093
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
8096
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
8097
# -------------------------------------------------------
8098
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
8100
m4_define([_LT_UNLESS_OPTIONS],
8101
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8102
[m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
8103
[m4_define([$0_found])])])[]dnl
8104
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
8109
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
8110
# ----------------------------------------
8111
# OPTION-LIST is a space-separated list of Libtool options associated
8112
# with MACRO-NAME. If any OPTION has a matching handler declared with
8113
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
8114
# the unknown option and exit.
8115
m4_defun([_LT_SET_OPTIONS],
8117
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8118
[_LT_SET_OPTION([$1], _LT_Option)])
8120
m4_if([$1],[LT_INIT],[
8122
dnl Simply set some default values (i.e off) if boolean options were not
8124
_LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
8126
_LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
8129
dnl If no reference was made to various pairs of opposing options, then
8130
dnl we run the default mode handler for the pair. For example, if neither
8131
dnl `shared' nor `disable-shared' was passed, we enable building of shared
8132
dnl archives by default:
8133
_LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
8134
_LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
8135
_LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
8136
_LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
8137
[_LT_ENABLE_FAST_INSTALL])
8143
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
8144
# -----------------------------------------
8145
m4_define([_LT_MANGLE_DEFUN],
8146
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
8149
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
8150
# -----------------------------------------------
8151
m4_define([LT_OPTION_DEFINE],
8152
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
8153
])# LT_OPTION_DEFINE
8158
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
8161
AU_DEFUN([AC_LIBTOOL_DLOPEN],
8162
[_LT_SET_OPTION([LT_INIT], [dlopen])
8163
AC_DIAGNOSE([obsolete],
8164
[$0: Remove this warning and the call to _LT_SET_OPTION when you
8165
put the `dlopen' option into LT_INIT's first parameter.])
8168
dnl aclocal-1.4 backwards compatibility:
8169
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
8174
# Declare package support for building win32 dll's.
8175
LT_OPTION_DEFINE([LT_INIT], [win32-dll],
8176
[enable_win32_dll=yes
8179
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
8180
AC_CHECK_TOOL(AS, as, false)
8181
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8182
AC_CHECK_TOOL(OBJDUMP, objdump, false)
8186
test -z "$AS" && AS=as
8187
_LT_DECL([], [AS], [0], [Assembler program])dnl
8189
test -z "$DLLTOOL" && DLLTOOL=dlltool
8190
_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
8192
test -z "$OBJDUMP" && OBJDUMP=objdump
8193
_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
8196
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
8197
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8198
_LT_SET_OPTION([LT_INIT], [win32-dll])
8199
AC_DIAGNOSE([obsolete],
8200
[$0: Remove this warning and the call to _LT_SET_OPTION when you
8201
put the `win32-dll' option into LT_INIT's first parameter.])
8204
dnl aclocal-1.4 backwards compatibility:
8205
dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
8208
# _LT_ENABLE_SHARED([DEFAULT])
8209
# ----------------------------
8210
# implement the --enable-shared flag, and supports the `shared' and
8211
# `disable-shared' LT_INIT options.
8212
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
8213
m4_define([_LT_ENABLE_SHARED],
8214
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
8215
AC_ARG_ENABLE([shared],
8216
[AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
8217
[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
8218
[p=${PACKAGE-default}
8220
yes) enable_shared=yes ;;
8221
no) enable_shared=no ;;
8224
# Look at the argument we got. We use all the common list separators.
8225
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8226
for pkg in $enableval; do
8228
if test "X$pkg" = "X$p"; then
8235
[enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
8237
_LT_DECL([build_libtool_libs], [enable_shared], [0],
8238
[Whether or not to build shared libraries])
8239
])# _LT_ENABLE_SHARED
8241
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
8242
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
8245
AC_DEFUN([AC_ENABLE_SHARED],
8246
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
8249
AC_DEFUN([AC_DISABLE_SHARED],
8250
[_LT_SET_OPTION([LT_INIT], [disable-shared])
8253
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
8254
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
8256
dnl aclocal-1.4 backwards compatibility:
8257
dnl AC_DEFUN([AM_ENABLE_SHARED], [])
8258
dnl AC_DEFUN([AM_DISABLE_SHARED], [])
8262
# _LT_ENABLE_STATIC([DEFAULT])
8263
# ----------------------------
8264
# implement the --enable-static flag, and support the `static' and
8265
# `disable-static' LT_INIT options.
8266
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
8267
m4_define([_LT_ENABLE_STATIC],
8268
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
8269
AC_ARG_ENABLE([static],
8270
[AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
8271
[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
8272
[p=${PACKAGE-default}
8274
yes) enable_static=yes ;;
8275
no) enable_static=no ;;
8278
# Look at the argument we got. We use all the common list separators.
8279
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8280
for pkg in $enableval; do
8282
if test "X$pkg" = "X$p"; then
8289
[enable_static=]_LT_ENABLE_STATIC_DEFAULT)
8291
_LT_DECL([build_old_libs], [enable_static], [0],
8292
[Whether or not to build static libraries])
8293
])# _LT_ENABLE_STATIC
8295
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
8296
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
8299
AC_DEFUN([AC_ENABLE_STATIC],
8300
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
8303
AC_DEFUN([AC_DISABLE_STATIC],
8304
[_LT_SET_OPTION([LT_INIT], [disable-static])
8307
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
8308
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
8310
dnl aclocal-1.4 backwards compatibility:
8311
dnl AC_DEFUN([AM_ENABLE_STATIC], [])
8312
dnl AC_DEFUN([AM_DISABLE_STATIC], [])
8316
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
8317
# ----------------------------------
8318
# implement the --enable-fast-install flag, and support the `fast-install'
8319
# and `disable-fast-install' LT_INIT options.
8320
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
8321
m4_define([_LT_ENABLE_FAST_INSTALL],
8322
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
8323
AC_ARG_ENABLE([fast-install],
8324
[AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
8325
[optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
8326
[p=${PACKAGE-default}
8328
yes) enable_fast_install=yes ;;
8329
no) enable_fast_install=no ;;
8331
enable_fast_install=no
8332
# Look at the argument we got. We use all the common list separators.
8333
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8334
for pkg in $enableval; do
8336
if test "X$pkg" = "X$p"; then
8337
enable_fast_install=yes
8343
[enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
8345
_LT_DECL([fast_install], [enable_fast_install], [0],
8346
[Whether or not to optimize for fast installation])dnl
8347
])# _LT_ENABLE_FAST_INSTALL
8349
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
8350
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
8353
AU_DEFUN([AC_ENABLE_FAST_INSTALL],
8354
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
8355
AC_DIAGNOSE([obsolete],
8356
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
8357
the `fast-install' option into LT_INIT's first parameter.])
8360
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
8361
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
8362
AC_DIAGNOSE([obsolete],
8363
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
8364
the `disable-fast-install' option into LT_INIT's first parameter.])
8367
dnl aclocal-1.4 backwards compatibility:
8368
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
8369
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
8372
# _LT_WITH_PIC([MODE])
8373
# --------------------
8374
# implement the --with-pic flag, and support the `pic-only' and `no-pic'
8376
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
8377
m4_define([_LT_WITH_PIC],
8379
[AS_HELP_STRING([--with-pic],
8380
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
8381
[pic_mode="$withval"],
8384
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
8386
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
8389
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
8390
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
8393
AU_DEFUN([AC_LIBTOOL_PICMODE],
8394
[_LT_SET_OPTION([LT_INIT], [pic-only])
8395
AC_DIAGNOSE([obsolete],
8396
[$0: Remove this warning and the call to _LT_SET_OPTION when you
8397
put the `pic-only' option into LT_INIT's first parameter.])
8400
dnl aclocal-1.4 backwards compatibility:
8401
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
8404
m4_define([_LTDL_MODE], [])
8405
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
8406
[m4_define([_LTDL_MODE], [nonrecursive])])
8407
LT_OPTION_DEFINE([LTDL_INIT], [recursive],
8408
[m4_define([_LTDL_MODE], [recursive])])
8409
LT_OPTION_DEFINE([LTDL_INIT], [subproject],
8410
[m4_define([_LTDL_MODE], [subproject])])
8412
m4_define([_LTDL_TYPE], [])
8413
LT_OPTION_DEFINE([LTDL_INIT], [installable],
8414
[m4_define([_LTDL_TYPE], [installable])])
8415
LT_OPTION_DEFINE([LTDL_INIT], [convenience],
8416
[m4_define([_LTDL_TYPE], [convenience])])
8418
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
8420
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
8421
# Written by Gary V. Vaughan, 2004
8423
# This file is free software; the Free Software Foundation gives
8424
# unlimited permission to copy and/or distribute it, with or without
8425
# modifications, as long as this notice is preserved.
8427
# serial 6 ltsugar.m4
8429
# This is to help aclocal find these macros, as it can't see m4_define.
8430
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
8433
# lt_join(SEP, ARG1, [ARG2...])
8434
# -----------------------------
8435
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
8436
# associated separator.
8437
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
8438
# versions in m4sugar had bugs.
8439
m4_define([lt_join],
8440
[m4_if([$#], [1], [],
8442
[m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
8443
m4_define([_lt_join],
8444
[m4_if([$#$2], [2], [],
8445
[m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
8451
# Manipulate m4 lists.
8452
# These macros are necessary as long as will still need to support
8453
# Autoconf-2.59 which quotes differently.
8454
m4_define([lt_car], [[$1]])
8456
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
8458
[m4_dquote(m4_shift($@))])])
8459
m4_define([lt_unquote], $1)
8462
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
8463
# ------------------------------------------
8464
# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
8465
# Note that neither SEPARATOR nor STRING are expanded; they are appended
8466
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
8467
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
8468
# than defined and empty).
8470
# This macro is needed until we can rely on Autoconf 2.62, since earlier
8471
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
8472
m4_define([lt_append],
8474
m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
8478
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
8479
# ----------------------------------------------------------
8480
# Produce a SEP delimited list of all paired combinations of elements of
8481
# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
8482
# has the form PREFIXmINFIXSUFFIXn.
8483
# Needed until we can rely on m4_combine added in Autoconf 2.62.
8484
m4_define([lt_combine],
8485
[m4_if(m4_eval([$# > 3]), [1],
8486
[m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
8487
[[m4_foreach([_Lt_prefix], [$2],
8488
[m4_foreach([_Lt_suffix],
8489
]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
8490
[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
8493
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
8494
# -----------------------------------------------------------------------
8495
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
8496
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
8497
m4_define([lt_if_append_uniq],
8499
[m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
8500
[lt_append([$1], [$2], [$3])$4],
8502
[lt_append([$1], [$2], [$3])$4])])
8505
# lt_dict_add(DICT, KEY, VALUE)
8506
# -----------------------------
8507
m4_define([lt_dict_add],
8508
[m4_define([$1($2)], [$3])])
8511
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
8512
# --------------------------------------------
8513
m4_define([lt_dict_add_subkey],
8514
[m4_define([$1($2:$3)], [$4])])
8517
# lt_dict_fetch(DICT, KEY, [SUBKEY])
8518
# ----------------------------------
8519
m4_define([lt_dict_fetch],
8521
m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
8522
m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
8525
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
8526
# -----------------------------------------------------------------
8527
m4_define([lt_if_dict_fetch],
8528
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
8533
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
8534
# --------------------------------------------------------------
8535
m4_define([lt_dict_filter],
8536
[m4_if([$5], [], [],
8537
[lt_join(m4_quote(m4_default([$4], [[, ]])),
8538
lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
8539
[lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
8542
# ltversion.m4 -- version numbers -*- Autoconf -*-
8544
# Copyright (C) 2004 Free Software Foundation, Inc.
8545
# Written by Scott James Remnant, 2004
8547
# This file is free software; the Free Software Foundation gives
8548
# unlimited permission to copy and/or distribute it, with or without
8549
# modifications, as long as this notice is preserved.
8551
# Generated from ltversion.in.
8553
# serial 3012 ltversion.m4
8554
# This file is part of GNU Libtool
8556
m4_define([LT_PACKAGE_VERSION], [2.2.6])
8557
m4_define([LT_PACKAGE_REVISION], [1.3012])
8559
AC_DEFUN([LTVERSION_VERSION],
8560
[macro_version='2.2.6'
8561
macro_revision='1.3012'
8562
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
8563
_LT_DECL(, macro_revision, 0)
8566
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
8568
# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
8569
# Written by Scott James Remnant, 2004.
8571
# This file is free software; the Free Software Foundation gives
8572
# unlimited permission to copy and/or distribute it, with or without
8573
# modifications, as long as this notice is preserved.
8575
# serial 4 lt~obsolete.m4
8577
# These exist entirely to fool aclocal when bootstrapping libtool.
8579
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
8580
# which have later been changed to m4_define as they aren't part of the
8581
# exported API, or moved to Autoconf or Automake where they belong.
8583
# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
8584
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
8585
# using a macro with the same name in our local m4/libtool.m4 it'll
8586
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
8587
# and doesn't know about Autoconf macros at all.)
8589
# So we provide this file, which has a silly filename so it's always
8590
# included after everything else. This provides aclocal with the
8591
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
8592
# because those macros already exist, or will be overwritten later.
8593
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
8595
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
8596
# Yes, that means every name once taken will need to remain here until
8597
# we give up compatibility with versions before 1.7, at which point
8598
# we need to keep only those names which we still refer to.
8600
# This is to help aclocal find these macros, as it can't see m4_define.
8601
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
8603
m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
8604
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
8605
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
8606
m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
8607
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
8608
m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
8609
m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
8610
m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
8611
m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
8612
m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
8613
m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
8614
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
8615
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
8616
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
8617
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
8618
m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
8619
m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
8620
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
8621
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
8622
m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
8623
m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
8624
m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
8625
m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
8626
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
8627
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
8628
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
8629
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
8630
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
8631
m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
8632
m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
8633
m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
8634
m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
8635
m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
8636
m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
8637
m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
8638
m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
8639
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
8640
m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
8641
m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
8642
m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
8643
m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
8644
m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
8645
m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])])
8646
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
8647
m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
8648
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
8649
m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
8650
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
8651
m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
8652
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
8653
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
8654
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
8655
m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
8656
m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
8657
m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
8659
# nls.m4 serial 3 (gettext-0.15)
8660
dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
8661
dnl This file is free software; the Free Software Foundation
8662
dnl gives unlimited permission to copy and/or distribute it,
8663
dnl with or without modifications, as long as this notice is preserved.
8665
dnl This file can can be used in projects which are not available under
8666
dnl the GNU General Public License or the GNU Library General Public
8667
dnl License but which still want to provide support for the GNU gettext
8669
dnl Please note that the actual code of the GNU gettext library is covered
8670
dnl by the GNU Library General Public License, and the rest of the GNU
8671
dnl gettext package package is covered by the GNU General Public License.
8672
dnl They are *not* in the public domain.
8675
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
8676
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
8682
AC_MSG_CHECKING([whether NLS is requested])
8683
dnl Default is enabled NLS
8685
[ --disable-nls do not use Native Language Support],
8686
USE_NLS=$enableval, USE_NLS=yes)
8687
AC_MSG_RESULT($USE_NLS)
8691
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
8693
# Copyright Ā© 2004 Scott James Remnant <scott@netsplit.com>.
8695
# This program is free software; you can redistribute it and/or modify
8696
# it under the terms of the GNU General Public License as published by
8697
# the Free Software Foundation; either version 2 of the License, or
8698
# (at your option) any later version.
8700
# This program is distributed in the hope that it will be useful, but
8701
# WITHOUT ANY WARRANTY; without even the implied warranty of
8702
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
8703
# General Public License for more details.
8705
# You should have received a copy of the GNU General Public License
8706
# along with this program; if not, write to the Free Software
8707
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
8709
# As a special exception to the GNU General Public License, if you
8710
# distribute this file as part of a program that contains a
8711
# configuration script generated by Autoconf, you may include it under
8712
# the same distribution terms that you use for the rest of that program.
8714
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
8715
# ----------------------------------
8716
AC_DEFUN([PKG_PROG_PKG_CONFIG],
8717
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
8718
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
8719
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
8720
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
8721
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
8723
if test -n "$PKG_CONFIG"; then
8724
_pkg_min_version=m4_default([$1], [0.9.0])
8725
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
8726
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
8727
AC_MSG_RESULT([yes])
8734
])# PKG_PROG_PKG_CONFIG
8736
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
8738
# Check to see whether a particular set of modules exists. Similar
8739
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
8742
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
8743
# this or PKG_CHECK_MODULES is called, or make sure to call
8744
# PKG_CHECK_EXISTS manually
8745
# --------------------------------------------------------------
8746
AC_DEFUN([PKG_CHECK_EXISTS],
8747
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8748
if test -n "$PKG_CONFIG" && \
8749
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
8750
m4_ifval([$2], [$2], [:])
8751
m4_ifvaln([$3], [else
8756
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
8757
# ---------------------------------------------
8758
m4_define([_PKG_CONFIG],
8759
[if test -n "$PKG_CONFIG"; then
8760
if test -n "$$1"; then
8763
PKG_CHECK_EXISTS([$3],
8764
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
8772
# _PKG_SHORT_ERRORS_SUPPORTED
8773
# -----------------------------
8774
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
8775
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
8776
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8777
_pkg_short_errors_supported=yes
8779
_pkg_short_errors_supported=no
8781
])# _PKG_SHORT_ERRORS_SUPPORTED
8784
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
8785
# [ACTION-IF-NOT-FOUND])
8788
# Note that if there is a possibility the first call to
8789
# PKG_CHECK_MODULES might not happen, you should be sure to include an
8790
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
8793
# --------------------------------------------------------------
8794
AC_DEFUN([PKG_CHECK_MODULES],
8795
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8796
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
8797
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
8800
AC_MSG_CHECKING([for $1])
8802
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
8803
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
8805
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
8806
and $1[]_LIBS to avoid the need to call pkg-config.
8807
See the pkg-config man page for more details.])
8809
if test $pkg_failed = yes; then
8810
_PKG_SHORT_ERRORS_SUPPORTED
8811
if test $_pkg_short_errors_supported = yes; then
8812
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
8814
$1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
8816
# Put the nasty error message in config.log where it belongs
8817
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
8819
ifelse([$4], , [AC_MSG_ERROR(dnl
8820
[Package requirements ($2) were not met:
8824
Consider adjusting the PKG_CONFIG_PATH environment variable if you
8825
installed software in a non-standard prefix.
8829
[AC_MSG_RESULT([no])
8831
elif test $pkg_failed = untried; then
8832
ifelse([$4], , [AC_MSG_FAILURE(dnl
8833
[The pkg-config script could not be found or is too old. Make sure it
8834
is in your PATH or set the PKG_CONFIG environment variable to the full
8839
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
8842
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
8843
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
8844
AC_MSG_RESULT([yes])
8845
ifelse([$3], , :, [$3])
8847
])# PKG_CHECK_MODULES
8849
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
8851
# This file is free software; the Free Software Foundation
8852
# gives unlimited permission to copy and/or distribute it,
8853
# with or without modifications, as long as this notice is preserved.
8855
# AM_AUTOMAKE_VERSION(VERSION)
8856
# ----------------------------
8857
# Automake X.Y traces this macro to ensure aclocal.m4 has been
8858
# generated from the m4 files accompanying Automake X.Y.
8859
# (This private macro should not be called outside this file.)
8860
AC_DEFUN([AM_AUTOMAKE_VERSION],
8861
[am__api_version='1.11'
8862
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
8863
dnl require some minimum version. Point them to the right macro.
8864
m4_if([$1], [1.11], [],
8865
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
8868
# _AM_AUTOCONF_VERSION(VERSION)
8869
# -----------------------------
8870
# aclocal traces this macro to find the Autoconf version.
8871
# This is a private macro too. Using m4_define simplifies
8872
# the logic in aclocal, which can simply ignore this definition.
8873
m4_define([_AM_AUTOCONF_VERSION], [])
8875
# AM_SET_CURRENT_AUTOMAKE_VERSION
8876
# -------------------------------
8877
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
8878
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
8879
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
8880
[AM_AUTOMAKE_VERSION([1.11])dnl
8881
m4_ifndef([AC_AUTOCONF_VERSION],
8882
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
8883
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
8885
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
8887
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
8889
# This file is free software; the Free Software Foundation
8890
# gives unlimited permission to copy and/or distribute it,
8891
# with or without modifications, as long as this notice is preserved.
8893
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
8894
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
8895
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
8897
# Of course, Automake must honor this variable whenever it calls a
8898
# tool from the auxiliary directory. The problem is that $srcdir (and
8899
# therefore $ac_aux_dir as well) can be either absolute or relative,
8900
# depending on how configure is run. This is pretty annoying, since
8901
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
8902
# source directory, any form will work fine, but in subdirectories a
8903
# relative path needs to be adjusted first.
8905
# $ac_aux_dir/missing
8906
# fails when called from a subdirectory if $ac_aux_dir is relative
8907
# $top_srcdir/$ac_aux_dir/missing
8908
# fails if $ac_aux_dir is absolute,
8909
# fails when called from a subdirectory in a VPATH build with
8910
# a relative $ac_aux_dir
8912
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
8913
# are both prefixed by $srcdir. In an in-source build this is usually
8914
# harmless because $srcdir is `.', but things will broke when you
8915
# start a VPATH build or use an absolute $srcdir.
8917
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
8918
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
8919
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
8920
# and then we would define $MISSING as
8921
# MISSING="\${SHELL} $am_aux_dir/missing"
8922
# This will work as long as MISSING is not called from configure, because
8923
# unfortunately $(top_srcdir) has no meaning in configure.
8924
# However there are other variables, like CC, which are often used in
8925
# configure, and could therefore not use this "fixed" $ac_aux_dir.
8927
# Another solution, used here, is to always expand $ac_aux_dir to an
8928
# absolute PATH. The drawback is that using absolute paths prevent a
8929
# configured tree to be moved without reconfiguration.
8931
AC_DEFUN([AM_AUX_DIR_EXPAND],
8932
[dnl Rely on autoconf to set up CDPATH properly.
8933
AC_PREREQ([2.50])dnl
8934
# expand $ac_aux_dir to an absolute path
8935
am_aux_dir=`cd $ac_aux_dir && pwd`
8938
# AM_CONDITIONAL -*- Autoconf -*-
8940
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
8941
# Free Software Foundation, Inc.
8943
# This file is free software; the Free Software Foundation
8944
# gives unlimited permission to copy and/or distribute it,
8945
# with or without modifications, as long as this notice is preserved.
8949
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
8950
# -------------------------------------
8951
# Define a conditional.
8952
AC_DEFUN([AM_CONDITIONAL],
8954
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
8955
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
8956
AC_SUBST([$1_TRUE])dnl
8957
AC_SUBST([$1_FALSE])dnl
8958
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
8959
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
8960
m4_define([_AM_COND_VALUE_$1], [$2])dnl
8968
AC_CONFIG_COMMANDS_PRE(
8969
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
8970
AC_MSG_ERROR([[conditional "$1" was never defined.
8971
Usually this means the macro was only invoked conditionally.]])
8974
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
8975
# Free Software Foundation, Inc.
8977
# This file is free software; the Free Software Foundation
8978
# gives unlimited permission to copy and/or distribute it,
8979
# with or without modifications, as long as this notice is preserved.
8983
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
8984
# written in clear, in which case automake, when reading aclocal.m4,
8985
# will think it sees a *use*, and therefore will trigger all it's
8986
# C support machinery. Also note that it means that autoscan, seeing
8987
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
8990
# _AM_DEPENDENCIES(NAME)
8991
# ----------------------
8992
# See how the compiler implements dependency checking.
8993
# NAME is "CC", "CXX", "GCJ", or "OBJC".
8994
# We try a few techniques and use that to set a single cache variable.
8996
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
8997
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
8998
# dependency, and given that the user is not expected to run this macro,
8999
# just rely on AC_PROG_CC.
9000
AC_DEFUN([_AM_DEPENDENCIES],
9001
[AC_REQUIRE([AM_SET_DEPDIR])dnl
9002
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
9003
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
9004
AC_REQUIRE([AM_DEP_TRACK])dnl
9006
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
9007
[$1], CXX, [depcc="$CXX" am_compiler_list=],
9008
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
9009
[$1], UPC, [depcc="$UPC" am_compiler_list=],
9010
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
9011
[depcc="$$1" am_compiler_list=])
9013
AC_CACHE_CHECK([dependency style of $depcc],
9014
[am_cv_$1_dependencies_compiler_type],
9015
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
9016
# We make a subdir and do the tests there. Otherwise we can end up
9017
# making bogus files that we don't know about and never remove. For
9018
# instance it was reported that on HP-UX the gcc test will end up
9019
# making a dummy file named `D' -- because `-MD' means `put the output
9022
# Copy depcomp to subdir because otherwise we won't find it if we're
9023
# using a relative directory.
9024
cp "$am_depcomp" conftest.dir
9026
# We will build objects and dependencies in a subdirectory because
9027
# it helps to detect inapplicable dependency modes. For instance
9028
# both Tru64's cc and ICC support -MD to output dependencies as a
9029
# side effect of compilation, but ICC will put the dependencies in
9030
# the current directory while Tru64 will put them in the object
9034
am_cv_$1_dependencies_compiler_type=none
9035
if test "$am_compiler_list" = ""; then
9036
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
9040
[case " $depcc " in #(
9041
*\ -arch\ *\ -arch\ *) am__universal=true ;;
9044
[case " $depcc " in #(
9045
*\ -arch\ *\ -arch\ *) am__universal=true ;;
9048
for depmode in $am_compiler_list; do
9049
# Setup a source with many dependencies, because some compilers
9050
# like to wrap large dependency lists on column 80 (with \), and
9051
# we should not choose a depcomp mode which is confused by this.
9053
# We need to recreate these files for each test, as the compiler may
9054
# overwrite some of them when testing with obscure command lines.
9055
# This happens at least with the AIX C compiler.
9057
for i in 1 2 3 4 5 6; do
9058
echo '#include "conftst'$i'.h"' >> sub/conftest.c
9059
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
9060
# Solaris 8's {/usr,}/bin/sh.
9061
touch sub/conftst$i.h
9063
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
9065
# We check with `-c' and `-o' for the sake of the "dashmstdout"
9066
# mode. It turns out that the SunPro C++ compiler does not properly
9067
# handle `-M -o', and we need to detect this. Also, some Intel
9068
# versions had trouble with output in subdirs
9069
am__obj=sub/conftest.${OBJEXT-o}
9070
am__minus_obj="-o $am__obj"
9073
# This depmode causes a compiler race in universal mode.
9074
test "$am__universal" = false || continue
9077
# after this tag, mechanisms are not by side-effect, so they'll
9078
# only be used when explicitly requested
9079
if test "x$enable_dependency_tracking" = xyes; then
9085
msvisualcpp | msvcmsys)
9086
# This compiler won't grok `-c -o', but also, the minuso test has
9087
# not run yet. These depmodes are late enough in the game, and
9088
# so weak that their functioning should not be impacted.
9089
am__obj=conftest.${OBJEXT-o}
9094
if depmode=$depmode \
9095
source=sub/conftest.c object=$am__obj \
9096
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
9097
$SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
9098
>/dev/null 2>conftest.err &&
9099
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
9100
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
9101
grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
9102
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
9103
# icc doesn't choke on unknown options, it will just issue warnings
9104
# or remarks (even with -Werror). So we grep stderr for any message
9105
# that says an option was ignored or not supported.
9106
# When given -MP, icc 7.0 and 7.1 complain thusly:
9107
# icc: Command line warning: ignoring option '-M'; no argument required
9108
# The diagnosis changed in icc 8.0:
9109
# icc: Command line remark: option '-MP' not supported
9110
if (grep 'ignoring option' conftest.err ||
9111
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
9112
am_cv_$1_dependencies_compiler_type=$depmode
9121
am_cv_$1_dependencies_compiler_type=none
9124
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
9125
AM_CONDITIONAL([am__fastdep$1], [
9126
test "x$enable_dependency_tracking" != xno \
9127
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
9133
# Choose a directory name for dependency files.
9134
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
9135
AC_DEFUN([AM_SET_DEPDIR],
9136
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9137
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
9143
AC_DEFUN([AM_DEP_TRACK],
9144
[AC_ARG_ENABLE(dependency-tracking,
9145
[ --disable-dependency-tracking speeds up one-time build
9146
--enable-dependency-tracking do not reject slow dependency extractors])
9147
if test "x$enable_dependency_tracking" != xno; then
9148
am_depcomp="$ac_aux_dir/depcomp"
9151
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
9152
AC_SUBST([AMDEPBACKSLASH])dnl
9153
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
9156
# Generate code to set up dependency tracking. -*- Autoconf -*-
9158
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
9159
# Free Software Foundation, Inc.
9161
# This file is free software; the Free Software Foundation
9162
# gives unlimited permission to copy and/or distribute it,
9163
# with or without modifications, as long as this notice is preserved.
9167
# _AM_OUTPUT_DEPENDENCY_COMMANDS
9168
# ------------------------------
9169
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
9171
# Autoconf 2.62 quotes --file arguments for eval, but not when files
9172
# are listed without --file. Let's play safe and only enable the eval
9173
# if we detect the quoting.
9174
case $CONFIG_FILES in
9175
*\'*) eval set x "$CONFIG_FILES" ;;
9176
*) set x $CONFIG_FILES ;;
9181
# Strip MF so we end up with the name of the file.
9182
mf=`echo "$mf" | sed -e 's/:.*$//'`
9183
# Check whether this is an Automake generated Makefile or not.
9184
# We used to match only the files named `Makefile.in', but
9185
# some people rename them; so instead we look at the file content.
9186
# Grep'ing the first line is not enough: some people post-process
9187
# each Makefile.in and add a new line on top of each file to say so.
9188
# Grep'ing the whole file is not good either: AIX grep has a line
9189
# limit of 2048, but all sed's we know have understand at least 4000.
9190
if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
9191
dirpart=`AS_DIRNAME("$mf")`
9195
# Extract the definition of DEPDIR, am__include, and am__quote
9196
# from the Makefile without running `make'.
9197
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
9198
test -z "$DEPDIR" && continue
9199
am__include=`sed -n 's/^am__include = //p' < "$mf"`
9200
test -z "am__include" && continue
9201
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
9202
# When using ansi2knr, U may be empty or an underscore; expand it
9203
U=`sed -n 's/^U = //p' < "$mf"`
9204
# Find all dependency output files, they are included files with
9205
# $(DEPDIR) in their names. We invoke sed twice because it is the
9206
# simplest approach to changing $(DEPDIR) to its actual value in the
9208
for file in `sed -n "
9209
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
9210
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
9211
# Make sure the directory exists.
9212
test -f "$dirpart/$file" && continue
9213
fdir=`AS_DIRNAME(["$file"])`
9214
AS_MKDIR_P([$dirpart/$fdir])
9215
# echo "creating $dirpart/$file"
9216
echo '# dummy' > "$dirpart/$file"
9220
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
9223
# AM_OUTPUT_DEPENDENCY_COMMANDS
9224
# -----------------------------
9225
# This macro should only be invoked once -- use via AC_REQUIRE.
9227
# This code is only required when automatic dependency tracking
9228
# is enabled. FIXME. This creates each `.P' file that we will
9229
# need in order to bootstrap the dependency handling code.
9230
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
9231
[AC_CONFIG_COMMANDS([depfiles],
9232
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
9233
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
9236
# Do all the work for Automake. -*- Autoconf -*-
9238
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
9239
# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
9241
# This file is free software; the Free Software Foundation
9242
# gives unlimited permission to copy and/or distribute it,
9243
# with or without modifications, as long as this notice is preserved.
9247
# This macro actually does too much. Some checks are only needed if
9248
# your package does certain things. But this isn't really a big deal.
9250
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
9251
# AM_INIT_AUTOMAKE([OPTIONS])
9252
# -----------------------------------------------
9253
# The call with PACKAGE and VERSION arguments is the old style
9254
# call (pre autoconf-2.50), which is being phased out. PACKAGE
9255
# and VERSION should now be passed to AC_INIT and removed from
9256
# the call to AM_INIT_AUTOMAKE.
9257
# We support both call styles for the transition. After
9258
# the next Automake release, Autoconf can make the AC_INIT
9259
# arguments mandatory, and then we can depend on a new Autoconf
9260
# release and drop the old call support.
9261
AC_DEFUN([AM_INIT_AUTOMAKE],
9262
[AC_PREREQ([2.62])dnl
9263
dnl Autoconf wants to disallow AM_ names. We explicitly allow
9264
dnl the ones we care about.
9265
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
9266
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
9267
AC_REQUIRE([AC_PROG_INSTALL])dnl
9268
if test "`cd $srcdir && pwd`" != "`pwd`"; then
9269
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output
9270
# is not polluted with repeated "-I."
9271
AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
9272
# test to see if srcdir already configured
9273
if test -f $srcdir/config.status; then
9274
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
9278
# test whether we have cygpath
9279
if test -z "$CYGPATH_W"; then
9280
if (cygpath --version) >/dev/null 2>/dev/null; then
9281
CYGPATH_W='cygpath -w'
9286
AC_SUBST([CYGPATH_W])
9288
# Define the identity of the package.
9289
dnl Distinguish between old-style and new-style calls.
9291
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
9292
AC_SUBST([PACKAGE], [$1])dnl
9293
AC_SUBST([VERSION], [$2])],
9294
[_AM_SET_OPTIONS([$1])dnl
9295
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
9296
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
9297
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
9298
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
9299
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
9301
_AM_IF_OPTION([no-define],,
9302
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
9303
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
9305
# Some tools Automake needs.
9306
AC_REQUIRE([AM_SANITY_CHECK])dnl
9307
AC_REQUIRE([AC_ARG_PROGRAM])dnl
9308
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
9309
AM_MISSING_PROG(AUTOCONF, autoconf)
9310
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
9311
AM_MISSING_PROG(AUTOHEADER, autoheader)
9312
AM_MISSING_PROG(MAKEINFO, makeinfo)
9313
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9314
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
9315
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
9316
# We need awk for the "check" target. The system "awk" is bad on
9318
AC_REQUIRE([AC_PROG_AWK])dnl
9319
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
9320
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9321
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
9322
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
9323
[_AM_PROG_TAR([v7])])])
9324
_AM_IF_OPTION([no-dependencies],,
9325
[AC_PROVIDE_IFELSE([AC_PROG_CC],
9326
[_AM_DEPENDENCIES(CC)],
9327
[define([AC_PROG_CC],
9328
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
9329
AC_PROVIDE_IFELSE([AC_PROG_CXX],
9330
[_AM_DEPENDENCIES(CXX)],
9331
[define([AC_PROG_CXX],
9332
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
9333
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
9334
[_AM_DEPENDENCIES(OBJC)],
9335
[define([AC_PROG_OBJC],
9336
defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
9338
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
9339
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
9340
dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
9341
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
9342
AC_CONFIG_COMMANDS_PRE(dnl
9343
[m4_provide_if([_AM_COMPILER_EXEEXT],
9344
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
9347
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
9348
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
9349
dnl mangled by Autoconf and run in a shell conditional statement.
9350
m4_define([_AC_COMPILER_EXEEXT],
9351
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
9354
# When config.status generates a header, we must update the stamp-h file.
9355
# This file resides in the same directory as the config header
9356
# that is generated. The stamp files are numbered to have different names.
9358
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
9359
# loop where config.status creates the headers, so we can generate
9360
# our stamp files there.
9361
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
9362
[# Compute $1's index in $config_headers.
9365
for _am_header in $config_headers :; do
9367
$_am_arg | $_am_arg:* )
9370
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
9373
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
9375
# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
9377
# This file is free software; the Free Software Foundation
9378
# gives unlimited permission to copy and/or distribute it,
9379
# with or without modifications, as long as this notice is preserved.
9381
# AM_PROG_INSTALL_SH
9382
# ------------------
9383
# Define $install_sh.
9384
AC_DEFUN([AM_PROG_INSTALL_SH],
9385
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9386
if test x"${install_sh}" != xset; then
9389
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
9391
install_sh="\${SHELL} $am_aux_dir/install-sh"
9394
AC_SUBST(install_sh)])
9396
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
9398
# This file is free software; the Free Software Foundation
9399
# gives unlimited permission to copy and/or distribute it,
9400
# with or without modifications, as long as this notice is preserved.
9404
# Check whether the underlying file-system supports filenames
9405
# with a leading dot. For instance MS-DOS doesn't.
9406
AC_DEFUN([AM_SET_LEADING_DOT],
9407
[rm -rf .tst 2>/dev/null
9408
mkdir .tst 2>/dev/null
9409
if test -d .tst; then
9414
rmdir .tst 2>/dev/null
9415
AC_SUBST([am__leading_dot])])
9417
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
9420
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
9421
# Free Software Foundation, Inc.
9423
# This file is free software; the Free Software Foundation
9424
# gives unlimited permission to copy and/or distribute it,
9425
# with or without modifications, as long as this notice is preserved.
9429
# AM_MAINTAINER_MODE([DEFAULT-MODE])
9430
# ----------------------------------
9431
# Control maintainer-specific portions of Makefiles.
9432
# Default is to disable them, unless `enable' is passed literally.
9433
# For symmetry, `disable' may be passed as well. Anyway, the user
9434
# can override the default with the --enable/--disable switch.
9435
AC_DEFUN([AM_MAINTAINER_MODE],
9436
[m4_case(m4_default([$1], [disable]),
9437
[enable], [m4_define([am_maintainer_other], [disable])],
9438
[disable], [m4_define([am_maintainer_other], [enable])],
9439
[m4_define([am_maintainer_other], [enable])
9440
m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
9441
AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
9442
dnl maintainer-mode's default is 'disable' unless 'enable' is passed
9443
AC_ARG_ENABLE([maintainer-mode],
9444
[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
9445
(and sometimes confusing) to the casual installer],
9446
[USE_MAINTAINER_MODE=$enableval],
9447
[USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
9448
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
9449
AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
9450
MAINT=$MAINTAINER_MODE_TRUE
9451
AC_SUBST([MAINT])dnl
9455
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
9457
# Check to see how 'make' treats includes. -*- Autoconf -*-
9459
# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
9461
# This file is free software; the Free Software Foundation
9462
# gives unlimited permission to copy and/or distribute it,
9463
# with or without modifications, as long as this notice is preserved.
9469
# Check to see how make treats includes.
9470
AC_DEFUN([AM_MAKE_INCLUDE],
9471
[am_make=${MAKE-make}
9472
cat > confinc << 'END'
9474
@echo this is the am__doit target
9477
# If we don't find an include directive, just comment out the code.
9478
AC_MSG_CHECKING([for style of include used by $am_make])
9482
# First try GNU make style include.
9483
echo "include confinc" > confmf
9484
# Ignore all kinds of additional output from `make'.
9485
case `$am_make -s -f confmf 2> /dev/null` in #(
9486
*the\ am__doit\ target*)
9492
# Now try BSD make style include.
9493
if test "$am__include" = "#"; then
9494
echo '.include "confinc"' > confmf
9495
case `$am_make -s -f confmf 2> /dev/null` in #(
9496
*the\ am__doit\ target*)
9497
am__include=.include
9503
AC_SUBST([am__include])
9504
AC_SUBST([am__quote])
9505
AC_MSG_RESULT([$_am_result])
9506
rm -f confinc confmf
9509
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
9511
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
9512
# Free Software Foundation, Inc.
9514
# This file is free software; the Free Software Foundation
9515
# gives unlimited permission to copy and/or distribute it,
9516
# with or without modifications, as long as this notice is preserved.
9520
# AM_MISSING_PROG(NAME, PROGRAM)
9521
# ------------------------------
9522
AC_DEFUN([AM_MISSING_PROG],
9523
[AC_REQUIRE([AM_MISSING_HAS_RUN])
9524
$1=${$1-"${am_missing_run}$2"}
9528
# AM_MISSING_HAS_RUN
9529
# ------------------
9530
# Define MISSING if not defined so far and test if it supports --run.
9531
# If it does, set am_missing_run to use it, otherwise, to nothing.
9532
AC_DEFUN([AM_MISSING_HAS_RUN],
9533
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9534
AC_REQUIRE_AUX_FILE([missing])dnl
9535
if test x"${MISSING+set}" != xset; then
9538
MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
9540
MISSING="\${SHELL} $am_aux_dir/missing" ;;
9543
# Use eval to expand $SHELL
9544
if eval "$MISSING --run true"; then
9545
am_missing_run="$MISSING --run "
9548
AC_MSG_WARN([`missing' script is too old or missing])
9552
# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
9554
# This file is free software; the Free Software Foundation
9555
# gives unlimited permission to copy and/or distribute it,
9556
# with or without modifications, as long as this notice is preserved.
9560
# Check for `mkdir -p'.
9561
AC_DEFUN([AM_PROG_MKDIR_P],
9562
[AC_PREREQ([2.60])dnl
9563
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
9564
dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
9565
dnl while keeping a definition of mkdir_p for backward compatibility.
9566
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
9567
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
9568
dnl Makefile.ins that do not define MKDIR_P, so we do our own
9569
dnl adjustment using top_builddir (which is defined more often than
9571
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
9573
[[\\/$]]* | ?:[[\\/]]*) ;;
9574
*/*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
9578
# Helper functions for option handling. -*- Autoconf -*-
9580
# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
9582
# This file is free software; the Free Software Foundation
9583
# gives unlimited permission to copy and/or distribute it,
9584
# with or without modifications, as long as this notice is preserved.
9588
# _AM_MANGLE_OPTION(NAME)
9589
# -----------------------
9590
AC_DEFUN([_AM_MANGLE_OPTION],
9591
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
9593
# _AM_SET_OPTION(NAME)
9594
# ------------------------------
9595
# Set option NAME. Presently that only means defining a flag for this option.
9596
AC_DEFUN([_AM_SET_OPTION],
9597
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
9599
# _AM_SET_OPTIONS(OPTIONS)
9600
# ----------------------------------
9601
# OPTIONS is a space-separated list of Automake options.
9602
AC_DEFUN([_AM_SET_OPTIONS],
9603
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
9605
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
9606
# -------------------------------------------
9607
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9608
AC_DEFUN([_AM_IF_OPTION],
9609
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
9611
# Check to make sure that the build environment is sane. -*- Autoconf -*-
9613
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
9614
# Free Software Foundation, Inc.
9616
# This file is free software; the Free Software Foundation
9617
# gives unlimited permission to copy and/or distribute it,
9618
# with or without modifications, as long as this notice is preserved.
9624
AC_DEFUN([AM_SANITY_CHECK],
9625
[AC_MSG_CHECKING([whether build environment is sane])
9628
echo timestamp > conftest.file
9629
# Reject unsafe characters in $srcdir or the absolute working directory
9630
# name. Accept space and tab only in the latter.
9634
*[[\\\"\#\$\&\'\`$am_lf]]*)
9635
AC_MSG_ERROR([unsafe absolute working directory name]);;
9638
*[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
9639
AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
9642
# Do `set' in a subshell so we don't clobber the current shell's
9643
# arguments. Must try -L first in case configure is actually a
9644
# symlink; some systems play weird games with the mod time of symlinks
9645
# (eg FreeBSD returns the mod time of the symlink's containing
9648
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
9649
if test "$[*]" = "X"; then
9651
set X `ls -t "$srcdir/configure" conftest.file`
9654
if test "$[*]" != "X $srcdir/configure conftest.file" \
9655
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
9657
# If neither matched, then we have a broken ls. This can happen
9658
# if, for instance, CONFIG_SHELL is bash and it inherits a
9659
# broken ls alias from the environment. This has actually
9660
# happened. Such a system could not be considered "sane".
9661
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
9662
alias in your environment])
9665
test "$[2]" = conftest.file
9671
AC_MSG_ERROR([newly created file is older than distributed files!
9672
Check your system clock])
9674
AC_MSG_RESULT(yes)])
9676
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
9678
# This file is free software; the Free Software Foundation
9679
# gives unlimited permission to copy and/or distribute it,
9680
# with or without modifications, as long as this notice is preserved.
9682
# AM_PROG_INSTALL_STRIP
9683
# ---------------------
9684
# One issue with vendor `install' (even GNU) is that you can't
9685
# specify the program used to strip binaries. This is especially
9686
# annoying in cross-compiling environments, where the build's strip
9687
# is unlikely to handle the host's binaries.
9688
# Fortunately install-sh will honor a STRIPPROG variable, so we
9689
# always use install-sh in `make install-strip', and initialize
9690
# STRIPPROG with the value of the STRIP variable (set by the user).
9691
AC_DEFUN([AM_PROG_INSTALL_STRIP],
9692
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9693
# Installed binaries are usually stripped using `strip' when the user
9694
# run `make install-strip'. However `strip' might not be the right
9695
# tool to use in cross-compilation environments, therefore Automake
9696
# will honor the `STRIP' environment variable to overrule this program.
9697
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
9698
if test "$cross_compiling" != no; then
9699
AC_CHECK_TOOL([STRIP], [strip], :)
9701
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
9702
AC_SUBST([INSTALL_STRIP_PROGRAM])])
9704
# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
9706
# This file is free software; the Free Software Foundation
9707
# gives unlimited permission to copy and/or distribute it,
9708
# with or without modifications, as long as this notice is preserved.
9712
# _AM_SUBST_NOTMAKE(VARIABLE)
9713
# ---------------------------
9714
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
9715
# This macro is traced by Automake.
9716
AC_DEFUN([_AM_SUBST_NOTMAKE])
9718
# AM_SUBST_NOTMAKE(VARIABLE)
9719
# ---------------------------
9720
# Public sister of _AM_SUBST_NOTMAKE.
9721
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
9723
# Check how to create a tarball. -*- Autoconf -*-
9725
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
9727
# This file is free software; the Free Software Foundation
9728
# gives unlimited permission to copy and/or distribute it,
9729
# with or without modifications, as long as this notice is preserved.
9733
# _AM_PROG_TAR(FORMAT)
9734
# --------------------
9735
# Check how to create a tarball in format FORMAT.
9736
# FORMAT should be one of `v7', `ustar', or `pax'.
9738
# Substitute a variable $(am__tar) that is a command
9739
# writing to stdout a FORMAT-tarball containing the directory
9741
# tardir=directory && $(am__tar) > result.tar
9743
# Substitute a variable $(am__untar) that extract such
9744
# a tarball read from stdin.
9745
# $(am__untar) < result.tar
9746
AC_DEFUN([_AM_PROG_TAR],
9747
[# Always define AMTAR for backward compatibility.
9748
AM_MISSING_PROG([AMTAR], [tar])
9750
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
9751
[m4_case([$1], [ustar],, [pax],,
9752
[m4_fatal([Unknown tar format])])
9753
AC_MSG_CHECKING([how to create a $1 tar archive])
9754
# Loop over all known methods to create a tar archive until one works.
9755
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
9756
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
9757
# Do not fold the above two line into one, because Tru64 sh and
9758
# Solaris sh will not grok spaces in the rhs of `-'.
9759
for _am_tool in $_am_tools
9763
for _am_tar in tar gnutar gtar;
9765
AM_RUN_LOG([$_am_tar --version]) && break
9767
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
9768
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
9769
am__untar="$_am_tar -xf -"
9772
# Must skip GNU tar: if it does not support --format= it doesn't create
9773
# ustar tarball either.
9774
(tar --version) >/dev/null 2>&1 && continue
9775
am__tar='tar chf - "$$tardir"'
9776
am__tar_='tar chf - "$tardir"'
9777
am__untar='tar xf -'
9780
am__tar='pax -L -x $1 -w "$$tardir"'
9781
am__tar_='pax -L -x $1 -w "$tardir"'
9785
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
9786
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
9787
am__untar='cpio -i -H $1 -d'
9796
# If the value was cached, stop now. We just wanted to have am__tar
9797
# and am__untar set.
9798
test -n "${am_cv_prog_tar_$1}" && break
9800
# tar/untar a dummy directory, and stop if the command works
9803
echo GrepMe > conftest.dir/file
9804
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
9806
if test -s conftest.tar; then
9807
AM_RUN_LOG([$am__untar <conftest.tar])
9808
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
9813
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
9814
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
9816
AC_SUBST([am__untar])