1
# generated automatically by aclocal 1.7.9 -*- Autoconf -*-
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
4
# Free Software Foundation, Inc.
5
# This file is free software; the Free Software Foundation
6
# gives unlimited permission to copy and/or distribute it,
7
# with or without modifications, as long as this notice is preserved.
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14
# Do all the work for Automake. -*- Autoconf -*-
16
# This macro actually does too much some checks are only needed if
17
# your package does certain things. But this isn't really a big deal.
19
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
20
# Free Software Foundation, Inc.
22
# This program is free software; you can redistribute it and/or modify
23
# it under the terms of the GNU General Public License as published by
24
# the Free Software Foundation; either version 2, or (at your option)
27
# This program is distributed in the hope that it will be useful,
28
# but WITHOUT ANY WARRANTY; without even the implied warranty of
29
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30
# GNU General Public License for more details.
32
# You should have received a copy of the GNU General Public License
33
# along with this program; if not, write to the Free Software
34
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
41
# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
42
# the ones we care about.
43
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
45
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
46
# AM_INIT_AUTOMAKE([OPTIONS])
47
# -----------------------------------------------
48
# The call with PACKAGE and VERSION arguments is the old style
49
# call (pre autoconf-2.50), which is being phased out. PACKAGE
50
# and VERSION should now be passed to AC_INIT and removed from
51
# the call to AM_INIT_AUTOMAKE.
52
# We support both call styles for the transition. After
53
# the next Automake release, Autoconf can make the AC_INIT
54
# arguments mandatory, and then we can depend on a new Autoconf
55
# release and drop the old call support.
56
AC_DEFUN([AM_INIT_AUTOMAKE],
57
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
58
AC_REQUIRE([AC_PROG_INSTALL])dnl
59
# test to see if srcdir already configured
60
if test "`cd $srcdir && pwd`" != "`pwd`" &&
61
test -f $srcdir/config.status; then
62
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
65
# test whether we have cygpath
66
if test -z "$CYGPATH_W"; then
67
if (cygpath --version) >/dev/null 2>/dev/null; then
68
CYGPATH_W='cygpath -w'
75
# Define the identity of the package.
76
dnl Distinguish between old-style and new-style calls.
78
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
79
AC_SUBST([PACKAGE], [$1])dnl
80
AC_SUBST([VERSION], [$2])],
81
[_AM_SET_OPTIONS([$1])dnl
82
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
83
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
85
_AM_IF_OPTION([no-define],,
86
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
87
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
89
# Some tools Automake needs.
90
AC_REQUIRE([AM_SANITY_CHECK])dnl
91
AC_REQUIRE([AC_ARG_PROGRAM])dnl
92
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
93
AM_MISSING_PROG(AUTOCONF, autoconf)
94
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
95
AM_MISSING_PROG(AUTOHEADER, autoheader)
96
AM_MISSING_PROG(MAKEINFO, makeinfo)
97
AM_MISSING_PROG(AMTAR, tar)
100
# We need awk for the "check" target. The system "awk" is bad on
102
AC_REQUIRE([AC_PROG_AWK])dnl
103
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
104
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
106
_AM_IF_OPTION([no-dependencies],,
107
[AC_PROVIDE_IFELSE([AC_PROG_CC],
108
[_AM_DEPENDENCIES(CC)],
109
[define([AC_PROG_CC],
110
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
111
AC_PROVIDE_IFELSE([AC_PROG_CXX],
112
[_AM_DEPENDENCIES(CXX)],
113
[define([AC_PROG_CXX],
114
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
119
# When config.status generates a header, we must update the stamp-h file.
120
# This file resides in the same directory as the config header
121
# that is generated. The stamp files are numbered to have different names.
123
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
124
# loop where config.status creates the headers, so we can generate
125
# our stamp files there.
126
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
127
[# Compute $1's index in $config_headers.
129
for _am_header in $config_headers :; do
134
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
137
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
139
# Copyright 2002 Free Software Foundation, Inc.
141
# This program is free software; you can redistribute it and/or modify
142
# it under the terms of the GNU General Public License as published by
143
# the Free Software Foundation; either version 2, or (at your option)
146
# This program is distributed in the hope that it will be useful,
147
# but WITHOUT ANY WARRANTY; without even the implied warranty of
148
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
149
# GNU General Public License for more details.
151
# You should have received a copy of the GNU General Public License
152
# along with this program; if not, write to the Free Software
153
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
155
# AM_AUTOMAKE_VERSION(VERSION)
156
# ----------------------------
157
# Automake X.Y traces this macro to ensure aclocal.m4 has been
158
# generated from the m4 files accompanying Automake X.Y.
159
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
161
# AM_SET_CURRENT_AUTOMAKE_VERSION
162
# -------------------------------
163
# Call AM_AUTOMAKE_VERSION so it can be traced.
164
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
165
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
166
[AM_AUTOMAKE_VERSION([1.7.9])])
168
# Helper functions for option handling. -*- Autoconf -*-
170
# Copyright 2001, 2002 Free Software Foundation, Inc.
172
# This program is free software; you can redistribute it and/or modify
173
# it under the terms of the GNU General Public License as published by
174
# the Free Software Foundation; either version 2, or (at your option)
177
# This program is distributed in the hope that it will be useful,
178
# but WITHOUT ANY WARRANTY; without even the implied warranty of
179
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
180
# GNU General Public License for more details.
182
# You should have received a copy of the GNU General Public License
183
# along with this program; if not, write to the Free Software
184
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
189
# _AM_MANGLE_OPTION(NAME)
190
# -----------------------
191
AC_DEFUN([_AM_MANGLE_OPTION],
192
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
194
# _AM_SET_OPTION(NAME)
195
# ------------------------------
196
# Set option NAME. Presently that only means defining a flag for this option.
197
AC_DEFUN([_AM_SET_OPTION],
198
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
200
# _AM_SET_OPTIONS(OPTIONS)
201
# ----------------------------------
202
# OPTIONS is a space-separated list of Automake options.
203
AC_DEFUN([_AM_SET_OPTIONS],
204
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
206
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
207
# -------------------------------------------
208
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
209
AC_DEFUN([_AM_IF_OPTION],
210
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
213
# Check to make sure that the build environment is sane.
216
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
218
# This program is free software; you can redistribute it and/or modify
219
# it under the terms of the GNU General Public License as published by
220
# the Free Software Foundation; either version 2, or (at your option)
223
# This program is distributed in the hope that it will be useful,
224
# but WITHOUT ANY WARRANTY; without even the implied warranty of
225
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
226
# GNU General Public License for more details.
228
# You should have received a copy of the GNU General Public License
229
# along with this program; if not, write to the Free Software
230
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
237
AC_DEFUN([AM_SANITY_CHECK],
238
[AC_MSG_CHECKING([whether build environment is sane])
241
echo timestamp > conftest.file
242
# Do `set' in a subshell so we don't clobber the current shell's
243
# arguments. Must try -L first in case configure is actually a
244
# symlink; some systems play weird games with the mod time of symlinks
245
# (eg FreeBSD returns the mod time of the symlink's containing
248
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
249
if test "$[*]" = "X"; then
251
set X `ls -t $srcdir/configure conftest.file`
254
if test "$[*]" != "X $srcdir/configure conftest.file" \
255
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
257
# If neither matched, then we have a broken ls. This can happen
258
# if, for instance, CONFIG_SHELL is bash and it inherits a
259
# broken ls alias from the environment. This has actually
260
# happened. Such a system could not be considered "sane".
261
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
262
alias in your environment])
265
test "$[2]" = conftest.file
271
AC_MSG_ERROR([newly created file is older than distributed files!
272
Check your system clock])
279
# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
281
# This program is free software; you can redistribute it and/or modify
282
# it under the terms of the GNU General Public License as published by
283
# the Free Software Foundation; either version 2, or (at your option)
286
# This program is distributed in the hope that it will be useful,
287
# but WITHOUT ANY WARRANTY; without even the implied warranty of
288
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
289
# GNU General Public License for more details.
291
# You should have received a copy of the GNU General Public License
292
# along with this program; if not, write to the Free Software
293
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
298
# AM_MISSING_PROG(NAME, PROGRAM)
299
# ------------------------------
300
AC_DEFUN([AM_MISSING_PROG],
301
[AC_REQUIRE([AM_MISSING_HAS_RUN])
302
$1=${$1-"${am_missing_run}$2"}
308
# Define MISSING if not defined so far and test if it supports --run.
309
# If it does, set am_missing_run to use it, otherwise, to nothing.
310
AC_DEFUN([AM_MISSING_HAS_RUN],
311
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
312
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
313
# Use eval to expand $SHELL
314
if eval "$MISSING --run true"; then
315
am_missing_run="$MISSING --run "
318
AC_MSG_WARN([`missing' script is too old or missing])
324
# Copyright 2001 Free Software Foundation, Inc.
326
# This program is free software; you can redistribute it and/or modify
327
# it under the terms of the GNU General Public License as published by
328
# the Free Software Foundation; either version 2, or (at your option)
331
# This program is distributed in the hope that it will be useful,
332
# but WITHOUT ANY WARRANTY; without even the implied warranty of
333
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
334
# GNU General Public License for more details.
336
# You should have received a copy of the GNU General Public License
337
# along with this program; if not, write to the Free Software
338
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
341
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
342
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
343
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
345
# Of course, Automake must honor this variable whenever it calls a
346
# tool from the auxiliary directory. The problem is that $srcdir (and
347
# therefore $ac_aux_dir as well) can be either absolute or relative,
348
# depending on how configure is run. This is pretty annoying, since
349
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
350
# source directory, any form will work fine, but in subdirectories a
351
# relative path needs to be adjusted first.
353
# $ac_aux_dir/missing
354
# fails when called from a subdirectory if $ac_aux_dir is relative
355
# $top_srcdir/$ac_aux_dir/missing
356
# fails if $ac_aux_dir is absolute,
357
# fails when called from a subdirectory in a VPATH build with
358
# a relative $ac_aux_dir
360
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
361
# are both prefixed by $srcdir. In an in-source build this is usually
362
# harmless because $srcdir is `.', but things will broke when you
363
# start a VPATH build or use an absolute $srcdir.
365
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
366
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
367
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
368
# and then we would define $MISSING as
369
# MISSING="\${SHELL} $am_aux_dir/missing"
370
# This will work as long as MISSING is not called from configure, because
371
# unfortunately $(top_srcdir) has no meaning in configure.
372
# However there are other variables, like CC, which are often used in
373
# configure, and could therefore not use this "fixed" $ac_aux_dir.
375
# Another solution, used here, is to always expand $ac_aux_dir to an
376
# absolute PATH. The drawback is that using absolute paths prevent a
377
# configured tree to be moved without reconfiguration.
379
# Rely on autoconf to set up CDPATH properly.
382
AC_DEFUN([AM_AUX_DIR_EXPAND], [
383
# expand $ac_aux_dir to an absolute path
384
am_aux_dir=`cd $ac_aux_dir && pwd`
389
# Define $install_sh.
391
# Copyright 2001 Free Software Foundation, Inc.
393
# This program is free software; you can redistribute it and/or modify
394
# it under the terms of the GNU General Public License as published by
395
# the Free Software Foundation; either version 2, or (at your option)
398
# This program is distributed in the hope that it will be useful,
399
# but WITHOUT ANY WARRANTY; without even the implied warranty of
400
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
401
# GNU General Public License for more details.
403
# You should have received a copy of the GNU General Public License
404
# along with this program; if not, write to the Free Software
405
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
408
AC_DEFUN([AM_PROG_INSTALL_SH],
409
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
410
install_sh=${install_sh-"$am_aux_dir/install-sh"}
411
AC_SUBST(install_sh)])
413
# AM_PROG_INSTALL_STRIP
415
# Copyright 2001 Free Software Foundation, Inc.
417
# This program is free software; you can redistribute it and/or modify
418
# it under the terms of the GNU General Public License as published by
419
# the Free Software Foundation; either version 2, or (at your option)
422
# This program is distributed in the hope that it will be useful,
423
# but WITHOUT ANY WARRANTY; without even the implied warranty of
424
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
425
# GNU General Public License for more details.
427
# You should have received a copy of the GNU General Public License
428
# along with this program; if not, write to the Free Software
429
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
432
# One issue with vendor `install' (even GNU) is that you can't
433
# specify the program used to strip binaries. This is especially
434
# annoying in cross-compiling environments, where the build's strip
435
# is unlikely to handle the host's binaries.
436
# Fortunately install-sh will honor a STRIPPROG variable, so we
437
# always use install-sh in `make install-strip', and initialize
438
# STRIPPROG with the value of the STRIP variable (set by the user).
439
AC_DEFUN([AM_PROG_INSTALL_STRIP],
440
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
441
# Installed binaries are usually stripped using `strip' when the user
442
# run `make install-strip'. However `strip' might not be the right
443
# tool to use in cross-compilation environments, therefore Automake
444
# will honor the `STRIP' environment variable to overrule this program.
445
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
446
if test "$cross_compiling" != no; then
447
AC_CHECK_TOOL([STRIP], [strip], :)
449
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
450
AC_SUBST([INSTALL_STRIP_PROGRAM])])
453
# Copyright (C) 2003 Free Software Foundation, Inc.
455
# This program is free software; you can redistribute it and/or modify
456
# it under the terms of the GNU General Public License as published by
457
# the Free Software Foundation; either version 2, or (at your option)
460
# This program is distributed in the hope that it will be useful,
461
# but WITHOUT ANY WARRANTY; without even the implied warranty of
462
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
463
# GNU General Public License for more details.
465
# You should have received a copy of the GNU General Public License
466
# along with this program; if not, write to the Free Software
467
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
472
# Check whether the underlying file-system supports filenames
473
# with a leading dot. For instance MS-DOS doesn't.
474
AC_DEFUN([AM_SET_LEADING_DOT],
475
[rm -rf .tst 2>/dev/null
476
mkdir .tst 2>/dev/null
477
if test -d .tst; then
482
rmdir .tst 2>/dev/null
483
AC_SUBST([am__leading_dot])])
485
# serial 4 -*- Autoconf -*-
487
# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
489
# This program is free software; you can redistribute it and/or modify
490
# it under the terms of the GNU General Public License as published by
491
# the Free Software Foundation; either version 2, or (at your option)
494
# This program is distributed in the hope that it will be useful,
495
# but WITHOUT ANY WARRANTY; without even the implied warranty of
496
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
497
# GNU General Public License for more details.
499
# You should have received a copy of the GNU General Public License
500
# along with this program; if not, write to the Free Software
501
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
505
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
506
# written in clear, in which case automake, when reading aclocal.m4,
507
# will think it sees a *use*, and therefore will trigger all it's
508
# C support machinery. Also note that it means that autoscan, seeing
509
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
513
# _AM_DEPENDENCIES(NAME)
514
# ----------------------
515
# See how the compiler implements dependency checking.
516
# NAME is "CC", "CXX", "GCJ", or "OBJC".
517
# We try a few techniques and use that to set a single cache variable.
519
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
520
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
521
# dependency, and given that the user is not expected to run this macro,
522
# just rely on AC_PROG_CC.
523
AC_DEFUN([_AM_DEPENDENCIES],
524
[AC_REQUIRE([AM_SET_DEPDIR])dnl
525
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
526
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
527
AC_REQUIRE([AM_DEP_TRACK])dnl
529
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
530
[$1], CXX, [depcc="$CXX" am_compiler_list=],
531
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
532
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
533
[depcc="$$1" am_compiler_list=])
535
AC_CACHE_CHECK([dependency style of $depcc],
536
[am_cv_$1_dependencies_compiler_type],
537
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
538
# We make a subdir and do the tests there. Otherwise we can end up
539
# making bogus files that we don't know about and never remove. For
540
# instance it was reported that on HP-UX the gcc test will end up
541
# making a dummy file named `D' -- because `-MD' means `put the output
544
# Copy depcomp to subdir because otherwise we won't find it if we're
545
# using a relative directory.
546
cp "$am_depcomp" conftest.dir
549
am_cv_$1_dependencies_compiler_type=none
550
if test "$am_compiler_list" = ""; then
551
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
553
for depmode in $am_compiler_list; do
554
# We need to recreate these files for each test, as the compiler may
555
# overwrite some of them when testing with obscure command lines.
556
# This happens at least with the AIX C compiler.
557
echo '#include "conftest.h"' > conftest.c
558
echo 'int i;' > conftest.h
559
echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
563
# after this tag, mechanisms are not by side-effect, so they'll
564
# only be used when explicitly requested
565
if test "x$enable_dependency_tracking" = xyes; then
573
# We check with `-c' and `-o' for the sake of the "dashmstdout"
574
# mode. It turns out that the SunPro C++ compiler does not properly
575
# handle `-M -o', and we need to detect this.
576
if depmode=$depmode \
577
source=conftest.c object=conftest.o \
578
depfile=conftest.Po tmpdepfile=conftest.TPo \
579
$SHELL ./depcomp $depcc -c -o conftest.o conftest.c >/dev/null 2>&1 &&
580
grep conftest.h conftest.Po > /dev/null 2>&1 &&
581
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
582
am_cv_$1_dependencies_compiler_type=$depmode
590
am_cv_$1_dependencies_compiler_type=none
593
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
594
AM_CONDITIONAL([am__fastdep$1], [
595
test "x$enable_dependency_tracking" != xno \
596
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
602
# Choose a directory name for dependency files.
603
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
604
AC_DEFUN([AM_SET_DEPDIR],
605
[rm -f .deps 2>/dev/null
606
mkdir .deps 2>/dev/null
607
if test -d .deps; then
610
# MS-DOS does not allow filenames that begin with a dot.
613
rmdir .deps 2>/dev/null
620
AC_DEFUN([AM_DEP_TRACK],
621
[AC_ARG_ENABLE(dependency-tracking,
622
[ --disable-dependency-tracking Speeds up one-time builds
623
--enable-dependency-tracking Do not reject slow dependency extractors])
624
if test "x$enable_dependency_tracking" != xno; then
625
am_depcomp="$ac_aux_dir/depcomp"
628
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
629
AC_SUBST([AMDEPBACKSLASH])
632
# Generate code to set up dependency tracking. -*- Autoconf -*-
634
# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
636
# This program is free software; you can redistribute it and/or modify
637
# it under the terms of the GNU General Public License as published by
638
# the Free Software Foundation; either version 2, or (at your option)
641
# This program is distributed in the hope that it will be useful,
642
# but WITHOUT ANY WARRANTY; without even the implied warranty of
643
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
644
# GNU General Public License for more details.
646
# You should have received a copy of the GNU General Public License
647
# along with this program; if not, write to the Free Software
648
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
653
# _AM_OUTPUT_DEPENDENCY_COMMANDS
654
# ------------------------------
655
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
656
[for mf in $CONFIG_FILES; do
657
# Strip MF so we end up with the name of the file.
658
mf=`echo "$mf" | sed -e 's/:.*$//'`
659
# Check whether this is an Automake generated Makefile or not.
660
# We used to match only the files named `Makefile.in', but
661
# some people rename them; so instead we look at the file content.
662
# Grep'ing the first line is not enough: some people post-process
663
# each Makefile.in and add a new line on top of each file to say so.
664
# So let's grep whole file.
665
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
666
dirpart=`AS_DIRNAME("$mf")`
670
grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
671
# Extract the definition of DEP_FILES from the Makefile without
673
DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
674
test -z "$DEPDIR" && continue
675
# When using ansi2knr, U may be empty or an underscore; expand it
676
U=`sed -n -e '/^U = / s///p' < "$mf"`
677
test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
678
# We invoke sed twice because it is the simplest approach to
679
# changing $(DEPDIR) to its actual value in the expansion.
680
for file in `sed -n -e '
681
/^DEP_FILES = .*\\\\$/ {
690
/^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
691
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
692
# Make sure the directory exists.
693
test -f "$dirpart/$file" && continue
694
fdir=`AS_DIRNAME(["$file"])`
695
AS_MKDIR_P([$dirpart/$fdir])
696
# echo "creating $dirpart/$file"
697
echo '# dummy' > "$dirpart/$file"
700
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
703
# AM_OUTPUT_DEPENDENCY_COMMANDS
704
# -----------------------------
705
# This macro should only be invoked once -- use via AC_REQUIRE.
707
# This code is only required when automatic dependency tracking
708
# is enabled. FIXME. This creates each `.P' file that we will
709
# need in order to bootstrap the dependency handling code.
710
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
711
[AC_CONFIG_COMMANDS([depfiles],
712
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
713
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
716
# Check to see how 'make' treats includes. -*- Autoconf -*-
718
# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
720
# This program is free software; you can redistribute it and/or modify
721
# it under the terms of the GNU General Public License as published by
722
# the Free Software Foundation; either version 2, or (at your option)
725
# This program is distributed in the hope that it will be useful,
726
# but WITHOUT ANY WARRANTY; without even the implied warranty of
727
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
728
# GNU General Public License for more details.
730
# You should have received a copy of the GNU General Public License
731
# along with this program; if not, write to the Free Software
732
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
739
# Check to see how make treats includes.
740
AC_DEFUN([AM_MAKE_INCLUDE],
741
[am_make=${MAKE-make}
742
cat > confinc << 'END'
746
# If we don't find an include directive, just comment out the code.
747
AC_MSG_CHECKING([for style of include used by $am_make])
751
# First try GNU make style include.
752
echo "include confinc" > confmf
753
# We grep out `Entering directory' and `Leaving directory'
754
# messages which can occur if `w' ends up in MAKEFLAGS.
755
# In particular we don't look at `^make:' because GNU make might
756
# be invoked under some other name (usually "gmake"), in which
757
# case it prints its new name instead of `make'.
758
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
763
# Now try BSD make style include.
764
if test "$am__include" = "#"; then
765
echo '.include "confinc"' > confmf
766
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
772
AC_SUBST(am__include)
774
AC_MSG_RESULT($_am_result)
778
# AM_CONDITIONAL -*- Autoconf -*-
780
# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
782
# This program is free software; you can redistribute it and/or modify
783
# it under the terms of the GNU General Public License as published by
784
# the Free Software Foundation; either version 2, or (at your option)
787
# This program is distributed in the hope that it will be useful,
788
# but WITHOUT ANY WARRANTY; without even the implied warranty of
789
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
790
# GNU General Public License for more details.
792
# You should have received a copy of the GNU General Public License
793
# along with this program; if not, write to the Free Software
794
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
801
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
802
# -------------------------------------
803
# Define a conditional.
804
AC_DEFUN([AM_CONDITIONAL],
805
[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
806
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
816
AC_CONFIG_COMMANDS_PRE(
817
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
818
AC_MSG_ERROR([conditional "$1" was never defined.
819
Usually this means the macro was only invoked conditionally.])
822
# Add --enable-maintainer-mode option to configure.
825
# Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
827
# This program is free software; you can redistribute it and/or modify
828
# it under the terms of the GNU General Public License as published by
829
# the Free Software Foundation; either version 2, or (at your option)
832
# This program is distributed in the hope that it will be useful,
833
# but WITHOUT ANY WARRANTY; without even the implied warranty of
834
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
835
# GNU General Public License for more details.
837
# You should have received a copy of the GNU General Public License
838
# along with this program; if not, write to the Free Software
839
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
844
AC_DEFUN([AM_MAINTAINER_MODE],
845
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
846
dnl maintainer-mode is disabled by default
847
AC_ARG_ENABLE(maintainer-mode,
848
[ --enable-maintainer-mode enable make rules and dependencies not useful
849
(and sometimes confusing) to the casual installer],
850
USE_MAINTAINER_MODE=$enableval,
851
USE_MAINTAINER_MODE=no)
852
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
853
AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
854
MAINT=$MAINTAINER_MODE_TRUE
859
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
862
dnl AC_PROG_INTLTOOL([MINIMUM-VERSION])
863
# serial 1 AC_PROG_INTLTOOL
864
AC_DEFUN(AC_PROG_INTLTOOL,
867
if test -n "$1"; then
868
AC_MSG_CHECKING(for intltool >= $1)
870
INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ printf "%d", $[1] * 100 + $[2]; }'`
871
INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $[2]; }' < ${srcdir}/intltool-update.in`
873
INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split(${{2}}, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < ${srcdir}/intltool-update.in`
876
if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then
877
AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
879
AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found. Your intltool is too old. You need intltool $1 or later.])
884
INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
885
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
886
INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -k -u -c $(top_builddir)/po/.intltool-merge-cache'
887
INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
888
INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -o -p'
889
INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -x -u -c $(top_builddir)/po/.intltool-merge-cache'
890
INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -o -u -c $(top_builddir)/po/.intltool-merge-cache'
891
INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -x -u -c $(top_builddir)/po/.intltool-merge-cache'
892
INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
893
INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -x -u -c $(top_builddir)/po/.intltool-merge-cache'
894
INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -x -u -c $(top_builddir)/po/.intltool-merge-cache'
895
INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -x -u -c $(top_builddir)/po/.intltool-merge-cache'
896
INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
897
INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -s -u -c $(top_builddir)/po/.intltool-merge-cache'
898
INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
900
AC_SUBST(INTLTOOL_DESKTOP_RULE)
901
AC_SUBST(INTLTOOL_DIRECTORY_RULE)
902
AC_SUBST(INTLTOOL_KEYS_RULE)
903
AC_SUBST(INTLTOOL_PROP_RULE)
904
AC_SUBST(INTLTOOL_OAF_RULE)
905
AC_SUBST(INTLTOOL_PONG_RULE)
906
AC_SUBST(INTLTOOL_SERVER_RULE)
907
AC_SUBST(INTLTOOL_SHEET_RULE)
908
AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
909
AC_SUBST(INTLTOOL_UI_RULE)
910
AC_SUBST(INTLTOOL_XAM_RULE)
911
AC_SUBST(INTLTOOL_XML_RULE)
912
AC_SUBST(INTLTOOL_CAVES_RULE)
913
AC_SUBST(INTLTOOL_SCHEMAS_RULE)
914
AC_SUBST(INTLTOOL_THEME_RULE)
916
# Use the tools built into the package, not the ones that are installed.
918
INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
919
INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
920
INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
922
AC_SUBST(INTLTOOL_EXTRACT)
923
AC_SUBST(INTLTOOL_MERGE)
924
AC_SUBST(INTLTOOL_UPDATE)
926
AC_PATH_PROG(INTLTOOL_PERL, perl)
927
if test -z "$INTLTOOL_PERL"; then
928
AC_MSG_ERROR([perl not found; required for intltool])
930
if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
931
AC_MSG_ERROR([perl 5.x required for intltool])
934
# Remove file type tags (using []) from po/POTFILES.
936
ifdef([AC_DIVERSION_ICMDS],[
937
AC_DIVERT_PUSH(AC_DIVERSION_ICMDS)
939
mv -f po/POTFILES po/POTFILES.tmp
940
sed -e '/\[encoding.*\]/d' -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
941
rm -f po/POTFILES.tmp
945
ifdef([AC_CONFIG_COMMANDS_PRE],[
946
AC_CONFIG_COMMANDS_PRE([
948
mv -f po/POTFILES po/POTFILES.tmp
949
sed -e '/\[encoding.*\]/d' -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
950
rm -f po/POTFILES.tmp
956
# Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
960
sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-extract.in > intltool-extract.out
961
if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
962
rm -f intltool-extract.out
964
mv -f intltool-extract.out intltool-extract
966
chmod ugo+x intltool-extract
967
chmod u+w intltool-extract
969
sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-merge.in > intltool-merge.out
970
if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
971
rm -f intltool-merge.out
973
mv -f intltool-merge.out intltool-merge
975
chmod ugo+x intltool-merge
976
chmod u+w intltool-merge
978
sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-update.in > intltool-update.out
979
if cmp -s intltool-update intltool-update.out 2>/dev/null; then
980
rm -f intltool-update.out
982
mv -f intltool-update.out intltool-update
984
chmod ugo+x intltool-update
985
chmod u+w intltool-update
987
], INTLTOOL_PERL=${INTLTOOL_PERL})
991
# libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
993
# serial 46 AC_PROG_LIBTOOL
995
AC_DEFUN([AC_PROG_LIBTOOL],
996
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
998
# This can be used to rebuild libtool when needed
999
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
1001
# Always use our own libtool.
1002
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1003
AC_SUBST(LIBTOOL)dnl
1005
# Prevent multiple expansion
1006
define([AC_PROG_LIBTOOL], [])
1009
AC_DEFUN([AC_LIBTOOL_SETUP],
1011
AC_REQUIRE([AC_ENABLE_SHARED])dnl
1012
AC_REQUIRE([AC_ENABLE_STATIC])dnl
1013
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
1014
AC_REQUIRE([AC_CANONICAL_HOST])dnl
1015
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1016
AC_REQUIRE([AC_PROG_CC])dnl
1017
AC_REQUIRE([AC_PROG_LD])dnl
1018
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
1019
AC_REQUIRE([AC_PROG_NM])dnl
1020
AC_REQUIRE([LT_AC_PROG_SED])dnl
1022
AC_REQUIRE([AC_PROG_LN_S])dnl
1023
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
1024
AC_REQUIRE([AC_OBJEXT])dnl
1025
AC_REQUIRE([AC_EXEEXT])dnl
1028
_LT_AC_PROG_ECHO_BACKSLASH
1029
# Only perform the check for file, if the check method requires it
1030
case $deplibs_check_method in
1032
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1038
AC_CHECK_TOOL(RANLIB, ranlib, :)
1039
AC_CHECK_TOOL(STRIP, strip, :)
1041
ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1042
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
1043
enable_win32_dll=yes, enable_win32_dll=no)
1045
AC_ARG_ENABLE(libtool-lock,
1046
[ --disable-libtool-lock avoid locking (might break parallel builds)])
1047
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1049
# Some flags need to be propagated to the compiler or linker for good
1053
# Find out which ABI we are using.
1054
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1055
if AC_TRY_EVAL(ac_compile); then
1056
case `/usr/bin/file conftest.$ac_objext` in
1072
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
1073
SAVE_CFLAGS="$CFLAGS"
1074
CFLAGS="$CFLAGS -belf"
1075
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1078
AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1080
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1081
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1082
CFLAGS="$SAVE_CFLAGS"
1086
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
1087
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1088
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1089
AC_CHECK_TOOL(AS, as, false)
1090
AC_CHECK_TOOL(OBJDUMP, objdump, false)
1092
# recent cygwin and mingw systems supply a stub DllMain which the user
1093
# can override, but on older systems we have to supply one
1094
AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
1096
[extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
1097
DllMain (0, 0, 0);],
1098
[lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
1101
*-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
1102
# old mingw systems require "-dll" to link a DLL, while more recent ones
1104
SAVE_CFLAGS="$CFLAGS"
1105
CFLAGS="$CFLAGS -mdll"
1106
AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
1107
[AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
1108
CFLAGS="$SAVE_CFLAGS" ;;
1109
*-*-cygwin* | *-*-pw32*)
1110
# cygwin systems need to pass --dll to the linker, and not link
1111
# crt.o which will require a WinMain@16 definition.
1112
lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
1118
_LT_AC_LTCONFIG_HACK
1122
# AC_LIBTOOL_HEADER_ASSERT
1123
# ------------------------
1124
AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT],
1125
[AC_CACHE_CHECK([whether $CC supports assert without backlinking],
1126
[lt_cv_func_assert_works],
1129
if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
1130
case `$CC --version 2>/dev/null` in
1131
[[12]].*) lt_cv_func_assert_works=no ;;
1132
*) lt_cv_func_assert_works=yes ;;
1138
if test "x$lt_cv_func_assert_works" = xyes; then
1139
AC_CHECK_HEADERS(assert.h)
1141
])# AC_LIBTOOL_HEADER_ASSERT
1143
# _LT_AC_CHECK_DLFCN
1144
# --------------------
1145
AC_DEFUN([_LT_AC_CHECK_DLFCN],
1146
[AC_CHECK_HEADERS(dlfcn.h)
1147
])# _LT_AC_CHECK_DLFCN
1149
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1150
# ---------------------------------
1151
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
1152
[AC_REQUIRE([AC_CANONICAL_HOST])
1153
AC_REQUIRE([AC_PROG_NM])
1154
AC_REQUIRE([AC_OBJEXT])
1155
# Check for command to grab the raw symbol name followed by C symbol from nm.
1156
AC_MSG_CHECKING([command to parse $NM output])
1157
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
1159
# These are sane defaults that work on at least a few old systems.
1160
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
1162
# Character class describing NM global symbol codes.
1163
symcode='[[BCDEGRST]]'
1165
# Regexp to match symbols that can be accessed directly from C.
1166
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
1168
# Transform the above into a raw symbol and a C symbol.
1169
symxfrm='\1 \2\3 \3'
1171
# Transform an extracted symbol line into a proper C declaration
1172
lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
1174
# Transform an extracted symbol line into symbol name and symbol address
1175
lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
1177
# Define system-specific variables.
1182
cygwin* | mingw* | pw32*)
1183
symcode='[[ABCDGISTW]]'
1185
hpux*) # Its linker distinguishes data from code symbols
1186
lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
1187
lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
1190
symcode='[[BCDEGRST]]'
1193
symcode='[[BCDEGQRST]]'
1199
symcode='[[DFNSTU]]'
1203
# Handle CRLF in mingw tool chain
1207
opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
1211
# If we're using GNU nm, then use its standard symbol codes.
1212
if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
1213
symcode='[[ABCDGISTW]]'
1216
# Try without a prefix undercore, then with it.
1217
for ac_symprfx in "" "_"; do
1219
# Write the raw and C identifiers.
1220
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
1222
# Check to see that the pipe works correctly.
1225
cat > conftest.$ac_ext <<EOF
1230
void nm_test_func(){}
1234
int main(){nm_test_var='a';nm_test_func();return(0);}
1237
if AC_TRY_EVAL(ac_compile); then
1238
# Now try to grab the symbols.
1240
if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
1241
# Try sorting and uniquifying the output.
1242
if sort "$nlist" | uniq > "$nlist"T; then
1243
mv -f "$nlist"T "$nlist"
1248
# Make sure that we snagged all the symbols we need.
1249
if egrep ' nm_test_var$' "$nlist" >/dev/null; then
1250
if egrep ' nm_test_func$' "$nlist" >/dev/null; then
1251
cat <<EOF > conftest.$ac_ext
1257
# Now generate the symbol file.
1258
eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
1260
cat <<EOF >> conftest.$ac_ext
1261
#if defined (__STDC__) && __STDC__
1262
# define lt_ptr void *
1264
# define lt_ptr char *
1268
/* The mapping between symbol names and symbols. */
1273
lt_preloaded_symbols[[]] =
1276
sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
1277
cat <<\EOF >> conftest.$ac_ext
1285
# Now try linking the two files.
1286
mv conftest.$ac_objext conftstm.$ac_objext
1288
save_CFLAGS="$CFLAGS"
1289
LIBS="conftstm.$ac_objext"
1290
CFLAGS="$CFLAGS$no_builtin_flag"
1291
if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
1295
CFLAGS="$save_CFLAGS"
1297
echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
1300
echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
1303
echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
1306
echo "$progname: failed program was:" >&AC_FD_CC
1307
cat conftest.$ac_ext >&5
1309
rm -f conftest* conftst*
1311
# Do not use the global_symbol_pipe unless it works.
1312
if test "$pipe_works" = yes; then
1315
lt_cv_sys_global_symbol_pipe=
1319
global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
1320
if test -z "$lt_cv_sys_global_symbol_pipe"; then
1321
global_symbol_to_cdecl=
1322
global_symbol_to_c_name_address=
1324
global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
1325
global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
1327
if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
1329
AC_MSG_RESULT(failed)
1333
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1335
# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1336
# ---------------------------------
1337
AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
1338
[# Find the correct PATH separator. Usually this is `:', but
1339
# DJGPP uses `;' like DOS.
1340
if test "X${PATH_SEPARATOR+set}" != Xset; then
1341
UNAME=${UNAME-`uname 2>/dev/null`}
1343
*-DOS) lt_cv_sys_path_separator=';' ;;
1344
*) lt_cv_sys_path_separator=':' ;;
1346
PATH_SEPARATOR=$lt_cv_sys_path_separator
1348
])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1350
# _LT_AC_PROG_ECHO_BACKSLASH
1351
# --------------------------
1352
# Add some code to the start of the generated configure script which
1353
# will find an echo command which doesn't interpret backslashes.
1354
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1355
[ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1356
[AC_DIVERT_PUSH(NOTICE)])
1357
_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1359
# Check that we are running under the correct shell.
1360
SHELL=${CONFIG_SHELL-/bin/sh}
1364
# Remove one level of quotation (which was required for Make).
1365
ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1370
if test "X[$]1" = X--no-reexec; then
1371
# Discard the --no-reexec flag, and continue.
1373
elif test "X[$]1" = X--fallback-echo; then
1374
# Avoid inline document here, it may be left over
1376
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
1377
# Yippee, $echo works!
1380
# Restart under the correct shell.
1381
exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1384
if test "X[$]1" = X--fallback-echo; then
1385
# used as fallback echo
1393
# The HP-UX ksh and POSIX shell print the target directory to stdout
1395
if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
1397
if test -z "$ECHO"; then
1398
if test "X${echo_test_string+set}" != Xset; then
1399
# find a string as large as possible, as long as the shell can cope with it
1400
for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1401
# expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1402
if (echo_test_string="`eval $cmd`") 2>/dev/null &&
1403
echo_test_string="`eval $cmd`" &&
1404
(test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1411
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1412
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1413
test "X$echo_testing_string" = "X$echo_test_string"; then
1416
# The Solaris, AIX, and Digital Unix default echo programs unquote
1417
# backslashes. This makes it impossible to quote backslashes using
1418
# echo "$something" | sed 's/\\/\\\\/g'
1420
# So, first we look for a working echo in the user's PATH.
1422
IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1423
for dir in $PATH /usr/ucb; do
1424
if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1425
test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1426
echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1427
test "X$echo_testing_string" = "X$echo_test_string"; then
1434
if test "X$echo" = Xecho; then
1435
# We didn't find a better echo, so look for alternatives.
1436
if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1437
echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1438
test "X$echo_testing_string" = "X$echo_test_string"; then
1439
# This shell has a builtin print -r that does the trick.
1441
elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1442
test "X$CONFIG_SHELL" != X/bin/ksh; then
1443
# If we have ksh, try running configure again with it.
1444
ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1445
export ORIGINAL_CONFIG_SHELL
1446
CONFIG_SHELL=/bin/ksh
1448
exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1452
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1453
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1454
test "X$echo_testing_string" = "X$echo_test_string"; then
1455
# Cool, printf works
1457
elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1458
test "X$echo_testing_string" = 'X\t' &&
1459
echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1460
test "X$echo_testing_string" = "X$echo_test_string"; then
1461
CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1463
SHELL="$CONFIG_SHELL"
1465
echo="$CONFIG_SHELL [$]0 --fallback-echo"
1466
elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1467
test "X$echo_testing_string" = 'X\t' &&
1468
echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1469
test "X$echo_testing_string" = "X$echo_test_string"; then
1470
echo="$CONFIG_SHELL [$]0 --fallback-echo"
1472
# maybe with a smaller string...
1475
for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1476
if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1483
if test "$prev" != 'sed 50q "[$]0"'; then
1484
echo_test_string=`eval $prev`
1485
export echo_test_string
1486
exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1488
# Oops. We lost completely, so just stick with echo.
1497
# Copy echo and quote the copy suitably for passing to libtool from
1498
# the Makefile, instead of quoting the original, which is used later.
1500
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1501
ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1506
])# _LT_AC_PROG_ECHO_BACKSLASH
1508
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1509
# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1510
# ------------------------------------------------------------------
1511
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1512
[if test "$cross_compiling" = yes; then :
1515
AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1516
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1517
lt_status=$lt_dlunknown
1518
cat > conftest.$ac_ext <<EOF
1519
[#line __oline__ "configure"
1520
#include "confdefs.h"
1529
# define LT_DLGLOBAL RTLD_GLOBAL
1532
# define LT_DLGLOBAL DL_GLOBAL
1534
# define LT_DLGLOBAL 0
1538
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1539
find out it does not work in some platform. */
1540
#ifndef LT_DLLAZY_OR_NOW
1542
# define LT_DLLAZY_OR_NOW RTLD_LAZY
1545
# define LT_DLLAZY_OR_NOW DL_LAZY
1548
# define LT_DLLAZY_OR_NOW RTLD_NOW
1551
# define LT_DLLAZY_OR_NOW DL_NOW
1553
# define LT_DLLAZY_OR_NOW 0
1561
extern "C" void exit (int);
1564
void fnord() { int i=42;}
1567
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1568
int status = $lt_dlunknown;
1572
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1573
else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1574
/* dlclose (self); */
1580
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1581
(./conftest; exit; ) 2>/dev/null
1584
x$lt_dlno_uscore) $1 ;;
1585
x$lt_dlneed_uscore) $2 ;;
1586
x$lt_unknown|x*) $3 ;;
1589
# compilation failed
1594
])# _LT_AC_TRY_DLOPEN_SELF
1596
# AC_LIBTOOL_DLOPEN_SELF
1597
# -------------------
1598
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1599
[if test "x$enable_dlopen" != xyes; then
1600
enable_dlopen=unknown
1601
enable_dlopen_self=unknown
1602
enable_dlopen_self_static=unknown
1609
lt_cv_dlopen="load_add_on"
1611
lt_cv_dlopen_self=yes
1614
cygwin* | mingw* | pw32*)
1615
lt_cv_dlopen="LoadLibrary"
1620
AC_CHECK_FUNC([shl_load],
1621
[lt_cv_dlopen="shl_load"],
1622
[AC_CHECK_LIB([dld], [shl_load],
1623
[lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1624
[AC_CHECK_FUNC([dlopen],
1625
[lt_cv_dlopen="dlopen"],
1626
[AC_CHECK_LIB([dl], [dlopen],
1627
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1628
[AC_CHECK_LIB([svld], [dlopen],
1629
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1630
[AC_CHECK_LIB([dld], [dld_link],
1631
[lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1640
if test "x$lt_cv_dlopen" != xno; then
1646
case $lt_cv_dlopen in
1648
save_CPPFLAGS="$CPPFLAGS"
1649
AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1650
test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1652
save_LDFLAGS="$LDFLAGS"
1653
eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1656
LIBS="$lt_cv_dlopen_libs $LIBS"
1658
AC_CACHE_CHECK([whether a program can dlopen itself],
1659
lt_cv_dlopen_self, [dnl
1660
_LT_AC_TRY_DLOPEN_SELF(
1661
lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1662
lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1665
if test "x$lt_cv_dlopen_self" = xyes; then
1666
LDFLAGS="$LDFLAGS $link_static_flag"
1667
AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1668
lt_cv_dlopen_self_static, [dnl
1669
_LT_AC_TRY_DLOPEN_SELF(
1670
lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1671
lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1675
CPPFLAGS="$save_CPPFLAGS"
1676
LDFLAGS="$save_LDFLAGS"
1681
case $lt_cv_dlopen_self in
1682
yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1683
*) enable_dlopen_self=unknown ;;
1686
case $lt_cv_dlopen_self_static in
1687
yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1688
*) enable_dlopen_self_static=unknown ;;
1691
])# AC_LIBTOOL_DLOPEN_SELF
1693
AC_DEFUN([_LT_AC_LTCONFIG_HACK],
1694
[AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
1695
# Sed substitution that helps us do robust quoting. It backslashifies
1696
# metacharacters that are still active within double-quoted strings.
1697
Xsed='sed -e s/^X//'
1698
sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g'
1700
# Same as above, but do not quote variable references.
1701
double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g'
1703
# Sed substitution to delay expansion of an escaped shell variable in a
1704
# double_quote_subst'ed string.
1705
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1711
default_ofile=libtool
1712
can_build_shared=yes
1714
# All known linkers require a `.a' archive for static linking (except M$VC,
1715
# which needs '.lib').
1717
ltmain="$ac_aux_dir/ltmain.sh"
1718
ofile="$default_ofile"
1719
with_gnu_ld="$lt_cv_prog_gnu_ld"
1720
need_locks="$enable_libtool_lock"
1723
old_CFLAGS="$CFLAGS"
1725
# Set sane defaults for various variables
1726
test -z "$AR" && AR=ar
1727
test -z "$AR_FLAGS" && AR_FLAGS=cru
1728
test -z "$AS" && AS=as
1729
test -z "$CC" && CC=cc
1730
test -z "$DLLTOOL" && DLLTOOL=dlltool
1731
test -z "$LD" && LD=ld
1732
test -z "$LN_S" && LN_S="ln -s"
1733
test -z "$MAGIC_CMD" && MAGIC_CMD=file
1734
test -z "$NM" && NM=nm
1735
test -z "$OBJDUMP" && OBJDUMP=objdump
1736
test -z "$RANLIB" && RANLIB=:
1737
test -z "$STRIP" && STRIP=:
1738
test -z "$ac_objext" && ac_objext=o
1740
if test x"$host" != x"$build"; then
1741
ac_tool_prefix=${host_alias}-
1746
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
1749
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
1754
# AIX sometimes has problems with the GCC collect2 program. For some
1755
# reason, if we set the COLLECT_NAMES environment variable, the problems
1756
# vanish in a puff of smoke.
1757
if test "X${COLLECT_NAMES+set}" != Xset; then
1759
export COLLECT_NAMES
1764
# Determine commands to create old-style static archives.
1765
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1766
old_postinstall_cmds='chmod 644 $oldlib'
1767
old_postuninstall_cmds=
1769
if test -n "$RANLIB"; then
1772
old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1775
old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1778
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1781
# Allow CC to be a program name with arguments.
1785
AC_MSG_CHECKING([for objdir])
1786
rm -f .libs 2>/dev/null
1787
mkdir .libs 2>/dev/null
1788
if test -d .libs; then
1791
# MS-DOS does not allow filenames that begin with a dot.
1794
rmdir .libs 2>/dev/null
1795
AC_MSG_RESULT($objdir)
1799
[ --with-pic try to use only PIC/non-PIC objects [default=use both]],
1800
pic_mode="$withval", pic_mode=default)
1801
test -z "$pic_mode" && pic_mode=default
1803
# We assume here that the value for lt_cv_prog_cc_pic will not be cached
1804
# in isolation, and that seeing it set (from the cache) indicates that
1805
# the associated values are set (in the cache) correctly too.
1806
AC_MSG_CHECKING([for $compiler option to produce PIC])
1807
AC_CACHE_VAL(lt_cv_prog_cc_pic,
1808
[ lt_cv_prog_cc_pic=
1809
lt_cv_prog_cc_shlib=
1811
lt_cv_prog_cc_static=
1812
lt_cv_prog_cc_no_builtin=
1813
lt_cv_prog_cc_can_build_shared=$can_build_shared
1815
if test "$GCC" = yes; then
1816
lt_cv_prog_cc_wl='-Wl,'
1817
lt_cv_prog_cc_static='-static'
1821
# Below there is a dirty hack to force normal static linking with -ldl
1822
# The problem is because libdl dynamically linked with both libc and
1823
# libC (AIX C++ library), which obviously doesn't included in libraries
1824
# list by gcc. This cause undefined symbols with -static flags.
1825
# This hack allows C programs to be linked with "-static -ldl", but
1826
# not sure about C++ programs.
1827
lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
1830
# FIXME: we need at least 68020 code to build shared libraries, but
1831
# adding the `-m68020' flag to GCC prevents building anything better,
1833
lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
1835
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
1836
# PIC is the default for these OSes.
1838
darwin* | rhapsody*)
1839
# PIC is the default on this platform
1840
# Common symbols not allowed in MH_DYLIB files
1841
lt_cv_prog_cc_pic='-fno-common'
1843
cygwin* | mingw* | pw32* | os2*)
1844
# This hack is so that the source file can tell whether it is being
1845
# built for inclusion in a dll (and should export symbols for example).
1846
lt_cv_prog_cc_pic='-DDLL_EXPORT'
1849
if test -d /usr/nec; then
1850
lt_cv_prog_cc_pic=-Kconform_pic
1854
lt_cv_prog_cc_pic='-fPIC'
1858
# PORTME Check for PIC flags for the system compiler.
1860
aix3* | aix4* | aix5*)
1861
lt_cv_prog_cc_wl='-Wl,'
1862
# All AIX code is PIC.
1863
if test "$host_cpu" = ia64; then
1864
# AIX 5 now supports IA64 processor
1865
lt_cv_prog_cc_static='-Bstatic'
1867
lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
1871
hpux9* | hpux10* | hpux11*)
1872
# Is there a better lt_cv_prog_cc_static that works with the bundled CC?
1873
lt_cv_prog_cc_wl='-Wl,'
1874
lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
1875
lt_cv_prog_cc_pic='+Z'
1878
irix5* | irix6* | nonstopux*)
1879
lt_cv_prog_cc_wl='-Wl,'
1880
lt_cv_prog_cc_static='-non_shared'
1881
# PIC (with -KPIC) is the default.
1884
cygwin* | mingw* | pw32* | os2*)
1885
# This hack is so that the source file can tell whether it is being
1886
# built for inclusion in a dll (and should export symbols for example).
1887
lt_cv_prog_cc_pic='-DDLL_EXPORT'
1891
lt_cv_prog_cc_pic='-KPIC'
1892
lt_cv_prog_cc_static='-Bstatic'
1895
osf3* | osf4* | osf5*)
1896
# All OSF/1 code is PIC.
1897
lt_cv_prog_cc_wl='-Wl,'
1898
lt_cv_prog_cc_static='-non_shared'
1902
lt_cv_prog_cc_pic='-Kpic'
1903
lt_cv_prog_cc_static='-dn'
1904
lt_cv_prog_cc_shlib='-belf'
1908
lt_cv_prog_cc_pic='-KPIC'
1909
lt_cv_prog_cc_static='-Bstatic'
1910
lt_cv_prog_cc_wl='-Wl,'
1914
lt_cv_prog_cc_pic='-PIC'
1915
lt_cv_prog_cc_static='-Bstatic'
1916
lt_cv_prog_cc_wl='-Qoption ld '
1919
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1920
lt_cv_prog_cc_pic='-KPIC'
1921
lt_cv_prog_cc_static='-Bstatic'
1922
lt_cv_prog_cc_wl='-Wl,'
1926
lt_cv_prog_cc_pic='-pic'
1927
lt_cv_prog_cc_static='-Bstatic'
1931
if test -d /usr/nec ;then
1932
lt_cv_prog_cc_pic='-Kconform_pic'
1933
lt_cv_prog_cc_static='-Bstatic'
1938
lt_cv_prog_cc_can_build_shared=no
1943
if test -z "$lt_cv_prog_cc_pic"; then
1944
AC_MSG_RESULT([none])
1946
AC_MSG_RESULT([$lt_cv_prog_cc_pic])
1948
# Check to make sure the pic_flag actually works.
1949
AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
1950
AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
1951
save_CFLAGS="$CFLAGS"
1952
CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
1953
AC_TRY_COMPILE([], [], [dnl
1955
hpux9* | hpux10* | hpux11*)
1956
# On HP-UX, both CC and GCC only warn that PIC is supported... then
1957
# they create non-PIC objects. So, if there were any warnings, we
1958
# assume that PIC is not supported.
1959
if test -s conftest.err; then
1960
lt_cv_prog_cc_pic_works=no
1962
lt_cv_prog_cc_pic_works=yes
1966
lt_cv_prog_cc_pic_works=yes
1970
lt_cv_prog_cc_pic_works=no
1972
CFLAGS="$save_CFLAGS"
1975
if test "X$lt_cv_prog_cc_pic_works" = Xno; then
1977
lt_cv_prog_cc_can_build_shared=no
1979
lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
1982
AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
1985
# Check for any special shared library compilation flags.
1986
if test -n "$lt_cv_prog_cc_shlib"; then
1987
AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
1988
if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$lt_cv_prog_cc_shlib[[ ]]" >/dev/null; then :
1990
AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
1991
lt_cv_prog_cc_can_build_shared=no
1995
AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
1996
AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
1997
lt_cv_prog_cc_static_works=no
1998
save_LDFLAGS="$LDFLAGS"
1999
LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
2000
AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
2001
LDFLAGS="$save_LDFLAGS"
2004
# Belt *and* braces to stop my trousers falling down:
2005
test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
2006
AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
2008
pic_flag="$lt_cv_prog_cc_pic"
2009
special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
2010
wl="$lt_cv_prog_cc_wl"
2011
link_static_flag="$lt_cv_prog_cc_static"
2012
no_builtin_flag="$lt_cv_prog_cc_no_builtin"
2013
can_build_shared="$lt_cv_prog_cc_can_build_shared"
2016
# Check to see if options -o and -c are simultaneously supported by compiler
2017
AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
2018
AC_CACHE_VAL([lt_cv_compiler_c_o], [
2019
$rm -r conftest 2>/dev/null
2022
echo "int some_variable = 0;" > conftest.$ac_ext
2024
# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
2025
# that will create temporary files in the current directory regardless of
2026
# the output directory. Thus, making CWD read-only will cause this test
2027
# to fail, enabling locking or at least warning the user not to do parallel
2030
save_CFLAGS="$CFLAGS"
2031
CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
2033
if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
2034
# The compiler can only warn and ignore the option if not recognized
2035
# So say no if there are warnings
2036
if test -s out/conftest.err; then
2037
lt_cv_compiler_c_o=no
2039
lt_cv_compiler_c_o=yes
2042
# Append any errors to the config.log.
2043
cat out/conftest.err 1>&AC_FD_CC
2044
lt_cv_compiler_c_o=no
2046
CFLAGS="$save_CFLAGS"
2052
$rm -r conftest 2>/dev/null
2054
compiler_c_o=$lt_cv_compiler_c_o
2055
AC_MSG_RESULT([$compiler_c_o])
2057
if test x"$compiler_c_o" = x"yes"; then
2058
# Check to see if we can write to a .lo
2059
AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
2060
AC_CACHE_VAL([lt_cv_compiler_o_lo], [
2061
lt_cv_compiler_o_lo=no
2062
save_CFLAGS="$CFLAGS"
2063
CFLAGS="$CFLAGS -c -o conftest.lo"
2064
save_objext="$ac_objext"
2066
AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
2067
# The compiler can only warn and ignore the option if not recognized
2068
# So say no if there are warnings
2069
if test -s conftest.err; then
2070
lt_cv_compiler_o_lo=no
2072
lt_cv_compiler_o_lo=yes
2075
ac_objext="$save_objext"
2076
CFLAGS="$save_CFLAGS"
2078
compiler_o_lo=$lt_cv_compiler_o_lo
2079
AC_MSG_RESULT([$compiler_o_lo])
2084
# Check to see if we can do hard links to lock some files if needed
2085
hard_links="nottested"
2086
if test "$compiler_c_o" = no && test "$need_locks" != no; then
2087
# do not overwrite the value of need_locks provided by the user
2088
AC_MSG_CHECKING([if we can lock with hard links])
2091
ln conftest.a conftest.b 2>/dev/null && hard_links=no
2093
ln conftest.a conftest.b 2>&5 || hard_links=no
2094
ln conftest.a conftest.b 2>/dev/null && hard_links=no
2095
AC_MSG_RESULT([$hard_links])
2096
if test "$hard_links" = no; then
2097
AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
2104
if test "$GCC" = yes; then
2105
# Check to see if options -fno-rtti -fno-exceptions are supported by compiler
2106
AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
2107
echo "int some_variable = 0;" > conftest.$ac_ext
2108
save_CFLAGS="$CFLAGS"
2109
CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
2110
compiler_rtti_exceptions=no
2111
AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
2112
# The compiler can only warn and ignore the option if not recognized
2113
# So say no if there are warnings
2114
if test -s conftest.err; then
2115
compiler_rtti_exceptions=no
2117
compiler_rtti_exceptions=yes
2120
CFLAGS="$save_CFLAGS"
2121
AC_MSG_RESULT([$compiler_rtti_exceptions])
2123
if test "$compiler_rtti_exceptions" = "yes"; then
2124
no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
2126
no_builtin_flag=' -fno-builtin'
2130
# See if the linker supports building shared libraries.
2131
AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
2133
allow_undefined_flag=
2135
need_lib_prefix=unknown
2136
need_version=unknown
2137
# when you set need_version to no, make sure it does not cause -set_version
2138
# flags to be left without arguments
2140
archive_expsym_cmds=
2141
old_archive_from_new_cmds=
2142
old_archive_from_expsyms_cmds=
2143
export_dynamic_flag_spec=
2144
whole_archive_flag_spec=
2145
thread_safe_flag_spec=
2146
hardcode_into_libs=no
2147
hardcode_libdir_flag_spec=
2148
hardcode_libdir_separator=
2151
hardcode_shlibpath_var=unsupported
2153
link_all_deplibs=unknown
2154
always_export_symbols=no
2155
export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
2156
# include_expsyms should be a list of space-separated symbols to be *always*
2157
# included in the symbol list
2159
# exclude_expsyms can be an egrep regular expression of symbols to exclude
2160
# it will be wrapped by ` (' and `)$', so one must not match beginning or
2161
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
2162
# as well as any symbol that contains `d'.
2163
exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
2164
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
2165
# platforms (ab)use it in PIC code, but their linkers get confused if
2166
# the symbol is explicitly referenced. Since portable code cannot
2167
# rely on this symbol name, it's probably fine to never include it in
2168
# preloaded symbol tables.
2169
extract_expsyms_cmds=
2172
cygwin* | mingw* | pw32*)
2173
# FIXME: the MSVC++ port hasn't been tested in a loooong time
2174
# When not using gcc, we currently assume that we are using
2175
# Microsoft Visual C++.
2176
if test "$GCC" != yes; then
2186
if test "$with_gnu_ld" = yes; then
2187
# If archive_cmds runs LD, not CC, wlarc should be empty
2190
# See if GNU ld supports shared libraries.
2192
aix3* | aix4* | aix5*)
2193
# On AIX, the GNU linker is very broken
2194
# Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
2198
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
2199
*** to be unable to reliably create shared libraries on AIX.
2200
*** Therefore, libtool is disabling shared libraries support. If you
2201
*** really care for shared libraries, you may want to modify your PATH
2202
*** so that a non-GNU linker is found, and then restart.
2208
archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
2209
hardcode_libdir_flag_spec='-L$libdir'
2210
hardcode_minus_L=yes
2212
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
2213
# that the semantics of dynamic libraries on AmigaOS, at least up
2214
# to version 4, is to share data among multiple programs linked
2215
# with the same dynamic library. Since this doesn't match the
2216
# behavior of shared libraries on other platforms, we can use
2222
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2223
allow_undefined_flag=unsupported
2224
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
2225
# support --undefined. This deserves some investigation. FIXME
2226
archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2232
cygwin* | mingw* | pw32*)
2233
# hardcode_libdir_flag_spec is actually meaningless, as there is
2234
# no search path for DLLs.
2235
hardcode_libdir_flag_spec='-L$libdir'
2236
allow_undefined_flag=unsupported
2237
always_export_symbols=yes
2239
extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
2240
sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
2241
test -f $output_objdir/impgen.exe || (cd $output_objdir && \
2242
if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
2243
else $CC -o impgen impgen.c ; fi)~
2244
$output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
2246
old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
2248
# cygwin and mingw dlls have different entry points and sets of symbols
2250
# FIXME: what about values for MSVC?
2251
dll_entry=__cygwin_dll_entry@12
2252
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
2256
dll_entry=_DllMainCRTStartup@12
2257
dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
2261
# mingw and cygwin differ, and it's simplest to just exclude the union
2262
# of the two symbol sets.
2263
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
2265
# recent cygwin and mingw systems supply a stub DllMain which the user
2266
# can override, but on older systems we have to supply one (in ltdll.c)
2267
if test "x$lt_cv_need_dllmain" = "xyes"; then
2268
ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
2269
ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
2270
test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
2276
# Extract the symbol export list from an `--export-all' def file,
2277
# then regenerate the def file from the symbol export list, so that
2278
# the compiled dll only exports the symbol export list.
2279
# Be careful not to strip the DATA tag left be newer dlltools.
2280
export_symbols_cmds="$ltdll_cmds"'
2281
$DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
2282
sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
2284
# If the export-symbols file already is a .def file (1st line
2285
# is EXPORTS), use it as is.
2286
# If DATA tags from a recent dlltool are present, honour them!
2287
archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
2288
cp $export_symbols $output_objdir/$soname-def;
2290
echo EXPORTS > $output_objdir/$soname-def;
2292
cat $export_symbols | while read symbol; do
2295
2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
2296
4) echo " \[$]2 \[$]3 \[$]4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
2297
*) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
2299
_lt_hint=`expr 1 + \$_lt_hint`;
2303
$CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
2304
$DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
2305
$CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
2306
$DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
2307
$CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
2311
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2312
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
2315
archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2316
archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2321
if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
2325
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
2326
*** create shared libraries on Solaris systems. Therefore, libtool
2327
*** is disabling shared libraries support. We urge you to upgrade GNU
2328
*** binutils to release 2.9.1 or newer. Another option is to modify
2329
*** your PATH or compiler configuration so that the native linker is
2330
*** used, and then restart.
2333
elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2334
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2335
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2342
archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2345
hardcode_shlibpath_var=no
2349
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2350
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2351
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2358
if test "$ld_shlibs" = yes; then
2359
runpath_var=LD_RUN_PATH
2360
hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
2361
export_dynamic_flag_spec='${wl}--export-dynamic'
2363
cygwin* | mingw* | pw32*)
2364
# dlltool doesn't understand --whole-archive et. al.
2365
whole_archive_flag_spec=
2368
# ancient GNU ld didn't support --whole-archive et. al.
2369
if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
2370
whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2372
whole_archive_flag_spec=
2378
# PORTME fill in a description of your system's linker (not GNU ld)
2381
allow_undefined_flag=unsupported
2382
always_export_symbols=yes
2383
archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
2384
# Note: this linker hardcodes the directories in LIBPATH if there
2385
# are no directories specified by -L.
2386
hardcode_minus_L=yes
2387
if test "$GCC" = yes && test -z "$link_static_flag"; then
2388
# Neither direct hardcoding nor static linking is supported with a
2390
hardcode_direct=unsupported
2395
if test "$host_cpu" = ia64; then
2396
# On IA64, the linker does run time linking by default, so we don't
2397
# have to do anything special.
2398
aix_use_runtimelinking=no
2399
exp_sym_flag='-Bexport'
2402
aix_use_runtimelinking=no
2404
# Test if we are trying to use run time linking or normal
2405
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
2406
# need to do runtime linking.
2407
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2408
for ld_flag in $LDFLAGS; do
2411
aix_use_runtimelinking=yes
2418
exp_sym_flag='-bexport'
2419
no_entry_flag='-bnoentry'
2422
# When large executables or shared objects are built, AIX ld can
2423
# have problems creating the table of contents. If linking a library
2424
# or program results in "error TOC overflow" add -mminimal-toc to
2425
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
2426
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2430
hardcode_libdir_separator=':'
2431
if test "$GCC" = yes; then
2432
case $host_os in aix4.[[012]]|aix4.[[012]].*)
2433
collect2name=`${CC} -print-prog-name=collect2`
2434
if test -f "$collect2name" && \
2435
strings "$collect2name" | grep resolve_lib_name >/dev/null
2437
# We have reworked collect2
2440
# We have old collect2
2441
hardcode_direct=unsupported
2442
# It fails to find uninstalled libraries when the uninstalled
2443
# path is not listed in the libpath. Setting hardcode_minus_L
2444
# to unsupported forces relinking
2445
hardcode_minus_L=yes
2446
hardcode_libdir_flag_spec='-L$libdir'
2447
hardcode_libdir_separator=
2451
shared_flag='-shared'
2454
if test "$host_cpu" = ia64; then
2455
shared_flag='${wl}-G'
2457
if test "$aix_use_runtimelinking" = yes; then
2458
shared_flag='${wl}-G'
2460
shared_flag='${wl}-bM:SRE'
2465
# It seems that -bexpall can do strange things, so it is better to
2466
# generate a list of symbols to export.
2467
always_export_symbols=yes
2468
if test "$aix_use_runtimelinking" = yes; then
2469
# Warning - without using the other runtime loading flags (-brtl),
2470
# -berok will link without error, but may produce a broken library.
2471
allow_undefined_flag='-berok'
2472
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
2473
archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
2475
if test "$host_cpu" = ia64; then
2476
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
2477
allow_undefined_flag="-z nodefs"
2478
archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
2480
hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
2481
# Warning - without using the other run time loading flags,
2482
# -berok will link without error, but may produce a broken library.
2483
allow_undefined_flag='${wl}-berok'
2484
# This is a bit strange, but is similar to how AIX traditionally builds
2485
# it's shared libraries.
2486
archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname'
2492
archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
2493
hardcode_libdir_flag_spec='-L$libdir'
2494
hardcode_minus_L=yes
2495
# see comment about different semantics on the GNU ld section
2499
cygwin* | mingw* | pw32*)
2500
# When not using gcc, we currently assume that we are using
2501
# Microsoft Visual C++.
2502
# hardcode_libdir_flag_spec is actually meaningless, as there is
2503
# no search path for DLLs.
2504
hardcode_libdir_flag_spec=' '
2505
allow_undefined_flag=unsupported
2506
# Tell ltmain to make .lib files, not .a files.
2508
# FIXME: Setting linknames here is a bad hack.
2509
archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
2510
# The linker will automatically build a .lib file if we build a DLL.
2511
old_archive_from_new_cmds='true'
2512
# FIXME: Should let the user specify the lib program.
2513
old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
2514
fix_srcfile_path='`cygpath -w "$srcfile"`'
2517
darwin* | rhapsody*)
2519
rhapsody* | darwin1.[[012]])
2520
allow_undefined_flag='-undefined suppress'
2523
allow_undefined_flag='-flat_namespace -undefined suppress'
2526
# FIXME: Relying on posixy $() will cause problems for
2527
# cross-compilation, but unfortunately the echo tests do not
2528
# yet detect zsh echo's removal of \ escapes. Also zsh mangles
2529
# `"' quotes if we put them in here... so don't!
2530
archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
2531
# We need to add '_' to the symbols in $export_symbols first
2532
#archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
2534
hardcode_shlibpath_var=no
2535
whole_archive_flag_spec='-all_load $convenience'
2542
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
2543
# support. Future versions do this automatically, but an explicit c++rt0.o
2544
# does not break anything, and helps significantly (at the cost of a little
2547
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
2548
hardcode_libdir_flag_spec='-R$libdir'
2550
hardcode_shlibpath_var=no
2553
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
2555
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2557
hardcode_minus_L=yes
2558
hardcode_shlibpath_var=no
2561
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
2563
archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
2564
hardcode_libdir_flag_spec='-R$libdir'
2566
hardcode_shlibpath_var=no
2569
hpux9* | hpux10* | hpux11*)
2571
hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
2572
*) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
2574
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
2575
hardcode_libdir_separator=:
2577
hardcode_minus_L=yes # Not in the search PATH, but as the default
2578
# location of the library.
2579
export_dynamic_flag_spec='${wl}-E'
2582
irix5* | irix6* | nonstopux*)
2583
if test "$GCC" = yes; then
2584
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
2585
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2587
archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
2588
hardcode_libdir_flag_spec='-rpath $libdir'
2590
hardcode_libdir_separator=:
2591
link_all_deplibs=yes
2595
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2596
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
2598
archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
2600
hardcode_libdir_flag_spec='-R$libdir'
2602
hardcode_shlibpath_var=no
2606
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2608
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2609
hardcode_libdir_separator=:
2610
hardcode_shlibpath_var=no
2615
hardcode_shlibpath_var=no
2616
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2617
archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
2618
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2619
export_dynamic_flag_spec='${wl}-E'
2622
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
2623
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2624
hardcode_libdir_flag_spec='-R$libdir'
2627
archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
2628
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2635
hardcode_libdir_flag_spec='-L$libdir'
2636
hardcode_minus_L=yes
2637
allow_undefined_flag=unsupported
2638
archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
2639
old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
2643
if test "$GCC" = yes; then
2644
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2645
archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
2647
allow_undefined_flag=' -expect_unresolved \*'
2648
archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
2650
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2651
hardcode_libdir_separator=:
2654
osf4* | osf5*) # as osf3* with the addition of -msym flag
2655
if test "$GCC" = yes; then
2656
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2657
archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
2658
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2660
allow_undefined_flag=' -expect_unresolved \*'
2661
archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
2662
archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
2663
$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
2665
#Both c and cxx compiler support -rpath directly
2666
hardcode_libdir_flag_spec='-rpath $libdir'
2668
hardcode_libdir_separator=:
2672
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2673
hardcode_shlibpath_var=no
2674
runpath_var=LD_RUN_PATH
2675
hardcode_runpath_var=yes
2676
export_dynamic_flag_spec='${wl}-Bexport'
2680
# gcc --version < 3.0 without binutils cannot create self contained
2681
# shared libraries reliably, requiring libgcc.a to resolve some of
2682
# the object symbols generated in some cases. Libraries that use
2683
# assert need libgcc.a to resolve __eprintf, for example. Linking
2684
# a copy of libgcc.a into every shared library to guarantee resolving
2685
# such symbols causes other problems: According to Tim Van Holder
2686
# <tim.van.holder@pandora.be>, C++ libraries end up with a separate
2687
# (to the application) exception stack for one thing.
2688
no_undefined_flag=' -z defs'
2689
if test "$GCC" = yes; then
2690
case `$CC --version 2>/dev/null` in
2694
*** Warning: Releases of GCC earlier than version 3.0 cannot reliably
2695
*** create self contained shared libraries on Solaris systems, without
2696
*** introducing a dependency on libgcc.a. Therefore, libtool is disabling
2697
*** -no-undefined support, which will at least allow you to build shared
2698
*** libraries. However, you may find that when you link such libraries
2699
*** into an application without using GCC, you have to manually add
2700
*** \`gcc --print-libgcc-file-name\` to the link command. We urge you to
2701
*** upgrade to a newer version of GCC. Another option is to rebuild your
2702
*** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
2709
# $CC -shared without GNU ld will not create a library from C++
2710
# object files and a static libstdc++, better avoid it by now
2711
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2712
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2713
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2714
hardcode_libdir_flag_spec='-R$libdir'
2715
hardcode_shlibpath_var=no
2717
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
2718
*) # Supported since Solaris 2.6 (maybe 2.5.1?)
2719
whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
2721
link_all_deplibs=yes
2725
if test "x$host_vendor" = xsequent; then
2726
# Use $CC to link under sequent, because it throws in some extra .o
2727
# files that make .init and .fini sections work.
2728
archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
2730
archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
2732
hardcode_libdir_flag_spec='-L$libdir'
2734
hardcode_minus_L=yes
2735
hardcode_shlibpath_var=no
2739
case $host_vendor in
2741
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2742
hardcode_direct=yes # is this really true???
2745
## LD is ld it makes a PLAMLIB
2746
## CC just makes a GrossModule.
2747
archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2748
reload_cmds='$CC -r -o $output$reload_objs'
2752
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2753
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
2756
runpath_var='LD_RUN_PATH'
2757
hardcode_shlibpath_var=no
2761
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2762
hardcode_shlibpath_var=no
2763
export_dynamic_flag_spec='-Bexport'
2767
no_undefined_flag=' -z text'
2768
# $CC -shared without GNU ld will not create a library from C++
2769
# object files and a static libstdc++, better avoid it by now
2770
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2771
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2772
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2773
hardcode_libdir_flag_spec=
2774
hardcode_shlibpath_var=no
2775
runpath_var='LD_RUN_PATH'
2779
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2780
hardcode_libdir_flag_spec='-L$libdir'
2781
hardcode_shlibpath_var=no
2785
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2786
hardcode_libdir_flag_spec='-L$libdir'
2787
hardcode_shlibpath_var=no
2791
if test -d /usr/nec; then
2792
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2793
hardcode_shlibpath_var=no
2794
runpath_var=LD_RUN_PATH
2795
hardcode_runpath_var=yes
2801
archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2804
hardcode_shlibpath_var=no
2805
hardcode_runpath_var=yes
2806
runpath_var=LD_RUN_PATH
2809
sysv5uw7* | unixware7*)
2810
no_undefined_flag='${wl}-z ${wl}text'
2811
if test "$GCC" = yes; then
2812
archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2814
archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2816
runpath_var='LD_RUN_PATH'
2817
hardcode_shlibpath_var=no
2825
AC_MSG_RESULT([$ld_shlibs])
2826
test "$ld_shlibs" = no && can_build_shared=no
2828
# Check hardcoding attributes.
2829
AC_MSG_CHECKING([how to hardcode library paths into programs])
2831
if test -n "$hardcode_libdir_flag_spec" || \
2832
test -n "$runpath_var"; then
2834
# We can hardcode non-existant directories.
2835
if test "$hardcode_direct" != no &&
2836
# If the only mechanism to avoid hardcoding is shlibpath_var, we
2837
# have to relink, otherwise we might link with an installed library
2838
# when we should be linking with a yet-to-be-installed one
2839
## test "$hardcode_shlibpath_var" != no &&
2840
test "$hardcode_minus_L" != no; then
2841
# Linking always hardcodes the temporary library directory.
2842
hardcode_action=relink
2844
# We can link without hardcoding, and we can hardcode nonexisting dirs.
2845
hardcode_action=immediate
2848
# We cannot hardcode anything, or else we can only hardcode existing
2850
hardcode_action=unsupported
2852
AC_MSG_RESULT([$hardcode_action])
2856
AC_MSG_CHECKING([whether stripping libraries is possible])
2857
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2858
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2859
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2860
AC_MSG_RESULT([yes])
2865
reload_cmds='$LD$reload_flag -o $output$reload_objs'
2866
test -z "$deplibs_check_method" && deplibs_check_method=unknown
2868
# PORTME Fill in your ld.so characteristics
2869
AC_MSG_CHECKING([dynamic linker characteristics])
2871
libname_spec='lib$name'
2878
shlibpath_overrides_runpath=unknown
2880
dynamic_linker="$host_os ld.so"
2881
sys_lib_dlsearch_path_spec="/lib /usr/lib"
2882
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2887
library_names_spec='${libname}${release}.so$versuffix $libname.a'
2888
shlibpath_var=LIBPATH
2890
# AIX has no versioning support, so we append a major version to the name.
2891
soname_spec='${libname}${release}.so$major'
2898
hardcode_into_libs=yes
2899
if test "$host_cpu" = ia64; then
2900
# AIX 5 supports IA64
2901
library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
2902
shlibpath_var=LD_LIBRARY_PATH
2904
# With GCC up to 2.95.x, collect2 would create an import file
2905
# for dependence libraries. The import file would start with
2906
# the line `#! .'. This would cause the generated library to
2907
# depend on `.', always an invalid library. This was fixed in
2908
# development snapshots of GCC prior to 3.0.
2910
aix4 | aix4.[[01]] | aix4.[[01]].*)
2911
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2913
echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2920
# AIX (on Power*) has no versioning support, so currently we can
2921
# not hardcode correct soname into executable. Probably we can
2922
# add versioning support to collect2, so additional links can
2923
# be useful in future.
2924
if test "$aix_use_runtimelinking" = yes; then
2925
# If using run time linking (on AIX 4.2 or later) use lib<name>.so
2926
# instead of lib<name>.a to let people know that these are not
2927
# typical AIX shared libraries.
2928
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2930
# We preserve .a as extension for shared libraries through AIX4.2
2931
# and later when we are not doing run time linking.
2932
library_names_spec='${libname}${release}.a $libname.a'
2933
soname_spec='${libname}${release}.so$major'
2935
shlibpath_var=LIBPATH
2937
hardcode_into_libs=yes
2941
library_names_spec='$libname.ixlibrary $libname.a'
2942
# Create ${libname}_ixlibrary.a entries in /sys/libs.
2943
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'
2947
library_names_spec='${libname}.so'
2948
dynamic_linker="$host_os ld.so"
2949
shlibpath_var=LIBRARY_PATH
2955
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2956
soname_spec='${libname}${release}.so$major'
2957
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2958
shlibpath_var=LD_LIBRARY_PATH
2959
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2960
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2961
export_dynamic_flag_spec=-rdynamic
2962
# the default ld.so.conf also contains /usr/contrib/lib and
2963
# /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2964
# libtool to hard-code these into programs
2967
cygwin* | mingw* | pw32*)
2968
version_type=windows
2971
case $GCC,$host_os in
2973
library_names_spec='$libname.dll.a'
2974
soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2975
postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
2976
dldir=$destdir/`dirname \$dlpath`~
2977
test -d \$dldir || mkdir -p \$dldir~
2978
$install_prog .libs/$dlname \$dldir/$dlname'
2979
postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
2980
dlpath=$dir/\$dldll~
2984
library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2985
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
2988
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
2991
library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
2994
dynamic_linker='Win32 ld.exe'
2995
# FIXME: first we should search . and the directory the executable is in
2999
darwin* | rhapsody*)
3000
dynamic_linker="$host_os dyld"
3004
# FIXME: Relying on posixy $() will cause problems for
3005
# cross-compilation, but unfortunately the echo tests do not
3006
# yet detect zsh echo's removal of \ escapes.
3007
library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
3008
soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
3009
shlibpath_overrides_runpath=yes
3010
shlibpath_var=DYLD_LIBRARY_PATH
3021
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3022
soname_spec='${libname}${release}.so$major'
3023
shlibpath_var=LD_LIBRARY_PATH
3024
shlibpath_overrides_runpath=no
3025
hardcode_into_libs=yes
3026
dynamic_linker='GNU/FreeBSD ld.so'
3030
objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
3031
version_type=freebsd-$objformat
3032
case $version_type in
3034
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
3039
library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
3043
shlibpath_var=LD_LIBRARY_PATH
3046
shlibpath_overrides_runpath=yes
3049
shlibpath_overrides_runpath=no
3050
hardcode_into_libs=yes
3059
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
3060
soname_spec='${libname}${release}.so$major'
3061
shlibpath_var=LD_LIBRARY_PATH
3062
hardcode_into_libs=yes
3065
hpux9* | hpux10* | hpux11*)
3066
# Give a soname corresponding to the major version so that dld.sl refuses to
3067
# link against other versions.
3068
dynamic_linker="$host_os dld.sl"
3072
shlibpath_var=SHLIB_PATH
3073
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3074
library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
3075
soname_spec='${libname}${release}.sl$major'
3076
# HP-UX runs *really* slowly unless shared libraries are mode 555.
3077
postinstall_cmds='chmod 555 $lib'
3080
irix5* | irix6* | nonstopux*)
3082
nonstopux*) version_type=nonstopux ;;
3083
*) version_type=irix ;;
3087
soname_spec='${libname}${release}.so$major'
3088
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
3090
irix5* | nonstopux*)
3094
case $LD in # libtool.m4 will add one of these switches to LD
3095
*-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
3096
*-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
3097
*-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
3098
*) libsuff= shlibsuff= libmagic=never-match;;
3102
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3103
shlibpath_overrides_runpath=no
3104
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3105
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3108
# No shared lib support for Linux oldld, aout, or coff.
3109
linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
3113
# This must be Linux ELF.
3118
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3119
soname_spec='${libname}${release}.so$major'
3120
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3121
shlibpath_var=LD_LIBRARY_PATH
3122
shlibpath_overrides_runpath=no
3123
# This implies no fast_install, which is unacceptable.
3124
# Some rework will be needed to allow for fast_install
3125
# before this can be enabled.
3126
hardcode_into_libs=yes
3128
# We used to test for /lib/ld.so.1 and disable shared libraries on
3129
# powerpc, because MkLinux only supported shared libraries with the
3130
# GNU dynamic linker. Since this was broken with cross compilers,
3131
# most powerpc-linux boxes support dynamic linking these days and
3132
# people can always --disable-shared, the test was removed, and we
3133
# assume the GNU/Linux dynamic linker is in use.
3134
dynamic_linker='GNU/Linux ld.so'
3141
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3142
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
3143
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3144
dynamic_linker='NetBSD (a.out) ld.so'
3146
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
3147
soname_spec='${libname}${release}.so$major'
3148
dynamic_linker='NetBSD ld.elf_so'
3150
shlibpath_var=LD_LIBRARY_PATH
3151
shlibpath_overrides_runpath=yes
3152
hardcode_into_libs=yes
3157
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3158
shlibpath_var=LD_LIBRARY_PATH
3159
shlibpath_overrides_runpath=yes
3166
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3168
openbsd2.[[89]] | openbsd2.[[89]].*)
3169
shlibpath_overrides_runpath=no
3172
shlibpath_overrides_runpath=yes
3176
shlibpath_overrides_runpath=yes
3178
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
3179
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3180
shlibpath_var=LD_LIBRARY_PATH
3184
libname_spec='$name'
3186
library_names_spec='$libname.dll $libname.a'
3187
dynamic_linker='OS/2 ld.exe'
3188
shlibpath_var=LIBPATH
3191
osf3* | osf4* | osf5*)
3195
soname_spec='${libname}${release}.so$major'
3196
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3197
shlibpath_var=LD_LIBRARY_PATH
3198
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3199
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3200
hardcode_into_libs=yes
3205
soname_spec='${libname}${release}.so$major'
3206
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3207
shlibpath_var=LD_LIBRARY_PATH
3214
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3215
soname_spec='${libname}${release}.so$major'
3216
shlibpath_var=LD_LIBRARY_PATH
3217
shlibpath_overrides_runpath=yes
3218
hardcode_into_libs=yes
3219
# ldd complains unless libraries are executable
3220
postinstall_cmds='chmod +x $lib'
3225
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
3226
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3227
shlibpath_var=LD_LIBRARY_PATH
3228
shlibpath_overrides_runpath=yes
3229
if test "$with_gnu_ld" = yes; then
3235
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3237
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3238
soname_spec='${libname}${release}.so$major'
3239
shlibpath_var=LD_LIBRARY_PATH
3240
case $host_vendor in
3242
shlibpath_overrides_runpath=no
3244
export_dynamic_flag_spec='${wl}-Blargedynsym'
3245
runpath_var=LD_RUN_PATH
3253
shlibpath_overrides_runpath=no
3254
sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3261
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3262
soname_spec='${libname}${release}.so$major'
3263
shlibpath_var=LD_LIBRARY_PATH
3270
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3271
soname_spec='${libname}${release}.so$major'
3272
shlibpath_var=LD_LIBRARY_PATH
3276
if test -d /usr/nec ;then
3278
library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
3279
soname_spec='$libname.so.$major'
3280
shlibpath_var=LD_LIBRARY_PATH
3288
AC_MSG_RESULT([$dynamic_linker])
3289
test "$dynamic_linker" = no && can_build_shared=no
3291
# Report the final consequences.
3292
AC_MSG_CHECKING([if libtool supports shared libraries])
3293
AC_MSG_RESULT([$can_build_shared])
3295
AC_MSG_CHECKING([whether to build shared libraries])
3296
test "$can_build_shared" = "no" && enable_shared=no
3298
# On AIX, shared libraries and static libraries use the same namespace, and
3299
# are all built from PIC.
3302
test "$enable_shared" = yes && enable_static=no
3303
if test -n "$RANLIB"; then
3304
archive_cmds="$archive_cmds~\$RANLIB \$lib"
3305
postinstall_cmds='$RANLIB $lib'
3310
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3311
test "$enable_shared" = yes && enable_static=no
3315
AC_MSG_RESULT([$enable_shared])
3317
AC_MSG_CHECKING([whether to build static libraries])
3318
# Make sure either enable_shared or enable_static is yes.
3319
test "$enable_shared" = yes || enable_static=yes
3320
AC_MSG_RESULT([$enable_static])
3322
if test "$hardcode_action" = relink; then
3323
# Fast installation is not supported
3324
enable_fast_install=no
3325
elif test "$shlibpath_overrides_runpath" = yes ||
3326
test "$enable_shared" = no; then
3327
# Fast installation is not necessary
3328
enable_fast_install=needless
3331
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3332
if test "$GCC" = yes; then
3333
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3336
AC_LIBTOOL_DLOPEN_SELF
3338
if test "$enable_shared" = yes && test "$GCC" = yes; then
3339
case $archive_cmds in
3341
# FIXME: we may have to deal with multi-command sequences.
3344
# Test whether the compiler implicitly links with -lc since on some
3345
# systems, -lgcc has to come before -lc. If gcc already passes -lc
3346
# to ld, don't add -lc before -lgcc.
3347
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
3348
AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
3350
echo 'static int dummy;' > conftest.$ac_ext
3352
if AC_TRY_EVAL(ac_compile); then
3355
libobjs=conftest.$ac_objext
3357
wl=$lt_cv_prog_cc_wl
3363
save_allow_undefined_flag=$allow_undefined_flag
3364
allow_undefined_flag=
3365
if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
3367
lt_cv_archive_cmds_need_lc=no
3369
lt_cv_archive_cmds_need_lc=yes
3371
allow_undefined_flag=$save_allow_undefined_flag
3373
cat conftest.err 1>&5
3375
AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
3379
need_lc=${lt_cv_archive_cmds_need_lc-yes}
3381
# The second clause should only fire when bootstrapping the
3382
# libtool distribution, otherwise you forgot to ship ltmain.sh
3383
# with your package, and you will get complaints that there are
3384
# no rules to generate ltmain.sh.
3385
if test -f "$ltmain"; then
3388
# If there is no Makefile yet, we rely on a make rule to execute
3389
# `config.status --recheck' to rerun these tests and create the
3390
# libtool script then.
3391
test -f Makefile && make "$ltmain"
3394
if test -f "$ltmain"; then
3395
trap "$rm \"${ofile}T\"; exit 1" 1 2 15
3398
echo creating $ofile
3400
# Now quote all the things that may contain metacharacters while being
3401
# careful not to overquote the AC_SUBSTed values. We take copies of the
3402
# variables and quote the copies for generation of the libtool script.
3403
for var in echo old_CC old_CFLAGS SED \
3404
AR AR_FLAGS CC LD LN_S NM SHELL \
3405
reload_flag reload_cmds wl \
3406
pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
3407
thread_safe_flag_spec whole_archive_flag_spec libname_spec \
3408
library_names_spec soname_spec \
3409
RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
3410
old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
3411
postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
3412
old_striplib striplib file_magic_cmd export_symbols_cmds \
3413
deplibs_check_method allow_undefined_flag no_undefined_flag \
3414
finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
3415
global_symbol_to_c_name_address \
3416
hardcode_libdir_flag_spec hardcode_libdir_separator \
3417
sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
3418
compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
3421
reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
3422
old_postinstall_cmds | old_postuninstall_cmds | \
3423
export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
3424
extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
3425
postinstall_cmds | postuninstall_cmds | \
3426
finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
3427
# Double-quote double-evaled strings.
3428
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
3431
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
3436
cat <<__EOF__ > "${ofile}T"
3439
# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
3440
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
3441
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
3443
# Copyright (C) 1996-2000 Free Software Foundation, Inc.
3444
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
3446
# This program is free software; you can redistribute it and/or modify
3447
# it under the terms of the GNU General Public License as published by
3448
# the Free Software Foundation; either version 2 of the License, or
3449
# (at your option) any later version.
3451
# This program is distributed in the hope that it will be useful, but
3452
# WITHOUT ANY WARRANTY; without even the implied warranty of
3453
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3454
# General Public License for more details.
3456
# You should have received a copy of the GNU General Public License
3457
# along with this program; if not, write to the Free Software
3458
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3460
# As a special exception to the GNU General Public License, if you
3461
# distribute this file as part of a program that contains a
3462
# configuration script generated by Autoconf, you may include it under
3463
# the same distribution terms that you use for the rest of that program.
3465
# A sed that does not truncate output.
3468
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
3469
Xsed="${SED} -e s/^X//"
3471
# The HP-UX ksh and POSIX shell print the target directory to stdout
3473
if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
3475
# ### BEGIN LIBTOOL CONFIG
3477
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3479
# Shell to use when invoking shell scripts.
3482
# Whether or not to build shared libraries.
3483
build_libtool_libs=$enable_shared
3485
# Whether or not to build static libraries.
3486
build_old_libs=$enable_static
3488
# Whether or not to add -lc for building shared libraries.
3489
build_libtool_need_lc=$need_lc
3491
# Whether or not to optimize for fast installation.
3492
fast_install=$enable_fast_install
3495
host_alias=$host_alias
3498
# An echo program that does not interpret backslashes.
3503
AR_FLAGS=$lt_AR_FLAGS
3505
# The default C compiler.
3508
# Is the compiler the GNU C compiler?
3511
# The linker used to build libraries.
3514
# Whether we need hard or soft links.
3517
# A BSD-compatible nm program.
3520
# A symbol stripping program
3523
# Used to examine libraries when file_magic_cmd begins "file"
3524
MAGIC_CMD=$MAGIC_CMD
3526
# Used on cygwin: DLL creation program.
3529
# Used on cygwin: object dumper.
3532
# Used on cygwin: assembler.
3535
# The name of the directory that contains temporary libtool files.
3538
# How to create reloadable object files.
3539
reload_flag=$lt_reload_flag
3540
reload_cmds=$lt_reload_cmds
3542
# How to pass a linker flag through the compiler.
3545
# Object file suffix (normally "o").
3548
# Old archive suffix (normally "a").
3551
# Executable file suffix (normally "").
3554
# Additional compiler flags for building library objects.
3555
pic_flag=$lt_pic_flag
3558
# Does compiler simultaneously support -c and -o options?
3559
compiler_c_o=$lt_compiler_c_o
3561
# Can we write directly to a .lo ?
3562
compiler_o_lo=$lt_compiler_o_lo
3564
# Must we lock files when doing compilation ?
3565
need_locks=$lt_need_locks
3567
# Do we need the lib prefix for modules?
3568
need_lib_prefix=$need_lib_prefix
3570
# Do we need a version for libraries?
3571
need_version=$need_version
3573
# Whether dlopen is supported.
3574
dlopen_support=$enable_dlopen
3576
# Whether dlopen of programs is supported.
3577
dlopen_self=$enable_dlopen_self
3579
# Whether dlopen of statically linked programs is supported.
3580
dlopen_self_static=$enable_dlopen_self_static
3582
# Compiler flag to prevent dynamic linking.
3583
link_static_flag=$lt_link_static_flag
3585
# Compiler flag to turn off builtin functions.
3586
no_builtin_flag=$lt_no_builtin_flag
3588
# Compiler flag to allow reflexive dlopens.
3589
export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
3591
# Compiler flag to generate shared objects directly from archives.
3592
whole_archive_flag_spec=$lt_whole_archive_flag_spec
3594
# Compiler flag to generate thread-safe objects.
3595
thread_safe_flag_spec=$lt_thread_safe_flag_spec
3597
# Library versioning type.
3598
version_type=$version_type
3600
# Format of library name prefix.
3601
libname_spec=$lt_libname_spec
3603
# List of archive names. First name is the real one, the rest are links.
3604
# The last name is the one that the linker finds with -lNAME.
3605
library_names_spec=$lt_library_names_spec
3607
# The coded name of the library, if different from the real name.
3608
soname_spec=$lt_soname_spec
3610
# Commands used to build and install an old-style archive.
3612
old_archive_cmds=$lt_old_archive_cmds
3613
old_postinstall_cmds=$lt_old_postinstall_cmds
3614
old_postuninstall_cmds=$lt_old_postuninstall_cmds
3616
# Create an old-style archive from a shared archive.
3617
old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
3619
# Create a temporary old-style archive to link instead of a shared archive.
3620
old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
3622
# Commands used to build and install a shared archive.
3623
archive_cmds=$lt_archive_cmds
3624
archive_expsym_cmds=$lt_archive_expsym_cmds
3625
postinstall_cmds=$lt_postinstall_cmds
3626
postuninstall_cmds=$lt_postuninstall_cmds
3628
# Commands to strip libraries.
3629
old_striplib=$lt_old_striplib
3630
striplib=$lt_striplib
3632
# Method to check whether dependent libraries are shared objects.
3633
deplibs_check_method=$lt_deplibs_check_method
3635
# Command to use when deplibs_check_method == file_magic.
3636
file_magic_cmd=$lt_file_magic_cmd
3638
# Flag that allows shared libraries with undefined symbols to be built.
3639
allow_undefined_flag=$lt_allow_undefined_flag
3641
# Flag that forces no undefined symbols.
3642
no_undefined_flag=$lt_no_undefined_flag
3644
# Commands used to finish a libtool library installation in a directory.
3645
finish_cmds=$lt_finish_cmds
3647
# Same as above, but a single script fragment to be evaled but not shown.
3648
finish_eval=$lt_finish_eval
3650
# Take the output of nm and produce a listing of raw symbols and C names.
3651
global_symbol_pipe=$lt_global_symbol_pipe
3653
# Transform the output of nm in a proper C declaration
3654
global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
3656
# Transform the output of nm in a C name address pair
3657
global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
3659
# This is the shared library runtime path variable.
3660
runpath_var=$runpath_var
3662
# This is the shared library path variable.
3663
shlibpath_var=$shlibpath_var
3665
# Is shlibpath searched before the hard-coded library search path?
3666
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
3668
# How to hardcode a shared library path into an executable.
3669
hardcode_action=$hardcode_action
3671
# Whether we should hardcode library paths into libraries.
3672
hardcode_into_libs=$hardcode_into_libs
3674
# Flag to hardcode \$libdir into a binary during linking.
3675
# This must work even if \$libdir does not exist.
3676
hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
3678
# Whether we need a single -rpath flag with a separated argument.
3679
hardcode_libdir_separator=$lt_hardcode_libdir_separator
3681
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
3683
hardcode_direct=$hardcode_direct
3685
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
3687
hardcode_minus_L=$hardcode_minus_L
3689
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
3690
# the resulting binary.
3691
hardcode_shlibpath_var=$hardcode_shlibpath_var
3693
# Variables whose values should be saved in libtool wrapper scripts and
3694
# restored at relink time.
3695
variables_saved_for_relink="$variables_saved_for_relink"
3697
# Whether libtool must link a program against all its dependency libraries.
3698
link_all_deplibs=$link_all_deplibs
3700
# Compile-time system search path for libraries
3701
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
3703
# Run-time system search path for libraries
3704
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
3706
# Fix the shell variable \$srcfile for the compiler.
3707
fix_srcfile_path="$fix_srcfile_path"
3709
# Set to yes if exported symbols are required.
3710
always_export_symbols=$always_export_symbols
3712
# The commands to list exported symbols.
3713
export_symbols_cmds=$lt_export_symbols_cmds
3715
# The commands to extract the exported symbol list from a shared archive.
3716
extract_expsyms_cmds=$lt_extract_expsyms_cmds
3718
# Symbols that should not be listed in the preloaded symbols.
3719
exclude_expsyms=$lt_exclude_expsyms
3721
# Symbols that must always be exported.
3722
include_expsyms=$lt_include_expsyms
3724
# ### END LIBTOOL CONFIG
3730
cat <<\EOF >> "${ofile}T"
3732
# AIX sometimes has problems with the GCC collect2 program. For some
3733
# reason, if we set the COLLECT_NAMES environment variable, the problems
3734
# vanish in a puff of smoke.
3735
if test "X${COLLECT_NAMES+set}" != Xset; then
3737
export COLLECT_NAMES
3744
cygwin* | mingw* | pw32* | os2*)
3745
cat <<'EOF' >> "${ofile}T"
3746
# This is a source program that is used to create dlls on Windows
3747
# Don't remove nor modify the starting and closing comments
3748
# /* ltdll.c starts here */
3749
# #define WIN32_LEAN_AND_MEAN
3750
# #include <windows.h>
3751
# #undef WIN32_LEAN_AND_MEAN
3752
# #include <stdio.h>
3754
# #ifndef __CYGWIN__
3755
# # ifdef __CYGWIN32__
3756
# # define __CYGWIN__ __CYGWIN32__
3760
# #ifdef __cplusplus
3763
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
3764
# #ifdef __cplusplus
3769
# #include <cygwin/cygwin_dll.h>
3770
# DECLARE_CYGWIN_DLL( DllMain );
3772
# HINSTANCE __hDllInstance_base;
3775
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
3777
# __hDllInstance_base = hInst;
3780
# /* ltdll.c ends here */
3781
# This is a source program that is used to create import libraries
3782
# on Windows for dlls which lack them. Don't remove nor modify the
3783
# starting and closing comments
3784
# /* impgen.c starts here */
3785
# /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
3787
# This file is part of GNU libtool.
3789
# This program is free software; you can redistribute it and/or modify
3790
# it under the terms of the GNU General Public License as published by
3791
# the Free Software Foundation; either version 2 of the License, or
3792
# (at your option) any later version.
3794
# This program is distributed in the hope that it will be useful,
3795
# but WITHOUT ANY WARRANTY; without even the implied warranty of
3796
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3797
# GNU General Public License for more details.
3799
# You should have received a copy of the GNU General Public License
3800
# along with this program; if not, write to the Free Software
3801
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3804
# #include <stdio.h> /* for printf() */
3805
# #include <unistd.h> /* for open(), lseek(), read() */
3806
# #include <fcntl.h> /* for O_RDONLY, O_BINARY */
3807
# #include <string.h> /* for strdup() */
3809
# /* O_BINARY isn't required (or even defined sometimes) under Unix */
3811
# #define O_BINARY 0
3814
# static unsigned int
3815
# pe_get16 (fd, offset)
3819
# unsigned char b[2];
3820
# lseek (fd, offset, SEEK_SET);
3822
# return b[0] + (b[1]<<8);
3825
# static unsigned int
3826
# pe_get32 (fd, offset)
3830
# unsigned char b[4];
3831
# lseek (fd, offset, SEEK_SET);
3833
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3836
# static unsigned int
3840
# unsigned char *b = ptr;
3841
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3850
# unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
3851
# unsigned long export_rva, export_size, nsections, secptr, expptr;
3852
# unsigned long name_rvas, nexp;
3853
# unsigned char *expdata, *erva;
3854
# char *filename, *dll_name;
3856
# filename = argv[1];
3858
# dll = open(filename, O_RDONLY|O_BINARY);
3862
# dll_name = filename;
3864
# for (i=0; filename[i]; i++)
3865
# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
3866
# dll_name = filename + i +1;
3868
# pe_header_offset = pe_get32 (dll, 0x3c);
3869
# opthdr_ofs = pe_header_offset + 4 + 20;
3870
# num_entries = pe_get32 (dll, opthdr_ofs + 92);
3872
# if (num_entries < 1) /* no exports */
3875
# export_rva = pe_get32 (dll, opthdr_ofs + 96);
3876
# export_size = pe_get32 (dll, opthdr_ofs + 100);
3877
# nsections = pe_get16 (dll, pe_header_offset + 4 +2);
3878
# secptr = (pe_header_offset + 4 + 20 +
3879
# pe_get16 (dll, pe_header_offset + 4 + 16));
3882
# for (i = 0; i < nsections; i++)
3885
# unsigned long secptr1 = secptr + 40 * i;
3886
# unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
3887
# unsigned long vsize = pe_get32 (dll, secptr1 + 16);
3888
# unsigned long fptr = pe_get32 (dll, secptr1 + 20);
3889
# lseek(dll, secptr1, SEEK_SET);
3890
# read(dll, sname, 8);
3891
# if (vaddr <= export_rva && vaddr+vsize > export_rva)
3893
# expptr = fptr + (export_rva - vaddr);
3894
# if (export_rva + export_size > vaddr + vsize)
3895
# export_size = vsize - (export_rva - vaddr);
3900
# expdata = (unsigned char*)malloc(export_size);
3901
# lseek (dll, expptr, SEEK_SET);
3902
# read (dll, expdata, export_size);
3903
# erva = expdata - export_rva;
3905
# nexp = pe_as32 (expdata+24);
3906
# name_rvas = pe_as32 (expdata+32);
3908
# printf ("EXPORTS\n");
3909
# for (i = 0; i<nexp; i++)
3911
# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
3912
# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
3917
# /* impgen.c ends here */
3923
# We use sed instead of cat because bash on DJGPP gets confused if
3924
# if finds mixed CR/LF and LF-only lines. Since sed operates in
3925
# text mode, it properly converts lines to CR/LF. This bash problem
3926
# is reportedly fixed, but why not run on old versions too?
3927
sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
3929
mv -f "${ofile}T" "$ofile" || \
3930
(rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
3934
])# _LT_AC_LTCONFIG_HACK
3936
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
3937
AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
3939
# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
3940
AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
3942
# AC_ENABLE_SHARED - implement the --enable-shared flag
3943
# Usage: AC_ENABLE_SHARED[(DEFAULT)]
3944
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3946
AC_DEFUN([AC_ENABLE_SHARED],
3947
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3948
AC_ARG_ENABLE(shared,
3949
changequote(<<, >>)dnl
3950
<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
3951
changequote([, ])dnl
3952
[p=${PACKAGE-default}
3954
yes) enable_shared=yes ;;
3955
no) enable_shared=no ;;
3958
# Look at the argument we got. We use all the common list separators.
3959
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3960
for pkg in $enableval; do
3961
if test "X$pkg" = "X$p"; then
3968
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
3971
# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
3972
AC_DEFUN([AC_DISABLE_SHARED],
3973
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3974
AC_ENABLE_SHARED(no)])
3976
# AC_ENABLE_STATIC - implement the --enable-static flag
3977
# Usage: AC_ENABLE_STATIC[(DEFAULT)]
3978
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3980
AC_DEFUN([AC_ENABLE_STATIC],
3981
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3982
AC_ARG_ENABLE(static,
3983
changequote(<<, >>)dnl
3984
<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
3985
changequote([, ])dnl
3986
[p=${PACKAGE-default}
3988
yes) enable_static=yes ;;
3989
no) enable_static=no ;;
3992
# Look at the argument we got. We use all the common list separators.
3993
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3994
for pkg in $enableval; do
3995
if test "X$pkg" = "X$p"; then
4002
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
4005
# AC_DISABLE_STATIC - set the default static flag to --disable-static
4006
AC_DEFUN([AC_DISABLE_STATIC],
4007
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4008
AC_ENABLE_STATIC(no)])
4011
# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
4012
# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
4013
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
4015
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
4016
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
4017
AC_ARG_ENABLE(fast-install,
4018
changequote(<<, >>)dnl
4019
<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
4020
changequote([, ])dnl
4021
[p=${PACKAGE-default}
4023
yes) enable_fast_install=yes ;;
4024
no) enable_fast_install=no ;;
4026
enable_fast_install=no
4027
# Look at the argument we got. We use all the common list separators.
4028
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
4029
for pkg in $enableval; do
4030
if test "X$pkg" = "X$p"; then
4031
enable_fast_install=yes
4037
enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
4040
# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
4041
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
4042
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4043
AC_ENABLE_FAST_INSTALL(no)])
4045
# AC_LIBTOOL_PICMODE - implement the --with-pic flag
4046
# Usage: AC_LIBTOOL_PICMODE[(MODE)]
4047
# Where MODE is either `yes' or `no'. If omitted, it defaults to
4049
AC_DEFUN([AC_LIBTOOL_PICMODE],
4050
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4051
pic_mode=ifelse($#,1,$1,default)])
4054
# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
4055
AC_DEFUN([AC_PATH_TOOL_PREFIX],
4056
[AC_MSG_CHECKING([for $1])
4057
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
4060
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4063
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4066
ac_save_MAGIC_CMD="$MAGIC_CMD"
4067
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4068
dnl $ac_dummy forces splitting on constant user-supplied paths.
4069
dnl POSIX.2 word splitting is done only on the output of word expansions,
4070
dnl not every word. This closes a longstanding sh security hole.
4071
ac_dummy="ifelse([$2], , $PATH, [$2])"
4072
for ac_dir in $ac_dummy; do
4073
test -z "$ac_dir" && ac_dir=.
4074
if test -f $ac_dir/$1; then
4075
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
4076
if test -n "$file_magic_test_file"; then
4077
case $deplibs_check_method in
4079
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4080
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4081
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4082
egrep "$file_magic_regex" > /dev/null; then
4087
*** Warning: the command libtool uses to detect shared libraries,
4088
*** $file_magic_cmd, produces output that libtool cannot recognize.
4089
*** The result is that libtool may fail to recognize shared libraries
4090
*** as such. This will affect the creation of libtool libraries that
4091
*** depend on shared libraries, but programs linked with such libtool
4092
*** libraries will work regardless of this problem. Nevertheless, you
4093
*** may want to report the problem to your system manager and/or to
4094
*** bug-libtool@gnu.org
4104
MAGIC_CMD="$ac_save_MAGIC_CMD"
4107
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4108
if test -n "$MAGIC_CMD"; then
4109
AC_MSG_RESULT($MAGIC_CMD)
4116
# AC_PATH_MAGIC - find a file program which can recognise a shared library
4117
AC_DEFUN([AC_PATH_MAGIC],
4118
[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
4119
AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
4120
if test -z "$lt_cv_path_MAGIC_CMD"; then
4121
if test -n "$ac_tool_prefix"; then
4122
AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
4130
# AC_PROG_LD - find the path to the GNU or non-GNU linker
4131
AC_DEFUN([AC_PROG_LD],
4132
[AC_ARG_WITH(gnu-ld,
4133
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
4134
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
4135
AC_REQUIRE([AC_PROG_CC])dnl
4136
AC_REQUIRE([AC_CANONICAL_HOST])dnl
4137
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4138
AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
4140
if test "$GCC" = yes; then
4141
# Check if gcc -print-prog-name=ld gives a path.
4142
AC_MSG_CHECKING([for ld used by GCC])
4145
# gcc leaves a trailing carriage return which upsets mingw
4146
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4148
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4151
# Accept absolute paths.
4152
[[\\/]]* | [[A-Za-z]]:[[\\/]]*)
4153
re_direlt='/[[^/]][[^/]]*/\.\./'
4154
# Canonicalize the path of ld
4155
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
4156
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
4157
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
4159
test -z "$LD" && LD="$ac_prog"
4162
# If it fails, then pretend we aren't using GCC.
4166
# If it is relative, then search for the first ld in PATH.
4170
elif test "$with_gnu_ld" = yes; then
4171
AC_MSG_CHECKING([for GNU ld])
4173
AC_MSG_CHECKING([for non-GNU ld])
4175
AC_CACHE_VAL(lt_cv_path_LD,
4176
[if test -z "$LD"; then
4177
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4178
for ac_dir in $PATH; do
4179
test -z "$ac_dir" && ac_dir=.
4180
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4181
lt_cv_path_LD="$ac_dir/$ac_prog"
4182
# Check to see if the program is GNU ld. I'd rather use --version,
4183
# but apparently some GNU ld's only accept -v.
4184
# Break only if it was the GNU/non-GNU ld that we prefer.
4185
if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
4186
test "$with_gnu_ld" != no && break
4188
test "$with_gnu_ld" != yes && break
4194
lt_cv_path_LD="$LD" # Let the user override the test with a path.
4197
if test -n "$LD"; then
4202
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4207
AC_DEFUN([AC_PROG_LD_GNU],
4208
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4209
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
4210
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
4211
lt_cv_prog_gnu_ld=yes
4213
lt_cv_prog_gnu_ld=no
4215
with_gnu_ld=$lt_cv_prog_gnu_ld
4218
# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
4219
# -- PORTME Some linkers may need a different reload flag.
4220
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
4221
[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
4222
[lt_cv_ld_reload_flag='-r'])
4223
reload_flag=$lt_cv_ld_reload_flag
4224
test -n "$reload_flag" && reload_flag=" $reload_flag"
4227
# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
4228
# -- PORTME fill in with the dynamic library characteristics
4229
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
4230
[AC_CACHE_CHECK([how to recognise dependent libraries],
4231
lt_cv_deplibs_check_method,
4232
[lt_cv_file_magic_cmd='$MAGIC_CMD'
4233
lt_cv_file_magic_test_file=
4234
lt_cv_deplibs_check_method='unknown'
4235
# Need to set the preceding variable on all platforms that support
4236
# interlibrary dependencies.
4237
# 'none' -- dependencies not supported.
4238
# `unknown' -- same as none, but documents that we really don't know.
4239
# 'pass_all' -- all dependencies passed with no checks.
4240
# 'test_compile' -- check by making test program.
4241
# 'file_magic [[regex]]' -- check by looking for files in library path
4242
# which responds to the $file_magic_cmd with a given egrep regex.
4243
# If you have `file' or equivalent on your system and you're not sure
4244
# whether `pass_all' will *always* work, you probably want this one.
4248
lt_cv_deplibs_check_method=pass_all
4252
lt_cv_deplibs_check_method=pass_all
4256
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4257
lt_cv_file_magic_cmd='/usr/bin/file -L'
4258
lt_cv_file_magic_test_file=/shlib/libc.so
4261
cygwin* | mingw* | pw32*)
4262
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
4263
lt_cv_file_magic_cmd='$OBJDUMP -f'
4266
darwin* | rhapsody*)
4267
lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
4268
lt_cv_file_magic_cmd='/usr/bin/file -L'
4270
rhapsody* | darwin1.[[012]])
4271
lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
4274
lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
4280
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4283
# Not sure whether the presence of OpenBSD here was a mistake.
4284
# Let's accept both of them until this is cleared up.
4285
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
4286
lt_cv_file_magic_cmd=/usr/bin/file
4287
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4291
lt_cv_deplibs_check_method=pass_all
4296
lt_cv_deplibs_check_method=pass_all
4300
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
4301
lt_cv_file_magic_cmd=/usr/bin/file
4302
lt_cv_file_magic_test_file=/usr/lib/libc.sl
4305
irix5* | irix6* | nonstopux*)
4307
irix5* | nonstopux*)
4308
# this will be overridden with pass_all, but let us keep it just in case
4309
lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
4313
*-32|*"-32 ") libmagic=32-bit;;
4314
*-n32|*"-n32 ") libmagic=N32;;
4315
*-64|*"-64 ") libmagic=64-bit;;
4316
*) libmagic=never-match;;
4318
# this will be overridden with pass_all, but let us keep it just in case
4319
lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
4322
lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
4323
lt_cv_deplibs_check_method=pass_all
4326
# This must be Linux ELF.
4329
alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
4330
lt_cv_deplibs_check_method=pass_all ;;
4332
# glibc up to 2.1.1 does not perform some relocations on ARM
4333
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
4335
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
4339
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4340
lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
4342
lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
4347
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4348
lt_cv_file_magic_cmd=/usr/bin/file
4349
lt_cv_file_magic_test_file=/usr/lib/libnls.so
4353
lt_cv_file_magic_cmd=/usr/bin/file
4354
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4355
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4356
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
4358
lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
4362
osf3* | osf4* | osf5*)
4363
# this will be overridden with pass_all, but let us keep it just in case
4364
lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
4365
lt_cv_file_magic_test_file=/shlib/libc.so
4366
lt_cv_deplibs_check_method=pass_all
4370
lt_cv_deplibs_check_method=pass_all
4374
lt_cv_deplibs_check_method=pass_all
4375
lt_cv_file_magic_test_file=/lib/libc.so
4378
sysv5uw[[78]]* | sysv4*uw2*)
4379
lt_cv_deplibs_check_method=pass_all
4382
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4383
case $host_vendor in
4385
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]]'
4386
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4389
lt_cv_deplibs_check_method=pass_all
4392
lt_cv_file_magic_cmd='/bin/file'
4393
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4396
lt_cv_file_magic_cmd='/bin/file'
4397
lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4398
lt_cv_file_magic_test_file=/lib/libc.so
4401
lt_cv_deplibs_check_method=pass_all
4407
file_magic_cmd=$lt_cv_file_magic_cmd
4408
deplibs_check_method=$lt_cv_deplibs_check_method
4412
# AC_PROG_NM - find the path to a BSD-compatible name lister
4413
AC_DEFUN([AC_PROG_NM],
4414
[AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
4415
AC_MSG_CHECKING([for BSD-compatible nm])
4416
AC_CACHE_VAL(lt_cv_path_NM,
4417
[if test -n "$NM"; then
4418
# Let the user override the test.
4421
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4422
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
4423
test -z "$ac_dir" && ac_dir=.
4424
tmp_nm=$ac_dir/${ac_tool_prefix}nm
4425
if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
4426
# Check to see if the nm accepts a BSD-compat flag.
4427
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
4428
# nm: unknown option "B" ignored
4429
# Tru64's nm complains that /dev/null is an invalid object file
4430
if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
4431
lt_cv_path_NM="$tmp_nm -B"
4433
elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
4434
lt_cv_path_NM="$tmp_nm -p"
4437
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4438
continue # so that we can try to find one that supports BSD flags
4443
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
4446
AC_MSG_RESULT([$NM])
4449
# AC_CHECK_LIBM - check for math library
4450
AC_DEFUN([AC_CHECK_LIBM],
4451
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4454
*-*-beos* | *-*-cygwin* | *-*-pw32*)
4455
# These system don't have libm
4458
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4459
AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
4462
AC_CHECK_LIB(m, main, LIBM="-lm")
4467
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
4468
# the libltdl convenience library and LTDLINCL to the include flags for
4469
# the libltdl header and adds --enable-ltdl-convenience to the
4470
# configure arguments. Note that LIBLTDL and LTDLINCL are not
4471
# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
4472
# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
4473
# with '${top_builddir}/' and LTDLINCL will be prefixed with
4474
# '${top_srcdir}/' (note the single quotes!). If your package is not
4475
# flat and you're not using automake, define top_builddir and
4476
# top_srcdir appropriately in the Makefiles.
4477
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
4478
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4479
case $enable_ltdl_convenience in
4480
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
4481
"") enable_ltdl_convenience=yes
4482
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
4484
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
4485
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4486
# For backwards non-gettext consistent compatibility...
4490
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
4491
# the libltdl installable library and LTDLINCL to the include flags for
4492
# the libltdl header and adds --enable-ltdl-install to the configure
4493
# arguments. Note that LIBLTDL and LTDLINCL are not AC_SUBSTed, nor is
4494
# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
4495
# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
4496
# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed
4497
# with '${top_srcdir}/' (note the single quotes!). If your package is
4498
# not flat and you're not using automake, define top_builddir and
4499
# top_srcdir appropriately in the Makefiles.
4500
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
4501
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
4502
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4503
AC_CHECK_LIB(ltdl, main,
4504
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
4505
[if test x"$enable_ltdl_install" = xno; then
4506
AC_MSG_WARN([libltdl not installed, but installation disabled])
4508
enable_ltdl_install=yes
4511
if test x"$enable_ltdl_install" = x"yes"; then
4512
ac_configure_args="$ac_configure_args --enable-ltdl-install"
4513
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
4514
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4516
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
4520
# For backwards non-gettext consistent compatibility...
4525
AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
4526
AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
4527
AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
4528
AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
4529
AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
4530
AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
4531
AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
4533
# This is just to silence aclocal about the macro not being used
4534
ifelse([AC_DISABLE_FAST_INSTALL])
4536
# NOTE: This macro has been submitted for inclusion into #
4537
# GNU Autoconf as AC_PROG_SED. When it is available in #
4538
# a released version of Autoconf we should remove this #
4539
# macro and use it instead. #
4542
# Check for a fully-functional sed program, that truncates
4543
# as few characters as possible. Prefer GNU sed if found.
4544
AC_DEFUN([LT_AC_PROG_SED],
4545
[AC_MSG_CHECKING([for a sed that does not truncate output])
4546
AC_CACHE_VAL(lt_cv_path_SED,
4547
[# Loop through the user's path and test for sed and gsed.
4548
# Then use that list of sed's as ones to test for truncation.
4549
as_executable_p="test -f"
4550
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4554
test -z "$as_dir" && as_dir=.
4555
for ac_prog in sed gsed; do
4556
for ac_exec_ext in '' $ac_executable_extensions; do
4557
if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
4558
_sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
4564
# Create a temporary directory, and hook for its removal unless debugging.
4567
trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
4568
trap '{ (exit 1); exit 1; }' 1 2 13 15
4571
# Create a (secure) tmp directory for tmp files.
4574
tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
4575
test -n "$tmp" && test -d "$tmp"
4578
tmp=$TMPDIR/sed$$-$RANDOM
4579
(umask 077 && mkdir $tmp)
4582
echo "$me: cannot create a temporary directory in $TMPDIR" >&2
4583
{ (exit 1); exit 1; }
4587
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
4588
# along with /bin/sed that truncates output.
4589
for _sed in $_sed_list /usr/xpg4/bin/sed; do
4590
test ! -f ${_sed} && break
4591
cat /dev/null > "$tmp/sed.in"
4593
echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
4594
# Check for GNU sed and select it if it is found.
4595
if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
4596
lt_cv_path_SED=${_sed}
4600
cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
4601
mv "$tmp/sed.tmp" "$tmp/sed.in"
4602
cp "$tmp/sed.in" "$tmp/sed.nl"
4603
echo >>"$tmp/sed.nl"
4604
${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
4605
cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
4606
# 40000 chars as input seems more than enough
4607
test $_count -gt 10 && break
4608
_count=`expr $_count + 1`
4609
if test $_count -gt $_max; then
4611
lt_cv_path_SED=$_sed
4617
if test "X$SED" != "X"; then
4622
AC_MSG_RESULT([$SED])
4625
# iconv.m4 serial AM4 (gettext-0.11.3)
4626
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
4627
dnl This file is free software, distributed under the terms of the GNU
4628
dnl General Public License. As a special exception to the GNU General
4629
dnl Public License, this file may be distributed as part of a program
4630
dnl that contains a configuration script generated by Autoconf, under
4631
dnl the same distribution terms as the rest of that program.
4633
dnl From Bruno Haible.
4635
AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
4637
dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
4638
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
4639
AC_REQUIRE([AC_LIB_RPATH])
4641
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
4643
AC_LIB_LINKFLAGS_BODY([iconv])
4646
AC_DEFUN([AM_ICONV_LINK],
4648
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
4649
dnl those with the standalone portable GNU libiconv installed).
4651
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
4653
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
4655
dnl Add $INCICONV to CPPFLAGS before performing the following checks,
4656
dnl because if the user has installed libiconv and not disabled its use
4657
dnl via --without-libiconv-prefix, he wants to use it. The first
4658
dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
4659
am_save_CPPFLAGS="$CPPFLAGS"
4660
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
4662
AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
4663
am_cv_func_iconv="no, consider installing GNU libiconv"
4665
AC_TRY_LINK([#include <stdlib.h>
4666
#include <iconv.h>],
4667
[iconv_t cd = iconv_open("","");
4668
iconv(cd,NULL,NULL,NULL,NULL);
4670
am_cv_func_iconv=yes)
4671
if test "$am_cv_func_iconv" != yes; then
4672
am_save_LIBS="$LIBS"
4673
LIBS="$LIBS $LIBICONV"
4674
AC_TRY_LINK([#include <stdlib.h>
4675
#include <iconv.h>],
4676
[iconv_t cd = iconv_open("","");
4677
iconv(cd,NULL,NULL,NULL,NULL);
4680
am_cv_func_iconv=yes)
4681
LIBS="$am_save_LIBS"
4684
if test "$am_cv_func_iconv" = yes; then
4685
AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
4687
if test "$am_cv_lib_iconv" = yes; then
4688
AC_MSG_CHECKING([how to link with libiconv])
4689
AC_MSG_RESULT([$LIBICONV])
4691
dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
4693
CPPFLAGS="$am_save_CPPFLAGS"
4698
AC_SUBST(LTLIBICONV)
4701
AC_DEFUN([AM_ICONV],
4704
if test "$am_cv_func_iconv" = yes; then
4705
AC_MSG_CHECKING([for iconv declaration])
4706
AC_CACHE_VAL(am_cv_proto_iconv, [
4714
#if defined(__STDC__) || defined(__cplusplus)
4715
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
4719
], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
4720
am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
4721
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
4722
AC_MSG_RESULT([$]{ac_t:-
4723
}[$]am_cv_proto_iconv)
4724
AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
4725
[Define as const if the declaration of iconv() needs const.])
4729
# lib-prefix.m4 serial 3 (gettext-0.12.2)
4730
dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
4731
dnl This file is free software, distributed under the terms of the GNU
4732
dnl General Public License. As a special exception to the GNU General
4733
dnl Public License, this file may be distributed as part of a program
4734
dnl that contains a configuration script generated by Autoconf, under
4735
dnl the same distribution terms as the rest of that program.
4737
dnl From Bruno Haible.
4739
dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
4740
dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
4741
dnl require excessive bracketing.
4742
ifdef([AC_HELP_STRING],
4743
[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
4744
[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
4746
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
4747
dnl to access previously installed libraries. The basic assumption is that
4748
dnl a user will want packages to use other packages he previously installed
4749
dnl with the same --prefix option.
4750
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
4751
dnl libraries, but is otherwise very convenient.
4752
AC_DEFUN([AC_LIB_PREFIX],
4754
AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
4755
AC_REQUIRE([AC_PROG_CC])
4756
AC_REQUIRE([AC_CANONICAL_HOST])
4757
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
4758
dnl By default, look in $includedir and $libdir.
4760
AC_LIB_WITH_FINAL_PREFIX([
4761
eval additional_includedir=\"$includedir\"
4762
eval additional_libdir=\"$libdir\"
4764
AC_LIB_ARG_WITH([lib-prefix],
4765
[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
4766
--without-lib-prefix don't search for libraries in includedir and libdir],
4768
if test "X$withval" = "Xno"; then
4771
if test "X$withval" = "X"; then
4772
AC_LIB_WITH_FINAL_PREFIX([
4773
eval additional_includedir=\"$includedir\"
4774
eval additional_libdir=\"$libdir\"
4777
additional_includedir="$withval/include"
4778
additional_libdir="$withval/lib"
4782
if test $use_additional = yes; then
4783
dnl Potentially add $additional_includedir to $CPPFLAGS.
4784
dnl But don't add it
4785
dnl 1. if it's the standard /usr/include,
4786
dnl 2. if it's already present in $CPPFLAGS,
4787
dnl 3. if it's /usr/local/include and we are using GCC on Linux,
4788
dnl 4. if it doesn't exist as a directory.
4789
if test "X$additional_includedir" != "X/usr/include"; then
4791
for x in $CPPFLAGS; do
4792
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
4793
if test "X$x" = "X-I$additional_includedir"; then
4798
if test -z "$haveit"; then
4799
if test "X$additional_includedir" = "X/usr/local/include"; then
4800
if test -n "$GCC"; then
4802
linux*) haveit=yes;;
4806
if test -z "$haveit"; then
4807
if test -d "$additional_includedir"; then
4808
dnl Really add $additional_includedir to $CPPFLAGS.
4809
CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
4814
dnl Potentially add $additional_libdir to $LDFLAGS.
4815
dnl But don't add it
4816
dnl 1. if it's the standard /usr/lib,
4817
dnl 2. if it's already present in $LDFLAGS,
4818
dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
4819
dnl 4. if it doesn't exist as a directory.
4820
if test "X$additional_libdir" != "X/usr/lib"; then
4822
for x in $LDFLAGS; do
4823
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
4824
if test "X$x" = "X-L$additional_libdir"; then
4829
if test -z "$haveit"; then
4830
if test "X$additional_libdir" = "X/usr/local/lib"; then
4831
if test -n "$GCC"; then
4833
linux*) haveit=yes;;
4837
if test -z "$haveit"; then
4838
if test -d "$additional_libdir"; then
4839
dnl Really add $additional_libdir to $LDFLAGS.
4840
LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
4848
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
4849
dnl acl_final_exec_prefix, containing the values to which $prefix and
4850
dnl $exec_prefix will expand at the end of the configure script.
4851
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
4853
dnl Unfortunately, prefix and exec_prefix get only finally determined
4854
dnl at the end of configure.
4855
if test "X$prefix" = "XNONE"; then
4856
acl_final_prefix="$ac_default_prefix"
4858
acl_final_prefix="$prefix"
4860
if test "X$exec_prefix" = "XNONE"; then
4861
acl_final_exec_prefix='${prefix}'
4863
acl_final_exec_prefix="$exec_prefix"
4865
acl_save_prefix="$prefix"
4866
prefix="$acl_final_prefix"
4867
eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
4868
prefix="$acl_save_prefix"
4871
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
4872
dnl variables prefix and exec_prefix bound to the values they will have
4873
dnl at the end of the configure script.
4874
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
4876
acl_save_prefix="$prefix"
4877
prefix="$acl_final_prefix"
4878
acl_save_exec_prefix="$exec_prefix"
4879
exec_prefix="$acl_final_exec_prefix"
4881
exec_prefix="$acl_save_exec_prefix"
4882
prefix="$acl_save_prefix"
4885
# lib-link.m4 serial 4 (gettext-0.12)
4886
dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
4887
dnl This file is free software, distributed under the terms of the GNU
4888
dnl General Public License. As a special exception to the GNU General
4889
dnl Public License, this file may be distributed as part of a program
4890
dnl that contains a configuration script generated by Autoconf, under
4891
dnl the same distribution terms as the rest of that program.
4893
dnl From Bruno Haible.
4895
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
4896
dnl the libraries corresponding to explicit and implicit dependencies.
4897
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
4898
dnl augments the CPPFLAGS variable.
4899
AC_DEFUN([AC_LIB_LINKFLAGS],
4901
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
4902
AC_REQUIRE([AC_LIB_RPATH])
4903
define([Name],[translit([$1],[./-], [___])])
4904
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
4905
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
4906
AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
4907
AC_LIB_LINKFLAGS_BODY([$1], [$2])
4908
ac_cv_lib[]Name[]_libs="$LIB[]NAME"
4909
ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
4910
ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
4912
LIB[]NAME="$ac_cv_lib[]Name[]_libs"
4913
LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
4914
INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
4915
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
4917
AC_SUBST([LTLIB]NAME)
4918
dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
4919
dnl results of this search when this library appears as a dependency.
4925
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
4926
dnl searches for libname and the libraries corresponding to explicit and
4927
dnl implicit dependencies, together with the specified include files and
4928
dnl the ability to compile and link the specified testcode. If found, it
4929
dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
4930
dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
4931
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
4932
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
4933
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
4935
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
4936
AC_REQUIRE([AC_LIB_RPATH])
4937
define([Name],[translit([$1],[./-], [___])])
4938
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
4939
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
4941
dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
4943
AC_LIB_LINKFLAGS_BODY([$1], [$2])
4945
dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
4946
dnl because if the user has installed lib[]Name and not disabled its use
4947
dnl via --without-lib[]Name-prefix, he wants to use it.
4948
ac_save_CPPFLAGS="$CPPFLAGS"
4949
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
4951
AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
4952
ac_save_LIBS="$LIBS"
4953
LIBS="$LIBS $LIB[]NAME"
4954
AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
4955
LIBS="$ac_save_LIBS"
4957
if test "$ac_cv_lib[]Name" = yes; then
4959
AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
4960
AC_MSG_CHECKING([how to link with lib[]$1])
4961
AC_MSG_RESULT([$LIB[]NAME])
4964
dnl If $LIB[]NAME didn't lead to a usable library, we don't need
4965
dnl $INC[]NAME either.
4966
CPPFLAGS="$ac_save_CPPFLAGS"
4970
AC_SUBST([HAVE_LIB]NAME)
4972
AC_SUBST([LTLIB]NAME)
4977
dnl Determine the platform dependent parameters needed to use rpath:
4978
dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
4979
dnl hardcode_direct, hardcode_minus_L.
4980
AC_DEFUN([AC_LIB_RPATH],
4982
AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
4983
AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
4984
AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
4985
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
4986
AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
4987
CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
4988
${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
4994
libext="$acl_cv_libext"
4995
shlibext="$acl_cv_shlibext"
4996
hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
4997
hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
4998
hardcode_direct="$acl_cv_hardcode_direct"
4999
hardcode_minus_L="$acl_cv_hardcode_minus_L"
5000
dnl Determine whether the user wants rpath handling at all.
5001
AC_ARG_ENABLE(rpath,
5002
[ --disable-rpath do not hardcode runtime library paths],
5003
:, enable_rpath=yes)
5006
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
5007
dnl the libraries corresponding to explicit and implicit dependencies.
5008
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
5009
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
5011
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
5012
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
5013
dnl By default, look in $includedir and $libdir.
5015
AC_LIB_WITH_FINAL_PREFIX([
5016
eval additional_includedir=\"$includedir\"
5017
eval additional_libdir=\"$libdir\"
5019
AC_LIB_ARG_WITH([lib$1-prefix],
5020
[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
5021
--without-lib$1-prefix don't search for lib$1 in includedir and libdir],
5023
if test "X$withval" = "Xno"; then
5026
if test "X$withval" = "X"; then
5027
AC_LIB_WITH_FINAL_PREFIX([
5028
eval additional_includedir=\"$includedir\"
5029
eval additional_libdir=\"$libdir\"
5032
additional_includedir="$withval/include"
5033
additional_libdir="$withval/lib"
5037
dnl Search the library and its dependencies in $additional_libdir and
5038
dnl $LDFLAGS. Using breadth-first-seach.
5044
names_already_handled=
5045
names_next_round='$1 $2'
5046
while test -n "$names_next_round"; do
5047
names_this_round="$names_next_round"
5049
for name in $names_this_round; do
5051
for n in $names_already_handled; do
5052
if test "$n" = "$name"; then
5057
if test -z "$already_handled"; then
5058
names_already_handled="$names_already_handled $name"
5059
dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
5060
dnl or AC_LIB_HAVE_LINKFLAGS call.
5061
uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
5062
eval value=\"\$HAVE_LIB$uppername\"
5063
if test -n "$value"; then
5064
if test "$value" = yes; then
5065
eval value=\"\$LIB$uppername\"
5066
test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
5067
eval value=\"\$LTLIB$uppername\"
5068
test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
5070
dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
5071
dnl that this library doesn't exist. So just drop it.
5075
dnl Search the library lib$name in $additional_libdir and $LDFLAGS
5076
dnl and the already constructed $LIBNAME/$LTLIBNAME.
5081
if test $use_additional = yes; then
5082
if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
5083
found_dir="$additional_libdir"
5084
found_so="$additional_libdir/lib$name.$shlibext"
5085
if test -f "$additional_libdir/lib$name.la"; then
5086
found_la="$additional_libdir/lib$name.la"
5089
if test -f "$additional_libdir/lib$name.$libext"; then
5090
found_dir="$additional_libdir"
5091
found_a="$additional_libdir/lib$name.$libext"
5092
if test -f "$additional_libdir/lib$name.la"; then
5093
found_la="$additional_libdir/lib$name.la"
5098
if test "X$found_dir" = "X"; then
5099
for x in $LDFLAGS $LTLIB[]NAME; do
5100
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
5103
dir=`echo "X$x" | sed -e 's/^X-L//'`
5104
if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
5106
found_so="$dir/lib$name.$shlibext"
5107
if test -f "$dir/lib$name.la"; then
5108
found_la="$dir/lib$name.la"
5111
if test -f "$dir/lib$name.$libext"; then
5113
found_a="$dir/lib$name.$libext"
5114
if test -f "$dir/lib$name.la"; then
5115
found_la="$dir/lib$name.la"
5121
if test "X$found_dir" != "X"; then
5126
if test "X$found_dir" != "X"; then
5127
dnl Found the library.
5128
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
5129
if test "X$found_so" != "X"; then
5130
dnl Linking with a shared library. We attempt to hardcode its
5131
dnl directory into the executable's runpath, unless it's the
5132
dnl standard /usr/lib.
5133
if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
5134
dnl No hardcoding is needed.
5135
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
5137
dnl Use an explicit option to hardcode DIR into the resulting
5139
dnl Potentially add DIR to ltrpathdirs.
5140
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
5142
for x in $ltrpathdirs; do
5143
if test "X$x" = "X$found_dir"; then
5148
if test -z "$haveit"; then
5149
ltrpathdirs="$ltrpathdirs $found_dir"
5151
dnl The hardcoding into $LIBNAME is system dependent.
5152
if test "$hardcode_direct" = yes; then
5153
dnl Using DIR/libNAME.so during linking hardcodes DIR into the
5154
dnl resulting binary.
5155
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
5157
if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
5158
dnl Use an explicit option to hardcode DIR into the resulting
5160
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
5161
dnl Potentially add DIR to rpathdirs.
5162
dnl The rpathdirs will be appended to $LIBNAME at the end.
5164
for x in $rpathdirs; do
5165
if test "X$x" = "X$found_dir"; then
5170
if test -z "$haveit"; then
5171
rpathdirs="$rpathdirs $found_dir"
5174
dnl Rely on "-L$found_dir".
5175
dnl But don't add it if it's already contained in the LDFLAGS
5176
dnl or the already constructed $LIBNAME
5178
for x in $LDFLAGS $LIB[]NAME; do
5179
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
5180
if test "X$x" = "X-L$found_dir"; then
5185
if test -z "$haveit"; then
5186
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
5188
if test "$hardcode_minus_L" != no; then
5189
dnl FIXME: Not sure whether we should use
5190
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
5192
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
5194
dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
5195
dnl here, because this doesn't fit in flags passed to the
5196
dnl compiler. So give up. No hardcoding. This affects only
5197
dnl very old systems.
5198
dnl FIXME: Not sure whether we should use
5199
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
5201
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
5207
if test "X$found_a" != "X"; then
5208
dnl Linking with a static library.
5209
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
5211
dnl We shouldn't come here, but anyway it's good to have a
5213
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
5216
dnl Assume the include files are nearby.
5217
additional_includedir=
5218
case "$found_dir" in
5220
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
5221
additional_includedir="$basedir/include"
5224
if test "X$additional_includedir" != "X"; then
5225
dnl Potentially add $additional_includedir to $INCNAME.
5226
dnl But don't add it
5227
dnl 1. if it's the standard /usr/include,
5228
dnl 2. if it's /usr/local/include and we are using GCC on Linux,
5229
dnl 3. if it's already present in $CPPFLAGS or the already
5230
dnl constructed $INCNAME,
5231
dnl 4. if it doesn't exist as a directory.
5232
if test "X$additional_includedir" != "X/usr/include"; then
5234
if test "X$additional_includedir" = "X/usr/local/include"; then
5235
if test -n "$GCC"; then
5237
linux*) haveit=yes;;
5241
if test -z "$haveit"; then
5242
for x in $CPPFLAGS $INC[]NAME; do
5243
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
5244
if test "X$x" = "X-I$additional_includedir"; then
5249
if test -z "$haveit"; then
5250
if test -d "$additional_includedir"; then
5251
dnl Really add $additional_includedir to $INCNAME.
5252
INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
5258
dnl Look for dependencies.
5259
if test -n "$found_la"; then
5260
dnl Read the .la file. It defines the variables
5261
dnl dlname, library_names, old_library, dependency_libs, current,
5262
dnl age, revision, installed, dlopen, dlpreopen, libdir.
5263
save_libdir="$libdir"
5265
*/* | *\\*) . "$found_la" ;;
5266
*) . "./$found_la" ;;
5268
libdir="$save_libdir"
5269
dnl We use only dependency_libs.
5270
for dep in $dependency_libs; do
5273
additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
5274
dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
5275
dnl But don't add it
5276
dnl 1. if it's the standard /usr/lib,
5277
dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
5278
dnl 3. if it's already present in $LDFLAGS or the already
5279
dnl constructed $LIBNAME,
5280
dnl 4. if it doesn't exist as a directory.
5281
if test "X$additional_libdir" != "X/usr/lib"; then
5283
if test "X$additional_libdir" = "X/usr/local/lib"; then
5284
if test -n "$GCC"; then
5286
linux*) haveit=yes;;
5290
if test -z "$haveit"; then
5292
for x in $LDFLAGS $LIB[]NAME; do
5293
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
5294
if test "X$x" = "X-L$additional_libdir"; then
5299
if test -z "$haveit"; then
5300
if test -d "$additional_libdir"; then
5301
dnl Really add $additional_libdir to $LIBNAME.
5302
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
5306
for x in $LDFLAGS $LTLIB[]NAME; do
5307
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
5308
if test "X$x" = "X-L$additional_libdir"; then
5313
if test -z "$haveit"; then
5314
if test -d "$additional_libdir"; then
5315
dnl Really add $additional_libdir to $LTLIBNAME.
5316
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
5323
dir=`echo "X$dep" | sed -e 's/^X-R//'`
5324
if test "$enable_rpath" != no; then
5325
dnl Potentially add DIR to rpathdirs.
5326
dnl The rpathdirs will be appended to $LIBNAME at the end.
5328
for x in $rpathdirs; do
5329
if test "X$x" = "X$dir"; then
5334
if test -z "$haveit"; then
5335
rpathdirs="$rpathdirs $dir"
5337
dnl Potentially add DIR to ltrpathdirs.
5338
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
5340
for x in $ltrpathdirs; do
5341
if test "X$x" = "X$dir"; then
5346
if test -z "$haveit"; then
5347
ltrpathdirs="$ltrpathdirs $dir"
5352
dnl Handle this in the next round.
5353
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
5356
dnl Handle this in the next round. Throw away the .la's
5357
dnl directory; it is already contained in a preceding -L
5359
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
5362
dnl Most likely an immediate library name.
5363
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
5364
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
5370
dnl Didn't find the library; assume it is in the system directories
5371
dnl known to the linker and runtime loader. (All the system
5372
dnl directories known to the linker should also be known to the
5373
dnl runtime loader, otherwise the system is severely misconfigured.)
5374
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
5375
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
5381
if test "X$rpathdirs" != "X"; then
5382
if test -n "$hardcode_libdir_separator"; then
5383
dnl Weird platform: only the last -rpath option counts, the user must
5384
dnl pass all path elements in one option. We can arrange that for a
5385
dnl single library, but not when more than one $LIBNAMEs are used.
5387
for found_dir in $rpathdirs; do
5388
alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
5390
dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
5391
acl_save_libdir="$libdir"
5393
eval flag=\"$hardcode_libdir_flag_spec\"
5394
libdir="$acl_save_libdir"
5395
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
5397
dnl The -rpath options are cumulative.
5398
for found_dir in $rpathdirs; do
5399
acl_save_libdir="$libdir"
5401
eval flag=\"$hardcode_libdir_flag_spec\"
5402
libdir="$acl_save_libdir"
5403
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
5407
if test "X$ltrpathdirs" != "X"; then
5408
dnl When using libtool, the option that works for both libraries and
5409
dnl executables is -R. The -R options are cumulative.
5410
for found_dir in $ltrpathdirs; do
5411
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
5416
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
5417
dnl unless already present in VAR.
5418
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
5419
dnl contains two or three consecutive elements that belong together.
5420
AC_DEFUN([AC_LIB_APPENDTOVAR],
5422
for element in [$2]; do
5425
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
5426
if test "X$x" = "X$element"; then
5431
if test -z "$haveit"; then
5432
[$1]="${[$1]}${[$1]:+ }$element"
5437
# lib-ld.m4 serial 2 (gettext-0.12)
5438
dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
5439
dnl This file is free software, distributed under the terms of the GNU
5440
dnl General Public License. As a special exception to the GNU General
5441
dnl Public License, this file may be distributed as part of a program
5442
dnl that contains a configuration script generated by Autoconf, under
5443
dnl the same distribution terms as the rest of that program.
5445
dnl Subroutines of libtool.m4,
5446
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
5447
dnl with libtool.m4.
5449
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
5450
AC_DEFUN([AC_LIB_PROG_LD_GNU],
5451
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
5452
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
5453
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
5454
acl_cv_prog_gnu_ld=yes
5456
acl_cv_prog_gnu_ld=no
5458
with_gnu_ld=$acl_cv_prog_gnu_ld
5461
dnl From libtool-1.4. Sets the variable LD.
5462
AC_DEFUN([AC_LIB_PROG_LD],
5463
[AC_ARG_WITH(gnu-ld,
5464
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
5465
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
5466
AC_REQUIRE([AC_PROG_CC])dnl
5467
AC_REQUIRE([AC_CANONICAL_HOST])dnl
5468
# Prepare PATH_SEPARATOR.
5469
# The user is always right.
5470
if test "${PATH_SEPARATOR+set}" != set; then
5471
echo "#! /bin/sh" >conf$$.sh
5472
echo "exit 0" >>conf$$.sh
5474
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
5482
if test "$GCC" = yes; then
5483
# Check if gcc -print-prog-name=ld gives a path.
5484
AC_MSG_CHECKING([for ld used by GCC])
5487
# gcc leaves a trailing carriage return which upsets mingw
5488
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
5490
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
5493
# Accept absolute paths.
5494
[[\\/]* | [A-Za-z]:[\\/]*)]
5495
[re_direlt='/[^/][^/]*/\.\./']
5496
# Canonicalize the path of ld
5497
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
5498
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
5499
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
5501
test -z "$LD" && LD="$ac_prog"
5504
# If it fails, then pretend we aren't using GCC.
5508
# If it is relative, then search for the first ld in PATH.
5512
elif test "$with_gnu_ld" = yes; then
5513
AC_MSG_CHECKING([for GNU ld])
5515
AC_MSG_CHECKING([for non-GNU ld])
5517
AC_CACHE_VAL(acl_cv_path_LD,
5518
[if test -z "$LD"; then
5519
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
5520
for ac_dir in $PATH; do
5521
test -z "$ac_dir" && ac_dir=.
5522
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
5523
acl_cv_path_LD="$ac_dir/$ac_prog"
5524
# Check to see if the program is GNU ld. I'd rather use --version,
5525
# but apparently some GNU ld's only accept -v.
5526
# Break only if it was the GNU/non-GNU ld that we prefer.
5527
if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
5528
test "$with_gnu_ld" != no && break
5530
test "$with_gnu_ld" != yes && break
5536
acl_cv_path_LD="$LD" # Let the user override the test with a path.
5538
LD="$acl_cv_path_LD"
5539
if test -n "$LD"; then
5544
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
5548
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
5549
# Copyright (C) 2001-2003 Red Hat, Inc.
5551
# This file is free software, distributed under the terms of the GNU
5552
# General Public License. As a special exception to the GNU General
5553
# Public License, this file may be distributed as part of a program
5554
# that contains a configuration script generated by Autoconf, under
5555
# the same distribution terms as the rest of that program.
5557
# This file can be copied and used freely without restrictions. It can
5558
# be used in projects which are not available under the GNU Public License
5559
# but which still want to provide support for the GNU gettext functionality.
5561
# Macro to add for using GNU gettext.
5562
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
5564
# Modified to never use included libintl.
5565
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
5567
# Major rework to remove unused code
5568
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
5570
# Added better handling of ALL_LINGUAS from GNU gettext version
5571
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
5574
# We need this here as well, since someone might use autoconf-2.5x
5575
# to configure GLib then an older version to configure a package
5576
# using AM_GLIB_GNU_GETTEXT
5580
dnl We go to great lengths to make sure that aclocal won't
5581
dnl try to pull in the installed version of these macros
5582
dnl when running aclocal in the glib directory.
5584
m4_copy([AC_DEFUN],[glib_DEFUN])
5585
m4_copy([AC_REQUIRE],[glib_REQUIRE])
5587
dnl At the end, if we're not within glib, we'll define the public
5588
dnl definitions in terms of our private definitions.
5592
#--------------------
5593
glib_DEFUN([GLIB_LC_MESSAGES],
5594
[AC_CHECK_HEADERS([locale.h])
5595
if test $ac_cv_header_locale_h = yes; then
5596
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
5597
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
5598
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
5599
if test $am_cv_val_LC_MESSAGES = yes; then
5600
AC_DEFINE(HAVE_LC_MESSAGES, 1,
5601
[Define if your <locale.h> file defines LC_MESSAGES.])
5605
# GLIB_PATH_PROG_WITH_TEST
5606
#----------------------------
5607
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
5608
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
5609
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
5610
[# Extract the first word of "$2", so it can be a program name with args.
5611
set dummy $2; ac_word=[$]2
5612
AC_MSG_CHECKING([for $ac_word])
5613
AC_CACHE_VAL(ac_cv_path_$1,
5616
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
5619
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5620
for ac_dir in ifelse([$5], , $PATH, [$5]); do
5621
test -z "$ac_dir" && ac_dir=.
5622
if test -f $ac_dir/$ac_word; then
5624
ac_cv_path_$1="$ac_dir/$ac_word"
5630
dnl If no 4th arg is given, leave the cache variable unset,
5631
dnl so AC_PATH_PROGS will keep looking.
5632
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
5637
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
5638
AC_MSG_RESULT([$]$1)
5647
glib_DEFUN([GLIB_WITH_NLS],
5648
dnl NLS is obligatory
5652
gt_cv_have_gettext=no
5658
AC_CHECK_HEADER(libintl.h,
5659
[gt_cv_func_dgettext_libintl="no"
5660
libintl_extra_libs=""
5663
# First check in libc
5665
AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
5667
#include <libintl.h>
5669
[return (int) dgettext ("","")],
5670
gt_cv_func_dgettext_libc=yes,
5671
gt_cv_func_dgettext_libc=no)
5674
if test "$gt_cv_func_dgettext_libc" = "yes" ; then
5675
AC_CHECK_FUNCS(bind_textdomain_codeset)
5679
# If we don't have everything we want, check in libintl
5681
if test "$gt_cv_func_dgettext_libc" != "yes" \
5682
|| test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
5684
AC_CHECK_LIB(intl, bindtextdomain,
5685
[AC_CHECK_LIB(intl, dgettext,
5686
gt_cv_func_dgettext_libintl=yes)])
5688
if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
5689
AC_MSG_CHECKING([if -liconv is needed to use gettext])
5691
AC_CHECK_LIB(intl, dcgettext,
5692
[gt_cv_func_dgettext_libintl=yes
5693
libintl_extra_libs=-liconv],
5698
# If we found libintl, then check in it for bind_textdomain_codeset();
5699
# we'll prefer libc if neither have bind_textdomain_codeset(),
5700
# and both have dgettext
5702
if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
5703
glib_save_LIBS="$LIBS"
5704
LIBS="$LIBS -lintl $libintl_extra_libs"
5705
unset ac_cv_func_bind_textdomain_codeset
5706
AC_CHECK_FUNCS(bind_textdomain_codeset)
5707
LIBS="$glib_save_LIBS"
5709
if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
5710
gt_cv_func_dgettext_libc=no
5712
if test "$gt_cv_func_dgettext_libc" = "yes"; then
5713
gt_cv_func_dgettext_libintl=no
5719
if test "$gt_cv_func_dgettext_libc" = "yes" \
5720
|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
5721
gt_cv_have_gettext=yes
5724
if test "$gt_cv_func_dgettext_libintl" = "yes"; then
5725
INTLLIBS="-lintl $libintl_extra_libs"
5728
if test "$gt_cv_have_gettext" = "yes"; then
5729
AC_DEFINE(HAVE_GETTEXT,1,
5730
[Define if the GNU gettext() function is already present or preinstalled.])
5731
GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
5732
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
5733
if test "$MSGFMT" != "no"; then
5734
glib_save_LIBS="$LIBS"
5735
LIBS="$LIBS $INTLLIBS"
5736
AC_CHECK_FUNCS(dcgettext)
5737
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
5738
GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
5739
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
5740
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
5741
return _nl_msg_cat_cntr],
5746
dnl On Solaris, if bind_textdomain_codeset is in libc,
5747
dnl GNU format message catalog is always supported,
5748
dnl since both are added to the libc all together.
5749
dnl Hence, we'd like to go with DATADIRNAME=share and
5750
dnl and CATOBJEXT=.gmo in this case.
5751
AC_CHECK_FUNC(bind_textdomain_codeset,
5762
LIBS="$glib_save_LIBS"
5765
gt_cv_have_gettext=no
5770
if test "$gt_cv_have_gettext" = "yes" ; then
5771
AC_DEFINE(ENABLE_NLS, 1,
5772
[always defined to indicate that i18n is enabled])
5775
dnl Test whether we really found GNU xgettext.
5776
if test "$XGETTEXT" != ":"; then
5777
dnl If it is not GNU xgettext we define it as : so that the
5778
dnl Makefiles still can work.
5779
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
5783
[found xgettext program is not GNU xgettext; ignore it])
5788
# We need to process the po/ directory.
5792
[case "$CONFIG_FILES" in *po/Makefile.in*)
5793
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
5796
dnl These rules are solely for the distribution goal. While doing this
5797
dnl we only have to keep exactly one list of the available catalogs
5798
dnl in configure.in.
5799
for lang in $ALL_LINGUAS; do
5800
GMOFILES="$GMOFILES $lang.gmo"
5801
POFILES="$POFILES $lang.po"
5804
dnl Make all variables we use known to autoconf.
5807
AC_SUBST(DATADIRNAME)
5809
AC_SUBST(INSTOBJEXT)
5811
AC_SUBST(PO_IN_DATADIR_TRUE)
5812
AC_SUBST(PO_IN_DATADIR_FALSE)
5817
# AM_GLIB_GNU_GETTEXT
5818
# -------------------
5819
# Do checks necessary for use of gettext. If a suitable implementation
5820
# of gettext is found in either in libintl or in the C library,
5821
# it will set INTLLIBS to the libraries needed for use of gettext
5822
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
5823
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
5824
# on various variables needed by the Makefile.in.in installed by
5827
glib_DEFUN([GLIB_GNU_GETTEXT],
5828
[AC_REQUIRE([AC_PROG_CC])dnl
5829
AC_REQUIRE([AC_HEADER_STDC])dnl
5834
if test "$gt_cv_have_gettext" = "yes"; then
5835
if test "x$ALL_LINGUAS" = "x"; then
5838
AC_MSG_CHECKING(for catalogs to be installed)
5840
for presentlang in $ALL_LINGUAS; do
5842
if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
5843
desiredlanguages="$LINGUAS"
5845
desiredlanguages="$ALL_LINGUAS"
5847
for desiredlang in $desiredlanguages; do
5848
# Use the presentlang catalog if desiredlang is
5849
# a. equal to presentlang, or
5850
# b. a variant of presentlang (because in this case,
5851
# presentlang can be used as a fallback for messages
5852
# which are not translated in the desiredlang catalog).
5853
case "$desiredlang" in
5854
"$presentlang"*) useit=yes;;
5857
if test $useit = yes; then
5858
NEW_LINGUAS="$NEW_LINGUAS $presentlang"
5861
LINGUAS=$NEW_LINGUAS
5862
AC_MSG_RESULT($LINGUAS)
5865
dnl Construct list of names of catalog files to be constructed.
5866
if test -n "$LINGUAS"; then
5867
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
5871
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
5872
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
5873
dnl Try to locate is.
5875
if test -n "$ac_aux_dir"; then
5876
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
5878
if test -z "$MKINSTALLDIRS"; then
5879
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
5881
AC_SUBST(MKINSTALLDIRS)
5883
dnl Generate list of files to be processed by xgettext which will
5884
dnl be included in po/Makefile.
5885
test -d po || mkdir po
5886
if test "x$srcdir" != "x."; then
5887
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
5888
posrcprefix="$srcdir/"
5890
posrcprefix="../$srcdir/"
5896
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
5897
< $srcdir/po/POTFILES.in > po/POTFILES
5900
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
5901
# -------------------------------
5902
# Define VARIABLE to the location where catalog files will
5903
# be installed by po/Makefile.
5904
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
5905
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
5906
glib_save_prefix="$prefix"
5907
glib_save_exec_prefix="$exec_prefix"
5908
test "x$prefix" = xNONE && prefix=$ac_default_prefix
5909
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
5910
if test "x$CATOBJEXT" = "x.mo" ; then
5911
localedir=`eval echo "${libdir}/locale"`
5913
localedir=`eval echo "${datadir}/locale"`
5915
prefix="$glib_save_prefix"
5916
exec_prefix="$glib_save_exec_prefix"
5917
AC_DEFINE_UNQUOTED($1, "$localedir",
5918
[Define the location where the catalogs will be installed])
5922
dnl Now the definitions that aclocal will find
5924
ifdef(glib_configure_in,[],[
5925
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
5926
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
5930
dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
5931
dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
5932
dnl also defines GSTUFF_PKG_ERRORS on error
5933
AC_DEFUN(PKG_CHECK_MODULES, [
5936
if test -z "$PKG_CONFIG"; then
5937
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
5940
if test "$PKG_CONFIG" = "no" ; then
5941
echo "*** The pkg-config script could not be found. Make sure it is"
5942
echo "*** in your path, or set the PKG_CONFIG environment variable"
5943
echo "*** to the full path to pkg-config."
5944
echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
5946
PKG_CONFIG_MIN_VERSION=0.9.0
5947
if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5948
AC_MSG_CHECKING(for $2)
5950
if $PKG_CONFIG --exists "$2" ; then
5954
AC_MSG_CHECKING($1_CFLAGS)
5955
$1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
5956
AC_MSG_RESULT($$1_CFLAGS)
5958
AC_MSG_CHECKING($1_LIBS)
5959
$1_LIBS=`$PKG_CONFIG --libs "$2"`
5960
AC_MSG_RESULT($$1_LIBS)
5964
## If we have a custom action on failure, don't print errors, but
5965
## do set a variable so people can do so.
5966
$1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
5967
ifelse([$4], ,echo $$1_PKG_ERRORS,)
5973
echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
5974
echo "*** See http://www.freedesktop.org/software/pkgconfig"
5978
if test $succeeded = yes; then
5979
ifelse([$3], , :, [$3])
5981
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])