11
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12
12
# PARTICULAR PURPOSE.
14
# Like AC_CONFIG_HEADER, but automatically create stamp file.
18
# When config.status generates a header, we must update the stamp-h file.
19
# This file resides in the same directory as the config header
20
# that is generated. We must strip everything past the first ":",
21
# and everything past the last "/".
25
AC_DEFUN([AM_CONFIG_HEADER],
26
[ifdef([AC_FOREACH],dnl
27
[dnl init our file count if it isn't already
28
m4_ifndef([_AM_Config_Header_Index], m4_define([_AM_Config_Header_Index], [0]))
29
dnl prepare to store our destination file list for use in config.status
30
AC_FOREACH([_AM_File], [$1],
31
[m4_pushdef([_AM_Dest], m4_patsubst(_AM_File, [:.*]))
32
m4_define([_AM_Config_Header_Index], m4_incr(_AM_Config_Header_Index))
33
dnl and add it to the list of files AC keeps track of, along
35
AC_CONFIG_HEADERS(_AM_File,
36
dnl COMMANDS, [, INIT-CMDS]
37
[# update the timestamp
38
echo timestamp >"AS_ESCAPE(_AM_DIRNAME(]_AM_Dest[))/stamp-h]_AM_Config_Header_Index["
39
][$2]m4_ifval([$3], [, [$3]]))dnl AC_CONFIG_HEADERS
40
m4_popdef([_AM_Dest])])],dnl
41
[AC_CONFIG_HEADER([$1])
43
ifelse(patsubst([$1], [[^ ]], []),
45
[test -z "$CONFIG_HEADERS" || echo timestamp >dnl
46
patsubst([$1], [^\([^:]*/\)?.*], [\1])stamp-h]),dnl
49
case " \$CONFIG_HEADERS " in
51
am_dir=\`echo \$am_file |sed 's%:.*%%;s%[^/]*\$%%'\`
52
if test -n "\$am_dir"; then
53
am_tmpdir=\`echo \$am_dir |sed 's%^\(/*\).*\$%\1%'\`
54
for am_subdir in \`echo \$am_dir |sed 's%/% %'\`; do
55
am_tmpdir=\$am_tmpdir\$am_subdir/
56
if test ! -d \$am_tmpdir; then
61
echo timestamp > "\$am_dir"stamp-h\$am_indx
64
am_indx=\`expr \$am_indx + 1\`
66
])]) # AM_CONFIG_HEADER
70
# Like AS_DIRNAME, only do it during macro expansion
71
AC_DEFUN([_AM_DIRNAME],
72
[m4_if(m4_regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
73
m4_if(m4_regexp([$1], [^//\([^/]\|$\)]), -1,
74
m4_if(m4_regexp([$1], [^/.*]), -1,
76
m4_patsubst([$1], [^\(/\).*], [\1])),
77
m4_patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
78
m4_patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
81
# Do all the work for Automake. This macro actually does too much --
82
# some checks are only needed if your package does certain things.
83
# But this isn't really a big deal.
87
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
88
# written in clear, in which case automake, when reading aclocal.m4,
89
# will think it sees a *use*, and therefore will trigger all it's
90
# C support machinery. Also note that it means that autoscan, seeing
91
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
94
# We require 2.13 because we rely on SHELL being computed by configure.
14
# Configure paths for GTK+
17
dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
18
dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
22
dnl Get the cflags and libraries from the gtk-config script
24
AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)],
25
gtk_config_prefix="$withval", gtk_config_prefix="")
26
AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)],
27
gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
28
AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program],
35
gtk_config_args="$gtk_config_args gthread"
40
if test x$gtk_config_exec_prefix != x ; then
41
gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
42
if test x${GTK_CONFIG+set} != xset ; then
43
GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
46
if test x$gtk_config_prefix != x ; then
47
gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
48
if test x${GTK_CONFIG+set} != xset ; then
49
GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
53
AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
54
min_gtk_version=ifelse([$1], ,0.99.7,$1)
55
AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
57
if test "$GTK_CONFIG" = "no" ; then
60
GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
61
GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
62
gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
63
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
64
gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
65
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
66
gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
67
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
68
if test "x$enable_gtktest" = "xyes" ; then
69
ac_save_CFLAGS="$CFLAGS"
71
CFLAGS="$CFLAGS $GTK_CFLAGS"
72
LIBS="$GTK_LIBS $LIBS"
74
dnl Now check if the installed GTK is sufficiently new. (Also sanity
75
dnl checks the results of gtk-config to some extent
86
int major, minor, micro;
89
system ("touch conf.gtktest");
91
/* HP/UX 9 (%@#!) writes to sscanf strings */
92
tmp_version = g_strdup("$min_gtk_version");
93
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
94
printf("%s, bad version string\n", "$min_gtk_version");
98
if ((gtk_major_version != $gtk_config_major_version) ||
99
(gtk_minor_version != $gtk_config_minor_version) ||
100
(gtk_micro_version != $gtk_config_micro_version))
102
printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
103
$gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
104
gtk_major_version, gtk_minor_version, gtk_micro_version);
105
printf ("*** was found! If gtk-config was correct, then it is best\n");
106
printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
107
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
108
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
109
printf("*** required on your system.\n");
110
printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
111
printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
112
printf("*** before re-running configure\n");
114
#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
115
else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
116
(gtk_minor_version != GTK_MINOR_VERSION) ||
117
(gtk_micro_version != GTK_MICRO_VERSION))
119
printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
120
GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
121
printf("*** library (version %d.%d.%d)\n",
122
gtk_major_version, gtk_minor_version, gtk_micro_version);
124
#endif /* defined (GTK_MAJOR_VERSION) ... */
127
if ((gtk_major_version > major) ||
128
((gtk_major_version == major) && (gtk_minor_version > minor)) ||
129
((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
135
printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
136
gtk_major_version, gtk_minor_version, gtk_micro_version);
137
printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
138
major, minor, micro);
139
printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
141
printf("*** If you have already installed a sufficiently new version, this error\n");
142
printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
143
printf("*** being found. The easiest way to fix this is to remove the old version\n");
144
printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
145
printf("*** correct copy of gtk-config. (In this case, you will have to\n");
146
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
147
printf("*** so that the correct libraries are found at run-time))\n");
152
],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
153
CFLAGS="$ac_save_CFLAGS"
157
if test "x$no_gtk" = x ; then
159
ifelse([$2], , :, [$2])
162
if test "$GTK_CONFIG" = "no" ; then
163
echo "*** The gtk-config script installed by GTK could not be found"
164
echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
165
echo "*** your path, or set the GTK_CONFIG environment variable to the"
166
echo "*** full path to gtk-config."
168
if test -f conf.gtktest ; then
171
echo "*** Could not run GTK test program, checking why..."
172
CFLAGS="$CFLAGS $GTK_CFLAGS"
173
LIBS="$LIBS $GTK_LIBS"
177
], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
178
[ echo "*** The test program compiled, but did not run. This usually means"
179
echo "*** that the run-time linker is not finding GTK or finding the wrong"
180
echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
181
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
182
echo "*** to the installed location Also, make sure you have run ldconfig if that"
183
echo "*** is required on your system"
185
echo "*** If you have an old version installed, it is best to remove it, although"
186
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
188
echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
189
echo "*** came with the system with the command"
191
echo "*** rpm --erase --nodeps gtk gtk-devel" ],
192
[ echo "*** The test program failed to compile or link. See the file config.log for the"
193
echo "*** exact error that occured. This usually means GTK was incorrectly installed"
194
echo "*** or that you have moved GTK since it was installed. In the latter case, you"
195
echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ])
196
CFLAGS="$ac_save_CFLAGS"
202
ifelse([$3], , :, [$3])
209
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
211
# serial 47 AC_PROG_LIBTOOL
97
214
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
98
215
# -----------------------------------------------------------
99
# If MACRO-NAME is provided do IF-PROVIDED, else IF-NOT-PROVIDED.
100
# The purpose of this macro is to provide the user with a means to
101
# check macros which are provided without letting her know how the
102
# information is coded.
103
216
# If this macro is not defined by Autoconf, define it here.
104
ifdef([AC_PROVIDE_IFELSE],
106
[define([AC_PROVIDE_IFELSE],
107
[ifdef([AC_PROVIDE_$1],
111
# AM_INIT_AUTOMAKE(PACKAGE,VERSION, [NO-DEFINE])
112
# ----------------------------------------------
113
AC_DEFUN([AM_INIT_AUTOMAKE],
114
[AC_REQUIRE([AC_PROG_INSTALL])dnl
115
# test to see if srcdir already configured
116
if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" &&
117
test -f $srcdir/config.status; then
118
AC_MSG_ERROR([source directory already configured; run \"make distclean\" there first])
121
# Define the identity of the package.
127
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
128
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])
130
# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
131
# the ones we care about.
132
ifdef([m4_pattern_allow],
133
[m4_pattern_allow([^AM_[A-Z]+FLAGS])])dnl
135
# Autoconf 2.50 always computes EXEEXT. However we need to be
136
# compatible with 2.13, for now. So we always define EXEEXT, but we
139
# Similar for OBJEXT -- only we only use OBJEXT if the user actually
140
# requests that it be used. This is a bit dumb.
144
# Some tools Automake needs.
145
AC_REQUIRE([AM_SANITY_CHECK])dnl
146
AC_REQUIRE([AC_ARG_PROGRAM])dnl
147
AM_MISSING_PROG(ACLOCAL, aclocal)
148
AM_MISSING_PROG(AUTOCONF, autoconf)
149
AM_MISSING_PROG(AUTOMAKE, automake)
150
AM_MISSING_PROG(AUTOHEADER, autoheader)
151
AM_MISSING_PROG(MAKEINFO, makeinfo)
152
AM_MISSING_PROG(AMTAR, tar)
154
AM_PROG_INSTALL_STRIP
155
# We need awk for the "check" target. The system "awk" is bad on
157
AC_REQUIRE([AC_PROG_AWK])dnl
158
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
159
AC_REQUIRE([AM_DEP_TRACK])dnl
160
AC_REQUIRE([AM_SET_DEPDIR])dnl
161
AC_PROVIDE_IFELSE([AC_PROG_][CC],
162
[_AM_DEPENDENCIES(CC)],
163
[define([AC_PROG_][CC],
164
defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
165
AC_PROVIDE_IFELSE([AC_PROG_][CXX],
166
[_AM_DEPENDENCIES(CXX)],
167
[define([AC_PROG_][CXX],
168
defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
172
# Check to make sure that the build environment is sane.
217
m4_ifdef([AC_PROVIDE_IFELSE],
219
[m4_define([AC_PROVIDE_IFELSE],
220
[m4_ifdef([AC_PROVIDE_$1],
178
225
# ---------------
179
AC_DEFUN([AM_SANITY_CHECK],
180
[AC_MSG_CHECKING([whether build environment is sane])
183
echo timestamp > conftest.file
184
# Do `set' in a subshell so we don't clobber the current shell's
185
# arguments. Must try -L first in case configure is actually a
186
# symlink; some systems play weird games with the mod time of symlinks
187
# (eg FreeBSD returns the mod time of the symlink's containing
190
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
191
if test "$[*]" = "X"; then
193
set X `ls -t $srcdir/configure conftest.file`
196
if test "$[*]" != "X $srcdir/configure conftest.file" \
197
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
199
# If neither matched, then we have a broken ls. This can happen
200
# if, for instance, CONFIG_SHELL is bash and it inherits a
201
# broken ls alias from the environment. This has actually
202
# happened. Such a system could not be considered "sane".
203
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
204
alias in your environment])
207
test "$[2]" = conftest.file
213
AC_MSG_ERROR([newly created file is older than distributed files!
214
Check your system clock])
221
# AM_MISSING_PROG(NAME, PROGRAM)
222
# ------------------------------
223
AC_DEFUN([AM_MISSING_PROG],
224
[AC_REQUIRE([AM_MISSING_HAS_RUN])
225
$1=${$1-"${am_missing_run}$2"}
231
# Define MISSING if not defined so far and test if it supports --run.
232
# If it does, set am_missing_run to use it, otherwise, to nothing.
233
AC_DEFUN([AM_MISSING_HAS_RUN],
234
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
235
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
236
# Use eval to expand $SHELL
237
if eval "$MISSING --run true"; then
238
am_missing_run="$MISSING --run "
242
AC_MSG_WARN([${am_backtick}missing' script is too old or missing])
248
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
249
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
250
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
252
# Of course, Automake must honor this variable whenever it calls a
253
# tool from the auxiliary directory. The problem is that $srcdir (and
254
# therefore $ac_aux_dir as well) can be either absolute or relative,
255
# depending on how configure is run. This is pretty annoying, since
256
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
257
# source directory, any form will work fine, but in subdirectories a
258
# relative path needs to be adjusted first.
260
# $ac_aux_dir/missing
261
# fails when called from a subdirectory if $ac_aux_dir is relative
262
# $top_srcdir/$ac_aux_dir/missing
263
# fails if $ac_aux_dir is absolute,
264
# fails when called from a subdirectory in a VPATH build with
265
# a relative $ac_aux_dir
267
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
268
# are both prefixed by $srcdir. In an in-source build this is usually
269
# harmless because $srcdir is `.', but things will broke when you
270
# start a VPATH build or use an absolute $srcdir.
272
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
273
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
274
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
275
# and then we would define $MISSING as
276
# MISSING="\${SHELL} $am_aux_dir/missing"
277
# This will work as long as MISSING is not called from configure, because
278
# unfortunately $(top_srcdir) has no meaning in configure.
279
# However there are other variables, like CC, which are often used in
280
# configure, and could therefore not use this "fixed" $ac_aux_dir.
282
# Another solution, used here, is to always expand $ac_aux_dir to an
283
# absolute PATH. The drawback is that using absolute paths prevent a
284
# configured tree to be moved without reconfiguration.
286
AC_DEFUN([AM_AUX_DIR_EXPAND], [
287
# expand $ac_aux_dir to an absolute path
288
am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd`
293
# Define $install_sh.
294
AC_DEFUN([AM_PROG_INSTALL_SH],
295
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
296
install_sh=${install_sh-"$am_aux_dir/install-sh"}
297
AC_SUBST(install_sh)])
299
# One issue with vendor `install' (even GNU) is that you can't
300
# specify the program used to strip binaries. This is especially
301
# annoying in cross-compiling environments, where the build's strip
302
# is unlikely to handle the host's binaries.
303
# Fortunately install-sh will honor a STRIPPROG variable, so we
304
# always use install-sh in `make install-strip', and initialize
305
# STRIPPROG with the value of the STRIP variable (set by the user).
306
AC_DEFUN([AM_PROG_INSTALL_STRIP],
307
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
308
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
309
AC_SUBST([INSTALL_STRIP_PROGRAM])])
311
# serial 4 -*- Autoconf -*-
315
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
316
# written in clear, in which case automake, when reading aclocal.m4,
317
# will think it sees a *use*, and therefore will trigger all it's
318
# C support machinery. Also note that it means that autoscan, seeing
319
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
323
# _AM_DEPENDENCIES(NAME)
324
# ---------------------
325
# See how the compiler implements dependency checking.
326
# NAME is "CC", "CXX" or "OBJC".
327
# We try a few techniques and use that to set a single cache variable.
329
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
330
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
331
# dependency, and given that the user is not expected to run this macro,
332
# just rely on AC_PROG_CC.
333
AC_DEFUN([_AM_DEPENDENCIES],
334
[AC_REQUIRE([AM_SET_DEPDIR])dnl
335
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
336
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
337
AC_REQUIRE([AM_DEP_TRACK])dnl
339
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
340
[$1], CXX, [depcc="$CXX" am_compiler_list=],
341
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc']
342
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
343
[depcc="$$1" am_compiler_list=])
345
AC_CACHE_CHECK([dependency style of $depcc],
346
[am_cv_$1_dependencies_compiler_type],
347
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
348
# We make a subdir and do the tests there. Otherwise we can end up
349
# making bogus files that we don't know about and never remove. For
350
# instance it was reported that on HP-UX the gcc test will end up
351
# making a dummy file named `D' -- because `-MD' means `put the output
354
# Copy depcomp to subdir because otherwise we won't find it if we're
355
# using a relative directory.
356
cp "$am_depcomp" conftest.dir
359
am_cv_$1_dependencies_compiler_type=none
360
if test "$am_compiler_list" = ""; then
361
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
363
for depmode in $am_compiler_list; do
364
# We need to recreate these files for each test, as the compiler may
365
# overwrite some of them when testing with obscure command lines.
366
# This happens at least with the AIX C compiler.
367
echo '#include "conftest.h"' > conftest.c
368
echo 'int i;' > conftest.h
369
echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
373
# after this tag, mechanisms are not by side-effect, so they'll
374
# only be used when explicitly requested
375
if test "x$enable_dependency_tracking" = xyes; then
383
# We check with `-c' and `-o' for the sake of the "dashmstdout"
384
# mode. It turns out that the SunPro C++ compiler does not properly
385
# handle `-M -o', and we need to detect this.
386
if depmode=$depmode \
387
source=conftest.c object=conftest.o \
388
depfile=conftest.Po tmpdepfile=conftest.TPo \
389
$SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
390
grep conftest.h conftest.Po > /dev/null 2>&1 &&
391
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
392
am_cv_$1_dependencies_compiler_type=$depmode
400
am_cv_$1_dependencies_compiler_type=none
403
$1DEPMODE="depmode=$am_cv_$1_dependencies_compiler_type"
404
AC_SUBST([$1DEPMODE])
410
# Choose a directory name for dependency files.
411
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
412
AC_DEFUN([AM_SET_DEPDIR],
413
[rm -f .deps 2>/dev/null
414
mkdir .deps 2>/dev/null
415
if test -d .deps; then
418
# MS-DOS does not allow filenames that begin with a dot.
421
rmdir .deps 2>/dev/null
428
AC_DEFUN([AM_DEP_TRACK],
429
[AC_ARG_ENABLE(dependency-tracking,
430
[ --disable-dependency-tracking Speeds up one-time builds
431
--enable-dependency-tracking Do not reject slow dependency extractors])
432
if test "x$enable_dependency_tracking" != xno; then
433
am_depcomp="$ac_aux_dir/depcomp"
436
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
437
pushdef([subst], defn([AC_SUBST]))
438
subst(AMDEPBACKSLASH)
442
# Generate code to set up dependency tracking.
443
# This macro should only be invoked once -- use via AC_REQUIRE.
445
# AM_OUTPUT_DEPENDENCY_COMMANDS
448
# This code is only required when automatic dependency tracking
449
# is enabled. FIXME. This creates each `.P' file that we will
450
# need in order to bootstrap the dependency handling code.
451
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],[
453
test x"$AMDEP_TRUE" != x"" ||
454
for mf in $CONFIG_FILES; do
456
Makefile) dirpart=.;;
457
*/Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
460
grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
461
# Extract the definition of DEP_FILES from the Makefile without
463
DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
464
test -z "$DEPDIR" && continue
465
# When using ansi2knr, U may be empty or an underscore; expand it
466
U=`sed -n -e '/^U = / s///p' < "$mf"`
467
test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
468
# We invoke sed twice because it is the simplest approach to
469
# changing $(DEPDIR) to its actual value in the expansion.
470
for file in `sed -n -e '
471
/^DEP_FILES = .*\\\\$/ {
480
/^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
481
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
482
# Make sure the directory exists.
483
test -f "$dirpart/$file" && continue
484
fdir=`echo "$file" | sed -e 's|/[^/]*$||'`
485
$ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1
486
# echo "creating $dirpart/$file"
487
echo '# dummy' > "$dirpart/$file"
490
], [AMDEP_TRUE="$AMDEP_TRUE"
491
ac_aux_dir="$ac_aux_dir"])])
495
# Check to see how make treats includes.
496
AC_DEFUN([AM_MAKE_INCLUDE],
497
[am_make=${MAKE-make}
498
cat > confinc << 'END'
502
# If we don't find an include directive, just comment out the code.
503
AC_MSG_CHECKING([for style of include used by $am_make])
507
# First try GNU make style include.
508
echo "include confinc" > confmf
509
# We grep out `Entering directory' and `Leaving directory'
510
# messages which can occur if `w' ends up in MAKEFLAGS.
511
# In particular we don't look at `^make:' because GNU make might
512
# be invoked under some other name (usually "gmake"), in which
513
# case it prints its new name instead of `make'.
514
if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
519
# Now try BSD make style include.
520
if test "$am__include" = "#"; then
521
echo '.include "confinc"' > confmf
522
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
528
AC_SUBST(am__include)
530
AC_MSG_RESULT($_am_result)
536
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
537
# -------------------------------------
538
# Define a conditional.
540
# FIXME: Once using 2.50, use this:
541
# m4_match([$1], [^TRUE\|FALSE$], [AC_FATAL([$0: invalid condition: $1])])dnl
542
AC_DEFUN([AM_CONDITIONAL],
543
[ifelse([$1], [TRUE],
544
[errprint(__file__:__line__: [$0: invalid condition: $1
547
ifelse([$1], [FALSE],
548
[errprint(__file__:__line__: [$0: invalid condition: $1
561
# Add --enable-maintainer-mode option to configure.
566
AC_DEFUN([AM_MAINTAINER_MODE],
567
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
568
dnl maintainer-mode is disabled by default
569
AC_ARG_ENABLE(maintainer-mode,
570
[ --enable-maintainer-mode enable make rules and dependencies not useful
571
(and sometimes confusing) to the casual installer],
572
USE_MAINTAINER_MODE=$enableval,
573
USE_MAINTAINER_MODE=no)
574
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
575
AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
576
MAINT=$MAINTAINER_MODE_TRUE
581
# libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
583
# serial 46 AC_PROG_LIBTOOL
585
226
AC_DEFUN([AC_PROG_LIBTOOL],
227
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
228
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
229
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
230
AC_PROVIDE_IFELSE([AC_PROG_CXX],
232
[define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
234
dnl And a similar setup for Fortran 77 support
235
AC_PROVIDE_IFELSE([AC_PROG_F77],
237
[define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
240
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
241
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
242
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
243
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
245
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
247
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
249
[ifdef([AC_PROG_GCJ],
250
[define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
251
ifdef([A][M_PROG_GCJ],
252
[define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
253
ifdef([LT_AC_PROG_GCJ],
254
[define([LT_AC_PROG_GCJ],
255
defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
256
])])# AC_PROG_LIBTOOL
261
AC_DEFUN([_AC_PROG_LIBTOOL],
586
262
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
263
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
264
AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
265
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
588
267
# This can be used to rebuild libtool when needed
589
268
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
1276
1100
])# AC_LIBTOOL_DLOPEN_SELF
1278
AC_DEFUN([_LT_AC_LTCONFIG_HACK],
1279
[AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
1280
# Sed substitution that helps us do robust quoting. It backslashifies
1281
# metacharacters that are still active within double-quoted strings.
1282
Xsed='sed -e s/^X//'
1283
sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g'
1285
# Same as above, but do not quote variable references.
1286
double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g'
1288
# Sed substitution to delay expansion of an escaped shell variable in a
1289
# double_quote_subst'ed string.
1290
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1296
default_ofile=libtool
1297
can_build_shared=yes
1299
# All known linkers require a `.a' archive for static linking (except M$VC,
1300
# which needs '.lib').
1302
ltmain="$ac_aux_dir/ltmain.sh"
1303
ofile="$default_ofile"
1304
with_gnu_ld="$lt_cv_prog_gnu_ld"
1305
need_locks="$enable_libtool_lock"
1308
old_CFLAGS="$CFLAGS"
1310
# Set sane defaults for various variables
1311
test -z "$AR" && AR=ar
1312
test -z "$AR_FLAGS" && AR_FLAGS=cru
1313
test -z "$AS" && AS=as
1314
test -z "$CC" && CC=cc
1315
test -z "$DLLTOOL" && DLLTOOL=dlltool
1316
test -z "$LD" && LD=ld
1317
test -z "$LN_S" && LN_S="ln -s"
1318
test -z "$MAGIC_CMD" && MAGIC_CMD=file
1319
test -z "$NM" && NM=nm
1320
test -z "$OBJDUMP" && OBJDUMP=objdump
1321
test -z "$RANLIB" && RANLIB=:
1322
test -z "$STRIP" && STRIP=:
1323
test -z "$ac_objext" && ac_objext=o
1325
if test x"$host" != x"$build"; then
1326
ac_tool_prefix=${host_alias}-
1331
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
1334
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
1339
# AIX sometimes has problems with the GCC collect2 program. For some
1340
# reason, if we set the COLLECT_NAMES environment variable, the problems
1341
# vanish in a puff of smoke.
1342
if test "X${COLLECT_NAMES+set}" != Xset; then
1344
export COLLECT_NAMES
1349
# Determine commands to create old-style static archives.
1350
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1351
old_postinstall_cmds='chmod 644 $oldlib'
1352
old_postuninstall_cmds=
1354
if test -n "$RANLIB"; then
1357
old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1360
old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1363
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1366
# Allow CC to be a program name with arguments.
1370
AC_MSG_CHECKING([for objdir])
1371
rm -f .libs 2>/dev/null
1372
mkdir .libs 2>/dev/null
1373
if test -d .libs; then
1376
# MS-DOS does not allow filenames that begin with a dot.
1379
rmdir .libs 2>/dev/null
1380
AC_MSG_RESULT($objdir)
1384
[ --with-pic try to use only PIC/non-PIC objects [default=use both]],
1385
pic_mode="$withval", pic_mode=default)
1386
test -z "$pic_mode" && pic_mode=default
1388
# We assume here that the value for lt_cv_prog_cc_pic will not be cached
1389
# in isolation, and that seeing it set (from the cache) indicates that
1390
# the associated values are set (in the cache) correctly too.
1391
AC_MSG_CHECKING([for $compiler option to produce PIC])
1392
AC_CACHE_VAL(lt_cv_prog_cc_pic,
1393
[ lt_cv_prog_cc_pic=
1394
lt_cv_prog_cc_shlib=
1396
lt_cv_prog_cc_static=
1397
lt_cv_prog_cc_no_builtin=
1398
lt_cv_prog_cc_can_build_shared=$can_build_shared
1400
if test "$GCC" = yes; then
1401
lt_cv_prog_cc_wl='-Wl,'
1402
lt_cv_prog_cc_static='-static'
1406
# Below there is a dirty hack to force normal static linking with -ldl
1407
# The problem is because libdl dynamically linked with both libc and
1408
# libC (AIX C++ library), which obviously doesn't included in libraries
1409
# list by gcc. This cause undefined symbols with -static flags.
1410
# This hack allows C programs to be linked with "-static -ldl", but
1411
# not sure about C++ programs.
1412
lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
1415
# FIXME: we need at least 68020 code to build shared libraries, but
1416
# adding the `-m68020' flag to GCC prevents building anything better,
1418
lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
1420
beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
1421
# PIC is the default for these OSes.
1423
darwin* | rhapsody*)
1424
# PIC is the default on this platform
1425
# Common symbols not allowed in MH_DYLIB files
1426
lt_cv_prog_cc_pic='-fno-common'
1428
cygwin* | mingw* | pw32* | os2*)
1429
# This hack is so that the source file can tell whether it is being
1430
# built for inclusion in a dll (and should export symbols for example).
1431
lt_cv_prog_cc_pic='-DDLL_EXPORT'
1434
if test -d /usr/nec; then
1435
lt_cv_prog_cc_pic=-Kconform_pic
1439
lt_cv_prog_cc_pic='-fPIC'
1443
# PORTME Check for PIC flags for the system compiler.
1445
aix3* | aix4* | aix5*)
1446
lt_cv_prog_cc_wl='-Wl,'
1447
# All AIX code is PIC.
1448
if test "$host_cpu" = ia64; then
1449
# AIX 5 now supports IA64 processor
1450
lt_cv_prog_cc_static='-Bstatic'
1452
lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
1456
hpux9* | hpux10* | hpux11*)
1457
# Is there a better lt_cv_prog_cc_static that works with the bundled CC?
1458
lt_cv_prog_cc_wl='-Wl,'
1459
lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
1460
lt_cv_prog_cc_pic='+Z'
1464
lt_cv_prog_cc_wl='-Wl,'
1465
lt_cv_prog_cc_static='-non_shared'
1466
# PIC (with -KPIC) is the default.
1469
cygwin* | mingw* | pw32* | os2*)
1470
# This hack is so that the source file can tell whether it is being
1471
# built for inclusion in a dll (and should export symbols for example).
1472
lt_cv_prog_cc_pic='-DDLL_EXPORT'
1476
lt_cv_prog_cc_pic='-KPIC'
1477
lt_cv_prog_cc_static='-Bstatic'
1480
osf3* | osf4* | osf5*)
1481
# All OSF/1 code is PIC.
1482
lt_cv_prog_cc_wl='-Wl,'
1483
lt_cv_prog_cc_static='-non_shared'
1487
lt_cv_prog_cc_pic='-Kpic'
1488
lt_cv_prog_cc_static='-dn'
1489
lt_cv_prog_cc_shlib='-belf'
1493
lt_cv_prog_cc_pic='-KPIC'
1494
lt_cv_prog_cc_static='-Bstatic'
1495
lt_cv_prog_cc_wl='-Wl,'
1499
lt_cv_prog_cc_pic='-PIC'
1500
lt_cv_prog_cc_static='-Bstatic'
1501
lt_cv_prog_cc_wl='-Qoption ld '
1504
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1505
lt_cv_prog_cc_pic='-KPIC'
1506
lt_cv_prog_cc_static='-Bstatic'
1507
if test "x$host_vendor" = xsni; then
1508
lt_cv_prog_cc_wl='-LD'
1510
lt_cv_prog_cc_wl='-Wl,'
1515
lt_cv_prog_cc_pic='-pic'
1516
lt_cv_prog_cc_static='-Bstatic'
1520
if test -d /usr/nec ;then
1521
lt_cv_prog_cc_pic='-Kconform_pic'
1522
lt_cv_prog_cc_static='-Bstatic'
1527
lt_cv_prog_cc_can_build_shared=no
1532
if test -z "$lt_cv_prog_cc_pic"; then
1533
AC_MSG_RESULT([none])
1535
AC_MSG_RESULT([$lt_cv_prog_cc_pic])
1537
# Check to make sure the pic_flag actually works.
1538
AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
1539
AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
1540
save_CFLAGS="$CFLAGS"
1541
CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
1542
AC_TRY_COMPILE([], [], [dnl
1544
hpux9* | hpux10* | hpux11*)
1545
# On HP-UX, both CC and GCC only warn that PIC is supported... then
1546
# they create non-PIC objects. So, if there were any warnings, we
1547
# assume that PIC is not supported.
1548
if test -s conftest.err; then
1549
lt_cv_prog_cc_pic_works=no
1551
lt_cv_prog_cc_pic_works=yes
1555
lt_cv_prog_cc_pic_works=yes
1559
lt_cv_prog_cc_pic_works=no
1561
CFLAGS="$save_CFLAGS"
1564
if test "X$lt_cv_prog_cc_pic_works" = Xno; then
1566
lt_cv_prog_cc_can_build_shared=no
1568
lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
1571
AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
1574
# Check for any special shared library compilation flags.
1575
if test -n "$lt_cv_prog_cc_shlib"; then
1576
AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
1577
if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$lt_cv_prog_cc_shlib[[ ]]" >/dev/null; then :
1579
AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
1580
lt_cv_prog_cc_can_build_shared=no
1584
AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
1585
AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
1586
lt_cv_prog_cc_static_works=no
1587
save_LDFLAGS="$LDFLAGS"
1588
LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
1589
AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
1590
LDFLAGS="$save_LDFLAGS"
1593
# Belt *and* braces to stop my trousers falling down:
1594
test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
1595
AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
1597
pic_flag="$lt_cv_prog_cc_pic"
1598
special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
1599
wl="$lt_cv_prog_cc_wl"
1600
link_static_flag="$lt_cv_prog_cc_static"
1601
no_builtin_flag="$lt_cv_prog_cc_no_builtin"
1602
can_build_shared="$lt_cv_prog_cc_can_build_shared"
1605
# Check to see if options -o and -c are simultaneously supported by compiler
1606
AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
1607
AC_CACHE_VAL([lt_cv_compiler_c_o], [
1608
$rm -r conftest 2>/dev/null
1611
echo "int some_variable = 0;" > conftest.$ac_ext
1613
# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
1614
# that will create temporary files in the current directory regardless of
1615
# the output directory. Thus, making CWD read-only will cause this test
1616
# to fail, enabling locking or at least warning the user not to do parallel
1619
save_CFLAGS="$CFLAGS"
1620
CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
1622
if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
1623
# The compiler can only warn and ignore the option if not recognized
1624
# So say no if there are warnings
1625
if test -s out/conftest.err; then
1626
lt_cv_compiler_c_o=no
1628
lt_cv_compiler_c_o=yes
1631
# Append any errors to the config.log.
1632
cat out/conftest.err 1>&AC_FD_CC
1633
lt_cv_compiler_c_o=no
1635
CFLAGS="$save_CFLAGS"
1641
$rm -r conftest 2>/dev/null
1643
compiler_c_o=$lt_cv_compiler_c_o
1644
AC_MSG_RESULT([$compiler_c_o])
1646
if test x"$compiler_c_o" = x"yes"; then
1647
# Check to see if we can write to a .lo
1648
AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
1649
AC_CACHE_VAL([lt_cv_compiler_o_lo], [
1650
lt_cv_compiler_o_lo=no
1651
save_CFLAGS="$CFLAGS"
1652
CFLAGS="$CFLAGS -c -o conftest.lo"
1653
save_objext="$ac_objext"
1655
AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1656
# The compiler can only warn and ignore the option if not recognized
1657
# So say no if there are warnings
1658
if test -s conftest.err; then
1659
lt_cv_compiler_o_lo=no
1661
lt_cv_compiler_o_lo=yes
1664
ac_objext="$save_objext"
1665
CFLAGS="$save_CFLAGS"
1667
compiler_o_lo=$lt_cv_compiler_o_lo
1668
AC_MSG_RESULT([$compiler_o_lo])
1103
# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1104
# ---------------------------------
1105
# Check to see if options -c and -o are simultaneously supported by compiler
1106
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1107
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1108
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1109
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1110
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1111
$rm -r conftest 2>/dev/null
1115
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1117
lt_compiler_flag="-o out/conftest2.$ac_objext"
1118
# Insert the option either (1) after the last *FLAGS variable, or
1119
# (2) before a word containing "conftest.", or (3) at the end.
1120
# Note that $ac_compile itself does not contain backslashes and begins
1121
# with a dollar sign (not a hyphen), so the echo should work correctly.
1122
lt_compile=`echo "$ac_compile" | $SED \
1123
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1124
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1125
-e 's:$: $lt_compiler_flag:'`
1126
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1127
(eval "$lt_compile" 2>out/conftest.err)
1129
cat out/conftest.err >&AS_MESSAGE_LOG_FD
1130
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1131
if (exit $ac_status) && test -s out/conftest2.$ac_objext
1133
# The compiler can only warn and ignore the option if not recognized
1134
# So say no if there are warnings
1135
if test ! -s out/conftest.err; then
1136
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1141
# SGI C++ compiler will create directory out/ii_files/ for
1142
# template instantiation
1143
test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1144
$rm out/* && rmdir out
1149
])# AC_LIBTOOL_PROG_CC_C_O
1152
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1153
# -----------------------------------------
1673
1154
# Check to see if we can do hard links to lock some files if needed
1155
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1156
[AC_REQUIRE([_LT_AC_LOCK])dnl
1674
1158
hard_links="nottested"
1675
if test "$compiler_c_o" = no && test "$need_locks" != no; then
1159
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1676
1160
# do not overwrite the value of need_locks provided by the user
1677
1161
AC_MSG_CHECKING([if we can lock with hard links])
1683
1167
ln conftest.a conftest.b 2>/dev/null && hard_links=no
1684
1168
AC_MSG_RESULT([$hard_links])
1685
1169
if test "$hard_links" = no; then
1686
AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
1170
AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1687
1171
need_locks=warn
1693
if test "$GCC" = yes; then
1694
# Check to see if options -fno-rtti -fno-exceptions are supported by compiler
1695
AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
1696
echo "int some_variable = 0;" > conftest.$ac_ext
1697
save_CFLAGS="$CFLAGS"
1698
CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
1699
compiler_rtti_exceptions=no
1700
AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1701
# The compiler can only warn and ignore the option if not recognized
1702
# So say no if there are warnings
1703
if test -s conftest.err; then
1704
compiler_rtti_exceptions=no
1706
compiler_rtti_exceptions=yes
1709
CFLAGS="$save_CFLAGS"
1710
AC_MSG_RESULT([$compiler_rtti_exceptions])
1712
if test "$compiler_rtti_exceptions" = "yes"; then
1713
no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
1715
no_builtin_flag=' -fno-builtin'
1719
# See if the linker supports building shared libraries.
1720
AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
1722
allow_undefined_flag=
1724
need_lib_prefix=unknown
1725
need_version=unknown
1726
# when you set need_version to no, make sure it does not cause -set_version
1727
# flags to be left without arguments
1729
archive_expsym_cmds=
1730
old_archive_from_new_cmds=
1731
old_archive_from_expsyms_cmds=
1732
export_dynamic_flag_spec=
1733
whole_archive_flag_spec=
1734
thread_safe_flag_spec=
1735
hardcode_into_libs=no
1736
hardcode_libdir_flag_spec=
1737
hardcode_libdir_separator=
1740
hardcode_shlibpath_var=unsupported
1742
link_all_deplibs=unknown
1743
always_export_symbols=no
1744
export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
1745
# include_expsyms should be a list of space-separated symbols to be *always*
1746
# included in the symbol list
1748
# exclude_expsyms can be an egrep regular expression of symbols to exclude
1749
# it will be wrapped by ` (' and `)$', so one must not match beginning or
1750
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
1751
# as well as any symbol that contains `d'.
1752
exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
1753
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
1754
# platforms (ab)use it in PIC code, but their linkers get confused if
1755
# the symbol is explicitly referenced. Since portable code cannot
1756
# rely on this symbol name, it's probably fine to never include it in
1757
# preloaded symbol tables.
1758
extract_expsyms_cmds=
1761
cygwin* | mingw* | pw32*)
1762
# FIXME: the MSVC++ port hasn't been tested in a loooong time
1763
# When not using gcc, we currently assume that we are using
1764
# Microsoft Visual C++.
1765
if test "$GCC" != yes; then
1775
if test "$with_gnu_ld" = yes; then
1776
# If archive_cmds runs LD, not CC, wlarc should be empty
1779
# See if GNU ld supports shared libraries.
1781
aix3* | aix4* | aix5*)
1782
# On AIX, the GNU linker is very broken
1783
# Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
1787
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
1788
*** to be unable to reliably create shared libraries on AIX.
1789
*** Therefore, libtool is disabling shared libraries support. If you
1790
*** really care for shared libraries, you may want to modify your PATH
1791
*** so that a non-GNU linker is found, and then restart.
1797
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)'
1798
hardcode_libdir_flag_spec='-L$libdir'
1799
hardcode_minus_L=yes
1801
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
1802
# that the semantics of dynamic libraries on AmigaOS, at least up
1803
# to version 4, is to share data among multiple programs linked
1804
# with the same dynamic library. Since this doesn't match the
1805
# behavior of shared libraries on other platforms, we can use
1811
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1812
allow_undefined_flag=unsupported
1813
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
1814
# support --undefined. This deserves some investigation. FIXME
1815
archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1821
cygwin* | mingw* | pw32*)
1822
# hardcode_libdir_flag_spec is actually meaningless, as there is
1823
# no search path for DLLs.
1824
hardcode_libdir_flag_spec='-L$libdir'
1825
allow_undefined_flag=unsupported
1826
always_export_symbols=yes
1828
extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
1829
sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
1830
test -f $output_objdir/impgen.exe || (cd $output_objdir && \
1831
if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
1832
else $CC -o impgen impgen.c ; fi)~
1833
$output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
1835
old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
1837
# cygwin and mingw dlls have different entry points and sets of symbols
1839
# FIXME: what about values for MSVC?
1840
dll_entry=__cygwin_dll_entry@12
1841
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
1845
dll_entry=_DllMainCRTStartup@12
1846
dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
1850
# mingw and cygwin differ, and it's simplest to just exclude the union
1851
# of the two symbol sets.
1852
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
1854
# recent cygwin and mingw systems supply a stub DllMain which the user
1855
# can override, but on older systems we have to supply one (in ltdll.c)
1856
if test "x$lt_cv_need_dllmain" = "xyes"; then
1857
ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
1858
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~
1859
test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
1865
# Extract the symbol export list from an `--export-all' def file,
1866
# then regenerate the def file from the symbol export list, so that
1867
# the compiled dll only exports the symbol export list.
1868
# Be careful not to strip the DATA tag left be newer dlltools.
1869
export_symbols_cmds="$ltdll_cmds"'
1870
$DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
1871
sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
1873
# If the export-symbols file already is a .def file (1st line
1874
# is EXPORTS), use it as is.
1875
# If DATA tags from a recent dlltool are present, honour them!
1876
archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
1877
cp $export_symbols $output_objdir/$soname-def;
1879
echo EXPORTS > $output_objdir/$soname-def;
1881
cat $export_symbols | while read symbol; do
1884
2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
1885
*) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
1887
_lt_hint=`expr 1 + \$_lt_hint`;
1891
$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~
1892
$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~
1893
$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~
1894
$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~
1895
$CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
1899
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1900
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
1903
archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1904
archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1909
if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
1913
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
1914
*** create shared libraries on Solaris systems. Therefore, libtool
1915
*** is disabling shared libraries support. We urge you to upgrade GNU
1916
*** binutils to release 2.9.1 or newer. Another option is to modify
1917
*** your PATH or compiler configuration so that the native linker is
1918
*** used, and then restart.
1921
elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1922
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1923
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1930
archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
1933
hardcode_shlibpath_var=no
1937
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1938
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1939
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1946
if test "$ld_shlibs" = yes; then
1947
runpath_var=LD_RUN_PATH
1948
hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
1949
export_dynamic_flag_spec='${wl}--export-dynamic'
1951
cygwin* | mingw* | pw32*)
1952
# dlltool doesn't understand --whole-archive et. al.
1953
whole_archive_flag_spec=
1956
# ancient GNU ld didn't support --whole-archive et. al.
1957
if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
1958
whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
1960
whole_archive_flag_spec=
1176
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1181
AC_DEFUN([AC_LIBTOOL_OBJDIR],
1182
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1183
[rm -f .libs 2>/dev/null
1184
mkdir .libs 2>/dev/null
1185
if test -d .libs; then
1966
# PORTME fill in a description of your system's linker (not GNU ld)
1969
allow_undefined_flag=unsupported
1970
always_export_symbols=yes
1971
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'
1972
# Note: this linker hardcodes the directories in LIBPATH if there
1973
# are no directories specified by -L.
1974
hardcode_minus_L=yes
1975
if test "$GCC" = yes && test -z "$link_static_flag"; then
1976
# Neither direct hardcoding nor static linking is supported with a
1978
hardcode_direct=unsupported
1983
if test "$host_cpu" = ia64; then
1984
# On IA64, the linker does run time linking by default, so we don't
1985
# have to do anything special.
1986
aix_use_runtimelinking=no
1987
exp_sym_flag='-Bexport'
1990
aix_use_runtimelinking=no
1992
# Test if we are trying to use run time linking or normal
1993
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
1994
# need to do runtime linking.
1995
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
1996
for ld_flag in $LDFLAGS; do
1997
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
1998
aix_use_runtimelinking=yes
2004
exp_sym_flag='-bexport'
2005
no_entry_flag='-bnoentry'
2008
# When large executables or shared objects are built, AIX ld can
2009
# have problems creating the table of contents. If linking a library
2010
# or program results in "error TOC overflow" add -mminimal-toc to
2011
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
2012
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2016
hardcode_libdir_separator=':'
2017
if test "$GCC" = yes; then
2018
case $host_os in aix4.[[012]]|aix4.[[012]].*)
2019
collect2name=`${CC} -print-prog-name=collect2`
2020
if test -f "$collect2name" && \
2021
strings "$collect2name" | grep resolve_lib_name >/dev/null
2023
# We have reworked collect2
2026
# We have old collect2
2027
hardcode_direct=unsupported
2028
# It fails to find uninstalled libraries when the uninstalled
2029
# path is not listed in the libpath. Setting hardcode_minus_L
2030
# to unsupported forces relinking
2031
hardcode_minus_L=yes
2032
hardcode_libdir_flag_spec='-L$libdir'
2033
hardcode_libdir_separator=
2037
shared_flag='-shared'
2040
if test "$host_cpu" = ia64; then
2041
shared_flag='${wl}-G'
2043
if test "$aix_use_runtimelinking" = yes; then
2044
shared_flag='${wl}-G'
2046
shared_flag='${wl}-bM:SRE'
2051
# It seems that -bexpall can do strange things, so it is better to
2052
# generate a list of symbols to export.
2053
always_export_symbols=yes
2054
if test "$aix_use_runtimelinking" = yes; then
2055
# Warning - without using the other runtime loading flags (-brtl),
2056
# -berok will link without error, but may produce a broken library.
2057
allow_undefined_flag='-berok'
2058
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
2059
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"
2061
if test "$host_cpu" = ia64; then
2062
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
2063
allow_undefined_flag="-z nodefs"
2064
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"
2066
hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
2067
# Warning - without using the other run time loading flags,
2068
# -berok will link without error, but may produce a broken library.
2069
allow_undefined_flag='${wl}-berok'
2070
# This is a bit strange, but is similar to how AIX traditionally builds
2071
# it's shared libraries.
2072
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'
2078
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)'
2079
hardcode_libdir_flag_spec='-L$libdir'
2080
hardcode_minus_L=yes
2081
# see comment about different semantics on the GNU ld section
2085
cygwin* | mingw* | pw32*)
2086
# When not using gcc, we currently assume that we are using
2087
# Microsoft Visual C++.
2088
# hardcode_libdir_flag_spec is actually meaningless, as there is
2089
# no search path for DLLs.
2090
hardcode_libdir_flag_spec=' '
2091
allow_undefined_flag=unsupported
2092
# Tell ltmain to make .lib files, not .a files.
2094
# FIXME: Setting linknames here is a bad hack.
2095
archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
2096
# The linker will automatically build a .lib file if we build a DLL.
2097
old_archive_from_new_cmds='true'
2098
# FIXME: Should let the user specify the lib program.
2099
old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
2100
fix_srcfile_path='`cygpath -w "$srcfile"`'
2103
darwin* | rhapsody*)
2105
rhapsody* | darwin1.[[012]])
2106
allow_undefined_flag='-undefined suppress'
2109
allow_undefined_flag='-flat_namespace -undefined suppress'
2112
# FIXME: Relying on posixy $() will cause problems for
2113
# cross-compilation, but unfortunately the echo tests do not
2114
# yet detect zsh echo's removal of \ escapes.
2115
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'
2116
# We need to add '_' to the symbols in $export_symbols first
2117
#archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
2119
hardcode_shlibpath_var=no
2120
whole_archive_flag_spec='-all_load $convenience'
2127
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
2128
# support. Future versions do this automatically, but an explicit c++rt0.o
2129
# does not break anything, and helps significantly (at the cost of a little
2132
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
2133
hardcode_libdir_flag_spec='-R$libdir'
2135
hardcode_shlibpath_var=no
2138
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
2140
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2142
hardcode_minus_L=yes
2143
hardcode_shlibpath_var=no
2146
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
2148
archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
2149
hardcode_libdir_flag_spec='-R$libdir'
2151
hardcode_shlibpath_var=no
2154
hpux9* | hpux10* | hpux11*)
2156
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' ;;
2157
*) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
2159
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
2160
hardcode_libdir_separator=:
2162
hardcode_minus_L=yes # Not in the search PATH, but as the default
2163
# location of the library.
2164
export_dynamic_flag_spec='${wl}-E'
2168
if test "$GCC" = yes; then
2169
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'
2171
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'
2173
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2174
hardcode_libdir_separator=:
2175
link_all_deplibs=yes
2179
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2180
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
2182
archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
2184
hardcode_libdir_flag_spec='-R$libdir'
2186
hardcode_shlibpath_var=no
2190
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2192
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2193
hardcode_libdir_separator=:
2194
hardcode_shlibpath_var=no
2199
hardcode_shlibpath_var=no
2200
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2201
archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
2202
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2203
export_dynamic_flag_spec='${wl}-E'
2206
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
2207
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2208
hardcode_libdir_flag_spec='-R$libdir'
2211
archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
2212
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2219
hardcode_libdir_flag_spec='-L$libdir'
2220
hardcode_minus_L=yes
2221
allow_undefined_flag=unsupported
2222
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'
2223
old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
2227
if test "$GCC" = yes; then
2228
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2229
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'
2231
allow_undefined_flag=' -expect_unresolved \*'
2232
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'
2234
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2235
hardcode_libdir_separator=:
2238
osf4* | osf5*) # as osf3* with the addition of -msym flag
2239
if test "$GCC" = yes; then
2240
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2241
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'
2242
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2244
allow_undefined_flag=' -expect_unresolved \*'
2245
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'
2246
archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
2247
$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'
2249
#Both c and cxx compiler support -rpath directly
2250
hardcode_libdir_flag_spec='-rpath $libdir'
2252
hardcode_libdir_separator=:
2256
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2257
hardcode_shlibpath_var=no
2258
runpath_var=LD_RUN_PATH
2259
hardcode_runpath_var=yes
2260
export_dynamic_flag_spec='${wl}-Bexport'
2264
# gcc --version < 3.0 without binutils cannot create self contained
2265
# shared libraries reliably, requiring libgcc.a to resolve some of
2266
# the object symbols generated in some cases. Libraries that use
2267
# assert need libgcc.a to resolve __eprintf, for example. Linking
2268
# a copy of libgcc.a into every shared library to guarantee resolving
2269
# such symbols causes other problems: According to Tim Van Holder
2270
# <tim.van.holder@pandora.be>, C++ libraries end up with a separate
2271
# (to the application) exception stack for one thing.
2272
no_undefined_flag=' -z defs'
2273
if test "$GCC" = yes; then
2274
case `$CC --version 2>/dev/null` in
2278
*** Warning: Releases of GCC earlier than version 3.0 cannot reliably
2279
*** create self contained shared libraries on Solaris systems, without
2280
*** introducing a dependency on libgcc.a. Therefore, libtool is disabling
2281
*** -no-undefined support, which will at least allow you to build shared
2282
*** libraries. However, you may find that when you link such libraries
2283
*** into an application without using GCC, you have to manually add
2284
*** \`gcc --print-libgcc-file-name\` to the link command. We urge you to
2285
*** upgrade to a newer version of GCC. Another option is to rebuild your
2286
*** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
2293
# $CC -shared without GNU ld will not create a library from C++
2294
# object files and a static libstdc++, better avoid it by now
2295
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2296
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2297
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2298
hardcode_libdir_flag_spec='-R$libdir'
2299
hardcode_shlibpath_var=no
2301
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
2302
*) # Supported since Solaris 2.6 (maybe 2.5.1?)
2303
whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
2305
link_all_deplibs=yes
2309
if test "x$host_vendor" = xsequent; then
2310
# Use $CC to link under sequent, because it throws in some extra .o
2311
# files that make .init and .fini sections work.
2312
archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
2314
archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
2316
hardcode_libdir_flag_spec='-L$libdir'
2318
hardcode_minus_L=yes
2319
hardcode_shlibpath_var=no
2323
if test "x$host_vendor" = xsno; then
2324
archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
2325
hardcode_direct=yes # is this really true???
2327
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2328
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
2330
runpath_var='LD_RUN_PATH'
2331
hardcode_shlibpath_var=no
2335
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2336
hardcode_shlibpath_var=no
2337
export_dynamic_flag_spec='-Bexport'
2341
no_undefined_flag=' -z text'
2342
# $CC -shared without GNU ld will not create a library from C++
2343
# object files and a static libstdc++, better avoid it by now
2344
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2345
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2346
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2347
hardcode_libdir_flag_spec=
2348
hardcode_shlibpath_var=no
2349
runpath_var='LD_RUN_PATH'
2353
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2354
hardcode_libdir_flag_spec='-L$libdir'
2355
hardcode_shlibpath_var=no
2359
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2360
hardcode_libdir_flag_spec='-L$libdir'
2361
hardcode_shlibpath_var=no
2365
if test -d /usr/nec; then
2366
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2367
hardcode_shlibpath_var=no
2368
runpath_var=LD_RUN_PATH
2369
hardcode_runpath_var=yes
2375
archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2378
hardcode_shlibpath_var=no
2379
hardcode_runpath_var=yes
2380
runpath_var=LD_RUN_PATH
2383
sysv5uw7* | unixware7*)
2384
no_undefined_flag='${wl}-z ${wl}text'
2385
if test "$GCC" = yes; then
2386
archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2388
archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2390
runpath_var='LD_RUN_PATH'
2391
hardcode_shlibpath_var=no
1188
# MS-DOS does not allow filenames that begin with a dot.
2399
AC_MSG_RESULT([$ld_shlibs])
2400
test "$ld_shlibs" = no && can_build_shared=no
1191
rmdir .libs 2>/dev/null])
1192
objdir=$lt_cv_objdir
1193
])# AC_LIBTOOL_OBJDIR
1196
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1197
# ----------------------------------------------
2402
1198
# Check hardcoding attributes.
2403
AC_MSG_CHECKING([how to hardcode library paths into programs])
2405
if test -n "$hardcode_libdir_flag_spec" || \
2406
test -n "$runpath_var"; then
1199
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1200
[AC_MSG_CHECKING([how to hardcode library paths into programs])
1201
_LT_AC_TAGVAR(hardcode_action, $1)=
1202
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1203
test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
1204
test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
2408
1206
# We can hardcode non-existant directories.
2409
if test "$hardcode_direct" != no &&
1207
if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
2410
1208
# If the only mechanism to avoid hardcoding is shlibpath_var, we
2411
1209
# have to relink, otherwise we might link with an installed library
2412
1210
# when we should be linking with a yet-to-be-installed one
2413
## test "$hardcode_shlibpath_var" != no &&
2414
test "$hardcode_minus_L" != no; then
1211
## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1212
test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
2415
1213
# Linking always hardcodes the temporary library directory.
2416
hardcode_action=relink
1214
_LT_AC_TAGVAR(hardcode_action, $1)=relink
2418
1216
# We can link without hardcoding, and we can hardcode nonexisting dirs.
2419
hardcode_action=immediate
1217
_LT_AC_TAGVAR(hardcode_action, $1)=immediate
2422
1220
# We cannot hardcode anything, or else we can only hardcode existing
2424
hardcode_action=unsupported
2426
AC_MSG_RESULT([$hardcode_action])
1222
_LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1224
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1226
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1227
# Fast installation is not supported
1228
enable_fast_install=no
1229
elif test "$shlibpath_overrides_runpath" = yes ||
1230
test "$enable_shared" = no; then
1231
# Fast installation is not necessary
1232
enable_fast_install=needless
1234
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1237
# AC_LIBTOOL_SYS_LIB_STRIP
1238
# ------------------------
1239
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
2430
1242
AC_MSG_CHECKING([whether stripping libraries is possible])
2431
1243
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2808
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2809
soname_spec='${libname}${release}.so$major'
2810
shlibpath_var=LD_LIBRARY_PATH
2817
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2818
soname_spec='${libname}${release}.so$major'
2819
shlibpath_var=LD_LIBRARY_PATH
2823
1807
if test -d /usr/nec ;then
2824
1808
version_type=linux
2825
library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
2826
soname_spec='$libname.so.$major'
1809
library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
1810
soname_spec='$libname${shared_ext}.$major'
2827
1811
shlibpath_var=LD_LIBRARY_PATH
1817
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1818
soname_spec='${libname}${release}${shared_ext}$major'
1819
shlibpath_var=LD_LIBRARY_PATH
2832
1823
dynamic_linker=no
2835
1826
AC_MSG_RESULT([$dynamic_linker])
2836
1827
test "$dynamic_linker" = no && can_build_shared=no
2838
# Report the final consequences.
1828
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1833
AC_DEFUN([_LT_AC_TAGCONFIG],
1834
[AC_ARG_WITH([tags],
1835
[AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
1836
[include additional configurations @<:@automatic@:>@])],
1837
[tagnames="$withval"])
1839
if test -f "$ltmain" && test -n "$tagnames"; then
1840
if test ! -f "${ofile}"; then
1841
AC_MSG_WARN([output file `$ofile' does not exist])
1844
if test -z "$LTCC"; then
1845
eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
1846
if test -z "$LTCC"; then
1847
AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
1849
AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
1853
# Extract list of available tagged configurations in $ofile.
1854
# Note that this assumes the entire list is on one line.
1855
available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
1857
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1858
for tagname in $tagnames; do
1860
# Check whether tagname contains only valid characters
1861
case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
1863
*) AC_MSG_ERROR([invalid tag name: $tagname])
1867
if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
1869
AC_MSG_ERROR([tag name \"$tagname\" already exists])
1872
# Update the list of available tags.
1873
if test -n "$tagname"; then
1874
echo appending configuration tag \"$tagname\" to $ofile
1878
if test -n "$CXX" && test "X$CXX" != "Xno"; then
1879
AC_LIBTOOL_LANG_CXX_CONFIG
1886
if test -n "$F77" && test "X$F77" != "Xno"; then
1887
AC_LIBTOOL_LANG_F77_CONFIG
1894
if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
1895
AC_LIBTOOL_LANG_GCJ_CONFIG
1902
AC_LIBTOOL_LANG_RC_CONFIG
1906
AC_MSG_ERROR([Unsupported tag name: $tagname])
1910
# Append the new tag name to the list of available tags.
1911
if test -n "$tagname" ; then
1912
available_tags="$available_tags $tagname"
1918
# Now substitute the updated list of available tags.
1919
if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
1920
mv "${ofile}T" "$ofile"
1924
AC_MSG_ERROR([unable to update list of available tagged configurations.])
1927
])# _LT_AC_TAGCONFIG
1932
# enable checks for dlopen support
1933
AC_DEFUN([AC_LIBTOOL_DLOPEN],
1934
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
1935
])# AC_LIBTOOL_DLOPEN
1938
# AC_LIBTOOL_WIN32_DLL
1939
# --------------------
1940
# declare package support for building win32 dll's
1941
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
1942
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
1943
])# AC_LIBTOOL_WIN32_DLL
1946
# AC_ENABLE_SHARED([DEFAULT])
1947
# ---------------------------
1948
# implement the --enable-shared flag
1949
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1950
AC_DEFUN([AC_ENABLE_SHARED],
1951
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
1952
AC_ARG_ENABLE([shared],
1953
[AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
1954
[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
1955
[p=${PACKAGE-default}
1957
yes) enable_shared=yes ;;
1958
no) enable_shared=no ;;
1961
# Look at the argument we got. We use all the common list separators.
1962
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1963
for pkg in $enableval; do
1965
if test "X$pkg" = "X$p"; then
1972
[enable_shared=]AC_ENABLE_SHARED_DEFAULT)
1973
])# AC_ENABLE_SHARED
1978
#- set the default shared flag to --disable-shared
1979
AC_DEFUN([AC_DISABLE_SHARED],
1980
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1981
AC_ENABLE_SHARED(no)
1982
])# AC_DISABLE_SHARED
1985
# AC_ENABLE_STATIC([DEFAULT])
1986
# ---------------------------
1987
# implement the --enable-static flag
1988
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1989
AC_DEFUN([AC_ENABLE_STATIC],
1990
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
1991
AC_ARG_ENABLE([static],
1992
[AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
1993
[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
1994
[p=${PACKAGE-default}
1996
yes) enable_static=yes ;;
1997
no) enable_static=no ;;
2000
# Look at the argument we got. We use all the common list separators.
2001
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2002
for pkg in $enableval; do
2004
if test "X$pkg" = "X$p"; then
2011
[enable_static=]AC_ENABLE_STATIC_DEFAULT)
2012
])# AC_ENABLE_STATIC
2017
# set the default static flag to --disable-static
2018
AC_DEFUN([AC_DISABLE_STATIC],
2019
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2020
AC_ENABLE_STATIC(no)
2021
])# AC_DISABLE_STATIC
2024
# AC_ENABLE_FAST_INSTALL([DEFAULT])
2025
# ---------------------------------
2026
# implement the --enable-fast-install flag
2027
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2028
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2029
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2030
AC_ARG_ENABLE([fast-install],
2031
[AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2032
[optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2033
[p=${PACKAGE-default}
2035
yes) enable_fast_install=yes ;;
2036
no) enable_fast_install=no ;;
2038
enable_fast_install=no
2039
# Look at the argument we got. We use all the common list separators.
2040
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2041
for pkg in $enableval; do
2043
if test "X$pkg" = "X$p"; then
2044
enable_fast_install=yes
2050
[enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2051
])# AC_ENABLE_FAST_INSTALL
2054
# AC_DISABLE_FAST_INSTALL
2055
# -----------------------
2056
# set the default to --disable-fast-install
2057
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2058
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2059
AC_ENABLE_FAST_INSTALL(no)
2060
])# AC_DISABLE_FAST_INSTALL
2063
# AC_LIBTOOL_PICMODE([MODE])
2064
# --------------------------
2065
# implement the --with-pic flag
2066
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
2067
AC_DEFUN([AC_LIBTOOL_PICMODE],
2068
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2069
pic_mode=ifelse($#,1,$1,default)
2070
])# AC_LIBTOOL_PICMODE
2075
# This is predefined starting with Autoconf 2.54, so this conditional
2076
# definition can be removed once we require Autoconf 2.54 or later.
2077
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2078
[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2079
[if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2080
then ac_cv_prog_egrep='grep -E'
2081
else ac_cv_prog_egrep='egrep'
2083
EGREP=$ac_cv_prog_egrep
2088
# AC_PATH_TOOL_PREFIX
2089
# -------------------
2090
# find a file program which can recognise shared library
2091
AC_DEFUN([AC_PATH_TOOL_PREFIX],
2092
[AC_REQUIRE([AC_PROG_EGREP])dnl
2093
AC_MSG_CHECKING([for $1])
2094
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2096
[[\\/*] | ?:[\\/]*])
2097
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2100
lt_save_MAGIC_CMD="$MAGIC_CMD"
2101
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2102
dnl $ac_dummy forces splitting on constant user-supplied paths.
2103
dnl POSIX.2 word splitting is done only on the output of word expansions,
2104
dnl not every word. This closes a longstanding sh security hole.
2105
ac_dummy="ifelse([$2], , $PATH, [$2])"
2106
for ac_dir in $ac_dummy; do
2108
test -z "$ac_dir" && ac_dir=.
2109
if test -f $ac_dir/$1; then
2110
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2111
if test -n "$file_magic_test_file"; then
2112
case $deplibs_check_method in
2114
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2115
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2116
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2117
$EGREP "$file_magic_regex" > /dev/null; then
2122
*** Warning: the command libtool uses to detect shared libraries,
2123
*** $file_magic_cmd, produces output that libtool cannot recognize.
2124
*** The result is that libtool may fail to recognize shared libraries
2125
*** as such. This will affect the creation of libtool libraries that
2126
*** depend on shared libraries, but programs linked with such libtool
2127
*** libraries will work regardless of this problem. Nevertheless, you
2128
*** may want to report the problem to your system manager and/or to
2129
*** bug-libtool@gnu.org
2139
MAGIC_CMD="$lt_save_MAGIC_CMD"
2142
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2143
if test -n "$MAGIC_CMD"; then
2144
AC_MSG_RESULT($MAGIC_CMD)
2148
])# AC_PATH_TOOL_PREFIX
2153
# find a file program which can recognise a shared library
2154
AC_DEFUN([AC_PATH_MAGIC],
2155
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2156
if test -z "$lt_cv_path_MAGIC_CMD"; then
2157
if test -n "$ac_tool_prefix"; then
2158
AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2168
# find the pathname to the GNU or non-GNU linker
2169
AC_DEFUN([AC_PROG_LD],
2170
[AC_ARG_WITH([gnu-ld],
2171
[AC_HELP_STRING([--with-gnu-ld],
2172
[assume the C compiler uses GNU ld @<:@default=no@:>@])],
2173
[test "$withval" = no || with_gnu_ld=yes],
2175
AC_REQUIRE([LT_AC_PROG_SED])dnl
2176
AC_REQUIRE([AC_PROG_CC])dnl
2177
AC_REQUIRE([AC_CANONICAL_HOST])dnl
2178
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2180
if test "$GCC" = yes; then
2181
# Check if gcc -print-prog-name=ld gives a path.
2182
AC_MSG_CHECKING([for ld used by $CC])
2185
# gcc leaves a trailing carriage return which upsets mingw
2186
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2188
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2191
# Accept absolute paths.
2192
[[\\/]]* | ?:[[\\/]]*)
2193
re_direlt='/[[^/]][[^/]]*/\.\./'
2194
# Canonicalize the pathname of ld
2195
ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2196
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2197
ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2199
test -z "$LD" && LD="$ac_prog"
2202
# If it fails, then pretend we aren't using GCC.
2206
# If it is relative, then search for the first ld in PATH.
2210
elif test "$with_gnu_ld" = yes; then
2211
AC_MSG_CHECKING([for GNU ld])
2213
AC_MSG_CHECKING([for non-GNU ld])
2215
AC_CACHE_VAL(lt_cv_path_LD,
2216
[if test -z "$LD"; then
2217
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2218
for ac_dir in $PATH; do
2220
test -z "$ac_dir" && ac_dir=.
2221
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2222
lt_cv_path_LD="$ac_dir/$ac_prog"
2223
# Check to see if the program is GNU ld. I'd rather use --version,
2224
# but apparently some GNU ld's only accept -v.
2225
# Break only if it was the GNU/non-GNU ld that we prefer.
2226
case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2227
*GNU* | *'with BFD'*)
2228
test "$with_gnu_ld" != no && break
2231
test "$with_gnu_ld" != yes && break
2238
lt_cv_path_LD="$LD" # Let the user override the test with a path.
2241
if test -n "$LD"; then
2246
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2253
AC_DEFUN([AC_PROG_LD_GNU],
2254
[AC_REQUIRE([AC_PROG_EGREP])dnl
2255
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2256
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
2257
case `$LD -v 2>&1 </dev/null` in
2258
*GNU* | *'with BFD'*)
2259
lt_cv_prog_gnu_ld=yes
2262
lt_cv_prog_gnu_ld=no
2265
with_gnu_ld=$lt_cv_prog_gnu_ld
2269
# AC_PROG_LD_RELOAD_FLAG
2270
# ----------------------
2271
# find reload flag for linker
2272
# -- PORTME Some linkers may need a different reload flag.
2273
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2274
[AC_CACHE_CHECK([for $LD option to reload object files],
2275
lt_cv_ld_reload_flag,
2276
[lt_cv_ld_reload_flag='-r'])
2277
reload_flag=$lt_cv_ld_reload_flag
2278
case $reload_flag in
2280
*) reload_flag=" $reload_flag" ;;
2282
reload_cmds='$LD$reload_flag -o $output$reload_objs'
2283
])# AC_PROG_LD_RELOAD_FLAG
2286
# AC_DEPLIBS_CHECK_METHOD
2287
# -----------------------
2288
# how to check for library dependencies
2289
# -- PORTME fill in with the dynamic library characteristics
2290
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2291
[AC_CACHE_CHECK([how to recognise dependent libraries],
2292
lt_cv_deplibs_check_method,
2293
[lt_cv_file_magic_cmd='$MAGIC_CMD'
2294
lt_cv_file_magic_test_file=
2295
lt_cv_deplibs_check_method='unknown'
2296
# Need to set the preceding variable on all platforms that support
2297
# interlibrary dependencies.
2298
# 'none' -- dependencies not supported.
2299
# `unknown' -- same as none, but documents that we really don't know.
2300
# 'pass_all' -- all dependencies passed with no checks.
2301
# 'test_compile' -- check by making test program.
2302
# 'file_magic [[regex]]' -- check by looking for files in library path
2303
# which responds to the $file_magic_cmd with a given extended regex.
2304
# If you have `file' or equivalent on your system and you're not sure
2305
# whether `pass_all' will *always* work, you probably want this one.
2309
lt_cv_deplibs_check_method=pass_all
2313
lt_cv_deplibs_check_method=pass_all
2317
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2318
lt_cv_file_magic_cmd='/usr/bin/file -L'
2319
lt_cv_file_magic_test_file=/shlib/libc.so
2323
# func_win32_libid is a shell function defined in ltmain.sh
2324
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2325
lt_cv_file_magic_cmd='func_win32_libid'
2329
# Base MSYS/MinGW do not provide the 'file' command needed by
2330
# func_win32_libid shell function, so use a weaker test based on 'objdump'.
2331
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2332
lt_cv_file_magic_cmd='$OBJDUMP -f'
2335
darwin* | rhapsody*)
2336
lt_cv_deplibs_check_method=pass_all
2339
freebsd* | kfreebsd*-gnu)
2340
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2343
# Not sure whether the presence of OpenBSD here was a mistake.
2344
# Let's accept both of them until this is cleared up.
2345
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
2346
lt_cv_file_magic_cmd=/usr/bin/file
2347
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2351
lt_cv_deplibs_check_method=pass_all
2356
lt_cv_deplibs_check_method=pass_all
2359
hpux10.20* | hpux11*)
2360
lt_cv_file_magic_cmd=/usr/bin/file
2363
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2364
lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2367
[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]']
2368
lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
2371
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2372
lt_cv_file_magic_test_file=/usr/lib/libc.sl
2377
irix5* | irix6* | nonstopux*)
2379
*-32|*"-32 ") libmagic=32-bit;;
2380
*-n32|*"-n32 ") libmagic=N32;;
2381
*-64|*"-64 ") libmagic=64-bit;;
2382
*) libmagic=never-match;;
2384
lt_cv_deplibs_check_method=pass_all
2387
# This must be Linux ELF.
2390
alpha*|hppa*|i*86|ia64*|m68*|mips*|powerpc*|sparc*|s390*|sh*|x86_64*)
2391
lt_cv_deplibs_check_method=pass_all ;;
2393
# glibc up to 2.1.1 does not perform some relocations on ARM
2394
# this will be overridden with pass_all, but let us keep it just in case
2395
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
2397
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
2398
lt_cv_deplibs_check_method=pass_all
2402
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2403
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2405
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2410
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2411
lt_cv_file_magic_cmd=/usr/bin/file
2412
lt_cv_file_magic_test_file=/usr/lib/libnls.so
2416
lt_cv_deplibs_check_method=unknown
2420
lt_cv_file_magic_cmd=/usr/bin/file
2421
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2422
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2423
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
2425
lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
2429
osf3* | osf4* | osf5*)
2430
lt_cv_deplibs_check_method=pass_all
2434
lt_cv_deplibs_check_method=pass_all
2438
lt_cv_deplibs_check_method=pass_all
2441
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2442
case $host_vendor in
2444
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]]'
2445
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2448
lt_cv_deplibs_check_method=pass_all
2451
lt_cv_file_magic_cmd='/bin/file'
2452
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2455
lt_cv_file_magic_cmd='/bin/file'
2456
lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2457
lt_cv_file_magic_test_file=/lib/libc.so
2460
lt_cv_deplibs_check_method=pass_all
2465
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
2466
lt_cv_deplibs_check_method=pass_all
2470
file_magic_cmd=$lt_cv_file_magic_cmd
2471
deplibs_check_method=$lt_cv_deplibs_check_method
2472
test -z "$deplibs_check_method" && deplibs_check_method=unknown
2473
])# AC_DEPLIBS_CHECK_METHOD
2478
# find the pathname to a BSD-compatible name lister
2479
AC_DEFUN([AC_PROG_NM],
2480
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2481
[if test -n "$NM"; then
2482
# Let the user override the test.
2485
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2486
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2488
test -z "$ac_dir" && ac_dir=.
2489
tmp_nm="$ac_dir/${ac_tool_prefix}nm"
2490
if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2491
# Check to see if the nm accepts a BSD-compat flag.
2492
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
2493
# nm: unknown option "B" ignored
2494
# Tru64's nm complains that /dev/null is an invalid object file
2495
case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2496
*/dev/null* | *'Invalid file or object type'*)
2497
lt_cv_path_NM="$tmp_nm -B"
2501
case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2503
lt_cv_path_NM="$tmp_nm -p"
2507
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2508
continue # so that we can try to find one that supports BSD flags
2515
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2523
# check for math library
2524
AC_DEFUN([AC_CHECK_LIBM],
2525
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2528
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
2529
# These system don't have libm, or don't need it
2532
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2533
AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
2536
AC_CHECK_LIB(m, cos, LIBM="-lm")
2542
# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
2543
# -----------------------------------
2544
# sets LIBLTDL to the link flags for the libltdl convenience library and
2545
# LTDLINCL to the include flags for the libltdl header and adds
2546
# --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
2547
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
2548
# DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
2549
# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
2550
# '${top_srcdir}/' (note the single quotes!). If your package is not
2551
# flat and you're not using automake, define top_builddir and
2552
# top_srcdir appropriately in the Makefiles.
2553
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2554
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2555
case $enable_ltdl_convenience in
2556
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
2557
"") enable_ltdl_convenience=yes
2558
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
2560
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
2561
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2562
# For backwards non-gettext consistent compatibility...
2564
])# AC_LIBLTDL_CONVENIENCE
2567
# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
2568
# -----------------------------------
2569
# sets LIBLTDL to the link flags for the libltdl installable library and
2570
# LTDLINCL to the include flags for the libltdl header and adds
2571
# --enable-ltdl-install to the configure arguments. Note that LIBLTDL
2572
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
2573
# DIRECTORY is not provided and an installed libltdl is not found, it is
2574
# assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
2575
# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
2576
# quotes!). If your package is not flat and you're not using automake,
2577
# define top_builddir and top_srcdir appropriately in the Makefiles.
2578
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2579
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2580
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2581
AC_CHECK_LIB(ltdl, lt_dlinit,
2582
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
2583
[if test x"$enable_ltdl_install" = xno; then
2584
AC_MSG_WARN([libltdl not installed, but installation disabled])
2586
enable_ltdl_install=yes
2589
if test x"$enable_ltdl_install" = x"yes"; then
2590
ac_configure_args="$ac_configure_args --enable-ltdl-install"
2591
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
2592
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2594
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
2598
# For backwards non-gettext consistent compatibility...
2600
])# AC_LIBLTDL_INSTALLABLE
2605
# enable support for C++ libraries
2606
AC_DEFUN([AC_LIBTOOL_CXX],
2607
[AC_REQUIRE([_LT_AC_LANG_CXX])
2613
AC_DEFUN([_LT_AC_LANG_CXX],
2614
[AC_REQUIRE([AC_PROG_CXX])
2615
AC_REQUIRE([AC_PROG_CXXCPP])
2616
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
2622
# enable support for Fortran 77 libraries
2623
AC_DEFUN([AC_LIBTOOL_F77],
2624
[AC_REQUIRE([_LT_AC_LANG_F77])
2630
AC_DEFUN([_LT_AC_LANG_F77],
2631
[AC_REQUIRE([AC_PROG_F77])
2632
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
2638
# enable support for GCJ libraries
2639
AC_DEFUN([AC_LIBTOOL_GCJ],
2640
[AC_REQUIRE([_LT_AC_LANG_GCJ])
2646
AC_DEFUN([_LT_AC_LANG_GCJ],
2647
[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
2648
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
2649
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
2650
[ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
2651
[ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
2652
[AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
2653
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
2659
# enable support for Windows resource files
2660
AC_DEFUN([AC_LIBTOOL_RC],
2661
[AC_REQUIRE([LT_AC_PROG_RC])
2662
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
2666
# AC_LIBTOOL_LANG_C_CONFIG
2667
# ------------------------
2668
# Ensure that the configuration vars for the C compiler are
2669
# suitably defined. Those variables are subsequently used by
2670
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2671
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
2672
AC_DEFUN([_LT_AC_LANG_C_CONFIG],
2676
# Source file extension for C test sources.
2679
# Object file extension for compiled C test sources.
2681
_LT_AC_TAGVAR(objext, $1)=$objext
2683
# Code to be used in simple compile tests
2684
lt_simple_compile_test_code="int some_variable = 0;\n"
2686
# Code to be used in simple link tests
2687
lt_simple_link_test_code='int main(){return(0);}\n'
2692
# Check for any special shared library compilation flags.
2694
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
2695
if test "$GCC" = no; then
2698
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
2702
if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
2703
AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
2704
if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then :
2706
AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
2707
_LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
2713
# Check to make sure the static flag actually works.
2715
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
2716
_LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
2717
$_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
2719
[_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
2722
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
2723
AC_LIBTOOL_PROG_COMPILER_PIC($1)
2724
AC_LIBTOOL_PROG_CC_C_O($1)
2725
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
2726
AC_LIBTOOL_PROG_LD_SHLIBS($1)
2727
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
2728
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
2729
AC_LIBTOOL_SYS_LIB_STRIP
2730
AC_LIBTOOL_DLOPEN_SELF($1)
2732
# Report which librarie types wil actually be built
2839
2733
AC_MSG_CHECKING([if libtool supports shared libraries])
2840
2734
AC_MSG_RESULT([$can_build_shared])
2857
2751
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2858
2752
test "$enable_shared" = yes && enable_static=no
2862
AC_MSG_RESULT([$enable_shared])
2864
AC_MSG_CHECKING([whether to build static libraries])
2865
# Make sure either enable_shared or enable_static is yes.
2866
test "$enable_shared" = yes || enable_static=yes
2867
AC_MSG_RESULT([$enable_static])
2869
if test "$hardcode_action" = relink; then
2870
# Fast installation is not supported
2871
enable_fast_install=no
2872
elif test "$shlibpath_overrides_runpath" = yes ||
2873
test "$enable_shared" = no; then
2874
# Fast installation is not necessary
2875
enable_fast_install=needless
2878
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2879
if test "$GCC" = yes; then
2880
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2883
AC_LIBTOOL_DLOPEN_SELF
2885
if test "$enable_shared" = yes && test "$GCC" = yes; then
2886
case $archive_cmds in
2888
# FIXME: we may have to deal with multi-command sequences.
2891
# Test whether the compiler implicitly links with -lc since on some
2892
# systems, -lgcc has to come before -lc. If gcc already passes -lc
2893
# to ld, don't add -lc before -lgcc.
2894
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
2895
AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
2897
echo 'static int dummy;' > conftest.$ac_ext
2899
if AC_TRY_EVAL(ac_compile); then
2902
libobjs=conftest.$ac_objext
2904
wl=$lt_cv_prog_cc_wl
2910
save_allow_undefined_flag=$allow_undefined_flag
2911
allow_undefined_flag=
2912
if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
2914
lt_cv_archive_cmds_need_lc=no
2916
lt_cv_archive_cmds_need_lc=yes
2918
allow_undefined_flag=$save_allow_undefined_flag
2920
cat conftest.err 1>&5
2922
AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
2926
need_lc=${lt_cv_archive_cmds_need_lc-yes}
2928
# The second clause should only fire when bootstrapping the
2755
darwin* | rhapsody*)
2756
if test "$GCC" = yes; then
2757
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2759
rhapsody* | darwin1.[[012]])
2760
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
2763
if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
2764
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
2766
case ${MACOSX_DEPLOYMENT_TARGET} in
2768
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
2771
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
2777
output_verbose_link_cmd='echo'
2778
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
2779
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
2780
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
2781
_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}'
2782
_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}'
2783
_LT_AC_TAGVAR(hardcode_direct, $1)=no
2784
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
2785
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2786
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
2787
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2789
_LT_AC_TAGVAR(ld_shlibs, $1)=no
2793
AC_MSG_RESULT([$enable_shared])
2795
AC_MSG_CHECKING([whether to build static libraries])
2796
# Make sure either enable_shared or enable_static is yes.
2797
test "$enable_shared" = yes || enable_static=yes
2798
AC_MSG_RESULT([$enable_static])
2800
AC_LIBTOOL_CONFIG($1)
2804
])# AC_LIBTOOL_LANG_C_CONFIG
2807
# AC_LIBTOOL_LANG_CXX_CONFIG
2808
# --------------------------
2809
# Ensure that the configuration vars for the C compiler are
2810
# suitably defined. Those variables are subsequently used by
2811
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2812
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
2813
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
2815
AC_REQUIRE([AC_PROG_CXX])
2816
AC_REQUIRE([AC_PROG_CXXCPP])
2818
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2819
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
2820
_LT_AC_TAGVAR(always_export_symbols, $1)=no
2821
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
2822
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
2823
_LT_AC_TAGVAR(hardcode_direct, $1)=no
2824
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
2825
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
2826
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2827
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
2828
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
2829
_LT_AC_TAGVAR(module_cmds, $1)=
2830
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
2831
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
2832
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
2833
_LT_AC_TAGVAR(no_undefined_flag, $1)=
2834
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2835
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
2837
# Dependencies to place before and after the object being linked:
2838
_LT_AC_TAGVAR(predep_objects, $1)=
2839
_LT_AC_TAGVAR(postdep_objects, $1)=
2840
_LT_AC_TAGVAR(predeps, $1)=
2841
_LT_AC_TAGVAR(postdeps, $1)=
2842
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
2844
# Source file extension for C++ test sources.
2847
# Object file extension for compiled C++ test sources.
2849
_LT_AC_TAGVAR(objext, $1)=$objext
2851
# Code to be used in simple compile tests
2852
lt_simple_compile_test_code="int some_variable = 0;\n"
2854
# Code to be used in simple link tests
2855
lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
2857
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
2860
# Allow CC to be a program name with arguments.
2865
lt_save_with_gnu_ld=$with_gnu_ld
2866
lt_save_path_LD=$lt_cv_path_LD
2867
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
2868
lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
2870
unset lt_cv_prog_gnu_ld
2872
if test -n "${lt_cv_path_LDCXX+set}"; then
2873
lt_cv_path_LD=$lt_cv_path_LDCXX
2877
test -z "${LDCXX+set}" || LD=$LDCXX
2880
_LT_AC_TAGVAR(compiler, $1)=$CC
2881
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
2883
# We don't want -fno-exception wen compiling C++ code, so set the
2884
# no_builtin_flag separately
2885
if test "$GXX" = yes; then
2886
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
2888
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
2891
if test "$GXX" = yes; then
2892
# Set up default GNU C++ configuration
2896
# Check if GNU C++ uses GNU ld as the underlying linker, since the
2897
# archiving commands below assume that GNU ld is being used.
2898
if test "$with_gnu_ld" = yes; then
2899
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
2900
_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'
2902
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
2903
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
2905
# If archive_cmds runs LD, not CC, wlarc should be empty
2906
# XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
2907
# investigate it a little bit more. (MM)
2910
# ancient GNU ld didn't support --whole-archive et. al.
2911
if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
2912
grep 'no-whole-archive' > /dev/null; then
2913
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2915
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2921
# A generic and very simple default shared library creation
2922
# command for GNU C++ for the case where it uses the native
2923
# linker, instead of GNU ld. If possible, this setting should
2924
# overridden to take advantage of the native linker features on
2925
# the platform it is being used on.
2926
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
2929
# Commands to make compiler produce verbose output that lists
2930
# what "hidden" libraries, object files and flags are used when
2931
# linking a shared library.
2932
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
2940
# PORTME: fill in a description of your system's C++ link characteristics
2941
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
2942
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
2945
# FIXME: insert proper C++ library support
2946
_LT_AC_TAGVAR(ld_shlibs, $1)=no
2949
if test "$host_cpu" = ia64; then
2950
# On IA64, the linker does run time linking by default, so we don't
2951
# have to do anything special.
2952
aix_use_runtimelinking=no
2953
exp_sym_flag='-Bexport'
2956
aix_use_runtimelinking=no
2958
# Test if we are trying to use run time linking or normal
2959
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
2960
# need to do runtime linking.
2961
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2962
for ld_flag in $LDFLAGS; do
2965
aix_use_runtimelinking=yes
2972
exp_sym_flag='-bexport'
2973
no_entry_flag='-bnoentry'
2976
# When large executables or shared objects are built, AIX ld can
2977
# have problems creating the table of contents. If linking a library
2978
# or program results in "error TOC overflow" add -mminimal-toc to
2979
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
2980
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2982
_LT_AC_TAGVAR(archive_cmds, $1)=''
2983
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
2984
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
2985
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2987
if test "$GXX" = yes; then
2988
case $host_os in aix4.[012]|aix4.[012].*)
2989
# We only want to do this on AIX 4.2 and lower, the check
2990
# below for broken collect2 doesn't work under 4.3+
2991
collect2name=`${CC} -print-prog-name=collect2`
2992
if test -f "$collect2name" && \
2993
strings "$collect2name" | grep resolve_lib_name >/dev/null
2995
# We have reworked collect2
2996
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
2998
# We have old collect2
2999
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3000
# It fails to find uninstalled libraries when the uninstalled
3001
# path is not listed in the libpath. Setting hardcode_minus_L
3002
# to unsupported forces relinking
3003
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3004
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3005
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3008
shared_flag='-shared'
3011
if test "$host_cpu" = ia64; then
3012
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3013
# chokes on -Wl,-G. The following line is correct:
3016
if test "$aix_use_runtimelinking" = yes; then
3017
shared_flag='${wl}-G'
3019
shared_flag='${wl}-bM:SRE'
3024
# It seems that -bexpall does not export symbols beginning with
3025
# underscore (_), so it is better to generate a list of symbols to export.
3026
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
3027
if test "$aix_use_runtimelinking" = yes; then
3028
# Warning - without using the other runtime loading flags (-brtl),
3029
# -berok will link without error, but may produce a broken library.
3030
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3031
# Determine the default libpath from the value encoded in an empty executable.
3032
_LT_AC_SYS_LIBPATH_AIX
3033
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3035
_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"
3037
if test "$host_cpu" = ia64; then
3038
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3039
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3040
_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"
3042
# Determine the default libpath from the value encoded in an empty executable.
3043
_LT_AC_SYS_LIBPATH_AIX
3044
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3045
# Warning - without using the other run time loading flags,
3046
# -berok will link without error, but may produce a broken library.
3047
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3048
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3049
# -bexpall does not export symbols beginning with underscore (_)
3050
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
3051
# Exported symbols can be pulled into shared objects from archives
3052
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
3053
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3054
# This is similar to how AIX traditionally builds it's shared libraries.
3055
_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'
3060
case $cc_basename in
3062
# FIXME: insert proper C++ library support
3063
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3068
cygwin* | mingw* | pw32*)
3069
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3070
# as there is no search path for DLLs.
3071
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3072
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3073
_LT_AC_TAGVAR(always_export_symbols, $1)=no
3074
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3076
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3077
_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'
3078
# If the export-symbols file already is a .def file (1st line
3079
# is EXPORTS), use it as is; otherwise, prepend...
3080
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3081
cp $export_symbols $output_objdir/$soname.def;
3083
echo EXPORTS > $output_objdir/$soname.def;
3084
cat $export_symbols >> $output_objdir/$soname.def;
3086
$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'
3088
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3092
darwin* | rhapsody*)
3093
if test "$GXX" = yes; then
3094
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3096
rhapsody* | darwin1.[[012]])
3097
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
3100
if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3101
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3103
case ${MACOSX_DEPLOYMENT_TARGET} in
3105
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3108
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
3114
lt_int_apple_cc_single_mod=no
3115
output_verbose_link_cmd='echo'
3116
if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
3117
lt_int_apple_cc_single_mod=yes
3119
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3120
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3122
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -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'
3124
_LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3126
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3127
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3128
_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}'
3130
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -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}'
3132
_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}'
3133
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3134
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3135
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3136
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
3137
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3139
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3144
case $cc_basename in
3146
# FIXME: insert proper C++ library support
3147
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3150
# Green Hills C++ Compiler
3151
# FIXME: insert proper C++ library support
3152
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3155
# FIXME: insert proper C++ library support
3156
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3161
# C++ shared libraries reported to be fairly broken before switch to ELF
3162
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3165
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3167
freebsd* | kfreebsd*-gnu)
3168
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3170
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
3175
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3176
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3177
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3178
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3179
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3180
# but as the default
3181
# location of the library.
3183
case $cc_basename in
3185
# FIXME: insert proper C++ library support
3186
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3189
_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'
3190
# Commands to make compiler produce verbose output that lists
3191
# what "hidden" libraries, object files and flags are used when
3192
# linking a shared library.
3194
# There doesn't appear to be a way to prevent this compiler from
3195
# explicitly linking system object files so we need to strip them
3196
# from the output so that they don't get included in the library
3198
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'
3201
if test "$GXX" = yes; then
3202
_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'
3204
# FIXME: insert proper C++ library support
3205
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3211
if test $with_gnu_ld = no; then
3214
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3215
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
3216
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3219
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3222
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3223
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3224
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3230
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3231
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3234
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3235
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3236
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3237
# but as the default
3238
# location of the library.
3241
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3242
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3243
# but as the default
3244
# location of the library.
3248
case $cc_basename in
3250
# FIXME: insert proper C++ library support
3251
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3256
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3259
_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'
3262
# Commands to make compiler produce verbose output that lists
3263
# what "hidden" libraries, object files and flags are used when
3264
# linking a shared library.
3266
# There doesn't appear to be a way to prevent this compiler from
3267
# explicitly linking system object files so we need to strip them
3268
# from the output so that they don't get included in the library
3270
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'
3273
if test "$GXX" = yes; then
3274
if test $with_gnu_ld = no; then
3277
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3280
_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'
3285
# FIXME: insert proper C++ library support
3286
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3292
case $cc_basename in
3295
_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 ${objdir}/so_locations -o $lib'
3297
# Archives containing C++ object files must be created using
3298
# "CC -ar", where "CC" is the IRIX C++ compiler. This is
3299
# necessary to make sure instantiated templates are included
3301
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3304
if test "$GXX" = yes; then
3305
if test "$with_gnu_ld" = no; then
3306
_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}${objdir}/so_locations -o $lib'
3308
_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'
3311
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3314
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3315
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3318
case $cc_basename in
3320
# Kuck and Associates, Inc. (KAI) C++ Compiler
3322
# KCC will only create a shared library if the output file
3323
# ends with ".so" (or ".sl" for HP-UX), so rename the library
3324
# to its proper name (with version) after linking.
3325
_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'
3326
_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'
3327
# Commands to make compiler produce verbose output that lists
3328
# what "hidden" libraries, object files and flags are used when
3329
# linking a shared library.
3331
# There doesn't appear to be a way to prevent this compiler from
3332
# explicitly linking system object files so we need to strip them
3333
# from the output so that they don't get included in the library
3335
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'
3337
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
3338
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3340
# Archives containing C++ object files must be created using
3341
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
3342
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3347
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3348
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3349
_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'
3350
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3351
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3352
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
3356
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3357
_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'
3359
runpath_var=LD_RUN_PATH
3360
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3361
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3363
# Commands to make compiler produce verbose output that lists
3364
# what "hidden" libraries, object files and flags are used when
3365
# linking a shared library.
3367
# There doesn't appear to be a way to prevent this compiler from
3368
# explicitly linking system object files so we need to strip them
3369
# from the output so that they don't get included in the library
3371
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'
3376
# FIXME: insert proper C++ library support
3377
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3380
# FIXME: insert proper C++ library support
3381
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3384
case $cc_basename in
3386
# FIXME: insert proper C++ library support
3387
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3390
# FIXME: insert proper C++ library support
3391
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3396
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3397
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
3399
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3400
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3401
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3403
# Workaround some broken pre-1.5 toolchains
3404
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
3407
case $cc_basename in
3409
# Kuck and Associates, Inc. (KAI) C++ Compiler
3411
# KCC will only create a shared library if the output file
3412
# ends with ".so" (or ".sl" for HP-UX), so rename the library
3413
# to its proper name (with version) after linking.
3414
_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'
3416
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3417
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3419
# Archives containing C++ object files must be created using
3420
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
3421
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3425
# Rational C++ 2.4.1
3426
# FIXME: insert proper C++ library support
3427
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3430
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3431
_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 ${objdir}/so_locations -o $lib'
3433
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3434
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3436
# Commands to make compiler produce verbose output that lists
3437
# what "hidden" libraries, object files and flags are used when
3438
# linking a shared library.
3440
# There doesn't appear to be a way to prevent this compiler from
3441
# explicitly linking system object files so we need to strip them
3442
# from the output so that they don't get included in the library
3444
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'
3447
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3448
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3449
_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}${objdir}/so_locations -o $lib'
3451
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3452
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3454
# Commands to make compiler produce verbose output that lists
3455
# what "hidden" libraries, object files and flags are used when
3456
# linking a shared library.
3457
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3460
# FIXME: insert proper C++ library support
3461
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3467
case $cc_basename in
3469
# Kuck and Associates, Inc. (KAI) C++ Compiler
3471
# KCC will only create a shared library if the output file
3472
# ends with ".so" (or ".sl" for HP-UX), so rename the library
3473
# to its proper name (with version) after linking.
3474
_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'
3476
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3477
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3479
# Archives containing C++ object files must be created using
3480
# the KAI C++ compiler.
3481
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
3484
# Rational C++ 2.4.1
3485
# FIXME: insert proper C++ library support
3486
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3489
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
3490
_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 ${objdir}/so_locations -o $lib'
3491
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
3492
echo "-hidden">> $lib.exp~
3493
$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 $objdir/so_locations -o $lib~
3496
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3497
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3499
# Commands to make compiler produce verbose output that lists
3500
# what "hidden" libraries, object files and flags are used when
3501
# linking a shared library.
3503
# There doesn't appear to be a way to prevent this compiler from
3504
# explicitly linking system object files so we need to strip them
3505
# from the output so that they don't get included in the library
3507
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'
3510
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3511
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3512
_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}${objdir}/so_locations -o $lib'
3514
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3515
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3517
# Commands to make compiler produce verbose output that lists
3518
# what "hidden" libraries, object files and flags are used when
3519
# linking a shared library.
3520
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3523
# FIXME: insert proper C++ library support
3524
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3530
# FIXME: insert proper C++ library support
3531
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3534
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3535
case $cc_basename in
3537
# FIXME: insert proper C++ library support
3538
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3541
# FIXME: insert proper C++ library support
3542
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3547
case $cc_basename in
3550
# FIXME: insert proper C++ library support
3551
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3555
# FIXME: insert proper C++ library support
3556
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3559
# FIXME: insert proper C++ library support
3560
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3565
case $cc_basename in
3567
# Sun C++ 4.2, 5.x and Centerline C++
3568
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3569
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3570
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3571
$CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3573
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3574
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3576
solaris2.[0-5] | solaris2.[0-5].*) ;;
3578
# The C++ compiler is used as linker so we must use $wl
3579
# flag to pass the commands to the underlying system
3581
# Supported since Solaris 2.6 (maybe 2.5.1?)
3582
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
3585
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3587
# Commands to make compiler produce verbose output that lists
3588
# what "hidden" libraries, object files and flags are used when
3589
# linking a shared library.
3591
# There doesn't appear to be a way to prevent this compiler from
3592
# explicitly linking system object files so we need to strip them
3593
# from the output so that they don't get included in the library
3595
output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3597
# Archives containing C++ object files must be created using
3598
# "CC -xar", where "CC" is the Sun C++ compiler. This is
3599
# necessary to make sure instantiated templates are included
3601
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3604
# Green Hills C++ Compiler
3605
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3607
# The C++ compiler must be used to create the archive.
3608
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
3611
# GNU C++ compiler with Solaris linker
3612
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3613
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
3614
if $CC --version | grep -v '^2\.7' > /dev/null; then
3615
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3616
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3617
$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3619
# Commands to make compiler produce verbose output that lists
3620
# what "hidden" libraries, object files and flags are used when
3621
# linking a shared library.
3622
output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3624
# g++ 2.7 appears to require `-G' NOT `-shared' on this
3626
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3627
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3628
$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3630
# Commands to make compiler produce verbose output that lists
3631
# what "hidden" libraries, object files and flags are used when
3632
# linking a shared library.
3633
output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3636
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
3641
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
3642
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3645
case $cc_basename in
3647
# NonStop-UX NCC 3.20
3648
# FIXME: insert proper C++ library support
3649
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3652
# FIXME: insert proper C++ library support
3653
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3658
# FIXME: insert proper C++ library support
3659
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3662
# FIXME: insert proper C++ library support
3663
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3666
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
3667
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3669
_LT_AC_TAGVAR(GCC, $1)="$GXX"
3670
_LT_AC_TAGVAR(LD, $1)="$LD"
3672
AC_LIBTOOL_POSTDEP_PREDEP($1)
3673
AC_LIBTOOL_PROG_COMPILER_PIC($1)
3674
AC_LIBTOOL_PROG_CC_C_O($1)
3675
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3676
AC_LIBTOOL_PROG_LD_SHLIBS($1)
3677
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3678
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3679
AC_LIBTOOL_SYS_LIB_STRIP
3680
AC_LIBTOOL_DLOPEN_SELF($1)
3682
AC_LIBTOOL_CONFIG($1)
3689
with_gnu_ldcxx=$with_gnu_ld
3690
with_gnu_ld=$lt_save_with_gnu_ld
3691
lt_cv_path_LDCXX=$lt_cv_path_LD
3692
lt_cv_path_LD=$lt_save_path_LD
3693
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
3694
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
3695
])# AC_LIBTOOL_LANG_CXX_CONFIG
3697
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
3698
# ------------------------
3699
# Figure out "hidden" library dependencies from verbose
3700
# compiler output when linking a shared library.
3701
# Parse the compiler output and extract the necessary
3702
# objects, libraries and library flags.
3703
AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
3704
dnl we can't use the lt_simple_compile_test_code here,
3705
dnl because it contains code intended for an executable,
3706
dnl not a library. It's possible we should let each
3707
dnl tag define a new lt_????_link_test_code variable,
3708
dnl but it's only used here...
3709
ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
3711
void foo (void) { a = 0; }
3713
],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
3717
Foo (void) { a = 0; }
3722
],[$1],[F77],[cat > conftest.$ac_ext <<EOF
3730
],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
3733
public void bar (void) {
3739
dnl Parse the compiler output and extract the necessary
3740
dnl objects, libraries and library flags.
3741
if AC_TRY_EVAL(ac_compile); then
3742
# Parse the compiler output and extract the necessary
3743
# objects, libraries and library flags.
3745
# Sentinel used to keep track of whether or not we are before
3746
# the conftest object file.
3747
pre_test_object_deps_done=no
3749
# The `*' in the case matches for architectures that use `case' in
3750
# $output_verbose_cmd can trigger glob expansion during the loop
3751
# eval without this substitution.
3752
output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
3754
for p in `eval $output_verbose_link_cmd`; do
3758
# Some compilers place space between "-{L,R}" and the path.
3761
|| test $p = "-R"; then
3768
if test "$pre_test_object_deps_done" = no; then
3771
# Internal compiler library paths should come after those
3772
# provided the user. The postdeps already come after the
3773
# user supplied libs so there is no need to process them.
3774
if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
3775
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
3777
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
3780
# The "-l" case would never come before the object being
3781
# linked, so don't bother handling this case.
3784
if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
3785
_LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
3787
_LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
3793
# This assumes that the test object file only shows up
3794
# once in the compiler output.
3795
if test "$p" = "conftest.$objext"; then
3796
pre_test_object_deps_done=yes
3800
if test "$pre_test_object_deps_done" = no; then
3801
if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
3802
_LT_AC_TAGVAR(predep_objects, $1)="$p"
3804
_LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
3807
if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
3808
_LT_AC_TAGVAR(postdep_objects, $1)="$p"
3810
_LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
3815
*) ;; # Ignore the rest.
3823
echo "libtool.m4: error: problem compiling $1 test program"
3826
$rm -f confest.$objext
3828
case " $_LT_AC_TAGVAR(postdeps, $1) " in
3829
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
3831
])# AC_LIBTOOL_POSTDEP_PREDEP
3833
# AC_LIBTOOL_LANG_F77_CONFIG
3834
# ------------------------
3835
# Ensure that the configuration vars for the C compiler are
3836
# suitably defined. Those variables are subsequently used by
3837
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3838
AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
3839
AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
3840
[AC_REQUIRE([AC_PROG_F77])
3841
AC_LANG_PUSH(Fortran 77)
3843
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3844
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
3845
_LT_AC_TAGVAR(always_export_symbols, $1)=no
3846
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3847
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3848
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3849
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3850
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3851
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3852
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3853
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
3854
_LT_AC_TAGVAR(module_cmds, $1)=
3855
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
3856
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3857
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3858
_LT_AC_TAGVAR(no_undefined_flag, $1)=
3859
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3860
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3862
# Source file extension for f77 test sources.
3865
# Object file extension for compiled f77 test sources.
3867
_LT_AC_TAGVAR(objext, $1)=$objext
3869
# Code to be used in simple compile tests
3870
lt_simple_compile_test_code=" subroutine t\n return\n end\n"
3872
# Code to be used in simple link tests
3873
lt_simple_link_test_code=" program t\n end\n"
3875
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3878
# Allow CC to be a program name with arguments.
3882
_LT_AC_TAGVAR(compiler, $1)=$CC
3883
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
3885
AC_MSG_CHECKING([if libtool supports shared libraries])
3886
AC_MSG_RESULT([$can_build_shared])
3888
AC_MSG_CHECKING([whether to build shared libraries])
3889
test "$can_build_shared" = "no" && enable_shared=no
3891
# On AIX, shared libraries and static libraries use the same namespace, and
3892
# are all built from PIC.
3895
test "$enable_shared" = yes && enable_static=no
3896
if test -n "$RANLIB"; then
3897
archive_cmds="$archive_cmds~\$RANLIB \$lib"
3898
postinstall_cmds='$RANLIB $lib'
3902
test "$enable_shared" = yes && enable_static=no
3905
AC_MSG_RESULT([$enable_shared])
3907
AC_MSG_CHECKING([whether to build static libraries])
3908
# Make sure either enable_shared or enable_static is yes.
3909
test "$enable_shared" = yes || enable_static=yes
3910
AC_MSG_RESULT([$enable_static])
3912
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3914
_LT_AC_TAGVAR(GCC, $1)="$G77"
3915
_LT_AC_TAGVAR(LD, $1)="$LD"
3917
AC_LIBTOOL_PROG_COMPILER_PIC($1)
3918
AC_LIBTOOL_PROG_CC_C_O($1)
3919
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3920
AC_LIBTOOL_PROG_LD_SHLIBS($1)
3921
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3922
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3923
AC_LIBTOOL_SYS_LIB_STRIP
3926
AC_LIBTOOL_CONFIG($1)
3930
])# AC_LIBTOOL_LANG_F77_CONFIG
3933
# AC_LIBTOOL_LANG_GCJ_CONFIG
3934
# --------------------------
3935
# Ensure that the configuration vars for the C compiler are
3936
# suitably defined. Those variables are subsequently used by
3937
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3938
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
3939
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
3942
# Source file extension for Java test sources.
3945
# Object file extension for compiled Java test sources.
3947
_LT_AC_TAGVAR(objext, $1)=$objext
3949
# Code to be used in simple compile tests
3950
lt_simple_compile_test_code="class foo {}\n"
3952
# Code to be used in simple link tests
3953
lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
3955
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3958
# Allow CC to be a program name with arguments.
3962
_LT_AC_TAGVAR(compiler, $1)=$CC
3964
# GCJ did not exist at the time GCC didn't implicitly link libc in.
3965
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3967
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3968
AC_LIBTOOL_PROG_COMPILER_PIC($1)
3969
AC_LIBTOOL_PROG_CC_C_O($1)
3970
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3971
AC_LIBTOOL_PROG_LD_SHLIBS($1)
3972
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3973
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3974
AC_LIBTOOL_SYS_LIB_STRIP
3975
AC_LIBTOOL_DLOPEN_SELF($1)
3977
AC_LIBTOOL_CONFIG($1)
3981
])# AC_LIBTOOL_LANG_GCJ_CONFIG
3984
# AC_LIBTOOL_LANG_RC_CONFIG
3985
# --------------------------
3986
# Ensure that the configuration vars for the Windows resource compiler are
3987
# suitably defined. Those variables are subsequently used by
3988
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3989
AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
3990
AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
3993
# Source file extension for RC test sources.
3996
# Object file extension for compiled RC test sources.
3998
_LT_AC_TAGVAR(objext, $1)=$objext
4000
# Code to be used in simple compile tests
4001
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
4003
# Code to be used in simple link tests
4004
lt_simple_link_test_code="$lt_simple_compile_test_code"
4006
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4009
# Allow CC to be a program name with arguments.
4013
_LT_AC_TAGVAR(compiler, $1)=$CC
4014
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4016
AC_LIBTOOL_CONFIG($1)
4020
])# AC_LIBTOOL_LANG_RC_CONFIG
4023
# AC_LIBTOOL_CONFIG([TAGNAME])
4024
# ----------------------------
4025
# If TAGNAME is not passed, then create an initial libtool script
4026
# with a default configuration from the untagged config vars. Otherwise
4027
# add code to config.status for appending the configuration named by
4028
# TAGNAME from the matching tagged config vars.
4029
AC_DEFUN([AC_LIBTOOL_CONFIG],
4030
[# The else clause should only fire when bootstrapping the
2929
4031
# libtool distribution, otherwise you forgot to ship ltmain.sh
2930
4032
# with your package, and you will get complaints that there are
2931
4033
# no rules to generate ltmain.sh.
2932
4034
if test -f "$ltmain"; then
2935
# If there is no Makefile yet, we rely on a make rule to execute
2936
# `config.status --recheck' to rerun these tests and create the
2937
# libtool script then.
2938
test -f Makefile && make "$ltmain"
2941
if test -f "$ltmain"; then
2942
trap "$rm \"${ofile}T\"; exit 1" 1 2 15
2945
echo creating $ofile
4035
# See if we are running on zsh, and set the options which allow our commands through
4036
# without removal of \ escapes.
4037
if test -n "${ZSH_VERSION+set}" ; then
4038
setopt NO_GLOB_SUBST
2947
4040
# Now quote all the things that may contain metacharacters while being
2948
4041
# careful not to overquote the AC_SUBSTed values. We take copies of the
2949
4042
# variables and quote the copies for generation of the libtool script.
2950
for var in echo old_CC old_CFLAGS \
2951
AR AR_FLAGS CC LD LN_S NM SHELL \
2952
reload_flag reload_cmds wl \
2953
pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
2954
thread_safe_flag_spec whole_archive_flag_spec libname_spec \
2955
library_names_spec soname_spec \
2956
RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
2957
old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
2958
postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
2959
old_striplib striplib file_magic_cmd export_symbols_cmds \
2960
deplibs_check_method allow_undefined_flag no_undefined_flag \
2961
finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
2962
global_symbol_to_c_name_address \
2963
hardcode_libdir_flag_spec hardcode_libdir_separator \
4043
for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
4045
libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4046
old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4047
deplibs_check_method reload_flag reload_cmds need_locks \
4048
lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4049
lt_cv_sys_global_symbol_to_c_name_address \
2964
4050
sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
2965
compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
4051
old_postinstall_cmds old_postuninstall_cmds \
4052
_LT_AC_TAGVAR(compiler, $1) \
4053
_LT_AC_TAGVAR(CC, $1) \
4054
_LT_AC_TAGVAR(LD, $1) \
4055
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4056
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4057
_LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4058
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4059
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4060
_LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4061
_LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4062
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4063
_LT_AC_TAGVAR(old_archive_cmds, $1) \
4064
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4065
_LT_AC_TAGVAR(predep_objects, $1) \
4066
_LT_AC_TAGVAR(postdep_objects, $1) \
4067
_LT_AC_TAGVAR(predeps, $1) \
4068
_LT_AC_TAGVAR(postdeps, $1) \
4069
_LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4070
_LT_AC_TAGVAR(archive_cmds, $1) \
4071
_LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4072
_LT_AC_TAGVAR(postinstall_cmds, $1) \
4073
_LT_AC_TAGVAR(postuninstall_cmds, $1) \
4074
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4075
_LT_AC_TAGVAR(allow_undefined_flag, $1) \
4076
_LT_AC_TAGVAR(no_undefined_flag, $1) \
4077
_LT_AC_TAGVAR(export_symbols_cmds, $1) \
4078
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4079
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4080
_LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4081
_LT_AC_TAGVAR(hardcode_automatic, $1) \
4082
_LT_AC_TAGVAR(module_cmds, $1) \
4083
_LT_AC_TAGVAR(module_expsym_cmds, $1) \
4084
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4085
_LT_AC_TAGVAR(exclude_expsyms, $1) \
4086
_LT_AC_TAGVAR(include_expsyms, $1); do
2968
reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
4089
_LT_AC_TAGVAR(old_archive_cmds, $1) | \
4090
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4091
_LT_AC_TAGVAR(archive_cmds, $1) | \
4092
_LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4093
_LT_AC_TAGVAR(module_cmds, $1) | \
4094
_LT_AC_TAGVAR(module_expsym_cmds, $1) | \
4095
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4096
_LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4097
extract_expsyms_cmds | reload_cmds | finish_cmds | \
4098
postinstall_cmds | postuninstall_cmds | \
2969
4099
old_postinstall_cmds | old_postuninstall_cmds | \
2970
export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
2971
extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
2972
postinstall_cmds | postuninstall_cmds | \
2973
finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4100
sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
2974
4101
# Double-quote double-evaled strings.
2975
4102
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
3288
cygwin* | mingw* | pw32* | os2*)
3289
cat <<'EOF' >> "${ofile}T"
3290
# This is a source program that is used to create dlls on Windows
3291
# Don't remove nor modify the starting and closing comments
4486
# We use sed instead of cat because bash on DJGPP gets confused if
4487
# if finds mixed CR/LF and LF-only lines. Since sed operates in
4488
# text mode, it properly converts lines to CR/LF. This bash problem
4489
# is reportedly fixed, but why not run on old versions too?
4490
sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
4492
mv -f "$cfgfile" "$ofile" || \
4493
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
4497
# If there is no Makefile yet, we rely on a make rule to execute
4498
# `config.status --recheck' to rerun these tests and create the
4499
# libtool script then.
4500
ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
4501
if test -f "$ltmain_in"; then
4502
test -f Makefile && make "$ltmain"
4505
])# AC_LIBTOOL_CONFIG
4508
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
4509
# -------------------------------------------
4510
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
4511
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
4513
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4515
if test "$GCC" = yes; then
4516
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4518
AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4519
lt_cv_prog_compiler_rtti_exceptions,
4520
[-fno-rtti -fno-exceptions], [],
4521
[_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4523
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
4526
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4527
# ---------------------------------
4528
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
4529
[AC_REQUIRE([AC_CANONICAL_HOST])
4530
AC_REQUIRE([AC_PROG_NM])
4531
AC_REQUIRE([AC_OBJEXT])
4532
# Check for command to grab the raw symbol name followed by C symbol from nm.
4533
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4534
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4536
# These are sane defaults that work on at least a few old systems.
4537
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
4539
# Character class describing NM global symbol codes.
4540
symcode='[[BCDEGRST]]'
4542
# Regexp to match symbols that can be accessed directly from C.
4543
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4545
# Transform the above into a raw symbol and a C symbol.
4546
symxfrm='\1 \2\3 \3'
4548
# Transform an extracted symbol line into a proper C declaration
4549
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
4551
# Transform an extracted symbol line into symbol name and symbol address
4552
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'"
4554
# Define system-specific variables.
4559
cygwin* | mingw* | pw32*)
4560
symcode='[[ABCDGISTW]]'
4562
hpux*) # Its linker distinguishes data from code symbols
4563
if test "$host_cpu" = ia64; then
4564
symcode='[[ABCDEGRST]]'
4566
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4567
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'"
4570
symcode='[[BCDEGRST]]'
4573
symcode='[[BCDEGQRST]]'
4579
symcode='[[DFNSTU]]'
4583
# Handle CRLF in mingw tool chain
4587
opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4591
# If we're using GNU nm, then use its standard symbol codes.
4592
case `$NM -V 2>&1` in
4593
*GNU* | *'with BFD'*)
4594
symcode='[[ABCDGIRSTW]]' ;;
4597
# Try without a prefix undercore, then with it.
4598
for ac_symprfx in "" "_"; do
4600
# Write the raw and C identifiers.
4601
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4603
# Check to see that the pipe works correctly.
4607
cat > conftest.$ac_ext <<EOF
4612
void nm_test_func(){}
4616
int main(){nm_test_var='a';nm_test_func();return(0);}
4619
if AC_TRY_EVAL(ac_compile); then
4620
# Now try to grab the symbols.
4622
if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4623
# Try sorting and uniquifying the output.
4624
if sort "$nlist" | uniq > "$nlist"T; then
4625
mv -f "$nlist"T "$nlist"
4630
# Make sure that we snagged all the symbols we need.
4631
if grep ' nm_test_var$' "$nlist" >/dev/null; then
4632
if grep ' nm_test_func$' "$nlist" >/dev/null; then
4633
cat <<EOF > conftest.$ac_ext
4639
# Now generate the symbol file.
4640
eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
4642
cat <<EOF >> conftest.$ac_ext
4643
#if defined (__STDC__) && __STDC__
4644
# define lt_ptr_t void *
4646
# define lt_ptr_t char *
4650
/* The mapping between symbol names and symbols. */
4655
lt_preloaded_symbols[[]] =
4658
$SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
4659
cat <<\EOF >> conftest.$ac_ext
4667
# Now try linking the two files.
4668
mv conftest.$ac_objext conftstm.$ac_objext
4669
lt_save_LIBS="$LIBS"
4670
lt_save_CFLAGS="$CFLAGS"
4671
LIBS="conftstm.$ac_objext"
4672
CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4673
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4676
LIBS="$lt_save_LIBS"
4677
CFLAGS="$lt_save_CFLAGS"
4679
echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4682
echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4685
echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4688
echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4689
cat conftest.$ac_ext >&5
4691
rm -f conftest* conftst*
4693
# Do not use the global_symbol_pipe unless it works.
4694
if test "$pipe_works" = yes; then
4697
lt_cv_sys_global_symbol_pipe=
4701
if test -z "$lt_cv_sys_global_symbol_pipe"; then
4702
lt_cv_sys_global_symbol_to_cdecl=
4704
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4705
AC_MSG_RESULT(failed)
4709
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4712
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
4713
# ---------------------------------------
4714
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
4715
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
4716
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4717
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
4719
AC_MSG_CHECKING([for $compiler option to produce PIC])
4721
# C++ specific cases for pic, static, wl, etc.
4722
if test "$GXX" = yes; then
4723
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4724
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4728
# All AIX code is PIC.
4729
if test "$host_cpu" = ia64; then
4730
# AIX 5 now supports IA64 processor
4731
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4735
# FIXME: we need at least 68020 code to build shared libraries, but
4736
# adding the `-m68020' flag to GCC prevents building anything better,
4738
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4740
beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4741
# PIC is the default for these OSes.
4743
mingw* | os2* | pw32*)
4744
# This hack is so that the source file can tell whether it is being
4745
# built for inclusion in a dll (and should export symbols for example).
4746
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4748
darwin* | rhapsody*)
4749
# PIC is the default on this platform
4750
# Common symbols not allowed in MH_DYLIB files
4751
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4754
# DJGPP does not support shared libraries at all
4755
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4758
if test -d /usr/nec; then
4759
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4763
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4769
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4774
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4780
# All AIX code is PIC.
4781
if test "$host_cpu" = ia64; then
4782
# AIX 5 now supports IA64 processor
4783
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4785
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4789
case $cc_basename in
4791
# Green Hills C++ Compiler
4792
# _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"
4797
case $cc_basename in
4799
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4802
# Green Hills C++ Compiler
4803
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4809
freebsd* | kfreebsd*-gnu)
4810
# FreeBSD uses GNU C++
4812
hpux9* | hpux10* | hpux11*)
4813
case $cc_basename in
4815
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4816
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
4817
if test "$host_cpu" != ia64; then
4818
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4822
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4823
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
4829
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4837
irix5* | irix6* | nonstopux*)
4838
case $cc_basename in
4840
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4841
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4842
# CC pic flag -KPIC is the default.
4849
case $cc_basename in
4852
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4853
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4857
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4858
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4859
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4863
# Make sure the PIC flag is empty. It appears that all Alpha
4864
# Linux and Compaq Tru64 Unix objects are PIC.
4865
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4866
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4877
case $cc_basename in
4879
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4887
osf3* | osf4* | osf5*)
4888
case $cc_basename in
4890
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4893
# Rational C++ 2.4.1
4894
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4897
# Digital/Compaq C++
4898
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4899
# Make sure the PIC flag is empty. It appears that all Alpha
4900
# Linux and Compaq Tru64 Unix objects are PIC.
4901
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4902
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4911
case $cc_basename in
4913
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4920
case $cc_basename in
4922
# Sun C++ 4.2, 5.x and Centerline C++
4923
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4924
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4925
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4928
# Green Hills C++ Compiler
4929
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4936
case $cc_basename in
4939
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4940
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4944
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4951
case $cc_basename in
4953
# NonStop-UX NCC 3.20
4954
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4965
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4971
if test "$GCC" = yes; then
4972
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4973
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4977
# All AIX code is PIC.
4978
if test "$host_cpu" = ia64; then
4979
# AIX 5 now supports IA64 processor
4980
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4985
# FIXME: we need at least 68020 code to build shared libraries, but
4986
# adding the `-m68020' flag to GCC prevents building anything better,
4988
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4991
beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4992
# PIC is the default for these OSes.
4995
mingw* | pw32* | os2*)
4996
# This hack is so that the source file can tell whether it is being
4997
# built for inclusion in a dll (and should export symbols for example).
4998
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5001
darwin* | rhapsody*)
5002
# PIC is the default on this platform
5003
# Common symbols not allowed in MH_DYLIB files
5004
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5008
# Just because we use GCC doesn't mean we suddenly get shared libraries
5009
# on systems that don't support them.
5010
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5015
if test -d /usr/nec; then
5016
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5021
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5028
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5034
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5038
# PORTME Check for flag to pass linker flags through the system compiler.
5041
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5042
if test "$host_cpu" = ia64; then
5043
# AIX 5 now supports IA64 processor
5044
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5046
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5050
mingw* | pw32* | os2*)
5051
# This hack is so that the source file can tell whether it is being
5052
# built for inclusion in a dll (and should export symbols for example).
5053
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5056
hpux9* | hpux10* | hpux11*)
5057
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5058
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5065
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5068
# Is there a better lt_prog_compiler_static that works with the bundled CC?
5069
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5072
irix5* | irix6* | nonstopux*)
5073
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5074
# PIC (with -KPIC) is the default.
5075
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5079
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5080
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5086
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5087
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5088
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5091
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5092
# All Alpha code is PIC.
5093
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5098
osf3* | osf4* | osf5*)
5099
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5100
# All OSF/1 code is PIC.
5101
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5105
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
5106
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
5110
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5111
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5112
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5116
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5117
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5118
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5121
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5122
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5123
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5124
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5128
if test -d /usr/nec ;then
5129
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5130
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5135
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5136
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5140
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5145
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
5148
# Check to make sure the PIC flag actually works.
5150
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
5151
AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5152
_LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
5153
[$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
5154
[case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
5156
*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5158
[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5159
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5162
# For platforms which do not support PIC, -DPIC is meaningless:
5164
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5167
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
5173
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
5174
# ------------------------------------
5175
# See if the linker supports building shared libraries.
5176
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
5177
[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5179
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5182
# If we're using GNU nm, then we don't want the "-C" option.
5183
# -C means demangle to AIX nm, but means don't demangle with GNU nm
5184
if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5185
_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'
5187
_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'
5191
_LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5194
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5197
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5202
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
5203
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5204
_LT_AC_TAGVAR(archive_cmds, $1)=
5205
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5206
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
5207
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5208
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5209
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5210
_LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
5211
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5212
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5213
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5214
_LT_AC_TAGVAR(hardcode_direct, $1)=no
5215
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5216
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5217
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5218
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
5219
_LT_AC_TAGVAR(module_cmds, $1)=
5220
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
5221
_LT_AC_TAGVAR(always_export_symbols, $1)=no
5222
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5223
# include_expsyms should be a list of space-separated symbols to be *always*
5224
# included in the symbol list
5225
_LT_AC_TAGVAR(include_expsyms, $1)=
5226
# exclude_expsyms can be an extended regexp of symbols to exclude
5227
# it will be wrapped by ` (' and `)$', so one must not match beginning or
5228
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5229
# as well as any symbol that contains `d'.
5230
_LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
5231
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5232
# platforms (ab)use it in PIC code, but their linkers get confused if
5233
# the symbol is explicitly referenced. Since portable code cannot
5234
# rely on this symbol name, it's probably fine to never include it in
5235
# preloaded symbol tables.
5236
extract_expsyms_cmds=
5239
cygwin* | mingw* | pw32*)
5240
# FIXME: the MSVC++ port hasn't been tested in a loooong time
5241
# When not using gcc, we currently assume that we are using
5242
# Microsoft Visual C++.
5243
if test "$GCC" != yes; then
5252
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
5253
if test "$with_gnu_ld" = yes; then
5254
# If archive_cmds runs LD, not CC, wlarc should be empty
5257
# See if GNU ld supports shared libraries.
5259
aix3* | aix4* | aix5*)
5260
# On AIX/PPC, the GNU linker is very broken
5261
if test "$host_cpu" != ia64; then
5262
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5265
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
5266
*** to be unable to reliably create shared libraries on AIX.
5267
*** Therefore, libtool is disabling shared libraries support. If you
5268
*** really care for shared libraries, you may want to modify your PATH
5269
*** so that a non-GNU linker is found, and then restart.
5276
_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)'
5277
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5278
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5280
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5281
# that the semantics of dynamic libraries on AmigaOS, at least up
5282
# to version 4, is to share data among multiple programs linked
5283
# with the same dynamic library. Since this doesn't match the
5284
# behavior of shared libraries on other platforms, we can't use
5286
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5290
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5291
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5292
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5293
# support --undefined. This deserves some investigation. FIXME
5294
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5296
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5300
cygwin* | mingw* | pw32*)
5301
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5302
# as there is no search path for DLLs.
5303
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5304
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5305
_LT_AC_TAGVAR(always_export_symbols, $1)=no
5306
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5307
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5309
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
5310
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
5311
# If the export-symbols file already is a .def file (1st line
5312
# is EXPORTS), use it as is; otherwise, prepend...
5313
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5314
cp $export_symbols $output_objdir/$soname.def;
5316
echo EXPORTS > $output_objdir/$soname.def;
5317
cat $export_symbols >> $output_objdir/$soname.def;
5319
$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
5326
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5327
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5330
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5331
_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'
5336
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
5337
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5340
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5341
*** create shared libraries on Solaris systems. Therefore, libtool
5342
*** is disabling shared libraries support. We urge you to upgrade GNU
5343
*** binutils to release 2.9.1 or newer. Another option is to modify
5344
*** your PATH or compiler configuration so that the native linker is
5345
*** used, and then restart.
5348
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5349
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5350
_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'
5352
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5357
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5359
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5360
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5364
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5365
tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5366
_LT_AC_TAGVAR(archive_cmds, $1)="$tmp_archive_cmds"
5367
supports_anon_versioning=no
5368
case `$LD -v 2>/dev/null` in
5369
*\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5370
*\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5371
*\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5372
*\ 2.11.*) ;; # other 2.11 versions
5373
*) supports_anon_versioning=yes ;;
5375
if test $supports_anon_versioning = yes; then
5376
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
5377
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5378
$echo "local: *; };" >> $output_objdir/$libname.ver~
5379
$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5381
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="$tmp_archive_cmds"
5384
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5389
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5390
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5391
_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'
5393
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5398
if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
5399
runpath_var=LD_RUN_PATH
5400
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5401
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5402
# ancient GNU ld didn't support --whole-archive et. al.
5403
if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
5404
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5406
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5410
# PORTME fill in a description of your system's linker (not GNU ld)
5413
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5414
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
5415
_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'
5416
# Note: this linker hardcodes the directories in LIBPATH if there
5417
# are no directories specified by -L.
5418
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5419
if test "$GCC" = yes && test -z "$link_static_flag"; then
5420
# Neither direct hardcoding nor static linking is supported with a
5422
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5427
if test "$host_cpu" = ia64; then
5428
# On IA64, the linker does run time linking by default, so we don't
5429
# have to do anything special.
5430
aix_use_runtimelinking=no
5431
exp_sym_flag='-Bexport'
5434
# If we're using GNU nm, then we don't want the "-C" option.
5435
# -C means demangle to AIX nm, but means don't demangle with GNU nm
5436
if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5437
_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'
5439
_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'
5441
aix_use_runtimelinking=no
5443
# Test if we are trying to use run time linking or normal
5444
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
5445
# need to do runtime linking.
5446
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
5447
for ld_flag in $LDFLAGS; do
5448
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5449
aix_use_runtimelinking=yes
5455
exp_sym_flag='-bexport'
5456
no_entry_flag='-bnoentry'
5459
# When large executables or shared objects are built, AIX ld can
5460
# have problems creating the table of contents. If linking a library
5461
# or program results in "error TOC overflow" add -mminimal-toc to
5462
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5463
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5465
_LT_AC_TAGVAR(archive_cmds, $1)=''
5466
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5467
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
5468
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5470
if test "$GCC" = yes; then
5471
case $host_os in aix4.[012]|aix4.[012].*)
5472
# We only want to do this on AIX 4.2 and lower, the check
5473
# below for broken collect2 doesn't work under 4.3+
5474
collect2name=`${CC} -print-prog-name=collect2`
5475
if test -f "$collect2name" && \
5476
strings "$collect2name" | grep resolve_lib_name >/dev/null
5478
# We have reworked collect2
5479
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5481
# We have old collect2
5482
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5483
# It fails to find uninstalled libraries when the uninstalled
5484
# path is not listed in the libpath. Setting hardcode_minus_L
5485
# to unsupported forces relinking
5486
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5487
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5488
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5491
shared_flag='-shared'
5494
if test "$host_cpu" = ia64; then
5495
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5496
# chokes on -Wl,-G. The following line is correct:
5499
if test "$aix_use_runtimelinking" = yes; then
5500
shared_flag='${wl}-G'
5502
shared_flag='${wl}-bM:SRE'
5507
# It seems that -bexpall does not export symbols beginning with
5508
# underscore (_), so it is better to generate a list of symbols to export.
5509
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
5510
if test "$aix_use_runtimelinking" = yes; then
5511
# Warning - without using the other runtime loading flags (-brtl),
5512
# -berok will link without error, but may produce a broken library.
5513
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
5514
# Determine the default libpath from the value encoded in an empty executable.
5515
_LT_AC_SYS_LIBPATH_AIX
5516
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5517
_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"
5519
if test "$host_cpu" = ia64; then
5520
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5521
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5522
_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"
5524
# Determine the default libpath from the value encoded in an empty executable.
5525
_LT_AC_SYS_LIBPATH_AIX
5526
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5527
# Warning - without using the other run time loading flags,
5528
# -berok will link without error, but may produce a broken library.
5529
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5530
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5531
# -bexpall does not export symbols beginning with underscore (_)
5532
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
5533
# Exported symbols can be pulled into shared objects from archives
5534
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
5535
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5536
# This is similar to how AIX traditionally builds it's shared libraries.
5537
_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'
5543
_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)'
5544
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5545
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5546
# see comment about different semantics on the GNU ld section
5547
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5551
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5554
cygwin* | mingw* | pw32*)
5555
# When not using gcc, we currently assume that we are using
5556
# Microsoft Visual C++.
5557
# hardcode_libdir_flag_spec is actually meaningless, as there is
5558
# no search path for DLLs.
5559
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5560
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5561
# Tell ltmain to make .lib files, not .a files.
5563
# Tell ltmain to make .dll files, not .so files.
5565
# FIXME: Setting linknames here is a bad hack.
5566
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
5567
# The linker will automatically build a .lib file if we build a DLL.
5568
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
5569
# FIXME: Should let the user specify the lib program.
5570
_LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
5571
fix_srcfile_path='`cygpath -w "$srcfile"`'
5572
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5575
darwin* | rhapsody*)
5576
if test "$GXX" = yes ; then
5577
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5579
rhapsody* | darwin1.[[012]])
5580
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
5583
if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
5584
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
5586
case ${MACOSX_DEPLOYMENT_TARGET} in
5588
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
5591
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
5597
lt_int_apple_cc_single_mod=no
5598
output_verbose_link_cmd='echo'
5599
if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
5600
lt_int_apple_cc_single_mod=yes
5602
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
5603
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
5605
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -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'
5607
_LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5608
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
5609
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
5610
_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}'
5612
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -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}'
5614
_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}'
5615
_LT_AC_TAGVAR(hardcode_direct, $1)=no
5616
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
5617
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5618
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
5619
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5621
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5626
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5627
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5628
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5632
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5635
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5636
# support. Future versions do this automatically, but an explicit c++rt0.o
5637
# does not break anything, and helps significantly (at the cost of a little
5640
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5641
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5642
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5643
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5646
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
5648
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5649
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5650
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5651
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5654
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5655
freebsd* | kfreebsd*-gnu)
5656
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5657
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5658
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5659
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5663
if test "$GCC" = yes; then
5664
_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'
5666
_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'
5668
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5669
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5670
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5672
# hardcode_minus_L: Not really in the search PATH,
5673
# but as the default location of the library.
5674
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5675
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5679
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5682
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5685
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5691
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
5694
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5698
if test "$with_gnu_ld" = no; then
5701
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5702
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5703
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5704
_LT_AC_TAGVAR(hardcode_direct, $1)=no
5705
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5708
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5709
_LT_AC_TAGVAR(hardcode_direct, $1)=no
5710
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5712
# hardcode_minus_L: Not really in the search PATH,
5713
# but as the default location of the library.
5714
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5717
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5718
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5719
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5720
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5722
# hardcode_minus_L: Not really in the search PATH,
5723
# but as the default location of the library.
5724
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5730
irix5* | irix6* | nonstopux*)
5731
if test "$GCC" = yes; then
5732
_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'
5734
_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'
5735
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
5737
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5738
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5739
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5743
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5744
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
5746
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
5748
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5749
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5750
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5754
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5755
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5756
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5757
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5758
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5762
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5763
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5764
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5765
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5766
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5767
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5770
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5771
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5772
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5775
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5776
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5783
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5784
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5785
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5786
_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'
5787
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5791
if test "$GCC" = yes; then
5792
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5793
_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'
5795
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5796
_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'
5798
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5799
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5802
osf4* | osf5*) # as osf3* with the addition of -msym flag
5803
if test "$GCC" = yes; then
5804
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5805
_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'
5806
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5808
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5809
_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'
5810
_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~
5811
$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'
5813
# Both c and cxx compiler support -rpath directly
5814
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5816
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5820
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5821
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5822
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5823
runpath_var=LD_RUN_PATH
5824
hardcode_runpath_var=yes
5828
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
5829
if test "$GCC" = yes; then
5830
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5831
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5832
$CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
5834
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5835
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5836
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5838
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5839
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5841
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5842
*) # Supported since Solaris 2.6 (maybe 2.5.1?)
5843
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
5845
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5849
if test "x$host_vendor" = xsequent; then
5850
# Use $CC to link under sequent, because it throws in some extra .o
5851
# files that make .init and .fini sections work.
5852
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5854
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5856
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5857
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5858
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5859
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5863
case $host_vendor in
5865
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5866
_LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5869
## LD is ld it makes a PLAMLIB
5870
## CC just makes a GrossModule.
5871
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5872
_LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5873
_LT_AC_TAGVAR(hardcode_direct, $1)=no
5876
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5877
_LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5880
runpath_var='LD_RUN_PATH'
5881
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5885
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5886
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5887
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5891
if test -d /usr/nec; then
5892
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5893
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5894
runpath_var=LD_RUN_PATH
5895
hardcode_runpath_var=yes
5896
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
5901
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5902
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5903
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5904
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5905
hardcode_runpath_var=yes
5906
runpath_var=LD_RUN_PATH
5909
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
5910
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
5911
if test "$GCC" = yes; then
5912
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5914
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5916
runpath_var='LD_RUN_PATH'
5917
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5921
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
5922
# $CC -shared without GNU ld will not create a library from C++
5923
# object files and a static libstdc++, better avoid it by now
5924
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5925
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5926
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5927
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5928
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5929
runpath_var='LD_RUN_PATH'
5933
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5934
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5935
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5939
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5944
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
5945
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5947
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
5948
if test "$GCC" = yes; then
5949
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
5953
# Do we need to explicitly link libc?
5955
case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
5957
# Assume -lc should be added
5958
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5960
if test "$enable_shared" = yes && test "$GCC" = yes; then
5961
case $_LT_AC_TAGVAR(archive_cmds, $1) in
5963
# FIXME: we may have to deal with multi-command sequences.
5966
# Test whether the compiler implicitly links with -lc since on some
5967
# systems, -lgcc has to come before -lc. If gcc already passes -lc
5968
# to ld, don't add -lc before -lgcc.
5969
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
5971
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
5973
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5976
libobjs=conftest.$ac_objext
5978
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
5984
lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
5985
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
5986
if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
5988
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5990
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5992
_LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5994
cat conftest.err 1>&5
5997
AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
6003
])# AC_LIBTOOL_PROG_LD_SHLIBS
6006
# _LT_AC_FILE_LTDLL_C
6007
# -------------------
6008
# Be careful that the start marker always follows a newline.
6009
AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
3292
6010
# /* ltdll.c starts here */
3293
6011
# #define WIN32_LEAN_AND_MEAN
3294
6012
# #include <windows.h>
3324
6042
# /* ltdll.c ends here */
3325
# This is a source program that is used to create import libraries
3326
# on Windows for dlls which lack them. Don't remove nor modify the
3327
# starting and closing comments
3328
# /* impgen.c starts here */
3329
# /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
3331
# This file is part of GNU libtool.
3333
# This program is free software; you can redistribute it and/or modify
3334
# it under the terms of the GNU General Public License as published by
3335
# the Free Software Foundation; either version 2 of the License, or
3336
# (at your option) any later version.
3338
# This program is distributed in the hope that it will be useful,
3339
# but WITHOUT ANY WARRANTY; without even the implied warranty of
3340
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3341
# GNU General Public License for more details.
3343
# You should have received a copy of the GNU General Public License
3344
# along with this program; if not, write to the Free Software
3345
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3348
# #include <stdio.h> /* for printf() */
3349
# #include <unistd.h> /* for open(), lseek(), read() */
3350
# #include <fcntl.h> /* for O_RDONLY, O_BINARY */
3351
# #include <string.h> /* for strdup() */
3353
# /* O_BINARY isn't required (or even defined sometimes) under Unix */
3355
# #define O_BINARY 0
3358
# static unsigned int
3359
# pe_get16 (fd, offset)
3363
# unsigned char b[2];
3364
# lseek (fd, offset, SEEK_SET);
3366
# return b[0] + (b[1]<<8);
3369
# static unsigned int
3370
# pe_get32 (fd, offset)
3374
# unsigned char b[4];
3375
# lseek (fd, offset, SEEK_SET);
3377
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3380
# static unsigned int
3384
# unsigned char *b = ptr;
3385
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3394
# unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
3395
# unsigned long export_rva, export_size, nsections, secptr, expptr;
3396
# unsigned long name_rvas, nexp;
3397
# unsigned char *expdata, *erva;
3398
# char *filename, *dll_name;
3400
# filename = argv[1];
3402
# dll = open(filename, O_RDONLY|O_BINARY);
3406
# dll_name = filename;
3408
# for (i=0; filename[i]; i++)
3409
# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
3410
# dll_name = filename + i +1;
3412
# pe_header_offset = pe_get32 (dll, 0x3c);
3413
# opthdr_ofs = pe_header_offset + 4 + 20;
3414
# num_entries = pe_get32 (dll, opthdr_ofs + 92);
3416
# if (num_entries < 1) /* no exports */
3419
# export_rva = pe_get32 (dll, opthdr_ofs + 96);
3420
# export_size = pe_get32 (dll, opthdr_ofs + 100);
3421
# nsections = pe_get16 (dll, pe_header_offset + 4 +2);
3422
# secptr = (pe_header_offset + 4 + 20 +
3423
# pe_get16 (dll, pe_header_offset + 4 + 16));
3426
# for (i = 0; i < nsections; i++)
3429
# unsigned long secptr1 = secptr + 40 * i;
3430
# unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
3431
# unsigned long vsize = pe_get32 (dll, secptr1 + 16);
3432
# unsigned long fptr = pe_get32 (dll, secptr1 + 20);
3433
# lseek(dll, secptr1, SEEK_SET);
3434
# read(dll, sname, 8);
3435
# if (vaddr <= export_rva && vaddr+vsize > export_rva)
3437
# expptr = fptr + (export_rva - vaddr);
3438
# if (export_rva + export_size > vaddr + vsize)
3439
# export_size = vsize - (export_rva - vaddr);
3444
# expdata = (unsigned char*)malloc(export_size);
3445
# lseek (dll, expptr, SEEK_SET);
3446
# read (dll, expdata, export_size);
3447
# erva = expdata - export_rva;
3449
# nexp = pe_as32 (expdata+24);
3450
# name_rvas = pe_as32 (expdata+32);
3452
# printf ("EXPORTS\n");
3453
# for (i = 0; i<nexp; i++)
3455
# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
3456
# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
3461
# /* impgen.c ends here */
3467
# We use sed instead of cat because bash on DJGPP gets confused if
3468
# if finds mixed CR/LF and LF-only lines. Since sed operates in
3469
# text mode, it properly converts lines to CR/LF. This bash problem
3470
# is reportedly fixed, but why not run on old versions too?
3471
sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
3473
mv -f "${ofile}T" "$ofile" || \
3474
(rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
3478
])# _LT_AC_LTCONFIG_HACK
3480
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
3481
AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
3483
# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
3484
AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
3486
# AC_ENABLE_SHARED - implement the --enable-shared flag
3487
# Usage: AC_ENABLE_SHARED[(DEFAULT)]
3488
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3490
AC_DEFUN([AC_ENABLE_SHARED],
3491
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3492
AC_ARG_ENABLE(shared,
3493
changequote(<<, >>)dnl
3494
<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
3495
changequote([, ])dnl
3496
[p=${PACKAGE-default}
3498
yes) enable_shared=yes ;;
3499
no) enable_shared=no ;;
3502
# Look at the argument we got. We use all the common list separators.
3503
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3504
for pkg in $enableval; do
3505
if test "X$pkg" = "X$p"; then
3512
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
3515
# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
3516
AC_DEFUN([AC_DISABLE_SHARED],
3517
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3518
AC_ENABLE_SHARED(no)])
3520
# AC_ENABLE_STATIC - implement the --enable-static flag
3521
# Usage: AC_ENABLE_STATIC[(DEFAULT)]
3522
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3524
AC_DEFUN([AC_ENABLE_STATIC],
3525
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3526
AC_ARG_ENABLE(static,
3527
changequote(<<, >>)dnl
3528
<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
3529
changequote([, ])dnl
3530
[p=${PACKAGE-default}
3532
yes) enable_static=yes ;;
3533
no) enable_static=no ;;
3536
# Look at the argument we got. We use all the common list separators.
3537
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3538
for pkg in $enableval; do
3539
if test "X$pkg" = "X$p"; then
3546
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
3549
# AC_DISABLE_STATIC - set the default static flag to --disable-static
3550
AC_DEFUN([AC_DISABLE_STATIC],
3551
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3552
AC_ENABLE_STATIC(no)])
3555
# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
3556
# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
3557
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3559
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
3560
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3561
AC_ARG_ENABLE(fast-install,
3562
changequote(<<, >>)dnl
3563
<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
3564
changequote([, ])dnl
3565
[p=${PACKAGE-default}
3567
yes) enable_fast_install=yes ;;
3568
no) enable_fast_install=no ;;
3570
enable_fast_install=no
3571
# Look at the argument we got. We use all the common list separators.
3572
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3573
for pkg in $enableval; do
3574
if test "X$pkg" = "X$p"; then
3575
enable_fast_install=yes
3581
enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
3584
# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
3585
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
3586
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3587
AC_ENABLE_FAST_INSTALL(no)])
3589
# AC_LIBTOOL_PICMODE - implement the --with-pic flag
3590
# Usage: AC_LIBTOOL_PICMODE[(MODE)]
3591
# Where MODE is either `yes' or `no'. If omitted, it defaults to
3593
AC_DEFUN([AC_LIBTOOL_PICMODE],
3594
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3595
pic_mode=ifelse($#,1,$1,default)])
3598
# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
3599
AC_DEFUN([AC_PATH_TOOL_PREFIX],
3600
[AC_MSG_CHECKING([for $1])
3601
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3604
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3607
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
3610
ac_save_MAGIC_CMD="$MAGIC_CMD"
3611
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3612
dnl $ac_dummy forces splitting on constant user-supplied paths.
3613
dnl POSIX.2 word splitting is done only on the output of word expansions,
3614
dnl not every word. This closes a longstanding sh security hole.
3615
ac_dummy="ifelse([$2], , $PATH, [$2])"
3616
for ac_dir in $ac_dummy; do
3617
test -z "$ac_dir" && ac_dir=.
3618
if test -f $ac_dir/$1; then
3619
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3620
if test -n "$file_magic_test_file"; then
3621
case $deplibs_check_method in
3623
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3624
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3625
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3626
egrep "$file_magic_regex" > /dev/null; then
3631
*** Warning: the command libtool uses to detect shared libraries,
3632
*** $file_magic_cmd, produces output that libtool cannot recognize.
3633
*** The result is that libtool may fail to recognize shared libraries
3634
*** as such. This will affect the creation of libtool libraries that
3635
*** depend on shared libraries, but programs linked with such libtool
3636
*** libraries will work regardless of this problem. Nevertheless, you
3637
*** may want to report the problem to your system manager and/or to
3638
*** bug-libtool@gnu.org
3648
MAGIC_CMD="$ac_save_MAGIC_CMD"
3651
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3652
if test -n "$MAGIC_CMD"; then
3653
AC_MSG_RESULT($MAGIC_CMD)
3660
# AC_PATH_MAGIC - find a file program which can recognise a shared library
3661
AC_DEFUN([AC_PATH_MAGIC],
3662
[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
3663
AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
3664
if test -z "$lt_cv_path_MAGIC_CMD"; then
3665
if test -n "$ac_tool_prefix"; then
3666
AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
3674
# AC_PROG_LD - find the path to the GNU or non-GNU linker
3675
AC_DEFUN([AC_PROG_LD],
3676
[AC_ARG_WITH(gnu-ld,
3677
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
3678
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
3679
AC_REQUIRE([AC_PROG_CC])dnl
3680
AC_REQUIRE([AC_CANONICAL_HOST])dnl
3681
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3682
AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
3684
if test "$GCC" = yes; then
3685
# Check if gcc -print-prog-name=ld gives a path.
3686
AC_MSG_CHECKING([for ld used by GCC])
3689
# gcc leaves a trailing carriage return which upsets mingw
3690
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3692
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3695
# Accept absolute paths.
3696
[[\\/]]* | [[A-Za-z]]:[[\\/]]*)
3697
re_direlt='/[[^/]][[^/]]*/\.\./'
3698
# Canonicalize the path of ld
3699
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3700
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3701
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3703
test -z "$LD" && LD="$ac_prog"
3706
# If it fails, then pretend we aren't using GCC.
3710
# If it is relative, then search for the first ld in PATH.
3714
elif test "$with_gnu_ld" = yes; then
3715
AC_MSG_CHECKING([for GNU ld])
3717
AC_MSG_CHECKING([for non-GNU ld])
3719
AC_CACHE_VAL(lt_cv_path_LD,
3720
[if test -z "$LD"; then
3721
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3722
for ac_dir in $PATH; do
3723
test -z "$ac_dir" && ac_dir=.
3724
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3725
lt_cv_path_LD="$ac_dir/$ac_prog"
3726
# Check to see if the program is GNU ld. I'd rather use --version,
3727
# but apparently some GNU ld's only accept -v.
3728
# Break only if it was the GNU/non-GNU ld that we prefer.
3729
if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3730
test "$with_gnu_ld" != no && break
3732
test "$with_gnu_ld" != yes && break
3738
lt_cv_path_LD="$LD" # Let the user override the test with a path.
3741
if test -n "$LD"; then
3746
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3751
AC_DEFUN([AC_PROG_LD_GNU],
3752
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3753
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
3754
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3755
lt_cv_prog_gnu_ld=yes
3757
lt_cv_prog_gnu_ld=no
3759
with_gnu_ld=$lt_cv_prog_gnu_ld
3762
# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
3763
# -- PORTME Some linkers may need a different reload flag.
3764
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3765
[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
3766
[lt_cv_ld_reload_flag='-r'])
3767
reload_flag=$lt_cv_ld_reload_flag
3768
test -n "$reload_flag" && reload_flag=" $reload_flag"
3771
# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
3772
# -- PORTME fill in with the dynamic library characteristics
3773
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3774
[AC_CACHE_CHECK([how to recognise dependant libraries],
3775
lt_cv_deplibs_check_method,
3776
[lt_cv_file_magic_cmd='$MAGIC_CMD'
3777
lt_cv_file_magic_test_file=
3778
lt_cv_deplibs_check_method='unknown'
3779
# Need to set the preceding variable on all platforms that support
3780
# interlibrary dependencies.
3781
# 'none' -- dependencies not supported.
3782
# `unknown' -- same as none, but documents that we really don't know.
3783
# 'pass_all' -- all dependencies passed with no checks.
3784
# 'test_compile' -- check by making test program.
3785
# 'file_magic [[regex]]' -- check by looking for files in library path
3786
# which responds to the $file_magic_cmd with a given egrep regex.
3787
# If you have `file' or equivalent on your system and you're not sure
3788
# whether `pass_all' will *always* work, you probably want this one.
3792
lt_cv_deplibs_check_method=pass_all
3796
lt_cv_deplibs_check_method=pass_all
3800
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3801
lt_cv_file_magic_cmd='/usr/bin/file -L'
3802
lt_cv_file_magic_test_file=/shlib/libc.so
3805
cygwin* | mingw* | pw32*)
3806
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3807
lt_cv_file_magic_cmd='$OBJDUMP -f'
3810
darwin* | rhapsody*)
3811
lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3812
lt_cv_file_magic_cmd='/usr/bin/file -L'
3814
rhapsody* | darwin1.[[012]])
3815
lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3818
lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3824
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3827
# Not sure whether the presence of OpenBSD here was a mistake.
3828
# Let's accept both of them until this is cleared up.
3829
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
3830
lt_cv_file_magic_cmd=/usr/bin/file
3831
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3835
lt_cv_deplibs_check_method=pass_all
3840
lt_cv_deplibs_check_method=pass_all
3844
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3845
lt_cv_file_magic_cmd=/usr/bin/file
3846
lt_cv_file_magic_test_file=/usr/lib/libc.sl
3852
# this will be overridden with pass_all, but let us keep it just in case
3853
lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3857
*-32|*"-32 ") libmagic=32-bit;;
3858
*-n32|*"-n32 ") libmagic=N32;;
3859
*-64|*"-64 ") libmagic=64-bit;;
3860
*) libmagic=never-match;;
3862
# this will be overridden with pass_all, but let us keep it just in case
3863
lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
3866
lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3867
lt_cv_deplibs_check_method=pass_all
3870
# This must be Linux ELF.
3873
alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | s390* )
3874
lt_cv_deplibs_check_method=pass_all ;;
3876
# glibc up to 2.1.1 does not perform some relocations on ARM
3877
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
3879
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3883
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3884
lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
3886
lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
3891
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3892
lt_cv_file_magic_cmd=/usr/bin/file
3893
lt_cv_file_magic_test_file=/usr/lib/libnls.so
3897
lt_cv_file_magic_cmd=/usr/bin/file
3898
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3899
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3900
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
3902
lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3906
osf3* | osf4* | osf5*)
3907
# this will be overridden with pass_all, but let us keep it just in case
3908
lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3909
lt_cv_file_magic_test_file=/shlib/libc.so
3910
lt_cv_deplibs_check_method=pass_all
3914
lt_cv_deplibs_check_method=pass_all
3918
lt_cv_deplibs_check_method=pass_all
3919
lt_cv_file_magic_test_file=/lib/libc.so
3922
sysv5uw[[78]]* | sysv4*uw2*)
3923
lt_cv_deplibs_check_method=pass_all
3926
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3927
case $host_vendor in
3929
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]]'
3930
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3933
lt_cv_deplibs_check_method=pass_all
3936
lt_cv_file_magic_cmd='/bin/file'
3937
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3940
lt_cv_file_magic_cmd='/bin/file'
3941
lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3942
lt_cv_file_magic_test_file=/lib/libc.so
3948
file_magic_cmd=$lt_cv_file_magic_cmd
3949
deplibs_check_method=$lt_cv_deplibs_check_method
3953
# AC_PROG_NM - find the path to a BSD-compatible name lister
3954
AC_DEFUN([AC_PROG_NM],
3955
[AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
3956
AC_MSG_CHECKING([for BSD-compatible nm])
3957
AC_CACHE_VAL(lt_cv_path_NM,
3958
[if test -n "$NM"; then
3959
# Let the user override the test.
3962
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3963
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3964
test -z "$ac_dir" && ac_dir=.
3965
tmp_nm=$ac_dir/${ac_tool_prefix}nm
3966
if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3967
# Check to see if the nm accepts a BSD-compat flag.
3968
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
3969
# nm: unknown option "B" ignored
3970
# Tru64's nm complains that /dev/null is an invalid object file
3971
if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3972
lt_cv_path_NM="$tmp_nm -B"
3974
elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3975
lt_cv_path_NM="$tmp_nm -p"
3978
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3979
continue # so that we can try to find one that supports BSD flags
3984
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3987
AC_MSG_RESULT([$NM])
3990
# AC_CHECK_LIBM - check for math library
3991
AC_DEFUN([AC_CHECK_LIBM],
3992
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3995
*-*-beos* | *-*-cygwin* | *-*-pw32*)
3996
# These system don't have libm
3999
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4000
AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
4003
AC_CHECK_LIB(m, main, LIBM="-lm")
4008
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
4009
# the libltdl convenience library and INCLTDL to the include flags for
4010
# the libltdl header and adds --enable-ltdl-convenience to the
4011
# configure arguments. Note that LIBLTDL and INCLTDL are not
4012
# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
4013
# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
4014
# with '${top_builddir}/' and INCLTDL will be prefixed with
4015
# '${top_srcdir}/' (note the single quotes!). If your package is not
4016
# flat and you're not using automake, define top_builddir and
4017
# top_srcdir appropriately in the Makefiles.
4018
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
4019
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4020
case $enable_ltdl_convenience in
4021
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
4022
"") enable_ltdl_convenience=yes
4023
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
4025
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
4026
INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4029
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
4030
# the libltdl installable library and INCLTDL to the include flags for
4031
# the libltdl header and adds --enable-ltdl-install to the configure
4032
# arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
4033
# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
4034
# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
4035
# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
4036
# with '${top_srcdir}/' (note the single quotes!). If your package is
4037
# not flat and you're not using automake, define top_builddir and
4038
# top_srcdir appropriately in the Makefiles.
4039
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
4040
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
4041
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4042
AC_CHECK_LIB(ltdl, main,
4043
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
4044
[if test x"$enable_ltdl_install" = xno; then
4045
AC_MSG_WARN([libltdl not installed, but installation disabled])
4047
enable_ltdl_install=yes
4050
if test x"$enable_ltdl_install" = x"yes"; then
4051
ac_configure_args="$ac_configure_args --enable-ltdl-install"
4052
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
4053
INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4055
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
6043
])# _LT_AC_FILE_LTDLL_C
6046
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
6047
# ---------------------------------
6048
AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
4062
6052
AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
4313
6370
rm -f conf.sdltest
6374
# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
6375
# Generated from amversion.in; do not edit by hand.
6377
# This program is free software; you can redistribute it and/or modify
6378
# it under the terms of the GNU General Public License as published by
6379
# the Free Software Foundation; either version 2, or (at your option)
6380
# any later version.
6382
# This program is distributed in the hope that it will be useful,
6383
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6384
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6385
# GNU General Public License for more details.
6387
# You should have received a copy of the GNU General Public License
6388
# along with this program; if not, write to the Free Software
6389
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6391
# AM_AUTOMAKE_VERSION(VERSION)
6392
# ----------------------------
6393
# Automake X.Y traces this macro to ensure aclocal.m4 has been
6394
# generated from the m4 files accompanying Automake X.Y.
6395
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"])
6397
# AM_SET_CURRENT_AUTOMAKE_VERSION
6398
# -------------------------------
6399
# Call AM_AUTOMAKE_VERSION so it can be traced.
6400
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
6401
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
6402
[AM_AUTOMAKE_VERSION([1.8.5])])
6404
# Figure out how to run the assembler. -*- Autoconf -*-
6408
# Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc.
6410
# This program is free software; you can redistribute it and/or modify
6411
# it under the terms of the GNU General Public License as published by
6412
# the Free Software Foundation; either version 2, or (at your option)
6413
# any later version.
6415
# This program is distributed in the hope that it will be useful,
6416
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6417
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6418
# GNU General Public License for more details.
6420
# You should have received a copy of the GNU General Public License
6421
# along with this program; if not, write to the Free Software
6422
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6427
AC_DEFUN([AM_PROG_AS],
6428
[# By default we simply use the C compiler to build assembly code.
6429
AC_REQUIRE([AC_PROG_CC])
6430
test "${CCAS+set}" = set || CCAS=$CC
6431
test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
6432
AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)])
6433
AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)])
6438
# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
6440
# This program is free software; you can redistribute it and/or modify
6441
# it under the terms of the GNU General Public License as published by
6442
# the Free Software Foundation; either version 2, or (at your option)
6443
# any later version.
6445
# This program is distributed in the hope that it will be useful,
6446
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6447
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6448
# GNU General Public License for more details.
6450
# You should have received a copy of the GNU General Public License
6451
# along with this program; if not, write to the Free Software
6452
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6455
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
6456
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
6457
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
6459
# Of course, Automake must honor this variable whenever it calls a
6460
# tool from the auxiliary directory. The problem is that $srcdir (and
6461
# therefore $ac_aux_dir as well) can be either absolute or relative,
6462
# depending on how configure is run. This is pretty annoying, since
6463
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
6464
# source directory, any form will work fine, but in subdirectories a
6465
# relative path needs to be adjusted first.
6467
# $ac_aux_dir/missing
6468
# fails when called from a subdirectory if $ac_aux_dir is relative
6469
# $top_srcdir/$ac_aux_dir/missing
6470
# fails if $ac_aux_dir is absolute,
6471
# fails when called from a subdirectory in a VPATH build with
6472
# a relative $ac_aux_dir
6474
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
6475
# are both prefixed by $srcdir. In an in-source build this is usually
6476
# harmless because $srcdir is `.', but things will broke when you
6477
# start a VPATH build or use an absolute $srcdir.
6479
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
6480
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
6481
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
6482
# and then we would define $MISSING as
6483
# MISSING="\${SHELL} $am_aux_dir/missing"
6484
# This will work as long as MISSING is not called from configure, because
6485
# unfortunately $(top_srcdir) has no meaning in configure.
6486
# However there are other variables, like CC, which are often used in
6487
# configure, and could therefore not use this "fixed" $ac_aux_dir.
6489
# Another solution, used here, is to always expand $ac_aux_dir to an
6490
# absolute PATH. The drawback is that using absolute paths prevent a
6491
# configured tree to be moved without reconfiguration.
6493
AC_DEFUN([AM_AUX_DIR_EXPAND],
6494
[dnl Rely on autoconf to set up CDPATH properly.
6495
AC_PREREQ([2.50])dnl
6496
# expand $ac_aux_dir to an absolute path
6497
am_aux_dir=`cd $ac_aux_dir && pwd`
6500
# AM_CONDITIONAL -*- Autoconf -*-
6502
# Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
6504
# This program is free software; you can redistribute it and/or modify
6505
# it under the terms of the GNU General Public License as published by
6506
# the Free Software Foundation; either version 2, or (at your option)
6507
# any later version.
6509
# This program is distributed in the hope that it will be useful,
6510
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6511
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6512
# GNU General Public License for more details.
6514
# You should have received a copy of the GNU General Public License
6515
# along with this program; if not, write to the Free Software
6516
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6521
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
6522
# -------------------------------------
6523
# Define a conditional.
6524
AC_DEFUN([AM_CONDITIONAL],
6526
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
6527
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
6529
AC_SUBST([$1_FALSE])
6537
AC_CONFIG_COMMANDS_PRE(
6538
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
6539
AC_MSG_ERROR([conditional "$1" was never defined.
6540
Usually this means the macro was only invoked conditionally.])
6543
# serial 7 -*- Autoconf -*-
6545
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
6546
# Free Software Foundation, Inc.
6548
# This program is free software; you can redistribute it and/or modify
6549
# it under the terms of the GNU General Public License as published by
6550
# the Free Software Foundation; either version 2, or (at your option)
6551
# any later version.
6553
# This program is distributed in the hope that it will be useful,
6554
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6555
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6556
# GNU General Public License for more details.
6558
# You should have received a copy of the GNU General Public License
6559
# along with this program; if not, write to the Free Software
6560
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6564
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
6565
# written in clear, in which case automake, when reading aclocal.m4,
6566
# will think it sees a *use*, and therefore will trigger all it's
6567
# C support machinery. Also note that it means that autoscan, seeing
6568
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
6572
# _AM_DEPENDENCIES(NAME)
6573
# ----------------------
6574
# See how the compiler implements dependency checking.
6575
# NAME is "CC", "CXX", "GCJ", or "OBJC".
6576
# We try a few techniques and use that to set a single cache variable.
6578
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
6579
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
6580
# dependency, and given that the user is not expected to run this macro,
6581
# just rely on AC_PROG_CC.
6582
AC_DEFUN([_AM_DEPENDENCIES],
6583
[AC_REQUIRE([AM_SET_DEPDIR])dnl
6584
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
6585
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
6586
AC_REQUIRE([AM_DEP_TRACK])dnl
6588
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
6589
[$1], CXX, [depcc="$CXX" am_compiler_list=],
6590
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
6591
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
6592
[depcc="$$1" am_compiler_list=])
6594
AC_CACHE_CHECK([dependency style of $depcc],
6595
[am_cv_$1_dependencies_compiler_type],
6596
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6597
# We make a subdir and do the tests there. Otherwise we can end up
6598
# making bogus files that we don't know about and never remove. For
6599
# instance it was reported that on HP-UX the gcc test will end up
6600
# making a dummy file named `D' -- because `-MD' means `put the output
6603
# Copy depcomp to subdir because otherwise we won't find it if we're
6604
# using a relative directory.
6605
cp "$am_depcomp" conftest.dir
6607
# We will build objects and dependencies in a subdirectory because
6608
# it helps to detect inapplicable dependency modes. For instance
6609
# both Tru64's cc and ICC support -MD to output dependencies as a
6610
# side effect of compilation, but ICC will put the dependencies in
6611
# the current directory while Tru64 will put them in the object
6615
am_cv_$1_dependencies_compiler_type=none
6616
if test "$am_compiler_list" = ""; then
6617
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
6619
for depmode in $am_compiler_list; do
6620
# Setup a source with many dependencies, because some compilers
6621
# like to wrap large dependency lists on column 80 (with \), and
6622
# we should not choose a depcomp mode which is confused by this.
6624
# We need to recreate these files for each test, as the compiler may
6625
# overwrite some of them when testing with obscure command lines.
6626
# This happens at least with the AIX C compiler.
6628
for i in 1 2 3 4 5 6; do
6629
echo '#include "conftst'$i'.h"' >> sub/conftest.c
6630
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6631
# Solaris 8's {/usr,}/bin/sh.
6632
touch sub/conftst$i.h
6634
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6638
# after this tag, mechanisms are not by side-effect, so they'll
6639
# only be used when explicitly requested
6640
if test "x$enable_dependency_tracking" = xyes; then
6648
# We check with `-c' and `-o' for the sake of the "dashmstdout"
6649
# mode. It turns out that the SunPro C++ compiler does not properly
6650
# handle `-M -o', and we need to detect this.
6651
if depmode=$depmode \
6652
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6653
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6654
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
6655
>/dev/null 2>conftest.err &&
6656
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
6657
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
6658
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6659
# icc doesn't choke on unknown options, it will just issue warnings
6660
# or remarks (even with -Werror). So we grep stderr for any message
6661
# that says an option was ignored or not supported.
6662
# When given -MP, icc 7.0 and 7.1 complain thusly:
6663
# icc: Command line warning: ignoring option '-M'; no argument required
6664
# The diagnosis changed in icc 8.0:
6665
# icc: Command line remark: option '-MP' not supported
6666
if (grep 'ignoring option' conftest.err ||
6667
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6668
am_cv_$1_dependencies_compiler_type=$depmode
6677
am_cv_$1_dependencies_compiler_type=none
6680
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
6681
AM_CONDITIONAL([am__fastdep$1], [
6682
test "x$enable_dependency_tracking" != xno \
6683
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
6689
# Choose a directory name for dependency files.
6690
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
6691
AC_DEFUN([AM_SET_DEPDIR],
6692
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
6693
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
6699
AC_DEFUN([AM_DEP_TRACK],
6700
[AC_ARG_ENABLE(dependency-tracking,
6701
[ --disable-dependency-tracking speeds up one-time build
6702
--enable-dependency-tracking do not reject slow dependency extractors])
6703
if test "x$enable_dependency_tracking" != xno; then
6704
am_depcomp="$ac_aux_dir/depcomp"
6707
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
6708
AC_SUBST([AMDEPBACKSLASH])
6711
# Generate code to set up dependency tracking. -*- Autoconf -*-
6713
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
6715
# This program is free software; you can redistribute it and/or modify
6716
# it under the terms of the GNU General Public License as published by
6717
# the Free Software Foundation; either version 2, or (at your option)
6718
# any later version.
6720
# This program is distributed in the hope that it will be useful,
6721
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6722
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6723
# GNU General Public License for more details.
6725
# You should have received a copy of the GNU General Public License
6726
# along with this program; if not, write to the Free Software
6727
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6732
# _AM_OUTPUT_DEPENDENCY_COMMANDS
6733
# ------------------------------
6734
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
6735
[for mf in $CONFIG_FILES; do
6736
# Strip MF so we end up with the name of the file.
6737
mf=`echo "$mf" | sed -e 's/:.*$//'`
6738
# Check whether this is an Automake generated Makefile or not.
6739
# We used to match only the files named `Makefile.in', but
6740
# some people rename them; so instead we look at the file content.
6741
# Grep'ing the first line is not enough: some people post-process
6742
# each Makefile.in and add a new line on top of each file to say so.
6743
# So let's grep whole file.
6744
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
6745
dirpart=`AS_DIRNAME("$mf")`
6749
grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
6750
# Extract the definition of DEP_FILES from the Makefile without
6752
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
6753
test -z "$DEPDIR" && continue
6754
# When using ansi2knr, U may be empty or an underscore; expand it
6755
U=`sed -n 's/^U = //p' < "$mf"`
6756
test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
6757
# We invoke sed twice because it is the simplest approach to
6758
# changing $(DEPDIR) to its actual value in the expansion.
6759
for file in `sed -n '
6760
/^DEP_FILES = .*\\\\$/ {
6769
/^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
6770
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
6771
# Make sure the directory exists.
6772
test -f "$dirpart/$file" && continue
6773
fdir=`AS_DIRNAME(["$file"])`
6774
AS_MKDIR_P([$dirpart/$fdir])
6775
# echo "creating $dirpart/$file"
6776
echo '# dummy' > "$dirpart/$file"
6779
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
6782
# AM_OUTPUT_DEPENDENCY_COMMANDS
6783
# -----------------------------
6784
# This macro should only be invoked once -- use via AC_REQUIRE.
6786
# This code is only required when automatic dependency tracking
6787
# is enabled. FIXME. This creates each `.P' file that we will
6788
# need in order to bootstrap the dependency handling code.
6789
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
6790
[AC_CONFIG_COMMANDS([depfiles],
6791
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
6792
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
6795
# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
6797
# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
6799
# This program is free software; you can redistribute it and/or modify
6800
# it under the terms of the GNU General Public License as published by
6801
# the Free Software Foundation; either version 2, or (at your option)
6802
# any later version.
6804
# This program is distributed in the hope that it will be useful,
6805
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6806
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6807
# GNU General Public License for more details.
6809
# You should have received a copy of the GNU General Public License
6810
# along with this program; if not, write to the Free Software
6811
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6816
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
6817
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
6819
# Do all the work for Automake. -*- Autoconf -*-
6821
# This macro actually does too much some checks are only needed if
6822
# your package does certain things. But this isn't really a big deal.
6824
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
6825
# Free Software Foundation, Inc.
6827
# This program is free software; you can redistribute it and/or modify
6828
# it under the terms of the GNU General Public License as published by
6829
# the Free Software Foundation; either version 2, or (at your option)
6830
# any later version.
6832
# This program is distributed in the hope that it will be useful,
6833
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6834
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6835
# GNU General Public License for more details.
6837
# You should have received a copy of the GNU General Public License
6838
# along with this program; if not, write to the Free Software
6839
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6844
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
6845
# AM_INIT_AUTOMAKE([OPTIONS])
6846
# -----------------------------------------------
6847
# The call with PACKAGE and VERSION arguments is the old style
6848
# call (pre autoconf-2.50), which is being phased out. PACKAGE
6849
# and VERSION should now be passed to AC_INIT and removed from
6850
# the call to AM_INIT_AUTOMAKE.
6851
# We support both call styles for the transition. After
6852
# the next Automake release, Autoconf can make the AC_INIT
6853
# arguments mandatory, and then we can depend on a new Autoconf
6854
# release and drop the old call support.
6855
AC_DEFUN([AM_INIT_AUTOMAKE],
6856
[AC_PREREQ([2.58])dnl
6857
dnl Autoconf wants to disallow AM_ names. We explicitly allow
6858
dnl the ones we care about.
6859
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
6860
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
6861
AC_REQUIRE([AC_PROG_INSTALL])dnl
6862
# test to see if srcdir already configured
6863
if test "`cd $srcdir && pwd`" != "`pwd`" &&
6864
test -f $srcdir/config.status; then
6865
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
6868
# test whether we have cygpath
6869
if test -z "$CYGPATH_W"; then
6870
if (cygpath --version) >/dev/null 2>/dev/null; then
6871
CYGPATH_W='cygpath -w'
6876
AC_SUBST([CYGPATH_W])
6878
# Define the identity of the package.
6879
dnl Distinguish between old-style and new-style calls.
6881
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
6882
AC_SUBST([PACKAGE], [$1])dnl
6883
AC_SUBST([VERSION], [$2])],
6884
[_AM_SET_OPTIONS([$1])dnl
6885
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
6886
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
6888
_AM_IF_OPTION([no-define],,
6889
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
6890
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
6892
# Some tools Automake needs.
6893
AC_REQUIRE([AM_SANITY_CHECK])dnl
6894
AC_REQUIRE([AC_ARG_PROGRAM])dnl
6895
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
6896
AM_MISSING_PROG(AUTOCONF, autoconf)
6897
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
6898
AM_MISSING_PROG(AUTOHEADER, autoheader)
6899
AM_MISSING_PROG(MAKEINFO, makeinfo)
6900
AM_MISSING_PROG(AMTAR, tar)
6902
AM_PROG_INSTALL_STRIP
6903
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
6904
# We need awk for the "check" target. The system "awk" is bad on
6906
AC_REQUIRE([AC_PROG_AWK])dnl
6907
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
6908
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
6910
_AM_IF_OPTION([no-dependencies],,
6911
[AC_PROVIDE_IFELSE([AC_PROG_CC],
6912
[_AM_DEPENDENCIES(CC)],
6913
[define([AC_PROG_CC],
6914
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
6915
AC_PROVIDE_IFELSE([AC_PROG_CXX],
6916
[_AM_DEPENDENCIES(CXX)],
6917
[define([AC_PROG_CXX],
6918
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
6923
# When config.status generates a header, we must update the stamp-h file.
6924
# This file resides in the same directory as the config header
6925
# that is generated. The stamp files are numbered to have different names.
6927
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
6928
# loop where config.status creates the headers, so we can generate
6929
# our stamp files there.
6930
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
6931
[# Compute $1's index in $config_headers.
6933
for _am_header in $config_headers :; do
6938
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
6941
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
6943
# AM_PROG_INSTALL_SH
6944
# ------------------
6945
# Define $install_sh.
6947
# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
6949
# This program is free software; you can redistribute it and/or modify
6950
# it under the terms of the GNU General Public License as published by
6951
# the Free Software Foundation; either version 2, or (at your option)
6952
# any later version.
6954
# This program is distributed in the hope that it will be useful,
6955
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6956
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6957
# GNU General Public License for more details.
6959
# You should have received a copy of the GNU General Public License
6960
# along with this program; if not, write to the Free Software
6961
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6964
AC_DEFUN([AM_PROG_INSTALL_SH],
6965
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
6966
install_sh=${install_sh-"$am_aux_dir/install-sh"}
6967
AC_SUBST(install_sh)])
6970
# Copyright (C) 2003 Free Software Foundation, Inc.
6972
# This program is free software; you can redistribute it and/or modify
6973
# it under the terms of the GNU General Public License as published by
6974
# the Free Software Foundation; either version 2, or (at your option)
6975
# any later version.
6977
# This program is distributed in the hope that it will be useful,
6978
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6979
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6980
# GNU General Public License for more details.
6982
# You should have received a copy of the GNU General Public License
6983
# along with this program; if not, write to the Free Software
6984
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6989
# Check whether the underlying file-system supports filenames
6990
# with a leading dot. For instance MS-DOS doesn't.
6991
AC_DEFUN([AM_SET_LEADING_DOT],
6992
[rm -rf .tst 2>/dev/null
6993
mkdir .tst 2>/dev/null
6994
if test -d .tst; then
6999
rmdir .tst 2>/dev/null
7000
AC_SUBST([am__leading_dot])])
7002
# Check to see how 'make' treats includes. -*- Autoconf -*-
7004
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
7006
# This program is free software; you can redistribute it and/or modify
7007
# it under the terms of the GNU General Public License as published by
7008
# the Free Software Foundation; either version 2, or (at your option)
7009
# any later version.
7011
# This program is distributed in the hope that it will be useful,
7012
# but WITHOUT ANY WARRANTY; without even the implied warranty of
7013
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7014
# GNU General Public License for more details.
7016
# You should have received a copy of the GNU General Public License
7017
# along with this program; if not, write to the Free Software
7018
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7025
# Check to see how make treats includes.
7026
AC_DEFUN([AM_MAKE_INCLUDE],
7027
[am_make=${MAKE-make}
7028
cat > confinc << 'END'
7033
# If we don't find an include directive, just comment out the code.
7034
AC_MSG_CHECKING([for style of include used by $am_make])
7038
# First try GNU make style include.
7039
echo "include confinc" > confmf
7040
# We grep out `Entering directory' and `Leaving directory'
7041
# messages which can occur if `w' ends up in MAKEFLAGS.
7042
# In particular we don't look at `^make:' because GNU make might
7043
# be invoked under some other name (usually "gmake"), in which
7044
# case it prints its new name instead of `make'.
7045
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
7050
# Now try BSD make style include.
7051
if test "$am__include" = "#"; then
7052
echo '.include "confinc"' > confmf
7053
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
7054
am__include=.include
7059
AC_SUBST([am__include])
7060
AC_SUBST([am__quote])
7061
AC_MSG_RESULT([$_am_result])
7062
rm -f confinc confmf
7068
# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
7070
# This program is free software; you can redistribute it and/or modify
7071
# it under the terms of the GNU General Public License as published by
7072
# the Free Software Foundation; either version 2, or (at your option)
7073
# any later version.
7075
# This program is distributed in the hope that it will be useful,
7076
# but WITHOUT ANY WARRANTY; without even the implied warranty of
7077
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7078
# GNU General Public License for more details.
7080
# You should have received a copy of the GNU General Public License
7081
# along with this program; if not, write to the Free Software
7082
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7087
# AM_MISSING_PROG(NAME, PROGRAM)
7088
# ------------------------------
7089
AC_DEFUN([AM_MISSING_PROG],
7090
[AC_REQUIRE([AM_MISSING_HAS_RUN])
7091
$1=${$1-"${am_missing_run}$2"}
7095
# AM_MISSING_HAS_RUN
7096
# ------------------
7097
# Define MISSING if not defined so far and test if it supports --run.
7098
# If it does, set am_missing_run to use it, otherwise, to nothing.
7099
AC_DEFUN([AM_MISSING_HAS_RUN],
7100
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7101
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
7102
# Use eval to expand $SHELL
7103
if eval "$MISSING --run true"; then
7104
am_missing_run="$MISSING --run "
7107
AC_MSG_WARN([`missing' script is too old or missing])
7113
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
7115
# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
7117
# This program is free software; you can redistribute it and/or modify
7118
# it under the terms of the GNU General Public License as published by
7119
# the Free Software Foundation; either version 2, or (at your option)
7120
# any later version.
7122
# This program is distributed in the hope that it will be useful,
7123
# but WITHOUT ANY WARRANTY; without even the implied warranty of
7124
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7125
# GNU General Public License for more details.
7127
# You should have received a copy of the GNU General Public License
7128
# along with this program; if not, write to the Free Software
7129
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7132
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
7133
# created by `make install' are always world readable, even if the
7134
# installer happens to have an overly restrictive umask (e.g. 077).
7135
# This was a mistake. There are at least two reasons why we must not
7137
# - it causes special bits like SGID to be ignored,
7138
# - it may be too restrictive (some setups expect 775 directories).
7140
# Do not use -m 0755 and let people choose whatever they expect by
7143
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
7144
# Some implementations (such as Solaris 8's) are not thread-safe: if a
7145
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
7146
# concurrently, both version can detect that a/ is missing, but only
7147
# one can create it and the other will error out. Consequently we
7148
# restrict ourselves to GNU make (using the --version option ensures
7150
AC_DEFUN([AM_PROG_MKDIR_P],
7151
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
7152
# Keeping the `.' argument allows $(mkdir_p) to be used without
7153
# argument. Indeed, we sometimes output rules like
7154
# $(mkdir_p) $(somedir)
7155
# where $(somedir) is conditionally defined.
7156
# (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more
7157
# expensive solution, as it forces Make to start a sub-shell.)
7158
mkdir_p='mkdir -p -- .'
7160
# On NextStep and OpenStep, the `mkdir' command does not
7161
# recognize any option. It will interpret all options as
7162
# directories to create, and then abort because `.' already
7164
for d in ./-p ./--version;
7166
test -d $d && rmdir $d
7168
# $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
7169
if test -f "$ac_aux_dir/mkinstalldirs"; then
7170
mkdir_p='$(mkinstalldirs)'
7172
mkdir_p='$(install_sh) -d'
7175
AC_SUBST([mkdir_p])])
7177
# Helper functions for option handling. -*- Autoconf -*-
7179
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
7181
# This program is free software; you can redistribute it and/or modify
7182
# it under the terms of the GNU General Public License as published by
7183
# the Free Software Foundation; either version 2, or (at your option)
7184
# any later version.
7186
# This program is distributed in the hope that it will be useful,
7187
# but WITHOUT ANY WARRANTY; without even the implied warranty of
7188
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7189
# GNU General Public License for more details.
7191
# You should have received a copy of the GNU General Public License
7192
# along with this program; if not, write to the Free Software
7193
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7198
# _AM_MANGLE_OPTION(NAME)
7199
# -----------------------
7200
AC_DEFUN([_AM_MANGLE_OPTION],
7201
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
7203
# _AM_SET_OPTION(NAME)
7204
# ------------------------------
7205
# Set option NAME. Presently that only means defining a flag for this option.
7206
AC_DEFUN([_AM_SET_OPTION],
7207
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
7209
# _AM_SET_OPTIONS(OPTIONS)
7210
# ----------------------------------
7211
# OPTIONS is a space-separated list of Automake options.
7212
AC_DEFUN([_AM_SET_OPTIONS],
7213
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
7215
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
7216
# -------------------------------------------
7217
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
7218
AC_DEFUN([_AM_IF_OPTION],
7219
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
7222
# Check to make sure that the build environment is sane.
7225
# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
7227
# This program is free software; you can redistribute it and/or modify
7228
# it under the terms of the GNU General Public License as published by
7229
# the Free Software Foundation; either version 2, or (at your option)
7230
# any later version.
7232
# This program is distributed in the hope that it will be useful,
7233
# but WITHOUT ANY WARRANTY; without even the implied warranty of
7234
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7235
# GNU General Public License for more details.
7237
# You should have received a copy of the GNU General Public License
7238
# along with this program; if not, write to the Free Software
7239
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7246
AC_DEFUN([AM_SANITY_CHECK],
7247
[AC_MSG_CHECKING([whether build environment is sane])
7250
echo timestamp > conftest.file
7251
# Do `set' in a subshell so we don't clobber the current shell's
7252
# arguments. Must try -L first in case configure is actually a
7253
# symlink; some systems play weird games with the mod time of symlinks
7254
# (eg FreeBSD returns the mod time of the symlink's containing
7257
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
7258
if test "$[*]" = "X"; then
7260
set X `ls -t $srcdir/configure conftest.file`
7263
if test "$[*]" != "X $srcdir/configure conftest.file" \
7264
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
7266
# If neither matched, then we have a broken ls. This can happen
7267
# if, for instance, CONFIG_SHELL is bash and it inherits a
7268
# broken ls alias from the environment. This has actually
7269
# happened. Such a system could not be considered "sane".
7270
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
7271
alias in your environment])
7274
test "$[2]" = conftest.file
7280
AC_MSG_ERROR([newly created file is older than distributed files!
7281
Check your system clock])
7283
AC_MSG_RESULT(yes)])
7285
# AM_PROG_INSTALL_STRIP
7287
# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
7289
# This program is free software; you can redistribute it and/or modify
7290
# it under the terms of the GNU General Public License as published by
7291
# the Free Software Foundation; either version 2, or (at your option)
7292
# any later version.
7294
# This program is distributed in the hope that it will be useful,
7295
# but WITHOUT ANY WARRANTY; without even the implied warranty of
7296
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7297
# GNU General Public License for more details.
7299
# You should have received a copy of the GNU General Public License
7300
# along with this program; if not, write to the Free Software
7301
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7304
# One issue with vendor `install' (even GNU) is that you can't
7305
# specify the program used to strip binaries. This is especially
7306
# annoying in cross-compiling environments, where the build's strip
7307
# is unlikely to handle the host's binaries.
7308
# Fortunately install-sh will honor a STRIPPROG variable, so we
7309
# always use install-sh in `make install-strip', and initialize
7310
# STRIPPROG with the value of the STRIP variable (set by the user).
7311
AC_DEFUN([AM_PROG_INSTALL_STRIP],
7312
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
7313
# Installed binaries are usually stripped using `strip' when the user
7314
# run `make install-strip'. However `strip' might not be the right
7315
# tool to use in cross-compilation environments, therefore Automake
7316
# will honor the `STRIP' environment variable to overrule this program.
7317
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
7318
if test "$cross_compiling" != no; then
7319
AC_CHECK_TOOL([STRIP], [strip], :)
7321
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
7322
AC_SUBST([INSTALL_STRIP_PROGRAM])])