1
# generated automatically by aclocal 1.7.6 -*- 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
15
dnl autostars m4 macro for versioning
16
dnl thomas@apestaart.org
18
dnl AS_VERSION(PACKAGE, PREFIX, MAJOR, MINOR, MICRO, NANO, ACTION_IF_NO_NANO, ACTION_IF_NANO)
20
dnl AS_VERSION(gstreamer, GST_VERSION, 0, 3, 2,)
21
dnl for a 0.3.2 release version
24
dnl - defines [$PREFIX]_MAJOR, MINOR and MICRO
25
dnl - if NANO is empty, then we're in release mode, else in cvs/dev mode
26
dnl - defines [$PREFIX], VERSION, and [$PREFIX]_RELEASE
27
dnl - executes the relevant action
28
dnl - AC_SUBST's PACKAGE, VERSION, [$PREFIX] and [$PREFIX]_RELEASE
29
dnl as well as the little ones
30
dnl - doesn't call AM_INIT_AUTOMAKE anymore because it prevents
31
dnl maintainer mode from running ok
33
dnl don't forget to put #undef [$2] and [$2]_RELEASE in acconfig.h
42
if test "x$NANO" = "x" || test "x$NANO" = "x0";
44
AC_MSG_NOTICE(configuring [$1] for release)
45
VERSION=[$3].[$4].[$5]
48
ifelse([$7], , :, [$7])
50
AC_MSG_NOTICE(configuring [$1] for development with nano $NANO)
51
VERSION=[$3].[$4].[$5].$NANO
52
[$2]_RELEASE=`date +%Y%m%d_%H%M%S`
54
ifelse([$8], , :, [$8])
58
AC_DEFINE_UNQUOTED([$2], "$[$2]", [Define the version])
60
AC_DEFINE_UNQUOTED([$2]_RELEASE, "$[$2]_RELEASE", [Define the release version])
61
AC_SUBST([$2]_RELEASE)
66
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Define the package name])
68
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Define the version])
72
# Do all the work for Automake. -*- Autoconf -*-
74
# This macro actually does too much some checks are only needed if
75
# your package does certain things. But this isn't really a big deal.
77
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
78
# Free Software Foundation, Inc.
80
# This program is free software; you can redistribute it and/or modify
81
# it under the terms of the GNU General Public License as published by
82
# the Free Software Foundation; either version 2, or (at your option)
85
# This program is distributed in the hope that it will be useful,
86
# but WITHOUT ANY WARRANTY; without even the implied warranty of
87
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
88
# GNU General Public License for more details.
90
# You should have received a copy of the GNU General Public License
91
# along with this program; if not, write to the Free Software
92
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
99
# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
100
# the ones we care about.
101
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
103
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
104
# AM_INIT_AUTOMAKE([OPTIONS])
105
# -----------------------------------------------
106
# The call with PACKAGE and VERSION arguments is the old style
107
# call (pre autoconf-2.50), which is being phased out. PACKAGE
108
# and VERSION should now be passed to AC_INIT and removed from
109
# the call to AM_INIT_AUTOMAKE.
110
# We support both call styles for the transition. After
111
# the next Automake release, Autoconf can make the AC_INIT
112
# arguments mandatory, and then we can depend on a new Autoconf
113
# release and drop the old call support.
114
AC_DEFUN([AM_INIT_AUTOMAKE],
115
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
116
AC_REQUIRE([AC_PROG_INSTALL])dnl
117
# test to see if srcdir already configured
118
if test "`cd $srcdir && pwd`" != "`pwd`" &&
119
test -f $srcdir/config.status; then
120
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
123
# test whether we have cygpath
124
if test -z "$CYGPATH_W"; then
125
if (cygpath --version) >/dev/null 2>/dev/null; then
126
CYGPATH_W='cygpath -w'
131
AC_SUBST([CYGPATH_W])
133
# Define the identity of the package.
134
dnl Distinguish between old-style and new-style calls.
136
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
137
AC_SUBST([PACKAGE], [$1])dnl
138
AC_SUBST([VERSION], [$2])],
139
[_AM_SET_OPTIONS([$1])dnl
140
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
141
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
143
_AM_IF_OPTION([no-define],,
144
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
145
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
147
# Some tools Automake needs.
148
AC_REQUIRE([AM_SANITY_CHECK])dnl
149
AC_REQUIRE([AC_ARG_PROGRAM])dnl
150
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
151
AM_MISSING_PROG(AUTOCONF, autoconf)
152
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
153
AM_MISSING_PROG(AUTOHEADER, autoheader)
154
AM_MISSING_PROG(MAKEINFO, makeinfo)
155
AM_MISSING_PROG(AMTAR, tar)
157
AM_PROG_INSTALL_STRIP
158
# We need awk for the "check" target. The system "awk" is bad on
160
AC_REQUIRE([AC_PROG_AWK])dnl
161
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
162
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
164
_AM_IF_OPTION([no-dependencies],,
165
[AC_PROVIDE_IFELSE([AC_PROG_CC],
166
[_AM_DEPENDENCIES(CC)],
167
[define([AC_PROG_CC],
168
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
169
AC_PROVIDE_IFELSE([AC_PROG_CXX],
170
[_AM_DEPENDENCIES(CXX)],
171
[define([AC_PROG_CXX],
172
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
177
# When config.status generates a header, we must update the stamp-h file.
178
# This file resides in the same directory as the config header
179
# that is generated. The stamp files are numbered to have different names.
181
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
182
# loop where config.status creates the headers, so we can generate
183
# our stamp files there.
184
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
185
[# Compute $1's index in $config_headers.
187
for _am_header in $config_headers :; do
192
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
195
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
197
# Copyright 2002 Free Software Foundation, Inc.
199
# This program is free software; you can redistribute it and/or modify
200
# it under the terms of the GNU General Public License as published by
201
# the Free Software Foundation; either version 2, or (at your option)
204
# This program is distributed in the hope that it will be useful,
205
# but WITHOUT ANY WARRANTY; without even the implied warranty of
206
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
207
# GNU General Public License for more details.
209
# You should have received a copy of the GNU General Public License
210
# along with this program; if not, write to the Free Software
211
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
213
# AM_AUTOMAKE_VERSION(VERSION)
214
# ----------------------------
215
# Automake X.Y traces this macro to ensure aclocal.m4 has been
216
# generated from the m4 files accompanying Automake X.Y.
217
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
219
# AM_SET_CURRENT_AUTOMAKE_VERSION
220
# -------------------------------
221
# Call AM_AUTOMAKE_VERSION so it can be traced.
222
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
223
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
224
[AM_AUTOMAKE_VERSION([1.7.6])])
226
# Helper functions for option handling. -*- Autoconf -*-
228
# Copyright 2001, 2002 Free Software Foundation, Inc.
230
# This program is free software; you can redistribute it and/or modify
231
# it under the terms of the GNU General Public License as published by
232
# the Free Software Foundation; either version 2, or (at your option)
235
# This program is distributed in the hope that it will be useful,
236
# but WITHOUT ANY WARRANTY; without even the implied warranty of
237
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
238
# GNU General Public License for more details.
240
# You should have received a copy of the GNU General Public License
241
# along with this program; if not, write to the Free Software
242
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
247
# _AM_MANGLE_OPTION(NAME)
248
# -----------------------
249
AC_DEFUN([_AM_MANGLE_OPTION],
250
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
252
# _AM_SET_OPTION(NAME)
253
# ------------------------------
254
# Set option NAME. Presently that only means defining a flag for this option.
255
AC_DEFUN([_AM_SET_OPTION],
256
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
258
# _AM_SET_OPTIONS(OPTIONS)
259
# ----------------------------------
260
# OPTIONS is a space-separated list of Automake options.
261
AC_DEFUN([_AM_SET_OPTIONS],
262
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
264
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
265
# -------------------------------------------
266
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
267
AC_DEFUN([_AM_IF_OPTION],
268
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
271
# Check to make sure that the build environment is sane.
274
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
276
# This program is free software; you can redistribute it and/or modify
277
# it under the terms of the GNU General Public License as published by
278
# the Free Software Foundation; either version 2, or (at your option)
281
# This program is distributed in the hope that it will be useful,
282
# but WITHOUT ANY WARRANTY; without even the implied warranty of
283
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
284
# GNU General Public License for more details.
286
# You should have received a copy of the GNU General Public License
287
# along with this program; if not, write to the Free Software
288
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
295
AC_DEFUN([AM_SANITY_CHECK],
296
[AC_MSG_CHECKING([whether build environment is sane])
299
echo timestamp > conftest.file
300
# Do `set' in a subshell so we don't clobber the current shell's
301
# arguments. Must try -L first in case configure is actually a
302
# symlink; some systems play weird games with the mod time of symlinks
303
# (eg FreeBSD returns the mod time of the symlink's containing
306
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
307
if test "$[*]" = "X"; then
309
set X `ls -t $srcdir/configure conftest.file`
312
if test "$[*]" != "X $srcdir/configure conftest.file" \
313
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
315
# If neither matched, then we have a broken ls. This can happen
316
# if, for instance, CONFIG_SHELL is bash and it inherits a
317
# broken ls alias from the environment. This has actually
318
# happened. Such a system could not be considered "sane".
319
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
320
alias in your environment])
323
test "$[2]" = conftest.file
329
AC_MSG_ERROR([newly created file is older than distributed files!
330
Check your system clock])
337
# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
339
# This program is free software; you can redistribute it and/or modify
340
# it under the terms of the GNU General Public License as published by
341
# the Free Software Foundation; either version 2, or (at your option)
344
# This program is distributed in the hope that it will be useful,
345
# but WITHOUT ANY WARRANTY; without even the implied warranty of
346
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
347
# GNU General Public License for more details.
349
# You should have received a copy of the GNU General Public License
350
# along with this program; if not, write to the Free Software
351
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
356
# AM_MISSING_PROG(NAME, PROGRAM)
357
# ------------------------------
358
AC_DEFUN([AM_MISSING_PROG],
359
[AC_REQUIRE([AM_MISSING_HAS_RUN])
360
$1=${$1-"${am_missing_run}$2"}
366
# Define MISSING if not defined so far and test if it supports --run.
367
# If it does, set am_missing_run to use it, otherwise, to nothing.
368
AC_DEFUN([AM_MISSING_HAS_RUN],
369
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
370
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
371
# Use eval to expand $SHELL
372
if eval "$MISSING --run true"; then
373
am_missing_run="$MISSING --run "
376
AC_MSG_WARN([`missing' script is too old or missing])
382
# Copyright 2001 Free Software Foundation, Inc.
384
# This program is free software; you can redistribute it and/or modify
385
# it under the terms of the GNU General Public License as published by
386
# the Free Software Foundation; either version 2, or (at your option)
389
# This program is distributed in the hope that it will be useful,
390
# but WITHOUT ANY WARRANTY; without even the implied warranty of
391
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
392
# GNU General Public License for more details.
394
# You should have received a copy of the GNU General Public License
395
# along with this program; if not, write to the Free Software
396
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
399
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
400
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
401
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
403
# Of course, Automake must honor this variable whenever it calls a
404
# tool from the auxiliary directory. The problem is that $srcdir (and
405
# therefore $ac_aux_dir as well) can be either absolute or relative,
406
# depending on how configure is run. This is pretty annoying, since
407
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
408
# source directory, any form will work fine, but in subdirectories a
409
# relative path needs to be adjusted first.
411
# $ac_aux_dir/missing
412
# fails when called from a subdirectory if $ac_aux_dir is relative
413
# $top_srcdir/$ac_aux_dir/missing
414
# fails if $ac_aux_dir is absolute,
415
# fails when called from a subdirectory in a VPATH build with
416
# a relative $ac_aux_dir
418
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
419
# are both prefixed by $srcdir. In an in-source build this is usually
420
# harmless because $srcdir is `.', but things will broke when you
421
# start a VPATH build or use an absolute $srcdir.
423
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
424
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
425
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
426
# and then we would define $MISSING as
427
# MISSING="\${SHELL} $am_aux_dir/missing"
428
# This will work as long as MISSING is not called from configure, because
429
# unfortunately $(top_srcdir) has no meaning in configure.
430
# However there are other variables, like CC, which are often used in
431
# configure, and could therefore not use this "fixed" $ac_aux_dir.
433
# Another solution, used here, is to always expand $ac_aux_dir to an
434
# absolute PATH. The drawback is that using absolute paths prevent a
435
# configured tree to be moved without reconfiguration.
437
# Rely on autoconf to set up CDPATH properly.
440
AC_DEFUN([AM_AUX_DIR_EXPAND], [
441
# expand $ac_aux_dir to an absolute path
442
am_aux_dir=`cd $ac_aux_dir && pwd`
447
# Define $install_sh.
449
# Copyright 2001 Free Software Foundation, Inc.
451
# This program is free software; you can redistribute it and/or modify
452
# it under the terms of the GNU General Public License as published by
453
# the Free Software Foundation; either version 2, or (at your option)
456
# This program is distributed in the hope that it will be useful,
457
# but WITHOUT ANY WARRANTY; without even the implied warranty of
458
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
459
# GNU General Public License for more details.
461
# You should have received a copy of the GNU General Public License
462
# along with this program; if not, write to the Free Software
463
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
466
AC_DEFUN([AM_PROG_INSTALL_SH],
467
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
468
install_sh=${install_sh-"$am_aux_dir/install-sh"}
469
AC_SUBST(install_sh)])
471
# AM_PROG_INSTALL_STRIP
473
# Copyright 2001 Free Software Foundation, Inc.
475
# This program is free software; you can redistribute it and/or modify
476
# it under the terms of the GNU General Public License as published by
477
# the Free Software Foundation; either version 2, or (at your option)
480
# This program is distributed in the hope that it will be useful,
481
# but WITHOUT ANY WARRANTY; without even the implied warranty of
482
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
483
# GNU General Public License for more details.
485
# You should have received a copy of the GNU General Public License
486
# along with this program; if not, write to the Free Software
487
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
490
# One issue with vendor `install' (even GNU) is that you can't
491
# specify the program used to strip binaries. This is especially
492
# annoying in cross-compiling environments, where the build's strip
493
# is unlikely to handle the host's binaries.
494
# Fortunately install-sh will honor a STRIPPROG variable, so we
495
# always use install-sh in `make install-strip', and initialize
496
# STRIPPROG with the value of the STRIP variable (set by the user).
497
AC_DEFUN([AM_PROG_INSTALL_STRIP],
498
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
499
# Installed binaries are usually stripped using `strip' when the user
500
# run `make install-strip'. However `strip' might not be the right
501
# tool to use in cross-compilation environments, therefore Automake
502
# will honor the `STRIP' environment variable to overrule this program.
503
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
504
if test "$cross_compiling" != no; then
505
AC_CHECK_TOOL([STRIP], [strip], :)
507
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
508
AC_SUBST([INSTALL_STRIP_PROGRAM])])
511
# Copyright (C) 2003 Free Software Foundation, Inc.
513
# This program is free software; you can redistribute it and/or modify
514
# it under the terms of the GNU General Public License as published by
515
# the Free Software Foundation; either version 2, or (at your option)
518
# This program is distributed in the hope that it will be useful,
519
# but WITHOUT ANY WARRANTY; without even the implied warranty of
520
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
521
# GNU General Public License for more details.
523
# You should have received a copy of the GNU General Public License
524
# along with this program; if not, write to the Free Software
525
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
530
# Check whether the underlying file-system supports filenames
531
# with a leading dot. For instance MS-DOS doesn't.
532
AC_DEFUN([AM_SET_LEADING_DOT],
533
[rm -rf .tst 2>/dev/null
534
mkdir .tst 2>/dev/null
535
if test -d .tst; then
540
rmdir .tst 2>/dev/null
541
AC_SUBST([am__leading_dot])])
543
# serial 5 -*- Autoconf -*-
545
# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
547
# This program is free software; you can redistribute it and/or modify
548
# it under the terms of the GNU General Public License as published by
549
# the Free Software Foundation; either version 2, or (at your option)
552
# This program is distributed in the hope that it will be useful,
553
# but WITHOUT ANY WARRANTY; without even the implied warranty of
554
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
555
# GNU General Public License for more details.
557
# You should have received a copy of the GNU General Public License
558
# along with this program; if not, write to the Free Software
559
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
563
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
564
# written in clear, in which case automake, when reading aclocal.m4,
565
# will think it sees a *use*, and therefore will trigger all it's
566
# C support machinery. Also note that it means that autoscan, seeing
567
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
571
# _AM_DEPENDENCIES(NAME)
572
# ----------------------
573
# See how the compiler implements dependency checking.
574
# NAME is "CC", "CXX", "GCJ", or "OBJC".
575
# We try a few techniques and use that to set a single cache variable.
577
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
578
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
579
# dependency, and given that the user is not expected to run this macro,
580
# just rely on AC_PROG_CC.
581
AC_DEFUN([_AM_DEPENDENCIES],
582
[AC_REQUIRE([AM_SET_DEPDIR])dnl
583
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
584
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
585
AC_REQUIRE([AM_DEP_TRACK])dnl
587
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
588
[$1], CXX, [depcc="$CXX" am_compiler_list=],
589
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
590
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
591
[depcc="$$1" am_compiler_list=])
593
AC_CACHE_CHECK([dependency style of $depcc],
594
[am_cv_$1_dependencies_compiler_type],
595
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
596
# We make a subdir and do the tests there. Otherwise we can end up
597
# making bogus files that we don't know about and never remove. For
598
# instance it was reported that on HP-UX the gcc test will end up
599
# making a dummy file named `D' -- because `-MD' means `put the output
602
# Copy depcomp to subdir because otherwise we won't find it if we're
603
# using a relative directory.
604
cp "$am_depcomp" conftest.dir
606
# We will build objects and dependencies in a subdirectory because
607
# it helps to detect inapplicable dependency modes. For instance
608
# both Tru64's cc and ICC support -MD to output dependencies as a
609
# side effect of compilation, but ICC will put the dependencies in
610
# the current directory while Tru64 will put them in the object
614
am_cv_$1_dependencies_compiler_type=none
615
if test "$am_compiler_list" = ""; then
616
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
618
for depmode in $am_compiler_list; do
619
# Setup a source with many dependencies, because some compilers
620
# like to wrap large dependency lists on column 80 (with \), and
621
# we should not choose a depcomp mode which is confused by this.
623
# We need to recreate these files for each test, as the compiler may
624
# overwrite some of them when testing with obscure command lines.
625
# This happens at least with the AIX C compiler.
627
for i in 1 2 3 4 5 6; do
628
echo '#include "conftst'$i'.h"' >> sub/conftest.c
631
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
635
# after this tag, mechanisms are not by side-effect, so they'll
636
# only be used when explicitly requested
637
if test "x$enable_dependency_tracking" = xyes; then
645
# We check with `-c' and `-o' for the sake of the "dashmstdout"
646
# mode. It turns out that the SunPro C++ compiler does not properly
647
# handle `-M -o', and we need to detect this.
648
if depmode=$depmode \
649
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
650
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
651
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
652
>/dev/null 2>conftest.err &&
653
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
654
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
655
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
656
# icc doesn't choke on unknown options, it will just issue warnings
657
# (even with -Werror). So we grep stderr for any message
658
# that says an option was ignored.
659
if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
660
am_cv_$1_dependencies_compiler_type=$depmode
669
am_cv_$1_dependencies_compiler_type=none
672
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
673
AM_CONDITIONAL([am__fastdep$1], [
674
test "x$enable_dependency_tracking" != xno \
675
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
681
# Choose a directory name for dependency files.
682
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
683
AC_DEFUN([AM_SET_DEPDIR],
684
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
685
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
691
AC_DEFUN([AM_DEP_TRACK],
692
[AC_ARG_ENABLE(dependency-tracking,
693
[ --disable-dependency-tracking Speeds up one-time builds
694
--enable-dependency-tracking Do not reject slow dependency extractors])
695
if test "x$enable_dependency_tracking" != xno; then
696
am_depcomp="$ac_aux_dir/depcomp"
699
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
700
AC_SUBST([AMDEPBACKSLASH])
703
# Generate code to set up dependency tracking. -*- Autoconf -*-
705
# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
707
# This program is free software; you can redistribute it and/or modify
708
# it under the terms of the GNU General Public License as published by
709
# the Free Software Foundation; either version 2, or (at your option)
712
# This program is distributed in the hope that it will be useful,
713
# but WITHOUT ANY WARRANTY; without even the implied warranty of
714
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
715
# GNU General Public License for more details.
717
# You should have received a copy of the GNU General Public License
718
# along with this program; if not, write to the Free Software
719
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
724
# _AM_OUTPUT_DEPENDENCY_COMMANDS
725
# ------------------------------
726
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
727
[for mf in $CONFIG_FILES; do
728
# Strip MF so we end up with the name of the file.
729
mf=`echo "$mf" | sed -e 's/:.*$//'`
730
# Check whether this is an Automake generated Makefile or not.
731
# We used to match only the files named `Makefile.in', but
732
# some people rename them; so instead we look at the file content.
733
# Grep'ing the first line is not enough: some people post-process
734
# each Makefile.in and add a new line on top of each file to say so.
735
# So let's grep whole file.
736
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
737
dirpart=`AS_DIRNAME("$mf")`
741
grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
742
# Extract the definition of DEP_FILES from the Makefile without
744
DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
745
test -z "$DEPDIR" && continue
746
# When using ansi2knr, U may be empty or an underscore; expand it
747
U=`sed -n -e '/^U = / s///p' < "$mf"`
748
test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
749
# We invoke sed twice because it is the simplest approach to
750
# changing $(DEPDIR) to its actual value in the expansion.
751
for file in `sed -n -e '
752
/^DEP_FILES = .*\\\\$/ {
761
/^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
762
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
763
# Make sure the directory exists.
764
test -f "$dirpart/$file" && continue
765
fdir=`AS_DIRNAME(["$file"])`
766
AS_MKDIR_P([$dirpart/$fdir])
767
# echo "creating $dirpart/$file"
768
echo '# dummy' > "$dirpart/$file"
771
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
774
# AM_OUTPUT_DEPENDENCY_COMMANDS
775
# -----------------------------
776
# This macro should only be invoked once -- use via AC_REQUIRE.
778
# This code is only required when automatic dependency tracking
779
# is enabled. FIXME. This creates each `.P' file that we will
780
# need in order to bootstrap the dependency handling code.
781
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
782
[AC_CONFIG_COMMANDS([depfiles],
783
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
784
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
787
# Check to see how 'make' treats includes. -*- Autoconf -*-
789
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
791
# This program is free software; you can redistribute it and/or modify
792
# it under the terms of the GNU General Public License as published by
793
# the Free Software Foundation; either version 2, or (at your option)
796
# This program is distributed in the hope that it will be useful,
797
# but WITHOUT ANY WARRANTY; without even the implied warranty of
798
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
799
# GNU General Public License for more details.
801
# You should have received a copy of the GNU General Public License
802
# along with this program; if not, write to the Free Software
803
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
810
# Check to see how make treats includes.
811
AC_DEFUN([AM_MAKE_INCLUDE],
812
[am_make=${MAKE-make}
813
cat > confinc << 'END'
818
# If we don't find an include directive, just comment out the code.
819
AC_MSG_CHECKING([for style of include used by $am_make])
823
# First try GNU make style include.
824
echo "include confinc" > confmf
825
# We grep out `Entering directory' and `Leaving directory'
826
# messages which can occur if `w' ends up in MAKEFLAGS.
827
# In particular we don't look at `^make:' because GNU make might
828
# be invoked under some other name (usually "gmake"), in which
829
# case it prints its new name instead of `make'.
830
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
835
# Now try BSD make style include.
836
if test "$am__include" = "#"; then
837
echo '.include "confinc"' > confmf
838
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
844
AC_SUBST([am__include])
845
AC_SUBST([am__quote])
846
AC_MSG_RESULT([$_am_result])
850
# AM_CONDITIONAL -*- Autoconf -*-
852
# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
854
# This program is free software; you can redistribute it and/or modify
855
# it under the terms of the GNU General Public License as published by
856
# the Free Software Foundation; either version 2, or (at your option)
859
# This program is distributed in the hope that it will be useful,
860
# but WITHOUT ANY WARRANTY; without even the implied warranty of
861
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
862
# GNU General Public License for more details.
864
# You should have received a copy of the GNU General Public License
865
# along with this program; if not, write to the Free Software
866
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
873
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
874
# -------------------------------------
875
# Define a conditional.
876
AC_DEFUN([AM_CONDITIONAL],
877
[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
878
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
888
AC_CONFIG_COMMANDS_PRE(
889
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
890
AC_MSG_ERROR([conditional "$1" was never defined.
891
Usually this means the macro was only invoked conditionally.])
894
dnl as-libtool.m4 0.0.2
895
dnl autostars m4 macro for libtool versioning
896
dnl thomas@apestaart.org
898
dnl AS_LIBTOOL(PREFIX, CURRENT, REVISION, AGE, USE_RELEASE)
900
dnl AS_VERSION(GST, 2, 0, 0)
903
dnl - defines [$PREFIX]_CURRENT, REVISION AND AGE
904
dnl - defines [$PREFIX]_LIBVERSION
905
dnl - defines [$PREFIX]_LT_LDFLAGS to set versioning
906
dnl - AC_SUBST's them all
908
dnl if USE_RELEASE = yes, then add a -release option to the LDFLAGS
909
dnl with the (pre-defined) [$PREFIX]_VERSION
910
dnl then use [$PREFIX]_LT_LDFLAGS in the relevant Makefile.am's
917
[$1]_LIBVERSION=[$2]:[$3]:[$4]
918
AC_SUBST([$1]_CURRENT)
919
AC_SUBST([$1]_REVISION)
921
AC_SUBST([$1]_LIBVERSION)
923
dnl [$1]_LT_LDFLAGS="$[$1]_LT_LDFLAGS -version-info $[$1]_LIBVERSION"
926
[$1]_LT_LDFLAGS="$[$1]_LT_LDFLAGS -release $[$1]_VERSION"
928
AC_SUBST([$1]_LT_LDFLAGS)
934
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
936
# serial 47 AC_PROG_LIBTOOL
940
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
941
# -----------------------------------------------------------
942
# If this macro is not defined by Autoconf, define it here.
943
m4_ifdef([AC_PROVIDE_IFELSE],
945
[m4_define([AC_PROVIDE_IFELSE],
946
[m4_ifdef([AC_PROVIDE_$1],
952
AC_DEFUN([AC_PROG_LIBTOOL],
953
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
954
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
955
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
956
AC_PROVIDE_IFELSE([AC_PROG_CXX],
958
[define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
960
dnl And a similar setup for Fortran 77 support
961
AC_PROVIDE_IFELSE([AC_PROG_F77],
963
[define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
966
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
967
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
968
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
969
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
971
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
973
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
975
[ifdef([AC_PROG_GCJ],
976
[define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
977
ifdef([A][M_PROG_GCJ],
978
[define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
979
ifdef([LT_AC_PROG_GCJ],
980
[define([LT_AC_PROG_GCJ],
981
defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
982
])])# AC_PROG_LIBTOOL
987
AC_DEFUN([_AC_PROG_LIBTOOL],
988
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
989
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
990
AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
991
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
993
# This can be used to rebuild libtool when needed
994
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
996
# Always use our own libtool.
997
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1000
# Prevent multiple expansion
1001
define([AC_PROG_LIBTOOL], [])
1002
])# _AC_PROG_LIBTOOL
1007
AC_DEFUN([AC_LIBTOOL_SETUP],
1009
AC_REQUIRE([AC_ENABLE_SHARED])dnl
1010
AC_REQUIRE([AC_ENABLE_STATIC])dnl
1011
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
1012
AC_REQUIRE([AC_CANONICAL_HOST])dnl
1013
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1014
AC_REQUIRE([AC_PROG_CC])dnl
1015
AC_REQUIRE([AC_PROG_LD])dnl
1016
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
1017
AC_REQUIRE([AC_PROG_NM])dnl
1019
AC_REQUIRE([AC_PROG_LN_S])dnl
1020
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
1021
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
1022
AC_REQUIRE([AC_OBJEXT])dnl
1023
AC_REQUIRE([AC_EXEEXT])dnl
1026
AC_LIBTOOL_SYS_MAX_CMD_LEN
1027
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1030
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1031
_LT_AC_PROG_ECHO_BACKSLASH
1035
# AIX sometimes has problems with the GCC collect2 program. For some
1036
# reason, if we set the COLLECT_NAMES environment variable, the problems
1037
# vanish in a puff of smoke.
1038
if test "X${COLLECT_NAMES+set}" != Xset; then
1040
export COLLECT_NAMES
1045
# Sed substitution that helps us do robust quoting. It backslashifies
1046
# metacharacters that are still active within double-quoted strings.
1047
Xsed='sed -e s/^X//'
1048
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
1050
# Same as above, but do not quote variable references.
1051
[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
1053
# Sed substitution to delay expansion of an escaped shell variable in a
1054
# double_quote_subst'ed string.
1055
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1057
# Sed substitution to avoid accidental globbing in evaled expressions
1058
no_glob_subst='s/\*/\\\*/g'
1064
default_ofile=libtool
1065
can_build_shared=yes
1067
# All known linkers require a `.a' archive for static linking (except M$VC,
1068
# which needs '.lib').
1070
ltmain="$ac_aux_dir/ltmain.sh"
1071
ofile="$default_ofile"
1072
with_gnu_ld="$lt_cv_prog_gnu_ld"
1074
AC_CHECK_TOOL(AR, ar, false)
1075
AC_CHECK_TOOL(RANLIB, ranlib, :)
1076
AC_CHECK_TOOL(STRIP, strip, :)
1079
old_CFLAGS="$CFLAGS"
1081
# Set sane defaults for various variables
1082
test -z "$AR" && AR=ar
1083
test -z "$AR_FLAGS" && AR_FLAGS=cru
1084
test -z "$AS" && AS=as
1085
test -z "$CC" && CC=cc
1086
test -z "$LTCC" && LTCC=$CC
1087
test -z "$DLLTOOL" && DLLTOOL=dlltool
1088
test -z "$LD" && LD=ld
1089
test -z "$LN_S" && LN_S="ln -s"
1090
test -z "$MAGIC_CMD" && MAGIC_CMD=file
1091
test -z "$NM" && NM=nm
1092
test -z "$SED" && SED=sed
1093
test -z "$OBJDUMP" && OBJDUMP=objdump
1094
test -z "$RANLIB" && RANLIB=:
1095
test -z "$STRIP" && STRIP=:
1096
test -z "$ac_objext" && ac_objext=o
1098
# Determine commands to create old-style static archives.
1099
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1100
old_postinstall_cmds='chmod 644 $oldlib'
1101
old_postuninstall_cmds=
1103
if test -n "$RANLIB"; then
1106
old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1109
old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1112
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1115
# Only perform the check for file, if the check method requires it
1116
case $deplibs_check_method in
1118
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1124
AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1125
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1126
enable_win32_dll=yes, enable_win32_dll=no)
1128
AC_ARG_ENABLE([libtool-lock],
1129
[AC_HELP_STRING([--disable-libtool-lock],
1130
[avoid locking (might break parallel builds)])])
1131
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1134
[AC_HELP_STRING([--with-pic],
1135
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
1136
[pic_mode="$withval"],
1138
test -z "$pic_mode" && pic_mode=default
1140
# Use C for the default configuration in the libtool script
1142
AC_LIBTOOL_LANG_C_CONFIG
1144
])# AC_LIBTOOL_SETUP
1147
# _LT_AC_SYS_COMPILER
1148
# -------------------
1149
AC_DEFUN([_LT_AC_SYS_COMPILER],
1150
[AC_REQUIRE([AC_PROG_CC])dnl
1152
# If no C compiler was specified, use CC.
1155
# Allow CC to be a program name with arguments.
1157
])# _LT_AC_SYS_COMPILER
1160
# _LT_AC_SYS_LIBPATH_AIX
1161
# ----------------------
1162
# Links a minimal program and checks the executable
1163
# for the system default hardcoded library path. In most cases,
1164
# this is /usr/lib:/lib, but when the MPI compilers are used
1165
# the location of the communication and MPI libs are included too.
1166
# If we don't find anything, use the default library path according
1167
# to the aix ld manual.
1168
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
1169
[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1170
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
1172
# Check for a 64-bit object if we didn't find anything.
1173
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; }
1175
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1176
])# _LT_AC_SYS_LIBPATH_AIX
1179
# _LT_AC_SHELL_INIT(ARG)
1180
# ----------------------
1181
AC_DEFUN([_LT_AC_SHELL_INIT],
1182
[ifdef([AC_DIVERSION_NOTICE],
1183
[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1184
[AC_DIVERT_PUSH(NOTICE)])
1187
])# _LT_AC_SHELL_INIT
1190
# _LT_AC_PROG_ECHO_BACKSLASH
1191
# --------------------------
1192
# Add some code to the start of the generated configure script which
1193
# will find an echo command which doesn't interpret backslashes.
1194
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1195
[_LT_AC_SHELL_INIT([
1196
# Check that we are running under the correct shell.
1197
SHELL=${CONFIG_SHELL-/bin/sh}
1201
# Remove one level of quotation (which was required for Make).
1202
ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1207
if test "X[$]1" = X--no-reexec; then
1208
# Discard the --no-reexec flag, and continue.
1210
elif test "X[$]1" = X--fallback-echo; then
1211
# Avoid inline document here, it may be left over
1213
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
1214
# Yippee, $echo works!
1217
# Restart under the correct shell.
1218
exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1221
if test "X[$]1" = X--fallback-echo; then
1222
# used as fallback echo
1230
# The HP-UX ksh and POSIX shell print the target directory to stdout
1232
if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
1234
if test -z "$ECHO"; then
1235
if test "X${echo_test_string+set}" != Xset; then
1236
# find a string as large as possible, as long as the shell can cope with it
1237
for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1238
# expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1239
if (echo_test_string="`eval $cmd`") 2>/dev/null &&
1240
echo_test_string="`eval $cmd`" &&
1241
(test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1248
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1249
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1250
test "X$echo_testing_string" = "X$echo_test_string"; then
1253
# The Solaris, AIX, and Digital Unix default echo programs unquote
1254
# backslashes. This makes it impossible to quote backslashes using
1255
# echo "$something" | sed 's/\\/\\\\/g'
1257
# So, first we look for a working echo in the user's PATH.
1259
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1260
for dir in $PATH /usr/ucb; do
1262
if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1263
test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1264
echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1265
test "X$echo_testing_string" = "X$echo_test_string"; then
1272
if test "X$echo" = Xecho; then
1273
# We didn't find a better echo, so look for alternatives.
1274
if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1275
echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1276
test "X$echo_testing_string" = "X$echo_test_string"; then
1277
# This shell has a builtin print -r that does the trick.
1279
elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1280
test "X$CONFIG_SHELL" != X/bin/ksh; then
1281
# If we have ksh, try running configure again with it.
1282
ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1283
export ORIGINAL_CONFIG_SHELL
1284
CONFIG_SHELL=/bin/ksh
1286
exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1290
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1291
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1292
test "X$echo_testing_string" = "X$echo_test_string"; then
1293
# Cool, printf works
1295
elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1296
test "X$echo_testing_string" = 'X\t' &&
1297
echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1298
test "X$echo_testing_string" = "X$echo_test_string"; then
1299
CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1301
SHELL="$CONFIG_SHELL"
1303
echo="$CONFIG_SHELL [$]0 --fallback-echo"
1304
elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1305
test "X$echo_testing_string" = 'X\t' &&
1306
echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1307
test "X$echo_testing_string" = "X$echo_test_string"; then
1308
echo="$CONFIG_SHELL [$]0 --fallback-echo"
1310
# maybe with a smaller string...
1313
for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1314
if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1321
if test "$prev" != 'sed 50q "[$]0"'; then
1322
echo_test_string=`eval $prev`
1323
export echo_test_string
1324
exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1326
# Oops. We lost completely, so just stick with echo.
1335
# Copy echo and quote the copy suitably for passing to libtool from
1336
# the Makefile, instead of quoting the original, which is used later.
1338
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1339
ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1343
])])# _LT_AC_PROG_ECHO_BACKSLASH
1348
AC_DEFUN([_LT_AC_LOCK],
1349
[AC_ARG_ENABLE([libtool-lock],
1350
[AC_HELP_STRING([--disable-libtool-lock],
1351
[avoid locking (might break parallel builds)])])
1352
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1354
# Some flags need to be propagated to the compiler or linker for good
1358
# Find out which ABI we are using.
1359
echo 'int i;' > conftest.$ac_ext
1360
if AC_TRY_EVAL(ac_compile); then
1361
case `/usr/bin/file conftest.$ac_objext` in
1373
# Find out which ABI we are using.
1374
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1375
if AC_TRY_EVAL(ac_compile); then
1376
if test "$lt_cv_prog_gnu_ld" = yes; then
1377
case `/usr/bin/file conftest.$ac_objext` in
1379
LD="${LD-ld} -melf32bsmip"
1382
LD="${LD-ld} -melf32bmipn32"
1385
LD="${LD-ld} -melf64bmip"
1389
case `/usr/bin/file conftest.$ac_objext` in
1405
x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
1406
# Find out which ABI we are using.
1407
echo 'int i;' > conftest.$ac_ext
1408
if AC_TRY_EVAL(ac_compile); then
1409
case "`/usr/bin/file conftest.o`" in
1413
LD="${LD-ld} -m elf_i386"
1415
ppc64-*linux*|powerpc64-*linux*)
1416
LD="${LD-ld} -m elf32ppclinux"
1419
LD="${LD-ld} -m elf_s390"
1422
LD="${LD-ld} -m elf32_sparc"
1429
LD="${LD-ld} -m elf_x86_64"
1431
ppc*-*linux*|powerpc*-*linux*)
1432
LD="${LD-ld} -m elf64ppc"
1435
LD="${LD-ld} -m elf64_s390"
1438
LD="${LD-ld} -m elf64_sparc"
1448
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
1449
SAVE_CFLAGS="$CFLAGS"
1450
CFLAGS="$CFLAGS -belf"
1451
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1453
AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1455
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1456
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1457
CFLAGS="$SAVE_CFLAGS"
1460
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1461
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1462
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1463
AC_CHECK_TOOL(AS, as, false)
1464
AC_CHECK_TOOL(OBJDUMP, objdump, false)
1469
need_locks="$enable_libtool_lock"
1474
# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1475
# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1476
# ----------------------------------------------------------------
1477
# Check whether the given compiler option works
1478
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
1479
[AC_REQUIRE([LT_AC_PROG_SED])
1480
AC_CACHE_CHECK([$1], [$2],
1482
ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1483
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1484
lt_compiler_flag="$3"
1485
# Insert the option either (1) after the last *FLAGS variable, or
1486
# (2) before a word containing "conftest.", or (3) at the end.
1487
# Note that $ac_compile itself does not contain backslashes and begins
1488
# with a dollar sign (not a hyphen), so the echo should work correctly.
1489
# The option is referenced via a variable to avoid confusing sed.
1490
lt_compile=`echo "$ac_compile" | $SED \
1491
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1492
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1493
-e 's:$: $lt_compiler_flag:'`
1494
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1495
(eval "$lt_compile" 2>conftest.err)
1497
cat conftest.err >&AS_MESSAGE_LOG_FD
1498
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1499
if (exit $ac_status) && test -s "$ac_outfile"; then
1500
# The compiler can only warn and ignore the option if not recognized
1501
# So say no if there are warnings
1502
if test ! -s conftest.err; then
1509
if test x"[$]$2" = xyes; then
1510
ifelse([$5], , :, [$5])
1512
ifelse([$6], , :, [$6])
1514
])# AC_LIBTOOL_COMPILER_OPTION
1517
# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1518
# [ACTION-SUCCESS], [ACTION-FAILURE])
1519
# ------------------------------------------------------------
1520
# Check whether the given compiler option works
1521
AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
1522
[AC_CACHE_CHECK([$1], [$2],
1524
save_LDFLAGS="$LDFLAGS"
1525
LDFLAGS="$LDFLAGS $3"
1526
printf "$lt_simple_link_test_code" > conftest.$ac_ext
1527
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1528
# The compiler can only warn and ignore the option if not recognized
1529
# So say no if there are warnings
1530
if test -s conftest.err; then
1531
# Append any errors to the config.log.
1532
cat conftest.err 1>&AS_MESSAGE_LOG_FD
1538
LDFLAGS="$save_LDFLAGS"
1541
if test x"[$]$2" = xyes; then
1542
ifelse([$4], , :, [$4])
1544
ifelse([$5], , :, [$5])
1546
])# AC_LIBTOOL_LINKER_OPTION
1549
# AC_LIBTOOL_SYS_MAX_CMD_LEN
1550
# --------------------------
1551
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
1552
[# find the maximum length of command line arguments
1553
AC_MSG_CHECKING([the maximum length of command line arguments])
1554
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1560
# On DJGPP, this test can blow up pretty badly due to problems in libc
1561
# (any single argument exceeding 2000 bytes causes a buffer overrun
1562
# during glob expansion). Even if it were fixed, the result of this
1563
# check would be larger than it should be.
1564
lt_cv_sys_max_cmd_len=12288; # 12K is about right
1568
# Under GNU Hurd, this test is not required because there is
1569
# no limit to the length of command line arguments.
1570
# Libtool will interpret -1 as no limit whatsoever
1571
lt_cv_sys_max_cmd_len=-1;
1575
# On Win9x/ME, this test blows up -- it succeeds, but takes
1576
# about 5 minutes as the teststring grows exponentially.
1577
# Worse, since 9x/ME are not pre-emptively multitasking,
1578
# you end up with a "frozen" computer, even though with patience
1579
# the test eventually succeeds (with a max line length of 256k).
1580
# Instead, let's just punt: use the minimum linelength reported by
1581
# all of the supported platforms: 8192 (on NT/2K/XP).
1582
lt_cv_sys_max_cmd_len=8192;
1586
# On AmigaOS with pdksh, this test takes hours, literally.
1587
# So we just punt and use a minimum line length of 8192.
1588
lt_cv_sys_max_cmd_len=8192;
1592
# If test is not a shell built-in, we'll probably end up computing a
1593
# maximum length that is only half of the actual maximum length, but
1595
while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
1596
= "XX$testring") >/dev/null 2>&1 &&
1597
new_result=`expr "X$testring" : ".*" 2>&1` &&
1598
lt_cv_sys_max_cmd_len=$new_result &&
1599
test $i != 17 # 1/2 MB should be enough
1602
testring=$testring$testring
1605
# Add a significant safety factor because C++ compilers can tack on massive
1606
# amounts of additional arguments before passing them to the linker.
1607
# It appears as though 1/2 is a usable value.
1608
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1612
if test -n $lt_cv_sys_max_cmd_len ; then
1613
AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1617
])# AC_LIBTOOL_SYS_MAX_CMD_LEN
1620
# _LT_AC_CHECK_DLFCN
1621
# --------------------
1622
AC_DEFUN([_LT_AC_CHECK_DLFCN],
1623
[AC_CHECK_HEADERS(dlfcn.h)dnl
1624
])# _LT_AC_CHECK_DLFCN
1627
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1628
# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1629
# ------------------------------------------------------------------
1630
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1631
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1632
if test "$cross_compiling" = yes; then :
1635
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1636
lt_status=$lt_dlunknown
1637
cat > conftest.$ac_ext <<EOF
1638
[#line __oline__ "configure"
1639
#include "confdefs.h"
1648
# define LT_DLGLOBAL RTLD_GLOBAL
1651
# define LT_DLGLOBAL DL_GLOBAL
1653
# define LT_DLGLOBAL 0
1657
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1658
find out it does not work in some platform. */
1659
#ifndef LT_DLLAZY_OR_NOW
1661
# define LT_DLLAZY_OR_NOW RTLD_LAZY
1664
# define LT_DLLAZY_OR_NOW DL_LAZY
1667
# define LT_DLLAZY_OR_NOW RTLD_NOW
1670
# define LT_DLLAZY_OR_NOW DL_NOW
1672
# define LT_DLLAZY_OR_NOW 0
1680
extern "C" void exit (int);
1683
void fnord() { int i=42;}
1686
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1687
int status = $lt_dlunknown;
1691
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1692
else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1693
/* dlclose (self); */
1699
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1700
(./conftest; exit; ) 2>/dev/null
1703
x$lt_dlno_uscore) $1 ;;
1704
x$lt_dlneed_uscore) $2 ;;
1705
x$lt_unknown|x*) $3 ;;
1708
# compilation failed
1713
])# _LT_AC_TRY_DLOPEN_SELF
1716
# AC_LIBTOOL_DLOPEN_SELF
1717
# -------------------
1718
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1719
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1720
if test "x$enable_dlopen" != xyes; then
1721
enable_dlopen=unknown
1722
enable_dlopen_self=unknown
1723
enable_dlopen_self_static=unknown
1730
lt_cv_dlopen="load_add_on"
1732
lt_cv_dlopen_self=yes
1736
lt_cv_dlopen="LoadLibrary"
1741
lt_cv_dlopen="dlopen"
1746
# if libdl is installed we need to link against it
1747
AC_CHECK_LIB([dl], [dlopen],
1748
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1751
lt_cv_dlopen_self=yes
1756
AC_CHECK_FUNC([shl_load],
1757
[lt_cv_dlopen="shl_load"],
1758
[AC_CHECK_LIB([dld], [shl_load],
1759
[lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1760
[AC_CHECK_FUNC([dlopen],
1761
[lt_cv_dlopen="dlopen"],
1762
[AC_CHECK_LIB([dl], [dlopen],
1763
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1764
[AC_CHECK_LIB([svld], [dlopen],
1765
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1766
[AC_CHECK_LIB([dld], [dld_link],
1767
[lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1776
if test "x$lt_cv_dlopen" != xno; then
1782
case $lt_cv_dlopen in
1784
save_CPPFLAGS="$CPPFLAGS"
1785
test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1787
save_LDFLAGS="$LDFLAGS"
1788
eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1791
LIBS="$lt_cv_dlopen_libs $LIBS"
1793
AC_CACHE_CHECK([whether a program can dlopen itself],
1794
lt_cv_dlopen_self, [dnl
1795
_LT_AC_TRY_DLOPEN_SELF(
1796
lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1797
lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1800
if test "x$lt_cv_dlopen_self" = xyes; then
1801
LDFLAGS="$LDFLAGS $link_static_flag"
1802
AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1803
lt_cv_dlopen_self_static, [dnl
1804
_LT_AC_TRY_DLOPEN_SELF(
1805
lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1806
lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1810
CPPFLAGS="$save_CPPFLAGS"
1811
LDFLAGS="$save_LDFLAGS"
1816
case $lt_cv_dlopen_self in
1817
yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1818
*) enable_dlopen_self=unknown ;;
1821
case $lt_cv_dlopen_self_static in
1822
yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1823
*) enable_dlopen_self_static=unknown ;;
1826
])# AC_LIBTOOL_DLOPEN_SELF
1829
# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1830
# ---------------------------------
1831
# Check to see if options -c and -o are simultaneously supported by compiler
1832
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1833
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1834
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1835
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1836
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1837
$rm -r conftest 2>/dev/null
1841
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1843
# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
1844
# that will create temporary files in the current directory regardless of
1845
# the output directory. Thus, making CWD read-only will cause this test
1846
# to fail, enabling locking or at least warning the user not to do parallel
1850
lt_compiler_flag="-o out/conftest2.$ac_objext"
1851
# Insert the option either (1) after the last *FLAGS variable, or
1852
# (2) before a word containing "conftest.", or (3) at the end.
1853
# Note that $ac_compile itself does not contain backslashes and begins
1854
# with a dollar sign (not a hyphen), so the echo should work correctly.
1855
lt_compile=`echo "$ac_compile" | $SED \
1856
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1857
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1858
-e 's:$: $lt_compiler_flag:'`
1859
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1860
(eval "$lt_compile" 2>out/conftest.err)
1862
cat out/conftest.err >&AS_MESSAGE_LOG_FD
1863
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1864
if (exit $ac_status) && test -s out/conftest2.$ac_objext
1866
# The compiler can only warn and ignore the option if not recognized
1867
# So say no if there are warnings
1868
if test ! -s out/conftest.err; then
1869
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1874
# SGI C++ compiler will create directory out/ii_files/ for
1875
# template instantiation
1876
test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1877
$rm out/* && rmdir out
1882
])# AC_LIBTOOL_PROG_CC_C_O
1885
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1886
# -----------------------------------------
1887
# Check to see if we can do hard links to lock some files if needed
1888
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1889
[AC_REQUIRE([_LT_AC_LOCK])dnl
1891
hard_links="nottested"
1892
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1893
# do not overwrite the value of need_locks provided by the user
1894
AC_MSG_CHECKING([if we can lock with hard links])
1897
ln conftest.a conftest.b 2>/dev/null && hard_links=no
1899
ln conftest.a conftest.b 2>&5 || hard_links=no
1900
ln conftest.a conftest.b 2>/dev/null && hard_links=no
1901
AC_MSG_RESULT([$hard_links])
1902
if test "$hard_links" = no; then
1903
AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1909
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1914
AC_DEFUN([AC_LIBTOOL_OBJDIR],
1915
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1916
[rm -f .libs 2>/dev/null
1917
mkdir .libs 2>/dev/null
1918
if test -d .libs; then
1921
# MS-DOS does not allow filenames that begin with a dot.
1924
rmdir .libs 2>/dev/null])
1925
objdir=$lt_cv_objdir
1926
])# AC_LIBTOOL_OBJDIR
1929
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1930
# ----------------------------------------------
1931
# Check hardcoding attributes.
1932
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1933
[AC_MSG_CHECKING([how to hardcode library paths into programs])
1934
_LT_AC_TAGVAR(hardcode_action, $1)=
1935
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1936
test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
1937
test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
1939
# We can hardcode non-existant directories.
1940
if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1941
# If the only mechanism to avoid hardcoding is shlibpath_var, we
1942
# have to relink, otherwise we might link with an installed library
1943
# when we should be linking with a yet-to-be-installed one
1944
## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1945
test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1946
# Linking always hardcodes the temporary library directory.
1947
_LT_AC_TAGVAR(hardcode_action, $1)=relink
1949
# We can link without hardcoding, and we can hardcode nonexisting dirs.
1950
_LT_AC_TAGVAR(hardcode_action, $1)=immediate
1953
# We cannot hardcode anything, or else we can only hardcode existing
1955
_LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1957
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1959
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1960
# Fast installation is not supported
1961
enable_fast_install=no
1962
elif test "$shlibpath_overrides_runpath" = yes ||
1963
test "$enable_shared" = no; then
1964
# Fast installation is not necessary
1965
enable_fast_install=needless
1967
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1970
# AC_LIBTOOL_SYS_LIB_STRIP
1971
# ------------------------
1972
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1975
AC_MSG_CHECKING([whether stripping libraries is possible])
1976
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1977
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1978
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1979
AC_MSG_RESULT([yes])
1981
# FIXME - insert some real tests, host_os isn't really good enough
1984
if test -n "$STRIP" ; then
1985
striplib="$STRIP -x"
1986
AC_MSG_RESULT([yes])
1996
])# AC_LIBTOOL_SYS_LIB_STRIP
1999
# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2000
# -----------------------------
2001
# PORTME Fill in your ld.so characteristics
2002
AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
2003
[AC_MSG_CHECKING([dynamic linker characteristics])
2005
libname_spec='lib$name'
2013
shlibpath_overrides_runpath=unknown
2015
dynamic_linker="$host_os ld.so"
2016
sys_lib_dlsearch_path_spec="/lib /usr/lib"
2017
if test "$GCC" = yes; then
2018
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2019
if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
2020
# if the path contains ";" then we assume it to be the separator
2021
# otherwise default to the standard path separator (i.e. ":") - it is
2022
# assumed that no part of a normal pathname contains ";" but that should
2023
# okay in the real world where ";" in dirpaths is itself problematic.
2024
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2026
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2029
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2031
need_lib_prefix=unknown
2032
hardcode_into_libs=no
2034
# when you set need_version to no, make sure it does not cause -set_version
2035
# flags to be left without arguments
2036
need_version=unknown
2041
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2042
shlibpath_var=LIBPATH
2044
# AIX 3 has no versioning support, so we append a major version to the name.
2045
soname_spec='${libname}${release}${shared_ext}$major'
2052
hardcode_into_libs=yes
2053
if test "$host_cpu" = ia64; then
2054
# AIX 5 supports IA64
2055
library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2056
shlibpath_var=LD_LIBRARY_PATH
2058
# With GCC up to 2.95.x, collect2 would create an import file
2059
# for dependence libraries. The import file would start with
2060
# the line `#! .'. This would cause the generated library to
2061
# depend on `.', always an invalid library. This was fixed in
2062
# development snapshots of GCC prior to 3.0.
2064
aix4 | aix4.[[01]] | aix4.[[01]].*)
2065
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2067
echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2074
# AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2075
# soname into executable. Probably we can add versioning support to
2076
# collect2, so additional links can be useful in future.
2077
if test "$aix_use_runtimelinking" = yes; then
2078
# If using run time linking (on AIX 4.2 or later) use lib<name>.so
2079
# instead of lib<name>.a to let people know that these are not
2080
# typical AIX shared libraries.
2081
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2083
# We preserve .a as extension for shared libraries through AIX4.2
2084
# and later when we are not doing run time linking.
2085
library_names_spec='${libname}${release}.a $libname.a'
2086
soname_spec='${libname}${release}${shared_ext}$major'
2088
shlibpath_var=LIBPATH
2093
library_names_spec='$libname.ixlibrary $libname.a'
2094
# Create ${libname}_ixlibrary.a entries in /sys/libs.
2095
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'
2099
library_names_spec='${libname}${shared_ext}'
2100
dynamic_linker="$host_os ld.so"
2101
shlibpath_var=LIBRARY_PATH
2107
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2108
soname_spec='${libname}${release}${shared_ext}$major'
2109
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2110
shlibpath_var=LD_LIBRARY_PATH
2111
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2112
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2113
# the default ld.so.conf also contains /usr/contrib/lib and
2114
# /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2115
# libtool to hard-code these into programs
2118
cygwin* | mingw* | pw32*)
2119
version_type=windows
2124
case $GCC,$host_os in
2125
yes,cygwin* | yes,mingw* | yes,pw32*)
2126
library_names_spec='$libname.dll.a'
2127
# DLL is installed to $(libdir)/../bin by postinstall_cmds
2128
postinstall_cmds='base_file=`basename \${file}`~
2129
dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
2130
dldir=$destdir/`dirname \$dlpath`~
2131
test -d \$dldir || mkdir -p \$dldir~
2132
$install_prog $dir/$dlname \$dldir/$dlname'
2133
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2134
dlpath=$dir/\$dldll~
2136
shlibpath_overrides_runpath=yes
2140
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
2141
soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2142
sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2145
# MinGW DLLs use traditional 'lib' prefix
2146
soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2147
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2148
if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
2149
# It is most probably a Windows format PATH printed by
2150
# mingw gcc, but we are running on Cygwin. Gcc prints its search
2151
# path with ; separators, and with drive letters. We can handle the
2152
# drive letters (cygwin fileutils understands them), so leave them,
2153
# especially as we might pass files found there to a mingw objdump,
2154
# which wouldn't understand a cygwinified path. Ahh.
2155
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2157
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2161
# pw32 DLLs use 'pw' prefix rather than 'lib'
2162
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
2168
library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2171
dynamic_linker='Win32 ld.exe'
2172
# FIXME: first we should search . and the directory the executable is in
2176
darwin* | rhapsody*)
2177
dynamic_linker="$host_os dyld"
2181
library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2182
soname_spec='${libname}${release}${major}$shared_ext'
2183
shlibpath_overrides_runpath=yes
2184
shlibpath_var=DYLD_LIBRARY_PATH
2185
shrext='$(test .$module = .yes && echo .so || echo .dylib)'
2186
# Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
2187
if test "$GCC" = yes; then
2188
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"`
2190
sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
2192
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2199
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2200
soname_spec='${libname}${release}${shared_ext}$major'
2201
shlibpath_var=LD_LIBRARY_PATH
2212
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2213
soname_spec='${libname}${release}${shared_ext}$major'
2214
shlibpath_var=LD_LIBRARY_PATH
2215
shlibpath_overrides_runpath=no
2216
hardcode_into_libs=yes
2217
dynamic_linker='GNU ld.so'
2221
objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
2222
version_type=freebsd-$objformat
2223
case $version_type in
2225
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2230
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2234
shlibpath_var=LD_LIBRARY_PATH
2237
shlibpath_overrides_runpath=yes
2239
freebsd3.[01]* | freebsdelf3.[01]*)
2240
shlibpath_overrides_runpath=yes
2241
hardcode_into_libs=yes
2244
shlibpath_overrides_runpath=no
2245
hardcode_into_libs=yes
2254
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2255
soname_spec='${libname}${release}${shared_ext}$major'
2256
shlibpath_var=LD_LIBRARY_PATH
2257
hardcode_into_libs=yes
2260
hpux9* | hpux10* | hpux11*)
2261
# Give a soname corresponding to the major version so that dld.sl refuses to
2262
# link against other versions.
2269
hardcode_into_libs=yes
2270
dynamic_linker="$host_os dld.so"
2271
shlibpath_var=LD_LIBRARY_PATH
2272
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2273
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2274
soname_spec='${libname}${release}${shared_ext}$major'
2275
if test "X$HPUX_IA64_MODE" = X32; then
2276
sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2278
sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2280
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2284
hardcode_into_libs=yes
2285
dynamic_linker="$host_os dld.sl"
2286
shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2287
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2288
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2289
soname_spec='${libname}${release}${shared_ext}$major'
2290
sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2291
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2295
dynamic_linker="$host_os dld.sl"
2296
shlibpath_var=SHLIB_PATH
2297
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2298
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2299
soname_spec='${libname}${release}${shared_ext}$major'
2302
# HP-UX runs *really* slowly unless shared libraries are mode 555.
2303
postinstall_cmds='chmod 555 $lib'
2306
irix5* | irix6* | nonstopux*)
2308
nonstopux*) version_type=nonstopux ;;
2310
if test "$lt_cv_prog_gnu_ld" = yes; then
2318
soname_spec='${libname}${release}${shared_ext}$major'
2319
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2321
irix5* | nonstopux*)
2325
case $LD in # libtool.m4 will add one of these switches to LD
2326
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2327
libsuff= shlibsuff= libmagic=32-bit;;
2328
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2329
libsuff=32 shlibsuff=N32 libmagic=N32;;
2330
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2331
libsuff=64 shlibsuff=64 libmagic=64-bit;;
2332
*) libsuff= shlibsuff= libmagic=never-match;;
2336
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2337
shlibpath_overrides_runpath=no
2338
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2339
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2340
hardcode_into_libs=yes
2343
# No shared lib support for Linux oldld, aout, or coff.
2344
linux*oldld* | linux*aout* | linux*coff*)
2348
# This must be Linux ELF.
2353
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2354
soname_spec='${libname}${release}${shared_ext}$major'
2355
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2356
shlibpath_var=LD_LIBRARY_PATH
2357
shlibpath_overrides_runpath=no
2358
# This implies no fast_install, which is unacceptable.
2359
# Some rework will be needed to allow for fast_install
2360
# before this can be enabled.
2361
hardcode_into_libs=yes
2363
# We used to test for /lib/ld.so.1 and disable shared libraries on
2364
# powerpc, because MkLinux only supported shared libraries with the
2365
# GNU dynamic linker. Since this was broken with cross compilers,
2366
# most powerpc-linux boxes support dynamic linking these days and
2367
# people can always --disable-shared, the test was removed, and we
2368
# assume the GNU/Linux dynamic linker is in use.
2369
dynamic_linker='GNU/Linux ld.so'
2376
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2377
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2378
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2379
dynamic_linker='NetBSD (a.out) ld.so'
2381
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}'
2382
soname_spec='${libname}${release}${shared_ext}$major'
2383
dynamic_linker='NetBSD ld.elf_so'
2385
shlibpath_var=LD_LIBRARY_PATH
2386
shlibpath_overrides_runpath=yes
2387
hardcode_into_libs=yes
2392
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2393
shlibpath_var=LD_LIBRARY_PATH
2394
shlibpath_overrides_runpath=yes
2401
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2402
soname_spec='${libname}${release}${shared_ext}$major'
2403
shlibpath_var=LD_LIBRARY_PATH
2404
shlibpath_overrides_runpath=yes
2411
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2412
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2413
shlibpath_var=LD_LIBRARY_PATH
2414
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2416
openbsd2.[[89]] | openbsd2.[[89]].*)
2417
shlibpath_overrides_runpath=no
2420
shlibpath_overrides_runpath=yes
2424
shlibpath_overrides_runpath=yes
2429
libname_spec='$name'
2432
library_names_spec='$libname${shared_ext} $libname.a'
2433
dynamic_linker='OS/2 ld.exe'
2434
shlibpath_var=LIBPATH
2437
osf3* | osf4* | osf5*)
2441
soname_spec='${libname}${release}${shared_ext}$major'
2442
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2443
shlibpath_var=LD_LIBRARY_PATH
2444
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2445
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2450
soname_spec='${libname}${release}${shared_ext}$major'
2451
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2452
shlibpath_var=LD_LIBRARY_PATH
2459
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2460
soname_spec='${libname}${release}${shared_ext}$major'
2461
shlibpath_var=LD_LIBRARY_PATH
2462
shlibpath_overrides_runpath=yes
2463
hardcode_into_libs=yes
2464
# ldd complains unless libraries are executable
2465
postinstall_cmds='chmod +x $lib'
2470
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2471
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2472
shlibpath_var=LD_LIBRARY_PATH
2473
shlibpath_overrides_runpath=yes
2474
if test "$with_gnu_ld" = yes; then
2480
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2482
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2483
soname_spec='${libname}${release}${shared_ext}$major'
2484
shlibpath_var=LD_LIBRARY_PATH
2485
case $host_vendor in
2487
shlibpath_overrides_runpath=no
2489
export_dynamic_flag_spec='${wl}-Blargedynsym'
2490
runpath_var=LD_RUN_PATH
2498
shlibpath_overrides_runpath=no
2499
sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2505
if test -d /usr/nec ;then
2507
library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2508
soname_spec='$libname${shared_ext}.$major'
2509
shlibpath_var=LD_LIBRARY_PATH
2515
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2516
soname_spec='${libname}${release}${shared_ext}$major'
2517
shlibpath_var=LD_LIBRARY_PATH
2524
AC_MSG_RESULT([$dynamic_linker])
2525
test "$dynamic_linker" = no && can_build_shared=no
2526
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2531
AC_DEFUN([_LT_AC_TAGCONFIG],
2532
[AC_ARG_WITH([tags],
2533
[AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
2534
[include additional configurations @<:@automatic@:>@])],
2535
[tagnames="$withval"])
2537
if test -f "$ltmain" && test -n "$tagnames"; then
2538
if test ! -f "${ofile}"; then
2539
AC_MSG_WARN([output file `$ofile' does not exist])
2542
if test -z "$LTCC"; then
2543
eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
2544
if test -z "$LTCC"; then
2545
AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
2547
AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
2551
# Extract list of available tagged configurations in $ofile.
2552
# Note that this assumes the entire list is on one line.
2553
available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
2555
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2556
for tagname in $tagnames; do
2558
# Check whether tagname contains only valid characters
2559
case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
2561
*) AC_MSG_ERROR([invalid tag name: $tagname])
2565
if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
2567
AC_MSG_ERROR([tag name \"$tagname\" already exists])
2570
# Update the list of available tags.
2571
if test -n "$tagname"; then
2572
echo appending configuration tag \"$tagname\" to $ofile
2576
if test -n "$CXX" && test "X$CXX" != "Xno"; then
2577
AC_LIBTOOL_LANG_CXX_CONFIG
2584
if test -n "$F77" && test "X$F77" != "Xno"; then
2585
AC_LIBTOOL_LANG_F77_CONFIG
2592
if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
2593
AC_LIBTOOL_LANG_GCJ_CONFIG
2600
AC_LIBTOOL_LANG_RC_CONFIG
2604
AC_MSG_ERROR([Unsupported tag name: $tagname])
2608
# Append the new tag name to the list of available tags.
2609
if test -n "$tagname" ; then
2610
available_tags="$available_tags $tagname"
2616
# Now substitute the updated list of available tags.
2617
if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2618
mv "${ofile}T" "$ofile"
2622
AC_MSG_ERROR([unable to update list of available tagged configurations.])
2625
])# _LT_AC_TAGCONFIG
2630
# enable checks for dlopen support
2631
AC_DEFUN([AC_LIBTOOL_DLOPEN],
2632
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2633
])# AC_LIBTOOL_DLOPEN
2636
# AC_LIBTOOL_WIN32_DLL
2637
# --------------------
2638
# declare package support for building win32 dll's
2639
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2640
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2641
])# AC_LIBTOOL_WIN32_DLL
2644
# AC_ENABLE_SHARED([DEFAULT])
2645
# ---------------------------
2646
# implement the --enable-shared flag
2647
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2648
AC_DEFUN([AC_ENABLE_SHARED],
2649
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2650
AC_ARG_ENABLE([shared],
2651
[AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
2652
[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
2653
[p=${PACKAGE-default}
2655
yes) enable_shared=yes ;;
2656
no) enable_shared=no ;;
2659
# Look at the argument we got. We use all the common list separators.
2660
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2661
for pkg in $enableval; do
2663
if test "X$pkg" = "X$p"; then
2670
[enable_shared=]AC_ENABLE_SHARED_DEFAULT)
2671
])# AC_ENABLE_SHARED
2676
#- set the default shared flag to --disable-shared
2677
AC_DEFUN([AC_DISABLE_SHARED],
2678
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2679
AC_ENABLE_SHARED(no)
2680
])# AC_DISABLE_SHARED
2683
# AC_ENABLE_STATIC([DEFAULT])
2684
# ---------------------------
2685
# implement the --enable-static flag
2686
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2687
AC_DEFUN([AC_ENABLE_STATIC],
2688
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2689
AC_ARG_ENABLE([static],
2690
[AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2691
[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2692
[p=${PACKAGE-default}
2694
yes) enable_static=yes ;;
2695
no) enable_static=no ;;
2698
# Look at the argument we got. We use all the common list separators.
2699
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2700
for pkg in $enableval; do
2702
if test "X$pkg" = "X$p"; then
2709
[enable_static=]AC_ENABLE_STATIC_DEFAULT)
2710
])# AC_ENABLE_STATIC
2715
# set the default static flag to --disable-static
2716
AC_DEFUN([AC_DISABLE_STATIC],
2717
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2718
AC_ENABLE_STATIC(no)
2719
])# AC_DISABLE_STATIC
2722
# AC_ENABLE_FAST_INSTALL([DEFAULT])
2723
# ---------------------------------
2724
# implement the --enable-fast-install flag
2725
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2726
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2727
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2728
AC_ARG_ENABLE([fast-install],
2729
[AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2730
[optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2731
[p=${PACKAGE-default}
2733
yes) enable_fast_install=yes ;;
2734
no) enable_fast_install=no ;;
2736
enable_fast_install=no
2737
# Look at the argument we got. We use all the common list separators.
2738
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2739
for pkg in $enableval; do
2741
if test "X$pkg" = "X$p"; then
2742
enable_fast_install=yes
2748
[enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2749
])# AC_ENABLE_FAST_INSTALL
2752
# AC_DISABLE_FAST_INSTALL
2753
# -----------------------
2754
# set the default to --disable-fast-install
2755
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2756
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2757
AC_ENABLE_FAST_INSTALL(no)
2758
])# AC_DISABLE_FAST_INSTALL
2761
# AC_LIBTOOL_PICMODE([MODE])
2762
# --------------------------
2763
# implement the --with-pic flag
2764
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
2765
AC_DEFUN([AC_LIBTOOL_PICMODE],
2766
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2767
pic_mode=ifelse($#,1,$1,default)
2768
])# AC_LIBTOOL_PICMODE
2773
# This is predefined starting with Autoconf 2.54, so this conditional
2774
# definition can be removed once we require Autoconf 2.54 or later.
2775
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2776
[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2777
[if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2778
then ac_cv_prog_egrep='grep -E'
2779
else ac_cv_prog_egrep='egrep'
2781
EGREP=$ac_cv_prog_egrep
2786
# AC_PATH_TOOL_PREFIX
2787
# -------------------
2788
# find a file program which can recognise shared library
2789
AC_DEFUN([AC_PATH_TOOL_PREFIX],
2790
[AC_REQUIRE([AC_PROG_EGREP])dnl
2791
AC_MSG_CHECKING([for $1])
2792
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2794
[[\\/*] | ?:[\\/]*])
2795
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2798
lt_save_MAGIC_CMD="$MAGIC_CMD"
2799
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2800
dnl $ac_dummy forces splitting on constant user-supplied paths.
2801
dnl POSIX.2 word splitting is done only on the output of word expansions,
2802
dnl not every word. This closes a longstanding sh security hole.
2803
ac_dummy="ifelse([$2], , $PATH, [$2])"
2804
for ac_dir in $ac_dummy; do
2806
test -z "$ac_dir" && ac_dir=.
2807
if test -f $ac_dir/$1; then
2808
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2809
if test -n "$file_magic_test_file"; then
2810
case $deplibs_check_method in
2812
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2813
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2814
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2815
$EGREP "$file_magic_regex" > /dev/null; then
2820
*** Warning: the command libtool uses to detect shared libraries,
2821
*** $file_magic_cmd, produces output that libtool cannot recognize.
2822
*** The result is that libtool may fail to recognize shared libraries
2823
*** as such. This will affect the creation of libtool libraries that
2824
*** depend on shared libraries, but programs linked with such libtool
2825
*** libraries will work regardless of this problem. Nevertheless, you
2826
*** may want to report the problem to your system manager and/or to
2827
*** bug-libtool@gnu.org
2837
MAGIC_CMD="$lt_save_MAGIC_CMD"
2840
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2841
if test -n "$MAGIC_CMD"; then
2842
AC_MSG_RESULT($MAGIC_CMD)
2846
])# AC_PATH_TOOL_PREFIX
2851
# find a file program which can recognise a shared library
2852
AC_DEFUN([AC_PATH_MAGIC],
2853
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2854
if test -z "$lt_cv_path_MAGIC_CMD"; then
2855
if test -n "$ac_tool_prefix"; then
2856
AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2866
# find the pathname to the GNU or non-GNU linker
2867
AC_DEFUN([AC_PROG_LD],
2868
[AC_ARG_WITH([gnu-ld],
2869
[AC_HELP_STRING([--with-gnu-ld],
2870
[assume the C compiler uses GNU ld @<:@default=no@:>@])],
2871
[test "$withval" = no || with_gnu_ld=yes],
2873
AC_REQUIRE([LT_AC_PROG_SED])dnl
2874
AC_REQUIRE([AC_PROG_CC])dnl
2875
AC_REQUIRE([AC_CANONICAL_HOST])dnl
2876
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2878
if test "$GCC" = yes; then
2879
# Check if gcc -print-prog-name=ld gives a path.
2880
AC_MSG_CHECKING([for ld used by $CC])
2883
# gcc leaves a trailing carriage return which upsets mingw
2884
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2886
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2889
# Accept absolute paths.
2890
[[\\/]]* | ?:[[\\/]]*)
2891
re_direlt='/[[^/]][[^/]]*/\.\./'
2892
# Canonicalize the pathname of ld
2893
ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2894
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2895
ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2897
test -z "$LD" && LD="$ac_prog"
2900
# If it fails, then pretend we aren't using GCC.
2904
# If it is relative, then search for the first ld in PATH.
2908
elif test "$with_gnu_ld" = yes; then
2909
AC_MSG_CHECKING([for GNU ld])
2911
AC_MSG_CHECKING([for non-GNU ld])
2913
AC_CACHE_VAL(lt_cv_path_LD,
2914
[if test -z "$LD"; then
2915
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2916
for ac_dir in $PATH; do
2918
test -z "$ac_dir" && ac_dir=.
2919
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2920
lt_cv_path_LD="$ac_dir/$ac_prog"
2921
# Check to see if the program is GNU ld. I'd rather use --version,
2922
# but apparently some GNU ld's only accept -v.
2923
# Break only if it was the GNU/non-GNU ld that we prefer.
2924
case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2925
*GNU* | *'with BFD'*)
2926
test "$with_gnu_ld" != no && break
2929
test "$with_gnu_ld" != yes && break
2936
lt_cv_path_LD="$LD" # Let the user override the test with a path.
2939
if test -n "$LD"; then
2944
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2951
AC_DEFUN([AC_PROG_LD_GNU],
2952
[AC_REQUIRE([AC_PROG_EGREP])dnl
2953
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2954
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
2955
case `$LD -v 2>&1 </dev/null` in
2956
*GNU* | *'with BFD'*)
2957
lt_cv_prog_gnu_ld=yes
2960
lt_cv_prog_gnu_ld=no
2963
with_gnu_ld=$lt_cv_prog_gnu_ld
2967
# AC_PROG_LD_RELOAD_FLAG
2968
# ----------------------
2969
# find reload flag for linker
2970
# -- PORTME Some linkers may need a different reload flag.
2971
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2972
[AC_CACHE_CHECK([for $LD option to reload object files],
2973
lt_cv_ld_reload_flag,
2974
[lt_cv_ld_reload_flag='-r'])
2975
reload_flag=$lt_cv_ld_reload_flag
2976
case $reload_flag in
2978
*) reload_flag=" $reload_flag" ;;
2980
reload_cmds='$LD$reload_flag -o $output$reload_objs'
2981
])# AC_PROG_LD_RELOAD_FLAG
2984
# AC_DEPLIBS_CHECK_METHOD
2985
# -----------------------
2986
# how to check for library dependencies
2987
# -- PORTME fill in with the dynamic library characteristics
2988
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2989
[AC_CACHE_CHECK([how to recognise dependent libraries],
2990
lt_cv_deplibs_check_method,
2991
[lt_cv_file_magic_cmd='$MAGIC_CMD'
2992
lt_cv_file_magic_test_file=
2993
lt_cv_deplibs_check_method='unknown'
2994
# Need to set the preceding variable on all platforms that support
2995
# interlibrary dependencies.
2996
# 'none' -- dependencies not supported.
2997
# `unknown' -- same as none, but documents that we really don't know.
2998
# 'pass_all' -- all dependencies passed with no checks.
2999
# 'test_compile' -- check by making test program.
3000
# 'file_magic [[regex]]' -- check by looking for files in library path
3001
# which responds to the $file_magic_cmd with a given extended regex.
3002
# If you have `file' or equivalent on your system and you're not sure
3003
# whether `pass_all' will *always* work, you probably want this one.
3007
lt_cv_deplibs_check_method=pass_all
3011
lt_cv_deplibs_check_method=pass_all
3015
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3016
lt_cv_file_magic_cmd='/usr/bin/file -L'
3017
lt_cv_file_magic_test_file=/shlib/libc.so
3020
cygwin* | mingw* | pw32*)
3021
# win32_libid is a shell function defined in ltmain.sh
3022
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3023
lt_cv_file_magic_cmd='win32_libid'
3026
darwin* | rhapsody*)
3027
# this will be overwritten by pass_all, but leave it in just in case
3028
lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3029
lt_cv_file_magic_cmd='/usr/bin/file -L'
3031
rhapsody* | darwin1.[[012]])
3032
lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
3035
lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3038
lt_cv_deplibs_check_method=pass_all
3041
freebsd* | kfreebsd*-gnu)
3042
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3045
# Not sure whether the presence of OpenBSD here was a mistake.
3046
# Let's accept both of them until this is cleared up.
3047
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
3048
lt_cv_file_magic_cmd=/usr/bin/file
3049
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3053
lt_cv_deplibs_check_method=pass_all
3058
lt_cv_deplibs_check_method=pass_all
3061
hpux10.20* | hpux11*)
3062
lt_cv_file_magic_cmd=/usr/bin/file
3065
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3066
lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3069
[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]']
3070
lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3073
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3074
lt_cv_file_magic_test_file=/usr/lib/libc.sl
3079
irix5* | irix6* | nonstopux*)
3081
irix5* | nonstopux*)
3082
# this will be overridden with pass_all, but let us keep it just in case
3083
lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3087
*-32|*"-32 ") libmagic=32-bit;;
3088
*-n32|*"-n32 ") libmagic=N32;;
3089
*-64|*"-64 ") libmagic=64-bit;;
3090
*) libmagic=never-match;;
3092
# this will be overridden with pass_all, but let us keep it just in case
3093
lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
3096
lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3097
lt_cv_deplibs_check_method=pass_all
3100
# This must be Linux ELF.
3103
alpha* | hppa* | i*86 | ia64* | m68* | mips* | powerpc* | sparc* | s390* | sh*)
3104
lt_cv_deplibs_check_method=pass_all ;;
3106
# glibc up to 2.1.1 does not perform some relocations on ARM
3107
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
3109
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3113
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3114
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3116
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3121
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3122
lt_cv_file_magic_cmd=/usr/bin/file
3123
lt_cv_file_magic_test_file=/usr/lib/libnls.so
3127
lt_cv_deplibs_check_method=unknown
3131
lt_cv_file_magic_cmd=/usr/bin/file
3132
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3133
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3134
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
3136
lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3140
osf3* | osf4* | osf5*)
3141
# this will be overridden with pass_all, but let us keep it just in case
3142
lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3143
lt_cv_file_magic_test_file=/shlib/libc.so
3144
lt_cv_deplibs_check_method=pass_all
3148
lt_cv_deplibs_check_method=pass_all
3152
lt_cv_deplibs_check_method=pass_all
3153
lt_cv_file_magic_test_file=/lib/libc.so
3156
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3157
case $host_vendor in
3159
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]]'
3160
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3163
lt_cv_deplibs_check_method=pass_all
3166
lt_cv_file_magic_cmd='/bin/file'
3167
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3170
lt_cv_file_magic_cmd='/bin/file'
3171
lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3172
lt_cv_file_magic_test_file=/lib/libc.so
3175
lt_cv_deplibs_check_method=pass_all
3180
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
3181
lt_cv_deplibs_check_method=pass_all
3185
file_magic_cmd=$lt_cv_file_magic_cmd
3186
deplibs_check_method=$lt_cv_deplibs_check_method
3187
test -z "$deplibs_check_method" && deplibs_check_method=unknown
3188
])# AC_DEPLIBS_CHECK_METHOD
3193
# find the pathname to a BSD-compatible name lister
3194
AC_DEFUN([AC_PROG_NM],
3195
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
3196
[if test -n "$NM"; then
3197
# Let the user override the test.
3200
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3201
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3203
test -z "$ac_dir" && ac_dir=.
3204
tmp_nm="$ac_dir/${ac_tool_prefix}nm"
3205
if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3206
# Check to see if the nm accepts a BSD-compat flag.
3207
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
3208
# nm: unknown option "B" ignored
3209
# Tru64's nm complains that /dev/null is an invalid object file
3210
case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3211
*/dev/null* | *'Invalid file or object type'*)
3212
lt_cv_path_NM="$tmp_nm -B"
3216
case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3218
lt_cv_path_NM="$tmp_nm -p"
3222
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3223
continue # so that we can try to find one that supports BSD flags
3230
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3238
# check for math library
3239
AC_DEFUN([AC_CHECK_LIBM],
3240
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3243
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3244
# These system don't have libm, or don't need it
3247
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3248
AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3251
AC_CHECK_LIB(m, cos, LIBM="-lm")
3257
# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
3258
# -----------------------------------
3259
# sets LIBLTDL to the link flags for the libltdl convenience library and
3260
# LTDLINCL to the include flags for the libltdl header and adds
3261
# --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
3262
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
3263
# DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
3264
# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
3265
# '${top_srcdir}/' (note the single quotes!). If your package is not
3266
# flat and you're not using automake, define top_builddir and
3267
# top_srcdir appropriately in the Makefiles.
3268
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3269
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3270
case $enable_ltdl_convenience in
3271
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3272
"") enable_ltdl_convenience=yes
3273
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3275
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3276
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3277
# For backwards non-gettext consistent compatibility...
3279
])# AC_LIBLTDL_CONVENIENCE
3282
# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
3283
# -----------------------------------
3284
# sets LIBLTDL to the link flags for the libltdl installable library and
3285
# LTDLINCL to the include flags for the libltdl header and adds
3286
# --enable-ltdl-install to the configure arguments. Note that LIBLTDL
3287
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
3288
# DIRECTORY is not provided and an installed libltdl is not found, it is
3289
# assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
3290
# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
3291
# quotes!). If your package is not flat and you're not using automake,
3292
# define top_builddir and top_srcdir appropriately in the Makefiles.
3293
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3294
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3295
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3296
AC_CHECK_LIB(ltdl, lt_dlinit,
3297
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3298
[if test x"$enable_ltdl_install" = xno; then
3299
AC_MSG_WARN([libltdl not installed, but installation disabled])
3301
enable_ltdl_install=yes
3304
if test x"$enable_ltdl_install" = x"yes"; then
3305
ac_configure_args="$ac_configure_args --enable-ltdl-install"
3306
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3307
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3309
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3313
# For backwards non-gettext consistent compatibility...
3315
])# AC_LIBLTDL_INSTALLABLE
3320
# enable support for C++ libraries
3321
AC_DEFUN([AC_LIBTOOL_CXX],
3322
[AC_REQUIRE([_LT_AC_LANG_CXX])
3328
AC_DEFUN([_LT_AC_LANG_CXX],
3329
[AC_REQUIRE([AC_PROG_CXX])
3330
AC_REQUIRE([AC_PROG_CXXCPP])
3331
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
3337
# enable support for Fortran 77 libraries
3338
AC_DEFUN([AC_LIBTOOL_F77],
3339
[AC_REQUIRE([_LT_AC_LANG_F77])
3345
AC_DEFUN([_LT_AC_LANG_F77],
3346
[AC_REQUIRE([AC_PROG_F77])
3347
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
3353
# enable support for GCJ libraries
3354
AC_DEFUN([AC_LIBTOOL_GCJ],
3355
[AC_REQUIRE([_LT_AC_LANG_GCJ])
3361
AC_DEFUN([_LT_AC_LANG_GCJ],
3362
[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
3363
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
3364
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
3365
[ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
3366
[ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
3367
[AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
3368
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
3374
# enable support for Windows resource files
3375
AC_DEFUN([AC_LIBTOOL_RC],
3376
[AC_REQUIRE([LT_AC_PROG_RC])
3377
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
3381
# AC_LIBTOOL_LANG_C_CONFIG
3382
# ------------------------
3383
# Ensure that the configuration vars for the C compiler are
3384
# suitably defined. Those variables are subsequently used by
3385
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3386
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
3387
AC_DEFUN([_LT_AC_LANG_C_CONFIG],
3391
# Source file extension for C test sources.
3394
# Object file extension for compiled C test sources.
3396
_LT_AC_TAGVAR(objext, $1)=$objext
3398
# Code to be used in simple compile tests
3399
lt_simple_compile_test_code="int some_variable = 0;\n"
3401
# Code to be used in simple link tests
3402
lt_simple_link_test_code='int main(){return(0);}\n'
3407
# Check for any special shared library compilation flags.
3409
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
3410
if test "$GCC" = no; then
3413
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
3417
if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
3418
AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
3419
if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[ ]]" >/dev/null; then :
3421
AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
3422
_LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
3428
# Check to make sure the static flag actually works.
3430
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
3431
_LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
3432
$_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
3434
[_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
3437
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3438
AC_LIBTOOL_PROG_COMPILER_PIC($1)
3439
AC_LIBTOOL_PROG_CC_C_O($1)
3440
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3441
AC_LIBTOOL_PROG_LD_SHLIBS($1)
3442
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3443
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3444
AC_LIBTOOL_SYS_LIB_STRIP
3445
AC_LIBTOOL_DLOPEN_SELF($1)
3447
# Report which librarie types wil actually be built
3448
AC_MSG_CHECKING([if libtool supports shared libraries])
3449
AC_MSG_RESULT([$can_build_shared])
3451
AC_MSG_CHECKING([whether to build shared libraries])
3452
test "$can_build_shared" = "no" && enable_shared=no
3454
# On AIX, shared libraries and static libraries use the same namespace, and
3455
# are all built from PIC.
3458
test "$enable_shared" = yes && enable_static=no
3459
if test -n "$RANLIB"; then
3460
archive_cmds="$archive_cmds~\$RANLIB \$lib"
3461
postinstall_cmds='$RANLIB $lib'
3466
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3467
test "$enable_shared" = yes && enable_static=no
3470
darwin* | rhapsody*)
3471
if test "$GCC" = yes; then
3472
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3474
rhapsody* | darwin1.[[012]])
3475
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
3478
if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3479
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3481
case ${MACOSX_DEPLOYMENT_TARGET} in
3483
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3486
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
3492
output_verbose_link_cmd='echo'
3493
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
3494
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3495
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3496
_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}'
3497
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3498
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3499
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3500
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3501
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
3502
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3504
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3508
AC_MSG_RESULT([$enable_shared])
3510
AC_MSG_CHECKING([whether to build static libraries])
3511
# Make sure either enable_shared or enable_static is yes.
3512
test "$enable_shared" = yes || enable_static=yes
3513
AC_MSG_RESULT([$enable_static])
3515
AC_LIBTOOL_CONFIG($1)
3519
])# AC_LIBTOOL_LANG_C_CONFIG
3522
# AC_LIBTOOL_LANG_CXX_CONFIG
3523
# --------------------------
3524
# Ensure that the configuration vars for the C compiler are
3525
# suitably defined. Those variables are subsequently used by
3526
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3527
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
3528
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
3530
AC_REQUIRE([AC_PROG_CXX])
3531
AC_REQUIRE([AC_PROG_CXXCPP])
3533
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3534
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
3535
_LT_AC_TAGVAR(always_export_symbols, $1)=no
3536
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3537
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3538
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3539
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3540
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3541
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3542
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3543
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
3544
_LT_AC_TAGVAR(module_cmds, $1)=
3545
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
3546
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3547
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3548
_LT_AC_TAGVAR(no_undefined_flag, $1)=
3549
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3550
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3552
# Dependencies to place before and after the object being linked:
3553
_LT_AC_TAGVAR(predep_objects, $1)=
3554
_LT_AC_TAGVAR(postdep_objects, $1)=
3555
_LT_AC_TAGVAR(predeps, $1)=
3556
_LT_AC_TAGVAR(postdeps, $1)=
3557
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
3559
# Source file extension for C++ test sources.
3562
# Object file extension for compiled C++ test sources.
3564
_LT_AC_TAGVAR(objext, $1)=$objext
3566
# Code to be used in simple compile tests
3567
lt_simple_compile_test_code="int some_variable = 0;\n"
3569
# Code to be used in simple link tests
3570
lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
3572
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3575
# Allow CC to be a program name with arguments.
3580
lt_save_with_gnu_ld=$with_gnu_ld
3581
lt_save_path_LD=$lt_cv_path_LD
3582
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
3583
lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
3585
unset lt_cv_prog_gnu_ld
3587
if test -n "${lt_cv_path_LDCXX+set}"; then
3588
lt_cv_path_LD=$lt_cv_path_LDCXX
3592
test -z "${LDCXX+set}" || LD=$LDCXX
3595
_LT_AC_TAGVAR(compiler, $1)=$CC
3596
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
3598
# We don't want -fno-exception wen compiling C++ code, so set the
3599
# no_builtin_flag separately
3600
if test "$GXX" = yes; then
3601
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3603
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3606
if test "$GXX" = yes; then
3607
# Set up default GNU C++ configuration
3611
# Check if GNU C++ uses GNU ld as the underlying linker, since the
3612
# archiving commands below assume that GNU ld is being used.
3613
if test "$with_gnu_ld" = yes; then
3614
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3615
_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'
3617
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3618
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3620
# If archive_cmds runs LD, not CC, wlarc should be empty
3621
# XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
3622
# investigate it a little bit more. (MM)
3625
# ancient GNU ld didn't support --whole-archive et. al.
3626
if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
3627
grep 'no-whole-archive' > /dev/null; then
3628
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3630
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3636
# A generic and very simple default shared library creation
3637
# command for GNU C++ for the case where it uses the native
3638
# linker, instead of GNU ld. If possible, this setting should
3639
# overridden to take advantage of the native linker features on
3640
# the platform it is being used on.
3641
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3644
# Commands to make compiler produce verbose output that lists
3645
# what "hidden" libraries, object files and flags are used when
3646
# linking a shared library.
3647
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3655
# PORTME: fill in a description of your system's C++ link characteristics
3656
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3657
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
3660
# FIXME: insert proper C++ library support
3661
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3664
if test "$host_cpu" = ia64; then
3665
# On IA64, the linker does run time linking by default, so we don't
3666
# have to do anything special.
3667
aix_use_runtimelinking=no
3668
exp_sym_flag='-Bexport'
3671
aix_use_runtimelinking=no
3673
# Test if we are trying to use run time linking or normal
3674
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
3675
# need to do runtime linking.
3676
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
3677
for ld_flag in $LDFLAGS; do
3680
aix_use_runtimelinking=yes
3687
exp_sym_flag='-bexport'
3688
no_entry_flag='-bnoentry'
3691
# When large executables or shared objects are built, AIX ld can
3692
# have problems creating the table of contents. If linking a library
3693
# or program results in "error TOC overflow" add -mminimal-toc to
3694
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
3695
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3697
_LT_AC_TAGVAR(archive_cmds, $1)=''
3698
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3699
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3700
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3702
if test "$GXX" = yes; then
3703
case $host_os in aix4.[012]|aix4.[012].*)
3704
# We only want to do this on AIX 4.2 and lower, the check
3705
# below for broken collect2 doesn't work under 4.3+
3706
collect2name=`${CC} -print-prog-name=collect2`
3707
if test -f "$collect2name" && \
3708
strings "$collect2name" | grep resolve_lib_name >/dev/null
3710
# We have reworked collect2
3711
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3713
# We have old collect2
3714
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3715
# It fails to find uninstalled libraries when the uninstalled
3716
# path is not listed in the libpath. Setting hardcode_minus_L
3717
# to unsupported forces relinking
3718
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3719
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3720
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3723
shared_flag='-shared'
3726
if test "$host_cpu" = ia64; then
3727
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3728
# chokes on -Wl,-G. The following line is correct:
3731
if test "$aix_use_runtimelinking" = yes; then
3732
shared_flag='${wl}-G'
3734
shared_flag='${wl}-bM:SRE'
3739
# It seems that -bexpall does not export symbols beginning with
3740
# underscore (_), so it is better to generate a list of symbols to export.
3741
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
3742
if test "$aix_use_runtimelinking" = yes; then
3743
# Warning - without using the other runtime loading flags (-brtl),
3744
# -berok will link without error, but may produce a broken library.
3745
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3746
# Determine the default libpath from the value encoded in an empty executable.
3747
_LT_AC_SYS_LIBPATH_AIX
3748
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3750
_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"
3752
if test "$host_cpu" = ia64; then
3753
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3754
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3755
_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"
3757
# Determine the default libpath from the value encoded in an empty executable.
3758
_LT_AC_SYS_LIBPATH_AIX
3759
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3760
# Warning - without using the other run time loading flags,
3761
# -berok will link without error, but may produce a broken library.
3762
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3763
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3764
# -bexpall does not export symbols beginning with underscore (_)
3765
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
3766
# Exported symbols can be pulled into shared objects from archives
3767
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
3768
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3769
# This is similar to how AIX traditionally builds it's shared libraries.
3770
_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'
3775
case $cc_basename in
3777
# FIXME: insert proper C++ library support
3778
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3783
cygwin* | mingw* | pw32*)
3784
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3785
# as there is no search path for DLLs.
3786
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3787
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3788
_LT_AC_TAGVAR(always_export_symbols, $1)=no
3789
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3791
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3792
_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'
3793
# If the export-symbols file already is a .def file (1st line
3794
# is EXPORTS), use it as is; otherwise, prepend...
3795
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3796
cp $export_symbols $output_objdir/$soname.def;
3798
echo EXPORTS > $output_objdir/$soname.def;
3799
cat $export_symbols >> $output_objdir/$soname.def;
3801
$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'
3803
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3807
darwin* | rhapsody*)
3808
if test "$GXX" = yes; then
3809
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3811
rhapsody* | darwin1.[[012]])
3812
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
3815
if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3816
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3818
case ${MACOSX_DEPLOYMENT_TARGET} in
3820
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3823
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
3829
lt_int_apple_cc_single_mod=no
3830
output_verbose_link_cmd='echo'
3831
if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
3832
lt_int_apple_cc_single_mod=yes
3834
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3835
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3837
_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'
3839
_LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3841
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3842
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3843
_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}'
3845
_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}'
3847
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3848
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3849
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3850
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3851
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
3852
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3854
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3859
case $cc_basename in
3861
# FIXME: insert proper C++ library support
3862
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3865
# Green Hills C++ Compiler
3866
# FIXME: insert proper C++ library support
3867
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3870
# FIXME: insert proper C++ library support
3871
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3876
# C++ shared libraries reported to be fairly broken before switch to ELF
3877
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3880
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3882
freebsd* | kfreebsd*-gnu)
3883
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3885
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
3890
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3891
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3892
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3893
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3894
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3895
# but as the default
3896
# location of the library.
3898
case $cc_basename in
3900
# FIXME: insert proper C++ library support
3901
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3904
_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'
3905
# Commands to make compiler produce verbose output that lists
3906
# what "hidden" libraries, object files and flags are used when
3907
# linking a shared library.
3909
# There doesn't appear to be a way to prevent this compiler from
3910
# explicitly linking system object files so we need to strip them
3911
# from the output so that they don't get included in the library
3913
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'
3916
if test "$GXX" = yes; then
3917
_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'
3919
# FIXME: insert proper C++ library support
3920
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3926
if test $with_gnu_ld = no; then
3929
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3930
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
3931
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3934
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3937
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3938
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3939
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3945
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3946
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3949
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3950
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3951
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3952
# but as the default
3953
# location of the library.
3956
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3957
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3958
# but as the default
3959
# location of the library.
3963
case $cc_basename in
3965
# FIXME: insert proper C++ library support
3966
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3971
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3974
_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'
3977
# Commands to make compiler produce verbose output that lists
3978
# what "hidden" libraries, object files and flags are used when
3979
# linking a shared library.
3981
# There doesn't appear to be a way to prevent this compiler from
3982
# explicitly linking system object files so we need to strip them
3983
# from the output so that they don't get included in the library
3985
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'
3988
if test "$GXX" = yes; then
3989
if test $with_gnu_ld = no; then
3992
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3995
_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'
4000
# FIXME: insert proper C++ library support
4001
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4007
case $cc_basename in
4010
_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'
4012
# Archives containing C++ object files must be created using
4013
# "CC -ar", where "CC" is the IRIX C++ compiler. This is
4014
# necessary to make sure instantiated templates are included
4016
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
4019
if test "$GXX" = yes; then
4020
if test "$with_gnu_ld" = no; then
4021
_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'
4023
_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'
4026
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4029
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4030
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4033
case $cc_basename in
4035
# Kuck and Associates, Inc. (KAI) C++ Compiler
4037
# KCC will only create a shared library if the output file
4038
# ends with ".so" (or ".sl" for HP-UX), so rename the library
4039
# to its proper name (with version) after linking.
4040
_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'
4041
_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'
4042
# Commands to make compiler produce verbose output that lists
4043
# what "hidden" libraries, object files and flags are used when
4044
# linking a shared library.
4046
# There doesn't appear to be a way to prevent this compiler from
4047
# explicitly linking system object files so we need to strip them
4048
# from the output so that they don't get included in the library
4050
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'
4052
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
4053
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4055
# Archives containing C++ object files must be created using
4056
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
4057
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4062
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4063
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4064
_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'
4065
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4066
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4067
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
4071
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4072
_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'
4074
runpath_var=LD_RUN_PATH
4075
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4076
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4078
# Commands to make compiler produce verbose output that lists
4079
# what "hidden" libraries, object files and flags are used when
4080
# linking a shared library.
4082
# There doesn't appear to be a way to prevent this compiler from
4083
# explicitly linking system object files so we need to strip them
4084
# from the output so that they don't get included in the library
4086
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'
4091
# FIXME: insert proper C++ library support
4092
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4095
# FIXME: insert proper C++ library support
4096
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4099
case $cc_basename in
4101
# FIXME: insert proper C++ library support
4102
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4105
# FIXME: insert proper C++ library support
4106
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4111
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4112
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
4114
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4115
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4116
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4118
# Workaround some broken pre-1.5 toolchains
4119
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
4122
case $cc_basename in
4124
# Kuck and Associates, Inc. (KAI) C++ Compiler
4126
# KCC will only create a shared library if the output file
4127
# ends with ".so" (or ".sl" for HP-UX), so rename the library
4128
# to its proper name (with version) after linking.
4129
_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'
4131
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4132
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4134
# Archives containing C++ object files must be created using
4135
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
4136
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4140
# Rational C++ 2.4.1
4141
# FIXME: insert proper C++ library support
4142
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4145
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4146
_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'
4148
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4149
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4151
# Commands to make compiler produce verbose output that lists
4152
# what "hidden" libraries, object files and flags are used when
4153
# linking a shared library.
4155
# There doesn't appear to be a way to prevent this compiler from
4156
# explicitly linking system object files so we need to strip them
4157
# from the output so that they don't get included in the library
4159
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'
4162
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4163
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4164
_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'
4166
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4167
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4169
# Commands to make compiler produce verbose output that lists
4170
# what "hidden" libraries, object files and flags are used when
4171
# linking a shared library.
4172
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4175
# FIXME: insert proper C++ library support
4176
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4182
case $cc_basename in
4184
# Kuck and Associates, Inc. (KAI) C++ Compiler
4186
# KCC will only create a shared library if the output file
4187
# ends with ".so" (or ".sl" for HP-UX), so rename the library
4188
# to its proper name (with version) after linking.
4189
_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'
4191
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4192
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4194
# Archives containing C++ object files must be created using
4195
# the KAI C++ compiler.
4196
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
4199
# Rational C++ 2.4.1
4200
# FIXME: insert proper C++ library support
4201
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4204
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4205
_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'
4206
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
4207
echo "-hidden">> $lib.exp~
4208
$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~
4211
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4212
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4214
# Commands to make compiler produce verbose output that lists
4215
# what "hidden" libraries, object files and flags are used when
4216
# linking a shared library.
4218
# There doesn't appear to be a way to prevent this compiler from
4219
# explicitly linking system object files so we need to strip them
4220
# from the output so that they don't get included in the library
4222
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'
4225
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4226
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4227
_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'
4229
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4230
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4232
# Commands to make compiler produce verbose output that lists
4233
# what "hidden" libraries, object files and flags are used when
4234
# linking a shared library.
4235
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4238
# FIXME: insert proper C++ library support
4239
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4245
# FIXME: insert proper C++ library support
4246
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4249
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4250
case $cc_basename in
4252
# FIXME: insert proper C++ library support
4253
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4256
# FIXME: insert proper C++ library support
4257
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4262
case $cc_basename in
4265
# FIXME: insert proper C++ library support
4266
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4270
# FIXME: insert proper C++ library support
4271
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4274
# FIXME: insert proper C++ library support
4275
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4280
case $cc_basename in
4282
# Sun C++ 4.2, 5.x and Centerline C++
4283
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
4284
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4285
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4286
$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'
4288
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4289
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4291
solaris2.[0-5] | solaris2.[0-5].*) ;;
4293
# The C++ compiler is used as linker so we must use $wl
4294
# flag to pass the commands to the underlying system
4296
# Supported since Solaris 2.6 (maybe 2.5.1?)
4297
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
4300
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4302
# Commands to make compiler produce verbose output that lists
4303
# what "hidden" libraries, object files and flags are used when
4304
# linking a shared library.
4306
# There doesn't appear to be a way to prevent this compiler from
4307
# explicitly linking system object files so we need to strip them
4308
# from the output so that they don't get included in the library
4310
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'
4312
# Archives containing C++ object files must be created using
4313
# "CC -xar", where "CC" is the Sun C++ compiler. This is
4314
# necessary to make sure instantiated templates are included
4316
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
4319
# Green Hills C++ Compiler
4320
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4322
# The C++ compiler must be used to create the archive.
4323
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
4326
# GNU C++ compiler with Solaris linker
4327
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4328
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
4329
if $CC --version | grep -v '^2\.7' > /dev/null; then
4330
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4331
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4332
$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4334
# Commands to make compiler produce verbose output that lists
4335
# what "hidden" libraries, object files and flags are used when
4336
# linking a shared library.
4337
output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4339
# g++ 2.7 appears to require `-G' NOT `-shared' on this
4341
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4342
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4343
$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4345
# Commands to make compiler produce verbose output that lists
4346
# what "hidden" libraries, object files and flags are used when
4347
# linking a shared library.
4348
output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4351
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
4356
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
4357
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4360
case $cc_basename in
4362
# NonStop-UX NCC 3.20
4363
# FIXME: insert proper C++ library support
4364
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4367
# FIXME: insert proper C++ library support
4368
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4373
# FIXME: insert proper C++ library support
4374
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4377
# FIXME: insert proper C++ library support
4378
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4381
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
4382
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4384
_LT_AC_TAGVAR(GCC, $1)="$GXX"
4385
_LT_AC_TAGVAR(LD, $1)="$LD"
4387
AC_LIBTOOL_POSTDEP_PREDEP($1)
4388
AC_LIBTOOL_PROG_COMPILER_PIC($1)
4389
AC_LIBTOOL_PROG_CC_C_O($1)
4390
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4391
AC_LIBTOOL_PROG_LD_SHLIBS($1)
4392
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4393
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4394
AC_LIBTOOL_SYS_LIB_STRIP
4395
AC_LIBTOOL_DLOPEN_SELF($1)
4397
AC_LIBTOOL_CONFIG($1)
4404
with_gnu_ldcxx=$with_gnu_ld
4405
with_gnu_ld=$lt_save_with_gnu_ld
4406
lt_cv_path_LDCXX=$lt_cv_path_LD
4407
lt_cv_path_LD=$lt_save_path_LD
4408
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
4409
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
4410
])# AC_LIBTOOL_LANG_CXX_CONFIG
4412
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
4413
# ------------------------
4414
# Figure out "hidden" library dependencies from verbose
4415
# compiler output when linking a shared library.
4416
# Parse the compiler output and extract the necessary
4417
# objects, libraries and library flags.
4418
AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
4419
dnl we can't use the lt_simple_compile_test_code here,
4420
dnl because it contains code intended for an executable,
4421
dnl not a library. It's possible we should let each
4422
dnl tag define a new lt_????_link_test_code variable,
4423
dnl but it's only used here...
4424
ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
4426
void foo (void) { a = 0; }
4428
],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
4432
Foo (void) { a = 0; }
4437
],[$1],[F77],[cat > conftest.$ac_ext <<EOF
4445
],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
4448
public void bar (void) {
4454
dnl Parse the compiler output and extract the necessary
4455
dnl objects, libraries and library flags.
4456
if AC_TRY_EVAL(ac_compile); then
4457
# Parse the compiler output and extract the necessary
4458
# objects, libraries and library flags.
4460
# Sentinel used to keep track of whether or not we are before
4461
# the conftest object file.
4462
pre_test_object_deps_done=no
4464
# The `*' in the case matches for architectures that use `case' in
4465
# $output_verbose_cmd can trigger glob expansion during the loop
4466
# eval without this substitution.
4467
output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
4469
for p in `eval $output_verbose_link_cmd`; do
4473
# Some compilers place space between "-{L,R}" and the path.
4476
|| test $p = "-R"; then
4483
if test "$pre_test_object_deps_done" = no; then
4486
# Internal compiler library paths should come after those
4487
# provided the user. The postdeps already come after the
4488
# user supplied libs so there is no need to process them.
4489
if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
4490
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
4492
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
4495
# The "-l" case would never come before the object being
4496
# linked, so don't bother handling this case.
4499
if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
4500
_LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
4502
_LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
4508
# This assumes that the test object file only shows up
4509
# once in the compiler output.
4510
if test "$p" = "conftest.$objext"; then
4511
pre_test_object_deps_done=yes
4515
if test "$pre_test_object_deps_done" = no; then
4516
if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
4517
_LT_AC_TAGVAR(predep_objects, $1)="$p"
4519
_LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
4522
if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
4523
_LT_AC_TAGVAR(postdep_objects, $1)="$p"
4525
_LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
4530
*) ;; # Ignore the rest.
4538
echo "libtool.m4: error: problem compiling $1 test program"
4541
$rm -f confest.$objext
4543
case " $_LT_AC_TAGVAR(postdeps, $1) " in
4544
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
4546
])# AC_LIBTOOL_POSTDEP_PREDEP
4548
# AC_LIBTOOL_LANG_F77_CONFIG
4549
# ------------------------
4550
# Ensure that the configuration vars for the C compiler are
4551
# suitably defined. Those variables are subsequently used by
4552
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4553
AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
4554
AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
4555
[AC_REQUIRE([AC_PROG_F77])
4556
AC_LANG_PUSH(Fortran 77)
4558
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4559
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
4560
_LT_AC_TAGVAR(always_export_symbols, $1)=no
4561
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4562
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4563
_LT_AC_TAGVAR(hardcode_direct, $1)=no
4564
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4565
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4566
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4567
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4568
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
4569
_LT_AC_TAGVAR(module_cmds, $1)=
4570
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
4571
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4572
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4573
_LT_AC_TAGVAR(no_undefined_flag, $1)=
4574
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4575
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4577
# Source file extension for f77 test sources.
4580
# Object file extension for compiled f77 test sources.
4582
_LT_AC_TAGVAR(objext, $1)=$objext
4584
# Code to be used in simple compile tests
4585
lt_simple_compile_test_code=" subroutine t\n return\n end\n"
4587
# Code to be used in simple link tests
4588
lt_simple_link_test_code=" program t\n end\n"
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
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
4600
AC_MSG_CHECKING([if libtool supports shared libraries])
4601
AC_MSG_RESULT([$can_build_shared])
4603
AC_MSG_CHECKING([whether to build shared libraries])
4604
test "$can_build_shared" = "no" && enable_shared=no
4606
# On AIX, shared libraries and static libraries use the same namespace, and
4607
# are all built from PIC.
4610
test "$enable_shared" = yes && enable_static=no
4611
if test -n "$RANLIB"; then
4612
archive_cmds="$archive_cmds~\$RANLIB \$lib"
4613
postinstall_cmds='$RANLIB $lib'
4617
test "$enable_shared" = yes && enable_static=no
4620
AC_MSG_RESULT([$enable_shared])
4622
AC_MSG_CHECKING([whether to build static libraries])
4623
# Make sure either enable_shared or enable_static is yes.
4624
test "$enable_shared" = yes || enable_static=yes
4625
AC_MSG_RESULT([$enable_static])
4627
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4629
_LT_AC_TAGVAR(GCC, $1)="$G77"
4630
_LT_AC_TAGVAR(LD, $1)="$LD"
4632
AC_LIBTOOL_PROG_COMPILER_PIC($1)
4633
AC_LIBTOOL_PROG_CC_C_O($1)
4634
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4635
AC_LIBTOOL_PROG_LD_SHLIBS($1)
4636
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4637
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4638
AC_LIBTOOL_SYS_LIB_STRIP
4641
AC_LIBTOOL_CONFIG($1)
4645
])# AC_LIBTOOL_LANG_F77_CONFIG
4648
# AC_LIBTOOL_LANG_GCJ_CONFIG
4649
# --------------------------
4650
# Ensure that the configuration vars for the C compiler are
4651
# suitably defined. Those variables are subsequently used by
4652
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4653
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
4654
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
4657
# Source file extension for Java test sources.
4660
# Object file extension for compiled Java test sources.
4662
_LT_AC_TAGVAR(objext, $1)=$objext
4664
# Code to be used in simple compile tests
4665
lt_simple_compile_test_code="class foo {}\n"
4667
# Code to be used in simple link tests
4668
lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
4670
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4673
# Allow CC to be a program name with arguments.
4677
_LT_AC_TAGVAR(compiler, $1)=$CC
4679
# GCJ did not exist at the time GCC didn't implicitly link libc in.
4680
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4682
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4683
AC_LIBTOOL_PROG_COMPILER_PIC($1)
4684
AC_LIBTOOL_PROG_CC_C_O($1)
4685
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4686
AC_LIBTOOL_PROG_LD_SHLIBS($1)
4687
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4688
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4689
AC_LIBTOOL_SYS_LIB_STRIP
4690
AC_LIBTOOL_DLOPEN_SELF($1)
4692
AC_LIBTOOL_CONFIG($1)
4696
])# AC_LIBTOOL_LANG_GCJ_CONFIG
4699
# AC_LIBTOOL_LANG_RC_CONFIG
4700
# --------------------------
4701
# Ensure that the configuration vars for the Windows resource compiler are
4702
# suitably defined. Those variables are subsequently used by
4703
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4704
AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4705
AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4708
# Source file extension for RC test sources.
4711
# Object file extension for compiled RC test sources.
4713
_LT_AC_TAGVAR(objext, $1)=$objext
4715
# Code to be used in simple compile tests
4716
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
4718
# Code to be used in simple link tests
4719
lt_simple_link_test_code="$lt_simple_compile_test_code"
4721
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4724
# Allow CC to be a program name with arguments.
4728
_LT_AC_TAGVAR(compiler, $1)=$CC
4729
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4731
AC_LIBTOOL_CONFIG($1)
4735
])# AC_LIBTOOL_LANG_RC_CONFIG
4738
# AC_LIBTOOL_CONFIG([TAGNAME])
4739
# ----------------------------
4740
# If TAGNAME is not passed, then create an initial libtool script
4741
# with a default configuration from the untagged config vars. Otherwise
4742
# add code to config.status for appending the configuration named by
4743
# TAGNAME from the matching tagged config vars.
4744
AC_DEFUN([AC_LIBTOOL_CONFIG],
4745
[# The else clause should only fire when bootstrapping the
4746
# libtool distribution, otherwise you forgot to ship ltmain.sh
4747
# with your package, and you will get complaints that there are
4748
# no rules to generate ltmain.sh.
4749
if test -f "$ltmain"; then
4750
# See if we are running on zsh, and set the options which allow our commands through
4751
# without removal of \ escapes.
4752
if test -n "${ZSH_VERSION+set}" ; then
4753
setopt NO_GLOB_SUBST
4755
# Now quote all the things that may contain metacharacters while being
4756
# careful not to overquote the AC_SUBSTed values. We take copies of the
4757
# variables and quote the copies for generation of the libtool script.
4758
for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL \
4759
libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4760
old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4761
deplibs_check_method reload_flag reload_cmds need_locks \
4762
lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4763
lt_cv_sys_global_symbol_to_c_name_address \
4764
sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4765
old_postinstall_cmds old_postuninstall_cmds \
4766
_LT_AC_TAGVAR(compiler, $1) \
4767
_LT_AC_TAGVAR(CC, $1) \
4768
_LT_AC_TAGVAR(LD, $1) \
4769
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4770
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4771
_LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4772
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4773
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4774
_LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4775
_LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4776
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4777
_LT_AC_TAGVAR(old_archive_cmds, $1) \
4778
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4779
_LT_AC_TAGVAR(predep_objects, $1) \
4780
_LT_AC_TAGVAR(postdep_objects, $1) \
4781
_LT_AC_TAGVAR(predeps, $1) \
4782
_LT_AC_TAGVAR(postdeps, $1) \
4783
_LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4784
_LT_AC_TAGVAR(archive_cmds, $1) \
4785
_LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4786
_LT_AC_TAGVAR(postinstall_cmds, $1) \
4787
_LT_AC_TAGVAR(postuninstall_cmds, $1) \
4788
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4789
_LT_AC_TAGVAR(allow_undefined_flag, $1) \
4790
_LT_AC_TAGVAR(no_undefined_flag, $1) \
4791
_LT_AC_TAGVAR(export_symbols_cmds, $1) \
4792
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4793
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4794
_LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4795
_LT_AC_TAGVAR(hardcode_automatic, $1) \
4796
_LT_AC_TAGVAR(module_cmds, $1) \
4797
_LT_AC_TAGVAR(module_expsym_cmds, $1) \
4798
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4799
_LT_AC_TAGVAR(exclude_expsyms, $1) \
4800
_LT_AC_TAGVAR(include_expsyms, $1); do
4803
_LT_AC_TAGVAR(old_archive_cmds, $1) | \
4804
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4805
_LT_AC_TAGVAR(archive_cmds, $1) | \
4806
_LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4807
_LT_AC_TAGVAR(module_cmds, $1) | \
4808
_LT_AC_TAGVAR(module_expsym_cmds, $1) | \
4809
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4810
_LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4811
extract_expsyms_cmds | reload_cmds | finish_cmds | \
4812
postinstall_cmds | postuninstall_cmds | \
4813
old_postinstall_cmds | old_postuninstall_cmds | \
4814
sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4815
# Double-quote double-evaled strings.
4816
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4819
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4825
*'\[$]0 --fallback-echo"')
4826
lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
4831
[cfgfile="${ofile}T"
4832
trap "$rm \"$cfgfile\"; exit 1" 1 2 15
4834
AC_MSG_NOTICE([creating $ofile])],
4837
cat <<__EOF__ >> "$cfgfile"
4841
# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
4842
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4843
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
4845
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
4846
# Free Software Foundation, Inc.
4848
# This file is part of GNU Libtool:
4849
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4851
# This program is free software; you can redistribute it and/or modify
4852
# it under the terms of the GNU General Public License as published by
4853
# the Free Software Foundation; either version 2 of the License, or
4854
# (at your option) any later version.
4856
# This program is distributed in the hope that it will be useful, but
4857
# WITHOUT ANY WARRANTY; without even the implied warranty of
4858
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4859
# General Public License for more details.
4861
# You should have received a copy of the GNU General Public License
4862
# along with this program; if not, write to the Free Software
4863
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
4865
# As a special exception to the GNU General Public License, if you
4866
# distribute this file as part of a program that contains a
4867
# configuration script generated by Autoconf, you may include it under
4868
# the same distribution terms that you use for the rest of that program.
4870
# A sed program that does not truncate output.
4873
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
4874
Xsed="$SED -e s/^X//"
4876
# The HP-UX ksh and POSIX shell print the target directory to stdout
4878
if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
4880
# The names of the tagged configurations supported by this script.
4883
# ### BEGIN LIBTOOL CONFIG],
4884
[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
4886
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4888
# Shell to use when invoking shell scripts.
4891
# Whether or not to build shared libraries.
4892
build_libtool_libs=$enable_shared
4894
# Whether or not to build static libraries.
4895
build_old_libs=$enable_static
4897
# Whether or not to add -lc for building shared libraries.
4898
build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
4900
# Whether or not to disallow shared libs when runtime libs are static
4901
allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
4903
# Whether or not to optimize for fast installation.
4904
fast_install=$enable_fast_install
4907
host_alias=$host_alias
4910
# An echo program that does not interpret backslashes.
4915
AR_FLAGS=$lt_AR_FLAGS
4920
# A language-specific compiler.
4921
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
4923
# Is the compiler the GNU C compiler?
4924
with_gcc=$_LT_AC_TAGVAR(GCC, $1)
4929
# The linker used to build libraries.
4930
LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
4932
# Whether we need hard or soft links.
4935
# A BSD-compatible nm program.
4938
# A symbol stripping program
4941
# Used to examine libraries when file_magic_cmd begins "file"
4942
MAGIC_CMD=$MAGIC_CMD
4944
# Used on cygwin: DLL creation program.
4947
# Used on cygwin: object dumper.
4950
# Used on cygwin: assembler.
4953
# The name of the directory that contains temporary libtool files.
4956
# How to create reloadable object files.
4957
reload_flag=$lt_reload_flag
4958
reload_cmds=$lt_reload_cmds
4960
# How to pass a linker flag through the compiler.
4961
wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
4963
# Object file suffix (normally "o").
4966
# Old archive suffix (normally "a").
4969
# Shared library suffix (normally ".so").
4972
# Executable file suffix (normally "").
4975
# Additional compiler flags for building library objects.
4976
pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
4979
# What is the maximum length of a command?
4980
max_cmd_len=$lt_cv_sys_max_cmd_len
4982
# Does compiler simultaneously support -c and -o options?
4983
compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
4985
# Must we lock files when doing compilation ?
4986
need_locks=$lt_need_locks
4988
# Do we need the lib prefix for modules?
4989
need_lib_prefix=$need_lib_prefix
4991
# Do we need a version for libraries?
4992
need_version=$need_version
4994
# Whether dlopen is supported.
4995
dlopen_support=$enable_dlopen
4997
# Whether dlopen of programs is supported.
4998
dlopen_self=$enable_dlopen_self
5000
# Whether dlopen of statically linked programs is supported.
5001
dlopen_self_static=$enable_dlopen_self_static
5003
# Compiler flag to prevent dynamic linking.
5004
link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
5006
# Compiler flag to turn off builtin functions.
5007
no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
5009
# Compiler flag to allow reflexive dlopens.
5010
export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
5012
# Compiler flag to generate shared objects directly from archives.
5013
whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
5015
# Compiler flag to generate thread-safe objects.
5016
thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
5018
# Library versioning type.
5019
version_type=$version_type
5021
# Format of library name prefix.
5022
libname_spec=$lt_libname_spec
5024
# List of archive names. First name is the real one, the rest are links.
5025
# The last name is the one that the linker finds with -lNAME.
5026
library_names_spec=$lt_library_names_spec
5028
# The coded name of the library, if different from the real name.
5029
soname_spec=$lt_soname_spec
5031
# Commands used to build and install an old-style archive.
5033
old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
5034
old_postinstall_cmds=$lt_old_postinstall_cmds
5035
old_postuninstall_cmds=$lt_old_postuninstall_cmds
5037
# Create an old-style archive from a shared archive.
5038
old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
5040
# Create a temporary old-style archive to link instead of a shared archive.
5041
old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
5043
# Commands used to build and install a shared archive.
5044
archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
5045
archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
5046
postinstall_cmds=$lt_postinstall_cmds
5047
postuninstall_cmds=$lt_postuninstall_cmds
5049
# Commands used to build a loadable module (assumed same as above if empty)
5050
module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
5051
module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
5053
# Commands to strip libraries.
5054
old_striplib=$lt_old_striplib
5055
striplib=$lt_striplib
5057
# Dependencies to place before the objects being linked to create a
5059
predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
5061
# Dependencies to place after the objects being linked to create a
5063
postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
5065
# Dependencies to place before the objects being linked to create a
5067
predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
5069
# Dependencies to place after the objects being linked to create a
5071
postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
5073
# The library search path used internally by the compiler when linking
5075
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
5077
# Method to check whether dependent libraries are shared objects.
5078
deplibs_check_method=$lt_deplibs_check_method
5080
# Command to use when deplibs_check_method == file_magic.
5081
file_magic_cmd=$lt_file_magic_cmd
5083
# Flag that allows shared libraries with undefined symbols to be built.
5084
allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
5086
# Flag that forces no undefined symbols.
5087
no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
5089
# Commands used to finish a libtool library installation in a directory.
5090
finish_cmds=$lt_finish_cmds
5092
# Same as above, but a single script fragment to be evaled but not shown.
5093
finish_eval=$lt_finish_eval
5095
# Take the output of nm and produce a listing of raw symbols and C names.
5096
global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
5098
# Transform the output of nm in a proper C declaration
5099
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
5101
# Transform the output of nm in a C name address pair
5102
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
5104
# This is the shared library runtime path variable.
5105
runpath_var=$runpath_var
5107
# This is the shared library path variable.
5108
shlibpath_var=$shlibpath_var
5110
# Is shlibpath searched before the hard-coded library search path?
5111
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
5113
# How to hardcode a shared library path into an executable.
5114
hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
5116
# Whether we should hardcode library paths into libraries.
5117
hardcode_into_libs=$hardcode_into_libs
5119
# Flag to hardcode \$libdir into a binary during linking.
5120
# This must work even if \$libdir does not exist.
5121
hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
5123
# If ld is used when linking, flag to hardcode \$libdir into
5124
# a binary during linking. This must work even if \$libdir does
5126
hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
5128
# Whether we need a single -rpath flag with a separated argument.
5129
hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
5131
# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
5133
hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
5135
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
5137
hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
5139
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
5140
# the resulting binary.
5141
hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
5143
# Set to yes if building a shared library automatically hardcodes DIR into the library
5144
# and all subsequent libraries and executables linked against it.
5145
hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
5147
# Variables whose values should be saved in libtool wrapper scripts and
5148
# restored at relink time.
5149
variables_saved_for_relink="$variables_saved_for_relink"
5151
# Whether libtool must link a program against all its dependency libraries.
5152
link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
5154
# Compile-time system search path for libraries
5155
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
5157
# Run-time system search path for libraries
5158
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
5160
# Fix the shell variable \$srcfile for the compiler.
5161
fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
5163
# Set to yes if exported symbols are required.
5164
always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
5166
# The commands to list exported symbols.
5167
export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
5169
# The commands to extract the exported symbol list from a shared archive.
5170
extract_expsyms_cmds=$lt_extract_expsyms_cmds
5172
# Symbols that should not be listed in the preloaded symbols.
5173
exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
5175
# Symbols that must always be exported.
5176
include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
5179
[# ### END LIBTOOL CONFIG],
5180
[# ### END LIBTOOL TAG CONFIG: $tagname])
5187
cat <<\EOF >> "$cfgfile"
5189
# AIX sometimes has problems with the GCC collect2 program. For some
5190
# reason, if we set the COLLECT_NAMES environment variable, the problems
5191
# vanish in a puff of smoke.
5192
if test "X${COLLECT_NAMES+set}" != Xset; then
5194
export COLLECT_NAMES
5200
# We use sed instead of cat because bash on DJGPP gets confused if
5201
# if finds mixed CR/LF and LF-only lines. Since sed operates in
5202
# text mode, it properly converts lines to CR/LF. This bash problem
5203
# is reportedly fixed, but why not run on old versions too?
5204
sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
5206
mv -f "$cfgfile" "$ofile" || \
5207
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
5211
# If there is no Makefile yet, we rely on a make rule to execute
5212
# `config.status --recheck' to rerun these tests and create the
5213
# libtool script then.
5214
test -f Makefile && make "$ltmain"
5216
])# AC_LIBTOOL_CONFIG
5219
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
5220
# -------------------------------------------
5221
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
5222
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
5224
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5226
if test "$GCC" = yes; then
5227
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5229
AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5230
lt_cv_prog_compiler_rtti_exceptions,
5231
[-fno-rtti -fno-exceptions], [],
5232
[_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5234
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
5237
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5238
# ---------------------------------
5239
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
5240
[AC_REQUIRE([AC_CANONICAL_HOST])
5241
AC_REQUIRE([AC_PROG_NM])
5242
AC_REQUIRE([AC_OBJEXT])
5243
# Check for command to grab the raw symbol name followed by C symbol from nm.
5244
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
5245
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5247
# These are sane defaults that work on at least a few old systems.
5248
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
5250
# Character class describing NM global symbol codes.
5251
symcode='[[BCDEGRST]]'
5253
# Regexp to match symbols that can be accessed directly from C.
5254
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5256
# Transform the above into a raw symbol and a C symbol.
5257
symxfrm='\1 \2\3 \3'
5259
# Transform an extracted symbol line into a proper C declaration
5260
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
5262
# Transform an extracted symbol line into symbol name and symbol address
5263
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'"
5265
# Define system-specific variables.
5270
cygwin* | mingw* | pw32*)
5271
symcode='[[ABCDGISTW]]'
5273
hpux*) # Its linker distinguishes data from code symbols
5274
if test "$host_cpu" = ia64; then
5275
symcode='[[ABCDEGRST]]'
5277
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5278
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'"
5281
symcode='[[BCDEGRST]]'
5284
symcode='[[BCDEGQRST]]'
5290
symcode='[[DFNSTU]]'
5294
# Handle CRLF in mingw tool chain
5298
opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5302
# If we're using GNU nm, then use its standard symbol codes.
5303
case `$NM -V 2>&1` in
5304
*GNU* | *'with BFD'*)
5305
symcode='[[ABCDGIRSTW]]' ;;
5308
# Try without a prefix undercore, then with it.
5309
for ac_symprfx in "" "_"; do
5311
# Write the raw and C identifiers.
5312
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
5314
# Check to see that the pipe works correctly.
5318
cat > conftest.$ac_ext <<EOF
5323
void nm_test_func(){}
5327
int main(){nm_test_var='a';nm_test_func();return(0);}
5330
if AC_TRY_EVAL(ac_compile); then
5331
# Now try to grab the symbols.
5333
if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
5334
# Try sorting and uniquifying the output.
5335
if sort "$nlist" | uniq > "$nlist"T; then
5336
mv -f "$nlist"T "$nlist"
5341
# Make sure that we snagged all the symbols we need.
5342
if grep ' nm_test_var$' "$nlist" >/dev/null; then
5343
if grep ' nm_test_func$' "$nlist" >/dev/null; then
5344
cat <<EOF > conftest.$ac_ext
5350
# Now generate the symbol file.
5351
eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
5353
cat <<EOF >> conftest.$ac_ext
5354
#if defined (__STDC__) && __STDC__
5355
# define lt_ptr_t void *
5357
# define lt_ptr_t char *
5361
/* The mapping between symbol names and symbols. */
5366
lt_preloaded_symbols[[]] =
5369
$SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
5370
cat <<\EOF >> conftest.$ac_ext
5378
# Now try linking the two files.
5379
mv conftest.$ac_objext conftstm.$ac_objext
5380
lt_save_LIBS="$LIBS"
5381
lt_save_CFLAGS="$CFLAGS"
5382
LIBS="conftstm.$ac_objext"
5383
CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5384
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5387
LIBS="$lt_save_LIBS"
5388
CFLAGS="$lt_save_CFLAGS"
5390
echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5393
echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5396
echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5399
echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5400
cat conftest.$ac_ext >&5
5402
rm -f conftest* conftst*
5404
# Do not use the global_symbol_pipe unless it works.
5405
if test "$pipe_works" = yes; then
5408
lt_cv_sys_global_symbol_pipe=
5412
if test -z "$lt_cv_sys_global_symbol_pipe"; then
5413
lt_cv_sys_global_symbol_to_cdecl=
5415
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5416
AC_MSG_RESULT(failed)
5420
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5423
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
5424
# ---------------------------------------
5425
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
5426
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
5427
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5428
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
5430
AC_MSG_CHECKING([for $compiler option to produce PIC])
5432
# C++ specific cases for pic, static, wl, etc.
5433
if test "$GXX" = yes; then
5434
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5435
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5439
# All AIX code is PIC.
5440
if test "$host_cpu" = ia64; then
5441
# AIX 5 now supports IA64 processor
5442
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5446
# FIXME: we need at least 68020 code to build shared libraries, but
5447
# adding the `-m68020' flag to GCC prevents building anything better,
5449
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5451
beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5452
# PIC is the default for these OSes.
5454
mingw* | os2* | pw32*)
5455
# This hack is so that the source file can tell whether it is being
5456
# built for inclusion in a dll (and should export symbols for example).
5457
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5459
darwin* | rhapsody*)
5460
# PIC is the default on this platform
5461
# Common symbols not allowed in MH_DYLIB files
5462
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5465
# DJGPP does not support shared libraries at all
5466
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5469
if test -d /usr/nec; then
5470
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5474
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5480
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5485
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5491
# All AIX code is PIC.
5492
if test "$host_cpu" = ia64; then
5493
# AIX 5 now supports IA64 processor
5494
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5496
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5500
case $cc_basename in
5502
# Green Hills C++ Compiler
5503
# _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"
5508
case $cc_basename in
5510
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5513
# Green Hills C++ Compiler
5514
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5520
freebsd* | kfreebsd*-gnu)
5521
# FreeBSD uses GNU C++
5523
hpux9* | hpux10* | hpux11*)
5524
case $cc_basename in
5526
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5527
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
5528
if test "$host_cpu" != ia64; then
5529
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5533
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5534
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
5540
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5548
irix5* | irix6* | nonstopux*)
5549
case $cc_basename in
5551
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5552
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5553
# CC pic flag -KPIC is the default.
5560
case $cc_basename in
5563
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5564
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5568
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5569
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5570
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5574
# Make sure the PIC flag is empty. It appears that all Alpha
5575
# Linux and Compaq Tru64 Unix objects are PIC.
5576
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5577
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5588
case $cc_basename in
5590
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5598
osf3* | osf4* | osf5*)
5599
case $cc_basename in
5601
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5604
# Rational C++ 2.4.1
5605
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5608
# Digital/Compaq C++
5609
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5610
# Make sure the PIC flag is empty. It appears that all Alpha
5611
# Linux and Compaq Tru64 Unix objects are PIC.
5612
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5613
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5622
case $cc_basename in
5624
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5631
case $cc_basename in
5633
# Sun C++ 4.2, 5.x and Centerline C++
5634
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5635
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5636
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5639
# Green Hills C++ Compiler
5640
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5647
case $cc_basename in
5650
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5651
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5655
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5662
case $cc_basename in
5664
# NonStop-UX NCC 3.20
5665
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5676
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5682
if test "$GCC" = yes; then
5683
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5684
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5688
# All AIX code is PIC.
5689
if test "$host_cpu" = ia64; then
5690
# AIX 5 now supports IA64 processor
5691
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5696
# FIXME: we need at least 68020 code to build shared libraries, but
5697
# adding the `-m68020' flag to GCC prevents building anything better,
5699
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5702
beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5703
# PIC is the default for these OSes.
5706
mingw* | pw32* | os2*)
5707
# This hack is so that the source file can tell whether it is being
5708
# built for inclusion in a dll (and should export symbols for example).
5709
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5712
darwin* | rhapsody*)
5713
# PIC is the default on this platform
5714
# Common symbols not allowed in MH_DYLIB files
5715
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5719
# Just because we use GCC doesn't mean we suddenly get shared libraries
5720
# on systems that don't support them.
5721
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5726
if test -d /usr/nec; then
5727
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5732
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5739
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5745
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5749
# PORTME Check for flag to pass linker flags through the system compiler.
5752
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5753
if test "$host_cpu" = ia64; then
5754
# AIX 5 now supports IA64 processor
5755
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5757
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5761
mingw* | pw32* | os2*)
5762
# This hack is so that the source file can tell whether it is being
5763
# built for inclusion in a dll (and should export symbols for example).
5764
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5767
hpux9* | hpux10* | hpux11*)
5768
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5769
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5776
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5779
# Is there a better lt_prog_compiler_static that works with the bundled CC?
5780
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5783
irix5* | irix6* | nonstopux*)
5784
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5785
# PIC (with -KPIC) is the default.
5786
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5790
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5791
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5797
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5798
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5799
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5802
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5803
# All Alpha code is PIC.
5804
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5809
osf3* | osf4* | osf5*)
5810
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5811
# All OSF/1 code is PIC.
5812
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5816
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
5817
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
5821
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5822
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5823
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5827
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5828
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5829
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5832
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5833
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5834
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5835
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5839
if test -d /usr/nec ;then
5840
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5841
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5846
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5847
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5851
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5856
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
5859
# Check to make sure the PIC flag actually works.
5861
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
5862
AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5863
_LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
5864
[$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
5865
[case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
5867
*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5869
[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5870
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5873
# For platforms which do not support PIC, -DPIC is meaningless:
5875
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5878
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
5884
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
5885
# ------------------------------------
5886
# See if the linker supports building shared libraries.
5887
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
5888
[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5890
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5893
# If we're using GNU nm, then we don't want the "-C" option.
5894
# -C means demangle to AIX nm, but means don't demangle with GNU nm
5895
if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5896
_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'
5898
_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'
5902
_LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5905
_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'
5908
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5913
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
5914
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5915
_LT_AC_TAGVAR(archive_cmds, $1)=
5916
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5917
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
5918
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5919
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5920
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5921
_LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
5922
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5923
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5924
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5925
_LT_AC_TAGVAR(hardcode_direct, $1)=no
5926
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5927
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5928
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5929
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
5930
_LT_AC_TAGVAR(module_cmds, $1)=
5931
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
5932
_LT_AC_TAGVAR(always_export_symbols, $1)=no
5933
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5934
# include_expsyms should be a list of space-separated symbols to be *always*
5935
# included in the symbol list
5936
_LT_AC_TAGVAR(include_expsyms, $1)=
5937
# exclude_expsyms can be an extended regexp of symbols to exclude
5938
# it will be wrapped by ` (' and `)$', so one must not match beginning or
5939
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5940
# as well as any symbol that contains `d'.
5941
_LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
5942
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5943
# platforms (ab)use it in PIC code, but their linkers get confused if
5944
# the symbol is explicitly referenced. Since portable code cannot
5945
# rely on this symbol name, it's probably fine to never include it in
5946
# preloaded symbol tables.
5947
extract_expsyms_cmds=
5950
cygwin* | mingw* | pw32*)
5951
# FIXME: the MSVC++ port hasn't been tested in a loooong time
5952
# When not using gcc, we currently assume that we are using
5953
# Microsoft Visual C++.
5954
if test "$GCC" != yes; then
5963
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
5964
if test "$with_gnu_ld" = yes; then
5965
# If archive_cmds runs LD, not CC, wlarc should be empty
5968
# See if GNU ld supports shared libraries.
5970
aix3* | aix4* | aix5*)
5971
# On AIX/PPC, the GNU linker is very broken
5972
if test "$host_cpu" != ia64; then
5973
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5976
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
5977
*** to be unable to reliably create shared libraries on AIX.
5978
*** Therefore, libtool is disabling shared libraries support. If you
5979
*** really care for shared libraries, you may want to modify your PATH
5980
*** so that a non-GNU linker is found, and then restart.
5987
_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)'
5988
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5989
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5991
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5992
# that the semantics of dynamic libraries on AmigaOS, at least up
5993
# to version 4, is to share data among multiple programs linked
5994
# with the same dynamic library. Since this doesn't match the
5995
# behavior of shared libraries on other platforms, we can't use
5997
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6001
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6002
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6003
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6004
# support --undefined. This deserves some investigation. FIXME
6005
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6007
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6011
cygwin* | mingw* | pw32*)
6012
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6013
# as there is no search path for DLLs.
6014
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6015
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6016
_LT_AC_TAGVAR(always_export_symbols, $1)=no
6017
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6018
_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'
6020
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
6021
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
6022
# If the export-symbols file already is a .def file (1st line
6023
# is EXPORTS), use it as is; otherwise, prepend...
6024
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6025
cp $export_symbols $output_objdir/$soname.def;
6027
echo EXPORTS > $output_objdir/$soname.def;
6028
cat $export_symbols >> $output_objdir/$soname.def;
6030
$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
6037
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6038
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6041
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6042
_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'
6047
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
6048
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6051
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
6052
*** create shared libraries on Solaris systems. Therefore, libtool
6053
*** is disabling shared libraries support. We urge you to upgrade GNU
6054
*** binutils to release 2.9.1 or newer. Another option is to modify
6055
*** your PATH or compiler configuration so that the native linker is
6056
*** used, and then restart.
6059
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6060
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6061
_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'
6063
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6068
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6070
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6071
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6075
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
6076
tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6077
_LT_AC_TAGVAR(archive_cmds, $1)="$tmp_archive_cmds"
6078
supports_anon_versioning=no
6079
case `$LD -v 2>/dev/null` in
6080
*\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6081
*\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6082
*\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6083
*\ 2.11.*) ;; # other 2.11 versions
6084
*) supports_anon_versioning=yes ;;
6086
if test $supports_anon_versioning = yes; then
6087
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
6088
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6089
$echo "local: *; };" >> $output_objdir/$libname.ver~
6090
$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6092
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="$tmp_archive_cmds"
6095
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6100
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6101
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6102
_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'
6104
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6109
if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
6110
runpath_var=LD_RUN_PATH
6111
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6112
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6113
# ancient GNU ld didn't support --whole-archive et. al.
6114
if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
6115
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6117
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6121
# PORTME fill in a description of your system's linker (not GNU ld)
6124
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6125
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
6126
_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'
6127
# Note: this linker hardcodes the directories in LIBPATH if there
6128
# are no directories specified by -L.
6129
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6130
if test "$GCC" = yes && test -z "$link_static_flag"; then
6131
# Neither direct hardcoding nor static linking is supported with a
6133
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6138
if test "$host_cpu" = ia64; then
6139
# On IA64, the linker does run time linking by default, so we don't
6140
# have to do anything special.
6141
aix_use_runtimelinking=no
6142
exp_sym_flag='-Bexport'
6145
# If we're using GNU nm, then we don't want the "-C" option.
6146
# -C means demangle to AIX nm, but means don't demangle with GNU nm
6147
if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6148
_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'
6150
_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'
6152
aix_use_runtimelinking=no
6154
# Test if we are trying to use run time linking or normal
6155
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
6156
# need to do runtime linking.
6157
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
6158
for ld_flag in $LDFLAGS; do
6159
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6160
aix_use_runtimelinking=yes
6166
exp_sym_flag='-bexport'
6167
no_entry_flag='-bnoentry'
6170
# When large executables or shared objects are built, AIX ld can
6171
# have problems creating the table of contents. If linking a library
6172
# or program results in "error TOC overflow" add -mminimal-toc to
6173
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6174
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6176
_LT_AC_TAGVAR(archive_cmds, $1)=''
6177
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6178
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6179
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6181
if test "$GCC" = yes; then
6182
case $host_os in aix4.[012]|aix4.[012].*)
6183
# We only want to do this on AIX 4.2 and lower, the check
6184
# below for broken collect2 doesn't work under 4.3+
6185
collect2name=`${CC} -print-prog-name=collect2`
6186
if test -f "$collect2name" && \
6187
strings "$collect2name" | grep resolve_lib_name >/dev/null
6189
# We have reworked collect2
6190
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6192
# We have old collect2
6193
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6194
# It fails to find uninstalled libraries when the uninstalled
6195
# path is not listed in the libpath. Setting hardcode_minus_L
6196
# to unsupported forces relinking
6197
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6198
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6199
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6202
shared_flag='-shared'
6205
if test "$host_cpu" = ia64; then
6206
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6207
# chokes on -Wl,-G. The following line is correct:
6210
if test "$aix_use_runtimelinking" = yes; then
6211
shared_flag='${wl}-G'
6213
shared_flag='${wl}-bM:SRE'
6218
# It seems that -bexpall does not export symbols beginning with
6219
# underscore (_), so it is better to generate a list of symbols to export.
6220
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
6221
if test "$aix_use_runtimelinking" = yes; then
6222
# Warning - without using the other runtime loading flags (-brtl),
6223
# -berok will link without error, but may produce a broken library.
6224
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
6225
# Determine the default libpath from the value encoded in an empty executable.
6226
_LT_AC_SYS_LIBPATH_AIX
6227
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6228
_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"
6230
if test "$host_cpu" = ia64; then
6231
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6232
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6233
_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"
6235
# Determine the default libpath from the value encoded in an empty executable.
6236
_LT_AC_SYS_LIBPATH_AIX
6237
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6238
# Warning - without using the other run time loading flags,
6239
# -berok will link without error, but may produce a broken library.
6240
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6241
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6242
# -bexpall does not export symbols beginning with underscore (_)
6243
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
6244
# Exported symbols can be pulled into shared objects from archives
6245
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
6246
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6247
# This is similar to how AIX traditionally builds it's shared libraries.
6248
_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'
6254
_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)'
6255
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6256
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6257
# see comment about different semantics on the GNU ld section
6258
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6262
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6265
cygwin* | mingw* | pw32*)
6266
# When not using gcc, we currently assume that we are using
6267
# Microsoft Visual C++.
6268
# hardcode_libdir_flag_spec is actually meaningless, as there is
6269
# no search path for DLLs.
6270
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6271
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6272
# Tell ltmain to make .lib files, not .a files.
6274
# Tell ltmain to make .dll files, not .so files.
6276
# FIXME: Setting linknames here is a bad hack.
6277
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
6278
# The linker will automatically build a .lib file if we build a DLL.
6279
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
6280
# FIXME: Should let the user specify the lib program.
6281
_LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
6282
fix_srcfile_path='`cygpath -w "$srcfile"`'
6283
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6286
darwin* | rhapsody*)
6287
if test "$GXX" = yes ; then
6288
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6290
rhapsody* | darwin1.[[012]])
6291
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
6294
if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
6295
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
6297
case ${MACOSX_DEPLOYMENT_TARGET} in
6299
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
6302
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
6308
lt_int_apple_cc_single_mod=no
6309
output_verbose_link_cmd='echo'
6310
if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
6311
lt_int_apple_cc_single_mod=yes
6313
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
6314
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
6316
_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'
6318
_LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6319
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
6320
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
6321
_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}'
6323
_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}'
6325
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6326
_LT_AC_TAGVAR(hardcode_direct, $1)=no
6327
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
6328
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6329
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
6330
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6332
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6337
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6338
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6339
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6343
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6346
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6347
# support. Future versions do this automatically, but an explicit c++rt0.o
6348
# does not break anything, and helps significantly (at the cost of a little
6351
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6352
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6353
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6354
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6357
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
6359
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6360
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6361
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6362
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6365
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6366
freebsd* | kfreebsd*-gnu)
6367
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6368
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6369
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6370
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6374
if test "$GCC" = yes; then
6375
_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'
6377
_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'
6379
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6380
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6381
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6383
# hardcode_minus_L: Not really in the search PATH,
6384
# but as the default location of the library.
6385
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6386
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6390
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6393
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6396
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6402
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
6405
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6409
if test "$with_gnu_ld" = no; then
6412
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6413
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6414
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6415
_LT_AC_TAGVAR(hardcode_direct, $1)=no
6416
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6419
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6420
_LT_AC_TAGVAR(hardcode_direct, $1)=no
6421
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6423
# hardcode_minus_L: Not really in the search PATH,
6424
# but as the default location of the library.
6425
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6428
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6429
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6430
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6431
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6433
# hardcode_minus_L: Not really in the search PATH,
6434
# but as the default location of the library.
6435
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6441
irix5* | irix6* | nonstopux*)
6442
if test "$GCC" = yes; then
6443
_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'
6445
_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'
6446
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6448
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6449
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6450
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6454
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6455
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
6457
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
6459
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6460
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6461
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6465
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6466
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6467
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6468
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6469
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6473
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6474
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6475
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6476
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6477
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6478
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6481
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6482
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6483
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6486
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6487
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6494
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6495
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6496
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6497
_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'
6498
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6502
if test "$GCC" = yes; then
6503
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6504
_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'
6506
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6507
_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'
6509
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6510
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6513
osf4* | osf5*) # as osf3* with the addition of -msym flag
6514
if test "$GCC" = yes; then
6515
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6516
_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'
6517
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6519
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6520
_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'
6521
_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~
6522
$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'
6524
# Both c and cxx compiler support -rpath directly
6525
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6527
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6531
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6532
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6533
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6534
runpath_var=LD_RUN_PATH
6535
hardcode_runpath_var=yes
6539
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6540
if test "$GCC" = yes; then
6541
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6542
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6543
$CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
6545
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6546
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6547
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6549
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6550
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6552
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6553
*) # Supported since Solaris 2.6 (maybe 2.5.1?)
6554
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
6556
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6560
if test "x$host_vendor" = xsequent; then
6561
# Use $CC to link under sequent, because it throws in some extra .o
6562
# files that make .init and .fini sections work.
6563
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6565
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6567
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6568
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6569
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6570
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6574
case $host_vendor in
6576
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6577
_LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6580
## LD is ld it makes a PLAMLIB
6581
## CC just makes a GrossModule.
6582
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6583
_LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6584
_LT_AC_TAGVAR(hardcode_direct, $1)=no
6587
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6588
_LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6591
runpath_var='LD_RUN_PATH'
6592
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6596
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6597
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6598
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6602
if test -d /usr/nec; then
6603
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6604
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6605
runpath_var=LD_RUN_PATH
6606
hardcode_runpath_var=yes
6607
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
6612
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6613
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6614
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6615
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6616
hardcode_runpath_var=yes
6617
runpath_var=LD_RUN_PATH
6620
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
6621
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
6622
if test "$GCC" = yes; then
6623
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6625
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6627
runpath_var='LD_RUN_PATH'
6628
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6632
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6633
# $CC -shared without GNU ld will not create a library from C++
6634
# object files and a static libstdc++, better avoid it by now
6635
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6636
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6637
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6638
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6639
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6640
runpath_var='LD_RUN_PATH'
6644
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6645
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6646
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6650
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6655
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6656
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6658
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6659
if test "$GCC" = yes; then
6660
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6664
# Do we need to explicitly link libc?
6666
case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
6668
# Assume -lc should be added
6669
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6671
if test "$enable_shared" = yes && test "$GCC" = yes; then
6672
case $_LT_AC_TAGVAR(archive_cmds, $1) in
6674
# FIXME: we may have to deal with multi-command sequences.
6677
# Test whether the compiler implicitly links with -lc since on some
6678
# systems, -lgcc has to come before -lc. If gcc already passes -lc
6679
# to ld, don't add -lc before -lgcc.
6680
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6682
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6684
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6687
libobjs=conftest.$ac_objext
6689
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6695
lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
6696
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
6697
if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
6699
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6701
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6703
_LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6705
cat conftest.err 1>&5
6708
AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
6714
])# AC_LIBTOOL_PROG_LD_SHLIBS
6717
# _LT_AC_FILE_LTDLL_C
6718
# -------------------
6719
# Be careful that the start marker always follows a newline.
6720
AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
6721
# /* ltdll.c starts here */
6722
# #define WIN32_LEAN_AND_MEAN
6723
# #include <windows.h>
6724
# #undef WIN32_LEAN_AND_MEAN
6725
# #include <stdio.h>
6727
# #ifndef __CYGWIN__
6728
# # ifdef __CYGWIN32__
6729
# # define __CYGWIN__ __CYGWIN32__
6733
# #ifdef __cplusplus
6736
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
6737
# #ifdef __cplusplus
6742
# #include <cygwin/cygwin_dll.h>
6743
# DECLARE_CYGWIN_DLL( DllMain );
6745
# HINSTANCE __hDllInstance_base;
6748
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
6750
# __hDllInstance_base = hInst;
6753
# /* ltdll.c ends here */
6754
])# _LT_AC_FILE_LTDLL_C
6757
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
6758
# ---------------------------------
6759
AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
6763
AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
6764
AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
6765
AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
6766
AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
6767
AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
6768
AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
6769
AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
6771
# This is just to silence aclocal about the macro not being used
6772
ifelse([AC_DISABLE_FAST_INSTALL])
6774
AC_DEFUN([LT_AC_PROG_GCJ],
6775
[AC_CHECK_TOOL(GCJ, gcj, no)
6776
test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6780
AC_DEFUN([LT_AC_PROG_RC],
6781
[AC_CHECK_TOOL(RC, windres, no)
6784
# NOTE: This macro has been submitted for inclusion into #
6785
# GNU Autoconf as AC_PROG_SED. When it is available in #
6786
# a released version of Autoconf we should remove this #
6787
# macro and use it instead. #
6790
# Check for a fully-functional sed program, that truncates
6791
# as few characters as possible. Prefer GNU sed if found.
6792
AC_DEFUN([LT_AC_PROG_SED],
6793
[AC_MSG_CHECKING([for a sed that does not truncate output])
6794
AC_CACHE_VAL(lt_cv_path_SED,
6795
[# Loop through the user's path and test for sed and gsed.
6796
# Then use that list of sed's as ones to test for truncation.
6797
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6801
test -z "$as_dir" && as_dir=.
6802
for lt_ac_prog in sed gsed; do
6803
for ac_exec_ext in '' $ac_executable_extensions; do
6804
if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6805
lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6812
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
6813
# along with /bin/sed that truncates output.
6814
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6815
test ! -f $lt_ac_sed && break
6816
cat /dev/null > conftest.in
6818
echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6819
# Check for GNU sed and select it if it is found.
6820
if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6821
lt_cv_path_SED=$lt_ac_sed
6825
cat conftest.in conftest.in >conftest.tmp
6826
mv conftest.tmp conftest.in
6827
cp conftest.in conftest.nl
6829
$lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6830
cmp -s conftest.out conftest.nl || break
6831
# 10000 chars as input seems more than enough
6832
test $lt_ac_count -gt 10 && break
6833
lt_ac_count=`expr $lt_ac_count + 1`
6834
if test $lt_ac_count -gt $lt_ac_max; then
6835
lt_ac_max=$lt_ac_count
6836
lt_cv_path_SED=$lt_ac_sed
6842
AC_MSG_RESULT([$SED])
6845
# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
6847
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
6849
# This program is free software; you can redistribute it and/or modify
6850
# it under the terms of the GNU General Public License as published by
6851
# the Free Software Foundation; either version 2, or (at your option)
6852
# any later version.
6854
# This program is distributed in the hope that it will be useful,
6855
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6856
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6857
# GNU General Public License for more details.
6859
# You should have received a copy of the GNU General Public License
6860
# along with this program; if not, write to the Free Software
6861
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6868
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
6869
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
6871
# Add --enable-maintainer-mode option to configure.
6874
# Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
6876
# This program is free software; you can redistribute it and/or modify
6877
# it under the terms of the GNU General Public License as published by
6878
# the Free Software Foundation; either version 2, or (at your option)
6879
# any later version.
6881
# This program is distributed in the hope that it will be useful,
6882
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6883
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6884
# GNU General Public License for more details.
6886
# You should have received a copy of the GNU General Public License
6887
# along with this program; if not, write to the Free Software
6888
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6893
AC_DEFUN([AM_MAINTAINER_MODE],
6894
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
6895
dnl maintainer-mode is disabled by default
6896
AC_ARG_ENABLE(maintainer-mode,
6897
[ --enable-maintainer-mode enable make rules and dependencies not useful
6898
(and sometimes confusing) to the casual installer],
6899
USE_MAINTAINER_MODE=$enableval,
6900
USE_MAINTAINER_MODE=no)
6901
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
6902
AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
6903
MAINT=$MAINTAINER_MODE_TRUE
6908
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
6911
# Copyright 1996, 1997, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
6913
# This program is free software; you can redistribute it and/or modify
6914
# it under the terms of the GNU General Public License as published by
6915
# the Free Software Foundation; either version 2, or (at your option)
6916
# any later version.
6918
# This program is distributed in the hope that it will be useful,
6919
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6920
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6921
# GNU General Public License for more details.
6923
# You should have received a copy of the GNU General Public License
6924
# along with this program; if not, write to the Free Software
6925
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6930
# @defmac AC_PROG_CC_STDC
6931
# @maindex PROG_CC_STDC
6933
# If the C compiler in not in ANSI C mode by default, try to add an option
6934
# to output variable @code{CC} to make it so. This macro tries various
6935
# options that select ANSI C on some system or another. It considers the
6936
# compiler to be in ANSI C mode if it handles function prototypes correctly.
6938
# If you use this macro, you should check after calling it whether the C
6939
# compiler has been set to accept ANSI C; if not, the shell variable
6940
# @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
6941
# code in ANSI C, you can make an un-ANSIfied copy of it by using the
6942
# program @code{ansi2knr}, which comes with Ghostscript.
6945
AC_DEFUN([AM_PROG_CC_STDC],
6946
[AC_REQUIRE([AC_PROG_CC])
6947
AC_BEFORE([$0], [AC_C_INLINE])
6948
AC_BEFORE([$0], [AC_C_CONST])
6949
dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require
6950
dnl a magic option to avoid problems with ANSI preprocessor commands
6952
dnl FIXME: can't do this because then AC_AIX won't work due to a
6953
dnl circular dependency.
6954
dnl AC_BEFORE([$0], [AC_PROG_CPP])
6955
AC_MSG_CHECKING([for ${CC-cc} option to accept ANSI C])
6956
AC_CACHE_VAL(am_cv_prog_cc_stdc,
6957
[am_cv_prog_cc_stdc=no
6959
# Don't try gcc -ansi; that turns off useful extensions and
6960
# breaks some systems' header files.
6961
# AIX -qlanglvl=ansi
6962
# Ultrix and OSF/1 -std1
6963
# HP-UX 10.20 and later -Ae
6964
# HP-UX older versions -Aa -D_HPUX_SOURCE
6965
# SVR4 -Xc -D__EXTENSIONS__
6966
for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6968
CC="$ac_save_CC $ac_arg"
6970
[#include <stdarg.h>
6972
#include <sys/types.h>
6973
#include <sys/stat.h>
6974
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
6975
struct buf { int x; };
6976
FILE * (*rcsopen) (struct buf *, struct stat *, int);
6977
static char *e (p, i)
6983
static char *f (char * (*g) (char **, int), char **p, ...)
6988
s = g (p, va_arg (v,int));
6992
int test (int i, double x);
6993
struct s1 {int (*f) (int a);};
6994
struct s2 {int (*f) (double a);};
6995
int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
6999
return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
7001
[am_cv_prog_cc_stdc="$ac_arg"; break])
7005
if test -z "$am_cv_prog_cc_stdc"; then
7006
AC_MSG_RESULT([none needed])
7008
AC_MSG_RESULT([$am_cv_prog_cc_stdc])
7010
case "x$am_cv_prog_cc_stdc" in
7012
*) CC="$CC $am_cv_prog_cc_stdc" ;;
7016
AU_DEFUN([fp_PROG_CC_STDC], [AM_PROG_CC_STDC])
7018
# isc-posix.m4 serial 2 (gettext-0.11.2)
7019
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
7020
dnl This file is free software, distributed under the terms of the GNU
7021
dnl General Public License. As a special exception to the GNU General
7022
dnl Public License, this file may be distributed as part of a program
7023
dnl that contains a configuration script generated by Autoconf, under
7024
dnl the same distribution terms as the rest of that program.
7026
# This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
7028
# This test replaces the one in autoconf.
7029
# Currently this macro should have the same name as the autoconf macro
7030
# because gettext's gettext.m4 (distributed in the automake package)
7031
# still uses it. Otherwise, the use in gettext.m4 makes autoheader
7032
# give these diagnostics:
7033
# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
7034
# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
7036
undefine([AC_ISC_POSIX])
7038
AC_DEFUN([AC_ISC_POSIX],
7040
dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
7041
AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
7046
# Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
7048
# This program is free software; you can redistribute it and/or modify
7049
# it under the terms of the GNU General Public License as published by
7050
# the Free Software Foundation; either version 2, or (at your option)
7051
# any later version.
7053
# This program is distributed in the hope that it will be useful,
7054
# but WITHOUT ANY WARRANTY; without even the implied warranty of
7055
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7056
# GNU General Public License for more details.
7058
# You should have received a copy of the GNU General Public License
7059
# along with this program; if not, write to the Free Software
7060
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7069
# Autoconf leaves LEX=: if lex or flex can't be found. Change that to a
7070
# "missing" invocation, for better error output.
7071
AC_DEFUN([AM_PROG_LEX],
7072
[AC_REQUIRE([AM_MISSING_HAS_RUN])dnl
7073
AC_REQUIRE([AC_PROG_LEX])dnl
7074
if test "$LEX" = :; then
7075
LEX=${am_missing_run}flex
7079
# Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
7081
# This program is free software; you can redistribute it and/or modify
7082
# it under the terms of the GNU General Public License as published by
7083
# the Free Software Foundation; either version 2, or (at your option)
7084
# any later version.
7086
# This program is distributed in the hope that it will be useful,
7087
# but WITHOUT ANY WARRANTY; without even the implied warranty of
7088
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7089
# GNU General Public License for more details.
7091
# You should have received a copy of the GNU General Public License
7092
# along with this program; if not, write to the Free Software
7093
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7096
# AM_PATH_PYTHON([MINIMUM-VERSION])
7098
# Adds support for distributing Python modules and packages. To
7099
# install modules, copy them to $(pythondir), using the python_PYTHON
7100
# automake variable. To install a package with the same name as the
7101
# automake package, install to $(pkgpythondir), or use the
7102
# pkgpython_PYTHON automake variable.
7104
# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
7105
# locations to install python extension modules (shared libraries).
7106
# Another macro is required to find the appropriate flags to compile
7107
# extension modules.
7109
# If your package is configured with a different prefix to python,
7110
# users will have to add the install directory to the PYTHONPATH
7111
# environment variable, or create a .pth file (see the python
7112
# documentation for details).
7114
# If the MINIUMUM-VERSION argument is passed, AM_PATH_PYTHON will
7115
# cause an error if the version of python installed on the system
7116
# doesn't meet the requirement. MINIMUM-VERSION should consist of
7117
# numbers and dots only.
7119
AC_DEFUN([AM_PATH_PYTHON],
7121
dnl Find a Python interpreter. Python versions prior to 1.5 are not
7122
dnl supported because the default installation locations changed from
7123
dnl $prefix/lib/site-python in 1.4 to $prefix/lib/python1.5/site-packages
7125
m4_define([_AM_PYTHON_INTERPRETER_LIST],
7126
[python python2 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5])
7129
dnl No version check is needed.
7130
# Find any Python interpreter.
7131
AC_PATH_PROG([PYTHON], _AM_PYTHON_INTERPRETER_LIST)
7132
am_display_PYTHON=python
7134
dnl A version check is needed.
7135
if test -n "$PYTHON"; then
7136
# If the user set $PYTHON, use it and don't search something else.
7137
AC_MSG_CHECKING([whether $PYTHON version >= $1])
7138
AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
7139
[AC_MSG_RESULT(yes)],
7140
[AC_MSG_ERROR(too old)])
7142
# Otherwise, try each interpreter until we find one that satisfies
7144
AC_CACHE_CHECK([for a Python interpreter with version >= $1],
7145
[am_cv_pathless_PYTHON],[
7146
for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST : ; do
7147
if test "$am_cv_pathless_PYTHON" = : ; then
7148
AC_MSG_ERROR([no suitable Python interpreter found])
7150
AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
7152
# Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
7153
AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
7154
am_display_PYTHON=$am_cv_pathless_PYTHON
7158
dnl Query Python for its version number. Getting [:3] seems to be
7159
dnl the best way to do this; it's what "site.py" does in the standard
7162
AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
7163
[am_cv_python_version=`$PYTHON -c "import sys; print sys.version[[:3]]"`])
7164
AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
7166
dnl Use the values of $prefix and $exec_prefix for the corresponding
7167
dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made
7168
dnl distinct variables so they can be overridden if need be. However,
7169
dnl general consensus is that you shouldn't need this ability.
7171
AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
7172
AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
7174
dnl At times (like when building shared libraries) you may want
7175
dnl to know which OS platform Python thinks this is.
7177
AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
7178
[am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"`])
7179
AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
7182
dnl Set up 4 directories:
7184
dnl pythondir -- where to install python scripts. This is the
7185
dnl site-packages directory, not the python standard library
7186
dnl directory like in previous automake betas. This behaviour
7187
dnl is more consistent with lispdir.m4 for example.
7188
dnl Query distutils for this directory. distutils does not exist in
7189
dnl Python 1.5, so we fall back to the hardcoded directory if it
7191
AC_CACHE_CHECK([for $am_display_PYTHON script directory],
7192
[am_cv_python_pythondir],
7193
[am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX')" 2>/dev/null ||
7194
echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`])
7195
AC_SUBST([pythondir], [$am_cv_python_pythondir])
7197
dnl pkgpythondir -- $PACKAGE directory under pythondir. Was
7198
dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is
7199
dnl more consistent with the rest of automake.
7201
AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
7203
dnl pyexecdir -- directory for installing python extension modules
7204
dnl (shared libraries)
7205
dnl Query distutils for this directory. distutils does not exist in
7206
dnl Python 1.5, so we fall back to the hardcoded directory if it
7208
AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
7209
[am_cv_python_pyexecdir],
7210
[am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX')" 2>/dev/null ||
7211
echo "${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"`])
7212
AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
7214
dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
7216
AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
7220
# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
7221
# ---------------------------------------------------------------------------
7222
# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
7223
# Run ACTION-IF-FALSE otherwise.
7224
# This test uses sys.hexversion instead of the string equivalant (first
7225
# word of sys.version), in order to cope with versions such as 2.2c1.
7226
# hexversion has been introduced in Python 1.5.2; it's probably not
7227
# worth to support older versions (1.5.1 was released on October 31, 1998).
7228
AC_DEFUN([AM_PYTHON_CHECK_VERSION],
7229
[prog="import sys, string
7230
# split strings by '.' and convert to numeric. Append some zeros
7231
# because we need at least 4 digits for the hex conversion.
7232
minver = map(int, string.split('$2', '.')) + [[0, 0, 0]]
7234
for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[[i]]
7235
sys.exit(sys.hexversion < minverhex)"
7236
AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
7238
# Copyright 2001 Free Software Foundation, Inc. -*- Autoconf -*-
7240
# This program is free software; you can redistribute it and/or modify
7241
# it under the terms of the GNU General Public License as published by
7242
# the Free Software Foundation; either version 2, or (at your option)
7243
# any later version.
7245
# This program is distributed in the hope that it will be useful,
7246
# but WITHOUT ANY WARRANTY; without even the implied warranty of
7247
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7248
# GNU General Public License for more details.
7250
# You should have received a copy of the GNU General Public License
7251
# along with this program; if not, write to the Free Software
7252
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7255
# AM_RUN_LOG(COMMAND)
7256
# -------------------
7257
# Run COMMAND, save the exit status in ac_status, and log it.
7258
# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
7259
AC_DEFUN([AM_RUN_LOG],
7260
[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
7261
($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
7263
echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
7264
(exit $ac_status); }])
7266
dnl a macro to check for ability to create python extensions
7267
dnl AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE])
7268
dnl function also defines PYTHON_INCLUDES
7269
AC_DEFUN([AM_CHECK_PYTHON_HEADERS],
7270
[AC_REQUIRE([AM_PATH_PYTHON])
7271
AC_MSG_CHECKING(for headers required to compile python extensions)
7272
dnl deduce PYTHON_INCLUDES
7273
py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
7274
py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
7275
PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
7276
if test "$py_prefix" != "$py_exec_prefix"; then
7277
PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
7279
AC_SUBST(PYTHON_INCLUDES)
7280
dnl check if the headers exist:
7281
save_CPPFLAGS="$CPPFLAGS"
7282
CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES"
7283
AC_TRY_CPP([#include <Python.h>],dnl
7284
[AC_MSG_RESULT(found)
7286
[AC_MSG_RESULT(not found)
7288
CPPFLAGS="$save_CPPFLAGS"
7291
dnl as-compiler-flag.m4 0.0.1
7292
dnl autostars m4 macro for detection of compiler flags
7296
AC_DEFUN(AS_COMPILER_FLAG,
7298
AC_MSG_CHECKING(to see if compiler understands $1)
7300
save_CFLAGS="$CFLAGS"
7303
AC_TRY_COMPILE([ ], [], [flag_ok=yes], [flag_ok=no])
7304
CFLAGS="$save_CFLAGS"
7306
if test "X$flag_ok" = Xyes; then
7311
AC_MSG_RESULT([$flag_ok])