1
# generated automatically by aclocal 1.9.3 -*- Autoconf -*-
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
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
# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
16
# Generated from amversion.in; do not edit by hand.
18
# This program is free software; you can redistribute it and/or modify
19
# it under the terms of the GNU General Public License as published by
20
# the Free Software Foundation; either version 2, or (at your option)
23
# This program is distributed in the hope that it will be useful,
24
# but WITHOUT ANY WARRANTY; without even the implied warranty of
25
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26
# GNU General Public License for more details.
28
# You should have received a copy of the GNU General Public License
29
# along with this program; if not, write to the Free Software
30
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
32
# AM_AUTOMAKE_VERSION(VERSION)
33
# ----------------------------
34
# Automake X.Y traces this macro to ensure aclocal.m4 has been
35
# generated from the m4 files accompanying Automake X.Y.
36
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
38
# AM_SET_CURRENT_AUTOMAKE_VERSION
39
# -------------------------------
40
# Call AM_AUTOMAKE_VERSION so it can be traced.
41
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
42
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
43
[AM_AUTOMAKE_VERSION([1.9.3])])
47
# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
49
# This program is free software; you can redistribute it and/or modify
50
# it under the terms of the GNU General Public License as published by
51
# the Free Software Foundation; either version 2, or (at your option)
54
# This program is distributed in the hope that it will be useful,
55
# but WITHOUT ANY WARRANTY; without even the implied warranty of
56
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
57
# GNU General Public License for more details.
59
# You should have received a copy of the GNU General Public License
60
# along with this program; if not, write to the Free Software
61
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
64
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
65
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
66
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
68
# Of course, Automake must honor this variable whenever it calls a
69
# tool from the auxiliary directory. The problem is that $srcdir (and
70
# therefore $ac_aux_dir as well) can be either absolute or relative,
71
# depending on how configure is run. This is pretty annoying, since
72
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
73
# source directory, any form will work fine, but in subdirectories a
74
# relative path needs to be adjusted first.
77
# fails when called from a subdirectory if $ac_aux_dir is relative
78
# $top_srcdir/$ac_aux_dir/missing
79
# fails if $ac_aux_dir is absolute,
80
# fails when called from a subdirectory in a VPATH build with
81
# a relative $ac_aux_dir
83
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
84
# are both prefixed by $srcdir. In an in-source build this is usually
85
# harmless because $srcdir is `.', but things will broke when you
86
# start a VPATH build or use an absolute $srcdir.
88
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
89
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
90
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
91
# and then we would define $MISSING as
92
# MISSING="\${SHELL} $am_aux_dir/missing"
93
# This will work as long as MISSING is not called from configure, because
94
# unfortunately $(top_srcdir) has no meaning in configure.
95
# However there are other variables, like CC, which are often used in
96
# configure, and could therefore not use this "fixed" $ac_aux_dir.
98
# Another solution, used here, is to always expand $ac_aux_dir to an
99
# absolute PATH. The drawback is that using absolute paths prevent a
100
# configured tree to be moved without reconfiguration.
102
AC_DEFUN([AM_AUX_DIR_EXPAND],
103
[dnl Rely on autoconf to set up CDPATH properly.
105
# expand $ac_aux_dir to an absolute path
106
am_aux_dir=`cd $ac_aux_dir && pwd`
109
# AM_CONDITIONAL -*- Autoconf -*-
111
# Copyright (C) 1997, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
113
# This program is free software; you can redistribute it and/or modify
114
# it under the terms of the GNU General Public License as published by
115
# the Free Software Foundation; either version 2, or (at your option)
118
# This program is distributed in the hope that it will be useful,
119
# but WITHOUT ANY WARRANTY; without even the implied warranty of
120
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
121
# GNU General Public License for more details.
123
# You should have received a copy of the GNU General Public License
124
# along with this program; if not, write to the Free Software
125
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
130
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
131
# -------------------------------------
132
# Define a conditional.
133
AC_DEFUN([AM_CONDITIONAL],
135
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
136
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
146
AC_CONFIG_COMMANDS_PRE(
147
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
148
AC_MSG_ERROR([[conditional "$1" was never defined.
149
Usually this means the macro was only invoked conditionally.]])
152
# serial 7 -*- Autoconf -*-
154
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
155
# Free Software Foundation, Inc.
157
# This program is free software; you can redistribute it and/or modify
158
# it under the terms of the GNU General Public License as published by
159
# the Free Software Foundation; either version 2, or (at your option)
162
# This program is distributed in the hope that it will be useful,
163
# but WITHOUT ANY WARRANTY; without even the implied warranty of
164
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
165
# GNU General Public License for more details.
167
# You should have received a copy of the GNU General Public License
168
# along with this program; if not, write to the Free Software
169
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
173
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
174
# written in clear, in which case automake, when reading aclocal.m4,
175
# will think it sees a *use*, and therefore will trigger all it's
176
# C support machinery. Also note that it means that autoscan, seeing
177
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
181
# _AM_DEPENDENCIES(NAME)
182
# ----------------------
183
# See how the compiler implements dependency checking.
184
# NAME is "CC", "CXX", "GCJ", or "OBJC".
185
# We try a few techniques and use that to set a single cache variable.
187
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
188
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
189
# dependency, and given that the user is not expected to run this macro,
190
# just rely on AC_PROG_CC.
191
AC_DEFUN([_AM_DEPENDENCIES],
192
[AC_REQUIRE([AM_SET_DEPDIR])dnl
193
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
194
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
195
AC_REQUIRE([AM_DEP_TRACK])dnl
197
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
198
[$1], CXX, [depcc="$CXX" am_compiler_list=],
199
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
200
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
201
[depcc="$$1" am_compiler_list=])
203
AC_CACHE_CHECK([dependency style of $depcc],
204
[am_cv_$1_dependencies_compiler_type],
205
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
206
# We make a subdir and do the tests there. Otherwise we can end up
207
# making bogus files that we don't know about and never remove. For
208
# instance it was reported that on HP-UX the gcc test will end up
209
# making a dummy file named `D' -- because `-MD' means `put the output
212
# Copy depcomp to subdir because otherwise we won't find it if we're
213
# using a relative directory.
214
cp "$am_depcomp" conftest.dir
216
# We will build objects and dependencies in a subdirectory because
217
# it helps to detect inapplicable dependency modes. For instance
218
# both Tru64's cc and ICC support -MD to output dependencies as a
219
# side effect of compilation, but ICC will put the dependencies in
220
# the current directory while Tru64 will put them in the object
224
am_cv_$1_dependencies_compiler_type=none
225
if test "$am_compiler_list" = ""; then
226
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
228
for depmode in $am_compiler_list; do
229
# Setup a source with many dependencies, because some compilers
230
# like to wrap large dependency lists on column 80 (with \), and
231
# we should not choose a depcomp mode which is confused by this.
233
# We need to recreate these files for each test, as the compiler may
234
# overwrite some of them when testing with obscure command lines.
235
# This happens at least with the AIX C compiler.
237
for i in 1 2 3 4 5 6; do
238
echo '#include "conftst'$i'.h"' >> sub/conftest.c
239
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
240
# Solaris 8's {/usr,}/bin/sh.
241
touch sub/conftst$i.h
243
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
247
# after this tag, mechanisms are not by side-effect, so they'll
248
# only be used when explicitly requested
249
if test "x$enable_dependency_tracking" = xyes; then
257
# We check with `-c' and `-o' for the sake of the "dashmstdout"
258
# mode. It turns out that the SunPro C++ compiler does not properly
259
# handle `-M -o', and we need to detect this.
260
if depmode=$depmode \
261
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
262
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
263
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
264
>/dev/null 2>conftest.err &&
265
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
266
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
267
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
268
# icc doesn't choke on unknown options, it will just issue warnings
269
# or remarks (even with -Werror). So we grep stderr for any message
270
# that says an option was ignored or not supported.
271
# When given -MP, icc 7.0 and 7.1 complain thusly:
272
# icc: Command line warning: ignoring option '-M'; no argument required
273
# The diagnosis changed in icc 8.0:
274
# icc: Command line remark: option '-MP' not supported
275
if (grep 'ignoring option' conftest.err ||
276
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
277
am_cv_$1_dependencies_compiler_type=$depmode
286
am_cv_$1_dependencies_compiler_type=none
289
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
290
AM_CONDITIONAL([am__fastdep$1], [
291
test "x$enable_dependency_tracking" != xno \
292
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
298
# Choose a directory name for dependency files.
299
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
300
AC_DEFUN([AM_SET_DEPDIR],
301
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
302
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
308
AC_DEFUN([AM_DEP_TRACK],
309
[AC_ARG_ENABLE(dependency-tracking,
310
[ --disable-dependency-tracking speeds up one-time build
311
--enable-dependency-tracking do not reject slow dependency extractors])
312
if test "x$enable_dependency_tracking" != xno; then
313
am_depcomp="$ac_aux_dir/depcomp"
316
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
317
AC_SUBST([AMDEPBACKSLASH])
320
# Generate code to set up dependency tracking. -*- Autoconf -*-
322
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
323
# Free Software Foundation, Inc.
325
# This program is free software; you can redistribute it and/or modify
326
# it under the terms of the GNU General Public License as published by
327
# the Free Software Foundation; either version 2, or (at your option)
330
# This program is distributed in the hope that it will be useful,
331
# but WITHOUT ANY WARRANTY; without even the implied warranty of
332
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
333
# GNU General Public License for more details.
335
# You should have received a copy of the GNU General Public License
336
# along with this program; if not, write to the Free Software
337
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
342
# _AM_OUTPUT_DEPENDENCY_COMMANDS
343
# ------------------------------
344
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
345
[for mf in $CONFIG_FILES; do
346
# Strip MF so we end up with the name of the file.
347
mf=`echo "$mf" | sed -e 's/:.*$//'`
348
# Check whether this is an Automake generated Makefile or not.
349
# We used to match only the files named `Makefile.in', but
350
# some people rename them; so instead we look at the file content.
351
# Grep'ing the first line is not enough: some people post-process
352
# each Makefile.in and add a new line on top of each file to say so.
353
# So let's grep whole file.
354
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
355
dirpart=`AS_DIRNAME("$mf")`
359
# Extract the definition of DEPDIR, am__include, and am__quote
360
# from the Makefile without running `make'.
361
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
362
test -z "$DEPDIR" && continue
363
am__include=`sed -n 's/^am__include = //p' < "$mf"`
364
test -z "am__include" && continue
365
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
366
# When using ansi2knr, U may be empty or an underscore; expand it
367
U=`sed -n 's/^U = //p' < "$mf"`
368
# Find all dependency output files, they are included files with
369
# $(DEPDIR) in their names. We invoke sed twice because it is the
370
# simplest approach to changing $(DEPDIR) to its actual value in the
372
for file in `sed -n "
373
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
374
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
375
# Make sure the directory exists.
376
test -f "$dirpart/$file" && continue
377
fdir=`AS_DIRNAME(["$file"])`
378
AS_MKDIR_P([$dirpart/$fdir])
379
# echo "creating $dirpart/$file"
380
echo '# dummy' > "$dirpart/$file"
383
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
386
# AM_OUTPUT_DEPENDENCY_COMMANDS
387
# -----------------------------
388
# This macro should only be invoked once -- use via AC_REQUIRE.
390
# This code is only required when automatic dependency tracking
391
# is enabled. FIXME. This creates each `.P' file that we will
392
# need in order to bootstrap the dependency handling code.
393
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
394
[AC_CONFIG_COMMANDS([depfiles],
395
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
396
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
399
# Do all the work for Automake. -*- Autoconf -*-
401
# This macro actually does too much some checks are only needed if
402
# your package does certain things. But this isn't really a big deal.
404
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
405
# Free Software Foundation, Inc.
407
# This program is free software; you can redistribute it and/or modify
408
# it under the terms of the GNU General Public License as published by
409
# the Free Software Foundation; either version 2, or (at your option)
412
# This program is distributed in the hope that it will be useful,
413
# but WITHOUT ANY WARRANTY; without even the implied warranty of
414
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
415
# GNU General Public License for more details.
417
# You should have received a copy of the GNU General Public License
418
# along with this program; if not, write to the Free Software
419
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
424
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
425
# AM_INIT_AUTOMAKE([OPTIONS])
426
# -----------------------------------------------
427
# The call with PACKAGE and VERSION arguments is the old style
428
# call (pre autoconf-2.50), which is being phased out. PACKAGE
429
# and VERSION should now be passed to AC_INIT and removed from
430
# the call to AM_INIT_AUTOMAKE.
431
# We support both call styles for the transition. After
432
# the next Automake release, Autoconf can make the AC_INIT
433
# arguments mandatory, and then we can depend on a new Autoconf
434
# release and drop the old call support.
435
AC_DEFUN([AM_INIT_AUTOMAKE],
436
[AC_PREREQ([2.58])dnl
437
dnl Autoconf wants to disallow AM_ names. We explicitly allow
438
dnl the ones we care about.
439
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
440
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
441
AC_REQUIRE([AC_PROG_INSTALL])dnl
442
# test to see if srcdir already configured
443
if test "`cd $srcdir && pwd`" != "`pwd`" &&
444
test -f $srcdir/config.status; then
445
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
448
# test whether we have cygpath
449
if test -z "$CYGPATH_W"; then
450
if (cygpath --version) >/dev/null 2>/dev/null; then
451
CYGPATH_W='cygpath -w'
456
AC_SUBST([CYGPATH_W])
458
# Define the identity of the package.
459
dnl Distinguish between old-style and new-style calls.
461
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
462
AC_SUBST([PACKAGE], [$1])dnl
463
AC_SUBST([VERSION], [$2])],
464
[_AM_SET_OPTIONS([$1])dnl
465
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
466
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
468
_AM_IF_OPTION([no-define],,
469
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
470
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
472
# Some tools Automake needs.
473
AC_REQUIRE([AM_SANITY_CHECK])dnl
474
AC_REQUIRE([AC_ARG_PROGRAM])dnl
475
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
476
AM_MISSING_PROG(AUTOCONF, autoconf)
477
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
478
AM_MISSING_PROG(AUTOHEADER, autoheader)
479
AM_MISSING_PROG(MAKEINFO, makeinfo)
481
AM_PROG_INSTALL_STRIP
482
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
483
# We need awk for the "check" target. The system "awk" is bad on
485
AC_REQUIRE([AC_PROG_AWK])dnl
486
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
487
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
488
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
489
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
490
[_AM_PROG_TAR([v7])])])
491
_AM_IF_OPTION([no-dependencies],,
492
[AC_PROVIDE_IFELSE([AC_PROG_CC],
493
[_AM_DEPENDENCIES(CC)],
494
[define([AC_PROG_CC],
495
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
496
AC_PROVIDE_IFELSE([AC_PROG_CXX],
497
[_AM_DEPENDENCIES(CXX)],
498
[define([AC_PROG_CXX],
499
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
504
# When config.status generates a header, we must update the stamp-h file.
505
# This file resides in the same directory as the config header
506
# that is generated. The stamp files are numbered to have different names.
508
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
509
# loop where config.status creates the headers, so we can generate
510
# our stamp files there.
511
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
512
[# Compute $1's index in $config_headers.
514
for _am_header in $config_headers :; do
519
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
522
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
526
# Define $install_sh.
528
# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
530
# This program is free software; you can redistribute it and/or modify
531
# it under the terms of the GNU General Public License as published by
532
# the Free Software Foundation; either version 2, or (at your option)
535
# This program is distributed in the hope that it will be useful,
536
# but WITHOUT ANY WARRANTY; without even the implied warranty of
537
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
538
# GNU General Public License for more details.
540
# You should have received a copy of the GNU General Public License
541
# along with this program; if not, write to the Free Software
542
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
545
AC_DEFUN([AM_PROG_INSTALL_SH],
546
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
547
install_sh=${install_sh-"$am_aux_dir/install-sh"}
548
AC_SUBST(install_sh)])
551
# Copyright (C) 2003 Free Software Foundation, Inc.
553
# This program is free software; you can redistribute it and/or modify
554
# it under the terms of the GNU General Public License as published by
555
# the Free Software Foundation; either version 2, or (at your option)
558
# This program is distributed in the hope that it will be useful,
559
# but WITHOUT ANY WARRANTY; without even the implied warranty of
560
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
561
# GNU General Public License for more details.
563
# You should have received a copy of the GNU General Public License
564
# along with this program; if not, write to the Free Software
565
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
570
# Check whether the underlying file-system supports filenames
571
# with a leading dot. For instance MS-DOS doesn't.
572
AC_DEFUN([AM_SET_LEADING_DOT],
573
[rm -rf .tst 2>/dev/null
574
mkdir .tst 2>/dev/null
575
if test -d .tst; then
580
rmdir .tst 2>/dev/null
581
AC_SUBST([am__leading_dot])])
583
# Add --enable-maintainer-mode option to configure.
586
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004
587
# Free Software Foundation, Inc.
589
# This program is free software; you can redistribute it and/or modify
590
# it under the terms of the GNU General Public License as published by
591
# the Free Software Foundation; either version 2, or (at your option)
594
# This program is distributed in the hope that it will be useful,
595
# but WITHOUT ANY WARRANTY; without even the implied warranty of
596
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
597
# GNU General Public License for more details.
599
# You should have received a copy of the GNU General Public License
600
# along with this program; if not, write to the Free Software
601
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
606
AC_DEFUN([AM_MAINTAINER_MODE],
607
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
608
dnl maintainer-mode is disabled by default
609
AC_ARG_ENABLE(maintainer-mode,
610
[ --enable-maintainer-mode enable make rules and dependencies not useful
611
(and sometimes confusing) to the casual installer],
612
USE_MAINTAINER_MODE=$enableval,
613
USE_MAINTAINER_MODE=no)
614
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
615
AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
616
MAINT=$MAINTAINER_MODE_TRUE
621
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
623
# Check to see how 'make' treats includes. -*- Autoconf -*-
625
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
627
# This program is free software; you can redistribute it and/or modify
628
# it under the terms of the GNU General Public License as published by
629
# the Free Software Foundation; either version 2, or (at your option)
632
# This program is distributed in the hope that it will be useful,
633
# but WITHOUT ANY WARRANTY; without even the implied warranty of
634
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
635
# GNU General Public License for more details.
637
# You should have received a copy of the GNU General Public License
638
# along with this program; if not, write to the Free Software
639
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
646
# Check to see how make treats includes.
647
AC_DEFUN([AM_MAKE_INCLUDE],
648
[am_make=${MAKE-make}
649
cat > confinc << 'END'
654
# If we don't find an include directive, just comment out the code.
655
AC_MSG_CHECKING([for style of include used by $am_make])
659
# First try GNU make style include.
660
echo "include confinc" > confmf
661
# We grep out `Entering directory' and `Leaving directory'
662
# messages which can occur if `w' ends up in MAKEFLAGS.
663
# In particular we don't look at `^make:' because GNU make might
664
# be invoked under some other name (usually "gmake"), in which
665
# case it prints its new name instead of `make'.
666
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
671
# Now try BSD make style include.
672
if test "$am__include" = "#"; then
673
echo '.include "confinc"' > confmf
674
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
680
AC_SUBST([am__include])
681
AC_SUBST([am__quote])
682
AC_MSG_RESULT([$_am_result])
689
# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
691
# This program is free software; you can redistribute it and/or modify
692
# it under the terms of the GNU General Public License as published by
693
# the Free Software Foundation; either version 2, or (at your option)
696
# This program is distributed in the hope that it will be useful,
697
# but WITHOUT ANY WARRANTY; without even the implied warranty of
698
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
699
# GNU General Public License for more details.
701
# You should have received a copy of the GNU General Public License
702
# along with this program; if not, write to the Free Software
703
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
708
# AM_MISSING_PROG(NAME, PROGRAM)
709
# ------------------------------
710
AC_DEFUN([AM_MISSING_PROG],
711
[AC_REQUIRE([AM_MISSING_HAS_RUN])
712
$1=${$1-"${am_missing_run}$2"}
718
# Define MISSING if not defined so far and test if it supports --run.
719
# If it does, set am_missing_run to use it, otherwise, to nothing.
720
AC_DEFUN([AM_MISSING_HAS_RUN],
721
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
722
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
723
# Use eval to expand $SHELL
724
if eval "$MISSING --run true"; then
725
am_missing_run="$MISSING --run "
728
AC_MSG_WARN([`missing' script is too old or missing])
734
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
736
# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
738
# This program is free software; you can redistribute it and/or modify
739
# it under the terms of the GNU General Public License as published by
740
# the Free Software Foundation; either version 2, or (at your option)
743
# This program is distributed in the hope that it will be useful,
744
# but WITHOUT ANY WARRANTY; without even the implied warranty of
745
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
746
# GNU General Public License for more details.
748
# You should have received a copy of the GNU General Public License
749
# along with this program; if not, write to the Free Software
750
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
753
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
754
# created by `make install' are always world readable, even if the
755
# installer happens to have an overly restrictive umask (e.g. 077).
756
# This was a mistake. There are at least two reasons why we must not
758
# - it causes special bits like SGID to be ignored,
759
# - it may be too restrictive (some setups expect 775 directories).
761
# Do not use -m 0755 and let people choose whatever they expect by
764
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
765
# Some implementations (such as Solaris 8's) are not thread-safe: if a
766
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
767
# concurrently, both version can detect that a/ is missing, but only
768
# one can create it and the other will error out. Consequently we
769
# restrict ourselves to GNU make (using the --version option ensures
771
AC_DEFUN([AM_PROG_MKDIR_P],
772
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
773
# We used to keeping the `.' as first argument, in order to
774
# allow $(mkdir_p) to be used without argument. As in
775
# $(mkdir_p) $(somedir)
776
# where $(somedir) is conditionally defined. However this is wrong
778
# 1. if the package is installed by a user who cannot write `.'
779
# make install will fail,
780
# 2. the above comment should most certainly read
781
# $(mkdir_p) $(DESTDIR)$(somedir)
782
# so it does not work when $(somedir) is undefined and
784
# To support the latter case, we have to write
785
# test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
786
# so the `.' trick is pointless.
787
mkdir_p='mkdir -p --'
789
# On NextStep and OpenStep, the `mkdir' command does not
790
# recognize any option. It will interpret all options as
791
# directories to create, and then abort because `.' already
793
for d in ./-p ./--version;
795
test -d $d && rmdir $d
797
# $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
798
if test -f "$ac_aux_dir/mkinstalldirs"; then
799
mkdir_p='$(mkinstalldirs)'
801
mkdir_p='$(install_sh) -d'
804
AC_SUBST([mkdir_p])])
806
# Helper functions for option handling. -*- Autoconf -*-
808
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
810
# This program is free software; you can redistribute it and/or modify
811
# it under the terms of the GNU General Public License as published by
812
# the Free Software Foundation; either version 2, or (at your option)
815
# This program is distributed in the hope that it will be useful,
816
# but WITHOUT ANY WARRANTY; without even the implied warranty of
817
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
818
# GNU General Public License for more details.
820
# You should have received a copy of the GNU General Public License
821
# along with this program; if not, write to the Free Software
822
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
827
# _AM_MANGLE_OPTION(NAME)
828
# -----------------------
829
AC_DEFUN([_AM_MANGLE_OPTION],
830
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
832
# _AM_SET_OPTION(NAME)
833
# ------------------------------
834
# Set option NAME. Presently that only means defining a flag for this option.
835
AC_DEFUN([_AM_SET_OPTION],
836
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
838
# _AM_SET_OPTIONS(OPTIONS)
839
# ----------------------------------
840
# OPTIONS is a space-separated list of Automake options.
841
AC_DEFUN([_AM_SET_OPTIONS],
842
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
844
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
845
# -------------------------------------------
846
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
847
AC_DEFUN([_AM_IF_OPTION],
848
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
851
# Check to make sure that the build environment is sane.
854
# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
856
# This program is free software; you can redistribute it and/or modify
857
# it under the terms of the GNU General Public License as published by
858
# the Free Software Foundation; either version 2, or (at your option)
861
# This program is distributed in the hope that it will be useful,
862
# but WITHOUT ANY WARRANTY; without even the implied warranty of
863
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
864
# GNU General Public License for more details.
866
# You should have received a copy of the GNU General Public License
867
# along with this program; if not, write to the Free Software
868
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
875
AC_DEFUN([AM_SANITY_CHECK],
876
[AC_MSG_CHECKING([whether build environment is sane])
879
echo timestamp > conftest.file
880
# Do `set' in a subshell so we don't clobber the current shell's
881
# arguments. Must try -L first in case configure is actually a
882
# symlink; some systems play weird games with the mod time of symlinks
883
# (eg FreeBSD returns the mod time of the symlink's containing
886
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
887
if test "$[*]" = "X"; then
889
set X `ls -t $srcdir/configure conftest.file`
892
if test "$[*]" != "X $srcdir/configure conftest.file" \
893
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
895
# If neither matched, then we have a broken ls. This can happen
896
# if, for instance, CONFIG_SHELL is bash and it inherits a
897
# broken ls alias from the environment. This has actually
898
# happened. Such a system could not be considered "sane".
899
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
900
alias in your environment])
903
test "$[2]" = conftest.file
909
AC_MSG_ERROR([newly created file is older than distributed files!
910
Check your system clock])
914
# AM_PROG_INSTALL_STRIP
916
# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
918
# This program is free software; you can redistribute it and/or modify
919
# it under the terms of the GNU General Public License as published by
920
# the Free Software Foundation; either version 2, or (at your option)
923
# This program is distributed in the hope that it will be useful,
924
# but WITHOUT ANY WARRANTY; without even the implied warranty of
925
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
926
# GNU General Public License for more details.
928
# You should have received a copy of the GNU General Public License
929
# along with this program; if not, write to the Free Software
930
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
933
# One issue with vendor `install' (even GNU) is that you can't
934
# specify the program used to strip binaries. This is especially
935
# annoying in cross-compiling environments, where the build's strip
936
# is unlikely to handle the host's binaries.
937
# Fortunately install-sh will honor a STRIPPROG variable, so we
938
# always use install-sh in `make install-strip', and initialize
939
# STRIPPROG with the value of the STRIP variable (set by the user).
940
AC_DEFUN([AM_PROG_INSTALL_STRIP],
941
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
942
# Installed binaries are usually stripped using `strip' when the user
943
# run `make install-strip'. However `strip' might not be the right
944
# tool to use in cross-compilation environments, therefore Automake
945
# will honor the `STRIP' environment variable to overrule this program.
946
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
947
if test "$cross_compiling" != no; then
948
AC_CHECK_TOOL([STRIP], [strip], :)
950
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
951
AC_SUBST([INSTALL_STRIP_PROGRAM])])
953
# Check how to create a tarball. -*- Autoconf -*-
955
# Copyright (C) 2004 Free Software Foundation, Inc.
957
# This program is free software; you can redistribute it and/or modify
958
# it under the terms of the GNU General Public License as published by
959
# the Free Software Foundation; either version 2, or (at your option)
962
# This program is distributed in the hope that it will be useful,
963
# but WITHOUT ANY WARRANTY; without even the implied warranty of
964
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
965
# GNU General Public License for more details.
967
# You should have received a copy of the GNU General Public License
968
# along with this program; if not, write to the Free Software
969
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
975
# _AM_PROG_TAR(FORMAT)
976
# --------------------
977
# Check how to create a tarball in format FORMAT.
978
# FORMAT should be one of `v7', `ustar', or `pax'.
980
# Substitute a variable $(am__tar) that is a command
981
# writing to stdout a FORMAT-tarball containing the directory
983
# tardir=directory && $(am__tar) > result.tar
985
# Substitute a variable $(am__untar) that extract such
986
# a tarball read from stdin.
987
# $(am__untar) < result.tar
988
AC_DEFUN([_AM_PROG_TAR],
989
[# Always define AMTAR for backward compatibility.
990
AM_MISSING_PROG([AMTAR], [tar])
992
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
993
[m4_case([$1], [ustar],, [pax],,
994
[m4_fatal([Unknown tar format])])
995
AC_MSG_CHECKING([how to create a $1 tar archive])
996
# Loop over all known methods to create a tar archive until one works.
997
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
998
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
999
# Do not fold the above two line into one, because Tru64 sh and
1000
# Solaris sh will not grok spaces in the rhs of `-'.
1001
for _am_tool in $_am_tools
1005
for _am_tar in tar gnutar gtar;
1007
AM_RUN_LOG([$_am_tar --version]) && break
1009
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1010
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1011
am__untar="$_am_tar -xf -"
1014
# Must skip GNU tar: if it does not support --format= it doesn't create
1015
# ustar tarball either.
1016
(tar --version) >/dev/null 2>&1 && continue
1017
am__tar='tar chf - "$$tardir"'
1018
am__tar_='tar chf - "$tardir"'
1019
am__untar='tar xf -'
1022
am__tar='pax -L -x $1 -w "$$tardir"'
1023
am__tar_='pax -L -x $1 -w "$tardir"'
1027
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1028
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1029
am__untar='cpio -i -H $1 -d'
1038
# If the value was cached, stop now. We just wanted to have am__tar
1039
# and am__untar set.
1040
test -n "${am_cv_prog_tar_$1}" && break
1042
# tar/untar a dummy directory, and stop if the command works
1045
echo GrepMe > conftest.dir/file
1046
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1048
if test -s conftest.tar; then
1049
AM_RUN_LOG([$am__untar <conftest.tar])
1050
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1055
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1056
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1058
AC_SUBST([am__untar])
1061
dnl AM_GCONF_SOURCE_2
1062
dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas
1063
dnl (i.e. pass to gconftool-2
1064
dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where
1065
dnl you should install foo.schemas files
1068
AC_DEFUN([AM_GCONF_SOURCE_2],
1070
if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
1071
GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source`
1073
GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE
1076
AC_ARG_WITH(gconf-source,
1077
[ --with-gconf-source=sourceaddress Config database for installing schema files.],GCONF_SCHEMA_CONFIG_SOURCE="$withval",)
1079
AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE)
1080
AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation])
1082
if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then
1083
GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas'
1086
AC_ARG_WITH(gconf-schema-file-dir,
1087
[ --with-gconf-schema-file-dir=dir Directory for installing schema files.],GCONF_SCHEMA_FILE_DIR="$withval",)
1089
AC_SUBST(GCONF_SCHEMA_FILE_DIR)
1090
AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files])
1092
AC_ARG_ENABLE(schemas-install,
1093
[ --disable-schemas-install Disable the schemas installation],
1094
[case "${enableval}" in
1095
yes) schemas_install=true ;;
1096
no) schemas_install=false ;;
1097
*) AC_MSG_ERROR(bad value ${enableval} for --enable-schemas-install) ;;
1098
esac],[schemas_install=true])
1099
AM_CONDITIONAL(GCONF_SCHEMAS_INSTALL, test x$schemas_install = xtrue)
1102
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
1103
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
1105
# This file is free software, distributed under the terms of the GNU
1106
# General Public License. As a special exception to the GNU General
1107
# Public License, this file may be distributed as part of a program
1108
# that contains a configuration script generated by Autoconf, under
1109
# the same distribution terms as the rest of that program.
1111
# This file can be copied and used freely without restrictions. It can
1112
# be used in projects which are not available under the GNU Public License
1113
# but which still want to provide support for the GNU gettext functionality.
1115
# Macro to add for using GNU gettext.
1116
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
1118
# Modified to never use included libintl.
1119
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
1121
# Major rework to remove unused code
1122
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
1124
# Added better handling of ALL_LINGUAS from GNU gettext version
1125
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
1127
# Modified to require ngettext
1128
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
1130
# We need this here as well, since someone might use autoconf-2.5x
1131
# to configure GLib then an older version to configure a package
1132
# using AM_GLIB_GNU_GETTEXT
1136
dnl We go to great lengths to make sure that aclocal won't
1137
dnl try to pull in the installed version of these macros
1138
dnl when running aclocal in the glib directory.
1140
m4_copy([AC_DEFUN],[glib_DEFUN])
1141
m4_copy([AC_REQUIRE],[glib_REQUIRE])
1143
dnl At the end, if we're not within glib, we'll define the public
1144
dnl definitions in terms of our private definitions.
1148
#--------------------
1149
glib_DEFUN([GLIB_LC_MESSAGES],
1150
[AC_CHECK_HEADERS([locale.h])
1151
if test $ac_cv_header_locale_h = yes; then
1152
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
1153
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
1154
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
1155
if test $am_cv_val_LC_MESSAGES = yes; then
1156
AC_DEFINE(HAVE_LC_MESSAGES, 1,
1157
[Define if your <locale.h> file defines LC_MESSAGES.])
1161
# GLIB_PATH_PROG_WITH_TEST
1162
#----------------------------
1163
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
1164
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
1165
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
1166
[# Extract the first word of "$2", so it can be a program name with args.
1167
set dummy $2; ac_word=[$]2
1168
AC_MSG_CHECKING([for $ac_word])
1169
AC_CACHE_VAL(ac_cv_path_$1,
1172
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
1175
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1176
for ac_dir in ifelse([$5], , $PATH, [$5]); do
1177
test -z "$ac_dir" && ac_dir=.
1178
if test -f $ac_dir/$ac_word; then
1180
ac_cv_path_$1="$ac_dir/$ac_word"
1186
dnl If no 4th arg is given, leave the cache variable unset,
1187
dnl so AC_PATH_PROGS will keep looking.
1188
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
1193
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
1194
AC_MSG_RESULT([$]$1)
1203
glib_DEFUN([GLIB_WITH_NLS],
1204
dnl NLS is obligatory
1208
gt_cv_have_gettext=no
1214
AC_CHECK_HEADER(libintl.h,
1215
[gt_cv_func_dgettext_libintl="no"
1216
libintl_extra_libs=""
1219
# First check in libc
1221
AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
1223
#include <libintl.h>
1225
[return !ngettext ("","", 1)],
1226
gt_cv_func_ngettext_libc=yes,
1227
gt_cv_func_ngettext_libc=no)
1230
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
1231
AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
1233
#include <libintl.h>
1235
[return !dgettext ("","")],
1236
gt_cv_func_dgettext_libc=yes,
1237
gt_cv_func_dgettext_libc=no)
1241
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
1242
AC_CHECK_FUNCS(bind_textdomain_codeset)
1246
# If we don't have everything we want, check in libintl
1248
if test "$gt_cv_func_dgettext_libc" != "yes" \
1249
|| test "$gt_cv_func_ngettext_libc" != "yes" \
1250
|| test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
1252
AC_CHECK_LIB(intl, bindtextdomain,
1253
[AC_CHECK_LIB(intl, ngettext,
1254
[AC_CHECK_LIB(intl, dgettext,
1255
gt_cv_func_dgettext_libintl=yes)])])
1257
if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
1258
AC_MSG_CHECKING([if -liconv is needed to use gettext])
1260
AC_CHECK_LIB(intl, ngettext,
1261
[AC_CHECK_LIB(intl, dcgettext,
1262
[gt_cv_func_dgettext_libintl=yes
1263
libintl_extra_libs=-liconv],
1269
# If we found libintl, then check in it for bind_textdomain_codeset();
1270
# we'll prefer libc if neither have bind_textdomain_codeset(),
1271
# and both have dgettext and ngettext
1273
if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
1274
glib_save_LIBS="$LIBS"
1275
LIBS="$LIBS -lintl $libintl_extra_libs"
1276
unset ac_cv_func_bind_textdomain_codeset
1277
AC_CHECK_FUNCS(bind_textdomain_codeset)
1278
LIBS="$glib_save_LIBS"
1280
if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
1281
gt_cv_func_dgettext_libc=no
1283
if test "$gt_cv_func_dgettext_libc" = "yes" \
1284
&& test "$gt_cv_func_ngettext_libc" = "yes"; then
1285
gt_cv_func_dgettext_libintl=no
1291
if test "$gt_cv_func_dgettext_libc" = "yes" \
1292
|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
1293
gt_cv_have_gettext=yes
1296
if test "$gt_cv_func_dgettext_libintl" = "yes"; then
1297
INTLLIBS="-lintl $libintl_extra_libs"
1300
if test "$gt_cv_have_gettext" = "yes"; then
1301
AC_DEFINE(HAVE_GETTEXT,1,
1302
[Define if the GNU gettext() function is already present or preinstalled.])
1303
GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
1304
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
1305
if test "$MSGFMT" != "no"; then
1306
glib_save_LIBS="$LIBS"
1307
LIBS="$LIBS $INTLLIBS"
1308
AC_CHECK_FUNCS(dcgettext)
1309
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1310
GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
1311
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
1312
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
1313
return _nl_msg_cat_cntr],
1318
dnl On Solaris, if bind_textdomain_codeset is in libc,
1319
dnl GNU format message catalog is always supported,
1320
dnl since both are added to the libc all together.
1321
dnl Hence, we'd like to go with DATADIRNAME=share and
1322
dnl and CATOBJEXT=.gmo in this case.
1323
AC_CHECK_FUNC(bind_textdomain_codeset,
1334
LIBS="$glib_save_LIBS"
1337
gt_cv_have_gettext=no
1342
if test "$gt_cv_have_gettext" = "yes" ; then
1343
AC_DEFINE(ENABLE_NLS, 1,
1344
[always defined to indicate that i18n is enabled])
1347
dnl Test whether we really found GNU xgettext.
1348
if test "$XGETTEXT" != ":"; then
1349
dnl If it is not GNU xgettext we define it as : so that the
1350
dnl Makefiles still can work.
1351
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
1355
[found xgettext program is not GNU xgettext; ignore it])
1360
# We need to process the po/ directory.
1364
[case "$CONFIG_FILES" in *po/Makefile.in*)
1365
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
1368
dnl These rules are solely for the distribution goal. While doing this
1369
dnl we only have to keep exactly one list of the available catalogs
1370
dnl in configure.in.
1371
for lang in $ALL_LINGUAS; do
1372
GMOFILES="$GMOFILES $lang.gmo"
1373
POFILES="$POFILES $lang.po"
1376
dnl Make all variables we use known to autoconf.
1379
AC_SUBST(DATADIRNAME)
1381
AC_SUBST(INSTOBJEXT)
1383
AC_SUBST(PO_IN_DATADIR_TRUE)
1384
AC_SUBST(PO_IN_DATADIR_FALSE)
1389
# AM_GLIB_GNU_GETTEXT
1390
# -------------------
1391
# Do checks necessary for use of gettext. If a suitable implementation
1392
# of gettext is found in either in libintl or in the C library,
1393
# it will set INTLLIBS to the libraries needed for use of gettext
1394
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
1395
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
1396
# on various variables needed by the Makefile.in.in installed by
1399
glib_DEFUN([GLIB_GNU_GETTEXT],
1400
[AC_REQUIRE([AC_PROG_CC])dnl
1401
AC_REQUIRE([AC_HEADER_STDC])dnl
1406
if test "$gt_cv_have_gettext" = "yes"; then
1407
if test "x$ALL_LINGUAS" = "x"; then
1410
AC_MSG_CHECKING(for catalogs to be installed)
1412
for presentlang in $ALL_LINGUAS; do
1414
if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
1415
desiredlanguages="$LINGUAS"
1417
desiredlanguages="$ALL_LINGUAS"
1419
for desiredlang in $desiredlanguages; do
1420
# Use the presentlang catalog if desiredlang is
1421
# a. equal to presentlang, or
1422
# b. a variant of presentlang (because in this case,
1423
# presentlang can be used as a fallback for messages
1424
# which are not translated in the desiredlang catalog).
1425
case "$desiredlang" in
1426
"$presentlang"*) useit=yes;;
1429
if test $useit = yes; then
1430
NEW_LINGUAS="$NEW_LINGUAS $presentlang"
1433
LINGUAS=$NEW_LINGUAS
1434
AC_MSG_RESULT($LINGUAS)
1437
dnl Construct list of names of catalog files to be constructed.
1438
if test -n "$LINGUAS"; then
1439
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
1443
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
1444
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
1445
dnl Try to locate is.
1447
if test -n "$ac_aux_dir"; then
1448
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
1450
if test -z "$MKINSTALLDIRS"; then
1451
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
1453
AC_SUBST(MKINSTALLDIRS)
1455
dnl Generate list of files to be processed by xgettext which will
1456
dnl be included in po/Makefile.
1457
test -d po || mkdir po
1458
if test "x$srcdir" != "x."; then
1459
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
1460
posrcprefix="$srcdir/"
1462
posrcprefix="../$srcdir/"
1468
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
1469
< $srcdir/po/POTFILES.in > po/POTFILES
1472
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
1473
# -------------------------------
1474
# Define VARIABLE to the location where catalog files will
1475
# be installed by po/Makefile.
1476
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
1477
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
1478
glib_save_prefix="$prefix"
1479
glib_save_exec_prefix="$exec_prefix"
1480
test "x$prefix" = xNONE && prefix=$ac_default_prefix
1481
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
1482
if test "x$CATOBJEXT" = "x.mo" ; then
1483
localedir=`eval echo "${libdir}/locale"`
1485
localedir=`eval echo "${datadir}/locale"`
1487
prefix="$glib_save_prefix"
1488
exec_prefix="$glib_save_exec_prefix"
1489
AC_DEFINE_UNQUOTED($1, "$localedir",
1490
[Define the location where the catalogs will be installed])
1494
dnl Now the definitions that aclocal will find
1496
ifdef(glib_configure_in,[],[
1497
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
1498
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
1502
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
1503
# serial 2 IT_PROG_INTLTOOL
1504
AC_DEFUN([IT_PROG_INTLTOOL],
1505
[AC_PREREQ([2.50])dnl
1507
if test -n "$1"; then
1508
AC_MSG_CHECKING(for intltool >= $1)
1510
INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 100 + $ 2; }'`
1511
INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in`
1512
[INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($ 2, VERSION, "."); print VERSION[1] * 100 + VERSION[2];}' ${ac_aux_dir}/intltool-update.in`
1514
AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
1515
test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
1516
AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
1519
INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1520
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1521
INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1522
INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1523
INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
1524
INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1525
INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1526
INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1527
INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1528
INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1529
INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1530
INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@'
1531
INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1532
INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1533
INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1534
INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1535
INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1537
AC_SUBST(INTLTOOL_DESKTOP_RULE)
1538
AC_SUBST(INTLTOOL_DIRECTORY_RULE)
1539
AC_SUBST(INTLTOOL_KEYS_RULE)
1540
AC_SUBST(INTLTOOL_PROP_RULE)
1541
AC_SUBST(INTLTOOL_OAF_RULE)
1542
AC_SUBST(INTLTOOL_PONG_RULE)
1543
AC_SUBST(INTLTOOL_SERVER_RULE)
1544
AC_SUBST(INTLTOOL_SHEET_RULE)
1545
AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
1546
AC_SUBST(INTLTOOL_UI_RULE)
1547
AC_SUBST(INTLTOOL_XAM_RULE)
1548
AC_SUBST(INTLTOOL_KBD_RULE)
1549
AC_SUBST(INTLTOOL_XML_RULE)
1550
AC_SUBST(INTLTOOL_XML_NOMERGE_RULE)
1551
AC_SUBST(INTLTOOL_CAVES_RULE)
1552
AC_SUBST(INTLTOOL_SCHEMAS_RULE)
1553
AC_SUBST(INTLTOOL_THEME_RULE)
1555
# Use the tools built into the package, not the ones that are installed.
1556
AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract')
1557
AC_SUBST(INTLTOOL_MERGE, '$(top_builddir)/intltool-merge')
1558
AC_SUBST(INTLTOOL_UPDATE, '$(top_builddir)/intltool-update')
1560
AC_PATH_PROG(INTLTOOL_PERL, perl)
1561
if test -z "$INTLTOOL_PERL"; then
1562
AC_MSG_ERROR([perl not found; required for intltool])
1564
if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
1565
AC_MSG_ERROR([perl 5.x required for intltool])
1567
if test "x$2" != "xno-xml"; then
1568
AC_MSG_CHECKING([for XML::Parser])
1569
if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
1572
AC_MSG_ERROR([XML::Parser perl module is required for intltool])
1576
AC_PATH_PROG(INTLTOOL_ICONV, iconv, iconv)
1577
AC_PATH_PROG(INTLTOOL_MSGFMT, msgfmt, msgfmt)
1578
AC_PATH_PROG(INTLTOOL_MSGMERGE, msgmerge, msgmerge)
1579
AC_PATH_PROG(INTLTOOL_XGETTEXT, xgettext, xgettext)
1581
# Remove file type tags (using []) from po/POTFILES.
1582
AC_CONFIG_COMMANDS_PRE([
1583
[mv -f po/POTFILES po/POTFILES.tmp
1584
sed -e '/[[]encoding.*]/d' -e 's/[[].*] *//' < po/POTFILES.tmp > po/POTFILES
1585
rm -f po/POTFILES.tmp
1589
# Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
1591
AC_CONFIG_COMMANDS([intltool], [
1593
intltool_edit="-e 's#@INTLTOOL_EXTRACT@#`pwd`/intltool-extract#g' \
1594
-e 's#@INTLTOOL_ICONV@#${INTLTOOL_ICONV}#g' \
1595
-e 's#@INTLTOOL_MSGFMT@#${INTLTOOL_MSGFMT}#g' \
1596
-e 's#@INTLTOOL_MSGMERGE@#${INTLTOOL_MSGMERGE}#g' \
1597
-e 's#@INTLTOOL_XGETTEXT@#${INTLTOOL_XGETTEXT}#g' \
1598
-e 's#@INTLTOOL_PERL@#${INTLTOOL_PERL}#g'"
1600
eval sed ${intltool_edit} < ${ac_aux_dir}/intltool-extract.in \
1601
> intltool-extract.out
1602
if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
1603
rm -f intltool-extract.out
1605
mv -f intltool-extract.out intltool-extract
1607
chmod ugo+x intltool-extract
1608
chmod u+w intltool-extract
1610
eval sed ${intltool_edit} < ${ac_aux_dir}/intltool-merge.in \
1611
> intltool-merge.out
1612
if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
1613
rm -f intltool-merge.out
1615
mv -f intltool-merge.out intltool-merge
1617
chmod ugo+x intltool-merge
1618
chmod u+w intltool-merge
1620
eval sed ${intltool_edit} < ${ac_aux_dir}/intltool-update.in \
1621
> intltool-update.out
1622
if cmp -s intltool-update intltool-update.out 2>/dev/null; then
1623
rm -f intltool-update.out
1625
mv -f intltool-update.out intltool-update
1627
chmod ugo+x intltool-update
1628
chmod u+w intltool-update
1630
], INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir=${ac_aux_dir}
1631
INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}' ICONV='${INTLTOOL_ICONV}'
1632
MSGFMT='${INTLTOOL_MSGFMT}' MSGMERGE='${INTLTOOL_MSGMERGE}'
1633
XGETTEXT='${INTLTOOL_XGETTEXT}')
1638
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
1639
# A hint is needed for aclocal from Automake <= 1.9.4:
1640
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
1643
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1645
# serial 47 AC_PROG_LIBTOOL
1648
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
1649
# -----------------------------------------------------------
1650
# If this macro is not defined by Autoconf, define it here.
1651
m4_ifdef([AC_PROVIDE_IFELSE],
1653
[m4_define([AC_PROVIDE_IFELSE],
1654
[m4_ifdef([AC_PROVIDE_$1],
1660
AC_DEFUN([AC_PROG_LIBTOOL],
1661
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
1662
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
1663
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
1664
AC_PROVIDE_IFELSE([AC_PROG_CXX],
1666
[define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
1668
dnl And a similar setup for Fortran 77 support
1669
AC_PROVIDE_IFELSE([AC_PROG_F77],
1671
[define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
1674
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
1675
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
1676
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
1677
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1679
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1681
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
1683
[ifdef([AC_PROG_GCJ],
1684
[define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
1685
ifdef([A][M_PROG_GCJ],
1686
[define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
1687
ifdef([LT_AC_PROG_GCJ],
1688
[define([LT_AC_PROG_GCJ],
1689
defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
1690
])])# AC_PROG_LIBTOOL
1695
AC_DEFUN([_AC_PROG_LIBTOOL],
1696
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
1697
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
1698
AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
1699
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
1701
# This can be used to rebuild libtool when needed
1702
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
1704
# Always use our own libtool.
1705
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1706
AC_SUBST(LIBTOOL)dnl
1708
# Prevent multiple expansion
1709
define([AC_PROG_LIBTOOL], [])
1710
])# _AC_PROG_LIBTOOL
1715
AC_DEFUN([AC_LIBTOOL_SETUP],
1717
AC_REQUIRE([AC_ENABLE_SHARED])dnl
1718
AC_REQUIRE([AC_ENABLE_STATIC])dnl
1719
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
1720
AC_REQUIRE([AC_CANONICAL_HOST])dnl
1721
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1722
AC_REQUIRE([AC_PROG_CC])dnl
1723
AC_REQUIRE([AC_PROG_LD])dnl
1724
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
1725
AC_REQUIRE([AC_PROG_NM])dnl
1727
AC_REQUIRE([AC_PROG_LN_S])dnl
1728
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
1729
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
1730
AC_REQUIRE([AC_OBJEXT])dnl
1731
AC_REQUIRE([AC_EXEEXT])dnl
1734
AC_LIBTOOL_SYS_MAX_CMD_LEN
1735
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1738
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1739
_LT_AC_PROG_ECHO_BACKSLASH
1743
# AIX sometimes has problems with the GCC collect2 program. For some
1744
# reason, if we set the COLLECT_NAMES environment variable, the problems
1745
# vanish in a puff of smoke.
1746
if test "X${COLLECT_NAMES+set}" != Xset; then
1748
export COLLECT_NAMES
1753
# Sed substitution that helps us do robust quoting. It backslashifies
1754
# metacharacters that are still active within double-quoted strings.
1755
Xsed='sed -e 1s/^X//'
1756
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
1758
# Same as above, but do not quote variable references.
1759
[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
1761
# Sed substitution to delay expansion of an escaped shell variable in a
1762
# double_quote_subst'ed string.
1763
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1765
# Sed substitution to avoid accidental globbing in evaled expressions
1766
no_glob_subst='s/\*/\\\*/g'
1772
default_ofile=libtool
1773
can_build_shared=yes
1775
# All known linkers require a `.a' archive for static linking (except M$VC,
1776
# which needs '.lib').
1778
ltmain="$ac_aux_dir/ltmain.sh"
1779
ofile="$default_ofile"
1780
with_gnu_ld="$lt_cv_prog_gnu_ld"
1782
AC_CHECK_TOOL(AR, ar, false)
1783
AC_CHECK_TOOL(RANLIB, ranlib, :)
1784
AC_CHECK_TOOL(STRIP, strip, :)
1787
old_CFLAGS="$CFLAGS"
1789
# Set sane defaults for various variables
1790
test -z "$AR" && AR=ar
1791
test -z "$AR_FLAGS" && AR_FLAGS=cru
1792
test -z "$AS" && AS=as
1793
test -z "$CC" && CC=cc
1794
test -z "$LTCC" && LTCC=$CC
1795
test -z "$DLLTOOL" && DLLTOOL=dlltool
1796
test -z "$LD" && LD=ld
1797
test -z "$LN_S" && LN_S="ln -s"
1798
test -z "$MAGIC_CMD" && MAGIC_CMD=file
1799
test -z "$NM" && NM=nm
1800
test -z "$SED" && SED=sed
1801
test -z "$OBJDUMP" && OBJDUMP=objdump
1802
test -z "$RANLIB" && RANLIB=:
1803
test -z "$STRIP" && STRIP=:
1804
test -z "$ac_objext" && ac_objext=o
1806
# Determine commands to create old-style static archives.
1807
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1808
old_postinstall_cmds='chmod 644 $oldlib'
1809
old_postuninstall_cmds=
1811
if test -n "$RANLIB"; then
1814
old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1817
old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1820
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1823
_LT_CC_BASENAME([$compiler])
1825
# Only perform the check for file, if the check method requires it
1826
case $deplibs_check_method in
1828
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1834
AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1835
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1836
enable_win32_dll=yes, enable_win32_dll=no)
1838
AC_ARG_ENABLE([libtool-lock],
1839
[AC_HELP_STRING([--disable-libtool-lock],
1840
[avoid locking (might break parallel builds)])])
1841
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1844
[AC_HELP_STRING([--with-pic],
1845
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
1846
[pic_mode="$withval"],
1848
test -z "$pic_mode" && pic_mode=default
1850
# Use C for the default configuration in the libtool script
1852
AC_LIBTOOL_LANG_C_CONFIG
1854
])# AC_LIBTOOL_SETUP
1857
# _LT_AC_SYS_COMPILER
1858
# -------------------
1859
AC_DEFUN([_LT_AC_SYS_COMPILER],
1860
[AC_REQUIRE([AC_PROG_CC])dnl
1862
# If no C compiler was specified, use CC.
1865
# Allow CC to be a program name with arguments.
1867
])# _LT_AC_SYS_COMPILER
1870
# _LT_CC_BASENAME(CC)
1871
# -------------------
1872
# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
1873
AC_DEFUN([_LT_CC_BASENAME],
1874
[for cc_temp in $1""; do
1876
compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1877
distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1882
cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
1886
# _LT_COMPILER_BOILERPLATE
1887
# ------------------------
1888
# Check for compiler boilerplate output or warnings with
1889
# the simple compiler test code.
1890
AC_DEFUN([_LT_COMPILER_BOILERPLATE],
1891
[ac_outfile=conftest.$ac_objext
1892
printf "$lt_simple_compile_test_code" >conftest.$ac_ext
1893
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
1894
_lt_compiler_boilerplate=`cat conftest.err`
1896
])# _LT_COMPILER_BOILERPLATE
1899
# _LT_LINKER_BOILERPLATE
1900
# ----------------------
1901
# Check for linker boilerplate output or warnings with
1902
# the simple link test code.
1903
AC_DEFUN([_LT_LINKER_BOILERPLATE],
1904
[ac_outfile=conftest.$ac_objext
1905
printf "$lt_simple_link_test_code" >conftest.$ac_ext
1906
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
1907
_lt_linker_boilerplate=`cat conftest.err`
1909
])# _LT_LINKER_BOILERPLATE
1912
# _LT_AC_SYS_LIBPATH_AIX
1913
# ----------------------
1914
# Links a minimal program and checks the executable
1915
# for the system default hardcoded library path. In most cases,
1916
# this is /usr/lib:/lib, but when the MPI compilers are used
1917
# the location of the communication and MPI libs are included too.
1918
# If we don't find anything, use the default library path according
1919
# to the aix ld manual.
1920
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
1921
[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1922
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
1924
# Check for a 64-bit object if we didn't find anything.
1925
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; }
1927
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1928
])# _LT_AC_SYS_LIBPATH_AIX
1931
# _LT_AC_SHELL_INIT(ARG)
1932
# ----------------------
1933
AC_DEFUN([_LT_AC_SHELL_INIT],
1934
[ifdef([AC_DIVERSION_NOTICE],
1935
[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1936
[AC_DIVERT_PUSH(NOTICE)])
1939
])# _LT_AC_SHELL_INIT
1942
# _LT_AC_PROG_ECHO_BACKSLASH
1943
# --------------------------
1944
# Add some code to the start of the generated configure script which
1945
# will find an echo command which doesn't interpret backslashes.
1946
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1947
[_LT_AC_SHELL_INIT([
1948
# Check that we are running under the correct shell.
1949
SHELL=${CONFIG_SHELL-/bin/sh}
1953
# Remove one level of quotation (which was required for Make).
1954
ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1959
if test "X[$]1" = X--no-reexec; then
1960
# Discard the --no-reexec flag, and continue.
1962
elif test "X[$]1" = X--fallback-echo; then
1963
# Avoid inline document here, it may be left over
1965
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
1966
# Yippee, $echo works!
1969
# Restart under the correct shell.
1970
exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1973
if test "X[$]1" = X--fallback-echo; then
1974
# used as fallback echo
1982
# The HP-UX ksh and POSIX shell print the target directory to stdout
1984
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1986
if test -z "$ECHO"; then
1987
if test "X${echo_test_string+set}" != Xset; then
1988
# find a string as large as possible, as long as the shell can cope with it
1989
for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1990
# expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1991
if (echo_test_string="`eval $cmd`") 2>/dev/null &&
1992
echo_test_string="`eval $cmd`" &&
1993
(test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
2000
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
2001
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
2002
test "X$echo_testing_string" = "X$echo_test_string"; then
2005
# The Solaris, AIX, and Digital Unix default echo programs unquote
2006
# backslashes. This makes it impossible to quote backslashes using
2007
# echo "$something" | sed 's/\\/\\\\/g'
2009
# So, first we look for a working echo in the user's PATH.
2011
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2012
for dir in $PATH /usr/ucb; do
2014
if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
2015
test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
2016
echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
2017
test "X$echo_testing_string" = "X$echo_test_string"; then
2024
if test "X$echo" = Xecho; then
2025
# We didn't find a better echo, so look for alternatives.
2026
if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
2027
echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
2028
test "X$echo_testing_string" = "X$echo_test_string"; then
2029
# This shell has a builtin print -r that does the trick.
2031
elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
2032
test "X$CONFIG_SHELL" != X/bin/ksh; then
2033
# If we have ksh, try running configure again with it.
2034
ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
2035
export ORIGINAL_CONFIG_SHELL
2036
CONFIG_SHELL=/bin/ksh
2038
exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
2042
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
2043
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
2044
test "X$echo_testing_string" = "X$echo_test_string"; then
2045
# Cool, printf works
2047
elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
2048
test "X$echo_testing_string" = 'X\t' &&
2049
echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
2050
test "X$echo_testing_string" = "X$echo_test_string"; then
2051
CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
2053
SHELL="$CONFIG_SHELL"
2055
echo="$CONFIG_SHELL [$]0 --fallback-echo"
2056
elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
2057
test "X$echo_testing_string" = 'X\t' &&
2058
echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
2059
test "X$echo_testing_string" = "X$echo_test_string"; then
2060
echo="$CONFIG_SHELL [$]0 --fallback-echo"
2062
# maybe with a smaller string...
2065
for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
2066
if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
2073
if test "$prev" != 'sed 50q "[$]0"'; then
2074
echo_test_string=`eval $prev`
2075
export echo_test_string
2076
exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
2078
# Oops. We lost completely, so just stick with echo.
2087
# Copy echo and quote the copy suitably for passing to libtool from
2088
# the Makefile, instead of quoting the original, which is used later.
2090
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
2091
ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
2095
])])# _LT_AC_PROG_ECHO_BACKSLASH
2100
AC_DEFUN([_LT_AC_LOCK],
2101
[AC_ARG_ENABLE([libtool-lock],
2102
[AC_HELP_STRING([--disable-libtool-lock],
2103
[avoid locking (might break parallel builds)])])
2104
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2106
# Some flags need to be propagated to the compiler or linker for good
2110
# Find out which ABI we are using.
2111
echo 'int i;' > conftest.$ac_ext
2112
if AC_TRY_EVAL(ac_compile); then
2113
case `/usr/bin/file conftest.$ac_objext` in
2125
# Find out which ABI we are using.
2126
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
2127
if AC_TRY_EVAL(ac_compile); then
2128
if test "$lt_cv_prog_gnu_ld" = yes; then
2129
case `/usr/bin/file conftest.$ac_objext` in
2131
LD="${LD-ld} -melf32bsmip"
2134
LD="${LD-ld} -melf32bmipn32"
2137
LD="${LD-ld} -melf64bmip"
2141
case `/usr/bin/file conftest.$ac_objext` in
2157
x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
2158
# Find out which ABI we are using.
2159
echo 'int i;' > conftest.$ac_ext
2160
if AC_TRY_EVAL(ac_compile); then
2161
case "`/usr/bin/file conftest.o`" in
2165
LD="${LD-ld} -m elf_i386"
2167
ppc64-*linux*|powerpc64-*linux*)
2168
LD="${LD-ld} -m elf32ppclinux"
2171
LD="${LD-ld} -m elf_s390"
2174
LD="${LD-ld} -m elf32_sparc"
2181
LD="${LD-ld} -m elf_x86_64"
2183
ppc*-*linux*|powerpc*-*linux*)
2184
LD="${LD-ld} -m elf64ppc"
2187
LD="${LD-ld} -m elf64_s390"
2190
LD="${LD-ld} -m elf64_sparc"
2200
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
2201
SAVE_CFLAGS="$CFLAGS"
2202
CFLAGS="$CFLAGS -belf"
2203
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2205
AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2207
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2208
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2209
CFLAGS="$SAVE_CFLAGS"
2212
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
2213
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
2214
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
2215
AC_CHECK_TOOL(AS, as, false)
2216
AC_CHECK_TOOL(OBJDUMP, objdump, false)
2221
need_locks="$enable_libtool_lock"
2226
# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2227
# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2228
# ----------------------------------------------------------------
2229
# Check whether the given compiler option works
2230
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
2231
[AC_REQUIRE([LT_AC_PROG_SED])
2232
AC_CACHE_CHECK([$1], [$2],
2234
ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2235
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
2236
lt_compiler_flag="$3"
2237
# Insert the option either (1) after the last *FLAGS variable, or
2238
# (2) before a word containing "conftest.", or (3) at the end.
2239
# Note that $ac_compile itself does not contain backslashes and begins
2240
# with a dollar sign (not a hyphen), so the echo should work correctly.
2241
# The option is referenced via a variable to avoid confusing sed.
2242
lt_compile=`echo "$ac_compile" | $SED \
2243
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
2244
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2245
-e 's:$: $lt_compiler_flag:'`
2246
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2247
(eval "$lt_compile" 2>conftest.err)
2249
cat conftest.err >&AS_MESSAGE_LOG_FD
2250
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2251
if (exit $ac_status) && test -s "$ac_outfile"; then
2252
# The compiler can only warn and ignore the option if not recognized
2253
# So say no if there are warnings other than the usual output.
2254
$echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
2255
$SED '/^$/d' conftest.err >conftest.er2
2256
if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
2263
if test x"[$]$2" = xyes; then
2264
ifelse([$5], , :, [$5])
2266
ifelse([$6], , :, [$6])
2268
])# AC_LIBTOOL_COMPILER_OPTION
2271
# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2272
# [ACTION-SUCCESS], [ACTION-FAILURE])
2273
# ------------------------------------------------------------
2274
# Check whether the given compiler option works
2275
AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
2276
[AC_CACHE_CHECK([$1], [$2],
2278
save_LDFLAGS="$LDFLAGS"
2279
LDFLAGS="$LDFLAGS $3"
2280
printf "$lt_simple_link_test_code" > conftest.$ac_ext
2281
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2282
# The compiler can only warn and ignore the option if not recognized
2283
# So say no if there are warnings
2284
if test -s conftest.err; then
2285
# Append any errors to the config.log.
2286
cat conftest.err 1>&AS_MESSAGE_LOG_FD
2287
$echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp
2288
$SED '/^$/d' conftest.err >conftest.er2
2289
if diff conftest.exp conftest.er2 >/dev/null; then
2297
LDFLAGS="$save_LDFLAGS"
2300
if test x"[$]$2" = xyes; then
2301
ifelse([$4], , :, [$4])
2303
ifelse([$5], , :, [$5])
2305
])# AC_LIBTOOL_LINKER_OPTION
2308
# AC_LIBTOOL_SYS_MAX_CMD_LEN
2309
# --------------------------
2310
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
2311
[# find the maximum length of command line arguments
2312
AC_MSG_CHECKING([the maximum length of command line arguments])
2313
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2319
# On DJGPP, this test can blow up pretty badly due to problems in libc
2320
# (any single argument exceeding 2000 bytes causes a buffer overrun
2321
# during glob expansion). Even if it were fixed, the result of this
2322
# check would be larger than it should be.
2323
lt_cv_sys_max_cmd_len=12288; # 12K is about right
2327
# Under GNU Hurd, this test is not required because there is
2328
# no limit to the length of command line arguments.
2329
# Libtool will interpret -1 as no limit whatsoever
2330
lt_cv_sys_max_cmd_len=-1;
2334
# On Win9x/ME, this test blows up -- it succeeds, but takes
2335
# about 5 minutes as the teststring grows exponentially.
2336
# Worse, since 9x/ME are not pre-emptively multitasking,
2337
# you end up with a "frozen" computer, even though with patience
2338
# the test eventually succeeds (with a max line length of 256k).
2339
# Instead, let's just punt: use the minimum linelength reported by
2340
# all of the supported platforms: 8192 (on NT/2K/XP).
2341
lt_cv_sys_max_cmd_len=8192;
2345
# On AmigaOS with pdksh, this test takes hours, literally.
2346
# So we just punt and use a minimum line length of 8192.
2347
lt_cv_sys_max_cmd_len=8192;
2350
netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2351
# This has been around since 386BSD, at least. Likely further.
2352
if test -x /sbin/sysctl; then
2353
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2354
elif test -x /usr/sbin/sysctl; then
2355
lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2357
lt_cv_sys_max_cmd_len=65536 # usable default for *BSD
2359
# And add a safety zone
2360
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2361
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2364
# Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2365
# due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2366
# nice to cause kernel panics so lets avoid the loop below.
2367
# First set a reasonable default.
2368
lt_cv_sys_max_cmd_len=16384
2370
if test -x /sbin/sysconfig; then
2371
case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2372
*1*) lt_cv_sys_max_cmd_len=-1 ;;
2377
# If test is not a shell built-in, we'll probably end up computing a
2378
# maximum length that is only half of the actual maximum length, but
2380
SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2381
while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
2382
= "XX$teststring") >/dev/null 2>&1 &&
2383
new_result=`expr "X$teststring" : ".*" 2>&1` &&
2384
lt_cv_sys_max_cmd_len=$new_result &&
2385
test $i != 17 # 1/2 MB should be enough
2388
teststring=$teststring$teststring
2391
# Add a significant safety factor because C++ compilers can tack on massive
2392
# amounts of additional arguments before passing them to the linker.
2393
# It appears as though 1/2 is a usable value.
2394
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2398
if test -n $lt_cv_sys_max_cmd_len ; then
2399
AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2403
])# AC_LIBTOOL_SYS_MAX_CMD_LEN
2406
# _LT_AC_CHECK_DLFCN
2407
# --------------------
2408
AC_DEFUN([_LT_AC_CHECK_DLFCN],
2409
[AC_CHECK_HEADERS(dlfcn.h)dnl
2410
])# _LT_AC_CHECK_DLFCN
2413
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2414
# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2415
# ------------------------------------------------------------------
2416
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
2417
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
2418
if test "$cross_compiling" = yes; then :
2421
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2422
lt_status=$lt_dlunknown
2423
cat > conftest.$ac_ext <<EOF
2424
[#line __oline__ "configure"
2425
#include "confdefs.h"
2434
# define LT_DLGLOBAL RTLD_GLOBAL
2437
# define LT_DLGLOBAL DL_GLOBAL
2439
# define LT_DLGLOBAL 0
2443
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2444
find out it does not work in some platform. */
2445
#ifndef LT_DLLAZY_OR_NOW
2447
# define LT_DLLAZY_OR_NOW RTLD_LAZY
2450
# define LT_DLLAZY_OR_NOW DL_LAZY
2453
# define LT_DLLAZY_OR_NOW RTLD_NOW
2456
# define LT_DLLAZY_OR_NOW DL_NOW
2458
# define LT_DLLAZY_OR_NOW 0
2466
extern "C" void exit (int);
2469
void fnord() { int i=42;}
2472
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2473
int status = $lt_dlunknown;
2477
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
2478
else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
2479
/* dlclose (self); */
2485
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
2486
(./conftest; exit; ) 2>/dev/null
2489
x$lt_dlno_uscore) $1 ;;
2490
x$lt_dlneed_uscore) $2 ;;
2491
x$lt_unknown|x*) $3 ;;
2494
# compilation failed
2499
])# _LT_AC_TRY_DLOPEN_SELF
2502
# AC_LIBTOOL_DLOPEN_SELF
2503
# -------------------
2504
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
2505
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
2506
if test "x$enable_dlopen" != xyes; then
2507
enable_dlopen=unknown
2508
enable_dlopen_self=unknown
2509
enable_dlopen_self_static=unknown
2516
lt_cv_dlopen="load_add_on"
2518
lt_cv_dlopen_self=yes
2522
lt_cv_dlopen="LoadLibrary"
2527
lt_cv_dlopen="dlopen"
2532
# if libdl is installed we need to link against it
2533
AC_CHECK_LIB([dl], [dlopen],
2534
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2537
lt_cv_dlopen_self=yes
2542
AC_CHECK_FUNC([shl_load],
2543
[lt_cv_dlopen="shl_load"],
2544
[AC_CHECK_LIB([dld], [shl_load],
2545
[lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
2546
[AC_CHECK_FUNC([dlopen],
2547
[lt_cv_dlopen="dlopen"],
2548
[AC_CHECK_LIB([dl], [dlopen],
2549
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2550
[AC_CHECK_LIB([svld], [dlopen],
2551
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2552
[AC_CHECK_LIB([dld], [dld_link],
2553
[lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
2562
if test "x$lt_cv_dlopen" != xno; then
2568
case $lt_cv_dlopen in
2570
save_CPPFLAGS="$CPPFLAGS"
2571
test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2573
save_LDFLAGS="$LDFLAGS"
2574
eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2577
LIBS="$lt_cv_dlopen_libs $LIBS"
2579
AC_CACHE_CHECK([whether a program can dlopen itself],
2580
lt_cv_dlopen_self, [dnl
2581
_LT_AC_TRY_DLOPEN_SELF(
2582
lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2583
lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2586
if test "x$lt_cv_dlopen_self" = xyes; then
2587
LDFLAGS="$LDFLAGS $link_static_flag"
2588
AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2589
lt_cv_dlopen_self_static, [dnl
2590
_LT_AC_TRY_DLOPEN_SELF(
2591
lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2592
lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
2596
CPPFLAGS="$save_CPPFLAGS"
2597
LDFLAGS="$save_LDFLAGS"
2602
case $lt_cv_dlopen_self in
2603
yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2604
*) enable_dlopen_self=unknown ;;
2607
case $lt_cv_dlopen_self_static in
2608
yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2609
*) enable_dlopen_self_static=unknown ;;
2612
])# AC_LIBTOOL_DLOPEN_SELF
2615
# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
2616
# ---------------------------------
2617
# Check to see if options -c and -o are simultaneously supported by compiler
2618
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
2619
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
2620
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2621
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2622
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2623
$rm -r conftest 2>/dev/null
2627
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
2629
lt_compiler_flag="-o out/conftest2.$ac_objext"
2630
# Insert the option either (1) after the last *FLAGS variable, or
2631
# (2) before a word containing "conftest.", or (3) at the end.
2632
# Note that $ac_compile itself does not contain backslashes and begins
2633
# with a dollar sign (not a hyphen), so the echo should work correctly.
2634
lt_compile=`echo "$ac_compile" | $SED \
2635
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
2636
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2637
-e 's:$: $lt_compiler_flag:'`
2638
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2639
(eval "$lt_compile" 2>out/conftest.err)
2641
cat out/conftest.err >&AS_MESSAGE_LOG_FD
2642
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2643
if (exit $ac_status) && test -s out/conftest2.$ac_objext
2645
# The compiler can only warn and ignore the option if not recognized
2646
# So say no if there are warnings
2647
$echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
2648
$SED '/^$/d' out/conftest.err >out/conftest.er2
2649
if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2650
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2655
# SGI C++ compiler will create directory out/ii_files/ for
2656
# template instantiation
2657
test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
2658
$rm out/* && rmdir out
2663
])# AC_LIBTOOL_PROG_CC_C_O
2666
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
2667
# -----------------------------------------
2668
# Check to see if we can do hard links to lock some files if needed
2669
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
2670
[AC_REQUIRE([_LT_AC_LOCK])dnl
2672
hard_links="nottested"
2673
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2674
# do not overwrite the value of need_locks provided by the user
2675
AC_MSG_CHECKING([if we can lock with hard links])
2678
ln conftest.a conftest.b 2>/dev/null && hard_links=no
2680
ln conftest.a conftest.b 2>&5 || hard_links=no
2681
ln conftest.a conftest.b 2>/dev/null && hard_links=no
2682
AC_MSG_RESULT([$hard_links])
2683
if test "$hard_links" = no; then
2684
AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2690
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
2695
AC_DEFUN([AC_LIBTOOL_OBJDIR],
2696
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2697
[rm -f .libs 2>/dev/null
2698
mkdir .libs 2>/dev/null
2699
if test -d .libs; then
2702
# MS-DOS does not allow filenames that begin with a dot.
2705
rmdir .libs 2>/dev/null])
2706
objdir=$lt_cv_objdir
2707
])# AC_LIBTOOL_OBJDIR
2710
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
2711
# ----------------------------------------------
2712
# Check hardcoding attributes.
2713
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
2714
[AC_MSG_CHECKING([how to hardcode library paths into programs])
2715
_LT_AC_TAGVAR(hardcode_action, $1)=
2716
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
2717
test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
2718
test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2720
# We can hardcode non-existant directories.
2721
if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
2722
# If the only mechanism to avoid hardcoding is shlibpath_var, we
2723
# have to relink, otherwise we might link with an installed library
2724
# when we should be linking with a yet-to-be-installed one
2725
## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2726
test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
2727
# Linking always hardcodes the temporary library directory.
2728
_LT_AC_TAGVAR(hardcode_action, $1)=relink
2730
# We can link without hardcoding, and we can hardcode nonexisting dirs.
2731
_LT_AC_TAGVAR(hardcode_action, $1)=immediate
2734
# We cannot hardcode anything, or else we can only hardcode existing
2736
_LT_AC_TAGVAR(hardcode_action, $1)=unsupported
2738
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
2740
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
2741
# Fast installation is not supported
2742
enable_fast_install=no
2743
elif test "$shlibpath_overrides_runpath" = yes ||
2744
test "$enable_shared" = no; then
2745
# Fast installation is not necessary
2746
enable_fast_install=needless
2748
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
2751
# AC_LIBTOOL_SYS_LIB_STRIP
2752
# ------------------------
2753
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
2756
AC_MSG_CHECKING([whether stripping libraries is possible])
2757
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2758
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2759
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2760
AC_MSG_RESULT([yes])
2762
# FIXME - insert some real tests, host_os isn't really good enough
2765
if test -n "$STRIP" ; then
2766
striplib="$STRIP -x"
2767
AC_MSG_RESULT([yes])
2777
])# AC_LIBTOOL_SYS_LIB_STRIP
2780
# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2781
# -----------------------------
2782
# PORTME Fill in your ld.so characteristics
2783
AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
2784
[AC_MSG_CHECKING([dynamic linker characteristics])
2786
libname_spec='lib$name'
2794
shlibpath_overrides_runpath=unknown
2796
dynamic_linker="$host_os ld.so"
2797
sys_lib_dlsearch_path_spec="/lib /usr/lib"
2798
if test "$GCC" = yes; then
2799
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2800
if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
2801
# if the path contains ";" then we assume it to be the separator
2802
# otherwise default to the standard path separator (i.e. ":") - it is
2803
# assumed that no part of a normal pathname contains ";" but that should
2804
# okay in the real world where ";" in dirpaths is itself problematic.
2805
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2807
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2810
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2812
need_lib_prefix=unknown
2813
hardcode_into_libs=no
2815
# when you set need_version to no, make sure it does not cause -set_version
2816
# flags to be left without arguments
2817
need_version=unknown
2822
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2823
shlibpath_var=LIBPATH
2825
# AIX 3 has no versioning support, so we append a major version to the name.
2826
soname_spec='${libname}${release}${shared_ext}$major'
2833
hardcode_into_libs=yes
2834
if test "$host_cpu" = ia64; then
2835
# AIX 5 supports IA64
2836
library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2837
shlibpath_var=LD_LIBRARY_PATH
2839
# With GCC up to 2.95.x, collect2 would create an import file
2840
# for dependence libraries. The import file would start with
2841
# the line `#! .'. This would cause the generated library to
2842
# depend on `.', always an invalid library. This was fixed in
2843
# development snapshots of GCC prior to 3.0.
2845
aix4 | aix4.[[01]] | aix4.[[01]].*)
2846
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2848
echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2855
# AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2856
# soname into executable. Probably we can add versioning support to
2857
# collect2, so additional links can be useful in future.
2858
if test "$aix_use_runtimelinking" = yes; then
2859
# If using run time linking (on AIX 4.2 or later) use lib<name>.so
2860
# instead of lib<name>.a to let people know that these are not
2861
# typical AIX shared libraries.
2862
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2864
# We preserve .a as extension for shared libraries through AIX4.2
2865
# and later when we are not doing run time linking.
2866
library_names_spec='${libname}${release}.a $libname.a'
2867
soname_spec='${libname}${release}${shared_ext}$major'
2869
shlibpath_var=LIBPATH
2874
library_names_spec='$libname.ixlibrary $libname.a'
2875
# Create ${libname}_ixlibrary.a entries in /sys/libs.
2876
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'
2880
library_names_spec='${libname}${shared_ext}'
2881
dynamic_linker="$host_os ld.so"
2882
shlibpath_var=LIBRARY_PATH
2888
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2889
soname_spec='${libname}${release}${shared_ext}$major'
2890
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2891
shlibpath_var=LD_LIBRARY_PATH
2892
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2893
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2894
# the default ld.so.conf also contains /usr/contrib/lib and
2895
# /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2896
# libtool to hard-code these into programs
2899
cygwin* | mingw* | pw32*)
2900
version_type=windows
2905
case $GCC,$host_os in
2906
yes,cygwin* | yes,mingw* | yes,pw32*)
2907
library_names_spec='$libname.dll.a'
2908
# DLL is installed to $(libdir)/../bin by postinstall_cmds
2909
postinstall_cmds='base_file=`basename \${file}`~
2910
dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
2911
dldir=$destdir/`dirname \$dlpath`~
2912
test -d \$dldir || mkdir -p \$dldir~
2913
$install_prog $dir/$dlname \$dldir/$dlname'
2914
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2915
dlpath=$dir/\$dldll~
2917
shlibpath_overrides_runpath=yes
2921
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
2922
soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2923
sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2926
# MinGW DLLs use traditional 'lib' prefix
2927
soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2928
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2929
if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
2930
# It is most probably a Windows format PATH printed by
2931
# mingw gcc, but we are running on Cygwin. Gcc prints its search
2932
# path with ; separators, and with drive letters. We can handle the
2933
# drive letters (cygwin fileutils understands them), so leave them,
2934
# especially as we might pass files found there to a mingw objdump,
2935
# which wouldn't understand a cygwinified path. Ahh.
2936
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2938
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2942
# pw32 DLLs use 'pw' prefix rather than 'lib'
2943
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2949
library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2952
dynamic_linker='Win32 ld.exe'
2953
# FIXME: first we should search . and the directory the executable is in
2957
darwin* | rhapsody*)
2958
dynamic_linker="$host_os dyld"
2962
library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2963
soname_spec='${libname}${release}${major}$shared_ext'
2964
shlibpath_overrides_runpath=yes
2965
shlibpath_var=DYLD_LIBRARY_PATH
2966
shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
2967
# Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
2968
if test "$GCC" = yes; then
2969
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"`
2971
sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
2973
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2980
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2981
soname_spec='${libname}${release}${shared_ext}$major'
2982
shlibpath_var=LD_LIBRARY_PATH
2993
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2994
soname_spec='${libname}${release}${shared_ext}$major'
2995
shlibpath_var=LD_LIBRARY_PATH
2996
shlibpath_overrides_runpath=no
2997
hardcode_into_libs=yes
2998
dynamic_linker='GNU ld.so'
3001
freebsd* | dragonfly*)
3002
# DragonFly does not have aout. When/if they implement a new
3003
# versioning mechanism, adjust this.
3004
objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
3005
version_type=freebsd-$objformat
3006
case $version_type in
3008
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3013
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3017
shlibpath_var=LD_LIBRARY_PATH
3020
shlibpath_overrides_runpath=yes
3022
freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3023
shlibpath_overrides_runpath=yes
3024
hardcode_into_libs=yes
3027
shlibpath_overrides_runpath=no
3028
hardcode_into_libs=yes
3037
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3038
soname_spec='${libname}${release}${shared_ext}$major'
3039
shlibpath_var=LD_LIBRARY_PATH
3040
hardcode_into_libs=yes
3043
hpux9* | hpux10* | hpux11*)
3044
# Give a soname corresponding to the major version so that dld.sl refuses to
3045
# link against other versions.
3052
hardcode_into_libs=yes
3053
dynamic_linker="$host_os dld.so"
3054
shlibpath_var=LD_LIBRARY_PATH
3055
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3056
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3057
soname_spec='${libname}${release}${shared_ext}$major'
3058
if test "X$HPUX_IA64_MODE" = X32; then
3059
sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3061
sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3063
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3067
hardcode_into_libs=yes
3068
dynamic_linker="$host_os dld.sl"
3069
shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3070
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3071
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3072
soname_spec='${libname}${release}${shared_ext}$major'
3073
sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3074
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3078
dynamic_linker="$host_os dld.sl"
3079
shlibpath_var=SHLIB_PATH
3080
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3081
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3082
soname_spec='${libname}${release}${shared_ext}$major'
3085
# HP-UX runs *really* slowly unless shared libraries are mode 555.
3086
postinstall_cmds='chmod 555 $lib'
3089
irix5* | irix6* | nonstopux*)
3091
nonstopux*) version_type=nonstopux ;;
3093
if test "$lt_cv_prog_gnu_ld" = yes; then
3101
soname_spec='${libname}${release}${shared_ext}$major'
3102
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3104
irix5* | nonstopux*)
3108
case $LD in # libtool.m4 will add one of these switches to LD
3109
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3110
libsuff= shlibsuff= libmagic=32-bit;;
3111
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3112
libsuff=32 shlibsuff=N32 libmagic=N32;;
3113
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3114
libsuff=64 shlibsuff=64 libmagic=64-bit;;
3115
*) libsuff= shlibsuff= libmagic=never-match;;
3119
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3120
shlibpath_overrides_runpath=no
3121
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3122
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3123
hardcode_into_libs=yes
3126
# No shared lib support for Linux oldld, aout, or coff.
3127
linux*oldld* | linux*aout* | linux*coff*)
3131
# This must be Linux ELF.
3136
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3137
soname_spec='${libname}${release}${shared_ext}$major'
3138
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3139
shlibpath_var=LD_LIBRARY_PATH
3140
shlibpath_overrides_runpath=no
3141
# This implies no fast_install, which is unacceptable.
3142
# Some rework will be needed to allow for fast_install
3143
# before this can be enabled.
3144
hardcode_into_libs=yes
3146
# find out which ABI we are using
3149
x86_64*|s390x*|powerpc64*)
3150
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
3151
if AC_TRY_EVAL(ac_compile); then
3152
case `/usr/bin/file conftest.$ac_objext` in
3155
sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
3163
# Append ld.so.conf contents to the search path
3164
if test -f /etc/ld.so.conf; then
3165
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
3166
sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
3169
# We used to test for /lib/ld.so.1 and disable shared libraries on
3170
# powerpc, because MkLinux only supported shared libraries with the
3171
# GNU dynamic linker. Since this was broken with cross compilers,
3172
# most powerpc-linux boxes support dynamic linking these days and
3173
# people can always --disable-shared, the test was removed, and we
3174
# assume the GNU/Linux dynamic linker is in use.
3175
dynamic_linker='GNU/Linux ld.so'
3182
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3183
soname_spec='${libname}${release}${shared_ext}$major'
3184
shlibpath_var=LD_LIBRARY_PATH
3185
shlibpath_overrides_runpath=no
3186
hardcode_into_libs=yes
3187
dynamic_linker='GNU ld.so'
3194
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3195
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3196
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3197
dynamic_linker='NetBSD (a.out) ld.so'
3199
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3200
soname_spec='${libname}${release}${shared_ext}$major'
3201
dynamic_linker='NetBSD ld.elf_so'
3203
shlibpath_var=LD_LIBRARY_PATH
3204
shlibpath_overrides_runpath=yes
3205
hardcode_into_libs=yes
3210
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3211
shlibpath_var=LD_LIBRARY_PATH
3212
shlibpath_overrides_runpath=yes
3219
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3220
soname_spec='${libname}${release}${shared_ext}$major'
3221
shlibpath_var=LD_LIBRARY_PATH
3222
shlibpath_overrides_runpath=yes
3228
# Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
3230
openbsd3.3 | openbsd3.3.*) need_version=yes ;;
3231
*) need_version=no ;;
3233
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3234
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3235
shlibpath_var=LD_LIBRARY_PATH
3236
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3238
openbsd2.[[89]] | openbsd2.[[89]].*)
3239
shlibpath_overrides_runpath=no
3242
shlibpath_overrides_runpath=yes
3246
shlibpath_overrides_runpath=yes
3251
libname_spec='$name'
3254
library_names_spec='$libname${shared_ext} $libname.a'
3255
dynamic_linker='OS/2 ld.exe'
3256
shlibpath_var=LIBPATH
3259
osf3* | osf4* | osf5*)
3263
soname_spec='${libname}${release}${shared_ext}$major'
3264
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3265
shlibpath_var=LD_LIBRARY_PATH
3266
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3267
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3272
soname_spec='${libname}${release}${shared_ext}$major'
3273
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3274
shlibpath_var=LD_LIBRARY_PATH
3281
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3282
soname_spec='${libname}${release}${shared_ext}$major'
3283
shlibpath_var=LD_LIBRARY_PATH
3284
shlibpath_overrides_runpath=yes
3285
hardcode_into_libs=yes
3286
# ldd complains unless libraries are executable
3287
postinstall_cmds='chmod +x $lib'
3292
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3293
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3294
shlibpath_var=LD_LIBRARY_PATH
3295
shlibpath_overrides_runpath=yes
3296
if test "$with_gnu_ld" = yes; then
3302
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3304
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3305
soname_spec='${libname}${release}${shared_ext}$major'
3306
shlibpath_var=LD_LIBRARY_PATH
3307
case $host_vendor in
3309
shlibpath_overrides_runpath=no
3311
export_dynamic_flag_spec='${wl}-Blargedynsym'
3312
runpath_var=LD_RUN_PATH
3320
shlibpath_overrides_runpath=no
3321
sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3327
if test -d /usr/nec ;then
3329
library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
3330
soname_spec='$libname${shared_ext}.$major'
3331
shlibpath_var=LD_LIBRARY_PATH
3337
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3338
soname_spec='${libname}${release}${shared_ext}$major'
3339
shlibpath_var=LD_LIBRARY_PATH
3346
AC_MSG_RESULT([$dynamic_linker])
3347
test "$dynamic_linker" = no && can_build_shared=no
3348
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
3353
AC_DEFUN([_LT_AC_TAGCONFIG],
3354
[AC_ARG_WITH([tags],
3355
[AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
3356
[include additional configurations @<:@automatic@:>@])],
3357
[tagnames="$withval"])
3359
if test -f "$ltmain" && test -n "$tagnames"; then
3360
if test ! -f "${ofile}"; then
3361
AC_MSG_WARN([output file `$ofile' does not exist])
3364
if test -z "$LTCC"; then
3365
eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
3366
if test -z "$LTCC"; then
3367
AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
3369
AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
3373
# Extract list of available tagged configurations in $ofile.
3374
# Note that this assumes the entire list is on one line.
3375
available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
3377
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3378
for tagname in $tagnames; do
3380
# Check whether tagname contains only valid characters
3381
case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
3383
*) AC_MSG_ERROR([invalid tag name: $tagname])
3387
if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
3389
AC_MSG_ERROR([tag name \"$tagname\" already exists])
3392
# Update the list of available tags.
3393
if test -n "$tagname"; then
3394
echo appending configuration tag \"$tagname\" to $ofile
3398
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
3399
( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
3400
(test "X$CXX" != "Xg++"))) ; then
3401
AC_LIBTOOL_LANG_CXX_CONFIG
3408
if test -n "$F77" && test "X$F77" != "Xno"; then
3409
AC_LIBTOOL_LANG_F77_CONFIG
3416
if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
3417
AC_LIBTOOL_LANG_GCJ_CONFIG
3424
AC_LIBTOOL_LANG_RC_CONFIG
3428
AC_MSG_ERROR([Unsupported tag name: $tagname])
3432
# Append the new tag name to the list of available tags.
3433
if test -n "$tagname" ; then
3434
available_tags="$available_tags $tagname"
3440
# Now substitute the updated list of available tags.
3441
if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
3442
mv "${ofile}T" "$ofile"
3446
AC_MSG_ERROR([unable to update list of available tagged configurations.])
3449
])# _LT_AC_TAGCONFIG
3454
# enable checks for dlopen support
3455
AC_DEFUN([AC_LIBTOOL_DLOPEN],
3456
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
3457
])# AC_LIBTOOL_DLOPEN
3460
# AC_LIBTOOL_WIN32_DLL
3461
# --------------------
3462
# declare package support for building win32 dll's
3463
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
3464
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
3465
])# AC_LIBTOOL_WIN32_DLL
3468
# AC_ENABLE_SHARED([DEFAULT])
3469
# ---------------------------
3470
# implement the --enable-shared flag
3471
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
3472
AC_DEFUN([AC_ENABLE_SHARED],
3473
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3474
AC_ARG_ENABLE([shared],
3475
[AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
3476
[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
3477
[p=${PACKAGE-default}
3479
yes) enable_shared=yes ;;
3480
no) enable_shared=no ;;
3483
# Look at the argument we got. We use all the common list separators.
3484
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3485
for pkg in $enableval; do
3487
if test "X$pkg" = "X$p"; then
3494
[enable_shared=]AC_ENABLE_SHARED_DEFAULT)
3495
])# AC_ENABLE_SHARED
3500
#- set the default shared flag to --disable-shared
3501
AC_DEFUN([AC_DISABLE_SHARED],
3502
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3503
AC_ENABLE_SHARED(no)
3504
])# AC_DISABLE_SHARED
3507
# AC_ENABLE_STATIC([DEFAULT])
3508
# ---------------------------
3509
# implement the --enable-static flag
3510
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
3511
AC_DEFUN([AC_ENABLE_STATIC],
3512
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3513
AC_ARG_ENABLE([static],
3514
[AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
3515
[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
3516
[p=${PACKAGE-default}
3518
yes) enable_static=yes ;;
3519
no) enable_static=no ;;
3522
# Look at the argument we got. We use all the common list separators.
3523
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3524
for pkg in $enableval; do
3526
if test "X$pkg" = "X$p"; then
3533
[enable_static=]AC_ENABLE_STATIC_DEFAULT)
3534
])# AC_ENABLE_STATIC
3539
# set the default static flag to --disable-static
3540
AC_DEFUN([AC_DISABLE_STATIC],
3541
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3542
AC_ENABLE_STATIC(no)
3543
])# AC_DISABLE_STATIC
3546
# AC_ENABLE_FAST_INSTALL([DEFAULT])
3547
# ---------------------------------
3548
# implement the --enable-fast-install flag
3549
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
3550
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
3551
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3552
AC_ARG_ENABLE([fast-install],
3553
[AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
3554
[optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
3555
[p=${PACKAGE-default}
3557
yes) enable_fast_install=yes ;;
3558
no) enable_fast_install=no ;;
3560
enable_fast_install=no
3561
# Look at the argument we got. We use all the common list separators.
3562
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3563
for pkg in $enableval; do
3565
if test "X$pkg" = "X$p"; then
3566
enable_fast_install=yes
3572
[enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
3573
])# AC_ENABLE_FAST_INSTALL
3576
# AC_DISABLE_FAST_INSTALL
3577
# -----------------------
3578
# set the default to --disable-fast-install
3579
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
3580
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3581
AC_ENABLE_FAST_INSTALL(no)
3582
])# AC_DISABLE_FAST_INSTALL
3585
# AC_LIBTOOL_PICMODE([MODE])
3586
# --------------------------
3587
# implement the --with-pic flag
3588
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
3589
AC_DEFUN([AC_LIBTOOL_PICMODE],
3590
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3591
pic_mode=ifelse($#,1,$1,default)
3592
])# AC_LIBTOOL_PICMODE
3597
# This is predefined starting with Autoconf 2.54, so this conditional
3598
# definition can be removed once we require Autoconf 2.54 or later.
3599
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
3600
[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
3601
[if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3602
then ac_cv_prog_egrep='grep -E'
3603
else ac_cv_prog_egrep='egrep'
3605
EGREP=$ac_cv_prog_egrep
3610
# AC_PATH_TOOL_PREFIX
3611
# -------------------
3612
# find a file program which can recognise shared library
3613
AC_DEFUN([AC_PATH_TOOL_PREFIX],
3614
[AC_REQUIRE([AC_PROG_EGREP])dnl
3615
AC_MSG_CHECKING([for $1])
3616
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3618
[[\\/*] | ?:[\\/]*])
3619
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3622
lt_save_MAGIC_CMD="$MAGIC_CMD"
3623
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3624
dnl $ac_dummy forces splitting on constant user-supplied paths.
3625
dnl POSIX.2 word splitting is done only on the output of word expansions,
3626
dnl not every word. This closes a longstanding sh security hole.
3627
ac_dummy="ifelse([$2], , $PATH, [$2])"
3628
for ac_dir in $ac_dummy; do
3630
test -z "$ac_dir" && ac_dir=.
3631
if test -f $ac_dir/$1; then
3632
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3633
if test -n "$file_magic_test_file"; then
3634
case $deplibs_check_method in
3636
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3637
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3638
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3639
$EGREP "$file_magic_regex" > /dev/null; then
3644
*** Warning: the command libtool uses to detect shared libraries,
3645
*** $file_magic_cmd, produces output that libtool cannot recognize.
3646
*** The result is that libtool may fail to recognize shared libraries
3647
*** as such. This will affect the creation of libtool libraries that
3648
*** depend on shared libraries, but programs linked with such libtool
3649
*** libraries will work regardless of this problem. Nevertheless, you
3650
*** may want to report the problem to your system manager and/or to
3651
*** bug-libtool@gnu.org
3661
MAGIC_CMD="$lt_save_MAGIC_CMD"
3664
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3665
if test -n "$MAGIC_CMD"; then
3666
AC_MSG_RESULT($MAGIC_CMD)
3670
])# AC_PATH_TOOL_PREFIX
3675
# find a file program which can recognise a shared library
3676
AC_DEFUN([AC_PATH_MAGIC],
3677
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3678
if test -z "$lt_cv_path_MAGIC_CMD"; then
3679
if test -n "$ac_tool_prefix"; then
3680
AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3690
# find the pathname to the GNU or non-GNU linker
3691
AC_DEFUN([AC_PROG_LD],
3692
[AC_ARG_WITH([gnu-ld],
3693
[AC_HELP_STRING([--with-gnu-ld],
3694
[assume the C compiler uses GNU ld @<:@default=no@:>@])],
3695
[test "$withval" = no || with_gnu_ld=yes],
3697
AC_REQUIRE([LT_AC_PROG_SED])dnl
3698
AC_REQUIRE([AC_PROG_CC])dnl
3699
AC_REQUIRE([AC_CANONICAL_HOST])dnl
3700
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3702
if test "$GCC" = yes; then
3703
# Check if gcc -print-prog-name=ld gives a path.
3704
AC_MSG_CHECKING([for ld used by $CC])
3707
# gcc leaves a trailing carriage return which upsets mingw
3708
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3710
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3713
# Accept absolute paths.
3714
[[\\/]]* | ?:[[\\/]]*)
3715
re_direlt='/[[^/]][[^/]]*/\.\./'
3716
# Canonicalize the pathname of ld
3717
ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
3718
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3719
ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
3721
test -z "$LD" && LD="$ac_prog"
3724
# If it fails, then pretend we aren't using GCC.
3728
# If it is relative, then search for the first ld in PATH.
3732
elif test "$with_gnu_ld" = yes; then
3733
AC_MSG_CHECKING([for GNU ld])
3735
AC_MSG_CHECKING([for non-GNU ld])
3737
AC_CACHE_VAL(lt_cv_path_LD,
3738
[if test -z "$LD"; then
3739
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3740
for ac_dir in $PATH; do
3742
test -z "$ac_dir" && ac_dir=.
3743
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3744
lt_cv_path_LD="$ac_dir/$ac_prog"
3745
# Check to see if the program is GNU ld. I'd rather use --version,
3746
# but apparently some GNU ld's only accept -v.
3747
# Break only if it was the GNU/non-GNU ld that we prefer.
3748
case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3749
*GNU* | *'with BFD'*)
3750
test "$with_gnu_ld" != no && break
3753
test "$with_gnu_ld" != yes && break
3760
lt_cv_path_LD="$LD" # Let the user override the test with a path.
3763
if test -n "$LD"; then
3768
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3775
AC_DEFUN([AC_PROG_LD_GNU],
3776
[AC_REQUIRE([AC_PROG_EGREP])dnl
3777
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3778
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
3779
case `$LD -v 2>&1 </dev/null` in
3780
*GNU* | *'with BFD'*)
3781
lt_cv_prog_gnu_ld=yes
3784
lt_cv_prog_gnu_ld=no
3787
with_gnu_ld=$lt_cv_prog_gnu_ld
3791
# AC_PROG_LD_RELOAD_FLAG
3792
# ----------------------
3793
# find reload flag for linker
3794
# -- PORTME Some linkers may need a different reload flag.
3795
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3796
[AC_CACHE_CHECK([for $LD option to reload object files],
3797
lt_cv_ld_reload_flag,
3798
[lt_cv_ld_reload_flag='-r'])
3799
reload_flag=$lt_cv_ld_reload_flag
3800
case $reload_flag in
3802
*) reload_flag=" $reload_flag" ;;
3804
reload_cmds='$LD$reload_flag -o $output$reload_objs'
3807
if test "$GCC" = yes; then
3808
reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
3810
reload_cmds='$LD$reload_flag -o $output$reload_objs'
3814
])# AC_PROG_LD_RELOAD_FLAG
3817
# AC_DEPLIBS_CHECK_METHOD
3818
# -----------------------
3819
# how to check for library dependencies
3820
# -- PORTME fill in with the dynamic library characteristics
3821
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3822
[AC_CACHE_CHECK([how to recognise dependent libraries],
3823
lt_cv_deplibs_check_method,
3824
[lt_cv_file_magic_cmd='$MAGIC_CMD'
3825
lt_cv_file_magic_test_file=
3826
lt_cv_deplibs_check_method='unknown'
3827
# Need to set the preceding variable on all platforms that support
3828
# interlibrary dependencies.
3829
# 'none' -- dependencies not supported.
3830
# `unknown' -- same as none, but documents that we really don't know.
3831
# 'pass_all' -- all dependencies passed with no checks.
3832
# 'test_compile' -- check by making test program.
3833
# 'file_magic [[regex]]' -- check by looking for files in library path
3834
# which responds to the $file_magic_cmd with a given extended regex.
3835
# If you have `file' or equivalent on your system and you're not sure
3836
# whether `pass_all' will *always* work, you probably want this one.
3840
lt_cv_deplibs_check_method=pass_all
3844
lt_cv_deplibs_check_method=pass_all
3848
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3849
lt_cv_file_magic_cmd='/usr/bin/file -L'
3850
lt_cv_file_magic_test_file=/shlib/libc.so
3854
# func_win32_libid is a shell function defined in ltmain.sh
3855
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3856
lt_cv_file_magic_cmd='func_win32_libid'
3860
# Base MSYS/MinGW do not provide the 'file' command needed by
3861
# func_win32_libid shell function, so use a weaker test based on 'objdump'.
3862
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3863
lt_cv_file_magic_cmd='$OBJDUMP -f'
3866
darwin* | rhapsody*)
3867
lt_cv_deplibs_check_method=pass_all
3870
freebsd* | kfreebsd*-gnu | dragonfly*)
3871
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3874
# Not sure whether the presence of OpenBSD here was a mistake.
3875
# Let's accept both of them until this is cleared up.
3876
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3877
lt_cv_file_magic_cmd=/usr/bin/file
3878
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3882
lt_cv_deplibs_check_method=pass_all
3887
lt_cv_deplibs_check_method=pass_all
3890
hpux10.20* | hpux11*)
3891
lt_cv_file_magic_cmd=/usr/bin/file
3894
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3895
lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3898
[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]']
3899
lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3902
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3903
lt_cv_file_magic_test_file=/usr/lib/libc.sl
3908
irix5* | irix6* | nonstopux*)
3910
*-32|*"-32 ") libmagic=32-bit;;
3911
*-n32|*"-n32 ") libmagic=N32;;
3912
*-64|*"-64 ") libmagic=64-bit;;
3913
*) libmagic=never-match;;
3915
lt_cv_deplibs_check_method=pass_all
3918
# This must be Linux ELF.
3920
lt_cv_deplibs_check_method=pass_all
3924
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3925
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3927
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3932
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3933
lt_cv_file_magic_cmd=/usr/bin/file
3934
lt_cv_file_magic_test_file=/usr/lib/libnls.so
3938
lt_cv_deplibs_check_method=unknown
3942
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3943
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3945
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3949
osf3* | osf4* | osf5*)
3950
lt_cv_deplibs_check_method=pass_all
3954
lt_cv_deplibs_check_method=pass_all
3958
lt_cv_deplibs_check_method=pass_all
3961
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3962
case $host_vendor in
3964
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]]'
3965
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3968
lt_cv_deplibs_check_method=pass_all
3971
lt_cv_file_magic_cmd='/bin/file'
3972
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3975
lt_cv_file_magic_cmd='/bin/file'
3976
lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3977
lt_cv_file_magic_test_file=/lib/libc.so
3980
lt_cv_deplibs_check_method=pass_all
3985
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
3986
lt_cv_deplibs_check_method=pass_all
3990
file_magic_cmd=$lt_cv_file_magic_cmd
3991
deplibs_check_method=$lt_cv_deplibs_check_method
3992
test -z "$deplibs_check_method" && deplibs_check_method=unknown
3993
])# AC_DEPLIBS_CHECK_METHOD
3998
# find the pathname to a BSD-compatible name lister
3999
AC_DEFUN([AC_PROG_NM],
4000
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
4001
[if test -n "$NM"; then
4002
# Let the user override the test.
4005
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4006
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
4008
test -z "$ac_dir" && ac_dir=.
4009
tmp_nm="$ac_dir/${ac_tool_prefix}nm"
4010
if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4011
# Check to see if the nm accepts a BSD-compat flag.
4012
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
4013
# nm: unknown option "B" ignored
4014
# Tru64's nm complains that /dev/null is an invalid object file
4015
case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4016
*/dev/null* | *'Invalid file or object type'*)
4017
lt_cv_path_NM="$tmp_nm -B"
4021
case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4023
lt_cv_path_NM="$tmp_nm -p"
4027
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4028
continue # so that we can try to find one that supports BSD flags
4035
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
4043
# check for math library
4044
AC_DEFUN([AC_CHECK_LIBM],
4045
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4048
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
4049
# These system don't have libm, or don't need it
4052
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4053
AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4056
AC_CHECK_LIB(m, cos, LIBM="-lm")
4062
# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
4063
# -----------------------------------
4064
# sets LIBLTDL to the link flags for the libltdl convenience library and
4065
# LTDLINCL to the include flags for the libltdl header and adds
4066
# --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
4067
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
4068
# DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
4069
# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
4070
# '${top_srcdir}/' (note the single quotes!). If your package is not
4071
# flat and you're not using automake, define top_builddir and
4072
# top_srcdir appropriately in the Makefiles.
4073
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
4074
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4075
case $enable_ltdl_convenience in
4076
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
4077
"") enable_ltdl_convenience=yes
4078
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
4080
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
4081
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4082
# For backwards non-gettext consistent compatibility...
4084
])# AC_LIBLTDL_CONVENIENCE
4087
# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
4088
# -----------------------------------
4089
# sets LIBLTDL to the link flags for the libltdl installable library and
4090
# LTDLINCL to the include flags for the libltdl header and adds
4091
# --enable-ltdl-install to the configure arguments. Note that LIBLTDL
4092
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
4093
# DIRECTORY is not provided and an installed libltdl is not found, it is
4094
# assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
4095
# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
4096
# quotes!). If your package is not flat and you're not using automake,
4097
# define top_builddir and top_srcdir appropriately in the Makefiles.
4098
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
4099
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
4100
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4101
AC_CHECK_LIB(ltdl, lt_dlinit,
4102
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
4103
[if test x"$enable_ltdl_install" = xno; then
4104
AC_MSG_WARN([libltdl not installed, but installation disabled])
4106
enable_ltdl_install=yes
4109
if test x"$enable_ltdl_install" = x"yes"; then
4110
ac_configure_args="$ac_configure_args --enable-ltdl-install"
4111
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
4112
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4114
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
4118
# For backwards non-gettext consistent compatibility...
4120
])# AC_LIBLTDL_INSTALLABLE
4125
# enable support for C++ libraries
4126
AC_DEFUN([AC_LIBTOOL_CXX],
4127
[AC_REQUIRE([_LT_AC_LANG_CXX])
4133
AC_DEFUN([_LT_AC_LANG_CXX],
4134
[AC_REQUIRE([AC_PROG_CXX])
4135
AC_REQUIRE([_LT_AC_PROG_CXXCPP])
4136
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
4139
# _LT_AC_PROG_CXXCPP
4141
AC_DEFUN([_LT_AC_PROG_CXXCPP],
4143
AC_REQUIRE([AC_PROG_CXX])
4144
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
4145
( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
4146
(test "X$CXX" != "Xg++"))) ; then
4149
])# _LT_AC_PROG_CXXCPP
4153
# enable support for Fortran 77 libraries
4154
AC_DEFUN([AC_LIBTOOL_F77],
4155
[AC_REQUIRE([_LT_AC_LANG_F77])
4161
AC_DEFUN([_LT_AC_LANG_F77],
4162
[AC_REQUIRE([AC_PROG_F77])
4163
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
4169
# enable support for GCJ libraries
4170
AC_DEFUN([AC_LIBTOOL_GCJ],
4171
[AC_REQUIRE([_LT_AC_LANG_GCJ])
4177
AC_DEFUN([_LT_AC_LANG_GCJ],
4178
[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
4179
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
4180
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
4181
[ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
4182
[ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
4183
[AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
4184
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
4190
# enable support for Windows resource files
4191
AC_DEFUN([AC_LIBTOOL_RC],
4192
[AC_REQUIRE([LT_AC_PROG_RC])
4193
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
4197
# AC_LIBTOOL_LANG_C_CONFIG
4198
# ------------------------
4199
# Ensure that the configuration vars for the C compiler are
4200
# suitably defined. Those variables are subsequently used by
4201
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4202
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
4203
AC_DEFUN([_LT_AC_LANG_C_CONFIG],
4207
# Source file extension for C test sources.
4210
# Object file extension for compiled C test sources.
4212
_LT_AC_TAGVAR(objext, $1)=$objext
4214
# Code to be used in simple compile tests
4215
lt_simple_compile_test_code="int some_variable = 0;\n"
4217
# Code to be used in simple link tests
4218
lt_simple_link_test_code='int main(){return(0);}\n'
4222
# save warnings/boilerplate of simple test code
4223
_LT_COMPILER_BOILERPLATE
4224
_LT_LINKER_BOILERPLATE
4227
# Check for any special shared library compilation flags.
4229
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
4230
if test "$GCC" = no; then
4233
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
4237
if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
4238
AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
4239
if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then :
4241
AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
4242
_LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
4248
# Check to make sure the static flag actually works.
4250
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
4251
_LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
4252
$_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
4254
[_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
4257
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4258
AC_LIBTOOL_PROG_COMPILER_PIC($1)
4259
AC_LIBTOOL_PROG_CC_C_O($1)
4260
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4261
AC_LIBTOOL_PROG_LD_SHLIBS($1)
4262
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4263
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4264
AC_LIBTOOL_SYS_LIB_STRIP
4265
AC_LIBTOOL_DLOPEN_SELF($1)
4267
# Report which librarie types wil actually be built
4268
AC_MSG_CHECKING([if libtool supports shared libraries])
4269
AC_MSG_RESULT([$can_build_shared])
4271
AC_MSG_CHECKING([whether to build shared libraries])
4272
test "$can_build_shared" = "no" && enable_shared=no
4274
# On AIX, shared libraries and static libraries use the same namespace, and
4275
# are all built from PIC.
4278
test "$enable_shared" = yes && enable_static=no
4279
if test -n "$RANLIB"; then
4280
archive_cmds="$archive_cmds~\$RANLIB \$lib"
4281
postinstall_cmds='$RANLIB $lib'
4286
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
4287
test "$enable_shared" = yes && enable_static=no
4291
AC_MSG_RESULT([$enable_shared])
4293
AC_MSG_CHECKING([whether to build static libraries])
4294
# Make sure either enable_shared or enable_static is yes.
4295
test "$enable_shared" = yes || enable_static=yes
4296
AC_MSG_RESULT([$enable_static])
4298
AC_LIBTOOL_CONFIG($1)
4302
])# AC_LIBTOOL_LANG_C_CONFIG
4305
# AC_LIBTOOL_LANG_CXX_CONFIG
4306
# --------------------------
4307
# Ensure that the configuration vars for the C compiler are
4308
# suitably defined. Those variables are subsequently used by
4309
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4310
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
4311
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
4313
AC_REQUIRE([AC_PROG_CXX])
4314
AC_REQUIRE([_LT_AC_PROG_CXXCPP])
4316
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4317
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
4318
_LT_AC_TAGVAR(always_export_symbols, $1)=no
4319
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4320
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4321
_LT_AC_TAGVAR(hardcode_direct, $1)=no
4322
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4323
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4324
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4325
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4326
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
4327
_LT_AC_TAGVAR(module_cmds, $1)=
4328
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
4329
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4330
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4331
_LT_AC_TAGVAR(no_undefined_flag, $1)=
4332
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4333
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4335
# Dependencies to place before and after the object being linked:
4336
_LT_AC_TAGVAR(predep_objects, $1)=
4337
_LT_AC_TAGVAR(postdep_objects, $1)=
4338
_LT_AC_TAGVAR(predeps, $1)=
4339
_LT_AC_TAGVAR(postdeps, $1)=
4340
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
4342
# Source file extension for C++ test sources.
4345
# Object file extension for compiled C++ test sources.
4347
_LT_AC_TAGVAR(objext, $1)=$objext
4349
# Code to be used in simple compile tests
4350
lt_simple_compile_test_code="int some_variable = 0;\n"
4352
# Code to be used in simple link tests
4353
lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
4355
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4358
# save warnings/boilerplate of simple test code
4359
_LT_COMPILER_BOILERPLATE
4360
_LT_LINKER_BOILERPLATE
4362
# Allow CC to be a program name with arguments.
4367
lt_save_with_gnu_ld=$with_gnu_ld
4368
lt_save_path_LD=$lt_cv_path_LD
4369
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
4370
lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
4372
unset lt_cv_prog_gnu_ld
4374
if test -n "${lt_cv_path_LDCXX+set}"; then
4375
lt_cv_path_LD=$lt_cv_path_LDCXX
4379
test -z "${LDCXX+set}" || LD=$LDCXX
4382
_LT_AC_TAGVAR(compiler, $1)=$CC
4383
_LT_CC_BASENAME([$compiler])
4385
# We don't want -fno-exception wen compiling C++ code, so set the
4386
# no_builtin_flag separately
4387
if test "$GXX" = yes; then
4388
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4390
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4393
if test "$GXX" = yes; then
4394
# Set up default GNU C++ configuration
4398
# Check if GNU C++ uses GNU ld as the underlying linker, since the
4399
# archiving commands below assume that GNU ld is being used.
4400
if test "$with_gnu_ld" = yes; then
4401
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4402
_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'
4404
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
4405
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4407
# If archive_cmds runs LD, not CC, wlarc should be empty
4408
# XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
4409
# investigate it a little bit more. (MM)
4412
# ancient GNU ld didn't support --whole-archive et. al.
4413
if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
4414
grep 'no-whole-archive' > /dev/null; then
4415
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4417
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4423
# A generic and very simple default shared library creation
4424
# command for GNU C++ for the case where it uses the native
4425
# linker, instead of GNU ld. If possible, this setting should
4426
# overridden to take advantage of the native linker features on
4427
# the platform it is being used on.
4428
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
4431
# Commands to make compiler produce verbose output that lists
4432
# what "hidden" libraries, object files and flags are used when
4433
# linking a shared library.
4434
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4442
# PORTME: fill in a description of your system's C++ link characteristics
4443
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4444
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
4447
# FIXME: insert proper C++ library support
4448
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4451
if test "$host_cpu" = ia64; then
4452
# On IA64, the linker does run time linking by default, so we don't
4453
# have to do anything special.
4454
aix_use_runtimelinking=no
4455
exp_sym_flag='-Bexport'
4458
aix_use_runtimelinking=no
4460
# Test if we are trying to use run time linking or normal
4461
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
4462
# need to do runtime linking.
4463
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
4464
for ld_flag in $LDFLAGS; do
4467
aix_use_runtimelinking=yes
4474
exp_sym_flag='-bexport'
4475
no_entry_flag='-bnoentry'
4478
# When large executables or shared objects are built, AIX ld can
4479
# have problems creating the table of contents. If linking a library
4480
# or program results in "error TOC overflow" add -mminimal-toc to
4481
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
4482
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4484
_LT_AC_TAGVAR(archive_cmds, $1)=''
4485
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4486
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
4487
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4489
if test "$GXX" = yes; then
4490
case $host_os in aix4.[[012]]|aix4.[[012]].*)
4491
# We only want to do this on AIX 4.2 and lower, the check
4492
# below for broken collect2 doesn't work under 4.3+
4493
collect2name=`${CC} -print-prog-name=collect2`
4494
if test -f "$collect2name" && \
4495
strings "$collect2name" | grep resolve_lib_name >/dev/null
4497
# We have reworked collect2
4498
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4500
# We have old collect2
4501
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
4502
# It fails to find uninstalled libraries when the uninstalled
4503
# path is not listed in the libpath. Setting hardcode_minus_L
4504
# to unsupported forces relinking
4505
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4506
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4507
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4510
shared_flag='-shared'
4511
if test "$aix_use_runtimelinking" = yes; then
4512
shared_flag="$shared_flag "'${wl}-G'
4516
if test "$host_cpu" = ia64; then
4517
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4518
# chokes on -Wl,-G. The following line is correct:
4521
if test "$aix_use_runtimelinking" = yes; then
4522
shared_flag='${wl}-G'
4524
shared_flag='${wl}-bM:SRE'
4529
# It seems that -bexpall does not export symbols beginning with
4530
# underscore (_), so it is better to generate a list of symbols to export.
4531
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
4532
if test "$aix_use_runtimelinking" = yes; then
4533
# Warning - without using the other runtime loading flags (-brtl),
4534
# -berok will link without error, but may produce a broken library.
4535
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
4536
# Determine the default libpath from the value encoded in an empty executable.
4537
_LT_AC_SYS_LIBPATH_AIX
4538
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4540
_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"
4542
if test "$host_cpu" = ia64; then
4543
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4544
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4545
_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"
4547
# Determine the default libpath from the value encoded in an empty executable.
4548
_LT_AC_SYS_LIBPATH_AIX
4549
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4550
# Warning - without using the other run time loading flags,
4551
# -berok will link without error, but may produce a broken library.
4552
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4553
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4554
# -bexpall does not export symbols beginning with underscore (_)
4555
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
4556
# Exported symbols can be pulled into shared objects from archives
4557
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
4558
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
4559
# This is similar to how AIX traditionally builds it's shared libraries.
4560
_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'
4565
case $cc_basename in
4567
# FIXME: insert proper C++ library support
4568
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4574
cygwin* | mingw* | pw32*)
4575
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4576
# as there is no search path for DLLs.
4577
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4578
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4579
_LT_AC_TAGVAR(always_export_symbols, $1)=no
4580
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4582
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
4583
_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'
4584
# If the export-symbols file already is a .def file (1st line
4585
# is EXPORTS), use it as is; otherwise, prepend...
4586
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4587
cp $export_symbols $output_objdir/$soname.def;
4589
echo EXPORTS > $output_objdir/$soname.def;
4590
cat $export_symbols >> $output_objdir/$soname.def;
4592
$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'
4594
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4597
darwin* | rhapsody*)
4599
rhapsody* | darwin1.[[012]])
4600
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
4603
if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
4604
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
4606
case ${MACOSX_DEPLOYMENT_TARGET} in
4608
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
4611
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
4617
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4618
_LT_AC_TAGVAR(hardcode_direct, $1)=no
4619
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
4620
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4621
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
4622
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4624
if test "$GXX" = yes ; then
4625
lt_int_apple_cc_single_mod=no
4626
output_verbose_link_cmd='echo'
4627
if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
4628
lt_int_apple_cc_single_mod=yes
4630
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
4631
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
4633
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
4635
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4636
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
4637
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
4638
_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}'
4640
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4642
_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}'
4644
case $cc_basename in
4646
output_verbose_link_cmd='echo'
4647
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
4648
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4649
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
4650
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4651
_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}'
4654
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4661
case $cc_basename in
4663
# FIXME: insert proper C++ library support
4664
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4667
# Green Hills C++ Compiler
4668
# FIXME: insert proper C++ library support
4669
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4672
# FIXME: insert proper C++ library support
4673
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4678
# C++ shared libraries reported to be fairly broken before switch to ELF
4679
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4682
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4684
freebsd* | kfreebsd*-gnu | dragonfly*)
4685
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
4687
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
4692
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4693
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4694
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4695
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4696
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4697
# but as the default
4698
# location of the library.
4700
case $cc_basename in
4702
# FIXME: insert proper C++ library support
4703
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4706
_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'
4707
# Commands to make compiler produce verbose output that lists
4708
# what "hidden" libraries, object files and flags are used when
4709
# linking a shared library.
4711
# There doesn't appear to be a way to prevent this compiler from
4712
# explicitly linking system object files so we need to strip them
4713
# from the output so that they don't get included in the library
4715
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'
4718
if test "$GXX" = yes; then
4719
_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'
4721
# FIXME: insert proper C++ library support
4722
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4728
if test $with_gnu_ld = no; then
4731
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4732
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
4733
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4736
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4739
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4740
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4741
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4747
_LT_AC_TAGVAR(hardcode_direct, $1)=no
4748
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4751
_LT_AC_TAGVAR(hardcode_direct, $1)=no
4752
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4753
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4754
# but as the default
4755
# location of the library.
4758
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4759
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4760
# but as the default
4761
# location of the library.
4765
case $cc_basename in
4767
# FIXME: insert proper C++ library support
4768
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4773
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
4776
_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'
4779
# Commands to make compiler produce verbose output that lists
4780
# what "hidden" libraries, object files and flags are used when
4781
# linking a shared library.
4783
# There doesn't appear to be a way to prevent this compiler from
4784
# explicitly linking system object files so we need to strip them
4785
# from the output so that they don't get included in the library
4787
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'
4790
if test "$GXX" = yes; then
4791
if test $with_gnu_ld = no; then
4794
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
4797
_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'
4802
# FIXME: insert proper C++ library support
4803
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4809
case $cc_basename in
4812
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4814
# Archives containing C++ object files must be created using
4815
# "CC -ar", where "CC" is the IRIX C++ compiler. This is
4816
# necessary to make sure instantiated templates are included
4818
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
4821
if test "$GXX" = yes; then
4822
if test "$with_gnu_ld" = no; then
4823
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4825
_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'
4828
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4831
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4832
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4835
case $cc_basename in
4837
# Kuck and Associates, Inc. (KAI) C++ Compiler
4839
# KCC will only create a shared library if the output file
4840
# ends with ".so" (or ".sl" for HP-UX), so rename the library
4841
# to its proper name (with version) after linking.
4842
_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'
4843
_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'
4844
# Commands to make compiler produce verbose output that lists
4845
# what "hidden" libraries, object files and flags are used when
4846
# linking a shared library.
4848
# There doesn't appear to be a way to prevent this compiler from
4849
# explicitly linking system object files so we need to strip them
4850
# from the output so that they don't get included in the library
4852
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'
4854
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
4855
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4857
# Archives containing C++ object files must be created using
4858
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
4859
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4864
# version 8.0 and above of icpc choke on multiply defined symbols
4865
# if we add $predep_objects and $postdep_objects, however 7.1 and
4866
# earlier do not add the objects themselves.
4867
case `$CC -V 2>&1` in
4869
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4870
_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'
4872
*) # Version 8.0 or newer
4875
ia64*) tmp_idyn=' -i_dynamic';;
4877
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4878
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4881
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4882
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4883
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4884
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
4887
# Portland Group C++ compiler
4888
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
4889
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
4891
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
4892
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4893
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive,`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
4897
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4898
_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'
4900
runpath_var=LD_RUN_PATH
4901
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4902
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4904
# Commands to make compiler produce verbose output that lists
4905
# what "hidden" libraries, object files and flags are used when
4906
# linking a shared library.
4908
# There doesn't appear to be a way to prevent this compiler from
4909
# explicitly linking system object files so we need to strip them
4910
# from the output so that they don't get included in the library
4912
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'
4917
# FIXME: insert proper C++ library support
4918
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4921
# FIXME: insert proper C++ library support
4922
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4925
case $cc_basename in
4927
# FIXME: insert proper C++ library support
4928
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4931
# FIXME: insert proper C++ library support
4932
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4937
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4938
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
4940
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4941
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4942
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4944
# Workaround some broken pre-1.5 toolchains
4945
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
4948
# C++ shared libraries are fairly broken
4949
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4952
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4953
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4954
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
4955
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4956
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4957
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
4958
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4959
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4961
output_verbose_link_cmd='echo'
4964
case $cc_basename in
4966
# Kuck and Associates, Inc. (KAI) C++ Compiler
4968
# KCC will only create a shared library if the output file
4969
# ends with ".so" (or ".sl" for HP-UX), so rename the library
4970
# to its proper name (with version) after linking.
4971
_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'
4973
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4974
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4976
# Archives containing C++ object files must be created using
4977
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
4978
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4982
# Rational C++ 2.4.1
4983
# FIXME: insert proper C++ library support
4984
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4987
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4988
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4990
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4991
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4993
# Commands to make compiler produce verbose output that lists
4994
# what "hidden" libraries, object files and flags are used when
4995
# linking a shared library.
4997
# There doesn't appear to be a way to prevent this compiler from
4998
# explicitly linking system object files so we need to strip them
4999
# from the output so that they don't get included in the library
5001
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'
5004
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
5005
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5006
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5008
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5009
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5011
# Commands to make compiler produce verbose output that lists
5012
# what "hidden" libraries, object files and flags are used when
5013
# linking a shared library.
5014
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
5017
# FIXME: insert proper C++ library support
5018
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5024
case $cc_basename in
5026
# Kuck and Associates, Inc. (KAI) C++ Compiler
5028
# KCC will only create a shared library if the output file
5029
# ends with ".so" (or ".sl" for HP-UX), so rename the library
5030
# to its proper name (with version) after linking.
5031
_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'
5033
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5034
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5036
# Archives containing C++ object files must be created using
5037
# the KAI C++ compiler.
5038
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
5041
# Rational C++ 2.4.1
5042
# FIXME: insert proper C++ library support
5043
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5046
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5047
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
5048
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
5049
echo "-hidden">> $lib.exp~
5050
$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~
5053
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5054
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5056
# Commands to make compiler produce verbose output that lists
5057
# what "hidden" libraries, object files and flags are used when
5058
# linking a shared library.
5060
# There doesn't appear to be a way to prevent this compiler from
5061
# explicitly linking system object files so we need to strip them
5062
# from the output so that they don't get included in the library
5064
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'
5067
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
5068
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5069
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5071
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5072
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5074
# Commands to make compiler produce verbose output that lists
5075
# what "hidden" libraries, object files and flags are used when
5076
# linking a shared library.
5077
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
5080
# FIXME: insert proper C++ library support
5081
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5087
# FIXME: insert proper C++ library support
5088
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5091
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5092
case $cc_basename in
5094
# FIXME: insert proper C++ library support
5095
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5098
# FIXME: insert proper C++ library support
5099
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5104
case $cc_basename in
5107
# FIXME: insert proper C++ library support
5108
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5112
# FIXME: insert proper C++ library support
5113
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5116
# FIXME: insert proper C++ library support
5117
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5122
case $cc_basename in
5124
# Sun C++ 4.2, 5.x and Centerline C++
5125
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
5126
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5127
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5128
$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'
5130
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5131
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5133
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5135
# The C++ compiler is used as linker so we must use $wl
5136
# flag to pass the commands to the underlying system
5137
# linker. We must also pass each convience library through
5138
# to the system linker between allextract/defaultextract.
5139
# The C++ compiler will combine linker options so we
5140
# cannot just pass the convience library names through
5142
# Supported since Solaris 2.6 (maybe 2.5.1?)
5143
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
5146
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5148
# Commands to make compiler produce verbose output that lists
5149
# what "hidden" libraries, object files and flags are used when
5150
# linking a shared library.
5152
# There doesn't appear to be a way to prevent this compiler from
5153
# explicitly linking system object files so we need to strip them
5154
# from the output so that they don't get included in the library
5156
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'
5158
# Archives containing C++ object files must be created using
5159
# "CC -xar", where "CC" is the Sun C++ compiler. This is
5160
# necessary to make sure instantiated templates are included
5162
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
5165
# Green Hills C++ Compiler
5166
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
5168
# The C++ compiler must be used to create the archive.
5169
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
5172
# GNU C++ compiler with Solaris linker
5173
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
5174
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
5175
if $CC --version | grep -v '^2\.7' > /dev/null; then
5176
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
5177
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5178
$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
5180
# Commands to make compiler produce verbose output that lists
5181
# what "hidden" libraries, object files and flags are used when
5182
# linking a shared library.
5183
output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
5185
# g++ 2.7 appears to require `-G' NOT `-shared' on this
5187
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
5188
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5189
$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
5191
# Commands to make compiler produce verbose output that lists
5192
# what "hidden" libraries, object files and flags are used when
5193
# linking a shared library.
5194
output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
5197
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
5202
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
5203
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5206
case $cc_basename in
5208
# NonStop-UX NCC 3.20
5209
# FIXME: insert proper C++ library support
5210
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5213
# FIXME: insert proper C++ library support
5214
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5219
# FIXME: insert proper C++ library support
5220
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5223
# FIXME: insert proper C++ library support
5224
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5227
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
5228
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5230
_LT_AC_TAGVAR(GCC, $1)="$GXX"
5231
_LT_AC_TAGVAR(LD, $1)="$LD"
5233
AC_LIBTOOL_POSTDEP_PREDEP($1)
5234
AC_LIBTOOL_PROG_COMPILER_PIC($1)
5235
AC_LIBTOOL_PROG_CC_C_O($1)
5236
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5237
AC_LIBTOOL_PROG_LD_SHLIBS($1)
5238
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5239
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5240
AC_LIBTOOL_SYS_LIB_STRIP
5241
AC_LIBTOOL_DLOPEN_SELF($1)
5243
AC_LIBTOOL_CONFIG($1)
5250
with_gnu_ldcxx=$with_gnu_ld
5251
with_gnu_ld=$lt_save_with_gnu_ld
5252
lt_cv_path_LDCXX=$lt_cv_path_LD
5253
lt_cv_path_LD=$lt_save_path_LD
5254
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
5255
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
5256
])# AC_LIBTOOL_LANG_CXX_CONFIG
5258
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
5259
# ------------------------
5260
# Figure out "hidden" library dependencies from verbose
5261
# compiler output when linking a shared library.
5262
# Parse the compiler output and extract the necessary
5263
# objects, libraries and library flags.
5264
AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
5265
dnl we can't use the lt_simple_compile_test_code here,
5266
dnl because it contains code intended for an executable,
5267
dnl not a library. It's possible we should let each
5268
dnl tag define a new lt_????_link_test_code variable,
5269
dnl but it's only used here...
5270
ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
5272
void foo (void) { a = 0; }
5274
],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
5278
Foo (void) { a = 0; }
5283
],[$1],[F77],[cat > conftest.$ac_ext <<EOF
5291
],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
5294
public void bar (void) {
5300
dnl Parse the compiler output and extract the necessary
5301
dnl objects, libraries and library flags.
5302
if AC_TRY_EVAL(ac_compile); then
5303
# Parse the compiler output and extract the necessary
5304
# objects, libraries and library flags.
5306
# Sentinel used to keep track of whether or not we are before
5307
# the conftest object file.
5308
pre_test_object_deps_done=no
5310
# The `*' in the case matches for architectures that use `case' in
5311
# $output_verbose_cmd can trigger glob expansion during the loop
5312
# eval without this substitution.
5313
output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
5315
for p in `eval $output_verbose_link_cmd`; do
5319
# Some compilers place space between "-{L,R}" and the path.
5322
|| test $p = "-R"; then
5329
if test "$pre_test_object_deps_done" = no; then
5332
# Internal compiler library paths should come after those
5333
# provided the user. The postdeps already come after the
5334
# user supplied libs so there is no need to process them.
5335
if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
5336
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
5338
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
5341
# The "-l" case would never come before the object being
5342
# linked, so don't bother handling this case.
5345
if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
5346
_LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
5348
_LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
5354
# This assumes that the test object file only shows up
5355
# once in the compiler output.
5356
if test "$p" = "conftest.$objext"; then
5357
pre_test_object_deps_done=yes
5361
if test "$pre_test_object_deps_done" = no; then
5362
if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
5363
_LT_AC_TAGVAR(predep_objects, $1)="$p"
5365
_LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
5368
if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
5369
_LT_AC_TAGVAR(postdep_objects, $1)="$p"
5371
_LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
5376
*) ;; # Ignore the rest.
5384
echo "libtool.m4: error: problem compiling $1 test program"
5387
$rm -f confest.$objext
5389
case " $_LT_AC_TAGVAR(postdeps, $1) " in
5390
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
5392
])# AC_LIBTOOL_POSTDEP_PREDEP
5394
# AC_LIBTOOL_LANG_F77_CONFIG
5395
# ------------------------
5396
# Ensure that the configuration vars for the C compiler are
5397
# suitably defined. Those variables are subsequently used by
5398
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5399
AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
5400
AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
5401
[AC_REQUIRE([AC_PROG_F77])
5402
AC_LANG_PUSH(Fortran 77)
5404
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5405
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
5406
_LT_AC_TAGVAR(always_export_symbols, $1)=no
5407
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5408
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5409
_LT_AC_TAGVAR(hardcode_direct, $1)=no
5410
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5411
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5412
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5413
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5414
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
5415
_LT_AC_TAGVAR(module_cmds, $1)=
5416
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
5417
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5418
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5419
_LT_AC_TAGVAR(no_undefined_flag, $1)=
5420
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5421
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5423
# Source file extension for f77 test sources.
5426
# Object file extension for compiled f77 test sources.
5428
_LT_AC_TAGVAR(objext, $1)=$objext
5430
# Code to be used in simple compile tests
5431
lt_simple_compile_test_code=" subroutine t\n return\n end\n"
5433
# Code to be used in simple link tests
5434
lt_simple_link_test_code=" program t\n end\n"
5436
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
5439
# save warnings/boilerplate of simple test code
5440
_LT_COMPILER_BOILERPLATE
5441
_LT_LINKER_BOILERPLATE
5443
# Allow CC to be a program name with arguments.
5447
_LT_AC_TAGVAR(compiler, $1)=$CC
5448
_LT_CC_BASENAME([$compiler])
5450
AC_MSG_CHECKING([if libtool supports shared libraries])
5451
AC_MSG_RESULT([$can_build_shared])
5453
AC_MSG_CHECKING([whether to build shared libraries])
5454
test "$can_build_shared" = "no" && enable_shared=no
5456
# On AIX, shared libraries and static libraries use the same namespace, and
5457
# are all built from PIC.
5460
test "$enable_shared" = yes && enable_static=no
5461
if test -n "$RANLIB"; then
5462
archive_cmds="$archive_cmds~\$RANLIB \$lib"
5463
postinstall_cmds='$RANLIB $lib'
5467
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5468
test "$enable_shared" = yes && enable_static=no
5472
AC_MSG_RESULT([$enable_shared])
5474
AC_MSG_CHECKING([whether to build static libraries])
5475
# Make sure either enable_shared or enable_static is yes.
5476
test "$enable_shared" = yes || enable_static=yes
5477
AC_MSG_RESULT([$enable_static])
5479
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5481
_LT_AC_TAGVAR(GCC, $1)="$G77"
5482
_LT_AC_TAGVAR(LD, $1)="$LD"
5484
AC_LIBTOOL_PROG_COMPILER_PIC($1)
5485
AC_LIBTOOL_PROG_CC_C_O($1)
5486
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5487
AC_LIBTOOL_PROG_LD_SHLIBS($1)
5488
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5489
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5490
AC_LIBTOOL_SYS_LIB_STRIP
5493
AC_LIBTOOL_CONFIG($1)
5497
])# AC_LIBTOOL_LANG_F77_CONFIG
5500
# AC_LIBTOOL_LANG_GCJ_CONFIG
5501
# --------------------------
5502
# Ensure that the configuration vars for the C compiler are
5503
# suitably defined. Those variables are subsequently used by
5504
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5505
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
5506
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
5509
# Source file extension for Java test sources.
5512
# Object file extension for compiled Java test sources.
5514
_LT_AC_TAGVAR(objext, $1)=$objext
5516
# Code to be used in simple compile tests
5517
lt_simple_compile_test_code="class foo {}\n"
5519
# Code to be used in simple link tests
5520
lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
5522
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
5525
# save warnings/boilerplate of simple test code
5526
_LT_COMPILER_BOILERPLATE
5527
_LT_LINKER_BOILERPLATE
5529
# Allow CC to be a program name with arguments.
5533
_LT_AC_TAGVAR(compiler, $1)=$CC
5534
_LT_CC_BASENAME([$compiler])
5536
# GCJ did not exist at the time GCC didn't implicitly link libc in.
5537
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5539
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5541
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
5542
AC_LIBTOOL_PROG_COMPILER_PIC($1)
5543
AC_LIBTOOL_PROG_CC_C_O($1)
5544
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5545
AC_LIBTOOL_PROG_LD_SHLIBS($1)
5546
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5547
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5548
AC_LIBTOOL_SYS_LIB_STRIP
5549
AC_LIBTOOL_DLOPEN_SELF($1)
5551
AC_LIBTOOL_CONFIG($1)
5555
])# AC_LIBTOOL_LANG_GCJ_CONFIG
5558
# AC_LIBTOOL_LANG_RC_CONFIG
5559
# --------------------------
5560
# Ensure that the configuration vars for the Windows resource compiler are
5561
# suitably defined. Those variables are subsequently used by
5562
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5563
AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
5564
AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
5567
# Source file extension for RC test sources.
5570
# Object file extension for compiled RC test sources.
5572
_LT_AC_TAGVAR(objext, $1)=$objext
5574
# Code to be used in simple compile tests
5575
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
5577
# Code to be used in simple link tests
5578
lt_simple_link_test_code="$lt_simple_compile_test_code"
5580
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
5583
# save warnings/boilerplate of simple test code
5584
_LT_COMPILER_BOILERPLATE
5585
_LT_LINKER_BOILERPLATE
5587
# Allow CC to be a program name with arguments.
5591
_LT_AC_TAGVAR(compiler, $1)=$CC
5592
_LT_CC_BASENAME([$compiler])
5593
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
5595
AC_LIBTOOL_CONFIG($1)
5599
])# AC_LIBTOOL_LANG_RC_CONFIG
5602
# AC_LIBTOOL_CONFIG([TAGNAME])
5603
# ----------------------------
5604
# If TAGNAME is not passed, then create an initial libtool script
5605
# with a default configuration from the untagged config vars. Otherwise
5606
# add code to config.status for appending the configuration named by
5607
# TAGNAME from the matching tagged config vars.
5608
AC_DEFUN([AC_LIBTOOL_CONFIG],
5609
[# The else clause should only fire when bootstrapping the
5610
# libtool distribution, otherwise you forgot to ship ltmain.sh
5611
# with your package, and you will get complaints that there are
5612
# no rules to generate ltmain.sh.
5613
if test -f "$ltmain"; then
5614
# See if we are running on zsh, and set the options which allow our commands through
5615
# without removal of \ escapes.
5616
if test -n "${ZSH_VERSION+set}" ; then
5617
setopt NO_GLOB_SUBST
5619
# Now quote all the things that may contain metacharacters while being
5620
# careful not to overquote the AC_SUBSTed values. We take copies of the
5621
# variables and quote the copies for generation of the libtool script.
5622
for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
5624
libname_spec library_names_spec soname_spec extract_expsyms_cmds \
5625
old_striplib striplib file_magic_cmd finish_cmds finish_eval \
5626
deplibs_check_method reload_flag reload_cmds need_locks \
5627
lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
5628
lt_cv_sys_global_symbol_to_c_name_address \
5629
sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
5630
old_postinstall_cmds old_postuninstall_cmds \
5631
_LT_AC_TAGVAR(compiler, $1) \
5632
_LT_AC_TAGVAR(CC, $1) \
5633
_LT_AC_TAGVAR(LD, $1) \
5634
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
5635
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
5636
_LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
5637
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
5638
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
5639
_LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
5640
_LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
5641
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
5642
_LT_AC_TAGVAR(old_archive_cmds, $1) \
5643
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
5644
_LT_AC_TAGVAR(predep_objects, $1) \
5645
_LT_AC_TAGVAR(postdep_objects, $1) \
5646
_LT_AC_TAGVAR(predeps, $1) \
5647
_LT_AC_TAGVAR(postdeps, $1) \
5648
_LT_AC_TAGVAR(compiler_lib_search_path, $1) \
5649
_LT_AC_TAGVAR(archive_cmds, $1) \
5650
_LT_AC_TAGVAR(archive_expsym_cmds, $1) \
5651
_LT_AC_TAGVAR(postinstall_cmds, $1) \
5652
_LT_AC_TAGVAR(postuninstall_cmds, $1) \
5653
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
5654
_LT_AC_TAGVAR(allow_undefined_flag, $1) \
5655
_LT_AC_TAGVAR(no_undefined_flag, $1) \
5656
_LT_AC_TAGVAR(export_symbols_cmds, $1) \
5657
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
5658
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
5659
_LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
5660
_LT_AC_TAGVAR(hardcode_automatic, $1) \
5661
_LT_AC_TAGVAR(module_cmds, $1) \
5662
_LT_AC_TAGVAR(module_expsym_cmds, $1) \
5663
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
5664
_LT_AC_TAGVAR(exclude_expsyms, $1) \
5665
_LT_AC_TAGVAR(include_expsyms, $1); do
5668
_LT_AC_TAGVAR(old_archive_cmds, $1) | \
5669
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
5670
_LT_AC_TAGVAR(archive_cmds, $1) | \
5671
_LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
5672
_LT_AC_TAGVAR(module_cmds, $1) | \
5673
_LT_AC_TAGVAR(module_expsym_cmds, $1) | \
5674
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
5675
_LT_AC_TAGVAR(export_symbols_cmds, $1) | \
5676
extract_expsyms_cmds | reload_cmds | finish_cmds | \
5677
postinstall_cmds | postuninstall_cmds | \
5678
old_postinstall_cmds | old_postuninstall_cmds | \
5679
sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
5680
# Double-quote double-evaled strings.
5681
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
5684
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
5690
*'\[$]0 --fallback-echo"')
5691
lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
5696
[cfgfile="${ofile}T"
5697
trap "$rm \"$cfgfile\"; exit 1" 1 2 15
5699
AC_MSG_NOTICE([creating $ofile])],
5702
cat <<__EOF__ >> "$cfgfile"
5706
# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
5707
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
5708
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
5710
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
5711
# Free Software Foundation, Inc.
5713
# This file is part of GNU Libtool:
5714
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5716
# This program is free software; you can redistribute it and/or modify
5717
# it under the terms of the GNU General Public License as published by
5718
# the Free Software Foundation; either version 2 of the License, or
5719
# (at your option) any later version.
5721
# This program is distributed in the hope that it will be useful, but
5722
# WITHOUT ANY WARRANTY; without even the implied warranty of
5723
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5724
# General Public License for more details.
5726
# You should have received a copy of the GNU General Public License
5727
# along with this program; if not, write to the Free Software
5728
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
5730
# As a special exception to the GNU General Public License, if you
5731
# distribute this file as part of a program that contains a
5732
# configuration script generated by Autoconf, you may include it under
5733
# the same distribution terms that you use for the rest of that program.
5735
# A sed program that does not truncate output.
5738
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
5739
Xsed="$SED -e 1s/^X//"
5741
# The HP-UX ksh and POSIX shell print the target directory to stdout
5743
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5745
# The names of the tagged configurations supported by this script.
5748
# ### BEGIN LIBTOOL CONFIG],
5749
[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
5751
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5753
# Shell to use when invoking shell scripts.
5756
# Whether or not to build shared libraries.
5757
build_libtool_libs=$enable_shared
5759
# Whether or not to build static libraries.
5760
build_old_libs=$enable_static
5762
# Whether or not to add -lc for building shared libraries.
5763
build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
5765
# Whether or not to disallow shared libs when runtime libs are static
5766
allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
5768
# Whether or not to optimize for fast installation.
5769
fast_install=$enable_fast_install
5772
host_alias=$host_alias
5777
build_alias=$build_alias
5781
# An echo program that does not interpret backslashes.
5786
AR_FLAGS=$lt_AR_FLAGS
5791
# A language-specific compiler.
5792
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
5794
# Is the compiler the GNU C compiler?
5795
with_gcc=$_LT_AC_TAGVAR(GCC, $1)
5800
# The linker used to build libraries.
5801
LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
5803
# Whether we need hard or soft links.
5806
# A BSD-compatible nm program.
5809
# A symbol stripping program
5812
# Used to examine libraries when file_magic_cmd begins "file"
5813
MAGIC_CMD=$MAGIC_CMD
5815
# Used on cygwin: DLL creation program.
5818
# Used on cygwin: object dumper.
5821
# Used on cygwin: assembler.
5824
# The name of the directory that contains temporary libtool files.
5827
# How to create reloadable object files.
5828
reload_flag=$lt_reload_flag
5829
reload_cmds=$lt_reload_cmds
5831
# How to pass a linker flag through the compiler.
5832
wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
5834
# Object file suffix (normally "o").
5837
# Old archive suffix (normally "a").
5840
# Shared library suffix (normally ".so").
5841
shrext_cmds='$shrext_cmds'
5843
# Executable file suffix (normally "").
5846
# Additional compiler flags for building library objects.
5847
pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
5850
# What is the maximum length of a command?
5851
max_cmd_len=$lt_cv_sys_max_cmd_len
5853
# Does compiler simultaneously support -c and -o options?
5854
compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
5856
# Must we lock files when doing compilation?
5857
need_locks=$lt_need_locks
5859
# Do we need the lib prefix for modules?
5860
need_lib_prefix=$need_lib_prefix
5862
# Do we need a version for libraries?
5863
need_version=$need_version
5865
# Whether dlopen is supported.
5866
dlopen_support=$enable_dlopen
5868
# Whether dlopen of programs is supported.
5869
dlopen_self=$enable_dlopen_self
5871
# Whether dlopen of statically linked programs is supported.
5872
dlopen_self_static=$enable_dlopen_self_static
5874
# Compiler flag to prevent dynamic linking.
5875
link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
5877
# Compiler flag to turn off builtin functions.
5878
no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
5880
# Compiler flag to allow reflexive dlopens.
5881
export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
5883
# Compiler flag to generate shared objects directly from archives.
5884
whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
5886
# Compiler flag to generate thread-safe objects.
5887
thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
5889
# Library versioning type.
5890
version_type=$version_type
5892
# Format of library name prefix.
5893
libname_spec=$lt_libname_spec
5895
# List of archive names. First name is the real one, the rest are links.
5896
# The last name is the one that the linker finds with -lNAME.
5897
library_names_spec=$lt_library_names_spec
5899
# The coded name of the library, if different from the real name.
5900
soname_spec=$lt_soname_spec
5902
# Commands used to build and install an old-style archive.
5904
old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
5905
old_postinstall_cmds=$lt_old_postinstall_cmds
5906
old_postuninstall_cmds=$lt_old_postuninstall_cmds
5908
# Create an old-style archive from a shared archive.
5909
old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
5911
# Create a temporary old-style archive to link instead of a shared archive.
5912
old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
5914
# Commands used to build and install a shared archive.
5915
archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
5916
archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
5917
postinstall_cmds=$lt_postinstall_cmds
5918
postuninstall_cmds=$lt_postuninstall_cmds
5920
# Commands used to build a loadable module (assumed same as above if empty)
5921
module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
5922
module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
5924
# Commands to strip libraries.
5925
old_striplib=$lt_old_striplib
5926
striplib=$lt_striplib
5928
# Dependencies to place before the objects being linked to create a
5930
predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
5932
# Dependencies to place after the objects being linked to create a
5934
postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
5936
# Dependencies to place before the objects being linked to create a
5938
predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
5940
# Dependencies to place after the objects being linked to create a
5942
postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
5944
# The library search path used internally by the compiler when linking
5946
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
5948
# Method to check whether dependent libraries are shared objects.
5949
deplibs_check_method=$lt_deplibs_check_method
5951
# Command to use when deplibs_check_method == file_magic.
5952
file_magic_cmd=$lt_file_magic_cmd
5954
# Flag that allows shared libraries with undefined symbols to be built.
5955
allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
5957
# Flag that forces no undefined symbols.
5958
no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
5960
# Commands used to finish a libtool library installation in a directory.
5961
finish_cmds=$lt_finish_cmds
5963
# Same as above, but a single script fragment to be evaled but not shown.
5964
finish_eval=$lt_finish_eval
5966
# Take the output of nm and produce a listing of raw symbols and C names.
5967
global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
5969
# Transform the output of nm in a proper C declaration
5970
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
5972
# Transform the output of nm in a C name address pair
5973
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
5975
# This is the shared library runtime path variable.
5976
runpath_var=$runpath_var
5978
# This is the shared library path variable.
5979
shlibpath_var=$shlibpath_var
5981
# Is shlibpath searched before the hard-coded library search path?
5982
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
5984
# How to hardcode a shared library path into an executable.
5985
hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
5987
# Whether we should hardcode library paths into libraries.
5988
hardcode_into_libs=$hardcode_into_libs
5990
# Flag to hardcode \$libdir into a binary during linking.
5991
# This must work even if \$libdir does not exist.
5992
hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
5994
# If ld is used when linking, flag to hardcode \$libdir into
5995
# a binary during linking. This must work even if \$libdir does
5997
hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
5999
# Whether we need a single -rpath flag with a separated argument.
6000
hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
6002
# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
6004
hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
6006
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
6008
hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
6010
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
6011
# the resulting binary.
6012
hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
6014
# Set to yes if building a shared library automatically hardcodes DIR into the library
6015
# and all subsequent libraries and executables linked against it.
6016
hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
6018
# Variables whose values should be saved in libtool wrapper scripts and
6019
# restored at relink time.
6020
variables_saved_for_relink="$variables_saved_for_relink"
6022
# Whether libtool must link a program against all its dependency libraries.
6023
link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
6025
# Compile-time system search path for libraries
6026
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
6028
# Run-time system search path for libraries
6029
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
6031
# Fix the shell variable \$srcfile for the compiler.
6032
fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
6034
# Set to yes if exported symbols are required.
6035
always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
6037
# The commands to list exported symbols.
6038
export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
6040
# The commands to extract the exported symbol list from a shared archive.
6041
extract_expsyms_cmds=$lt_extract_expsyms_cmds
6043
# Symbols that should not be listed in the preloaded symbols.
6044
exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
6046
# Symbols that must always be exported.
6047
include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
6050
[# ### END LIBTOOL CONFIG],
6051
[# ### END LIBTOOL TAG CONFIG: $tagname])
6058
cat <<\EOF >> "$cfgfile"
6060
# AIX sometimes has problems with the GCC collect2 program. For some
6061
# reason, if we set the COLLECT_NAMES environment variable, the problems
6062
# vanish in a puff of smoke.
6063
if test "X${COLLECT_NAMES+set}" != Xset; then
6065
export COLLECT_NAMES
6071
# We use sed instead of cat because bash on DJGPP gets confused if
6072
# if finds mixed CR/LF and LF-only lines. Since sed operates in
6073
# text mode, it properly converts lines to CR/LF. This bash problem
6074
# is reportedly fixed, but why not run on old versions too?
6075
sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
6077
mv -f "$cfgfile" "$ofile" || \
6078
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
6082
# If there is no Makefile yet, we rely on a make rule to execute
6083
# `config.status --recheck' to rerun these tests and create the
6084
# libtool script then.
6085
ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
6086
if test -f "$ltmain_in"; then
6087
test -f Makefile && make "$ltmain"
6090
])# AC_LIBTOOL_CONFIG
6093
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
6094
# -------------------------------------------
6095
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
6096
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
6098
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6100
if test "$GCC" = yes; then
6101
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6103
AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
6104
lt_cv_prog_compiler_rtti_exceptions,
6105
[-fno-rtti -fno-exceptions], [],
6106
[_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
6108
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
6111
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
6112
# ---------------------------------
6113
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
6114
[AC_REQUIRE([AC_CANONICAL_HOST])
6115
AC_REQUIRE([AC_PROG_NM])
6116
AC_REQUIRE([AC_OBJEXT])
6117
# Check for command to grab the raw symbol name followed by C symbol from nm.
6118
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
6119
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
6121
# These are sane defaults that work on at least a few old systems.
6122
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
6124
# Character class describing NM global symbol codes.
6125
symcode='[[BCDEGRST]]'
6127
# Regexp to match symbols that can be accessed directly from C.
6128
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
6130
# Transform an extracted symbol line into a proper C declaration
6131
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
6133
# Transform an extracted symbol line into symbol name and symbol address
6134
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'"
6136
# Define system-specific variables.
6141
cygwin* | mingw* | pw32*)
6142
symcode='[[ABCDGISTW]]'
6144
hpux*) # Its linker distinguishes data from code symbols
6145
if test "$host_cpu" = ia64; then
6146
symcode='[[ABCDEGRST]]'
6148
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6149
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'"
6152
if test "$host_cpu" = ia64; then
6153
symcode='[[ABCDGIRSTW]]'
6154
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6155
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'"
6159
symcode='[[BCDEGRST]]'
6162
symcode='[[BCDEGQRST]]'
6168
symcode='[[DFNSTU]]'
6172
# Handle CRLF in mingw tool chain
6176
opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
6180
# If we're using GNU nm, then use its standard symbol codes.
6181
case `$NM -V 2>&1` in
6182
*GNU* | *'with BFD'*)
6183
symcode='[[ABCDGIRSTW]]' ;;
6186
# Try without a prefix undercore, then with it.
6187
for ac_symprfx in "" "_"; do
6189
# Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
6190
symxfrm="\\1 $ac_symprfx\\2 \\2"
6192
# Write the raw and C identifiers.
6193
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
6195
# Check to see that the pipe works correctly.
6199
cat > conftest.$ac_ext <<EOF
6204
void nm_test_func(){}
6208
int main(){nm_test_var='a';nm_test_func();return(0);}
6211
if AC_TRY_EVAL(ac_compile); then
6212
# Now try to grab the symbols.
6214
if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
6215
# Try sorting and uniquifying the output.
6216
if sort "$nlist" | uniq > "$nlist"T; then
6217
mv -f "$nlist"T "$nlist"
6222
# Make sure that we snagged all the symbols we need.
6223
if grep ' nm_test_var$' "$nlist" >/dev/null; then
6224
if grep ' nm_test_func$' "$nlist" >/dev/null; then
6225
cat <<EOF > conftest.$ac_ext
6231
# Now generate the symbol file.
6232
eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
6234
cat <<EOF >> conftest.$ac_ext
6235
#if defined (__STDC__) && __STDC__
6236
# define lt_ptr_t void *
6238
# define lt_ptr_t char *
6242
/* The mapping between symbol names and symbols. */
6247
lt_preloaded_symbols[[]] =
6250
$SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
6251
cat <<\EOF >> conftest.$ac_ext
6259
# Now try linking the two files.
6260
mv conftest.$ac_objext conftstm.$ac_objext
6261
lt_save_LIBS="$LIBS"
6262
lt_save_CFLAGS="$CFLAGS"
6263
LIBS="conftstm.$ac_objext"
6264
CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
6265
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
6268
LIBS="$lt_save_LIBS"
6269
CFLAGS="$lt_save_CFLAGS"
6271
echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
6274
echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
6277
echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
6280
echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
6281
cat conftest.$ac_ext >&5
6283
rm -f conftest* conftst*
6285
# Do not use the global_symbol_pipe unless it works.
6286
if test "$pipe_works" = yes; then
6289
lt_cv_sys_global_symbol_pipe=
6293
if test -z "$lt_cv_sys_global_symbol_pipe"; then
6294
lt_cv_sys_global_symbol_to_cdecl=
6296
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
6297
AC_MSG_RESULT(failed)
6301
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
6304
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
6305
# ---------------------------------------
6306
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
6307
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
6308
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6309
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
6311
AC_MSG_CHECKING([for $compiler option to produce PIC])
6313
# C++ specific cases for pic, static, wl, etc.
6314
if test "$GXX" = yes; then
6315
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6316
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6320
# All AIX code is PIC.
6321
if test "$host_cpu" = ia64; then
6322
# AIX 5 now supports IA64 processor
6323
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6327
# FIXME: we need at least 68020 code to build shared libraries, but
6328
# adding the `-m68020' flag to GCC prevents building anything better,
6330
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6332
beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6333
# PIC is the default for these OSes.
6335
mingw* | os2* | pw32*)
6336
# This hack is so that the source file can tell whether it is being
6337
# built for inclusion in a dll (and should export symbols for example).
6338
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
6340
darwin* | rhapsody*)
6341
# PIC is the default on this platform
6342
# Common symbols not allowed in MH_DYLIB files
6343
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6346
# DJGPP does not support shared libraries at all
6347
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6350
if test -d /usr/nec; then
6351
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6355
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6361
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6366
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6372
# All AIX code is PIC.
6373
if test "$host_cpu" = ia64; then
6374
# AIX 5 now supports IA64 processor
6375
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6377
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6381
case $cc_basename in
6383
# Green Hills C++ Compiler
6384
# _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"
6389
# PIC is the default on this platform
6390
# Common symbols not allowed in MH_DYLIB files
6391
case $cc_basename in
6393
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
6394
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6399
case $cc_basename in
6401
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6404
# Green Hills C++ Compiler
6405
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6411
freebsd* | kfreebsd*-gnu | dragonfly*)
6412
# FreeBSD uses GNU C++
6414
hpux9* | hpux10* | hpux11*)
6415
case $cc_basename in
6417
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6418
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
6419
if test "$host_cpu" != ia64; then
6420
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6424
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6425
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
6431
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6439
irix5* | irix6* | nonstopux*)
6440
case $cc_basename in
6442
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6443
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6444
# CC pic flag -KPIC is the default.
6451
case $cc_basename in
6454
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6455
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6459
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6460
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6461
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6464
# Portland Group C++ compiler.
6465
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6466
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6467
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6471
# Make sure the PIC flag is empty. It appears that all Alpha
6472
# Linux and Compaq Tru64 Unix objects are PIC.
6473
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6474
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6485
case $cc_basename in
6487
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
6495
osf3* | osf4* | osf5*)
6496
case $cc_basename in
6498
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6501
# Rational C++ 2.4.1
6502
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6505
# Digital/Compaq C++
6506
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6507
# Make sure the PIC flag is empty. It appears that all Alpha
6508
# Linux and Compaq Tru64 Unix objects are PIC.
6509
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6510
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6519
case $cc_basename in
6521
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6528
case $cc_basename in
6530
# Sun C++ 4.2, 5.x and Centerline C++
6531
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6532
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6533
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6536
# Green Hills C++ Compiler
6537
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6544
case $cc_basename in
6547
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6548
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6552
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6559
case $cc_basename in
6561
# NonStop-UX NCC 3.20
6562
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6573
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6579
if test "$GCC" = yes; then
6580
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6581
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6585
# All AIX code is PIC.
6586
if test "$host_cpu" = ia64; then
6587
# AIX 5 now supports IA64 processor
6588
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6593
# FIXME: we need at least 68020 code to build shared libraries, but
6594
# adding the `-m68020' flag to GCC prevents building anything better,
6596
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6599
beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6600
# PIC is the default for these OSes.
6603
mingw* | pw32* | os2*)
6604
# This hack is so that the source file can tell whether it is being
6605
# built for inclusion in a dll (and should export symbols for example).
6606
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
6609
darwin* | rhapsody*)
6610
# PIC is the default on this platform
6611
# Common symbols not allowed in MH_DYLIB files
6612
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6616
# Just because we use GCC doesn't mean we suddenly get shared libraries
6617
# on systems that don't support them.
6618
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6623
if test -d /usr/nec; then
6624
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6629
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6636
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6642
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6646
# PORTME Check for flag to pass linker flags through the system compiler.
6649
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6650
if test "$host_cpu" = ia64; then
6651
# AIX 5 now supports IA64 processor
6652
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6654
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6658
# PIC is the default on this platform
6659
# Common symbols not allowed in MH_DYLIB files
6660
case $cc_basename in
6662
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
6663
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6668
mingw* | pw32* | os2*)
6669
# This hack is so that the source file can tell whether it is being
6670
# built for inclusion in a dll (and should export symbols for example).
6671
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
6674
hpux9* | hpux10* | hpux11*)
6675
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6676
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6683
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6686
# Is there a better lt_prog_compiler_static that works with the bundled CC?
6687
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6690
irix5* | irix6* | nonstopux*)
6691
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6692
# PIC (with -KPIC) is the default.
6693
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6697
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6698
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6702
case $cc_basename in
6704
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6705
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6706
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6708
pgcc* | pgf77* | pgf90*)
6709
# Portland Group compilers (*not* the Pentium gcc compiler,
6710
# which looks to be a dead project)
6711
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6712
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6713
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6716
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6717
# All Alpha code is PIC.
6718
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6723
osf3* | osf4* | osf5*)
6724
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6725
# All OSF/1 code is PIC.
6726
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6730
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
6731
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
6735
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6736
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6737
case $cc_basename in
6739
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
6741
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
6746
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6747
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6748
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6751
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6752
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6753
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6754
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6758
if test -d /usr/nec ;then
6759
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
6760
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6765
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6766
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6770
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6771
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6775
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6780
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
6783
# Check to make sure the PIC flag actually works.
6785
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
6786
AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
6787
_LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
6788
[$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
6789
[case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
6791
*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
6793
[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6794
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
6797
# For platforms which do not support PIC, -DPIC is meaningless:
6799
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6802
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
6808
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
6809
# ------------------------------------
6810
# See if the linker supports building shared libraries.
6811
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
6812
[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6814
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6817
# If we're using GNU nm, then we don't want the "-C" option.
6818
# -C means demangle to AIX nm, but means don't demangle with GNU nm
6819
if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6820
_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'
6822
_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'
6826
_LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
6829
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
6832
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6837
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
6838
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6839
_LT_AC_TAGVAR(archive_cmds, $1)=
6840
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
6841
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
6842
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
6843
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
6844
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6845
_LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
6846
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6847
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6848
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6849
_LT_AC_TAGVAR(hardcode_direct, $1)=no
6850
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6851
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6852
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
6853
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
6854
_LT_AC_TAGVAR(module_cmds, $1)=
6855
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
6856
_LT_AC_TAGVAR(always_export_symbols, $1)=no
6857
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6858
# include_expsyms should be a list of space-separated symbols to be *always*
6859
# included in the symbol list
6860
_LT_AC_TAGVAR(include_expsyms, $1)=
6861
# exclude_expsyms can be an extended regexp of symbols to exclude
6862
# it will be wrapped by ` (' and `)$', so one must not match beginning or
6863
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
6864
# as well as any symbol that contains `d'.
6865
_LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
6866
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
6867
# platforms (ab)use it in PIC code, but their linkers get confused if
6868
# the symbol is explicitly referenced. Since portable code cannot
6869
# rely on this symbol name, it's probably fine to never include it in
6870
# preloaded symbol tables.
6871
extract_expsyms_cmds=
6872
# Just being paranoid about ensuring that cc_basename is set.
6873
_LT_CC_BASENAME([$compiler])
6875
cygwin* | mingw* | pw32*)
6876
# FIXME: the MSVC++ port hasn't been tested in a loooong time
6877
# When not using gcc, we currently assume that we are using
6878
# Microsoft Visual C++.
6879
if test "$GCC" != yes; then
6888
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
6889
if test "$with_gnu_ld" = yes; then
6890
# If archive_cmds runs LD, not CC, wlarc should be empty
6893
# Set some defaults for GNU ld with shared library support. These
6894
# are reset later if shared libraries are not supported. Putting them
6895
# here allows them to be overridden if necessary.
6896
runpath_var=LD_RUN_PATH
6897
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6898
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6899
# ancient GNU ld didn't support --whole-archive et. al.
6900
if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
6901
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6903
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6905
supports_anon_versioning=no
6906
case `$LD -v 2>/dev/null` in
6907
*\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6908
*\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6909
*\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6910
*\ 2.11.*) ;; # other 2.11 versions
6911
*) supports_anon_versioning=yes ;;
6914
# See if GNU ld supports shared libraries.
6916
aix3* | aix4* | aix5*)
6917
# On AIX/PPC, the GNU linker is very broken
6918
if test "$host_cpu" != ia64; then
6919
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6922
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
6923
*** to be unable to reliably create shared libraries on AIX.
6924
*** Therefore, libtool is disabling shared libraries support. If you
6925
*** really care for shared libraries, you may want to modify your PATH
6926
*** so that a non-GNU linker is found, and then restart.
6933
_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)'
6934
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6935
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6937
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
6938
# that the semantics of dynamic libraries on AmigaOS, at least up
6939
# to version 4, is to share data among multiple programs linked
6940
# with the same dynamic library. Since this doesn't match the
6941
# behavior of shared libraries on other platforms, we can't use
6943
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6947
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6948
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6949
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6950
# support --undefined. This deserves some investigation. FIXME
6951
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6953
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6957
cygwin* | mingw* | pw32*)
6958
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6959
# as there is no search path for DLLs.
6960
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6961
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6962
_LT_AC_TAGVAR(always_export_symbols, $1)=no
6963
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6964
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
6966
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
6967
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
6968
# If the export-symbols file already is a .def file (1st line
6969
# is EXPORTS), use it as is; otherwise, prepend...
6970
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6971
cp $export_symbols $output_objdir/$soname.def;
6973
echo EXPORTS > $output_objdir/$soname.def;
6974
cat $export_symbols >> $output_objdir/$soname.def;
6976
$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
6978
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6983
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6985
case $cc_basename,$host_cpu in
6986
pgcc*) # Portland Group C compiler
6987
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive,`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
6988
tmp_addflag=' $pic_flag'
6990
pgf77* | pgf90* ) # Portland Group f77 and f90 compilers
6991
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive,`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
6992
tmp_addflag=' $pic_flag -Mnomain' ;;
6993
ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
6994
tmp_addflag=' -i_dynamic' ;;
6995
efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
6996
tmp_addflag=' -i_dynamic -nofor_main' ;;
6997
ifc* | ifort*) # Intel Fortran compiler
6998
tmp_addflag=' -nofor_main' ;;
7000
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7002
if test $supports_anon_versioning = yes; then
7003
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
7004
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7005
$echo "local: *; };" >> $output_objdir/$libname.ver~
7006
$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7009
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7014
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
7015
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
7018
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7019
_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'
7024
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
7025
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7028
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
7029
*** create shared libraries on Solaris systems. Therefore, libtool
7030
*** is disabling shared libraries support. We urge you to upgrade GNU
7031
*** binutils to release 2.9.1 or newer. Another option is to modify
7032
*** your PATH or compiler configuration so that the native linker is
7033
*** used, and then restart.
7036
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7037
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7038
_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'
7040
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7045
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7047
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
7048
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7052
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7053
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7054
_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'
7056
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7061
if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
7063
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
7064
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
7065
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
7068
# PORTME fill in a description of your system's linker (not GNU ld)
7071
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7072
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
7073
_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'
7074
# Note: this linker hardcodes the directories in LIBPATH if there
7075
# are no directories specified by -L.
7076
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7077
if test "$GCC" = yes && test -z "$link_static_flag"; then
7078
# Neither direct hardcoding nor static linking is supported with a
7080
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
7085
if test "$host_cpu" = ia64; then
7086
# On IA64, the linker does run time linking by default, so we don't
7087
# have to do anything special.
7088
aix_use_runtimelinking=no
7089
exp_sym_flag='-Bexport'
7092
# If we're using GNU nm, then we don't want the "-C" option.
7093
# -C means demangle to AIX nm, but means don't demangle with GNU nm
7094
if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
7095
_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'
7097
_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'
7099
aix_use_runtimelinking=no
7101
# Test if we are trying to use run time linking or normal
7102
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
7103
# need to do runtime linking.
7104
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
7105
for ld_flag in $LDFLAGS; do
7106
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
7107
aix_use_runtimelinking=yes
7113
exp_sym_flag='-bexport'
7114
no_entry_flag='-bnoentry'
7117
# When large executables or shared objects are built, AIX ld can
7118
# have problems creating the table of contents. If linking a library
7119
# or program results in "error TOC overflow" add -mminimal-toc to
7120
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
7121
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7123
_LT_AC_TAGVAR(archive_cmds, $1)=''
7124
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
7125
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
7126
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7128
if test "$GCC" = yes; then
7129
case $host_os in aix4.[[012]]|aix4.[[012]].*)
7130
# We only want to do this on AIX 4.2 and lower, the check
7131
# below for broken collect2 doesn't work under 4.3+
7132
collect2name=`${CC} -print-prog-name=collect2`
7133
if test -f "$collect2name" && \
7134
strings "$collect2name" | grep resolve_lib_name >/dev/null
7136
# We have reworked collect2
7137
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
7139
# We have old collect2
7140
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
7141
# It fails to find uninstalled libraries when the uninstalled
7142
# path is not listed in the libpath. Setting hardcode_minus_L
7143
# to unsupported forces relinking
7144
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7145
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7146
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
7149
shared_flag='-shared'
7150
if test "$aix_use_runtimelinking" = yes; then
7151
shared_flag="$shared_flag "'${wl}-G'
7155
if test "$host_cpu" = ia64; then
7156
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7157
# chokes on -Wl,-G. The following line is correct:
7160
if test "$aix_use_runtimelinking" = yes; then
7161
shared_flag='${wl}-G'
7163
shared_flag='${wl}-bM:SRE'
7168
# It seems that -bexpall does not export symbols beginning with
7169
# underscore (_), so it is better to generate a list of symbols to export.
7170
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
7171
if test "$aix_use_runtimelinking" = yes; then
7172
# Warning - without using the other runtime loading flags (-brtl),
7173
# -berok will link without error, but may produce a broken library.
7174
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
7175
# Determine the default libpath from the value encoded in an empty executable.
7176
_LT_AC_SYS_LIBPATH_AIX
7177
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7178
_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"
7180
if test "$host_cpu" = ia64; then
7181
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7182
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7183
_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"
7185
# Determine the default libpath from the value encoded in an empty executable.
7186
_LT_AC_SYS_LIBPATH_AIX
7187
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7188
# Warning - without using the other run time loading flags,
7189
# -berok will link without error, but may produce a broken library.
7190
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7191
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7192
# -bexpall does not export symbols beginning with underscore (_)
7193
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
7194
# Exported symbols can be pulled into shared objects from archives
7195
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
7196
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7197
# This is similar to how AIX traditionally builds it's shared libraries.
7198
_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'
7204
_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)'
7205
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7206
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7207
# see comment about different semantics on the GNU ld section
7208
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7212
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
7215
cygwin* | mingw* | pw32*)
7216
# When not using gcc, we currently assume that we are using
7217
# Microsoft Visual C++.
7218
# hardcode_libdir_flag_spec is actually meaningless, as there is
7219
# no search path for DLLs.
7220
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7221
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7222
# Tell ltmain to make .lib files, not .a files.
7224
# Tell ltmain to make .dll files, not .so files.
7226
# FIXME: Setting linknames here is a bad hack.
7227
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
7228
# The linker will automatically build a .lib file if we build a DLL.
7229
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
7230
# FIXME: Should let the user specify the lib program.
7231
_LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
7232
_LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
7233
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7236
darwin* | rhapsody*)
7238
rhapsody* | darwin1.[[012]])
7239
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
7242
if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
7243
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
7245
case ${MACOSX_DEPLOYMENT_TARGET} in
7247
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
7250
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
7256
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7257
_LT_AC_TAGVAR(hardcode_direct, $1)=no
7258
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
7259
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7260
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
7261
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7262
if test "$GCC" = yes ; then
7263
output_verbose_link_cmd='echo'
7264
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
7265
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
7266
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
7267
_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}'
7268
_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}'
7270
case $cc_basename in
7272
output_verbose_link_cmd='echo'
7273
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
7274
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
7275
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
7276
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
7277
_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}'
7280
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7287
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7288
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7289
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7293
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7296
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
7297
# support. Future versions do this automatically, but an explicit c++rt0.o
7298
# does not break anything, and helps significantly (at the cost of a little
7301
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
7302
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7303
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
7304
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7307
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
7309
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7310
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
7311
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7312
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7315
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
7316
freebsd* | kfreebsd*-gnu | dragonfly*)
7317
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
7318
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7319
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
7320
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7324
if test "$GCC" = yes; then
7325
_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'
7327
_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'
7329
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7330
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7331
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
7333
# hardcode_minus_L: Not really in the search PATH,
7334
# but as the default location of the library.
7335
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7336
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7340
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
7343
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7346
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7352
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
7355
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
7359
if test "$with_gnu_ld" = no; then
7362
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7363
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
7364
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7365
_LT_AC_TAGVAR(hardcode_direct, $1)=no
7366
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7369
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7370
_LT_AC_TAGVAR(hardcode_direct, $1)=no
7371
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7373
# hardcode_minus_L: Not really in the search PATH,
7374
# but as the default location of the library.
7375
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7378
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7379
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7380
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
7381
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7383
# hardcode_minus_L: Not really in the search PATH,
7384
# but as the default location of the library.
7385
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7391
irix5* | irix6* | nonstopux*)
7392
if test "$GCC" = yes; then
7393
_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'
7395
_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'
7396
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
7398
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7399
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7400
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7404
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
7405
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
7407
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
7409
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7410
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
7411
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7415
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7416
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
7417
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7418
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7419
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7423
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
7424
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7425
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7426
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7427
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
7428
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7429
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7432
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
7433
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7434
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7437
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7438
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7445
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7446
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7447
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7448
_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'
7449
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
7453
if test "$GCC" = yes; then
7454
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7455
_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'
7457
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7458
_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'
7460
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7461
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7464
osf4* | osf5*) # as osf3* with the addition of -msym flag
7465
if test "$GCC" = yes; then
7466
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7467
_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'
7468
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7470
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7471
_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'
7472
_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~
7473
$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
7475
# Both c and cxx compiler support -rpath directly
7476
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7478
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7482
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7483
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7484
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7485
runpath_var=LD_RUN_PATH
7486
hardcode_runpath_var=yes
7490
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
7491
if test "$GCC" = yes; then
7493
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7494
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
7495
$CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
7498
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
7499
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
7500
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
7502
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7503
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7505
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7507
# The compiler driver will combine linker options so we
7508
# cannot just pass the convience library names through
7509
# without $wl, iff we do not link with $LD.
7510
# Luckily, gcc supports the same syntax we need for Sun Studio.
7511
# Supported since Solaris 2.6 (maybe 2.5.1?)
7514
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
7516
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
7519
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7523
if test "x$host_vendor" = xsequent; then
7524
# Use $CC to link under sequent, because it throws in some extra .o
7525
# files that make .init and .fini sections work.
7526
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
7528
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
7530
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7531
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
7532
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7533
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7537
case $host_vendor in
7539
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7540
_LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
7543
## LD is ld it makes a PLAMLIB
7544
## CC just makes a GrossModule.
7545
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
7546
_LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
7547
_LT_AC_TAGVAR(hardcode_direct, $1)=no
7550
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7551
_LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
7554
runpath_var='LD_RUN_PATH'
7555
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7559
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7560
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7561
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
7565
if test -d /usr/nec; then
7566
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7567
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7568
runpath_var=LD_RUN_PATH
7569
hardcode_runpath_var=yes
7570
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
7575
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
7576
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
7577
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
7578
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7579
hardcode_runpath_var=yes
7580
runpath_var=LD_RUN_PATH
7583
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
7584
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
7585
if test "$GCC" = yes; then
7586
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7588
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7590
runpath_var='LD_RUN_PATH'
7591
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7595
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
7596
# $CC -shared without GNU ld will not create a library from C++
7597
# object files and a static libstdc++, better avoid it by now
7598
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
7599
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
7600
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
7601
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
7602
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7603
runpath_var='LD_RUN_PATH'
7607
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7608
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7609
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7613
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7618
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
7619
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7621
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
7622
if test "$GCC" = yes; then
7623
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
7627
# Do we need to explicitly link libc?
7629
case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
7631
# Assume -lc should be added
7632
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7634
if test "$enable_shared" = yes && test "$GCC" = yes; then
7635
case $_LT_AC_TAGVAR(archive_cmds, $1) in
7637
# FIXME: we may have to deal with multi-command sequences.
7640
# Test whether the compiler implicitly links with -lc since on some
7641
# systems, -lgcc has to come before -lc. If gcc already passes -lc
7642
# to ld, don't add -lc before -lgcc.
7643
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
7645
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
7647
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
7650
libobjs=conftest.$ac_objext
7652
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
7658
lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
7659
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
7660
if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
7662
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7664
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7666
_LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
7668
cat conftest.err 1>&5
7671
AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
7677
])# AC_LIBTOOL_PROG_LD_SHLIBS
7680
# _LT_AC_FILE_LTDLL_C
7681
# -------------------
7682
# Be careful that the start marker always follows a newline.
7683
AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
7684
# /* ltdll.c starts here */
7685
# #define WIN32_LEAN_AND_MEAN
7686
# #include <windows.h>
7687
# #undef WIN32_LEAN_AND_MEAN
7688
# #include <stdio.h>
7690
# #ifndef __CYGWIN__
7691
# # ifdef __CYGWIN32__
7692
# # define __CYGWIN__ __CYGWIN32__
7696
# #ifdef __cplusplus
7699
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7700
# #ifdef __cplusplus
7705
# #include <cygwin/cygwin_dll.h>
7706
# DECLARE_CYGWIN_DLL( DllMain );
7708
# HINSTANCE __hDllInstance_base;
7711
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7713
# __hDllInstance_base = hInst;
7716
# /* ltdll.c ends here */
7717
])# _LT_AC_FILE_LTDLL_C
7720
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
7721
# ---------------------------------
7722
AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
7726
AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
7727
AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
7728
AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
7729
AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
7730
AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
7731
AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
7732
AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
7734
# This is just to silence aclocal about the macro not being used
7735
ifelse([AC_DISABLE_FAST_INSTALL])
7737
AC_DEFUN([LT_AC_PROG_GCJ],
7738
[AC_CHECK_TOOL(GCJ, gcj, no)
7739
test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7743
AC_DEFUN([LT_AC_PROG_RC],
7744
[AC_CHECK_TOOL(RC, windres, no)
7747
# NOTE: This macro has been submitted for inclusion into #
7748
# GNU Autoconf as AC_PROG_SED. When it is available in #
7749
# a released version of Autoconf we should remove this #
7750
# macro and use it instead. #
7753
# Check for a fully-functional sed program, that truncates
7754
# as few characters as possible. Prefer GNU sed if found.
7755
AC_DEFUN([LT_AC_PROG_SED],
7756
[AC_MSG_CHECKING([for a sed that does not truncate output])
7757
AC_CACHE_VAL(lt_cv_path_SED,
7758
[# Loop through the user's path and test for sed and gsed.
7759
# Then use that list of sed's as ones to test for truncation.
7760
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7764
test -z "$as_dir" && as_dir=.
7765
for lt_ac_prog in sed gsed; do
7766
for ac_exec_ext in '' $ac_executable_extensions; do
7767
if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7768
lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7775
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
7776
# along with /bin/sed that truncates output.
7777
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7778
test ! -f $lt_ac_sed && continue
7779
cat /dev/null > conftest.in
7781
echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7782
# Check for GNU sed and select it if it is found.
7783
if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7784
lt_cv_path_SED=$lt_ac_sed
7788
cat conftest.in conftest.in >conftest.tmp
7789
mv conftest.tmp conftest.in
7790
cp conftest.in conftest.nl
7792
$lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7793
cmp -s conftest.out conftest.nl || break
7794
# 10000 chars as input seems more than enough
7795
test $lt_ac_count -gt 10 && break
7796
lt_ac_count=`expr $lt_ac_count + 1`
7797
if test $lt_ac_count -gt $lt_ac_max; then
7798
lt_ac_max=$lt_ac_count
7799
lt_cv_path_SED=$lt_ac_sed
7805
AC_MSG_RESULT([$SED])
7809
dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
7810
dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
7811
dnl also defines GSTUFF_PKG_ERRORS on error
7812
AC_DEFUN(PKG_CHECK_MODULES, [
7815
if test -z "$PKG_CONFIG"; then
7816
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
7819
if test "$PKG_CONFIG" = "no" ; then
7820
echo "*** The pkg-config script could not be found. Make sure it is"
7821
echo "*** in your path, or set the PKG_CONFIG environment variable"
7822
echo "*** to the full path to pkg-config."
7823
echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
7825
PKG_CONFIG_MIN_VERSION=0.9.0
7826
if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
7827
AC_MSG_CHECKING(for $2)
7829
if $PKG_CONFIG --exists "$2" ; then
7833
AC_MSG_CHECKING($1_CFLAGS)
7834
$1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
7835
AC_MSG_RESULT($$1_CFLAGS)
7837
AC_MSG_CHECKING($1_LIBS)
7838
$1_LIBS=`$PKG_CONFIG --libs "$2"`
7839
AC_MSG_RESULT($$1_LIBS)
7843
## If we have a custom action on failure, don't print errors, but
7844
## do set a variable so people can do so.
7845
$1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
7846
ifelse([$4], ,echo $$1_PKG_ERRORS,)
7852
echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
7853
echo "*** See http://www.freedesktop.org/software/pkgconfig"
7857
if test $succeeded = yes; then
7858
ifelse([$3], , :, [$3])
7860
ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])