11
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12
12
# PARTICULAR PURPOSE.
15
# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
17
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
19
# This program is free software; you can redistribute it and/or modify
20
# it under the terms of the GNU General Public License as published by
21
# the Free Software Foundation; either version 2, or (at your option)
24
# This program is distributed in the hope that it will be useful,
25
# but WITHOUT ANY WARRANTY; without even the implied warranty of
26
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27
# GNU General Public License for more details.
29
# You should have received a copy of the GNU General Public License
30
# along with this program; if not, write to the Free Software
31
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
38
# When config.status generates a header, we must update the stamp-h file.
39
# This file resides in the same directory as the config header
40
# that is generated. We must strip everything past the first ":",
41
# and everything past the last "/".
45
# Like AS_DIRNAME, only do it during macro expansion
46
AC_DEFUN([_AM_DIRNAME],
47
[m4_if(regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
48
m4_if(regexp([$1], [^//\([^/]\|$\)]), -1,
49
m4_if(regexp([$1], [^/.*]), -1,
51
patsubst([$1], [^\(/\).*], [\1])),
52
patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
53
patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
57
# The stamp files are numbered to have different names.
58
# We could number them on a directory basis, but that's additional
59
# complications, let's have a unique counter.
60
m4_define([_AM_STAMP_Count], [0])
65
# The name of the stamp file for HEADER.
67
[m4_define([_AM_STAMP_Count], m4_incr(_AM_STAMP_Count))dnl
68
AS_ESCAPE(_AM_DIRNAME(patsubst([$1],
69
[:.*])))/stamp-h[]_AM_STAMP_Count])
72
# _AM_CONFIG_HEADER(HEADER[:SOURCES], COMMANDS, INIT-COMMANDS)
73
# ------------------------------------------------------------
74
# We used to try to get a real timestamp in stamp-h. But the fear is that
75
# that will cause unnecessary cvs conflicts.
76
AC_DEFUN([_AM_CONFIG_HEADER],
77
[# Add the stamp file to the list of files AC keeps track of,
78
# along with our hook.
79
AC_CONFIG_HEADERS([$1],
80
[# update the timestamp
81
echo 'timestamp for $1' >"_AM_STAMP([$1])"
87
# AM_CONFIG_HEADER(HEADER[:SOURCES]..., COMMANDS, INIT-COMMANDS)
88
# --------------------------------------------------------------
89
AC_DEFUN([AM_CONFIG_HEADER],
90
[AC_FOREACH([_AM_File], [$1], [_AM_CONFIG_HEADER(_AM_File, [$2], [$3])])
93
# Do all the work for Automake. -*- Autoconf -*-
95
# This macro actually does too much some checks are only needed if
96
# your package does certain things. But this isn't really a big deal.
98
# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
99
# Free Software Foundation, Inc.
101
# This program is free software; you can redistribute it and/or modify
102
# it under the terms of the GNU General Public License as published by
103
# the Free Software Foundation; either version 2, or (at your option)
106
# This program is distributed in the hope that it will be useful,
107
# but WITHOUT ANY WARRANTY; without even the implied warranty of
108
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
109
# GNU General Public License for more details.
111
# You should have received a copy of the GNU General Public License
112
# along with this program; if not, write to the Free Software
113
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
118
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
119
# written in clear, in which case automake, when reading aclocal.m4,
120
# will think it sees a *use*, and therefore will trigger all it's
121
# C support machinery. Also note that it means that autoscan, seeing
122
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
127
# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
128
# the ones we care about.
129
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
131
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
132
# AM_INIT_AUTOMAKE([OPTIONS])
133
# -----------------------------------------------
134
# The call with PACKAGE and VERSION arguments is the old style
135
# call (pre autoconf-2.50), which is being phased out. PACKAGE
136
# and VERSION should now be passed to AC_INIT and removed from
137
# the call to AM_INIT_AUTOMAKE.
138
# We support both call styles for the transition. After
139
# the next Automake release, Autoconf can make the AC_INIT
140
# arguments mandatory, and then we can depend on a new Autoconf
141
# release and drop the old call support.
142
AC_DEFUN([AM_INIT_AUTOMAKE],
143
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
144
AC_REQUIRE([AC_PROG_INSTALL])dnl
145
# test to see if srcdir already configured
146
if test "`cd $srcdir && pwd`" != "`pwd`" &&
147
test -f $srcdir/config.status; then
148
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
151
# Define the identity of the package.
152
dnl Distinguish between old-style and new-style calls.
154
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
155
AC_SUBST([PACKAGE], [$1])dnl
156
AC_SUBST([VERSION], [$2])],
157
[_AM_SET_OPTIONS([$1])dnl
158
AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl
159
AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl
161
_AM_IF_OPTION([no-define],,
162
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
163
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
165
# Some tools Automake needs.
166
AC_REQUIRE([AM_SANITY_CHECK])dnl
167
AC_REQUIRE([AC_ARG_PROGRAM])dnl
168
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
169
AM_MISSING_PROG(AUTOCONF, autoconf)
170
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
171
AM_MISSING_PROG(AUTOHEADER, autoheader)
172
AM_MISSING_PROG(MAKEINFO, makeinfo)
173
AM_MISSING_PROG(AMTAR, tar)
175
AM_PROG_INSTALL_STRIP
176
# We need awk for the "check" target. The system "awk" is bad on
178
AC_REQUIRE([AC_PROG_AWK])dnl
179
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
181
_AM_IF_OPTION([no-dependencies],,
182
[AC_PROVIDE_IFELSE([AC_PROG_][CC],
183
[_AM_DEPENDENCIES(CC)],
184
[define([AC_PROG_][CC],
185
defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
186
AC_PROVIDE_IFELSE([AC_PROG_][CXX],
187
[_AM_DEPENDENCIES(CXX)],
188
[define([AC_PROG_][CXX],
189
defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
193
# Copyright 2002 Free Software Foundation, Inc.
195
# This program is free software; you can redistribute it and/or modify
196
# it under the terms of the GNU General Public License as published by
197
# the Free Software Foundation; either version 2, or (at your option)
200
# This program is distributed in the hope that it will be useful,
201
# but WITHOUT ANY WARRANTY; without even the implied warranty of
202
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
203
# GNU General Public License for more details.
205
# You should have received a copy of the GNU General Public License
206
# along with this program; if not, write to the Free Software
207
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
209
# AM_AUTOMAKE_VERSION(VERSION)
210
# ----------------------------
211
# Automake X.Y traces this macro to ensure aclocal.m4 has been
212
# generated from the m4 files accompanying Automake X.Y.
213
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.6"])
215
# AM_SET_CURRENT_AUTOMAKE_VERSION
216
# -------------------------------
217
# Call AM_AUTOMAKE_VERSION so it can be traced.
218
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
219
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
220
[AM_AUTOMAKE_VERSION([1.6.3])])
222
# Helper functions for option handling. -*- Autoconf -*-
224
# Copyright 2001, 2002 Free Software Foundation, Inc.
226
# This program is free software; you can redistribute it and/or modify
227
# it under the terms of the GNU General Public License as published by
228
# the Free Software Foundation; either version 2, or (at your option)
231
# This program is distributed in the hope that it will be useful,
232
# but WITHOUT ANY WARRANTY; without even the implied warranty of
233
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
234
# GNU General Public License for more details.
236
# You should have received a copy of the GNU General Public License
237
# along with this program; if not, write to the Free Software
238
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
243
# _AM_MANGLE_OPTION(NAME)
244
# -----------------------
245
AC_DEFUN([_AM_MANGLE_OPTION],
246
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
248
# _AM_SET_OPTION(NAME)
249
# ------------------------------
250
# Set option NAME. Presently that only means defining a flag for this option.
251
AC_DEFUN([_AM_SET_OPTION],
252
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
254
# _AM_SET_OPTIONS(OPTIONS)
255
# ----------------------------------
256
# OPTIONS is a space-separated list of Automake options.
257
AC_DEFUN([_AM_SET_OPTIONS],
258
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
260
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
261
# -------------------------------------------
262
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
263
AC_DEFUN([_AM_IF_OPTION],
264
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
267
# Check to make sure that the build environment is sane.
270
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
272
# This program is free software; you can redistribute it and/or modify
273
# it under the terms of the GNU General Public License as published by
274
# the Free Software Foundation; either version 2, or (at your option)
277
# This program is distributed in the hope that it will be useful,
278
# but WITHOUT ANY WARRANTY; without even the implied warranty of
279
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
280
# GNU General Public License for more details.
282
# You should have received a copy of the GNU General Public License
283
# along with this program; if not, write to the Free Software
284
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
14
# codeset.m4 serial AM1 (gettext-0.10.40)
15
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
16
dnl This file is free software; the Free Software Foundation
17
dnl gives unlimited permission to copy and/or distribute it,
18
dnl with or without modifications, as long as this notice is preserved.
20
dnl From Bruno Haible.
22
AC_DEFUN([AM_LANGINFO_CODESET],
24
AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
25
[AC_TRY_LINK([#include <langinfo.h>],
26
[char* cs = nl_langinfo(CODESET);],
27
am_cv_langinfo_codeset=yes,
28
am_cv_langinfo_codeset=no)
30
if test $am_cv_langinfo_codeset = yes; then
31
AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
32
[Define if you have <langinfo.h> and nl_langinfo(CODESET).])
36
# gettext.m4 serial 37 (gettext-0.14.4)
37
dnl Copyright (C) 1995-2005 Free Software Foundation, Inc.
38
dnl This file is free software; the Free Software Foundation
39
dnl gives unlimited permission to copy and/or distribute it,
40
dnl with or without modifications, as long as this notice is preserved.
42
dnl This file can can be used in projects which are not available under
43
dnl the GNU General Public License or the GNU Library General Public
44
dnl License but which still want to provide support for the GNU gettext
46
dnl Please note that the actual code of the GNU gettext library is covered
47
dnl by the GNU Library General Public License, and the rest of the GNU
48
dnl gettext package package is covered by the GNU General Public License.
49
dnl They are *not* in the public domain.
52
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
53
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
55
dnl Macro to add for using GNU gettext.
57
dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
58
dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
59
dnl default (if it is not specified or empty) is 'no-libtool'.
60
dnl INTLSYMBOL should be 'external' for packages with no intl directory,
61
dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
62
dnl If INTLSYMBOL is 'use-libtool', then a libtool library
63
dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
64
dnl depending on --{enable,disable}-{shared,static} and on the presence of
65
dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
66
dnl $(top_builddir)/intl/libintl.a will be created.
67
dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
68
dnl implementations (in libc or libintl) without the ngettext() function
69
dnl will be ignored. If NEEDSYMBOL is specified and is
70
dnl 'need-formatstring-macros', then GNU gettext implementations that don't
71
dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
72
dnl INTLDIR is used to find the intl libraries. If empty,
73
dnl the value `$(top_builddir)/intl/' is used.
75
dnl The result of the configuration is one of three cases:
76
dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
78
dnl Catalog format: GNU --> install in $(datadir)
79
dnl Catalog extension: .mo after installation, .gmo in source tree
80
dnl 2) GNU gettext has been found in the system's C library.
81
dnl Catalog format: GNU --> install in $(datadir)
82
dnl Catalog extension: .mo after installation, .gmo in source tree
83
dnl 3) No internationalization, always use English msgid.
84
dnl Catalog format: none
85
dnl Catalog extension: none
86
dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
87
dnl The use of .gmo is historical (it was needed to avoid overwriting the
88
dnl GNU format catalogs when building on a platform with an X/Open gettext),
89
dnl but we keep it in order not to force irrelevant filename changes on the
92
AC_DEFUN([AM_GNU_GETTEXT],
94
dnl Argument checking.
95
ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
96
[errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
98
ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
99
[errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
101
define([gt_included_intl], ifelse([$1], [external], [no], [yes]))
102
define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
104
AC_REQUIRE([AM_PO_SUBDIRS])dnl
105
ifelse(gt_included_intl, yes, [
106
AC_REQUIRE([AM_INTL_SUBDIR])dnl
109
dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
110
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
111
AC_REQUIRE([AC_LIB_RPATH])
113
dnl Sometimes libintl requires libiconv, so first search for libiconv.
114
dnl Ideally we would do this search only after the
115
dnl if test "$USE_NLS" = "yes"; then
116
dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then
117
dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
118
dnl the configure script would need to contain the same shell code
119
dnl again, outside any 'if'. There are two solutions:
120
dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
121
dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
122
dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
123
dnl documented, we avoid it.
124
ifelse(gt_included_intl, yes, , [
125
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
128
dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
134
ifelse(gt_included_intl, yes, [
135
BUILD_INCLUDED_LIBINTL=no
136
USE_INCLUDED_LIBINTL=no
142
dnl If we use NLS figure out what method
143
if test "$USE_NLS" = "yes"; then
144
gt_use_preinstalled_gnugettext=no
145
ifelse(gt_included_intl, yes, [
146
AC_MSG_CHECKING([whether included gettext is requested])
147
AC_ARG_WITH(included-gettext,
148
[ --with-included-gettext use the GNU gettext library included here],
149
nls_cv_force_use_gnu_gettext=$withval,
150
nls_cv_force_use_gnu_gettext=no)
151
AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
153
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
154
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
156
dnl User does not insist on using GNU NLS library. Figure out what
157
dnl to use. If GNU gettext is available we use this. Else we have
158
dnl to fall back to GNU NLS library.
160
dnl Add a version number to the cache macros.
161
define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
162
define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
163
define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
165
AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
166
[AC_TRY_LINK([#include <libintl.h>
167
]ifelse([$2], [need-formatstring-macros],
168
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
169
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
172
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
174
], [])[extern int _nl_msg_cat_cntr;
175
extern int *_nl_domain_bindings;],
176
[bindtextdomain ("", "");
177
return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
178
gt_cv_func_gnugettext_libc=yes,
179
gt_cv_func_gnugettext_libc=no)])
181
if test "$gt_cv_func_gnugettext_libc" != "yes"; then
182
dnl Sometimes libintl requires libiconv, so first search for libiconv.
183
ifelse(gt_included_intl, yes, , [
186
dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
187
dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
188
dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
189
dnl even if libiconv doesn't exist.
190
AC_LIB_LINKFLAGS_BODY([intl])
191
AC_CACHE_CHECK([for GNU gettext in libintl],
192
gt_cv_func_gnugettext_libintl,
193
[gt_save_CPPFLAGS="$CPPFLAGS"
194
CPPFLAGS="$CPPFLAGS $INCINTL"
196
LIBS="$LIBS $LIBINTL"
197
dnl Now see whether libintl exists and does not depend on libiconv.
198
AC_TRY_LINK([#include <libintl.h>
199
]ifelse([$2], [need-formatstring-macros],
200
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
201
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
204
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
206
], [])[extern int _nl_msg_cat_cntr;
211
const char *_nl_expand_alias (const char *);],
212
[bindtextdomain ("", "");
213
return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
214
gt_cv_func_gnugettext_libintl=yes,
215
gt_cv_func_gnugettext_libintl=no)
216
dnl Now see whether libintl exists and depends on libiconv.
217
if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
218
LIBS="$LIBS $LIBICONV"
219
AC_TRY_LINK([#include <libintl.h>
220
]ifelse([$2], [need-formatstring-macros],
221
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
222
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
225
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
227
], [])[extern int _nl_msg_cat_cntr;
232
const char *_nl_expand_alias (const char *);],
233
[bindtextdomain ("", "");
234
return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
235
[LIBINTL="$LIBINTL $LIBICONV"
236
LTLIBINTL="$LTLIBINTL $LTLIBICONV"
237
gt_cv_func_gnugettext_libintl=yes
240
CPPFLAGS="$gt_save_CPPFLAGS"
241
LIBS="$gt_save_LIBS"])
244
dnl If an already present or preinstalled GNU gettext() is found,
245
dnl use it. But if this macro is used in GNU gettext, and GNU
246
dnl gettext is already preinstalled in libintl, we update this
247
dnl libintl. (Cf. the install rule in intl/Makefile.in.)
248
if test "$gt_cv_func_gnugettext_libc" = "yes" \
249
|| { test "$gt_cv_func_gnugettext_libintl" = "yes" \
250
&& test "$PACKAGE" != gettext-runtime \
251
&& test "$PACKAGE" != gettext-tools; }; then
252
gt_use_preinstalled_gnugettext=yes
254
dnl Reset the values set by searching for libintl.
260
ifelse(gt_included_intl, yes, [
261
if test "$gt_use_preinstalled_gnugettext" != "yes"; then
262
dnl GNU gettext is not found in the C library.
263
dnl Fall back on included GNU gettext library.
264
nls_cv_use_gnu_gettext=yes
268
if test "$nls_cv_use_gnu_gettext" = "yes"; then
269
dnl Mark actions used to generate GNU NLS library.
270
BUILD_INCLUDED_LIBINTL=yes
271
USE_INCLUDED_LIBINTL=yes
272
LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
273
LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
274
LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
278
if test "$gt_use_preinstalled_gnugettext" = "yes" \
279
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
280
dnl Mark actions to use GNU gettext tools.
285
if test -n "$INTL_MACOSX_LIBS"; then
286
if test "$gt_use_preinstalled_gnugettext" = "yes" \
287
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
288
dnl Some extra flags are needed during linking.
289
LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
290
LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
294
if test "$gt_use_preinstalled_gnugettext" = "yes" \
295
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
296
AC_DEFINE(ENABLE_NLS, 1,
297
[Define to 1 if translation of program messages to the user's native language
304
AC_MSG_CHECKING([whether to use NLS])
305
AC_MSG_RESULT([$USE_NLS])
306
if test "$USE_NLS" = "yes"; then
307
AC_MSG_CHECKING([where the gettext function comes from])
308
if test "$gt_use_preinstalled_gnugettext" = "yes"; then
309
if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
310
gt_source="external libintl"
315
gt_source="included intl directory"
317
AC_MSG_RESULT([$gt_source])
320
if test "$USE_NLS" = "yes"; then
322
if test "$gt_use_preinstalled_gnugettext" = "yes"; then
323
if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
324
AC_MSG_CHECKING([how to link with libintl])
325
AC_MSG_RESULT([$LIBINTL])
326
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
329
dnl For backward compatibility. Some packages may be using this.
330
AC_DEFINE(HAVE_GETTEXT, 1,
331
[Define if the GNU gettext() function is already present or preinstalled.])
332
AC_DEFINE(HAVE_DCGETTEXT, 1,
333
[Define if the GNU dcgettext() function is already present or preinstalled.])
336
dnl We need to process the po/ directory.
340
ifelse(gt_included_intl, yes, [
341
dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
342
dnl to 'yes' because some of the testsuite requires it.
343
if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
344
BUILD_INCLUDED_LIBINTL=yes
347
dnl Make all variables we use known to autoconf.
348
AC_SUBST(BUILD_INCLUDED_LIBINTL)
349
AC_SUBST(USE_INCLUDED_LIBINTL)
352
dnl For backward compatibility. Some configure.ins may be using this.
356
dnl For backward compatibility. Some Makefiles may be using this.
358
AC_SUBST(DATADIRNAME)
360
dnl For backward compatibility. Some Makefiles may be using this.
364
dnl For backward compatibility. Some Makefiles may be using this.
368
dnl For backward compatibility. Some Makefiles may be using this.
370
if test "$USE_INCLUDED_LIBINTL" = yes; then
371
INTLOBJS="\$(GETTOBJS)"
375
dnl Enable libtool support if the surrounding package wishes it.
376
INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
377
AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
380
dnl For backward compatibility. Some Makefiles may be using this.
384
dnl Make all documented variables known to autoconf.
391
dnl Checks for all prerequisites of the intl subdirectory,
392
dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
393
dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
394
AC_DEFUN([AM_INTL_SUBDIR],
396
AC_REQUIRE([AC_PROG_INSTALL])dnl
397
AC_REQUIRE([AM_MKINSTALLDIRS])dnl
398
AC_REQUIRE([AC_PROG_CC])dnl
399
AC_REQUIRE([AC_CANONICAL_HOST])dnl
400
AC_REQUIRE([gt_GLIBC2])dnl
401
AC_REQUIRE([AC_PROG_RANLIB])dnl
402
AC_REQUIRE([AC_ISC_POSIX])dnl
403
AC_REQUIRE([AC_HEADER_STDC])dnl
404
AC_REQUIRE([AC_C_CONST])dnl
405
AC_REQUIRE([bh_C_SIGNED])dnl
406
AC_REQUIRE([AC_C_INLINE])dnl
407
AC_REQUIRE([AC_TYPE_OFF_T])dnl
408
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
409
AC_REQUIRE([gl_AC_TYPE_LONG_LONG])dnl
410
AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl
411
AC_REQUIRE([gt_TYPE_WCHAR_T])dnl
412
AC_REQUIRE([gt_TYPE_WINT_T])dnl
413
AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
414
AC_REQUIRE([gl_AC_HEADER_STDINT_H])
415
AC_REQUIRE([gt_TYPE_INTMAX_T])
416
AC_REQUIRE([gt_PRINTF_POSIX])
417
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
418
AC_REQUIRE([AC_FUNC_MMAP])dnl
419
AC_REQUIRE([gl_GLIBC21])dnl
420
AC_REQUIRE([gt_INTDIV0])dnl
421
AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl
422
AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
423
AC_REQUIRE([gt_INTTYPES_PRI])dnl
424
AC_REQUIRE([gl_XSIZE])dnl
425
AC_REQUIRE([gt_INTL_MACOSX])dnl
427
AC_CHECK_TYPE([ptrdiff_t], ,
428
[AC_DEFINE([ptrdiff_t], [long],
429
[Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
431
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
432
stdlib.h string.h unistd.h sys/param.h])
433
AC_CHECK_FUNCS([asprintf fwprintf getcwd getegid geteuid getgid getuid \
434
mempcpy munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup \
435
strtoul tsearch wcslen __argz_count __argz_stringify __argz_next \
438
dnl Use the _snprintf function only if it is declared (because on NetBSD it
439
dnl is defined as a weak alias of snprintf; we prefer to use the latter).
440
gt_CHECK_DECL(_snprintf, [#include <stdio.h>])
441
gt_CHECK_DECL(_snwprintf, [#include <stdio.h>])
443
dnl Use the *_unlocked functions only if they are declared.
444
dnl (because some of them were defined without being declared in Solaris
445
dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
446
dnl on Solaris 2.5.1 to run on Solaris 2.6).
447
dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
448
gt_CHECK_DECL(feof_unlocked, [#include <stdio.h>])
449
gt_CHECK_DECL(fgets_unlocked, [#include <stdio.h>])
450
gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>])
452
case $gt_cv_func_printf_posix in
453
*yes) HAVE_POSIX_PRINTF=1 ;;
454
*) HAVE_POSIX_PRINTF=0 ;;
456
AC_SUBST([HAVE_POSIX_PRINTF])
457
if test "$ac_cv_func_asprintf" = yes; then
462
AC_SUBST([HAVE_ASPRINTF])
463
if test "$ac_cv_func_snprintf" = yes; then
468
AC_SUBST([HAVE_SNPRINTF])
469
if test "$ac_cv_func_wprintf" = yes; then
474
AC_SUBST([HAVE_WPRINTF])
478
if test $ac_cv_header_locale_h = yes; then
482
if test -n "$INTL_MACOSX_LIBS"; then
483
CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
486
dnl intl/plural.c is generated from intl/plural.y. It requires bison,
487
dnl because plural.y uses bison specific features. It requires at least
488
dnl bison-1.26 because earlier versions generate a plural.c that doesn't
490
dnl bison is only needed for the maintainer (who touches plural.y). But in
491
dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
492
dnl the rule in general Makefile. Now, some people carelessly touch the
493
dnl files or have a broken "make" program, hence the plural.c rule will
494
dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
495
dnl present or too old.
496
AC_CHECK_PROGS([INTLBISON], [bison])
497
if test -z "$INTLBISON"; then
500
dnl Found it, now check the version.
501
AC_MSG_CHECKING([version of bison])
502
changequote(<<,>>)dnl
503
ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
504
case $ac_prog_version in
505
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
506
1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
508
ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
509
*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
511
AC_MSG_RESULT([$ac_prog_version])
513
if test $ac_verc_fail = yes; then
519
dnl Checks for special options needed on MacOS X.
520
dnl Defines INTL_MACOSX_LIBS.
521
AC_DEFUN([gt_INTL_MACOSX],
523
dnl Check for API introduced in MacOS X 10.2.
524
AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
525
gt_cv_func_CFPreferencesCopyAppValue,
526
[gt_save_CPPFLAGS="$CPPFLAGS"
527
CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
529
LIBS="$LIBS -framework CoreFoundation"
530
AC_TRY_LINK([#include <CFPreferences.h>],
531
[CFPreferencesCopyAppValue(NULL, NULL)],
532
[gt_cv_func_CFPreferencesCopyAppValue=yes],
533
[gt_cv_func_CFPreferencesCopyAppValue=no])
534
CPPFLAGS="$gt_save_CPPFLAGS"
535
LIBS="$gt_save_LIBS"])
536
if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
537
AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1,
538
[Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
540
dnl Check for API introduced in MacOS X 10.3.
541
AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent,
542
[gt_save_CPPFLAGS="$CPPFLAGS"
543
CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
545
LIBS="$LIBS -framework CoreFoundation"
546
AC_TRY_LINK([#include <CFLocale.h>], [CFLocaleCopyCurrent();],
547
[gt_cv_func_CFLocaleCopyCurrent=yes],
548
[gt_cv_func_CFLocaleCopyCurrent=no])
549
CPPFLAGS="$gt_save_CPPFLAGS"
550
LIBS="$gt_save_LIBS"])
551
if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
552
AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1,
553
[Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
556
if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
557
INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
559
AC_SUBST([INTL_MACOSX_LIBS])
563
dnl gt_CHECK_DECL(FUNC, INCLUDES)
564
dnl Check whether a function is declared.
565
AC_DEFUN([gt_CHECK_DECL],
567
AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1,
568
[AC_TRY_COMPILE([$2], [
570
char *p = (char *) $1;
572
], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)])
573
if test $ac_cv_have_decl_$1 = yes; then
578
AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value],
579
[Define to 1 if you have the declaration of `$1', and to 0 if you don't.])
583
dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
584
AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
587
dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc.
588
dnl This file is free software; the Free Software Foundation
589
dnl gives unlimited permission to copy and/or distribute it,
590
dnl with or without modifications, as long as this notice is preserved.
592
# Test for the GNU C Library, version 2.0 or newer.
595
AC_DEFUN([gt_GLIBC2],
597
AC_CACHE_CHECK(whether we are using the GNU C Library 2 or newer,
599
[AC_EGREP_CPP([Lucky GNU user],
601
#include <features.h>
602
#ifdef __GNU_LIBRARY__
608
ac_cv_gnu_library_2=yes,
609
ac_cv_gnu_library_2=no)
613
GLIBC2="$ac_cv_gnu_library_2"
617
# glibc21.m4 serial 3
618
dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc.
619
dnl This file is free software; the Free Software Foundation
620
dnl gives unlimited permission to copy and/or distribute it,
621
dnl with or without modifications, as long as this notice is preserved.
623
# Test for the GNU C Library, version 2.1 or newer.
626
AC_DEFUN([gl_GLIBC21],
628
AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
629
ac_cv_gnu_library_2_1,
630
[AC_EGREP_CPP([Lucky GNU user],
632
#include <features.h>
633
#ifdef __GNU_LIBRARY__
634
#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
639
ac_cv_gnu_library_2_1=yes,
640
ac_cv_gnu_library_2_1=no)
644
GLIBC21="$ac_cv_gnu_library_2_1"
648
# iconv.m4 serial AM4 (gettext-0.11.3)
649
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
650
dnl This file is free software; the Free Software Foundation
651
dnl gives unlimited permission to copy and/or distribute it,
652
dnl with or without modifications, as long as this notice is preserved.
654
dnl From Bruno Haible.
656
AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
658
dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
659
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
660
AC_REQUIRE([AC_LIB_RPATH])
662
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
664
AC_LIB_LINKFLAGS_BODY([iconv])
667
AC_DEFUN([AM_ICONV_LINK],
669
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
670
dnl those with the standalone portable GNU libiconv installed).
672
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
674
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
676
dnl Add $INCICONV to CPPFLAGS before performing the following checks,
677
dnl because if the user has installed libiconv and not disabled its use
678
dnl via --without-libiconv-prefix, he wants to use it. The first
679
dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
680
am_save_CPPFLAGS="$CPPFLAGS"
681
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
683
AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
684
am_cv_func_iconv="no, consider installing GNU libiconv"
686
AC_TRY_LINK([#include <stdlib.h>
688
[iconv_t cd = iconv_open("","");
689
iconv(cd,NULL,NULL,NULL,NULL);
691
am_cv_func_iconv=yes)
692
if test "$am_cv_func_iconv" != yes; then
694
LIBS="$LIBS $LIBICONV"
695
AC_TRY_LINK([#include <stdlib.h>
697
[iconv_t cd = iconv_open("","");
698
iconv(cd,NULL,NULL,NULL,NULL);
701
am_cv_func_iconv=yes)
705
if test "$am_cv_func_iconv" = yes; then
706
AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
708
if test "$am_cv_lib_iconv" = yes; then
709
AC_MSG_CHECKING([how to link with libiconv])
710
AC_MSG_RESULT([$LIBICONV])
712
dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
714
CPPFLAGS="$am_save_CPPFLAGS"
725
if test "$am_cv_func_iconv" = yes; then
726
AC_MSG_CHECKING([for iconv declaration])
727
AC_CACHE_VAL(am_cv_proto_iconv, [
735
#if defined(__STDC__) || defined(__cplusplus)
736
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
740
], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
741
am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
742
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
743
AC_MSG_RESULT([$]{ac_t:-
744
}[$]am_cv_proto_iconv)
745
AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
746
[Define as const if the declaration of iconv() needs const.])
750
# intdiv0.m4 serial 1 (gettext-0.11.3)
751
dnl Copyright (C) 2002 Free Software Foundation, Inc.
752
dnl This file is free software; the Free Software Foundation
753
dnl gives unlimited permission to copy and/or distribute it,
754
dnl with or without modifications, as long as this notice is preserved.
756
dnl From Bruno Haible.
758
AC_DEFUN([gt_INTDIV0],
760
AC_REQUIRE([AC_PROG_CC])dnl
761
AC_REQUIRE([AC_CANONICAL_HOST])dnl
763
AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
764
gt_cv_int_divbyzero_sigfpe,
772
sigfpe_handler (int sig)
774
sigfpe_handler (sig) int sig;
777
/* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
778
exit (sig != SIGFPE);
788
signal (SIGFPE, sigfpe_handler);
789
/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
790
#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
791
signal (SIGTRAP, sigfpe_handler);
793
/* Linux/SPARC yields signal SIGILL. */
794
#if defined (__sparc__) && defined (__linux__)
795
signal (SIGILL, sigfpe_handler);
802
], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
804
# Guess based on the CPU.
806
alpha* | i[34567]86 | m68k | s390*)
807
gt_cv_int_divbyzero_sigfpe="guessing yes";;
809
gt_cv_int_divbyzero_sigfpe="guessing no";;
813
case "$gt_cv_int_divbyzero_sigfpe" in
817
AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
818
[Define if integer division by zero raises signal SIGFPE.])
821
# intmax.m4 serial 2 (gettext-0.14.2)
822
dnl Copyright (C) 2002-2005 Free Software Foundation, Inc.
823
dnl This file is free software; the Free Software Foundation
824
dnl gives unlimited permission to copy and/or distribute it,
825
dnl with or without modifications, as long as this notice is preserved.
827
dnl From Bruno Haible.
828
dnl Test whether the system has the 'intmax_t' type, but don't attempt to
829
dnl find a replacement if it is lacking.
831
AC_DEFUN([gt_TYPE_INTMAX_T],
833
AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
834
AC_REQUIRE([gl_AC_HEADER_STDINT_H])
835
AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t,
839
#if HAVE_STDINT_H_WITH_UINTMAX
842
#if HAVE_INTTYPES_H_WITH_UINTMAX
843
#include <inttypes.h>
845
], [intmax_t x = -1;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)])
846
if test $gt_cv_c_intmax_t = yes; then
847
AC_DEFINE(HAVE_INTMAX_T, 1,
848
[Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
852
# inttypes-pri.m4 serial 1 (gettext-0.11.4)
853
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
854
dnl This file is free software; the Free Software Foundation
855
dnl gives unlimited permission to copy and/or distribute it,
856
dnl with or without modifications, as long as this notice is preserved.
858
dnl From Bruno Haible.
860
# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
861
# macros to non-string values. This is the case on AIX 4.3.3.
863
AC_DEFUN([gt_INTTYPES_PRI],
865
AC_REQUIRE([gt_HEADER_INTTYPES_H])
866
if test $gt_cv_header_inttypes_h = yes; then
867
AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
868
gt_cv_inttypes_pri_broken,
870
AC_TRY_COMPILE([#include <inttypes.h>
874
], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
877
if test "$gt_cv_inttypes_pri_broken" = yes; then
878
AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
879
[Define if <inttypes.h> exists and defines unusable PRI* macros.])
883
# inttypes.m4 serial 1 (gettext-0.11.4)
884
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
885
dnl This file is free software; the Free Software Foundation
886
dnl gives unlimited permission to copy and/or distribute it,
887
dnl with or without modifications, as long as this notice is preserved.
889
dnl From Paul Eggert.
891
# Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
894
AC_DEFUN([gt_HEADER_INTTYPES_H],
896
AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
899
[#include <sys/types.h>
900
#include <inttypes.h>],
901
[], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
903
if test $gt_cv_header_inttypes_h = yes; then
904
AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
905
[Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
909
# inttypes_h.m4 serial 6
910
dnl Copyright (C) 1997-2004 Free Software Foundation, Inc.
911
dnl This file is free software; the Free Software Foundation
912
dnl gives unlimited permission to copy and/or distribute it,
913
dnl with or without modifications, as long as this notice is preserved.
915
dnl From Paul Eggert.
917
# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
918
# doesn't clash with <sys/types.h>, and declares uintmax_t.
920
AC_DEFUN([gl_AC_HEADER_INTTYPES_H],
922
AC_CACHE_CHECK([for inttypes.h], gl_cv_header_inttypes_h,
924
[#include <sys/types.h>
925
#include <inttypes.h>],
926
[uintmax_t i = (uintmax_t) -1;],
927
gl_cv_header_inttypes_h=yes,
928
gl_cv_header_inttypes_h=no)])
929
if test $gl_cv_header_inttypes_h = yes; then
930
AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
931
[Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
932
and declares uintmax_t. ])
936
# lcmessage.m4 serial 4 (gettext-0.14.2)
937
dnl Copyright (C) 1995-2002, 2004-2005 Free Software Foundation, Inc.
938
dnl This file is free software; the Free Software Foundation
939
dnl gives unlimited permission to copy and/or distribute it,
940
dnl with or without modifications, as long as this notice is preserved.
942
dnl This file can can be used in projects which are not available under
943
dnl the GNU General Public License or the GNU Library General Public
944
dnl License but which still want to provide support for the GNU gettext
946
dnl Please note that the actual code of the GNU gettext library is covered
947
dnl by the GNU Library General Public License, and the rest of the GNU
948
dnl gettext package package is covered by the GNU General Public License.
949
dnl They are *not* in the public domain.
952
dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
954
# Check whether LC_MESSAGES is available in <locale.h>.
956
AC_DEFUN([gt_LC_MESSAGES],
958
AC_CACHE_CHECK([for LC_MESSAGES], gt_cv_val_LC_MESSAGES,
959
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
960
gt_cv_val_LC_MESSAGES=yes, gt_cv_val_LC_MESSAGES=no)])
961
if test $gt_cv_val_LC_MESSAGES = yes; then
962
AC_DEFINE(HAVE_LC_MESSAGES, 1,
963
[Define if your <locale.h> file defines LC_MESSAGES.])
967
# lib-ld.m4 serial 3 (gettext-0.13)
968
dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
969
dnl This file is free software; the Free Software Foundation
970
dnl gives unlimited permission to copy and/or distribute it,
971
dnl with or without modifications, as long as this notice is preserved.
973
dnl Subroutines of libtool.m4,
974
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
977
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
978
AC_DEFUN([AC_LIB_PROG_LD_GNU],
979
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
980
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
981
case `$LD -v 2>&1 </dev/null` in
982
*GNU* | *'with BFD'*)
983
acl_cv_prog_gnu_ld=yes ;;
985
acl_cv_prog_gnu_ld=no ;;
987
with_gnu_ld=$acl_cv_prog_gnu_ld
990
dnl From libtool-1.4. Sets the variable LD.
991
AC_DEFUN([AC_LIB_PROG_LD],
993
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
994
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
995
AC_REQUIRE([AC_PROG_CC])dnl
996
AC_REQUIRE([AC_CANONICAL_HOST])dnl
997
# Prepare PATH_SEPARATOR.
998
# The user is always right.
999
if test "${PATH_SEPARATOR+set}" != set; then
1000
echo "#! /bin/sh" >conf$$.sh
1001
echo "exit 0" >>conf$$.sh
1003
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
1011
if test "$GCC" = yes; then
1012
# Check if gcc -print-prog-name=ld gives a path.
1013
AC_MSG_CHECKING([for ld used by GCC])
1016
# gcc leaves a trailing carriage return which upsets mingw
1017
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1019
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1022
# Accept absolute paths.
1023
[[\\/]* | [A-Za-z]:[\\/]*)]
1024
[re_direlt='/[^/][^/]*/\.\./']
1025
# Canonicalize the path of ld
1026
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1027
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1028
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1030
test -z "$LD" && LD="$ac_prog"
1033
# If it fails, then pretend we aren't using GCC.
1037
# If it is relative, then search for the first ld in PATH.
1041
elif test "$with_gnu_ld" = yes; then
1042
AC_MSG_CHECKING([for GNU ld])
1044
AC_MSG_CHECKING([for non-GNU ld])
1046
AC_CACHE_VAL(acl_cv_path_LD,
1047
[if test -z "$LD"; then
1048
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1049
for ac_dir in $PATH; do
1050
test -z "$ac_dir" && ac_dir=.
1051
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1052
acl_cv_path_LD="$ac_dir/$ac_prog"
1053
# Check to see if the program is GNU ld. I'd rather use --version,
1054
# but apparently some GNU ld's only accept -v.
1055
# Break only if it was the GNU/non-GNU ld that we prefer.
1056
case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
1057
*GNU* | *'with BFD'*)
1058
test "$with_gnu_ld" != no && break ;;
1060
test "$with_gnu_ld" != yes && break ;;
1066
acl_cv_path_LD="$LD" # Let the user override the test with a path.
1068
LD="$acl_cv_path_LD"
1069
if test -n "$LD"; then
1074
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
1078
# lib-link.m4 serial 6 (gettext-0.14.3)
1079
dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
1080
dnl This file is free software; the Free Software Foundation
1081
dnl gives unlimited permission to copy and/or distribute it,
1082
dnl with or without modifications, as long as this notice is preserved.
1084
dnl From Bruno Haible.
1088
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
1089
dnl the libraries corresponding to explicit and implicit dependencies.
1090
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
1091
dnl augments the CPPFLAGS variable.
1092
AC_DEFUN([AC_LIB_LINKFLAGS],
1094
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1095
AC_REQUIRE([AC_LIB_RPATH])
1096
define([Name],[translit([$1],[./-], [___])])
1097
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1098
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1099
AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
1100
AC_LIB_LINKFLAGS_BODY([$1], [$2])
1101
ac_cv_lib[]Name[]_libs="$LIB[]NAME"
1102
ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
1103
ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
1105
LIB[]NAME="$ac_cv_lib[]Name[]_libs"
1106
LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
1107
INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
1108
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1110
AC_SUBST([LTLIB]NAME)
1111
dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
1112
dnl results of this search when this library appears as a dependency.
1118
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
1119
dnl searches for libname and the libraries corresponding to explicit and
1120
dnl implicit dependencies, together with the specified include files and
1121
dnl the ability to compile and link the specified testcode. If found, it
1122
dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
1123
dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
1124
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
1125
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
1126
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
1128
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1129
AC_REQUIRE([AC_LIB_RPATH])
1130
define([Name],[translit([$1],[./-], [___])])
1131
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1132
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1134
dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
1136
AC_LIB_LINKFLAGS_BODY([$1], [$2])
1138
dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
1139
dnl because if the user has installed lib[]Name and not disabled its use
1140
dnl via --without-lib[]Name-prefix, he wants to use it.
1141
ac_save_CPPFLAGS="$CPPFLAGS"
1142
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1144
AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
1145
ac_save_LIBS="$LIBS"
1146
LIBS="$LIBS $LIB[]NAME"
1147
AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
1148
LIBS="$ac_save_LIBS"
1150
if test "$ac_cv_lib[]Name" = yes; then
1152
AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
1153
AC_MSG_CHECKING([how to link with lib[]$1])
1154
AC_MSG_RESULT([$LIB[]NAME])
1157
dnl If $LIB[]NAME didn't lead to a usable library, we don't need
1158
dnl $INC[]NAME either.
1159
CPPFLAGS="$ac_save_CPPFLAGS"
1163
AC_SUBST([HAVE_LIB]NAME)
1165
AC_SUBST([LTLIB]NAME)
1170
dnl Determine the platform dependent parameters needed to use rpath:
1171
dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
1172
dnl hardcode_direct, hardcode_minus_L.
1173
AC_DEFUN([AC_LIB_RPATH],
1175
dnl Tell automake >= 1.10 to complain if config.rpath is missing.
1176
m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
1177
AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
1178
AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
1179
AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
1180
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
1181
AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
1182
CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
1183
${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
1189
libext="$acl_cv_libext"
1190
shlibext="$acl_cv_shlibext"
1191
hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
1192
hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
1193
hardcode_direct="$acl_cv_hardcode_direct"
1194
hardcode_minus_L="$acl_cv_hardcode_minus_L"
1195
dnl Determine whether the user wants rpath handling at all.
1196
AC_ARG_ENABLE(rpath,
1197
[ --disable-rpath do not hardcode runtime library paths],
1198
:, enable_rpath=yes)
1201
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
1202
dnl the libraries corresponding to explicit and implicit dependencies.
1203
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
1204
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
1206
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1207
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1208
dnl By default, look in $includedir and $libdir.
1210
AC_LIB_WITH_FINAL_PREFIX([
1211
eval additional_includedir=\"$includedir\"
1212
eval additional_libdir=\"$libdir\"
1214
AC_LIB_ARG_WITH([lib$1-prefix],
1215
[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
1216
--without-lib$1-prefix don't search for lib$1 in includedir and libdir],
1218
if test "X$withval" = "Xno"; then
1221
if test "X$withval" = "X"; then
1222
AC_LIB_WITH_FINAL_PREFIX([
1223
eval additional_includedir=\"$includedir\"
1224
eval additional_libdir=\"$libdir\"
1227
additional_includedir="$withval/include"
1228
additional_libdir="$withval/lib"
1232
dnl Search the library and its dependencies in $additional_libdir and
1233
dnl $LDFLAGS. Using breadth-first-seach.
1239
names_already_handled=
1240
names_next_round='$1 $2'
1241
while test -n "$names_next_round"; do
1242
names_this_round="$names_next_round"
1244
for name in $names_this_round; do
1246
for n in $names_already_handled; do
1247
if test "$n" = "$name"; then
1252
if test -z "$already_handled"; then
1253
names_already_handled="$names_already_handled $name"
1254
dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
1255
dnl or AC_LIB_HAVE_LINKFLAGS call.
1256
uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
1257
eval value=\"\$HAVE_LIB$uppername\"
1258
if test -n "$value"; then
1259
if test "$value" = yes; then
1260
eval value=\"\$LIB$uppername\"
1261
test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
1262
eval value=\"\$LTLIB$uppername\"
1263
test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
1265
dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
1266
dnl that this library doesn't exist. So just drop it.
1270
dnl Search the library lib$name in $additional_libdir and $LDFLAGS
1271
dnl and the already constructed $LIBNAME/$LTLIBNAME.
1276
if test $use_additional = yes; then
1277
if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
1278
found_dir="$additional_libdir"
1279
found_so="$additional_libdir/lib$name.$shlibext"
1280
if test -f "$additional_libdir/lib$name.la"; then
1281
found_la="$additional_libdir/lib$name.la"
1284
if test -f "$additional_libdir/lib$name.$libext"; then
1285
found_dir="$additional_libdir"
1286
found_a="$additional_libdir/lib$name.$libext"
1287
if test -f "$additional_libdir/lib$name.la"; then
1288
found_la="$additional_libdir/lib$name.la"
1293
if test "X$found_dir" = "X"; then
1294
for x in $LDFLAGS $LTLIB[]NAME; do
1295
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1298
dir=`echo "X$x" | sed -e 's/^X-L//'`
1299
if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
1301
found_so="$dir/lib$name.$shlibext"
1302
if test -f "$dir/lib$name.la"; then
1303
found_la="$dir/lib$name.la"
1306
if test -f "$dir/lib$name.$libext"; then
1308
found_a="$dir/lib$name.$libext"
1309
if test -f "$dir/lib$name.la"; then
1310
found_la="$dir/lib$name.la"
1316
if test "X$found_dir" != "X"; then
1321
if test "X$found_dir" != "X"; then
1322
dnl Found the library.
1323
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
1324
if test "X$found_so" != "X"; then
1325
dnl Linking with a shared library. We attempt to hardcode its
1326
dnl directory into the executable's runpath, unless it's the
1327
dnl standard /usr/lib.
1328
if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
1329
dnl No hardcoding is needed.
1330
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1332
dnl Use an explicit option to hardcode DIR into the resulting
1334
dnl Potentially add DIR to ltrpathdirs.
1335
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1337
for x in $ltrpathdirs; do
1338
if test "X$x" = "X$found_dir"; then
1343
if test -z "$haveit"; then
1344
ltrpathdirs="$ltrpathdirs $found_dir"
1346
dnl The hardcoding into $LIBNAME is system dependent.
1347
if test "$hardcode_direct" = yes; then
1348
dnl Using DIR/libNAME.so during linking hardcodes DIR into the
1349
dnl resulting binary.
1350
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1352
if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
1353
dnl Use an explicit option to hardcode DIR into the resulting
1355
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1356
dnl Potentially add DIR to rpathdirs.
1357
dnl The rpathdirs will be appended to $LIBNAME at the end.
1359
for x in $rpathdirs; do
1360
if test "X$x" = "X$found_dir"; then
1365
if test -z "$haveit"; then
1366
rpathdirs="$rpathdirs $found_dir"
1369
dnl Rely on "-L$found_dir".
1370
dnl But don't add it if it's already contained in the LDFLAGS
1371
dnl or the already constructed $LIBNAME
1373
for x in $LDFLAGS $LIB[]NAME; do
1374
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1375
if test "X$x" = "X-L$found_dir"; then
1380
if test -z "$haveit"; then
1381
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
1383
if test "$hardcode_minus_L" != no; then
1384
dnl FIXME: Not sure whether we should use
1385
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1387
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1389
dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
1390
dnl here, because this doesn't fit in flags passed to the
1391
dnl compiler. So give up. No hardcoding. This affects only
1392
dnl very old systems.
1393
dnl FIXME: Not sure whether we should use
1394
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1396
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1402
if test "X$found_a" != "X"; then
1403
dnl Linking with a static library.
1404
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
1406
dnl We shouldn't come here, but anyway it's good to have a
1408
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
1411
dnl Assume the include files are nearby.
1412
additional_includedir=
1413
case "$found_dir" in
1415
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
1416
additional_includedir="$basedir/include"
1419
if test "X$additional_includedir" != "X"; then
1420
dnl Potentially add $additional_includedir to $INCNAME.
1421
dnl But don't add it
1422
dnl 1. if it's the standard /usr/include,
1423
dnl 2. if it's /usr/local/include and we are using GCC on Linux,
1424
dnl 3. if it's already present in $CPPFLAGS or the already
1425
dnl constructed $INCNAME,
1426
dnl 4. if it doesn't exist as a directory.
1427
if test "X$additional_includedir" != "X/usr/include"; then
1429
if test "X$additional_includedir" = "X/usr/local/include"; then
1430
if test -n "$GCC"; then
1432
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1436
if test -z "$haveit"; then
1437
for x in $CPPFLAGS $INC[]NAME; do
1438
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1439
if test "X$x" = "X-I$additional_includedir"; then
1444
if test -z "$haveit"; then
1445
if test -d "$additional_includedir"; then
1446
dnl Really add $additional_includedir to $INCNAME.
1447
INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
1453
dnl Look for dependencies.
1454
if test -n "$found_la"; then
1455
dnl Read the .la file. It defines the variables
1456
dnl dlname, library_names, old_library, dependency_libs, current,
1457
dnl age, revision, installed, dlopen, dlpreopen, libdir.
1458
save_libdir="$libdir"
1460
*/* | *\\*) . "$found_la" ;;
1461
*) . "./$found_la" ;;
1463
libdir="$save_libdir"
1464
dnl We use only dependency_libs.
1465
for dep in $dependency_libs; do
1468
additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
1469
dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
1470
dnl But don't add it
1471
dnl 1. if it's the standard /usr/lib,
1472
dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
1473
dnl 3. if it's already present in $LDFLAGS or the already
1474
dnl constructed $LIBNAME,
1475
dnl 4. if it doesn't exist as a directory.
1476
if test "X$additional_libdir" != "X/usr/lib"; then
1478
if test "X$additional_libdir" = "X/usr/local/lib"; then
1479
if test -n "$GCC"; then
1481
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1485
if test -z "$haveit"; then
1487
for x in $LDFLAGS $LIB[]NAME; do
1488
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1489
if test "X$x" = "X-L$additional_libdir"; then
1494
if test -z "$haveit"; then
1495
if test -d "$additional_libdir"; then
1496
dnl Really add $additional_libdir to $LIBNAME.
1497
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
1501
for x in $LDFLAGS $LTLIB[]NAME; do
1502
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1503
if test "X$x" = "X-L$additional_libdir"; then
1508
if test -z "$haveit"; then
1509
if test -d "$additional_libdir"; then
1510
dnl Really add $additional_libdir to $LTLIBNAME.
1511
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
1518
dir=`echo "X$dep" | sed -e 's/^X-R//'`
1519
if test "$enable_rpath" != no; then
1520
dnl Potentially add DIR to rpathdirs.
1521
dnl The rpathdirs will be appended to $LIBNAME at the end.
1523
for x in $rpathdirs; do
1524
if test "X$x" = "X$dir"; then
1529
if test -z "$haveit"; then
1530
rpathdirs="$rpathdirs $dir"
1532
dnl Potentially add DIR to ltrpathdirs.
1533
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1535
for x in $ltrpathdirs; do
1536
if test "X$x" = "X$dir"; then
1541
if test -z "$haveit"; then
1542
ltrpathdirs="$ltrpathdirs $dir"
1547
dnl Handle this in the next round.
1548
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
1551
dnl Handle this in the next round. Throw away the .la's
1552
dnl directory; it is already contained in a preceding -L
1554
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
1557
dnl Most likely an immediate library name.
1558
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
1559
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
1565
dnl Didn't find the library; assume it is in the system directories
1566
dnl known to the linker and runtime loader. (All the system
1567
dnl directories known to the linker should also be known to the
1568
dnl runtime loader, otherwise the system is severely misconfigured.)
1569
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1570
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
1576
if test "X$rpathdirs" != "X"; then
1577
if test -n "$hardcode_libdir_separator"; then
1578
dnl Weird platform: only the last -rpath option counts, the user must
1579
dnl pass all path elements in one option. We can arrange that for a
1580
dnl single library, but not when more than one $LIBNAMEs are used.
1582
for found_dir in $rpathdirs; do
1583
alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
1585
dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
1586
acl_save_libdir="$libdir"
1588
eval flag=\"$hardcode_libdir_flag_spec\"
1589
libdir="$acl_save_libdir"
1590
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1592
dnl The -rpath options are cumulative.
1593
for found_dir in $rpathdirs; do
1594
acl_save_libdir="$libdir"
1596
eval flag=\"$hardcode_libdir_flag_spec\"
1597
libdir="$acl_save_libdir"
1598
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1602
if test "X$ltrpathdirs" != "X"; then
1603
dnl When using libtool, the option that works for both libraries and
1604
dnl executables is -R. The -R options are cumulative.
1605
for found_dir in $ltrpathdirs; do
1606
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
1611
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
1612
dnl unless already present in VAR.
1613
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
1614
dnl contains two or three consecutive elements that belong together.
1615
AC_DEFUN([AC_LIB_APPENDTOVAR],
1617
for element in [$2]; do
1620
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1621
if test "X$x" = "X$element"; then
1626
if test -z "$haveit"; then
1627
[$1]="${[$1]}${[$1]:+ }$element"
1632
# lib-prefix.m4 serial 4 (gettext-0.14.2)
1633
dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
1634
dnl This file is free software; the Free Software Foundation
1635
dnl gives unlimited permission to copy and/or distribute it,
1636
dnl with or without modifications, as long as this notice is preserved.
1638
dnl From Bruno Haible.
1640
dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
1641
dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
1642
dnl require excessive bracketing.
1643
ifdef([AC_HELP_STRING],
1644
[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
1645
[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
1647
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
1648
dnl to access previously installed libraries. The basic assumption is that
1649
dnl a user will want packages to use other packages he previously installed
1650
dnl with the same --prefix option.
1651
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
1652
dnl libraries, but is otherwise very convenient.
1653
AC_DEFUN([AC_LIB_PREFIX],
1655
AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
1656
AC_REQUIRE([AC_PROG_CC])
1657
AC_REQUIRE([AC_CANONICAL_HOST])
1658
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1659
dnl By default, look in $includedir and $libdir.
1661
AC_LIB_WITH_FINAL_PREFIX([
1662
eval additional_includedir=\"$includedir\"
1663
eval additional_libdir=\"$libdir\"
1665
AC_LIB_ARG_WITH([lib-prefix],
1666
[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
1667
--without-lib-prefix don't search for libraries in includedir and libdir],
1669
if test "X$withval" = "Xno"; then
1672
if test "X$withval" = "X"; then
1673
AC_LIB_WITH_FINAL_PREFIX([
1674
eval additional_includedir=\"$includedir\"
1675
eval additional_libdir=\"$libdir\"
1678
additional_includedir="$withval/include"
1679
additional_libdir="$withval/lib"
1683
if test $use_additional = yes; then
1684
dnl Potentially add $additional_includedir to $CPPFLAGS.
1685
dnl But don't add it
1686
dnl 1. if it's the standard /usr/include,
1687
dnl 2. if it's already present in $CPPFLAGS,
1688
dnl 3. if it's /usr/local/include and we are using GCC on Linux,
1689
dnl 4. if it doesn't exist as a directory.
1690
if test "X$additional_includedir" != "X/usr/include"; then
1692
for x in $CPPFLAGS; do
1693
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1694
if test "X$x" = "X-I$additional_includedir"; then
1699
if test -z "$haveit"; then
1700
if test "X$additional_includedir" = "X/usr/local/include"; then
1701
if test -n "$GCC"; then
1703
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1707
if test -z "$haveit"; then
1708
if test -d "$additional_includedir"; then
1709
dnl Really add $additional_includedir to $CPPFLAGS.
1710
CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
1715
dnl Potentially add $additional_libdir to $LDFLAGS.
1716
dnl But don't add it
1717
dnl 1. if it's the standard /usr/lib,
1718
dnl 2. if it's already present in $LDFLAGS,
1719
dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
1720
dnl 4. if it doesn't exist as a directory.
1721
if test "X$additional_libdir" != "X/usr/lib"; then
1723
for x in $LDFLAGS; do
1724
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1725
if test "X$x" = "X-L$additional_libdir"; then
1730
if test -z "$haveit"; then
1731
if test "X$additional_libdir" = "X/usr/local/lib"; then
1732
if test -n "$GCC"; then
1734
linux*) haveit=yes;;
1738
if test -z "$haveit"; then
1739
if test -d "$additional_libdir"; then
1740
dnl Really add $additional_libdir to $LDFLAGS.
1741
LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
1749
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
1750
dnl acl_final_exec_prefix, containing the values to which $prefix and
1751
dnl $exec_prefix will expand at the end of the configure script.
1752
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
1754
dnl Unfortunately, prefix and exec_prefix get only finally determined
1755
dnl at the end of configure.
1756
if test "X$prefix" = "XNONE"; then
1757
acl_final_prefix="$ac_default_prefix"
1759
acl_final_prefix="$prefix"
1761
if test "X$exec_prefix" = "XNONE"; then
1762
acl_final_exec_prefix='${prefix}'
1764
acl_final_exec_prefix="$exec_prefix"
1766
acl_save_prefix="$prefix"
1767
prefix="$acl_final_prefix"
1768
eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
1769
prefix="$acl_save_prefix"
1772
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
1773
dnl variables prefix and exec_prefix bound to the values they will have
1774
dnl at the end of the configure script.
1775
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
1777
acl_save_prefix="$prefix"
1778
prefix="$acl_final_prefix"
1779
acl_save_exec_prefix="$exec_prefix"
1780
exec_prefix="$acl_final_exec_prefix"
1782
exec_prefix="$acl_save_exec_prefix"
1783
prefix="$acl_save_prefix"
1786
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1788
# serial 47 Debian 1.5.20-2 AC_PROG_LIBTOOL
1791
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
1792
# -----------------------------------------------------------
1793
# If this macro is not defined by Autoconf, define it here.
1794
m4_ifdef([AC_PROVIDE_IFELSE],
1796
[m4_define([AC_PROVIDE_IFELSE],
1797
[m4_ifdef([AC_PROVIDE_$1],
290
1802
# ---------------
291
AC_DEFUN([AM_SANITY_CHECK],
292
[AC_MSG_CHECKING([whether build environment is sane])
295
echo timestamp > conftest.file
296
# Do `set' in a subshell so we don't clobber the current shell's
297
# arguments. Must try -L first in case configure is actually a
298
# symlink; some systems play weird games with the mod time of symlinks
299
# (eg FreeBSD returns the mod time of the symlink's containing
302
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
303
if test "$[*]" = "X"; then
305
set X `ls -t $srcdir/configure conftest.file`
308
if test "$[*]" != "X $srcdir/configure conftest.file" \
309
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
311
# If neither matched, then we have a broken ls. This can happen
312
# if, for instance, CONFIG_SHELL is bash and it inherits a
313
# broken ls alias from the environment. This has actually
314
# happened. Such a system could not be considered "sane".
315
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
316
alias in your environment])
319
test "$[2]" = conftest.file
325
AC_MSG_ERROR([newly created file is older than distributed files!
326
Check your system clock])
333
# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
335
# This program is free software; you can redistribute it and/or modify
336
# it under the terms of the GNU General Public License as published by
337
# the Free Software Foundation; either version 2, or (at your option)
340
# This program is distributed in the hope that it will be useful,
341
# but WITHOUT ANY WARRANTY; without even the implied warranty of
342
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
343
# GNU General Public License for more details.
345
# You should have received a copy of the GNU General Public License
346
# along with this program; if not, write to the Free Software
347
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
352
# AM_MISSING_PROG(NAME, PROGRAM)
353
# ------------------------------
354
AC_DEFUN([AM_MISSING_PROG],
355
[AC_REQUIRE([AM_MISSING_HAS_RUN])
356
$1=${$1-"${am_missing_run}$2"}
362
# Define MISSING if not defined so far and test if it supports --run.
363
# If it does, set am_missing_run to use it, otherwise, to nothing.
364
AC_DEFUN([AM_MISSING_HAS_RUN],
365
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
366
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
367
# Use eval to expand $SHELL
368
if eval "$MISSING --run true"; then
369
am_missing_run="$MISSING --run "
372
AC_MSG_WARN([`missing' script is too old or missing])
378
# Copyright 2001 Free Software Foundation, Inc.
380
# This program is free software; you can redistribute it and/or modify
381
# it under the terms of the GNU General Public License as published by
382
# the Free Software Foundation; either version 2, or (at your option)
385
# This program is distributed in the hope that it will be useful,
386
# but WITHOUT ANY WARRANTY; without even the implied warranty of
387
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
388
# GNU General Public License for more details.
390
# You should have received a copy of the GNU General Public License
391
# along with this program; if not, write to the Free Software
392
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
395
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
396
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
397
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
399
# Of course, Automake must honor this variable whenever it calls a
400
# tool from the auxiliary directory. The problem is that $srcdir (and
401
# therefore $ac_aux_dir as well) can be either absolute or relative,
402
# depending on how configure is run. This is pretty annoying, since
403
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
404
# source directory, any form will work fine, but in subdirectories a
405
# relative path needs to be adjusted first.
407
# $ac_aux_dir/missing
408
# fails when called from a subdirectory if $ac_aux_dir is relative
409
# $top_srcdir/$ac_aux_dir/missing
410
# fails if $ac_aux_dir is absolute,
411
# fails when called from a subdirectory in a VPATH build with
412
# a relative $ac_aux_dir
414
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
415
# are both prefixed by $srcdir. In an in-source build this is usually
416
# harmless because $srcdir is `.', but things will broke when you
417
# start a VPATH build or use an absolute $srcdir.
419
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
420
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
421
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
422
# and then we would define $MISSING as
423
# MISSING="\${SHELL} $am_aux_dir/missing"
424
# This will work as long as MISSING is not called from configure, because
425
# unfortunately $(top_srcdir) has no meaning in configure.
426
# However there are other variables, like CC, which are often used in
427
# configure, and could therefore not use this "fixed" $ac_aux_dir.
429
# Another solution, used here, is to always expand $ac_aux_dir to an
430
# absolute PATH. The drawback is that using absolute paths prevent a
431
# configured tree to be moved without reconfiguration.
433
# Rely on autoconf to set up CDPATH properly.
436
AC_DEFUN([AM_AUX_DIR_EXPAND], [
437
# expand $ac_aux_dir to an absolute path
438
am_aux_dir=`cd $ac_aux_dir && pwd`
443
# Define $install_sh.
445
# Copyright 2001 Free Software Foundation, Inc.
447
# This program is free software; you can redistribute it and/or modify
448
# it under the terms of the GNU General Public License as published by
449
# the Free Software Foundation; either version 2, or (at your option)
452
# This program is distributed in the hope that it will be useful,
453
# but WITHOUT ANY WARRANTY; without even the implied warranty of
454
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
455
# GNU General Public License for more details.
457
# You should have received a copy of the GNU General Public License
458
# along with this program; if not, write to the Free Software
459
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
462
AC_DEFUN([AM_PROG_INSTALL_SH],
463
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
464
install_sh=${install_sh-"$am_aux_dir/install-sh"}
465
AC_SUBST(install_sh)])
467
# AM_PROG_INSTALL_STRIP
469
# Copyright 2001 Free Software Foundation, Inc.
471
# This program is free software; you can redistribute it and/or modify
472
# it under the terms of the GNU General Public License as published by
473
# the Free Software Foundation; either version 2, or (at your option)
476
# This program is distributed in the hope that it will be useful,
477
# but WITHOUT ANY WARRANTY; without even the implied warranty of
478
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
479
# GNU General Public License for more details.
481
# You should have received a copy of the GNU General Public License
482
# along with this program; if not, write to the Free Software
483
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
486
# One issue with vendor `install' (even GNU) is that you can't
487
# specify the program used to strip binaries. This is especially
488
# annoying in cross-compiling environments, where the build's strip
489
# is unlikely to handle the host's binaries.
490
# Fortunately install-sh will honor a STRIPPROG variable, so we
491
# always use install-sh in `make install-strip', and initialize
492
# STRIPPROG with the value of the STRIP variable (set by the user).
493
AC_DEFUN([AM_PROG_INSTALL_STRIP],
494
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
495
# Installed binaries are usually stripped using `strip' when the user
496
# run `make install-strip'. However `strip' might not be the right
497
# tool to use in cross-compilation environments, therefore Automake
498
# will honor the `STRIP' environment variable to overrule this program.
499
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
500
if test "$cross_compiling" != no; then
501
AC_CHECK_TOOL([STRIP], [strip], :)
503
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
504
AC_SUBST([INSTALL_STRIP_PROGRAM])])
506
# serial 4 -*- Autoconf -*-
508
# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
510
# This program is free software; you can redistribute it and/or modify
511
# it under the terms of the GNU General Public License as published by
512
# the Free Software Foundation; either version 2, or (at your option)
515
# This program is distributed in the hope that it will be useful,
516
# but WITHOUT ANY WARRANTY; without even the implied warranty of
517
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
518
# GNU General Public License for more details.
520
# You should have received a copy of the GNU General Public License
521
# along with this program; if not, write to the Free Software
522
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
526
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
527
# written in clear, in which case automake, when reading aclocal.m4,
528
# will think it sees a *use*, and therefore will trigger all it's
529
# C support machinery. Also note that it means that autoscan, seeing
530
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
534
# _AM_DEPENDENCIES(NAME)
535
# ----------------------
536
# See how the compiler implements dependency checking.
537
# NAME is "CC", "CXX", "GCJ", or "OBJC".
538
# We try a few techniques and use that to set a single cache variable.
540
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
541
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
542
# dependency, and given that the user is not expected to run this macro,
543
# just rely on AC_PROG_CC.
544
AC_DEFUN([_AM_DEPENDENCIES],
545
[AC_REQUIRE([AM_SET_DEPDIR])dnl
546
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
547
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
548
AC_REQUIRE([AM_DEP_TRACK])dnl
550
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
551
[$1], CXX, [depcc="$CXX" am_compiler_list=],
552
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
553
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
554
[depcc="$$1" am_compiler_list=])
556
AC_CACHE_CHECK([dependency style of $depcc],
557
[am_cv_$1_dependencies_compiler_type],
558
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
559
# We make a subdir and do the tests there. Otherwise we can end up
560
# making bogus files that we don't know about and never remove. For
561
# instance it was reported that on HP-UX the gcc test will end up
562
# making a dummy file named `D' -- because `-MD' means `put the output
565
# Copy depcomp to subdir because otherwise we won't find it if we're
566
# using a relative directory.
567
cp "$am_depcomp" conftest.dir
570
am_cv_$1_dependencies_compiler_type=none
571
if test "$am_compiler_list" = ""; then
572
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
574
for depmode in $am_compiler_list; do
575
# We need to recreate these files for each test, as the compiler may
576
# overwrite some of them when testing with obscure command lines.
577
# This happens at least with the AIX C compiler.
578
echo '#include "conftest.h"' > conftest.c
579
echo 'int i;' > conftest.h
580
echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
584
# after this tag, mechanisms are not by side-effect, so they'll
585
# only be used when explicitly requested
586
if test "x$enable_dependency_tracking" = xyes; then
594
# We check with `-c' and `-o' for the sake of the "dashmstdout"
595
# mode. It turns out that the SunPro C++ compiler does not properly
596
# handle `-M -o', and we need to detect this.
597
if depmode=$depmode \
598
source=conftest.c object=conftest.o \
599
depfile=conftest.Po tmpdepfile=conftest.TPo \
600
$SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
601
grep conftest.h conftest.Po > /dev/null 2>&1 &&
602
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
603
am_cv_$1_dependencies_compiler_type=$depmode
611
am_cv_$1_dependencies_compiler_type=none
614
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
620
# Choose a directory name for dependency files.
621
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
622
AC_DEFUN([AM_SET_DEPDIR],
623
[rm -f .deps 2>/dev/null
624
mkdir .deps 2>/dev/null
625
if test -d .deps; then
628
# MS-DOS does not allow filenames that begin with a dot.
631
rmdir .deps 2>/dev/null
638
AC_DEFUN([AM_DEP_TRACK],
639
[AC_ARG_ENABLE(dependency-tracking,
640
[ --disable-dependency-tracking Speeds up one-time builds
641
--enable-dependency-tracking Do not reject slow dependency extractors])
642
if test "x$enable_dependency_tracking" != xno; then
643
am_depcomp="$ac_aux_dir/depcomp"
646
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
647
AC_SUBST([AMDEPBACKSLASH])
650
# Generate code to set up dependency tracking. -*- Autoconf -*-
652
# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
654
# This program is free software; you can redistribute it and/or modify
655
# it under the terms of the GNU General Public License as published by
656
# the Free Software Foundation; either version 2, or (at your option)
659
# This program is distributed in the hope that it will be useful,
660
# but WITHOUT ANY WARRANTY; without even the implied warranty of
661
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
662
# GNU General Public License for more details.
664
# You should have received a copy of the GNU General Public License
665
# along with this program; if not, write to the Free Software
666
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
671
# _AM_OUTPUT_DEPENDENCY_COMMANDS
672
# ------------------------------
673
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
674
[for mf in $CONFIG_FILES; do
675
# Strip MF so we end up with the name of the file.
676
mf=`echo "$mf" | sed -e 's/:.*$//'`
677
# Check whether this is an Automake generated Makefile or not.
678
# We used to match only the files named `Makefile.in', but
679
# some people rename them; so instead we look at the file content.
680
# Grep'ing the first line is not enough: some people post-process
681
# each Makefile.in and add a new line on top of each file to say so.
682
# So let's grep whole file.
683
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
684
dirpart=`AS_DIRNAME("$mf")`
688
grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
689
# Extract the definition of DEP_FILES from the Makefile without
691
DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
692
test -z "$DEPDIR" && continue
693
# When using ansi2knr, U may be empty or an underscore; expand it
694
U=`sed -n -e '/^U = / s///p' < "$mf"`
695
test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
696
# We invoke sed twice because it is the simplest approach to
697
# changing $(DEPDIR) to its actual value in the expansion.
698
for file in `sed -n -e '
699
/^DEP_FILES = .*\\\\$/ {
708
/^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
709
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
710
# Make sure the directory exists.
711
test -f "$dirpart/$file" && continue
712
fdir=`AS_DIRNAME(["$file"])`
713
AS_MKDIR_P([$dirpart/$fdir])
714
# echo "creating $dirpart/$file"
715
echo '# dummy' > "$dirpart/$file"
718
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
721
# AM_OUTPUT_DEPENDENCY_COMMANDS
722
# -----------------------------
723
# This macro should only be invoked once -- use via AC_REQUIRE.
725
# This code is only required when automatic dependency tracking
726
# is enabled. FIXME. This creates each `.P' file that we will
727
# need in order to bootstrap the dependency handling code.
728
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
729
[AC_CONFIG_COMMANDS([depfiles],
730
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
731
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
734
# Copyright 2001 Free Software Foundation, Inc. -*- Autoconf -*-
736
# This program is free software; you can redistribute it and/or modify
737
# it under the terms of the GNU General Public License as published by
738
# the Free Software Foundation; either version 2, or (at your option)
741
# This program is distributed in the hope that it will be useful,
742
# but WITHOUT ANY WARRANTY; without even the implied warranty of
743
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
744
# GNU General Public License for more details.
746
# You should have received a copy of the GNU General Public License
747
# along with this program; if not, write to the Free Software
748
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
755
# Check to see how make treats includes.
756
AC_DEFUN([AM_MAKE_INCLUDE],
757
[am_make=${MAKE-make}
758
cat > confinc << 'END'
762
# If we don't find an include directive, just comment out the code.
763
AC_MSG_CHECKING([for style of include used by $am_make])
767
# First try GNU make style include.
768
echo "include confinc" > confmf
769
# We grep out `Entering directory' and `Leaving directory'
770
# messages which can occur if `w' ends up in MAKEFLAGS.
771
# In particular we don't look at `^make:' because GNU make might
772
# be invoked under some other name (usually "gmake"), in which
773
# case it prints its new name instead of `make'.
774
if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
779
# Now try BSD make style include.
780
if test "$am__include" = "#"; then
781
echo '.include "confinc"' > confmf
782
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
788
AC_SUBST(am__include)
790
AC_MSG_RESULT($_am_result)
794
# AM_CONDITIONAL -*- Autoconf -*-
796
# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
798
# This program is free software; you can redistribute it and/or modify
799
# it under the terms of the GNU General Public License as published by
800
# the Free Software Foundation; either version 2, or (at your option)
803
# This program is distributed in the hope that it will be useful,
804
# but WITHOUT ANY WARRANTY; without even the implied warranty of
805
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
806
# GNU General Public License for more details.
808
# You should have received a copy of the GNU General Public License
809
# along with this program; if not, write to the Free Software
810
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
817
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
818
# -------------------------------------
819
# Define a conditional.
820
AC_DEFUN([AM_CONDITIONAL],
821
[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
822
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
832
AC_CONFIG_COMMANDS_PRE(
833
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
834
AC_MSG_ERROR([conditional \"$1\" was never defined.
835
Usually this means the macro was only invoked conditionally.])
838
# libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
840
# serial 46 AC_PROG_LIBTOOL
842
1803
AC_DEFUN([AC_PROG_LIBTOOL],
1804
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
1805
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
1806
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
1807
AC_PROVIDE_IFELSE([AC_PROG_CXX],
1809
[define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
1811
dnl And a similar setup for Fortran 77 support
1812
AC_PROVIDE_IFELSE([AC_PROG_F77],
1814
[define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
1817
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
1818
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
1819
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
1820
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1822
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1824
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
1826
[ifdef([AC_PROG_GCJ],
1827
[define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
1828
ifdef([A][M_PROG_GCJ],
1829
[define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
1830
ifdef([LT_AC_PROG_GCJ],
1831
[define([LT_AC_PROG_GCJ],
1832
defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
1833
])])# AC_PROG_LIBTOOL
1838
AC_DEFUN([_AC_PROG_LIBTOOL],
843
1839
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
1840
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
1841
AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
1842
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
845
1844
# This can be used to rebuild libtool when needed
846
1845
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
1940
2824
ln conftest.a conftest.b 2>/dev/null && hard_links=no
1941
2825
AC_MSG_RESULT([$hard_links])
1942
2826
if test "$hard_links" = no; then
1943
AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
2827
AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1944
2828
need_locks=warn
1950
if test "$GCC" = yes; then
1951
# Check to see if options -fno-rtti -fno-exceptions are supported by compiler
1952
AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
1953
echo "int some_variable = 0;" > conftest.$ac_ext
1954
save_CFLAGS="$CFLAGS"
1955
CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
1956
compiler_rtti_exceptions=no
1957
AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1958
# The compiler can only warn and ignore the option if not recognized
1959
# So say no if there are warnings
1960
if test -s conftest.err; then
1961
compiler_rtti_exceptions=no
1963
compiler_rtti_exceptions=yes
1966
CFLAGS="$save_CFLAGS"
1967
AC_MSG_RESULT([$compiler_rtti_exceptions])
1969
if test "$compiler_rtti_exceptions" = "yes"; then
1970
no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
1972
no_builtin_flag=' -fno-builtin'
1976
# See if the linker supports building shared libraries.
1977
AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
1979
allow_undefined_flag=
1981
need_lib_prefix=unknown
1982
need_version=unknown
1983
# when you set need_version to no, make sure it does not cause -set_version
1984
# flags to be left without arguments
1986
archive_expsym_cmds=
1987
old_archive_from_new_cmds=
1988
old_archive_from_expsyms_cmds=
1989
export_dynamic_flag_spec=
1990
whole_archive_flag_spec=
1991
thread_safe_flag_spec=
1992
hardcode_into_libs=no
1993
hardcode_libdir_flag_spec=
1994
hardcode_libdir_separator=
1997
hardcode_shlibpath_var=unsupported
1999
link_all_deplibs=unknown
2000
always_export_symbols=no
2001
export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
2002
# include_expsyms should be a list of space-separated symbols to be *always*
2003
# included in the symbol list
2005
# exclude_expsyms can be an egrep regular expression of symbols to exclude
2006
# it will be wrapped by ` (' and `)$', so one must not match beginning or
2007
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
2008
# as well as any symbol that contains `d'.
2009
exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
2010
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
2011
# platforms (ab)use it in PIC code, but their linkers get confused if
2012
# the symbol is explicitly referenced. Since portable code cannot
2013
# rely on this symbol name, it's probably fine to never include it in
2014
# preloaded symbol tables.
2015
extract_expsyms_cmds=
2018
cygwin* | mingw* | pw32*)
2019
# FIXME: the MSVC++ port hasn't been tested in a loooong time
2020
# When not using gcc, we currently assume that we are using
2021
# Microsoft Visual C++.
2022
if test "$GCC" != yes; then
2032
if test "$with_gnu_ld" = yes; then
2033
# If archive_cmds runs LD, not CC, wlarc should be empty
2036
# See if GNU ld supports shared libraries.
2038
aix3* | aix4* | aix5*)
2039
# On AIX, the GNU linker is very broken
2040
# Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
2044
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
2045
*** to be unable to reliably create shared libraries on AIX.
2046
*** Therefore, libtool is disabling shared libraries support. If you
2047
*** really care for shared libraries, you may want to modify your PATH
2048
*** so that a non-GNU linker is found, and then restart.
2054
archive_cmds='$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)'
2055
hardcode_libdir_flag_spec='-L$libdir'
2056
hardcode_minus_L=yes
2058
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
2059
# that the semantics of dynamic libraries on AmigaOS, at least up
2060
# to version 4, is to share data among multiple programs linked
2061
# with the same dynamic library. Since this doesn't match the
2062
# behavior of shared libraries on other platforms, we can use
2068
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2069
allow_undefined_flag=unsupported
2070
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
2071
# support --undefined. This deserves some investigation. FIXME
2072
archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2078
cygwin* | mingw* | pw32*)
2079
# hardcode_libdir_flag_spec is actually meaningless, as there is
2080
# no search path for DLLs.
2081
hardcode_libdir_flag_spec='-L$libdir'
2082
allow_undefined_flag=unsupported
2083
always_export_symbols=yes
2085
extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
2086
sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
2087
test -f $output_objdir/impgen.exe || (cd $output_objdir && \
2088
if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
2089
else $CC -o impgen impgen.c ; fi)~
2090
$output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
2092
old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
2094
# cygwin and mingw dlls have different entry points and sets of symbols
2096
# FIXME: what about values for MSVC?
2097
dll_entry=__cygwin_dll_entry@12
2098
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
2102
dll_entry=_DllMainCRTStartup@12
2103
dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
2107
# mingw and cygwin differ, and it's simplest to just exclude the union
2108
# of the two symbol sets.
2109
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
2111
# recent cygwin and mingw systems supply a stub DllMain which the user
2112
# can override, but on older systems we have to supply one (in ltdll.c)
2113
if test "x$lt_cv_need_dllmain" = "xyes"; then
2114
ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
2115
ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
2116
test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
2122
# Extract the symbol export list from an `--export-all' def file,
2123
# then regenerate the def file from the symbol export list, so that
2124
# the compiled dll only exports the symbol export list.
2125
# Be careful not to strip the DATA tag left be newer dlltools.
2126
export_symbols_cmds="$ltdll_cmds"'
2127
$DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
2128
sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
2130
# If the export-symbols file already is a .def file (1st line
2131
# is EXPORTS), use it as is.
2132
# If DATA tags from a recent dlltool are present, honour them!
2133
archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
2134
cp $export_symbols $output_objdir/$soname-def;
2136
echo EXPORTS > $output_objdir/$soname-def;
2138
cat $export_symbols | while read symbol; do
2141
2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
2142
*) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
2144
_lt_hint=`expr 1 + \$_lt_hint`;
2148
$CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
2149
$DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
2150
$CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
2151
$DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
2152
$CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
2156
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2157
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
2160
archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2161
archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2166
if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
2170
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
2171
*** create shared libraries on Solaris systems. Therefore, libtool
2172
*** is disabling shared libraries support. We urge you to upgrade GNU
2173
*** binutils to release 2.9.1 or newer. Another option is to modify
2174
*** your PATH or compiler configuration so that the native linker is
2175
*** used, and then restart.
2178
elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2179
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2180
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2187
archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2190
hardcode_shlibpath_var=no
2194
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2195
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2196
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2203
if test "$ld_shlibs" = yes; then
2204
runpath_var=LD_RUN_PATH
2205
hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
2206
export_dynamic_flag_spec='${wl}--export-dynamic'
2208
cygwin* | mingw* | pw32*)
2209
# dlltool doesn't understand --whole-archive et. al.
2210
whole_archive_flag_spec=
2213
# ancient GNU ld didn't support --whole-archive et. al.
2214
if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
2215
whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2217
whole_archive_flag_spec=
2833
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
2838
AC_DEFUN([AC_LIBTOOL_OBJDIR],
2839
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2840
[rm -f .libs 2>/dev/null
2841
mkdir .libs 2>/dev/null
2842
if test -d .libs; then
2223
# PORTME fill in a description of your system's linker (not GNU ld)
2226
allow_undefined_flag=unsupported
2227
always_export_symbols=yes
2228
archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
2229
# Note: this linker hardcodes the directories in LIBPATH if there
2230
# are no directories specified by -L.
2231
hardcode_minus_L=yes
2232
if test "$GCC" = yes && test -z "$link_static_flag"; then
2233
# Neither direct hardcoding nor static linking is supported with a
2235
hardcode_direct=unsupported
2240
if test "$host_cpu" = ia64; then
2241
# On IA64, the linker does run time linking by default, so we don't
2242
# have to do anything special.
2243
aix_use_runtimelinking=no
2244
exp_sym_flag='-Bexport'
2247
aix_use_runtimelinking=no
2249
# Test if we are trying to use run time linking or normal
2250
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
2251
# need to do runtime linking.
2252
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2253
for ld_flag in $LDFLAGS; do
2254
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
2255
aix_use_runtimelinking=yes
2261
exp_sym_flag='-bexport'
2262
no_entry_flag='-bnoentry'
2265
# When large executables or shared objects are built, AIX ld can
2266
# have problems creating the table of contents. If linking a library
2267
# or program results in "error TOC overflow" add -mminimal-toc to
2268
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
2269
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2273
hardcode_libdir_separator=':'
2274
if test "$GCC" = yes; then
2275
case $host_os in aix4.[[012]]|aix4.[[012]].*)
2276
collect2name=`${CC} -print-prog-name=collect2`
2277
if test -f "$collect2name" && \
2278
strings "$collect2name" | grep resolve_lib_name >/dev/null
2280
# We have reworked collect2
2283
# We have old collect2
2284
hardcode_direct=unsupported
2285
# It fails to find uninstalled libraries when the uninstalled
2286
# path is not listed in the libpath. Setting hardcode_minus_L
2287
# to unsupported forces relinking
2288
hardcode_minus_L=yes
2289
hardcode_libdir_flag_spec='-L$libdir'
2290
hardcode_libdir_separator=
2294
shared_flag='-shared'
2297
if test "$host_cpu" = ia64; then
2298
shared_flag='${wl}-G'
2300
if test "$aix_use_runtimelinking" = yes; then
2301
shared_flag='${wl}-G'
2303
shared_flag='${wl}-bM:SRE'
2308
# It seems that -bexpall can do strange things, so it is better to
2309
# generate a list of symbols to export.
2310
always_export_symbols=yes
2311
if test "$aix_use_runtimelinking" = yes; then
2312
# Warning - without using the other runtime loading flags (-brtl),
2313
# -berok will link without error, but may produce a broken library.
2314
allow_undefined_flag='-berok'
2315
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
2316
archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
2318
if test "$host_cpu" = ia64; then
2319
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
2320
allow_undefined_flag="-z nodefs"
2321
archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
2323
hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
2324
# Warning - without using the other run time loading flags,
2325
# -berok will link without error, but may produce a broken library.
2326
allow_undefined_flag='${wl}-berok'
2327
# This is a bit strange, but is similar to how AIX traditionally builds
2328
# it's shared libraries.
2329
archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname'
2335
archive_cmds='$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)'
2336
hardcode_libdir_flag_spec='-L$libdir'
2337
hardcode_minus_L=yes
2338
# see comment about different semantics on the GNU ld section
2342
cygwin* | mingw* | pw32*)
2343
# When not using gcc, we currently assume that we are using
2344
# Microsoft Visual C++.
2345
# hardcode_libdir_flag_spec is actually meaningless, as there is
2346
# no search path for DLLs.
2347
hardcode_libdir_flag_spec=' '
2348
allow_undefined_flag=unsupported
2349
# Tell ltmain to make .lib files, not .a files.
2351
# FIXME: Setting linknames here is a bad hack.
2352
archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
2353
# The linker will automatically build a .lib file if we build a DLL.
2354
old_archive_from_new_cmds='true'
2355
# FIXME: Should let the user specify the lib program.
2356
old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
2357
fix_srcfile_path='`cygpath -w "$srcfile"`'
2360
darwin* | rhapsody*)
2362
rhapsody* | darwin1.[[012]])
2363
allow_undefined_flag='-undefined suppress'
2366
allow_undefined_flag='-flat_namespace -undefined suppress'
2369
# FIXME: Relying on posixy $() will cause problems for
2370
# cross-compilation, but unfortunately the echo tests do not
2371
# yet detect zsh echo's removal of \ escapes.
2372
archive_cmds='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
2373
# We need to add '_' to the symbols in $export_symbols first
2374
#archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
2376
hardcode_shlibpath_var=no
2377
whole_archive_flag_spec='-all_load $convenience'
2384
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
2385
# support. Future versions do this automatically, but an explicit c++rt0.o
2386
# does not break anything, and helps significantly (at the cost of a little
2389
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
2390
hardcode_libdir_flag_spec='-R$libdir'
2392
hardcode_shlibpath_var=no
2395
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
2397
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2399
hardcode_minus_L=yes
2400
hardcode_shlibpath_var=no
2403
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
2405
archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
2406
hardcode_libdir_flag_spec='-R$libdir'
2408
hardcode_shlibpath_var=no
2411
hpux9* | hpux10* | hpux11*)
2413
hpux9*) archive_cmds='$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' ;;
2414
*) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
2416
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
2417
hardcode_libdir_separator=:
2419
hardcode_minus_L=yes # Not in the search PATH, but as the default
2420
# location of the library.
2421
export_dynamic_flag_spec='${wl}-E'
2425
if test "$GCC" = yes; then
2426
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
2428
archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
2430
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2431
hardcode_libdir_separator=:
2432
link_all_deplibs=yes
2436
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2437
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
2439
archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
2441
hardcode_libdir_flag_spec='-R$libdir'
2443
hardcode_shlibpath_var=no
2447
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2449
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2450
hardcode_libdir_separator=:
2451
hardcode_shlibpath_var=no
2456
hardcode_shlibpath_var=no
2457
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2458
archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
2459
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2460
export_dynamic_flag_spec='${wl}-E'
2463
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
2464
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2465
hardcode_libdir_flag_spec='-R$libdir'
2468
archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
2469
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2476
hardcode_libdir_flag_spec='-L$libdir'
2477
hardcode_minus_L=yes
2478
allow_undefined_flag=unsupported
2479
archive_cmds='$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'
2480
old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
2484
if test "$GCC" = yes; then
2485
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2486
archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
2488
allow_undefined_flag=' -expect_unresolved \*'
2489
archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
2491
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2492
hardcode_libdir_separator=:
2495
osf4* | osf5*) # as osf3* with the addition of -msym flag
2496
if test "$GCC" = yes; then
2497
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2498
archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
2499
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2501
allow_undefined_flag=' -expect_unresolved \*'
2502
archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
2503
archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
2504
$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
2506
#Both c and cxx compiler support -rpath directly
2507
hardcode_libdir_flag_spec='-rpath $libdir'
2509
hardcode_libdir_separator=:
2513
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2514
hardcode_shlibpath_var=no
2515
runpath_var=LD_RUN_PATH
2516
hardcode_runpath_var=yes
2517
export_dynamic_flag_spec='${wl}-Bexport'
2521
# gcc --version < 3.0 without binutils cannot create self contained
2522
# shared libraries reliably, requiring libgcc.a to resolve some of
2523
# the object symbols generated in some cases. Libraries that use
2524
# assert need libgcc.a to resolve __eprintf, for example. Linking
2525
# a copy of libgcc.a into every shared library to guarantee resolving
2526
# such symbols causes other problems: According to Tim Van Holder
2527
# <tim.van.holder@pandora.be>, C++ libraries end up with a separate
2528
# (to the application) exception stack for one thing.
2529
no_undefined_flag=' -z defs'
2530
if test "$GCC" = yes; then
2531
case `$CC --version 2>/dev/null` in
2535
*** Warning: Releases of GCC earlier than version 3.0 cannot reliably
2536
*** create self contained shared libraries on Solaris systems, without
2537
*** introducing a dependency on libgcc.a. Therefore, libtool is disabling
2538
*** -no-undefined support, which will at least allow you to build shared
2539
*** libraries. However, you may find that when you link such libraries
2540
*** into an application without using GCC, you have to manually add
2541
*** \`gcc --print-libgcc-file-name\` to the link command. We urge you to
2542
*** upgrade to a newer version of GCC. Another option is to rebuild your
2543
*** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
2550
# $CC -shared without GNU ld will not create a library from C++
2551
# object files and a static libstdc++, better avoid it by now
2552
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2553
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2554
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2555
hardcode_libdir_flag_spec='-R$libdir'
2556
hardcode_shlibpath_var=no
2558
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
2559
*) # Supported since Solaris 2.6 (maybe 2.5.1?)
2560
whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
2562
link_all_deplibs=yes
2566
if test "x$host_vendor" = xsequent; then
2567
# Use $CC to link under sequent, because it throws in some extra .o
2568
# files that make .init and .fini sections work.
2569
archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
2571
archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
2573
hardcode_libdir_flag_spec='-L$libdir'
2575
hardcode_minus_L=yes
2576
hardcode_shlibpath_var=no
2580
if test "x$host_vendor" = xsno; then
2581
archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
2582
hardcode_direct=yes # is this really true???
2584
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2585
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
2587
runpath_var='LD_RUN_PATH'
2588
hardcode_shlibpath_var=no
2592
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2593
hardcode_shlibpath_var=no
2594
export_dynamic_flag_spec='-Bexport'
2598
no_undefined_flag=' -z text'
2599
# $CC -shared without GNU ld will not create a library from C++
2600
# object files and a static libstdc++, better avoid it by now
2601
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2602
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2603
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2604
hardcode_libdir_flag_spec=
2605
hardcode_shlibpath_var=no
2606
runpath_var='LD_RUN_PATH'
2610
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2611
hardcode_libdir_flag_spec='-L$libdir'
2612
hardcode_shlibpath_var=no
2616
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2617
hardcode_libdir_flag_spec='-L$libdir'
2618
hardcode_shlibpath_var=no
2622
if test -d /usr/nec; then
2623
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2624
hardcode_shlibpath_var=no
2625
runpath_var=LD_RUN_PATH
2626
hardcode_runpath_var=yes
2632
archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2635
hardcode_shlibpath_var=no
2636
hardcode_runpath_var=yes
2637
runpath_var=LD_RUN_PATH
2640
sysv5uw7* | unixware7*)
2641
no_undefined_flag='${wl}-z ${wl}text'
2642
if test "$GCC" = yes; then
2643
archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2645
archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2647
runpath_var='LD_RUN_PATH'
2648
hardcode_shlibpath_var=no
2845
# MS-DOS does not allow filenames that begin with a dot.
2656
AC_MSG_RESULT([$ld_shlibs])
2657
test "$ld_shlibs" = no && can_build_shared=no
2848
rmdir .libs 2>/dev/null])
2849
objdir=$lt_cv_objdir
2850
])# AC_LIBTOOL_OBJDIR
2853
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
2854
# ----------------------------------------------
2659
2855
# Check hardcoding attributes.
2660
AC_MSG_CHECKING([how to hardcode library paths into programs])
2662
if test -n "$hardcode_libdir_flag_spec" || \
2663
test -n "$runpath_var"; then
2856
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
2857
[AC_MSG_CHECKING([how to hardcode library paths into programs])
2858
_LT_AC_TAGVAR(hardcode_action, $1)=
2859
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
2860
test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
2861
test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2665
2863
# We can hardcode non-existant directories.
2666
if test "$hardcode_direct" != no &&
2864
if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
2667
2865
# If the only mechanism to avoid hardcoding is shlibpath_var, we
2668
2866
# have to relink, otherwise we might link with an installed library
2669
2867
# when we should be linking with a yet-to-be-installed one
2670
## test "$hardcode_shlibpath_var" != no &&
2671
test "$hardcode_minus_L" != no; then
2868
## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2869
test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
2672
2870
# Linking always hardcodes the temporary library directory.
2673
hardcode_action=relink
2871
_LT_AC_TAGVAR(hardcode_action, $1)=relink
2675
2873
# We can link without hardcoding, and we can hardcode nonexisting dirs.
2676
hardcode_action=immediate
2874
_LT_AC_TAGVAR(hardcode_action, $1)=immediate
2679
2877
# We cannot hardcode anything, or else we can only hardcode existing
2681
hardcode_action=unsupported
2683
AC_MSG_RESULT([$hardcode_action])
2879
_LT_AC_TAGVAR(hardcode_action, $1)=unsupported
2881
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
2883
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
2884
# Fast installation is not supported
2885
enable_fast_install=no
2886
elif test "$shlibpath_overrides_runpath" = yes ||
2887
test "$enable_shared" = no; then
2888
# Fast installation is not necessary
2889
enable_fast_install=needless
2891
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
2894
# AC_LIBTOOL_SYS_LIB_STRIP
2895
# ------------------------
2896
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
2687
2899
AC_MSG_CHECKING([whether stripping libraries is possible])
2688
2900
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
3065
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3066
soname_spec='${libname}${release}.so$major'
3067
shlibpath_var=LD_LIBRARY_PATH
3074
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3075
soname_spec='${libname}${release}.so$major'
3076
shlibpath_var=LD_LIBRARY_PATH
3080
3473
if test -d /usr/nec ;then
3081
3474
version_type=linux
3082
library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
3083
soname_spec='$libname.so.$major'
3475
library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
3476
soname_spec='$libname${shared_ext}.$major'
3084
3477
shlibpath_var=LD_LIBRARY_PATH
3483
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3484
soname_spec='${libname}${release}${shared_ext}$major'
3485
shlibpath_var=LD_LIBRARY_PATH
3089
3489
dynamic_linker=no
3092
3492
AC_MSG_RESULT([$dynamic_linker])
3093
3493
test "$dynamic_linker" = no && can_build_shared=no
3095
# Report the final consequences.
3096
AC_MSG_CHECKING([if libtool supports shared libraries])
3097
AC_MSG_RESULT([$can_build_shared])
3099
AC_MSG_CHECKING([whether to build shared libraries])
3100
test "$can_build_shared" = "no" && enable_shared=no
3102
# On AIX, shared libraries and static libraries use the same namespace, and
3103
# are all built from PIC.
3106
test "$enable_shared" = yes && enable_static=no
3107
if test -n "$RANLIB"; then
3108
archive_cmds="$archive_cmds~\$RANLIB \$lib"
3109
postinstall_cmds='$RANLIB $lib'
3114
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3115
test "$enable_shared" = yes && enable_static=no
3119
AC_MSG_RESULT([$enable_shared])
3121
AC_MSG_CHECKING([whether to build static libraries])
3122
# Make sure either enable_shared or enable_static is yes.
3123
test "$enable_shared" = yes || enable_static=yes
3124
AC_MSG_RESULT([$enable_static])
3126
if test "$hardcode_action" = relink; then
3127
# Fast installation is not supported
3128
enable_fast_install=no
3129
elif test "$shlibpath_overrides_runpath" = yes ||
3130
test "$enable_shared" = no; then
3131
# Fast installation is not necessary
3132
enable_fast_install=needless
3135
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3136
if test "$GCC" = yes; then
3137
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3140
AC_LIBTOOL_DLOPEN_SELF
3142
if test "$enable_shared" = yes && test "$GCC" = yes; then
3143
case $archive_cmds in
3145
# FIXME: we may have to deal with multi-command sequences.
3148
# Test whether the compiler implicitly links with -lc since on some
3149
# systems, -lgcc has to come before -lc. If gcc already passes -lc
3150
# to ld, don't add -lc before -lgcc.
3151
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
3152
AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
3154
echo 'static int dummy;' > conftest.$ac_ext
3156
if AC_TRY_EVAL(ac_compile); then
3159
libobjs=conftest.$ac_objext
3161
wl=$lt_cv_prog_cc_wl
3167
save_allow_undefined_flag=$allow_undefined_flag
3168
allow_undefined_flag=
3169
if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
3171
lt_cv_archive_cmds_need_lc=no
3173
lt_cv_archive_cmds_need_lc=yes
3175
allow_undefined_flag=$save_allow_undefined_flag
3494
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
3499
AC_DEFUN([_LT_AC_TAGCONFIG],
3500
[AC_ARG_WITH([tags],
3501
[AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
3502
[include additional configurations @<:@automatic@:>@])],
3503
[tagnames="$withval"])
3505
if test -f "$ltmain" && test -n "$tagnames"; then
3506
if test ! -f "${ofile}"; then
3507
AC_MSG_WARN([output file `$ofile' does not exist])
3510
if test -z "$LTCC"; then
3511
eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
3512
if test -z "$LTCC"; then
3513
AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
3177
cat conftest.err 1>&5
3515
AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
3519
# Extract list of available tagged configurations in $ofile.
3520
# Note that this assumes the entire list is on one line.
3521
available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
3523
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3524
for tagname in $tagnames; do
3526
# Check whether tagname contains only valid characters
3527
case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
3529
*) AC_MSG_ERROR([invalid tag name: $tagname])
3533
if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
3535
AC_MSG_ERROR([tag name \"$tagname\" already exists])
3538
# Update the list of available tags.
3539
if test -n "$tagname"; then
3540
echo appending configuration tag \"$tagname\" to $ofile
3544
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
3545
( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
3546
(test "X$CXX" != "Xg++"))) ; then
3547
AC_LIBTOOL_LANG_CXX_CONFIG
3554
if test -n "$F77" && test "X$F77" != "Xno"; then
3555
AC_LIBTOOL_LANG_F77_CONFIG
3562
if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
3563
AC_LIBTOOL_LANG_GCJ_CONFIG
3570
AC_LIBTOOL_LANG_RC_CONFIG
3574
AC_MSG_ERROR([Unsupported tag name: $tagname])
3578
# Append the new tag name to the list of available tags.
3579
if test -n "$tagname" ; then
3580
available_tags="$available_tags $tagname"
3586
# Now substitute the updated list of available tags.
3587
if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
3588
mv "${ofile}T" "$ofile"
3592
AC_MSG_ERROR([unable to update list of available tagged configurations.])
3595
])# _LT_AC_TAGCONFIG
3600
# enable checks for dlopen support
3601
AC_DEFUN([AC_LIBTOOL_DLOPEN],
3602
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
3603
])# AC_LIBTOOL_DLOPEN
3606
# AC_LIBTOOL_WIN32_DLL
3607
# --------------------
3608
# declare package support for building win32 DLLs
3609
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
3610
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
3611
])# AC_LIBTOOL_WIN32_DLL
3614
# AC_ENABLE_SHARED([DEFAULT])
3615
# ---------------------------
3616
# implement the --enable-shared flag
3617
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
3618
AC_DEFUN([AC_ENABLE_SHARED],
3619
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3620
AC_ARG_ENABLE([shared],
3621
[AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
3622
[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
3623
[p=${PACKAGE-default}
3625
yes) enable_shared=yes ;;
3626
no) enable_shared=no ;;
3629
# Look at the argument we got. We use all the common list separators.
3630
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3631
for pkg in $enableval; do
3633
if test "X$pkg" = "X$p"; then
3640
[enable_shared=]AC_ENABLE_SHARED_DEFAULT)
3641
])# AC_ENABLE_SHARED
3646
#- set the default shared flag to --disable-shared
3647
AC_DEFUN([AC_DISABLE_SHARED],
3648
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3649
AC_ENABLE_SHARED(no)
3650
])# AC_DISABLE_SHARED
3653
# AC_ENABLE_STATIC([DEFAULT])
3654
# ---------------------------
3655
# implement the --enable-static flag
3656
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
3657
AC_DEFUN([AC_ENABLE_STATIC],
3658
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3659
AC_ARG_ENABLE([static],
3660
[AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
3661
[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
3662
[p=${PACKAGE-default}
3664
yes) enable_static=yes ;;
3665
no) enable_static=no ;;
3668
# Look at the argument we got. We use all the common list separators.
3669
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3670
for pkg in $enableval; do
3672
if test "X$pkg" = "X$p"; then
3679
[enable_static=]AC_ENABLE_STATIC_DEFAULT)
3680
])# AC_ENABLE_STATIC
3685
# set the default static flag to --disable-static
3686
AC_DEFUN([AC_DISABLE_STATIC],
3687
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3688
AC_ENABLE_STATIC(no)
3689
])# AC_DISABLE_STATIC
3692
# AC_ENABLE_FAST_INSTALL([DEFAULT])
3693
# ---------------------------------
3694
# implement the --enable-fast-install flag
3695
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
3696
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
3697
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3698
AC_ARG_ENABLE([fast-install],
3699
[AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
3700
[optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
3701
[p=${PACKAGE-default}
3703
yes) enable_fast_install=yes ;;
3704
no) enable_fast_install=no ;;
3706
enable_fast_install=no
3707
# Look at the argument we got. We use all the common list separators.
3708
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3709
for pkg in $enableval; do
3711
if test "X$pkg" = "X$p"; then
3712
enable_fast_install=yes
3718
[enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
3719
])# AC_ENABLE_FAST_INSTALL
3722
# AC_DISABLE_FAST_INSTALL
3723
# -----------------------
3724
# set the default to --disable-fast-install
3725
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
3726
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3727
AC_ENABLE_FAST_INSTALL(no)
3728
])# AC_DISABLE_FAST_INSTALL
3731
# AC_LIBTOOL_PICMODE([MODE])
3732
# --------------------------
3733
# implement the --with-pic flag
3734
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
3735
AC_DEFUN([AC_LIBTOOL_PICMODE],
3736
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3737
pic_mode=ifelse($#,1,$1,default)
3738
])# AC_LIBTOOL_PICMODE
3743
# This is predefined starting with Autoconf 2.54, so this conditional
3744
# definition can be removed once we require Autoconf 2.54 or later.
3745
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
3746
[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
3747
[if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3748
then ac_cv_prog_egrep='grep -E'
3749
else ac_cv_prog_egrep='egrep'
3179
AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
3183
need_lc=${lt_cv_archive_cmds_need_lc-yes}
3185
# The second clause should only fire when bootstrapping the
3751
EGREP=$ac_cv_prog_egrep
3756
# AC_PATH_TOOL_PREFIX
3757
# -------------------
3758
# find a file program which can recognise shared library
3759
AC_DEFUN([AC_PATH_TOOL_PREFIX],
3760
[AC_REQUIRE([AC_PROG_EGREP])dnl
3761
AC_MSG_CHECKING([for $1])
3762
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3764
[[\\/*] | ?:[\\/]*])
3765
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3768
lt_save_MAGIC_CMD="$MAGIC_CMD"
3769
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3770
dnl $ac_dummy forces splitting on constant user-supplied paths.
3771
dnl POSIX.2 word splitting is done only on the output of word expansions,
3772
dnl not every word. This closes a longstanding sh security hole.
3773
ac_dummy="ifelse([$2], , $PATH, [$2])"
3774
for ac_dir in $ac_dummy; do
3776
test -z "$ac_dir" && ac_dir=.
3777
if test -f $ac_dir/$1; then
3778
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3779
if test -n "$file_magic_test_file"; then
3780
case $deplibs_check_method in
3782
file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3783
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3784
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3785
$EGREP "$file_magic_regex" > /dev/null; then
3790
*** Warning: the command libtool uses to detect shared libraries,
3791
*** $file_magic_cmd, produces output that libtool cannot recognize.
3792
*** The result is that libtool may fail to recognize shared libraries
3793
*** as such. This will affect the creation of libtool libraries that
3794
*** depend on shared libraries, but programs linked with such libtool
3795
*** libraries will work regardless of this problem. Nevertheless, you
3796
*** may want to report the problem to your system manager and/or to
3797
*** bug-libtool@gnu.org
3807
MAGIC_CMD="$lt_save_MAGIC_CMD"
3810
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3811
if test -n "$MAGIC_CMD"; then
3812
AC_MSG_RESULT($MAGIC_CMD)
3816
])# AC_PATH_TOOL_PREFIX
3821
# find a file program which can recognise a shared library
3822
AC_DEFUN([AC_PATH_MAGIC],
3823
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3824
if test -z "$lt_cv_path_MAGIC_CMD"; then
3825
if test -n "$ac_tool_prefix"; then
3826
AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3836
# find the pathname to the GNU or non-GNU linker
3837
AC_DEFUN([AC_PROG_LD],
3838
[AC_ARG_WITH([gnu-ld],
3839
[AC_HELP_STRING([--with-gnu-ld],
3840
[assume the C compiler uses GNU ld @<:@default=no@:>@])],
3841
[test "$withval" = no || with_gnu_ld=yes],
3843
AC_REQUIRE([LT_AC_PROG_SED])dnl
3844
AC_REQUIRE([AC_PROG_CC])dnl
3845
AC_REQUIRE([AC_CANONICAL_HOST])dnl
3846
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3848
if test "$GCC" = yes; then
3849
# Check if gcc -print-prog-name=ld gives a path.
3850
AC_MSG_CHECKING([for ld used by $CC])
3853
# gcc leaves a trailing carriage return which upsets mingw
3854
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3856
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3859
# Accept absolute paths.
3860
[[\\/]]* | ?:[[\\/]]*)
3861
re_direlt='/[[^/]][[^/]]*/\.\./'
3862
# Canonicalize the pathname of ld
3863
ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
3864
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3865
ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
3867
test -z "$LD" && LD="$ac_prog"
3870
# If it fails, then pretend we aren't using GCC.
3874
# If it is relative, then search for the first ld in PATH.
3878
elif test "$with_gnu_ld" = yes; then
3879
AC_MSG_CHECKING([for GNU ld])
3881
AC_MSG_CHECKING([for non-GNU ld])
3883
AC_CACHE_VAL(lt_cv_path_LD,
3884
[if test -z "$LD"; then
3885
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3886
for ac_dir in $PATH; do
3888
test -z "$ac_dir" && ac_dir=.
3889
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3890
lt_cv_path_LD="$ac_dir/$ac_prog"
3891
# Check to see if the program is GNU ld. I'd rather use --version,
3892
# but apparently some variants of GNU ld only accept -v.
3893
# Break only if it was the GNU/non-GNU ld that we prefer.
3894
case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3895
*GNU* | *'with BFD'*)
3896
test "$with_gnu_ld" != no && break
3899
test "$with_gnu_ld" != yes && break
3906
lt_cv_path_LD="$LD" # Let the user override the test with a path.
3909
if test -n "$LD"; then
3914
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3921
AC_DEFUN([AC_PROG_LD_GNU],
3922
[AC_REQUIRE([AC_PROG_EGREP])dnl
3923
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3924
[# I'd rather use --version here, but apparently some GNU lds only accept -v.
3925
case `$LD -v 2>&1 </dev/null` in
3926
*GNU* | *'with BFD'*)
3927
lt_cv_prog_gnu_ld=yes
3930
lt_cv_prog_gnu_ld=no
3933
with_gnu_ld=$lt_cv_prog_gnu_ld
3937
# AC_PROG_LD_RELOAD_FLAG
3938
# ----------------------
3939
# find reload flag for linker
3940
# -- PORTME Some linkers may need a different reload flag.
3941
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3942
[AC_CACHE_CHECK([for $LD option to reload object files],
3943
lt_cv_ld_reload_flag,
3944
[lt_cv_ld_reload_flag='-r'])
3945
reload_flag=$lt_cv_ld_reload_flag
3946
case $reload_flag in
3948
*) reload_flag=" $reload_flag" ;;
3950
reload_cmds='$LD$reload_flag -o $output$reload_objs'
3953
if test "$GCC" = yes; then
3954
reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
3956
reload_cmds='$LD$reload_flag -o $output$reload_objs'
3960
])# AC_PROG_LD_RELOAD_FLAG
3963
# AC_DEPLIBS_CHECK_METHOD
3964
# -----------------------
3965
# how to check for library dependencies
3966
# -- PORTME fill in with the dynamic library characteristics
3967
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3968
[AC_CACHE_CHECK([how to recognise dependent libraries],
3969
lt_cv_deplibs_check_method,
3970
[lt_cv_file_magic_cmd='$MAGIC_CMD'
3971
lt_cv_file_magic_test_file=
3972
lt_cv_deplibs_check_method='unknown'
3973
# Need to set the preceding variable on all platforms that support
3974
# interlibrary dependencies.
3975
# 'none' -- dependencies not supported.
3976
# `unknown' -- same as none, but documents that we really don't know.
3977
# 'pass_all' -- all dependencies passed with no checks.
3978
# 'test_compile' -- check by making test program.
3979
# 'file_magic [[regex]]' -- check by looking for files in library path
3980
# which responds to the $file_magic_cmd with a given extended regex.
3981
# If you have `file' or equivalent on your system and you're not sure
3982
# whether `pass_all' will *always* work, you probably want this one.
3986
lt_cv_deplibs_check_method=pass_all
3990
lt_cv_deplibs_check_method=pass_all
3994
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3995
lt_cv_file_magic_cmd='/usr/bin/file -L'
3996
lt_cv_file_magic_test_file=/shlib/libc.so
4000
# func_win32_libid is a shell function defined in ltmain.sh
4001
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4002
lt_cv_file_magic_cmd='func_win32_libid'
4006
# Base MSYS/MinGW do not provide the 'file' command needed by
4007
# func_win32_libid shell function, so use a weaker test based on 'objdump'.
4008
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
4009
lt_cv_file_magic_cmd='$OBJDUMP -f'
4012
darwin* | rhapsody*)
4013
lt_cv_deplibs_check_method=pass_all
4016
freebsd* | kfreebsd*-gnu | dragonfly*)
4017
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4020
# Not sure whether the presence of OpenBSD here was a mistake.
4021
# Let's accept both of them until this is cleared up.
4022
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
4023
lt_cv_file_magic_cmd=/usr/bin/file
4024
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4028
lt_cv_deplibs_check_method=pass_all
4033
lt_cv_deplibs_check_method=pass_all
4036
hpux10.20* | hpux11*)
4037
lt_cv_file_magic_cmd=/usr/bin/file
4040
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
4041
lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
4044
[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]']
4045
lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
4048
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
4049
lt_cv_file_magic_test_file=/usr/lib/libc.sl
4054
irix5* | irix6* | nonstopux*)
4056
*-32|*"-32 ") libmagic=32-bit;;
4057
*-n32|*"-n32 ") libmagic=N32;;
4058
*-64|*"-64 ") libmagic=64-bit;;
4059
*) libmagic=never-match;;
4061
lt_cv_deplibs_check_method=pass_all
4064
# This must be Linux ELF.
4066
lt_cv_deplibs_check_method=pass_all
4069
netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
4070
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4071
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4073
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
4078
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4079
lt_cv_file_magic_cmd=/usr/bin/file
4080
lt_cv_file_magic_test_file=/usr/lib/libnls.so
4084
lt_cv_deplibs_check_method=unknown
4088
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4089
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
4091
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4095
osf3* | osf4* | osf5*)
4096
lt_cv_deplibs_check_method=pass_all
4100
lt_cv_deplibs_check_method=pass_all
4104
lt_cv_deplibs_check_method=pass_all
4107
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4108
case $host_vendor in
4110
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]]'
4111
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4114
lt_cv_deplibs_check_method=pass_all
4117
lt_cv_file_magic_cmd='/bin/file'
4118
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4121
lt_cv_file_magic_cmd='/bin/file'
4122
lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4123
lt_cv_file_magic_test_file=/lib/libc.so
4126
lt_cv_deplibs_check_method=pass_all
4131
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
4132
lt_cv_deplibs_check_method=pass_all
4136
file_magic_cmd=$lt_cv_file_magic_cmd
4137
deplibs_check_method=$lt_cv_deplibs_check_method
4138
test -z "$deplibs_check_method" && deplibs_check_method=unknown
4139
])# AC_DEPLIBS_CHECK_METHOD
4144
# find the pathname to a BSD-compatible name lister
4145
AC_DEFUN([AC_PROG_NM],
4146
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
4147
[if test -n "$NM"; then
4148
# Let the user override the test.
4151
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4152
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
4154
test -z "$ac_dir" && ac_dir=.
4155
tmp_nm="$ac_dir/${ac_tool_prefix}nm"
4156
if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4157
# Check to see if the nm accepts a BSD-compat flag.
4158
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
4159
# nm: unknown option "B" ignored
4160
# Tru64's nm complains that /dev/null is an invalid object file
4161
case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4162
*/dev/null* | *'Invalid file or object type'*)
4163
lt_cv_path_NM="$tmp_nm -B"
4167
case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4169
lt_cv_path_NM="$tmp_nm -p"
4173
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4174
continue # so that we can try to find one that supports BSD flags
4181
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
4189
# check for math library
4190
AC_DEFUN([AC_CHECK_LIBM],
4191
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4194
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
4195
# These system don't have libm, or don't need it
4198
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4199
AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4202
AC_CHECK_LIB(m, cos, LIBM="-lm")
4208
# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
4209
# -----------------------------------
4210
# sets LIBLTDL to the link flags for the libltdl convenience library and
4211
# LTDLINCL to the include flags for the libltdl header and adds
4212
# --enable-ltdl-convenience to the configure arguments. Note that
4213
# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
4214
# it is assumed to be `libltdl'. LIBLTDL will be prefixed with
4215
# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
4216
# (note the single quotes!). If your package is not flat and you're not
4217
# using automake, define top_builddir and top_srcdir appropriately in
4219
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
4220
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4221
case $enable_ltdl_convenience in
4222
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
4223
"") enable_ltdl_convenience=yes
4224
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
4226
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
4227
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4228
# For backwards non-gettext consistent compatibility...
4230
])# AC_LIBLTDL_CONVENIENCE
4233
# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
4234
# -----------------------------------
4235
# sets LIBLTDL to the link flags for the libltdl installable library and
4236
# LTDLINCL to the include flags for the libltdl header and adds
4237
# --enable-ltdl-install to the configure arguments. Note that
4238
# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
4239
# and an installed libltdl is not found, it is assumed to be `libltdl'.
4240
# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
4241
# '${top_srcdir}/' (note the single quotes!). If your package is not
4242
# flat and you're not using automake, define top_builddir and top_srcdir
4243
# appropriately in the Makefiles.
4244
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
4245
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
4246
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4247
AC_CHECK_LIB(ltdl, lt_dlinit,
4248
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
4249
[if test x"$enable_ltdl_install" = xno; then
4250
AC_MSG_WARN([libltdl not installed, but installation disabled])
4252
enable_ltdl_install=yes
4255
if test x"$enable_ltdl_install" = x"yes"; then
4256
ac_configure_args="$ac_configure_args --enable-ltdl-install"
4257
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
4258
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4260
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
4264
# For backwards non-gettext consistent compatibility...
4266
])# AC_LIBLTDL_INSTALLABLE
4271
# enable support for C++ libraries
4272
AC_DEFUN([AC_LIBTOOL_CXX],
4273
[AC_REQUIRE([_LT_AC_LANG_CXX])
4279
AC_DEFUN([_LT_AC_LANG_CXX],
4280
[AC_REQUIRE([AC_PROG_CXX])
4281
AC_REQUIRE([_LT_AC_PROG_CXXCPP])
4282
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
4285
# _LT_AC_PROG_CXXCPP
4287
AC_DEFUN([_LT_AC_PROG_CXXCPP],
4289
AC_REQUIRE([AC_PROG_CXX])
4290
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
4291
( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
4292
(test "X$CXX" != "Xg++"))) ; then
4295
])# _LT_AC_PROG_CXXCPP
4299
# enable support for Fortran 77 libraries
4300
AC_DEFUN([AC_LIBTOOL_F77],
4301
[AC_REQUIRE([_LT_AC_LANG_F77])
4307
AC_DEFUN([_LT_AC_LANG_F77],
4308
[AC_REQUIRE([AC_PROG_F77])
4309
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
4315
# enable support for GCJ libraries
4316
AC_DEFUN([AC_LIBTOOL_GCJ],
4317
[AC_REQUIRE([_LT_AC_LANG_GCJ])
4323
AC_DEFUN([_LT_AC_LANG_GCJ],
4324
[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
4325
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
4326
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
4327
[ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
4328
[ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
4329
[AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
4330
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
4336
# enable support for Windows resource files
4337
AC_DEFUN([AC_LIBTOOL_RC],
4338
[AC_REQUIRE([LT_AC_PROG_RC])
4339
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
4343
# AC_LIBTOOL_LANG_C_CONFIG
4344
# ------------------------
4345
# Ensure that the configuration vars for the C compiler are
4346
# suitably defined. Those variables are subsequently used by
4347
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4348
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
4349
AC_DEFUN([_LT_AC_LANG_C_CONFIG],
4353
# Source file extension for C test sources.
4356
# Object file extension for compiled C test sources.
4358
_LT_AC_TAGVAR(objext, $1)=$objext
4360
# Code to be used in simple compile tests
4361
lt_simple_compile_test_code="int some_variable = 0;\n"
4363
# Code to be used in simple link tests
4364
lt_simple_link_test_code='int main(){return(0);}\n'
4368
# save warnings/boilerplate of simple test code
4369
_LT_COMPILER_BOILERPLATE
4370
_LT_LINKER_BOILERPLATE
4373
# Check for any special shared library compilation flags.
4375
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
4376
if test "$GCC" = no; then
4379
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
4383
if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
4384
AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
4385
if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then :
4387
AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
4388
_LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
4394
# Check to make sure the static flag actually works.
4396
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
4397
_LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
4398
$_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
4400
[_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
4403
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4404
AC_LIBTOOL_PROG_COMPILER_PIC($1)
4405
AC_LIBTOOL_PROG_CC_C_O($1)
4406
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4407
AC_LIBTOOL_PROG_LD_SHLIBS($1)
4408
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4409
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4410
AC_LIBTOOL_SYS_LIB_STRIP
4411
AC_LIBTOOL_DLOPEN_SELF($1)
4413
# Report which librarie types wil actually be built
4414
AC_MSG_CHECKING([if libtool supports shared libraries])
4415
AC_MSG_RESULT([$can_build_shared])
4417
AC_MSG_CHECKING([whether to build shared libraries])
4418
test "$can_build_shared" = "no" && enable_shared=no
4420
# On AIX, shared libraries and static libraries use the same namespace, and
4421
# are all built from PIC.
4424
test "$enable_shared" = yes && enable_static=no
4425
if test -n "$RANLIB"; then
4426
archive_cmds="$archive_cmds~\$RANLIB \$lib"
4427
postinstall_cmds='$RANLIB $lib'
4432
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
4433
test "$enable_shared" = yes && enable_static=no
4437
AC_MSG_RESULT([$enable_shared])
4439
AC_MSG_CHECKING([whether to build static libraries])
4440
# Make sure either enable_shared or enable_static is yes.
4441
test "$enable_shared" = yes || enable_static=yes
4442
AC_MSG_RESULT([$enable_static])
4444
AC_LIBTOOL_CONFIG($1)
4448
])# AC_LIBTOOL_LANG_C_CONFIG
4451
# AC_LIBTOOL_LANG_CXX_CONFIG
4452
# --------------------------
4453
# Ensure that the configuration vars for the C compiler are
4454
# suitably defined. Those variables are subsequently used by
4455
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4456
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
4457
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
4459
AC_REQUIRE([AC_PROG_CXX])
4460
AC_REQUIRE([_LT_AC_PROG_CXXCPP])
4462
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4463
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
4464
_LT_AC_TAGVAR(always_export_symbols, $1)=no
4465
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4466
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4467
_LT_AC_TAGVAR(hardcode_direct, $1)=no
4468
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4469
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4470
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4471
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4472
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
4473
_LT_AC_TAGVAR(module_cmds, $1)=
4474
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
4475
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4476
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4477
_LT_AC_TAGVAR(no_undefined_flag, $1)=
4478
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4479
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4481
# Dependencies to place before and after the object being linked:
4482
_LT_AC_TAGVAR(predep_objects, $1)=
4483
_LT_AC_TAGVAR(postdep_objects, $1)=
4484
_LT_AC_TAGVAR(predeps, $1)=
4485
_LT_AC_TAGVAR(postdeps, $1)=
4486
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
4488
# Source file extension for C++ test sources.
4491
# Object file extension for compiled C++ test sources.
4493
_LT_AC_TAGVAR(objext, $1)=$objext
4495
# Code to be used in simple compile tests
4496
lt_simple_compile_test_code="int some_variable = 0;\n"
4498
# Code to be used in simple link tests
4499
lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
4501
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4504
# save warnings/boilerplate of simple test code
4505
_LT_COMPILER_BOILERPLATE
4506
_LT_LINKER_BOILERPLATE
4508
# Allow CC to be a program name with arguments.
4513
lt_save_with_gnu_ld=$with_gnu_ld
4514
lt_save_path_LD=$lt_cv_path_LD
4515
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
4516
lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
4518
unset lt_cv_prog_gnu_ld
4520
if test -n "${lt_cv_path_LDCXX+set}"; then
4521
lt_cv_path_LD=$lt_cv_path_LDCXX
4525
test -z "${LDCXX+set}" || LD=$LDCXX
4528
_LT_AC_TAGVAR(compiler, $1)=$CC
4529
_LT_CC_BASENAME([$compiler])
4531
# We don't want -fno-exception wen compiling C++ code, so set the
4532
# no_builtin_flag separately
4533
if test "$GXX" = yes; then
4534
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4536
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4539
if test "$GXX" = yes; then
4540
# Set up default GNU C++ configuration
4544
# Check if GNU C++ uses GNU ld as the underlying linker, since the
4545
# archiving commands below assume that GNU ld is being used.
4546
if test "$with_gnu_ld" = yes; then
4547
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4548
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4550
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
4551
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4553
# If archive_cmds runs LD, not CC, wlarc should be empty
4554
# XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
4555
# investigate it a little bit more. (MM)
4558
# ancient GNU ld didn't support --whole-archive et. al.
4559
if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
4560
grep 'no-whole-archive' > /dev/null; then
4561
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4563
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4569
# A generic and very simple default shared library creation
4570
# command for GNU C++ for the case where it uses the native
4571
# linker, instead of GNU ld. If possible, this setting should
4572
# overridden to take advantage of the native linker features on
4573
# the platform it is being used on.
4574
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
4577
# Commands to make compiler produce verbose output that lists
4578
# what "hidden" libraries, object files and flags are used when
4579
# linking a shared library.
4580
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4588
# PORTME: fill in a description of your system's C++ link characteristics
4589
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4590
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
4593
# FIXME: insert proper C++ library support
4594
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4597
if test "$host_cpu" = ia64; then
4598
# On IA64, the linker does run time linking by default, so we don't
4599
# have to do anything special.
4600
aix_use_runtimelinking=no
4601
exp_sym_flag='-Bexport'
4604
aix_use_runtimelinking=no
4606
# Test if we are trying to use run time linking or normal
4607
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
4608
# need to do runtime linking.
4609
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
4610
for ld_flag in $LDFLAGS; do
4613
aix_use_runtimelinking=yes
4620
exp_sym_flag='-bexport'
4621
no_entry_flag='-bnoentry'
4624
# When large executables or shared objects are built, AIX ld can
4625
# have problems creating the table of contents. If linking a library
4626
# or program results in "error TOC overflow" add -mminimal-toc to
4627
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
4628
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4630
_LT_AC_TAGVAR(archive_cmds, $1)=''
4631
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4632
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
4633
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4635
if test "$GXX" = yes; then
4636
case $host_os in aix4.[[012]]|aix4.[[012]].*)
4637
# We only want to do this on AIX 4.2 and lower, the check
4638
# below for broken collect2 doesn't work under 4.3+
4639
collect2name=`${CC} -print-prog-name=collect2`
4640
if test -f "$collect2name" && \
4641
strings "$collect2name" | grep resolve_lib_name >/dev/null
4643
# We have reworked collect2
4644
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4646
# We have old collect2
4647
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
4648
# It fails to find uninstalled libraries when the uninstalled
4649
# path is not listed in the libpath. Setting hardcode_minus_L
4650
# to unsupported forces relinking
4651
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4652
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4653
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4656
shared_flag='-shared'
4657
if test "$aix_use_runtimelinking" = yes; then
4658
shared_flag="$shared_flag "'${wl}-G'
4662
if test "$host_cpu" = ia64; then
4663
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4664
# chokes on -Wl,-G. The following line is correct:
4667
if test "$aix_use_runtimelinking" = yes; then
4668
shared_flag='${wl}-G'
4670
shared_flag='${wl}-bM:SRE'
4675
# It seems that -bexpall does not export symbols beginning with
4676
# underscore (_), so it is better to generate a list of symbols to export.
4677
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
4678
if test "$aix_use_runtimelinking" = yes; then
4679
# Warning - without using the other runtime loading flags (-brtl),
4680
# -berok will link without error, but may produce a broken library.
4681
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
4682
# Determine the default libpath from the value encoded in an empty executable.
4683
_LT_AC_SYS_LIBPATH_AIX
4684
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4686
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
4688
if test "$host_cpu" = ia64; then
4689
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4690
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4691
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
4693
# Determine the default libpath from the value encoded in an empty executable.
4694
_LT_AC_SYS_LIBPATH_AIX
4695
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4696
# Warning - without using the other run time loading flags,
4697
# -berok will link without error, but may produce a broken library.
4698
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4699
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4700
# -bexpall does not export symbols beginning with underscore (_)
4701
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
4702
# Exported symbols can be pulled into shared objects from archives
4703
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
4704
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
4705
# This is similar to how AIX traditionally builds its shared libraries.
4706
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
4711
case $cc_basename in
4713
# FIXME: insert proper C++ library support
4714
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4720
cygwin* | mingw* | pw32*)
4721
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4722
# as there is no search path for DLLs.
4723
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4724
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4725
_LT_AC_TAGVAR(always_export_symbols, $1)=no
4726
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4728
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
4729
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
4730
# If the export-symbols file already is a .def file (1st line
4731
# is EXPORTS), use it as is; otherwise, prepend...
4732
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4733
cp $export_symbols $output_objdir/$soname.def;
4735
echo EXPORTS > $output_objdir/$soname.def;
4736
cat $export_symbols >> $output_objdir/$soname.def;
4738
$CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
4740
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4743
darwin* | rhapsody*)
4745
rhapsody* | darwin1.[[012]])
4746
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
4749
if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
4750
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
4752
case ${MACOSX_DEPLOYMENT_TARGET} in
4754
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
4757
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
4763
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4764
_LT_AC_TAGVAR(hardcode_direct, $1)=no
4765
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
4766
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4767
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
4768
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4770
if test "$GXX" = yes ; then
4771
lt_int_apple_cc_single_mod=no
4772
output_verbose_link_cmd='echo'
4773
if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
4774
lt_int_apple_cc_single_mod=yes
4776
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
4777
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
4779
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
4781
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4782
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
4783
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
4784
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4786
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4788
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4790
case $cc_basename in
4792
output_verbose_link_cmd='echo'
4793
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
4794
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4795
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
4796
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4797
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4800
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4807
case $cc_basename in
4809
# FIXME: insert proper C++ library support
4810
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4813
# Green Hills C++ Compiler
4814
# FIXME: insert proper C++ library support
4815
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4818
# FIXME: insert proper C++ library support
4819
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4824
# C++ shared libraries reported to be fairly broken before switch to ELF
4825
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4828
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4830
freebsd* | kfreebsd*-gnu | dragonfly*)
4831
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
4833
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
4838
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4839
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4840
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4841
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4842
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4843
# but as the default
4844
# location of the library.
4846
case $cc_basename in
4848
# FIXME: insert proper C++ library support
4849
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4852
_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
4853
# Commands to make compiler produce verbose output that lists
4854
# what "hidden" libraries, object files and flags are used when
4855
# linking a shared library.
4857
# There doesn't appear to be a way to prevent this compiler from
4858
# explicitly linking system object files so we need to strip them
4859
# from the output so that they don't get included in the library
4861
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4864
if test "$GXX" = yes; then
4865
_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
4867
# FIXME: insert proper C++ library support
4868
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4874
if test $with_gnu_ld = no; then
4877
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4878
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
4879
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4882
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4885
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4886
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4887
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4893
_LT_AC_TAGVAR(hardcode_direct, $1)=no
4894
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4897
_LT_AC_TAGVAR(hardcode_direct, $1)=no
4898
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4899
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4900
# but as the default
4901
# location of the library.
4904
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4905
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4906
# but as the default
4907
# location of the library.
4911
case $cc_basename in
4913
# FIXME: insert proper C++ library support
4914
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4919
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
4922
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4925
# Commands to make compiler produce verbose output that lists
4926
# what "hidden" libraries, object files and flags are used when
4927
# linking a shared library.
4929
# There doesn't appear to be a way to prevent this compiler from
4930
# explicitly linking system object files so we need to strip them
4931
# from the output so that they don't get included in the library
4933
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4936
if test "$GXX" = yes; then
4937
if test $with_gnu_ld = no; then
4940
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
4943
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4948
# FIXME: insert proper C++ library support
4949
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4955
case $cc_basename in
4958
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4960
# Archives containing C++ object files must be created using
4961
# "CC -ar", where "CC" is the IRIX C++ compiler. This is
4962
# necessary to make sure instantiated templates are included
4964
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
4967
if test "$GXX" = yes; then
4968
if test "$with_gnu_ld" = no; then
4969
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4971
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
4974
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4977
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4978
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4981
case $cc_basename in
4983
# Kuck and Associates, Inc. (KAI) C++ Compiler
4985
# KCC will only create a shared library if the output file
4986
# ends with ".so" (or ".sl" for HP-UX), so rename the library
4987
# to its proper name (with version) after linking.
4988
_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
4989
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
4990
# Commands to make compiler produce verbose output that lists
4991
# what "hidden" libraries, object files and flags are used when
4992
# linking a shared library.
4994
# There doesn't appear to be a way to prevent this compiler from
4995
# explicitly linking system object files so we need to strip them
4996
# from the output so that they don't get included in the library
4998
output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
5000
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
5001
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5003
# Archives containing C++ object files must be created using
5004
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
5005
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
5010
# version 8.0 and above of icpc choke on multiply defined symbols
5011
# if we add $predep_objects and $postdep_objects, however 7.1 and
5012
# earlier do not add the objects themselves.
5013
case `$CC -V 2>&1` in
5015
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5016
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5018
*) # Version 8.0 or newer
5021
ia64*) tmp_idyn=' -i_dynamic';;
5023
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5024
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5027
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5028
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5029
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5030
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5033
# Portland Group C++ compiler
5034
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
5035
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
5037
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5038
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5039
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
5043
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5044
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
5046
runpath_var=LD_RUN_PATH
5047
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5048
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5050
# Commands to make compiler produce verbose output that lists
5051
# what "hidden" libraries, object files and flags are used when
5052
# linking a shared library.
5054
# There doesn't appear to be a way to prevent this compiler from
5055
# explicitly linking system object files so we need to strip them
5056
# from the output so that they don't get included in the library
5058
output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
5063
# FIXME: insert proper C++ library support
5064
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5067
# FIXME: insert proper C++ library support
5068
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5071
case $cc_basename in
5073
# FIXME: insert proper C++ library support
5074
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5077
# FIXME: insert proper C++ library support
5078
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5082
netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
5083
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5084
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
5086
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5087
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5088
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5090
# Workaround some broken pre-1.5 toolchains
5091
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
5094
# C++ shared libraries are fairly broken
5095
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5098
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5099
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5100
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5101
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5102
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5103
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
5104
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5105
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5107
output_verbose_link_cmd='echo'
5110
case $cc_basename in
5112
# Kuck and Associates, Inc. (KAI) C++ Compiler
5114
# KCC will only create a shared library if the output file
5115
# ends with ".so" (or ".sl" for HP-UX), so rename the library
5116
# to its proper name (with version) after linking.
5117
_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
5119
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5120
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5122
# Archives containing C++ object files must be created using
5123
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
5124
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
5128
# Rational C++ 2.4.1
5129
# FIXME: insert proper C++ library support
5130
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5133
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5134
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
5136
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5137
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5139
# Commands to make compiler produce verbose output that lists
5140
# what "hidden" libraries, object files and flags are used when
5141
# linking a shared library.
5143
# There doesn't appear to be a way to prevent this compiler from
5144
# explicitly linking system object files so we need to strip them
5145
# from the output so that they don't get included in the library
5147
output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
5150
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
5151
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5152
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5154
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5155
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5157
# Commands to make compiler produce verbose output that lists
5158
# what "hidden" libraries, object files and flags are used when
5159
# linking a shared library.
5160
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
5163
# FIXME: insert proper C++ library support
5164
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5170
case $cc_basename in
5172
# Kuck and Associates, Inc. (KAI) C++ Compiler
5174
# KCC will only create a shared library if the output file
5175
# ends with ".so" (or ".sl" for HP-UX), so rename the library
5176
# to its proper name (with version) after linking.
5177
_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
5179
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5180
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5182
# Archives containing C++ object files must be created using
5183
# the KAI C++ compiler.
5184
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
5187
# Rational C++ 2.4.1
5188
# FIXME: insert proper C++ library support
5189
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5192
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5193
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
5194
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
5195
echo "-hidden">> $lib.exp~
5196
$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~
5199
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5200
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5202
# Commands to make compiler produce verbose output that lists
5203
# what "hidden" libraries, object files and flags are used when
5204
# linking a shared library.
5206
# There doesn't appear to be a way to prevent this compiler from
5207
# explicitly linking system object files so we need to strip them
5208
# from the output so that they don't get included in the library
5210
output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
5213
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
5214
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5215
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5217
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5218
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5220
# Commands to make compiler produce verbose output that lists
5221
# what "hidden" libraries, object files and flags are used when
5222
# linking a shared library.
5223
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
5226
# FIXME: insert proper C++ library support
5227
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5233
# FIXME: insert proper C++ library support
5234
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5237
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5238
case $cc_basename in
5240
# FIXME: insert proper C++ library support
5241
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5244
# FIXME: insert proper C++ library support
5245
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5250
case $cc_basename in
5253
# FIXME: insert proper C++ library support
5254
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5258
# FIXME: insert proper C++ library support
5259
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5262
# FIXME: insert proper C++ library support
5263
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5268
case $cc_basename in
5270
# Sun C++ 4.2, 5.x and Centerline C++
5271
_LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
5272
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
5273
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5274
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5275
$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'
5277
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5278
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5280
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5282
# The C++ compiler is used as linker so we must use $wl
5283
# flag to pass the commands to the underlying system
5284
# linker. We must also pass each convience library through
5285
# to the system linker between allextract/defaultextract.
5286
# The C++ compiler will combine linker options so we
5287
# cannot just pass the convience library names through
5289
# Supported since Solaris 2.6 (maybe 2.5.1?)
5290
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
5293
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5295
output_verbose_link_cmd='echo'
5297
# Archives containing C++ object files must be created using
5298
# "CC -xar", where "CC" is the Sun C++ compiler. This is
5299
# necessary to make sure instantiated templates are included
5301
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
5304
# Green Hills C++ Compiler
5305
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
5307
# The C++ compiler must be used to create the archive.
5308
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
5311
# GNU C++ compiler with Solaris linker
5312
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
5313
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
5314
if $CC --version | grep -v '^2\.7' > /dev/null; then
5315
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
5316
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5317
$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
5319
# Commands to make compiler produce verbose output that lists
5320
# what "hidden" libraries, object files and flags are used when
5321
# linking a shared library.
5322
output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
5324
# g++ 2.7 appears to require `-G' NOT `-shared' on this
5326
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
5327
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5328
$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
5330
# Commands to make compiler produce verbose output that lists
5331
# what "hidden" libraries, object files and flags are used when
5332
# linking a shared library.
5333
output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
5336
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
5341
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
5342
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5345
case $cc_basename in
5347
# NonStop-UX NCC 3.20
5348
# FIXME: insert proper C++ library support
5349
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5352
# FIXME: insert proper C++ library support
5353
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5358
# FIXME: insert proper C++ library support
5359
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5362
# FIXME: insert proper C++ library support
5363
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5366
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
5367
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5369
_LT_AC_TAGVAR(GCC, $1)="$GXX"
5370
_LT_AC_TAGVAR(LD, $1)="$LD"
5372
AC_LIBTOOL_POSTDEP_PREDEP($1)
5373
AC_LIBTOOL_PROG_COMPILER_PIC($1)
5374
AC_LIBTOOL_PROG_CC_C_O($1)
5375
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5376
AC_LIBTOOL_PROG_LD_SHLIBS($1)
5377
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5378
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5379
AC_LIBTOOL_SYS_LIB_STRIP
5380
AC_LIBTOOL_DLOPEN_SELF($1)
5382
AC_LIBTOOL_CONFIG($1)
5389
with_gnu_ldcxx=$with_gnu_ld
5390
with_gnu_ld=$lt_save_with_gnu_ld
5391
lt_cv_path_LDCXX=$lt_cv_path_LD
5392
lt_cv_path_LD=$lt_save_path_LD
5393
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
5394
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
5395
])# AC_LIBTOOL_LANG_CXX_CONFIG
5397
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
5398
# ------------------------
5399
# Figure out "hidden" library dependencies from verbose
5400
# compiler output when linking a shared library.
5401
# Parse the compiler output and extract the necessary
5402
# objects, libraries and library flags.
5403
AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
5404
dnl we can't use the lt_simple_compile_test_code here,
5405
dnl because it contains code intended for an executable,
5406
dnl not a library. It's possible we should let each
5407
dnl tag define a new lt_????_link_test_code variable,
5408
dnl but it's only used here...
5409
ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
5411
void foo (void) { a = 0; }
5413
],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
5417
Foo (void) { a = 0; }
5422
],[$1],[F77],[cat > conftest.$ac_ext <<EOF
5430
],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
5433
public void bar (void) {
5439
dnl Parse the compiler output and extract the necessary
5440
dnl objects, libraries and library flags.
5441
if AC_TRY_EVAL(ac_compile); then
5442
# Parse the compiler output and extract the necessary
5443
# objects, libraries and library flags.
5445
# Sentinel used to keep track of whether or not we are before
5446
# the conftest object file.
5447
pre_test_object_deps_done=no
5449
# The `*' in the case matches for architectures that use `case' in
5450
# $output_verbose_cmd can trigger glob expansion during the loop
5451
# eval without this substitution.
5452
output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
5454
for p in `eval $output_verbose_link_cmd`; do
5458
# Some compilers place space between "-{L,R}" and the path.
5461
|| test $p = "-R"; then
5468
if test "$pre_test_object_deps_done" = no; then
5471
# Internal compiler library paths should come after those
5472
# provided the user. The postdeps already come after the
5473
# user supplied libs so there is no need to process them.
5474
if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
5475
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
5477
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
5480
# The "-l" case would never come before the object being
5481
# linked, so don't bother handling this case.
5484
if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
5485
_LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
5487
_LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
5493
# This assumes that the test object file only shows up
5494
# once in the compiler output.
5495
if test "$p" = "conftest.$objext"; then
5496
pre_test_object_deps_done=yes
5500
if test "$pre_test_object_deps_done" = no; then
5501
if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
5502
_LT_AC_TAGVAR(predep_objects, $1)="$p"
5504
_LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
5507
if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
5508
_LT_AC_TAGVAR(postdep_objects, $1)="$p"
5510
_LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
5515
*) ;; # Ignore the rest.
5523
echo "libtool.m4: error: problem compiling $1 test program"
5526
$rm -f confest.$objext
5528
# PORTME: override above test on systems where it is broken
5532
case $cc_basename in
5534
# Adding this requires a known-good setup of shared libraries for
5535
# Sun compiler versions before 5.6, else PIC objects from an old
5536
# archive will be linked into the output, leading to subtle bugs.
5537
_LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
5543
case " $_LT_AC_TAGVAR(postdeps, $1) " in
5544
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
5546
])# AC_LIBTOOL_POSTDEP_PREDEP
5548
# AC_LIBTOOL_LANG_F77_CONFIG
5549
# ------------------------
5550
# Ensure that the configuration vars for the C compiler are
5551
# suitably defined. Those variables are subsequently used by
5552
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5553
AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
5554
AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
5555
[AC_REQUIRE([AC_PROG_F77])
5556
AC_LANG_PUSH(Fortran 77)
5558
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5559
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
5560
_LT_AC_TAGVAR(always_export_symbols, $1)=no
5561
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5562
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5563
_LT_AC_TAGVAR(hardcode_direct, $1)=no
5564
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5565
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5566
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5567
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5568
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
5569
_LT_AC_TAGVAR(module_cmds, $1)=
5570
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
5571
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5572
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5573
_LT_AC_TAGVAR(no_undefined_flag, $1)=
5574
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5575
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5577
# Source file extension for f77 test sources.
5580
# Object file extension for compiled f77 test sources.
5582
_LT_AC_TAGVAR(objext, $1)=$objext
5584
# Code to be used in simple compile tests
5585
lt_simple_compile_test_code=" subroutine t\n return\n end\n"
5587
# Code to be used in simple link tests
5588
lt_simple_link_test_code=" program t\n end\n"
5590
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
5593
# save warnings/boilerplate of simple test code
5594
_LT_COMPILER_BOILERPLATE
5595
_LT_LINKER_BOILERPLATE
5597
# Allow CC to be a program name with arguments.
5601
_LT_AC_TAGVAR(compiler, $1)=$CC
5602
_LT_CC_BASENAME([$compiler])
5604
AC_MSG_CHECKING([if libtool supports shared libraries])
5605
AC_MSG_RESULT([$can_build_shared])
5607
AC_MSG_CHECKING([whether to build shared libraries])
5608
test "$can_build_shared" = "no" && enable_shared=no
5610
# On AIX, shared libraries and static libraries use the same namespace, and
5611
# are all built from PIC.
5614
test "$enable_shared" = yes && enable_static=no
5615
if test -n "$RANLIB"; then
5616
archive_cmds="$archive_cmds~\$RANLIB \$lib"
5617
postinstall_cmds='$RANLIB $lib'
5621
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5622
test "$enable_shared" = yes && enable_static=no
5626
AC_MSG_RESULT([$enable_shared])
5628
AC_MSG_CHECKING([whether to build static libraries])
5629
# Make sure either enable_shared or enable_static is yes.
5630
test "$enable_shared" = yes || enable_static=yes
5631
AC_MSG_RESULT([$enable_static])
5633
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5635
_LT_AC_TAGVAR(GCC, $1)="$G77"
5636
_LT_AC_TAGVAR(LD, $1)="$LD"
5638
AC_LIBTOOL_PROG_COMPILER_PIC($1)
5639
AC_LIBTOOL_PROG_CC_C_O($1)
5640
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5641
AC_LIBTOOL_PROG_LD_SHLIBS($1)
5642
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5643
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5644
AC_LIBTOOL_SYS_LIB_STRIP
5647
AC_LIBTOOL_CONFIG($1)
5651
])# AC_LIBTOOL_LANG_F77_CONFIG
5654
# AC_LIBTOOL_LANG_GCJ_CONFIG
5655
# --------------------------
5656
# Ensure that the configuration vars for the C compiler are
5657
# suitably defined. Those variables are subsequently used by
5658
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5659
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
5660
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
5663
# Source file extension for Java test sources.
5666
# Object file extension for compiled Java test sources.
5668
_LT_AC_TAGVAR(objext, $1)=$objext
5670
# Code to be used in simple compile tests
5671
lt_simple_compile_test_code="class foo {}\n"
5673
# Code to be used in simple link tests
5674
lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
5676
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
5679
# save warnings/boilerplate of simple test code
5680
_LT_COMPILER_BOILERPLATE
5681
_LT_LINKER_BOILERPLATE
5683
# Allow CC to be a program name with arguments.
5687
_LT_AC_TAGVAR(compiler, $1)=$CC
5688
_LT_CC_BASENAME([$compiler])
5690
# GCJ did not exist at the time GCC didn't implicitly link libc in.
5691
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5693
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5695
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
5696
AC_LIBTOOL_PROG_COMPILER_PIC($1)
5697
AC_LIBTOOL_PROG_CC_C_O($1)
5698
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5699
AC_LIBTOOL_PROG_LD_SHLIBS($1)
5700
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5701
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5702
AC_LIBTOOL_SYS_LIB_STRIP
5703
AC_LIBTOOL_DLOPEN_SELF($1)
5705
AC_LIBTOOL_CONFIG($1)
5709
])# AC_LIBTOOL_LANG_GCJ_CONFIG
5712
# AC_LIBTOOL_LANG_RC_CONFIG
5713
# --------------------------
5714
# Ensure that the configuration vars for the Windows resource compiler are
5715
# suitably defined. Those variables are subsequently used by
5716
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5717
AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
5718
AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
5721
# Source file extension for RC test sources.
5724
# Object file extension for compiled RC test sources.
5726
_LT_AC_TAGVAR(objext, $1)=$objext
5728
# Code to be used in simple compile tests
5729
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
5731
# Code to be used in simple link tests
5732
lt_simple_link_test_code="$lt_simple_compile_test_code"
5734
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
5737
# save warnings/boilerplate of simple test code
5738
_LT_COMPILER_BOILERPLATE
5739
_LT_LINKER_BOILERPLATE
5741
# Allow CC to be a program name with arguments.
5745
_LT_AC_TAGVAR(compiler, $1)=$CC
5746
_LT_CC_BASENAME([$compiler])
5747
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
5749
AC_LIBTOOL_CONFIG($1)
5753
])# AC_LIBTOOL_LANG_RC_CONFIG
5756
# AC_LIBTOOL_CONFIG([TAGNAME])
5757
# ----------------------------
5758
# If TAGNAME is not passed, then create an initial libtool script
5759
# with a default configuration from the untagged config vars. Otherwise
5760
# add code to config.status for appending the configuration named by
5761
# TAGNAME from the matching tagged config vars.
5762
AC_DEFUN([AC_LIBTOOL_CONFIG],
5763
[# The else clause should only fire when bootstrapping the
3186
5764
# libtool distribution, otherwise you forgot to ship ltmain.sh
3187
5765
# with your package, and you will get complaints that there are
3188
5766
# no rules to generate ltmain.sh.
3189
5767
if test -f "$ltmain"; then
3192
# If there is no Makefile yet, we rely on a make rule to execute
3193
# `config.status --recheck' to rerun these tests and create the
3194
# libtool script then.
3195
test -f Makefile && make "$ltmain"
3198
if test -f "$ltmain"; then
3199
trap "$rm \"${ofile}T\"; exit 1" 1 2 15
3202
echo creating $ofile
5768
# See if we are running on zsh, and set the options which allow our commands through
5769
# without removal of \ escapes.
5770
if test -n "${ZSH_VERSION+set}" ; then
5771
setopt NO_GLOB_SUBST
3204
5773
# Now quote all the things that may contain metacharacters while being
3205
5774
# careful not to overquote the AC_SUBSTed values. We take copies of the
3206
5775
# variables and quote the copies for generation of the libtool script.
3207
for var in echo old_CC old_CFLAGS \
3208
AR AR_FLAGS CC LD LN_S NM SHELL \
3209
reload_flag reload_cmds wl \
3210
pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
3211
thread_safe_flag_spec whole_archive_flag_spec libname_spec \
3212
library_names_spec soname_spec \
3213
RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
3214
old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
3215
postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
3216
old_striplib striplib file_magic_cmd export_symbols_cmds \
3217
deplibs_check_method allow_undefined_flag no_undefined_flag \
3218
finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
3219
global_symbol_to_c_name_address \
3220
hardcode_libdir_flag_spec hardcode_libdir_separator \
5776
for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
5778
libname_spec library_names_spec soname_spec extract_expsyms_cmds \
5779
old_striplib striplib file_magic_cmd finish_cmds finish_eval \
5780
deplibs_check_method reload_flag reload_cmds need_locks \
5781
lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
5782
lt_cv_sys_global_symbol_to_c_name_address \
3221
5783
sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
3222
compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
5784
old_postinstall_cmds old_postuninstall_cmds \
5785
_LT_AC_TAGVAR(compiler, $1) \
5786
_LT_AC_TAGVAR(CC, $1) \
5787
_LT_AC_TAGVAR(LD, $1) \
5788
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
5789
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
5790
_LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
5791
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
5792
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
5793
_LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
5794
_LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
5795
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
5796
_LT_AC_TAGVAR(old_archive_cmds, $1) \
5797
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
5798
_LT_AC_TAGVAR(predep_objects, $1) \
5799
_LT_AC_TAGVAR(postdep_objects, $1) \
5800
_LT_AC_TAGVAR(predeps, $1) \
5801
_LT_AC_TAGVAR(postdeps, $1) \
5802
_LT_AC_TAGVAR(compiler_lib_search_path, $1) \
5803
_LT_AC_TAGVAR(archive_cmds, $1) \
5804
_LT_AC_TAGVAR(archive_expsym_cmds, $1) \
5805
_LT_AC_TAGVAR(postinstall_cmds, $1) \
5806
_LT_AC_TAGVAR(postuninstall_cmds, $1) \
5807
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
5808
_LT_AC_TAGVAR(allow_undefined_flag, $1) \
5809
_LT_AC_TAGVAR(no_undefined_flag, $1) \
5810
_LT_AC_TAGVAR(export_symbols_cmds, $1) \
5811
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
5812
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
5813
_LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
5814
_LT_AC_TAGVAR(hardcode_automatic, $1) \
5815
_LT_AC_TAGVAR(module_cmds, $1) \
5816
_LT_AC_TAGVAR(module_expsym_cmds, $1) \
5817
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
5818
_LT_AC_TAGVAR(exclude_expsyms, $1) \
5819
_LT_AC_TAGVAR(include_expsyms, $1); do
3225
reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
5822
_LT_AC_TAGVAR(old_archive_cmds, $1) | \
5823
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
5824
_LT_AC_TAGVAR(archive_cmds, $1) | \
5825
_LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
5826
_LT_AC_TAGVAR(module_cmds, $1) | \
5827
_LT_AC_TAGVAR(module_expsym_cmds, $1) | \
5828
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
5829
_LT_AC_TAGVAR(export_symbols_cmds, $1) | \
5830
extract_expsyms_cmds | reload_cmds | finish_cmds | \
5831
postinstall_cmds | postuninstall_cmds | \
3226
5832
old_postinstall_cmds | old_postuninstall_cmds | \
3227
export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
3228
extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
3229
postinstall_cmds | postuninstall_cmds | \
3230
finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
5833
sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
3231
5834
# Double-quote double-evaled strings.
3232
5835
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
3545
cygwin* | mingw* | pw32* | os2*)
3546
cat <<'EOF' >> "${ofile}T"
3547
# This is a source program that is used to create dlls on Windows
3548
# Don't remove nor modify the starting and closing comments
6225
# We use sed instead of cat because bash on DJGPP gets confused if
6226
# if finds mixed CR/LF and LF-only lines. Since sed operates in
6227
# text mode, it properly converts lines to CR/LF. This bash problem
6228
# is reportedly fixed, but why not run on old versions too?
6229
sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
6231
mv -f "$cfgfile" "$ofile" || \
6232
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
6236
# If there is no Makefile yet, we rely on a make rule to execute
6237
# `config.status --recheck' to rerun these tests and create the
6238
# libtool script then.
6239
ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
6240
if test -f "$ltmain_in"; then
6241
test -f Makefile && make "$ltmain"
6244
])# AC_LIBTOOL_CONFIG
6247
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
6248
# -------------------------------------------
6249
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
6250
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
6252
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6254
if test "$GCC" = yes; then
6255
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6257
AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
6258
lt_cv_prog_compiler_rtti_exceptions,
6259
[-fno-rtti -fno-exceptions], [],
6260
[_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
6262
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
6265
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
6266
# ---------------------------------
6267
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
6268
[AC_REQUIRE([AC_CANONICAL_HOST])
6269
AC_REQUIRE([AC_PROG_NM])
6270
AC_REQUIRE([AC_OBJEXT])
6271
# Check for command to grab the raw symbol name followed by C symbol from nm.
6272
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
6273
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
6275
# These are sane defaults that work on at least a few old systems.
6276
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
6278
# Character class describing NM global symbol codes.
6279
symcode='[[BCDEGRST]]'
6281
# Regexp to match symbols that can be accessed directly from C.
6282
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
6284
# Transform an extracted symbol line into a proper C declaration
6285
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
6287
# Transform an extracted symbol line into symbol name and symbol address
6288
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
6290
# Define system-specific variables.
6295
cygwin* | mingw* | pw32*)
6296
symcode='[[ABCDGISTW]]'
6298
hpux*) # Its linker distinguishes data from code symbols
6299
if test "$host_cpu" = ia64; then
6300
symcode='[[ABCDEGRST]]'
6302
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6303
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
6306
if test "$host_cpu" = ia64; then
6307
symcode='[[ABCDGIRSTW]]'
6308
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6309
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
6313
symcode='[[BCDEGRST]]'
6316
symcode='[[BCDEGQRST]]'
6322
symcode='[[DFNSTU]]'
6326
# Handle CRLF in mingw tool chain
6330
opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
6334
# If we're using GNU nm, then use its standard symbol codes.
6335
case `$NM -V 2>&1` in
6336
*GNU* | *'with BFD'*)
6337
symcode='[[ABCDGIRSTW]]' ;;
6340
# Try without a prefix undercore, then with it.
6341
for ac_symprfx in "" "_"; do
6343
# Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
6344
symxfrm="\\1 $ac_symprfx\\2 \\2"
6346
# Write the raw and C identifiers.
6347
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
6349
# Check to see that the pipe works correctly.
6353
cat > conftest.$ac_ext <<EOF
6358
void nm_test_func(){}
6362
int main(){nm_test_var='a';nm_test_func();return(0);}
6365
if AC_TRY_EVAL(ac_compile); then
6366
# Now try to grab the symbols.
6368
if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
6369
# Try sorting and uniquifying the output.
6370
if sort "$nlist" | uniq > "$nlist"T; then
6371
mv -f "$nlist"T "$nlist"
6376
# Make sure that we snagged all the symbols we need.
6377
if grep ' nm_test_var$' "$nlist" >/dev/null; then
6378
if grep ' nm_test_func$' "$nlist" >/dev/null; then
6379
cat <<EOF > conftest.$ac_ext
6385
# Now generate the symbol file.
6386
eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
6388
cat <<EOF >> conftest.$ac_ext
6389
#if defined (__STDC__) && __STDC__
6390
# define lt_ptr_t void *
6392
# define lt_ptr_t char *
6396
/* The mapping between symbol names and symbols. */
6401
lt_preloaded_symbols[[]] =
6404
$SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
6405
cat <<\EOF >> conftest.$ac_ext
6413
# Now try linking the two files.
6414
mv conftest.$ac_objext conftstm.$ac_objext
6415
lt_save_LIBS="$LIBS"
6416
lt_save_CFLAGS="$CFLAGS"
6417
LIBS="conftstm.$ac_objext"
6418
CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
6419
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
6422
LIBS="$lt_save_LIBS"
6423
CFLAGS="$lt_save_CFLAGS"
6425
echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
6428
echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
6431
echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
6434
echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
6435
cat conftest.$ac_ext >&5
6437
rm -f conftest* conftst*
6439
# Do not use the global_symbol_pipe unless it works.
6440
if test "$pipe_works" = yes; then
6443
lt_cv_sys_global_symbol_pipe=
6447
if test -z "$lt_cv_sys_global_symbol_pipe"; then
6448
lt_cv_sys_global_symbol_to_cdecl=
6450
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
6451
AC_MSG_RESULT(failed)
6455
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
6458
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
6459
# ---------------------------------------
6460
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
6461
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
6462
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6463
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
6465
AC_MSG_CHECKING([for $compiler option to produce PIC])
6467
# C++ specific cases for pic, static, wl, etc.
6468
if test "$GXX" = yes; then
6469
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6470
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6474
# All AIX code is PIC.
6475
if test "$host_cpu" = ia64; then
6476
# AIX 5 now supports IA64 processor
6477
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6481
# FIXME: we need at least 68020 code to build shared libraries, but
6482
# adding the `-m68020' flag to GCC prevents building anything better,
6484
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6486
beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6487
# PIC is the default for these OSes.
6489
mingw* | os2* | pw32*)
6490
# This hack is so that the source file can tell whether it is being
6491
# built for inclusion in a dll (and should export symbols for example).
6492
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
6494
darwin* | rhapsody*)
6495
# PIC is the default on this platform
6496
# Common symbols not allowed in MH_DYLIB files
6497
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6500
# DJGPP does not support shared libraries at all
6501
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6504
if test -d /usr/nec; then
6505
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6509
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6515
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6520
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6526
# All AIX code is PIC.
6527
if test "$host_cpu" = ia64; then
6528
# AIX 5 now supports IA64 processor
6529
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6531
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6535
case $cc_basename in
6537
# Green Hills C++ Compiler
6538
# _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
6543
# PIC is the default on this platform
6544
# Common symbols not allowed in MH_DYLIB files
6545
case $cc_basename in
6547
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
6548
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6553
case $cc_basename in
6555
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6558
# Green Hills C++ Compiler
6559
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6565
freebsd* | kfreebsd*-gnu | dragonfly*)
6566
# FreeBSD uses GNU C++
6568
hpux9* | hpux10* | hpux11*)
6569
case $cc_basename in
6571
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6572
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
6573
if test "$host_cpu" != ia64; then
6574
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6578
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6579
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
6585
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6593
irix5* | irix6* | nonstopux*)
6594
case $cc_basename in
6596
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6597
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6598
# CC pic flag -KPIC is the default.
6605
case $cc_basename in
6608
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6609
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6613
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6614
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6615
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6618
# Portland Group C++ compiler.
6619
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6620
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6621
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6625
# Make sure the PIC flag is empty. It appears that all Alpha
6626
# Linux and Compaq Tru64 Unix objects are PIC.
6627
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6628
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6639
case $cc_basename in
6641
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
6647
netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
6649
osf3* | osf4* | osf5*)
6650
case $cc_basename in
6652
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6655
# Rational C++ 2.4.1
6656
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6659
# Digital/Compaq C++
6660
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6661
# Make sure the PIC flag is empty. It appears that all Alpha
6662
# Linux and Compaq Tru64 Unix objects are PIC.
6663
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6664
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6673
case $cc_basename in
6675
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6682
case $cc_basename in
6684
# Sun C++ 4.2, 5.x and Centerline C++
6685
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6686
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6687
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6690
# Green Hills C++ Compiler
6691
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6698
case $cc_basename in
6701
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6702
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6706
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6713
case $cc_basename in
6715
# NonStop-UX NCC 3.20
6716
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6727
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6733
if test "$GCC" = yes; then
6734
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6735
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6739
# All AIX code is PIC.
6740
if test "$host_cpu" = ia64; then
6741
# AIX 5 now supports IA64 processor
6742
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6747
# FIXME: we need at least 68020 code to build shared libraries, but
6748
# adding the `-m68020' flag to GCC prevents building anything better,
6750
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6753
beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6754
# PIC is the default for these OSes.
6757
mingw* | pw32* | os2*)
6758
# This hack is so that the source file can tell whether it is being
6759
# built for inclusion in a dll (and should export symbols for example).
6760
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
6763
darwin* | rhapsody*)
6764
# PIC is the default on this platform
6765
# Common symbols not allowed in MH_DYLIB files
6766
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6770
# Just because we use GCC doesn't mean we suddenly get shared libraries
6771
# on systems that don't support them.
6772
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6777
if test -d /usr/nec; then
6778
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6783
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6790
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6796
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6800
# PORTME Check for flag to pass linker flags through the system compiler.
6803
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6804
if test "$host_cpu" = ia64; then
6805
# AIX 5 now supports IA64 processor
6806
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6808
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6812
# PIC is the default on this platform
6813
# Common symbols not allowed in MH_DYLIB files
6814
case $cc_basename in
6816
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
6817
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6822
mingw* | pw32* | os2*)
6823
# This hack is so that the source file can tell whether it is being
6824
# built for inclusion in a dll (and should export symbols for example).
6825
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
6828
hpux9* | hpux10* | hpux11*)
6829
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6830
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6837
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6840
# Is there a better lt_prog_compiler_static that works with the bundled CC?
6841
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6844
irix5* | irix6* | nonstopux*)
6845
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6846
# PIC (with -KPIC) is the default.
6847
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6851
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6852
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6856
case $cc_basename in
6858
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6859
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6860
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6862
pgcc* | pgf77* | pgf90* | pgf95*)
6863
# Portland Group compilers (*not* the Pentium gcc compiler,
6864
# which looks to be a dead project)
6865
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6866
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6867
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6870
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6871
# All Alpha code is PIC.
6872
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6877
osf3* | osf4* | osf5*)
6878
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6879
# All OSF/1 code is PIC.
6880
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6884
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
6885
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
6889
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6890
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6891
case $cc_basename in
6893
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
6895
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
6900
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6901
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6902
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6905
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6906
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6907
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6908
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6912
if test -d /usr/nec ;then
6913
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
6914
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6919
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6920
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6924
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6925
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6929
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6934
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
6937
# Check to make sure the PIC flag actually works.
6939
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
6940
AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
6941
_LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
6942
[$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
6943
[case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
6945
*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
6947
[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6948
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
6951
# For platforms which do not support PIC, -DPIC is meaningless:
6953
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6956
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
6962
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
6963
# ------------------------------------
6964
# See if the linker supports building shared libraries.
6965
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
6966
[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6968
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6971
# If we're using GNU nm, then we don't want the "-C" option.
6972
# -C means demangle to AIX nm, but means don't demangle with GNU nm
6973
if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6974
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6976
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6980
_LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
6983
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
6986
_LT_AC_TAGVAR(link_all_deplibs, $1)=no
6989
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6994
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
6995
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6996
_LT_AC_TAGVAR(archive_cmds, $1)=
6997
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
6998
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
6999
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
7000
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
7001
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
7002
_LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
7003
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
7004
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7005
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
7006
_LT_AC_TAGVAR(hardcode_direct, $1)=no
7007
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
7008
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7009
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
7010
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
7011
_LT_AC_TAGVAR(module_cmds, $1)=
7012
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
7013
_LT_AC_TAGVAR(always_export_symbols, $1)=no
7014
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
7015
# include_expsyms should be a list of space-separated symbols to be *always*
7016
# included in the symbol list
7017
_LT_AC_TAGVAR(include_expsyms, $1)=
7018
# exclude_expsyms can be an extended regexp of symbols to exclude
7019
# it will be wrapped by ` (' and `)$', so one must not match beginning or
7020
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
7021
# as well as any symbol that contains `d'.
7022
_LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
7023
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
7024
# platforms (ab)use it in PIC code, but their linkers get confused if
7025
# the symbol is explicitly referenced. Since portable code cannot
7026
# rely on this symbol name, it's probably fine to never include it in
7027
# preloaded symbol tables.
7028
extract_expsyms_cmds=
7029
# Just being paranoid about ensuring that cc_basename is set.
7030
_LT_CC_BASENAME([$compiler])
7032
cygwin* | mingw* | pw32*)
7033
# FIXME: the MSVC++ port hasn't been tested in a loooong time
7034
# When not using gcc, we currently assume that we are using
7035
# Microsoft Visual C++.
7036
if test "$GCC" != yes; then
7045
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
7046
if test "$with_gnu_ld" = yes; then
7047
# If archive_cmds runs LD, not CC, wlarc should be empty
7050
# Set some defaults for GNU ld with shared library support. These
7051
# are reset later if shared libraries are not supported. Putting them
7052
# here allows them to be overridden if necessary.
7053
runpath_var=LD_RUN_PATH
7054
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7055
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7056
# ancient GNU ld didn't support --whole-archive et. al.
7057
if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
7058
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7060
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
7062
supports_anon_versioning=no
7063
case `$LD -v 2>/dev/null` in
7064
*\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
7065
*\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
7066
*\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
7067
*\ 2.11.*) ;; # other 2.11 versions
7068
*) supports_anon_versioning=yes ;;
7071
# See if GNU ld supports shared libraries.
7073
aix3* | aix4* | aix5*)
7074
# On AIX/PPC, the GNU linker is very broken
7075
if test "$host_cpu" != ia64; then
7076
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7079
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
7080
*** to be unable to reliably create shared libraries on AIX.
7081
*** Therefore, libtool is disabling shared libraries support. If you
7082
*** really care for shared libraries, you may want to modify your PATH
7083
*** so that a non-GNU linker is found, and then restart.
7090
_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
7091
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7092
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7094
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
7095
# that the semantics of dynamic libraries on AmigaOS, at least up
7096
# to version 4, is to share data among multiple programs linked
7097
# with the same dynamic library. Since this doesn't match the
7098
# behavior of shared libraries on other platforms, we can't use
7100
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7104
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7105
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7106
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
7107
# support --undefined. This deserves some investigation. FIXME
7108
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7110
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7114
cygwin* | mingw* | pw32*)
7115
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7116
# as there is no search path for DLLs.
7117
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7118
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7119
_LT_AC_TAGVAR(always_export_symbols, $1)=no
7120
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7121
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
7123
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
7124
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
7125
# If the export-symbols file already is a .def file (1st line
7126
# is EXPORTS), use it as is; otherwise, prepend...
7127
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7128
cp $export_symbols $output_objdir/$soname.def;
7130
echo EXPORTS > $output_objdir/$soname.def;
7131
cat $export_symbols >> $output_objdir/$soname.def;
7133
$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
7135
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7140
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7142
case $cc_basename,$host_cpu in
7143
pgcc*) # Portland Group C compiler
7144
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
7145
tmp_addflag=' $pic_flag'
7147
pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
7148
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
7149
tmp_addflag=' $pic_flag -Mnomain' ;;
7150
ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
7151
tmp_addflag=' -i_dynamic' ;;
7152
efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
7153
tmp_addflag=' -i_dynamic -nofor_main' ;;
7154
ifc* | ifort*) # Intel Fortran compiler
7155
tmp_addflag=' -nofor_main' ;;
7157
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7159
if test $supports_anon_versioning = yes; then
7160
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
7161
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7162
$echo "local: *; };" >> $output_objdir/$libname.ver~
7163
$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7165
_LT_AC_TAGVAR(link_all_deplibs, $1)=no
7167
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7171
netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
7172
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
7173
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
7176
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7177
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7182
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
7183
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7186
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
7187
*** create shared libraries on Solaris systems. Therefore, libtool
7188
*** is disabling shared libraries support. We urge you to upgrade GNU
7189
*** binutils to release 2.9.1 or newer. Another option is to modify
7190
*** your PATH or compiler configuration so that the native linker is
7191
*** used, and then restart.
7194
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7195
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7196
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7198
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7203
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7205
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
7206
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7210
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7211
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7212
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7214
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7219
if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
7221
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
7222
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
7223
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
7226
# PORTME fill in a description of your system's linker (not GNU ld)
7229
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7230
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
7231
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
7232
# Note: this linker hardcodes the directories in LIBPATH if there
7233
# are no directories specified by -L.
7234
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7235
if test "$GCC" = yes && test -z "$link_static_flag"; then
7236
# Neither direct hardcoding nor static linking is supported with a
7238
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
7243
if test "$host_cpu" = ia64; then
7244
# On IA64, the linker does run time linking by default, so we don't
7245
# have to do anything special.
7246
aix_use_runtimelinking=no
7247
exp_sym_flag='-Bexport'
7250
# If we're using GNU nm, then we don't want the "-C" option.
7251
# -C means demangle to AIX nm, but means don't demangle with GNU nm
7252
if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
7253
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
7255
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
7257
aix_use_runtimelinking=no
7259
# Test if we are trying to use run time linking or normal
7260
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
7261
# need to do runtime linking.
7262
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
7263
for ld_flag in $LDFLAGS; do
7264
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
7265
aix_use_runtimelinking=yes
7271
exp_sym_flag='-bexport'
7272
no_entry_flag='-bnoentry'
7275
# When large executables or shared objects are built, AIX ld can
7276
# have problems creating the table of contents. If linking a library
7277
# or program results in "error TOC overflow" add -mminimal-toc to
7278
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
7279
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7281
_LT_AC_TAGVAR(archive_cmds, $1)=''
7282
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
7283
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
7284
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7286
if test "$GCC" = yes; then
7287
case $host_os in aix4.[[012]]|aix4.[[012]].*)
7288
# We only want to do this on AIX 4.2 and lower, the check
7289
# below for broken collect2 doesn't work under 4.3+
7290
collect2name=`${CC} -print-prog-name=collect2`
7291
if test -f "$collect2name" && \
7292
strings "$collect2name" | grep resolve_lib_name >/dev/null
7294
# We have reworked collect2
7295
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
7297
# We have old collect2
7298
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
7299
# It fails to find uninstalled libraries when the uninstalled
7300
# path is not listed in the libpath. Setting hardcode_minus_L
7301
# to unsupported forces relinking
7302
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7303
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7304
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
7307
shared_flag='-shared'
7308
if test "$aix_use_runtimelinking" = yes; then
7309
shared_flag="$shared_flag "'${wl}-G'
7313
if test "$host_cpu" = ia64; then
7314
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7315
# chokes on -Wl,-G. The following line is correct:
7318
if test "$aix_use_runtimelinking" = yes; then
7319
shared_flag='${wl}-G'
7321
shared_flag='${wl}-bM:SRE'
7326
# It seems that -bexpall does not export symbols beginning with
7327
# underscore (_), so it is better to generate a list of symbols to export.
7328
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
7329
if test "$aix_use_runtimelinking" = yes; then
7330
# Warning - without using the other runtime loading flags (-brtl),
7331
# -berok will link without error, but may produce a broken library.
7332
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
7333
# Determine the default libpath from the value encoded in an empty executable.
7334
_LT_AC_SYS_LIBPATH_AIX
7335
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7336
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
7338
if test "$host_cpu" = ia64; then
7339
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7340
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7341
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
7343
# Determine the default libpath from the value encoded in an empty executable.
7344
_LT_AC_SYS_LIBPATH_AIX
7345
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7346
# Warning - without using the other run time loading flags,
7347
# -berok will link without error, but may produce a broken library.
7348
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7349
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7350
# -bexpall does not export symbols beginning with underscore (_)
7351
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
7352
# Exported symbols can be pulled into shared objects from archives
7353
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
7354
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7355
# This is similar to how AIX traditionally builds its shared libraries.
7356
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
7362
_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
7363
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7364
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7365
# see comment about different semantics on the GNU ld section
7366
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7370
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
7373
cygwin* | mingw* | pw32*)
7374
# When not using gcc, we currently assume that we are using
7375
# Microsoft Visual C++.
7376
# hardcode_libdir_flag_spec is actually meaningless, as there is
7377
# no search path for DLLs.
7378
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7379
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7380
# Tell ltmain to make .lib files, not .a files.
7382
# Tell ltmain to make .dll files, not .so files.
7384
# FIXME: Setting linknames here is a bad hack.
7385
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
7386
# The linker will automatically build a .lib file if we build a DLL.
7387
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
7388
# FIXME: Should let the user specify the lib program.
7389
_LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
7390
_LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
7391
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7394
darwin* | rhapsody*)
7396
rhapsody* | darwin1.[[012]])
7397
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
7400
if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
7401
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
7403
case ${MACOSX_DEPLOYMENT_TARGET} in
7405
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
7408
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
7414
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7415
_LT_AC_TAGVAR(hardcode_direct, $1)=no
7416
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
7417
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7418
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
7419
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7420
if test "$GCC" = yes ; then
7421
output_verbose_link_cmd='echo'
7422
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
7423
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
7424
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
7425
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
7426
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
7428
case $cc_basename in
7430
output_verbose_link_cmd='echo'
7431
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
7432
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
7433
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
7434
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
7435
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
7438
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7445
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7446
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7447
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7451
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7454
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
7455
# support. Future versions do this automatically, but an explicit c++rt0.o
7456
# does not break anything, and helps significantly (at the cost of a little
7459
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
7460
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7461
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
7462
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7465
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
7467
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7468
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
7469
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7470
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7473
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
7474
freebsd* | kfreebsd*-gnu | dragonfly*)
7475
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
7476
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7477
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
7478
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7482
if test "$GCC" = yes; then
7483
_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
7485
_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
7487
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7488
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7489
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
7491
# hardcode_minus_L: Not really in the search PATH,
7492
# but as the default location of the library.
7493
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7494
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7498
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
7501
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7504
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7510
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
7513
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
7517
if test "$with_gnu_ld" = no; then
7520
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7521
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
7522
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7523
_LT_AC_TAGVAR(hardcode_direct, $1)=no
7524
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7527
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7528
_LT_AC_TAGVAR(hardcode_direct, $1)=no
7529
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7531
# hardcode_minus_L: Not really in the search PATH,
7532
# but as the default location of the library.
7533
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7536
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7537
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7538
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
7539
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7541
# hardcode_minus_L: Not really in the search PATH,
7542
# but as the default location of the library.
7543
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7549
irix5* | irix6* | nonstopux*)
7550
if test "$GCC" = yes; then
7551
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7553
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
7554
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
7556
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7557
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7558
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7561
netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
7562
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
7563
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
7565
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
7567
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7568
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
7569
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7573
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7574
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
7575
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7576
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7577
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7581
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
7582
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7583
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7584
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7585
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
7586
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7587
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7590
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
7591
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7592
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7595
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7596
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7603
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7604
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7605
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7606
_LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
7607
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
7611
if test "$GCC" = yes; then
7612
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7613
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7615
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7616
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
7618
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7619
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7622
osf4* | osf5*) # as osf3* with the addition of -msym flag
7623
if test "$GCC" = yes; then
7624
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7625
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7626
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7628
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7629
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
7630
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
7631
$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
7633
# Both c and cxx compiler support -rpath directly
7634
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7636
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7640
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7641
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7642
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7643
runpath_var=LD_RUN_PATH
7644
hardcode_runpath_var=yes
7648
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
7649
if test "$GCC" = yes; then
7651
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7652
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
7653
$CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
7656
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
7657
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
7658
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
7660
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7661
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7663
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7665
# The compiler driver will combine linker options so we
7666
# cannot just pass the convience library names through
7667
# without $wl, iff we do not link with $LD.
7668
# Luckily, gcc supports the same syntax we need for Sun Studio.
7669
# Supported since Solaris 2.6 (maybe 2.5.1?)
7672
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
7674
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
7677
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7681
if test "x$host_vendor" = xsequent; then
7682
# Use $CC to link under sequent, because it throws in some extra .o
7683
# files that make .init and .fini sections work.
7684
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
7686
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
7688
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7689
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
7690
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7691
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7695
case $host_vendor in
7697
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7698
_LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
7701
## LD is ld it makes a PLAMLIB
7702
## CC just makes a GrossModule.
7703
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
7704
_LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
7705
_LT_AC_TAGVAR(hardcode_direct, $1)=no
7708
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7709
_LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
7712
runpath_var='LD_RUN_PATH'
7713
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7717
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7718
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7719
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
7723
if test -d /usr/nec; then
7724
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7725
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7726
runpath_var=LD_RUN_PATH
7727
hardcode_runpath_var=yes
7728
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
7733
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
7734
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
7735
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
7736
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7737
hardcode_runpath_var=yes
7738
runpath_var=LD_RUN_PATH
7741
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
7742
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
7743
if test "$GCC" = yes; then
7744
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7746
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7748
runpath_var='LD_RUN_PATH'
7749
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7753
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
7754
# $CC -shared without GNU ld will not create a library from C++
7755
# object files and a static libstdc++, better avoid it by now
7756
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
7757
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
7758
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
7759
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
7760
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7761
runpath_var='LD_RUN_PATH'
7765
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7766
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7767
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7771
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7776
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
7777
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7779
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
7780
if test "$GCC" = yes; then
7781
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
7785
# Do we need to explicitly link libc?
7787
case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
7789
# Assume -lc should be added
7790
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7792
if test "$enable_shared" = yes && test "$GCC" = yes; then
7793
case $_LT_AC_TAGVAR(archive_cmds, $1) in
7795
# FIXME: we may have to deal with multi-command sequences.
7798
# Test whether the compiler implicitly links with -lc since on some
7799
# systems, -lgcc has to come before -lc. If gcc already passes -lc
7800
# to ld, don't add -lc before -lgcc.
7801
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
7803
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
7805
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
7808
libobjs=conftest.$ac_objext
7810
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
7816
lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
7817
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
7818
if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
7820
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7822
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7824
_LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
7826
cat conftest.err 1>&5
7829
AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
7835
])# AC_LIBTOOL_PROG_LD_SHLIBS
7838
# _LT_AC_FILE_LTDLL_C
7839
# -------------------
7840
# Be careful that the start marker always follows a newline.
7841
AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
3549
7842
# /* ltdll.c starts here */
3550
7843
# #define WIN32_LEAN_AND_MEAN
3551
7844
# #include <windows.h>
3581
7874
# /* ltdll.c ends here */
3582
# This is a source program that is used to create import libraries
3583
# on Windows for dlls which lack them. Don't remove nor modify the
3584
# starting and closing comments
3585
# /* impgen.c starts here */
3586
# /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
3588
# This file is part of GNU libtool.
3590
# This program is free software; you can redistribute it and/or modify
3591
# it under the terms of the GNU General Public License as published by
3592
# the Free Software Foundation; either version 2 of the License, or
3593
# (at your option) any later version.
3595
# This program is distributed in the hope that it will be useful,
3596
# but WITHOUT ANY WARRANTY; without even the implied warranty of
3597
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3598
# GNU General Public License for more details.
3600
# You should have received a copy of the GNU General Public License
3601
# along with this program; if not, write to the Free Software
3602
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3605
# #include <stdio.h> /* for printf() */
3606
# #include <unistd.h> /* for open(), lseek(), read() */
3607
# #include <fcntl.h> /* for O_RDONLY, O_BINARY */
3608
# #include <string.h> /* for strdup() */
3610
# /* O_BINARY isn't required (or even defined sometimes) under Unix */
3612
# #define O_BINARY 0
3615
# static unsigned int
3616
# pe_get16 (fd, offset)
3620
# unsigned char b[2];
3621
# lseek (fd, offset, SEEK_SET);
3623
# return b[0] + (b[1]<<8);
3626
# static unsigned int
3627
# pe_get32 (fd, offset)
3631
# unsigned char b[4];
3632
# lseek (fd, offset, SEEK_SET);
3634
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3637
# static unsigned int
3641
# unsigned char *b = ptr;
3642
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3651
# unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
3652
# unsigned long export_rva, export_size, nsections, secptr, expptr;
3653
# unsigned long name_rvas, nexp;
3654
# unsigned char *expdata, *erva;
3655
# char *filename, *dll_name;
3657
# filename = argv[1];
3659
# dll = open(filename, O_RDONLY|O_BINARY);
3663
# dll_name = filename;
3665
# for (i=0; filename[i]; i++)
3666
# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
3667
# dll_name = filename + i +1;
3669
# pe_header_offset = pe_get32 (dll, 0x3c);
3670
# opthdr_ofs = pe_header_offset + 4 + 20;
3671
# num_entries = pe_get32 (dll, opthdr_ofs + 92);
3673
# if (num_entries < 1) /* no exports */
3676
# export_rva = pe_get32 (dll, opthdr_ofs + 96);
3677
# export_size = pe_get32 (dll, opthdr_ofs + 100);
3678
# nsections = pe_get16 (dll, pe_header_offset + 4 +2);
3679
# secptr = (pe_header_offset + 4 + 20 +
3680
# pe_get16 (dll, pe_header_offset + 4 + 16));
3683
# for (i = 0; i < nsections; i++)
3686
# unsigned long secptr1 = secptr + 40 * i;
3687
# unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
3688
# unsigned long vsize = pe_get32 (dll, secptr1 + 16);
3689
# unsigned long fptr = pe_get32 (dll, secptr1 + 20);
3690
# lseek(dll, secptr1, SEEK_SET);
3691
# read(dll, sname, 8);
3692
# if (vaddr <= export_rva && vaddr+vsize > export_rva)
3694
# expptr = fptr + (export_rva - vaddr);
3695
# if (export_rva + export_size > vaddr + vsize)
3696
# export_size = vsize - (export_rva - vaddr);
3701
# expdata = (unsigned char*)malloc(export_size);
3702
# lseek (dll, expptr, SEEK_SET);
3703
# read (dll, expdata, export_size);
3704
# erva = expdata - export_rva;
3706
# nexp = pe_as32 (expdata+24);
3707
# name_rvas = pe_as32 (expdata+32);
3709
# printf ("EXPORTS\n");
3710
# for (i = 0; i<nexp; i++)
3712
# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
3713
# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
3718
# /* impgen.c ends here */
3724
# We use sed instead of cat because bash on DJGPP gets confused if
3725
# if finds mixed CR/LF and LF-only lines. Since sed operates in
3726
# text mode, it properly converts lines to CR/LF. This bash problem
3727
# is reportedly fixed, but why not run on old versions too?
3728
sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
3730
mv -f "${ofile}T" "$ofile" || \
3731
(rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
3735
])# _LT_AC_LTCONFIG_HACK
3737
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
3738
AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
3740
# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
3741
AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
3743
# AC_ENABLE_SHARED - implement the --enable-shared flag
3744
# Usage: AC_ENABLE_SHARED[(DEFAULT)]
3745
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3747
AC_DEFUN([AC_ENABLE_SHARED],
3748
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3749
AC_ARG_ENABLE(shared,
3750
changequote(<<, >>)dnl
3751
<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
3752
changequote([, ])dnl
3753
[p=${PACKAGE-default}
3755
yes) enable_shared=yes ;;
3756
no) enable_shared=no ;;
3759
# Look at the argument we got. We use all the common list separators.
3760
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3761
for pkg in $enableval; do
3762
if test "X$pkg" = "X$p"; then
3769
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
3772
# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
3773
AC_DEFUN([AC_DISABLE_SHARED],
3774
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3775
AC_ENABLE_SHARED(no)])
3777
# AC_ENABLE_STATIC - implement the --enable-static flag
3778
# Usage: AC_ENABLE_STATIC[(DEFAULT)]
3779
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3781
AC_DEFUN([AC_ENABLE_STATIC],
3782
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3783
AC_ARG_ENABLE(static,
3784
changequote(<<, >>)dnl
3785
<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
3786
changequote([, ])dnl
3787
[p=${PACKAGE-default}
3789
yes) enable_static=yes ;;
3790
no) enable_static=no ;;
3793
# Look at the argument we got. We use all the common list separators.
3794
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3795
for pkg in $enableval; do
3796
if test "X$pkg" = "X$p"; then
3803
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
3806
# AC_DISABLE_STATIC - set the default static flag to --disable-static
3807
AC_DEFUN([AC_DISABLE_STATIC],
3808
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3809
AC_ENABLE_STATIC(no)])
3812
# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
3813
# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
3814
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3816
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
3817
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3818
AC_ARG_ENABLE(fast-install,
3819
changequote(<<, >>)dnl
3820
<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
3821
changequote([, ])dnl
3822
[p=${PACKAGE-default}
3824
yes) enable_fast_install=yes ;;
3825
no) enable_fast_install=no ;;
3827
enable_fast_install=no
3828
# Look at the argument we got. We use all the common list separators.
3829
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3830
for pkg in $enableval; do
3831
if test "X$pkg" = "X$p"; then
3832
enable_fast_install=yes
3838
enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
3841
# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
3842
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
3843
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3844
AC_ENABLE_FAST_INSTALL(no)])
3846
# AC_LIBTOOL_PICMODE - implement the --with-pic flag
3847
# Usage: AC_LIBTOOL_PICMODE[(MODE)]
3848
# Where MODE is either `yes' or `no'. If omitted, it defaults to
3850
AC_DEFUN([AC_LIBTOOL_PICMODE],
3851
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3852
pic_mode=ifelse($#,1,$1,default)])
3855
# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
3856
AC_DEFUN([AC_PATH_TOOL_PREFIX],
3857
[AC_MSG_CHECKING([for $1])
3858
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3861
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3864
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
3867
ac_save_MAGIC_CMD="$MAGIC_CMD"
3868
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3869
dnl $ac_dummy forces splitting on constant user-supplied paths.
3870
dnl POSIX.2 word splitting is done only on the output of word expansions,
3871
dnl not every word. This closes a longstanding sh security hole.
3872
ac_dummy="ifelse([$2], , $PATH, [$2])"
3873
for ac_dir in $ac_dummy; do
3874
test -z "$ac_dir" && ac_dir=.
3875
if test -f $ac_dir/$1; then
3876
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3877
if test -n "$file_magic_test_file"; then
3878
case $deplibs_check_method in
3880
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3881
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3882
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3883
egrep "$file_magic_regex" > /dev/null; then
3888
*** Warning: the command libtool uses to detect shared libraries,
3889
*** $file_magic_cmd, produces output that libtool cannot recognize.
3890
*** The result is that libtool may fail to recognize shared libraries
3891
*** as such. This will affect the creation of libtool libraries that
3892
*** depend on shared libraries, but programs linked with such libtool
3893
*** libraries will work regardless of this problem. Nevertheless, you
3894
*** may want to report the problem to your system manager and/or to
3895
*** bug-libtool@gnu.org
3905
MAGIC_CMD="$ac_save_MAGIC_CMD"
3908
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3909
if test -n "$MAGIC_CMD"; then
3910
AC_MSG_RESULT($MAGIC_CMD)
3917
# AC_PATH_MAGIC - find a file program which can recognise a shared library
3918
AC_DEFUN([AC_PATH_MAGIC],
3919
[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
3920
AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
3921
if test -z "$lt_cv_path_MAGIC_CMD"; then
3922
if test -n "$ac_tool_prefix"; then
3923
AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
3931
# AC_PROG_LD - find the path to the GNU or non-GNU linker
3932
AC_DEFUN([AC_PROG_LD],
3933
[AC_ARG_WITH(gnu-ld,
3934
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
3935
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
3936
AC_REQUIRE([AC_PROG_CC])dnl
3937
AC_REQUIRE([AC_CANONICAL_HOST])dnl
3938
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3939
AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
3941
if test "$GCC" = yes; then
3942
# Check if gcc -print-prog-name=ld gives a path.
3943
AC_MSG_CHECKING([for ld used by GCC])
3946
# gcc leaves a trailing carriage return which upsets mingw
3947
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3949
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3952
# Accept absolute paths.
3953
[[\\/]]* | [[A-Za-z]]:[[\\/]]*)
3954
re_direlt='/[[^/]][[^/]]*/\.\./'
3955
# Canonicalize the path of ld
3956
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3957
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3958
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3960
test -z "$LD" && LD="$ac_prog"
3963
# If it fails, then pretend we aren't using GCC.
3967
# If it is relative, then search for the first ld in PATH.
3971
elif test "$with_gnu_ld" = yes; then
3972
AC_MSG_CHECKING([for GNU ld])
3974
AC_MSG_CHECKING([for non-GNU ld])
3976
AC_CACHE_VAL(lt_cv_path_LD,
3977
[if test -z "$LD"; then
3978
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3979
for ac_dir in $PATH; do
3980
test -z "$ac_dir" && ac_dir=.
3981
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3982
lt_cv_path_LD="$ac_dir/$ac_prog"
3983
# Check to see if the program is GNU ld. I'd rather use --version,
3984
# but apparently some GNU ld's only accept -v.
3985
# Break only if it was the GNU/non-GNU ld that we prefer.
3986
if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3987
test "$with_gnu_ld" != no && break
3989
test "$with_gnu_ld" != yes && break
3995
lt_cv_path_LD="$LD" # Let the user override the test with a path.
3998
if test -n "$LD"; then
4003
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4008
AC_DEFUN([AC_PROG_LD_GNU],
4009
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4010
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
4011
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
4012
lt_cv_prog_gnu_ld=yes
4014
lt_cv_prog_gnu_ld=no
4016
with_gnu_ld=$lt_cv_prog_gnu_ld
4019
# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
4020
# -- PORTME Some linkers may need a different reload flag.
4021
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
4022
[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
4023
[lt_cv_ld_reload_flag='-r'])
4024
reload_flag=$lt_cv_ld_reload_flag
4025
test -n "$reload_flag" && reload_flag=" $reload_flag"
4028
# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
4029
# -- PORTME fill in with the dynamic library characteristics
4030
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
4031
[AC_CACHE_CHECK([how to recognise dependant libraries],
4032
lt_cv_deplibs_check_method,
4033
[lt_cv_file_magic_cmd='$MAGIC_CMD'
4034
lt_cv_file_magic_test_file=
4035
lt_cv_deplibs_check_method='unknown'
4036
# Need to set the preceding variable on all platforms that support
4037
# interlibrary dependencies.
4038
# 'none' -- dependencies not supported.
4039
# `unknown' -- same as none, but documents that we really don't know.
4040
# 'pass_all' -- all dependencies passed with no checks.
4041
# 'test_compile' -- check by making test program.
4042
# 'file_magic [[regex]]' -- check by looking for files in library path
4043
# which responds to the $file_magic_cmd with a given egrep regex.
4044
# If you have `file' or equivalent on your system and you're not sure
4045
# whether `pass_all' will *always* work, you probably want this one.
4049
lt_cv_deplibs_check_method=pass_all
4053
lt_cv_deplibs_check_method=pass_all
4057
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4058
lt_cv_file_magic_cmd='/usr/bin/file -L'
4059
lt_cv_file_magic_test_file=/shlib/libc.so
4062
cygwin* | mingw* | pw32*)
4063
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
4064
lt_cv_file_magic_cmd='$OBJDUMP -f'
4067
darwin* | rhapsody*)
4068
lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
4069
lt_cv_file_magic_cmd='/usr/bin/file -L'
4071
rhapsody* | darwin1.[[012]])
4072
lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
4075
lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
4081
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4084
# Not sure whether the presence of OpenBSD here was a mistake.
4085
# Let's accept both of them until this is cleared up.
4086
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
4087
lt_cv_file_magic_cmd=/usr/bin/file
4088
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4092
lt_cv_deplibs_check_method=pass_all
4097
lt_cv_deplibs_check_method=pass_all
4101
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
4102
lt_cv_file_magic_cmd=/usr/bin/file
4103
lt_cv_file_magic_test_file=/usr/lib/libc.sl
4109
# this will be overridden with pass_all, but let us keep it just in case
4110
lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
4114
*-32|*"-32 ") libmagic=32-bit;;
4115
*-n32|*"-n32 ") libmagic=N32;;
4116
*-64|*"-64 ") libmagic=64-bit;;
4117
*) libmagic=never-match;;
4119
# this will be overridden with pass_all, but let us keep it just in case
4120
lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
4123
lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
4124
lt_cv_deplibs_check_method=pass_all
4127
# This must be Linux ELF.
4130
alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | s390* )
4131
lt_cv_deplibs_check_method=pass_all ;;
4133
# glibc up to 2.1.1 does not perform some relocations on ARM
4134
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
4136
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
4140
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4141
lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
4143
lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
4148
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4149
lt_cv_file_magic_cmd=/usr/bin/file
4150
lt_cv_file_magic_test_file=/usr/lib/libnls.so
4154
lt_cv_file_magic_cmd=/usr/bin/file
4155
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4156
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4157
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
4159
lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
4163
osf3* | osf4* | osf5*)
4164
# this will be overridden with pass_all, but let us keep it just in case
4165
lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
4166
lt_cv_file_magic_test_file=/shlib/libc.so
4167
lt_cv_deplibs_check_method=pass_all
4171
lt_cv_deplibs_check_method=pass_all
4175
lt_cv_deplibs_check_method=pass_all
4176
lt_cv_file_magic_test_file=/lib/libc.so
4179
sysv5uw[[78]]* | sysv4*uw2*)
4180
lt_cv_deplibs_check_method=pass_all
4183
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4184
case $host_vendor in
4186
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]]'
4187
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4190
lt_cv_deplibs_check_method=pass_all
4193
lt_cv_file_magic_cmd='/bin/file'
4194
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4197
lt_cv_file_magic_cmd='/bin/file'
4198
lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4199
lt_cv_file_magic_test_file=/lib/libc.so
4205
file_magic_cmd=$lt_cv_file_magic_cmd
4206
deplibs_check_method=$lt_cv_deplibs_check_method
4210
# AC_PROG_NM - find the path to a BSD-compatible name lister
4211
AC_DEFUN([AC_PROG_NM],
4212
[AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
4213
AC_MSG_CHECKING([for BSD-compatible nm])
4214
AC_CACHE_VAL(lt_cv_path_NM,
4215
[if test -n "$NM"; then
4216
# Let the user override the test.
4219
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4220
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
4221
test -z "$ac_dir" && ac_dir=.
4222
tmp_nm=$ac_dir/${ac_tool_prefix}nm
4223
if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
4224
# Check to see if the nm accepts a BSD-compat flag.
4225
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
4226
# nm: unknown option "B" ignored
4227
# Tru64's nm complains that /dev/null is an invalid object file
4228
if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
4229
lt_cv_path_NM="$tmp_nm -B"
4231
elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
4232
lt_cv_path_NM="$tmp_nm -p"
4235
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4236
continue # so that we can try to find one that supports BSD flags
4241
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
4244
AC_MSG_RESULT([$NM])
4247
# AC_CHECK_LIBM - check for math library
4248
AC_DEFUN([AC_CHECK_LIBM],
4249
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4252
*-*-beos* | *-*-cygwin* | *-*-pw32*)
4253
# These system don't have libm
4256
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4257
AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
4260
AC_CHECK_LIB(m, main, LIBM="-lm")
4265
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
4266
# the libltdl convenience library and INCLTDL to the include flags for
4267
# the libltdl header and adds --enable-ltdl-convenience to the
4268
# configure arguments. Note that LIBLTDL and INCLTDL are not
4269
# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
4270
# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
4271
# with '${top_builddir}/' and INCLTDL will be prefixed with
4272
# '${top_srcdir}/' (note the single quotes!). If your package is not
4273
# flat and you're not using automake, define top_builddir and
4274
# top_srcdir appropriately in the Makefiles.
4275
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
4276
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4277
case $enable_ltdl_convenience in
4278
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
4279
"") enable_ltdl_convenience=yes
4280
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
4282
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
4283
INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4286
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
4287
# the libltdl installable library and INCLTDL to the include flags for
4288
# the libltdl header and adds --enable-ltdl-install to the configure
4289
# arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
4290
# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
4291
# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
4292
# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
4293
# with '${top_srcdir}/' (note the single quotes!). If your package is
4294
# not flat and you're not using automake, define top_builddir and
4295
# top_srcdir appropriately in the Makefiles.
4296
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
4297
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
4298
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4299
AC_CHECK_LIB(ltdl, main,
4300
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
4301
[if test x"$enable_ltdl_install" = xno; then
4302
AC_MSG_WARN([libltdl not installed, but installation disabled])
4304
enable_ltdl_install=yes
4307
if test x"$enable_ltdl_install" = x"yes"; then
4308
ac_configure_args="$ac_configure_args --enable-ltdl-install"
4309
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
4310
INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4312
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
7875
])# _LT_AC_FILE_LTDLL_C
7878
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
7879
# ---------------------------------
7880
AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
4319
7884
AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
4820
[# Capture the value of obsolete $ALL_LINGUAS because we need it to compute
4821
# POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
8271
[# Capture the value of obsolete ALL_LINGUAS because we need it to compute
8272
# POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
4822
8273
# from automake.
4823
eval 'ALL_LINGUAS''="$ALL_LINGUAS"'
8274
eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
4824
8275
# Capture the value of LINGUAS because we need it to compute CATALOGS.
4825
8276
LINGUAS="${LINGUAS-%UNSET%}"
4830
dnl Checks for all prerequisites of the intl subdirectory,
4831
dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
4832
dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
4833
AC_DEFUN([AM_INTL_SUBDIR],
8280
dnl Postprocesses a Makefile in a directory containing PO files.
8281
AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
4835
AC_REQUIRE([AC_PROG_INSTALL])dnl
4836
AC_REQUIRE([AM_MKINSTALLDIRS])dnl
4837
AC_REQUIRE([AC_PROG_CC])dnl
4838
AC_REQUIRE([AC_CANONICAL_HOST])dnl
4839
AC_REQUIRE([AC_PROG_RANLIB])dnl
4840
AC_REQUIRE([AC_ISC_POSIX])dnl
4841
AC_REQUIRE([AC_HEADER_STDC])dnl
4842
AC_REQUIRE([AC_C_CONST])dnl
4843
AC_REQUIRE([AC_C_INLINE])dnl
4844
AC_REQUIRE([AC_TYPE_OFF_T])dnl
4845
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
4846
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
4847
AC_REQUIRE([AC_FUNC_MMAP])dnl
4848
AC_REQUIRE([jm_GLIBC21])dnl
4849
AC_REQUIRE([gt_INTDIV0])dnl
4850
AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl
4851
AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
4852
AC_REQUIRE([gt_INTTYPES_PRI])dnl
4854
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
4855
stdlib.h string.h unistd.h sys/param.h])
4856
AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
4857
geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \
4858
strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
4862
if test $ac_cv_header_locale_h = yes; then
8283
# When this code is run, in config.status, two variables have already been
8285
# - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
8286
# - LINGUAS is the value of the environment variable LINGUAS at configure
8290
# Adjust a relative srcdir.
8291
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
8292
ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
8293
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
8294
# In autoconf-2.13 it is called $ac_given_srcdir.
8295
# In autoconf-2.50 it is called $srcdir.
8296
test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
8297
case "$ac_given_srcdir" in
8298
.) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
8299
/*) top_srcdir="$ac_given_srcdir" ;;
8300
*) top_srcdir="$ac_dots$ac_given_srcdir" ;;
8303
# Find a way to echo strings without interpreting backslash.
8304
if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
8307
if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
8308
gt_echo='printf %s\n'
4866
dnl intl/plural.c is generated from intl/plural.y. It requires bison,
4867
dnl because plural.y uses bison specific features. It requires at least
4868
dnl bison-1.26 because earlier versions generate a plural.c that doesn't
4870
dnl bison is only needed for the maintainer (who touches plural.y). But in
4871
dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
4872
dnl the rule in general Makefile. Now, some people carelessly touch the
4873
dnl files or have a broken "make" program, hence the plural.c rule will
4874
dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
4875
dnl present or too old.
4876
AC_CHECK_PROGS([INTLBISON], [bison])
4877
if test -z "$INTLBISON"; then
4880
dnl Found it, now check the version.
4881
AC_MSG_CHECKING([version of bison])
4882
changequote(<<,>>)dnl
4883
ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
4884
case $ac_prog_version in
4885
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
4886
1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
8319
# A sed script that extracts the value of VARIABLE from a Makefile.
8321
# Test if the hold space is empty.
8326
# Yes it was empty. Look if we have the expected variable definition.
8327
/^[ ]*VARIABLE[ ]*=/{
8328
# Seen the first line of the variable definition.
8329
s/^[ ]*VARIABLE[ ]*=//
8334
# Here we are processing a line from the variable definition.
8335
# Remove comment, more precisely replace it with a space.
8337
# See if the line ends in a backslash.
8341
# Print the line, without the trailing backslash.
8344
# There was no trailing backslash. The end of the variable definition is
8345
# reached. Clear the hold space.
8350
# A trailing backslash means that the variable definition continues in the
8351
# next line. Put a nonempty string into the hold space to indicate this.
4887
8356
changequote([,])dnl
4888
ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
4889
*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
4891
AC_MSG_RESULT([$ac_prog_version])
4893
if test $ac_verc_fail = yes; then
4899
AC_DEFUN([AM_MKINSTALLDIRS],
4901
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
4902
dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
4903
dnl Try to locate is.
4905
if test -n "$ac_aux_dir"; then
4906
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
4908
if test -z "$MKINSTALLDIRS"; then
4909
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
4911
AC_SUBST(MKINSTALLDIRS)
4915
dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
4916
AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
4918
# lib-prefix.m4 serial 1 (gettext-0.11)
4919
dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
4920
dnl This file is free software, distributed under the terms of the GNU
4921
dnl General Public License. As a special exception to the GNU General
4922
dnl Public License, this file may be distributed as part of a program
4923
dnl that contains a configuration script generated by Autoconf, under
4924
dnl the same distribution terms as the rest of that program.
8358
# Set POTFILES to the value of the Makefile variable POTFILES.
8359
sed_x_POTFILES="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`"
8360
POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
8361
# Compute POTFILES_DEPS as
8362
# $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
8364
for file in $POTFILES; do
8365
POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
8369
if test -n "$OBSOLETE_ALL_LINGUAS"; then
8370
test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
8372
if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
8373
# The LINGUAS file contains the set of available languages.
8374
ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
8375
POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
8377
# Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
8378
sed_x_LINGUAS="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`"
8379
ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
8381
# Hide the ALL_LINGUAS assigment from automake.
8382
eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
8384
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
8385
# Compute UPDATEPOFILES
8386
# as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
8387
# Compute DUMMYPOFILES
8388
# as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
8390
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
8391
# Compute PROPERTIESFILES
8392
# as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
8393
# Compute CLASSFILES
8394
# as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
8396
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
8398
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
8399
# Compute RESOURCESDLLFILES
8400
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
8401
case "$ac_given_srcdir" in
8403
*) srcdirpre='$(srcdir)/' ;;
8414
for lang in $ALL_LINGUAS; do
8415
POFILES="$POFILES $srcdirpre$lang.po"
8416
UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
8417
DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
8418
GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
8419
PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
8420
CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
8421
QMFILES="$QMFILES $srcdirpre$lang.qm"
8422
frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
8423
MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
8424
frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
8425
RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
8427
# CATALOGS depends on both $ac_dir and the user's LINGUAS
8428
# environment variable.
8430
if test -n "$ALL_LINGUAS"; then
8431
for presentlang in $ALL_LINGUAS; do
8433
if test "%UNSET%" != "$LINGUAS"; then
8434
desiredlanguages="$LINGUAS"
8436
desiredlanguages="$ALL_LINGUAS"
8438
for desiredlang in $desiredlanguages; do
8439
# Use the presentlang catalog if desiredlang is
8440
# a. equal to presentlang, or
8441
# b. a variant of presentlang (because in this case,
8442
# presentlang can be used as a fallback for messages
8443
# which are not translated in the desiredlang catalog).
8444
case "$desiredlang" in
8445
"$presentlang"*) useit=yes;;
8448
if test $useit = yes; then
8449
INST_LINGUAS="$INST_LINGUAS $presentlang"
8458
if test -n "$INST_LINGUAS"; then
8459
for lang in $INST_LINGUAS; do
8460
CATALOGS="$CATALOGS $lang.gmo"
8461
JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
8462
QTCATALOGS="$QTCATALOGS $lang.qm"
8463
frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
8464
TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
8465
frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
8466
CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
8470
sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
8471
if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
8472
# Add dependencies that cannot be formulated as a simple suffix rule.
8473
for lang in $ALL_LINGUAS; do
8474
frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
8475
cat >> "$ac_file.tmp" <<EOF
8476
$frobbedlang.msg: $lang.po
8477
@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
8478
\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
8482
if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
8483
# Add dependencies that cannot be formulated as a simple suffix rule.
8484
for lang in $ALL_LINGUAS; do
8485
frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
8486
cat >> "$ac_file.tmp" <<EOF
8487
$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
8488
@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
8489
\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
8493
if test -n "$POMAKEFILEDEPS"; then
8494
cat >> "$ac_file.tmp" <<EOF
8495
Makefile: $POMAKEFILEDEPS
8498
mv "$ac_file.tmp" "$ac_file"
8501
# printf-posix.m4 serial 2 (gettext-0.13.1)
8502
dnl Copyright (C) 2003 Free Software Foundation, Inc.
8503
dnl This file is free software; the Free Software Foundation
8504
dnl gives unlimited permission to copy and/or distribute it,
8505
dnl with or without modifications, as long as this notice is preserved.
4926
8507
dnl From Bruno Haible.
8508
dnl Test whether the printf() function supports POSIX/XSI format strings with
4928
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
4929
dnl to access previously installed libraries. The basic assumption is that
4930
dnl a user will want packages to use other packages he previously installed
4931
dnl with the same --prefix option.
4932
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
4933
dnl libraries, but is otherwise very convenient.
4934
AC_DEFUN([AC_LIB_PREFIX],
8511
AC_DEFUN([gt_PRINTF_POSIX],
4936
AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
4937
8513
AC_REQUIRE([AC_PROG_CC])
4938
AC_REQUIRE([AC_CANONICAL_HOST])
4939
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
4940
dnl By default, look in $includedir and $libdir.
4942
AC_LIB_WITH_FINAL_PREFIX([
4943
eval additional_includedir=\"$includedir\"
4944
eval additional_libdir=\"$libdir\"
4946
AC_ARG_WITH([lib-prefix],
4947
[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
4948
--without-lib-prefix don't search for libraries in includedir and libdir],
4950
if test "X$withval" = "Xno"; then
4953
if test "X$withval" = "X"; then
4954
AC_LIB_WITH_FINAL_PREFIX([
4955
eval additional_includedir=\"$includedir\"
4956
eval additional_libdir=\"$libdir\"
4959
additional_includedir="$withval/include"
4960
additional_libdir="$withval/lib"
4964
if test $use_additional = yes; then
4965
dnl Potentially add $additional_includedir to $CPPFLAGS.
4966
dnl But don't add it
4967
dnl 1. if it's the standard /usr/include,
4968
dnl 2. if it's already present in $CPPFLAGS,
4969
dnl 3. if it's /usr/local/include and we are using GCC on Linux,
4970
dnl 4. if it doesn't exist as a directory.
4971
if test "X$additional_includedir" != "X/usr/include"; then
4973
for x in $CPPFLAGS; do
4974
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
4975
if test "X$x" = "X-I$additional_includedir"; then
4980
if test -z "$haveit"; then
4981
if test "X$additional_includedir" = "X/usr/local/include"; then
4982
if test -n "$GCC"; then
4984
linux*) haveit=yes;;
4988
if test -z "$haveit"; then
4989
if test -d "$additional_includedir"; then
4990
dnl Really add $additional_includedir to $CPPFLAGS.
4991
CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
4996
dnl Potentially add $additional_libdir to $LDFLAGS.
4997
dnl But don't add it
4998
dnl 1. if it's the standard /usr/lib,
4999
dnl 2. if it's already present in $LDFLAGS,
5000
dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
5001
dnl 4. if it doesn't exist as a directory.
5002
if test "X$additional_libdir" != "X/usr/lib"; then
5004
for x in $LDFLAGS; do
5005
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
5006
if test "X$x" = "X-L$additional_libdir"; then
5011
if test -z "$haveit"; then
5012
if test "X$additional_libdir" = "X/usr/local/lib"; then
5013
if test -n "$GCC"; then
5015
linux*) haveit=yes;;
5019
if test -z "$haveit"; then
5020
if test -d "$additional_libdir"; then
5021
dnl Really add $additional_libdir to $LDFLAGS.
5022
LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
5030
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
5031
dnl acl_final_exec_prefix, containing the values to which $prefix and
5032
dnl $exec_prefix will expand at the end of the configure script.
5033
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
5035
dnl Unfortunately, prefix and exec_prefix get only finally determined
5036
dnl at the end of configure.
5037
if test "X$prefix" = "XNONE"; then
5038
acl_final_prefix="$ac_default_prefix"
5040
acl_final_prefix="$prefix"
5042
if test "X$exec_prefix" = "XNONE"; then
5043
acl_final_exec_prefix='${prefix}'
5045
acl_final_exec_prefix="$exec_prefix"
5047
acl_save_prefix="$prefix"
5048
prefix="$acl_final_prefix"
5049
eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
5050
prefix="$acl_save_prefix"
5053
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
5054
dnl variables prefix and exec_prefix bound to the values they will have
5055
dnl at the end of the configure script.
5056
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
5058
acl_save_prefix="$prefix"
5059
prefix="$acl_final_prefix"
5060
acl_save_exec_prefix="$exec_prefix"
5061
exec_prefix="$acl_final_exec_prefix"
5063
exec_prefix="$acl_save_exec_prefix"
5064
prefix="$acl_save_prefix"
5067
# lib-link.m4 serial 3 (gettext-0.11.3)
5068
dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
5069
dnl This file is free software, distributed under the terms of the GNU
5070
dnl General Public License. As a special exception to the GNU General
5071
dnl Public License, this file may be distributed as part of a program
5072
dnl that contains a configuration script generated by Autoconf, under
5073
dnl the same distribution terms as the rest of that program.
5075
dnl From Bruno Haible.
5077
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
5078
dnl the libraries corresponding to explicit and implicit dependencies.
5079
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
5080
dnl augments the CPPFLAGS variable.
5081
AC_DEFUN([AC_LIB_LINKFLAGS],
5083
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
5084
AC_REQUIRE([AC_LIB_RPATH])
5085
define([Name],[translit([$1],[./-], [___])])
5086
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
5087
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
5088
AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
5089
AC_LIB_LINKFLAGS_BODY([$1], [$2])
5090
ac_cv_lib[]Name[]_libs="$LIB[]NAME"
5091
ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
5092
ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
5094
LIB[]NAME="$ac_cv_lib[]Name[]_libs"
5095
LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
5096
INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
5097
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
5099
AC_SUBST([LTLIB]NAME)
5100
dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
5101
dnl results of this search when this library appears as a dependency.
5107
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
5108
dnl searches for libname and the libraries corresponding to explicit and
5109
dnl implicit dependencies, together with the specified include files and
5110
dnl the ability to compile and link the specified testcode. If found, it
5111
dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
5112
dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
5113
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
5114
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
5115
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
5117
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
5118
AC_REQUIRE([AC_LIB_RPATH])
5119
define([Name],[translit([$1],[./-], [___])])
5120
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
5121
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
5123
dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
5125
AC_LIB_LINKFLAGS_BODY([$1], [$2])
5127
dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
5128
dnl because if the user has installed lib[]Name and not disabled its use
5129
dnl via --without-lib[]Name-prefix, he wants to use it.
5130
ac_save_CPPFLAGS="$CPPFLAGS"
5131
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
5133
AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
5134
ac_save_LIBS="$LIBS"
5135
LIBS="$LIBS $LIB[]NAME"
5136
AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
5137
LIBS="$ac_save_LIBS"
5139
if test "$ac_cv_lib[]Name" = yes; then
5141
AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
5142
AC_MSG_CHECKING([how to link with lib[]$1])
5143
AC_MSG_RESULT([$LIB[]NAME])
5146
dnl If $LIB[]NAME didn't lead to a usable library, we don't need
5147
dnl $INC[]NAME either.
5148
CPPFLAGS="$ac_save_CPPFLAGS"
5152
AC_SUBST([HAVE_LIB]NAME)
5154
AC_SUBST([LTLIB]NAME)
5159
dnl Determine the platform dependent parameters needed to use rpath:
5160
dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
5161
dnl hardcode_direct, hardcode_minus_L,
5162
dnl sys_lib_search_path_spec, sys_lib_dlsearch_path_spec.
5163
AC_DEFUN([AC_LIB_RPATH],
5165
AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
5166
AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
5167
AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
5168
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
5169
AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
5170
CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
5171
${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
5177
libext="$acl_cv_libext"
5178
shlibext="$acl_cv_shlibext"
5179
hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
5180
hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
5181
hardcode_direct="$acl_cv_hardcode_direct"
5182
hardcode_minus_L="$acl_cv_hardcode_minus_L"
5183
sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec"
5184
sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec"
5185
dnl Determine whether the user wants rpath handling at all.
5186
AC_ARG_ENABLE(rpath,
5187
[ --disable-rpath do not hardcode runtime library paths],
5188
:, enable_rpath=yes)
5191
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
5192
dnl the libraries corresponding to explicit and implicit dependencies.
5193
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
5194
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
5196
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
5197
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
5198
dnl By default, look in $includedir and $libdir.
5200
AC_LIB_WITH_FINAL_PREFIX([
5201
eval additional_includedir=\"$includedir\"
5202
eval additional_libdir=\"$libdir\"
5204
AC_ARG_WITH([lib$1-prefix],
5205
[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
5206
--without-lib$1-prefix don't search for lib$1 in includedir and libdir],
5208
if test "X$withval" = "Xno"; then
5211
if test "X$withval" = "X"; then
5212
AC_LIB_WITH_FINAL_PREFIX([
5213
eval additional_includedir=\"$includedir\"
5214
eval additional_libdir=\"$libdir\"
5217
additional_includedir="$withval/include"
5218
additional_libdir="$withval/lib"
5222
dnl Search the library and its dependencies in $additional_libdir and
5223
dnl $LDFLAGS. Using breadth-first-seach.
5229
names_already_handled=
5230
names_next_round='$1 $2'
5231
while test -n "$names_next_round"; do
5232
names_this_round="$names_next_round"
5234
for name in $names_this_round; do
5236
for n in $names_already_handled; do
5237
if test "$n" = "$name"; then
5242
if test -z "$already_handled"; then
5243
names_already_handled="$names_already_handled $name"
5244
dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
5245
dnl or AC_LIB_HAVE_LINKFLAGS call.
5246
uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
5247
eval value=\"\$HAVE_LIB$uppername\"
5248
if test -n "$value"; then
5249
if test "$value" = yes; then
5250
eval value=\"\$LIB$uppername\"
5251
test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
5252
eval value=\"\$LTLIB$uppername\"
5253
test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
5255
dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
5256
dnl that this library doesn't exist. So just drop it.
5260
dnl Search the library lib$name in $additional_libdir and $LDFLAGS
5261
dnl and the already constructed $LIBNAME/$LTLIBNAME.
5266
if test $use_additional = yes; then
5267
if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
5268
found_dir="$additional_libdir"
5269
found_so="$additional_libdir/lib$name.$shlibext"
5270
if test -f "$additional_libdir/lib$name.la"; then
5271
found_la="$additional_libdir/lib$name.la"
5274
if test -f "$additional_libdir/lib$name.$libext"; then
5275
found_dir="$additional_libdir"
5276
found_a="$additional_libdir/lib$name.$libext"
5277
if test -f "$additional_libdir/lib$name.la"; then
5278
found_la="$additional_libdir/lib$name.la"
5283
if test "X$found_dir" = "X"; then
5284
for x in $LDFLAGS $LTLIB[]NAME; do
5285
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
5288
dir=`echo "X$x" | sed -e 's/^X-L//'`
5289
if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
5291
found_so="$dir/lib$name.$shlibext"
5292
if test -f "$dir/lib$name.la"; then
5293
found_la="$dir/lib$name.la"
5296
if test -f "$dir/lib$name.$libext"; then
5298
found_a="$dir/lib$name.$libext"
5299
if test -f "$dir/lib$name.la"; then
5300
found_la="$dir/lib$name.la"
5306
if test "X$found_dir" != "X"; then
5311
if test "X$found_dir" != "X"; then
5312
dnl Found the library.
5313
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
5314
if test "X$found_so" != "X"; then
5315
dnl Linking with a shared library. We attempt to hardcode its
5316
dnl directory into the executable's runpath, unless it's the
5317
dnl standard /usr/lib.
5318
if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
5319
dnl No hardcoding is needed.
5320
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
5322
dnl Use an explicit option to hardcode DIR into the resulting
5324
dnl Potentially add DIR to ltrpathdirs.
5325
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
5327
for x in $ltrpathdirs; do
5328
if test "X$x" = "X$found_dir"; then
5333
if test -z "$haveit"; then
5334
ltrpathdirs="$ltrpathdirs $found_dir"
5336
dnl The hardcoding into $LIBNAME is system dependent.
5337
if test "$hardcode_direct" = yes; then
5338
dnl Using DIR/libNAME.so during linking hardcodes DIR into the
5339
dnl resulting binary.
5340
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
5342
if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
5343
dnl Use an explicit option to hardcode DIR into the resulting
5345
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
5346
dnl Potentially add DIR to rpathdirs.
5347
dnl The rpathdirs will be appended to $LIBNAME at the end.
5349
for x in $rpathdirs; do
5350
if test "X$x" = "X$found_dir"; then
5355
if test -z "$haveit"; then
5356
rpathdirs="$rpathdirs $found_dir"
5359
dnl Rely on "-L$found_dir".
5360
dnl But don't add it if it's already contained in the LDFLAGS
5361
dnl or the already constructed $LIBNAME
5363
for x in $LDFLAGS $LIB[]NAME; do
5364
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
5365
if test "X$x" = "X-L$found_dir"; then
5370
if test -z "$haveit"; then
5371
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
5373
if test "$hardcode_minus_L" != no; then
5374
dnl FIXME: Not sure whether we should use
5375
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
5377
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
5379
dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
5380
dnl here, because this doesn't fit in flags passed to the
5381
dnl compiler. So give up. No hardcoding. This affects only
5382
dnl very old systems.
5383
dnl FIXME: Not sure whether we should use
5384
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
5386
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
5392
if test "X$found_a" != "X"; then
5393
dnl Linking with a static library.
5394
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
5396
dnl We shouldn't come here, but anyway it's good to have a
5398
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
5401
dnl Assume the include files are nearby.
5402
additional_includedir=
5403
case "$found_dir" in
5405
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
5406
additional_includedir="$basedir/include"
5409
if test "X$additional_includedir" != "X"; then
5410
dnl Potentially add $additional_includedir to $INCNAME.
5411
dnl But don't add it
5412
dnl 1. if it's the standard /usr/include,
5413
dnl 2. if it's /usr/local/include and we are using GCC on Linux,
5414
dnl 3. if it's already present in $CPPFLAGS or the already
5415
dnl constructed $INCNAME,
5416
dnl 4. if it doesn't exist as a directory.
5417
if test "X$additional_includedir" != "X/usr/include"; then
5419
if test "X$additional_includedir" = "X/usr/local/include"; then
5420
if test -n "$GCC"; then
5422
linux*) haveit=yes;;
5426
if test -z "$haveit"; then
5427
for x in $CPPFLAGS $INC[]NAME; do
5428
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
5429
if test "X$x" = "X-I$additional_includedir"; then
5434
if test -z "$haveit"; then
5435
if test -d "$additional_includedir"; then
5436
dnl Really add $additional_includedir to $INCNAME.
5437
INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
5443
dnl Look for dependencies.
5444
if test -n "$found_la"; then
5445
dnl Read the .la file. It defines the variables
5446
dnl dlname, library_names, old_library, dependency_libs, current,
5447
dnl age, revision, installed, dlopen, dlpreopen, libdir.
5448
save_libdir="$libdir"
5450
*/* | *\\*) . "$found_la" ;;
5451
*) . "./$found_la" ;;
5453
libdir="$save_libdir"
5454
dnl We use only dependency_libs.
5455
for dep in $dependency_libs; do
5458
additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
5459
dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
5460
dnl But don't add it
5461
dnl 1. if it's the standard /usr/lib,
5462
dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
5463
dnl 3. if it's already present in $LDFLAGS or the already
5464
dnl constructed $LIBNAME,
5465
dnl 4. if it doesn't exist as a directory.
5466
if test "X$additional_libdir" != "X/usr/lib"; then
5468
if test "X$additional_libdir" = "X/usr/local/lib"; then
5469
if test -n "$GCC"; then
5471
linux*) haveit=yes;;
5475
if test -z "$haveit"; then
5477
for x in $LDFLAGS $LIB[]NAME; do
5478
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
5479
if test "X$x" = "X-L$additional_libdir"; then
5484
if test -z "$haveit"; then
5485
if test -d "$additional_libdir"; then
5486
dnl Really add $additional_libdir to $LIBNAME.
5487
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
5491
for x in $LDFLAGS $LTLIB[]NAME; do
5492
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
5493
if test "X$x" = "X-L$additional_libdir"; then
5498
if test -z "$haveit"; then
5499
if test -d "$additional_libdir"; then
5500
dnl Really add $additional_libdir to $LTLIBNAME.
5501
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
5508
dir=`echo "X$dep" | sed -e 's/^X-R//'`
5509
if test "$enable_rpath" != no; then
5510
dnl Potentially add DIR to rpathdirs.
5511
dnl The rpathdirs will be appended to $LIBNAME at the end.
5513
for x in $rpathdirs; do
5514
if test "X$x" = "X$dir"; then
5519
if test -z "$haveit"; then
5520
rpathdirs="$rpathdirs $dir"
5522
dnl Potentially add DIR to ltrpathdirs.
5523
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
5525
for x in $ltrpathdirs; do
5526
if test "X$x" = "X$dir"; then
5531
if test -z "$haveit"; then
5532
ltrpathdirs="$ltrpathdirs $dir"
5537
dnl Handle this in the next round.
5538
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
5541
dnl Handle this in the next round. Throw away the .la's
5542
dnl directory; it is already contained in a preceding -L
5544
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
5547
dnl Most likely an immediate library name.
5548
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
5549
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
5555
dnl Didn't find the library; assume it is in the system directories
5556
dnl known to the linker and runtime loader. (All the system
5557
dnl directories known to the linker should also be known to the
5558
dnl runtime loader, otherwise the system is severely misconfigured.)
5559
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
5560
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
5566
if test "X$rpathdirs" != "X"; then
5567
if test -n "$hardcode_libdir_separator"; then
5568
dnl Weird platform: only the last -rpath option counts, the user must
5569
dnl pass all path elements in one option. We can arrange that for a
5570
dnl single library, but not when more than one $LIBNAMEs are used.
5572
for found_dir in $rpathdirs; do
5573
alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
5575
dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
5576
acl_save_libdir="$libdir"
5578
eval flag=\"$hardcode_libdir_flag_spec\"
5579
libdir="$acl_save_libdir"
5580
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
5582
dnl The -rpath options are cumulative.
5583
for found_dir in $rpathdirs; do
5584
acl_save_libdir="$libdir"
5586
eval flag=\"$hardcode_libdir_flag_spec\"
5587
libdir="$acl_save_libdir"
5588
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
5592
if test "X$ltrpathdirs" != "X"; then
5593
dnl When using libtool, the option that works for both libraries and
5594
dnl executables is -R. The -R options are cumulative.
5595
for found_dir in $ltrpathdirs; do
5596
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
5601
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
5602
dnl unless already present in VAR.
5603
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
5604
dnl contains two or three consecutive elements that belong together.
5605
AC_DEFUN([AC_LIB_APPENDTOVAR],
5607
for element in [$2]; do
5610
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
5611
if test "X$x" = "X$element"; then
5616
if test -z "$haveit"; then
5617
[$1]="${[$1]}${[$1]:+ }$element"
5622
# lib-ld.m4 serial 1 (gettext-0.11)
5623
dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
5624
dnl This file is free software, distributed under the terms of the GNU
5625
dnl General Public License. As a special exception to the GNU General
5626
dnl Public License, this file may be distributed as part of a program
5627
dnl that contains a configuration script generated by Autoconf, under
5628
dnl the same distribution terms as the rest of that program.
5630
dnl Subroutines of libtool.m4,
5631
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
5632
dnl with libtool.m4.
5634
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
5635
AC_DEFUN([AC_LIB_PROG_LD_GNU],
5636
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
5637
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
5638
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
5639
acl_cv_prog_gnu_ld=yes
5641
acl_cv_prog_gnu_ld=no
5643
with_gnu_ld=$acl_cv_prog_gnu_ld
5646
dnl From libtool-1.4. Sets the variable LD.
5647
AC_DEFUN([AC_LIB_PROG_LD],
5648
[AC_ARG_WITH(gnu-ld,
5649
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
5650
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
5651
AC_REQUIRE([AC_PROG_CC])dnl
5652
AC_REQUIRE([AC_CANONICAL_HOST])dnl
5654
if test "$GCC" = yes; then
5655
# Check if gcc -print-prog-name=ld gives a path.
5656
AC_MSG_CHECKING([for ld used by GCC])
5659
# gcc leaves a trailing carriage return which upsets mingw
5660
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
5662
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
5665
# Accept absolute paths.
5666
[[\\/]* | [A-Za-z]:[\\/]*)]
5667
[re_direlt='/[^/][^/]*/\.\./']
5668
# Canonicalize the path of ld
5669
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
5670
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
5671
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
5673
test -z "$LD" && LD="$ac_prog"
8514
AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings],
8515
gt_cv_func_printf_posix,
8520
/* The string "%2$d %1$d", with dollar characters protected from the shell's
8521
dollar expansion (possibly an autoconf bug). */
8522
static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
8523
static char buf[100];
8526
sprintf (buf, format, 33, 55);
8527
return (strcmp (buf, "55 33") != 0);
8528
}], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no,
8530
AC_EGREP_CPP(notposix, [
8531
#if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__
8534
], gt_cv_func_printf_posix="guessing no",
8535
gt_cv_func_printf_posix="guessing yes")
8538
case $gt_cv_func_printf_posix in
8540
AC_DEFINE(HAVE_POSIX_PRINTF, 1,
8541
[Define if your printf() function supports format strings with positions.])
5676
# If it fails, then pretend we aren't using GCC.
5680
# If it is relative, then search for the first ld in PATH.
5684
elif test "$with_gnu_ld" = yes; then
5685
AC_MSG_CHECKING([for GNU ld])
5687
AC_MSG_CHECKING([for non-GNU ld])
5689
AC_CACHE_VAL(acl_cv_path_LD,
5690
[if test -z "$LD"; then
5691
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
5692
for ac_dir in $PATH; do
5693
test -z "$ac_dir" && ac_dir=.
5694
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
5695
acl_cv_path_LD="$ac_dir/$ac_prog"
5696
# Check to see if the program is GNU ld. I'd rather use --version,
5697
# but apparently some GNU ld's only accept -v.
5698
# Break only if it was the GNU/non-GNU ld that we prefer.
5699
if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
5700
test "$with_gnu_ld" != no && break
5702
test "$with_gnu_ld" != yes && break
5708
acl_cv_path_LD="$LD" # Let the user override the test with a path.
5710
LD="$acl_cv_path_LD"
5711
if test -n "$LD"; then
5716
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
5720
# iconv.m4 serial AM4 (gettext-0.11.3)
5721
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
5722
dnl This file is free software, distributed under the terms of the GNU
5723
dnl General Public License. As a special exception to the GNU General
5724
dnl Public License, this file may be distributed as part of a program
5725
dnl that contains a configuration script generated by Autoconf, under
5726
dnl the same distribution terms as the rest of that program.
5728
dnl From Bruno Haible.
5730
AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
5732
dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
5733
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
5734
AC_REQUIRE([AC_LIB_RPATH])
5736
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
5738
AC_LIB_LINKFLAGS_BODY([iconv])
5741
AC_DEFUN([AM_ICONV_LINK],
5743
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
5744
dnl those with the standalone portable GNU libiconv installed).
5746
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
5748
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
5750
dnl Add $INCICONV to CPPFLAGS before performing the following checks,
5751
dnl because if the user has installed libiconv and not disabled its use
5752
dnl via --without-libiconv-prefix, he wants to use it. The first
5753
dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
5754
am_save_CPPFLAGS="$CPPFLAGS"
5755
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
5757
AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
5758
am_cv_func_iconv="no, consider installing GNU libiconv"
5760
AC_TRY_LINK([#include <stdlib.h>
5761
#include <iconv.h>],
5762
[iconv_t cd = iconv_open("","");
5763
iconv(cd,NULL,NULL,NULL,NULL);
5765
am_cv_func_iconv=yes)
5766
if test "$am_cv_func_iconv" != yes; then
5767
am_save_LIBS="$LIBS"
5768
LIBS="$LIBS $LIBICONV"
5769
AC_TRY_LINK([#include <stdlib.h>
5770
#include <iconv.h>],
5771
[iconv_t cd = iconv_open("","");
5772
iconv(cd,NULL,NULL,NULL,NULL);
5775
am_cv_func_iconv=yes)
5776
LIBS="$am_save_LIBS"
5779
if test "$am_cv_func_iconv" = yes; then
5780
AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
5782
if test "$am_cv_lib_iconv" = yes; then
5783
AC_MSG_CHECKING([how to link with libiconv])
5784
AC_MSG_RESULT([$LIBICONV])
5786
dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
5788
CPPFLAGS="$am_save_CPPFLAGS"
5793
AC_SUBST(LTLIBICONV)
5796
AC_DEFUN([AM_ICONV],
5799
if test "$am_cv_func_iconv" = yes; then
5800
AC_MSG_CHECKING([for iconv declaration])
5801
AC_CACHE_VAL(am_cv_proto_iconv, [
5809
#if defined(__STDC__) || defined(__cplusplus)
5810
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
5814
], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
5815
am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
5816
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
5817
AC_MSG_RESULT([$]{ac_t:-
5818
}[$]am_cv_proto_iconv)
5819
AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
5820
[Define as const if the declaration of iconv() needs const.])
5824
# progtest.m4 serial 2 (gettext-0.10.40)
5825
dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
5826
dnl This file is free software, distributed under the terms of the GNU
5827
dnl General Public License. As a special exception to the GNU General
5828
dnl Public License, this file may be distributed as part of a program
5829
dnl that contains a configuration script generated by Autoconf, under
5830
dnl the same distribution terms as the rest of that program.
8546
# progtest.m4 serial 4 (gettext-0.14.2)
8547
dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc.
8548
dnl This file is free software; the Free Software Foundation
8549
dnl gives unlimited permission to copy and/or distribute it,
8550
dnl with or without modifications, as long as this notice is preserved.
5832
8552
dnl This file can can be used in projects which are not available under
5833
8553
dnl the GNU General Public License or the GNU Library General Public
5881
8636
AC_SUBST($1)dnl
5884
# isc-posix.m4 serial 2 (gettext-0.11.2)
5885
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
5886
dnl This file is free software, distributed under the terms of the GNU
5887
dnl General Public License. As a special exception to the GNU General
5888
dnl Public License, this file may be distributed as part of a program
5889
dnl that contains a configuration script generated by Autoconf, under
5890
dnl the same distribution terms as the rest of that program.
5892
# This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
5894
# This test replaces the one in autoconf.
5895
# Currently this macro should have the same name as the autoconf macro
5896
# because gettext's gettext.m4 (distributed in the automake package)
5897
# still uses it. Otherwise, the use in gettext.m4 makes autoheader
5898
# give these diagnostics:
5899
# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
5900
# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
5902
undefine([AC_ISC_POSIX])
5904
AC_DEFUN([AC_ISC_POSIX],
5906
dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
5907
AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
5911
# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
5912
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
5913
dnl This file is free software, distributed under the terms of the GNU
5914
dnl General Public License. As a special exception to the GNU General
5915
dnl Public License, this file may be distributed as part of a program
5916
dnl that contains a configuration script generated by Autoconf, under
5917
dnl the same distribution terms as the rest of that program.
5919
# Test for the GNU C Library, version 2.1 or newer.
5920
# From Bruno Haible.
5922
AC_DEFUN([jm_GLIBC21],
5924
AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
5925
ac_cv_gnu_library_2_1,
5926
[AC_EGREP_CPP([Lucky GNU user],
5928
#include <features.h>
5929
#ifdef __GNU_LIBRARY__
5930
#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
5935
ac_cv_gnu_library_2_1=yes,
5936
ac_cv_gnu_library_2_1=no)
5940
GLIBC21="$ac_cv_gnu_library_2_1"
5944
# intdiv0.m4 serial 1 (gettext-0.11.3)
5945
dnl Copyright (C) 2002 Free Software Foundation, Inc.
5946
dnl This file is free software, distributed under the terms of the GNU
5947
dnl General Public License. As a special exception to the GNU General
5948
dnl Public License, this file may be distributed as part of a program
5949
dnl that contains a configuration script generated by Autoconf, under
5950
dnl the same distribution terms as the rest of that program.
5952
dnl From Bruno Haible.
5954
AC_DEFUN([gt_INTDIV0],
5956
AC_REQUIRE([AC_PROG_CC])dnl
5957
AC_REQUIRE([AC_CANONICAL_HOST])dnl
5959
AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
5960
gt_cv_int_divbyzero_sigfpe,
5968
sigfpe_handler (int sig)
5970
sigfpe_handler (sig) int sig;
5973
/* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
5974
exit (sig != SIGFPE);
5984
signal (SIGFPE, sigfpe_handler);
5985
/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
5986
#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
5987
signal (SIGTRAP, sigfpe_handler);
5989
/* Linux/SPARC yields signal SIGILL. */
5990
#if defined (__sparc__) && defined (__linux__)
5991
signal (SIGILL, sigfpe_handler);
5998
], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
6000
# Guess based on the CPU.
6002
alpha* | i[34567]86 | m68k | s390*)
6003
gt_cv_int_divbyzero_sigfpe="guessing yes";;
6005
gt_cv_int_divbyzero_sigfpe="guessing no";;
6009
case "$gt_cv_int_divbyzero_sigfpe" in
6013
AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
6014
[Define if integer division by zero raises signal SIGFPE.])
6017
# uintmax_t.m4 serial 6 (gettext-0.11)
6018
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
6019
dnl This file is free software, distributed under the terms of the GNU
6020
dnl General Public License. As a special exception to the GNU General
6021
dnl Public License, this file may be distributed as part of a program
6022
dnl that contains a configuration script generated by Autoconf, under
6023
dnl the same distribution terms as the rest of that program.
8639
# signed.m4 serial 1 (gettext-0.10.40)
8640
dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
8641
dnl This file is free software; the Free Software Foundation
8642
dnl gives unlimited permission to copy and/or distribute it,
8643
dnl with or without modifications, as long as this notice is preserved.
8645
dnl From Bruno Haible.
8647
AC_DEFUN([bh_C_SIGNED],
8649
AC_CACHE_CHECK([for signed], bh_cv_c_signed,
8650
[AC_TRY_COMPILE(, [signed char x;], bh_cv_c_signed=yes, bh_cv_c_signed=no)])
8651
if test $bh_cv_c_signed = no; then
8653
[Define to empty if the C compiler doesn't support this keyword.])
8657
# size_max.m4 serial 2
8658
dnl Copyright (C) 2003 Free Software Foundation, Inc.
8659
dnl This file is free software; the Free Software Foundation
8660
dnl gives unlimited permission to copy and/or distribute it,
8661
dnl with or without modifications, as long as this notice is preserved.
8663
dnl From Bruno Haible.
8665
AC_DEFUN([gl_SIZE_MAX],
8667
AC_CHECK_HEADERS(stdint.h)
8668
dnl First test whether the system already has SIZE_MAX.
8669
AC_MSG_CHECKING([for SIZE_MAX])
8671
AC_EGREP_CPP([Found it], [
8680
if test -z "$result"; then
8681
dnl Define it ourselves. Here we assume that the type 'size_t' is not wider
8682
dnl than the type 'unsigned long'.
8683
dnl The _AC_COMPUTE_INT macro works up to LONG_MAX, since it uses 'expr',
8684
dnl which is guaranteed to work from LONG_MIN to LONG_MAX.
8685
_AC_COMPUTE_INT([~(size_t)0 / 10], res_hi,
8686
[#include <stddef.h>], result=?)
8687
_AC_COMPUTE_INT([~(size_t)0 % 10], res_lo,
8688
[#include <stddef.h>], result=?)
8689
_AC_COMPUTE_INT([sizeof (size_t) <= sizeof (unsigned int)], fits_in_uint,
8690
[#include <stddef.h>], result=?)
8691
if test "$fits_in_uint" = 1; then
8692
dnl Even though SIZE_MAX fits in an unsigned int, it must be of type
8693
dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'.
8694
AC_TRY_COMPILE([#include <stddef.h>
8696
extern unsigned long foo;
8697
], [], fits_in_uint=0)
8699
if test -z "$result"; then
8700
if test "$fits_in_uint" = 1; then
8701
result="$res_hi$res_lo"U
8703
result="$res_hi$res_lo"UL
8706
dnl Shouldn't happen, but who knows...
8710
AC_MSG_RESULT([$result])
8711
if test "$result" != yes; then
8712
AC_DEFINE_UNQUOTED([SIZE_MAX], [$result],
8713
[Define as the maximum value of type 'size_t', if the system doesn't define it.])
8717
# stdint_h.m4 serial 5
8718
dnl Copyright (C) 1997-2004 Free Software Foundation, Inc.
8719
dnl This file is free software; the Free Software Foundation
8720
dnl gives unlimited permission to copy and/or distribute it,
8721
dnl with or without modifications, as long as this notice is preserved.
8723
dnl From Paul Eggert.
8725
# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
8726
# doesn't clash with <sys/types.h>, and declares uintmax_t.
8728
AC_DEFUN([gl_AC_HEADER_STDINT_H],
8730
AC_CACHE_CHECK([for stdint.h], gl_cv_header_stdint_h,
8732
[#include <sys/types.h>
8733
#include <stdint.h>],
8734
[uintmax_t i = (uintmax_t) -1;],
8735
gl_cv_header_stdint_h=yes,
8736
gl_cv_header_stdint_h=no)])
8737
if test $gl_cv_header_stdint_h = yes; then
8738
AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
8739
[Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
8740
and declares uintmax_t. ])
8744
# uintmax_t.m4 serial 9
8745
dnl Copyright (C) 1997-2004 Free Software Foundation, Inc.
8746
dnl This file is free software; the Free Software Foundation
8747
dnl gives unlimited permission to copy and/or distribute it,
8748
dnl with or without modifications, as long as this notice is preserved.
6025
8750
dnl From Paul Eggert.
6027
8752
AC_PREREQ(2.13)
6029
# Define uintmax_t to `unsigned long' or `unsigned long long'
6030
# if <inttypes.h> does not exist.
8754
# Define uintmax_t to 'unsigned long' or 'unsigned long long'
8755
# if it is not already defined in <stdint.h> or <inttypes.h>.
6032
AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
8757
AC_DEFUN([gl_AC_TYPE_UINTMAX_T],
6034
AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
6035
AC_REQUIRE([jm_AC_HEADER_STDINT_H])
6036
if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
6037
AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
8759
AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
8760
AC_REQUIRE([gl_AC_HEADER_STDINT_H])
8761
if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then
8762
AC_REQUIRE([gl_AC_TYPE_UNSIGNED_LONG_LONG])
6038
8763
test $ac_cv_type_unsigned_long_long = yes \
6039
8764
&& ac_type='unsigned long long' \
6040
8765
|| ac_type='unsigned long'
6041
8766
AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
6042
[Define to unsigned long or unsigned long long
6043
if <inttypes.h> and <stdint.h> don't define.])
6047
# inttypes_h.m4 serial 4 (gettext-0.11.4)
6048
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
6049
dnl This file is free software, distributed under the terms of the GNU
6050
dnl General Public License. As a special exception to the GNU General
6051
dnl Public License, this file may be distributed as part of a program
6052
dnl that contains a configuration script generated by Autoconf, under
6053
dnl the same distribution terms as the rest of that program.
6055
dnl From Paul Eggert.
6057
# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
6058
# doesn't clash with <sys/types.h>, and declares uintmax_t.
6060
AC_DEFUN([jm_AC_HEADER_INTTYPES_H],
6062
AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
6064
[#include <sys/types.h>
6065
#include <inttypes.h>],
6066
[uintmax_t i = (uintmax_t) -1;],
6067
jm_ac_cv_header_inttypes_h=yes,
6068
jm_ac_cv_header_inttypes_h=no)])
6069
if test $jm_ac_cv_header_inttypes_h = yes; then
6070
AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
6071
[Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
6072
and declares uintmax_t. ])
6076
# stdint_h.m4 serial 2 (gettext-0.11.4)
6077
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
6078
dnl This file is free software, distributed under the terms of the GNU
6079
dnl General Public License. As a special exception to the GNU General
6080
dnl Public License, this file may be distributed as part of a program
6081
dnl that contains a configuration script generated by Autoconf, under
6082
dnl the same distribution terms as the rest of that program.
6084
dnl From Paul Eggert.
6086
# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
6087
# doesn't clash with <sys/types.h>, and declares uintmax_t.
6089
AC_DEFUN([jm_AC_HEADER_STDINT_H],
6091
AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h,
6093
[#include <sys/types.h>
6094
#include <stdint.h>],
6095
[uintmax_t i = (uintmax_t) -1;],
6096
jm_ac_cv_header_stdint_h=yes,
6097
jm_ac_cv_header_stdint_h=no)])
6098
if test $jm_ac_cv_header_stdint_h = yes; then
6099
AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
6100
[Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
6101
and declares uintmax_t. ])
6105
# ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40)
6106
dnl Copyright (C) 1999-2002 Free Software Foundation, Inc.
6107
dnl This file is free software, distributed under the terms of the GNU
6108
dnl General Public License. As a special exception to the GNU General
6109
dnl Public License, this file may be distributed as part of a program
6110
dnl that contains a configuration script generated by Autoconf, under
6111
dnl the same distribution terms as the rest of that program.
6113
dnl From Paul Eggert.
6115
AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
8767
[Define to unsigned long or unsigned long long
8768
if <stdint.h> and <inttypes.h> don't define.])
8770
AC_DEFINE(HAVE_UINTMAX_T, 1,
8771
[Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
8775
# ulonglong.m4 serial 4
8776
dnl Copyright (C) 1999-2004 Free Software Foundation, Inc.
8777
dnl This file is free software; the Free Software Foundation
8778
dnl gives unlimited permission to copy and/or distribute it,
8779
dnl with or without modifications, as long as this notice is preserved.
8781
dnl From Paul Eggert.
8783
# Define HAVE_UNSIGNED_LONG_LONG if 'unsigned long long' works.
8785
AC_DEFUN([gl_AC_TYPE_UNSIGNED_LONG_LONG],
6117
8787
AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
6118
[AC_TRY_LINK([unsigned long long ull = 1; int i = 63;],
8788
[AC_TRY_LINK([unsigned long long ull = 1ULL; int i = 63;],
6119
8789
[unsigned long long ullmax = (unsigned long long) -1;
6120
8790
return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
6121
8791
ac_cv_type_unsigned_long_long=yes,
6122
8792
ac_cv_type_unsigned_long_long=no)])
6123
8793
if test $ac_cv_type_unsigned_long_long = yes; then
6124
8794
AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
6125
[Define if you have the unsigned long long type.])
6129
# inttypes.m4 serial 1 (gettext-0.11.4)
6130
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
6131
dnl This file is free software, distributed under the terms of the GNU
6132
dnl General Public License. As a special exception to the GNU General
6133
dnl Public License, this file may be distributed as part of a program
6134
dnl that contains a configuration script generated by Autoconf, under
6135
dnl the same distribution terms as the rest of that program.
6137
dnl From Paul Eggert.
6139
# Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
6142
AC_DEFUN([gt_HEADER_INTTYPES_H],
6144
AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
6147
[#include <sys/types.h>
6148
#include <inttypes.h>],
6149
[], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
6151
if test $gt_cv_header_inttypes_h = yes; then
6152
AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
6153
[Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
6157
# inttypes-pri.m4 serial 1 (gettext-0.11.4)
6158
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
6159
dnl This file is free software, distributed under the terms of the GNU
6160
dnl General Public License. As a special exception to the GNU General
6161
dnl Public License, this file may be distributed as part of a program
6162
dnl that contains a configuration script generated by Autoconf, under
6163
dnl the same distribution terms as the rest of that program.
6165
dnl From Bruno Haible.
6167
# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
6168
# macros to non-string values. This is the case on AIX 4.3.3.
6170
AC_DEFUN([gt_INTTYPES_PRI],
6172
AC_REQUIRE([gt_HEADER_INTTYPES_H])
6173
if test $gt_cv_header_inttypes_h = yes; then
6174
AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
6175
gt_cv_inttypes_pri_broken,
6177
AC_TRY_COMPILE([#include <inttypes.h>
6181
], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
6184
if test "$gt_cv_inttypes_pri_broken" = yes; then
6185
AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
6186
[Define if <inttypes.h> exists and defines unusable PRI* macros.])
6190
# codeset.m4 serial AM1 (gettext-0.10.40)
6191
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
6192
dnl This file is free software, distributed under the terms of the GNU
6193
dnl General Public License. As a special exception to the GNU General
6194
dnl Public License, this file may be distributed as part of a program
6195
dnl that contains a configuration script generated by Autoconf, under
6196
dnl the same distribution terms as the rest of that program.
6198
dnl From Bruno Haible.
6200
AC_DEFUN([AM_LANGINFO_CODESET],
6202
AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
6203
[AC_TRY_LINK([#include <langinfo.h>],
6204
[char* cs = nl_langinfo(CODESET);],
6205
am_cv_langinfo_codeset=yes,
6206
am_cv_langinfo_codeset=no)
6208
if test $am_cv_langinfo_codeset = yes; then
6209
AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
6210
[Define if you have <langinfo.h> and nl_langinfo(CODESET).])
6214
# lcmessage.m4 serial 3 (gettext-0.11.3)
6215
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
6216
dnl This file is free software, distributed under the terms of the GNU
6217
dnl General Public License. As a special exception to the GNU General
6218
dnl Public License, this file may be distributed as part of a program
6219
dnl that contains a configuration script generated by Autoconf, under
6220
dnl the same distribution terms as the rest of that program.
6222
dnl This file can can be used in projects which are not available under
6223
dnl the GNU General Public License or the GNU Library General Public
6224
dnl License but which still want to provide support for the GNU gettext
6226
dnl Please note that the actual code of the GNU gettext library is covered
6227
dnl by the GNU Library General Public License, and the rest of the GNU
6228
dnl gettext package package is covered by the GNU General Public License.
6229
dnl They are *not* in the public domain.
6232
dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
6234
# Check whether LC_MESSAGES is available in <locale.h>.
6236
AC_DEFUN([AM_LC_MESSAGES],
6238
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
6239
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
6240
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
6241
if test $am_cv_val_LC_MESSAGES = yes; then
6242
AC_DEFINE(HAVE_LC_MESSAGES, 1,
6243
[Define if your <locale.h> file defines LC_MESSAGES.])
8795
[Define if you have the 'unsigned long long' type.])
8799
# wchar_t.m4 serial 1 (gettext-0.12)
8800
dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
8801
dnl This file is free software; the Free Software Foundation
8802
dnl gives unlimited permission to copy and/or distribute it,
8803
dnl with or without modifications, as long as this notice is preserved.
8805
dnl From Bruno Haible.
8806
dnl Test whether <stddef.h> has the 'wchar_t' type.
8807
dnl Prerequisite: AC_PROG_CC
8809
AC_DEFUN([gt_TYPE_WCHAR_T],
8811
AC_CACHE_CHECK([for wchar_t], gt_cv_c_wchar_t,
8812
[AC_TRY_COMPILE([#include <stddef.h>
8813
wchar_t foo = (wchar_t)'\0';], ,
8814
gt_cv_c_wchar_t=yes, gt_cv_c_wchar_t=no)])
8815
if test $gt_cv_c_wchar_t = yes; then
8816
AC_DEFINE(HAVE_WCHAR_T, 1, [Define if you have the 'wchar_t' type.])
8820
# wint_t.m4 serial 1 (gettext-0.12)
8821
dnl Copyright (C) 2003 Free Software Foundation, Inc.
8822
dnl This file is free software; the Free Software Foundation
8823
dnl gives unlimited permission to copy and/or distribute it,
8824
dnl with or without modifications, as long as this notice is preserved.
8826
dnl From Bruno Haible.
8827
dnl Test whether <wchar.h> has the 'wint_t' type.
8828
dnl Prerequisite: AC_PROG_CC
8830
AC_DEFUN([gt_TYPE_WINT_T],
8832
AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t,
8833
[AC_TRY_COMPILE([#include <wchar.h>
8834
wint_t foo = (wchar_t)'\0';], ,
8835
gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)])
8836
if test $gt_cv_c_wint_t = yes; then
8837
AC_DEFINE(HAVE_WINT_T, 1, [Define if you have the 'wint_t' type.])
8842
dnl Copyright (C) 2003-2004 Free Software Foundation, Inc.
8843
dnl This file is free software; the Free Software Foundation
8844
dnl gives unlimited permission to copy and/or distribute it,
8845
dnl with or without modifications, as long as this notice is preserved.
8847
AC_DEFUN([gl_XSIZE],
8849
dnl Prerequisites of lib/xsize.h.
8850
AC_REQUIRE([gl_SIZE_MAX])
8851
AC_REQUIRE([AC_C_INLINE])
8852
AC_CHECK_HEADERS(stdint.h)
8855
# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
8857
# This file is free software; the Free Software Foundation
8858
# gives unlimited permission to copy and/or distribute it,
8859
# with or without modifications, as long as this notice is preserved.
8861
# AM_AUTOMAKE_VERSION(VERSION)
8862
# ----------------------------
8863
# Automake X.Y traces this macro to ensure aclocal.m4 has been
8864
# generated from the m4 files accompanying Automake X.Y.
8865
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
8867
# AM_SET_CURRENT_AUTOMAKE_VERSION
8868
# -------------------------------
8869
# Call AM_AUTOMAKE_VERSION so it can be traced.
8870
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
8871
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
8872
[AM_AUTOMAKE_VERSION([1.9.6])])
8874
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
8876
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
8878
# This file is free software; the Free Software Foundation
8879
# gives unlimited permission to copy and/or distribute it,
8880
# with or without modifications, as long as this notice is preserved.
8882
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
8883
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
8884
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
8886
# Of course, Automake must honor this variable whenever it calls a
8887
# tool from the auxiliary directory. The problem is that $srcdir (and
8888
# therefore $ac_aux_dir as well) can be either absolute or relative,
8889
# depending on how configure is run. This is pretty annoying, since
8890
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
8891
# source directory, any form will work fine, but in subdirectories a
8892
# relative path needs to be adjusted first.
8894
# $ac_aux_dir/missing
8895
# fails when called from a subdirectory if $ac_aux_dir is relative
8896
# $top_srcdir/$ac_aux_dir/missing
8897
# fails if $ac_aux_dir is absolute,
8898
# fails when called from a subdirectory in a VPATH build with
8899
# a relative $ac_aux_dir
8901
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
8902
# are both prefixed by $srcdir. In an in-source build this is usually
8903
# harmless because $srcdir is `.', but things will broke when you
8904
# start a VPATH build or use an absolute $srcdir.
8906
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
8907
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
8908
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
8909
# and then we would define $MISSING as
8910
# MISSING="\${SHELL} $am_aux_dir/missing"
8911
# This will work as long as MISSING is not called from configure, because
8912
# unfortunately $(top_srcdir) has no meaning in configure.
8913
# However there are other variables, like CC, which are often used in
8914
# configure, and could therefore not use this "fixed" $ac_aux_dir.
8916
# Another solution, used here, is to always expand $ac_aux_dir to an
8917
# absolute PATH. The drawback is that using absolute paths prevent a
8918
# configured tree to be moved without reconfiguration.
8920
AC_DEFUN([AM_AUX_DIR_EXPAND],
8921
[dnl Rely on autoconf to set up CDPATH properly.
8922
AC_PREREQ([2.50])dnl
8923
# expand $ac_aux_dir to an absolute path
8924
am_aux_dir=`cd $ac_aux_dir && pwd`
8927
# AM_CONDITIONAL -*- Autoconf -*-
8929
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
8930
# Free Software Foundation, Inc.
8932
# This file is free software; the Free Software Foundation
8933
# gives unlimited permission to copy and/or distribute it,
8934
# with or without modifications, as long as this notice is preserved.
8938
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
8939
# -------------------------------------
8940
# Define a conditional.
8941
AC_DEFUN([AM_CONDITIONAL],
8943
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
8944
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
8946
AC_SUBST([$1_FALSE])
8954
AC_CONFIG_COMMANDS_PRE(
8955
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
8956
AC_MSG_ERROR([[conditional "$1" was never defined.
8957
Usually this means the macro was only invoked conditionally.]])
8961
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
8962
# Free Software Foundation, Inc.
8964
# This file is free software; the Free Software Foundation
8965
# gives unlimited permission to copy and/or distribute it,
8966
# with or without modifications, as long as this notice is preserved.
8970
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
8971
# written in clear, in which case automake, when reading aclocal.m4,
8972
# will think it sees a *use*, and therefore will trigger all it's
8973
# C support machinery. Also note that it means that autoscan, seeing
8974
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
8977
# _AM_DEPENDENCIES(NAME)
8978
# ----------------------
8979
# See how the compiler implements dependency checking.
8980
# NAME is "CC", "CXX", "GCJ", or "OBJC".
8981
# We try a few techniques and use that to set a single cache variable.
8983
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
8984
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
8985
# dependency, and given that the user is not expected to run this macro,
8986
# just rely on AC_PROG_CC.
8987
AC_DEFUN([_AM_DEPENDENCIES],
8988
[AC_REQUIRE([AM_SET_DEPDIR])dnl
8989
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
8990
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
8991
AC_REQUIRE([AM_DEP_TRACK])dnl
8993
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
8994
[$1], CXX, [depcc="$CXX" am_compiler_list=],
8995
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
8996
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
8997
[depcc="$$1" am_compiler_list=])
8999
AC_CACHE_CHECK([dependency style of $depcc],
9000
[am_cv_$1_dependencies_compiler_type],
9001
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
9002
# We make a subdir and do the tests there. Otherwise we can end up
9003
# making bogus files that we don't know about and never remove. For
9004
# instance it was reported that on HP-UX the gcc test will end up
9005
# making a dummy file named `D' -- because `-MD' means `put the output
9008
# Copy depcomp to subdir because otherwise we won't find it if we're
9009
# using a relative directory.
9010
cp "$am_depcomp" conftest.dir
9012
# We will build objects and dependencies in a subdirectory because
9013
# it helps to detect inapplicable dependency modes. For instance
9014
# both Tru64's cc and ICC support -MD to output dependencies as a
9015
# side effect of compilation, but ICC will put the dependencies in
9016
# the current directory while Tru64 will put them in the object
9020
am_cv_$1_dependencies_compiler_type=none
9021
if test "$am_compiler_list" = ""; then
9022
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
9024
for depmode in $am_compiler_list; do
9025
# Setup a source with many dependencies, because some compilers
9026
# like to wrap large dependency lists on column 80 (with \), and
9027
# we should not choose a depcomp mode which is confused by this.
9029
# We need to recreate these files for each test, as the compiler may
9030
# overwrite some of them when testing with obscure command lines.
9031
# This happens at least with the AIX C compiler.
9033
for i in 1 2 3 4 5 6; do
9034
echo '#include "conftst'$i'.h"' >> sub/conftest.c
9035
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
9036
# Solaris 8's {/usr,}/bin/sh.
9037
touch sub/conftst$i.h
9039
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
9043
# after this tag, mechanisms are not by side-effect, so they'll
9044
# only be used when explicitly requested
9045
if test "x$enable_dependency_tracking" = xyes; then
9053
# We check with `-c' and `-o' for the sake of the "dashmstdout"
9054
# mode. It turns out that the SunPro C++ compiler does not properly
9055
# handle `-M -o', and we need to detect this.
9056
if depmode=$depmode \
9057
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
9058
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
9059
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
9060
>/dev/null 2>conftest.err &&
9061
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
9062
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
9063
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
9064
# icc doesn't choke on unknown options, it will just issue warnings
9065
# or remarks (even with -Werror). So we grep stderr for any message
9066
# that says an option was ignored or not supported.
9067
# When given -MP, icc 7.0 and 7.1 complain thusly:
9068
# icc: Command line warning: ignoring option '-M'; no argument required
9069
# The diagnosis changed in icc 8.0:
9070
# icc: Command line remark: option '-MP' not supported
9071
if (grep 'ignoring option' conftest.err ||
9072
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
9073
am_cv_$1_dependencies_compiler_type=$depmode
9082
am_cv_$1_dependencies_compiler_type=none
9085
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
9086
AM_CONDITIONAL([am__fastdep$1], [
9087
test "x$enable_dependency_tracking" != xno \
9088
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
9094
# Choose a directory name for dependency files.
9095
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
9096
AC_DEFUN([AM_SET_DEPDIR],
9097
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9098
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
9104
AC_DEFUN([AM_DEP_TRACK],
9105
[AC_ARG_ENABLE(dependency-tracking,
9106
[ --disable-dependency-tracking speeds up one-time build
9107
--enable-dependency-tracking do not reject slow dependency extractors])
9108
if test "x$enable_dependency_tracking" != xno; then
9109
am_depcomp="$ac_aux_dir/depcomp"
9112
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
9113
AC_SUBST([AMDEPBACKSLASH])
9116
# Generate code to set up dependency tracking. -*- Autoconf -*-
9118
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
9119
# Free Software Foundation, Inc.
9121
# This file is free software; the Free Software Foundation
9122
# gives unlimited permission to copy and/or distribute it,
9123
# with or without modifications, as long as this notice is preserved.
9127
# _AM_OUTPUT_DEPENDENCY_COMMANDS
9128
# ------------------------------
9129
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
9130
[for mf in $CONFIG_FILES; do
9131
# Strip MF so we end up with the name of the file.
9132
mf=`echo "$mf" | sed -e 's/:.*$//'`
9133
# Check whether this is an Automake generated Makefile or not.
9134
# We used to match only the files named `Makefile.in', but
9135
# some people rename them; so instead we look at the file content.
9136
# Grep'ing the first line is not enough: some people post-process
9137
# each Makefile.in and add a new line on top of each file to say so.
9138
# So let's grep whole file.
9139
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
9140
dirpart=`AS_DIRNAME("$mf")`
9144
# Extract the definition of DEPDIR, am__include, and am__quote
9145
# from the Makefile without running `make'.
9146
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
9147
test -z "$DEPDIR" && continue
9148
am__include=`sed -n 's/^am__include = //p' < "$mf"`
9149
test -z "am__include" && continue
9150
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
9151
# When using ansi2knr, U may be empty or an underscore; expand it
9152
U=`sed -n 's/^U = //p' < "$mf"`
9153
# Find all dependency output files, they are included files with
9154
# $(DEPDIR) in their names. We invoke sed twice because it is the
9155
# simplest approach to changing $(DEPDIR) to its actual value in the
9157
for file in `sed -n "
9158
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
9159
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
9160
# Make sure the directory exists.
9161
test -f "$dirpart/$file" && continue
9162
fdir=`AS_DIRNAME(["$file"])`
9163
AS_MKDIR_P([$dirpart/$fdir])
9164
# echo "creating $dirpart/$file"
9165
echo '# dummy' > "$dirpart/$file"
9168
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
9171
# AM_OUTPUT_DEPENDENCY_COMMANDS
9172
# -----------------------------
9173
# This macro should only be invoked once -- use via AC_REQUIRE.
9175
# This code is only required when automatic dependency tracking
9176
# is enabled. FIXME. This creates each `.P' file that we will
9177
# need in order to bootstrap the dependency handling code.
9178
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
9179
[AC_CONFIG_COMMANDS([depfiles],
9180
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
9181
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
9184
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
9185
# Free Software Foundation, Inc.
9187
# This file is free software; the Free Software Foundation
9188
# gives unlimited permission to copy and/or distribute it,
9189
# with or without modifications, as long as this notice is preserved.
9193
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
9194
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
9196
# Do all the work for Automake. -*- Autoconf -*-
9198
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
9199
# Free Software Foundation, Inc.
9201
# This file is free software; the Free Software Foundation
9202
# gives unlimited permission to copy and/or distribute it,
9203
# with or without modifications, as long as this notice is preserved.
9207
# This macro actually does too much. Some checks are only needed if
9208
# your package does certain things. But this isn't really a big deal.
9210
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
9211
# AM_INIT_AUTOMAKE([OPTIONS])
9212
# -----------------------------------------------
9213
# The call with PACKAGE and VERSION arguments is the old style
9214
# call (pre autoconf-2.50), which is being phased out. PACKAGE
9215
# and VERSION should now be passed to AC_INIT and removed from
9216
# the call to AM_INIT_AUTOMAKE.
9217
# We support both call styles for the transition. After
9218
# the next Automake release, Autoconf can make the AC_INIT
9219
# arguments mandatory, and then we can depend on a new Autoconf
9220
# release and drop the old call support.
9221
AC_DEFUN([AM_INIT_AUTOMAKE],
9222
[AC_PREREQ([2.58])dnl
9223
dnl Autoconf wants to disallow AM_ names. We explicitly allow
9224
dnl the ones we care about.
9225
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
9226
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
9227
AC_REQUIRE([AC_PROG_INSTALL])dnl
9228
# test to see if srcdir already configured
9229
if test "`cd $srcdir && pwd`" != "`pwd`" &&
9230
test -f $srcdir/config.status; then
9231
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
9234
# test whether we have cygpath
9235
if test -z "$CYGPATH_W"; then
9236
if (cygpath --version) >/dev/null 2>/dev/null; then
9237
CYGPATH_W='cygpath -w'
9242
AC_SUBST([CYGPATH_W])
9244
# Define the identity of the package.
9245
dnl Distinguish between old-style and new-style calls.
9247
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
9248
AC_SUBST([PACKAGE], [$1])dnl
9249
AC_SUBST([VERSION], [$2])],
9250
[_AM_SET_OPTIONS([$1])dnl
9251
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
9252
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
9254
_AM_IF_OPTION([no-define],,
9255
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
9256
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
9258
# Some tools Automake needs.
9259
AC_REQUIRE([AM_SANITY_CHECK])dnl
9260
AC_REQUIRE([AC_ARG_PROGRAM])dnl
9261
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
9262
AM_MISSING_PROG(AUTOCONF, autoconf)
9263
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
9264
AM_MISSING_PROG(AUTOHEADER, autoheader)
9265
AM_MISSING_PROG(MAKEINFO, makeinfo)
9267
AM_PROG_INSTALL_STRIP
9268
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
9269
# We need awk for the "check" target. The system "awk" is bad on
9271
AC_REQUIRE([AC_PROG_AWK])dnl
9272
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
9273
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9274
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
9275
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
9276
[_AM_PROG_TAR([v7])])])
9277
_AM_IF_OPTION([no-dependencies],,
9278
[AC_PROVIDE_IFELSE([AC_PROG_CC],
9279
[_AM_DEPENDENCIES(CC)],
9280
[define([AC_PROG_CC],
9281
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
9282
AC_PROVIDE_IFELSE([AC_PROG_CXX],
9283
[_AM_DEPENDENCIES(CXX)],
9284
[define([AC_PROG_CXX],
9285
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
9290
# When config.status generates a header, we must update the stamp-h file.
9291
# This file resides in the same directory as the config header
9292
# that is generated. The stamp files are numbered to have different names.
9294
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
9295
# loop where config.status creates the headers, so we can generate
9296
# our stamp files there.
9297
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
9298
[# Compute $1's index in $config_headers.
9300
for _am_header in $config_headers :; do
9305
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
9308
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
9310
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
9312
# This file is free software; the Free Software Foundation
9313
# gives unlimited permission to copy and/or distribute it,
9314
# with or without modifications, as long as this notice is preserved.
9316
# AM_PROG_INSTALL_SH
9317
# ------------------
9318
# Define $install_sh.
9319
AC_DEFUN([AM_PROG_INSTALL_SH],
9320
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9321
install_sh=${install_sh-"$am_aux_dir/install-sh"}
9322
AC_SUBST(install_sh)])
9324
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
9326
# This file is free software; the Free Software Foundation
9327
# gives unlimited permission to copy and/or distribute it,
9328
# with or without modifications, as long as this notice is preserved.
9332
# Check whether the underlying file-system supports filenames
9333
# with a leading dot. For instance MS-DOS doesn't.
9334
AC_DEFUN([AM_SET_LEADING_DOT],
9335
[rm -rf .tst 2>/dev/null
9336
mkdir .tst 2>/dev/null
9337
if test -d .tst; then
9342
rmdir .tst 2>/dev/null
9343
AC_SUBST([am__leading_dot])])
9345
# Check to see how 'make' treats includes. -*- Autoconf -*-
9347
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
9349
# This file is free software; the Free Software Foundation
9350
# gives unlimited permission to copy and/or distribute it,
9351
# with or without modifications, as long as this notice is preserved.
9357
# Check to see how make treats includes.
9358
AC_DEFUN([AM_MAKE_INCLUDE],
9359
[am_make=${MAKE-make}
9360
cat > confinc << 'END'
9365
# If we don't find an include directive, just comment out the code.
9366
AC_MSG_CHECKING([for style of include used by $am_make])
9370
# First try GNU make style include.
9371
echo "include confinc" > confmf
9372
# We grep out `Entering directory' and `Leaving directory'
9373
# messages which can occur if `w' ends up in MAKEFLAGS.
9374
# In particular we don't look at `^make:' because GNU make might
9375
# be invoked under some other name (usually "gmake"), in which
9376
# case it prints its new name instead of `make'.
9377
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
9382
# Now try BSD make style include.
9383
if test "$am__include" = "#"; then
9384
echo '.include "confinc"' > confmf
9385
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
9386
am__include=.include
9391
AC_SUBST([am__include])
9392
AC_SUBST([am__quote])
9393
AC_MSG_RESULT([$_am_result])
9394
rm -f confinc confmf
9397
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
9399
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
9400
# Free Software Foundation, Inc.
9402
# This file is free software; the Free Software Foundation
9403
# gives unlimited permission to copy and/or distribute it,
9404
# with or without modifications, as long as this notice is preserved.
9408
# AM_MISSING_PROG(NAME, PROGRAM)
9409
# ------------------------------
9410
AC_DEFUN([AM_MISSING_PROG],
9411
[AC_REQUIRE([AM_MISSING_HAS_RUN])
9412
$1=${$1-"${am_missing_run}$2"}
9416
# AM_MISSING_HAS_RUN
9417
# ------------------
9418
# Define MISSING if not defined so far and test if it supports --run.
9419
# If it does, set am_missing_run to use it, otherwise, to nothing.
9420
AC_DEFUN([AM_MISSING_HAS_RUN],
9421
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9422
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
9423
# Use eval to expand $SHELL
9424
if eval "$MISSING --run true"; then
9425
am_missing_run="$MISSING --run "
9428
AC_MSG_WARN([`missing' script is too old or missing])
9432
# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
9434
# This file is free software; the Free Software Foundation
9435
# gives unlimited permission to copy and/or distribute it,
9436
# with or without modifications, as long as this notice is preserved.
9440
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
9442
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
9443
# created by `make install' are always world readable, even if the
9444
# installer happens to have an overly restrictive umask (e.g. 077).
9445
# This was a mistake. There are at least two reasons why we must not
9447
# - it causes special bits like SGID to be ignored,
9448
# - it may be too restrictive (some setups expect 775 directories).
9450
# Do not use -m 0755 and let people choose whatever they expect by
9453
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
9454
# Some implementations (such as Solaris 8's) are not thread-safe: if a
9455
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
9456
# concurrently, both version can detect that a/ is missing, but only
9457
# one can create it and the other will error out. Consequently we
9458
# restrict ourselves to GNU make (using the --version option ensures
9460
AC_DEFUN([AM_PROG_MKDIR_P],
9461
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
9462
# We used to keeping the `.' as first argument, in order to
9463
# allow $(mkdir_p) to be used without argument. As in
9464
# $(mkdir_p) $(somedir)
9465
# where $(somedir) is conditionally defined. However this is wrong
9467
# 1. if the package is installed by a user who cannot write `.'
9468
# make install will fail,
9469
# 2. the above comment should most certainly read
9470
# $(mkdir_p) $(DESTDIR)$(somedir)
9471
# so it does not work when $(somedir) is undefined and
9472
# $(DESTDIR) is not.
9473
# To support the latter case, we have to write
9474
# test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
9475
# so the `.' trick is pointless.
9476
mkdir_p='mkdir -p --'
9478
# On NextStep and OpenStep, the `mkdir' command does not
9479
# recognize any option. It will interpret all options as
9480
# directories to create, and then abort because `.' already
9482
for d in ./-p ./--version;
9484
test -d $d && rmdir $d
9486
# $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
9487
if test -f "$ac_aux_dir/mkinstalldirs"; then
9488
mkdir_p='$(mkinstalldirs)'
9490
mkdir_p='$(install_sh) -d'
9493
AC_SUBST([mkdir_p])])
9495
# Helper functions for option handling. -*- Autoconf -*-
9497
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
9499
# This file is free software; the Free Software Foundation
9500
# gives unlimited permission to copy and/or distribute it,
9501
# with or without modifications, as long as this notice is preserved.
9505
# _AM_MANGLE_OPTION(NAME)
9506
# -----------------------
9507
AC_DEFUN([_AM_MANGLE_OPTION],
9508
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
9510
# _AM_SET_OPTION(NAME)
9511
# ------------------------------
9512
# Set option NAME. Presently that only means defining a flag for this option.
9513
AC_DEFUN([_AM_SET_OPTION],
9514
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
9516
# _AM_SET_OPTIONS(OPTIONS)
9517
# ----------------------------------
9518
# OPTIONS is a space-separated list of Automake options.
9519
AC_DEFUN([_AM_SET_OPTIONS],
9520
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
9522
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
9523
# -------------------------------------------
9524
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9525
AC_DEFUN([_AM_IF_OPTION],
9526
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
9528
# Check to make sure that the build environment is sane. -*- Autoconf -*-
9530
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
9531
# Free Software Foundation, Inc.
9533
# This file is free software; the Free Software Foundation
9534
# gives unlimited permission to copy and/or distribute it,
9535
# with or without modifications, as long as this notice is preserved.
9541
AC_DEFUN([AM_SANITY_CHECK],
9542
[AC_MSG_CHECKING([whether build environment is sane])
9545
echo timestamp > conftest.file
9546
# Do `set' in a subshell so we don't clobber the current shell's
9547
# arguments. Must try -L first in case configure is actually a
9548
# symlink; some systems play weird games with the mod time of symlinks
9549
# (eg FreeBSD returns the mod time of the symlink's containing
9552
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
9553
if test "$[*]" = "X"; then
9555
set X `ls -t $srcdir/configure conftest.file`
9558
if test "$[*]" != "X $srcdir/configure conftest.file" \
9559
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
9561
# If neither matched, then we have a broken ls. This can happen
9562
# if, for instance, CONFIG_SHELL is bash and it inherits a
9563
# broken ls alias from the environment. This has actually
9564
# happened. Such a system could not be considered "sane".
9565
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
9566
alias in your environment])
9569
test "$[2]" = conftest.file
9575
AC_MSG_ERROR([newly created file is older than distributed files!
9576
Check your system clock])
9578
AC_MSG_RESULT(yes)])
9580
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
9582
# This file is free software; the Free Software Foundation
9583
# gives unlimited permission to copy and/or distribute it,
9584
# with or without modifications, as long as this notice is preserved.
9586
# AM_PROG_INSTALL_STRIP
9587
# ---------------------
9588
# One issue with vendor `install' (even GNU) is that you can't
9589
# specify the program used to strip binaries. This is especially
9590
# annoying in cross-compiling environments, where the build's strip
9591
# is unlikely to handle the host's binaries.
9592
# Fortunately install-sh will honor a STRIPPROG variable, so we
9593
# always use install-sh in `make install-strip', and initialize
9594
# STRIPPROG with the value of the STRIP variable (set by the user).
9595
AC_DEFUN([AM_PROG_INSTALL_STRIP],
9596
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9597
# Installed binaries are usually stripped using `strip' when the user
9598
# run `make install-strip'. However `strip' might not be the right
9599
# tool to use in cross-compilation environments, therefore Automake
9600
# will honor the `STRIP' environment variable to overrule this program.
9601
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
9602
if test "$cross_compiling" != no; then
9603
AC_CHECK_TOOL([STRIP], [strip], :)
9605
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
9606
AC_SUBST([INSTALL_STRIP_PROGRAM])])
9608
# Check how to create a tarball. -*- Autoconf -*-
9610
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
9612
# This file is free software; the Free Software Foundation
9613
# gives unlimited permission to copy and/or distribute it,
9614
# with or without modifications, as long as this notice is preserved.
9618
# _AM_PROG_TAR(FORMAT)
9619
# --------------------
9620
# Check how to create a tarball in format FORMAT.
9621
# FORMAT should be one of `v7', `ustar', or `pax'.
9623
# Substitute a variable $(am__tar) that is a command
9624
# writing to stdout a FORMAT-tarball containing the directory
9626
# tardir=directory && $(am__tar) > result.tar
9628
# Substitute a variable $(am__untar) that extract such
9629
# a tarball read from stdin.
9630
# $(am__untar) < result.tar
9631
AC_DEFUN([_AM_PROG_TAR],
9632
[# Always define AMTAR for backward compatibility.
9633
AM_MISSING_PROG([AMTAR], [tar])
9635
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
9636
[m4_case([$1], [ustar],, [pax],,
9637
[m4_fatal([Unknown tar format])])
9638
AC_MSG_CHECKING([how to create a $1 tar archive])
9639
# Loop over all known methods to create a tar archive until one works.
9640
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
9641
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
9642
# Do not fold the above two line into one, because Tru64 sh and
9643
# Solaris sh will not grok spaces in the rhs of `-'.
9644
for _am_tool in $_am_tools
9648
for _am_tar in tar gnutar gtar;
9650
AM_RUN_LOG([$_am_tar --version]) && break
9652
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
9653
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
9654
am__untar="$_am_tar -xf -"
9657
# Must skip GNU tar: if it does not support --format= it doesn't create
9658
# ustar tarball either.
9659
(tar --version) >/dev/null 2>&1 && continue
9660
am__tar='tar chf - "$$tardir"'
9661
am__tar_='tar chf - "$tardir"'
9662
am__untar='tar xf -'
9665
am__tar='pax -L -x $1 -w "$$tardir"'
9666
am__tar_='pax -L -x $1 -w "$tardir"'
9670
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
9671
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
9672
am__untar='cpio -i -H $1 -d'
9681
# If the value was cached, stop now. We just wanted to have am__tar
9682
# and am__untar set.
9683
test -n "${am_cv_prog_tar_$1}" && break
9685
# tar/untar a dummy directory, and stop if the command works
9688
echo GrepMe > conftest.dir/file
9689
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
9691
if test -s conftest.tar; then
9692
AM_RUN_LOG([$am__untar <conftest.tar])
9693
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
9698
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
9699
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
9701
AC_SUBST([am__untar])
9704
m4_include([acinclude.m4])