1
# generated automatically by aclocal 1.7.8 -*- Autoconf -*-
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
4
# Free Software Foundation, Inc.
5
# This file is free software; the Free Software Foundation
6
# gives unlimited permission to copy and/or distribute it,
7
# with or without modifications, as long as this notice is preserved.
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14
# Do all the work for Automake. -*- Autoconf -*-
16
# This macro actually does too much some checks are only needed if
17
# your package does certain things. But this isn't really a big deal.
19
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
20
# Free Software Foundation, Inc.
22
# This program is free software; you can redistribute it and/or modify
23
# it under the terms of the GNU General Public License as published by
24
# the Free Software Foundation; either version 2, or (at your option)
27
# This program is distributed in the hope that it will be useful,
28
# but WITHOUT ANY WARRANTY; without even the implied warranty of
29
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30
# GNU General Public License for more details.
32
# You should have received a copy of the GNU General Public License
33
# along with this program; if not, write to the Free Software
34
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
41
# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
42
# the ones we care about.
43
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
45
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
46
# AM_INIT_AUTOMAKE([OPTIONS])
47
# -----------------------------------------------
48
# The call with PACKAGE and VERSION arguments is the old style
49
# call (pre autoconf-2.50), which is being phased out. PACKAGE
50
# and VERSION should now be passed to AC_INIT and removed from
51
# the call to AM_INIT_AUTOMAKE.
52
# We support both call styles for the transition. After
53
# the next Automake release, Autoconf can make the AC_INIT
54
# arguments mandatory, and then we can depend on a new Autoconf
55
# release and drop the old call support.
56
AC_DEFUN([AM_INIT_AUTOMAKE],
57
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
58
AC_REQUIRE([AC_PROG_INSTALL])dnl
59
# test to see if srcdir already configured
60
if test "`cd $srcdir && pwd`" != "`pwd`" &&
61
test -f $srcdir/config.status; then
62
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
65
# test whether we have cygpath
66
if test -z "$CYGPATH_W"; then
67
if (cygpath --version) >/dev/null 2>/dev/null; then
68
CYGPATH_W='cygpath -w'
75
# Define the identity of the package.
76
dnl Distinguish between old-style and new-style calls.
78
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
79
AC_SUBST([PACKAGE], [$1])dnl
80
AC_SUBST([VERSION], [$2])],
81
[_AM_SET_OPTIONS([$1])dnl
82
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
83
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
85
_AM_IF_OPTION([no-define],,
86
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
87
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
89
# Some tools Automake needs.
90
AC_REQUIRE([AM_SANITY_CHECK])dnl
91
AC_REQUIRE([AC_ARG_PROGRAM])dnl
92
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
93
AM_MISSING_PROG(AUTOCONF, autoconf)
94
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
95
AM_MISSING_PROG(AUTOHEADER, autoheader)
96
AM_MISSING_PROG(MAKEINFO, makeinfo)
97
AM_MISSING_PROG(AMTAR, tar)
100
# We need awk for the "check" target. The system "awk" is bad on
102
AC_REQUIRE([AC_PROG_AWK])dnl
103
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
104
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
106
_AM_IF_OPTION([no-dependencies],,
107
[AC_PROVIDE_IFELSE([AC_PROG_CC],
108
[_AM_DEPENDENCIES(CC)],
109
[define([AC_PROG_CC],
110
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
111
AC_PROVIDE_IFELSE([AC_PROG_CXX],
112
[_AM_DEPENDENCIES(CXX)],
113
[define([AC_PROG_CXX],
114
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
119
# When config.status generates a header, we must update the stamp-h file.
120
# This file resides in the same directory as the config header
121
# that is generated. The stamp files are numbered to have different names.
123
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
124
# loop where config.status creates the headers, so we can generate
125
# our stamp files there.
126
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
127
[# Compute $1's index in $config_headers.
129
for _am_header in $config_headers :; do
134
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
137
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
139
# Copyright 2002 Free Software Foundation, Inc.
141
# This program is free software; you can redistribute it and/or modify
142
# it under the terms of the GNU General Public License as published by
143
# the Free Software Foundation; either version 2, or (at your option)
146
# This program is distributed in the hope that it will be useful,
147
# but WITHOUT ANY WARRANTY; without even the implied warranty of
148
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
149
# GNU General Public License for more details.
151
# You should have received a copy of the GNU General Public License
152
# along with this program; if not, write to the Free Software
153
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
155
# AM_AUTOMAKE_VERSION(VERSION)
156
# ----------------------------
157
# Automake X.Y traces this macro to ensure aclocal.m4 has been
158
# generated from the m4 files accompanying Automake X.Y.
159
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
161
# AM_SET_CURRENT_AUTOMAKE_VERSION
162
# -------------------------------
163
# Call AM_AUTOMAKE_VERSION so it can be traced.
164
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
165
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
166
[AM_AUTOMAKE_VERSION([1.7.8])])
168
# Helper functions for option handling. -*- Autoconf -*-
170
# Copyright 2001, 2002 Free Software Foundation, Inc.
172
# This program is free software; you can redistribute it and/or modify
173
# it under the terms of the GNU General Public License as published by
174
# the Free Software Foundation; either version 2, or (at your option)
177
# This program is distributed in the hope that it will be useful,
178
# but WITHOUT ANY WARRANTY; without even the implied warranty of
179
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
180
# GNU General Public License for more details.
182
# You should have received a copy of the GNU General Public License
183
# along with this program; if not, write to the Free Software
184
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
189
# _AM_MANGLE_OPTION(NAME)
190
# -----------------------
191
AC_DEFUN([_AM_MANGLE_OPTION],
192
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
194
# _AM_SET_OPTION(NAME)
195
# ------------------------------
196
# Set option NAME. Presently that only means defining a flag for this option.
197
AC_DEFUN([_AM_SET_OPTION],
198
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
200
# _AM_SET_OPTIONS(OPTIONS)
201
# ----------------------------------
202
# OPTIONS is a space-separated list of Automake options.
203
AC_DEFUN([_AM_SET_OPTIONS],
204
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
206
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
207
# -------------------------------------------
208
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
209
AC_DEFUN([_AM_IF_OPTION],
210
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
213
# Check to make sure that the build environment is sane.
216
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
218
# This program is free software; you can redistribute it and/or modify
219
# it under the terms of the GNU General Public License as published by
220
# the Free Software Foundation; either version 2, or (at your option)
223
# This program is distributed in the hope that it will be useful,
224
# but WITHOUT ANY WARRANTY; without even the implied warranty of
225
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
226
# GNU General Public License for more details.
228
# You should have received a copy of the GNU General Public License
229
# along with this program; if not, write to the Free Software
230
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
237
AC_DEFUN([AM_SANITY_CHECK],
238
[AC_MSG_CHECKING([whether build environment is sane])
241
echo timestamp > conftest.file
242
# Do `set' in a subshell so we don't clobber the current shell's
243
# arguments. Must try -L first in case configure is actually a
244
# symlink; some systems play weird games with the mod time of symlinks
245
# (eg FreeBSD returns the mod time of the symlink's containing
248
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
249
if test "$[*]" = "X"; then
251
set X `ls -t $srcdir/configure conftest.file`
254
if test "$[*]" != "X $srcdir/configure conftest.file" \
255
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
257
# If neither matched, then we have a broken ls. This can happen
258
# if, for instance, CONFIG_SHELL is bash and it inherits a
259
# broken ls alias from the environment. This has actually
260
# happened. Such a system could not be considered "sane".
261
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
262
alias in your environment])
265
test "$[2]" = conftest.file
271
AC_MSG_ERROR([newly created file is older than distributed files!
272
Check your system clock])
279
# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
281
# This program is free software; you can redistribute it and/or modify
282
# it under the terms of the GNU General Public License as published by
283
# the Free Software Foundation; either version 2, or (at your option)
286
# This program is distributed in the hope that it will be useful,
287
# but WITHOUT ANY WARRANTY; without even the implied warranty of
288
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
289
# GNU General Public License for more details.
291
# You should have received a copy of the GNU General Public License
292
# along with this program; if not, write to the Free Software
293
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
298
# AM_MISSING_PROG(NAME, PROGRAM)
299
# ------------------------------
300
AC_DEFUN([AM_MISSING_PROG],
301
[AC_REQUIRE([AM_MISSING_HAS_RUN])
302
$1=${$1-"${am_missing_run}$2"}
308
# Define MISSING if not defined so far and test if it supports --run.
309
# If it does, set am_missing_run to use it, otherwise, to nothing.
310
AC_DEFUN([AM_MISSING_HAS_RUN],
311
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
312
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
313
# Use eval to expand $SHELL
314
if eval "$MISSING --run true"; then
315
am_missing_run="$MISSING --run "
318
AC_MSG_WARN([`missing' script is too old or missing])
324
# Copyright 2001 Free Software Foundation, Inc.
326
# This program is free software; you can redistribute it and/or modify
327
# it under the terms of the GNU General Public License as published by
328
# the Free Software Foundation; either version 2, or (at your option)
331
# This program is distributed in the hope that it will be useful,
332
# but WITHOUT ANY WARRANTY; without even the implied warranty of
333
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
334
# GNU General Public License for more details.
336
# You should have received a copy of the GNU General Public License
337
# along with this program; if not, write to the Free Software
338
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
341
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
342
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
343
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
345
# Of course, Automake must honor this variable whenever it calls a
346
# tool from the auxiliary directory. The problem is that $srcdir (and
347
# therefore $ac_aux_dir as well) can be either absolute or relative,
348
# depending on how configure is run. This is pretty annoying, since
349
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
350
# source directory, any form will work fine, but in subdirectories a
351
# relative path needs to be adjusted first.
353
# $ac_aux_dir/missing
354
# fails when called from a subdirectory if $ac_aux_dir is relative
355
# $top_srcdir/$ac_aux_dir/missing
356
# fails if $ac_aux_dir is absolute,
357
# fails when called from a subdirectory in a VPATH build with
358
# a relative $ac_aux_dir
360
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
361
# are both prefixed by $srcdir. In an in-source build this is usually
362
# harmless because $srcdir is `.', but things will broke when you
363
# start a VPATH build or use an absolute $srcdir.
365
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
366
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
367
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
368
# and then we would define $MISSING as
369
# MISSING="\${SHELL} $am_aux_dir/missing"
370
# This will work as long as MISSING is not called from configure, because
371
# unfortunately $(top_srcdir) has no meaning in configure.
372
# However there are other variables, like CC, which are often used in
373
# configure, and could therefore not use this "fixed" $ac_aux_dir.
375
# Another solution, used here, is to always expand $ac_aux_dir to an
376
# absolute PATH. The drawback is that using absolute paths prevent a
377
# configured tree to be moved without reconfiguration.
379
# Rely on autoconf to set up CDPATH properly.
382
AC_DEFUN([AM_AUX_DIR_EXPAND], [
383
# expand $ac_aux_dir to an absolute path
384
am_aux_dir=`cd $ac_aux_dir && pwd`
389
# Define $install_sh.
391
# Copyright 2001 Free Software Foundation, Inc.
393
# This program is free software; you can redistribute it and/or modify
394
# it under the terms of the GNU General Public License as published by
395
# the Free Software Foundation; either version 2, or (at your option)
398
# This program is distributed in the hope that it will be useful,
399
# but WITHOUT ANY WARRANTY; without even the implied warranty of
400
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
401
# GNU General Public License for more details.
403
# You should have received a copy of the GNU General Public License
404
# along with this program; if not, write to the Free Software
405
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
408
AC_DEFUN([AM_PROG_INSTALL_SH],
409
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
410
install_sh=${install_sh-"$am_aux_dir/install-sh"}
411
AC_SUBST(install_sh)])
413
# AM_PROG_INSTALL_STRIP
415
# Copyright 2001 Free Software Foundation, Inc.
417
# This program is free software; you can redistribute it and/or modify
418
# it under the terms of the GNU General Public License as published by
419
# the Free Software Foundation; either version 2, or (at your option)
422
# This program is distributed in the hope that it will be useful,
423
# but WITHOUT ANY WARRANTY; without even the implied warranty of
424
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
425
# GNU General Public License for more details.
427
# You should have received a copy of the GNU General Public License
428
# along with this program; if not, write to the Free Software
429
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
432
# One issue with vendor `install' (even GNU) is that you can't
433
# specify the program used to strip binaries. This is especially
434
# annoying in cross-compiling environments, where the build's strip
435
# is unlikely to handle the host's binaries.
436
# Fortunately install-sh will honor a STRIPPROG variable, so we
437
# always use install-sh in `make install-strip', and initialize
438
# STRIPPROG with the value of the STRIP variable (set by the user).
439
AC_DEFUN([AM_PROG_INSTALL_STRIP],
440
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
441
# Installed binaries are usually stripped using `strip' when the user
442
# run `make install-strip'. However `strip' might not be the right
443
# tool to use in cross-compilation environments, therefore Automake
444
# will honor the `STRIP' environment variable to overrule this program.
445
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
446
if test "$cross_compiling" != no; then
447
AC_CHECK_TOOL([STRIP], [strip], :)
449
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
450
AC_SUBST([INSTALL_STRIP_PROGRAM])])
453
# Copyright (C) 2003 Free Software Foundation, Inc.
455
# This program is free software; you can redistribute it and/or modify
456
# it under the terms of the GNU General Public License as published by
457
# the Free Software Foundation; either version 2, or (at your option)
460
# This program is distributed in the hope that it will be useful,
461
# but WITHOUT ANY WARRANTY; without even the implied warranty of
462
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
463
# GNU General Public License for more details.
465
# You should have received a copy of the GNU General Public License
466
# along with this program; if not, write to the Free Software
467
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
472
# Check whether the underlying file-system supports filenames
473
# with a leading dot. For instance MS-DOS doesn't.
474
AC_DEFUN([AM_SET_LEADING_DOT],
475
[rm -rf .tst 2>/dev/null
476
mkdir .tst 2>/dev/null
477
if test -d .tst; then
482
rmdir .tst 2>/dev/null
483
AC_SUBST([am__leading_dot])])
485
# serial 5 -*- Autoconf -*-
487
# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
489
# This program is free software; you can redistribute it and/or modify
490
# it under the terms of the GNU General Public License as published by
491
# the Free Software Foundation; either version 2, or (at your option)
494
# This program is distributed in the hope that it will be useful,
495
# but WITHOUT ANY WARRANTY; without even the implied warranty of
496
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
497
# GNU General Public License for more details.
499
# You should have received a copy of the GNU General Public License
500
# along with this program; if not, write to the Free Software
501
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
505
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
506
# written in clear, in which case automake, when reading aclocal.m4,
507
# will think it sees a *use*, and therefore will trigger all it's
508
# C support machinery. Also note that it means that autoscan, seeing
509
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
513
# _AM_DEPENDENCIES(NAME)
514
# ----------------------
515
# See how the compiler implements dependency checking.
516
# NAME is "CC", "CXX", "GCJ", or "OBJC".
517
# We try a few techniques and use that to set a single cache variable.
519
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
520
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
521
# dependency, and given that the user is not expected to run this macro,
522
# just rely on AC_PROG_CC.
523
AC_DEFUN([_AM_DEPENDENCIES],
524
[AC_REQUIRE([AM_SET_DEPDIR])dnl
525
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
526
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
527
AC_REQUIRE([AM_DEP_TRACK])dnl
529
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
530
[$1], CXX, [depcc="$CXX" am_compiler_list=],
531
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
532
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
533
[depcc="$$1" am_compiler_list=])
535
AC_CACHE_CHECK([dependency style of $depcc],
536
[am_cv_$1_dependencies_compiler_type],
537
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
538
# We make a subdir and do the tests there. Otherwise we can end up
539
# making bogus files that we don't know about and never remove. For
540
# instance it was reported that on HP-UX the gcc test will end up
541
# making a dummy file named `D' -- because `-MD' means `put the output
544
# Copy depcomp to subdir because otherwise we won't find it if we're
545
# using a relative directory.
546
cp "$am_depcomp" conftest.dir
548
# We will build objects and dependencies in a subdirectory because
549
# it helps to detect inapplicable dependency modes. For instance
550
# both Tru64's cc and ICC support -MD to output dependencies as a
551
# side effect of compilation, but ICC will put the dependencies in
552
# the current directory while Tru64 will put them in the object
556
am_cv_$1_dependencies_compiler_type=none
557
if test "$am_compiler_list" = ""; then
558
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
560
for depmode in $am_compiler_list; do
561
# Setup a source with many dependencies, because some compilers
562
# like to wrap large dependency lists on column 80 (with \), and
563
# we should not choose a depcomp mode which is confused by this.
565
# We need to recreate these files for each test, as the compiler may
566
# overwrite some of them when testing with obscure command lines.
567
# This happens at least with the AIX C compiler.
569
for i in 1 2 3 4 5 6; do
570
echo '#include "conftst'$i'.h"' >> sub/conftest.c
573
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
577
# after this tag, mechanisms are not by side-effect, so they'll
578
# only be used when explicitly requested
579
if test "x$enable_dependency_tracking" = xyes; then
587
# We check with `-c' and `-o' for the sake of the "dashmstdout"
588
# mode. It turns out that the SunPro C++ compiler does not properly
589
# handle `-M -o', and we need to detect this.
590
if depmode=$depmode \
591
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
592
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
593
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
594
>/dev/null 2>conftest.err &&
595
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
596
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
597
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
598
# icc doesn't choke on unknown options, it will just issue warnings
599
# (even with -Werror). So we grep stderr for any message
600
# that says an option was ignored.
601
if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
602
am_cv_$1_dependencies_compiler_type=$depmode
611
am_cv_$1_dependencies_compiler_type=none
614
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
615
AM_CONDITIONAL([am__fastdep$1], [
616
test "x$enable_dependency_tracking" != xno \
617
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
623
# Choose a directory name for dependency files.
624
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
625
AC_DEFUN([AM_SET_DEPDIR],
626
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
627
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
633
AC_DEFUN([AM_DEP_TRACK],
634
[AC_ARG_ENABLE(dependency-tracking,
635
[ --disable-dependency-tracking Speeds up one-time builds
636
--enable-dependency-tracking Do not reject slow dependency extractors])
637
if test "x$enable_dependency_tracking" != xno; then
638
am_depcomp="$ac_aux_dir/depcomp"
641
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
642
AC_SUBST([AMDEPBACKSLASH])
645
# Generate code to set up dependency tracking. -*- Autoconf -*-
647
# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
649
# This program is free software; you can redistribute it and/or modify
650
# it under the terms of the GNU General Public License as published by
651
# the Free Software Foundation; either version 2, or (at your option)
654
# This program is distributed in the hope that it will be useful,
655
# but WITHOUT ANY WARRANTY; without even the implied warranty of
656
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
657
# GNU General Public License for more details.
659
# You should have received a copy of the GNU General Public License
660
# along with this program; if not, write to the Free Software
661
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
666
# _AM_OUTPUT_DEPENDENCY_COMMANDS
667
# ------------------------------
668
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
669
[for mf in $CONFIG_FILES; do
670
# Strip MF so we end up with the name of the file.
671
mf=`echo "$mf" | sed -e 's/:.*$//'`
672
# Check whether this is an Automake generated Makefile or not.
673
# We used to match only the files named `Makefile.in', but
674
# some people rename them; so instead we look at the file content.
675
# Grep'ing the first line is not enough: some people post-process
676
# each Makefile.in and add a new line on top of each file to say so.
677
# So let's grep whole file.
678
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
679
dirpart=`AS_DIRNAME("$mf")`
683
grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
684
# Extract the definition of DEP_FILES from the Makefile without
686
DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
687
test -z "$DEPDIR" && continue
688
# When using ansi2knr, U may be empty or an underscore; expand it
689
U=`sed -n -e '/^U = / s///p' < "$mf"`
690
test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
691
# We invoke sed twice because it is the simplest approach to
692
# changing $(DEPDIR) to its actual value in the expansion.
693
for file in `sed -n -e '
694
/^DEP_FILES = .*\\\\$/ {
703
/^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
704
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
705
# Make sure the directory exists.
706
test -f "$dirpart/$file" && continue
707
fdir=`AS_DIRNAME(["$file"])`
708
AS_MKDIR_P([$dirpart/$fdir])
709
# echo "creating $dirpart/$file"
710
echo '# dummy' > "$dirpart/$file"
713
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
716
# AM_OUTPUT_DEPENDENCY_COMMANDS
717
# -----------------------------
718
# This macro should only be invoked once -- use via AC_REQUIRE.
720
# This code is only required when automatic dependency tracking
721
# is enabled. FIXME. This creates each `.P' file that we will
722
# need in order to bootstrap the dependency handling code.
723
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
724
[AC_CONFIG_COMMANDS([depfiles],
725
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
726
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
729
# Check to see how 'make' treats includes. -*- Autoconf -*-
731
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
733
# This program is free software; you can redistribute it and/or modify
734
# it under the terms of the GNU General Public License as published by
735
# the Free Software Foundation; either version 2, or (at your option)
738
# This program is distributed in the hope that it will be useful,
739
# but WITHOUT ANY WARRANTY; without even the implied warranty of
740
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
741
# GNU General Public License for more details.
743
# You should have received a copy of the GNU General Public License
744
# along with this program; if not, write to the Free Software
745
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
752
# Check to see how make treats includes.
753
AC_DEFUN([AM_MAKE_INCLUDE],
754
[am_make=${MAKE-make}
755
cat > confinc << 'END'
760
# If we don't find an include directive, just comment out the code.
761
AC_MSG_CHECKING([for style of include used by $am_make])
765
# First try GNU make style include.
766
echo "include confinc" > confmf
767
# We grep out `Entering directory' and `Leaving directory'
768
# messages which can occur if `w' ends up in MAKEFLAGS.
769
# In particular we don't look at `^make:' because GNU make might
770
# be invoked under some other name (usually "gmake"), in which
771
# case it prints its new name instead of `make'.
772
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
777
# Now try BSD make style include.
778
if test "$am__include" = "#"; then
779
echo '.include "confinc"' > confmf
780
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
786
AC_SUBST([am__include])
787
AC_SUBST([am__quote])
788
AC_MSG_RESULT([$_am_result])
792
# AM_CONDITIONAL -*- Autoconf -*-
794
# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
796
# This program is free software; you can redistribute it and/or modify
797
# it under the terms of the GNU General Public License as published by
798
# the Free Software Foundation; either version 2, or (at your option)
801
# This program is distributed in the hope that it will be useful,
802
# but WITHOUT ANY WARRANTY; without even the implied warranty of
803
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
804
# GNU General Public License for more details.
806
# You should have received a copy of the GNU General Public License
807
# along with this program; if not, write to the Free Software
808
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
815
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
816
# -------------------------------------
817
# Define a conditional.
818
AC_DEFUN([AM_CONDITIONAL],
819
[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
820
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
830
AC_CONFIG_COMMANDS_PRE(
831
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
832
AC_MSG_ERROR([conditional "$1" was never defined.
833
Usually this means the macro was only invoked conditionally.])
836
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
838
# serial 47 AC_PROG_LIBTOOL
841
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
842
# -----------------------------------------------------------
843
# If this macro is not defined by Autoconf, define it here.
844
m4_ifdef([AC_PROVIDE_IFELSE],
846
[m4_define([AC_PROVIDE_IFELSE],
847
[m4_ifdef([AC_PROVIDE_$1],
853
AC_DEFUN([AC_PROG_LIBTOOL],
854
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
855
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
856
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
857
AC_PROVIDE_IFELSE([AC_PROG_CXX],
859
[define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
861
dnl And a similar setup for Fortran 77 support
862
AC_PROVIDE_IFELSE([AC_PROG_F77],
864
[define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
867
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
868
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
869
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
870
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
872
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
874
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
876
[ifdef([AC_PROG_GCJ],
877
[define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
878
ifdef([A][M_PROG_GCJ],
879
[define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
880
ifdef([LT_AC_PROG_GCJ],
881
[define([LT_AC_PROG_GCJ],
882
defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
883
])])# AC_PROG_LIBTOOL
888
AC_DEFUN([_AC_PROG_LIBTOOL],
889
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
890
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
891
AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
892
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
894
# This can be used to rebuild libtool when needed
895
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
897
# Always use our own libtool.
898
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
901
# Prevent multiple expansion
902
define([AC_PROG_LIBTOOL], [])
908
AC_DEFUN([AC_LIBTOOL_SETUP],
910
AC_REQUIRE([AC_ENABLE_SHARED])dnl
911
AC_REQUIRE([AC_ENABLE_STATIC])dnl
912
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
913
AC_REQUIRE([AC_CANONICAL_HOST])dnl
914
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
915
AC_REQUIRE([AC_PROG_CC])dnl
916
AC_REQUIRE([AC_PROG_LD])dnl
917
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
918
AC_REQUIRE([AC_PROG_NM])dnl
920
AC_REQUIRE([AC_PROG_LN_S])dnl
921
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
922
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
923
AC_REQUIRE([AC_OBJEXT])dnl
924
AC_REQUIRE([AC_EXEEXT])dnl
927
AC_LIBTOOL_SYS_MAX_CMD_LEN
928
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
931
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
932
_LT_AC_PROG_ECHO_BACKSLASH
936
# AIX sometimes has problems with the GCC collect2 program. For some
937
# reason, if we set the COLLECT_NAMES environment variable, the problems
938
# vanish in a puff of smoke.
939
if test "X${COLLECT_NAMES+set}" != Xset; then
946
# Sed substitution that helps us do robust quoting. It backslashifies
947
# metacharacters that are still active within double-quoted strings.
949
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
951
# Same as above, but do not quote variable references.
952
[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
954
# Sed substitution to delay expansion of an escaped shell variable in a
955
# double_quote_subst'ed string.
956
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
958
# Sed substitution to avoid accidental globbing in evaled expressions
959
no_glob_subst='s/\*/\\\*/g'
965
default_ofile=libtool
968
# All known linkers require a `.a' archive for static linking (except M$VC,
969
# which needs '.lib').
971
ltmain="$ac_aux_dir/ltmain.sh"
972
ofile="$default_ofile"
973
with_gnu_ld="$lt_cv_prog_gnu_ld"
975
AC_CHECK_TOOL(AR, ar, false)
976
AC_CHECK_TOOL(RANLIB, ranlib, :)
977
AC_CHECK_TOOL(STRIP, strip, :)
982
# Set sane defaults for various variables
983
test -z "$AR" && AR=ar
984
test -z "$AR_FLAGS" && AR_FLAGS=cru
985
test -z "$AS" && AS=as
986
test -z "$CC" && CC=cc
987
test -z "$LTCC" && LTCC=$CC
988
test -z "$DLLTOOL" && DLLTOOL=dlltool
989
test -z "$LD" && LD=ld
990
test -z "$LN_S" && LN_S="ln -s"
991
test -z "$MAGIC_CMD" && MAGIC_CMD=file
992
test -z "$NM" && NM=nm
993
test -z "$SED" && SED=sed
994
test -z "$OBJDUMP" && OBJDUMP=objdump
995
test -z "$RANLIB" && RANLIB=:
996
test -z "$STRIP" && STRIP=:
997
test -z "$ac_objext" && ac_objext=o
999
# Determine commands to create old-style static archives.
1000
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1001
old_postinstall_cmds='chmod 644 $oldlib'
1002
old_postuninstall_cmds=
1004
if test -n "$RANLIB"; then
1007
old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1010
old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1013
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1016
# Only perform the check for file, if the check method requires it
1017
case $deplibs_check_method in
1019
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1025
AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1026
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1027
enable_win32_dll=yes, enable_win32_dll=no)
1029
AC_ARG_ENABLE([libtool-lock],
1030
[AC_HELP_STRING([--disable-libtool-lock],
1031
[avoid locking (might break parallel builds)])])
1032
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1035
[AC_HELP_STRING([--with-pic],
1036
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
1037
[pic_mode="$withval"],
1039
test -z "$pic_mode" && pic_mode=default
1041
# Use C for the default configuration in the libtool script
1043
AC_LIBTOOL_LANG_C_CONFIG
1045
])# AC_LIBTOOL_SETUP
1048
# _LT_AC_SYS_COMPILER
1049
# -------------------
1050
AC_DEFUN([_LT_AC_SYS_COMPILER],
1051
[AC_REQUIRE([AC_PROG_CC])dnl
1053
# If no C compiler was specified, use CC.
1056
# Allow CC to be a program name with arguments.
1058
])# _LT_AC_SYS_COMPILER
1061
# _LT_AC_SYS_LIBPATH_AIX
1062
# ----------------------
1063
# Links a minimal program and checks the executable
1064
# for the system default hardcoded library path. In most cases,
1065
# this is /usr/lib:/lib, but when the MPI compilers are used
1066
# the location of the communication and MPI libs are included too.
1067
# If we don't find anything, use the default library path according
1068
# to the aix ld manual.
1069
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
1070
[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1071
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
1073
# Check for a 64-bit object if we didn't find anything.
1074
if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
1076
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1077
])# _LT_AC_SYS_LIBPATH_AIX
1080
# _LT_AC_SHELL_INIT(ARG)
1081
# ----------------------
1082
AC_DEFUN([_LT_AC_SHELL_INIT],
1083
[ifdef([AC_DIVERSION_NOTICE],
1084
[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1085
[AC_DIVERT_PUSH(NOTICE)])
1088
])# _LT_AC_SHELL_INIT
1091
# _LT_AC_PROG_ECHO_BACKSLASH
1092
# --------------------------
1093
# Add some code to the start of the generated configure script which
1094
# will find an echo command which doesn't interpret backslashes.
1095
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1096
[_LT_AC_SHELL_INIT([
1097
# Check that we are running under the correct shell.
1098
SHELL=${CONFIG_SHELL-/bin/sh}
1102
# Remove one level of quotation (which was required for Make).
1103
ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1108
if test "X[$]1" = X--no-reexec; then
1109
# Discard the --no-reexec flag, and continue.
1111
elif test "X[$]1" = X--fallback-echo; then
1112
# Avoid inline document here, it may be left over
1114
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
1115
# Yippee, $echo works!
1118
# Restart under the correct shell.
1119
exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1122
if test "X[$]1" = X--fallback-echo; then
1123
# used as fallback echo
1131
# The HP-UX ksh and POSIX shell print the target directory to stdout
1133
if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
1135
if test -z "$ECHO"; then
1136
if test "X${echo_test_string+set}" != Xset; then
1137
# find a string as large as possible, as long as the shell can cope with it
1138
for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1139
# expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1140
if (echo_test_string="`eval $cmd`") 2>/dev/null &&
1141
echo_test_string="`eval $cmd`" &&
1142
(test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1149
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1150
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1151
test "X$echo_testing_string" = "X$echo_test_string"; then
1154
# The Solaris, AIX, and Digital Unix default echo programs unquote
1155
# backslashes. This makes it impossible to quote backslashes using
1156
# echo "$something" | sed 's/\\/\\\\/g'
1158
# So, first we look for a working echo in the user's PATH.
1160
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1161
for dir in $PATH /usr/ucb; do
1163
if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1164
test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1165
echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1166
test "X$echo_testing_string" = "X$echo_test_string"; then
1173
if test "X$echo" = Xecho; then
1174
# We didn't find a better echo, so look for alternatives.
1175
if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1176
echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1177
test "X$echo_testing_string" = "X$echo_test_string"; then
1178
# This shell has a builtin print -r that does the trick.
1180
elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1181
test "X$CONFIG_SHELL" != X/bin/ksh; then
1182
# If we have ksh, try running configure again with it.
1183
ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1184
export ORIGINAL_CONFIG_SHELL
1185
CONFIG_SHELL=/bin/ksh
1187
exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1191
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1192
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1193
test "X$echo_testing_string" = "X$echo_test_string"; then
1194
# Cool, printf works
1196
elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1197
test "X$echo_testing_string" = 'X\t' &&
1198
echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1199
test "X$echo_testing_string" = "X$echo_test_string"; then
1200
CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1202
SHELL="$CONFIG_SHELL"
1204
echo="$CONFIG_SHELL [$]0 --fallback-echo"
1205
elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1206
test "X$echo_testing_string" = 'X\t' &&
1207
echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1208
test "X$echo_testing_string" = "X$echo_test_string"; then
1209
echo="$CONFIG_SHELL [$]0 --fallback-echo"
1211
# maybe with a smaller string...
1214
for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1215
if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1222
if test "$prev" != 'sed 50q "[$]0"'; then
1223
echo_test_string=`eval $prev`
1224
export echo_test_string
1225
exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1227
# Oops. We lost completely, so just stick with echo.
1236
# Copy echo and quote the copy suitably for passing to libtool from
1237
# the Makefile, instead of quoting the original, which is used later.
1239
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1240
ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1244
])])# _LT_AC_PROG_ECHO_BACKSLASH
1249
AC_DEFUN([_LT_AC_LOCK],
1250
[AC_ARG_ENABLE([libtool-lock],
1251
[AC_HELP_STRING([--disable-libtool-lock],
1252
[avoid locking (might break parallel builds)])])
1253
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1255
# Some flags need to be propagated to the compiler or linker for good
1259
# Find out which ABI we are using.
1260
echo 'int i;' > conftest.$ac_ext
1261
if AC_TRY_EVAL(ac_compile); then
1262
case `/usr/bin/file conftest.$ac_objext` in
1274
# Find out which ABI we are using.
1275
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1276
if AC_TRY_EVAL(ac_compile); then
1277
if test "$lt_cv_prog_gnu_ld" = yes; then
1278
case `/usr/bin/file conftest.$ac_objext` in
1280
LD="${LD-ld} -melf32bsmip"
1283
LD="${LD-ld} -melf32bmipn32"
1286
LD="${LD-ld} -melf64bmip"
1290
case `/usr/bin/file conftest.$ac_objext` in
1306
x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
1307
# Find out which ABI we are using.
1308
echo 'int i;' > conftest.$ac_ext
1309
if AC_TRY_EVAL(ac_compile); then
1310
case "`/usr/bin/file conftest.o`" in
1314
LD="${LD-ld} -m elf_i386"
1317
LD="${LD-ld} -m elf32ppclinux"
1320
LD="${LD-ld} -m elf_s390"
1323
LD="${LD-ld} -m elf32_sparc"
1330
LD="${LD-ld} -m elf_x86_64"
1332
ppc*-*linux*|powerpc*-*linux*)
1333
LD="${LD-ld} -m elf64ppc"
1336
LD="${LD-ld} -m elf64_s390"
1339
LD="${LD-ld} -m elf64_sparc"
1349
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
1350
SAVE_CFLAGS="$CFLAGS"
1351
CFLAGS="$CFLAGS -belf"
1352
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1354
AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1356
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1357
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1358
CFLAGS="$SAVE_CFLAGS"
1361
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1362
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1363
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1364
AC_CHECK_TOOL(AS, as, false)
1365
AC_CHECK_TOOL(OBJDUMP, objdump, false)
1370
need_locks="$enable_libtool_lock"
1375
# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1376
# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1377
# ----------------------------------------------------------------
1378
# Check whether the given compiler option works
1379
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
1380
[AC_CACHE_CHECK([$1], [$2],
1382
ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1383
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1384
lt_compiler_flag="$3"
1385
# Insert the option either (1) after the last *FLAGS variable, or
1386
# (2) before a word containing "conftest.", or (3) at the end.
1387
# Note that $ac_compile itself does not contain backslashes and begins
1388
# with a dollar sign (not a hyphen), so the echo should work correctly.
1389
# The option is referenced via a variable to avoid confusing sed.
1390
lt_compile=`echo "$ac_compile" | $SED \
1391
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1392
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1393
-e 's:$: $lt_compiler_flag:'`
1394
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1395
(eval "$lt_compile" 2>conftest.err)
1397
cat conftest.err >&AS_MESSAGE_LOG_FD
1398
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1399
if (exit $ac_status) && test -s "$ac_outfile"; then
1400
# The compiler can only warn and ignore the option if not recognized
1401
# So say no if there are warnings
1402
if test ! -s conftest.err; then
1409
if test x"[$]$2" = xyes; then
1410
ifelse([$5], , :, [$5])
1412
ifelse([$6], , :, [$6])
1414
])# AC_LIBTOOL_COMPILER_OPTION
1417
# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1418
# [ACTION-SUCCESS], [ACTION-FAILURE])
1419
# ------------------------------------------------------------
1420
# Check whether the given compiler option works
1421
AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
1422
[AC_CACHE_CHECK([$1], [$2],
1424
save_LDFLAGS="$LDFLAGS"
1425
LDFLAGS="$LDFLAGS $3"
1426
printf "$lt_simple_link_test_code" > conftest.$ac_ext
1427
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1428
# The compiler can only warn and ignore the option if not recognized
1429
# So say no if there are warnings
1430
if test -s conftest.err; then
1431
# Append any errors to the config.log.
1432
cat conftest.err 1>&AS_MESSAGE_LOG_FD
1438
LDFLAGS="$save_LDFLAGS"
1441
if test x"[$]$2" = xyes; then
1442
ifelse([$4], , :, [$4])
1444
ifelse([$5], , :, [$5])
1446
])# AC_LIBTOOL_LINKER_OPTION
1449
# AC_LIBTOOL_SYS_MAX_CMD_LEN
1450
# --------------------------
1451
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
1452
[# find the maximum length of command line arguments
1453
AC_MSG_CHECKING([the maximum length of command line arguments])
1454
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1460
# On DJGPP, this test can blow up pretty badly due to problems in libc
1461
# (any single argument exceeding 2000 bytes causes a buffer overrun
1462
# during glob expansion). Even if it were fixed, the result of this
1463
# check would be larger than it should be.
1464
lt_cv_sys_max_cmd_len=12288; # 12K is about right
1468
# Under GNU Hurd, this test is not required because there is
1469
# no limit to the length of command line arguments.
1470
# Libtool will interpret -1 as no limit whatsoever
1471
lt_cv_sys_max_cmd_len=-1;
1475
# On Win9x/ME, this test blows up -- it succeeds, but takes
1476
# about 5 minutes as the teststring grows exponentially.
1477
# Worse, since 9x/ME are not pre-emptively multitasking,
1478
# you end up with a "frozen" computer, even though with patience
1479
# the test eventually succeeds (with a max line length of 256k).
1480
# Instead, let's just punt: use the minimum linelength reported by
1481
# all of the supported platforms: 8192 (on NT/2K/XP).
1482
lt_cv_sys_max_cmd_len=8192;
1486
# If test is not a shell built-in, we'll probably end up computing a
1487
# maximum length that is only half of the actual maximum length, but
1489
while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
1490
= "XX$testring") >/dev/null 2>&1 &&
1491
new_result=`expr "X$testring" : ".*" 2>&1` &&
1492
lt_cv_sys_max_cmd_len=$new_result &&
1493
test $i != 17 # 1/2 MB should be enough
1496
testring=$testring$testring
1499
# Add a significant safety factor because C++ compilers can tack on massive
1500
# amounts of additional arguments before passing them to the linker.
1501
# It appears as though 1/2 is a usable value.
1502
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1506
if test -n $lt_cv_sys_max_cmd_len ; then
1507
AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1511
])# AC_LIBTOOL_SYS_MAX_CMD_LEN
1514
# _LT_AC_CHECK_DLFCN
1515
# --------------------
1516
AC_DEFUN([_LT_AC_CHECK_DLFCN],
1517
[AC_CHECK_HEADERS(dlfcn.h)dnl
1518
])# _LT_AC_CHECK_DLFCN
1521
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1522
# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1523
# ------------------------------------------------------------------
1524
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1525
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1526
if test "$cross_compiling" = yes; then :
1529
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1530
lt_status=$lt_dlunknown
1531
cat > conftest.$ac_ext <<EOF
1532
[#line __oline__ "configure"
1533
#include "confdefs.h"
1542
# define LT_DLGLOBAL RTLD_GLOBAL
1545
# define LT_DLGLOBAL DL_GLOBAL
1547
# define LT_DLGLOBAL 0
1551
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1552
find out it does not work in some platform. */
1553
#ifndef LT_DLLAZY_OR_NOW
1555
# define LT_DLLAZY_OR_NOW RTLD_LAZY
1558
# define LT_DLLAZY_OR_NOW DL_LAZY
1561
# define LT_DLLAZY_OR_NOW RTLD_NOW
1564
# define LT_DLLAZY_OR_NOW DL_NOW
1566
# define LT_DLLAZY_OR_NOW 0
1574
extern "C" void exit (int);
1577
void fnord() { int i=42;}
1580
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1581
int status = $lt_dlunknown;
1585
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1586
else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1587
/* dlclose (self); */
1593
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1594
(./conftest; exit; ) 2>/dev/null
1597
x$lt_dlno_uscore) $1 ;;
1598
x$lt_dlneed_uscore) $2 ;;
1599
x$lt_unknown|x*) $3 ;;
1602
# compilation failed
1607
])# _LT_AC_TRY_DLOPEN_SELF
1610
# AC_LIBTOOL_DLOPEN_SELF
1611
# -------------------
1612
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1613
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1614
if test "x$enable_dlopen" != xyes; then
1615
enable_dlopen=unknown
1616
enable_dlopen_self=unknown
1617
enable_dlopen_self_static=unknown
1624
lt_cv_dlopen="load_add_on"
1626
lt_cv_dlopen_self=yes
1630
lt_cv_dlopen="LoadLibrary"
1635
lt_cv_dlopen="dlopen"
1640
# if libdl is installed we need to link against it
1641
AC_CHECK_LIB([dl], [dlopen],
1642
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1645
lt_cv_dlopen_self=yes
1650
AC_CHECK_FUNC([shl_load],
1651
[lt_cv_dlopen="shl_load"],
1652
[AC_CHECK_LIB([dld], [shl_load],
1653
[lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1654
[AC_CHECK_FUNC([dlopen],
1655
[lt_cv_dlopen="dlopen"],
1656
[AC_CHECK_LIB([dl], [dlopen],
1657
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1658
[AC_CHECK_LIB([svld], [dlopen],
1659
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1660
[AC_CHECK_LIB([dld], [dld_link],
1661
[lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1670
if test "x$lt_cv_dlopen" != xno; then
1676
case $lt_cv_dlopen in
1678
save_CPPFLAGS="$CPPFLAGS"
1679
test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1681
save_LDFLAGS="$LDFLAGS"
1682
eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1685
LIBS="$lt_cv_dlopen_libs $LIBS"
1687
AC_CACHE_CHECK([whether a program can dlopen itself],
1688
lt_cv_dlopen_self, [dnl
1689
_LT_AC_TRY_DLOPEN_SELF(
1690
lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1691
lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1694
if test "x$lt_cv_dlopen_self" = xyes; then
1695
LDFLAGS="$LDFLAGS $link_static_flag"
1696
AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1697
lt_cv_dlopen_self_static, [dnl
1698
_LT_AC_TRY_DLOPEN_SELF(
1699
lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1700
lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1704
CPPFLAGS="$save_CPPFLAGS"
1705
LDFLAGS="$save_LDFLAGS"
1710
case $lt_cv_dlopen_self in
1711
yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1712
*) enable_dlopen_self=unknown ;;
1715
case $lt_cv_dlopen_self_static in
1716
yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1717
*) enable_dlopen_self_static=unknown ;;
1720
])# AC_LIBTOOL_DLOPEN_SELF
1723
# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1724
# ---------------------------------
1725
# Check to see if options -c and -o are simultaneously supported by compiler
1726
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1727
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1728
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1729
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1730
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1731
$rm -r conftest 2>/dev/null
1735
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1737
# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
1738
# that will create temporary files in the current directory regardless of
1739
# the output directory. Thus, making CWD read-only will cause this test
1740
# to fail, enabling locking or at least warning the user not to do parallel
1744
lt_compiler_flag="-o out/conftest2.$ac_objext"
1745
# Insert the option either (1) after the last *FLAGS variable, or
1746
# (2) before a word containing "conftest.", or (3) at the end.
1747
# Note that $ac_compile itself does not contain backslashes and begins
1748
# with a dollar sign (not a hyphen), so the echo should work correctly.
1749
lt_compile=`echo "$ac_compile" | $SED \
1750
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1751
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1752
-e 's:$: $lt_compiler_flag:'`
1753
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1754
(eval "$lt_compile" 2>out/conftest.err)
1756
cat out/conftest.err >&AS_MESSAGE_LOG_FD
1757
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1758
if (exit $ac_status) && test -s out/conftest2.$ac_objext
1760
# The compiler can only warn and ignore the option if not recognized
1761
# So say no if there are warnings
1762
if test ! -s out/conftest.err; then
1763
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1773
])# AC_LIBTOOL_PROG_CC_C_O
1776
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1777
# -----------------------------------------
1778
# Check to see if we can do hard links to lock some files if needed
1779
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1780
[AC_REQUIRE([_LT_AC_LOCK])dnl
1782
hard_links="nottested"
1783
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1784
# do not overwrite the value of need_locks provided by the user
1785
AC_MSG_CHECKING([if we can lock with hard links])
1788
ln conftest.a conftest.b 2>/dev/null && hard_links=no
1790
ln conftest.a conftest.b 2>&5 || hard_links=no
1791
ln conftest.a conftest.b 2>/dev/null && hard_links=no
1792
AC_MSG_RESULT([$hard_links])
1793
if test "$hard_links" = no; then
1794
AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1800
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1805
AC_DEFUN([AC_LIBTOOL_OBJDIR],
1806
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1807
[rm -f .libs 2>/dev/null
1808
mkdir .libs 2>/dev/null
1809
if test -d .libs; then
1812
# MS-DOS does not allow filenames that begin with a dot.
1815
rmdir .libs 2>/dev/null])
1816
objdir=$lt_cv_objdir
1817
])# AC_LIBTOOL_OBJDIR
1820
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1821
# ----------------------------------------------
1822
# Check hardcoding attributes.
1823
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1824
[AC_MSG_CHECKING([how to hardcode library paths into programs])
1825
_LT_AC_TAGVAR(hardcode_action, $1)=
1826
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1827
test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
1828
test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
1830
# We can hardcode non-existant directories.
1831
if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1832
# If the only mechanism to avoid hardcoding is shlibpath_var, we
1833
# have to relink, otherwise we might link with an installed library
1834
# when we should be linking with a yet-to-be-installed one
1835
## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1836
test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1837
# Linking always hardcodes the temporary library directory.
1838
_LT_AC_TAGVAR(hardcode_action, $1)=relink
1840
# We can link without hardcoding, and we can hardcode nonexisting dirs.
1841
_LT_AC_TAGVAR(hardcode_action, $1)=immediate
1844
# We cannot hardcode anything, or else we can only hardcode existing
1846
_LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1848
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1850
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1851
# Fast installation is not supported
1852
enable_fast_install=no
1853
elif test "$shlibpath_overrides_runpath" = yes ||
1854
test "$enable_shared" = no; then
1855
# Fast installation is not necessary
1856
enable_fast_install=needless
1858
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1861
# AC_LIBTOOL_SYS_LIB_STRIP
1862
# ------------------------
1863
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1866
AC_MSG_CHECKING([whether stripping libraries is possible])
1867
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1868
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1869
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1870
AC_MSG_RESULT([yes])
1872
# FIXME - insert some real tests, host_os isn't really good enough
1875
if test -n "$STRIP" ; then
1876
striplib="$STRIP -x"
1877
AC_MSG_RESULT([yes])
1887
])# AC_LIBTOOL_SYS_LIB_STRIP
1890
# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1891
# -----------------------------
1892
# PORTME Fill in your ld.so characteristics
1893
AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1894
[AC_MSG_CHECKING([dynamic linker characteristics])
1896
libname_spec='lib$name'
1904
shlibpath_overrides_runpath=unknown
1906
dynamic_linker="$host_os ld.so"
1907
sys_lib_dlsearch_path_spec="/lib /usr/lib"
1908
if test "$GCC" = yes; then
1909
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1910
if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
1911
# if the path contains ";" then we assume it to be the separator
1912
# otherwise default to the standard path separator (i.e. ":") - it is
1913
# assumed that no part of a normal pathname contains ";" but that should
1914
# okay in the real world where ";" in dirpaths is itself problematic.
1915
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1917
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1920
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1922
need_lib_prefix=unknown
1923
hardcode_into_libs=no
1925
# when you set need_version to no, make sure it does not cause -set_version
1926
# flags to be left without arguments
1927
need_version=unknown
1932
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
1933
shlibpath_var=LIBPATH
1935
# AIX 3 has no versioning support, so we append a major version to the name.
1936
soname_spec='${libname}${release}${shared_ext}$major'
1943
hardcode_into_libs=yes
1944
if test "$host_cpu" = ia64; then
1945
# AIX 5 supports IA64
1946
library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
1947
shlibpath_var=LD_LIBRARY_PATH
1949
# With GCC up to 2.95.x, collect2 would create an import file
1950
# for dependence libraries. The import file would start with
1951
# the line `#! .'. This would cause the generated library to
1952
# depend on `.', always an invalid library. This was fixed in
1953
# development snapshots of GCC prior to 3.0.
1955
aix4 | aix4.[[01]] | aix4.[[01]].*)
1956
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1958
echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1965
# AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1966
# soname into executable. Probably we can add versioning support to
1967
# collect2, so additional links can be useful in future.
1968
if test "$aix_use_runtimelinking" = yes; then
1969
# If using run time linking (on AIX 4.2 or later) use lib<name>.so
1970
# instead of lib<name>.a to let people know that these are not
1971
# typical AIX shared libraries.
1972
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1974
# We preserve .a as extension for shared libraries through AIX4.2
1975
# and later when we are not doing run time linking.
1976
library_names_spec='${libname}${release}.a $libname.a'
1977
soname_spec='${libname}${release}${shared_ext}$major'
1979
shlibpath_var=LIBPATH
1984
library_names_spec='$libname.ixlibrary $libname.a'
1985
# Create ${libname}_ixlibrary.a entries in /sys/libs.
1986
finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
1990
library_names_spec='${libname}${shared_ext}'
1991
dynamic_linker="$host_os ld.so"
1992
shlibpath_var=LIBRARY_PATH
1998
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1999
soname_spec='${libname}${release}${shared_ext}$major'
2000
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2001
shlibpath_var=LD_LIBRARY_PATH
2002
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2003
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2004
# the default ld.so.conf also contains /usr/contrib/lib and
2005
# /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2006
# libtool to hard-code these into programs
2009
cygwin* | mingw* | pw32*)
2010
version_type=windows
2015
case $GCC,$host_os in
2016
yes,cygwin* | yes,mingw* | yes,pw32*)
2017
library_names_spec='$libname.dll.a'
2018
# DLL is installed to $(libdir)/../bin by postinstall_cmds
2019
postinstall_cmds='base_file=`basename \${file}`~
2020
dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
2021
dldir=$destdir/`dirname \$dlpath`~
2022
test -d \$dldir || mkdir -p \$dldir~
2023
$install_prog $dir/$dlname \$dldir/$dlname'
2024
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2025
dlpath=$dir/\$dldll~
2027
shlibpath_overrides_runpath=yes
2031
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
2032
soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2033
sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib"
2036
# MinGW DLLs use traditional 'lib' prefix
2037
soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2038
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2039
if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
2040
# It is most probably a Windows format PATH printed by
2041
# mingw gcc, but we are running on Cygwin. Gcc prints its search
2042
# path with ; separators, and with drive letters. We can handle the
2043
# drive letters (cygwin fileutils understands them), so leave them,
2044
# especially as we might pass files found there to a mingw objdump,
2045
# which wouldn't understand a cygwinified path. Ahh.
2046
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2048
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2052
# pw32 DLLs use 'pw' prefix rather than 'lib'
2053
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
2059
library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2062
dynamic_linker='Win32 ld.exe'
2063
# FIXME: first we should search . and the directory the executable is in
2067
darwin* | rhapsody*)
2068
dynamic_linker="$host_os dyld"
2072
# FIXME: Relying on posixy $() will cause problems for
2073
# cross-compilation, but unfortunately the echo tests do not
2074
# yet detect zsh echo's removal of \ escapes.
2075
library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2076
soname_spec='${libname}${release}${major}$shared_ext'
2077
shlibpath_overrides_runpath=yes
2078
shlibpath_var=DYLD_LIBRARY_PATH
2079
shrext='$(test .$module = .yes && echo .so || echo .dylib)'
2080
# Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
2081
if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then
2082
sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
2084
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2091
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2092
soname_spec='${libname}${release}${shared_ext}$major'
2093
shlibpath_var=LD_LIBRARY_PATH
2104
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2105
soname_spec='${libname}${release}${shared_ext}$major'
2106
shlibpath_var=LD_LIBRARY_PATH
2107
shlibpath_overrides_runpath=no
2108
hardcode_into_libs=yes
2109
dynamic_linker='GNU ld.so'
2113
objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
2114
version_type=freebsd-$objformat
2115
case $version_type in
2117
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2122
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2126
shlibpath_var=LD_LIBRARY_PATH
2129
shlibpath_overrides_runpath=yes
2131
freebsd3.[01]* | freebsdelf3.[01]*)
2132
shlibpath_overrides_runpath=yes
2133
hardcode_into_libs=yes
2136
shlibpath_overrides_runpath=no
2137
hardcode_into_libs=yes
2146
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2147
soname_spec='${libname}${release}${shared_ext}$major'
2148
shlibpath_var=LD_LIBRARY_PATH
2149
hardcode_into_libs=yes
2152
hpux9* | hpux10* | hpux11*)
2153
# Give a soname corresponding to the major version so that dld.sl refuses to
2154
# link against other versions.
2161
hardcode_into_libs=yes
2162
dynamic_linker="$host_os dld.so"
2163
shlibpath_var=LD_LIBRARY_PATH
2164
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2165
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2166
soname_spec='${libname}${release}${shared_ext}$major'
2167
if test "X$HPUX_IA64_MODE" = X32; then
2168
sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2170
sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2172
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2176
hardcode_into_libs=yes
2177
dynamic_linker="$host_os dld.sl"
2178
shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2179
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2180
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2181
soname_spec='${libname}${release}${shared_ext}$major'
2182
sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2183
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2187
dynamic_linker="$host_os dld.sl"
2188
shlibpath_var=SHLIB_PATH
2189
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2190
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2191
soname_spec='${libname}${release}${shared_ext}$major'
2194
# HP-UX runs *really* slowly unless shared libraries are mode 555.
2195
postinstall_cmds='chmod 555 $lib'
2198
irix5* | irix6* | nonstopux*)
2200
nonstopux*) version_type=nonstopux ;;
2202
if test "$lt_cv_prog_gnu_ld" = yes; then
2210
soname_spec='${libname}${release}${shared_ext}$major'
2211
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2213
irix5* | nonstopux*)
2217
case $LD in # libtool.m4 will add one of these switches to LD
2218
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2219
libsuff= shlibsuff= libmagic=32-bit;;
2220
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2221
libsuff=32 shlibsuff=N32 libmagic=N32;;
2222
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2223
libsuff=64 shlibsuff=64 libmagic=64-bit;;
2224
*) libsuff= shlibsuff= libmagic=never-match;;
2228
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2229
shlibpath_overrides_runpath=no
2230
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2231
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2232
hardcode_into_libs=yes
2235
# No shared lib support for Linux oldld, aout, or coff.
2236
linux*oldld* | linux*aout* | linux*coff*)
2240
# This must be Linux ELF.
2245
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2246
soname_spec='${libname}${release}${shared_ext}$major'
2247
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2248
shlibpath_var=LD_LIBRARY_PATH
2249
shlibpath_overrides_runpath=no
2250
# This implies no fast_install, which is unacceptable.
2251
# Some rework will be needed to allow for fast_install
2252
# before this can be enabled.
2253
hardcode_into_libs=yes
2255
# We used to test for /lib/ld.so.1 and disable shared libraries on
2256
# powerpc, because MkLinux only supported shared libraries with the
2257
# GNU dynamic linker. Since this was broken with cross compilers,
2258
# most powerpc-linux boxes support dynamic linking these days and
2259
# people can always --disable-shared, the test was removed, and we
2260
# assume the GNU/Linux dynamic linker is in use.
2261
dynamic_linker='GNU/Linux ld.so'
2268
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2269
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2270
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2271
dynamic_linker='NetBSD (a.out) ld.so'
2273
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}'
2274
soname_spec='${libname}${release}${shared_ext}$major'
2275
dynamic_linker='NetBSD ld.elf_so'
2277
shlibpath_var=LD_LIBRARY_PATH
2278
shlibpath_overrides_runpath=yes
2279
hardcode_into_libs=yes
2284
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2285
shlibpath_var=LD_LIBRARY_PATH
2286
shlibpath_overrides_runpath=yes
2293
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2294
soname_spec='${libname}${release}${shared_ext}$major'
2295
shlibpath_var=LD_LIBRARY_PATH
2296
shlibpath_overrides_runpath=yes
2303
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2304
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2305
shlibpath_var=LD_LIBRARY_PATH
2306
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2308
openbsd2.[[89]] | openbsd2.[[89]].*)
2309
shlibpath_overrides_runpath=no
2312
shlibpath_overrides_runpath=yes
2316
shlibpath_overrides_runpath=yes
2321
libname_spec='$name'
2324
library_names_spec='$libname${shared_ext} $libname.a'
2325
dynamic_linker='OS/2 ld.exe'
2326
shlibpath_var=LIBPATH
2329
osf3* | osf4* | osf5*)
2333
soname_spec='${libname}${release}${shared_ext}$major'
2334
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2335
shlibpath_var=LD_LIBRARY_PATH
2336
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2337
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2342
soname_spec='${libname}${release}${shared_ext}$major'
2343
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2344
shlibpath_var=LD_LIBRARY_PATH
2351
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2352
soname_spec='${libname}${release}${shared_ext}$major'
2353
shlibpath_var=LD_LIBRARY_PATH
2354
shlibpath_overrides_runpath=yes
2355
hardcode_into_libs=yes
2356
# ldd complains unless libraries are executable
2357
postinstall_cmds='chmod +x $lib'
2362
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2363
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2364
shlibpath_var=LD_LIBRARY_PATH
2365
shlibpath_overrides_runpath=yes
2366
if test "$with_gnu_ld" = yes; then
2372
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2374
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2375
soname_spec='${libname}${release}${shared_ext}$major'
2376
shlibpath_var=LD_LIBRARY_PATH
2377
case $host_vendor in
2379
shlibpath_overrides_runpath=no
2381
export_dynamic_flag_spec='${wl}-Blargedynsym'
2382
runpath_var=LD_RUN_PATH
2390
shlibpath_overrides_runpath=no
2391
sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2397
if test -d /usr/nec ;then
2399
library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2400
soname_spec='$libname${shared_ext}.$major'
2401
shlibpath_var=LD_LIBRARY_PATH
2407
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2408
soname_spec='${libname}${release}${shared_ext}$major'
2409
shlibpath_var=LD_LIBRARY_PATH
2416
AC_MSG_RESULT([$dynamic_linker])
2417
test "$dynamic_linker" = no && can_build_shared=no
2418
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2423
AC_DEFUN([_LT_AC_TAGCONFIG],
2424
[AC_ARG_WITH([tags],
2425
[AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
2426
[include additional configurations @<:@automatic@:>@])],
2427
[tagnames="$withval"])
2429
if test -f "$ltmain" && test -n "$tagnames"; then
2430
if test ! -f "${ofile}"; then
2431
AC_MSG_WARN([output file `$ofile' does not exist])
2434
if test -z "$LTCC"; then
2435
eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
2436
if test -z "$LTCC"; then
2437
AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
2439
AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
2443
# Extract list of available tagged configurations in $ofile.
2444
# Note that this assumes the entire list is on one line.
2445
available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
2447
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2448
for tagname in $tagnames; do
2450
# Check whether tagname contains only valid characters
2451
case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
2453
*) AC_MSG_ERROR([invalid tag name: $tagname])
2457
if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
2459
AC_MSG_ERROR([tag name \"$tagname\" already exists])
2462
# Update the list of available tags.
2463
if test -n "$tagname"; then
2464
echo appending configuration tag \"$tagname\" to $ofile
2468
if test -n "$CXX" && test "X$CXX" != "Xno"; then
2469
AC_LIBTOOL_LANG_CXX_CONFIG
2476
if test -n "$F77" && test "X$F77" != "Xno"; then
2477
AC_LIBTOOL_LANG_F77_CONFIG
2484
if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
2485
AC_LIBTOOL_LANG_GCJ_CONFIG
2492
AC_LIBTOOL_LANG_RC_CONFIG
2496
AC_MSG_ERROR([Unsupported tag name: $tagname])
2500
# Append the new tag name to the list of available tags.
2501
if test -n "$tagname" ; then
2502
available_tags="$available_tags $tagname"
2508
# Now substitute the updated list of available tags.
2509
if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2510
mv "${ofile}T" "$ofile"
2514
AC_MSG_ERROR([unable to update list of available tagged configurations.])
2517
])# _LT_AC_TAGCONFIG
2522
# enable checks for dlopen support
2523
AC_DEFUN([AC_LIBTOOL_DLOPEN],
2524
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2525
])# AC_LIBTOOL_DLOPEN
2528
# AC_LIBTOOL_WIN32_DLL
2529
# --------------------
2530
# declare package support for building win32 dll's
2531
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2532
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2533
])# AC_LIBTOOL_WIN32_DLL
2536
# AC_ENABLE_SHARED([DEFAULT])
2537
# ---------------------------
2538
# implement the --enable-shared flag
2539
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2540
AC_DEFUN([AC_ENABLE_SHARED],
2541
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2542
AC_ARG_ENABLE([shared],
2543
[AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
2544
[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
2545
[p=${PACKAGE-default}
2547
yes) enable_shared=yes ;;
2548
no) enable_shared=no ;;
2551
# Look at the argument we got. We use all the common list separators.
2552
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2553
for pkg in $enableval; do
2555
if test "X$pkg" = "X$p"; then
2562
[enable_shared=]AC_ENABLE_SHARED_DEFAULT)
2563
])# AC_ENABLE_SHARED
2568
#- set the default shared flag to --disable-shared
2569
AC_DEFUN([AC_DISABLE_SHARED],
2570
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2571
AC_ENABLE_SHARED(no)
2572
])# AC_DISABLE_SHARED
2575
# AC_ENABLE_STATIC([DEFAULT])
2576
# ---------------------------
2577
# implement the --enable-static flag
2578
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2579
AC_DEFUN([AC_ENABLE_STATIC],
2580
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2581
AC_ARG_ENABLE([static],
2582
[AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2583
[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2584
[p=${PACKAGE-default}
2586
yes) enable_static=yes ;;
2587
no) enable_static=no ;;
2590
# Look at the argument we got. We use all the common list separators.
2591
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2592
for pkg in $enableval; do
2594
if test "X$pkg" = "X$p"; then
2601
[enable_static=]AC_ENABLE_STATIC_DEFAULT)
2602
])# AC_ENABLE_STATIC
2607
# set the default static flag to --disable-static
2608
AC_DEFUN([AC_DISABLE_STATIC],
2609
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2610
AC_ENABLE_STATIC(no)
2611
])# AC_DISABLE_STATIC
2614
# AC_ENABLE_FAST_INSTALL([DEFAULT])
2615
# ---------------------------------
2616
# implement the --enable-fast-install flag
2617
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2618
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2619
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2620
AC_ARG_ENABLE([fast-install],
2621
[AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2622
[optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2623
[p=${PACKAGE-default}
2625
yes) enable_fast_install=yes ;;
2626
no) enable_fast_install=no ;;
2628
enable_fast_install=no
2629
# Look at the argument we got. We use all the common list separators.
2630
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2631
for pkg in $enableval; do
2633
if test "X$pkg" = "X$p"; then
2634
enable_fast_install=yes
2640
[enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2641
])# AC_ENABLE_FAST_INSTALL
2644
# AC_DISABLE_FAST_INSTALL
2645
# -----------------------
2646
# set the default to --disable-fast-install
2647
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2648
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2649
AC_ENABLE_FAST_INSTALL(no)
2650
])# AC_DISABLE_FAST_INSTALL
2653
# AC_LIBTOOL_PICMODE([MODE])
2654
# --------------------------
2655
# implement the --with-pic flag
2656
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
2657
AC_DEFUN([AC_LIBTOOL_PICMODE],
2658
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2659
pic_mode=ifelse($#,1,$1,default)
2660
])# AC_LIBTOOL_PICMODE
2665
# This is predefined starting with Autoconf 2.54, so this conditional
2666
# definition can be removed once we require Autoconf 2.54 or later.
2667
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2668
[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2669
[if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2670
then ac_cv_prog_egrep='grep -E'
2671
else ac_cv_prog_egrep='egrep'
2673
EGREP=$ac_cv_prog_egrep
2678
# AC_PATH_TOOL_PREFIX
2679
# -------------------
2680
# find a file program which can recognise shared library
2681
AC_DEFUN([AC_PATH_TOOL_PREFIX],
2682
[AC_REQUIRE([AC_PROG_EGREP])dnl
2683
AC_MSG_CHECKING([for $1])
2684
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2686
[[\\/*] | ?:[\\/]*])
2687
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2690
lt_save_MAGIC_CMD="$MAGIC_CMD"
2691
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2692
dnl $ac_dummy forces splitting on constant user-supplied paths.
2693
dnl POSIX.2 word splitting is done only on the output of word expansions,
2694
dnl not every word. This closes a longstanding sh security hole.
2695
ac_dummy="ifelse([$2], , $PATH, [$2])"
2696
for ac_dir in $ac_dummy; do
2698
test -z "$ac_dir" && ac_dir=.
2699
if test -f $ac_dir/$1; then
2700
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2701
if test -n "$file_magic_test_file"; then
2702
case $deplibs_check_method in
2704
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2705
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2706
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2707
$EGREP "$file_magic_regex" > /dev/null; then
2712
*** Warning: the command libtool uses to detect shared libraries,
2713
*** $file_magic_cmd, produces output that libtool cannot recognize.
2714
*** The result is that libtool may fail to recognize shared libraries
2715
*** as such. This will affect the creation of libtool libraries that
2716
*** depend on shared libraries, but programs linked with such libtool
2717
*** libraries will work regardless of this problem. Nevertheless, you
2718
*** may want to report the problem to your system manager and/or to
2719
*** bug-libtool@gnu.org
2729
MAGIC_CMD="$lt_save_MAGIC_CMD"
2732
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2733
if test -n "$MAGIC_CMD"; then
2734
AC_MSG_RESULT($MAGIC_CMD)
2738
])# AC_PATH_TOOL_PREFIX
2743
# find a file program which can recognise a shared library
2744
AC_DEFUN([AC_PATH_MAGIC],
2745
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2746
if test -z "$lt_cv_path_MAGIC_CMD"; then
2747
if test -n "$ac_tool_prefix"; then
2748
AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2758
# find the path to the GNU or non-GNU linker
2759
AC_DEFUN([AC_PROG_LD],
2760
[AC_ARG_WITH([gnu-ld],
2761
[AC_HELP_STRING([--with-gnu-ld],
2762
[assume the C compiler uses GNU ld @<:@default=no@:>@])],
2763
[test "$withval" = no || with_gnu_ld=yes],
2765
AC_REQUIRE([LT_AC_PROG_SED])dnl
2766
AC_REQUIRE([AC_PROG_CC])dnl
2767
AC_REQUIRE([AC_CANONICAL_HOST])dnl
2768
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2770
if test "$GCC" = yes; then
2771
# Check if gcc -print-prog-name=ld gives a path.
2772
AC_MSG_CHECKING([for ld used by $CC])
2775
# gcc leaves a trailing carriage return which upsets mingw
2776
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2778
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2781
# Accept absolute paths.
2782
[[\\/]]* | ?:[[\\/]]*)
2783
re_direlt='/[[^/]][[^/]]*/\.\./'
2784
# Canonicalize the path of ld
2785
ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2786
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2787
ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2789
test -z "$LD" && LD="$ac_prog"
2792
# If it fails, then pretend we aren't using GCC.
2796
# If it is relative, then search for the first ld in PATH.
2800
elif test "$with_gnu_ld" = yes; then
2801
AC_MSG_CHECKING([for GNU ld])
2803
AC_MSG_CHECKING([for non-GNU ld])
2805
AC_CACHE_VAL(lt_cv_path_LD,
2806
[if test -z "$LD"; then
2807
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2808
for ac_dir in $PATH; do
2810
test -z "$ac_dir" && ac_dir=.
2811
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2812
lt_cv_path_LD="$ac_dir/$ac_prog"
2813
# Check to see if the program is GNU ld. I'd rather use --version,
2814
# but apparently some GNU ld's only accept -v.
2815
# Break only if it was the GNU/non-GNU ld that we prefer.
2816
case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2817
*GNU* | *'with BFD'*)
2818
test "$with_gnu_ld" != no && break
2821
test "$with_gnu_ld" != yes && break
2828
lt_cv_path_LD="$LD" # Let the user override the test with a path.
2831
if test -n "$LD"; then
2836
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2843
AC_DEFUN([AC_PROG_LD_GNU],
2844
[AC_REQUIRE([AC_PROG_EGREP])dnl
2845
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2846
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
2847
case `"$LD" -v 2>&1 </dev/null` in
2848
*GNU* | *'with BFD'*)
2849
lt_cv_prog_gnu_ld=yes
2852
lt_cv_prog_gnu_ld=no
2855
with_gnu_ld=$lt_cv_prog_gnu_ld
2859
# AC_PROG_LD_RELOAD_FLAG
2860
# ----------------------
2861
# find reload flag for linker
2862
# -- PORTME Some linkers may need a different reload flag.
2863
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2864
[AC_CACHE_CHECK([for $LD option to reload object files],
2865
lt_cv_ld_reload_flag,
2866
[lt_cv_ld_reload_flag='-r'])
2867
reload_flag=$lt_cv_ld_reload_flag
2868
case $reload_flag in
2870
*) reload_flag=" $reload_flag" ;;
2872
reload_cmds='$LD$reload_flag -o $output$reload_objs'
2873
])# AC_PROG_LD_RELOAD_FLAG
2876
# AC_DEPLIBS_CHECK_METHOD
2877
# -----------------------
2878
# how to check for library dependencies
2879
# -- PORTME fill in with the dynamic library characteristics
2880
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2881
[AC_CACHE_CHECK([how to recognise dependent libraries],
2882
lt_cv_deplibs_check_method,
2883
[lt_cv_file_magic_cmd='$MAGIC_CMD'
2884
lt_cv_file_magic_test_file=
2885
lt_cv_deplibs_check_method='unknown'
2886
# Need to set the preceding variable on all platforms that support
2887
# interlibrary dependencies.
2888
# 'none' -- dependencies not supported.
2889
# `unknown' -- same as none, but documents that we really don't know.
2890
# 'pass_all' -- all dependencies passed with no checks.
2891
# 'test_compile' -- check by making test program.
2892
# 'file_magic [[regex]]' -- check by looking for files in library path
2893
# which responds to the $file_magic_cmd with a given extended regex.
2894
# If you have `file' or equivalent on your system and you're not sure
2895
# whether `pass_all' will *always* work, you probably want this one.
2899
lt_cv_deplibs_check_method=pass_all
2903
lt_cv_deplibs_check_method=pass_all
2907
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2908
lt_cv_file_magic_cmd='/usr/bin/file -L'
2909
lt_cv_file_magic_test_file=/shlib/libc.so
2912
cygwin* | mingw* | pw32*)
2913
# win32_libid is a shell function defined in ltmain.sh
2914
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2915
lt_cv_file_magic_cmd='win32_libid'
2918
darwin* | rhapsody*)
2919
# this will be overwritten by pass_all, but leave it in just in case
2920
lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
2921
lt_cv_file_magic_cmd='/usr/bin/file -L'
2923
rhapsody* | darwin1.[[012]])
2924
lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
2927
lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
2930
lt_cv_deplibs_check_method=pass_all
2934
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2937
# Not sure whether the presence of OpenBSD here was a mistake.
2938
# Let's accept both of them until this is cleared up.
2939
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
2940
lt_cv_file_magic_cmd=/usr/bin/file
2941
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2945
lt_cv_deplibs_check_method=pass_all
2950
lt_cv_deplibs_check_method=pass_all
2953
hpux10.20* | hpux11*)
2954
lt_cv_file_magic_cmd=/usr/bin/file
2957
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2958
lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2961
[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]']
2962
lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
2965
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2966
lt_cv_file_magic_test_file=/usr/lib/libc.sl
2971
irix5* | irix6* | nonstopux*)
2973
irix5* | nonstopux*)
2974
# this will be overridden with pass_all, but let us keep it just in case
2975
lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
2979
*-32|*"-32 ") libmagic=32-bit;;
2980
*-n32|*"-n32 ") libmagic=N32;;
2981
*-64|*"-64 ") libmagic=64-bit;;
2982
*) libmagic=never-match;;
2984
# this will be overridden with pass_all, but let us keep it just in case
2985
lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
2988
lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
2989
lt_cv_deplibs_check_method=pass_all
2992
# This must be Linux ELF.
2995
alpha* | hppa* | i*86 | ia64* | m68* | mips | mipsel | powerpc* | sparc* | s390* | sh*)
2996
lt_cv_deplibs_check_method=pass_all ;;
2998
# glibc up to 2.1.1 does not perform some relocations on ARM
2999
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
3001
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3005
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3006
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3008
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3013
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3014
lt_cv_file_magic_cmd=/usr/bin/file
3015
lt_cv_file_magic_test_file=/usr/lib/libnls.so
3019
lt_cv_deplibs_check_method=unknown
3023
lt_cv_file_magic_cmd=/usr/bin/file
3024
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3025
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3026
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
3028
lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3032
osf3* | osf4* | osf5*)
3033
# this will be overridden with pass_all, but let us keep it just in case
3034
lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3035
lt_cv_file_magic_test_file=/shlib/libc.so
3036
lt_cv_deplibs_check_method=pass_all
3040
lt_cv_deplibs_check_method=pass_all
3044
lt_cv_deplibs_check_method=pass_all
3045
lt_cv_file_magic_test_file=/lib/libc.so
3048
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3049
case $host_vendor in
3051
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]]'
3052
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3055
lt_cv_deplibs_check_method=pass_all
3058
lt_cv_file_magic_cmd='/bin/file'
3059
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3062
lt_cv_file_magic_cmd='/bin/file'
3063
lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3064
lt_cv_file_magic_test_file=/lib/libc.so
3067
lt_cv_deplibs_check_method=pass_all
3072
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
3073
lt_cv_deplibs_check_method=pass_all
3077
file_magic_cmd=$lt_cv_file_magic_cmd
3078
deplibs_check_method=$lt_cv_deplibs_check_method
3079
test -z "$deplibs_check_method" && deplibs_check_method=unknown
3080
])# AC_DEPLIBS_CHECK_METHOD
3085
# find the path to a BSD-compatible name lister
3086
AC_DEFUN([AC_PROG_NM],
3087
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
3088
[if test -n "$NM"; then
3089
# Let the user override the test.
3092
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3093
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3095
test -z "$ac_dir" && ac_dir=.
3096
tmp_nm="$ac_dir/${ac_tool_prefix}nm"
3097
if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3098
# Check to see if the nm accepts a BSD-compat flag.
3099
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
3100
# nm: unknown option "B" ignored
3101
# Tru64's nm complains that /dev/null is an invalid object file
3102
case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3103
*/dev/null* | *'Invalid file or object type'*)
3104
lt_cv_path_NM="$tmp_nm -B"
3108
case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3110
lt_cv_path_NM="$tmp_nm -p"
3114
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3115
continue # so that we can try to find one that supports BSD flags
3122
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3130
# check for math library
3131
AC_DEFUN([AC_CHECK_LIBM],
3132
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3135
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3136
# These system don't have libm, or don't need it
3139
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3140
AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3143
AC_CHECK_LIB(m, cos, LIBM="-lm")
3149
# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
3150
# -----------------------------------
3151
# sets LIBLTDL to the link flags for the libltdl convenience library and
3152
# LTDLINCL to the include flags for the libltdl header and adds
3153
# --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
3154
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
3155
# DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
3156
# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
3157
# '${top_srcdir}/' (note the single quotes!). If your package is not
3158
# flat and you're not using automake, define top_builddir and
3159
# top_srcdir appropriately in the Makefiles.
3160
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3161
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3162
case $enable_ltdl_convenience in
3163
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3164
"") enable_ltdl_convenience=yes
3165
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3167
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3168
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3169
# For backwards non-gettext consistent compatibility...
3171
])# AC_LIBLTDL_CONVENIENCE
3174
# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
3175
# -----------------------------------
3176
# sets LIBLTDL to the link flags for the libltdl installable library and
3177
# LTDLINCL to the include flags for the libltdl header and adds
3178
# --enable-ltdl-install to the configure arguments. Note that LIBLTDL
3179
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
3180
# DIRECTORY is not provided and an installed libltdl is not found, it is
3181
# assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
3182
# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
3183
# quotes!). If your package is not flat and you're not using automake,
3184
# define top_builddir and top_srcdir appropriately in the Makefiles.
3185
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3186
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3187
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3188
AC_CHECK_LIB(ltdl, lt_dlinit,
3189
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3190
[if test x"$enable_ltdl_install" = xno; then
3191
AC_MSG_WARN([libltdl not installed, but installation disabled])
3193
enable_ltdl_install=yes
3196
if test x"$enable_ltdl_install" = x"yes"; then
3197
ac_configure_args="$ac_configure_args --enable-ltdl-install"
3198
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3199
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3201
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3205
# For backwards non-gettext consistent compatibility...
3207
])# AC_LIBLTDL_INSTALLABLE
3212
# enable support for C++ libraries
3213
AC_DEFUN([AC_LIBTOOL_CXX],
3214
[AC_REQUIRE([_LT_AC_LANG_CXX])
3220
AC_DEFUN([_LT_AC_LANG_CXX],
3221
[AC_REQUIRE([AC_PROG_CXX])
3222
AC_REQUIRE([AC_PROG_CXXCPP])
3223
_LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,CXX" | sed 's/^,//'`])
3229
# enable support for Fortran 77 libraries
3230
AC_DEFUN([AC_LIBTOOL_F77],
3231
[AC_REQUIRE([_LT_AC_LANG_F77])
3237
AC_DEFUN([_LT_AC_LANG_F77],
3238
[AC_REQUIRE([AC_PROG_F77])
3239
_LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,F77" | sed 's/^,//'`])
3245
# enable support for GCJ libraries
3246
AC_DEFUN([AC_LIBTOOL_GCJ],
3247
[AC_REQUIRE([_LT_AC_LANG_GCJ])
3253
AC_DEFUN([_LT_AC_LANG_GCJ],
3254
[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
3255
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
3256
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
3257
[ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
3258
[ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
3259
[AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
3260
_LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,GCJ" | sed 's/^,//'`])
3266
# enable support for Windows resource files
3267
AC_DEFUN([AC_LIBTOOL_RC],
3268
[AC_REQUIRE([LT_AC_PROG_RC])
3269
_LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,RC" | sed 's/^,//'`])
3273
# AC_LIBTOOL_LANG_C_CONFIG
3274
# ------------------------
3275
# Ensure that the configuration vars for the C compiler are
3276
# suitably defined. Those variables are subsequently used by
3277
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3278
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
3279
AC_DEFUN([_LT_AC_LANG_C_CONFIG],
3283
# Source file extension for C test sources.
3286
# Object file extension for compiled C test sources.
3288
_LT_AC_TAGVAR(objext, $1)=$objext
3290
# Code to be used in simple compile tests
3291
lt_simple_compile_test_code="int some_variable = 0;\n"
3293
# Code to be used in simple link tests
3294
lt_simple_link_test_code='int main(){return(0);}\n'
3299
# Check for any special shared library compilation flags.
3301
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
3302
if test "$GCC" = no; then
3305
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
3309
if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
3310
AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
3311
if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[ ]]" >/dev/null; then :
3313
AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
3314
_LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
3320
# Check to make sure the static flag actually works.
3322
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
3323
_LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
3324
$_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
3326
[_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
3329
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3330
AC_LIBTOOL_PROG_COMPILER_PIC($1)
3331
AC_LIBTOOL_PROG_CC_C_O($1)
3332
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3333
AC_LIBTOOL_PROG_LD_SHLIBS($1)
3334
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3335
AC_LIBTOOL_SYS_LIB_STRIP
3336
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3337
AC_LIBTOOL_DLOPEN_SELF($1)
3339
# Report which librarie types wil actually be built
3340
AC_MSG_CHECKING([if libtool supports shared libraries])
3341
AC_MSG_RESULT([$can_build_shared])
3343
AC_MSG_CHECKING([whether to build shared libraries])
3344
test "$can_build_shared" = "no" && enable_shared=no
3346
# On AIX, shared libraries and static libraries use the same namespace, and
3347
# are all built from PIC.
3350
test "$enable_shared" = yes && enable_static=no
3351
if test -n "$RANLIB"; then
3352
archive_cmds="$archive_cmds~\$RANLIB \$lib"
3353
postinstall_cmds='$RANLIB $lib'
3358
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3359
test "$enable_shared" = yes && enable_static=no
3362
darwin* | rhapsody*)
3363
if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then
3364
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3366
rhapsody* | darwin1.[[012]])
3367
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
3370
test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3373
# FIXME: Relying on posixy $() will cause problems for
3374
# cross-compilation, but unfortunately the echo tests do not
3375
# yet detect zsh echo's removal of \ escapes. Also zsh mangles
3376
# `"' quotes if we put them in here... so don't!
3377
output_verbose_link_cmd='echo'
3378
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
3379
_LT_AC_TAGVAR(module_cmds, $1)='$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags'
3380
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3381
_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}'
3382
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3383
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3384
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3385
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3386
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
3387
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3391
AC_MSG_RESULT([$enable_shared])
3393
AC_MSG_CHECKING([whether to build static libraries])
3394
# Make sure either enable_shared or enable_static is yes.
3395
test "$enable_shared" = yes || enable_static=yes
3396
AC_MSG_RESULT([$enable_static])
3398
AC_LIBTOOL_CONFIG($1)
3402
])# AC_LIBTOOL_LANG_C_CONFIG
3405
# AC_LIBTOOL_LANG_CXX_CONFIG
3406
# --------------------------
3407
# Ensure that the configuration vars for the C compiler are
3408
# suitably defined. Those variables are subsequently used by
3409
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3410
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
3411
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
3413
AC_REQUIRE([AC_PROG_CXX])
3414
AC_REQUIRE([AC_PROG_CXXCPP])
3416
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3417
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
3418
_LT_AC_TAGVAR(always_export_symbols, $1)=no
3419
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3420
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3421
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3422
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3423
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3424
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3425
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3426
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
3427
_LT_AC_TAGVAR(module_cmds, $1)=
3428
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
3429
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3430
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3431
_LT_AC_TAGVAR(no_undefined_flag, $1)=
3432
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3433
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3435
# Dependencies to place before and after the object being linked:
3436
_LT_AC_TAGVAR(predep_objects, $1)=
3437
_LT_AC_TAGVAR(postdep_objects, $1)=
3438
_LT_AC_TAGVAR(predeps, $1)=
3439
_LT_AC_TAGVAR(postdeps, $1)=
3440
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
3442
# Source file extension for C++ test sources.
3445
# Object file extension for compiled C++ test sources.
3447
_LT_AC_TAGVAR(objext, $1)=$objext
3449
# Code to be used in simple compile tests
3450
lt_simple_compile_test_code="int some_variable = 0;\n"
3452
# Code to be used in simple link tests
3453
lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
3455
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3458
# Allow CC to be a program name with arguments.
3463
lt_save_with_gnu_ld=$with_gnu_ld
3464
lt_save_path_LD=$lt_cv_path_LD
3465
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
3466
lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
3468
unset lt_cv_prog_gnu_ld
3470
if test -n "${lt_cv_path_LDCXX+set}"; then
3471
lt_cv_path_LD=$lt_cv_path_LDCXX
3475
test -z "${LDCXX+set}" || LD=$LDCXX
3478
_LT_AC_TAGVAR(compiler, $1)=$CC
3479
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
3481
# We don't want -fno-exception wen compiling C++ code, so set the
3482
# no_builtin_flag separately
3483
if test "$GXX" = yes; then
3484
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3486
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3489
if test "$GXX" = yes; then
3490
# Set up default GNU C++ configuration
3494
# Check if GNU C++ uses GNU ld as the underlying linker, since the
3495
# archiving commands below assume that GNU ld is being used.
3496
if test "$with_gnu_ld" = yes; then
3497
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3498
_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'
3500
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3501
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3503
# If archive_cmds runs LD, not CC, wlarc should be empty
3504
# XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
3505
# investigate it a little bit more. (MM)
3508
# ancient GNU ld didn't support --whole-archive et. al.
3509
if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
3510
grep 'no-whole-archive' > /dev/null; then
3511
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3513
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3519
# A generic and very simple default shared library creation
3520
# command for GNU C++ for the case where it uses the native
3521
# linker, instead of GNU ld. If possible, this setting should
3522
# overridden to take advantage of the native linker features on
3523
# the platform it is being used on.
3524
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3527
# Commands to make compiler produce verbose output that lists
3528
# what "hidden" libraries, object files and flags are used when
3529
# linking a shared library.
3530
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3538
# PORTME: fill in a description of your system's C++ link characteristics
3539
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3540
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
3543
# FIXME: insert proper C++ library support
3544
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3547
if test "$host_cpu" = ia64; then
3548
# On IA64, the linker does run time linking by default, so we don't
3549
# have to do anything special.
3550
aix_use_runtimelinking=no
3551
exp_sym_flag='-Bexport'
3554
aix_use_runtimelinking=no
3556
# Test if we are trying to use run time linking or normal
3557
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
3558
# need to do runtime linking.
3559
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
3560
for ld_flag in $LDFLAGS; do
3563
aix_use_runtimelinking=yes
3570
exp_sym_flag='-bexport'
3571
no_entry_flag='-bnoentry'
3574
# When large executables or shared objects are built, AIX ld can
3575
# have problems creating the table of contents. If linking a library
3576
# or program results in "error TOC overflow" add -mminimal-toc to
3577
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
3578
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3580
_LT_AC_TAGVAR(archive_cmds, $1)=''
3581
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3582
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3583
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3585
if test "$GXX" = yes; then
3586
case $host_os in aix4.[012]|aix4.[012].*)
3587
# We only want to do this on AIX 4.2 and lower, the check
3588
# below for broken collect2 doesn't work under 4.3+
3589
collect2name=`${CC} -print-prog-name=collect2`
3590
if test -f "$collect2name" && \
3591
strings "$collect2name" | grep resolve_lib_name >/dev/null
3593
# We have reworked collect2
3594
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3596
# We have old collect2
3597
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3598
# It fails to find uninstalled libraries when the uninstalled
3599
# path is not listed in the libpath. Setting hardcode_minus_L
3600
# to unsupported forces relinking
3601
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3602
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3603
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3606
shared_flag='-shared'
3609
if test "$host_cpu" = ia64; then
3610
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3611
# chokes on -Wl,-G. The following line is correct:
3614
if test "$aix_use_runtimelinking" = yes; then
3615
shared_flag='${wl}-G'
3617
shared_flag='${wl}-bM:SRE'
3622
# It seems that -bexpall does not export symbols beginning with
3623
# underscore (_), so it is better to generate a list of symbols to export.
3624
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
3625
if test "$aix_use_runtimelinking" = yes; then
3626
# Warning - without using the other runtime loading flags (-brtl),
3627
# -berok will link without error, but may produce a broken library.
3628
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3629
# Determine the default libpath from the value encoded in an empty executable.
3630
_LT_AC_SYS_LIBPATH_AIX
3631
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3633
_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"
3635
if test "$host_cpu" = ia64; then
3636
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3637
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3638
_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"
3640
# Determine the default libpath from the value encoded in an empty executable.
3641
_LT_AC_SYS_LIBPATH_AIX
3642
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3643
# Warning - without using the other run time loading flags,
3644
# -berok will link without error, but may produce a broken library.
3645
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3646
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3647
# -bexpall does not export symbols beginning with underscore (_)
3648
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
3649
# Exported symbols can be pulled into shared objects from archives
3650
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
3651
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3652
# This is similar to how AIX traditionally builds it's shared libraries.
3653
_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'
3658
case $cc_basename in
3660
# FIXME: insert proper C++ library support
3661
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3666
cygwin* | mingw* | pw32*)
3667
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3668
# as there is no search path for DLLs.
3669
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3670
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3671
_LT_AC_TAGVAR(always_export_symbols, $1)=no
3672
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3674
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3675
_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'
3676
# If the export-symbols file already is a .def file (1st line
3677
# is EXPORTS), use it as is; otherwise, prepend...
3678
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3679
cp $export_symbols $output_objdir/$soname.def;
3681
echo EXPORTS > $output_objdir/$soname.def;
3682
cat $export_symbols >> $output_objdir/$soname.def;
3684
$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'
3686
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3690
darwin* | rhapsody*)
3691
if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then
3692
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3694
rhapsody* | darwin1.[[012]])
3695
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
3698
test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3701
lt_int_apple_cc_single_mod=no
3702
output_verbose_link_cmd='echo'
3703
if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
3704
lt_int_apple_cc_single_mod=yes
3706
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3707
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3709
_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'
3711
_LT_AC_TAGVAR(module_cmds, $1)='$CC -bundle ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags'
3713
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3714
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3715
_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}'
3717
_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}'
3719
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3720
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3721
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3722
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3723
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
3724
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3729
case $cc_basename in
3731
# FIXME: insert proper C++ library support
3732
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3735
# Green Hills C++ Compiler
3736
# FIXME: insert proper C++ library support
3737
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3740
# FIXME: insert proper C++ library support
3741
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3746
# C++ shared libraries reported to be fairly broken before switch to ELF
3747
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3750
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3753
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3755
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
3760
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3761
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3762
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3763
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3764
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3765
# but as the default
3766
# location of the library.
3768
case $cc_basename in
3770
# FIXME: insert proper C++ library support
3771
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3774
_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'
3775
# Commands to make compiler produce verbose output that lists
3776
# what "hidden" libraries, object files and flags are used when
3777
# linking a shared library.
3779
# There doesn't appear to be a way to prevent this compiler from
3780
# explicitly linking system object files so we need to strip them
3781
# from the output so that they don't get included in the library
3783
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3786
if test "$GXX" = yes; then
3787
_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'
3789
# FIXME: insert proper C++ library support
3790
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3796
if test $with_gnu_ld = no; then
3799
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3800
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
3801
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3804
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3807
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3808
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3809
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3815
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3816
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3819
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3820
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3821
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3822
# but as the default
3823
# location of the library.
3826
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3827
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3828
# but as the default
3829
# location of the library.
3833
case $cc_basename in
3835
# FIXME: insert proper C++ library support
3836
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3841
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3844
_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'
3847
# Commands to make compiler produce verbose output that lists
3848
# what "hidden" libraries, object files and flags are used when
3849
# linking a shared library.
3851
# There doesn't appear to be a way to prevent this compiler from
3852
# explicitly linking system object files so we need to strip them
3853
# from the output so that they don't get included in the library
3855
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'
3858
if test "$GXX" = yes; then
3859
if test $with_gnu_ld = no; then
3862
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3865
_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'
3870
# FIXME: insert proper C++ library support
3871
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3877
case $cc_basename in
3880
_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'
3882
# Archives containing C++ object files must be created using
3883
# "CC -ar", where "CC" is the IRIX C++ compiler. This is
3884
# necessary to make sure instantiated templates are included
3886
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3889
if test "$GXX" = yes; then
3890
if test "$with_gnu_ld" = no; then
3891
_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'
3893
_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'
3896
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3899
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3900
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3903
case $cc_basename in
3905
# Kuck and Associates, Inc. (KAI) C++ Compiler
3907
# KCC will only create a shared library if the output file
3908
# ends with ".so" (or ".sl" for HP-UX), so rename the library
3909
# to its proper name (with version) after linking.
3910
_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'
3911
_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'
3912
# Commands to make compiler produce verbose output that lists
3913
# what "hidden" libraries, object files and flags are used when
3914
# linking a shared library.
3916
# There doesn't appear to be a way to prevent this compiler from
3917
# explicitly linking system object files so we need to strip them
3918
# from the output so that they don't get included in the library
3920
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'
3922
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
3923
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3925
# Archives containing C++ object files must be created using
3926
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
3927
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3932
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3933
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3934
_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'
3935
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3936
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3937
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
3941
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3942
_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'
3944
runpath_var=LD_RUN_PATH
3945
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3946
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3948
# Commands to make compiler produce verbose output that lists
3949
# what "hidden" libraries, object files and flags are used when
3950
# linking a shared library.
3952
# There doesn't appear to be a way to prevent this compiler from
3953
# explicitly linking system object files so we need to strip them
3954
# from the output so that they don't get included in the library
3956
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'
3961
# FIXME: insert proper C++ library support
3962
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3965
# FIXME: insert proper C++ library support
3966
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3969
case $cc_basename in
3971
# FIXME: insert proper C++ library support
3972
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3975
# FIXME: insert proper C++ library support
3976
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3981
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3982
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
3984
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3985
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3986
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3988
# Workaround some broken pre-1.5 toolchains
3989
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
3992
case $cc_basename in
3994
# Kuck and Associates, Inc. (KAI) C++ Compiler
3996
# KCC will only create a shared library if the output file
3997
# ends with ".so" (or ".sl" for HP-UX), so rename the library
3998
# to its proper name (with version) after linking.
3999
_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'
4001
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4002
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4004
# Archives containing C++ object files must be created using
4005
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
4006
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4010
# Rational C++ 2.4.1
4011
# FIXME: insert proper C++ library support
4012
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4015
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4016
_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'
4018
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4019
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4021
# Commands to make compiler produce verbose output that lists
4022
# what "hidden" libraries, object files and flags are used when
4023
# linking a shared library.
4025
# There doesn't appear to be a way to prevent this compiler from
4026
# explicitly linking system object files so we need to strip them
4027
# from the output so that they don't get included in the library
4029
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'
4032
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4033
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4034
_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'
4036
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4037
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4039
# Commands to make compiler produce verbose output that lists
4040
# what "hidden" libraries, object files and flags are used when
4041
# linking a shared library.
4042
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4045
# FIXME: insert proper C++ library support
4046
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4052
case $cc_basename in
4054
# Kuck and Associates, Inc. (KAI) C++ Compiler
4056
# KCC will only create a shared library if the output file
4057
# ends with ".so" (or ".sl" for HP-UX), so rename the library
4058
# to its proper name (with version) after linking.
4059
_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'
4061
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4062
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4064
# Archives containing C++ object files must be created using
4065
# the KAI C++ compiler.
4066
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
4069
# Rational C++ 2.4.1
4070
# FIXME: insert proper C++ library support
4071
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4074
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4075
_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'
4076
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
4077
echo "-hidden">> $lib.exp~
4078
$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~
4081
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4082
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4084
# Commands to make compiler produce verbose output that lists
4085
# what "hidden" libraries, object files and flags are used when
4086
# linking a shared library.
4088
# There doesn't appear to be a way to prevent this compiler from
4089
# explicitly linking system object files so we need to strip them
4090
# from the output so that they don't get included in the library
4092
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'
4095
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4096
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4097
_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'
4099
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4100
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4102
# Commands to make compiler produce verbose output that lists
4103
# what "hidden" libraries, object files and flags are used when
4104
# linking a shared library.
4105
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4108
# FIXME: insert proper C++ library support
4109
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4115
# FIXME: insert proper C++ library support
4116
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4119
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4120
case $cc_basename in
4122
# FIXME: insert proper C++ library support
4123
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4126
# FIXME: insert proper C++ library support
4127
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4132
case $cc_basename in
4135
# FIXME: insert proper C++ library support
4136
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4140
# FIXME: insert proper C++ library support
4141
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4144
# FIXME: insert proper C++ library support
4145
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4150
case $cc_basename in
4152
# Sun C++ 4.2, 5.x and Centerline C++
4153
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
4154
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4155
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4156
$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'
4158
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4159
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4161
solaris2.[0-5] | solaris2.[0-5].*) ;;
4163
# The C++ compiler is used as linker so we must use $wl
4164
# flag to pass the commands to the underlying system
4166
# Supported since Solaris 2.6 (maybe 2.5.1?)
4167
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
4170
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4172
# Commands to make compiler produce verbose output that lists
4173
# what "hidden" libraries, object files and flags are used when
4174
# linking a shared library.
4176
# There doesn't appear to be a way to prevent this compiler from
4177
# explicitly linking system object files so we need to strip them
4178
# from the output so that they don't get included in the library
4180
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'
4182
# Archives containing C++ object files must be created using
4183
# "CC -xar", where "CC" is the Sun C++ compiler. This is
4184
# necessary to make sure instantiated templates are included
4186
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
4189
# Green Hills C++ Compiler
4190
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4192
# The C++ compiler must be used to create the archive.
4193
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
4196
# GNU C++ compiler with Solaris linker
4197
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4198
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
4199
if $CC --version | grep -v '^2\.7' > /dev/null; then
4200
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4201
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4202
$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4204
# Commands to make compiler produce verbose output that lists
4205
# what "hidden" libraries, object files and flags are used when
4206
# linking a shared library.
4207
output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4209
# g++ 2.7 appears to require `-G' NOT `-shared' on this
4211
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4212
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4213
$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4215
# Commands to make compiler produce verbose output that lists
4216
# what "hidden" libraries, object files and flags are used when
4217
# linking a shared library.
4218
output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4221
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
4226
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
4227
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4230
case $cc_basename in
4232
# NonStop-UX NCC 3.20
4233
# FIXME: insert proper C++ library support
4234
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4237
# FIXME: insert proper C++ library support
4238
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4243
# FIXME: insert proper C++ library support
4244
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4247
# FIXME: insert proper C++ library support
4248
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4251
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
4252
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4254
_LT_AC_TAGVAR(GCC, $1)="$GXX"
4255
_LT_AC_TAGVAR(LD, $1)="$LD"
4257
AC_LIBTOOL_POSTDEP_PREDEP($1)
4258
AC_LIBTOOL_PROG_COMPILER_PIC($1)
4259
AC_LIBTOOL_PROG_CC_C_O($1)
4260
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4261
AC_LIBTOOL_PROG_LD_SHLIBS($1)
4262
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4263
AC_LIBTOOL_SYS_LIB_STRIP
4264
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4265
AC_LIBTOOL_DLOPEN_SELF($1)
4267
AC_LIBTOOL_CONFIG($1)
4274
with_gnu_ldcxx=$with_gnu_ld
4275
with_gnu_ld=$lt_save_with_gnu_ld
4276
lt_cv_path_LDCXX=$lt_cv_path_LD
4277
lt_cv_path_LD=$lt_save_path_LD
4278
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
4279
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
4280
])# AC_LIBTOOL_LANG_CXX_CONFIG
4282
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
4283
# ------------------------
4284
# Figure out "hidden" library dependencies from verbose
4285
# compiler output when linking a shared library.
4286
# Parse the compiler output and extract the necessary
4287
# objects, libraries and library flags.
4288
AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
4289
dnl we can't use the lt_simple_compile_test_code here,
4290
dnl because it contains code intended for an executable,
4291
dnl not a library. It's possible we should let each
4292
dnl tag define a new lt_????_link_test_code variable,
4293
dnl but it's only used here...
4294
ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
4296
void foo (void) { a = 0; }
4298
],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
4302
Foo (void) { a = 0; }
4307
],[$1],[F77],[cat > conftest.$ac_ext <<EOF
4315
],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
4318
public void bar (void) {
4324
dnl Parse the compiler output and extract the necessary
4325
dnl objects, libraries and library flags.
4326
if AC_TRY_EVAL(ac_compile); then
4327
# Parse the compiler output and extract the necessary
4328
# objects, libraries and library flags.
4330
# Sentinel used to keep track of whether or not we are before
4331
# the conftest object file.
4332
pre_test_object_deps_done=no
4334
# The `*' in the case matches for architectures that use `case' in
4335
# $output_verbose_cmd can trigger glob expansion during the loop
4336
# eval without this substitution.
4337
output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
4339
for p in `eval $output_verbose_link_cmd`; do
4343
# Some compilers place space between "-{L,R}" and the path.
4346
|| test $p = "-R"; then
4353
if test "$pre_test_object_deps_done" = no; then
4356
# Internal compiler library paths should come after those
4357
# provided the user. The postdeps already come after the
4358
# user supplied libs so there is no need to process them.
4359
if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
4360
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
4362
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
4365
# The "-l" case would never come before the object being
4366
# linked, so don't bother handling this case.
4369
if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
4370
_LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
4372
_LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
4378
# This assumes that the test object file only shows up
4379
# once in the compiler output.
4380
if test "$p" = "conftest.$objext"; then
4381
pre_test_object_deps_done=yes
4385
if test "$pre_test_object_deps_done" = no; then
4386
if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
4387
_LT_AC_TAGVAR(predep_objects, $1)="$p"
4389
_LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
4392
if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
4393
_LT_AC_TAGVAR(postdep_objects, $1)="$p"
4395
_LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
4400
*) ;; # Ignore the rest.
4408
echo "libtool.m4: error: problem compiling $1 test program"
4411
$rm -f confest.$objext
4413
case " $_LT_AC_TAGVAR(postdeps, $1) " in
4414
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
4416
])# AC_LIBTOOL_POSTDEP_PREDEP
4418
# AC_LIBTOOL_LANG_F77_CONFIG
4419
# ------------------------
4420
# Ensure that the configuration vars for the C compiler are
4421
# suitably defined. Those variables are subsequently used by
4422
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4423
AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
4424
AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
4425
[AC_REQUIRE([AC_PROG_F77])
4426
AC_LANG_PUSH(Fortran 77)
4428
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4429
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
4430
_LT_AC_TAGVAR(always_export_symbols, $1)=no
4431
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4432
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4433
_LT_AC_TAGVAR(hardcode_direct, $1)=no
4434
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4435
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4436
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4437
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4438
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
4439
_LT_AC_TAGVAR(module_cmds, $1)=
4440
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
4441
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4442
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4443
_LT_AC_TAGVAR(no_undefined_flag, $1)=
4444
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4445
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4447
# Source file extension for f77 test sources.
4450
# Object file extension for compiled f77 test sources.
4452
_LT_AC_TAGVAR(objext, $1)=$objext
4454
# Code to be used in simple compile tests
4455
lt_simple_compile_test_code=" subroutine t\n return\n end\n"
4457
# Code to be used in simple link tests
4458
lt_simple_link_test_code=" program t\n end\n"
4460
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4463
# Allow CC to be a program name with arguments.
4467
_LT_AC_TAGVAR(compiler, $1)=$CC
4468
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
4470
AC_MSG_CHECKING([if libtool supports shared libraries])
4471
AC_MSG_RESULT([$can_build_shared])
4473
AC_MSG_CHECKING([whether to build shared libraries])
4474
test "$can_build_shared" = "no" && enable_shared=no
4476
# On AIX, shared libraries and static libraries use the same namespace, and
4477
# are all built from PIC.
4480
test "$enable_shared" = yes && enable_static=no
4481
if test -n "$RANLIB"; then
4482
archive_cmds="$archive_cmds~\$RANLIB \$lib"
4483
postinstall_cmds='$RANLIB $lib'
4487
test "$enable_shared" = yes && enable_static=no
4490
AC_MSG_RESULT([$enable_shared])
4492
AC_MSG_CHECKING([whether to build static libraries])
4493
# Make sure either enable_shared or enable_static is yes.
4494
test "$enable_shared" = yes || enable_static=yes
4495
AC_MSG_RESULT([$enable_static])
4497
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4499
_LT_AC_TAGVAR(GCC, $1)="$G77"
4500
_LT_AC_TAGVAR(LD, $1)="$LD"
4502
AC_LIBTOOL_PROG_COMPILER_PIC($1)
4503
AC_LIBTOOL_PROG_CC_C_O($1)
4504
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4505
AC_LIBTOOL_PROG_LD_SHLIBS($1)
4506
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4507
AC_LIBTOOL_SYS_LIB_STRIP
4508
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4510
AC_LIBTOOL_CONFIG($1)
4514
])# AC_LIBTOOL_LANG_F77_CONFIG
4517
# AC_LIBTOOL_LANG_GCJ_CONFIG
4518
# --------------------------
4519
# Ensure that the configuration vars for the C compiler are
4520
# suitably defined. Those variables are subsequently used by
4521
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4522
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
4523
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
4526
# Source file extension for Java test sources.
4529
# Object file extension for compiled Java test sources.
4531
_LT_AC_TAGVAR(objext, $1)=$objext
4533
# Code to be used in simple compile tests
4534
lt_simple_compile_test_code="class foo {}\n"
4536
# Code to be used in simple link tests
4537
lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
4539
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4542
# Allow CC to be a program name with arguments.
4546
_LT_AC_TAGVAR(compiler, $1)=$CC
4548
# GCJ did not exist at the time GCC didn't implicitly link libc in.
4549
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4551
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4552
AC_LIBTOOL_PROG_COMPILER_PIC($1)
4553
AC_LIBTOOL_PROG_CC_C_O($1)
4554
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4555
AC_LIBTOOL_PROG_LD_SHLIBS($1)
4556
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4557
AC_LIBTOOL_SYS_LIB_STRIP
4558
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4559
AC_LIBTOOL_DLOPEN_SELF($1)
4561
AC_LIBTOOL_CONFIG($1)
4565
])# AC_LIBTOOL_LANG_GCJ_CONFIG
4568
# AC_LIBTOOL_LANG_RC_CONFIG
4569
# --------------------------
4570
# Ensure that the configuration vars for the Windows resource compiler are
4571
# suitably defined. Those variables are subsequently used by
4572
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4573
AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4574
AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4577
# Source file extension for RC test sources.
4580
# Object file extension for compiled RC test sources.
4582
_LT_AC_TAGVAR(objext, $1)=$objext
4584
# Code to be used in simple compile tests
4585
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
4587
# Code to be used in simple link tests
4588
lt_simple_link_test_code="$lt_simple_compile_test_code"
4590
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4593
# Allow CC to be a program name with arguments.
4597
_LT_AC_TAGVAR(compiler, $1)=$CC
4598
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4600
AC_LIBTOOL_CONFIG($1)
4604
])# AC_LIBTOOL_LANG_RC_CONFIG
4607
# AC_LIBTOOL_CONFIG([TAGNAME])
4608
# ----------------------------
4609
# If TAGNAME is not passed, then create an initial libtool script
4610
# with a default configuration from the untagged config vars. Otherwise
4611
# add code to config.status for appending the configuration named by
4612
# TAGNAME from the matching tagged config vars.
4613
AC_DEFUN([AC_LIBTOOL_CONFIG],
4614
[# The else clause should only fire when bootstrapping the
4615
# libtool distribution, otherwise you forgot to ship ltmain.sh
4616
# with your package, and you will get complaints that there are
4617
# no rules to generate ltmain.sh.
4618
if test -f "$ltmain"; then
4619
# See if we are running on zsh, and set the options which allow our commands through
4620
# without removal of \ escapes.
4621
if test -n "${ZSH_VERSION+set}" ; then
4622
setopt NO_GLOB_SUBST
4624
# Now quote all the things that may contain metacharacters while being
4625
# careful not to overquote the AC_SUBSTed values. We take copies of the
4626
# variables and quote the copies for generation of the libtool script.
4627
for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL \
4628
libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4629
old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4630
deplibs_check_method reload_flag reload_cmds need_locks \
4631
lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4632
lt_cv_sys_global_symbol_to_c_name_address \
4633
sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4634
old_postinstall_cmds old_postuninstall_cmds \
4635
_LT_AC_TAGVAR(compiler, $1) \
4636
_LT_AC_TAGVAR(CC, $1) \
4637
_LT_AC_TAGVAR(LD, $1) \
4638
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4639
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4640
_LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4641
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4642
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4643
_LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4644
_LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4645
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4646
_LT_AC_TAGVAR(old_archive_cmds, $1) \
4647
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4648
_LT_AC_TAGVAR(predep_objects, $1) \
4649
_LT_AC_TAGVAR(postdep_objects, $1) \
4650
_LT_AC_TAGVAR(predeps, $1) \
4651
_LT_AC_TAGVAR(postdeps, $1) \
4652
_LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4653
_LT_AC_TAGVAR(archive_cmds, $1) \
4654
_LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4655
_LT_AC_TAGVAR(postinstall_cmds, $1) \
4656
_LT_AC_TAGVAR(postuninstall_cmds, $1) \
4657
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4658
_LT_AC_TAGVAR(allow_undefined_flag, $1) \
4659
_LT_AC_TAGVAR(no_undefined_flag, $1) \
4660
_LT_AC_TAGVAR(export_symbols_cmds, $1) \
4661
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4662
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4663
_LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4664
_LT_AC_TAGVAR(hardcode_automatic, $1) \
4665
_LT_AC_TAGVAR(module_cmds, $1) \
4666
_LT_AC_TAGVAR(module_expsym_cmds, $1) \
4667
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4668
_LT_AC_TAGVAR(exclude_expsyms, $1) \
4669
_LT_AC_TAGVAR(include_expsyms, $1); do
4672
_LT_AC_TAGVAR(old_archive_cmds, $1) | \
4673
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4674
_LT_AC_TAGVAR(archive_cmds, $1) | \
4675
_LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4676
_LT_AC_TAGVAR(module_cmds, $1) | \
4677
_LT_AC_TAGVAR(module_expsym_cmds, $1) | \
4678
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4679
_LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4680
extract_expsyms_cmds | reload_cmds | finish_cmds | \
4681
postinstall_cmds | postuninstall_cmds | \
4682
old_postinstall_cmds | old_postuninstall_cmds | \
4683
sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4684
# Double-quote double-evaled strings.
4685
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4688
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4694
*'\[$]0 --fallback-echo"')
4695
lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
4700
[cfgfile="${ofile}T"
4701
trap "$rm \"$cfgfile\"; exit 1" 1 2 15
4703
AC_MSG_NOTICE([creating $ofile])],
4706
cat <<__EOF__ >> "$cfgfile"
4710
# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
4711
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4712
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
4714
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
4715
# Free Software Foundation, Inc.
4717
# This file is part of GNU Libtool:
4718
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4720
# This program is free software; you can redistribute it and/or modify
4721
# it under the terms of the GNU General Public License as published by
4722
# the Free Software Foundation; either version 2 of the License, or
4723
# (at your option) any later version.
4725
# This program is distributed in the hope that it will be useful, but
4726
# WITHOUT ANY WARRANTY; without even the implied warranty of
4727
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4728
# General Public License for more details.
4730
# You should have received a copy of the GNU General Public License
4731
# along with this program; if not, write to the Free Software
4732
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
4734
# As a special exception to the GNU General Public License, if you
4735
# distribute this file as part of a program that contains a
4736
# configuration script generated by Autoconf, you may include it under
4737
# the same distribution terms that you use for the rest of that program.
4739
# A sed program that does not truncate output.
4742
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
4743
Xsed="$SED -e s/^X//"
4745
# The HP-UX ksh and POSIX shell print the target directory to stdout
4747
if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
4749
# The names of the tagged configurations supported by this script.
4752
# ### BEGIN LIBTOOL CONFIG],
4753
[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
4755
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4757
# Shell to use when invoking shell scripts.
4760
# Whether or not to build shared libraries.
4761
build_libtool_libs=$enable_shared
4763
# Whether or not to build static libraries.
4764
build_old_libs=$enable_static
4766
# Whether or not to add -lc for building shared libraries.
4767
build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
4769
# Whether or not to disallow shared libs when runtime libs are static
4770
allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
4772
# Whether or not to optimize for fast installation.
4773
fast_install=$enable_fast_install
4776
host_alias=$host_alias
4779
# An echo program that does not interpret backslashes.
4784
AR_FLAGS=$lt_AR_FLAGS
4789
# A language-specific compiler.
4790
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
4792
# Is the compiler the GNU C compiler?
4793
with_gcc=$_LT_AC_TAGVAR(GCC, $1)
4798
# The linker used to build libraries.
4799
LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
4801
# Whether we need hard or soft links.
4804
# A BSD-compatible nm program.
4807
# A symbol stripping program
4810
# Used to examine libraries when file_magic_cmd begins "file"
4811
MAGIC_CMD=$MAGIC_CMD
4813
# Used on cygwin: DLL creation program.
4816
# Used on cygwin: object dumper.
4819
# Used on cygwin: assembler.
4822
# The name of the directory that contains temporary libtool files.
4825
# How to create reloadable object files.
4826
reload_flag=$lt_reload_flag
4827
reload_cmds=$lt_reload_cmds
4829
# How to pass a linker flag through the compiler.
4830
wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
4832
# Object file suffix (normally "o").
4835
# Old archive suffix (normally "a").
4838
# Shared library suffix (normally ".so").
4841
# Executable file suffix (normally "").
4844
# Additional compiler flags for building library objects.
4845
pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
4848
# What is the maximum length of a command?
4849
max_cmd_len=$lt_cv_sys_max_cmd_len
4851
# Does compiler simultaneously support -c and -o options?
4852
compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
4854
# Must we lock files when doing compilation ?
4855
need_locks=$lt_need_locks
4857
# Do we need the lib prefix for modules?
4858
need_lib_prefix=$need_lib_prefix
4860
# Do we need a version for libraries?
4861
need_version=$need_version
4863
# Whether dlopen is supported.
4864
dlopen_support=$enable_dlopen
4866
# Whether dlopen of programs is supported.
4867
dlopen_self=$enable_dlopen_self
4869
# Whether dlopen of statically linked programs is supported.
4870
dlopen_self_static=$enable_dlopen_self_static
4872
# Compiler flag to prevent dynamic linking.
4873
link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
4875
# Compiler flag to turn off builtin functions.
4876
no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
4878
# Compiler flag to allow reflexive dlopens.
4879
export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
4881
# Compiler flag to generate shared objects directly from archives.
4882
whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
4884
# Compiler flag to generate thread-safe objects.
4885
thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
4887
# Library versioning type.
4888
version_type=$version_type
4890
# Format of library name prefix.
4891
libname_spec=$lt_libname_spec
4893
# List of archive names. First name is the real one, the rest are links.
4894
# The last name is the one that the linker finds with -lNAME.
4895
library_names_spec=$lt_library_names_spec
4897
# The coded name of the library, if different from the real name.
4898
soname_spec=$lt_soname_spec
4900
# Commands used to build and install an old-style archive.
4902
old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
4903
old_postinstall_cmds=$lt_old_postinstall_cmds
4904
old_postuninstall_cmds=$lt_old_postuninstall_cmds
4906
# Create an old-style archive from a shared archive.
4907
old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
4909
# Create a temporary old-style archive to link instead of a shared archive.
4910
old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
4912
# Commands used to build and install a shared archive.
4913
archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
4914
archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
4915
postinstall_cmds=$lt_postinstall_cmds
4916
postuninstall_cmds=$lt_postuninstall_cmds
4918
# Commands used to build a loadable module (assumed same as above if empty)
4919
module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
4920
module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
4922
# Commands to strip libraries.
4923
old_striplib=$lt_old_striplib
4924
striplib=$lt_striplib
4926
# Dependencies to place before the objects being linked to create a
4928
predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
4930
# Dependencies to place after the objects being linked to create a
4932
postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
4934
# Dependencies to place before the objects being linked to create a
4936
predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
4938
# Dependencies to place after the objects being linked to create a
4940
postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
4942
# The library search path used internally by the compiler when linking
4944
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
4946
# Method to check whether dependent libraries are shared objects.
4947
deplibs_check_method=$lt_deplibs_check_method
4949
# Command to use when deplibs_check_method == file_magic.
4950
file_magic_cmd=$lt_file_magic_cmd
4952
# Flag that allows shared libraries with undefined symbols to be built.
4953
allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
4955
# Flag that forces no undefined symbols.
4956
no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
4958
# Commands used to finish a libtool library installation in a directory.
4959
finish_cmds=$lt_finish_cmds
4961
# Same as above, but a single script fragment to be evaled but not shown.
4962
finish_eval=$lt_finish_eval
4964
# Take the output of nm and produce a listing of raw symbols and C names.
4965
global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
4967
# Transform the output of nm in a proper C declaration
4968
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
4970
# Transform the output of nm in a C name address pair
4971
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
4973
# This is the shared library runtime path variable.
4974
runpath_var=$runpath_var
4976
# This is the shared library path variable.
4977
shlibpath_var=$shlibpath_var
4979
# Is shlibpath searched before the hard-coded library search path?
4980
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
4982
# How to hardcode a shared library path into an executable.
4983
hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
4985
# Whether we should hardcode library paths into libraries.
4986
hardcode_into_libs=$hardcode_into_libs
4988
# Flag to hardcode \$libdir into a binary during linking.
4989
# This must work even if \$libdir does not exist.
4990
hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
4992
# If ld is used when linking, flag to hardcode \$libdir into
4993
# a binary during linking. This must work even if \$libdir does
4995
hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
4997
# Whether we need a single -rpath flag with a separated argument.
4998
hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
5000
# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
5002
hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
5004
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
5006
hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
5008
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
5009
# the resulting binary.
5010
hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
5012
# Set to yes if building a shared library automatically hardcodes DIR into the library
5013
# and all subsequent libraries and executables linked against it.
5014
hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
5016
# Variables whose values should be saved in libtool wrapper scripts and
5017
# restored at relink time.
5018
variables_saved_for_relink="$variables_saved_for_relink"
5020
# Whether libtool must link a program against all its dependency libraries.
5021
link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
5023
# Compile-time system search path for libraries
5024
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
5026
# Run-time system search path for libraries
5027
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
5029
# Fix the shell variable \$srcfile for the compiler.
5030
fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
5032
# Set to yes if exported symbols are required.
5033
always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
5035
# The commands to list exported symbols.
5036
export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
5038
# The commands to extract the exported symbol list from a shared archive.
5039
extract_expsyms_cmds=$lt_extract_expsyms_cmds
5041
# Symbols that should not be listed in the preloaded symbols.
5042
exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
5044
# Symbols that must always be exported.
5045
include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
5048
[# ### END LIBTOOL CONFIG],
5049
[# ### END LIBTOOL TAG CONFIG: $tagname])
5056
cat <<\EOF >> "$cfgfile"
5058
# AIX sometimes has problems with the GCC collect2 program. For some
5059
# reason, if we set the COLLECT_NAMES environment variable, the problems
5060
# vanish in a puff of smoke.
5061
if test "X${COLLECT_NAMES+set}" != Xset; then
5063
export COLLECT_NAMES
5069
# We use sed instead of cat because bash on DJGPP gets confused if
5070
# if finds mixed CR/LF and LF-only lines. Since sed operates in
5071
# text mode, it properly converts lines to CR/LF. This bash problem
5072
# is reportedly fixed, but why not run on old versions too?
5073
sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
5075
mv -f "$cfgfile" "$ofile" || \
5076
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
5080
# If there is no Makefile yet, we rely on a make rule to execute
5081
# `config.status --recheck' to rerun these tests and create the
5082
# libtool script then.
5083
test -f Makefile && make "$ltmain"
5085
])# AC_LIBTOOL_CONFIG
5088
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
5089
# -------------------------------------------
5090
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
5091
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
5093
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5095
if test "$GCC" = yes; then
5096
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5098
AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5099
lt_cv_prog_compiler_rtti_exceptions,
5100
[-fno-rtti -fno-exceptions], [],
5101
[_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5103
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
5106
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5107
# ---------------------------------
5108
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
5109
[AC_REQUIRE([AC_CANONICAL_HOST])
5110
AC_REQUIRE([AC_PROG_NM])
5111
AC_REQUIRE([AC_OBJEXT])
5112
# Check for command to grab the raw symbol name followed by C symbol from nm.
5113
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
5114
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5116
# These are sane defaults that work on at least a few old systems.
5117
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
5119
# Character class describing NM global symbol codes.
5120
symcode='[[BCDEGRST]]'
5122
# Regexp to match symbols that can be accessed directly from C.
5123
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5125
# Transform the above into a raw symbol and a C symbol.
5126
symxfrm='\1 \2\3 \3'
5128
# Transform an extracted symbol line into a proper C declaration
5129
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
5131
# Transform an extracted symbol line into symbol name and symbol address
5132
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'"
5134
# Define system-specific variables.
5139
cygwin* | mingw* | pw32*)
5140
symcode='[[ABCDGISTW]]'
5142
hpux*) # Its linker distinguishes data from code symbols
5143
if test "$host_cpu" = ia64; then
5144
symcode='[[ABCDEGRST]]'
5146
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5147
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'"
5150
symcode='[[BCDEGRST]]'
5153
symcode='[[BCDEGQRST]]'
5159
symcode='[[DFNSTU]]'
5163
# Handle CRLF in mingw tool chain
5167
opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5171
# If we're using GNU nm, then use its standard symbol codes.
5172
case `$NM -V 2>&1` in
5173
*GNU* | *'with BFD'*)
5174
symcode='[[ABCDGISTW]]' ;;
5177
# Try without a prefix undercore, then with it.
5178
for ac_symprfx in "" "_"; do
5180
# Write the raw and C identifiers.
5181
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
5183
# Check to see that the pipe works correctly.
5187
cat > conftest.$ac_ext <<EOF
5192
void nm_test_func(){}
5196
int main(){nm_test_var='a';nm_test_func();return(0);}
5199
if AC_TRY_EVAL(ac_compile); then
5200
# Now try to grab the symbols.
5202
if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
5203
# Try sorting and uniquifying the output.
5204
if sort "$nlist" | uniq > "$nlist"T; then
5205
mv -f "$nlist"T "$nlist"
5210
# Make sure that we snagged all the symbols we need.
5211
if grep ' nm_test_var$' "$nlist" >/dev/null; then
5212
if grep ' nm_test_func$' "$nlist" >/dev/null; then
5213
cat <<EOF > conftest.$ac_ext
5219
# Now generate the symbol file.
5220
eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
5222
cat <<EOF >> conftest.$ac_ext
5223
#if defined (__STDC__) && __STDC__
5224
# define lt_ptr_t void *
5226
# define lt_ptr_t char *
5230
/* The mapping between symbol names and symbols. */
5235
lt_preloaded_symbols[[]] =
5238
$SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
5239
cat <<\EOF >> conftest.$ac_ext
5247
# Now try linking the two files.
5248
mv conftest.$ac_objext conftstm.$ac_objext
5249
lt_save_LIBS="$LIBS"
5250
lt_save_CFLAGS="$CFLAGS"
5251
LIBS="conftstm.$ac_objext"
5252
CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5253
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5256
LIBS="$lt_save_LIBS"
5257
CFLAGS="$lt_save_CFLAGS"
5259
echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5262
echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5265
echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5268
echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5269
cat conftest.$ac_ext >&5
5271
rm -f conftest* conftst*
5273
# Do not use the global_symbol_pipe unless it works.
5274
if test "$pipe_works" = yes; then
5277
lt_cv_sys_global_symbol_pipe=
5281
if test -z "$lt_cv_sys_global_symbol_pipe"; then
5282
lt_cv_sys_global_symbol_to_cdecl=
5284
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5285
AC_MSG_RESULT(failed)
5289
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5292
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
5293
# ---------------------------------------
5294
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
5295
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
5296
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5297
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
5299
AC_MSG_CHECKING([for $compiler option to produce PIC])
5301
# C++ specific cases for pic, static, wl, etc.
5302
if test "$GXX" = yes; then
5303
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5304
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5308
# All AIX code is PIC.
5309
if test "$host_cpu" = ia64; then
5310
# AIX 5 now supports IA64 processor
5311
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5315
# FIXME: we need at least 68020 code to build shared libraries, but
5316
# adding the `-m68020' flag to GCC prevents building anything better,
5318
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5320
beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5321
# PIC is the default for these OSes.
5323
mingw* | os2* | pw32*)
5324
# This hack is so that the source file can tell whether it is being
5325
# built for inclusion in a dll (and should export symbols for example).
5326
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5328
darwin* | rhapsody*)
5329
# PIC is the default on this platform
5330
# Common symbols not allowed in MH_DYLIB files
5331
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5334
# DJGPP does not support shared libraries at all
5335
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5338
if test -d /usr/nec; then
5339
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5343
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5349
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5354
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5360
# All AIX code is PIC.
5361
if test "$host_cpu" = ia64; then
5362
# AIX 5 now supports IA64 processor
5363
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5365
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5369
case $cc_basename in
5371
# Green Hills C++ Compiler
5372
# _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"
5377
case $cc_basename in
5379
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5382
# Green Hills C++ Compiler
5383
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5390
# FreeBSD uses GNU C++
5392
hpux9* | hpux10* | hpux11*)
5393
case $cc_basename in
5395
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5396
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
5397
if test "$host_cpu" != ia64; then
5398
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5402
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5403
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
5409
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5417
irix5* | irix6* | nonstopux*)
5418
case $cc_basename in
5420
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5421
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5422
# CC pic flag -KPIC is the default.
5429
case $cc_basename in
5432
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5433
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5437
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5438
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5439
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5443
# Make sure the PIC flag is empty. It appears that all Alpha
5444
# Linux and Compaq Tru64 Unix objects are PIC.
5445
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5446
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5457
case $cc_basename in
5459
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5467
osf3* | osf4* | osf5*)
5468
case $cc_basename in
5470
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5473
# Rational C++ 2.4.1
5474
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5477
# Digital/Compaq C++
5478
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5479
# Make sure the PIC flag is empty. It appears that all Alpha
5480
# Linux and Compaq Tru64 Unix objects are PIC.
5481
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5482
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5491
case $cc_basename in
5493
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5500
case $cc_basename in
5502
# Sun C++ 4.2, 5.x and Centerline C++
5503
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5504
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5505
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5508
# Green Hills C++ Compiler
5509
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5516
case $cc_basename in
5519
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5520
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5524
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5531
case $cc_basename in
5533
# NonStop-UX NCC 3.20
5534
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5545
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5551
if test "$GCC" = yes; then
5552
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5553
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5557
# All AIX code is PIC.
5558
if test "$host_cpu" = ia64; then
5559
# AIX 5 now supports IA64 processor
5560
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5565
# FIXME: we need at least 68020 code to build shared libraries, but
5566
# adding the `-m68020' flag to GCC prevents building anything better,
5568
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5571
beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5572
# PIC is the default for these OSes.
5575
mingw* | pw32* | os2*)
5576
# This hack is so that the source file can tell whether it is being
5577
# built for inclusion in a dll (and should export symbols for example).
5578
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5581
darwin* | rhapsody*)
5582
# PIC is the default on this platform
5583
# Common symbols not allowed in MH_DYLIB files
5584
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5588
# Just because we use GCC doesn't mean we suddenly get shared libraries
5589
# on systems that don't support them.
5590
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5595
if test -d /usr/nec; then
5596
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5601
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5608
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5614
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5618
# PORTME Check for flag to pass linker flags through the system compiler.
5621
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5622
if test "$host_cpu" = ia64; then
5623
# AIX 5 now supports IA64 processor
5624
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5626
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5630
mingw* | pw32* | os2*)
5631
# This hack is so that the source file can tell whether it is being
5632
# built for inclusion in a dll (and should export symbols for example).
5633
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5636
hpux9* | hpux10* | hpux11*)
5637
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5638
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5645
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5648
# Is there a better lt_prog_compiler_static that works with the bundled CC?
5649
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5652
irix5* | irix6* | nonstopux*)
5653
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5654
# PIC (with -KPIC) is the default.
5655
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5659
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5660
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5666
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5667
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5668
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5671
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5672
# All Alpha code is PIC.
5673
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5678
osf3* | osf4* | osf5*)
5679
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5680
# All OSF/1 code is PIC.
5681
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5685
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
5686
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
5690
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5691
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5692
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5696
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5697
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5698
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5701
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5702
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5703
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5704
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5708
if test -d /usr/nec ;then
5709
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5710
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5715
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5716
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5720
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5725
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
5728
# Check to make sure the PIC flag actually works.
5730
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
5731
AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5732
_LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
5733
[$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
5734
[case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
5736
*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5738
[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5739
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5742
# For platforms which do not support PIC, -DPIC is meaningless:
5744
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5747
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
5753
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
5754
# ------------------------------------
5755
# See if the linker supports building shared libraries.
5756
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
5757
[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5759
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5762
# If we're using GNU nm, then we don't want the "-C" option.
5763
# -C means demangle to AIX nm, but means don't demangle with GNU nm
5764
if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5765
_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'
5767
_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'
5771
_LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5774
_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'
5777
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5782
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
5783
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5784
_LT_AC_TAGVAR(archive_cmds, $1)=
5785
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5786
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
5787
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5788
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5789
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5790
_LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
5791
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5792
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5793
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5794
_LT_AC_TAGVAR(hardcode_direct, $1)=no
5795
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5796
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5797
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5798
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
5799
_LT_AC_TAGVAR(module_cmds, $1)=
5800
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
5801
_LT_AC_TAGVAR(always_export_symbols, $1)=no
5802
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5803
# include_expsyms should be a list of space-separated symbols to be *always*
5804
# included in the symbol list
5805
_LT_AC_TAGVAR(include_expsyms, $1)=
5806
# exclude_expsyms can be an extended regexp of symbols to exclude
5807
# it will be wrapped by ` (' and `)$', so one must not match beginning or
5808
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5809
# as well as any symbol that contains `d'.
5810
_LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
5811
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5812
# platforms (ab)use it in PIC code, but their linkers get confused if
5813
# the symbol is explicitly referenced. Since portable code cannot
5814
# rely on this symbol name, it's probably fine to never include it in
5815
# preloaded symbol tables.
5816
extract_expsyms_cmds=
5819
cygwin* | mingw* | pw32*)
5820
# FIXME: the MSVC++ port hasn't been tested in a loooong time
5821
# When not using gcc, we currently assume that we are using
5822
# Microsoft Visual C++.
5823
if test "$GCC" != yes; then
5832
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
5833
if test "$with_gnu_ld" = yes; then
5834
# If archive_cmds runs LD, not CC, wlarc should be empty
5837
# See if GNU ld supports shared libraries.
5839
aix3* | aix4* | aix5*)
5840
# On AIX/PPC, the GNU linker is very broken
5841
if test "$host_cpu" != ia64; then
5842
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5845
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
5846
*** to be unable to reliably create shared libraries on AIX.
5847
*** Therefore, libtool is disabling shared libraries support. If you
5848
*** really care for shared libraries, you may want to modify your PATH
5849
*** so that a non-GNU linker is found, and then restart.
5856
_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)'
5857
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5858
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5860
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5861
# that the semantics of dynamic libraries on AmigaOS, at least up
5862
# to version 4, is to share data among multiple programs linked
5863
# with the same dynamic library. Since this doesn't match the
5864
# behavior of shared libraries on other platforms, we can't use
5866
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5870
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5871
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5872
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5873
# support --undefined. This deserves some investigation. FIXME
5874
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5876
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5880
cygwin* | mingw* | pw32*)
5881
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5882
# as there is no search path for DLLs.
5883
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5884
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5885
_LT_AC_TAGVAR(always_export_symbols, $1)=no
5886
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5887
_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'
5889
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
5890
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
5891
# If the export-symbols file already is a .def file (1st line
5892
# is EXPORTS), use it as is; otherwise, prepend...
5893
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5894
cp $export_symbols $output_objdir/$soname.def;
5896
echo EXPORTS > $output_objdir/$soname.def;
5897
cat $export_symbols >> $output_objdir/$soname.def;
5899
$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
5906
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5907
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5910
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5911
_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'
5916
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
5917
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5920
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5921
*** create shared libraries on Solaris systems. Therefore, libtool
5922
*** is disabling shared libraries support. We urge you to upgrade GNU
5923
*** binutils to release 2.9.1 or newer. Another option is to modify
5924
*** your PATH or compiler configuration so that the native linker is
5925
*** used, and then restart.
5928
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5929
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5930
_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'
5932
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5937
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5939
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5940
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5944
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5945
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5946
_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'
5948
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5953
if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
5954
runpath_var=LD_RUN_PATH
5955
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5956
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5957
# ancient GNU ld didn't support --whole-archive et. al.
5958
if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
5959
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5961
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5965
# PORTME fill in a description of your system's linker (not GNU ld)
5968
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5969
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
5970
_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'
5971
# Note: this linker hardcodes the directories in LIBPATH if there
5972
# are no directories specified by -L.
5973
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5974
if test "$GCC" = yes && test -z "$link_static_flag"; then
5975
# Neither direct hardcoding nor static linking is supported with a
5977
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5982
if test "$host_cpu" = ia64; then
5983
# On IA64, the linker does run time linking by default, so we don't
5984
# have to do anything special.
5985
aix_use_runtimelinking=no
5986
exp_sym_flag='-Bexport'
5989
# If we're using GNU nm, then we don't want the "-C" option.
5990
# -C means demangle to AIX nm, but means don't demangle with GNU nm
5991
if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5992
_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'
5994
_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'
5996
aix_use_runtimelinking=no
5998
# Test if we are trying to use run time linking or normal
5999
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
6000
# need to do runtime linking.
6001
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
6002
for ld_flag in $LDFLAGS; do
6003
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6004
aix_use_runtimelinking=yes
6010
exp_sym_flag='-bexport'
6011
no_entry_flag='-bnoentry'
6014
# When large executables or shared objects are built, AIX ld can
6015
# have problems creating the table of contents. If linking a library
6016
# or program results in "error TOC overflow" add -mminimal-toc to
6017
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6018
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6020
_LT_AC_TAGVAR(archive_cmds, $1)=''
6021
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6022
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6023
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6025
if test "$GCC" = yes; then
6026
case $host_os in aix4.[012]|aix4.[012].*)
6027
# We only want to do this on AIX 4.2 and lower, the check
6028
# below for broken collect2 doesn't work under 4.3+
6029
collect2name=`${CC} -print-prog-name=collect2`
6030
if test -f "$collect2name" && \
6031
strings "$collect2name" | grep resolve_lib_name >/dev/null
6033
# We have reworked collect2
6034
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6036
# We have old collect2
6037
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6038
# It fails to find uninstalled libraries when the uninstalled
6039
# path is not listed in the libpath. Setting hardcode_minus_L
6040
# to unsupported forces relinking
6041
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6042
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6043
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6046
shared_flag='-shared'
6049
if test "$host_cpu" = ia64; then
6050
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6051
# chokes on -Wl,-G. The following line is correct:
6054
if test "$aix_use_runtimelinking" = yes; then
6055
shared_flag='${wl}-G'
6057
shared_flag='${wl}-bM:SRE'
6062
# It seems that -bexpall does not export symbols beginning with
6063
# underscore (_), so it is better to generate a list of symbols to export.
6064
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
6065
if test "$aix_use_runtimelinking" = yes; then
6066
# Warning - without using the other runtime loading flags (-brtl),
6067
# -berok will link without error, but may produce a broken library.
6068
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
6069
# Determine the default libpath from the value encoded in an empty executable.
6070
_LT_AC_SYS_LIBPATH_AIX
6071
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6072
_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"
6074
if test "$host_cpu" = ia64; then
6075
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6076
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6077
_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"
6079
# Determine the default libpath from the value encoded in an empty executable.
6080
_LT_AC_SYS_LIBPATH_AIX
6081
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6082
# Warning - without using the other run time loading flags,
6083
# -berok will link without error, but may produce a broken library.
6084
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6085
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6086
# -bexpall does not export symbols beginning with underscore (_)
6087
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
6088
# Exported symbols can be pulled into shared objects from archives
6089
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
6090
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6091
# This is similar to how AIX traditionally builds it's shared libraries.
6092
_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'
6098
_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)'
6099
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6100
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6101
# see comment about different semantics on the GNU ld section
6102
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6106
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6109
cygwin* | mingw* | pw32*)
6110
# When not using gcc, we currently assume that we are using
6111
# Microsoft Visual C++.
6112
# hardcode_libdir_flag_spec is actually meaningless, as there is
6113
# no search path for DLLs.
6114
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6115
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6116
# Tell ltmain to make .lib files, not .a files.
6118
# Tell ltmain to make .dll files, not .so files.
6120
# FIXME: Setting linknames here is a bad hack.
6121
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
6122
# The linker will automatically build a .lib file if we build a DLL.
6123
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
6124
# FIXME: Should let the user specify the lib program.
6125
_LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
6126
fix_srcfile_path='`cygpath -w "$srcfile"`'
6127
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6130
darwin* | rhapsody*)
6131
if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then
6132
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6134
rhapsody* | darwin1.[[012]])
6135
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
6138
test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
6141
# FIXME: Relying on posixy $() will cause problems for
6142
# cross-compilation, but unfortunately the echo tests do not
6143
# yet detect zsh echo's removal of \ escapes. Also zsh mangles
6144
# `"' quotes if we put them in here... so don't!
6145
lt_int_apple_cc_single_mod=no
6146
output_verbose_link_cmd='echo'
6147
if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
6148
lt_int_apple_cc_single_mod=yes
6150
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
6151
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
6153
_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'
6155
_LT_AC_TAGVAR(module_cmds, $1)='$CC -bundle ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags'
6156
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
6157
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
6158
_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}'
6160
_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}'
6162
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6163
_LT_AC_TAGVAR(hardcode_direct, $1)=no
6164
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
6165
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6166
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
6167
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6172
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6173
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6174
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6178
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6181
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6182
# support. Future versions do this automatically, but an explicit c++rt0.o
6183
# does not break anything, and helps significantly (at the cost of a little
6186
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6187
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6188
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6189
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6192
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
6194
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6195
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6196
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6197
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6200
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6202
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6203
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6204
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6205
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6209
if test "$GCC" = yes; then
6210
_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'
6212
_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'
6214
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6215
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6216
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6218
# hardcode_minus_L: Not really in the search PATH,
6219
# but as the default location of the library.
6220
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6221
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6225
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6228
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6231
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6237
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
6240
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6244
if test "$with_gnu_ld" = no; then
6247
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6248
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6249
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6250
_LT_AC_TAGVAR(hardcode_direct, $1)=no
6251
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6254
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6255
_LT_AC_TAGVAR(hardcode_direct, $1)=no
6256
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6258
# hardcode_minus_L: Not really in the search PATH,
6259
# but as the default location of the library.
6260
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6263
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6264
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6265
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6266
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6268
# hardcode_minus_L: Not really in the search PATH,
6269
# but as the default location of the library.
6270
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6276
irix5* | irix6* | nonstopux*)
6277
if test "$GCC" = yes; then
6278
_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'
6280
_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'
6281
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6283
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6284
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6285
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6289
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6290
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
6292
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
6294
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6295
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6296
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6300
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6301
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6302
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6303
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6304
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6308
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6309
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6310
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6311
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6312
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6313
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6316
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6317
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6318
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6321
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6322
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6329
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6330
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6331
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6332
_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'
6333
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6337
if test "$GCC" = yes; then
6338
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6339
_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'
6341
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6342
_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'
6344
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6345
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6348
osf4* | osf5*) # as osf3* with the addition of -msym flag
6349
if test "$GCC" = yes; then
6350
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6351
_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'
6352
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6354
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6355
_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'
6356
_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~
6357
$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'
6359
# Both c and cxx compiler support -rpath directly
6360
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6362
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6366
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6367
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6368
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6369
runpath_var=LD_RUN_PATH
6370
hardcode_runpath_var=yes
6374
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6375
if test "$GCC" = yes; then
6376
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6377
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6378
$CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
6380
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6381
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6382
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6384
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6385
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6387
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6388
*) # Supported since Solaris 2.6 (maybe 2.5.1?)
6389
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
6391
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6395
if test "x$host_vendor" = xsequent; then
6396
# Use $CC to link under sequent, because it throws in some extra .o
6397
# files that make .init and .fini sections work.
6398
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6400
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6402
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6403
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6404
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6405
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6409
case $host_vendor in
6411
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6412
_LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6415
## LD is ld it makes a PLAMLIB
6416
## CC just makes a GrossModule.
6417
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6418
_LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6419
_LT_AC_TAGVAR(hardcode_direct, $1)=no
6422
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6423
_LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6426
runpath_var='LD_RUN_PATH'
6427
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6431
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6432
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6433
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6437
if test -d /usr/nec; then
6438
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6439
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6440
runpath_var=LD_RUN_PATH
6441
hardcode_runpath_var=yes
6442
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
6447
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6448
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6449
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6450
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6451
hardcode_runpath_var=yes
6452
runpath_var=LD_RUN_PATH
6455
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
6456
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
6457
if test "$GCC" = yes; then
6458
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6460
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6462
runpath_var='LD_RUN_PATH'
6463
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6467
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6468
# $CC -shared without GNU ld will not create a library from C++
6469
# object files and a static libstdc++, better avoid it by now
6470
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6471
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6472
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6473
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6474
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6475
runpath_var='LD_RUN_PATH'
6479
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6480
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6481
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6485
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6490
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6491
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6493
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6494
if test "$GCC" = yes; then
6495
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6499
# Do we need to explicitly link libc?
6501
case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
6503
# Assume -lc should be added
6504
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6506
if test "$enable_shared" = yes && test "$GCC" = yes; then
6507
case $_LT_AC_TAGVAR(archive_cmds, $1) in
6509
# FIXME: we may have to deal with multi-command sequences.
6512
# Test whether the compiler implicitly links with -lc since on some
6513
# systems, -lgcc has to come before -lc. If gcc already passes -lc
6514
# to ld, don't add -lc before -lgcc.
6515
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6517
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6519
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6522
libobjs=conftest.$ac_objext
6524
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6530
lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
6531
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
6532
if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
6534
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6536
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6538
_LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6540
cat conftest.err 1>&5
6543
AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
6549
])# AC_LIBTOOL_PROG_LD_SHLIBS
6552
# _LT_AC_FILE_LTDLL_C
6553
# -------------------
6554
# Be careful that the start marker always follows a newline.
6555
AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
6556
# /* ltdll.c starts here */
6557
# #define WIN32_LEAN_AND_MEAN
6558
# #include <windows.h>
6559
# #undef WIN32_LEAN_AND_MEAN
6560
# #include <stdio.h>
6562
# #ifndef __CYGWIN__
6563
# # ifdef __CYGWIN32__
6564
# # define __CYGWIN__ __CYGWIN32__
6568
# #ifdef __cplusplus
6571
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
6572
# #ifdef __cplusplus
6577
# #include <cygwin/cygwin_dll.h>
6578
# DECLARE_CYGWIN_DLL( DllMain );
6580
# HINSTANCE __hDllInstance_base;
6583
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
6585
# __hDllInstance_base = hInst;
6588
# /* ltdll.c ends here */
6589
])# _LT_AC_FILE_LTDLL_C
6592
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
6593
# ---------------------------------
6594
AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
6598
AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
6599
AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
6600
AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
6601
AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
6602
AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
6603
AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
6604
AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
6606
# This is just to silence aclocal about the macro not being used
6607
ifelse([AC_DISABLE_FAST_INSTALL])
6609
AC_DEFUN([LT_AC_PROG_GCJ],
6610
[AC_CHECK_TOOL(GCJ, gcj, no)
6611
test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6615
AC_DEFUN([LT_AC_PROG_RC],
6616
[AC_CHECK_TOOL(RC, windres, no)
6619
# NOTE: This macro has been submitted for inclusion into #
6620
# GNU Autoconf as AC_PROG_SED. When it is available in #
6621
# a released version of Autoconf we should remove this #
6622
# macro and use it instead. #
6625
# Check for a fully-functional sed program, that truncates
6626
# as few characters as possible. Prefer GNU sed if found.
6627
AC_DEFUN([LT_AC_PROG_SED],
6628
[AC_MSG_CHECKING([for a sed that does not truncate output])
6629
AC_CACHE_VAL(lt_cv_path_SED,
6630
[# Loop through the user's path and test for sed and gsed.
6631
# Then use that list of sed's as ones to test for truncation.
6632
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6636
test -z "$as_dir" && as_dir=.
6637
for lt_ac_prog in sed gsed; do
6638
for ac_exec_ext in '' $ac_executable_extensions; do
6639
if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6640
lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6647
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
6648
# along with /bin/sed that truncates output.
6649
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6650
test ! -f $lt_ac_sed && break
6651
cat /dev/null > conftest.in
6653
echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6654
# Check for GNU sed and select it if it is found.
6655
if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6656
lt_cv_path_SED=$lt_ac_sed
6660
cat conftest.in conftest.in >conftest.tmp
6661
mv conftest.tmp conftest.in
6662
cp conftest.in conftest.nl
6664
$lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6665
cmp -s conftest.out conftest.nl || break
6666
# 10000 chars as input seems more than enough
6667
test $lt_ac_count -gt 10 && break
6668
lt_ac_count=`expr $lt_ac_count + 1`
6669
if test $lt_ac_count -gt $lt_ac_max; then
6670
lt_ac_max=$lt_ac_count
6671
lt_cv_path_SED=$lt_ac_sed
6677
AC_MSG_RESULT([$SED])
6680
# lib-link.m4 serial 4 (gettext-0.12)
6681
dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
6682
dnl This file is free software, distributed under the terms of the GNU
6683
dnl General Public License. As a special exception to the GNU General
6684
dnl Public License, this file may be distributed as part of a program
6685
dnl that contains a configuration script generated by Autoconf, under
6686
dnl the same distribution terms as the rest of that program.
6688
dnl From Bruno Haible.
6690
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
6691
dnl the libraries corresponding to explicit and implicit dependencies.
6692
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
6693
dnl augments the CPPFLAGS variable.
6694
AC_DEFUN([AC_LIB_LINKFLAGS],
6696
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
6697
AC_REQUIRE([AC_LIB_RPATH])
6698
define([Name],[translit([$1],[./-], [___])])
6699
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
6700
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
6701
AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
6702
AC_LIB_LINKFLAGS_BODY([$1], [$2])
6703
ac_cv_lib[]Name[]_libs="$LIB[]NAME"
6704
ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
6705
ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
6707
LIB[]NAME="$ac_cv_lib[]Name[]_libs"
6708
LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
6709
INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
6710
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
6712
AC_SUBST([LTLIB]NAME)
6713
dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
6714
dnl results of this search when this library appears as a dependency.
6720
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
6721
dnl searches for libname and the libraries corresponding to explicit and
6722
dnl implicit dependencies, together with the specified include files and
6723
dnl the ability to compile and link the specified testcode. If found, it
6724
dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
6725
dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
6726
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
6727
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
6728
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
6730
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
6731
AC_REQUIRE([AC_LIB_RPATH])
6732
define([Name],[translit([$1],[./-], [___])])
6733
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
6734
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
6736
dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
6738
AC_LIB_LINKFLAGS_BODY([$1], [$2])
6740
dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
6741
dnl because if the user has installed lib[]Name and not disabled its use
6742
dnl via --without-lib[]Name-prefix, he wants to use it.
6743
ac_save_CPPFLAGS="$CPPFLAGS"
6744
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
6746
AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
6747
ac_save_LIBS="$LIBS"
6748
LIBS="$LIBS $LIB[]NAME"
6749
AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
6750
LIBS="$ac_save_LIBS"
6752
if test "$ac_cv_lib[]Name" = yes; then
6754
AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
6755
AC_MSG_CHECKING([how to link with lib[]$1])
6756
AC_MSG_RESULT([$LIB[]NAME])
6759
dnl If $LIB[]NAME didn't lead to a usable library, we don't need
6760
dnl $INC[]NAME either.
6761
CPPFLAGS="$ac_save_CPPFLAGS"
6765
AC_SUBST([HAVE_LIB]NAME)
6767
AC_SUBST([LTLIB]NAME)
6772
dnl Determine the platform dependent parameters needed to use rpath:
6773
dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
6774
dnl hardcode_direct, hardcode_minus_L.
6775
AC_DEFUN([AC_LIB_RPATH],
6777
AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
6778
AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
6779
AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
6780
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
6781
AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
6782
CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
6783
${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
6789
libext="$acl_cv_libext"
6790
shlibext="$acl_cv_shlibext"
6791
hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
6792
hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
6793
hardcode_direct="$acl_cv_hardcode_direct"
6794
hardcode_minus_L="$acl_cv_hardcode_minus_L"
6795
dnl Determine whether the user wants rpath handling at all.
6796
AC_ARG_ENABLE(rpath,
6797
[ --disable-rpath do not hardcode runtime library paths],
6798
:, enable_rpath=yes)
6801
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
6802
dnl the libraries corresponding to explicit and implicit dependencies.
6803
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
6804
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
6806
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
6807
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
6808
dnl By default, look in $includedir and $libdir.
6810
AC_LIB_WITH_FINAL_PREFIX([
6811
eval additional_includedir=\"$includedir\"
6812
eval additional_libdir=\"$libdir\"
6814
AC_LIB_ARG_WITH([lib$1-prefix],
6815
[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
6816
--without-lib$1-prefix don't search for lib$1 in includedir and libdir],
6818
if test "X$withval" = "Xno"; then
6821
if test "X$withval" = "X"; then
6822
AC_LIB_WITH_FINAL_PREFIX([
6823
eval additional_includedir=\"$includedir\"
6824
eval additional_libdir=\"$libdir\"
6827
additional_includedir="$withval/include"
6828
additional_libdir="$withval/lib"
6832
dnl Search the library and its dependencies in $additional_libdir and
6833
dnl $LDFLAGS. Using breadth-first-seach.
6839
names_already_handled=
6840
names_next_round='$1 $2'
6841
while test -n "$names_next_round"; do
6842
names_this_round="$names_next_round"
6844
for name in $names_this_round; do
6846
for n in $names_already_handled; do
6847
if test "$n" = "$name"; then
6852
if test -z "$already_handled"; then
6853
names_already_handled="$names_already_handled $name"
6854
dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
6855
dnl or AC_LIB_HAVE_LINKFLAGS call.
6856
uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
6857
eval value=\"\$HAVE_LIB$uppername\"
6858
if test -n "$value"; then
6859
if test "$value" = yes; then
6860
eval value=\"\$LIB$uppername\"
6861
test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
6862
eval value=\"\$LTLIB$uppername\"
6863
test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
6865
dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
6866
dnl that this library doesn't exist. So just drop it.
6870
dnl Search the library lib$name in $additional_libdir and $LDFLAGS
6871
dnl and the already constructed $LIBNAME/$LTLIBNAME.
6876
if test $use_additional = yes; then
6877
if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
6878
found_dir="$additional_libdir"
6879
found_so="$additional_libdir/lib$name.$shlibext"
6880
if test -f "$additional_libdir/lib$name.la"; then
6881
found_la="$additional_libdir/lib$name.la"
6884
if test -f "$additional_libdir/lib$name.$libext"; then
6885
found_dir="$additional_libdir"
6886
found_a="$additional_libdir/lib$name.$libext"
6887
if test -f "$additional_libdir/lib$name.la"; then
6888
found_la="$additional_libdir/lib$name.la"
6893
if test "X$found_dir" = "X"; then
6894
for x in $LDFLAGS $LTLIB[]NAME; do
6895
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
6898
dir=`echo "X$x" | sed -e 's/^X-L//'`
6899
if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
6901
found_so="$dir/lib$name.$shlibext"
6902
if test -f "$dir/lib$name.la"; then
6903
found_la="$dir/lib$name.la"
6906
if test -f "$dir/lib$name.$libext"; then
6908
found_a="$dir/lib$name.$libext"
6909
if test -f "$dir/lib$name.la"; then
6910
found_la="$dir/lib$name.la"
6916
if test "X$found_dir" != "X"; then
6921
if test "X$found_dir" != "X"; then
6922
dnl Found the library.
6923
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
6924
if test "X$found_so" != "X"; then
6925
dnl Linking with a shared library. We attempt to hardcode its
6926
dnl directory into the executable's runpath, unless it's the
6927
dnl standard /usr/lib.
6928
if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
6929
dnl No hardcoding is needed.
6930
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
6932
dnl Use an explicit option to hardcode DIR into the resulting
6934
dnl Potentially add DIR to ltrpathdirs.
6935
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
6937
for x in $ltrpathdirs; do
6938
if test "X$x" = "X$found_dir"; then
6943
if test -z "$haveit"; then
6944
ltrpathdirs="$ltrpathdirs $found_dir"
6946
dnl The hardcoding into $LIBNAME is system dependent.
6947
if test "$hardcode_direct" = yes; then
6948
dnl Using DIR/libNAME.so during linking hardcodes DIR into the
6949
dnl resulting binary.
6950
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
6952
if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
6953
dnl Use an explicit option to hardcode DIR into the resulting
6955
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
6956
dnl Potentially add DIR to rpathdirs.
6957
dnl The rpathdirs will be appended to $LIBNAME at the end.
6959
for x in $rpathdirs; do
6960
if test "X$x" = "X$found_dir"; then
6965
if test -z "$haveit"; then
6966
rpathdirs="$rpathdirs $found_dir"
6969
dnl Rely on "-L$found_dir".
6970
dnl But don't add it if it's already contained in the LDFLAGS
6971
dnl or the already constructed $LIBNAME
6973
for x in $LDFLAGS $LIB[]NAME; do
6974
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
6975
if test "X$x" = "X-L$found_dir"; then
6980
if test -z "$haveit"; then
6981
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
6983
if test "$hardcode_minus_L" != no; then
6984
dnl FIXME: Not sure whether we should use
6985
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
6987
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
6989
dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
6990
dnl here, because this doesn't fit in flags passed to the
6991
dnl compiler. So give up. No hardcoding. This affects only
6992
dnl very old systems.
6993
dnl FIXME: Not sure whether we should use
6994
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
6996
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
7002
if test "X$found_a" != "X"; then
7003
dnl Linking with a static library.
7004
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
7006
dnl We shouldn't come here, but anyway it's good to have a
7008
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
7011
dnl Assume the include files are nearby.
7012
additional_includedir=
7013
case "$found_dir" in
7015
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
7016
additional_includedir="$basedir/include"
7019
if test "X$additional_includedir" != "X"; then
7020
dnl Potentially add $additional_includedir to $INCNAME.
7021
dnl But don't add it
7022
dnl 1. if it's the standard /usr/include,
7023
dnl 2. if it's /usr/local/include and we are using GCC on Linux,
7024
dnl 3. if it's already present in $CPPFLAGS or the already
7025
dnl constructed $INCNAME,
7026
dnl 4. if it doesn't exist as a directory.
7027
if test "X$additional_includedir" != "X/usr/include"; then
7029
if test "X$additional_includedir" = "X/usr/local/include"; then
7030
if test -n "$GCC"; then
7032
linux*) haveit=yes;;
7036
if test -z "$haveit"; then
7037
for x in $CPPFLAGS $INC[]NAME; do
7038
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
7039
if test "X$x" = "X-I$additional_includedir"; then
7044
if test -z "$haveit"; then
7045
if test -d "$additional_includedir"; then
7046
dnl Really add $additional_includedir to $INCNAME.
7047
INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
7053
dnl Look for dependencies.
7054
if test -n "$found_la"; then
7055
dnl Read the .la file. It defines the variables
7056
dnl dlname, library_names, old_library, dependency_libs, current,
7057
dnl age, revision, installed, dlopen, dlpreopen, libdir.
7058
save_libdir="$libdir"
7060
*/* | *\\*) . "$found_la" ;;
7061
*) . "./$found_la" ;;
7063
libdir="$save_libdir"
7064
dnl We use only dependency_libs.
7065
for dep in $dependency_libs; do
7068
additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
7069
dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
7070
dnl But don't add it
7071
dnl 1. if it's the standard /usr/lib,
7072
dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
7073
dnl 3. if it's already present in $LDFLAGS or the already
7074
dnl constructed $LIBNAME,
7075
dnl 4. if it doesn't exist as a directory.
7076
if test "X$additional_libdir" != "X/usr/lib"; then
7078
if test "X$additional_libdir" = "X/usr/local/lib"; then
7079
if test -n "$GCC"; then
7081
linux*) haveit=yes;;
7085
if test -z "$haveit"; then
7087
for x in $LDFLAGS $LIB[]NAME; do
7088
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
7089
if test "X$x" = "X-L$additional_libdir"; then
7094
if test -z "$haveit"; then
7095
if test -d "$additional_libdir"; then
7096
dnl Really add $additional_libdir to $LIBNAME.
7097
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
7101
for x in $LDFLAGS $LTLIB[]NAME; do
7102
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
7103
if test "X$x" = "X-L$additional_libdir"; then
7108
if test -z "$haveit"; then
7109
if test -d "$additional_libdir"; then
7110
dnl Really add $additional_libdir to $LTLIBNAME.
7111
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
7118
dir=`echo "X$dep" | sed -e 's/^X-R//'`
7119
if test "$enable_rpath" != no; then
7120
dnl Potentially add DIR to rpathdirs.
7121
dnl The rpathdirs will be appended to $LIBNAME at the end.
7123
for x in $rpathdirs; do
7124
if test "X$x" = "X$dir"; then
7129
if test -z "$haveit"; then
7130
rpathdirs="$rpathdirs $dir"
7132
dnl Potentially add DIR to ltrpathdirs.
7133
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
7135
for x in $ltrpathdirs; do
7136
if test "X$x" = "X$dir"; then
7141
if test -z "$haveit"; then
7142
ltrpathdirs="$ltrpathdirs $dir"
7147
dnl Handle this in the next round.
7148
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
7151
dnl Handle this in the next round. Throw away the .la's
7152
dnl directory; it is already contained in a preceding -L
7154
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
7157
dnl Most likely an immediate library name.
7158
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
7159
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
7165
dnl Didn't find the library; assume it is in the system directories
7166
dnl known to the linker and runtime loader. (All the system
7167
dnl directories known to the linker should also be known to the
7168
dnl runtime loader, otherwise the system is severely misconfigured.)
7169
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
7170
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
7176
if test "X$rpathdirs" != "X"; then
7177
if test -n "$hardcode_libdir_separator"; then
7178
dnl Weird platform: only the last -rpath option counts, the user must
7179
dnl pass all path elements in one option. We can arrange that for a
7180
dnl single library, but not when more than one $LIBNAMEs are used.
7182
for found_dir in $rpathdirs; do
7183
alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
7185
dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
7186
acl_save_libdir="$libdir"
7188
eval flag=\"$hardcode_libdir_flag_spec\"
7189
libdir="$acl_save_libdir"
7190
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
7192
dnl The -rpath options are cumulative.
7193
for found_dir in $rpathdirs; do
7194
acl_save_libdir="$libdir"
7196
eval flag=\"$hardcode_libdir_flag_spec\"
7197
libdir="$acl_save_libdir"
7198
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
7202
if test "X$ltrpathdirs" != "X"; then
7203
dnl When using libtool, the option that works for both libraries and
7204
dnl executables is -R. The -R options are cumulative.
7205
for found_dir in $ltrpathdirs; do
7206
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
7211
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
7212
dnl unless already present in VAR.
7213
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
7214
dnl contains two or three consecutive elements that belong together.
7215
AC_DEFUN([AC_LIB_APPENDTOVAR],
7217
for element in [$2]; do
7220
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
7221
if test "X$x" = "X$element"; then
7226
if test -z "$haveit"; then
7227
[$1]="${[$1]}${[$1]:+ }$element"
7232
# lib-prefix.m4 serial 3 (gettext-0.13)
7233
dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
7234
dnl This file is free software, distributed under the terms of the GNU
7235
dnl General Public License. As a special exception to the GNU General
7236
dnl Public License, this file may be distributed as part of a program
7237
dnl that contains a configuration script generated by Autoconf, under
7238
dnl the same distribution terms as the rest of that program.
7240
dnl From Bruno Haible.
7242
dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
7243
dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
7244
dnl require excessive bracketing.
7245
ifdef([AC_HELP_STRING],
7246
[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
7247
[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
7249
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
7250
dnl to access previously installed libraries. The basic assumption is that
7251
dnl a user will want packages to use other packages he previously installed
7252
dnl with the same --prefix option.
7253
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
7254
dnl libraries, but is otherwise very convenient.
7255
AC_DEFUN([AC_LIB_PREFIX],
7257
AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
7258
AC_REQUIRE([AC_PROG_CC])
7259
AC_REQUIRE([AC_CANONICAL_HOST])
7260
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
7261
dnl By default, look in $includedir and $libdir.
7263
AC_LIB_WITH_FINAL_PREFIX([
7264
eval additional_includedir=\"$includedir\"
7265
eval additional_libdir=\"$libdir\"
7267
AC_LIB_ARG_WITH([lib-prefix],
7268
[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
7269
--without-lib-prefix don't search for libraries in includedir and libdir],
7271
if test "X$withval" = "Xno"; then
7274
if test "X$withval" = "X"; then
7275
AC_LIB_WITH_FINAL_PREFIX([
7276
eval additional_includedir=\"$includedir\"
7277
eval additional_libdir=\"$libdir\"
7280
additional_includedir="$withval/include"
7281
additional_libdir="$withval/lib"
7285
if test $use_additional = yes; then
7286
dnl Potentially add $additional_includedir to $CPPFLAGS.
7287
dnl But don't add it
7288
dnl 1. if it's the standard /usr/include,
7289
dnl 2. if it's already present in $CPPFLAGS,
7290
dnl 3. if it's /usr/local/include and we are using GCC on Linux,
7291
dnl 4. if it doesn't exist as a directory.
7292
if test "X$additional_includedir" != "X/usr/include"; then
7294
for x in $CPPFLAGS; do
7295
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
7296
if test "X$x" = "X-I$additional_includedir"; then
7301
if test -z "$haveit"; then
7302
if test "X$additional_includedir" = "X/usr/local/include"; then
7303
if test -n "$GCC"; then
7305
linux*) haveit=yes;;
7309
if test -z "$haveit"; then
7310
if test -d "$additional_includedir"; then
7311
dnl Really add $additional_includedir to $CPPFLAGS.
7312
CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
7317
dnl Potentially add $additional_libdir to $LDFLAGS.
7318
dnl But don't add it
7319
dnl 1. if it's the standard /usr/lib,
7320
dnl 2. if it's already present in $LDFLAGS,
7321
dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
7322
dnl 4. if it doesn't exist as a directory.
7323
if test "X$additional_libdir" != "X/usr/lib"; then
7325
for x in $LDFLAGS; do
7326
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
7327
if test "X$x" = "X-L$additional_libdir"; then
7332
if test -z "$haveit"; then
7333
if test "X$additional_libdir" = "X/usr/local/lib"; then
7334
if test -n "$GCC"; then
7336
linux*) haveit=yes;;
7340
if test -z "$haveit"; then
7341
if test -d "$additional_libdir"; then
7342
dnl Really add $additional_libdir to $LDFLAGS.
7343
LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
7351
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
7352
dnl acl_final_exec_prefix, containing the values to which $prefix and
7353
dnl $exec_prefix will expand at the end of the configure script.
7354
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
7356
dnl Unfortunately, prefix and exec_prefix get only finally determined
7357
dnl at the end of configure.
7358
if test "X$prefix" = "XNONE"; then
7359
acl_final_prefix="$ac_default_prefix"
7361
acl_final_prefix="$prefix"
7363
if test "X$exec_prefix" = "XNONE"; then
7364
acl_final_exec_prefix='${prefix}'
7366
acl_final_exec_prefix="$exec_prefix"
7368
acl_save_prefix="$prefix"
7369
prefix="$acl_final_prefix"
7370
eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7371
prefix="$acl_save_prefix"
7374
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
7375
dnl variables prefix and exec_prefix bound to the values they will have
7376
dnl at the end of the configure script.
7377
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
7379
acl_save_prefix="$prefix"
7380
prefix="$acl_final_prefix"
7381
acl_save_exec_prefix="$exec_prefix"
7382
exec_prefix="$acl_final_exec_prefix"
7384
exec_prefix="$acl_save_exec_prefix"
7385
prefix="$acl_save_prefix"
7388
# lib-ld.m4 serial 3 (gettext-0.13)
7389
dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
7390
dnl This file is free software, distributed under the terms of the GNU
7391
dnl General Public License. As a special exception to the GNU General
7392
dnl Public License, this file may be distributed as part of a program
7393
dnl that contains a configuration script generated by Autoconf, under
7394
dnl the same distribution terms as the rest of that program.
7396
dnl Subroutines of libtool.m4,
7397
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
7398
dnl with libtool.m4.
7400
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
7401
AC_DEFUN([AC_LIB_PROG_LD_GNU],
7402
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
7403
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
7404
case `$LD -v 2>&1 </dev/null` in
7405
*GNU* | *'with BFD'*)
7406
acl_cv_prog_gnu_ld=yes ;;
7408
acl_cv_prog_gnu_ld=no ;;
7410
with_gnu_ld=$acl_cv_prog_gnu_ld
7413
dnl From libtool-1.4. Sets the variable LD.
7414
AC_DEFUN([AC_LIB_PROG_LD],
7415
[AC_ARG_WITH(gnu-ld,
7416
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
7417
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
7418
AC_REQUIRE([AC_PROG_CC])dnl
7419
AC_REQUIRE([AC_CANONICAL_HOST])dnl
7420
# Prepare PATH_SEPARATOR.
7421
# The user is always right.
7422
if test "${PATH_SEPARATOR+set}" != set; then
7423
echo "#! /bin/sh" >conf$$.sh
7424
echo "exit 0" >>conf$$.sh
7426
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7434
if test "$GCC" = yes; then
7435
# Check if gcc -print-prog-name=ld gives a path.
7436
AC_MSG_CHECKING([for ld used by GCC])
7439
# gcc leaves a trailing carriage return which upsets mingw
7440
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7442
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7445
# Accept absolute paths.
7446
[[\\/]* | [A-Za-z]:[\\/]*)]
7447
[re_direlt='/[^/][^/]*/\.\./']
7448
# Canonicalize the path of ld
7449
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7450
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7451
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7453
test -z "$LD" && LD="$ac_prog"
7456
# If it fails, then pretend we aren't using GCC.
7460
# If it is relative, then search for the first ld in PATH.
7464
elif test "$with_gnu_ld" = yes; then
7465
AC_MSG_CHECKING([for GNU ld])
7467
AC_MSG_CHECKING([for non-GNU ld])
7469
AC_CACHE_VAL(acl_cv_path_LD,
7470
[if test -z "$LD"; then
7471
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
7472
for ac_dir in $PATH; do
7473
test -z "$ac_dir" && ac_dir=.
7474
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7475
acl_cv_path_LD="$ac_dir/$ac_prog"
7476
# Check to see if the program is GNU ld. I'd rather use --version,
7477
# but apparently some GNU ld's only accept -v.
7478
# Break only if it was the GNU/non-GNU ld that we prefer.
7479
case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
7480
*GNU* | *'with BFD'*)
7481
test "$with_gnu_ld" != no && break ;;
7483
test "$with_gnu_ld" != yes && break ;;
7489
acl_cv_path_LD="$LD" # Let the user override the test with a path.
7491
LD="$acl_cv_path_LD"
7492
if test -n "$LD"; then
7497
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])