1
# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4
# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
5
# This file is free software; the Free Software Foundation
6
# gives unlimited permission to copy and/or distribute it,
7
# with or without modifications, as long as this notice is preserved.
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14
m4_ifndef([AC_AUTOCONF_VERSION],
15
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
17
[m4_warning([this file was generated for autoconf 2.65.
18
You have another version of autoconf. It may work, but is not guaranteed to.
19
If you have problems, you may need to regenerate the build system entirely.
20
To do so, use the procedure documented by the package, typically `autoreconf'.])])
22
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
23
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
25
# This file is free software, distributed under the terms of the GNU
26
# General Public License. As a special exception to the GNU General
27
# Public License, this file may be distributed as part of a program
28
# that contains a configuration script generated by Autoconf, under
29
# the same distribution terms as the rest of that program.
31
# This file can be copied and used freely without restrictions. It can
32
# be used in projects which are not available under the GNU Public License
33
# but which still want to provide support for the GNU gettext functionality.
35
# Macro to add for using GNU gettext.
36
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
38
# Modified to never use included libintl.
39
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
41
# Major rework to remove unused code
42
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
44
# Added better handling of ALL_LINGUAS from GNU gettext version
45
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
47
# Modified to require ngettext
48
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
50
# We need this here as well, since someone might use autoconf-2.5x
51
# to configure GLib then an older version to configure a package
52
# using AM_GLIB_GNU_GETTEXT
56
dnl We go to great lengths to make sure that aclocal won't
57
dnl try to pull in the installed version of these macros
58
dnl when running aclocal in the glib directory.
60
m4_copy([AC_DEFUN],[glib_DEFUN])
61
m4_copy([AC_REQUIRE],[glib_REQUIRE])
63
dnl At the end, if we're not within glib, we'll define the public
64
dnl definitions in terms of our private definitions.
69
glib_DEFUN([GLIB_LC_MESSAGES],
70
[AC_CHECK_HEADERS([locale.h])
71
if test $ac_cv_header_locale_h = yes; then
72
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
73
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
74
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
75
if test $am_cv_val_LC_MESSAGES = yes; then
76
AC_DEFINE(HAVE_LC_MESSAGES, 1,
77
[Define if your <locale.h> file defines LC_MESSAGES.])
81
# GLIB_PATH_PROG_WITH_TEST
82
#----------------------------
83
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
84
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
85
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
86
[# Extract the first word of "$2", so it can be a program name with args.
87
set dummy $2; ac_word=[$]2
88
AC_MSG_CHECKING([for $ac_word])
89
AC_CACHE_VAL(ac_cv_path_$1,
92
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
95
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
96
for ac_dir in ifelse([$5], , $PATH, [$5]); do
97
test -z "$ac_dir" && ac_dir=.
98
if test -f $ac_dir/$ac_word; then
100
ac_cv_path_$1="$ac_dir/$ac_word"
106
dnl If no 4th arg is given, leave the cache variable unset,
107
dnl so AC_PATH_PROGS will keep looking.
108
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
113
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
123
glib_DEFUN([GLIB_WITH_NLS],
124
dnl NLS is obligatory
128
gt_cv_have_gettext=no
134
AC_CHECK_HEADER(libintl.h,
135
[gt_cv_func_dgettext_libintl="no"
136
libintl_extra_libs=""
139
# First check in libc
141
AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
145
[return !ngettext ("","", 1)],
146
gt_cv_func_ngettext_libc=yes,
147
gt_cv_func_ngettext_libc=no)
150
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
151
AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
155
[return !dgettext ("","")],
156
gt_cv_func_dgettext_libc=yes,
157
gt_cv_func_dgettext_libc=no)
161
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
162
AC_CHECK_FUNCS(bind_textdomain_codeset)
166
# If we don't have everything we want, check in libintl
168
if test "$gt_cv_func_dgettext_libc" != "yes" \
169
|| test "$gt_cv_func_ngettext_libc" != "yes" \
170
|| test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
172
AC_CHECK_LIB(intl, bindtextdomain,
173
[AC_CHECK_LIB(intl, ngettext,
174
[AC_CHECK_LIB(intl, dgettext,
175
gt_cv_func_dgettext_libintl=yes)])])
177
if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
178
AC_MSG_CHECKING([if -liconv is needed to use gettext])
180
AC_CHECK_LIB(intl, ngettext,
181
[AC_CHECK_LIB(intl, dcgettext,
182
[gt_cv_func_dgettext_libintl=yes
183
libintl_extra_libs=-liconv],
189
# If we found libintl, then check in it for bind_textdomain_codeset();
190
# we'll prefer libc if neither have bind_textdomain_codeset(),
191
# and both have dgettext and ngettext
193
if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
194
glib_save_LIBS="$LIBS"
195
LIBS="$LIBS -lintl $libintl_extra_libs"
196
unset ac_cv_func_bind_textdomain_codeset
197
AC_CHECK_FUNCS(bind_textdomain_codeset)
198
LIBS="$glib_save_LIBS"
200
if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
201
gt_cv_func_dgettext_libc=no
203
if test "$gt_cv_func_dgettext_libc" = "yes" \
204
&& test "$gt_cv_func_ngettext_libc" = "yes"; then
205
gt_cv_func_dgettext_libintl=no
211
if test "$gt_cv_func_dgettext_libc" = "yes" \
212
|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
213
gt_cv_have_gettext=yes
216
if test "$gt_cv_func_dgettext_libintl" = "yes"; then
217
INTLLIBS="-lintl $libintl_extra_libs"
220
if test "$gt_cv_have_gettext" = "yes"; then
221
AC_DEFINE(HAVE_GETTEXT,1,
222
[Define if the GNU gettext() function is already present or preinstalled.])
223
GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
224
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
225
if test "$MSGFMT" != "no"; then
226
glib_save_LIBS="$LIBS"
227
LIBS="$LIBS $INTLLIBS"
228
AC_CHECK_FUNCS(dcgettext)
230
AC_MSG_CHECKING([if msgfmt accepts -c])
231
GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
234
"Content-Type: text/plain; charset=UTF-8\n"
235
"Project-Id-Version: test 1.0\n"
236
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
237
"Last-Translator: test <foo@bar.xx>\n"
238
"Language-Team: C <LL@li.org>\n"
239
"MIME-Version: 1.0\n"
240
"Content-Transfer-Encoding: 8bit\n"
241
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
242
AC_SUBST(MSGFMT_OPTS)
243
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
244
GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
245
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
246
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
247
return _nl_msg_cat_cntr],
252
dnl On Solaris, if bind_textdomain_codeset is in libc,
253
dnl GNU format message catalog is always supported,
254
dnl since both are added to the libc all together.
255
dnl Hence, we'd like to go with DATADIRNAME=share and
256
dnl and CATOBJEXT=.gmo in this case.
257
AC_CHECK_FUNC(bind_textdomain_codeset,
268
LIBS="$glib_save_LIBS"
271
gt_cv_have_gettext=no
276
if test "$gt_cv_have_gettext" = "yes" ; then
277
AC_DEFINE(ENABLE_NLS, 1,
278
[always defined to indicate that i18n is enabled])
281
dnl Test whether we really found GNU xgettext.
282
if test "$XGETTEXT" != ":"; then
283
dnl If it is not GNU xgettext we define it as : so that the
284
dnl Makefiles still can work.
285
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
289
[found xgettext program is not GNU xgettext; ignore it])
294
# We need to process the po/ directory.
298
[case "$CONFIG_FILES" in *po/Makefile.in*)
299
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
302
dnl These rules are solely for the distribution goal. While doing this
303
dnl we only have to keep exactly one list of the available catalogs
305
for lang in $ALL_LINGUAS; do
306
GMOFILES="$GMOFILES $lang.gmo"
307
POFILES="$POFILES $lang.po"
310
dnl Make all variables we use known to autoconf.
313
AC_SUBST(DATADIRNAME)
317
AC_SUBST(PO_IN_DATADIR_TRUE)
318
AC_SUBST(PO_IN_DATADIR_FALSE)
323
# AM_GLIB_GNU_GETTEXT
324
# -------------------
325
# Do checks necessary for use of gettext. If a suitable implementation
326
# of gettext is found in either in libintl or in the C library,
327
# it will set INTLLIBS to the libraries needed for use of gettext
328
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
329
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
330
# on various variables needed by the Makefile.in.in installed by
333
glib_DEFUN([GLIB_GNU_GETTEXT],
334
[AC_REQUIRE([AC_PROG_CC])dnl
335
AC_REQUIRE([AC_HEADER_STDC])dnl
340
if test "$gt_cv_have_gettext" = "yes"; then
341
if test "x$ALL_LINGUAS" = "x"; then
344
AC_MSG_CHECKING(for catalogs to be installed)
346
for presentlang in $ALL_LINGUAS; do
348
if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
349
desiredlanguages="$LINGUAS"
351
desiredlanguages="$ALL_LINGUAS"
353
for desiredlang in $desiredlanguages; do
354
# Use the presentlang catalog if desiredlang is
355
# a. equal to presentlang, or
356
# b. a variant of presentlang (because in this case,
357
# presentlang can be used as a fallback for messages
358
# which are not translated in the desiredlang catalog).
359
case "$desiredlang" in
360
"$presentlang"*) useit=yes;;
363
if test $useit = yes; then
364
NEW_LINGUAS="$NEW_LINGUAS $presentlang"
368
AC_MSG_RESULT($LINGUAS)
371
dnl Construct list of names of catalog files to be constructed.
372
if test -n "$LINGUAS"; then
373
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
377
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
378
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
379
dnl Try to locate is.
381
if test -n "$ac_aux_dir"; then
382
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
384
if test -z "$MKINSTALLDIRS"; then
385
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
387
AC_SUBST(MKINSTALLDIRS)
389
dnl Generate list of files to be processed by xgettext which will
390
dnl be included in po/Makefile.
391
test -d po || mkdir po
392
if test "x$srcdir" != "x."; then
393
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
394
posrcprefix="$srcdir/"
396
posrcprefix="../$srcdir/"
402
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
403
< $srcdir/po/POTFILES.in > po/POTFILES
406
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
407
# -------------------------------
408
# Define VARIABLE to the location where catalog files will
409
# be installed by po/Makefile.
410
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
411
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
412
glib_save_prefix="$prefix"
413
glib_save_exec_prefix="$exec_prefix"
414
glib_save_datarootdir="$datarootdir"
415
test "x$prefix" = xNONE && prefix=$ac_default_prefix
416
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
417
datarootdir=`eval echo "${datarootdir}"`
418
if test "x$CATOBJEXT" = "x.mo" ; then
419
localedir=`eval echo "${libdir}/locale"`
421
localedir=`eval echo "${datadir}/locale"`
423
prefix="$glib_save_prefix"
424
exec_prefix="$glib_save_exec_prefix"
425
datarootdir="$glib_save_datarootdir"
426
AC_DEFINE_UNQUOTED($1, "$localedir",
427
[Define the location where the catalogs will be installed])
431
dnl Now the definitions that aclocal will find
433
ifdef(glib_configure_in,[],[
434
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
435
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
438
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
440
# Create a temporary file with TEST-FILE as its contents and pass the
441
# file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
442
# 0 and perform ACTION-IF-FAIL for any other exit status.
443
AC_DEFUN([GLIB_RUN_PROG],
444
[cat >conftest.foo <<_ACEOF
447
if AC_RUN_LOG([$1 conftest.foo]); then
448
m4_ifval([$3], [$3], [:])
449
m4_ifvaln([$4], [else $4])dnl
450
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
451
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
455
# nls.m4 serial 5 (gettext-0.18)
456
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
458
dnl This file is free software; the Free Software Foundation
459
dnl gives unlimited permission to copy and/or distribute it,
460
dnl with or without modifications, as long as this notice is preserved.
462
dnl This file can can be used in projects which are not available under
463
dnl the GNU General Public License or the GNU Library General Public
464
dnl License but which still want to provide support for the GNU gettext
466
dnl Please note that the actual code of the GNU gettext library is covered
467
dnl by the GNU Library General Public License, and the rest of the GNU
468
dnl gettext package package is covered by the GNU General Public License.
469
dnl They are *not* in the public domain.
472
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
473
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
479
AC_MSG_CHECKING([whether NLS is requested])
480
dnl Default is enabled NLS
482
[ --disable-nls do not use Native Language Support],
483
USE_NLS=$enableval, USE_NLS=yes)
484
AC_MSG_RESULT([$USE_NLS])
488
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
490
# Copyright Ā© 2004 Scott James Remnant <scott@netsplit.com>.
492
# This program is free software; you can redistribute it and/or modify
493
# it under the terms of the GNU General Public License as published by
494
# the Free Software Foundation; either version 2 of the License, or
495
# (at your option) any later version.
497
# This program is distributed in the hope that it will be useful, but
498
# WITHOUT ANY WARRANTY; without even the implied warranty of
499
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
500
# General Public License for more details.
502
# You should have received a copy of the GNU General Public License
503
# along with this program; if not, write to the Free Software
504
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
506
# As a special exception to the GNU General Public License, if you
507
# distribute this file as part of a program that contains a
508
# configuration script generated by Autoconf, you may include it under
509
# the same distribution terms that you use for the rest of that program.
511
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
512
# ----------------------------------
513
AC_DEFUN([PKG_PROG_PKG_CONFIG],
514
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
515
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
516
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
517
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
518
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
520
if test -n "$PKG_CONFIG"; then
521
_pkg_min_version=m4_default([$1], [0.9.0])
522
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
523
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
531
])# PKG_PROG_PKG_CONFIG
533
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
535
# Check to see whether a particular set of modules exists. Similar
536
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
539
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
540
# this or PKG_CHECK_MODULES is called, or make sure to call
541
# PKG_CHECK_EXISTS manually
542
# --------------------------------------------------------------
543
AC_DEFUN([PKG_CHECK_EXISTS],
544
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
545
if test -n "$PKG_CONFIG" && \
546
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
547
m4_ifval([$2], [$2], [:])
548
m4_ifvaln([$3], [else
553
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
554
# ---------------------------------------------
555
m4_define([_PKG_CONFIG],
556
[if test -n "$$1"; then
558
elif test -n "$PKG_CONFIG"; then
559
PKG_CHECK_EXISTS([$3],
560
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
567
# _PKG_SHORT_ERRORS_SUPPORTED
568
# -----------------------------
569
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
570
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
571
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
572
_pkg_short_errors_supported=yes
574
_pkg_short_errors_supported=no
576
])# _PKG_SHORT_ERRORS_SUPPORTED
579
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
580
# [ACTION-IF-NOT-FOUND])
583
# Note that if there is a possibility the first call to
584
# PKG_CHECK_MODULES might not happen, you should be sure to include an
585
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
588
# --------------------------------------------------------------
589
AC_DEFUN([PKG_CHECK_MODULES],
590
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
591
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
592
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
595
AC_MSG_CHECKING([for $1])
597
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
598
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
600
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
601
and $1[]_LIBS to avoid the need to call pkg-config.
602
See the pkg-config man page for more details.])
604
if test $pkg_failed = yes; then
605
_PKG_SHORT_ERRORS_SUPPORTED
606
if test $_pkg_short_errors_supported = yes; then
607
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
609
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
611
# Put the nasty error message in config.log where it belongs
612
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
614
ifelse([$4], , [AC_MSG_ERROR(dnl
615
[Package requirements ($2) were not met:
619
Consider adjusting the PKG_CONFIG_PATH environment variable if you
620
installed software in a non-standard prefix.
626
elif test $pkg_failed = untried; then
627
ifelse([$4], , [AC_MSG_FAILURE(dnl
628
[The pkg-config script could not be found or is too old. Make sure it
629
is in your PATH or set the PKG_CONFIG environment variable to the full
634
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
637
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
638
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
640
ifelse([$3], , :, [$3])
642
])# PKG_CHECK_MODULES
644
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
646
# This file is free software; the Free Software Foundation
647
# gives unlimited permission to copy and/or distribute it,
648
# with or without modifications, as long as this notice is preserved.
650
# AM_AUTOMAKE_VERSION(VERSION)
651
# ----------------------------
652
# Automake X.Y traces this macro to ensure aclocal.m4 has been
653
# generated from the m4 files accompanying Automake X.Y.
654
# (This private macro should not be called outside this file.)
655
AC_DEFUN([AM_AUTOMAKE_VERSION],
656
[am__api_version='1.11'
657
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
658
dnl require some minimum version. Point them to the right macro.
659
m4_if([$1], [1.11.1], [],
660
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
663
# _AM_AUTOCONF_VERSION(VERSION)
664
# -----------------------------
665
# aclocal traces this macro to find the Autoconf version.
666
# This is a private macro too. Using m4_define simplifies
667
# the logic in aclocal, which can simply ignore this definition.
668
m4_define([_AM_AUTOCONF_VERSION], [])
670
# AM_SET_CURRENT_AUTOMAKE_VERSION
671
# -------------------------------
672
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
673
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
674
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
675
[AM_AUTOMAKE_VERSION([1.11.1])dnl
676
m4_ifndef([AC_AUTOCONF_VERSION],
677
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
678
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
680
# Figure out how to run the assembler. -*- Autoconf -*-
682
# Copyright (C) 2001, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
684
# This file is free software; the Free Software Foundation
685
# gives unlimited permission to copy and/or distribute it,
686
# with or without modifications, as long as this notice is preserved.
692
AC_DEFUN([AM_PROG_AS],
693
[# By default we simply use the C compiler to build assembly code.
694
AC_REQUIRE([AC_PROG_CC])
695
test "${CCAS+set}" = set || CCAS=$CC
696
test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
697
AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)])
698
AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)])
699
_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl
702
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
704
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
706
# This file is free software; the Free Software Foundation
707
# gives unlimited permission to copy and/or distribute it,
708
# with or without modifications, as long as this notice is preserved.
710
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
711
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
712
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
714
# Of course, Automake must honor this variable whenever it calls a
715
# tool from the auxiliary directory. The problem is that $srcdir (and
716
# therefore $ac_aux_dir as well) can be either absolute or relative,
717
# depending on how configure is run. This is pretty annoying, since
718
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
719
# source directory, any form will work fine, but in subdirectories a
720
# relative path needs to be adjusted first.
722
# $ac_aux_dir/missing
723
# fails when called from a subdirectory if $ac_aux_dir is relative
724
# $top_srcdir/$ac_aux_dir/missing
725
# fails if $ac_aux_dir is absolute,
726
# fails when called from a subdirectory in a VPATH build with
727
# a relative $ac_aux_dir
729
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
730
# are both prefixed by $srcdir. In an in-source build this is usually
731
# harmless because $srcdir is `.', but things will broke when you
732
# start a VPATH build or use an absolute $srcdir.
734
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
735
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
736
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
737
# and then we would define $MISSING as
738
# MISSING="\${SHELL} $am_aux_dir/missing"
739
# This will work as long as MISSING is not called from configure, because
740
# unfortunately $(top_srcdir) has no meaning in configure.
741
# However there are other variables, like CC, which are often used in
742
# configure, and could therefore not use this "fixed" $ac_aux_dir.
744
# Another solution, used here, is to always expand $ac_aux_dir to an
745
# absolute PATH. The drawback is that using absolute paths prevent a
746
# configured tree to be moved without reconfiguration.
748
AC_DEFUN([AM_AUX_DIR_EXPAND],
749
[dnl Rely on autoconf to set up CDPATH properly.
751
# expand $ac_aux_dir to an absolute path
752
am_aux_dir=`cd $ac_aux_dir && pwd`
755
# AM_CONDITIONAL -*- Autoconf -*-
757
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
758
# Free Software Foundation, Inc.
760
# This file is free software; the Free Software Foundation
761
# gives unlimited permission to copy and/or distribute it,
762
# with or without modifications, as long as this notice is preserved.
766
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
767
# -------------------------------------
768
# Define a conditional.
769
AC_DEFUN([AM_CONDITIONAL],
771
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
772
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
773
AC_SUBST([$1_TRUE])dnl
774
AC_SUBST([$1_FALSE])dnl
775
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
776
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
777
m4_define([_AM_COND_VALUE_$1], [$2])dnl
785
AC_CONFIG_COMMANDS_PRE(
786
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
787
AC_MSG_ERROR([[conditional "$1" was never defined.
788
Usually this means the macro was only invoked conditionally.]])
791
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
792
# Free Software Foundation, Inc.
794
# This file is free software; the Free Software Foundation
795
# gives unlimited permission to copy and/or distribute it,
796
# with or without modifications, as long as this notice is preserved.
800
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
801
# written in clear, in which case automake, when reading aclocal.m4,
802
# will think it sees a *use*, and therefore will trigger all it's
803
# C support machinery. Also note that it means that autoscan, seeing
804
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
807
# _AM_DEPENDENCIES(NAME)
808
# ----------------------
809
# See how the compiler implements dependency checking.
810
# NAME is "CC", "CXX", "GCJ", or "OBJC".
811
# We try a few techniques and use that to set a single cache variable.
813
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
814
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
815
# dependency, and given that the user is not expected to run this macro,
816
# just rely on AC_PROG_CC.
817
AC_DEFUN([_AM_DEPENDENCIES],
818
[AC_REQUIRE([AM_SET_DEPDIR])dnl
819
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
820
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
821
AC_REQUIRE([AM_DEP_TRACK])dnl
823
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
824
[$1], CXX, [depcc="$CXX" am_compiler_list=],
825
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
826
[$1], UPC, [depcc="$UPC" am_compiler_list=],
827
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
828
[depcc="$$1" am_compiler_list=])
830
AC_CACHE_CHECK([dependency style of $depcc],
831
[am_cv_$1_dependencies_compiler_type],
832
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
833
# We make a subdir and do the tests there. Otherwise we can end up
834
# making bogus files that we don't know about and never remove. For
835
# instance it was reported that on HP-UX the gcc test will end up
836
# making a dummy file named `D' -- because `-MD' means `put the output
839
# Copy depcomp to subdir because otherwise we won't find it if we're
840
# using a relative directory.
841
cp "$am_depcomp" conftest.dir
843
# We will build objects and dependencies in a subdirectory because
844
# it helps to detect inapplicable dependency modes. For instance
845
# both Tru64's cc and ICC support -MD to output dependencies as a
846
# side effect of compilation, but ICC will put the dependencies in
847
# the current directory while Tru64 will put them in the object
851
am_cv_$1_dependencies_compiler_type=none
852
if test "$am_compiler_list" = ""; then
853
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
857
[case " $depcc " in #(
858
*\ -arch\ *\ -arch\ *) am__universal=true ;;
861
[case " $depcc " in #(
862
*\ -arch\ *\ -arch\ *) am__universal=true ;;
865
for depmode in $am_compiler_list; do
866
# Setup a source with many dependencies, because some compilers
867
# like to wrap large dependency lists on column 80 (with \), and
868
# we should not choose a depcomp mode which is confused by this.
870
# We need to recreate these files for each test, as the compiler may
871
# overwrite some of them when testing with obscure command lines.
872
# This happens at least with the AIX C compiler.
874
for i in 1 2 3 4 5 6; do
875
echo '#include "conftst'$i'.h"' >> sub/conftest.c
876
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
877
# Solaris 8's {/usr,}/bin/sh.
878
touch sub/conftst$i.h
880
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
882
# We check with `-c' and `-o' for the sake of the "dashmstdout"
883
# mode. It turns out that the SunPro C++ compiler does not properly
884
# handle `-M -o', and we need to detect this. Also, some Intel
885
# versions had trouble with output in subdirs
886
am__obj=sub/conftest.${OBJEXT-o}
887
am__minus_obj="-o $am__obj"
890
# This depmode causes a compiler race in universal mode.
891
test "$am__universal" = false || continue
894
# after this tag, mechanisms are not by side-effect, so they'll
895
# only be used when explicitly requested
896
if test "x$enable_dependency_tracking" = xyes; then
902
msvisualcpp | msvcmsys)
903
# This compiler won't grok `-c -o', but also, the minuso test has
904
# not run yet. These depmodes are late enough in the game, and
905
# so weak that their functioning should not be impacted.
906
am__obj=conftest.${OBJEXT-o}
911
if depmode=$depmode \
912
source=sub/conftest.c object=$am__obj \
913
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
914
$SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
915
>/dev/null 2>conftest.err &&
916
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
917
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
918
grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
919
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
920
# icc doesn't choke on unknown options, it will just issue warnings
921
# or remarks (even with -Werror). So we grep stderr for any message
922
# that says an option was ignored or not supported.
923
# When given -MP, icc 7.0 and 7.1 complain thusly:
924
# icc: Command line warning: ignoring option '-M'; no argument required
925
# The diagnosis changed in icc 8.0:
926
# icc: Command line remark: option '-MP' not supported
927
if (grep 'ignoring option' conftest.err ||
928
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
929
am_cv_$1_dependencies_compiler_type=$depmode
938
am_cv_$1_dependencies_compiler_type=none
941
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
942
AM_CONDITIONAL([am__fastdep$1], [
943
test "x$enable_dependency_tracking" != xno \
944
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
950
# Choose a directory name for dependency files.
951
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
952
AC_DEFUN([AM_SET_DEPDIR],
953
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
954
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
960
AC_DEFUN([AM_DEP_TRACK],
961
[AC_ARG_ENABLE(dependency-tracking,
962
[ --disable-dependency-tracking speeds up one-time build
963
--enable-dependency-tracking do not reject slow dependency extractors])
964
if test "x$enable_dependency_tracking" != xno; then
965
am_depcomp="$ac_aux_dir/depcomp"
968
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
969
AC_SUBST([AMDEPBACKSLASH])dnl
970
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
973
# Generate code to set up dependency tracking. -*- Autoconf -*-
975
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
976
# Free Software Foundation, Inc.
978
# This file is free software; the Free Software Foundation
979
# gives unlimited permission to copy and/or distribute it,
980
# with or without modifications, as long as this notice is preserved.
984
# _AM_OUTPUT_DEPENDENCY_COMMANDS
985
# ------------------------------
986
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
988
# Autoconf 2.62 quotes --file arguments for eval, but not when files
989
# are listed without --file. Let's play safe and only enable the eval
990
# if we detect the quoting.
991
case $CONFIG_FILES in
992
*\'*) eval set x "$CONFIG_FILES" ;;
993
*) set x $CONFIG_FILES ;;
998
# Strip MF so we end up with the name of the file.
999
mf=`echo "$mf" | sed -e 's/:.*$//'`
1000
# Check whether this is an Automake generated Makefile or not.
1001
# We used to match only the files named `Makefile.in', but
1002
# some people rename them; so instead we look at the file content.
1003
# Grep'ing the first line is not enough: some people post-process
1004
# each Makefile.in and add a new line on top of each file to say so.
1005
# Grep'ing the whole file is not good either: AIX grep has a line
1006
# limit of 2048, but all sed's we know have understand at least 4000.
1007
if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
1008
dirpart=`AS_DIRNAME("$mf")`
1012
# Extract the definition of DEPDIR, am__include, and am__quote
1013
# from the Makefile without running `make'.
1014
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
1015
test -z "$DEPDIR" && continue
1016
am__include=`sed -n 's/^am__include = //p' < "$mf"`
1017
test -z "am__include" && continue
1018
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
1019
# When using ansi2knr, U may be empty or an underscore; expand it
1020
U=`sed -n 's/^U = //p' < "$mf"`
1021
# Find all dependency output files, they are included files with
1022
# $(DEPDIR) in their names. We invoke sed twice because it is the
1023
# simplest approach to changing $(DEPDIR) to its actual value in the
1025
for file in `sed -n "
1026
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
1027
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
1028
# Make sure the directory exists.
1029
test -f "$dirpart/$file" && continue
1030
fdir=`AS_DIRNAME(["$file"])`
1031
AS_MKDIR_P([$dirpart/$fdir])
1032
# echo "creating $dirpart/$file"
1033
echo '# dummy' > "$dirpart/$file"
1037
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1040
# AM_OUTPUT_DEPENDENCY_COMMANDS
1041
# -----------------------------
1042
# This macro should only be invoked once -- use via AC_REQUIRE.
1044
# This code is only required when automatic dependency tracking
1045
# is enabled. FIXME. This creates each `.P' file that we will
1046
# need in order to bootstrap the dependency handling code.
1047
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1048
[AC_CONFIG_COMMANDS([depfiles],
1049
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1050
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1053
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
1054
# Free Software Foundation, Inc.
1056
# This file is free software; the Free Software Foundation
1057
# gives unlimited permission to copy and/or distribute it,
1058
# with or without modifications, as long as this notice is preserved.
1062
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
1063
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
1065
# Do all the work for Automake. -*- Autoconf -*-
1067
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
1068
# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
1070
# This file is free software; the Free Software Foundation
1071
# gives unlimited permission to copy and/or distribute it,
1072
# with or without modifications, as long as this notice is preserved.
1076
# This macro actually does too much. Some checks are only needed if
1077
# your package does certain things. But this isn't really a big deal.
1079
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1080
# AM_INIT_AUTOMAKE([OPTIONS])
1081
# -----------------------------------------------
1082
# The call with PACKAGE and VERSION arguments is the old style
1083
# call (pre autoconf-2.50), which is being phased out. PACKAGE
1084
# and VERSION should now be passed to AC_INIT and removed from
1085
# the call to AM_INIT_AUTOMAKE.
1086
# We support both call styles for the transition. After
1087
# the next Automake release, Autoconf can make the AC_INIT
1088
# arguments mandatory, and then we can depend on a new Autoconf
1089
# release and drop the old call support.
1090
AC_DEFUN([AM_INIT_AUTOMAKE],
1091
[AC_PREREQ([2.62])dnl
1092
dnl Autoconf wants to disallow AM_ names. We explicitly allow
1093
dnl the ones we care about.
1094
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1095
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1096
AC_REQUIRE([AC_PROG_INSTALL])dnl
1097
if test "`cd $srcdir && pwd`" != "`pwd`"; then
1098
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output
1099
# is not polluted with repeated "-I."
1100
AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
1101
# test to see if srcdir already configured
1102
if test -f $srcdir/config.status; then
1103
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1107
# test whether we have cygpath
1108
if test -z "$CYGPATH_W"; then
1109
if (cygpath --version) >/dev/null 2>/dev/null; then
1110
CYGPATH_W='cygpath -w'
1115
AC_SUBST([CYGPATH_W])
1117
# Define the identity of the package.
1118
dnl Distinguish between old-style and new-style calls.
1120
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1121
AC_SUBST([PACKAGE], [$1])dnl
1122
AC_SUBST([VERSION], [$2])],
1123
[_AM_SET_OPTIONS([$1])dnl
1124
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
1125
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
1126
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1127
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1128
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1130
_AM_IF_OPTION([no-define],,
1131
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
1132
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
1134
# Some tools Automake needs.
1135
AC_REQUIRE([AM_SANITY_CHECK])dnl
1136
AC_REQUIRE([AC_ARG_PROGRAM])dnl
1137
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
1138
AM_MISSING_PROG(AUTOCONF, autoconf)
1139
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
1140
AM_MISSING_PROG(AUTOHEADER, autoheader)
1141
AM_MISSING_PROG(MAKEINFO, makeinfo)
1142
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1143
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
1144
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
1145
# We need awk for the "check" target. The system "awk" is bad on
1147
AC_REQUIRE([AC_PROG_AWK])dnl
1148
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1149
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1150
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1151
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1152
[_AM_PROG_TAR([v7])])])
1153
_AM_IF_OPTION([no-dependencies],,
1154
[AC_PROVIDE_IFELSE([AC_PROG_CC],
1155
[_AM_DEPENDENCIES(CC)],
1156
[define([AC_PROG_CC],
1157
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
1158
AC_PROVIDE_IFELSE([AC_PROG_CXX],
1159
[_AM_DEPENDENCIES(CXX)],
1160
[define([AC_PROG_CXX],
1161
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1162
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
1163
[_AM_DEPENDENCIES(OBJC)],
1164
[define([AC_PROG_OBJC],
1165
defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
1167
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
1168
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
1169
dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
1170
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
1171
AC_CONFIG_COMMANDS_PRE(dnl
1172
[m4_provide_if([_AM_COMPILER_EXEEXT],
1173
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
1176
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
1177
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
1178
dnl mangled by Autoconf and run in a shell conditional statement.
1179
m4_define([_AC_COMPILER_EXEEXT],
1180
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1183
# When config.status generates a header, we must update the stamp-h file.
1184
# This file resides in the same directory as the config header
1185
# that is generated. The stamp files are numbered to have different names.
1187
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1188
# loop where config.status creates the headers, so we can generate
1189
# our stamp files there.
1190
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1191
[# Compute $1's index in $config_headers.
1194
for _am_header in $config_headers :; do
1196
$_am_arg | $_am_arg:* )
1199
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
1202
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1204
# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
1206
# This file is free software; the Free Software Foundation
1207
# gives unlimited permission to copy and/or distribute it,
1208
# with or without modifications, as long as this notice is preserved.
1210
# AM_PROG_INSTALL_SH
1211
# ------------------
1212
# Define $install_sh.
1213
AC_DEFUN([AM_PROG_INSTALL_SH],
1214
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1215
if test x"${install_sh}" != xset; then
1218
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1220
install_sh="\${SHELL} $am_aux_dir/install-sh"
1223
AC_SUBST(install_sh)])
1225
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
1227
# This file is free software; the Free Software Foundation
1228
# gives unlimited permission to copy and/or distribute it,
1229
# with or without modifications, as long as this notice is preserved.
1233
# Check whether the underlying file-system supports filenames
1234
# with a leading dot. For instance MS-DOS doesn't.
1235
AC_DEFUN([AM_SET_LEADING_DOT],
1236
[rm -rf .tst 2>/dev/null
1237
mkdir .tst 2>/dev/null
1238
if test -d .tst; then
1243
rmdir .tst 2>/dev/null
1244
AC_SUBST([am__leading_dot])])
1246
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
1249
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
1250
# Free Software Foundation, Inc.
1252
# This file is free software; the Free Software Foundation
1253
# gives unlimited permission to copy and/or distribute it,
1254
# with or without modifications, as long as this notice is preserved.
1258
# AM_MAINTAINER_MODE([DEFAULT-MODE])
1259
# ----------------------------------
1260
# Control maintainer-specific portions of Makefiles.
1261
# Default is to disable them, unless `enable' is passed literally.
1262
# For symmetry, `disable' may be passed as well. Anyway, the user
1263
# can override the default with the --enable/--disable switch.
1264
AC_DEFUN([AM_MAINTAINER_MODE],
1265
[m4_case(m4_default([$1], [disable]),
1266
[enable], [m4_define([am_maintainer_other], [disable])],
1267
[disable], [m4_define([am_maintainer_other], [enable])],
1268
[m4_define([am_maintainer_other], [enable])
1269
m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
1270
AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
1271
dnl maintainer-mode's default is 'disable' unless 'enable' is passed
1272
AC_ARG_ENABLE([maintainer-mode],
1273
[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
1274
(and sometimes confusing) to the casual installer],
1275
[USE_MAINTAINER_MODE=$enableval],
1276
[USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
1277
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
1278
AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
1279
MAINT=$MAINTAINER_MODE_TRUE
1280
AC_SUBST([MAINT])dnl
1284
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
1286
# Check to see how 'make' treats includes. -*- Autoconf -*-
1288
# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
1290
# This file is free software; the Free Software Foundation
1291
# gives unlimited permission to copy and/or distribute it,
1292
# with or without modifications, as long as this notice is preserved.
1298
# Check to see how make treats includes.
1299
AC_DEFUN([AM_MAKE_INCLUDE],
1300
[am_make=${MAKE-make}
1301
cat > confinc << 'END'
1303
@echo this is the am__doit target
1306
# If we don't find an include directive, just comment out the code.
1307
AC_MSG_CHECKING([for style of include used by $am_make])
1311
# First try GNU make style include.
1312
echo "include confinc" > confmf
1313
# Ignore all kinds of additional output from `make'.
1314
case `$am_make -s -f confmf 2> /dev/null` in #(
1315
*the\ am__doit\ target*)
1321
# Now try BSD make style include.
1322
if test "$am__include" = "#"; then
1323
echo '.include "confinc"' > confmf
1324
case `$am_make -s -f confmf 2> /dev/null` in #(
1325
*the\ am__doit\ target*)
1326
am__include=.include
1332
AC_SUBST([am__include])
1333
AC_SUBST([am__quote])
1334
AC_MSG_RESULT([$_am_result])
1335
rm -f confinc confmf
1338
# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
1339
# Free Software Foundation, Inc.
1341
# This file is free software; the Free Software Foundation
1342
# gives unlimited permission to copy and/or distribute it,
1343
# with or without modifications, as long as this notice is preserved.
1349
# Like AC_PROG_CC_C_O, but changed for automake.
1350
AC_DEFUN([AM_PROG_CC_C_O],
1351
[AC_REQUIRE([AC_PROG_CC_C_O])dnl
1352
AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1353
AC_REQUIRE_AUX_FILE([compile])dnl
1354
# FIXME: we rely on the cache variable name because
1355
# there is no other way.
1357
am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
1358
eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
1359
if test "$am_t" != yes; then
1360
# Losing compiler, so override with the script.
1361
# FIXME: It is wrong to rewrite CC.
1362
# But if we don't then we get into trouble of one sort or another.
1363
# A longer-term fix would be to have automake use am__CC in this case,
1364
# and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
1365
CC="$am_aux_dir/compile $CC"
1367
dnl Make sure AC_PROG_CC is never called again, or it will override our
1369
m4_define([AC_PROG_CC],
1370
[m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
1373
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
1375
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
1376
# Free Software Foundation, Inc.
1378
# This file is free software; the Free Software Foundation
1379
# gives unlimited permission to copy and/or distribute it,
1380
# with or without modifications, as long as this notice is preserved.
1384
# AM_MISSING_PROG(NAME, PROGRAM)
1385
# ------------------------------
1386
AC_DEFUN([AM_MISSING_PROG],
1387
[AC_REQUIRE([AM_MISSING_HAS_RUN])
1388
$1=${$1-"${am_missing_run}$2"}
1392
# AM_MISSING_HAS_RUN
1393
# ------------------
1394
# Define MISSING if not defined so far and test if it supports --run.
1395
# If it does, set am_missing_run to use it, otherwise, to nothing.
1396
AC_DEFUN([AM_MISSING_HAS_RUN],
1397
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1398
AC_REQUIRE_AUX_FILE([missing])dnl
1399
if test x"${MISSING+set}" != xset; then
1402
MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1404
MISSING="\${SHELL} $am_aux_dir/missing" ;;
1407
# Use eval to expand $SHELL
1408
if eval "$MISSING --run true"; then
1409
am_missing_run="$MISSING --run "
1412
AC_MSG_WARN([`missing' script is too old or missing])
1416
# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1418
# This file is free software; the Free Software Foundation
1419
# gives unlimited permission to copy and/or distribute it,
1420
# with or without modifications, as long as this notice is preserved.
1424
# Check for `mkdir -p'.
1425
AC_DEFUN([AM_PROG_MKDIR_P],
1426
[AC_PREREQ([2.60])dnl
1427
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1428
dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
1429
dnl while keeping a definition of mkdir_p for backward compatibility.
1430
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
1431
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
1432
dnl Makefile.ins that do not define MKDIR_P, so we do our own
1433
dnl adjustment using top_builddir (which is defined more often than
1435
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
1437
[[\\/$]]* | ?:[[\\/]]*) ;;
1438
*/*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
1442
# Helper functions for option handling. -*- Autoconf -*-
1444
# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
1446
# This file is free software; the Free Software Foundation
1447
# gives unlimited permission to copy and/or distribute it,
1448
# with or without modifications, as long as this notice is preserved.
1452
# _AM_MANGLE_OPTION(NAME)
1453
# -----------------------
1454
AC_DEFUN([_AM_MANGLE_OPTION],
1455
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1457
# _AM_SET_OPTION(NAME)
1458
# ------------------------------
1459
# Set option NAME. Presently that only means defining a flag for this option.
1460
AC_DEFUN([_AM_SET_OPTION],
1461
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
1463
# _AM_SET_OPTIONS(OPTIONS)
1464
# ----------------------------------
1465
# OPTIONS is a space-separated list of Automake options.
1466
AC_DEFUN([_AM_SET_OPTIONS],
1467
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1469
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1470
# -------------------------------------------
1471
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1472
AC_DEFUN([_AM_IF_OPTION],
1473
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1475
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
1477
# This file is free software; the Free Software Foundation
1478
# gives unlimited permission to copy and/or distribute it,
1479
# with or without modifications, as long as this notice is preserved.
1481
# AM_RUN_LOG(COMMAND)
1482
# -------------------
1483
# Run COMMAND, save the exit status in ac_status, and log it.
1484
# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
1485
AC_DEFUN([AM_RUN_LOG],
1486
[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
1487
($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
1489
echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1490
(exit $ac_status); }])
1492
# Check to make sure that the build environment is sane. -*- Autoconf -*-
1494
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
1495
# Free Software Foundation, Inc.
1497
# This file is free software; the Free Software Foundation
1498
# gives unlimited permission to copy and/or distribute it,
1499
# with or without modifications, as long as this notice is preserved.
1505
AC_DEFUN([AM_SANITY_CHECK],
1506
[AC_MSG_CHECKING([whether build environment is sane])
1509
echo timestamp > conftest.file
1510
# Reject unsafe characters in $srcdir or the absolute working directory
1511
# name. Accept space and tab only in the latter.
1515
*[[\\\"\#\$\&\'\`$am_lf]]*)
1516
AC_MSG_ERROR([unsafe absolute working directory name]);;
1519
*[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
1520
AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
1523
# Do `set' in a subshell so we don't clobber the current shell's
1524
# arguments. Must try -L first in case configure is actually a
1525
# symlink; some systems play weird games with the mod time of symlinks
1526
# (eg FreeBSD returns the mod time of the symlink's containing
1529
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1530
if test "$[*]" = "X"; then
1532
set X `ls -t "$srcdir/configure" conftest.file`
1535
if test "$[*]" != "X $srcdir/configure conftest.file" \
1536
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
1538
# If neither matched, then we have a broken ls. This can happen
1539
# if, for instance, CONFIG_SHELL is bash and it inherits a
1540
# broken ls alias from the environment. This has actually
1541
# happened. Such a system could not be considered "sane".
1542
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1543
alias in your environment])
1546
test "$[2]" = conftest.file
1552
AC_MSG_ERROR([newly created file is older than distributed files!
1553
Check your system clock])
1555
AC_MSG_RESULT(yes)])
1557
# Copyright (C) 2009 Free Software Foundation, Inc.
1559
# This file is free software; the Free Software Foundation
1560
# gives unlimited permission to copy and/or distribute it,
1561
# with or without modifications, as long as this notice is preserved.
1565
# AM_SILENT_RULES([DEFAULT])
1566
# --------------------------
1567
# Enable less verbose build rules; with the default set to DEFAULT
1568
# (`yes' being less verbose, `no' or empty being verbose).
1569
AC_DEFUN([AM_SILENT_RULES],
1570
[AC_ARG_ENABLE([silent-rules],
1571
[ --enable-silent-rules less verbose build output (undo: `make V=1')
1572
--disable-silent-rules verbose build output (undo: `make V=0')])
1573
case $enable_silent_rules in
1574
yes) AM_DEFAULT_VERBOSITY=0;;
1575
no) AM_DEFAULT_VERBOSITY=1;;
1576
*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
1578
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
1580
AC_SUBST([AM_BACKSLASH])dnl
1581
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
1584
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
1586
# This file is free software; the Free Software Foundation
1587
# gives unlimited permission to copy and/or distribute it,
1588
# with or without modifications, as long as this notice is preserved.
1590
# AM_PROG_INSTALL_STRIP
1591
# ---------------------
1592
# One issue with vendor `install' (even GNU) is that you can't
1593
# specify the program used to strip binaries. This is especially
1594
# annoying in cross-compiling environments, where the build's strip
1595
# is unlikely to handle the host's binaries.
1596
# Fortunately install-sh will honor a STRIPPROG variable, so we
1597
# always use install-sh in `make install-strip', and initialize
1598
# STRIPPROG with the value of the STRIP variable (set by the user).
1599
AC_DEFUN([AM_PROG_INSTALL_STRIP],
1600
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1601
# Installed binaries are usually stripped using `strip' when the user
1602
# run `make install-strip'. However `strip' might not be the right
1603
# tool to use in cross-compilation environments, therefore Automake
1604
# will honor the `STRIP' environment variable to overrule this program.
1605
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1606
if test "$cross_compiling" != no; then
1607
AC_CHECK_TOOL([STRIP], [strip], :)
1609
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1610
AC_SUBST([INSTALL_STRIP_PROGRAM])])
1612
# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
1614
# This file is free software; the Free Software Foundation
1615
# gives unlimited permission to copy and/or distribute it,
1616
# with or without modifications, as long as this notice is preserved.
1620
# _AM_SUBST_NOTMAKE(VARIABLE)
1621
# ---------------------------
1622
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1623
# This macro is traced by Automake.
1624
AC_DEFUN([_AM_SUBST_NOTMAKE])
1626
# AM_SUBST_NOTMAKE(VARIABLE)
1627
# ---------------------------
1628
# Public sister of _AM_SUBST_NOTMAKE.
1629
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1631
# Check how to create a tarball. -*- Autoconf -*-
1633
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
1635
# This file is free software; the Free Software Foundation
1636
# gives unlimited permission to copy and/or distribute it,
1637
# with or without modifications, as long as this notice is preserved.
1641
# _AM_PROG_TAR(FORMAT)
1642
# --------------------
1643
# Check how to create a tarball in format FORMAT.
1644
# FORMAT should be one of `v7', `ustar', or `pax'.
1646
# Substitute a variable $(am__tar) that is a command
1647
# writing to stdout a FORMAT-tarball containing the directory
1649
# tardir=directory && $(am__tar) > result.tar
1651
# Substitute a variable $(am__untar) that extract such
1652
# a tarball read from stdin.
1653
# $(am__untar) < result.tar
1654
AC_DEFUN([_AM_PROG_TAR],
1655
[# Always define AMTAR for backward compatibility.
1656
AM_MISSING_PROG([AMTAR], [tar])
1658
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
1659
[m4_case([$1], [ustar],, [pax],,
1660
[m4_fatal([Unknown tar format])])
1661
AC_MSG_CHECKING([how to create a $1 tar archive])
1662
# Loop over all known methods to create a tar archive until one works.
1663
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1664
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
1665
# Do not fold the above two line into one, because Tru64 sh and
1666
# Solaris sh will not grok spaces in the rhs of `-'.
1667
for _am_tool in $_am_tools
1671
for _am_tar in tar gnutar gtar;
1673
AM_RUN_LOG([$_am_tar --version]) && break
1675
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1676
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1677
am__untar="$_am_tar -xf -"
1680
# Must skip GNU tar: if it does not support --format= it doesn't create
1681
# ustar tarball either.
1682
(tar --version) >/dev/null 2>&1 && continue
1683
am__tar='tar chf - "$$tardir"'
1684
am__tar_='tar chf - "$tardir"'
1685
am__untar='tar xf -'
1688
am__tar='pax -L -x $1 -w "$$tardir"'
1689
am__tar_='pax -L -x $1 -w "$tardir"'
1693
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1694
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1695
am__untar='cpio -i -H $1 -d'
1704
# If the value was cached, stop now. We just wanted to have am__tar
1705
# and am__untar set.
1706
test -n "${am_cv_prog_tar_$1}" && break
1708
# tar/untar a dummy directory, and stop if the command works
1711
echo GrepMe > conftest.dir/file
1712
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1714
if test -s conftest.tar; then
1715
AM_RUN_LOG([$am__untar <conftest.tar])
1716
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1721
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1722
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1724
AC_SUBST([am__untar])
1727
dnl -*- mode: autoconf -*-
1732
dnl GTK_DOC_CHECK([minimum-gtk-doc-version])
1733
AC_DEFUN([GTK_DOC_CHECK],
1735
AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
1736
AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
1738
dnl check for tools we added during development
1739
AC_PATH_PROG([GTKDOC_CHECK],[gtkdoc-check])
1740
AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true])
1741
AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf])
1743
dnl for overriding the documentation installation directory
1744
AC_ARG_WITH([html-dir],
1745
AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
1746
[with_html_dir='${datadir}/gtk-doc/html'])
1747
HTML_DIR="$with_html_dir"
1748
AC_SUBST([HTML_DIR])
1750
dnl enable/disable documentation building
1751
AC_ARG_ENABLE([gtk-doc],
1752
AS_HELP_STRING([--enable-gtk-doc],
1753
[use gtk-doc to build documentation [[default=no]]]),,
1754
[enable_gtk_doc=no])
1756
if test x$enable_gtk_doc = xyes; then
1758
[PKG_CHECK_EXISTS([gtk-doc],,
1759
AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))],
1760
[PKG_CHECK_EXISTS([gtk-doc >= $1],,
1761
AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build $PACKAGE_NAME]))])
1764
AC_MSG_CHECKING([whether to build gtk-doc documentation])
1765
AC_MSG_RESULT($enable_gtk_doc)
1767
dnl enable/disable output formats
1768
AC_ARG_ENABLE([gtk-doc-html],
1769
AS_HELP_STRING([--enable-gtk-doc-html],
1770
[build documentation in html format [[default=yes]]]),,
1771
[enable_gtk_doc_html=yes])
1772
AC_ARG_ENABLE([gtk-doc-pdf],
1773
AS_HELP_STRING([--enable-gtk-doc-pdf],
1774
[build documentation in pdf format [[default=no]]]),,
1775
[enable_gtk_doc_pdf=no])
1777
if test -z "$GTKDOC_MKPDF"; then
1778
enable_gtk_doc_pdf=no
1782
AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
1783
AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes])
1784
AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes])
1785
AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
1786
AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"])
1790
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
1791
# serial 40 IT_PROG_INTLTOOL
1792
AC_DEFUN([IT_PROG_INTLTOOL], [
1793
AC_PREREQ([2.50])dnl
1794
AC_REQUIRE([AM_NLS])dnl
1796
case "$am__api_version" in
1798
AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
1804
if test -n "$1"; then
1805
AC_MSG_CHECKING([for intltool >= $1])
1807
INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
1808
INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
1809
[INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
1811
AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
1812
test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
1813
AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
1816
AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
1817
AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
1818
AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
1819
if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
1820
AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
1823
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 $< [$]@'
1824
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 $< [$]@'
1825
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 $< [$]@'
1826
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 $< [$]@'
1827
INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
1828
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 $< [$]@'
1829
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 $< [$]@'
1830
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 $< [$]@'
1831
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 $< [$]@'
1832
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 $< [$]@'
1833
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 $< [$]@'
1834
INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@'
1835
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 $< [$]@'
1836
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 $< [$]@'
1837
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 $< [$]@'
1838
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 $< [$]@'
1839
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 $< [$]@'
1840
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 $< [$]@'
1841
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 $< [$]@'
1843
_IT_SUBST(INTLTOOL_DESKTOP_RULE)
1844
_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
1845
_IT_SUBST(INTLTOOL_KEYS_RULE)
1846
_IT_SUBST(INTLTOOL_PROP_RULE)
1847
_IT_SUBST(INTLTOOL_OAF_RULE)
1848
_IT_SUBST(INTLTOOL_PONG_RULE)
1849
_IT_SUBST(INTLTOOL_SERVER_RULE)
1850
_IT_SUBST(INTLTOOL_SHEET_RULE)
1851
_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
1852
_IT_SUBST(INTLTOOL_UI_RULE)
1853
_IT_SUBST(INTLTOOL_XAM_RULE)
1854
_IT_SUBST(INTLTOOL_KBD_RULE)
1855
_IT_SUBST(INTLTOOL_XML_RULE)
1856
_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
1857
_IT_SUBST(INTLTOOL_CAVES_RULE)
1858
_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
1859
_IT_SUBST(INTLTOOL_THEME_RULE)
1860
_IT_SUBST(INTLTOOL_SERVICE_RULE)
1861
_IT_SUBST(INTLTOOL_POLICY_RULE)
1863
# Check the gettext tools to make sure they are GNU
1864
AC_PATH_PROG(XGETTEXT, xgettext)
1865
AC_PATH_PROG(MSGMERGE, msgmerge)
1866
AC_PATH_PROG(MSGFMT, msgfmt)
1867
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1868
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
1869
AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
1871
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
1872
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
1873
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
1874
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
1875
AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
1878
AC_PATH_PROG(INTLTOOL_PERL, perl)
1879
if test -z "$INTLTOOL_PERL"; then
1880
AC_MSG_ERROR([perl not found])
1882
AC_MSG_CHECKING([for perl >= 5.8.1])
1883
$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
1884
if test $? -ne 0; then
1885
AC_MSG_ERROR([perl 5.8.1 is required for intltool])
1887
IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
1888
AC_MSG_RESULT([$IT_PERL_VERSION])
1890
if test "x$2" != "xno-xml"; then
1891
AC_MSG_CHECKING([for XML::Parser])
1892
if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
1895
AC_MSG_ERROR([XML::Parser perl module is required for intltool])
1899
# Substitute ALL_LINGUAS so we can use it in po/Makefile
1900
AC_SUBST(ALL_LINGUAS)
1902
# Set DATADIRNAME correctly if it is not set yet
1903
# (copied from glib-gettext.m4)
1904
if test -z "$DATADIRNAME"; then
1906
[AC_LANG_PROGRAM([[]],
1907
[[extern int _nl_msg_cat_cntr;
1908
return _nl_msg_cat_cntr]])],
1909
[DATADIRNAME=share],
1912
dnl On Solaris, if bind_textdomain_codeset is in libc,
1913
dnl GNU format message catalog is always supported,
1914
dnl since both are added to the libc all together.
1915
dnl Hence, we'd like to go with DATADIRNAME=share
1917
AC_CHECK_FUNC(bind_textdomain_codeset,
1918
[DATADIRNAME=share], [DATADIRNAME=lib])
1925
AC_SUBST(DATADIRNAME)
1932
# IT_PO_SUBDIR(DIRNAME)
1933
# ---------------------
1934
# All po subdirs have to be declared with this macro; the subdir "po" is
1935
# declared by IT_PROG_INTLTOOL.
1937
AC_DEFUN([IT_PO_SUBDIR],
1938
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
1940
dnl The following CONFIG_COMMANDS should be executed at the very end
1941
dnl of config.status.
1942
AC_CONFIG_COMMANDS_PRE([
1943
AC_CONFIG_COMMANDS([$1/stamp-it], [
1944
if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
1945
AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
1947
rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
1952
'"s|^| $ac_top_srcdir/|" \
1953
"$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
1955
[sed '/^POTFILES =/,/[^\\]$/ {
1959
' "$1/Makefile.in" >"$1/Makefile"]
1960
rm -f "$1/Makefile.tmp"
1961
mv "$1/stamp-it.tmp" "$1/stamp-it"
1966
# _IT_SUBST(VARIABLE)
1967
# -------------------
1968
# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
1970
AC_DEFUN([_IT_SUBST],
1973
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
1978
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
1979
# A hint is needed for aclocal from Automake <= 1.9.4:
1980
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
1983
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1985
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1986
# 2006, 2007, 2008 Free Software Foundation, Inc.
1987
# Written by Gordon Matzigkeit, 1996
1989
# This file is free software; the Free Software Foundation gives
1990
# unlimited permission to copy and/or distribute it, with or without
1991
# modifications, as long as this notice is preserved.
1993
m4_define([_LT_COPYING], [dnl
1994
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1995
# 2006, 2007, 2008 Free Software Foundation, Inc.
1996
# Written by Gordon Matzigkeit, 1996
1998
# This file is part of GNU Libtool.
2000
# GNU Libtool is free software; you can redistribute it and/or
2001
# modify it under the terms of the GNU General Public License as
2002
# published by the Free Software Foundation; either version 2 of
2003
# the License, or (at your option) any later version.
2005
# As a special exception to the GNU General Public License,
2006
# if you distribute this file as part of a program or library that
2007
# is built using GNU Libtool, you may include this file under the
2008
# same distribution terms that you use for the rest of that program.
2010
# GNU Libtool is distributed in the hope that it will be useful,
2011
# but WITHOUT ANY WARRANTY; without even the implied warranty of
2012
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2013
# GNU General Public License for more details.
2015
# You should have received a copy of the GNU General Public License
2016
# along with GNU Libtool; see the file COPYING. If not, a copy
2017
# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
2018
# obtained by writing to the Free Software Foundation, Inc.,
2019
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2025
# LT_PREREQ(VERSION)
2026
# ------------------
2027
# Complain and exit if this libtool version is less that VERSION.
2028
m4_defun([LT_PREREQ],
2029
[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
2031
[m4_fatal([Libtool version $1 or higher is required],
2036
# _LT_CHECK_BUILDDIR
2037
# ------------------
2038
# Complain if the absolute build directory name contains unusual characters
2039
m4_defun([_LT_CHECK_BUILDDIR],
2042
AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
2047
# LT_INIT([OPTIONS])
2048
# ------------------
2050
[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
2051
AC_BEFORE([$0], [LT_LANG])dnl
2052
AC_BEFORE([$0], [LT_OUTPUT])dnl
2053
AC_BEFORE([$0], [LTDL_INIT])dnl
2054
m4_require([_LT_CHECK_BUILDDIR])dnl
2056
dnl Autoconf doesn't catch unexpanded LT_ macros by default:
2057
m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
2058
m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
2059
dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
2060
dnl unless we require an AC_DEFUNed macro:
2061
AC_REQUIRE([LTOPTIONS_VERSION])dnl
2062
AC_REQUIRE([LTSUGAR_VERSION])dnl
2063
AC_REQUIRE([LTVERSION_VERSION])dnl
2064
AC_REQUIRE([LTOBSOLETE_VERSION])dnl
2065
m4_require([_LT_PROG_LTMAIN])dnl
2068
_LT_SET_OPTIONS([$0], [$1])
2070
# This can be used to rebuild libtool when needed
2071
LIBTOOL_DEPS="$ltmain"
2073
# Always use our own libtool.
2074
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2075
AC_SUBST(LIBTOOL)dnl
2080
m4_define([LT_INIT])
2084
AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
2085
AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
2086
dnl aclocal-1.4 backwards compatibility:
2087
dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
2088
dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
2091
# _LT_CC_BASENAME(CC)
2092
# -------------------
2093
# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
2094
m4_defun([_LT_CC_BASENAME],
2095
[for cc_temp in $1""; do
2097
compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
2098
distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
2103
cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
2107
# _LT_FILEUTILS_DEFAULTS
2108
# ----------------------
2109
# It is okay to use these file commands and assume they have been set
2110
# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
2111
m4_defun([_LT_FILEUTILS_DEFAULTS],
2115
])# _LT_FILEUTILS_DEFAULTS
2120
m4_defun([_LT_SETUP],
2121
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2122
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2123
_LT_DECL([], [host_alias], [0], [The host system])dnl
2124
_LT_DECL([], [host], [0])dnl
2125
_LT_DECL([], [host_os], [0])dnl
2127
_LT_DECL([], [build_alias], [0], [The build system])dnl
2128
_LT_DECL([], [build], [0])dnl
2129
_LT_DECL([], [build_os], [0])dnl
2131
AC_REQUIRE([AC_PROG_CC])dnl
2132
AC_REQUIRE([LT_PATH_LD])dnl
2133
AC_REQUIRE([LT_PATH_NM])dnl
2135
AC_REQUIRE([AC_PROG_LN_S])dnl
2136
test -z "$LN_S" && LN_S="ln -s"
2137
_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
2139
AC_REQUIRE([LT_CMD_MAX_LEN])dnl
2140
_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
2141
_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
2143
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2144
m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2145
m4_require([_LT_CMD_RELOAD])dnl
2146
m4_require([_LT_CHECK_MAGIC_METHOD])dnl
2147
m4_require([_LT_CMD_OLD_ARCHIVE])dnl
2148
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
2150
_LT_CONFIG_LIBTOOL_INIT([
2151
# See if we are running on zsh, and set the options which allow our
2152
# commands through without removal of \ escapes INIT.
2153
if test -n "\${ZSH_VERSION+set}" ; then
2154
setopt NO_GLOB_SUBST
2157
if test -n "${ZSH_VERSION+set}" ; then
2158
setopt NO_GLOB_SUBST
2163
m4_require([_LT_TAG_COMPILER])dnl
2164
_LT_PROG_ECHO_BACKSLASH
2168
# AIX sometimes has problems with the GCC collect2 program. For some
2169
# reason, if we set the COLLECT_NAMES environment variable, the problems
2170
# vanish in a puff of smoke.
2171
if test "X${COLLECT_NAMES+set}" != Xset; then
2173
export COLLECT_NAMES
2178
# Sed substitution that helps us do robust quoting. It backslashifies
2179
# metacharacters that are still active within double-quoted strings.
2180
sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
2182
# Same as above, but do not quote variable references.
2183
double_quote_subst='s/\([["`\\]]\)/\\\1/g'
2185
# Sed substitution to delay expansion of an escaped shell variable in a
2186
# double_quote_subst'ed string.
2187
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
2189
# Sed substitution to delay expansion of an escaped single quote.
2190
delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
2192
# Sed substitution to avoid accidental globbing in evaled expressions
2193
no_glob_subst='s/\*/\\\*/g'
2197
can_build_shared=yes
2199
# All known linkers require a `.a' archive for static linking (except MSVC,
2200
# which needs '.lib').
2203
with_gnu_ld="$lt_cv_prog_gnu_ld"
2206
old_CFLAGS="$CFLAGS"
2208
# Set sane defaults for various variables
2209
test -z "$CC" && CC=cc
2210
test -z "$LTCC" && LTCC=$CC
2211
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
2212
test -z "$LD" && LD=ld
2213
test -z "$ac_objext" && ac_objext=o
2215
_LT_CC_BASENAME([$compiler])
2217
# Only perform the check for file, if the check method requires it
2218
test -z "$MAGIC_CMD" && MAGIC_CMD=file
2219
case $deplibs_check_method in
2221
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
2227
# Use C for the default configuration in the libtool script
2228
LT_SUPPORTED_TAG([CC])
2230
_LT_LANG_DEFAULT_CONFIG
2237
# Note that this code is called both from `configure', and `config.status'
2238
# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
2239
# `config.status' has no value for ac_aux_dir unless we are using Automake,
2240
# so we pass a copy along to make sure it has a sensible value anyway.
2241
m4_defun([_LT_PROG_LTMAIN],
2242
[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
2243
_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
2244
ltmain="$ac_aux_dir/ltmain.sh"
2249
# So that we can recreate a full libtool script including additional
2250
# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
2251
# in macros and then make a single call at the end using the `libtool'
2255
# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
2256
# ----------------------------------------
2257
# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
2258
m4_define([_LT_CONFIG_LIBTOOL_INIT],
2260
[m4_append([_LT_OUTPUT_LIBTOOL_INIT],
2265
m4_define([_LT_OUTPUT_LIBTOOL_INIT])
2268
# _LT_CONFIG_LIBTOOL([COMMANDS])
2269
# ------------------------------
2270
# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
2271
m4_define([_LT_CONFIG_LIBTOOL],
2273
[m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
2278
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
2281
# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
2282
# -----------------------------------------------------
2283
m4_defun([_LT_CONFIG_SAVE_COMMANDS],
2284
[_LT_CONFIG_LIBTOOL([$1])
2285
_LT_CONFIG_LIBTOOL_INIT([$2])
2289
# _LT_FORMAT_COMMENT([COMMENT])
2290
# -----------------------------
2291
# Add leading comment marks to the start of each line, and a trailing
2292
# full-stop to the whole comment if one is not present already.
2293
m4_define([_LT_FORMAT_COMMENT],
2295
m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
2296
[['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
2303
# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
2304
# -------------------------------------------------------------------
2305
# CONFIGNAME is the name given to the value in the libtool script.
2306
# VARNAME is the (base) name used in the configure script.
2307
# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
2308
# VARNAME. Any other value will be used directly.
2309
m4_define([_LT_DECL],
2310
[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
2311
[lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
2312
[m4_ifval([$1], [$1], [$2])])
2313
lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
2315
[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
2316
lt_dict_add_subkey([lt_decl_dict], [$2],
2317
[tagged?], [m4_ifval([$5], [yes], [no])])])
2321
# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
2322
# --------------------------------------------------------
2323
m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
2326
# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
2327
# ------------------------------------------------
2328
m4_define([lt_decl_tag_varnames],
2329
[_lt_decl_filter([tagged?], [yes], $@)])
2332
# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
2333
# ---------------------------------------------------------
2334
m4_define([_lt_decl_filter],
2336
[0], [m4_fatal([$0: too few arguments: $#])],
2337
[1], [m4_fatal([$0: too few arguments: $#: $1])],
2338
[2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
2339
[3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
2340
[lt_dict_filter([lt_decl_dict], $@)])[]dnl
2344
# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
2345
# --------------------------------------------------
2346
m4_define([lt_decl_quote_varnames],
2347
[_lt_decl_filter([value], [1], $@)])
2350
# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
2351
# ---------------------------------------------------
2352
m4_define([lt_decl_dquote_varnames],
2353
[_lt_decl_filter([value], [2], $@)])
2356
# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
2357
# ---------------------------------------------------
2358
m4_define([lt_decl_varnames_tagged],
2359
[m4_assert([$# <= 2])dnl
2360
_$0(m4_quote(m4_default([$1], [[, ]])),
2361
m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
2362
m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
2363
m4_define([_lt_decl_varnames_tagged],
2364
[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
2367
# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
2368
# ------------------------------------------------
2369
m4_define([lt_decl_all_varnames],
2370
[_$0(m4_quote(m4_default([$1], [[, ]])),
2372
m4_quote(lt_decl_varnames),
2373
m4_quote(m4_shift($@))))[]dnl
2375
m4_define([_lt_decl_all_varnames],
2376
[lt_join($@, lt_decl_varnames_tagged([$1],
2377
lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
2381
# _LT_CONFIG_STATUS_DECLARE([VARNAME])
2382
# ------------------------------------
2383
# Quote a variable value, and forward it to `config.status' so that its
2384
# declaration there will have the same value as in `configure'. VARNAME
2385
# must have a single quote delimited value for this to work.
2386
m4_define([_LT_CONFIG_STATUS_DECLARE],
2387
[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
2390
# _LT_CONFIG_STATUS_DECLARATIONS
2391
# ------------------------------
2392
# We delimit libtool config variables with single quotes, so when
2393
# we write them to config.status, we have to be sure to quote all
2394
# embedded single quotes properly. In configure, this macro expands
2395
# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
2397
# <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
2398
m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
2399
[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
2400
[m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
2405
# Output comment and list of tags supported by the script
2406
m4_defun([_LT_LIBTOOL_TAGS],
2407
[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
2408
available_tags="_LT_TAGS"dnl
2412
# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
2413
# -----------------------------------
2414
# Extract the dictionary values for VARNAME (optionally with TAG) and
2415
# expand to a commented shell variable setting:
2417
# # Some comment about what VAR is for.
2418
# visible_name=$lt_internal_name
2419
m4_define([_LT_LIBTOOL_DECLARE],
2420
[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
2421
[description])))[]dnl
2422
m4_pushdef([_libtool_name],
2423
m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
2424
m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
2425
[0], [_libtool_name=[$]$1],
2426
[1], [_libtool_name=$lt_[]$1],
2427
[2], [_libtool_name=$lt_[]$1],
2428
[_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
2429
m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
2433
# _LT_LIBTOOL_CONFIG_VARS
2434
# -----------------------
2435
# Produce commented declarations of non-tagged libtool config variables
2436
# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
2437
# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
2438
# section) are produced by _LT_LIBTOOL_TAG_VARS.
2439
m4_defun([_LT_LIBTOOL_CONFIG_VARS],
2440
[m4_foreach([_lt_var],
2441
m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
2442
[m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
2445
# _LT_LIBTOOL_TAG_VARS(TAG)
2446
# -------------------------
2447
m4_define([_LT_LIBTOOL_TAG_VARS],
2448
[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
2449
[m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
2452
# _LT_TAGVAR(VARNAME, [TAGNAME])
2453
# ------------------------------
2454
m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
2457
# _LT_CONFIG_COMMANDS
2458
# -------------------
2459
# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
2460
# variables for single and double quote escaping we saved from calls
2461
# to _LT_DECL, we can put quote escaped variables declarations
2462
# into `config.status', and then the shell code to quote escape them in
2463
# for loops in `config.status'. Finally, any additional code accumulated
2464
# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
2465
m4_defun([_LT_CONFIG_COMMANDS],
2466
[AC_PROVIDE_IFELSE([LT_OUTPUT],
2467
dnl If the libtool generation code has been placed in $CONFIG_LT,
2468
dnl instead of duplicating it all over again into config.status,
2469
dnl then we will have config.status run $CONFIG_LT later, so it
2470
dnl needs to know what name is stored there:
2471
[AC_CONFIG_COMMANDS([libtool],
2472
[$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
2473
dnl If the libtool generation code is destined for config.status,
2474
dnl expand the accumulated commands and init code now:
2475
[AC_CONFIG_COMMANDS([libtool],
2476
[_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
2477
])#_LT_CONFIG_COMMANDS
2481
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
2484
# The HP-UX ksh and POSIX shell print the target directory to stdout
2486
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2488
sed_quote_subst='$sed_quote_subst'
2489
double_quote_subst='$double_quote_subst'
2490
delay_variable_subst='$delay_variable_subst'
2491
_LT_CONFIG_STATUS_DECLARATIONS
2493
LTCFLAGS='$LTCFLAGS'
2494
compiler='$compiler_DEFAULT'
2496
# Quote evaled strings.
2497
for var in lt_decl_all_varnames([[ \
2498
]], lt_decl_quote_varnames); do
2499
case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
2500
*[[\\\\\\\`\\"\\\$]]*)
2501
eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
2504
eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
2509
# Double-quote double-evaled strings.
2510
for var in lt_decl_all_varnames([[ \
2511
]], lt_decl_dquote_varnames); do
2512
case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
2513
*[[\\\\\\\`\\"\\\$]]*)
2514
eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
2517
eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
2522
# Fix-up fallback echo if it was mangled by the above quoting rules.
2524
*'\\\[$]0 --fallback-echo"')dnl "
2525
lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
2529
_LT_OUTPUT_LIBTOOL_INIT
2535
# This macro allows early generation of the libtool script (before
2536
# AC_OUTPUT is called), incase it is used in configure for compilation
2538
AC_DEFUN([LT_OUTPUT],
2539
[: ${CONFIG_LT=./config.lt}
2540
AC_MSG_NOTICE([creating $CONFIG_LT])
2541
cat >"$CONFIG_LT" <<_LTEOF
2543
# Generated by $as_me.
2544
# Run this file to recreate a libtool stub with the current configuration.
2547
SHELL=\${CONFIG_SHELL-$SHELL}
2550
cat >>"$CONFIG_LT" <<\_LTEOF
2554
exec AS_MESSAGE_FD>&1
2555
exec AS_MESSAGE_LOG_FD>>config.log
2558
AS_BOX([Running $as_me.])
2559
} >&AS_MESSAGE_LOG_FD
2562
\`$as_me' creates a local libtool stub from the current configuration,
2563
for use in further configure time tests before the real libtool is
2566
Usage: $[0] [[OPTIONS]]
2568
-h, --help print this help, then exit
2569
-V, --version print version number, then exit
2570
-q, --quiet do not print progress messages
2571
-d, --debug don't remove temporary files
2573
Report bugs to <bug-libtool@gnu.org>."
2576
m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
2577
m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
2578
configured by $[0], generated by m4_PACKAGE_STRING.
2580
Copyright (C) 2008 Free Software Foundation, Inc.
2581
This config.lt script is free software; the Free Software Foundation
2582
gives unlimited permision to copy, distribute and modify it."
2584
while test $[#] != 0
2587
--version | --v* | -V )
2588
echo "$lt_cl_version"; exit 0 ;;
2589
--help | --h* | -h )
2590
echo "$lt_cl_help"; exit 0 ;;
2591
--debug | --d* | -d )
2593
--quiet | --q* | --silent | --s* | -q )
2596
-*) AC_MSG_ERROR([unrecognized option: $[1]
2597
Try \`$[0] --help' for more information.]) ;;
2599
*) AC_MSG_ERROR([unrecognized argument: $[1]
2600
Try \`$[0] --help' for more information.]) ;;
2605
if $lt_cl_silent; then
2606
exec AS_MESSAGE_FD>/dev/null
2610
cat >>"$CONFIG_LT" <<_LTEOF
2611
_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
2614
cat >>"$CONFIG_LT" <<\_LTEOF
2615
AC_MSG_NOTICE([creating $ofile])
2616
_LT_OUTPUT_LIBTOOL_COMMANDS
2619
chmod +x "$CONFIG_LT"
2621
# configure is writing to config.log, but config.lt does its own redirection,
2622
# appending to config.log, which fails on DOS, as config.log is still kept
2623
# open by configure. Here we exec the FD to /dev/null, effectively closing
2624
# config.log, so it can be properly (re)opened and appended to by config.lt.
2625
if test "$no_create" != yes; then
2627
test "$silent" = yes &&
2628
lt_config_lt_args="$lt_config_lt_args --quiet"
2629
exec AS_MESSAGE_LOG_FD>/dev/null
2630
$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
2631
exec AS_MESSAGE_LOG_FD>>config.log
2632
$lt_cl_success || AS_EXIT(1)
2639
# If TAG is the built-in tag, create an initial libtool script with a
2640
# default configuration from the untagged config vars. Otherwise add code
2641
# to config.status for appending the configuration named by TAG from the
2642
# matching tagged config vars.
2643
m4_defun([_LT_CONFIG],
2644
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2645
_LT_CONFIG_SAVE_COMMANDS([
2646
m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
2647
m4_if(_LT_TAG, [C], [
2648
# See if we are running on zsh, and set the options which allow our
2649
# commands through without removal of \ escapes.
2650
if test -n "${ZSH_VERSION+set}" ; then
2651
setopt NO_GLOB_SUBST
2655
trap "$RM \"$cfgfile\"; exit 1" 1 2 15
2658
cat <<_LT_EOF >> "$cfgfile"
2661
# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
2662
# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
2663
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2664
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
2669
# ### BEGIN LIBTOOL CONFIG
2670
_LT_LIBTOOL_CONFIG_VARS
2671
_LT_LIBTOOL_TAG_VARS
2672
# ### END LIBTOOL CONFIG
2678
cat <<\_LT_EOF >> "$cfgfile"
2679
# AIX sometimes has problems with the GCC collect2 program. For some
2680
# reason, if we set the COLLECT_NAMES environment variable, the problems
2681
# vanish in a puff of smoke.
2682
if test "X${COLLECT_NAMES+set}" != Xset; then
2684
export COLLECT_NAMES
2692
# We use sed instead of cat because bash on DJGPP gets confused if
2693
# if finds mixed CR/LF and LF-only lines. Since sed operates in
2694
# text mode, it properly converts lines to CR/LF. This bash problem
2695
# is reportedly fixed, but why not run on old versions too?
2696
sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
2697
|| (rm -f "$cfgfile"; exit 1)
2699
_LT_PROG_XSI_SHELLFNS
2701
sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
2702
|| (rm -f "$cfgfile"; exit 1)
2704
mv -f "$cfgfile" "$ofile" ||
2705
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
2708
[cat <<_LT_EOF >> "$ofile"
2710
dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
2711
dnl in a comment (ie after a #).
2712
# ### BEGIN LIBTOOL TAG CONFIG: $1
2713
_LT_LIBTOOL_TAG_VARS(_LT_TAG)
2714
# ### END LIBTOOL TAG CONFIG: $1
2721
TIMESTAMP='$TIMESTAMP'
2723
ofile='$ofile'], [])
2724
])dnl /_LT_CONFIG_SAVE_COMMANDS
2728
# LT_SUPPORTED_TAG(TAG)
2729
# ---------------------
2730
# Trace this macro to discover what tags are supported by the libtool
2731
# --tag option, using:
2732
# autoconf --trace 'LT_SUPPORTED_TAG:$1'
2733
AC_DEFUN([LT_SUPPORTED_TAG], [])
2736
# C support is built-in for now
2737
m4_define([_LT_LANG_C_enabled], [])
2738
m4_define([_LT_TAGS], [])
2743
# Enable libtool support for the given language if not already enabled.
2745
[AC_BEFORE([$0], [LT_OUTPUT])dnl
2748
[C++], [_LT_LANG(CXX)],
2749
[Java], [_LT_LANG(GCJ)],
2750
[Fortran 77], [_LT_LANG(F77)],
2751
[Fortran], [_LT_LANG(FC)],
2752
[Windows Resource], [_LT_LANG(RC)],
2753
[m4_ifdef([_LT_LANG_]$1[_CONFIG],
2755
[m4_fatal([$0: unsupported language: "$1"])])])dnl
2759
# _LT_LANG(LANGNAME)
2760
# ------------------
2761
m4_defun([_LT_LANG],
2762
[m4_ifdef([_LT_LANG_]$1[_enabled], [],
2763
[LT_SUPPORTED_TAG([$1])dnl
2764
m4_append([_LT_TAGS], [$1 ])dnl
2765
m4_define([_LT_LANG_]$1[_enabled], [])dnl
2766
_LT_LANG_$1_CONFIG($1)])dnl
2770
# _LT_LANG_DEFAULT_CONFIG
2771
# -----------------------
2772
m4_defun([_LT_LANG_DEFAULT_CONFIG],
2773
[AC_PROVIDE_IFELSE([AC_PROG_CXX],
2775
[m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
2777
AC_PROVIDE_IFELSE([AC_PROG_F77],
2779
[m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
2781
AC_PROVIDE_IFELSE([AC_PROG_FC],
2783
[m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
2785
dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
2786
dnl pulling things in needlessly.
2787
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
2789
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
2791
[AC_PROVIDE_IFELSE([LT_PROG_GCJ],
2793
[m4_ifdef([AC_PROG_GCJ],
2794
[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
2795
m4_ifdef([A][M_PROG_GCJ],
2796
[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
2797
m4_ifdef([LT_PROG_GCJ],
2798
[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
2800
AC_PROVIDE_IFELSE([LT_PROG_RC],
2802
[m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
2803
])# _LT_LANG_DEFAULT_CONFIG
2806
AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
2807
AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
2808
AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
2809
AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
2810
dnl aclocal-1.4 backwards compatibility:
2811
dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
2812
dnl AC_DEFUN([AC_LIBTOOL_F77], [])
2813
dnl AC_DEFUN([AC_LIBTOOL_FC], [])
2814
dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
2819
m4_defun([_LT_TAG_COMPILER],
2820
[AC_REQUIRE([AC_PROG_CC])dnl
2822
_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
2823
_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
2824
_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
2825
_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
2827
# If no C compiler was specified, use CC.
2830
# If no C compiler flags were specified, use CFLAGS.
2831
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
2833
# Allow CC to be a program name with arguments.
2835
])# _LT_TAG_COMPILER
2838
# _LT_COMPILER_BOILERPLATE
2839
# ------------------------
2840
# Check for compiler boilerplate output or warnings with
2841
# the simple compiler test code.
2842
m4_defun([_LT_COMPILER_BOILERPLATE],
2843
[m4_require([_LT_DECL_SED])dnl
2844
ac_outfile=conftest.$ac_objext
2845
echo "$lt_simple_compile_test_code" >conftest.$ac_ext
2846
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2847
_lt_compiler_boilerplate=`cat conftest.err`
2849
])# _LT_COMPILER_BOILERPLATE
2852
# _LT_LINKER_BOILERPLATE
2853
# ----------------------
2854
# Check for linker boilerplate output or warnings with
2855
# the simple link test code.
2856
m4_defun([_LT_LINKER_BOILERPLATE],
2857
[m4_require([_LT_DECL_SED])dnl
2858
ac_outfile=conftest.$ac_objext
2859
echo "$lt_simple_link_test_code" >conftest.$ac_ext
2860
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2861
_lt_linker_boilerplate=`cat conftest.err`
2863
])# _LT_LINKER_BOILERPLATE
2865
# _LT_REQUIRED_DARWIN_CHECKS
2866
# -------------------------
2867
m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
2869
rhapsody* | darwin*)
2870
AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
2871
AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
2872
AC_CHECK_TOOL([LIPO], [lipo], [:])
2873
AC_CHECK_TOOL([OTOOL], [otool], [:])
2874
AC_CHECK_TOOL([OTOOL64], [otool64], [:])
2875
_LT_DECL([], [DSYMUTIL], [1],
2876
[Tool to manipulate archived DWARF debug symbol files on Mac OS X])
2877
_LT_DECL([], [NMEDIT], [1],
2878
[Tool to change global to local symbols on Mac OS X])
2879
_LT_DECL([], [LIPO], [1],
2880
[Tool to manipulate fat objects and archives on Mac OS X])
2881
_LT_DECL([], [OTOOL], [1],
2882
[ldd/readelf like tool for Mach-O binaries on Mac OS X])
2883
_LT_DECL([], [OTOOL64], [1],
2884
[ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
2886
AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
2887
[lt_cv_apple_cc_single_mod=no
2888
if test -z "${LT_MULTI_MODULE}"; then
2889
# By default we will add the -single_module flag. You can override
2890
# by either setting the environment variable LT_MULTI_MODULE
2891
# non-empty at configure time, or by adding -multi_module to the
2893
rm -rf libconftest.dylib*
2894
echo "int foo(void){return 1;}" > conftest.c
2895
echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2896
-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
2897
$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2898
-dynamiclib -Wl,-single_module conftest.c 2>conftest.err
2900
if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
2901
lt_cv_apple_cc_single_mod=yes
2903
cat conftest.err >&AS_MESSAGE_LOG_FD
2905
rm -rf libconftest.dylib*
2908
AC_CACHE_CHECK([for -exported_symbols_list linker flag],
2909
[lt_cv_ld_exported_symbols_list],
2910
[lt_cv_ld_exported_symbols_list=no
2911
save_LDFLAGS=$LDFLAGS
2912
echo "_main" > conftest.sym
2913
LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
2914
AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2915
[lt_cv_ld_exported_symbols_list=yes],
2916
[lt_cv_ld_exported_symbols_list=no])
2917
LDFLAGS="$save_LDFLAGS"
2920
rhapsody* | darwin1.[[012]])
2921
_lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
2923
_lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2924
darwin*) # darwin 5.x on
2925
# if running on 10.5 or later, the deployment target defaults
2926
# to the OS version, if on x86, and 10.4, the deployment
2927
# target defaults to 10.4. Don't you love it?
2928
case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
2929
10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
2930
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2932
_lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2934
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2938
if test "$lt_cv_apple_cc_single_mod" = "yes"; then
2939
_lt_dar_single_mod='$single_module'
2941
if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
2942
_lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
2944
_lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
2946
if test "$DSYMUTIL" != ":"; then
2947
_lt_dsymutil='~$DSYMUTIL $lib || :'
2956
# _LT_DARWIN_LINKER_FEATURES
2957
# --------------------------
2958
# Checks for linker and compiler features on darwin
2959
m4_defun([_LT_DARWIN_LINKER_FEATURES],
2961
m4_require([_LT_REQUIRED_DARWIN_CHECKS])
2962
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
2963
_LT_TAGVAR(hardcode_direct, $1)=no
2964
_LT_TAGVAR(hardcode_automatic, $1)=yes
2965
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2966
_LT_TAGVAR(whole_archive_flag_spec, $1)=''
2967
_LT_TAGVAR(link_all_deplibs, $1)=yes
2968
_LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
2969
case $cc_basename in
2970
ifort*) _lt_dar_can_shared=yes ;;
2971
*) _lt_dar_can_shared=$GCC ;;
2973
if test "$_lt_dar_can_shared" = "yes"; then
2974
output_verbose_link_cmd=echo
2975
_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}"
2976
_LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
2977
_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}"
2978
_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}"
2980
[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
2981
_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}"
2982
_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}"
2986
_LT_TAGVAR(ld_shlibs, $1)=no
2990
# _LT_SYS_MODULE_PATH_AIX
2991
# -----------------------
2992
# Links a minimal program and checks the executable
2993
# for the system default hardcoded library path. In most cases,
2994
# this is /usr/lib:/lib, but when the MPI compilers are used
2995
# the location of the communication and MPI libs are included too.
2996
# If we don't find anything, use the default library path according
2997
# to the aix ld manual.
2998
m4_defun([_LT_SYS_MODULE_PATH_AIX],
2999
[m4_require([_LT_DECL_SED])dnl
3000
AC_LINK_IFELSE(AC_LANG_PROGRAM,[
3001
lt_aix_libpath_sed='
3002
/Import File Strings/,/^$/ {
3008
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
3009
# Check for a 64-bit object if we didn't find anything.
3010
if test -z "$aix_libpath"; then
3011
aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
3013
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
3014
])# _LT_SYS_MODULE_PATH_AIX
3017
# _LT_SHELL_INIT(ARG)
3018
# -------------------
3019
m4_define([_LT_SHELL_INIT],
3020
[ifdef([AC_DIVERSION_NOTICE],
3021
[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
3022
[AC_DIVERT_PUSH(NOTICE)])
3028
# _LT_PROG_ECHO_BACKSLASH
3029
# -----------------------
3030
# Add some code to the start of the generated configure script which
3031
# will find an echo command which doesn't interpret backslashes.
3032
m4_defun([_LT_PROG_ECHO_BACKSLASH],
3034
# Check that we are running under the correct shell.
3035
SHELL=${CONFIG_SHELL-/bin/sh}
3039
# Remove one level of quotation (which was required for Make).
3040
ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
3044
ECHO=${lt_ECHO-echo}
3045
if test "X[$]1" = X--no-reexec; then
3046
# Discard the --no-reexec flag, and continue.
3048
elif test "X[$]1" = X--fallback-echo; then
3049
# Avoid inline document here, it may be left over
3051
elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
3052
# Yippee, $ECHO works!
3055
# Restart under the correct shell.
3056
exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
3059
if test "X[$]1" = X--fallback-echo; then
3060
# used as fallback echo
3068
# The HP-UX ksh and POSIX shell print the target directory to stdout
3070
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
3072
if test -z "$lt_ECHO"; then
3073
if test "X${echo_test_string+set}" != Xset; then
3074
# find a string as large as possible, as long as the shell can cope with it
3075
for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
3076
# expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
3077
if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
3078
{ test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
3085
if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
3086
echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
3087
test "X$echo_testing_string" = "X$echo_test_string"; then
3090
# The Solaris, AIX, and Digital Unix default echo programs unquote
3091
# backslashes. This makes it impossible to quote backslashes using
3092
# echo "$something" | sed 's/\\/\\\\/g'
3094
# So, first we look for a working echo in the user's PATH.
3096
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3097
for dir in $PATH /usr/ucb; do
3099
if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
3100
test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
3101
echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
3102
test "X$echo_testing_string" = "X$echo_test_string"; then
3109
if test "X$ECHO" = Xecho; then
3110
# We didn't find a better echo, so look for alternatives.
3111
if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
3112
echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
3113
test "X$echo_testing_string" = "X$echo_test_string"; then
3114
# This shell has a builtin print -r that does the trick.
3116
elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
3117
test "X$CONFIG_SHELL" != X/bin/ksh; then
3118
# If we have ksh, try running configure again with it.
3119
ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
3120
export ORIGINAL_CONFIG_SHELL
3121
CONFIG_SHELL=/bin/ksh
3123
exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
3127
if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
3128
echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
3129
test "X$echo_testing_string" = "X$echo_test_string"; then
3130
# Cool, printf works
3132
elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
3133
test "X$echo_testing_string" = 'X\t' &&
3134
echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
3135
test "X$echo_testing_string" = "X$echo_test_string"; then
3136
CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
3138
SHELL="$CONFIG_SHELL"
3140
ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
3141
elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
3142
test "X$echo_testing_string" = 'X\t' &&
3143
echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
3144
test "X$echo_testing_string" = "X$echo_test_string"; then
3145
ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
3147
# maybe with a smaller string...
3150
for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
3151
if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
3158
if test "$prev" != 'sed 50q "[$]0"'; then
3159
echo_test_string=`eval $prev`
3160
export echo_test_string
3161
exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
3163
# Oops. We lost completely, so just stick with echo.
3172
# Copy echo and quote the copy suitably for passing to libtool from
3173
# the Makefile, instead of quoting the original, which is used later.
3175
if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
3176
lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
3181
_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
3182
_LT_DECL([], [ECHO], [1],
3183
[An echo program that does not interpret backslashes])
3184
])# _LT_PROG_ECHO_BACKSLASH
3189
m4_defun([_LT_ENABLE_LOCK],
3190
[AC_ARG_ENABLE([libtool-lock],
3191
[AS_HELP_STRING([--disable-libtool-lock],
3192
[avoid locking (might break parallel builds)])])
3193
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
3195
# Some flags need to be propagated to the compiler or linker for good
3199
# Find out which ABI we are using.
3200
echo 'int i;' > conftest.$ac_ext
3201
if AC_TRY_EVAL(ac_compile); then
3202
case `/usr/bin/file conftest.$ac_objext` in
3214
# Find out which ABI we are using.
3215
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
3216
if AC_TRY_EVAL(ac_compile); then
3217
if test "$lt_cv_prog_gnu_ld" = yes; then
3218
case `/usr/bin/file conftest.$ac_objext` in
3220
LD="${LD-ld} -melf32bsmip"
3223
LD="${LD-ld} -melf32bmipn32"
3226
LD="${LD-ld} -melf64bmip"
3230
case `/usr/bin/file conftest.$ac_objext` in
3246
x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
3247
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
3248
# Find out which ABI we are using.
3249
echo 'int i;' > conftest.$ac_ext
3250
if AC_TRY_EVAL(ac_compile); then
3251
case `/usr/bin/file conftest.o` in
3254
x86_64-*kfreebsd*-gnu)
3255
LD="${LD-ld} -m elf_i386_fbsd"
3258
LD="${LD-ld} -m elf_i386"
3260
ppc64-*linux*|powerpc64-*linux*)
3261
LD="${LD-ld} -m elf32ppclinux"
3264
LD="${LD-ld} -m elf_s390"
3267
LD="${LD-ld} -m elf32_sparc"
3273
x86_64-*kfreebsd*-gnu)
3274
LD="${LD-ld} -m elf_x86_64_fbsd"
3277
LD="${LD-ld} -m elf_x86_64"
3279
ppc*-*linux*|powerpc*-*linux*)
3280
LD="${LD-ld} -m elf64ppc"
3282
s390*-*linux*|s390*-*tpf*)
3283
LD="${LD-ld} -m elf64_s390"
3286
LD="${LD-ld} -m elf64_sparc"
3296
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
3297
SAVE_CFLAGS="$CFLAGS"
3298
CFLAGS="$CFLAGS -belf"
3299
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
3301
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
3303
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3304
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3305
CFLAGS="$SAVE_CFLAGS"
3309
# Find out which ABI we are using.
3310
echo 'int i;' > conftest.$ac_ext
3311
if AC_TRY_EVAL(ac_compile); then
3312
case `/usr/bin/file conftest.o` in
3314
case $lt_cv_prog_gnu_ld in
3315
yes*) LD="${LD-ld} -m elf64_sparc" ;;
3317
if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
3329
need_locks="$enable_libtool_lock"
3333
# _LT_CMD_OLD_ARCHIVE
3334
# -------------------
3335
m4_defun([_LT_CMD_OLD_ARCHIVE],
3336
[AC_CHECK_TOOL(AR, ar, false)
3337
test -z "$AR" && AR=ar
3338
test -z "$AR_FLAGS" && AR_FLAGS=cru
3339
_LT_DECL([], [AR], [1], [The archiver])
3340
_LT_DECL([], [AR_FLAGS], [1])
3342
AC_CHECK_TOOL(STRIP, strip, :)
3343
test -z "$STRIP" && STRIP=:
3344
_LT_DECL([], [STRIP], [1], [A symbol stripping program])
3346
AC_CHECK_TOOL(RANLIB, ranlib, :)
3347
test -z "$RANLIB" && RANLIB=:
3348
_LT_DECL([], [RANLIB], [1],
3349
[Commands used to install an old-style archive])
3351
# Determine commands to create old-style static archives.
3352
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
3353
old_postinstall_cmds='chmod 644 $oldlib'
3354
old_postuninstall_cmds=
3356
if test -n "$RANLIB"; then
3359
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
3362
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
3365
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
3367
_LT_DECL([], [old_postinstall_cmds], [2])
3368
_LT_DECL([], [old_postuninstall_cmds], [2])
3369
_LT_TAGDECL([], [old_archive_cmds], [2],
3370
[Commands used to build an old-style archive])
3371
])# _LT_CMD_OLD_ARCHIVE
3374
# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3375
# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
3376
# ----------------------------------------------------------------
3377
# Check whether the given compiler option works
3378
AC_DEFUN([_LT_COMPILER_OPTION],
3379
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3380
m4_require([_LT_DECL_SED])dnl
3381
AC_CACHE_CHECK([$1], [$2],
3383
m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
3384
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3385
lt_compiler_flag="$3"
3386
# Insert the option either (1) after the last *FLAGS variable, or
3387
# (2) before a word containing "conftest.", or (3) at the end.
3388
# Note that $ac_compile itself does not contain backslashes and begins
3389
# with a dollar sign (not a hyphen), so the echo should work correctly.
3390
# The option is referenced via a variable to avoid confusing sed.
3391
lt_compile=`echo "$ac_compile" | $SED \
3392
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3393
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3394
-e 's:$: $lt_compiler_flag:'`
3395
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3396
(eval "$lt_compile" 2>conftest.err)
3398
cat conftest.err >&AS_MESSAGE_LOG_FD
3399
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3400
if (exit $ac_status) && test -s "$ac_outfile"; then
3401
# The compiler can only warn and ignore the option if not recognized
3402
# So say no if there are warnings other than the usual output.
3403
$ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
3404
$SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
3405
if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
3412
if test x"[$]$2" = xyes; then
3413
m4_if([$5], , :, [$5])
3415
m4_if([$6], , :, [$6])
3417
])# _LT_COMPILER_OPTION
3420
AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
3421
dnl aclocal-1.4 backwards compatibility:
3422
dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
3425
# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3426
# [ACTION-SUCCESS], [ACTION-FAILURE])
3427
# ----------------------------------------------------
3428
# Check whether the given linker option works
3429
AC_DEFUN([_LT_LINKER_OPTION],
3430
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3431
m4_require([_LT_DECL_SED])dnl
3432
AC_CACHE_CHECK([$1], [$2],
3434
save_LDFLAGS="$LDFLAGS"
3435
LDFLAGS="$LDFLAGS $3"
3436
echo "$lt_simple_link_test_code" > conftest.$ac_ext
3437
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
3438
# The linker can only warn and ignore the option if not recognized
3439
# So say no if there are warnings
3440
if test -s conftest.err; then
3441
# Append any errors to the config.log.
3442
cat conftest.err 1>&AS_MESSAGE_LOG_FD
3443
$ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
3444
$SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
3445
if diff conftest.exp conftest.er2 >/dev/null; then
3453
LDFLAGS="$save_LDFLAGS"
3456
if test x"[$]$2" = xyes; then
3457
m4_if([$4], , :, [$4])
3459
m4_if([$5], , :, [$5])
3461
])# _LT_LINKER_OPTION
3464
AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
3465
dnl aclocal-1.4 backwards compatibility:
3466
dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
3471
AC_DEFUN([LT_CMD_MAX_LEN],
3472
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3473
# find the maximum length of command line arguments
3474
AC_MSG_CHECKING([the maximum length of command line arguments])
3475
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
3481
# On DJGPP, this test can blow up pretty badly due to problems in libc
3482
# (any single argument exceeding 2000 bytes causes a buffer overrun
3483
# during glob expansion). Even if it were fixed, the result of this
3484
# check would be larger than it should be.
3485
lt_cv_sys_max_cmd_len=12288; # 12K is about right
3489
# Under GNU Hurd, this test is not required because there is
3490
# no limit to the length of command line arguments.
3491
# Libtool will interpret -1 as no limit whatsoever
3492
lt_cv_sys_max_cmd_len=-1;
3495
cygwin* | mingw* | cegcc*)
3496
# On Win9x/ME, this test blows up -- it succeeds, but takes
3497
# about 5 minutes as the teststring grows exponentially.
3498
# Worse, since 9x/ME are not pre-emptively multitasking,
3499
# you end up with a "frozen" computer, even though with patience
3500
# the test eventually succeeds (with a max line length of 256k).
3501
# Instead, let's just punt: use the minimum linelength reported by
3502
# all of the supported platforms: 8192 (on NT/2K/XP).
3503
lt_cv_sys_max_cmd_len=8192;
3507
# On AmigaOS with pdksh, this test takes hours, literally.
3508
# So we just punt and use a minimum line length of 8192.
3509
lt_cv_sys_max_cmd_len=8192;
3512
netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
3513
# This has been around since 386BSD, at least. Likely further.
3514
if test -x /sbin/sysctl; then
3515
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
3516
elif test -x /usr/sbin/sysctl; then
3517
lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
3519
lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
3521
# And add a safety zone
3522
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3523
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3527
# We know the value 262144 and hardcode it with a safety zone (like BSD)
3528
lt_cv_sys_max_cmd_len=196608
3532
# Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
3533
# due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
3534
# nice to cause kernel panics so lets avoid the loop below.
3535
# First set a reasonable default.
3536
lt_cv_sys_max_cmd_len=16384
3538
if test -x /sbin/sysconfig; then
3539
case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
3540
*1*) lt_cv_sys_max_cmd_len=-1 ;;
3545
lt_cv_sys_max_cmd_len=102400
3547
sysv5* | sco5v6* | sysv4.2uw2*)
3548
kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
3549
if test -n "$kargmax"; then
3550
lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
3552
lt_cv_sys_max_cmd_len=32768
3556
lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
3557
if test -n "$lt_cv_sys_max_cmd_len"; then
3558
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3559
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3561
# Make teststring a little bigger before we do anything with it.
3562
# a 1K string should be a reasonable start.
3563
for i in 1 2 3 4 5 6 7 8 ; do
3564
teststring=$teststring$teststring
3566
SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
3567
# If test is not a shell built-in, we'll probably end up computing a
3568
# maximum length that is only half of the actual maximum length, but
3570
while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
3571
= "XX$teststring$teststring"; } >/dev/null 2>&1 &&
3572
test $i != 17 # 1/2 MB should be enough
3575
teststring=$teststring$teststring
3577
# Only check the string length outside the loop.
3578
lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
3580
# Add a significant safety factor because C++ compilers can tack on
3581
# massive amounts of additional arguments before passing them to the
3582
# linker. It appears as though 1/2 is a usable value.
3583
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
3588
if test -n $lt_cv_sys_max_cmd_len ; then
3589
AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
3593
max_cmd_len=$lt_cv_sys_max_cmd_len
3594
_LT_DECL([], [max_cmd_len], [0],
3595
[What is the maximum length of a command?])
3599
AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
3600
dnl aclocal-1.4 backwards compatibility:
3601
dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
3606
m4_defun([_LT_HEADER_DLFCN],
3607
[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
3608
])# _LT_HEADER_DLFCN
3611
# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
3612
# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
3613
# ----------------------------------------------------------------
3614
m4_defun([_LT_TRY_DLOPEN_SELF],
3615
[m4_require([_LT_HEADER_DLFCN])dnl
3616
if test "$cross_compiling" = yes; then :
3619
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
3620
lt_status=$lt_dlunknown
3621
cat > conftest.$ac_ext <<_LT_EOF
3622
[#line __oline__ "configure"
3623
#include "confdefs.h"
3632
# define LT_DLGLOBAL RTLD_GLOBAL
3635
# define LT_DLGLOBAL DL_GLOBAL
3637
# define LT_DLGLOBAL 0
3641
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
3642
find out it does not work in some platform. */
3643
#ifndef LT_DLLAZY_OR_NOW
3645
# define LT_DLLAZY_OR_NOW RTLD_LAZY
3648
# define LT_DLLAZY_OR_NOW DL_LAZY
3651
# define LT_DLLAZY_OR_NOW RTLD_NOW
3654
# define LT_DLLAZY_OR_NOW DL_NOW
3656
# define LT_DLLAZY_OR_NOW 0
3663
void fnord() { int i=42;}
3666
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
3667
int status = $lt_dlunknown;
3671
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
3672
else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
3673
/* dlclose (self); */
3681
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
3682
(./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
3685
x$lt_dlno_uscore) $1 ;;
3686
x$lt_dlneed_uscore) $2 ;;
3687
x$lt_dlunknown|x*) $3 ;;
3690
# compilation failed
3695
])# _LT_TRY_DLOPEN_SELF
3698
# LT_SYS_DLOPEN_SELF
3699
# ------------------
3700
AC_DEFUN([LT_SYS_DLOPEN_SELF],
3701
[m4_require([_LT_HEADER_DLFCN])dnl
3702
if test "x$enable_dlopen" != xyes; then
3703
enable_dlopen=unknown
3704
enable_dlopen_self=unknown
3705
enable_dlopen_self_static=unknown
3712
lt_cv_dlopen="load_add_on"
3714
lt_cv_dlopen_self=yes
3717
mingw* | pw32* | cegcc*)
3718
lt_cv_dlopen="LoadLibrary"
3723
lt_cv_dlopen="dlopen"
3728
# if libdl is installed we need to link against it
3729
AC_CHECK_LIB([dl], [dlopen],
3730
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
3733
lt_cv_dlopen_self=yes
3738
AC_CHECK_FUNC([shl_load],
3739
[lt_cv_dlopen="shl_load"],
3740
[AC_CHECK_LIB([dld], [shl_load],
3741
[lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
3742
[AC_CHECK_FUNC([dlopen],
3743
[lt_cv_dlopen="dlopen"],
3744
[AC_CHECK_LIB([dl], [dlopen],
3745
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
3746
[AC_CHECK_LIB([svld], [dlopen],
3747
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
3748
[AC_CHECK_LIB([dld], [dld_link],
3749
[lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
3758
if test "x$lt_cv_dlopen" != xno; then
3764
case $lt_cv_dlopen in
3766
save_CPPFLAGS="$CPPFLAGS"
3767
test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
3769
save_LDFLAGS="$LDFLAGS"
3770
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
3773
LIBS="$lt_cv_dlopen_libs $LIBS"
3775
AC_CACHE_CHECK([whether a program can dlopen itself],
3776
lt_cv_dlopen_self, [dnl
3777
_LT_TRY_DLOPEN_SELF(
3778
lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
3779
lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
3782
if test "x$lt_cv_dlopen_self" = xyes; then
3783
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
3784
AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
3785
lt_cv_dlopen_self_static, [dnl
3786
_LT_TRY_DLOPEN_SELF(
3787
lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
3788
lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
3792
CPPFLAGS="$save_CPPFLAGS"
3793
LDFLAGS="$save_LDFLAGS"
3798
case $lt_cv_dlopen_self in
3799
yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
3800
*) enable_dlopen_self=unknown ;;
3803
case $lt_cv_dlopen_self_static in
3804
yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
3805
*) enable_dlopen_self_static=unknown ;;
3808
_LT_DECL([dlopen_support], [enable_dlopen], [0],
3809
[Whether dlopen is supported])
3810
_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
3811
[Whether dlopen of programs is supported])
3812
_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
3813
[Whether dlopen of statically linked programs is supported])
3814
])# LT_SYS_DLOPEN_SELF
3817
AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
3818
dnl aclocal-1.4 backwards compatibility:
3819
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
3822
# _LT_COMPILER_C_O([TAGNAME])
3823
# ---------------------------
3824
# Check to see if options -c and -o are simultaneously supported by compiler.
3825
# This macro does not hard code the compiler like AC_PROG_CC_C_O.
3826
m4_defun([_LT_COMPILER_C_O],
3827
[m4_require([_LT_DECL_SED])dnl
3828
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3829
m4_require([_LT_TAG_COMPILER])dnl
3830
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
3831
[_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
3832
[_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
3833
$RM -r conftest 2>/dev/null
3837
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3839
lt_compiler_flag="-o out/conftest2.$ac_objext"
3840
# Insert the option either (1) after the last *FLAGS variable, or
3841
# (2) before a word containing "conftest.", or (3) at the end.
3842
# Note that $ac_compile itself does not contain backslashes and begins
3843
# with a dollar sign (not a hyphen), so the echo should work correctly.
3844
lt_compile=`echo "$ac_compile" | $SED \
3845
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3846
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3847
-e 's:$: $lt_compiler_flag:'`
3848
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3849
(eval "$lt_compile" 2>out/conftest.err)
3851
cat out/conftest.err >&AS_MESSAGE_LOG_FD
3852
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3853
if (exit $ac_status) && test -s out/conftest2.$ac_objext
3855
# The compiler can only warn and ignore the option if not recognized
3856
# So say no if there are warnings
3857
$ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
3858
$SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
3859
if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
3860
_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
3863
chmod u+w . 2>&AS_MESSAGE_LOG_FD
3865
# SGI C++ compiler will create directory out/ii_files/ for
3866
# template instantiation
3867
test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
3868
$RM out/* && rmdir out
3873
_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
3874
[Does compiler simultaneously support -c and -o options?])
3875
])# _LT_COMPILER_C_O
3878
# _LT_COMPILER_FILE_LOCKS([TAGNAME])
3879
# ----------------------------------
3880
# Check to see if we can do hard links to lock some files if needed
3881
m4_defun([_LT_COMPILER_FILE_LOCKS],
3882
[m4_require([_LT_ENABLE_LOCK])dnl
3883
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3884
_LT_COMPILER_C_O([$1])
3886
hard_links="nottested"
3887
if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
3888
# do not overwrite the value of need_locks provided by the user
3889
AC_MSG_CHECKING([if we can lock with hard links])
3892
ln conftest.a conftest.b 2>/dev/null && hard_links=no
3894
ln conftest.a conftest.b 2>&5 || hard_links=no
3895
ln conftest.a conftest.b 2>/dev/null && hard_links=no
3896
AC_MSG_RESULT([$hard_links])
3897
if test "$hard_links" = no; then
3898
AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
3904
_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
3905
])# _LT_COMPILER_FILE_LOCKS
3910
m4_defun([_LT_CHECK_OBJDIR],
3911
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
3912
[rm -f .libs 2>/dev/null
3913
mkdir .libs 2>/dev/null
3914
if test -d .libs; then
3917
# MS-DOS does not allow filenames that begin with a dot.
3920
rmdir .libs 2>/dev/null])
3921
objdir=$lt_cv_objdir
3922
_LT_DECL([], [objdir], [0],
3923
[The name of the directory that contains temporary libtool files])dnl
3924
m4_pattern_allow([LT_OBJDIR])dnl
3925
AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
3926
[Define to the sub-directory in which libtool stores uninstalled libraries.])
3927
])# _LT_CHECK_OBJDIR
3930
# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
3931
# --------------------------------------
3932
# Check hardcoding attributes.
3933
m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
3934
[AC_MSG_CHECKING([how to hardcode library paths into programs])
3935
_LT_TAGVAR(hardcode_action, $1)=
3936
if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
3937
test -n "$_LT_TAGVAR(runpath_var, $1)" ||
3938
test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
3940
# We can hardcode non-existent directories.
3941
if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
3942
# If the only mechanism to avoid hardcoding is shlibpath_var, we
3943
# have to relink, otherwise we might link with an installed library
3944
# when we should be linking with a yet-to-be-installed one
3945
## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
3946
test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
3947
# Linking always hardcodes the temporary library directory.
3948
_LT_TAGVAR(hardcode_action, $1)=relink
3950
# We can link without hardcoding, and we can hardcode nonexisting dirs.
3951
_LT_TAGVAR(hardcode_action, $1)=immediate
3954
# We cannot hardcode anything, or else we can only hardcode existing
3956
_LT_TAGVAR(hardcode_action, $1)=unsupported
3958
AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
3960
if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
3961
test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
3962
# Fast installation is not supported
3963
enable_fast_install=no
3964
elif test "$shlibpath_overrides_runpath" = yes ||
3965
test "$enable_shared" = no; then
3966
# Fast installation is not necessary
3967
enable_fast_install=needless
3969
_LT_TAGDECL([], [hardcode_action], [0],
3970
[How to hardcode a shared library path into an executable])
3971
])# _LT_LINKER_HARDCODE_LIBPATH
3976
m4_defun([_LT_CMD_STRIPLIB],
3977
[m4_require([_LT_DECL_EGREP])
3980
AC_MSG_CHECKING([whether stripping libraries is possible])
3981
if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
3982
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
3983
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
3984
AC_MSG_RESULT([yes])
3986
# FIXME - insert some real tests, host_os isn't really good enough
3989
if test -n "$STRIP" ; then
3990
striplib="$STRIP -x"
3991
old_striplib="$STRIP -S"
3992
AC_MSG_RESULT([yes])
4002
_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
4003
_LT_DECL([], [striplib], [1])
4004
])# _LT_CMD_STRIPLIB
4007
# _LT_SYS_DYNAMIC_LINKER([TAG])
4008
# -----------------------------
4009
# PORTME Fill in your ld.so characteristics
4010
m4_defun([_LT_SYS_DYNAMIC_LINKER],
4011
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4012
m4_require([_LT_DECL_EGREP])dnl
4013
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4014
m4_require([_LT_DECL_OBJDUMP])dnl
4015
m4_require([_LT_DECL_SED])dnl
4016
AC_MSG_CHECKING([dynamic linker characteristics])
4019
if test "$GCC" = yes; then
4021
darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
4022
*) lt_awk_arg="/^libraries:/" ;;
4024
lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
4025
if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
4026
# if the path contains ";" then we assume it to be the separator
4027
# otherwise default to the standard path separator (i.e. ":") - it is
4028
# assumed that no part of a normal pathname contains ";" but that should
4029
# okay in the real world where ";" in dirpaths is itself problematic.
4030
lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
4032
lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
4034
# Ok, now we have the path, separated by spaces, we can step through it
4035
# and add multilib dir if necessary.
4036
lt_tmp_lt_search_path_spec=
4037
lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
4038
for lt_sys_path in $lt_search_path_spec; do
4039
if test -d "$lt_sys_path/$lt_multi_os_dir"; then
4040
lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
4042
test -d "$lt_sys_path" && \
4043
lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
4046
lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
4047
BEGIN {RS=" "; FS="/|\n";} {
4050
for (lt_i = NF; lt_i > 0; lt_i--) {
4051
if ($lt_i != "" && $lt_i != ".") {
4052
if ($lt_i == "..") {
4055
if (lt_count == 0) {
4056
lt_foo="/" $lt_i lt_foo;
4063
if (lt_foo != "") { lt_freq[[lt_foo]]++; }
4064
if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
4066
sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
4068
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
4071
libname_spec='lib$name'
4079
shlibpath_overrides_runpath=unknown
4081
dynamic_linker="$host_os ld.so"
4082
sys_lib_dlsearch_path_spec="/lib /usr/lib"
4083
need_lib_prefix=unknown
4084
hardcode_into_libs=no
4086
# when you set need_version to no, make sure it does not cause -set_version
4087
# flags to be left without arguments
4088
need_version=unknown
4093
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
4094
shlibpath_var=LIBPATH
4096
# AIX 3 has no versioning support, so we append a major version to the name.
4097
soname_spec='${libname}${release}${shared_ext}$major'
4104
hardcode_into_libs=yes
4105
if test "$host_cpu" = ia64; then
4106
# AIX 5 supports IA64
4107
library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
4108
shlibpath_var=LD_LIBRARY_PATH
4110
# With GCC up to 2.95.x, collect2 would create an import file
4111
# for dependence libraries. The import file would start with
4112
# the line `#! .'. This would cause the generated library to
4113
# depend on `.', always an invalid library. This was fixed in
4114
# development snapshots of GCC prior to 3.0.
4116
aix4 | aix4.[[01]] | aix4.[[01]].*)
4117
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
4119
echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
4126
# AIX (on Power*) has no versioning support, so currently we can not hardcode correct
4127
# soname into executable. Probably we can add versioning support to
4128
# collect2, so additional links can be useful in future.
4129
if test "$aix_use_runtimelinking" = yes; then
4130
# If using run time linking (on AIX 4.2 or later) use lib<name>.so
4131
# instead of lib<name>.a to let people know that these are not
4132
# typical AIX shared libraries.
4133
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4135
# We preserve .a as extension for shared libraries through AIX4.2
4136
# and later when we are not doing run time linking.
4137
library_names_spec='${libname}${release}.a $libname.a'
4138
soname_spec='${libname}${release}${shared_ext}$major'
4140
shlibpath_var=LIBPATH
4147
# Since July 2007 AmigaOS4 officially supports .so libraries.
4148
# When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
4149
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4152
library_names_spec='$libname.ixlibrary $libname.a'
4153
# Create ${libname}_ixlibrary.a entries in /sys/libs.
4154
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'
4160
library_names_spec='${libname}${shared_ext}'
4161
dynamic_linker="$host_os ld.so"
4162
shlibpath_var=LIBRARY_PATH
4168
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4169
soname_spec='${libname}${release}${shared_ext}$major'
4170
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
4171
shlibpath_var=LD_LIBRARY_PATH
4172
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
4173
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
4174
# the default ld.so.conf also contains /usr/contrib/lib and
4175
# /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
4176
# libtool to hard-code these into programs
4179
cygwin* | mingw* | pw32* | cegcc*)
4180
version_type=windows
4185
case $GCC,$host_os in
4186
yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
4187
library_names_spec='$libname.dll.a'
4188
# DLL is installed to $(libdir)/../bin by postinstall_cmds
4189
postinstall_cmds='base_file=`basename \${file}`~
4190
dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
4191
dldir=$destdir/`dirname \$dlpath`~
4192
test -d \$dldir || mkdir -p \$dldir~
4193
$install_prog $dir/$dlname \$dldir/$dlname~
4194
chmod a+x \$dldir/$dlname~
4195
if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
4196
eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
4198
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
4199
dlpath=$dir/\$dldll~
4201
shlibpath_overrides_runpath=yes
4205
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
4206
soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4207
sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
4210
# MinGW DLLs use traditional 'lib' prefix
4211
soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4212
sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
4213
if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
4214
# It is most probably a Windows format PATH printed by
4215
# mingw gcc, but we are running on Cygwin. Gcc prints its search
4216
# path with ; separators, and with drive letters. We can handle the
4217
# drive letters (cygwin fileutils understands them), so leave them,
4218
# especially as we might pass files found there to a mingw objdump,
4219
# which wouldn't understand a cygwinified path. Ahh.
4220
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
4222
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
4226
# pw32 DLLs use 'pw' prefix rather than 'lib'
4227
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4233
library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
4236
dynamic_linker='Win32 ld.exe'
4237
# FIXME: first we should search . and the directory the executable is in
4241
darwin* | rhapsody*)
4242
dynamic_linker="$host_os dyld"
4246
library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
4247
soname_spec='${libname}${release}${major}$shared_ext'
4248
shlibpath_overrides_runpath=yes
4249
shlibpath_var=DYLD_LIBRARY_PATH
4250
shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
4252
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
4253
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
4260
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
4261
soname_spec='${libname}${release}${shared_ext}$major'
4262
shlibpath_var=LD_LIBRARY_PATH
4269
freebsd* | dragonfly*)
4270
# DragonFly does not have aout. When/if they implement a new
4271
# versioning mechanism, adjust this.
4272
if test -x /usr/bin/objformat; then
4273
objformat=`/usr/bin/objformat`
4276
freebsd[[123]]*) objformat=aout ;;
4280
version_type=freebsd-$objformat
4281
case $version_type in
4283
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
4288
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
4292
shlibpath_var=LD_LIBRARY_PATH
4295
shlibpath_overrides_runpath=yes
4297
freebsd3.[[01]]* | freebsdelf3.[[01]]*)
4298
shlibpath_overrides_runpath=yes
4299
hardcode_into_libs=yes
4301
freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
4302
freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
4303
shlibpath_overrides_runpath=no
4304
hardcode_into_libs=yes
4306
*) # from 4.6 on, and DragonFly
4307
shlibpath_overrides_runpath=yes
4308
hardcode_into_libs=yes
4317
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
4318
soname_spec='${libname}${release}${shared_ext}$major'
4319
shlibpath_var=LD_LIBRARY_PATH
4320
hardcode_into_libs=yes
4323
hpux9* | hpux10* | hpux11*)
4324
# Give a soname corresponding to the major version so that dld.sl refuses to
4325
# link against other versions.
4332
hardcode_into_libs=yes
4333
dynamic_linker="$host_os dld.so"
4334
shlibpath_var=LD_LIBRARY_PATH
4335
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4336
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4337
soname_spec='${libname}${release}${shared_ext}$major'
4338
if test "X$HPUX_IA64_MODE" = X32; then
4339
sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
4341
sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
4343
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4347
hardcode_into_libs=yes
4348
dynamic_linker="$host_os dld.sl"
4349
shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
4350
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4351
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4352
soname_spec='${libname}${release}${shared_ext}$major'
4353
sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
4354
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4358
dynamic_linker="$host_os dld.sl"
4359
shlibpath_var=SHLIB_PATH
4360
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
4361
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4362
soname_spec='${libname}${release}${shared_ext}$major'
4365
# HP-UX runs *really* slowly unless shared libraries are mode 555.
4366
postinstall_cmds='chmod 555 $lib'
4373
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4374
soname_spec='${libname}${release}${shared_ext}$major'
4375
dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
4376
shlibpath_var=LD_LIBRARY_PATH
4377
shlibpath_overrides_runpath=no
4378
hardcode_into_libs=yes
4381
irix5* | irix6* | nonstopux*)
4383
nonstopux*) version_type=nonstopux ;;
4385
if test "$lt_cv_prog_gnu_ld" = yes; then
4393
soname_spec='${libname}${release}${shared_ext}$major'
4394
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
4396
irix5* | nonstopux*)
4400
case $LD in # libtool.m4 will add one of these switches to LD
4401
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
4402
libsuff= shlibsuff= libmagic=32-bit;;
4403
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
4404
libsuff=32 shlibsuff=N32 libmagic=N32;;
4405
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
4406
libsuff=64 shlibsuff=64 libmagic=64-bit;;
4407
*) libsuff= shlibsuff= libmagic=never-match;;
4411
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
4412
shlibpath_overrides_runpath=no
4413
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
4414
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
4415
hardcode_into_libs=yes
4418
# No shared lib support for Linux oldld, aout, or coff.
4419
linux*oldld* | linux*aout* | linux*coff*)
4423
# This must be Linux ELF.
4424
linux* | k*bsd*-gnu)
4428
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4429
soname_spec='${libname}${release}${shared_ext}$major'
4430
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
4431
shlibpath_var=LD_LIBRARY_PATH
4432
shlibpath_overrides_runpath=no
4433
# Some binutils ld are patched to set DT_RUNPATH
4434
save_LDFLAGS=$LDFLAGS
4436
eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
4437
LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
4438
AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
4439
[AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
4440
[shlibpath_overrides_runpath=yes])])
4441
LDFLAGS=$save_LDFLAGS
4444
# This implies no fast_install, which is unacceptable.
4445
# Some rework will be needed to allow for fast_install
4446
# before this can be enabled.
4447
hardcode_into_libs=yes
4449
# Add ABI-specific directories to the system library path.
4450
sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
4452
# Append ld.so.conf contents to the search path
4453
if test -f /etc/ld.so.conf; then
4454
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' ' '`
4455
sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
4458
# We used to test for /lib/ld.so.1 and disable shared libraries on
4459
# powerpc, because MkLinux only supported shared libraries with the
4460
# GNU dynamic linker. Since this was broken with cross compilers,
4461
# most powerpc-linux boxes support dynamic linking these days and
4462
# people can always --disable-shared, the test was removed, and we
4463
# assume the GNU/Linux dynamic linker is in use.
4464
dynamic_linker='GNU/Linux ld.so'
4471
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4472
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4473
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4474
dynamic_linker='NetBSD (a.out) ld.so'
4476
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4477
soname_spec='${libname}${release}${shared_ext}$major'
4478
dynamic_linker='NetBSD ld.elf_so'
4480
shlibpath_var=LD_LIBRARY_PATH
4481
shlibpath_overrides_runpath=yes
4482
hardcode_into_libs=yes
4487
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4488
shlibpath_var=LD_LIBRARY_PATH
4489
shlibpath_overrides_runpath=yes
4496
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4497
soname_spec='${libname}${release}${shared_ext}$major'
4498
shlibpath_var=LD_LIBRARY_PATH
4499
shlibpath_overrides_runpath=no
4500
hardcode_into_libs=yes
4501
dynamic_linker='ldqnx.so'
4506
sys_lib_dlsearch_path_spec="/usr/lib"
4508
# Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
4510
openbsd3.3 | openbsd3.3.*) need_version=yes ;;
4511
*) need_version=no ;;
4513
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4514
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4515
shlibpath_var=LD_LIBRARY_PATH
4516
if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4518
openbsd2.[[89]] | openbsd2.[[89]].*)
4519
shlibpath_overrides_runpath=no
4522
shlibpath_overrides_runpath=yes
4526
shlibpath_overrides_runpath=yes
4531
libname_spec='$name'
4534
library_names_spec='$libname${shared_ext} $libname.a'
4535
dynamic_linker='OS/2 ld.exe'
4536
shlibpath_var=LIBPATH
4539
osf3* | osf4* | osf5*)
4543
soname_spec='${libname}${release}${shared_ext}$major'
4544
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4545
shlibpath_var=LD_LIBRARY_PATH
4546
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
4547
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
4558
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4559
soname_spec='${libname}${release}${shared_ext}$major'
4560
shlibpath_var=LD_LIBRARY_PATH
4561
shlibpath_overrides_runpath=yes
4562
hardcode_into_libs=yes
4563
# ldd complains unless libraries are executable
4564
postinstall_cmds='chmod +x $lib'
4569
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4570
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
4571
shlibpath_var=LD_LIBRARY_PATH
4572
shlibpath_overrides_runpath=yes
4573
if test "$with_gnu_ld" = yes; then
4581
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4582
soname_spec='${libname}${release}${shared_ext}$major'
4583
shlibpath_var=LD_LIBRARY_PATH
4584
case $host_vendor in
4586
shlibpath_overrides_runpath=no
4588
runpath_var=LD_RUN_PATH
4596
shlibpath_overrides_runpath=no
4597
sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
4603
if test -d /usr/nec ;then
4605
library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
4606
soname_spec='$libname${shared_ext}.$major'
4607
shlibpath_var=LD_LIBRARY_PATH
4611
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4612
version_type=freebsd-elf
4615
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
4616
soname_spec='${libname}${release}${shared_ext}$major'
4617
shlibpath_var=LD_LIBRARY_PATH
4618
shlibpath_overrides_runpath=yes
4619
hardcode_into_libs=yes
4620
if test "$with_gnu_ld" = yes; then
4621
sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
4623
sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
4626
sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
4630
sys_lib_dlsearch_path_spec='/usr/lib'
4634
# TPF is a cross-target only. Preferred cross-host = GNU/Linux.
4638
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4639
shlibpath_var=LD_LIBRARY_PATH
4640
shlibpath_overrides_runpath=no
4641
hardcode_into_libs=yes
4646
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4647
soname_spec='${libname}${release}${shared_ext}$major'
4648
shlibpath_var=LD_LIBRARY_PATH
4655
AC_MSG_RESULT([$dynamic_linker])
4656
test "$dynamic_linker" = no && can_build_shared=no
4658
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
4659
if test "$GCC" = yes; then
4660
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
4663
if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
4664
sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
4666
if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
4667
sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
4670
_LT_DECL([], [variables_saved_for_relink], [1],
4671
[Variables whose values should be saved in libtool wrapper scripts and
4672
restored at link time])
4673
_LT_DECL([], [need_lib_prefix], [0],
4674
[Do we need the "lib" prefix for modules?])
4675
_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
4676
_LT_DECL([], [version_type], [0], [Library versioning type])
4677
_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
4678
_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
4679
_LT_DECL([], [shlibpath_overrides_runpath], [0],
4680
[Is shlibpath searched before the hard-coded library search path?])
4681
_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
4682
_LT_DECL([], [library_names_spec], [1],
4683
[[List of archive names. First name is the real one, the rest are links.
4684
The last name is the one that the linker finds with -lNAME]])
4685
_LT_DECL([], [soname_spec], [1],
4686
[[The coded name of the library, if different from the real name]])
4687
_LT_DECL([], [postinstall_cmds], [2],
4688
[Command to use after installation of a shared archive])
4689
_LT_DECL([], [postuninstall_cmds], [2],
4690
[Command to use after uninstallation of a shared archive])
4691
_LT_DECL([], [finish_cmds], [2],
4692
[Commands used to finish a libtool library installation in a directory])
4693
_LT_DECL([], [finish_eval], [1],
4694
[[As "finish_cmds", except a single script fragment to be evaled but
4696
_LT_DECL([], [hardcode_into_libs], [0],
4697
[Whether we should hardcode library paths into libraries])
4698
_LT_DECL([], [sys_lib_search_path_spec], [2],
4699
[Compile-time system search path for libraries])
4700
_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
4701
[Run-time system search path for libraries])
4702
])# _LT_SYS_DYNAMIC_LINKER
4705
# _LT_PATH_TOOL_PREFIX(TOOL)
4706
# --------------------------
4707
# find a file program which can recognize shared library
4708
AC_DEFUN([_LT_PATH_TOOL_PREFIX],
4709
[m4_require([_LT_DECL_EGREP])dnl
4710
AC_MSG_CHECKING([for $1])
4711
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
4713
[[\\/*] | ?:[\\/]*])
4714
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4717
lt_save_MAGIC_CMD="$MAGIC_CMD"
4718
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4719
dnl $ac_dummy forces splitting on constant user-supplied paths.
4720
dnl POSIX.2 word splitting is done only on the output of word expansions,
4721
dnl not every word. This closes a longstanding sh security hole.
4722
ac_dummy="m4_if([$2], , $PATH, [$2])"
4723
for ac_dir in $ac_dummy; do
4725
test -z "$ac_dir" && ac_dir=.
4726
if test -f $ac_dir/$1; then
4727
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
4728
if test -n "$file_magic_test_file"; then
4729
case $deplibs_check_method in
4731
file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
4732
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4733
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4734
$EGREP "$file_magic_regex" > /dev/null; then
4739
*** Warning: the command libtool uses to detect shared libraries,
4740
*** $file_magic_cmd, produces output that libtool cannot recognize.
4741
*** The result is that libtool may fail to recognize shared libraries
4742
*** as such. This will affect the creation of libtool libraries that
4743
*** depend on shared libraries, but programs linked with such libtool
4744
*** libraries will work regardless of this problem. Nevertheless, you
4745
*** may want to report the problem to your system manager and/or to
4746
*** bug-libtool@gnu.org
4756
MAGIC_CMD="$lt_save_MAGIC_CMD"
4759
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4760
if test -n "$MAGIC_CMD"; then
4761
AC_MSG_RESULT($MAGIC_CMD)
4765
_LT_DECL([], [MAGIC_CMD], [0],
4766
[Used to examine libraries when file_magic_cmd begins with "file"])dnl
4767
])# _LT_PATH_TOOL_PREFIX
4770
AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
4771
dnl aclocal-1.4 backwards compatibility:
4772
dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
4777
# find a file program which can recognize a shared library
4778
m4_defun([_LT_PATH_MAGIC],
4779
[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
4780
if test -z "$lt_cv_path_MAGIC_CMD"; then
4781
if test -n "$ac_tool_prefix"; then
4782
_LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
4792
# find the pathname to the GNU or non-GNU linker
4793
AC_DEFUN([LT_PATH_LD],
4794
[AC_REQUIRE([AC_PROG_CC])dnl
4795
AC_REQUIRE([AC_CANONICAL_HOST])dnl
4796
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4797
m4_require([_LT_DECL_SED])dnl
4798
m4_require([_LT_DECL_EGREP])dnl
4800
AC_ARG_WITH([gnu-ld],
4801
[AS_HELP_STRING([--with-gnu-ld],
4802
[assume the C compiler uses GNU ld @<:@default=no@:>@])],
4803
[test "$withval" = no || with_gnu_ld=yes],
4804
[with_gnu_ld=no])dnl
4807
if test "$GCC" = yes; then
4808
# Check if gcc -print-prog-name=ld gives a path.
4809
AC_MSG_CHECKING([for ld used by $CC])
4812
# gcc leaves a trailing carriage return which upsets mingw
4813
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4815
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4818
# Accept absolute paths.
4819
[[\\/]]* | ?:[[\\/]]*)
4820
re_direlt='/[[^/]][[^/]]*/\.\./'
4821
# Canonicalize the pathname of ld
4822
ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
4823
while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
4824
ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
4826
test -z "$LD" && LD="$ac_prog"
4829
# If it fails, then pretend we aren't using GCC.
4833
# If it is relative, then search for the first ld in PATH.
4837
elif test "$with_gnu_ld" = yes; then
4838
AC_MSG_CHECKING([for GNU ld])
4840
AC_MSG_CHECKING([for non-GNU ld])
4842
AC_CACHE_VAL(lt_cv_path_LD,
4843
[if test -z "$LD"; then
4844
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4845
for ac_dir in $PATH; do
4847
test -z "$ac_dir" && ac_dir=.
4848
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4849
lt_cv_path_LD="$ac_dir/$ac_prog"
4850
# Check to see if the program is GNU ld. I'd rather use --version,
4851
# but apparently some variants of GNU ld only accept -v.
4852
# Break only if it was the GNU/non-GNU ld that we prefer.
4853
case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
4854
*GNU* | *'with BFD'*)
4855
test "$with_gnu_ld" != no && break
4858
test "$with_gnu_ld" != yes && break
4865
lt_cv_path_LD="$LD" # Let the user override the test with a path.
4868
if test -n "$LD"; then
4873
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4877
_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
4881
AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
4882
AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
4883
dnl aclocal-1.4 backwards compatibility:
4884
dnl AC_DEFUN([AM_PROG_LD], [])
4885
dnl AC_DEFUN([AC_PROG_LD], [])
4890
m4_defun([_LT_PATH_LD_GNU],
4891
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4892
[# I'd rather use --version here, but apparently some GNU lds only accept -v.
4893
case `$LD -v 2>&1 </dev/null` in
4894
*GNU* | *'with BFD'*)
4895
lt_cv_prog_gnu_ld=yes
4898
lt_cv_prog_gnu_ld=no
4901
with_gnu_ld=$lt_cv_prog_gnu_ld
4907
# find reload flag for linker
4908
# -- PORTME Some linkers may need a different reload flag.
4909
m4_defun([_LT_CMD_RELOAD],
4910
[AC_CACHE_CHECK([for $LD option to reload object files],
4911
lt_cv_ld_reload_flag,
4912
[lt_cv_ld_reload_flag='-r'])
4913
reload_flag=$lt_cv_ld_reload_flag
4914
case $reload_flag in
4916
*) reload_flag=" $reload_flag" ;;
4918
reload_cmds='$LD$reload_flag -o $output$reload_objs'
4921
if test "$GCC" = yes; then
4922
reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
4924
reload_cmds='$LD$reload_flag -o $output$reload_objs'
4928
_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
4929
_LT_DECL([], [reload_cmds], [2])dnl
4933
# _LT_CHECK_MAGIC_METHOD
4934
# ----------------------
4935
# how to check for library dependencies
4936
# -- PORTME fill in with the dynamic library characteristics
4937
m4_defun([_LT_CHECK_MAGIC_METHOD],
4938
[m4_require([_LT_DECL_EGREP])
4939
m4_require([_LT_DECL_OBJDUMP])
4940
AC_CACHE_CHECK([how to recognize dependent libraries],
4941
lt_cv_deplibs_check_method,
4942
[lt_cv_file_magic_cmd='$MAGIC_CMD'
4943
lt_cv_file_magic_test_file=
4944
lt_cv_deplibs_check_method='unknown'
4945
# Need to set the preceding variable on all platforms that support
4946
# interlibrary dependencies.
4947
# 'none' -- dependencies not supported.
4948
# `unknown' -- same as none, but documents that we really don't know.
4949
# 'pass_all' -- all dependencies passed with no checks.
4950
# 'test_compile' -- check by making test program.
4951
# 'file_magic [[regex]]' -- check by looking for files in library path
4952
# which responds to the $file_magic_cmd with a given extended regex.
4953
# If you have `file' or equivalent on your system and you're not sure
4954
# whether `pass_all' will *always* work, you probably want this one.
4958
lt_cv_deplibs_check_method=pass_all
4962
lt_cv_deplibs_check_method=pass_all
4966
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4967
lt_cv_file_magic_cmd='/usr/bin/file -L'
4968
lt_cv_file_magic_test_file=/shlib/libc.so
4972
# func_win32_libid is a shell function defined in ltmain.sh
4973
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4974
lt_cv_file_magic_cmd='func_win32_libid'
4978
# Base MSYS/MinGW do not provide the 'file' command needed by
4979
# func_win32_libid shell function, so use a weaker test based on 'objdump',
4980
# unless we find 'file', for example because we are cross-compiling.
4981
if ( file / ) >/dev/null 2>&1; then
4982
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4983
lt_cv_file_magic_cmd='func_win32_libid'
4985
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
4986
lt_cv_file_magic_cmd='$OBJDUMP -f'
4991
# use the weaker test based on 'objdump'. See mingw*.
4992
lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
4993
lt_cv_file_magic_cmd='$OBJDUMP -f'
4996
darwin* | rhapsody*)
4997
lt_cv_deplibs_check_method=pass_all
5000
freebsd* | dragonfly*)
5001
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
5004
# Not sure whether the presence of OpenBSD here was a mistake.
5005
# Let's accept both of them until this is cleared up.
5006
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
5007
lt_cv_file_magic_cmd=/usr/bin/file
5008
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
5012
lt_cv_deplibs_check_method=pass_all
5017
lt_cv_deplibs_check_method=pass_all
5020
hpux10.20* | hpux11*)
5021
lt_cv_file_magic_cmd=/usr/bin/file
5024
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
5025
lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
5028
[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]']
5029
lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
5032
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
5033
lt_cv_file_magic_test_file=/usr/lib/libc.sl
5039
# PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
5040
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
5043
irix5* | irix6* | nonstopux*)
5045
*-32|*"-32 ") libmagic=32-bit;;
5046
*-n32|*"-n32 ") libmagic=N32;;
5047
*-64|*"-64 ") libmagic=64-bit;;
5048
*) libmagic=never-match;;
5050
lt_cv_deplibs_check_method=pass_all
5053
# This must be Linux ELF.
5054
linux* | k*bsd*-gnu)
5055
lt_cv_deplibs_check_method=pass_all
5059
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
5060
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
5062
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
5067
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
5068
lt_cv_file_magic_cmd=/usr/bin/file
5069
lt_cv_file_magic_test_file=/usr/lib/libnls.so
5073
lt_cv_deplibs_check_method=pass_all
5077
if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5078
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
5080
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
5084
osf3* | osf4* | osf5*)
5085
lt_cv_deplibs_check_method=pass_all
5089
lt_cv_deplibs_check_method=pass_all
5093
lt_cv_deplibs_check_method=pass_all
5096
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
5097
lt_cv_deplibs_check_method=pass_all
5101
case $host_vendor in
5103
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]]'
5104
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
5107
lt_cv_deplibs_check_method=pass_all
5110
lt_cv_file_magic_cmd='/bin/file'
5111
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
5114
lt_cv_file_magic_cmd='/bin/file'
5115
lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
5116
lt_cv_file_magic_test_file=/lib/libc.so
5119
lt_cv_deplibs_check_method=pass_all
5122
lt_cv_deplibs_check_method=pass_all
5128
lt_cv_deplibs_check_method=pass_all
5132
file_magic_cmd=$lt_cv_file_magic_cmd
5133
deplibs_check_method=$lt_cv_deplibs_check_method
5134
test -z "$deplibs_check_method" && deplibs_check_method=unknown
5136
_LT_DECL([], [deplibs_check_method], [1],
5137
[Method to check whether dependent libraries are shared objects])
5138
_LT_DECL([], [file_magic_cmd], [1],
5139
[Command to use when deplibs_check_method == "file_magic"])
5140
])# _LT_CHECK_MAGIC_METHOD
5145
# find the pathname to a BSD- or MS-compatible name lister
5146
AC_DEFUN([LT_PATH_NM],
5147
[AC_REQUIRE([AC_PROG_CC])dnl
5148
AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
5149
[if test -n "$NM"; then
5150
# Let the user override the test.
5153
lt_nm_to_check="${ac_tool_prefix}nm"
5154
if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
5155
lt_nm_to_check="$lt_nm_to_check nm"
5157
for lt_tmp_nm in $lt_nm_to_check; do
5158
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5159
for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
5161
test -z "$ac_dir" && ac_dir=.
5162
tmp_nm="$ac_dir/$lt_tmp_nm"
5163
if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
5164
# Check to see if the nm accepts a BSD-compat flag.
5165
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
5166
# nm: unknown option "B" ignored
5167
# Tru64's nm complains that /dev/null is an invalid object file
5168
case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
5169
*/dev/null* | *'Invalid file or object type'*)
5170
lt_cv_path_NM="$tmp_nm -B"
5174
case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
5176
lt_cv_path_NM="$tmp_nm -p"
5180
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
5181
continue # so that we can try to find one that supports BSD flags
5190
: ${lt_cv_path_NM=no}
5192
if test "$lt_cv_path_NM" != "no"; then
5195
# Didn't find any BSD compatible name lister, look for dumpbin.
5196
AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
5198
if test "$DUMPBIN" != ":"; then
5202
test -z "$NM" && NM=nm
5204
_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
5206
AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
5207
[lt_cv_nm_interface="BSD nm"
5208
echo "int some_variable = 0;" > conftest.$ac_ext
5209
(eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
5210
(eval "$ac_compile" 2>conftest.err)
5211
cat conftest.err >&AS_MESSAGE_LOG_FD
5212
(eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
5213
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
5214
cat conftest.err >&AS_MESSAGE_LOG_FD
5215
(eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
5216
cat conftest.out >&AS_MESSAGE_LOG_FD
5217
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
5218
lt_cv_nm_interface="MS dumpbin"
5224
AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
5225
AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
5226
dnl aclocal-1.4 backwards compatibility:
5227
dnl AC_DEFUN([AM_PROG_NM], [])
5228
dnl AC_DEFUN([AC_PROG_NM], [])
5233
# check for math library
5234
AC_DEFUN([LT_LIB_M],
5235
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
5238
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
5239
# These system don't have libm, or don't need it
5242
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
5243
AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
5246
AC_CHECK_LIB(m, cos, LIBM="-lm")
5253
AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
5254
dnl aclocal-1.4 backwards compatibility:
5255
dnl AC_DEFUN([AC_CHECK_LIBM], [])
5258
# _LT_COMPILER_NO_RTTI([TAGNAME])
5259
# -------------------------------
5260
m4_defun([_LT_COMPILER_NO_RTTI],
5261
[m4_require([_LT_TAG_COMPILER])dnl
5263
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5265
if test "$GCC" = yes; then
5266
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5268
_LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5269
lt_cv_prog_compiler_rtti_exceptions,
5270
[-fno-rtti -fno-exceptions], [],
5271
[_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5273
_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
5274
[Compiler flag to turn off builtin functions])
5275
])# _LT_COMPILER_NO_RTTI
5278
# _LT_CMD_GLOBAL_SYMBOLS
5279
# ----------------------
5280
m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
5281
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
5282
AC_REQUIRE([AC_PROG_CC])dnl
5283
AC_REQUIRE([LT_PATH_NM])dnl
5284
AC_REQUIRE([LT_PATH_LD])dnl
5285
m4_require([_LT_DECL_SED])dnl
5286
m4_require([_LT_DECL_EGREP])dnl
5287
m4_require([_LT_TAG_COMPILER])dnl
5289
# Check for command to grab the raw symbol name followed by C symbol from nm.
5290
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
5291
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5293
# These are sane defaults that work on at least a few old systems.
5294
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
5296
# Character class describing NM global symbol codes.
5297
symcode='[[BCDEGRST]]'
5299
# Regexp to match symbols that can be accessed directly from C.
5300
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5302
# Define system-specific variables.
5307
cygwin* | mingw* | pw32* | cegcc*)
5308
symcode='[[ABCDGISTW]]'
5311
if test "$host_cpu" = ia64; then
5312
symcode='[[ABCDEGRST]]'
5316
symcode='[[BCDEGRST]]'
5319
symcode='[[BCDEGQRST]]'
5330
sysv5* | sco5v6* | unixware* | OpenUNIX*)
5334
symcode='[[DFNSTU]]'
5338
# If we're using GNU nm, then use its standard symbol codes.
5339
case `$NM -V 2>&1` in
5340
*GNU* | *'with BFD'*)
5341
symcode='[[ABCDGIRSTW]]' ;;
5344
# Transform an extracted symbol line into a proper C declaration.
5345
# Some systems (esp. on ia64) link data and code symbols differently,
5346
# so use this general approach.
5347
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5349
# Transform an extracted symbol line into symbol name and symbol address
5350
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
5351
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'"
5353
# Handle CRLF in mingw tool chain
5357
opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5361
# Try without a prefix underscore, then with it.
5362
for ac_symprfx in "" "_"; do
5364
# Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5365
symxfrm="\\1 $ac_symprfx\\2 \\2"
5367
# Write the raw and C identifiers.
5368
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
5369
# Fake it for dumpbin and say T for any non-static function
5370
# and D for any global variable.
5371
# Also find C++ and __fastcall symbols from MSVC++,
5372
# which start with @ or ?.
5373
lt_cv_sys_global_symbol_pipe="$AWK ['"\
5374
" {last_section=section; section=\$ 3};"\
5375
" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
5376
" \$ 0!~/External *\|/{next};"\
5377
" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
5378
" {if(hide[section]) next};"\
5379
" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
5380
" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
5381
" s[1]~/^[@?]/{print s[1], s[1]; next};"\
5382
" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
5383
" ' prfx=^$ac_symprfx]"
5385
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
5388
# Check to see that the pipe works correctly.
5392
cat > conftest.$ac_ext <<_LT_EOF
5397
void nm_test_func(void);
5398
void nm_test_func(void){}
5402
int main(){nm_test_var='a';nm_test_func();return(0);}
5405
if AC_TRY_EVAL(ac_compile); then
5406
# Now try to grab the symbols.
5408
if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
5409
# Try sorting and uniquifying the output.
5410
if sort "$nlist" | uniq > "$nlist"T; then
5411
mv -f "$nlist"T "$nlist"
5416
# Make sure that we snagged all the symbols we need.
5417
if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
5418
if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
5419
cat <<_LT_EOF > conftest.$ac_ext
5425
# Now generate the symbol file.
5426
eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
5428
cat <<_LT_EOF >> conftest.$ac_ext
5430
/* The mapping between symbol names and symbols. */
5435
lt__PROGRAM__LTX_preloaded_symbols[[]] =
5437
{ "@PROGRAM@", (void *) 0 },
5439
$SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
5440
cat <<\_LT_EOF >> conftest.$ac_ext
5444
/* This works around a problem in FreeBSD linker */
5445
#ifdef FREEBSD_WORKAROUND
5446
static const void *lt_preloaded_setup() {
5447
return lt__PROGRAM__LTX_preloaded_symbols;
5455
# Now try linking the two files.
5456
mv conftest.$ac_objext conftstm.$ac_objext
5457
lt_save_LIBS="$LIBS"
5458
lt_save_CFLAGS="$CFLAGS"
5459
LIBS="conftstm.$ac_objext"
5460
CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5461
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5464
LIBS="$lt_save_LIBS"
5465
CFLAGS="$lt_save_CFLAGS"
5467
echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5470
echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5473
echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5476
echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5477
cat conftest.$ac_ext >&5
5479
rm -rf conftest* conftst*
5481
# Do not use the global_symbol_pipe unless it works.
5482
if test "$pipe_works" = yes; then
5485
lt_cv_sys_global_symbol_pipe=
5489
if test -z "$lt_cv_sys_global_symbol_pipe"; then
5490
lt_cv_sys_global_symbol_to_cdecl=
5492
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5493
AC_MSG_RESULT(failed)
5498
_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
5499
[Take the output of nm and produce a listing of raw symbols and C names])
5500
_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
5501
[Transform the output of nm in a proper C declaration])
5502
_LT_DECL([global_symbol_to_c_name_address],
5503
[lt_cv_sys_global_symbol_to_c_name_address], [1],
5504
[Transform the output of nm in a C name address pair])
5505
_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
5506
[lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
5507
[Transform the output of nm in a C name address pair when lib prefix is needed])
5508
]) # _LT_CMD_GLOBAL_SYMBOLS
5511
# _LT_COMPILER_PIC([TAGNAME])
5512
# ---------------------------
5513
m4_defun([_LT_COMPILER_PIC],
5514
[m4_require([_LT_TAG_COMPILER])dnl
5515
_LT_TAGVAR(lt_prog_compiler_wl, $1)=
5516
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5517
_LT_TAGVAR(lt_prog_compiler_static, $1)=
5519
AC_MSG_CHECKING([for $compiler option to produce PIC])
5520
m4_if([$1], [CXX], [
5521
# C++ specific cases for pic, static, wl, etc.
5522
if test "$GXX" = yes; then
5523
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5524
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5528
# All AIX code is PIC.
5529
if test "$host_cpu" = ia64; then
5530
# AIX 5 now supports IA64 processor
5531
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5538
# see comment about AmigaOS4 .so support
5539
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5542
# FIXME: we need at least 68020 code to build shared libraries, but
5543
# adding the `-m68020' flag to GCC prevents building anything better,
5545
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5550
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5551
# PIC is the default for these OSes.
5553
mingw* | cygwin* | os2* | pw32* | cegcc*)
5554
# This hack is so that the source file can tell whether it is being
5555
# built for inclusion in a dll (and should export symbols for example).
5556
# Although the cygwin gcc ignores -fPIC, still need this for old-style
5557
# (--disable-auto-import) libraries
5558
m4_if([$1], [GCJ], [],
5559
[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5561
darwin* | rhapsody*)
5562
# PIC is the default on this platform
5563
# Common symbols not allowed in MH_DYLIB files
5564
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5567
# DJGPP does not support shared libraries at all
5568
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5571
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
5572
# Instead, we relocate shared libraries at runtime.
5575
if test -d /usr/nec; then
5576
_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5580
# PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5581
# PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
5582
# sets the default TLS model and affects inlining.
5587
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5592
# QNX uses GNU C++, but need to define -shared option too, otherwise
5594
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5597
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5603
# All AIX code is PIC.
5604
if test "$host_cpu" = ia64; then
5605
# AIX 5 now supports IA64 processor
5606
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5608
_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5612
case $cc_basename in
5614
# Green Hills C++ Compiler
5615
# _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"
5620
case $cc_basename in
5622
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5625
# Green Hills C++ Compiler
5626
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5632
freebsd* | dragonfly*)
5633
# FreeBSD uses GNU C++
5635
hpux9* | hpux10* | hpux11*)
5636
case $cc_basename in
5638
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5639
_LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5640
if test "$host_cpu" != ia64; then
5641
_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5645
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5646
_LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5652
_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5661
# This is c89, which is MS Visual C++ (no shared libs)
5662
# Anyone wants to do a port?
5664
irix5* | irix6* | nonstopux*)
5665
case $cc_basename in
5667
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5668
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5669
# CC pic flag -KPIC is the default.
5675
linux* | k*bsd*-gnu)
5676
case $cc_basename in
5679
_LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5680
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5683
# old Intel C++ for x86_64 which still supported -KPIC.
5684
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5685
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5686
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5689
# Intel C++, used to be incompatible with GCC.
5690
# ICC 10 doesn't accept -KPIC any more.
5691
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5692
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5693
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5696
# Portland Group C++ compiler
5697
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5698
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5699
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5703
# Make sure the PIC flag is empty. It appears that all Alpha
5704
# Linux and Compaq Tru64 Unix objects are PIC.
5705
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5706
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5710
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5711
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5712
_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5715
case `$CC -V 2>&1 | sed 5q` in
5718
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5719
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5720
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5731
case $cc_basename in
5733
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5742
# QNX uses GNU C++, but need to define -shared option too, otherwise
5744
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5746
osf3* | osf4* | osf5*)
5747
case $cc_basename in
5749
_LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5752
# Rational C++ 2.4.1
5753
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5756
# Digital/Compaq C++
5757
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5758
# Make sure the PIC flag is empty. It appears that all Alpha
5759
# Linux and Compaq Tru64 Unix objects are PIC.
5760
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5761
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5770
case $cc_basename in
5772
# Sun C++ 4.2, 5.x and Centerline C++
5773
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5774
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5775
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5778
# Green Hills C++ Compiler
5779
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5786
case $cc_basename in
5789
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5790
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5794
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5800
sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5801
case $cc_basename in
5803
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5804
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5805
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5810
case $cc_basename in
5812
# NonStop-UX NCC 3.20
5813
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5822
_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5828
if test "$GCC" = yes; then
5829
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5830
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5834
# All AIX code is PIC.
5835
if test "$host_cpu" = ia64; then
5836
# AIX 5 now supports IA64 processor
5837
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5844
# see comment about AmigaOS4 .so support
5845
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5848
# FIXME: we need at least 68020 code to build shared libraries, but
5849
# adding the `-m68020' flag to GCC prevents building anything better,
5851
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5856
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5857
# PIC is the default for these OSes.
5860
mingw* | cygwin* | pw32* | os2* | cegcc*)
5861
# This hack is so that the source file can tell whether it is being
5862
# built for inclusion in a dll (and should export symbols for example).
5863
# Although the cygwin gcc ignores -fPIC, still need this for old-style
5864
# (--disable-auto-import) libraries
5865
m4_if([$1], [GCJ], [],
5866
[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5869
darwin* | rhapsody*)
5870
# PIC is the default on this platform
5871
# Common symbols not allowed in MH_DYLIB files
5872
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5876
# PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5877
# PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
5878
# sets the default TLS model and affects inlining.
5884
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5890
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
5891
# Instead, we relocate shared libraries at runtime.
5895
# Just because we use GCC doesn't mean we suddenly get shared libraries
5896
# on systems that don't support them.
5897
_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5902
# QNX uses GNU C++, but need to define -shared option too, otherwise
5904
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5908
if test -d /usr/nec; then
5909
_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5914
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5918
# PORTME Check for flag to pass linker flags through the system compiler.
5921
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5922
if test "$host_cpu" = ia64; then
5923
# AIX 5 now supports IA64 processor
5924
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5926
_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5930
mingw* | cygwin* | pw32* | os2* | cegcc*)
5931
# This hack is so that the source file can tell whether it is being
5932
# built for inclusion in a dll (and should export symbols for example).
5933
m4_if([$1], [GCJ], [],
5934
[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5937
hpux9* | hpux10* | hpux11*)
5938
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5939
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5946
_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5949
# Is there a better lt_prog_compiler_static that works with the bundled CC?
5950
_LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5953
irix5* | irix6* | nonstopux*)
5954
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5955
# PIC (with -KPIC) is the default.
5956
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5959
linux* | k*bsd*-gnu)
5960
case $cc_basename in
5961
# old Intel for x86_64 which still supported -KPIC.
5963
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5964
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5965
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5967
# icc used to be incompatible with GCC.
5968
# ICC 10 doesn't accept -KPIC any more.
5970
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5971
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5972
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5974
# Lahey Fortran 8.1.
5976
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5977
_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
5978
_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
5980
pgcc* | pgf77* | pgf90* | pgf95*)
5981
# Portland Group compilers (*not* the Pentium gcc compiler,
5982
# which looks to be a dead project)
5983
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5984
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5985
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5988
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5989
# All Alpha code is PIC.
5990
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5993
# IBM XL C 8.0/Fortran 10.1 on PPC
5994
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5995
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5996
_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5999
case `$CC -V 2>&1 | sed 5q` in
6002
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6003
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6004
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6007
# Sun Fortran 8.3 passes all unrecognized flags to the linker
6008
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6009
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6010
_LT_TAGVAR(lt_prog_compiler_wl, $1)=''
6018
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6019
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6023
# QNX uses GNU C++, but need to define -shared option too, otherwise
6025
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6028
osf3* | osf4* | osf5*)
6029
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6030
# All OSF/1 code is PIC.
6031
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6035
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6039
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6040
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6041
case $cc_basename in
6043
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
6045
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
6050
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6051
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6052
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6055
sysv4 | sysv4.2uw2* | sysv4.3*)
6056
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6057
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6058
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6062
if test -d /usr/nec ;then
6063
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
6064
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6068
sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6069
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6070
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6071
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6075
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6076
_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6080
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6081
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6085
_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6091
# For platforms which do not support PIC, -DPIC is meaningless:
6093
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
6096
_LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
6099
AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
6100
_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
6101
[How to pass a linker flag through the compiler])
6104
# Check to make sure the PIC flag actually works.
6106
if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
6107
_LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
6108
[_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
6109
[$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
6110
[case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
6112
*) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
6114
[_LT_TAGVAR(lt_prog_compiler_pic, $1)=
6115
_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
6117
_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
6118
[Additional compiler flags for building library objects])
6121
# Check to make sure the static flag actually works.
6123
wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
6124
_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
6125
_LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
6126
$lt_tmp_static_flag,
6128
[_LT_TAGVAR(lt_prog_compiler_static, $1)=])
6129
_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
6130
[Compiler flag to prevent dynamic linking])
6131
])# _LT_COMPILER_PIC
6134
# _LT_LINKER_SHLIBS([TAGNAME])
6135
# ----------------------------
6136
# See if the linker supports building shared libraries.
6137
m4_defun([_LT_LINKER_SHLIBS],
6138
[AC_REQUIRE([LT_PATH_LD])dnl
6139
AC_REQUIRE([LT_PATH_NM])dnl
6140
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6141
m4_require([_LT_DECL_EGREP])dnl
6142
m4_require([_LT_DECL_SED])dnl
6143
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
6144
m4_require([_LT_TAG_COMPILER])dnl
6145
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6146
m4_if([$1], [CXX], [
6147
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6150
# If we're using GNU nm, then we don't want the "-C" option.
6151
# -C means demangle to AIX nm, but means don't demangle with GNU nm
6152
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6153
_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'
6155
_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'
6159
_LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
6161
cygwin* | mingw* | cegcc*)
6162
_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'
6165
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6168
_LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
6171
_LT_TAGVAR(allow_undefined_flag, $1)=
6172
_LT_TAGVAR(always_export_symbols, $1)=no
6173
_LT_TAGVAR(archive_cmds, $1)=
6174
_LT_TAGVAR(archive_expsym_cmds, $1)=
6175
_LT_TAGVAR(compiler_needs_object, $1)=no
6176
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6177
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6178
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6179
_LT_TAGVAR(hardcode_automatic, $1)=no
6180
_LT_TAGVAR(hardcode_direct, $1)=no
6181
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6182
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6183
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6184
_LT_TAGVAR(hardcode_libdir_separator, $1)=
6185
_LT_TAGVAR(hardcode_minus_L, $1)=no
6186
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6187
_LT_TAGVAR(inherit_rpath, $1)=no
6188
_LT_TAGVAR(link_all_deplibs, $1)=unknown
6189
_LT_TAGVAR(module_cmds, $1)=
6190
_LT_TAGVAR(module_expsym_cmds, $1)=
6191
_LT_TAGVAR(old_archive_from_new_cmds, $1)=
6192
_LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
6193
_LT_TAGVAR(thread_safe_flag_spec, $1)=
6194
_LT_TAGVAR(whole_archive_flag_spec, $1)=
6195
# include_expsyms should be a list of space-separated symbols to be *always*
6196
# included in the symbol list
6197
_LT_TAGVAR(include_expsyms, $1)=
6198
# exclude_expsyms can be an extended regexp of symbols to exclude
6199
# it will be wrapped by ` (' and `)$', so one must not match beginning or
6200
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
6201
# as well as any symbol that contains `d'.
6202
_LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
6203
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
6204
# platforms (ab)use it in PIC code, but their linkers get confused if
6205
# the symbol is explicitly referenced. Since portable code cannot
6206
# rely on this symbol name, it's probably fine to never include it in
6207
# preloaded symbol tables.
6208
# Exclude shared library initialization/finalization symbols.
6209
dnl Note also adjust exclude_expsyms for C++ above.
6210
extract_expsyms_cmds=
6213
cygwin* | mingw* | pw32* | cegcc*)
6214
# FIXME: the MSVC++ port hasn't been tested in a loooong time
6215
# When not using gcc, we currently assume that we are using
6216
# Microsoft Visual C++.
6217
if test "$GCC" != yes; then
6222
# we just hope/assume this is gcc and not c89 (= MSVC++)
6230
_LT_TAGVAR(ld_shlibs, $1)=yes
6231
if test "$with_gnu_ld" = yes; then
6232
# If archive_cmds runs LD, not CC, wlarc should be empty
6235
# Set some defaults for GNU ld with shared library support. These
6236
# are reset later if shared libraries are not supported. Putting them
6237
# here allows them to be overridden if necessary.
6238
runpath_var=LD_RUN_PATH
6239
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6240
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6241
# ancient GNU ld didn't support --whole-archive et. al.
6242
if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
6243
_LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6245
_LT_TAGVAR(whole_archive_flag_spec, $1)=
6247
supports_anon_versioning=no
6248
case `$LD -v 2>&1` in
6249
*\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6250
*\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6251
*\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6252
*\ 2.11.*) ;; # other 2.11 versions
6253
*) supports_anon_versioning=yes ;;
6256
# See if GNU ld supports shared libraries.
6259
# On AIX/PPC, the GNU linker is very broken
6260
if test "$host_cpu" != ia64; then
6261
_LT_TAGVAR(ld_shlibs, $1)=no
6264
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
6265
*** to be unable to reliably create shared libraries on AIX.
6266
*** Therefore, libtool is disabling shared libraries support. If you
6267
*** really care for shared libraries, you may want to modify your PATH
6268
*** so that a non-GNU linker is found, and then restart.
6277
# see comment about AmigaOS4 .so support
6278
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6279
_LT_TAGVAR(archive_expsym_cmds, $1)=''
6282
_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)'
6283
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6284
_LT_TAGVAR(hardcode_minus_L, $1)=yes
6290
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6291
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6292
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6293
# support --undefined. This deserves some investigation. FIXME
6294
_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6296
_LT_TAGVAR(ld_shlibs, $1)=no
6300
cygwin* | mingw* | pw32* | cegcc*)
6301
# _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6302
# as there is no search path for DLLs.
6303
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6304
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6305
_LT_TAGVAR(always_export_symbols, $1)=no
6306
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6307
_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'
6309
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6310
_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'
6311
# If the export-symbols file already is a .def file (1st line
6312
# is EXPORTS), use it as is; otherwise, prepend...
6313
_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6314
cp $export_symbols $output_objdir/$soname.def;
6316
echo EXPORTS > $output_objdir/$soname.def;
6317
cat $export_symbols >> $output_objdir/$soname.def;
6319
$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6321
_LT_TAGVAR(ld_shlibs, $1)=no
6326
_LT_TAGVAR(hardcode_direct, $1)=no
6327
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6328
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6329
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6330
# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6331
# Instead, shared libraries are loaded at an image base (0x10000000 by
6332
# default) and relocated if they conflict, which is a slow very memory
6333
# consuming and fragmenting process. To avoid this, we pick a random,
6334
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6335
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
6336
_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'
6337
_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'
6340
gnu* | linux* | tpf* | k*bsd*-gnu)
6342
if test "$host_os" = linux-dietlibc; then
6343
case $cc_basename in
6344
diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
6347
if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
6348
&& test "$tmp_diet" = no
6351
tmp_sharedflag='-shared'
6352
case $cc_basename,$host_cpu in
6353
pgcc*) # Portland Group C compiler
6354
_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'
6355
tmp_addflag=' $pic_flag'
6357
pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
6358
_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'
6359
tmp_addflag=' $pic_flag -Mnomain' ;;
6360
ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
6361
tmp_addflag=' -i_dynamic' ;;
6362
efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
6363
tmp_addflag=' -i_dynamic -nofor_main' ;;
6364
ifc* | ifort*) # Intel Fortran compiler
6365
tmp_addflag=' -nofor_main' ;;
6366
lf95*) # Lahey Fortran 8.1
6367
_LT_TAGVAR(whole_archive_flag_spec, $1)=
6368
tmp_sharedflag='--shared' ;;
6369
xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
6370
tmp_sharedflag='-qmkshrobj'
6373
case `$CC -V 2>&1 | sed 5q` in
6374
*Sun\ C*) # Sun C 5.9
6375
_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'
6376
_LT_TAGVAR(compiler_needs_object, $1)=yes
6377
tmp_sharedflag='-G' ;;
6378
*Sun\ F*) # Sun Fortran 8.3
6379
tmp_sharedflag='-G' ;;
6381
_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6383
if test "x$supports_anon_versioning" = xyes; then
6384
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6385
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6386
echo "local: *; };" >> $output_objdir/$libname.ver~
6387
$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6390
case $cc_basename in
6392
# IBM XL Fortran 10.1 on PPC cannot create shared libs itself
6393
_LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
6394
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6395
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6396
_LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
6397
if test "x$supports_anon_versioning" = xyes; then
6398
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6399
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6400
echo "local: *; };" >> $output_objdir/$libname.ver~
6401
$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
6406
_LT_TAGVAR(ld_shlibs, $1)=no
6411
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6412
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6415
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6416
_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'
6421
if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
6422
_LT_TAGVAR(ld_shlibs, $1)=no
6425
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
6426
*** create shared libraries on Solaris systems. Therefore, libtool
6427
*** is disabling shared libraries support. We urge you to upgrade GNU
6428
*** binutils to release 2.9.1 or newer. Another option is to modify
6429
*** your PATH or compiler configuration so that the native linker is
6430
*** used, and then restart.
6433
elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6434
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6435
_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'
6437
_LT_TAGVAR(ld_shlibs, $1)=no
6441
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
6442
case `$LD -v 2>&1` in
6443
*\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
6444
_LT_TAGVAR(ld_shlibs, $1)=no
6447
*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
6448
*** reliably create shared libraries on SCO systems. Therefore, libtool
6449
*** is disabling shared libraries support. We urge you to upgrade GNU
6450
*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
6451
*** your PATH or compiler configuration so that the native linker is
6452
*** used, and then restart.
6457
# For security reasons, it is highly recommended that you always
6458
# use absolute paths for naming shared libraries, and exclude the
6459
# DT_RUNPATH tag from executables and libraries. But doing so
6460
# requires that you compile everything twice, which is a pain.
6461
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6462
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6463
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6464
_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'
6466
_LT_TAGVAR(ld_shlibs, $1)=no
6473
_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6475
_LT_TAGVAR(hardcode_direct, $1)=yes
6476
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6480
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6481
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6482
_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'
6484
_LT_TAGVAR(ld_shlibs, $1)=no
6489
if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
6491
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6492
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6493
_LT_TAGVAR(whole_archive_flag_spec, $1)=
6496
# PORTME fill in a description of your system's linker (not GNU ld)
6499
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6500
_LT_TAGVAR(always_export_symbols, $1)=yes
6501
_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'
6502
# Note: this linker hardcodes the directories in LIBPATH if there
6503
# are no directories specified by -L.
6504
_LT_TAGVAR(hardcode_minus_L, $1)=yes
6505
if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
6506
# Neither direct hardcoding nor static linking is supported with a
6508
_LT_TAGVAR(hardcode_direct, $1)=unsupported
6513
if test "$host_cpu" = ia64; then
6514
# On IA64, the linker does run time linking by default, so we don't
6515
# have to do anything special.
6516
aix_use_runtimelinking=no
6517
exp_sym_flag='-Bexport'
6520
# If we're using GNU nm, then we don't want the "-C" option.
6521
# -C means demangle to AIX nm, but means don't demangle with GNU nm
6522
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6523
_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'
6525
_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'
6527
aix_use_runtimelinking=no
6529
# Test if we are trying to use run time linking or normal
6530
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
6531
# need to do runtime linking.
6532
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6533
for ld_flag in $LDFLAGS; do
6534
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6535
aix_use_runtimelinking=yes
6542
exp_sym_flag='-bexport'
6543
no_entry_flag='-bnoentry'
6546
# When large executables or shared objects are built, AIX ld can
6547
# have problems creating the table of contents. If linking a library
6548
# or program results in "error TOC overflow" add -mminimal-toc to
6549
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6550
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6552
_LT_TAGVAR(archive_cmds, $1)=''
6553
_LT_TAGVAR(hardcode_direct, $1)=yes
6554
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6555
_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6556
_LT_TAGVAR(link_all_deplibs, $1)=yes
6557
_LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6559
if test "$GCC" = yes; then
6560
case $host_os in aix4.[[012]]|aix4.[[012]].*)
6561
# We only want to do this on AIX 4.2 and lower, the check
6562
# below for broken collect2 doesn't work under 4.3+
6563
collect2name=`${CC} -print-prog-name=collect2`
6564
if test -f "$collect2name" &&
6565
strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6567
# We have reworked collect2
6570
# We have old collect2
6571
_LT_TAGVAR(hardcode_direct, $1)=unsupported
6572
# It fails to find uninstalled libraries when the uninstalled
6573
# path is not listed in the libpath. Setting hardcode_minus_L
6574
# to unsupported forces relinking
6575
_LT_TAGVAR(hardcode_minus_L, $1)=yes
6576
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6577
_LT_TAGVAR(hardcode_libdir_separator, $1)=
6581
shared_flag='-shared'
6582
if test "$aix_use_runtimelinking" = yes; then
6583
shared_flag="$shared_flag "'${wl}-G'
6587
if test "$host_cpu" = ia64; then
6588
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6589
# chokes on -Wl,-G. The following line is correct:
6592
if test "$aix_use_runtimelinking" = yes; then
6593
shared_flag='${wl}-G'
6595
shared_flag='${wl}-bM:SRE'
6600
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6601
# It seems that -bexpall does not export symbols beginning with
6602
# underscore (_), so it is better to generate a list of symbols to export.
6603
_LT_TAGVAR(always_export_symbols, $1)=yes
6604
if test "$aix_use_runtimelinking" = yes; then
6605
# Warning - without using the other runtime loading flags (-brtl),
6606
# -berok will link without error, but may produce a broken library.
6607
_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6608
# Determine the default libpath from the value encoded in an
6610
_LT_SYS_MODULE_PATH_AIX
6611
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6612
_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"
6614
if test "$host_cpu" = ia64; then
6615
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6616
_LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6617
_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"
6619
# Determine the default libpath from the value encoded in an
6621
_LT_SYS_MODULE_PATH_AIX
6622
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6623
# Warning - without using the other run time loading flags,
6624
# -berok will link without error, but may produce a broken library.
6625
_LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6626
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6627
# Exported symbols can be pulled into shared objects from archives
6628
_LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6629
_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6630
# This is similar to how AIX traditionally builds its shared libraries.
6631
_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'
6639
# see comment about AmigaOS4 .so support
6640
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6641
_LT_TAGVAR(archive_expsym_cmds, $1)=''
6644
_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)'
6645
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6646
_LT_TAGVAR(hardcode_minus_L, $1)=yes
6652
_LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6655
cygwin* | mingw* | pw32* | cegcc*)
6656
# When not using gcc, we currently assume that we are using
6657
# Microsoft Visual C++.
6658
# hardcode_libdir_flag_spec is actually meaningless, as there is
6659
# no search path for DLLs.
6660
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6661
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6662
# Tell ltmain to make .lib files, not .a files.
6664
# Tell ltmain to make .dll files, not .so files.
6666
# FIXME: Setting linknames here is a bad hack.
6667
_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
6668
# The linker will automatically build a .lib file if we build a DLL.
6669
_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6670
# FIXME: Should let the user specify the lib program.
6671
_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
6672
_LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
6673
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6676
darwin* | rhapsody*)
6677
_LT_DARWIN_LINKER_FEATURES($1)
6681
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6682
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6683
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6687
_LT_TAGVAR(ld_shlibs, $1)=no
6690
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6691
# support. Future versions do this automatically, but an explicit c++rt0.o
6692
# does not break anything, and helps significantly (at the cost of a little
6695
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6696
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6697
_LT_TAGVAR(hardcode_direct, $1)=yes
6698
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6701
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
6703
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6704
_LT_TAGVAR(hardcode_direct, $1)=yes
6705
_LT_TAGVAR(hardcode_minus_L, $1)=yes
6706
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6709
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6710
freebsd* | dragonfly*)
6711
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6712
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6713
_LT_TAGVAR(hardcode_direct, $1)=yes
6714
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6718
if test "$GCC" = yes; then
6719
_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'
6721
_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'
6723
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6724
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6725
_LT_TAGVAR(hardcode_direct, $1)=yes
6727
# hardcode_minus_L: Not really in the search PATH,
6728
# but as the default location of the library.
6729
_LT_TAGVAR(hardcode_minus_L, $1)=yes
6730
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6734
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6735
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6737
_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6739
if test "$with_gnu_ld" = no; then
6740
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6741
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6742
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6743
_LT_TAGVAR(hardcode_direct, $1)=yes
6744
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6745
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6746
# hardcode_minus_L: Not really in the search PATH,
6747
# but as the default location of the library.
6748
_LT_TAGVAR(hardcode_minus_L, $1)=yes
6753
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6756
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6759
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6762
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6768
_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6771
_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6774
_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6778
if test "$with_gnu_ld" = no; then
6779
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6780
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6784
_LT_TAGVAR(hardcode_direct, $1)=no
6785
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6788
_LT_TAGVAR(hardcode_direct, $1)=yes
6789
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6790
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6792
# hardcode_minus_L: Not really in the search PATH,
6793
# but as the default location of the library.
6794
_LT_TAGVAR(hardcode_minus_L, $1)=yes
6800
irix5* | irix6* | nonstopux*)
6801
if test "$GCC" = yes; then
6802
_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'
6803
# Try to use the -exported_symbol ld option, if it does not
6804
# work, assume that -exports_file does not work either and
6805
# implicitly export all symbols.
6806
save_LDFLAGS="$LDFLAGS"
6807
LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
6808
AC_LINK_IFELSE(int foo(void) {},
6809
_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'
6811
LDFLAGS="$save_LDFLAGS"
6813
_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'
6814
_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'
6816
_LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6817
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6818
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6819
_LT_TAGVAR(inherit_rpath, $1)=yes
6820
_LT_TAGVAR(link_all_deplibs, $1)=yes
6824
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6825
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
6827
_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
6829
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6830
_LT_TAGVAR(hardcode_direct, $1)=yes
6831
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6835
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6836
_LT_TAGVAR(hardcode_direct, $1)=yes
6837
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6838
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6839
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6846
if test -f /usr/libexec/ld.so; then
6847
_LT_TAGVAR(hardcode_direct, $1)=yes
6848
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6849
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6850
if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6851
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6852
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6853
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6854
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6857
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6858
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6859
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6862
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6863
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6868
_LT_TAGVAR(ld_shlibs, $1)=no
6873
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6874
_LT_TAGVAR(hardcode_minus_L, $1)=yes
6875
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6876
_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'
6877
_LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6881
if test "$GCC" = yes; then
6882
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6883
_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'
6885
_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6886
_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'
6888
_LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6889
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6890
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6893
osf4* | osf5*) # as osf3* with the addition of -msym flag
6894
if test "$GCC" = yes; then
6895
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6896
_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'
6897
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6899
_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6900
_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'
6901
_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~
6902
$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'
6904
# Both c and cxx compiler support -rpath directly
6905
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6907
_LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6908
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6912
_LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
6913
if test "$GCC" = yes; then
6915
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6916
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6917
$CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6919
case `$CC -V 2>&1` in
6922
_LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6923
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6924
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
6928
_LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
6929
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6930
$CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6934
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6935
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6937
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6939
# The compiler driver will combine and reorder linker options,
6940
# but understands `-z linker_flag'. GCC discards it without `$wl',
6941
# but is careful enough not to reorder.
6942
# Supported since Solaris 2.6 (maybe 2.5.1?)
6943
if test "$GCC" = yes; then
6944
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6946
_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6950
_LT_TAGVAR(link_all_deplibs, $1)=yes
6954
if test "x$host_vendor" = xsequent; then
6955
# Use $CC to link under sequent, because it throws in some extra .o
6956
# files that make .init and .fini sections work.
6957
_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6959
_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6961
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6962
_LT_TAGVAR(hardcode_direct, $1)=yes
6963
_LT_TAGVAR(hardcode_minus_L, $1)=yes
6964
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6968
case $host_vendor in
6970
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6971
_LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6974
## LD is ld it makes a PLAMLIB
6975
## CC just makes a GrossModule.
6976
_LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6977
_LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6978
_LT_TAGVAR(hardcode_direct, $1)=no
6981
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6982
_LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6985
runpath_var='LD_RUN_PATH'
6986
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6990
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6991
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6992
_LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6996
if test -d /usr/nec; then
6997
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6998
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6999
runpath_var=LD_RUN_PATH
7000
hardcode_runpath_var=yes
7001
_LT_TAGVAR(ld_shlibs, $1)=yes
7005
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7006
_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7007
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7008
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7009
runpath_var='LD_RUN_PATH'
7011
if test "$GCC" = yes; then
7012
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7013
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7015
_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7016
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7020
sysv5* | sco3.2v5* | sco5v6*)
7021
# Note: We can NOT use -z defs as we might desire, because we do not
7022
# link with -lc, and that would cause any symbols used from libc to
7023
# always be unresolved, which means just about no library would
7024
# ever link correctly. If we're not using GNU ld we use -z text
7025
# though, which does catch some bad symbols but isn't as heavy-handed
7027
_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7028
_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7029
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7030
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7031
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7032
_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7033
_LT_TAGVAR(link_all_deplibs, $1)=yes
7034
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7035
runpath_var='LD_RUN_PATH'
7037
if test "$GCC" = yes; then
7038
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7039
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7041
_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7042
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7047
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7048
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7049
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7053
_LT_TAGVAR(ld_shlibs, $1)=no
7057
if test x$host_vendor = xsni; then
7059
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7060
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
7066
AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7067
test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7069
_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
7071
_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
7072
_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
7073
_LT_DECL([], [extract_expsyms_cmds], [2],
7074
[The commands to extract the exported symbol list from a shared archive])
7077
# Do we need to explicitly link libc?
7079
case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
7081
# Assume -lc should be added
7082
_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7084
if test "$enable_shared" = yes && test "$GCC" = yes; then
7085
case $_LT_TAGVAR(archive_cmds, $1) in
7087
# FIXME: we may have to deal with multi-command sequences.
7090
# Test whether the compiler implicitly links with -lc since on some
7091
# systems, -lgcc has to come before -lc. If gcc already passes -lc
7092
# to ld, don't add -lc before -lgcc.
7093
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
7095
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
7097
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
7100
libobjs=conftest.$ac_objext
7102
wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
7103
pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
7109
lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
7110
_LT_TAGVAR(allow_undefined_flag, $1)=
7111
if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
7113
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7115
_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7117
_LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
7119
cat conftest.err 1>&5
7122
AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
7129
_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
7130
[Whether or not to add -lc for building shared libraries])
7131
_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
7132
[enable_shared_with_static_runtimes], [0],
7133
[Whether or not to disallow shared libs when runtime libs are static])
7134
_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
7135
[Compiler flag to allow reflexive dlopens])
7136
_LT_TAGDECL([], [whole_archive_flag_spec], [1],
7137
[Compiler flag to generate shared objects directly from archives])
7138
_LT_TAGDECL([], [compiler_needs_object], [1],
7139
[Whether the compiler copes with passing no objects directly])
7140
_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
7141
[Create an old-style archive from a shared archive])
7142
_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
7143
[Create a temporary old-style archive to link instead of a shared archive])
7144
_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
7145
_LT_TAGDECL([], [archive_expsym_cmds], [2])
7146
_LT_TAGDECL([], [module_cmds], [2],
7147
[Commands used to build a loadable module if different from building
7149
_LT_TAGDECL([], [module_expsym_cmds], [2])
7150
_LT_TAGDECL([], [with_gnu_ld], [1],
7151
[Whether we are building with GNU ld or not])
7152
_LT_TAGDECL([], [allow_undefined_flag], [1],
7153
[Flag that allows shared libraries with undefined symbols to be built])
7154
_LT_TAGDECL([], [no_undefined_flag], [1],
7155
[Flag that enforces no undefined symbols])
7156
_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
7157
[Flag to hardcode $libdir into a binary during linking.
7158
This must work even if $libdir does not exist])
7159
_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
7160
[[If ld is used when linking, flag to hardcode $libdir into a binary
7161
during linking. This must work even if $libdir does not exist]])
7162
_LT_TAGDECL([], [hardcode_libdir_separator], [1],
7163
[Whether we need a single "-rpath" flag with a separated argument])
7164
_LT_TAGDECL([], [hardcode_direct], [0],
7165
[Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
7166
DIR into the resulting binary])
7167
_LT_TAGDECL([], [hardcode_direct_absolute], [0],
7168
[Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
7169
DIR into the resulting binary and the resulting library dependency is
7170
"absolute", i.e impossible to change by setting ${shlibpath_var} if the
7171
library is relocated])
7172
_LT_TAGDECL([], [hardcode_minus_L], [0],
7173
[Set to "yes" if using the -LDIR flag during linking hardcodes DIR
7174
into the resulting binary])
7175
_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
7176
[Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
7177
into the resulting binary])
7178
_LT_TAGDECL([], [hardcode_automatic], [0],
7179
[Set to "yes" if building a shared library automatically hardcodes DIR
7180
into the library and all subsequent libraries and executables linked
7182
_LT_TAGDECL([], [inherit_rpath], [0],
7183
[Set to yes if linker adds runtime paths of dependent libraries
7184
to runtime path list])
7185
_LT_TAGDECL([], [link_all_deplibs], [0],
7186
[Whether libtool must link a program against all its dependency libraries])
7187
_LT_TAGDECL([], [fix_srcfile_path], [1],
7188
[Fix the shell variable $srcfile for the compiler])
7189
_LT_TAGDECL([], [always_export_symbols], [0],
7190
[Set to "yes" if exported symbols are required])
7191
_LT_TAGDECL([], [export_symbols_cmds], [2],
7192
[The commands to list exported symbols])
7193
_LT_TAGDECL([], [exclude_expsyms], [1],
7194
[Symbols that should not be listed in the preloaded symbols])
7195
_LT_TAGDECL([], [include_expsyms], [1],
7196
[Symbols that must always be exported])
7197
_LT_TAGDECL([], [prelink_cmds], [2],
7198
[Commands necessary for linking programs (against libraries) with templates])
7199
_LT_TAGDECL([], [file_list_spec], [1],
7200
[Specify filename containing input files])
7201
dnl FIXME: Not yet implemented
7202
dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
7203
dnl [Compiler flag to generate thread safe objects])
7204
])# _LT_LINKER_SHLIBS
7207
# _LT_LANG_C_CONFIG([TAG])
7208
# ------------------------
7209
# Ensure that the configuration variables for a C compiler are suitably
7210
# defined. These variables are subsequently used by _LT_CONFIG to write
7211
# the compiler configuration to `libtool'.
7212
m4_defun([_LT_LANG_C_CONFIG],
7213
[m4_require([_LT_DECL_EGREP])dnl
7217
# Source file extension for C test sources.
7220
# Object file extension for compiled C test sources.
7222
_LT_TAGVAR(objext, $1)=$objext
7224
# Code to be used in simple compile tests
7225
lt_simple_compile_test_code="int some_variable = 0;"
7227
# Code to be used in simple link tests
7228
lt_simple_link_test_code='int main(){return(0);}'
7231
# Save the default compiler, since it gets overwritten when the other
7232
# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
7233
compiler_DEFAULT=$CC
7235
# save warnings/boilerplate of simple test code
7236
_LT_COMPILER_BOILERPLATE
7237
_LT_LINKER_BOILERPLATE
7239
if test -n "$compiler"; then
7240
_LT_COMPILER_NO_RTTI($1)
7241
_LT_COMPILER_PIC($1)
7242
_LT_COMPILER_C_O($1)
7243
_LT_COMPILER_FILE_LOCKS($1)
7244
_LT_LINKER_SHLIBS($1)
7245
_LT_SYS_DYNAMIC_LINKER($1)
7246
_LT_LINKER_HARDCODE_LIBPATH($1)
7250
# Report which library types will actually be built
7251
AC_MSG_CHECKING([if libtool supports shared libraries])
7252
AC_MSG_RESULT([$can_build_shared])
7254
AC_MSG_CHECKING([whether to build shared libraries])
7255
test "$can_build_shared" = "no" && enable_shared=no
7257
# On AIX, shared libraries and static libraries use the same namespace, and
7258
# are all built from PIC.
7261
test "$enable_shared" = yes && enable_static=no
7262
if test -n "$RANLIB"; then
7263
archive_cmds="$archive_cmds~\$RANLIB \$lib"
7264
postinstall_cmds='$RANLIB $lib'
7269
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7270
test "$enable_shared" = yes && enable_static=no
7274
AC_MSG_RESULT([$enable_shared])
7276
AC_MSG_CHECKING([whether to build static libraries])
7277
# Make sure either enable_shared or enable_static is yes.
7278
test "$enable_shared" = yes || enable_static=yes
7279
AC_MSG_RESULT([$enable_static])
7285
])# _LT_LANG_C_CONFIG
7290
# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
7291
# compiler, we have our own version here.
7292
m4_defun([_LT_PROG_CXX],
7294
pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
7296
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
7297
( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
7298
(test "X$CXX" != "Xg++"))) ; then
7301
_lt_caught_CXX_error=yes
7303
popdef([AC_MSG_ERROR])
7306
dnl aclocal-1.4 backwards compatibility:
7307
dnl AC_DEFUN([_LT_PROG_CXX], [])
7310
# _LT_LANG_CXX_CONFIG([TAG])
7311
# --------------------------
7312
# Ensure that the configuration variables for a C++ compiler are suitably
7313
# defined. These variables are subsequently used by _LT_CONFIG to write
7314
# the compiler configuration to `libtool'.
7315
m4_defun([_LT_LANG_CXX_CONFIG],
7316
[AC_REQUIRE([_LT_PROG_CXX])dnl
7317
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7318
m4_require([_LT_DECL_EGREP])dnl
7321
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7322
_LT_TAGVAR(allow_undefined_flag, $1)=
7323
_LT_TAGVAR(always_export_symbols, $1)=no
7324
_LT_TAGVAR(archive_expsym_cmds, $1)=
7325
_LT_TAGVAR(compiler_needs_object, $1)=no
7326
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7327
_LT_TAGVAR(hardcode_direct, $1)=no
7328
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7329
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7330
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7331
_LT_TAGVAR(hardcode_libdir_separator, $1)=
7332
_LT_TAGVAR(hardcode_minus_L, $1)=no
7333
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7334
_LT_TAGVAR(hardcode_automatic, $1)=no
7335
_LT_TAGVAR(inherit_rpath, $1)=no
7336
_LT_TAGVAR(module_cmds, $1)=
7337
_LT_TAGVAR(module_expsym_cmds, $1)=
7338
_LT_TAGVAR(link_all_deplibs, $1)=unknown
7339
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7340
_LT_TAGVAR(no_undefined_flag, $1)=
7341
_LT_TAGVAR(whole_archive_flag_spec, $1)=
7342
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7344
# Source file extension for C++ test sources.
7347
# Object file extension for compiled C++ test sources.
7349
_LT_TAGVAR(objext, $1)=$objext
7351
# No sense in running all these tests if we already determined that
7352
# the CXX compiler isn't working. Some variables (like enable_shared)
7353
# are currently assumed to apply to all compilers on this platform,
7354
# and will be corrupted by setting them based on a non-working compiler.
7355
if test "$_lt_caught_CXX_error" != yes; then
7356
# Code to be used in simple compile tests
7357
lt_simple_compile_test_code="int some_variable = 0;"
7359
# Code to be used in simple link tests
7360
lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
7362
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7365
# save warnings/boilerplate of simple test code
7366
_LT_COMPILER_BOILERPLATE
7367
_LT_LINKER_BOILERPLATE
7369
# Allow CC to be a program name with arguments.
7374
lt_save_with_gnu_ld=$with_gnu_ld
7375
lt_save_path_LD=$lt_cv_path_LD
7376
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
7377
lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
7379
$as_unset lt_cv_prog_gnu_ld
7381
if test -n "${lt_cv_path_LDCXX+set}"; then
7382
lt_cv_path_LD=$lt_cv_path_LDCXX
7384
$as_unset lt_cv_path_LD
7386
test -z "${LDCXX+set}" || LD=$LDCXX
7389
_LT_TAGVAR(compiler, $1)=$CC
7390
_LT_CC_BASENAME([$compiler])
7392
if test -n "$compiler"; then
7393
# We don't want -fno-exception when compiling C++ code, so set the
7394
# no_builtin_flag separately
7395
if test "$GXX" = yes; then
7396
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
7398
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
7401
if test "$GXX" = yes; then
7402
# Set up default GNU C++ configuration
7406
# Check if GNU C++ uses GNU ld as the underlying linker, since the
7407
# archiving commands below assume that GNU ld is being used.
7408
if test "$with_gnu_ld" = yes; then
7409
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7410
_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'
7412
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7413
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7415
# If archive_cmds runs LD, not CC, wlarc should be empty
7416
# XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
7417
# investigate it a little bit more. (MM)
7420
# ancient GNU ld didn't support --whole-archive et. al.
7421
if eval "`$CC -print-prog-name=ld` --help 2>&1" |
7422
$GREP 'no-whole-archive' > /dev/null; then
7423
_LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7425
_LT_TAGVAR(whole_archive_flag_spec, $1)=
7431
# A generic and very simple default shared library creation
7432
# command for GNU C++ for the case where it uses the native
7433
# linker, instead of GNU ld. If possible, this setting should
7434
# overridden to take advantage of the native linker features on
7435
# the platform it is being used on.
7436
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7439
# Commands to make compiler produce verbose output that lists
7440
# what "hidden" libraries, object files and flags are used when
7441
# linking a shared library.
7442
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
7450
# PORTME: fill in a description of your system's C++ link characteristics
7451
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
7452
_LT_TAGVAR(ld_shlibs, $1)=yes
7455
# FIXME: insert proper C++ library support
7456
_LT_TAGVAR(ld_shlibs, $1)=no
7459
if test "$host_cpu" = ia64; then
7460
# On IA64, the linker does run time linking by default, so we don't
7461
# have to do anything special.
7462
aix_use_runtimelinking=no
7463
exp_sym_flag='-Bexport'
7466
aix_use_runtimelinking=no
7468
# Test if we are trying to use run time linking or normal
7469
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
7470
# need to do runtime linking.
7471
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
7472
for ld_flag in $LDFLAGS; do
7475
aix_use_runtimelinking=yes
7483
exp_sym_flag='-bexport'
7484
no_entry_flag='-bnoentry'
7487
# When large executables or shared objects are built, AIX ld can
7488
# have problems creating the table of contents. If linking a library
7489
# or program results in "error TOC overflow" add -mminimal-toc to
7490
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
7491
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7493
_LT_TAGVAR(archive_cmds, $1)=''
7494
_LT_TAGVAR(hardcode_direct, $1)=yes
7495
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7496
_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7497
_LT_TAGVAR(link_all_deplibs, $1)=yes
7498
_LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
7500
if test "$GXX" = yes; then
7501
case $host_os in aix4.[[012]]|aix4.[[012]].*)
7502
# We only want to do this on AIX 4.2 and lower, the check
7503
# below for broken collect2 doesn't work under 4.3+
7504
collect2name=`${CC} -print-prog-name=collect2`
7505
if test -f "$collect2name" &&
7506
strings "$collect2name" | $GREP resolve_lib_name >/dev/null
7508
# We have reworked collect2
7511
# We have old collect2
7512
_LT_TAGVAR(hardcode_direct, $1)=unsupported
7513
# It fails to find uninstalled libraries when the uninstalled
7514
# path is not listed in the libpath. Setting hardcode_minus_L
7515
# to unsupported forces relinking
7516
_LT_TAGVAR(hardcode_minus_L, $1)=yes
7517
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7518
_LT_TAGVAR(hardcode_libdir_separator, $1)=
7521
shared_flag='-shared'
7522
if test "$aix_use_runtimelinking" = yes; then
7523
shared_flag="$shared_flag "'${wl}-G'
7527
if test "$host_cpu" = ia64; then
7528
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7529
# chokes on -Wl,-G. The following line is correct:
7532
if test "$aix_use_runtimelinking" = yes; then
7533
shared_flag='${wl}-G'
7535
shared_flag='${wl}-bM:SRE'
7540
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
7541
# It seems that -bexpall does not export symbols beginning with
7542
# underscore (_), so it is better to generate a list of symbols to
7544
_LT_TAGVAR(always_export_symbols, $1)=yes
7545
if test "$aix_use_runtimelinking" = yes; then
7546
# Warning - without using the other runtime loading flags (-brtl),
7547
# -berok will link without error, but may produce a broken library.
7548
_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
7549
# Determine the default libpath from the value encoded in an empty
7551
_LT_SYS_MODULE_PATH_AIX
7552
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7554
_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"
7556
if test "$host_cpu" = ia64; then
7557
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7558
_LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7559
_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"
7561
# Determine the default libpath from the value encoded in an
7563
_LT_SYS_MODULE_PATH_AIX
7564
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7565
# Warning - without using the other run time loading flags,
7566
# -berok will link without error, but may produce a broken library.
7567
_LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7568
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7569
# Exported symbols can be pulled into shared objects from archives
7570
_LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7571
_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7572
# This is similar to how AIX traditionally builds its shared
7574
_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'
7580
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7581
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7582
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
7583
# support --undefined. This deserves some investigation. FIXME
7584
_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7586
_LT_TAGVAR(ld_shlibs, $1)=no
7591
case $cc_basename in
7593
# FIXME: insert proper C++ library support
7594
_LT_TAGVAR(ld_shlibs, $1)=no
7599
cygwin* | mingw* | pw32* | cegcc*)
7600
# _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7601
# as there is no search path for DLLs.
7602
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7603
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7604
_LT_TAGVAR(always_export_symbols, $1)=no
7605
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7607
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
7608
_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'
7609
# If the export-symbols file already is a .def file (1st line
7610
# is EXPORTS), use it as is; otherwise, prepend...
7611
_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7612
cp $export_symbols $output_objdir/$soname.def;
7614
echo EXPORTS > $output_objdir/$soname.def;
7615
cat $export_symbols >> $output_objdir/$soname.def;
7617
$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'
7619
_LT_TAGVAR(ld_shlibs, $1)=no
7622
darwin* | rhapsody*)
7623
_LT_DARWIN_LINKER_FEATURES($1)
7627
case $cc_basename in
7629
# FIXME: insert proper C++ library support
7630
_LT_TAGVAR(ld_shlibs, $1)=no
7633
# Green Hills C++ Compiler
7634
# FIXME: insert proper C++ library support
7635
_LT_TAGVAR(ld_shlibs, $1)=no
7638
# FIXME: insert proper C++ library support
7639
_LT_TAGVAR(ld_shlibs, $1)=no
7645
# C++ shared libraries reported to be fairly broken before
7647
_LT_TAGVAR(ld_shlibs, $1)=no
7651
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7654
freebsd* | dragonfly*)
7655
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
7657
_LT_TAGVAR(ld_shlibs, $1)=yes
7664
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7665
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
7666
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7667
_LT_TAGVAR(hardcode_direct, $1)=yes
7668
_LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7669
# but as the default
7670
# location of the library.
7672
case $cc_basename in
7674
# FIXME: insert proper C++ library support
7675
_LT_TAGVAR(ld_shlibs, $1)=no
7678
_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'
7679
# Commands to make compiler produce verbose output that lists
7680
# what "hidden" libraries, object files and flags are used when
7681
# linking a shared library.
7683
# There doesn't appear to be a way to prevent this compiler from
7684
# explicitly linking system object files so we need to strip them
7685
# from the output so that they don't get included in the library
7687
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'
7690
if test "$GXX" = yes; then
7691
_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'
7693
# FIXME: insert proper C++ library support
7694
_LT_TAGVAR(ld_shlibs, $1)=no
7701
if test $with_gnu_ld = no; then
7702
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7703
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
7709
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7715
_LT_TAGVAR(hardcode_direct, $1)=no
7716
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7719
_LT_TAGVAR(hardcode_direct, $1)=yes
7720
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7721
_LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7722
# but as the default
7723
# location of the library.
7727
case $cc_basename in
7729
# FIXME: insert proper C++ library support
7730
_LT_TAGVAR(ld_shlibs, $1)=no
7735
_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7738
_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7741
_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'
7744
# Commands to make compiler produce verbose output that lists
7745
# what "hidden" libraries, object files and flags are used when
7746
# linking a shared library.
7748
# There doesn't appear to be a way to prevent this compiler from
7749
# explicitly linking system object files so we need to strip them
7750
# from the output so that they don't get included in the library
7752
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'
7755
if test "$GXX" = yes; then
7756
if test $with_gnu_ld = no; then
7759
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7762
_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'
7765
_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'
7770
# FIXME: insert proper C++ library support
7771
_LT_TAGVAR(ld_shlibs, $1)=no
7778
_LT_TAGVAR(hardcode_direct, $1)=no
7779
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7780
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7781
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7782
# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7783
# Instead, shared libraries are loaded at an image base (0x10000000 by
7784
# default) and relocated if they conflict, which is a slow very memory
7785
# consuming and fragmenting process. To avoid this, we pick a random,
7786
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7787
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
7788
_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'
7789
_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'
7792
case $cc_basename in
7795
_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'
7797
# Archives containing C++ object files must be created using
7798
# "CC -ar", where "CC" is the IRIX C++ compiler. This is
7799
# necessary to make sure instantiated templates are included
7801
_LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
7804
if test "$GXX" = yes; then
7805
if test "$with_gnu_ld" = no; then
7806
_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'
7808
_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'
7811
_LT_TAGVAR(link_all_deplibs, $1)=yes
7814
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7815
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
7816
_LT_TAGVAR(inherit_rpath, $1)=yes
7819
linux* | k*bsd*-gnu)
7820
case $cc_basename in
7822
# Kuck and Associates, Inc. (KAI) C++ Compiler
7824
# KCC will only create a shared library if the output file
7825
# ends with ".so" (or ".sl" for HP-UX), so rename the library
7826
# to its proper name (with version) after linking.
7827
_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'
7828
_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'
7829
# Commands to make compiler produce verbose output that lists
7830
# what "hidden" libraries, object files and flags are used when
7831
# linking a shared library.
7833
# There doesn't appear to be a way to prevent this compiler from
7834
# explicitly linking system object files so we need to strip them
7835
# from the output so that they don't get included in the library
7837
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'
7839
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7840
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7842
# Archives containing C++ object files must be created using
7843
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
7844
_LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
7849
# version 8.0 and above of icpc choke on multiply defined symbols
7850
# if we add $predep_objects and $postdep_objects, however 7.1 and
7851
# earlier do not add the objects themselves.
7852
case `$CC -V 2>&1` in
7854
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7855
_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'
7857
*) # Version 8.0 or newer
7860
ia64*) tmp_idyn=' -i_dynamic';;
7862
_LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7863
_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'
7866
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7867
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7868
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7869
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7872
# Portland Group C++ compiler
7874
*pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
7875
_LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7877
$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7878
compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
7879
_LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7881
$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7882
$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
7884
_LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7886
$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7887
$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7888
_LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7890
$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7891
$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'
7893
*) # Version 6 will use weak symbols
7894
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7895
_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'
7899
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7900
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7901
_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'
7905
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7906
_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'
7908
runpath_var=LD_RUN_PATH
7909
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7910
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
7912
# Commands to make compiler produce verbose output that lists
7913
# what "hidden" libraries, object files and flags are used when
7914
# linking a shared library.
7916
# There doesn't appear to be a way to prevent this compiler from
7917
# explicitly linking system object files so we need to strip them
7918
# from the output so that they don't get included in the library
7920
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'
7923
# IBM XL 8.0 on PPC, with GNU ld
7924
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7925
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7926
_LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7927
if test "x$supports_anon_versioning" = xyes; then
7928
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7929
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7930
echo "local: *; };" >> $output_objdir/$libname.ver~
7931
$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7935
case `$CC -V 2>&1 | sed 5q` in
7938
_LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7939
_LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7940
_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'
7941
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7942
_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'
7943
_LT_TAGVAR(compiler_needs_object, $1)=yes
7945
# Not sure whether something based on
7946
# $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7948
output_verbose_link_cmd='echo'
7950
# Archives containing C++ object files must be created using
7951
# "CC -xar", where "CC" is the Sun C++ compiler. This is
7952
# necessary to make sure instantiated templates are included
7954
_LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7962
# FIXME: insert proper C++ library support
7963
_LT_TAGVAR(ld_shlibs, $1)=no
7967
# FIXME: insert proper C++ library support
7968
_LT_TAGVAR(ld_shlibs, $1)=no
7972
case $cc_basename in
7974
# FIXME: insert proper C++ library support
7975
_LT_TAGVAR(ld_shlibs, $1)=no
7978
# FIXME: insert proper C++ library support
7979
_LT_TAGVAR(ld_shlibs, $1)=no
7985
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7986
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7988
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7989
_LT_TAGVAR(hardcode_direct, $1)=yes
7990
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7992
# Workaround some broken pre-1.5 toolchains
7993
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7997
_LT_TAGVAR(ld_shlibs, $1)=yes
8001
# C++ shared libraries are fairly broken
8002
_LT_TAGVAR(ld_shlibs, $1)=no
8006
if test -f /usr/libexec/ld.so; then
8007
_LT_TAGVAR(hardcode_direct, $1)=yes
8008
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8009
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
8010
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
8011
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8012
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
8013
_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'
8014
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8015
_LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8017
output_verbose_link_cmd=echo
8019
_LT_TAGVAR(ld_shlibs, $1)=no
8023
osf3* | osf4* | osf5*)
8024
case $cc_basename in
8026
# Kuck and Associates, Inc. (KAI) C++ Compiler
8028
# KCC will only create a shared library if the output file
8029
# ends with ".so" (or ".sl" for HP-UX), so rename the library
8030
# to its proper name (with version) after linking.
8031
_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'
8033
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8034
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
8036
# Archives containing C++ object files must be created using
8037
# the KAI C++ compiler.
8039
osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
8040
*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
8044
# Rational C++ 2.4.1
8045
# FIXME: insert proper C++ library support
8046
_LT_TAGVAR(ld_shlibs, $1)=no
8051
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8052
_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'
8053
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8056
_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
8057
_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'
8058
_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
8059
echo "-hidden">> $lib.exp~
8060
$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~
8062
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8066
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
8068
# Commands to make compiler produce verbose output that lists
8069
# what "hidden" libraries, object files and flags are used when
8070
# linking a shared library.
8072
# There doesn't appear to be a way to prevent this compiler from
8073
# explicitly linking system object files so we need to strip them
8074
# from the output so that they don't get included in the library
8076
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'
8079
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8080
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8083
_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'
8086
_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'
8090
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8091
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
8093
# Commands to make compiler produce verbose output that lists
8094
# what "hidden" libraries, object files and flags are used when
8095
# linking a shared library.
8096
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
8099
# FIXME: insert proper C++ library support
8100
_LT_TAGVAR(ld_shlibs, $1)=no
8107
# FIXME: insert proper C++ library support
8108
_LT_TAGVAR(ld_shlibs, $1)=no
8112
case $cc_basename in
8115
# FIXME: insert proper C++ library support
8116
_LT_TAGVAR(ld_shlibs, $1)=no
8120
# FIXME: insert proper C++ library support
8121
_LT_TAGVAR(ld_shlibs, $1)=no
8124
# FIXME: insert proper C++ library support
8125
_LT_TAGVAR(ld_shlibs, $1)=no
8131
case $cc_basename in
8133
# Sun C++ 4.2, 5.x and Centerline C++
8134
_LT_TAGVAR(archive_cmds_need_lc,$1)=yes
8135
_LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
8136
_LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8137
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8138
$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'
8140
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8141
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8143
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
8145
# The compiler driver will combine and reorder linker options,
8146
# but understands `-z linker_flag'.
8147
# Supported since Solaris 2.6 (maybe 2.5.1?)
8148
_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
8151
_LT_TAGVAR(link_all_deplibs, $1)=yes
8153
output_verbose_link_cmd='echo'
8155
# Archives containing C++ object files must be created using
8156
# "CC -xar", where "CC" is the Sun C++ compiler. This is
8157
# necessary to make sure instantiated templates are included
8159
_LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
8162
# Green Hills C++ Compiler
8163
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8165
# The C++ compiler must be used to create the archive.
8166
_LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
8169
# GNU C++ compiler with Solaris linker
8170
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8171
_LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
8172
if $CC --version | $GREP -v '^2\.7' > /dev/null; then
8173
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8174
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8175
$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
8177
# Commands to make compiler produce verbose output that lists
8178
# what "hidden" libraries, object files and flags are used when
8179
# linking a shared library.
8180
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
8182
# g++ 2.7 appears to require `-G' NOT `-shared' on this
8184
_LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8185
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8186
$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
8188
# Commands to make compiler produce verbose output that lists
8189
# what "hidden" libraries, object files and flags are used when
8190
# linking a shared library.
8191
output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
8194
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
8196
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
8198
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
8206
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
8207
_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
8208
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8209
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8210
runpath_var='LD_RUN_PATH'
8212
case $cc_basename in
8214
_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8215
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8218
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8219
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8224
sysv5* | sco3.2v5* | sco5v6*)
8225
# Note: We can NOT use -z defs as we might desire, because we do not
8226
# link with -lc, and that would cause any symbols used from libc to
8227
# always be unresolved, which means just about no library would
8228
# ever link correctly. If we're not using GNU ld we use -z text
8229
# though, which does catch some bad symbols but isn't as heavy-handed
8231
_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
8232
_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
8233
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8234
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8235
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
8236
_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
8237
_LT_TAGVAR(link_all_deplibs, $1)=yes
8238
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
8239
runpath_var='LD_RUN_PATH'
8241
case $cc_basename in
8243
_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8244
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8247
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8248
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8254
case $cc_basename in
8256
# NonStop-UX NCC 3.20
8257
# FIXME: insert proper C++ library support
8258
_LT_TAGVAR(ld_shlibs, $1)=no
8261
# FIXME: insert proper C++ library support
8262
_LT_TAGVAR(ld_shlibs, $1)=no
8268
# FIXME: insert proper C++ library support
8269
_LT_TAGVAR(ld_shlibs, $1)=no
8273
# FIXME: insert proper C++ library support
8274
_LT_TAGVAR(ld_shlibs, $1)=no
8278
AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
8279
test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
8281
_LT_TAGVAR(GCC, $1)="$GXX"
8282
_LT_TAGVAR(LD, $1)="$LD"
8285
## There is no encapsulation within the following macros, do not change
8286
## the running order or otherwise move them around unless you know exactly
8287
## what you are doing...
8288
_LT_SYS_HIDDEN_LIBDEPS($1)
8289
_LT_COMPILER_PIC($1)
8290
_LT_COMPILER_C_O($1)
8291
_LT_COMPILER_FILE_LOCKS($1)
8292
_LT_LINKER_SHLIBS($1)
8293
_LT_SYS_DYNAMIC_LINKER($1)
8294
_LT_LINKER_HARDCODE_LIBPATH($1)
8297
fi # test -n "$compiler"
8303
with_gnu_ld=$lt_save_with_gnu_ld
8304
lt_cv_path_LDCXX=$lt_cv_path_LD
8305
lt_cv_path_LD=$lt_save_path_LD
8306
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
8307
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
8308
fi # test "$_lt_caught_CXX_error" != yes
8311
])# _LT_LANG_CXX_CONFIG
8314
# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
8315
# ---------------------------------
8316
# Figure out "hidden" library dependencies from verbose
8317
# compiler output when linking a shared library.
8318
# Parse the compiler output and extract the necessary
8319
# objects, libraries and library flags.
8320
m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
8321
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
8322
# Dependencies to place before and after the object being linked:
8323
_LT_TAGVAR(predep_objects, $1)=
8324
_LT_TAGVAR(postdep_objects, $1)=
8325
_LT_TAGVAR(predeps, $1)=
8326
_LT_TAGVAR(postdeps, $1)=
8327
_LT_TAGVAR(compiler_lib_search_path, $1)=
8329
dnl we can't use the lt_simple_compile_test_code here,
8330
dnl because it contains code intended for an executable,
8331
dnl not a library. It's possible we should let each
8332
dnl tag define a new lt_????_link_test_code variable,
8333
dnl but it's only used here...
8334
m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
8336
void foo (void) { a = 0; }
8338
], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
8342
Foo (void) { a = 0; }
8347
], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
8355
], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
8363
], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
8366
public void bar (void) {
8372
dnl Parse the compiler output and extract the necessary
8373
dnl objects, libraries and library flags.
8374
if AC_TRY_EVAL(ac_compile); then
8375
# Parse the compiler output and extract the necessary
8376
# objects, libraries and library flags.
8378
# Sentinel used to keep track of whether or not we are before
8379
# the conftest object file.
8380
pre_test_object_deps_done=no
8382
for p in `eval "$output_verbose_link_cmd"`; do
8386
# Some compilers place space between "-{L,R}" and the path.
8388
if test $p = "-L" ||
8389
test $p = "-R"; then
8396
if test "$pre_test_object_deps_done" = no; then
8399
# Internal compiler library paths should come after those
8400
# provided the user. The postdeps already come after the
8401
# user supplied libs so there is no need to process them.
8402
if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
8403
_LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
8405
_LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
8408
# The "-l" case would never come before the object being
8409
# linked, so don't bother handling this case.
8412
if test -z "$_LT_TAGVAR(postdeps, $1)"; then
8413
_LT_TAGVAR(postdeps, $1)="${prev}${p}"
8415
_LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
8421
# This assumes that the test object file only shows up
8422
# once in the compiler output.
8423
if test "$p" = "conftest.$objext"; then
8424
pre_test_object_deps_done=yes
8428
if test "$pre_test_object_deps_done" = no; then
8429
if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
8430
_LT_TAGVAR(predep_objects, $1)="$p"
8432
_LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
8435
if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
8436
_LT_TAGVAR(postdep_objects, $1)="$p"
8438
_LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
8443
*) ;; # Ignore the rest.
8451
echo "libtool.m4: error: problem compiling $1 test program"
8454
$RM -f confest.$objext
8456
# PORTME: override above test on systems where it is broken
8460
# Interix 3.5 installs completely hosed .la files for C++, so rather than
8461
# hack all around it, let's just trust "g++" to DTRT.
8462
_LT_TAGVAR(predep_objects,$1)=
8463
_LT_TAGVAR(postdep_objects,$1)=
8464
_LT_TAGVAR(postdeps,$1)=
8468
case `$CC -V 2>&1 | sed 5q` in
8472
# The more standards-conforming stlport4 library is
8473
# incompatible with the Cstd library. Avoid specifying
8474
# it if it's in CXXFLAGS. Ignore libCrun as
8475
# -library=stlport4 depends on it.
8476
case " $CXX $CXXFLAGS " in
8477
*" -library=stlport4 "*)
8478
solaris_use_stlport4=yes
8482
if test "$solaris_use_stlport4" != yes; then
8483
_LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8490
case $cc_basename in
8492
# The more standards-conforming stlport4 library is
8493
# incompatible with the Cstd library. Avoid specifying
8494
# it if it's in CXXFLAGS. Ignore libCrun as
8495
# -library=stlport4 depends on it.
8496
case " $CXX $CXXFLAGS " in
8497
*" -library=stlport4 "*)
8498
solaris_use_stlport4=yes
8502
# Adding this requires a known-good setup of shared libraries for
8503
# Sun compiler versions before 5.6, else PIC objects from an old
8504
# archive will be linked into the output, leading to subtle bugs.
8505
if test "$solaris_use_stlport4" != yes; then
8506
_LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8514
case " $_LT_TAGVAR(postdeps, $1) " in
8515
*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
8517
_LT_TAGVAR(compiler_lib_search_dirs, $1)=
8518
if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
8519
_LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
8521
_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
8522
[The directories searched by this compiler when creating a shared library])
8523
_LT_TAGDECL([], [predep_objects], [1],
8524
[Dependencies to place before and after the objects being linked to
8525
create a shared library])
8526
_LT_TAGDECL([], [postdep_objects], [1])
8527
_LT_TAGDECL([], [predeps], [1])
8528
_LT_TAGDECL([], [postdeps], [1])
8529
_LT_TAGDECL([], [compiler_lib_search_path], [1],
8530
[The library search path used internally by the compiler when linking
8532
])# _LT_SYS_HIDDEN_LIBDEPS
8537
# Since AC_PROG_F77 is broken, in that it returns the empty string
8538
# if there is no fortran compiler, we have our own version here.
8539
m4_defun([_LT_PROG_F77],
8541
pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
8543
if test -z "$F77" || test "X$F77" = "Xno"; then
8546
popdef([AC_MSG_ERROR])
8549
dnl aclocal-1.4 backwards compatibility:
8550
dnl AC_DEFUN([_LT_PROG_F77], [])
8553
# _LT_LANG_F77_CONFIG([TAG])
8554
# --------------------------
8555
# Ensure that the configuration variables for a Fortran 77 compiler are
8556
# suitably defined. These variables are subsequently used by _LT_CONFIG
8557
# to write the compiler configuration to `libtool'.
8558
m4_defun([_LT_LANG_F77_CONFIG],
8559
[AC_REQUIRE([_LT_PROG_F77])dnl
8560
AC_LANG_PUSH(Fortran 77)
8562
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8563
_LT_TAGVAR(allow_undefined_flag, $1)=
8564
_LT_TAGVAR(always_export_symbols, $1)=no
8565
_LT_TAGVAR(archive_expsym_cmds, $1)=
8566
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
8567
_LT_TAGVAR(hardcode_direct, $1)=no
8568
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
8569
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8570
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8571
_LT_TAGVAR(hardcode_libdir_separator, $1)=
8572
_LT_TAGVAR(hardcode_minus_L, $1)=no
8573
_LT_TAGVAR(hardcode_automatic, $1)=no
8574
_LT_TAGVAR(inherit_rpath, $1)=no
8575
_LT_TAGVAR(module_cmds, $1)=
8576
_LT_TAGVAR(module_expsym_cmds, $1)=
8577
_LT_TAGVAR(link_all_deplibs, $1)=unknown
8578
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8579
_LT_TAGVAR(no_undefined_flag, $1)=
8580
_LT_TAGVAR(whole_archive_flag_spec, $1)=
8581
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8583
# Source file extension for f77 test sources.
8586
# Object file extension for compiled f77 test sources.
8588
_LT_TAGVAR(objext, $1)=$objext
8590
# No sense in running all these tests if we already determined that
8591
# the F77 compiler isn't working. Some variables (like enable_shared)
8592
# are currently assumed to apply to all compilers on this platform,
8593
# and will be corrupted by setting them based on a non-working compiler.
8594
if test "$_lt_disable_F77" != yes; then
8595
# Code to be used in simple compile tests
8596
lt_simple_compile_test_code="\
8602
# Code to be used in simple link tests
8603
lt_simple_link_test_code="\
8608
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8611
# save warnings/boilerplate of simple test code
8612
_LT_COMPILER_BOILERPLATE
8613
_LT_LINKER_BOILERPLATE
8615
# Allow CC to be a program name with arguments.
8620
_LT_TAGVAR(compiler, $1)=$CC
8621
_LT_CC_BASENAME([$compiler])
8623
if test -n "$compiler"; then
8624
AC_MSG_CHECKING([if libtool supports shared libraries])
8625
AC_MSG_RESULT([$can_build_shared])
8627
AC_MSG_CHECKING([whether to build shared libraries])
8628
test "$can_build_shared" = "no" && enable_shared=no
8630
# On AIX, shared libraries and static libraries use the same namespace, and
8631
# are all built from PIC.
8634
test "$enable_shared" = yes && enable_static=no
8635
if test -n "$RANLIB"; then
8636
archive_cmds="$archive_cmds~\$RANLIB \$lib"
8637
postinstall_cmds='$RANLIB $lib'
8641
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8642
test "$enable_shared" = yes && enable_static=no
8646
AC_MSG_RESULT([$enable_shared])
8648
AC_MSG_CHECKING([whether to build static libraries])
8649
# Make sure either enable_shared or enable_static is yes.
8650
test "$enable_shared" = yes || enable_static=yes
8651
AC_MSG_RESULT([$enable_static])
8653
_LT_TAGVAR(GCC, $1)="$G77"
8654
_LT_TAGVAR(LD, $1)="$LD"
8657
## There is no encapsulation within the following macros, do not change
8658
## the running order or otherwise move them around unless you know exactly
8659
## what you are doing...
8660
_LT_COMPILER_PIC($1)
8661
_LT_COMPILER_C_O($1)
8662
_LT_COMPILER_FILE_LOCKS($1)
8663
_LT_LINKER_SHLIBS($1)
8664
_LT_SYS_DYNAMIC_LINKER($1)
8665
_LT_LINKER_HARDCODE_LIBPATH($1)
8668
fi # test -n "$compiler"
8672
fi # test "$_lt_disable_F77" != yes
8675
])# _LT_LANG_F77_CONFIG
8680
# Since AC_PROG_FC is broken, in that it returns the empty string
8681
# if there is no fortran compiler, we have our own version here.
8682
m4_defun([_LT_PROG_FC],
8684
pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
8686
if test -z "$FC" || test "X$FC" = "Xno"; then
8689
popdef([AC_MSG_ERROR])
8692
dnl aclocal-1.4 backwards compatibility:
8693
dnl AC_DEFUN([_LT_PROG_FC], [])
8696
# _LT_LANG_FC_CONFIG([TAG])
8697
# -------------------------
8698
# Ensure that the configuration variables for a Fortran compiler are
8699
# suitably defined. These variables are subsequently used by _LT_CONFIG
8700
# to write the compiler configuration to `libtool'.
8701
m4_defun([_LT_LANG_FC_CONFIG],
8702
[AC_REQUIRE([_LT_PROG_FC])dnl
8703
AC_LANG_PUSH(Fortran)
8705
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8706
_LT_TAGVAR(allow_undefined_flag, $1)=
8707
_LT_TAGVAR(always_export_symbols, $1)=no
8708
_LT_TAGVAR(archive_expsym_cmds, $1)=
8709
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
8710
_LT_TAGVAR(hardcode_direct, $1)=no
8711
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
8712
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8713
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8714
_LT_TAGVAR(hardcode_libdir_separator, $1)=
8715
_LT_TAGVAR(hardcode_minus_L, $1)=no
8716
_LT_TAGVAR(hardcode_automatic, $1)=no
8717
_LT_TAGVAR(inherit_rpath, $1)=no
8718
_LT_TAGVAR(module_cmds, $1)=
8719
_LT_TAGVAR(module_expsym_cmds, $1)=
8720
_LT_TAGVAR(link_all_deplibs, $1)=unknown
8721
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8722
_LT_TAGVAR(no_undefined_flag, $1)=
8723
_LT_TAGVAR(whole_archive_flag_spec, $1)=
8724
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8726
# Source file extension for fc test sources.
8727
ac_ext=${ac_fc_srcext-f}
8729
# Object file extension for compiled fc test sources.
8731
_LT_TAGVAR(objext, $1)=$objext
8733
# No sense in running all these tests if we already determined that
8734
# the FC compiler isn't working. Some variables (like enable_shared)
8735
# are currently assumed to apply to all compilers on this platform,
8736
# and will be corrupted by setting them based on a non-working compiler.
8737
if test "$_lt_disable_FC" != yes; then
8738
# Code to be used in simple compile tests
8739
lt_simple_compile_test_code="\
8745
# Code to be used in simple link tests
8746
lt_simple_link_test_code="\
8751
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8754
# save warnings/boilerplate of simple test code
8755
_LT_COMPILER_BOILERPLATE
8756
_LT_LINKER_BOILERPLATE
8758
# Allow CC to be a program name with arguments.
8763
GCC=$ac_cv_fc_compiler_gnu
8765
_LT_TAGVAR(compiler, $1)=$CC
8766
_LT_CC_BASENAME([$compiler])
8768
if test -n "$compiler"; then
8769
AC_MSG_CHECKING([if libtool supports shared libraries])
8770
AC_MSG_RESULT([$can_build_shared])
8772
AC_MSG_CHECKING([whether to build shared libraries])
8773
test "$can_build_shared" = "no" && enable_shared=no
8775
# On AIX, shared libraries and static libraries use the same namespace, and
8776
# are all built from PIC.
8779
test "$enable_shared" = yes && enable_static=no
8780
if test -n "$RANLIB"; then
8781
archive_cmds="$archive_cmds~\$RANLIB \$lib"
8782
postinstall_cmds='$RANLIB $lib'
8786
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8787
test "$enable_shared" = yes && enable_static=no
8791
AC_MSG_RESULT([$enable_shared])
8793
AC_MSG_CHECKING([whether to build static libraries])
8794
# Make sure either enable_shared or enable_static is yes.
8795
test "$enable_shared" = yes || enable_static=yes
8796
AC_MSG_RESULT([$enable_static])
8798
_LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
8799
_LT_TAGVAR(LD, $1)="$LD"
8802
## There is no encapsulation within the following macros, do not change
8803
## the running order or otherwise move them around unless you know exactly
8804
## what you are doing...
8805
_LT_SYS_HIDDEN_LIBDEPS($1)
8806
_LT_COMPILER_PIC($1)
8807
_LT_COMPILER_C_O($1)
8808
_LT_COMPILER_FILE_LOCKS($1)
8809
_LT_LINKER_SHLIBS($1)
8810
_LT_SYS_DYNAMIC_LINKER($1)
8811
_LT_LINKER_HARDCODE_LIBPATH($1)
8814
fi # test -n "$compiler"
8818
fi # test "$_lt_disable_FC" != yes
8821
])# _LT_LANG_FC_CONFIG
8824
# _LT_LANG_GCJ_CONFIG([TAG])
8825
# --------------------------
8826
# Ensure that the configuration variables for the GNU Java Compiler compiler
8827
# are suitably defined. These variables are subsequently used by _LT_CONFIG
8828
# to write the compiler configuration to `libtool'.
8829
m4_defun([_LT_LANG_GCJ_CONFIG],
8830
[AC_REQUIRE([LT_PROG_GCJ])dnl
8833
# Source file extension for Java test sources.
8836
# Object file extension for compiled Java test sources.
8838
_LT_TAGVAR(objext, $1)=$objext
8840
# Code to be used in simple compile tests
8841
lt_simple_compile_test_code="class foo {}"
8843
# Code to be used in simple link tests
8844
lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
8846
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8849
# save warnings/boilerplate of simple test code
8850
_LT_COMPILER_BOILERPLATE
8851
_LT_LINKER_BOILERPLATE
8853
# Allow CC to be a program name with arguments.
8859
_LT_TAGVAR(compiler, $1)=$CC
8860
_LT_TAGVAR(LD, $1)="$LD"
8861
_LT_CC_BASENAME([$compiler])
8863
# GCJ did not exist at the time GCC didn't implicitly link libc in.
8864
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8866
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8868
if test -n "$compiler"; then
8869
_LT_COMPILER_NO_RTTI($1)
8870
_LT_COMPILER_PIC($1)
8871
_LT_COMPILER_C_O($1)
8872
_LT_COMPILER_FILE_LOCKS($1)
8873
_LT_LINKER_SHLIBS($1)
8874
_LT_LINKER_HARDCODE_LIBPATH($1)
8883
])# _LT_LANG_GCJ_CONFIG
8886
# _LT_LANG_RC_CONFIG([TAG])
8887
# -------------------------
8888
# Ensure that the configuration variables for the Windows resource compiler
8889
# are suitably defined. These variables are subsequently used by _LT_CONFIG
8890
# to write the compiler configuration to `libtool'.
8891
m4_defun([_LT_LANG_RC_CONFIG],
8892
[AC_REQUIRE([LT_PROG_RC])dnl
8895
# Source file extension for RC test sources.
8898
# Object file extension for compiled RC test sources.
8900
_LT_TAGVAR(objext, $1)=$objext
8902
# Code to be used in simple compile tests
8903
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8905
# Code to be used in simple link tests
8906
lt_simple_link_test_code="$lt_simple_compile_test_code"
8908
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8911
# save warnings/boilerplate of simple test code
8912
_LT_COMPILER_BOILERPLATE
8913
_LT_LINKER_BOILERPLATE
8915
# Allow CC to be a program name with arguments.
8921
_LT_TAGVAR(compiler, $1)=$CC
8922
_LT_CC_BASENAME([$compiler])
8923
_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8925
if test -n "$compiler"; then
8933
])# _LT_LANG_RC_CONFIG
8938
AC_DEFUN([LT_PROG_GCJ],
8939
[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8940
[m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8941
[AC_CHECK_TOOL(GCJ, gcj,)
8942
test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
8943
AC_SUBST(GCJFLAGS)])])[]dnl
8947
AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8948
dnl aclocal-1.4 backwards compatibility:
8949
dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8954
AC_DEFUN([LT_PROG_RC],
8955
[AC_CHECK_TOOL(RC, windres,)
8959
AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8960
dnl aclocal-1.4 backwards compatibility:
8961
dnl AC_DEFUN([LT_AC_PROG_RC], [])
8966
# If we don't have a new enough Autoconf to choose the best grep
8967
# available, choose the one first in the user's PATH.
8968
m4_defun([_LT_DECL_EGREP],
8969
[AC_REQUIRE([AC_PROG_EGREP])dnl
8970
AC_REQUIRE([AC_PROG_FGREP])dnl
8971
test -z "$GREP" && GREP=grep
8972
_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8973
_LT_DECL([], [EGREP], [1], [An ERE matcher])
8974
_LT_DECL([], [FGREP], [1], [A literal string matcher])
8975
dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8982
# If we don't have a new enough Autoconf to choose the best objdump
8983
# available, choose the one first in the user's PATH.
8984
m4_defun([_LT_DECL_OBJDUMP],
8985
[AC_CHECK_TOOL(OBJDUMP, objdump, false)
8986
test -z "$OBJDUMP" && OBJDUMP=objdump
8987
_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8994
# Check for a fully-functional sed program, that truncates
8995
# as few characters as possible. Prefer GNU sed if found.
8996
m4_defun([_LT_DECL_SED],
8998
test -z "$SED" && SED=sed
8999
Xsed="$SED -e 1s/^X//"
9000
_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
9001
_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
9002
[Sed that helps us avoid accidentally triggering echo(1) options like -n])
9005
m4_ifndef([AC_PROG_SED], [
9006
# NOTE: This macro has been submitted for inclusion into #
9007
# GNU Autoconf as AC_PROG_SED. When it is available in #
9008
# a released version of Autoconf we should remove this #
9009
# macro and use it instead. #
9011
m4_defun([AC_PROG_SED],
9012
[AC_MSG_CHECKING([for a sed that does not truncate output])
9013
AC_CACHE_VAL(lt_cv_path_SED,
9014
[# Loop through the user's path and test for sed and gsed.
9015
# Then use that list of sed's as ones to test for truncation.
9016
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9020
test -z "$as_dir" && as_dir=.
9021
for lt_ac_prog in sed gsed; do
9022
for ac_exec_ext in '' $ac_executable_extensions; do
9023
if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
9024
lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
9032
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
9033
# along with /bin/sed that truncates output.
9034
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
9035
test ! -f $lt_ac_sed && continue
9036
cat /dev/null > conftest.in
9038
echo $ECHO_N "0123456789$ECHO_C" >conftest.in
9039
# Check for GNU sed and select it if it is found.
9040
if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
9041
lt_cv_path_SED=$lt_ac_sed
9045
cat conftest.in conftest.in >conftest.tmp
9046
mv conftest.tmp conftest.in
9047
cp conftest.in conftest.nl
9049
$lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
9050
cmp -s conftest.out conftest.nl || break
9051
# 10000 chars as input seems more than enough
9052
test $lt_ac_count -gt 10 && break
9053
lt_ac_count=`expr $lt_ac_count + 1`
9054
if test $lt_ac_count -gt $lt_ac_max; then
9055
lt_ac_max=$lt_ac_count
9056
lt_cv_path_SED=$lt_ac_sed
9063
AC_MSG_RESULT([$SED])
9068
AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
9069
dnl aclocal-1.4 backwards compatibility:
9070
dnl AC_DEFUN([LT_AC_PROG_SED], [])
9073
# _LT_CHECK_SHELL_FEATURES
9074
# ------------------------
9075
# Find out whether the shell is Bourne or XSI compatible,
9076
# or has some other useful features.
9077
m4_defun([_LT_CHECK_SHELL_FEATURES],
9078
[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
9079
# Try some XSI features
9082
test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
9084
&& eval 'test $(( 1 + 1 )) -eq 2 \
9085
&& test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
9087
AC_MSG_RESULT([$xsi_shell])
9088
_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
9090
AC_MSG_CHECKING([whether the shell understands "+="])
9092
( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
9094
&& lt_shell_append=yes
9095
AC_MSG_RESULT([$lt_shell_append])
9096
_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
9098
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
9103
_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
9105
# test EBCDIC or ASCII
9106
case `echo X|tr X '\101'` in
9107
A) # ASCII based system
9108
# \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
9109
lt_SP2NL='tr \040 \012'
9110
lt_NL2SP='tr \015\012 \040\040'
9112
*) # EBCDIC based system
9113
lt_SP2NL='tr \100 \n'
9114
lt_NL2SP='tr \r\n \100\100'
9117
_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
9118
_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
9119
])# _LT_CHECK_SHELL_FEATURES
9122
# _LT_PROG_XSI_SHELLFNS
9123
# ---------------------
9124
# Bourne and XSI compatible variants of some useful shell functions.
9125
m4_defun([_LT_PROG_XSI_SHELLFNS],
9128
cat << \_LT_EOF >> "$cfgfile"
9130
# func_dirname file append nondir_replacement
9131
# Compute the dirname of FILE. If nonempty, add APPEND to the result,
9132
# otherwise set result to NONDIR_REPLACEMENT.
9136
*/*) func_dirname_result="${1%/*}${2}" ;;
9137
* ) func_dirname_result="${3}" ;;
9141
# func_basename file
9144
func_basename_result="${1##*/}"
9147
# func_dirname_and_basename file append nondir_replacement
9148
# perform func_basename and func_dirname in a single function
9150
# dirname: Compute the dirname of FILE. If nonempty,
9151
# add APPEND to the result, otherwise set result
9152
# to NONDIR_REPLACEMENT.
9153
# value returned in "$func_dirname_result"
9154
# basename: Compute filename of FILE.
9155
# value retuned in "$func_basename_result"
9156
# Implementation must be kept synchronized with func_dirname
9157
# and func_basename. For efficiency, we do not delegate to
9158
# those functions but instead duplicate the functionality here.
9159
func_dirname_and_basename ()
9162
*/*) func_dirname_result="${1%/*}${2}" ;;
9163
* ) func_dirname_result="${3}" ;;
9165
func_basename_result="${1##*/}"
9168
# func_stripname prefix suffix name
9169
# strip PREFIX and SUFFIX off of NAME.
9170
# PREFIX and SUFFIX must not contain globbing or regex special
9171
# characters, hashes, percent signs, but SUFFIX may contain a leading
9172
# dot (in which case that matches only a dot).
9175
# pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
9176
# positional parameters, so assign one to ordinary parameter first.
9177
func_stripname_result=${3}
9178
func_stripname_result=${func_stripname_result#"${1}"}
9179
func_stripname_result=${func_stripname_result%"${2}"}
9185
func_opt_split_opt=${1%%=*}
9186
func_opt_split_arg=${1#*=}
9193
*.lo) func_lo2o_result=${1%.lo}.${objext} ;;
9194
*) func_lo2o_result=${1} ;;
9198
# func_xform libobj-or-source
9201
func_xform_result=${1%.*}.lo
9204
# func_arith arithmetic-term...
9207
func_arith_result=$(( $[*] ))
9211
# STRING may not start with a hyphen.
9214
func_len_result=${#1}
9219
*) # Bourne compatible functions.
9220
cat << \_LT_EOF >> "$cfgfile"
9222
# func_dirname file append nondir_replacement
9223
# Compute the dirname of FILE. If nonempty, add APPEND to the result,
9224
# otherwise set result to NONDIR_REPLACEMENT.
9227
# Extract subdirectory from the argument.
9228
func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
9229
if test "X$func_dirname_result" = "X${1}"; then
9230
func_dirname_result="${3}"
9232
func_dirname_result="$func_dirname_result${2}"
9236
# func_basename file
9239
func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
9242
dnl func_dirname_and_basename
9243
dnl A portable version of this function is already defined in general.m4sh
9244
dnl so there is no need for it here.
9246
# func_stripname prefix suffix name
9247
# strip PREFIX and SUFFIX off of NAME.
9248
# PREFIX and SUFFIX must not contain globbing or regex special
9249
# characters, hashes, percent signs, but SUFFIX may contain a leading
9250
# dot (in which case that matches only a dot).
9251
# func_strip_suffix prefix name
9255
.*) func_stripname_result=`$ECHO "X${3}" \
9256
| $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
9257
*) func_stripname_result=`$ECHO "X${3}" \
9258
| $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
9263
my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
9264
my_sed_long_arg='1s/^-[[^=]]*=//'
9269
func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
9270
func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
9276
func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
9279
# func_xform libobj-or-source
9282
func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
9285
# func_arith arithmetic-term...
9288
func_arith_result=`expr "$[@]"`
9292
# STRING may not start with a hyphen.
9295
func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
9301
case $lt_shell_append in
9303
cat << \_LT_EOF >> "$cfgfile"
9305
# func_append var value
9306
# Append VALUE to the end of shell variable VAR.
9314
cat << \_LT_EOF >> "$cfgfile"
9316
# func_append var value
9317
# Append VALUE to the end of shell variable VAR.
9320
eval "$[1]=\$$[1]\$[2]"
9328
# Helper functions for option handling. -*- Autoconf -*-
9330
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9331
# Written by Gary V. Vaughan, 2004
9333
# This file is free software; the Free Software Foundation gives
9334
# unlimited permission to copy and/or distribute it, with or without
9335
# modifications, as long as this notice is preserved.
9337
# serial 6 ltoptions.m4
9339
# This is to help aclocal find these macros, as it can't see m4_define.
9340
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
9343
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
9344
# ------------------------------------------
9345
m4_define([_LT_MANGLE_OPTION],
9346
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
9349
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
9350
# ---------------------------------------
9351
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
9352
# matching handler defined, dispatch to it. Other OPTION-NAMEs are
9354
m4_define([_LT_SET_OPTION],
9355
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
9356
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
9357
_LT_MANGLE_DEFUN([$1], [$2]),
9358
[m4_warning([Unknown $1 option `$2'])])[]dnl
9362
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
9363
# ------------------------------------------------------------
9364
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9365
m4_define([_LT_IF_OPTION],
9366
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
9369
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
9370
# -------------------------------------------------------
9371
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
9373
m4_define([_LT_UNLESS_OPTIONS],
9374
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9375
[m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
9376
[m4_define([$0_found])])])[]dnl
9377
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
9382
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
9383
# ----------------------------------------
9384
# OPTION-LIST is a space-separated list of Libtool options associated
9385
# with MACRO-NAME. If any OPTION has a matching handler declared with
9386
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
9387
# the unknown option and exit.
9388
m4_defun([_LT_SET_OPTIONS],
9390
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9391
[_LT_SET_OPTION([$1], _LT_Option)])
9393
m4_if([$1],[LT_INIT],[
9395
dnl Simply set some default values (i.e off) if boolean options were not
9397
_LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
9399
_LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
9402
dnl If no reference was made to various pairs of opposing options, then
9403
dnl we run the default mode handler for the pair. For example, if neither
9404
dnl `shared' nor `disable-shared' was passed, we enable building of shared
9405
dnl archives by default:
9406
_LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
9407
_LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
9408
_LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
9409
_LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
9410
[_LT_ENABLE_FAST_INSTALL])
9416
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
9417
# -----------------------------------------
9418
m4_define([_LT_MANGLE_DEFUN],
9419
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
9422
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
9423
# -----------------------------------------------
9424
m4_define([LT_OPTION_DEFINE],
9425
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
9426
])# LT_OPTION_DEFINE
9431
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
9434
AU_DEFUN([AC_LIBTOOL_DLOPEN],
9435
[_LT_SET_OPTION([LT_INIT], [dlopen])
9436
AC_DIAGNOSE([obsolete],
9437
[$0: Remove this warning and the call to _LT_SET_OPTION when you
9438
put the `dlopen' option into LT_INIT's first parameter.])
9441
dnl aclocal-1.4 backwards compatibility:
9442
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
9447
# Declare package support for building win32 dll's.
9448
LT_OPTION_DEFINE([LT_INIT], [win32-dll],
9449
[enable_win32_dll=yes
9452
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
9453
AC_CHECK_TOOL(AS, as, false)
9454
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
9455
AC_CHECK_TOOL(OBJDUMP, objdump, false)
9459
test -z "$AS" && AS=as
9460
_LT_DECL([], [AS], [0], [Assembler program])dnl
9462
test -z "$DLLTOOL" && DLLTOOL=dlltool
9463
_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
9465
test -z "$OBJDUMP" && OBJDUMP=objdump
9466
_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
9469
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
9470
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
9471
_LT_SET_OPTION([LT_INIT], [win32-dll])
9472
AC_DIAGNOSE([obsolete],
9473
[$0: Remove this warning and the call to _LT_SET_OPTION when you
9474
put the `win32-dll' option into LT_INIT's first parameter.])
9477
dnl aclocal-1.4 backwards compatibility:
9478
dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
9481
# _LT_ENABLE_SHARED([DEFAULT])
9482
# ----------------------------
9483
# implement the --enable-shared flag, and supports the `shared' and
9484
# `disable-shared' LT_INIT options.
9485
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
9486
m4_define([_LT_ENABLE_SHARED],
9487
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
9488
AC_ARG_ENABLE([shared],
9489
[AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
9490
[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
9491
[p=${PACKAGE-default}
9493
yes) enable_shared=yes ;;
9494
no) enable_shared=no ;;
9497
# Look at the argument we got. We use all the common list separators.
9498
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9499
for pkg in $enableval; do
9501
if test "X$pkg" = "X$p"; then
9508
[enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
9510
_LT_DECL([build_libtool_libs], [enable_shared], [0],
9511
[Whether or not to build shared libraries])
9512
])# _LT_ENABLE_SHARED
9514
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
9515
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
9518
AC_DEFUN([AC_ENABLE_SHARED],
9519
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
9522
AC_DEFUN([AC_DISABLE_SHARED],
9523
[_LT_SET_OPTION([LT_INIT], [disable-shared])
9526
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9527
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9529
dnl aclocal-1.4 backwards compatibility:
9530
dnl AC_DEFUN([AM_ENABLE_SHARED], [])
9531
dnl AC_DEFUN([AM_DISABLE_SHARED], [])
9535
# _LT_ENABLE_STATIC([DEFAULT])
9536
# ----------------------------
9537
# implement the --enable-static flag, and support the `static' and
9538
# `disable-static' LT_INIT options.
9539
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
9540
m4_define([_LT_ENABLE_STATIC],
9541
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
9542
AC_ARG_ENABLE([static],
9543
[AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
9544
[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
9545
[p=${PACKAGE-default}
9547
yes) enable_static=yes ;;
9548
no) enable_static=no ;;
9551
# Look at the argument we got. We use all the common list separators.
9552
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9553
for pkg in $enableval; do
9555
if test "X$pkg" = "X$p"; then
9562
[enable_static=]_LT_ENABLE_STATIC_DEFAULT)
9564
_LT_DECL([build_old_libs], [enable_static], [0],
9565
[Whether or not to build static libraries])
9566
])# _LT_ENABLE_STATIC
9568
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
9569
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
9572
AC_DEFUN([AC_ENABLE_STATIC],
9573
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
9576
AC_DEFUN([AC_DISABLE_STATIC],
9577
[_LT_SET_OPTION([LT_INIT], [disable-static])
9580
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
9581
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
9583
dnl aclocal-1.4 backwards compatibility:
9584
dnl AC_DEFUN([AM_ENABLE_STATIC], [])
9585
dnl AC_DEFUN([AM_DISABLE_STATIC], [])
9589
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
9590
# ----------------------------------
9591
# implement the --enable-fast-install flag, and support the `fast-install'
9592
# and `disable-fast-install' LT_INIT options.
9593
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
9594
m4_define([_LT_ENABLE_FAST_INSTALL],
9595
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
9596
AC_ARG_ENABLE([fast-install],
9597
[AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
9598
[optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
9599
[p=${PACKAGE-default}
9601
yes) enable_fast_install=yes ;;
9602
no) enable_fast_install=no ;;
9604
enable_fast_install=no
9605
# Look at the argument we got. We use all the common list separators.
9606
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9607
for pkg in $enableval; do
9609
if test "X$pkg" = "X$p"; then
9610
enable_fast_install=yes
9616
[enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
9618
_LT_DECL([fast_install], [enable_fast_install], [0],
9619
[Whether or not to optimize for fast installation])dnl
9620
])# _LT_ENABLE_FAST_INSTALL
9622
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
9623
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
9626
AU_DEFUN([AC_ENABLE_FAST_INSTALL],
9627
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
9628
AC_DIAGNOSE([obsolete],
9629
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
9630
the `fast-install' option into LT_INIT's first parameter.])
9633
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
9634
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
9635
AC_DIAGNOSE([obsolete],
9636
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
9637
the `disable-fast-install' option into LT_INIT's first parameter.])
9640
dnl aclocal-1.4 backwards compatibility:
9641
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
9642
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
9645
# _LT_WITH_PIC([MODE])
9646
# --------------------
9647
# implement the --with-pic flag, and support the `pic-only' and `no-pic'
9649
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
9650
m4_define([_LT_WITH_PIC],
9652
[AS_HELP_STRING([--with-pic],
9653
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
9654
[pic_mode="$withval"],
9657
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
9659
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
9662
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
9663
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
9666
AU_DEFUN([AC_LIBTOOL_PICMODE],
9667
[_LT_SET_OPTION([LT_INIT], [pic-only])
9668
AC_DIAGNOSE([obsolete],
9669
[$0: Remove this warning and the call to _LT_SET_OPTION when you
9670
put the `pic-only' option into LT_INIT's first parameter.])
9673
dnl aclocal-1.4 backwards compatibility:
9674
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
9677
m4_define([_LTDL_MODE], [])
9678
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
9679
[m4_define([_LTDL_MODE], [nonrecursive])])
9680
LT_OPTION_DEFINE([LTDL_INIT], [recursive],
9681
[m4_define([_LTDL_MODE], [recursive])])
9682
LT_OPTION_DEFINE([LTDL_INIT], [subproject],
9683
[m4_define([_LTDL_MODE], [subproject])])
9685
m4_define([_LTDL_TYPE], [])
9686
LT_OPTION_DEFINE([LTDL_INIT], [installable],
9687
[m4_define([_LTDL_TYPE], [installable])])
9688
LT_OPTION_DEFINE([LTDL_INIT], [convenience],
9689
[m4_define([_LTDL_TYPE], [convenience])])
9691
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
9693
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9694
# Written by Gary V. Vaughan, 2004
9696
# This file is free software; the Free Software Foundation gives
9697
# unlimited permission to copy and/or distribute it, with or without
9698
# modifications, as long as this notice is preserved.
9700
# serial 6 ltsugar.m4
9702
# This is to help aclocal find these macros, as it can't see m4_define.
9703
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
9706
# lt_join(SEP, ARG1, [ARG2...])
9707
# -----------------------------
9708
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
9709
# associated separator.
9710
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
9711
# versions in m4sugar had bugs.
9712
m4_define([lt_join],
9713
[m4_if([$#], [1], [],
9715
[m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
9716
m4_define([_lt_join],
9717
[m4_if([$#$2], [2], [],
9718
[m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
9724
# Manipulate m4 lists.
9725
# These macros are necessary as long as will still need to support
9726
# Autoconf-2.59 which quotes differently.
9727
m4_define([lt_car], [[$1]])
9729
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
9731
[m4_dquote(m4_shift($@))])])
9732
m4_define([lt_unquote], $1)
9735
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
9736
# ------------------------------------------
9737
# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
9738
# Note that neither SEPARATOR nor STRING are expanded; they are appended
9739
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
9740
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
9741
# than defined and empty).
9743
# This macro is needed until we can rely on Autoconf 2.62, since earlier
9744
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
9745
m4_define([lt_append],
9747
m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9751
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
9752
# ----------------------------------------------------------
9753
# Produce a SEP delimited list of all paired combinations of elements of
9754
# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
9755
# has the form PREFIXmINFIXSUFFIXn.
9756
# Needed until we can rely on m4_combine added in Autoconf 2.62.
9757
m4_define([lt_combine],
9758
[m4_if(m4_eval([$# > 3]), [1],
9759
[m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
9760
[[m4_foreach([_Lt_prefix], [$2],
9761
[m4_foreach([_Lt_suffix],
9762
]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
9763
[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
9766
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
9767
# -----------------------------------------------------------------------
9768
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
9769
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
9770
m4_define([lt_if_append_uniq],
9772
[m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
9773
[lt_append([$1], [$2], [$3])$4],
9775
[lt_append([$1], [$2], [$3])$4])])
9778
# lt_dict_add(DICT, KEY, VALUE)
9779
# -----------------------------
9780
m4_define([lt_dict_add],
9781
[m4_define([$1($2)], [$3])])
9784
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
9785
# --------------------------------------------
9786
m4_define([lt_dict_add_subkey],
9787
[m4_define([$1($2:$3)], [$4])])
9790
# lt_dict_fetch(DICT, KEY, [SUBKEY])
9791
# ----------------------------------
9792
m4_define([lt_dict_fetch],
9794
m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
9795
m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9798
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
9799
# -----------------------------------------------------------------
9800
m4_define([lt_if_dict_fetch],
9801
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
9806
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
9807
# --------------------------------------------------------------
9808
m4_define([lt_dict_filter],
9809
[m4_if([$5], [], [],
9810
[lt_join(m4_quote(m4_default([$4], [[, ]])),
9811
lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
9812
[lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
9815
# ltversion.m4 -- version numbers -*- Autoconf -*-
9817
# Copyright (C) 2004 Free Software Foundation, Inc.
9818
# Written by Scott James Remnant, 2004
9820
# This file is free software; the Free Software Foundation gives
9821
# unlimited permission to copy and/or distribute it, with or without
9822
# modifications, as long as this notice is preserved.
9824
# Generated from ltversion.in.
9826
# serial 3017 ltversion.m4
9827
# This file is part of GNU Libtool
9829
m4_define([LT_PACKAGE_VERSION], [2.2.6b])
9830
m4_define([LT_PACKAGE_REVISION], [1.3017])
9832
AC_DEFUN([LTVERSION_VERSION],
9833
[macro_version='2.2.6b'
9834
macro_revision='1.3017'
9835
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
9836
_LT_DECL(, macro_revision, 0)
9839
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
9841
# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
9842
# Written by Scott James Remnant, 2004.
9844
# This file is free software; the Free Software Foundation gives
9845
# unlimited permission to copy and/or distribute it, with or without
9846
# modifications, as long as this notice is preserved.
9848
# serial 4 lt~obsolete.m4
9850
# These exist entirely to fool aclocal when bootstrapping libtool.
9852
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
9853
# which have later been changed to m4_define as they aren't part of the
9854
# exported API, or moved to Autoconf or Automake where they belong.
9856
# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
9857
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
9858
# using a macro with the same name in our local m4/libtool.m4 it'll
9859
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
9860
# and doesn't know about Autoconf macros at all.)
9862
# So we provide this file, which has a silly filename so it's always
9863
# included after everything else. This provides aclocal with the
9864
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
9865
# because those macros already exist, or will be overwritten later.
9866
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
9868
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
9869
# Yes, that means every name once taken will need to remain here until
9870
# we give up compatibility with versions before 1.7, at which point
9871
# we need to keep only those names which we still refer to.
9873
# This is to help aclocal find these macros, as it can't see m4_define.
9874
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9876
m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9877
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
9878
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9879
m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
9880
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9881
m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
9882
m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
9883
m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9884
m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
9885
m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
9886
m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
9887
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9888
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9889
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9890
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9891
m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9892
m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
9893
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9894
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9895
m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
9896
m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
9897
m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9898
m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9899
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9900
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9901
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9902
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9903
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9904
m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
9905
m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
9906
m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
9907
m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9908
m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9909
m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
9910
m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
9911
m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9912
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9913
m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
9914
m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9915
m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
9916
m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
9917
m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
9918
m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])])
9919
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9920
m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9921
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9922
m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9923
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9924
m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9925
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9926
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9927
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9928
m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9929
m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
9930
m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9934
dnl Copyright (c) 2002-2006
9935
dnl The Xfce development team. All rights reserved.
9937
dnl Written for Xfce by Benedikt Meurer <benny@xfce.org>.
9939
dnl This program is free software; you can redistribute it and/or modify it
9940
dnl under the terms of the GNU General Public License as published by the Free
9941
dnl Software Foundation; either version 2 of the License, or (at your option)
9942
dnl any later version.
9944
dnl This program is distributed in the hope that it will be useful, but WITHOUT
9945
dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
9946
dnl FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
9949
dnl You should have received a copy of the GNU General Public License along with
9950
dnl this program; if not, write to the Free Software Foundation, Inc., 59 Temple
9951
dnl Place, Suite 330, Boston, MA 02111-1307 USA
9955
dnl Contains M4 macros to check for software dependencies.
9956
dnl Partly based on prior work of the XDG contributors.
9961
dnl We need recent a autoconf version
9965
dnl XDT_SUPPORTED_FLAGS(VAR, FLAGS)
9967
dnl For each token in FLAGS, checks to be sure the compiler supports
9968
dnl the flag, and if so, adds each one to VAR.
9970
AC_DEFUN([XDT_SUPPORTED_FLAGS],
9973
AC_MSG_CHECKING([if $CC supports $flag])
9974
saved_CFLAGS="$CFLAGS"
9975
CFLAGS="$CFLAGS $flag"
9976
AC_COMPILE_IFELSE([ ], [flag_supported=yes], [flag_supported=no])
9977
CFLAGS="$saved_CFLAGS"
9978
AC_MSG_RESULT([$flag_supported])
9980
if test "x$flag_supported" = "xyes"; then
9988
dnl XDT_FEATURE_DEBUG(default_level=minimum)
9990
AC_DEFUN([XDT_FEATURE_DEBUG],
9992
dnl weird indentation to keep output indentation correct
9993
AC_ARG_ENABLE([debug],
9994
AC_HELP_STRING([--enable-debug@<:@=no|minimum|yes|full@:>@],
9995
[Build with debugging support @<:@default=m4_default([$1], [minimum])@:>@])
9996
AC_HELP_STRING([--disable-debug], [Include no debugging support]),
9997
[enable_debug=$enableval], [enable_debug=m4_default([$1], [minimum])])
9999
AC_MSG_CHECKING([whether to build with debugging support])
10000
if test x"$enable_debug" = x"full" -o x"$enable_debug" = x"yes"; then
10001
AC_DEFINE([DEBUG], [1], [Define for debugging support])
10003
xdt_cv_additional_CFLAGS="-DXFCE_DISABLE_DEPRECATED \
10005
-Wno-missing-field-initializers \
10006
-Wno-unused-parameter -Wold-style-definition \
10007
-Wdeclaration-after-statement \
10008
-Wmissing-declarations -Wredundant-decls \
10009
-Wmissing-noreturn -Wshadow -Wpointer-arith \
10010
-Wcast-align -Wformat-security \
10011
-Winit-self -Wmissing-include-dirs -Wundef \
10012
-Wmissing-format-attribute -Wnested-externs \
10014
CPPFLAGS="$CPPFLAGS -D_FORTIFY_SOURCE=2"
10016
if test x"$enable_debug" = x"full"; then
10017
AC_DEFINE([DEBUG_TRACE], [1], [Define for tracing support])
10018
xdt_cv_additional_CFLAGS="$xdt_cv_additional_CFLAGS -O0 -g3 -Werror"
10019
CPPFLAGS="$CPPFLAGS -DG_ENABLE_DEBUG"
10020
AC_MSG_RESULT([full])
10022
xdt_cv_additional_CFLAGS="$xdt_cv_additional_CFLAGS -g"
10023
AC_MSG_RESULT([yes])
10026
XDT_SUPPORTED_FLAGS([supported_CFLAGS], [$xdt_cv_additional_CFLAGS])
10028
ifelse([$CXX], , , [
10029
dnl FIXME: should test on c++ compiler, but the following line causes
10030
dnl autoconf errors for projects that don't check for a
10031
dnl c++ compiler at all.
10032
dnl AC_LANG_PUSH([C++])
10033
dnl XDT_SUPPORTED_FLAGS([supported_CXXFLAGS], [$xdt_cv_additional_CFLAGS])
10035
dnl instead, just use supported_CFLAGS...
10036
supported_CXXFLAGS="$supported_CFLAGS"
10039
CFLAGS="$CFLAGS $supported_CFLAGS"
10040
CXXFLAGS="$CXXFLAGS $supported_CXXFLAGS"
10042
CPPFLAGS="$CPPFLAGS -DNDEBUG"
10044
if test x"$enable_debug" = x"no"; then
10045
CPPFLAGS="$CPPFLAGS -DG_DISABLE_CAST_CHECKS -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS"
10046
AC_MSG_RESULT([no])
10048
AC_MSG_RESULT([minimum])
10054
dnl XDT_FEATURE_VISIBILITY()
10056
dnl Checks to see if the compiler supports the 'visibility' attribute
10057
dnl If so, adds -DHAVE_GNUC_VISIBILTY to CPPFLAGS. Also sets the
10058
dnl automake conditional HAVE_GNUC_VISIBILITY.
10060
AC_DEFUN([XDT_FEATURE_VISIBILITY],
10062
AC_ARG_ENABLE([visibility],
10063
AC_HELP_STRING([--disable-visibility],
10064
[Don't use ELF visibility attributes]),
10065
[enable_visibility=$enableval], [enable_visibility=yes])
10066
have_gnuc_visibility=no
10067
if test "x$enable_visibility" != "xno"; then
10068
XDT_SUPPORTED_FLAGS([xdt_vis_test_cflags], [-Wall -Werror -Wno-unused-parameter])
10069
saved_CFLAGS="$CFLAGS"
10070
CFLAGS="$CFLAGS $xdt_vis_test_cflags"
10071
AC_MSG_CHECKING([whether $CC supports the GNUC visibility attribute])
10072
AC_COMPILE_IFELSE(AC_LANG_SOURCE(
10074
void test_default (void);
10075
void test_hidden (void);
10077
void __attribute__ ((visibility("default"))) test_default (void) {}
10078
void __attribute__ ((visibility("hidden"))) test_hidden (void) {}
10080
int main (int argc, char **argv) {
10087
have_gnuc_visibility=yes
10088
AC_MSG_RESULT([yes])
10091
AC_MSG_RESULT([no])
10093
CFLAGS="$saved_CFLAGS"
10096
if test "x$have_gnuc_visibility" = "xyes"; then
10097
CPPFLAGS="$CPPFLAGS -DHAVE_GNUC_VISIBILITY"
10098
XDT_SUPPORTED_FLAGS([xdt_vis_hidden_cflags], [-fvisibility=hidden])
10099
CFLAGS="$CFLAGS $xdt_vis_hidden_cflags"
10102
AM_CONDITIONAL([HAVE_GNUC_VISIBILITY], [test "x$have_gnuc_visibility" = "xyes"])
10105
dnl XDT_FEATURE_LINKER_OPTS
10107
dnl Checks for and enables any special linker optimizations.
10109
AC_DEFUN([XDT_FEATURE_LINKER_OPTS],
10111
AC_ARG_ENABLE([linker-opts],
10112
AC_HELP_STRING([--disable-linker-opts],
10113
[Disable linker optimizations]),
10114
[enable_linker_opts=$enableval], [enable_linker_opts=yes])
10116
if test "x$enable_linker_opts" != "xno"; then
10117
AC_MSG_CHECKING([whether $LD accepts --as-needed])
10118
case `$LD --as-needed -v 2>&1 </dev/null` in
10119
*GNU* | *'with BFD'*)
10120
LDFLAGS="$LDFLAGS -Wl,--as-needed"
10121
AC_MSG_RESULT([yes])
10124
AC_MSG_RESULT([no])
10127
AC_MSG_CHECKING([whether $LD accepts -O1])
10128
case `$LD -O1 -v 2>&1 </dev/null` in
10129
*GNU* | *'with BFD'*)
10130
LDFLAGS="$LDFLAGS -Wl,-O1"
10131
AC_MSG_RESULT([yes])
10134
AC_MSG_RESULT([no])
10140
dnl BM_DEBUG_SUPPORT()
10142
AC_DEFUN([BM_DEBUG_SUPPORT],
10144
dnl # --enable-debug
10145
AC_REQUIRE([XDT_FEATURE_DEBUG])
10147
dnl # --enable-profiling
10148
AC_ARG_ENABLE([profiling],
10149
AC_HELP_STRING([--enable-profiling],
10150
[Generate extra code to write profile information])
10151
AC_HELP_STRING([--disable-profiling],
10152
[No extra code for profiling (default)]),
10153
[], [enable_profiling=no])
10155
AC_MSG_CHECKING([whether to build with profiling support])
10156
if test x"$enable_profiling" != x"no"; then
10157
CFLAGS="$CFLAGS -pg"
10158
LDFLAGS="$LDFLAGS -pg"
10159
AC_MSG_RESULT([yes])
10161
AC_MSG_RESULT([no])
10164
dnl # --enable-gcov
10165
AC_ARG_ENABLE([gcov],
10166
AC_HELP_STRING([--enable-gcov],
10167
[compile with coverage profiling instrumentation (gcc only)])
10168
AC_HELP_STRING([--disable-gcov],
10169
[do not generate coverage profiling instrumentation (default)]),
10170
[], [enable_gcov=no])
10172
AC_MSG_CHECKING([whether to compile with coverage profiling instrumentation])
10173
if test x"$enable_gcov" != x"no"; then
10174
CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
10175
AC_MSG_RESULT([yes])
10177
AC_MSG_RESULT([no])
10180
dnl # --disable-asserts
10181
AC_ARG_ENABLE([asserts],
10182
AC_HELP_STRING([--disable-asserts], [Disable assertions [DANGEROUS]]),
10183
[], [enable_asserts=yes])
10185
AC_MSG_CHECKING([whether to disable assertions])
10186
if test x"$enable_asserts" = x"no"; then
10187
AC_MSG_RESULT([yes])
10188
CPPFLAGS="$CPPFLAGS -DG_DISABLE_CHECKS -DG_DISABLE_ASSERT"
10189
CPPFLAGS="$CPPFLAGS -DG_DISABLE_CAST_CHECKS"
10191
AC_MSG_RESULT([no])
10194
dnl # --enable-final
10195
AC_REQUIRE([AC_PROG_LD])
10196
AC_ARG_ENABLE([final],
10197
AC_HELP_STRING([--enable-final], [Build final version]),
10198
[], [enable_final=yes])
10200
AC_MSG_CHECKING([whether to build final version])
10201
if test x"$enable_final" = x"yes"; then
10202
AC_MSG_RESULT([yes])
10203
AC_MSG_CHECKING([whether $LD accepts -O1])
10204
case `$LD -O1 -v 2>&1 </dev/null` in
10205
*GNU* | *'with BFD'*)
10206
LDFLAGS="$LDFLAGS -Wl,-O1"
10207
AC_MSG_RESULT([yes])
10210
AC_MSG_RESULT([no])
10214
AC_MSG_RESULT([no])
10220
dnl Copyright (c) 2002-2006
10221
dnl The Xfce development team. All rights reserved.
10223
dnl Written for Xfce by Benedikt Meurer <benny@xfce.org>.
10225
dnl This program is free software; you can redistribute it and/or modify it
10226
dnl under the terms of the GNU General Public License as published by the Free
10227
dnl Software Foundation; either version 2 of the License, or (at your option)
10228
dnl any later version.
10230
dnl This program is distributed in the hope that it will be useful, but WITHOUT
10231
dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10232
dnl FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
10235
dnl You should have received a copy of the GNU General Public License along with
10236
dnl this program; if not, write to the Free Software Foundation, Inc., 59 Temple
10237
dnl Place, Suite 330, Boston, MA 02111-1307 USA
10241
dnl Internalization M4 macros.
10245
dnl XDT_I18N(LINGUAS [, PACKAGE])
10247
dnl This macro takes care of setting up everything for i18n support.
10249
dnl If PACKAGE isn't specified, it defaults to the package tarname; see
10250
dnl the description of AC_INIT() for an explanation of what makes up
10251
dnl the package tarname. Normally, you don't need to specify PACKAGE,
10252
dnl but you can stick with the default.
10254
AC_DEFUN([XDT_I18N],
10256
dnl Substitute GETTEXT_PACKAGE variable
10257
GETTEXT_PACKAGE=m4_default([$2], [AC_PACKAGE_TARNAME()])
10258
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [Name of default gettext domain])
10259
AC_SUBST([GETTEXT_PACKAGE])
10261
dnl gettext and stuff
10263
AM_GLIB_GNU_GETTEXT()
10265
dnl This is required on some Linux systems
10266
AC_CHECK_FUNC([bind_textdomain_codeset])
10268
dnl Determine where to install locale files
10269
AC_MSG_CHECKING([for locales directory])
10270
AC_ARG_WITH([locales-dir],
10272
AC_HELP_STRING([--with-locales-dir=DIR], [Install locales into DIR])
10273
], [localedir=$withval],
10275
if test x"$CATOBJEXT" = x".mo"; then
10276
localedir=$libdir/locale
10278
localedir=$datadir/locale
10281
AC_MSG_RESULT([$localedir])
10282
AC_SUBST([localedir])
10284
dnl Determine additional xgettext flags
10285
AC_MSG_CHECKING([for additional xgettext flags])
10286
if test x"$XGETTEXT_ARGS" = x""; then
10287
XGETTEXT_ARGS="--keyword=Q_ --from-code=UTF-8";
10289
XGETTEXT_ARGS="$XGETTEXT_ARGS --keyword=Q_ --from-code=UTF-8";
10291
AC_SUBST([XGETTEXT_ARGS])
10292
AC_MSG_RESULT([$XGETTEXT_ARGS])
10297
dnl BM_I18N(PACKAGE, LINGUAS)
10299
dnl Simple wrapper for XDT_I18N(LINGUAS, PACKAGE). Kept for
10300
dnl backward compatibility. Will be removed in the
10303
AC_DEFUN([BM_I18N],
10305
XDT_I18N([$2], [$1])
10309
m4_include([acinclude.m4])