1
# generated automatically by aclocal 1.7.3 -*- 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 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
39
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
40
# written in clear, in which case automake, when reading aclocal.m4,
41
# will think it sees a *use*, and therefore will trigger all it's
42
# C support machinery. Also note that it means that autoscan, seeing
43
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
48
# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
49
# the ones we care about.
50
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
52
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
53
# AM_INIT_AUTOMAKE([OPTIONS])
54
# -----------------------------------------------
55
# The call with PACKAGE and VERSION arguments is the old style
56
# call (pre autoconf-2.50), which is being phased out. PACKAGE
57
# and VERSION should now be passed to AC_INIT and removed from
58
# the call to AM_INIT_AUTOMAKE.
59
# We support both call styles for the transition. After
60
# the next Automake release, Autoconf can make the AC_INIT
61
# arguments mandatory, and then we can depend on a new Autoconf
62
# release and drop the old call support.
63
AC_DEFUN([AM_INIT_AUTOMAKE],
64
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
65
AC_REQUIRE([AC_PROG_INSTALL])dnl
66
# test to see if srcdir already configured
67
if test "`cd $srcdir && pwd`" != "`pwd`" &&
68
test -f $srcdir/config.status; then
69
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
72
# test whether we have cygpath
73
if test -z "$CYGPATH_W"; then
74
if (cygpath --version) >/dev/null 2>/dev/null; then
75
CYGPATH_W='cygpath -w'
82
# Define the identity of the package.
83
dnl Distinguish between old-style and new-style calls.
85
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
86
AC_SUBST([PACKAGE], [$1])dnl
87
AC_SUBST([VERSION], [$2])],
88
[_AM_SET_OPTIONS([$1])dnl
89
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
90
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
92
_AM_IF_OPTION([no-define],,
93
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
94
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
96
# Some tools Automake needs.
97
AC_REQUIRE([AM_SANITY_CHECK])dnl
98
AC_REQUIRE([AC_ARG_PROGRAM])dnl
99
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
100
AM_MISSING_PROG(AUTOCONF, autoconf)
101
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
102
AM_MISSING_PROG(AUTOHEADER, autoheader)
103
AM_MISSING_PROG(MAKEINFO, makeinfo)
104
AM_MISSING_PROG(AMTAR, tar)
106
AM_PROG_INSTALL_STRIP
107
# We need awk for the "check" target. The system "awk" is bad on
109
AC_REQUIRE([AC_PROG_AWK])dnl
110
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
111
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
113
_AM_IF_OPTION([no-dependencies],,
114
[AC_PROVIDE_IFELSE([AC_PROG_CC],
115
[_AM_DEPENDENCIES(CC)],
116
[define([AC_PROG_CC],
117
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
118
AC_PROVIDE_IFELSE([AC_PROG_CXX],
119
[_AM_DEPENDENCIES(CXX)],
120
[define([AC_PROG_CXX],
121
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
126
# When config.status generates a header, we must update the stamp-h file.
127
# This file resides in the same directory as the config header
128
# that is generated. The stamp files are numbered to have different names.
130
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
131
# loop where config.status creates the headers, so we can generate
132
# our stamp files there.
133
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
134
[# Compute $1's index in $config_headers.
136
for _am_header in $config_headers :; do
141
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
144
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
146
# Copyright 2002 Free Software Foundation, Inc.
148
# This program is free software; you can redistribute it and/or modify
149
# it under the terms of the GNU General Public License as published by
150
# the Free Software Foundation; either version 2, or (at your option)
153
# This program is distributed in the hope that it will be useful,
154
# but WITHOUT ANY WARRANTY; without even the implied warranty of
155
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
156
# GNU General Public License for more details.
158
# You should have received a copy of the GNU General Public License
159
# along with this program; if not, write to the Free Software
160
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
162
# AM_AUTOMAKE_VERSION(VERSION)
163
# ----------------------------
164
# Automake X.Y traces this macro to ensure aclocal.m4 has been
165
# generated from the m4 files accompanying Automake X.Y.
166
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
168
# AM_SET_CURRENT_AUTOMAKE_VERSION
169
# -------------------------------
170
# Call AM_AUTOMAKE_VERSION so it can be traced.
171
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
172
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
173
[AM_AUTOMAKE_VERSION([1.7.3])])
175
# Helper functions for option handling. -*- Autoconf -*-
177
# Copyright 2001, 2002 Free Software Foundation, Inc.
179
# This program is free software; you can redistribute it and/or modify
180
# it under the terms of the GNU General Public License as published by
181
# the Free Software Foundation; either version 2, or (at your option)
184
# This program is distributed in the hope that it will be useful,
185
# but WITHOUT ANY WARRANTY; without even the implied warranty of
186
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
187
# GNU General Public License for more details.
189
# You should have received a copy of the GNU General Public License
190
# along with this program; if not, write to the Free Software
191
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
196
# _AM_MANGLE_OPTION(NAME)
197
# -----------------------
198
AC_DEFUN([_AM_MANGLE_OPTION],
199
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
201
# _AM_SET_OPTION(NAME)
202
# ------------------------------
203
# Set option NAME. Presently that only means defining a flag for this option.
204
AC_DEFUN([_AM_SET_OPTION],
205
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
207
# _AM_SET_OPTIONS(OPTIONS)
208
# ----------------------------------
209
# OPTIONS is a space-separated list of Automake options.
210
AC_DEFUN([_AM_SET_OPTIONS],
211
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
213
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
214
# -------------------------------------------
215
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
216
AC_DEFUN([_AM_IF_OPTION],
217
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
220
# Check to make sure that the build environment is sane.
223
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
225
# This program is free software; you can redistribute it and/or modify
226
# it under the terms of the GNU General Public License as published by
227
# the Free Software Foundation; either version 2, or (at your option)
230
# This program is distributed in the hope that it will be useful,
231
# but WITHOUT ANY WARRANTY; without even the implied warranty of
232
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
233
# GNU General Public License for more details.
235
# You should have received a copy of the GNU General Public License
236
# along with this program; if not, write to the Free Software
237
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
244
AC_DEFUN([AM_SANITY_CHECK],
245
[AC_MSG_CHECKING([whether build environment is sane])
248
echo timestamp > conftest.file
249
# Do `set' in a subshell so we don't clobber the current shell's
250
# arguments. Must try -L first in case configure is actually a
251
# symlink; some systems play weird games with the mod time of symlinks
252
# (eg FreeBSD returns the mod time of the symlink's containing
255
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
256
if test "$[*]" = "X"; then
258
set X `ls -t $srcdir/configure conftest.file`
261
if test "$[*]" != "X $srcdir/configure conftest.file" \
262
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
264
# If neither matched, then we have a broken ls. This can happen
265
# if, for instance, CONFIG_SHELL is bash and it inherits a
266
# broken ls alias from the environment. This has actually
267
# happened. Such a system could not be considered "sane".
268
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
269
alias in your environment])
272
test "$[2]" = conftest.file
278
AC_MSG_ERROR([newly created file is older than distributed files!
279
Check your system clock])
286
# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
288
# This program is free software; you can redistribute it and/or modify
289
# it under the terms of the GNU General Public License as published by
290
# the Free Software Foundation; either version 2, or (at your option)
293
# This program is distributed in the hope that it will be useful,
294
# but WITHOUT ANY WARRANTY; without even the implied warranty of
295
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
296
# GNU General Public License for more details.
298
# You should have received a copy of the GNU General Public License
299
# along with this program; if not, write to the Free Software
300
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
305
# AM_MISSING_PROG(NAME, PROGRAM)
306
# ------------------------------
307
AC_DEFUN([AM_MISSING_PROG],
308
[AC_REQUIRE([AM_MISSING_HAS_RUN])
309
$1=${$1-"${am_missing_run}$2"}
315
# Define MISSING if not defined so far and test if it supports --run.
316
# If it does, set am_missing_run to use it, otherwise, to nothing.
317
AC_DEFUN([AM_MISSING_HAS_RUN],
318
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
319
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
320
# Use eval to expand $SHELL
321
if eval "$MISSING --run true"; then
322
am_missing_run="$MISSING --run "
325
AC_MSG_WARN([`missing' script is too old or missing])
331
# Copyright 2001 Free Software Foundation, Inc.
333
# This program is free software; you can redistribute it and/or modify
334
# it under the terms of the GNU General Public License as published by
335
# the Free Software Foundation; either version 2, or (at your option)
338
# This program is distributed in the hope that it will be useful,
339
# but WITHOUT ANY WARRANTY; without even the implied warranty of
340
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
341
# GNU General Public License for more details.
343
# You should have received a copy of the GNU General Public License
344
# along with this program; if not, write to the Free Software
345
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
348
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
349
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
350
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
352
# Of course, Automake must honor this variable whenever it calls a
353
# tool from the auxiliary directory. The problem is that $srcdir (and
354
# therefore $ac_aux_dir as well) can be either absolute or relative,
355
# depending on how configure is run. This is pretty annoying, since
356
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
357
# source directory, any form will work fine, but in subdirectories a
358
# relative path needs to be adjusted first.
360
# $ac_aux_dir/missing
361
# fails when called from a subdirectory if $ac_aux_dir is relative
362
# $top_srcdir/$ac_aux_dir/missing
363
# fails if $ac_aux_dir is absolute,
364
# fails when called from a subdirectory in a VPATH build with
365
# a relative $ac_aux_dir
367
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
368
# are both prefixed by $srcdir. In an in-source build this is usually
369
# harmless because $srcdir is `.', but things will broke when you
370
# start a VPATH build or use an absolute $srcdir.
372
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
373
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
374
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
375
# and then we would define $MISSING as
376
# MISSING="\${SHELL} $am_aux_dir/missing"
377
# This will work as long as MISSING is not called from configure, because
378
# unfortunately $(top_srcdir) has no meaning in configure.
379
# However there are other variables, like CC, which are often used in
380
# configure, and could therefore not use this "fixed" $ac_aux_dir.
382
# Another solution, used here, is to always expand $ac_aux_dir to an
383
# absolute PATH. The drawback is that using absolute paths prevent a
384
# configured tree to be moved without reconfiguration.
386
# Rely on autoconf to set up CDPATH properly.
389
AC_DEFUN([AM_AUX_DIR_EXPAND], [
390
# expand $ac_aux_dir to an absolute path
391
am_aux_dir=`cd $ac_aux_dir && pwd`
396
# Define $install_sh.
398
# Copyright 2001 Free Software Foundation, Inc.
400
# This program is free software; you can redistribute it and/or modify
401
# it under the terms of the GNU General Public License as published by
402
# the Free Software Foundation; either version 2, or (at your option)
405
# This program is distributed in the hope that it will be useful,
406
# but WITHOUT ANY WARRANTY; without even the implied warranty of
407
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
408
# GNU General Public License for more details.
410
# You should have received a copy of the GNU General Public License
411
# along with this program; if not, write to the Free Software
412
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
415
AC_DEFUN([AM_PROG_INSTALL_SH],
416
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
417
install_sh=${install_sh-"$am_aux_dir/install-sh"}
418
AC_SUBST(install_sh)])
420
# AM_PROG_INSTALL_STRIP
422
# Copyright 2001 Free Software Foundation, Inc.
424
# This program is free software; you can redistribute it and/or modify
425
# it under the terms of the GNU General Public License as published by
426
# the Free Software Foundation; either version 2, or (at your option)
429
# This program is distributed in the hope that it will be useful,
430
# but WITHOUT ANY WARRANTY; without even the implied warranty of
431
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
432
# GNU General Public License for more details.
434
# You should have received a copy of the GNU General Public License
435
# along with this program; if not, write to the Free Software
436
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
439
# One issue with vendor `install' (even GNU) is that you can't
440
# specify the program used to strip binaries. This is especially
441
# annoying in cross-compiling environments, where the build's strip
442
# is unlikely to handle the host's binaries.
443
# Fortunately install-sh will honor a STRIPPROG variable, so we
444
# always use install-sh in `make install-strip', and initialize
445
# STRIPPROG with the value of the STRIP variable (set by the user).
446
AC_DEFUN([AM_PROG_INSTALL_STRIP],
447
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
448
# Installed binaries are usually stripped using `strip' when the user
449
# run `make install-strip'. However `strip' might not be the right
450
# tool to use in cross-compilation environments, therefore Automake
451
# will honor the `STRIP' environment variable to overrule this program.
452
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
453
if test "$cross_compiling" != no; then
454
AC_CHECK_TOOL([STRIP], [strip], :)
456
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
457
AC_SUBST([INSTALL_STRIP_PROGRAM])])
460
# Copyright (C) 2003 Free Software Foundation, Inc.
462
# This program is free software; you can redistribute it and/or modify
463
# it under the terms of the GNU General Public License as published by
464
# the Free Software Foundation; either version 2, or (at your option)
467
# This program is distributed in the hope that it will be useful,
468
# but WITHOUT ANY WARRANTY; without even the implied warranty of
469
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
470
# GNU General Public License for more details.
472
# You should have received a copy of the GNU General Public License
473
# along with this program; if not, write to the Free Software
474
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
479
# Check whether the underlying file-system supports filenames
480
# with a leading dot. For instance MS-DOS doesn't.
481
AC_DEFUN([AM_SET_LEADING_DOT],
482
[rm -rf .tst 2>/dev/null
483
mkdir .tst 2>/dev/null
484
if test -d .tst; then
489
rmdir .tst 2>/dev/null
490
AC_SUBST([am__leading_dot])])
492
# serial 5 -*- Autoconf -*-
494
# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
496
# This program is free software; you can redistribute it and/or modify
497
# it under the terms of the GNU General Public License as published by
498
# the Free Software Foundation; either version 2, or (at your option)
501
# This program is distributed in the hope that it will be useful,
502
# but WITHOUT ANY WARRANTY; without even the implied warranty of
503
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
504
# GNU General Public License for more details.
506
# You should have received a copy of the GNU General Public License
507
# along with this program; if not, write to the Free Software
508
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
512
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
513
# written in clear, in which case automake, when reading aclocal.m4,
514
# will think it sees a *use*, and therefore will trigger all it's
515
# C support machinery. Also note that it means that autoscan, seeing
516
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
520
# _AM_DEPENDENCIES(NAME)
521
# ----------------------
522
# See how the compiler implements dependency checking.
523
# NAME is "CC", "CXX", "GCJ", or "OBJC".
524
# We try a few techniques and use that to set a single cache variable.
526
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
527
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
528
# dependency, and given that the user is not expected to run this macro,
529
# just rely on AC_PROG_CC.
530
AC_DEFUN([_AM_DEPENDENCIES],
531
[AC_REQUIRE([AM_SET_DEPDIR])dnl
532
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
533
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
534
AC_REQUIRE([AM_DEP_TRACK])dnl
536
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
537
[$1], CXX, [depcc="$CXX" am_compiler_list=],
538
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
539
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
540
[depcc="$$1" am_compiler_list=])
542
AC_CACHE_CHECK([dependency style of $depcc],
543
[am_cv_$1_dependencies_compiler_type],
544
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
545
# We make a subdir and do the tests there. Otherwise we can end up
546
# making bogus files that we don't know about and never remove. For
547
# instance it was reported that on HP-UX the gcc test will end up
548
# making a dummy file named `D' -- because `-MD' means `put the output
551
# Copy depcomp to subdir because otherwise we won't find it if we're
552
# using a relative directory.
553
cp "$am_depcomp" conftest.dir
556
am_cv_$1_dependencies_compiler_type=none
557
if test "$am_compiler_list" = ""; then
558
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
560
for depmode in $am_compiler_list; do
561
# We need to recreate these files for each test, as the compiler may
562
# overwrite some of them when testing with obscure command lines.
563
# This happens at least with the AIX C compiler.
564
echo '#include "conftest.h"' > conftest.c
565
echo 'int i;' > conftest.h
566
echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
570
# after this tag, mechanisms are not by side-effect, so they'll
571
# only be used when explicitly requested
572
if test "x$enable_dependency_tracking" = xyes; then
580
# We check with `-c' and `-o' for the sake of the "dashmstdout"
581
# mode. It turns out that the SunPro C++ compiler does not properly
582
# handle `-M -o', and we need to detect this.
583
if depmode=$depmode \
584
source=conftest.c object=conftest.o \
585
depfile=conftest.Po tmpdepfile=conftest.TPo \
586
$SHELL ./depcomp $depcc -c -o conftest.o conftest.c \
587
>/dev/null 2>conftest.err &&
588
grep conftest.h conftest.Po > /dev/null 2>&1 &&
589
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
590
# icc doesn't choke on unknown options, it will just issue warnings
591
# (even with -Werror). So we grep stderr for any message
592
# that says an option was ignored.
593
if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
594
am_cv_$1_dependencies_compiler_type=$depmode
603
am_cv_$1_dependencies_compiler_type=none
606
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
607
AM_CONDITIONAL([am__fastdep$1], [
608
test "x$enable_dependency_tracking" != xno \
609
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
615
# Choose a directory name for dependency files.
616
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
617
AC_DEFUN([AM_SET_DEPDIR],
618
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
619
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
625
AC_DEFUN([AM_DEP_TRACK],
626
[AC_ARG_ENABLE(dependency-tracking,
627
[ --disable-dependency-tracking Speeds up one-time builds
628
--enable-dependency-tracking Do not reject slow dependency extractors])
629
if test "x$enable_dependency_tracking" != xno; then
630
am_depcomp="$ac_aux_dir/depcomp"
633
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
634
AC_SUBST([AMDEPBACKSLASH])
637
# Generate code to set up dependency tracking. -*- Autoconf -*-
639
# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
641
# This program is free software; you can redistribute it and/or modify
642
# it under the terms of the GNU General Public License as published by
643
# the Free Software Foundation; either version 2, or (at your option)
646
# This program is distributed in the hope that it will be useful,
647
# but WITHOUT ANY WARRANTY; without even the implied warranty of
648
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
649
# GNU General Public License for more details.
651
# You should have received a copy of the GNU General Public License
652
# along with this program; if not, write to the Free Software
653
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
658
# _AM_OUTPUT_DEPENDENCY_COMMANDS
659
# ------------------------------
660
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
661
[for mf in $CONFIG_FILES; do
662
# Strip MF so we end up with the name of the file.
663
mf=`echo "$mf" | sed -e 's/:.*$//'`
664
# Check whether this is an Automake generated Makefile or not.
665
# We used to match only the files named `Makefile.in', but
666
# some people rename them; so instead we look at the file content.
667
# Grep'ing the first line is not enough: some people post-process
668
# each Makefile.in and add a new line on top of each file to say so.
669
# So let's grep whole file.
670
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
671
dirpart=`AS_DIRNAME("$mf")`
675
grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
676
# Extract the definition of DEP_FILES from the Makefile without
678
DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
679
test -z "$DEPDIR" && continue
680
# When using ansi2knr, U may be empty or an underscore; expand it
681
U=`sed -n -e '/^U = / s///p' < "$mf"`
682
test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
683
# We invoke sed twice because it is the simplest approach to
684
# changing $(DEPDIR) to its actual value in the expansion.
685
for file in `sed -n -e '
686
/^DEP_FILES = .*\\\\$/ {
695
/^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
696
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
697
# Make sure the directory exists.
698
test -f "$dirpart/$file" && continue
699
fdir=`AS_DIRNAME(["$file"])`
700
AS_MKDIR_P([$dirpart/$fdir])
701
# echo "creating $dirpart/$file"
702
echo '# dummy' > "$dirpart/$file"
705
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
708
# AM_OUTPUT_DEPENDENCY_COMMANDS
709
# -----------------------------
710
# This macro should only be invoked once -- use via AC_REQUIRE.
712
# This code is only required when automatic dependency tracking
713
# is enabled. FIXME. This creates each `.P' file that we will
714
# need in order to bootstrap the dependency handling code.
715
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
716
[AC_CONFIG_COMMANDS([depfiles],
717
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
718
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
721
# Check to see how 'make' treats includes. -*- Autoconf -*-
723
# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
725
# This program is free software; you can redistribute it and/or modify
726
# it under the terms of the GNU General Public License as published by
727
# the Free Software Foundation; either version 2, or (at your option)
730
# This program is distributed in the hope that it will be useful,
731
# but WITHOUT ANY WARRANTY; without even the implied warranty of
732
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
733
# GNU General Public License for more details.
735
# You should have received a copy of the GNU General Public License
736
# along with this program; if not, write to the Free Software
737
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
744
# Check to see how make treats includes.
745
AC_DEFUN([AM_MAKE_INCLUDE],
746
[am_make=${MAKE-make}
747
cat > confinc << 'END'
751
# If we don't find an include directive, just comment out the code.
752
AC_MSG_CHECKING([for style of include used by $am_make])
756
# First try GNU make style include.
757
echo "include confinc" > confmf
758
# We grep out `Entering directory' and `Leaving directory'
759
# messages which can occur if `w' ends up in MAKEFLAGS.
760
# In particular we don't look at `^make:' because GNU make might
761
# be invoked under some other name (usually "gmake"), in which
762
# case it prints its new name instead of `make'.
763
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
768
# Now try BSD make style include.
769
if test "$am__include" = "#"; then
770
echo '.include "confinc"' > confmf
771
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
777
AC_SUBST(am__include)
779
AC_MSG_RESULT($_am_result)
783
# AM_CONDITIONAL -*- Autoconf -*-
785
# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
787
# This program is free software; you can redistribute it and/or modify
788
# it under the terms of the GNU General Public License as published by
789
# the Free Software Foundation; either version 2, or (at your option)
792
# This program is distributed in the hope that it will be useful,
793
# but WITHOUT ANY WARRANTY; without even the implied warranty of
794
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
795
# GNU General Public License for more details.
797
# You should have received a copy of the GNU General Public License
798
# along with this program; if not, write to the Free Software
799
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
806
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
807
# -------------------------------------
808
# Define a conditional.
809
AC_DEFUN([AM_CONDITIONAL],
810
[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
811
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
821
AC_CONFIG_COMMANDS_PRE(
822
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
823
AC_MSG_ERROR([conditional "$1" was never defined.
824
Usually this means the macro was only invoked conditionally.])
827
# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
829
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
831
# This program is free software; you can redistribute it and/or modify
832
# it under the terms of the GNU General Public License as published by
833
# the Free Software Foundation; either version 2, or (at your option)
836
# This program is distributed in the hope that it will be useful,
837
# but WITHOUT ANY WARRANTY; without even the implied warranty of
838
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
839
# GNU General Public License for more details.
841
# You should have received a copy of the GNU General Public License
842
# along with this program; if not, write to the Free Software
843
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
850
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
851
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
853
# Add --enable-maintainer-mode option to configure.
856
# Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
858
# This program is free software; you can redistribute it and/or modify
859
# it under the terms of the GNU General Public License as published by
860
# the Free Software Foundation; either version 2, or (at your option)
863
# This program is distributed in the hope that it will be useful,
864
# but WITHOUT ANY WARRANTY; without even the implied warranty of
865
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
866
# GNU General Public License for more details.
868
# You should have received a copy of the GNU General Public License
869
# along with this program; if not, write to the Free Software
870
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
875
AC_DEFUN([AM_MAINTAINER_MODE],
876
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
877
dnl maintainer-mode is disabled by default
878
AC_ARG_ENABLE(maintainer-mode,
879
[ --enable-maintainer-mode enable make rules and dependencies not useful
880
(and sometimes confusing) to the casual installer],
881
USE_MAINTAINER_MODE=$enableval,
882
USE_MAINTAINER_MODE=no)
883
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
884
AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
885
MAINT=$MAINTAINER_MODE_TRUE
890
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
892
# $Header: /cvsroot/pgsql-server/config/general.m4,v 1.2 2002/03/29 17:32:53 petere Exp $
894
# This file defines new macros to process configure command line
895
# arguments, to replace the brain-dead AC_ARG_WITH and AC_ARG_ENABLE.
896
# The flaw in these is particularly that they only differentiate
897
# between "given" and "not given" and do not provide enough help to
898
# process arguments that only accept "yes/no", that require an
899
# argument (other than "yes/no"), etc.
901
# The point of this implementation is to reduce code size and
902
# redundancy in configure.in and to improve robustness and consistency
903
# in the option evaluation code.
906
# Convert type and name to shell variable name (e.g., "enable_long_strings")
907
m4_define([pgac_arg_to_variable],
908
[$1[]_[]patsubst($2, -, _)])
911
# PGAC_ARG(TYPE, NAME, HELP-STRING,
912
# [ACTION-IF-YES], [ACTION-IF-NO], [ACTION-IF-ARG],
913
# [ACTION-IF-OMITTED])
914
# ----------------------------------------------------------
915
# This is the base layer. TYPE is either "with" or "enable", depending
916
# on what you like. NAME is the rest of the option name, HELP-STRING
917
# as usual. ACTION-IF-YES is executed if the option is given without
918
# and argument (or "yes", which is the same); similar for ACTION-IF-NO.
925
AC_ARG_ENABLE([$2], [$3], [
938
[$7])[]dnl AC_ARG_ENABLE
942
AC_ARG_WITH([$2], [$3], [
955
[$7])[]dnl AC_ARG_WITH
958
[m4_fatal([first argument of $0 must be 'enable' or 'with', not '$1'])]
963
# PGAC_ARG_BOOL(TYPE, NAME, DEFAULT, HELP-STRING,
964
# [ACTION-IF-YES], [ACTION-IF-NO])
965
# -----------------------------------------------
966
# Accept a boolean option, that is, one that only takes yes or no.
967
# ("no" is equivalent to "disable" or "without"). DEFAULT is what
968
# should be done if the option is omitted; it should be "yes" or "no".
969
# (Consequently, one of ACTION-IF-YES and ACTION-IF-NO will always
972
AC_DEFUN([PGAC_ARG_BOOL],
973
[PGAC_ARG([$1], [$2], [$4], [$5], [$6],
974
[AC_MSG_ERROR([no argument expected for --$1-$2 option])],
976
yes, [pgac_arg_to_variable([$1], [$2])=yes
978
no, [pgac_arg_to_variable([$1], [$2])=no
980
[m4_fatal([third argument of $0 must be 'yes' or 'no', not '$3'])])])[]dnl
984
# PGAC_ARG_REQ(TYPE, NAME, HELP-STRING, [ACTION-IF-GIVEN], [ACTION-IF-NOT-GIVEN])
985
# -------------------------------------------------------------------------------
986
# This option will require an argument; "yes" or "no" will not be
989
AC_DEFUN([PGAC_ARG_REQ],
990
[PGAC_ARG([$1], [$2], [$3],
991
[AC_MSG_ERROR([argument required for --$1-$2 option])],
992
[AC_MSG_ERROR([argument required for --$1-$2 option])],
994
[$5])])# PGAC_ARG_REQ
997
# PGAC_ARG_OPTARG(TYPE, NAME, HELP-STRING, [DEFAULT-ACTION], [ARG-ACTION]
998
# [ACTION-ENABLED], [ACTION-DISABLED])
999
# -----------------------------------------------------------------------
1000
# This will create an option that behaves as follows: If omitted, or
1001
# called with "no", then set the enable_variable to "no" and do
1002
# nothing else. If called with "yes", then execute DEFAULT-ACTION. If
1003
# called with argument, set enable_variable to "yes" and execute
1004
# ARG-ACTION. Additionally, execute ACTION-ENABLED if we ended up with
1005
# "yes" either way, else ACTION-DISABLED.
1007
# The intent is to allow enabling a feature, and optionally pass an
1008
# additional piece of information.
1010
AC_DEFUN([PGAC_ARG_OPTARG],
1011
[PGAC_ARG([$1], [$2], [$3], [$4], [],
1012
[pgac_arg_to_variable([$1], [$2])=yes
1014
[pgac_arg_to_variable([$1], [$2])=no])
1015
dnl Add this code only if there's a ACTION-ENABLED or ACTION-DISABLED.
1018
if test "[$]pgac_arg_to_variable([$1], [$2])" = yes; then
1028
# libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
1030
# serial 46 AC_PROG_LIBTOOL
1032
AC_DEFUN([AC_PROG_LIBTOOL],
1033
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
1035
# This can be used to rebuild libtool when needed
1036
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
1038
# Always use our own libtool.
1039
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1040
AC_SUBST(LIBTOOL)dnl
1042
# Prevent multiple expansion
1043
define([AC_PROG_LIBTOOL], [])
1046
AC_DEFUN([AC_LIBTOOL_SETUP],
1048
AC_REQUIRE([AC_ENABLE_SHARED])dnl
1049
AC_REQUIRE([AC_ENABLE_STATIC])dnl
1050
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
1051
AC_REQUIRE([AC_CANONICAL_HOST])dnl
1052
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1053
AC_REQUIRE([AC_PROG_CC])dnl
1054
AC_REQUIRE([AC_PROG_LD])dnl
1055
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
1056
AC_REQUIRE([AC_PROG_NM])dnl
1057
AC_REQUIRE([LT_AC_PROG_SED])dnl
1059
AC_REQUIRE([AC_PROG_LN_S])dnl
1060
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
1061
AC_REQUIRE([AC_OBJEXT])dnl
1062
AC_REQUIRE([AC_EXEEXT])dnl
1065
_LT_AC_PROG_ECHO_BACKSLASH
1066
# Only perform the check for file, if the check method requires it
1067
case $deplibs_check_method in
1069
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1075
AC_CHECK_TOOL(RANLIB, ranlib, :)
1076
AC_CHECK_TOOL(STRIP, strip, :)
1078
ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1079
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
1080
enable_win32_dll=yes, enable_win32_dll=no)
1082
AC_ARG_ENABLE(libtool-lock,
1083
[ --disable-libtool-lock avoid locking (might break parallel builds)])
1084
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1086
# Some flags need to be propagated to the compiler or linker for good
1090
# Find out which ABI we are using.
1091
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1092
if AC_TRY_EVAL(ac_compile); then
1093
case `/usr/bin/file conftest.$ac_objext` in
1109
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
1110
SAVE_CFLAGS="$CFLAGS"
1111
CFLAGS="$CFLAGS -belf"
1112
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1115
AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1117
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1118
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1119
CFLAGS="$SAVE_CFLAGS"
1123
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
1124
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1125
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1126
AC_CHECK_TOOL(AS, as, false)
1127
AC_CHECK_TOOL(OBJDUMP, objdump, false)
1129
# recent cygwin and mingw systems supply a stub DllMain which the user
1130
# can override, but on older systems we have to supply one
1131
AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
1133
[extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
1134
DllMain (0, 0, 0);],
1135
[lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
1138
*-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
1139
# old mingw systems require "-dll" to link a DLL, while more recent ones
1141
SAVE_CFLAGS="$CFLAGS"
1142
CFLAGS="$CFLAGS -mdll"
1143
AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
1144
[AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
1145
CFLAGS="$SAVE_CFLAGS" ;;
1146
*-*-cygwin* | *-*-pw32*)
1147
# cygwin systems need to pass --dll to the linker, and not link
1148
# crt.o which will require a WinMain@16 definition.
1149
lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
1155
_LT_AC_LTCONFIG_HACK
1159
# AC_LIBTOOL_HEADER_ASSERT
1160
# ------------------------
1161
AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT],
1162
[AC_CACHE_CHECK([whether $CC supports assert without backlinking],
1163
[lt_cv_func_assert_works],
1166
if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
1167
case `$CC --version 2>/dev/null` in
1168
[[12]].*) lt_cv_func_assert_works=no ;;
1169
*) lt_cv_func_assert_works=yes ;;
1175
if test "x$lt_cv_func_assert_works" = xyes; then
1176
AC_CHECK_HEADERS(assert.h)
1178
])# AC_LIBTOOL_HEADER_ASSERT
1180
# _LT_AC_CHECK_DLFCN
1181
# --------------------
1182
AC_DEFUN([_LT_AC_CHECK_DLFCN],
1183
[AC_CHECK_HEADERS(dlfcn.h)
1184
])# _LT_AC_CHECK_DLFCN
1186
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1187
# ---------------------------------
1188
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
1189
[AC_REQUIRE([AC_CANONICAL_HOST])
1190
AC_REQUIRE([AC_PROG_NM])
1191
AC_REQUIRE([AC_OBJEXT])
1192
# Check for command to grab the raw symbol name followed by C symbol from nm.
1193
AC_MSG_CHECKING([command to parse $NM output])
1194
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
1196
# These are sane defaults that work on at least a few old systems.
1197
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
1199
# Character class describing NM global symbol codes.
1200
symcode='[[BCDEGRST]]'
1202
# Regexp to match symbols that can be accessed directly from C.
1203
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
1205
# Transform the above into a raw symbol and a C symbol.
1206
symxfrm='\1 \2\3 \3'
1208
# Transform an extracted symbol line into a proper C declaration
1209
lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
1211
# Transform an extracted symbol line into symbol name and symbol address
1212
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'"
1214
# Define system-specific variables.
1219
cygwin* | mingw* | pw32*)
1220
symcode='[[ABCDGISTW]]'
1222
hpux*) # Its linker distinguishes data from code symbols
1223
lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
1224
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'"
1227
symcode='[[BCDEGRST]]'
1230
symcode='[[BCDEGQRST]]'
1236
symcode='[[DFNSTU]]'
1240
# Handle CRLF in mingw tool chain
1244
opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
1248
# If we're using GNU nm, then use its standard symbol codes.
1249
if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
1250
symcode='[[ABCDGISTW]]'
1253
# Try without a prefix undercore, then with it.
1254
for ac_symprfx in "" "_"; do
1256
# Write the raw and C identifiers.
1257
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
1259
# Check to see that the pipe works correctly.
1262
cat > conftest.$ac_ext <<EOF
1267
void nm_test_func(){}
1271
int main(){nm_test_var='a';nm_test_func();return(0);}
1274
if AC_TRY_EVAL(ac_compile); then
1275
# Now try to grab the symbols.
1277
if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
1278
# Try sorting and uniquifying the output.
1279
if sort "$nlist" | uniq > "$nlist"T; then
1280
mv -f "$nlist"T "$nlist"
1285
# Make sure that we snagged all the symbols we need.
1286
if egrep ' nm_test_var$' "$nlist" >/dev/null; then
1287
if egrep ' nm_test_func$' "$nlist" >/dev/null; then
1288
cat <<EOF > conftest.$ac_ext
1294
# Now generate the symbol file.
1295
eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
1297
cat <<EOF >> conftest.$ac_ext
1298
#if defined (__STDC__) && __STDC__
1299
# define lt_ptr void *
1301
# define lt_ptr char *
1305
/* The mapping between symbol names and symbols. */
1310
lt_preloaded_symbols[[]] =
1313
sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
1314
cat <<\EOF >> conftest.$ac_ext
1322
# Now try linking the two files.
1323
mv conftest.$ac_objext conftstm.$ac_objext
1325
save_CFLAGS="$CFLAGS"
1326
LIBS="conftstm.$ac_objext"
1327
CFLAGS="$CFLAGS$no_builtin_flag"
1328
if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
1332
CFLAGS="$save_CFLAGS"
1334
echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
1337
echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
1340
echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
1343
echo "$progname: failed program was:" >&AC_FD_CC
1344
cat conftest.$ac_ext >&5
1346
rm -f conftest* conftst*
1348
# Do not use the global_symbol_pipe unless it works.
1349
if test "$pipe_works" = yes; then
1352
lt_cv_sys_global_symbol_pipe=
1356
global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
1357
if test -z "$lt_cv_sys_global_symbol_pipe"; then
1358
global_symbol_to_cdecl=
1359
global_symbol_to_c_name_address=
1361
global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
1362
global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
1364
if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
1366
AC_MSG_RESULT(failed)
1370
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1372
# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1373
# ---------------------------------
1374
AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
1375
[# Find the correct PATH separator. Usually this is `:', but
1376
# DJGPP uses `;' like DOS.
1377
if test "X${PATH_SEPARATOR+set}" != Xset; then
1378
UNAME=${UNAME-`uname 2>/dev/null`}
1380
*-DOS) lt_cv_sys_path_separator=';' ;;
1381
*) lt_cv_sys_path_separator=':' ;;
1383
PATH_SEPARATOR=$lt_cv_sys_path_separator
1385
])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1387
# _LT_AC_PROG_ECHO_BACKSLASH
1388
# --------------------------
1389
# Add some code to the start of the generated configure script which
1390
# will find an echo command which doesn't interpret backslashes.
1391
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1392
[ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1393
[AC_DIVERT_PUSH(NOTICE)])
1394
_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1396
# Check that we are running under the correct shell.
1397
SHELL=${CONFIG_SHELL-/bin/sh}
1401
# Remove one level of quotation (which was required for Make).
1402
ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1407
if test "X[$]1" = X--no-reexec; then
1408
# Discard the --no-reexec flag, and continue.
1410
elif test "X[$]1" = X--fallback-echo; then
1411
# Avoid inline document here, it may be left over
1413
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
1414
# Yippee, $echo works!
1417
# Restart under the correct shell.
1418
exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1421
if test "X[$]1" = X--fallback-echo; then
1422
# used as fallback echo
1430
# The HP-UX ksh and POSIX shell print the target directory to stdout
1432
if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
1434
if test -z "$ECHO"; then
1435
if test "X${echo_test_string+set}" != Xset; then
1436
# find a string as large as possible, as long as the shell can cope with it
1437
for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1438
# expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1439
if (echo_test_string="`eval $cmd`") 2>/dev/null &&
1440
echo_test_string="`eval $cmd`" &&
1441
(test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1448
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1449
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1450
test "X$echo_testing_string" = "X$echo_test_string"; then
1453
# The Solaris, AIX, and Digital Unix default echo programs unquote
1454
# backslashes. This makes it impossible to quote backslashes using
1455
# echo "$something" | sed 's/\\/\\\\/g'
1457
# So, first we look for a working echo in the user's PATH.
1459
IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1460
for dir in $PATH /usr/ucb; do
1461
if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1462
test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1463
echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1464
test "X$echo_testing_string" = "X$echo_test_string"; then
1471
if test "X$echo" = Xecho; then
1472
# We didn't find a better echo, so look for alternatives.
1473
if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1474
echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1475
test "X$echo_testing_string" = "X$echo_test_string"; then
1476
# This shell has a builtin print -r that does the trick.
1478
elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1479
test "X$CONFIG_SHELL" != X/bin/ksh; then
1480
# If we have ksh, try running configure again with it.
1481
ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1482
export ORIGINAL_CONFIG_SHELL
1483
CONFIG_SHELL=/bin/ksh
1485
exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1489
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1490
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1491
test "X$echo_testing_string" = "X$echo_test_string"; then
1492
# Cool, printf works
1494
elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1495
test "X$echo_testing_string" = 'X\t' &&
1496
echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1497
test "X$echo_testing_string" = "X$echo_test_string"; then
1498
CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1500
SHELL="$CONFIG_SHELL"
1502
echo="$CONFIG_SHELL [$]0 --fallback-echo"
1503
elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1504
test "X$echo_testing_string" = 'X\t' &&
1505
echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1506
test "X$echo_testing_string" = "X$echo_test_string"; then
1507
echo="$CONFIG_SHELL [$]0 --fallback-echo"
1509
# maybe with a smaller string...
1512
for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1513
if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1520
if test "$prev" != 'sed 50q "[$]0"'; then
1521
echo_test_string=`eval $prev`
1522
export echo_test_string
1523
exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1525
# Oops. We lost completely, so just stick with echo.
1534
# Copy echo and quote the copy suitably for passing to libtool from
1535
# the Makefile, instead of quoting the original, which is used later.
1537
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1538
ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1543
])# _LT_AC_PROG_ECHO_BACKSLASH
1545
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1546
# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1547
# ------------------------------------------------------------------
1548
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1549
[if test "$cross_compiling" = yes; then :
1552
AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1553
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1554
lt_status=$lt_dlunknown
1555
cat > conftest.$ac_ext <<EOF
1556
[#line __oline__ "configure"
1557
#include "confdefs.h"
1566
# define LT_DLGLOBAL RTLD_GLOBAL
1569
# define LT_DLGLOBAL DL_GLOBAL
1571
# define LT_DLGLOBAL 0
1575
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1576
find out it does not work in some platform. */
1577
#ifndef LT_DLLAZY_OR_NOW
1579
# define LT_DLLAZY_OR_NOW RTLD_LAZY
1582
# define LT_DLLAZY_OR_NOW DL_LAZY
1585
# define LT_DLLAZY_OR_NOW RTLD_NOW
1588
# define LT_DLLAZY_OR_NOW DL_NOW
1590
# define LT_DLLAZY_OR_NOW 0
1598
extern "C" void exit (int);
1601
void fnord() { int i=42;}
1604
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1605
int status = $lt_dlunknown;
1609
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1610
else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1611
/* dlclose (self); */
1617
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1618
(./conftest; exit; ) 2>/dev/null
1621
x$lt_dlno_uscore) $1 ;;
1622
x$lt_dlneed_uscore) $2 ;;
1623
x$lt_unknown|x*) $3 ;;
1626
# compilation failed
1631
])# _LT_AC_TRY_DLOPEN_SELF
1633
# AC_LIBTOOL_DLOPEN_SELF
1634
# -------------------
1635
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1636
[if test "x$enable_dlopen" != xyes; then
1637
enable_dlopen=unknown
1638
enable_dlopen_self=unknown
1639
enable_dlopen_self_static=unknown
1646
lt_cv_dlopen="load_add_on"
1648
lt_cv_dlopen_self=yes
1651
cygwin* | mingw* | pw32*)
1652
lt_cv_dlopen="LoadLibrary"
1657
AC_CHECK_FUNC([shl_load],
1658
[lt_cv_dlopen="shl_load"],
1659
[AC_CHECK_LIB([dld], [shl_load],
1660
[lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1661
[AC_CHECK_FUNC([dlopen],
1662
[lt_cv_dlopen="dlopen"],
1663
[AC_CHECK_LIB([dl], [dlopen],
1664
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1665
[AC_CHECK_LIB([svld], [dlopen],
1666
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1667
[AC_CHECK_LIB([dld], [dld_link],
1668
[lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1677
if test "x$lt_cv_dlopen" != xno; then
1683
case $lt_cv_dlopen in
1685
save_CPPFLAGS="$CPPFLAGS"
1686
AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1687
test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1689
save_LDFLAGS="$LDFLAGS"
1690
eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1693
LIBS="$lt_cv_dlopen_libs $LIBS"
1695
AC_CACHE_CHECK([whether a program can dlopen itself],
1696
lt_cv_dlopen_self, [dnl
1697
_LT_AC_TRY_DLOPEN_SELF(
1698
lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1699
lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1702
if test "x$lt_cv_dlopen_self" = xyes; then
1703
LDFLAGS="$LDFLAGS $link_static_flag"
1704
AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1705
lt_cv_dlopen_self_static, [dnl
1706
_LT_AC_TRY_DLOPEN_SELF(
1707
lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1708
lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1712
CPPFLAGS="$save_CPPFLAGS"
1713
LDFLAGS="$save_LDFLAGS"
1718
case $lt_cv_dlopen_self in
1719
yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1720
*) enable_dlopen_self=unknown ;;
1723
case $lt_cv_dlopen_self_static in
1724
yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1725
*) enable_dlopen_self_static=unknown ;;
1728
])# AC_LIBTOOL_DLOPEN_SELF
1730
AC_DEFUN([_LT_AC_LTCONFIG_HACK],
1731
[AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
1732
# Sed substitution that helps us do robust quoting. It backslashifies
1733
# metacharacters that are still active within double-quoted strings.
1734
Xsed='sed -e s/^X//'
1735
sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g'
1737
# Same as above, but do not quote variable references.
1738
double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g'
1740
# Sed substitution to delay expansion of an escaped shell variable in a
1741
# double_quote_subst'ed string.
1742
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1748
default_ofile=libtool
1749
can_build_shared=yes
1751
# All known linkers require a `.a' archive for static linking (except M$VC,
1752
# which needs '.lib').
1754
ltmain="$ac_aux_dir/ltmain.sh"
1755
ofile="$default_ofile"
1756
with_gnu_ld="$lt_cv_prog_gnu_ld"
1757
need_locks="$enable_libtool_lock"
1760
old_CFLAGS="$CFLAGS"
1762
# Set sane defaults for various variables
1763
test -z "$AR" && AR=ar
1764
test -z "$AR_FLAGS" && AR_FLAGS=cru
1765
test -z "$AS" && AS=as
1766
test -z "$CC" && CC=cc
1767
test -z "$DLLTOOL" && DLLTOOL=dlltool
1768
test -z "$LD" && LD=ld
1769
test -z "$LN_S" && LN_S="ln -s"
1770
test -z "$MAGIC_CMD" && MAGIC_CMD=file
1771
test -z "$NM" && NM=nm
1772
test -z "$OBJDUMP" && OBJDUMP=objdump
1773
test -z "$RANLIB" && RANLIB=:
1774
test -z "$STRIP" && STRIP=:
1775
test -z "$ac_objext" && ac_objext=o
1777
if test x"$host" != x"$build"; then
1778
ac_tool_prefix=${host_alias}-
1783
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
1786
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
1791
# AIX sometimes has problems with the GCC collect2 program. For some
1792
# reason, if we set the COLLECT_NAMES environment variable, the problems
1793
# vanish in a puff of smoke.
1794
if test "X${COLLECT_NAMES+set}" != Xset; then
1796
export COLLECT_NAMES
1801
# Determine commands to create old-style static archives.
1802
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1803
old_postinstall_cmds='chmod 644 $oldlib'
1804
old_postuninstall_cmds=
1806
if test -n "$RANLIB"; then
1809
old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1812
old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1815
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1818
# Allow CC to be a program name with arguments.
1822
AC_MSG_CHECKING([for objdir])
1823
rm -f .libs 2>/dev/null
1824
mkdir .libs 2>/dev/null
1825
if test -d .libs; then
1828
# MS-DOS does not allow filenames that begin with a dot.
1831
rmdir .libs 2>/dev/null
1832
AC_MSG_RESULT($objdir)
1836
[ --with-pic try to use only PIC/non-PIC objects [default=use both]],
1837
pic_mode="$withval", pic_mode=default)
1838
test -z "$pic_mode" && pic_mode=default
1840
# We assume here that the value for lt_cv_prog_cc_pic will not be cached
1841
# in isolation, and that seeing it set (from the cache) indicates that
1842
# the associated values are set (in the cache) correctly too.
1843
AC_MSG_CHECKING([for $compiler option to produce PIC])
1844
AC_CACHE_VAL(lt_cv_prog_cc_pic,
1845
[ lt_cv_prog_cc_pic=
1846
lt_cv_prog_cc_shlib=
1848
lt_cv_prog_cc_static=
1849
lt_cv_prog_cc_no_builtin=
1850
lt_cv_prog_cc_can_build_shared=$can_build_shared
1852
if test "$GCC" = yes; then
1853
lt_cv_prog_cc_wl='-Wl,'
1854
lt_cv_prog_cc_static='-static'
1858
# Below there is a dirty hack to force normal static linking with -ldl
1859
# The problem is because libdl dynamically linked with both libc and
1860
# libC (AIX C++ library), which obviously doesn't included in libraries
1861
# list by gcc. This cause undefined symbols with -static flags.
1862
# This hack allows C programs to be linked with "-static -ldl", but
1863
# not sure about C++ programs.
1864
lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
1867
# FIXME: we need at least 68020 code to build shared libraries, but
1868
# adding the `-m68020' flag to GCC prevents building anything better,
1870
lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
1872
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
1873
# PIC is the default for these OSes.
1875
darwin* | rhapsody*)
1876
# PIC is the default on this platform
1877
# Common symbols not allowed in MH_DYLIB files
1878
lt_cv_prog_cc_pic='-fno-common'
1880
cygwin* | mingw* | pw32* | os2*)
1881
# This hack is so that the source file can tell whether it is being
1882
# built for inclusion in a dll (and should export symbols for example).
1883
lt_cv_prog_cc_pic='-DDLL_EXPORT'
1886
if test -d /usr/nec; then
1887
lt_cv_prog_cc_pic=-Kconform_pic
1891
lt_cv_prog_cc_pic='-fPIC'
1895
# PORTME Check for PIC flags for the system compiler.
1897
aix3* | aix4* | aix5*)
1898
lt_cv_prog_cc_wl='-Wl,'
1899
# All AIX code is PIC.
1900
if test "$host_cpu" = ia64; then
1901
# AIX 5 now supports IA64 processor
1902
lt_cv_prog_cc_static='-Bstatic'
1904
lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
1908
hpux9* | hpux10* | hpux11*)
1909
# Is there a better lt_cv_prog_cc_static that works with the bundled CC?
1910
lt_cv_prog_cc_wl='-Wl,'
1911
lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
1912
lt_cv_prog_cc_pic='+Z'
1915
irix5* | irix6* | nonstopux*)
1916
lt_cv_prog_cc_wl='-Wl,'
1917
lt_cv_prog_cc_static='-non_shared'
1918
# PIC (with -KPIC) is the default.
1921
cygwin* | mingw* | pw32* | os2*)
1922
# This hack is so that the source file can tell whether it is being
1923
# built for inclusion in a dll (and should export symbols for example).
1924
lt_cv_prog_cc_pic='-DDLL_EXPORT'
1928
lt_cv_prog_cc_pic='-KPIC'
1929
lt_cv_prog_cc_static='-Bstatic'
1932
osf3* | osf4* | osf5*)
1933
# All OSF/1 code is PIC.
1934
lt_cv_prog_cc_wl='-Wl,'
1935
lt_cv_prog_cc_static='-non_shared'
1939
lt_cv_prog_cc_pic='-Kpic'
1940
lt_cv_prog_cc_static='-dn'
1941
lt_cv_prog_cc_shlib='-belf'
1945
lt_cv_prog_cc_pic='-KPIC'
1946
lt_cv_prog_cc_static='-Bstatic'
1947
lt_cv_prog_cc_wl='-Wl,'
1951
lt_cv_prog_cc_pic='-PIC'
1952
lt_cv_prog_cc_static='-Bstatic'
1953
lt_cv_prog_cc_wl='-Qoption ld '
1956
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1957
lt_cv_prog_cc_pic='-KPIC'
1958
lt_cv_prog_cc_static='-Bstatic'
1959
lt_cv_prog_cc_wl='-Wl,'
1963
lt_cv_prog_cc_pic='-pic'
1964
lt_cv_prog_cc_static='-Bstatic'
1968
if test -d /usr/nec ;then
1969
lt_cv_prog_cc_pic='-Kconform_pic'
1970
lt_cv_prog_cc_static='-Bstatic'
1975
lt_cv_prog_cc_can_build_shared=no
1980
if test -z "$lt_cv_prog_cc_pic"; then
1981
AC_MSG_RESULT([none])
1983
AC_MSG_RESULT([$lt_cv_prog_cc_pic])
1985
# Check to make sure the pic_flag actually works.
1986
AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
1987
AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
1988
save_CFLAGS="$CFLAGS"
1989
CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
1990
AC_TRY_COMPILE([], [], [dnl
1992
hpux9* | hpux10* | hpux11*)
1993
# On HP-UX, both CC and GCC only warn that PIC is supported... then
1994
# they create non-PIC objects. So, if there were any warnings, we
1995
# assume that PIC is not supported.
1996
if test -s conftest.err; then
1997
lt_cv_prog_cc_pic_works=no
1999
lt_cv_prog_cc_pic_works=yes
2003
lt_cv_prog_cc_pic_works=yes
2007
lt_cv_prog_cc_pic_works=no
2009
CFLAGS="$save_CFLAGS"
2012
if test "X$lt_cv_prog_cc_pic_works" = Xno; then
2014
lt_cv_prog_cc_can_build_shared=no
2016
lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
2019
AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
2022
# Check for any special shared library compilation flags.
2023
if test -n "$lt_cv_prog_cc_shlib"; then
2024
AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
2025
if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$lt_cv_prog_cc_shlib[[ ]]" >/dev/null; then :
2027
AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
2028
lt_cv_prog_cc_can_build_shared=no
2032
AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
2033
AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
2034
lt_cv_prog_cc_static_works=no
2035
save_LDFLAGS="$LDFLAGS"
2036
LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
2037
AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
2038
LDFLAGS="$save_LDFLAGS"
2041
# Belt *and* braces to stop my trousers falling down:
2042
test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
2043
AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
2045
pic_flag="$lt_cv_prog_cc_pic"
2046
special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
2047
wl="$lt_cv_prog_cc_wl"
2048
link_static_flag="$lt_cv_prog_cc_static"
2049
no_builtin_flag="$lt_cv_prog_cc_no_builtin"
2050
can_build_shared="$lt_cv_prog_cc_can_build_shared"
2053
# Check to see if options -o and -c are simultaneously supported by compiler
2054
AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
2055
AC_CACHE_VAL([lt_cv_compiler_c_o], [
2056
$rm -r conftest 2>/dev/null
2059
echo "int some_variable = 0;" > conftest.$ac_ext
2061
# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
2062
# that will create temporary files in the current directory regardless of
2063
# the output directory. Thus, making CWD read-only will cause this test
2064
# to fail, enabling locking or at least warning the user not to do parallel
2067
save_CFLAGS="$CFLAGS"
2068
CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
2070
if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
2071
# The compiler can only warn and ignore the option if not recognized
2072
# So say no if there are warnings
2073
if test -s out/conftest.err; then
2074
lt_cv_compiler_c_o=no
2076
lt_cv_compiler_c_o=yes
2079
# Append any errors to the config.log.
2080
cat out/conftest.err 1>&AC_FD_CC
2081
lt_cv_compiler_c_o=no
2083
CFLAGS="$save_CFLAGS"
2089
$rm -r conftest 2>/dev/null
2091
compiler_c_o=$lt_cv_compiler_c_o
2092
AC_MSG_RESULT([$compiler_c_o])
2094
if test x"$compiler_c_o" = x"yes"; then
2095
# Check to see if we can write to a .lo
2096
AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
2097
AC_CACHE_VAL([lt_cv_compiler_o_lo], [
2098
lt_cv_compiler_o_lo=no
2099
save_CFLAGS="$CFLAGS"
2100
CFLAGS="$CFLAGS -c -o conftest.lo"
2101
save_objext="$ac_objext"
2103
AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
2104
# The compiler can only warn and ignore the option if not recognized
2105
# So say no if there are warnings
2106
if test -s conftest.err; then
2107
lt_cv_compiler_o_lo=no
2109
lt_cv_compiler_o_lo=yes
2112
ac_objext="$save_objext"
2113
CFLAGS="$save_CFLAGS"
2115
compiler_o_lo=$lt_cv_compiler_o_lo
2116
AC_MSG_RESULT([$compiler_o_lo])
2121
# Check to see if we can do hard links to lock some files if needed
2122
hard_links="nottested"
2123
if test "$compiler_c_o" = no && test "$need_locks" != no; then
2124
# do not overwrite the value of need_locks provided by the user
2125
AC_MSG_CHECKING([if we can lock with hard links])
2128
ln conftest.a conftest.b 2>/dev/null && hard_links=no
2130
ln conftest.a conftest.b 2>&5 || hard_links=no
2131
ln conftest.a conftest.b 2>/dev/null && hard_links=no
2132
AC_MSG_RESULT([$hard_links])
2133
if test "$hard_links" = no; then
2134
AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
2141
if test "$GCC" = yes; then
2142
# Check to see if options -fno-rtti -fno-exceptions are supported by compiler
2143
AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
2144
echo "int some_variable = 0;" > conftest.$ac_ext
2145
save_CFLAGS="$CFLAGS"
2146
CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
2147
compiler_rtti_exceptions=no
2148
AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
2149
# The compiler can only warn and ignore the option if not recognized
2150
# So say no if there are warnings
2151
if test -s conftest.err; then
2152
compiler_rtti_exceptions=no
2154
compiler_rtti_exceptions=yes
2157
CFLAGS="$save_CFLAGS"
2158
AC_MSG_RESULT([$compiler_rtti_exceptions])
2160
if test "$compiler_rtti_exceptions" = "yes"; then
2161
no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
2163
no_builtin_flag=' -fno-builtin'
2167
# See if the linker supports building shared libraries.
2168
AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
2170
allow_undefined_flag=
2172
need_lib_prefix=unknown
2173
need_version=unknown
2174
# when you set need_version to no, make sure it does not cause -set_version
2175
# flags to be left without arguments
2177
archive_expsym_cmds=
2178
old_archive_from_new_cmds=
2179
old_archive_from_expsyms_cmds=
2180
export_dynamic_flag_spec=
2181
whole_archive_flag_spec=
2182
thread_safe_flag_spec=
2183
hardcode_into_libs=no
2184
hardcode_libdir_flag_spec=
2185
hardcode_libdir_separator=
2188
hardcode_shlibpath_var=unsupported
2190
link_all_deplibs=unknown
2191
always_export_symbols=no
2192
export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
2193
# include_expsyms should be a list of space-separated symbols to be *always*
2194
# included in the symbol list
2196
# exclude_expsyms can be an egrep regular expression of symbols to exclude
2197
# it will be wrapped by ` (' and `)$', so one must not match beginning or
2198
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
2199
# as well as any symbol that contains `d'.
2200
exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
2201
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
2202
# platforms (ab)use it in PIC code, but their linkers get confused if
2203
# the symbol is explicitly referenced. Since portable code cannot
2204
# rely on this symbol name, it's probably fine to never include it in
2205
# preloaded symbol tables.
2206
extract_expsyms_cmds=
2209
cygwin* | mingw* | pw32*)
2210
# FIXME: the MSVC++ port hasn't been tested in a loooong time
2211
# When not using gcc, we currently assume that we are using
2212
# Microsoft Visual C++.
2213
if test "$GCC" != yes; then
2223
if test "$with_gnu_ld" = yes; then
2224
# If archive_cmds runs LD, not CC, wlarc should be empty
2227
# See if GNU ld supports shared libraries.
2229
aix3* | aix4* | aix5*)
2230
# On AIX, the GNU linker is very broken
2231
# Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
2235
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
2236
*** to be unable to reliably create shared libraries on AIX.
2237
*** Therefore, libtool is disabling shared libraries support. If you
2238
*** really care for shared libraries, you may want to modify your PATH
2239
*** so that a non-GNU linker is found, and then restart.
2245
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)'
2246
hardcode_libdir_flag_spec='-L$libdir'
2247
hardcode_minus_L=yes
2249
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
2250
# that the semantics of dynamic libraries on AmigaOS, at least up
2251
# to version 4, is to share data among multiple programs linked
2252
# with the same dynamic library. Since this doesn't match the
2253
# behavior of shared libraries on other platforms, we can use
2259
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2260
allow_undefined_flag=unsupported
2261
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
2262
# support --undefined. This deserves some investigation. FIXME
2263
archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2269
cygwin* | mingw* | pw32*)
2270
# hardcode_libdir_flag_spec is actually meaningless, as there is
2271
# no search path for DLLs.
2272
hardcode_libdir_flag_spec='-L$libdir'
2273
allow_undefined_flag=unsupported
2274
always_export_symbols=yes
2276
extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
2277
sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
2278
test -f $output_objdir/impgen.exe || (cd $output_objdir && \
2279
if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
2280
else $CC -o impgen impgen.c ; fi)~
2281
$output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
2283
old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
2285
# cygwin and mingw dlls have different entry points and sets of symbols
2287
# FIXME: what about values for MSVC?
2288
dll_entry=__cygwin_dll_entry@12
2289
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
2293
dll_entry=_DllMainCRTStartup@12
2294
dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
2298
# mingw and cygwin differ, and it's simplest to just exclude the union
2299
# of the two symbol sets.
2300
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
2302
# recent cygwin and mingw systems supply a stub DllMain which the user
2303
# can override, but on older systems we have to supply one (in ltdll.c)
2304
if test "x$lt_cv_need_dllmain" = "xyes"; then
2305
ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
2306
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~
2307
test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
2313
# Extract the symbol export list from an `--export-all' def file,
2314
# then regenerate the def file from the symbol export list, so that
2315
# the compiled dll only exports the symbol export list.
2316
# Be careful not to strip the DATA tag left be newer dlltools.
2317
export_symbols_cmds="$ltdll_cmds"'
2318
$DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
2319
sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
2321
# If the export-symbols file already is a .def file (1st line
2322
# is EXPORTS), use it as is.
2323
# If DATA tags from a recent dlltool are present, honour them!
2324
archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
2325
cp $export_symbols $output_objdir/$soname-def;
2327
echo EXPORTS > $output_objdir/$soname-def;
2329
cat $export_symbols | while read symbol; do
2332
2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
2333
4) echo " \[$]2 \[$]3 \[$]4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
2334
*) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
2336
_lt_hint=`expr 1 + \$_lt_hint`;
2340
$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~
2341
$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~
2342
$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~
2343
$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~
2344
$CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
2348
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2349
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
2352
archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2353
archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2358
if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
2362
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
2363
*** create shared libraries on Solaris systems. Therefore, libtool
2364
*** is disabling shared libraries support. We urge you to upgrade GNU
2365
*** binutils to release 2.9.1 or newer. Another option is to modify
2366
*** your PATH or compiler configuration so that the native linker is
2367
*** used, and then restart.
2370
elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2371
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2372
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2379
archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2382
hardcode_shlibpath_var=no
2386
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2387
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2388
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2395
if test "$ld_shlibs" = yes; then
2396
runpath_var=LD_RUN_PATH
2397
hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
2398
export_dynamic_flag_spec='${wl}--export-dynamic'
2400
cygwin* | mingw* | pw32*)
2401
# dlltool doesn't understand --whole-archive et. al.
2402
whole_archive_flag_spec=
2405
# ancient GNU ld didn't support --whole-archive et. al.
2406
if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
2407
whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2409
whole_archive_flag_spec=
2415
# PORTME fill in a description of your system's linker (not GNU ld)
2418
allow_undefined_flag=unsupported
2419
always_export_symbols=yes
2420
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'
2421
# Note: this linker hardcodes the directories in LIBPATH if there
2422
# are no directories specified by -L.
2423
hardcode_minus_L=yes
2424
if test "$GCC" = yes && test -z "$link_static_flag"; then
2425
# Neither direct hardcoding nor static linking is supported with a
2427
hardcode_direct=unsupported
2432
if test "$host_cpu" = ia64; then
2433
# On IA64, the linker does run time linking by default, so we don't
2434
# have to do anything special.
2435
aix_use_runtimelinking=no
2436
exp_sym_flag='-Bexport'
2439
aix_use_runtimelinking=no
2441
# Test if we are trying to use run time linking or normal
2442
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
2443
# need to do runtime linking.
2444
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2445
for ld_flag in $LDFLAGS; do
2448
aix_use_runtimelinking=yes
2455
exp_sym_flag='-bexport'
2456
no_entry_flag='-bnoentry'
2459
# When large executables or shared objects are built, AIX ld can
2460
# have problems creating the table of contents. If linking a library
2461
# or program results in "error TOC overflow" add -mminimal-toc to
2462
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
2463
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2467
hardcode_libdir_separator=':'
2468
if test "$GCC" = yes; then
2469
case $host_os in aix4.[[012]]|aix4.[[012]].*)
2470
collect2name=`${CC} -print-prog-name=collect2`
2471
if test -f "$collect2name" && \
2472
strings "$collect2name" | grep resolve_lib_name >/dev/null
2474
# We have reworked collect2
2477
# We have old collect2
2478
hardcode_direct=unsupported
2479
# It fails to find uninstalled libraries when the uninstalled
2480
# path is not listed in the libpath. Setting hardcode_minus_L
2481
# to unsupported forces relinking
2482
hardcode_minus_L=yes
2483
hardcode_libdir_flag_spec='-L$libdir'
2484
hardcode_libdir_separator=
2488
shared_flag='-shared'
2491
if test "$host_cpu" = ia64; then
2492
shared_flag='${wl}-G'
2494
if test "$aix_use_runtimelinking" = yes; then
2495
shared_flag='${wl}-G'
2497
shared_flag='${wl}-bM:SRE'
2502
# It seems that -bexpall can do strange things, so it is better to
2503
# generate a list of symbols to export.
2504
always_export_symbols=yes
2505
if test "$aix_use_runtimelinking" = yes; then
2506
# Warning - without using the other runtime loading flags (-brtl),
2507
# -berok will link without error, but may produce a broken library.
2508
allow_undefined_flag='-berok'
2509
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
2510
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"
2512
if test "$host_cpu" = ia64; then
2513
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
2514
allow_undefined_flag="-z nodefs"
2515
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"
2517
hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
2518
# Warning - without using the other run time loading flags,
2519
# -berok will link without error, but may produce a broken library.
2520
allow_undefined_flag='${wl}-berok'
2521
# This is a bit strange, but is similar to how AIX traditionally builds
2522
# it's shared libraries.
2523
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'
2529
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)'
2530
hardcode_libdir_flag_spec='-L$libdir'
2531
hardcode_minus_L=yes
2532
# see comment about different semantics on the GNU ld section
2536
cygwin* | mingw* | pw32*)
2537
# When not using gcc, we currently assume that we are using
2538
# Microsoft Visual C++.
2539
# hardcode_libdir_flag_spec is actually meaningless, as there is
2540
# no search path for DLLs.
2541
hardcode_libdir_flag_spec=' '
2542
allow_undefined_flag=unsupported
2543
# Tell ltmain to make .lib files, not .a files.
2545
# FIXME: Setting linknames here is a bad hack.
2546
archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
2547
# The linker will automatically build a .lib file if we build a DLL.
2548
old_archive_from_new_cmds='true'
2549
# FIXME: Should let the user specify the lib program.
2550
old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
2551
fix_srcfile_path='`cygpath -w "$srcfile"`'
2554
darwin* | rhapsody*)
2556
rhapsody* | darwin1.[[012]])
2557
allow_undefined_flag='-undefined suppress'
2560
allow_undefined_flag='-flat_namespace -undefined suppress'
2563
# FIXME: Relying on posixy $() will cause problems for
2564
# cross-compilation, but unfortunately the echo tests do not
2565
# yet detect zsh echo's removal of \ escapes. Also zsh mangles
2566
# `"' quotes if we put them in here... so don't!
2567
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)'
2568
# We need to add '_' to the symbols in $export_symbols first
2569
#archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
2571
hardcode_shlibpath_var=no
2572
whole_archive_flag_spec='-all_load $convenience'
2579
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
2580
# support. Future versions do this automatically, but an explicit c++rt0.o
2581
# does not break anything, and helps significantly (at the cost of a little
2584
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
2585
hardcode_libdir_flag_spec='-R$libdir'
2587
hardcode_shlibpath_var=no
2590
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
2592
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2594
hardcode_minus_L=yes
2595
hardcode_shlibpath_var=no
2598
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
2600
archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
2601
hardcode_libdir_flag_spec='-R$libdir'
2603
hardcode_shlibpath_var=no
2606
hpux9* | hpux10* | hpux11*)
2608
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' ;;
2609
*) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
2611
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
2612
hardcode_libdir_separator=:
2614
hardcode_minus_L=yes # Not in the search PATH, but as the default
2615
# location of the library.
2616
export_dynamic_flag_spec='${wl}-E'
2619
irix5* | irix6* | nonstopux*)
2620
if test "$GCC" = yes; then
2621
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'
2622
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2624
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'
2625
hardcode_libdir_flag_spec='-rpath $libdir'
2627
hardcode_libdir_separator=:
2628
link_all_deplibs=yes
2632
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2633
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
2635
archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
2637
hardcode_libdir_flag_spec='-R$libdir'
2639
hardcode_shlibpath_var=no
2643
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2645
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2646
hardcode_libdir_separator=:
2647
hardcode_shlibpath_var=no
2652
hardcode_shlibpath_var=no
2653
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2654
archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
2655
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2656
export_dynamic_flag_spec='${wl}-E'
2659
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
2660
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2661
hardcode_libdir_flag_spec='-R$libdir'
2664
archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
2665
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2672
hardcode_libdir_flag_spec='-L$libdir'
2673
hardcode_minus_L=yes
2674
allow_undefined_flag=unsupported
2675
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'
2676
old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
2680
if test "$GCC" = yes; then
2681
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2682
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'
2684
allow_undefined_flag=' -expect_unresolved \*'
2685
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'
2687
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2688
hardcode_libdir_separator=:
2691
osf4* | osf5*) # as osf3* with the addition of -msym flag
2692
if test "$GCC" = yes; then
2693
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2694
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'
2695
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2697
allow_undefined_flag=' -expect_unresolved \*'
2698
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'
2699
archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
2700
$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'
2702
#Both c and cxx compiler support -rpath directly
2703
hardcode_libdir_flag_spec='-rpath $libdir'
2705
hardcode_libdir_separator=:
2709
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2710
hardcode_shlibpath_var=no
2711
runpath_var=LD_RUN_PATH
2712
hardcode_runpath_var=yes
2713
export_dynamic_flag_spec='${wl}-Bexport'
2717
# gcc --version < 3.0 without binutils cannot create self contained
2718
# shared libraries reliably, requiring libgcc.a to resolve some of
2719
# the object symbols generated in some cases. Libraries that use
2720
# assert need libgcc.a to resolve __eprintf, for example. Linking
2721
# a copy of libgcc.a into every shared library to guarantee resolving
2722
# such symbols causes other problems: According to Tim Van Holder
2723
# <tim.van.holder@pandora.be>, C++ libraries end up with a separate
2724
# (to the application) exception stack for one thing.
2725
no_undefined_flag=' -z defs'
2726
if test "$GCC" = yes; then
2727
case `$CC --version 2>/dev/null` in
2731
*** Warning: Releases of GCC earlier than version 3.0 cannot reliably
2732
*** create self contained shared libraries on Solaris systems, without
2733
*** introducing a dependency on libgcc.a. Therefore, libtool is disabling
2734
*** -no-undefined support, which will at least allow you to build shared
2735
*** libraries. However, you may find that when you link such libraries
2736
*** into an application without using GCC, you have to manually add
2737
*** \`gcc --print-libgcc-file-name\` to the link command. We urge you to
2738
*** upgrade to a newer version of GCC. Another option is to rebuild your
2739
*** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
2746
# $CC -shared without GNU ld will not create a library from C++
2747
# object files and a static libstdc++, better avoid it by now
2748
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2749
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2750
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2751
hardcode_libdir_flag_spec='-R$libdir'
2752
hardcode_shlibpath_var=no
2754
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
2755
*) # Supported since Solaris 2.6 (maybe 2.5.1?)
2756
whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
2758
link_all_deplibs=yes
2762
if test "x$host_vendor" = xsequent; then
2763
# Use $CC to link under sequent, because it throws in some extra .o
2764
# files that make .init and .fini sections work.
2765
archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
2767
archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
2769
hardcode_libdir_flag_spec='-L$libdir'
2771
hardcode_minus_L=yes
2772
hardcode_shlibpath_var=no
2776
case $host_vendor in
2778
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2779
hardcode_direct=yes # is this really true???
2782
## LD is ld it makes a PLAMLIB
2783
## CC just makes a GrossModule.
2784
archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2785
reload_cmds='$CC -r -o $output$reload_objs'
2789
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2790
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
2793
runpath_var='LD_RUN_PATH'
2794
hardcode_shlibpath_var=no
2798
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2799
hardcode_shlibpath_var=no
2800
export_dynamic_flag_spec='-Bexport'
2804
no_undefined_flag=' -z text'
2805
# $CC -shared without GNU ld will not create a library from C++
2806
# object files and a static libstdc++, better avoid it by now
2807
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2808
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2809
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2810
hardcode_libdir_flag_spec=
2811
hardcode_shlibpath_var=no
2812
runpath_var='LD_RUN_PATH'
2816
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2817
hardcode_libdir_flag_spec='-L$libdir'
2818
hardcode_shlibpath_var=no
2822
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2823
hardcode_libdir_flag_spec='-L$libdir'
2824
hardcode_shlibpath_var=no
2828
if test -d /usr/nec; then
2829
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2830
hardcode_shlibpath_var=no
2831
runpath_var=LD_RUN_PATH
2832
hardcode_runpath_var=yes
2838
archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2841
hardcode_shlibpath_var=no
2842
hardcode_runpath_var=yes
2843
runpath_var=LD_RUN_PATH
2846
sysv5uw7* | unixware7*)
2847
no_undefined_flag='${wl}-z ${wl}text'
2848
if test "$GCC" = yes; then
2849
archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2851
archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2853
runpath_var='LD_RUN_PATH'
2854
hardcode_shlibpath_var=no
2862
AC_MSG_RESULT([$ld_shlibs])
2863
test "$ld_shlibs" = no && can_build_shared=no
2865
# Check hardcoding attributes.
2866
AC_MSG_CHECKING([how to hardcode library paths into programs])
2868
if test -n "$hardcode_libdir_flag_spec" || \
2869
test -n "$runpath_var"; then
2871
# We can hardcode non-existant directories.
2872
if test "$hardcode_direct" != no &&
2873
# If the only mechanism to avoid hardcoding is shlibpath_var, we
2874
# have to relink, otherwise we might link with an installed library
2875
# when we should be linking with a yet-to-be-installed one
2876
## test "$hardcode_shlibpath_var" != no &&
2877
test "$hardcode_minus_L" != no; then
2878
# Linking always hardcodes the temporary library directory.
2879
hardcode_action=relink
2881
# We can link without hardcoding, and we can hardcode nonexisting dirs.
2882
hardcode_action=immediate
2885
# We cannot hardcode anything, or else we can only hardcode existing
2887
hardcode_action=unsupported
2889
AC_MSG_RESULT([$hardcode_action])
2893
AC_MSG_CHECKING([whether stripping libraries is possible])
2894
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2895
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2896
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2897
AC_MSG_RESULT([yes])
2902
reload_cmds='$LD$reload_flag -o $output$reload_objs'
2903
test -z "$deplibs_check_method" && deplibs_check_method=unknown
2905
# PORTME Fill in your ld.so characteristics
2906
AC_MSG_CHECKING([dynamic linker characteristics])
2908
libname_spec='lib$name'
2915
shlibpath_overrides_runpath=unknown
2917
dynamic_linker="$host_os ld.so"
2918
sys_lib_dlsearch_path_spec="/lib /usr/lib"
2919
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2924
library_names_spec='${libname}${release}.so$versuffix $libname.a'
2925
shlibpath_var=LIBPATH
2927
# AIX has no versioning support, so we append a major version to the name.
2928
soname_spec='${libname}${release}.so$major'
2935
hardcode_into_libs=yes
2936
if test "$host_cpu" = ia64; then
2937
# AIX 5 supports IA64
2938
library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
2939
shlibpath_var=LD_LIBRARY_PATH
2941
# With GCC up to 2.95.x, collect2 would create an import file
2942
# for dependence libraries. The import file would start with
2943
# the line `#! .'. This would cause the generated library to
2944
# depend on `.', always an invalid library. This was fixed in
2945
# development snapshots of GCC prior to 3.0.
2947
aix4 | aix4.[[01]] | aix4.[[01]].*)
2948
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2950
echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2957
# AIX (on Power*) has no versioning support, so currently we can
2958
# not hardcode correct soname into executable. Probably we can
2959
# add versioning support to collect2, so additional links can
2960
# be useful in future.
2961
if test "$aix_use_runtimelinking" = yes; then
2962
# If using run time linking (on AIX 4.2 or later) use lib<name>.so
2963
# instead of lib<name>.a to let people know that these are not
2964
# typical AIX shared libraries.
2965
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2967
# We preserve .a as extension for shared libraries through AIX4.2
2968
# and later when we are not doing run time linking.
2969
library_names_spec='${libname}${release}.a $libname.a'
2970
soname_spec='${libname}${release}.so$major'
2972
shlibpath_var=LIBPATH
2974
hardcode_into_libs=yes
2978
library_names_spec='$libname.ixlibrary $libname.a'
2979
# Create ${libname}_ixlibrary.a entries in /sys/libs.
2980
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'
2984
library_names_spec='${libname}.so'
2985
dynamic_linker="$host_os ld.so"
2986
shlibpath_var=LIBRARY_PATH
2992
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2993
soname_spec='${libname}${release}.so$major'
2994
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2995
shlibpath_var=LD_LIBRARY_PATH
2996
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2997
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2998
export_dynamic_flag_spec=-rdynamic
2999
# the default ld.so.conf also contains /usr/contrib/lib and
3000
# /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3001
# libtool to hard-code these into programs
3004
cygwin* | mingw* | pw32*)
3005
version_type=windows
3008
case $GCC,$host_os in
3010
library_names_spec='$libname.dll.a'
3011
soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
3012
postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
3013
dldir=$destdir/`dirname \$dlpath`~
3014
test -d \$dldir || mkdir -p \$dldir~
3015
$install_prog .libs/$dlname \$dldir/$dlname'
3016
postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
3017
dlpath=$dir/\$dldll~
3021
library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
3022
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
3025
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
3028
library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
3031
dynamic_linker='Win32 ld.exe'
3032
# FIXME: first we should search . and the directory the executable is in
3036
darwin* | rhapsody*)
3037
dynamic_linker="$host_os dyld"
3041
# FIXME: Relying on posixy $() will cause problems for
3042
# cross-compilation, but unfortunately the echo tests do not
3043
# yet detect zsh echo's removal of \ escapes.
3044
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)'
3045
soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
3046
shlibpath_overrides_runpath=yes
3047
shlibpath_var=DYLD_LIBRARY_PATH
3055
objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
3056
version_type=freebsd-$objformat
3057
case $version_type in
3059
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
3064
library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
3068
shlibpath_var=LD_LIBRARY_PATH
3071
shlibpath_overrides_runpath=yes
3074
shlibpath_overrides_runpath=no
3075
hardcode_into_libs=yes
3084
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
3085
soname_spec='${libname}${release}.so$major'
3086
shlibpath_var=LD_LIBRARY_PATH
3087
hardcode_into_libs=yes
3090
hpux9* | hpux10* | hpux11*)
3091
# Give a soname corresponding to the major version so that dld.sl refuses to
3092
# link against other versions.
3093
dynamic_linker="$host_os dld.sl"
3097
shlibpath_var=SHLIB_PATH
3098
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3099
library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
3100
soname_spec='${libname}${release}.sl$major'
3101
# HP-UX runs *really* slowly unless shared libraries are mode 555.
3102
postinstall_cmds='chmod 555 $lib'
3105
irix5* | irix6* | nonstopux*)
3107
nonstopux*) version_type=nonstopux ;;
3108
*) version_type=irix ;;
3112
soname_spec='${libname}${release}.so$major'
3113
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
3115
irix5* | nonstopux*)
3119
case $LD in # libtool.m4 will add one of these switches to LD
3120
*-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
3121
*-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
3122
*-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
3123
*) libsuff= shlibsuff= libmagic=never-match;;
3127
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3128
shlibpath_overrides_runpath=no
3129
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3130
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3133
# No shared lib support for Linux oldld, aout, or coff.
3134
linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
3138
# This must be Linux ELF.
3143
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3144
soname_spec='${libname}${release}.so$major'
3145
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3146
shlibpath_var=LD_LIBRARY_PATH
3147
shlibpath_overrides_runpath=no
3148
# This implies no fast_install, which is unacceptable.
3149
# Some rework will be needed to allow for fast_install
3150
# before this can be enabled.
3151
hardcode_into_libs=yes
3153
# We used to test for /lib/ld.so.1 and disable shared libraries on
3154
# powerpc, because MkLinux only supported shared libraries with the
3155
# GNU dynamic linker. Since this was broken with cross compilers,
3156
# most powerpc-linux boxes support dynamic linking these days and
3157
# people can always --disable-shared, the test was removed, and we
3158
# assume the GNU/Linux dynamic linker is in use.
3159
dynamic_linker='GNU/Linux ld.so'
3166
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3167
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
3168
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3169
dynamic_linker='NetBSD (a.out) ld.so'
3171
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
3172
soname_spec='${libname}${release}.so$major'
3173
dynamic_linker='NetBSD ld.elf_so'
3175
shlibpath_var=LD_LIBRARY_PATH
3176
shlibpath_overrides_runpath=yes
3177
hardcode_into_libs=yes
3182
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3183
shlibpath_var=LD_LIBRARY_PATH
3184
shlibpath_overrides_runpath=yes
3191
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3193
openbsd2.[[89]] | openbsd2.[[89]].*)
3194
shlibpath_overrides_runpath=no
3197
shlibpath_overrides_runpath=yes
3201
shlibpath_overrides_runpath=yes
3203
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
3204
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3205
shlibpath_var=LD_LIBRARY_PATH
3209
libname_spec='$name'
3211
library_names_spec='$libname.dll $libname.a'
3212
dynamic_linker='OS/2 ld.exe'
3213
shlibpath_var=LIBPATH
3216
osf3* | osf4* | osf5*)
3219
soname_spec='${libname}${release}.so$major'
3220
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3221
shlibpath_var=LD_LIBRARY_PATH
3222
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3223
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3224
hardcode_into_libs=yes
3229
soname_spec='${libname}${release}.so$major'
3230
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3231
shlibpath_var=LD_LIBRARY_PATH
3238
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3239
soname_spec='${libname}${release}.so$major'
3240
shlibpath_var=LD_LIBRARY_PATH
3241
shlibpath_overrides_runpath=yes
3242
hardcode_into_libs=yes
3243
# ldd complains unless libraries are executable
3244
postinstall_cmds='chmod +x $lib'
3249
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
3250
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3251
shlibpath_var=LD_LIBRARY_PATH
3252
shlibpath_overrides_runpath=yes
3253
if test "$with_gnu_ld" = yes; then
3259
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
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
3264
case $host_vendor in
3266
shlibpath_overrides_runpath=no
3268
export_dynamic_flag_spec='${wl}-Blargedynsym'
3269
runpath_var=LD_RUN_PATH
3277
shlibpath_overrides_runpath=no
3278
sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3285
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3286
soname_spec='${libname}${release}.so$major'
3287
shlibpath_var=LD_LIBRARY_PATH
3294
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3295
soname_spec='${libname}${release}.so$major'
3296
shlibpath_var=LD_LIBRARY_PATH
3300
if test -d /usr/nec ;then
3302
library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
3303
soname_spec='$libname.so.$major'
3304
shlibpath_var=LD_LIBRARY_PATH
3312
AC_MSG_RESULT([$dynamic_linker])
3313
test "$dynamic_linker" = no && can_build_shared=no
3315
# Report the final consequences.
3316
AC_MSG_CHECKING([if libtool supports shared libraries])
3317
AC_MSG_RESULT([$can_build_shared])
3319
AC_MSG_CHECKING([whether to build shared libraries])
3320
test "$can_build_shared" = "no" && enable_shared=no
3322
# On AIX, shared libraries and static libraries use the same namespace, and
3323
# are all built from PIC.
3326
test "$enable_shared" = yes && enable_static=no
3327
if test -n "$RANLIB"; then
3328
archive_cmds="$archive_cmds~\$RANLIB \$lib"
3329
postinstall_cmds='$RANLIB $lib'
3334
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3335
test "$enable_shared" = yes && enable_static=no
3339
AC_MSG_RESULT([$enable_shared])
3341
AC_MSG_CHECKING([whether to build static libraries])
3342
# Make sure either enable_shared or enable_static is yes.
3343
test "$enable_shared" = yes || enable_static=yes
3344
AC_MSG_RESULT([$enable_static])
3346
if test "$hardcode_action" = relink; then
3347
# Fast installation is not supported
3348
enable_fast_install=no
3349
elif test "$shlibpath_overrides_runpath" = yes ||
3350
test "$enable_shared" = no; then
3351
# Fast installation is not necessary
3352
enable_fast_install=needless
3355
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3356
if test "$GCC" = yes; then
3357
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3360
AC_LIBTOOL_DLOPEN_SELF
3362
if test "$enable_shared" = yes && test "$GCC" = yes; then
3363
case $archive_cmds in
3365
# FIXME: we may have to deal with multi-command sequences.
3368
# Test whether the compiler implicitly links with -lc since on some
3369
# systems, -lgcc has to come before -lc. If gcc already passes -lc
3370
# to ld, don't add -lc before -lgcc.
3371
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
3372
AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
3374
echo 'static int dummy;' > conftest.$ac_ext
3376
if AC_TRY_EVAL(ac_compile); then
3379
libobjs=conftest.$ac_objext
3381
wl=$lt_cv_prog_cc_wl
3387
save_allow_undefined_flag=$allow_undefined_flag
3388
allow_undefined_flag=
3389
if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
3391
lt_cv_archive_cmds_need_lc=no
3393
lt_cv_archive_cmds_need_lc=yes
3395
allow_undefined_flag=$save_allow_undefined_flag
3397
cat conftest.err 1>&5
3399
AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
3403
need_lc=${lt_cv_archive_cmds_need_lc-yes}
3405
# The second clause should only fire when bootstrapping the
3406
# libtool distribution, otherwise you forgot to ship ltmain.sh
3407
# with your package, and you will get complaints that there are
3408
# no rules to generate ltmain.sh.
3409
if test -f "$ltmain"; then
3412
# If there is no Makefile yet, we rely on a make rule to execute
3413
# `config.status --recheck' to rerun these tests and create the
3414
# libtool script then.
3415
test -f Makefile && make "$ltmain"
3418
if test -f "$ltmain"; then
3419
trap "$rm \"${ofile}T\"; exit 1" 1 2 15
3422
echo creating $ofile
3424
# Now quote all the things that may contain metacharacters while being
3425
# careful not to overquote the AC_SUBSTed values. We take copies of the
3426
# variables and quote the copies for generation of the libtool script.
3427
for var in echo old_CC old_CFLAGS SED \
3428
AR AR_FLAGS CC LD LN_S NM SHELL \
3429
reload_flag reload_cmds wl \
3430
pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
3431
thread_safe_flag_spec whole_archive_flag_spec libname_spec \
3432
library_names_spec soname_spec \
3433
RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
3434
old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
3435
postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
3436
old_striplib striplib file_magic_cmd export_symbols_cmds \
3437
deplibs_check_method allow_undefined_flag no_undefined_flag \
3438
finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
3439
global_symbol_to_c_name_address \
3440
hardcode_libdir_flag_spec hardcode_libdir_separator \
3441
sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
3442
compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
3445
reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
3446
old_postinstall_cmds | old_postuninstall_cmds | \
3447
export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
3448
extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
3449
postinstall_cmds | postuninstall_cmds | \
3450
finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
3451
# Double-quote double-evaled strings.
3452
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
3455
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
3460
cat <<__EOF__ > "${ofile}T"
3463
# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
3464
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
3465
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
3467
# Copyright (C) 1996-2000 Free Software Foundation, Inc.
3468
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
3470
# This program is free software; you can redistribute it and/or modify
3471
# it under the terms of the GNU General Public License as published by
3472
# the Free Software Foundation; either version 2 of the License, or
3473
# (at your option) any later version.
3475
# This program is distributed in the hope that it will be useful, but
3476
# WITHOUT ANY WARRANTY; without even the implied warranty of
3477
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3478
# General Public License for more details.
3480
# You should have received a copy of the GNU General Public License
3481
# along with this program; if not, write to the Free Software
3482
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3484
# As a special exception to the GNU General Public License, if you
3485
# distribute this file as part of a program that contains a
3486
# configuration script generated by Autoconf, you may include it under
3487
# the same distribution terms that you use for the rest of that program.
3489
# A sed that does not truncate output.
3492
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
3493
Xsed="${SED} -e s/^X//"
3495
# The HP-UX ksh and POSIX shell print the target directory to stdout
3497
if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
3499
# ### BEGIN LIBTOOL CONFIG
3501
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3503
# Shell to use when invoking shell scripts.
3506
# Whether or not to build shared libraries.
3507
build_libtool_libs=$enable_shared
3509
# Whether or not to build static libraries.
3510
build_old_libs=$enable_static
3512
# Whether or not to add -lc for building shared libraries.
3513
build_libtool_need_lc=$need_lc
3515
# Whether or not to optimize for fast installation.
3516
fast_install=$enable_fast_install
3519
host_alias=$host_alias
3522
# An echo program that does not interpret backslashes.
3527
AR_FLAGS=$lt_AR_FLAGS
3529
# The default C compiler.
3532
# Is the compiler the GNU C compiler?
3535
# The linker used to build libraries.
3538
# Whether we need hard or soft links.
3541
# A BSD-compatible nm program.
3544
# A symbol stripping program
3547
# Used to examine libraries when file_magic_cmd begins "file"
3548
MAGIC_CMD=$MAGIC_CMD
3550
# Used on cygwin: DLL creation program.
3553
# Used on cygwin: object dumper.
3556
# Used on cygwin: assembler.
3559
# The name of the directory that contains temporary libtool files.
3562
# How to create reloadable object files.
3563
reload_flag=$lt_reload_flag
3564
reload_cmds=$lt_reload_cmds
3566
# How to pass a linker flag through the compiler.
3569
# Object file suffix (normally "o").
3572
# Old archive suffix (normally "a").
3575
# Executable file suffix (normally "").
3578
# Additional compiler flags for building library objects.
3579
pic_flag=$lt_pic_flag
3582
# Does compiler simultaneously support -c and -o options?
3583
compiler_c_o=$lt_compiler_c_o
3585
# Can we write directly to a .lo ?
3586
compiler_o_lo=$lt_compiler_o_lo
3588
# Must we lock files when doing compilation ?
3589
need_locks=$lt_need_locks
3591
# Do we need the lib prefix for modules?
3592
need_lib_prefix=$need_lib_prefix
3594
# Do we need a version for libraries?
3595
need_version=$need_version
3597
# Whether dlopen is supported.
3598
dlopen_support=$enable_dlopen
3600
# Whether dlopen of programs is supported.
3601
dlopen_self=$enable_dlopen_self
3603
# Whether dlopen of statically linked programs is supported.
3604
dlopen_self_static=$enable_dlopen_self_static
3606
# Compiler flag to prevent dynamic linking.
3607
link_static_flag=$lt_link_static_flag
3609
# Compiler flag to turn off builtin functions.
3610
no_builtin_flag=$lt_no_builtin_flag
3612
# Compiler flag to allow reflexive dlopens.
3613
export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
3615
# Compiler flag to generate shared objects directly from archives.
3616
whole_archive_flag_spec=$lt_whole_archive_flag_spec
3618
# Compiler flag to generate thread-safe objects.
3619
thread_safe_flag_spec=$lt_thread_safe_flag_spec
3621
# Library versioning type.
3622
version_type=$version_type
3624
# Format of library name prefix.
3625
libname_spec=$lt_libname_spec
3627
# List of archive names. First name is the real one, the rest are links.
3628
# The last name is the one that the linker finds with -lNAME.
3629
library_names_spec=$lt_library_names_spec
3631
# The coded name of the library, if different from the real name.
3632
soname_spec=$lt_soname_spec
3634
# Commands used to build and install an old-style archive.
3636
old_archive_cmds=$lt_old_archive_cmds
3637
old_postinstall_cmds=$lt_old_postinstall_cmds
3638
old_postuninstall_cmds=$lt_old_postuninstall_cmds
3640
# Create an old-style archive from a shared archive.
3641
old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
3643
# Create a temporary old-style archive to link instead of a shared archive.
3644
old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
3646
# Commands used to build and install a shared archive.
3647
archive_cmds=$lt_archive_cmds
3648
archive_expsym_cmds=$lt_archive_expsym_cmds
3649
postinstall_cmds=$lt_postinstall_cmds
3650
postuninstall_cmds=$lt_postuninstall_cmds
3652
# Commands to strip libraries.
3653
old_striplib=$lt_old_striplib
3654
striplib=$lt_striplib
3656
# Method to check whether dependent libraries are shared objects.
3657
deplibs_check_method=$lt_deplibs_check_method
3659
# Command to use when deplibs_check_method == file_magic.
3660
file_magic_cmd=$lt_file_magic_cmd
3662
# Flag that allows shared libraries with undefined symbols to be built.
3663
allow_undefined_flag=$lt_allow_undefined_flag
3665
# Flag that forces no undefined symbols.
3666
no_undefined_flag=$lt_no_undefined_flag
3668
# Commands used to finish a libtool library installation in a directory.
3669
finish_cmds=$lt_finish_cmds
3671
# Same as above, but a single script fragment to be evaled but not shown.
3672
finish_eval=$lt_finish_eval
3674
# Take the output of nm and produce a listing of raw symbols and C names.
3675
global_symbol_pipe=$lt_global_symbol_pipe
3677
# Transform the output of nm in a proper C declaration
3678
global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
3680
# Transform the output of nm in a C name address pair
3681
global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
3683
# This is the shared library runtime path variable.
3684
runpath_var=$runpath_var
3686
# This is the shared library path variable.
3687
shlibpath_var=$shlibpath_var
3689
# Is shlibpath searched before the hard-coded library search path?
3690
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
3692
# How to hardcode a shared library path into an executable.
3693
hardcode_action=$hardcode_action
3695
# Whether we should hardcode library paths into libraries.
3696
hardcode_into_libs=$hardcode_into_libs
3698
# Flag to hardcode \$libdir into a binary during linking.
3699
# This must work even if \$libdir does not exist.
3700
hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
3702
# Whether we need a single -rpath flag with a separated argument.
3703
hardcode_libdir_separator=$lt_hardcode_libdir_separator
3705
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
3707
hardcode_direct=$hardcode_direct
3709
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
3711
hardcode_minus_L=$hardcode_minus_L
3713
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
3714
# the resulting binary.
3715
hardcode_shlibpath_var=$hardcode_shlibpath_var
3717
# Variables whose values should be saved in libtool wrapper scripts and
3718
# restored at relink time.
3719
variables_saved_for_relink="$variables_saved_for_relink"
3721
# Whether libtool must link a program against all its dependency libraries.
3722
link_all_deplibs=$link_all_deplibs
3724
# Compile-time system search path for libraries
3725
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
3727
# Run-time system search path for libraries
3728
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
3730
# Fix the shell variable \$srcfile for the compiler.
3731
fix_srcfile_path="$fix_srcfile_path"
3733
# Set to yes if exported symbols are required.
3734
always_export_symbols=$always_export_symbols
3736
# The commands to list exported symbols.
3737
export_symbols_cmds=$lt_export_symbols_cmds
3739
# The commands to extract the exported symbol list from a shared archive.
3740
extract_expsyms_cmds=$lt_extract_expsyms_cmds
3742
# Symbols that should not be listed in the preloaded symbols.
3743
exclude_expsyms=$lt_exclude_expsyms
3745
# Symbols that must always be exported.
3746
include_expsyms=$lt_include_expsyms
3748
# ### END LIBTOOL CONFIG
3754
cat <<\EOF >> "${ofile}T"
3756
# AIX sometimes has problems with the GCC collect2 program. For some
3757
# reason, if we set the COLLECT_NAMES environment variable, the problems
3758
# vanish in a puff of smoke.
3759
if test "X${COLLECT_NAMES+set}" != Xset; then
3761
export COLLECT_NAMES
3768
cygwin* | mingw* | pw32* | os2*)
3769
cat <<'EOF' >> "${ofile}T"
3770
# This is a source program that is used to create dlls on Windows
3771
# Don't remove nor modify the starting and closing comments
3772
# /* ltdll.c starts here */
3773
# #define WIN32_LEAN_AND_MEAN
3774
# #include <windows.h>
3775
# #undef WIN32_LEAN_AND_MEAN
3776
# #include <stdio.h>
3778
# #ifndef __CYGWIN__
3779
# # ifdef __CYGWIN32__
3780
# # define __CYGWIN__ __CYGWIN32__
3784
# #ifdef __cplusplus
3787
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
3788
# #ifdef __cplusplus
3793
# #include <cygwin/cygwin_dll.h>
3794
# DECLARE_CYGWIN_DLL( DllMain );
3796
# HINSTANCE __hDllInstance_base;
3799
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
3801
# __hDllInstance_base = hInst;
3804
# /* ltdll.c ends here */
3805
# This is a source program that is used to create import libraries
3806
# on Windows for dlls which lack them. Don't remove nor modify the
3807
# starting and closing comments
3808
# /* impgen.c starts here */
3809
# /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
3811
# This file is part of GNU libtool.
3813
# This program is free software; you can redistribute it and/or modify
3814
# it under the terms of the GNU General Public License as published by
3815
# the Free Software Foundation; either version 2 of the License, or
3816
# (at your option) any later version.
3818
# This program is distributed in the hope that it will be useful,
3819
# but WITHOUT ANY WARRANTY; without even the implied warranty of
3820
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3821
# GNU General Public License for more details.
3823
# You should have received a copy of the GNU General Public License
3824
# along with this program; if not, write to the Free Software
3825
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3828
# #include <stdio.h> /* for printf() */
3829
# #include <unistd.h> /* for open(), lseek(), read() */
3830
# #include <fcntl.h> /* for O_RDONLY, O_BINARY */
3831
# #include <string.h> /* for strdup() */
3833
# /* O_BINARY isn't required (or even defined sometimes) under Unix */
3835
# #define O_BINARY 0
3838
# static unsigned int
3839
# pe_get16 (fd, offset)
3843
# unsigned char b[2];
3844
# lseek (fd, offset, SEEK_SET);
3846
# return b[0] + (b[1]<<8);
3849
# static unsigned int
3850
# pe_get32 (fd, offset)
3854
# unsigned char b[4];
3855
# lseek (fd, offset, SEEK_SET);
3857
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3860
# static unsigned int
3864
# unsigned char *b = ptr;
3865
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3874
# unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
3875
# unsigned long export_rva, export_size, nsections, secptr, expptr;
3876
# unsigned long name_rvas, nexp;
3877
# unsigned char *expdata, *erva;
3878
# char *filename, *dll_name;
3880
# filename = argv[1];
3882
# dll = open(filename, O_RDONLY|O_BINARY);
3886
# dll_name = filename;
3888
# for (i=0; filename[i]; i++)
3889
# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
3890
# dll_name = filename + i +1;
3892
# pe_header_offset = pe_get32 (dll, 0x3c);
3893
# opthdr_ofs = pe_header_offset + 4 + 20;
3894
# num_entries = pe_get32 (dll, opthdr_ofs + 92);
3896
# if (num_entries < 1) /* no exports */
3899
# export_rva = pe_get32 (dll, opthdr_ofs + 96);
3900
# export_size = pe_get32 (dll, opthdr_ofs + 100);
3901
# nsections = pe_get16 (dll, pe_header_offset + 4 +2);
3902
# secptr = (pe_header_offset + 4 + 20 +
3903
# pe_get16 (dll, pe_header_offset + 4 + 16));
3906
# for (i = 0; i < nsections; i++)
3909
# unsigned long secptr1 = secptr + 40 * i;
3910
# unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
3911
# unsigned long vsize = pe_get32 (dll, secptr1 + 16);
3912
# unsigned long fptr = pe_get32 (dll, secptr1 + 20);
3913
# lseek(dll, secptr1, SEEK_SET);
3914
# read(dll, sname, 8);
3915
# if (vaddr <= export_rva && vaddr+vsize > export_rva)
3917
# expptr = fptr + (export_rva - vaddr);
3918
# if (export_rva + export_size > vaddr + vsize)
3919
# export_size = vsize - (export_rva - vaddr);
3924
# expdata = (unsigned char*)malloc(export_size);
3925
# lseek (dll, expptr, SEEK_SET);
3926
# read (dll, expdata, export_size);
3927
# erva = expdata - export_rva;
3929
# nexp = pe_as32 (expdata+24);
3930
# name_rvas = pe_as32 (expdata+32);
3932
# printf ("EXPORTS\n");
3933
# for (i = 0; i<nexp; i++)
3935
# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
3936
# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
3941
# /* impgen.c ends here */
3947
# We use sed instead of cat because bash on DJGPP gets confused if
3948
# if finds mixed CR/LF and LF-only lines. Since sed operates in
3949
# text mode, it properly converts lines to CR/LF. This bash problem
3950
# is reportedly fixed, but why not run on old versions too?
3951
sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
3953
mv -f "${ofile}T" "$ofile" || \
3954
(rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
3958
])# _LT_AC_LTCONFIG_HACK
3960
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
3961
AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
3963
# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
3964
AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
3966
# AC_ENABLE_SHARED - implement the --enable-shared flag
3967
# Usage: AC_ENABLE_SHARED[(DEFAULT)]
3968
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3970
AC_DEFUN([AC_ENABLE_SHARED],
3971
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3972
AC_ARG_ENABLE(shared,
3973
changequote(<<, >>)dnl
3974
<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
3975
changequote([, ])dnl
3976
[p=${PACKAGE-default}
3978
yes) enable_shared=yes ;;
3979
no) enable_shared=no ;;
3982
# Look at the argument we got. We use all the common list separators.
3983
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3984
for pkg in $enableval; do
3985
if test "X$pkg" = "X$p"; then
3992
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
3995
# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
3996
AC_DEFUN([AC_DISABLE_SHARED],
3997
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3998
AC_ENABLE_SHARED(no)])
4000
# AC_ENABLE_STATIC - implement the --enable-static flag
4001
# Usage: AC_ENABLE_STATIC[(DEFAULT)]
4002
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
4004
AC_DEFUN([AC_ENABLE_STATIC],
4005
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
4006
AC_ARG_ENABLE(static,
4007
changequote(<<, >>)dnl
4008
<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
4009
changequote([, ])dnl
4010
[p=${PACKAGE-default}
4012
yes) enable_static=yes ;;
4013
no) enable_static=no ;;
4016
# Look at the argument we got. We use all the common list separators.
4017
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
4018
for pkg in $enableval; do
4019
if test "X$pkg" = "X$p"; then
4026
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
4029
# AC_DISABLE_STATIC - set the default static flag to --disable-static
4030
AC_DEFUN([AC_DISABLE_STATIC],
4031
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4032
AC_ENABLE_STATIC(no)])
4035
# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
4036
# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
4037
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
4039
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
4040
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
4041
AC_ARG_ENABLE(fast-install,
4042
changequote(<<, >>)dnl
4043
<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
4044
changequote([, ])dnl
4045
[p=${PACKAGE-default}
4047
yes) enable_fast_install=yes ;;
4048
no) enable_fast_install=no ;;
4050
enable_fast_install=no
4051
# Look at the argument we got. We use all the common list separators.
4052
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
4053
for pkg in $enableval; do
4054
if test "X$pkg" = "X$p"; then
4055
enable_fast_install=yes
4061
enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
4064
# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
4065
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
4066
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4067
AC_ENABLE_FAST_INSTALL(no)])
4069
# AC_LIBTOOL_PICMODE - implement the --with-pic flag
4070
# Usage: AC_LIBTOOL_PICMODE[(MODE)]
4071
# Where MODE is either `yes' or `no'. If omitted, it defaults to
4073
AC_DEFUN([AC_LIBTOOL_PICMODE],
4074
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4075
pic_mode=ifelse($#,1,$1,default)])
4078
# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
4079
AC_DEFUN([AC_PATH_TOOL_PREFIX],
4080
[AC_MSG_CHECKING([for $1])
4081
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
4084
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4087
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4090
ac_save_MAGIC_CMD="$MAGIC_CMD"
4091
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4092
dnl $ac_dummy forces splitting on constant user-supplied paths.
4093
dnl POSIX.2 word splitting is done only on the output of word expansions,
4094
dnl not every word. This closes a longstanding sh security hole.
4095
ac_dummy="ifelse([$2], , $PATH, [$2])"
4096
for ac_dir in $ac_dummy; do
4097
test -z "$ac_dir" && ac_dir=.
4098
if test -f $ac_dir/$1; then
4099
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
4100
if test -n "$file_magic_test_file"; then
4101
case $deplibs_check_method in
4103
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4104
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4105
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4106
egrep "$file_magic_regex" > /dev/null; then
4111
*** Warning: the command libtool uses to detect shared libraries,
4112
*** $file_magic_cmd, produces output that libtool cannot recognize.
4113
*** The result is that libtool may fail to recognize shared libraries
4114
*** as such. This will affect the creation of libtool libraries that
4115
*** depend on shared libraries, but programs linked with such libtool
4116
*** libraries will work regardless of this problem. Nevertheless, you
4117
*** may want to report the problem to your system manager and/or to
4118
*** bug-libtool@gnu.org
4128
MAGIC_CMD="$ac_save_MAGIC_CMD"
4131
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4132
if test -n "$MAGIC_CMD"; then
4133
AC_MSG_RESULT($MAGIC_CMD)
4140
# AC_PATH_MAGIC - find a file program which can recognise a shared library
4141
AC_DEFUN([AC_PATH_MAGIC],
4142
[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
4143
AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
4144
if test -z "$lt_cv_path_MAGIC_CMD"; then
4145
if test -n "$ac_tool_prefix"; then
4146
AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
4154
# AC_PROG_LD - find the path to the GNU or non-GNU linker
4155
AC_DEFUN([AC_PROG_LD],
4156
[AC_ARG_WITH(gnu-ld,
4157
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
4158
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
4159
AC_REQUIRE([AC_PROG_CC])dnl
4160
AC_REQUIRE([AC_CANONICAL_HOST])dnl
4161
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4162
AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
4164
if test "$GCC" = yes; then
4165
# Check if gcc -print-prog-name=ld gives a path.
4166
AC_MSG_CHECKING([for ld used by GCC])
4169
# gcc leaves a trailing carriage return which upsets mingw
4170
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4172
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4175
# Accept absolute paths.
4176
[[\\/]]* | [[A-Za-z]]:[[\\/]]*)
4177
re_direlt='/[[^/]][[^/]]*/\.\./'
4178
# Canonicalize the path of ld
4179
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
4180
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
4181
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
4183
test -z "$LD" && LD="$ac_prog"
4186
# If it fails, then pretend we aren't using GCC.
4190
# If it is relative, then search for the first ld in PATH.
4194
elif test "$with_gnu_ld" = yes; then
4195
AC_MSG_CHECKING([for GNU ld])
4197
AC_MSG_CHECKING([for non-GNU ld])
4199
AC_CACHE_VAL(lt_cv_path_LD,
4200
[if test -z "$LD"; then
4201
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4202
for ac_dir in $PATH; do
4203
test -z "$ac_dir" && ac_dir=.
4204
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4205
lt_cv_path_LD="$ac_dir/$ac_prog"
4206
# Check to see if the program is GNU ld. I'd rather use --version,
4207
# but apparently some GNU ld's only accept -v.
4208
# Break only if it was the GNU/non-GNU ld that we prefer.
4209
if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
4210
test "$with_gnu_ld" != no && break
4212
test "$with_gnu_ld" != yes && break
4218
lt_cv_path_LD="$LD" # Let the user override the test with a path.
4221
if test -n "$LD"; then
4226
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4231
AC_DEFUN([AC_PROG_LD_GNU],
4232
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4233
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
4234
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
4235
lt_cv_prog_gnu_ld=yes
4237
lt_cv_prog_gnu_ld=no
4239
with_gnu_ld=$lt_cv_prog_gnu_ld
4242
# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
4243
# -- PORTME Some linkers may need a different reload flag.
4244
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
4245
[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
4246
[lt_cv_ld_reload_flag='-r'])
4247
reload_flag=$lt_cv_ld_reload_flag
4248
test -n "$reload_flag" && reload_flag=" $reload_flag"
4251
# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
4252
# -- PORTME fill in with the dynamic library characteristics
4253
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
4254
[AC_CACHE_CHECK([how to recognise dependent libraries],
4255
lt_cv_deplibs_check_method,
4256
[lt_cv_file_magic_cmd='$MAGIC_CMD'
4257
lt_cv_file_magic_test_file=
4258
lt_cv_deplibs_check_method='unknown'
4259
# Need to set the preceding variable on all platforms that support
4260
# interlibrary dependencies.
4261
# 'none' -- dependencies not supported.
4262
# `unknown' -- same as none, but documents that we really don't know.
4263
# 'pass_all' -- all dependencies passed with no checks.
4264
# 'test_compile' -- check by making test program.
4265
# 'file_magic [[regex]]' -- check by looking for files in library path
4266
# which responds to the $file_magic_cmd with a given egrep regex.
4267
# If you have `file' or equivalent on your system and you're not sure
4268
# whether `pass_all' will *always* work, you probably want this one.
4272
lt_cv_deplibs_check_method=pass_all
4276
lt_cv_deplibs_check_method=pass_all
4280
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4281
lt_cv_file_magic_cmd='/usr/bin/file -L'
4282
lt_cv_file_magic_test_file=/shlib/libc.so
4285
cygwin* | mingw* | pw32*)
4286
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
4287
lt_cv_file_magic_cmd='$OBJDUMP -f'
4290
darwin* | rhapsody*)
4291
lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
4292
lt_cv_file_magic_cmd='/usr/bin/file -L'
4294
rhapsody* | darwin1.[[012]])
4295
lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
4298
lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
4304
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4307
# Not sure whether the presence of OpenBSD here was a mistake.
4308
# Let's accept both of them until this is cleared up.
4309
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
4310
lt_cv_file_magic_cmd=/usr/bin/file
4311
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4315
lt_cv_deplibs_check_method=pass_all
4320
lt_cv_deplibs_check_method=pass_all
4324
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
4325
lt_cv_file_magic_cmd=/usr/bin/file
4326
lt_cv_file_magic_test_file=/usr/lib/libc.sl
4329
irix5* | irix6* | nonstopux*)
4331
irix5* | nonstopux*)
4332
# this will be overridden with pass_all, but let us keep it just in case
4333
lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
4337
*-32|*"-32 ") libmagic=32-bit;;
4338
*-n32|*"-n32 ") libmagic=N32;;
4339
*-64|*"-64 ") libmagic=64-bit;;
4340
*) libmagic=never-match;;
4342
# this will be overridden with pass_all, but let us keep it just in case
4343
lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
4346
lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
4347
lt_cv_deplibs_check_method=pass_all
4350
# This must be Linux ELF.
4353
alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
4354
lt_cv_deplibs_check_method=pass_all ;;
4356
# glibc up to 2.1.1 does not perform some relocations on ARM
4357
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
4359
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
4363
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4364
lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
4366
lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
4371
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4372
lt_cv_file_magic_cmd=/usr/bin/file
4373
lt_cv_file_magic_test_file=/usr/lib/libnls.so
4377
lt_cv_file_magic_cmd=/usr/bin/file
4378
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4379
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4380
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
4382
lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
4386
osf3* | osf4* | osf5*)
4387
# this will be overridden with pass_all, but let us keep it just in case
4388
lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
4389
lt_cv_file_magic_test_file=/shlib/libc.so
4390
lt_cv_deplibs_check_method=pass_all
4394
lt_cv_deplibs_check_method=pass_all
4398
lt_cv_deplibs_check_method=pass_all
4399
lt_cv_file_magic_test_file=/lib/libc.so
4402
sysv5uw[[78]]* | sysv4*uw2*)
4403
lt_cv_deplibs_check_method=pass_all
4406
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4407
case $host_vendor in
4409
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]]'
4410
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4413
lt_cv_deplibs_check_method=pass_all
4416
lt_cv_file_magic_cmd='/bin/file'
4417
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4420
lt_cv_file_magic_cmd='/bin/file'
4421
lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4422
lt_cv_file_magic_test_file=/lib/libc.so
4425
lt_cv_deplibs_check_method=pass_all
4431
file_magic_cmd=$lt_cv_file_magic_cmd
4432
deplibs_check_method=$lt_cv_deplibs_check_method
4436
# AC_PROG_NM - find the path to a BSD-compatible name lister
4437
AC_DEFUN([AC_PROG_NM],
4438
[AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
4439
AC_MSG_CHECKING([for BSD-compatible nm])
4440
AC_CACHE_VAL(lt_cv_path_NM,
4441
[if test -n "$NM"; then
4442
# Let the user override the test.
4445
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4446
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
4447
test -z "$ac_dir" && ac_dir=.
4448
tmp_nm=$ac_dir/${ac_tool_prefix}nm
4449
if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
4450
# Check to see if the nm accepts a BSD-compat flag.
4451
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
4452
# nm: unknown option "B" ignored
4453
# Tru64's nm complains that /dev/null is an invalid object file
4454
if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
4455
lt_cv_path_NM="$tmp_nm -B"
4457
elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
4458
lt_cv_path_NM="$tmp_nm -p"
4461
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4462
continue # so that we can try to find one that supports BSD flags
4467
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
4470
AC_MSG_RESULT([$NM])
4473
# AC_CHECK_LIBM - check for math library
4474
AC_DEFUN([AC_CHECK_LIBM],
4475
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4478
*-*-beos* | *-*-cygwin* | *-*-pw32*)
4479
# These system don't have libm
4482
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4483
AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
4486
AC_CHECK_LIB(m, main, LIBM="-lm")
4491
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
4492
# the libltdl convenience library and LTDLINCL to the include flags for
4493
# the libltdl header and adds --enable-ltdl-convenience to the
4494
# configure arguments. Note that LIBLTDL and LTDLINCL are not
4495
# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
4496
# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
4497
# with '${top_builddir}/' and LTDLINCL will be prefixed with
4498
# '${top_srcdir}/' (note the single quotes!). If your package is not
4499
# flat and you're not using automake, define top_builddir and
4500
# top_srcdir appropriately in the Makefiles.
4501
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
4502
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4503
case $enable_ltdl_convenience in
4504
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
4505
"") enable_ltdl_convenience=yes
4506
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
4508
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
4509
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4510
# For backwards non-gettext consistent compatibility...
4514
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
4515
# the libltdl installable library and LTDLINCL to the include flags for
4516
# the libltdl header and adds --enable-ltdl-install to the configure
4517
# arguments. Note that LIBLTDL and LTDLINCL are not AC_SUBSTed, nor is
4518
# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
4519
# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
4520
# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed
4521
# with '${top_srcdir}/' (note the single quotes!). If your package is
4522
# not flat and you're not using automake, define top_builddir and
4523
# top_srcdir appropriately in the Makefiles.
4524
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
4525
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
4526
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4527
AC_CHECK_LIB(ltdl, main,
4528
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
4529
[if test x"$enable_ltdl_install" = xno; then
4530
AC_MSG_WARN([libltdl not installed, but installation disabled])
4532
enable_ltdl_install=yes
4535
if test x"$enable_ltdl_install" = x"yes"; then
4536
ac_configure_args="$ac_configure_args --enable-ltdl-install"
4537
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
4538
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4540
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
4544
# For backwards non-gettext consistent compatibility...
4549
AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
4550
AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
4551
AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
4552
AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
4553
AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
4554
AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
4555
AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
4557
# This is just to silence aclocal about the macro not being used
4558
ifelse([AC_DISABLE_FAST_INSTALL])
4560
# NOTE: This macro has been submitted for inclusion into #
4561
# GNU Autoconf as AC_PROG_SED. When it is available in #
4562
# a released version of Autoconf we should remove this #
4563
# macro and use it instead. #
4566
# Check for a fully-functional sed program, that truncates
4567
# as few characters as possible. Prefer GNU sed if found.
4568
AC_DEFUN([LT_AC_PROG_SED],
4569
[AC_MSG_CHECKING([for a sed that does not truncate output])
4570
AC_CACHE_VAL(lt_cv_path_SED,
4571
[# Loop through the user's path and test for sed and gsed.
4572
# Then use that list of sed's as ones to test for truncation.
4573
as_executable_p="test -f"
4574
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4578
test -z "$as_dir" && as_dir=.
4579
for ac_prog in sed gsed; do
4580
for ac_exec_ext in '' $ac_executable_extensions; do
4581
if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
4582
_sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
4588
# Create a temporary directory, and hook for its removal unless debugging.
4591
trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
4592
trap '{ (exit 1); exit 1; }' 1 2 13 15
4595
# Create a (secure) tmp directory for tmp files.
4598
tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
4599
test -n "$tmp" && test -d "$tmp"
4602
tmp=$TMPDIR/sed$$-$RANDOM
4603
(umask 077 && mkdir $tmp)
4606
echo "$me: cannot create a temporary directory in $TMPDIR" >&2
4607
{ (exit 1); exit 1; }
4611
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
4612
# along with /bin/sed that truncates output.
4613
for _sed in $_sed_list /usr/xpg4/bin/sed; do
4614
test ! -f ${_sed} && break
4615
cat /dev/null > "$tmp/sed.in"
4617
echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
4618
# Check for GNU sed and select it if it is found.
4619
if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
4620
lt_cv_path_SED=${_sed}
4624
cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
4625
mv "$tmp/sed.tmp" "$tmp/sed.in"
4626
cp "$tmp/sed.in" "$tmp/sed.nl"
4627
echo >>"$tmp/sed.nl"
4628
${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
4629
cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
4630
# 40000 chars as input seems more than enough
4631
test $_count -gt 10 && break
4632
_count=`expr $_count + 1`
4633
if test $_count -gt $_max; then
4635
lt_cv_path_SED=$_sed
4641
if test "X$SED" != "X"; then
4646
AC_MSG_RESULT([$SED])
4649
# Macros that test various C library quirks
4650
# $Header: /cvsroot/pgsql-server/config/c-library.m4,v 1.23 2003/07/23 23:30:39 tgl Exp $
4653
# PGAC_VAR_INT_TIMEZONE
4654
# ---------------------
4655
# Check if the global variable `timezone' exists. If so, define
4656
# HAVE_INT_TIMEZONE.
4657
AC_DEFUN([PGAC_VAR_INT_TIMEZONE],
4658
[AC_CACHE_CHECK(for int timezone, pgac_cv_var_int_timezone,
4659
[AC_TRY_LINK([#include <time.h>
4661
[res = timezone / 60;],
4662
[pgac_cv_var_int_timezone=yes],
4663
[pgac_cv_var_int_timezone=no])])
4664
if test x"$pgac_cv_var_int_timezone" = xyes ; then
4665
AC_DEFINE(HAVE_INT_TIMEZONE,, [Define to 1 if you have the global variable 'int timezone'.])
4666
fi])# PGAC_VAR_INT_TIMEZONE
4669
# PGAC_STRUCT_TIMEZONE
4670
# ------------------
4671
# Figure out how to get the current timezone. If `struct tm' has a
4672
# `tm_zone' member, define `HAVE_TM_ZONE'. Also, if the
4673
# external array `tzname' is found, define `HAVE_TZNAME'.
4674
# This is the same as the standard macro AC_STRUCT_TIMEZONE, except that
4675
# tzname[] is checked for regardless of whether we find tm_zone.
4676
AC_DEFUN([PGAC_STRUCT_TIMEZONE],
4677
[AC_REQUIRE([AC_STRUCT_TM])dnl
4678
AC_CHECK_MEMBERS([struct tm.tm_zone],,,[#include <sys/types.h>
4679
#include <$ac_cv_struct_tm>
4681
if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
4682
AC_DEFINE(HAVE_TM_ZONE, 1,
4683
[Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use
4684
`HAVE_STRUCT_TM_TM_ZONE' instead.])
4686
AC_CACHE_CHECK(for tzname, ac_cv_var_tzname,
4689
#ifndef tzname /* For SGI. */
4690
extern char *tzname[]; /* RS6000 and others reject char **tzname. */
4693
[atoi(*tzname);], ac_cv_var_tzname=yes, ac_cv_var_tzname=no)])
4694
if test $ac_cv_var_tzname = yes; then
4695
AC_DEFINE(HAVE_TZNAME, 1,
4696
[Define to 1 if you have the external array `tzname'.])
4698
])# PGAC_STRUCT_TIMEZONE
4701
# PGAC_FUNC_GETTIMEOFDAY_1ARG
4702
# ---------------------------
4703
# Check if gettimeofday() has only one arguments. (Normal is two.)
4704
# If so, define GETTIMEOFDAY_1ARG.
4705
AC_DEFUN([PGAC_FUNC_GETTIMEOFDAY_1ARG],
4706
[AC_CACHE_CHECK(whether gettimeofday takes only one argument,
4707
pgac_cv_func_gettimeofday_1arg,
4708
[AC_TRY_COMPILE([#include <sys/time.h>],
4709
[struct timeval *tp;
4710
struct timezone *tzp;
4711
gettimeofday(tp,tzp);],
4712
[pgac_cv_func_gettimeofday_1arg=no],
4713
[pgac_cv_func_gettimeofday_1arg=yes])])
4714
if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
4715
AC_DEFINE(GETTIMEOFDAY_1ARG,, [Define to 1 if gettimeofday() takes only 1 argument.])
4717
AH_VERBATIM(GETTIMEOFDAY_1ARG_,
4718
[@%:@ifdef GETTIMEOFDAY_1ARG
4719
@%:@ define gettimeofday(a,b) gettimeofday(a)
4721
])# PGAC_FUNC_GETTIMEOFDAY_1ARG
4726
# Check if `union semun' exists. Define HAVE_UNION_SEMUN if so.
4727
# If it doesn't then one could define it as
4728
# union semun { int val; struct semid_ds *buf; unsigned short *array; }
4729
AC_DEFUN([PGAC_UNION_SEMUN],
4730
[AC_CHECK_TYPES([union semun], [], [],
4731
[#include <sys/types.h>
4732
#include <sys/ipc.h>
4733
#include <sys/sem.h>])])# PGAC_UNION_SEMUN
4736
# PGAC_STRUCT_SOCKADDR_UN
4737
# -----------------------
4738
# If `struct sockaddr_un' exists, define HAVE_UNIX_SOCKETS.
4739
# (Requires test for <sys/un.h>!)
4740
AC_DEFUN([PGAC_STRUCT_SOCKADDR_UN],
4741
[AC_CHECK_TYPES([struct sockaddr_un], [AC_DEFINE(HAVE_UNIX_SOCKETS, 1, [Define to 1 if you have unix sockets.])], [],
4742
[#include <sys/types.h>
4743
#ifdef HAVE_SYS_UN_H
4746
])])# PGAC_STRUCT_SOCKADDR_UN
4749
# PGAC_STRUCT_SOCKADDR_STORAGE
4750
# ----------------------------
4751
# If `struct sockaddr_storage' exists, define HAVE_STRUCT_SOCKADDR_STORAGE.
4752
# If it is missing then one could define it.
4753
AC_DEFUN([PGAC_STRUCT_SOCKADDR_STORAGE],
4754
[AC_CHECK_TYPES([struct sockaddr_storage], [], [],
4755
[#include <sys/types.h>
4756
#ifdef HAVE_SYS_SOCKET_H
4757
#include <sys/socket.h>
4759
])])# PGAC_STRUCT_SOCKADDR_STORAGE
4761
# PGAC_STRUCT_SOCKADDR_STORAGE_MEMBERS
4762
# --------------------------------------
4763
# Check the members of `struct sockaddr_storage'. We need to know about
4764
# ss_family and ss_len. (Some platforms follow RFC 2553 and call them
4765
# __ss_family and __ss_len.) We also check struct sockaddr's sa_len;
4766
# if we have to define our own `struct sockaddr_storage', this tells us
4767
# whether we need to provide an ss_len field.
4768
AC_DEFUN([PGAC_STRUCT_SOCKADDR_STORAGE_MEMBERS],
4769
[AC_CHECK_MEMBERS([struct sockaddr_storage.ss_family,
4770
struct sockaddr_storage.__ss_family,
4771
struct sockaddr_storage.ss_len,
4772
struct sockaddr_storage.__ss_len,
4773
struct sockaddr.sa_len], [], [],
4774
[#include <sys/types.h>
4775
#ifdef HAVE_SYS_SOCKET_H
4776
#include <sys/socket.h>
4778
])])# PGAC_STRUCT_SOCKADDR_STORAGE_MEMBERS
4781
# PGAC_STRUCT_ADDRINFO
4782
# -----------------------
4783
# If `struct addrinfo' exists, define HAVE_STRUCT_ADDRINFO.
4784
AC_DEFUN([PGAC_STRUCT_ADDRINFO],
4785
[AC_CHECK_TYPES([struct addrinfo], [], [],
4786
[#include <sys/types.h>
4787
#include <sys/socket.h>
4789
])])# PGAC_STRUCT_ADDRINFO
4792
# PGAC_FUNC_POSIX_SIGNALS
4793
# -----------------------
4794
# Check to see if the machine has the POSIX signal interface. Define
4795
# HAVE_POSIX_SIGNALS if so. Also set the output variable HAVE_POSIX_SIGNALS
4798
# Note that this test only compiles a test program, it doesn't check
4799
# whether the routines actually work. If that becomes a problem, make
4801
AC_DEFUN([PGAC_FUNC_POSIX_SIGNALS],
4802
[AC_CACHE_CHECK(for POSIX signal interface, pgac_cv_func_posix_signals,
4803
[AC_TRY_LINK([#include <signal.h>
4805
[struct sigaction act, oact;
4806
sigemptyset(&act.sa_mask);
4807
act.sa_flags = SA_RESTART;
4808
sigaction(0, &act, &oact);],
4809
[pgac_cv_func_posix_signals=yes],
4810
[pgac_cv_func_posix_signals=no])])
4811
if test x"$pgac_cv_func_posix_signals" = xyes ; then
4812
AC_DEFINE(HAVE_POSIX_SIGNALS,, [Define to 1 if you have the POSIX signal interface.])
4814
HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
4815
AC_SUBST(HAVE_POSIX_SIGNALS)])# PGAC_FUNC_POSIX_SIGNALS
4818
# PGAC_FUNC_SNPRINTF_LONG_LONG_INT_FORMAT
4819
# ---------------------------------------
4820
# Determine which format snprintf uses for long long int. We handle
4821
# %lld, %qd, %I64d. The result is in shell variable
4822
# LONG_LONG_INT_FORMAT.
4823
AC_DEFUN([PGAC_FUNC_SNPRINTF_LONG_LONG_INT_FORMAT],
4824
[AC_MSG_CHECKING([snprintf format for long long int])
4825
AC_CACHE_VAL(pgac_cv_snprintf_long_long_int_format,
4826
[for pgac_format in '%lld' '%qd' '%I64d'; do
4827
AC_TRY_RUN([#include <stdio.h>
4828
typedef long long int int64;
4829
#define INT64_FORMAT "$pgac_format"
4834
int does_int64_snprintf_work()
4839
if (sizeof(int64) != 8)
4840
return 0; /* doesn't look like the right size */
4843
snprintf(buf, 100, INT64_FORMAT, c);
4844
if (strcmp(buf, "800000140000005") != 0)
4845
return 0; /* either multiply or snprintf is busted */
4849
exit(! does_int64_snprintf_work());
4851
[pgac_cv_snprintf_long_long_int_format=$pgac_format; break],
4853
[pgac_cv_snprintf_long_long_int_format=cross; break])
4854
done])dnl AC_CACHE_VAL
4856
LONG_LONG_INT_FORMAT=''
4858
case $pgac_cv_snprintf_long_long_int_format in
4859
cross) AC_MSG_RESULT([cannot test (not on host machine)]);;
4860
?*) AC_MSG_RESULT([$pgac_cv_snprintf_long_long_int_format])
4861
LONG_LONG_INT_FORMAT=$pgac_cv_snprintf_long_long_int_format;;
4862
*) AC_MSG_RESULT(none);;
4863
esac])# PGAC_FUNC_SNPRINTF_LONG_LONG_INT_FORMAT