1
# aclocal.m4 generated automatically by aclocal 1.5
3
# Copyright 1996, 1997, 1998, 1999, 2000, 2001
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
dnl @synopsis ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
16
dnl This macro figures out how to build C programs using POSIX
17
dnl threads. It sets the PTHREAD_LIBS output variable to the threads
18
dnl library and linker flags, and the PTHREAD_CFLAGS output variable
19
dnl to any special C compiler flags that are needed. (The user can also
20
dnl force certain compiler flags/libs to be tested by setting these
21
dnl environment variables.)
23
dnl Also sets PTHREAD_CC to any special C compiler that is needed for
24
dnl multi-threaded programs (defaults to the value of CC otherwise).
25
dnl (This is necessary on AIX to use the special cc_r compiler alias.)
27
dnl If you are only building threads programs, you may wish to
28
dnl use these variables in your default LIBS, CFLAGS, and CC:
30
dnl LIBS="$PTHREAD_LIBS $LIBS"
31
dnl CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
32
dnl LDFLAGS="$LDFLAGS $PTHREAD_LDFLAGS"
35
dnl In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute
36
dnl constant has a nonstandard name, defines PTHREAD_CREATE_JOINABLE
37
dnl to that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
39
dnl ACTION-IF-FOUND is a list of shell commands to run if a threads
40
dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands
41
dnl to run it if it is not found. If ACTION-IF-FOUND is not specified,
42
dnl the default action will define HAVE_PTHREAD.
44
dnl Please let the authors know if this macro fails on any platform,
45
dnl or if you have any other suggestions or comments. This macro was
46
dnl based on work by SGJ on autoconf scripts for FFTW (www.fftw.org)
47
dnl (with help from M. Frigo), as well as ac_pthread and hb_pthread
48
dnl macros posted by AFC to the autoconf macro repository. We are also
49
dnl grateful for the helpful feedback of numerous users.
51
dnl @version $Id: acinclude.m4,v 1.6 2001/10/17 07:19:14 brian Exp $
52
dnl @author Steven G. Johnson <stevenj@alum.mit.edu> and Alejandro Forero Cuervo <bachue@bachue.com>
54
AC_DEFUN([ACX_PTHREAD], [
55
AC_REQUIRE([AC_CANONICAL_HOST])
58
# First, check if the POSIX threads header, pthread.h, is available.
59
# If it isn't, don't bother looking for the threads libraries.
60
AC_CHECK_HEADER(pthread.h, , acx_pthread_ok=noheader)
62
# We must check for the threads library under a number of different
63
# names; the ordering is very important because some systems
64
# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
65
# libraries is broken (non-POSIX).
67
# First of all, check if the user has set any of the PTHREAD_LIBS,
68
# etcetera environment variables, and if threads linking works using
70
if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS$PTHREAD_LDFLAGS" != x; then
72
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
73
save_LDFLAGS="$LDFLAGS"
74
LDFLAGS="$LDFLAGS $PTHREAD_LDFLAGS"
76
LIBS="$PTHREAD_LIBS $LIBS"
77
AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS with LDFLAGS=$PTHREAD_LDFLAGS])
78
AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes)
79
AC_MSG_RESULT($acx_pthread_ok)
80
if test x"$acx_pthread_ok" = xno; then
87
LDFLAGS="$save_LDFLAGS"
90
# Create a list of thread flags to try. Items starting with a "-" are
91
# C compiler flags, and other items are library names, except for "none"
92
# which indicates that we try without any flags at all.
94
acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt"
96
# The ordering *is* (sometimes) important. Some notes on the
97
# individual items follow:
99
# pthreads: AIX (must check this before -lpthread)
100
# none: in case threads are in libc; should be tried before -Kthread and
101
# other compiler flags to prevent continual compiler warnings
102
# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
103
# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
104
# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
105
# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
106
# -pthreads: Solaris/gcc
107
# -mthreads: Mingw32/gcc, Lynx/gcc
108
# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
109
# doesn't hurt to check since this sometimes defines pthreads too;
110
# also defines -D_REENTRANT)
111
# pthread: Linux, etcetera
112
# --thread-safe: KAI C++
114
case "${host_cpu}-${host_os}" in
117
# On Solaris (at least, for some versions), libc contains stubbed
118
# (non-functional) versions of the pthreads routines, so link-based
119
# tests will erroneously succeed. (We need to link with -pthread or
120
# -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
121
# a function called by this macro, so we could check for that, but
122
# who knows whether they'll stub that too in a future libc.) So,
123
# we'll just look for -pthreads and -lpthread first:
125
acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
129
if test x"$acx_pthread_ok" = xno; then
130
for flag in $acx_pthread_flags; do
134
AC_MSG_CHECKING([whether pthreads work without any flags])
138
AC_MSG_CHECKING([whether pthreads work with $flag])
139
PTHREAD_CFLAGS="$flag"
140
PTHREAD_LDFLAGS="$flag"
144
AC_MSG_CHECKING([for the pthreads library -l$flag])
145
PTHREAD_LIBS="-l$flag"
150
LIBS="$PTHREAD_LIBS $LIBS"
151
save_CFLAGS="$CFLAGS"
152
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
153
save_LDFLAGS="$LDFLAGS"
154
LDFLAGS="$LDFLAGS $PTHREAD_LDFLAGS"
156
# Check for various functions. We must include pthread.h,
157
# since some functions may be macros. (On the Sequent, we
158
# need a special flag -Kthread to make this header compile.)
159
# We check for pthread_join because it is in -lpthread on IRIX
160
# while pthread_create is in libc. We check for pthread_attr_init
161
# due to DEC craziness with -lpthreads. We check for
162
# pthread_cleanup_push because it is one of the few pthread
163
# functions on Solaris that doesn't have a non-functional libc stub.
164
# We try pthread_create on general principles.
165
AC_TRY_LINK([#include <pthread.h>],
166
[pthread_t th; pthread_join(th, 0);
167
pthread_attr_init(0); pthread_cleanup_push(0, 0);
168
pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
169
[acx_pthread_ok=yes])
172
CFLAGS="$save_CFLAGS"
173
LDFLAGS="$save_LDFLAGS"
175
AC_MSG_RESULT($acx_pthread_ok)
176
if test "x$acx_pthread_ok" = xyes; then
186
# Various other checks:
187
if test "x$acx_pthread_ok" = xyes; then
189
LIBS="$PTHREAD_LIBS $LIBS"
190
save_CFLAGS="$CFLAGS"
191
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
192
save_LDFLAGS="$LDFLAGS"
193
LDFLAGS="$LDFLAGS $PTHREAD_LDFLAGS"
195
# Detect AIX lossage: threads are created detached by default
196
# and the JOINABLE attribute has a nonstandard name (UNDETACHED).
197
AC_MSG_CHECKING([for joinable pthread attribute])
198
AC_TRY_LINK([#include <pthread.h>],
199
[int attr=PTHREAD_CREATE_JOINABLE;],
200
ok=PTHREAD_CREATE_JOINABLE, ok=unknown)
201
if test x"$ok" = xunknown; then
202
AC_TRY_LINK([#include <pthread.h>],
203
[int attr=PTHREAD_CREATE_UNDETACHED;],
204
ok=PTHREAD_CREATE_UNDETACHED, ok=unknown)
206
if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
207
AC_DEFINE(PTHREAD_CREATE_JOINABLE, $ok,
208
[Define to the necessary symbol if this constant
209
uses a non-standard name on your system.])
212
if test x"$ok" = xunknown; then
213
AC_MSG_WARN([we do not know how to create joinable pthreads])
216
AC_MSG_CHECKING([if more special flags are required for pthreads])
218
case "${host_cpu}-${host_os}" in
219
*-aix* | *-freebsd*) flag="-D_THREAD_SAFE";;
220
*solaris* | alpha*-osf*) flag="-D_REENTRANT";;
222
AC_MSG_RESULT(${flag})
223
if test "x$flag" != xno; then
224
PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
228
CFLAGS="$save_CFLAGS"
229
LDFLAGS="$save_LDFLAGS"
231
# More AIX lossage: must compile with cc_r
232
AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC})
237
AC_SUBST(PTHREAD_LIBS)
238
AC_SUBST(PTHREAD_CFLAGS)
239
AC_SUBST(PTHREAD_LDFLAGS)
242
# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
243
if test x"$acx_pthread_ok" = xyes; then
244
ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
252
dnl @synopsis ACX_WHICH_GETHOSTBYNAME_R
254
dnl Provides a test to determine the correct way to call gethostbyname_r
256
dnl defines HAVE_GETHOSTBYNAME_R to the number of arguments required
258
dnl e.g. 6 arguments (linux)
259
dnl e.g. 5 arguments (solaris)
260
dnl e.g. 3 arguments (osf/1)
262
dnl @version $Id: acinclude.m4,v 1.6 2001/10/17 07:19:14 brian Exp $
263
dnl @author Brian Stafford <brian@stafford.uklinux.net>
265
dnl based on version by Caolan McNamara <caolan@skynet.ie>
266
dnl based on David Arnold's autoconf suggestion in the threads faq
268
AC_DEFUN(ACX_WHICH_GETHOSTBYNAME_R,
269
[AC_CACHE_CHECK(number of arguments to gethostbyname_r,
270
acx_which_gethostbyname_r, [
277
struct hostent_data data;
278
(void) gethostbyname_r(name, he, &data);
280
],acx_which_gethostbyname_r=3,
282
dnl acx_which_gethostbyname_r=0
287
struct hostent *he, *res;
291
(void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
292
],acx_which_gethostbyname_r=6,
295
dnl acx_which_gethostbyname_r=0
304
(void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
305
],acx_which_gethostbyname_r=5,acx_which_gethostbyname_r=0)
314
if test $acx_which_gethostbyname_r -gt 0 ; then
315
AC_DEFINE_UNQUOTED([HAVE_GETHOSTBYNAME_R], $acx_which_gethostbyname_r,
316
[Number of parameters to gethostbyname_r or 0 if not available])
320
dnl @synopsis ACX_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION])
322
dnl This macro _AC_DEFINEs VARNAME to the expansion of the DIR
323
dnl variable, taking care of fixing up ${prefix} and such.
325
dnl Note that the 3 argument form is only supported with autoconf 2.13 and
326
dnl later (i.e. only where _AC_DEFINE supports 3 arguments).
330
dnl ACX_DEFINE_DIR(DATADIR, datadir)
331
dnl ACX_DEFINE_DIR(PROG_PATH, bindir, [Location of installed binaries])
333
dnl @version $Id: acinclude.m4,v 1.6 2001/10/17 07:19:14 brian Exp $
334
dnl @author Guido Draheim <guidod@gmx.de>, original by Alexandre Oliva
335
dnl Modified by Brian Stafford <brian@stafford.uklinux.net> to
336
dnl change prefix AC_ to ACX_
338
AC_DEFUN([ACX_DEFINE_DIR], [
339
test "x$prefix" = xNONE && prefix="$ac_default_prefix"
340
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
341
acx_define_dir=`eval echo $2`
342
acx_define_dir=`eval echo [$]acx_define_dir`
344
AC_DEFINE_UNQUOTED($1, "$acx_define_dir"),
345
AC_DEFINE_UNQUOTED($1, "$acx_define_dir", $3))
348
dnl @synopsis ACX_HELP_STRING(OPTION,DESCRIPTION)
349
AC_DEFUN([ACX_HELP_STRING],
350
[ $1 builtin([substr],[ ],len($1))[$2]])
352
dnl @synopsis ACX_FEATURE(ENABLE_OR_WITH,NAME[,VALUE])
353
AC_DEFUN([ACX_FEATURE],
354
[echo "builtin([substr],[ ],len(--$1-$2))--$1-$2: ifelse($3,,[$]translit($1-$2,-,_),$3)"])
356
dnl @synopsis ACX_SNPRINTF(ACTION-IF-CORRECT,ACTION-IF-BROKEN)
358
dnl Provides a test to determine if snprintf correctly truncates strings
359
dnl too long for the buffer. If snprintf works correctly execute
360
dnl ACTION-IF-CORRECT else execute ACTION-IF-BROKEN. If ACTION-IF-CORRECT
361
dnl is not supplied, the default is to define HAVE_WORKING_SNPRINTF
364
dnl @author Brian Stafford <brian@stafford.uklinux.net>
366
AC_DEFUN([ACX_SNPRINTF], [
367
AC_CACHE_CHECK([for working snprintf], [acx_working_snprintf], [
375
snprintf (buf, 4, "abcd");
376
exit ((buf[3] == '\0') ? 0 : 1);
379
], acx_working_snprintf=yes, acx_working_snprintf=no)
381
if test x$acx_working_snprintf = xyes ; then
382
ifelse([$1],,AC_DEFINE([HAVE_WORKING_SNPRINTF], 1,
383
[snprintf correctly terminates the buffer on overflow]),[$1])
384
ifelse([$2],,,[else $2])
389
# Like AC_CONFIG_HEADER, but automatically create stamp file.
393
# When config.status generates a header, we must update the stamp-h file.
394
# This file resides in the same directory as the config header
395
# that is generated. We must strip everything past the first ":",
396
# and everything past the last "/".
400
AC_DEFUN([AM_CONFIG_HEADER],
401
[ifdef([AC_FOREACH],dnl
402
[dnl init our file count if it isn't already
403
m4_ifndef([_AM_Config_Header_Index], m4_define([_AM_Config_Header_Index], [0]))
404
dnl prepare to store our destination file list for use in config.status
405
AC_FOREACH([_AM_File], [$1],
406
[m4_pushdef([_AM_Dest], m4_patsubst(_AM_File, [:.*]))
407
m4_define([_AM_Config_Header_Index], m4_incr(_AM_Config_Header_Index))
408
dnl and add it to the list of files AC keeps track of, along
410
AC_CONFIG_HEADERS(_AM_File,
411
dnl COMMANDS, [, INIT-CMDS]
412
[# update the timestamp
413
echo timestamp >"AS_ESCAPE(_AM_DIRNAME(]_AM_Dest[))/stamp-h]_AM_Config_Header_Index["
414
][$2]m4_ifval([$3], [, [$3]]))dnl AC_CONFIG_HEADERS
415
m4_popdef([_AM_Dest])])],dnl
416
[AC_CONFIG_HEADER([$1])
418
ifelse(patsubst([$1], [[^ ]], []),
420
[test -z "$CONFIG_HEADERS" || echo timestamp >dnl
421
patsubst([$1], [^\([^:]*/\)?.*], [\1])stamp-h]),dnl
423
for am_file in $1; do
424
case " \$CONFIG_HEADERS " in
426
am_dir=\`echo \$am_file |sed 's%:.*%%;s%[^/]*\$%%'\`
427
if test -n "\$am_dir"; then
428
am_tmpdir=\`echo \$am_dir |sed 's%^\(/*\).*\$%\1%'\`
429
for am_subdir in \`echo \$am_dir |sed 's%/% %'\`; do
430
am_tmpdir=\$am_tmpdir\$am_subdir/
431
if test ! -d \$am_tmpdir; then
436
echo timestamp > "\$am_dir"stamp-h\$am_indx
439
am_indx=\`expr \$am_indx + 1\`
441
])]) # AM_CONFIG_HEADER
445
# Like AS_DIRNAME, only do it during macro expansion
446
AC_DEFUN([_AM_DIRNAME],
447
[m4_if(m4_regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
448
m4_if(m4_regexp([$1], [^//\([^/]\|$\)]), -1,
449
m4_if(m4_regexp([$1], [^/.*]), -1,
451
m4_patsubst([$1], [^\(/\).*], [\1])),
452
m4_patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
453
m4_patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
456
# Do all the work for Automake. This macro actually does too much --
457
# some checks are only needed if your package does certain things.
458
# But this isn't really a big deal.
462
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
463
# written in clear, in which case automake, when reading aclocal.m4,
464
# will think it sees a *use*, and therefore will trigger all it's
465
# C support machinery. Also note that it means that autoscan, seeing
466
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
469
# We require 2.13 because we rely on SHELL being computed by configure.
472
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
473
# -----------------------------------------------------------
474
# If MACRO-NAME is provided do IF-PROVIDED, else IF-NOT-PROVIDED.
475
# The purpose of this macro is to provide the user with a means to
476
# check macros which are provided without letting her know how the
477
# information is coded.
478
# If this macro is not defined by Autoconf, define it here.
479
ifdef([AC_PROVIDE_IFELSE],
481
[define([AC_PROVIDE_IFELSE],
482
[ifdef([AC_PROVIDE_$1],
486
# AM_INIT_AUTOMAKE(PACKAGE,VERSION, [NO-DEFINE])
487
# ----------------------------------------------
488
AC_DEFUN([AM_INIT_AUTOMAKE],
489
[AC_REQUIRE([AC_PROG_INSTALL])dnl
490
# test to see if srcdir already configured
491
if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" &&
492
test -f $srcdir/config.status; then
493
AC_MSG_ERROR([source directory already configured; run \"make distclean\" there first])
496
# Define the identity of the package.
502
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
503
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])
505
# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
506
# the ones we care about.
507
ifdef([m4_pattern_allow],
508
[m4_pattern_allow([^AM_[A-Z]+FLAGS])])dnl
510
# Autoconf 2.50 always computes EXEEXT. However we need to be
511
# compatible with 2.13, for now. So we always define EXEEXT, but we
514
# Similar for OBJEXT -- only we only use OBJEXT if the user actually
515
# requests that it be used. This is a bit dumb.
519
# Some tools Automake needs.
520
AC_REQUIRE([AM_SANITY_CHECK])dnl
521
AC_REQUIRE([AC_ARG_PROGRAM])dnl
522
AM_MISSING_PROG(ACLOCAL, aclocal)
523
AM_MISSING_PROG(AUTOCONF, autoconf)
524
AM_MISSING_PROG(AUTOMAKE, automake)
525
AM_MISSING_PROG(AUTOHEADER, autoheader)
526
AM_MISSING_PROG(MAKEINFO, makeinfo)
527
AM_MISSING_PROG(AMTAR, tar)
529
AM_PROG_INSTALL_STRIP
530
# We need awk for the "check" target. The system "awk" is bad on
532
AC_REQUIRE([AC_PROG_AWK])dnl
533
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
534
AC_REQUIRE([AM_DEP_TRACK])dnl
535
AC_REQUIRE([AM_SET_DEPDIR])dnl
536
AC_PROVIDE_IFELSE([AC_PROG_][CC],
537
[_AM_DEPENDENCIES(CC)],
538
[define([AC_PROG_][CC],
539
defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
540
AC_PROVIDE_IFELSE([AC_PROG_][CXX],
541
[_AM_DEPENDENCIES(CXX)],
542
[define([AC_PROG_][CXX],
543
defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
547
# Check to make sure that the build environment is sane.
554
AC_DEFUN([AM_SANITY_CHECK],
555
[AC_MSG_CHECKING([whether build environment is sane])
558
echo timestamp > conftest.file
559
# Do `set' in a subshell so we don't clobber the current shell's
560
# arguments. Must try -L first in case configure is actually a
561
# symlink; some systems play weird games with the mod time of symlinks
562
# (eg FreeBSD returns the mod time of the symlink's containing
565
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
566
if test "$[*]" = "X"; then
568
set X `ls -t $srcdir/configure conftest.file`
571
if test "$[*]" != "X $srcdir/configure conftest.file" \
572
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
574
# If neither matched, then we have a broken ls. This can happen
575
# if, for instance, CONFIG_SHELL is bash and it inherits a
576
# broken ls alias from the environment. This has actually
577
# happened. Such a system could not be considered "sane".
578
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
579
alias in your environment])
582
test "$[2]" = conftest.file
588
AC_MSG_ERROR([newly created file is older than distributed files!
589
Check your system clock])
596
# AM_MISSING_PROG(NAME, PROGRAM)
597
# ------------------------------
598
AC_DEFUN([AM_MISSING_PROG],
599
[AC_REQUIRE([AM_MISSING_HAS_RUN])
600
$1=${$1-"${am_missing_run}$2"}
606
# Define MISSING if not defined so far and test if it supports --run.
607
# If it does, set am_missing_run to use it, otherwise, to nothing.
608
AC_DEFUN([AM_MISSING_HAS_RUN],
609
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
610
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
611
# Use eval to expand $SHELL
612
if eval "$MISSING --run true"; then
613
am_missing_run="$MISSING --run "
617
AC_MSG_WARN([${am_backtick}missing' script is too old or missing])
623
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
624
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
625
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
627
# Of course, Automake must honor this variable whenever it calls a
628
# tool from the auxiliary directory. The problem is that $srcdir (and
629
# therefore $ac_aux_dir as well) can be either absolute or relative,
630
# depending on how configure is run. This is pretty annoying, since
631
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
632
# source directory, any form will work fine, but in subdirectories a
633
# relative path needs to be adjusted first.
635
# $ac_aux_dir/missing
636
# fails when called from a subdirectory if $ac_aux_dir is relative
637
# $top_srcdir/$ac_aux_dir/missing
638
# fails if $ac_aux_dir is absolute,
639
# fails when called from a subdirectory in a VPATH build with
640
# a relative $ac_aux_dir
642
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
643
# are both prefixed by $srcdir. In an in-source build this is usually
644
# harmless because $srcdir is `.', but things will broke when you
645
# start a VPATH build or use an absolute $srcdir.
647
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
648
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
649
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
650
# and then we would define $MISSING as
651
# MISSING="\${SHELL} $am_aux_dir/missing"
652
# This will work as long as MISSING is not called from configure, because
653
# unfortunately $(top_srcdir) has no meaning in configure.
654
# However there are other variables, like CC, which are often used in
655
# configure, and could therefore not use this "fixed" $ac_aux_dir.
657
# Another solution, used here, is to always expand $ac_aux_dir to an
658
# absolute PATH. The drawback is that using absolute paths prevent a
659
# configured tree to be moved without reconfiguration.
661
AC_DEFUN([AM_AUX_DIR_EXPAND], [
662
# expand $ac_aux_dir to an absolute path
663
am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd`
668
# Define $install_sh.
669
AC_DEFUN([AM_PROG_INSTALL_SH],
670
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
671
install_sh=${install_sh-"$am_aux_dir/install-sh"}
672
AC_SUBST(install_sh)])
674
# One issue with vendor `install' (even GNU) is that you can't
675
# specify the program used to strip binaries. This is especially
676
# annoying in cross-compiling environments, where the build's strip
677
# is unlikely to handle the host's binaries.
678
# Fortunately install-sh will honor a STRIPPROG variable, so we
679
# always use install-sh in `make install-strip', and initialize
680
# STRIPPROG with the value of the STRIP variable (set by the user).
681
AC_DEFUN([AM_PROG_INSTALL_STRIP],
682
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
683
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
684
AC_SUBST([INSTALL_STRIP_PROGRAM])])
686
# serial 4 -*- Autoconf -*-
690
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
691
# written in clear, in which case automake, when reading aclocal.m4,
692
# will think it sees a *use*, and therefore will trigger all it's
693
# C support machinery. Also note that it means that autoscan, seeing
694
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
698
# _AM_DEPENDENCIES(NAME)
699
# ---------------------
700
# See how the compiler implements dependency checking.
701
# NAME is "CC", "CXX" or "OBJC".
702
# We try a few techniques and use that to set a single cache variable.
704
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
705
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
706
# dependency, and given that the user is not expected to run this macro,
707
# just rely on AC_PROG_CC.
708
AC_DEFUN([_AM_DEPENDENCIES],
709
[AC_REQUIRE([AM_SET_DEPDIR])dnl
710
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
711
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
712
AC_REQUIRE([AM_DEP_TRACK])dnl
714
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
715
[$1], CXX, [depcc="$CXX" am_compiler_list=],
716
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc']
717
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
718
[depcc="$$1" am_compiler_list=])
720
AC_CACHE_CHECK([dependency style of $depcc],
721
[am_cv_$1_dependencies_compiler_type],
722
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
723
# We make a subdir and do the tests there. Otherwise we can end up
724
# making bogus files that we don't know about and never remove. For
725
# instance it was reported that on HP-UX the gcc test will end up
726
# making a dummy file named `D' -- because `-MD' means `put the output
729
# Copy depcomp to subdir because otherwise we won't find it if we're
730
# using a relative directory.
731
cp "$am_depcomp" conftest.dir
734
am_cv_$1_dependencies_compiler_type=none
735
if test "$am_compiler_list" = ""; then
736
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
738
for depmode in $am_compiler_list; do
739
# We need to recreate these files for each test, as the compiler may
740
# overwrite some of them when testing with obscure command lines.
741
# This happens at least with the AIX C compiler.
742
echo '#include "conftest.h"' > conftest.c
743
echo 'int i;' > conftest.h
744
echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
748
# after this tag, mechanisms are not by side-effect, so they'll
749
# only be used when explicitly requested
750
if test "x$enable_dependency_tracking" = xyes; then
758
# We check with `-c' and `-o' for the sake of the "dashmstdout"
759
# mode. It turns out that the SunPro C++ compiler does not properly
760
# handle `-M -o', and we need to detect this.
761
if depmode=$depmode \
762
source=conftest.c object=conftest.o \
763
depfile=conftest.Po tmpdepfile=conftest.TPo \
764
$SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
765
grep conftest.h conftest.Po > /dev/null 2>&1 &&
766
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
767
am_cv_$1_dependencies_compiler_type=$depmode
775
am_cv_$1_dependencies_compiler_type=none
778
$1DEPMODE="depmode=$am_cv_$1_dependencies_compiler_type"
779
AC_SUBST([$1DEPMODE])
785
# Choose a directory name for dependency files.
786
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
787
AC_DEFUN([AM_SET_DEPDIR],
788
[rm -f .deps 2>/dev/null
789
mkdir .deps 2>/dev/null
790
if test -d .deps; then
793
# MS-DOS does not allow filenames that begin with a dot.
796
rmdir .deps 2>/dev/null
803
AC_DEFUN([AM_DEP_TRACK],
804
[AC_ARG_ENABLE(dependency-tracking,
805
[ --disable-dependency-tracking Speeds up one-time builds
806
--enable-dependency-tracking Do not reject slow dependency extractors])
807
if test "x$enable_dependency_tracking" != xno; then
808
am_depcomp="$ac_aux_dir/depcomp"
811
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
812
pushdef([subst], defn([AC_SUBST]))
813
subst(AMDEPBACKSLASH)
817
# Generate code to set up dependency tracking.
818
# This macro should only be invoked once -- use via AC_REQUIRE.
820
# AM_OUTPUT_DEPENDENCY_COMMANDS
823
# This code is only required when automatic dependency tracking
824
# is enabled. FIXME. This creates each `.P' file that we will
825
# need in order to bootstrap the dependency handling code.
826
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],[
828
test x"$AMDEP_TRUE" != x"" ||
829
for mf in $CONFIG_FILES; do
831
Makefile) dirpart=.;;
832
*/Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
835
grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
836
# Extract the definition of DEP_FILES from the Makefile without
838
DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
839
test -z "$DEPDIR" && continue
840
# When using ansi2knr, U may be empty or an underscore; expand it
841
U=`sed -n -e '/^U = / s///p' < "$mf"`
842
test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
843
# We invoke sed twice because it is the simplest approach to
844
# changing $(DEPDIR) to its actual value in the expansion.
845
for file in `sed -n -e '
846
/^DEP_FILES = .*\\\\$/ {
855
/^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
856
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
857
# Make sure the directory exists.
858
test -f "$dirpart/$file" && continue
859
fdir=`echo "$file" | sed -e 's|/[^/]*$||'`
860
$ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1
861
# echo "creating $dirpart/$file"
862
echo '# dummy' > "$dirpart/$file"
865
], [AMDEP_TRUE="$AMDEP_TRUE"
866
ac_aux_dir="$ac_aux_dir"])])
870
# Check to see how make treats includes.
871
AC_DEFUN([AM_MAKE_INCLUDE],
872
[am_make=${MAKE-make}
873
cat > confinc << 'END'
877
# If we don't find an include directive, just comment out the code.
878
AC_MSG_CHECKING([for style of include used by $am_make])
882
# First try GNU make style include.
883
echo "include confinc" > confmf
884
# We grep out `Entering directory' and `Leaving directory'
885
# messages which can occur if `w' ends up in MAKEFLAGS.
886
# In particular we don't look at `^make:' because GNU make might
887
# be invoked under some other name (usually "gmake"), in which
888
# case it prints its new name instead of `make'.
889
if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
894
# Now try BSD make style include.
895
if test "$am__include" = "#"; then
896
echo '.include "confinc"' > confmf
897
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
903
AC_SUBST(am__include)
905
AC_MSG_RESULT($_am_result)
911
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
912
# -------------------------------------
913
# Define a conditional.
915
# FIXME: Once using 2.50, use this:
916
# m4_match([$1], [^TRUE\|FALSE$], [AC_FATAL([$0: invalid condition: $1])])dnl
917
AC_DEFUN([AM_CONDITIONAL],
918
[ifelse([$1], [TRUE],
919
[errprint(__file__:__line__: [$0: invalid condition: $1
922
ifelse([$1], [FALSE],
923
[errprint(__file__:__line__: [$0: invalid condition: $1
936
# libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
938
# serial 46 AC_PROG_LIBTOOL
939
AC_DEFUN([AC_PROG_LIBTOOL],
940
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
942
# This can be used to rebuild libtool when needed
943
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
945
# Always use our own libtool.
946
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
949
# Prevent multiple expansion
950
define([AC_PROG_LIBTOOL], [])
953
AC_DEFUN([AC_LIBTOOL_SETUP],
955
AC_REQUIRE([AC_ENABLE_SHARED])dnl
956
AC_REQUIRE([AC_ENABLE_STATIC])dnl
957
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
958
AC_REQUIRE([AC_CANONICAL_HOST])dnl
959
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
960
AC_REQUIRE([AC_PROG_CC])dnl
961
AC_REQUIRE([AC_PROG_LD])dnl
962
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
963
AC_REQUIRE([AC_PROG_NM])dnl
964
AC_REQUIRE([AC_PROG_LN_S])dnl
965
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
966
AC_REQUIRE([AC_OBJEXT])dnl
967
AC_REQUIRE([AC_EXEEXT])dnl
970
_LT_AC_PROG_ECHO_BACKSLASH
971
# Only perform the check for file, if the check method requires it
972
case $deplibs_check_method in
974
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
980
AC_CHECK_TOOL(RANLIB, ranlib, :)
981
AC_CHECK_TOOL(STRIP, strip, :)
983
ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
984
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
985
enable_win32_dll=yes, enable_win32_dll=no)
987
AC_ARG_ENABLE(libtool-lock,
988
[ --disable-libtool-lock avoid locking (might break parallel builds)])
989
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
991
# Some flags need to be propagated to the compiler or linker for good
995
# Find out which ABI we are using.
996
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
997
if AC_TRY_EVAL(ac_compile); then
998
case `/usr/bin/file conftest.$ac_objext` in
1014
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
1015
SAVE_CFLAGS="$CFLAGS"
1016
CFLAGS="$CFLAGS -belf"
1017
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1020
AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1022
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1023
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1024
CFLAGS="$SAVE_CFLAGS"
1028
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
1029
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1030
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1031
AC_CHECK_TOOL(AS, as, false)
1032
AC_CHECK_TOOL(OBJDUMP, objdump, false)
1034
# recent cygwin and mingw systems supply a stub DllMain which the user
1035
# can override, but on older systems we have to supply one
1036
AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
1038
[extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
1039
DllMain (0, 0, 0);],
1040
[lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
1043
*-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
1044
# old mingw systems require "-dll" to link a DLL, while more recent ones
1046
SAVE_CFLAGS="$CFLAGS"
1047
CFLAGS="$CFLAGS -mdll"
1048
AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
1049
[AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
1050
CFLAGS="$SAVE_CFLAGS" ;;
1051
*-*-cygwin* | *-*-pw32*)
1052
# cygwin systems need to pass --dll to the linker, and not link
1053
# crt.o which will require a WinMain@16 definition.
1054
lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
1060
_LT_AC_LTCONFIG_HACK
1064
# _LT_AC_CHECK_DLFCN
1065
# --------------------
1066
AC_DEFUN(_LT_AC_CHECK_DLFCN,
1067
[AC_CHECK_HEADERS(dlfcn.h)
1068
])# _LT_AC_CHECK_DLFCN
1070
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1071
# ---------------------------------
1072
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
1073
[AC_REQUIRE([AC_CANONICAL_HOST])
1074
AC_REQUIRE([AC_PROG_NM])
1075
AC_REQUIRE([AC_OBJEXT])
1076
# Check for command to grab the raw symbol name followed by C symbol from nm.
1077
AC_MSG_CHECKING([command to parse $NM output])
1078
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
1080
# These are sane defaults that work on at least a few old systems.
1081
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
1083
# Character class describing NM global symbol codes.
1084
[symcode='[BCDEGRST]']
1086
# Regexp to match symbols that can be accessed directly from C.
1087
[sympat='\([_A-Za-z][_A-Za-z0-9]*\)']
1089
# Transform the above into a raw symbol and a C symbol.
1090
symxfrm='\1 \2\3 \3'
1092
# Transform an extracted symbol line into a proper C declaration
1093
lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
1095
# Define system-specific variables.
1100
cygwin* | mingw* | pw32*)
1101
[symcode='[ABCDGISTW]']
1103
hpux*) # Its linker distinguishes data from code symbols
1104
lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
1107
[symcode='[BCDEGRST]']
1113
[symcode='[DFNSTU]']
1117
# Handle CRLF in mingw tool chain
1121
opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
1125
# If we're using GNU nm, then use its standard symbol codes.
1126
if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
1127
[symcode='[ABCDGISTW]']
1130
# Try without a prefix undercore, then with it.
1131
for ac_symprfx in "" "_"; do
1133
# Write the raw and C identifiers.
1134
[lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"]
1136
# Check to see that the pipe works correctly.
1139
cat > conftest.$ac_ext <<EOF
1144
void nm_test_func(){}
1148
int main(){nm_test_var='a';nm_test_func();return(0);}
1151
if AC_TRY_EVAL(ac_compile); then
1152
# Now try to grab the symbols.
1154
if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
1155
# Try sorting and uniquifying the output.
1156
if sort "$nlist" | uniq > "$nlist"T; then
1157
mv -f "$nlist"T "$nlist"
1162
# Make sure that we snagged all the symbols we need.
1163
if egrep ' nm_test_var$' "$nlist" >/dev/null; then
1164
if egrep ' nm_test_func$' "$nlist" >/dev/null; then
1165
cat <<EOF > conftest.$ac_ext
1171
# Now generate the symbol file.
1172
eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
1174
cat <<EOF >> conftest.$ac_ext
1175
#if defined (__STDC__) && __STDC__
1176
# define lt_ptr_t void *
1178
# define lt_ptr_t char *
1182
/* The mapping between symbol names and symbols. */
1187
[lt_preloaded_symbols[] =]
1190
sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" >> conftest.$ac_ext
1191
cat <<\EOF >> conftest.$ac_ext
1199
# Now try linking the two files.
1200
mv conftest.$ac_objext conftstm.$ac_objext
1202
save_CFLAGS="$CFLAGS"
1203
LIBS="conftstm.$ac_objext"
1204
CFLAGS="$CFLAGS$no_builtin_flag"
1205
if AC_TRY_EVAL(ac_link) && test -s conftest; then
1209
CFLAGS="$save_CFLAGS"
1211
echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
1214
echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
1217
echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
1220
echo "$progname: failed program was:" >&AC_FD_CC
1221
cat conftest.$ac_ext >&5
1223
rm -f conftest* conftst*
1225
# Do not use the global_symbol_pipe unless it works.
1226
if test "$pipe_works" = yes; then
1229
lt_cv_sys_global_symbol_pipe=
1233
global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
1234
if test -z "$lt_cv_sys_global_symbol_pipe"; then
1235
global_symbol_to_cdecl=
1237
global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
1239
if test -z "$global_symbol_pipe$global_symbol_to_cdecl"; then
1240
AC_MSG_RESULT(failed)
1244
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1246
# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1247
# ---------------------------------
1248
AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
1249
[# Find the correct PATH separator. Usually this is `:', but
1250
# DJGPP uses `;' like DOS.
1251
if test "X${PATH_SEPARATOR+set}" != Xset; then
1252
UNAME=${UNAME-`uname 2>/dev/null`}
1254
*-DOS) lt_cv_sys_path_separator=';' ;;
1255
*) lt_cv_sys_path_separator=':' ;;
1258
])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1260
# _LT_AC_PROG_ECHO_BACKSLASH
1261
# --------------------------
1262
# Add some code to the start of the generated configure script which
1263
# will find an echo command which doesn;t interpret backslashes.
1264
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1265
[ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1266
[AC_DIVERT_PUSH(NOTICE)])
1267
_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1269
# Check that we are running under the correct shell.
1270
SHELL=${CONFIG_SHELL-/bin/sh}
1274
# Remove one level of quotation (which was required for Make).
1275
ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1280
if test "X[$]1" = X--no-reexec; then
1281
# Discard the --no-reexec flag, and continue.
1283
elif test "X[$]1" = X--fallback-echo; then
1284
# Avoid inline document here, it may be left over
1286
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
1287
# Yippee, $echo works!
1290
# Restart under the correct shell.
1291
exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1294
if test "X[$]1" = X--fallback-echo; then
1295
# used as fallback echo
1303
# The HP-UX ksh and POSIX shell print the target directory to stdout
1305
if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
1307
if test -z "$ECHO"; then
1308
if test "X${echo_test_string+set}" != Xset; then
1309
# find a string as large as possible, as long as the shell can cope with it
1310
for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1311
# expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1312
if (echo_test_string="`eval $cmd`") 2>/dev/null &&
1313
echo_test_string="`eval $cmd`" &&
1314
(test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1321
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1322
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1323
test "X$echo_testing_string" = "X$echo_test_string"; then
1326
# The Solaris, AIX, and Digital Unix default echo programs unquote
1327
# backslashes. This makes it impossible to quote backslashes using
1328
# echo "$something" | sed 's/\\/\\\\/g'
1330
# So, first we look for a working echo in the user's PATH.
1332
IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
1333
for dir in $PATH /usr/ucb; do
1334
if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1335
test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1336
echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1337
test "X$echo_testing_string" = "X$echo_test_string"; then
1344
if test "X$echo" = Xecho; then
1345
# We didn't find a better echo, so look for alternatives.
1346
if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1347
echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1348
test "X$echo_testing_string" = "X$echo_test_string"; then
1349
# This shell has a builtin print -r that does the trick.
1351
elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1352
test "X$CONFIG_SHELL" != X/bin/ksh; then
1353
# If we have ksh, try running configure again with it.
1354
ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1355
export ORIGINAL_CONFIG_SHELL
1356
CONFIG_SHELL=/bin/ksh
1358
exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1362
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1363
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1364
test "X$echo_testing_string" = "X$echo_test_string"; then
1365
# Cool, printf works
1367
elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1368
test "X$echo_testing_string" = 'X\t' &&
1369
echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1370
test "X$echo_testing_string" = "X$echo_test_string"; then
1371
CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1373
SHELL="$CONFIG_SHELL"
1375
echo="$CONFIG_SHELL [$]0 --fallback-echo"
1376
elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1377
test "X$echo_testing_string" = 'X\t' &&
1378
echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1379
test "X$echo_testing_string" = "X$echo_test_string"; then
1380
echo="$CONFIG_SHELL [$]0 --fallback-echo"
1382
# maybe with a smaller string...
1385
for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1386
if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1393
if test "$prev" != 'sed 50q "[$]0"'; then
1394
echo_test_string=`eval $prev`
1395
export echo_test_string
1396
exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1398
# Oops. We lost completely, so just stick with echo.
1407
# Copy echo and quote the copy suitably for passing to libtool from
1408
# the Makefile, instead of quoting the original, which is used later.
1410
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1411
ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1416
])# _LT_AC_PROG_ECHO_BACKSLASH
1418
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1419
# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1420
# ------------------------------------------------------------------
1421
AC_DEFUN(_LT_AC_TRY_DLOPEN_SELF,
1422
[if test "$cross_compiling" = yes; then :
1425
AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1426
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1427
lt_status=$lt_dlunknown
1428
cat > conftest.$ac_ext <<EOF
1429
[#line __oline__ "configure"
1430
#include "confdefs.h"
1439
# define LT_DLGLOBAL RTLD_GLOBAL
1442
# define LT_DLGLOBAL DL_GLOBAL
1444
# define LT_DLGLOBAL 0
1448
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1449
find out it does not work in some platform. */
1450
#ifndef LT_DLLAZY_OR_NOW
1452
# define LT_DLLAZY_OR_NOW RTLD_LAZY
1455
# define LT_DLLAZY_OR_NOW DL_LAZY
1458
# define LT_DLLAZY_OR_NOW RTLD_NOW
1461
# define LT_DLLAZY_OR_NOW DL_NOW
1463
# define LT_DLLAZY_OR_NOW 0
1471
extern "C" void exit (int);
1474
void fnord() { int i=42;}
1477
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1478
int status = $lt_dlunknown;
1482
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1483
else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1484
/* dlclose (self); */
1490
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1491
(./conftest; exit; ) 2>/dev/null
1494
x$lt_dlno_uscore) $1 ;;
1495
x$lt_dlneed_uscore) $2 ;;
1496
x$lt_unknown|x*) $3 ;;
1499
# compilation failed
1504
])# _LT_AC_TRY_DLOPEN_SELF
1506
# AC_LIBTOOL_DLOPEN_SELF
1507
# -------------------
1508
AC_DEFUN(AC_LIBTOOL_DLOPEN_SELF,
1509
[if test "x$enable_dlopen" != xyes; then
1510
enable_dlopen=unknown
1511
enable_dlopen_self=unknown
1512
enable_dlopen_self_static=unknown
1519
lt_cv_dlopen="load_add_on"
1521
lt_cv_dlopen_self=yes
1524
cygwin* | mingw* | pw32*)
1525
lt_cv_dlopen="LoadLibrary"
1530
AC_CHECK_LIB(dl, dlopen, [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1531
[AC_CHECK_FUNC(dlopen, lt_cv_dlopen="dlopen",
1532
[AC_CHECK_FUNC(shl_load, lt_cv_dlopen="shl_load",
1533
[AC_CHECK_LIB(svld, dlopen,
1534
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1535
[AC_CHECK_LIB(dld, shl_load,
1536
[lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1544
if test "x$lt_cv_dlopen" != xno; then
1550
case $lt_cv_dlopen in
1552
save_CPPFLAGS="$CPPFLAGS"
1553
AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1554
test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1556
save_LDFLAGS="$LDFLAGS"
1557
eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1560
LIBS="$lt_cv_dlopen_libs $LIBS"
1562
AC_CACHE_CHECK([whether a program can dlopen itself],
1563
lt_cv_dlopen_self, [dnl
1564
_LT_AC_TRY_DLOPEN_SELF(
1565
lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1566
lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1569
if test "x$lt_cv_dlopen_self" = xyes; then
1570
LDFLAGS="$LDFLAGS $link_static_flag"
1571
AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1572
lt_cv_dlopen_self_static, [dnl
1573
_LT_AC_TRY_DLOPEN_SELF(
1574
lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1575
lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1579
CPPFLAGS="$save_CPPFLAGS"
1580
LDFLAGS="$save_LDFLAGS"
1585
case $lt_cv_dlopen_self in
1586
yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1587
*) enable_dlopen_self=unknown ;;
1590
case $lt_cv_dlopen_self_static in
1591
yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1592
*) enable_dlopen_self_static=unknown ;;
1595
])# AC_LIBTOOL_DLOPEN_SELF
1597
AC_DEFUN([_LT_AC_LTCONFIG_HACK],
1598
[AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
1599
# Sed substitution that helps us do robust quoting. It backslashifies
1600
# metacharacters that are still active within double-quoted strings.
1601
Xsed='sed -e s/^X//'
1602
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
1604
# Same as above, but do not quote variable references.
1605
[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
1607
# Sed substitution to delay expansion of an escaped shell variable in a
1608
# double_quote_subst'ed string.
1609
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1615
default_ofile=libtool
1616
can_build_shared=yes
1618
# All known linkers require a `.a' archive for static linking (except M$VC,
1619
# which needs '.lib').
1621
ltmain="$ac_aux_dir/ltmain.sh"
1622
ofile="$default_ofile"
1623
with_gnu_ld="$lt_cv_prog_gnu_ld"
1624
need_locks="$enable_libtool_lock"
1627
old_CFLAGS="$CFLAGS"
1629
# Set sane defaults for various variables
1630
test -z "$AR" && AR=ar
1631
test -z "$AR_FLAGS" && AR_FLAGS=cru
1632
test -z "$AS" && AS=as
1633
test -z "$CC" && CC=cc
1634
test -z "$DLLTOOL" && DLLTOOL=dlltool
1635
test -z "$LD" && LD=ld
1636
test -z "$LN_S" && LN_S="ln -s"
1637
test -z "$MAGIC_CMD" && MAGIC_CMD=file
1638
test -z "$NM" && NM=nm
1639
test -z "$OBJDUMP" && OBJDUMP=objdump
1640
test -z "$RANLIB" && RANLIB=:
1641
test -z "$STRIP" && STRIP=:
1642
test -z "$ac_objext" && ac_objext=o
1644
if test x"$host" != x"$build"; then
1645
ac_tool_prefix=${host_alias}-
1650
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
1653
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
1658
# AIX sometimes has problems with the GCC collect2 program. For some
1659
# reason, if we set the COLLECT_NAMES environment variable, the problems
1660
# vanish in a puff of smoke.
1661
if test "X${COLLECT_NAMES+set}" != Xset; then
1663
export COLLECT_NAMES
1668
# Determine commands to create old-style static archives.
1669
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1670
old_postinstall_cmds='chmod 644 $oldlib'
1671
old_postuninstall_cmds=
1673
if test -n "$RANLIB"; then
1674
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1675
old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1678
# Allow CC to be a program name with arguments.
1682
AC_MSG_CHECKING([for objdir])
1683
rm -f .libs 2>/dev/null
1684
mkdir .libs 2>/dev/null
1685
if test -d .libs; then
1688
# MS-DOS does not allow filenames that begin with a dot.
1691
rmdir .libs 2>/dev/null
1692
AC_MSG_RESULT($objdir)
1696
[ --with-pic try to use only PIC/non-PIC objects [default=use both]],
1697
pic_mode="$withval", pic_mode=default)
1698
test -z "$pic_mode" && pic_mode=default
1700
# We assume here that the value for lt_cv_prog_cc_pic will not be cached
1701
# in isolation, and that seeing it set (from the cache) indicates that
1702
# the associated values are set (in the cache) correctly too.
1703
AC_MSG_CHECKING([for $compiler option to produce PIC])
1704
AC_CACHE_VAL(lt_cv_prog_cc_pic,
1705
[ lt_cv_prog_cc_pic=
1706
lt_cv_prog_cc_shlib=
1708
lt_cv_prog_cc_static=
1709
lt_cv_prog_cc_no_builtin=
1710
lt_cv_prog_cc_can_build_shared=$can_build_shared
1712
if test "$GCC" = yes; then
1713
lt_cv_prog_cc_wl='-Wl,'
1714
lt_cv_prog_cc_static='-static'
1718
# Below there is a dirty hack to force normal static linking with -ldl
1719
# The problem is because libdl dynamically linked with both libc and
1720
# libC (AIX C++ library), which obviously doesn't included in libraries
1721
# list by gcc. This cause undefined symbols with -static flags.
1722
# This hack allows C programs to be linked with "-static -ldl", but
1723
# we not sure about C++ programs.
1724
lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
1727
# FIXME: we need at least 68020 code to build shared libraries, but
1728
# adding the `-m68020' flag to GCC prevents building anything better,
1730
lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
1732
beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
1733
# PIC is the default for these OSes.
1735
darwin* | rhapsody*)
1736
# PIC is the default on this platform
1737
# Common symbols not allowed in MH_DYLIB files
1738
lt_cv_prog_cc_pic='-fno-common'
1740
cygwin* | mingw* | pw32* | os2*)
1741
# This hack is so that the source file can tell whether it is being
1742
# built for inclusion in a dll (and should export symbols for example).
1743
lt_cv_prog_cc_pic='-DDLL_EXPORT'
1746
if test -d /usr/nec; then
1747
lt_cv_prog_cc_pic=-Kconform_pic
1751
lt_cv_prog_cc_pic='-fPIC'
1755
# PORTME Check for PIC flags for the system compiler.
1757
aix3* | aix4* | aix5*)
1758
# All AIX code is PIC.
1759
if test "$host_cpu" = ia64; then
1760
# AIX 5 now supports IA64 processor
1761
lt_cv_prog_cc_static='-Bstatic'
1762
lt_cv_prog_cc_wl='-Wl,'
1764
lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
1768
hpux9* | hpux10* | hpux11*)
1769
# Is there a better lt_cv_prog_cc_static that works with the bundled CC?
1770
lt_cv_prog_cc_wl='-Wl,'
1771
lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
1772
lt_cv_prog_cc_pic='+Z'
1776
lt_cv_prog_cc_wl='-Wl,'
1777
lt_cv_prog_cc_static='-non_shared'
1778
# PIC (with -KPIC) is the default.
1781
cygwin* | mingw* | pw32* | os2*)
1782
# This hack is so that the source file can tell whether it is being
1783
# built for inclusion in a dll (and should export symbols for example).
1784
lt_cv_prog_cc_pic='-DDLL_EXPORT'
1788
lt_cv_prog_cc_pic='-KPIC'
1789
lt_cv_prog_cc_static='-Bstatic'
1792
osf3* | osf4* | osf5*)
1793
# All OSF/1 code is PIC.
1794
lt_cv_prog_cc_wl='-Wl,'
1795
lt_cv_prog_cc_static='-non_shared'
1799
lt_cv_prog_cc_pic='-Kpic'
1800
lt_cv_prog_cc_static='-dn'
1801
lt_cv_prog_cc_shlib='-belf'
1805
lt_cv_prog_cc_pic='-KPIC'
1806
lt_cv_prog_cc_static='-Bstatic'
1807
lt_cv_prog_cc_wl='-Wl,'
1811
lt_cv_prog_cc_pic='-PIC'
1812
lt_cv_prog_cc_static='-Bstatic'
1813
lt_cv_prog_cc_wl='-Qoption ld '
1816
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1817
lt_cv_prog_cc_pic='-KPIC'
1818
lt_cv_prog_cc_static='-Bstatic'
1819
if test "x$host_vendor" = xsni; then
1820
lt_cv_prog_cc_wl='-LD'
1822
lt_cv_prog_cc_wl='-Wl,'
1827
lt_cv_prog_cc_pic='-pic'
1828
lt_cv_prog_cc_static='-Bstatic'
1832
if test -d /usr/nec ;then
1833
lt_cv_prog_cc_pic='-Kconform_pic'
1834
lt_cv_prog_cc_static='-Bstatic'
1839
lt_cv_prog_cc_can_build_shared=no
1844
if test -z "$lt_cv_prog_cc_pic"; then
1845
AC_MSG_RESULT([none])
1847
AC_MSG_RESULT([$lt_cv_prog_cc_pic])
1849
# Check to make sure the pic_flag actually works.
1850
AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
1851
AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
1852
save_CFLAGS="$CFLAGS"
1853
CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
1854
AC_TRY_COMPILE([], [], [dnl
1856
hpux9* | hpux10* | hpux11*)
1857
# On HP-UX, both CC and GCC only warn that PIC is supported... then
1858
# they create non-PIC objects. So, if there were any warnings, we
1859
# assume that PIC is not supported.
1860
if test -s conftest.err; then
1861
lt_cv_prog_cc_pic_works=no
1863
lt_cv_prog_cc_pic_works=yes
1867
lt_cv_prog_cc_pic_works=yes
1871
lt_cv_prog_cc_pic_works=no
1873
CFLAGS="$save_CFLAGS"
1876
if test "X$lt_cv_prog_cc_pic_works" = Xno; then
1878
lt_cv_prog_cc_can_build_shared=no
1880
lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
1883
AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
1886
# Check for any special shared library compilation flags.
1887
if test -n "$lt_cv_prog_cc_shlib"; then
1888
AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
1889
if echo "$old_CC $old_CFLAGS " | [egrep -e "[ ]$lt_cv_prog_cc_shlib[ ]"] >/dev/null; then :
1891
AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
1892
lt_cv_prog_cc_can_build_shared=no
1896
AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
1897
AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
1898
lt_cv_prog_cc_static_works=no
1899
save_LDFLAGS="$LDFLAGS"
1900
LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
1901
AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
1902
LDFLAGS="$save_LDFLAGS"
1905
# Belt *and* braces to stop my trousers falling down:
1906
test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
1907
AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
1909
pic_flag="$lt_cv_prog_cc_pic"
1910
special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
1911
wl="$lt_cv_prog_cc_wl"
1912
link_static_flag="$lt_cv_prog_cc_static"
1913
no_builtin_flag="$lt_cv_prog_cc_no_builtin"
1914
can_build_shared="$lt_cv_prog_cc_can_build_shared"
1917
# Check to see if options -o and -c are simultaneously supported by compiler
1918
AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
1919
AC_CACHE_VAL([lt_cv_compiler_c_o], [
1920
$rm -r conftest 2>/dev/null
1923
echo "int some_variable = 0;" > conftest.$ac_ext
1925
# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
1926
# that will create temporary files in the current directory regardless of
1927
# the output directory. Thus, making CWD read-only will cause this test
1928
# to fail, enabling locking or at least warning the user not to do parallel
1931
save_CFLAGS="$CFLAGS"
1932
CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
1934
if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
1935
# The compiler can only warn and ignore the option if not recognized
1936
# So say no if there are warnings
1937
if test -s out/conftest.err; then
1938
lt_cv_compiler_c_o=no
1940
lt_cv_compiler_c_o=yes
1943
# Append any errors to the config.log.
1944
cat out/conftest.err 1>&AC_FD_CC
1945
lt_cv_compiler_c_o=no
1947
CFLAGS="$save_CFLAGS"
1953
$rm -r conftest 2>/dev/null
1955
compiler_c_o=$lt_cv_compiler_c_o
1956
AC_MSG_RESULT([$compiler_c_o])
1958
if test x"$compiler_c_o" = x"yes"; then
1959
# Check to see if we can write to a .lo
1960
AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
1961
AC_CACHE_VAL([lt_cv_compiler_o_lo], [
1962
lt_cv_compiler_o_lo=no
1963
save_CFLAGS="$CFLAGS"
1964
CFLAGS="$CFLAGS -c -o conftest.lo"
1965
AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1966
# The compiler can only warn and ignore the option if not recognized
1967
# So say no if there are warnings
1968
if test -s conftest.err; then
1969
lt_cv_compiler_o_lo=no
1971
lt_cv_compiler_o_lo=yes
1974
CFLAGS="$save_CFLAGS"
1976
compiler_o_lo=$lt_cv_compiler_o_lo
1977
AC_MSG_RESULT([$compiler_c_lo])
1982
# Check to see if we can do hard links to lock some files if needed
1983
hard_links="nottested"
1984
if test "$compiler_c_o" = no && test "$need_locks" != no; then
1985
# do not overwrite the value of need_locks provided by the user
1986
AC_MSG_CHECKING([if we can lock with hard links])
1989
ln conftest.a conftest.b 2>/dev/null && hard_links=no
1991
ln conftest.a conftest.b 2>&5 || hard_links=no
1992
ln conftest.a conftest.b 2>/dev/null && hard_links=no
1993
AC_MSG_RESULT([$hard_links])
1994
if test "$hard_links" = no; then
1995
AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
2002
if test "$GCC" = yes; then
2003
# Check to see if options -fno-rtti -fno-exceptions are supported by compiler
2004
AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
2005
echo "int some_variable = 0;" > conftest.$ac_ext
2006
save_CFLAGS="$CFLAGS"
2007
CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
2008
compiler_rtti_exceptions=no
2009
AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
2010
# The compiler can only warn and ignore the option if not recognized
2011
# So say no if there are warnings
2012
if test -s conftest.err; then
2013
compiler_rtti_exceptions=no
2015
compiler_rtti_exceptions=yes
2018
CFLAGS="$save_CFLAGS"
2019
AC_MSG_RESULT([$compiler_rtti_exceptions])
2021
if test "$compiler_rtti_exceptions" = "yes"; then
2022
no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
2024
no_builtin_flag=' -fno-builtin'
2028
# See if the linker supports building shared libraries.
2029
AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
2031
allow_undefined_flag=
2033
need_lib_prefix=unknown
2034
need_version=unknown
2035
# when you set need_version to no, make sure it does not cause -set_version
2036
# flags to be left without arguments
2038
archive_expsym_cmds=
2039
old_archive_from_new_cmds=
2040
old_archive_from_expsyms_cmds=
2041
export_dynamic_flag_spec=
2042
whole_archive_flag_spec=
2043
thread_safe_flag_spec=
2044
hardcode_into_libs=no
2045
hardcode_libdir_flag_spec=
2046
hardcode_libdir_separator=
2049
hardcode_shlibpath_var=unsupported
2051
link_all_deplibs=unknown
2052
always_export_symbols=no
2053
export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
2054
# include_expsyms should be a list of space-separated symbols to be *always*
2055
# included in the symbol list
2057
# exclude_expsyms can be an egrep regular expression of symbols to exclude
2058
# it will be wrapped by ` (' and `)$', so one must not match beginning or
2059
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
2060
# as well as any symbol that contains `d'.
2061
exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
2062
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
2063
# platforms (ab)use it in PIC code, but their linkers get confused if
2064
# the symbol is explicitly referenced. Since portable code cannot
2065
# rely on this symbol name, it's probably fine to never include it in
2066
# preloaded symbol tables.
2067
extract_expsyms_cmds=
2070
cygwin* | mingw* | pw32* )
2071
# FIXME: the MSVC++ port hasn't been tested in a loooong time
2072
# When not using gcc, we currently assume that we are using
2073
# Microsoft Visual C++.
2074
if test "$GCC" != yes; then
2082
if test "$with_gnu_ld" = yes; then
2083
# If archive_cmds runs LD, not CC, wlarc should be empty
2086
# See if GNU ld supports shared libraries.
2088
aix3* | aix4* | aix5*)
2089
# On AIX, the GNU linker is very broken
2090
# Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
2094
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
2095
*** to be unable to reliably create shared libraries on AIX.
2096
*** Therefore, libtool is disabling shared libraries support. If you
2097
*** really care for shared libraries, you may want to modify your PATH
2098
*** so that a non-GNU linker is found, and then restart.
2104
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)'
2105
hardcode_libdir_flag_spec='-L$libdir'
2106
hardcode_minus_L=yes
2108
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
2109
# that the semantics of dynamic libraries on AmigaOS, at least up
2110
# to version 4, is to share data among multiple programs linked
2111
# with the same dynamic library. Since this doesn't match the
2112
# behavior of shared libraries on other platforms, we can use
2118
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2119
allow_undefined_flag=unsupported
2120
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
2121
# support --undefined. This deserves some investigation. FIXME
2122
archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2128
cygwin* | mingw* | pw32*)
2129
# hardcode_libdir_flag_spec is actually meaningless, as there is
2130
# no search path for DLLs.
2131
hardcode_libdir_flag_spec='-L$libdir'
2132
allow_undefined_flag=unsupported
2133
always_export_symbols=yes
2135
extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
2136
sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
2137
test -f $output_objdir/impgen.exe || (cd $output_objdir && \
2138
if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
2139
else $CC -o impgen impgen.c ; fi)~
2140
$output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
2142
old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
2144
# cygwin and mingw dlls have different entry points and sets of symbols
2146
# FIXME: what about values for MSVC?
2147
dll_entry=__cygwin_dll_entry@12
2148
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
2152
dll_entry=_DllMainCRTStartup@12
2153
dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
2157
# mingw and cygwin differ, and it's simplest to just exclude the union
2158
# of the two symbol sets.
2159
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
2161
# recent cygwin and mingw systems supply a stub DllMain which the user
2162
# can override, but on older systems we have to supply one (in ltdll.c)
2163
if test "x$lt_cv_need_dllmain" = "xyes"; then
2164
ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
2165
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~
2166
test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
2172
# Extract the symbol export list from an `--export-all' def file,
2173
# then regenerate the def file from the symbol export list, so that
2174
# the compiled dll only exports the symbol export list.
2175
# Be careful not to strip the DATA tag left be newer dlltools.
2176
export_symbols_cmds="$ltdll_cmds"'
2177
$DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
2178
[sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//"] < $output_objdir/$soname-def > $export_symbols'
2180
# If the export-symbols file already is a .def file (1st line
2181
# is EXPORTS), use it as is.
2182
# If DATA tags from a recent dlltool are present, honour them!
2183
archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
2184
cp $export_symbols $output_objdir/$soname-def;
2186
echo EXPORTS > $output_objdir/$soname-def;
2188
cat $export_symbols | while read symbol; do
2191
2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
2192
*) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
2194
_lt_hint=`expr 1 + \$_lt_hint`;
2198
$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~
2199
$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~
2200
$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~
2201
$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~
2202
$CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
2206
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2207
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
2210
archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2211
archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2216
if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
2220
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
2221
*** create shared libraries on Solaris systems. Therefore, libtool
2222
*** is disabling shared libraries support. We urge you to upgrade GNU
2223
*** binutils to release 2.9.1 or newer. Another option is to modify
2224
*** your PATH or compiler configuration so that the native linker is
2225
*** used, and then restart.
2228
elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2229
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2230
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2237
archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2240
hardcode_shlibpath_var=no
2244
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2245
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2246
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2253
if test "$ld_shlibs" = yes; then
2254
runpath_var=LD_RUN_PATH
2255
hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
2256
export_dynamic_flag_spec='${wl}--export-dynamic'
2258
cygwin* | mingw* | pw32*)
2259
# dlltool doesn't understand --whole-archive et. al.
2260
whole_archive_flag_spec=
2263
# ancient GNU ld didn't support --whole-archive et. al.
2264
if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
2265
whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2267
whole_archive_flag_spec=
2273
# PORTME fill in a description of your system's linker (not GNU ld)
2276
allow_undefined_flag=unsupported
2277
always_export_symbols=yes
2278
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'
2279
# Note: this linker hardcodes the directories in LIBPATH if there
2280
# are no directories specified by -L.
2281
hardcode_minus_L=yes
2282
if test "$GCC" = yes && test -z "$link_static_flag"; then
2283
# Neither direct hardcoding nor static linking is supported with a
2285
hardcode_direct=unsupported
2290
# When large executables or shared objects are built, AIX ld can
2291
# have problems creating the table of contents. If linking a library
2292
# or program results in "error TOC overflow" add -mminimal-toc to
2293
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
2294
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2297
hardcode_libdir_separator=':'
2298
if test "$GCC" = yes; then
2299
collect2name=`${CC} -print-prog-name=collect2`
2300
if test -f "$collect2name" && \
2301
strings "$collect2name" | grep resolve_lib_name >/dev/null
2303
# We have reworked collect2
2306
# We have old collect2
2307
hardcode_direct=unsupported
2308
# It fails to find uninstalled libraries when the uninstalled
2309
# path is not listed in the libpath. Setting hardcode_minus_L
2310
# to unsupported forces relinking
2311
hardcode_minus_L=yes
2312
hardcode_libdir_flag_spec='-L$libdir'
2313
hardcode_libdir_separator=
2315
shared_flag='-shared'
2317
if test "$host_cpu" = ia64; then
2320
shared_flag='${wl}-bM:SRE'
2325
if test "$host_cpu" = ia64; then
2326
# On IA64, the linker does run time linking by default, so we don't
2327
# have to do anything special.
2328
aix_use_runtimelinking=no
2329
exp_sym_flag='-Bexport'
2332
# Test if we are trying to use run time linking, or normal AIX style linking.
2333
# If -brtl is somewhere in LDFLAGS, we need to do run time linking.
2334
aix_use_runtimelinking=no
2335
for ld_flag in $LDFLAGS; do
2336
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then
2337
aix_use_runtimelinking=yes
2341
exp_sym_flag='-bexport'
2342
no_entry_flag='-bnoentry'
2344
# It seems that -bexpall can do strange things, so it is better to
2345
# generate a list of symbols to export.
2346
always_export_symbols=yes
2347
if test "$aix_use_runtimelinking" = yes; then
2348
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
2349
allow_undefined_flag=' -Wl,-G'
2350
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"
2352
if test "$host_cpu" = ia64; then
2353
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
2354
allow_undefined_flag="-znodefs"
2355
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"
2357
hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
2358
# Warning - without using the other run time loading flags, -berok will
2359
# link without error, but may produce a broken library.
2360
allow_undefined_flag='${wl}-berok"
2361
# This is a bit strange, but is similar to how AIX traditionally builds
2362
# it's shared libraries.
2363
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'
2369
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)'
2370
hardcode_libdir_flag_spec='-L$libdir'
2371
hardcode_minus_L=yes
2372
# see comment about different semantics on the GNU ld section
2376
cygwin* | mingw* | pw32*)
2377
# When not using gcc, we currently assume that we are using
2378
# Microsoft Visual C++.
2379
# hardcode_libdir_flag_spec is actually meaningless, as there is
2380
# no search path for DLLs.
2381
hardcode_libdir_flag_spec=' '
2382
allow_undefined_flag=unsupported
2383
# Tell ltmain to make .lib files, not .a files.
2385
# FIXME: Setting linknames here is a bad hack.
2386
archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
2387
# The linker will automatically build a .lib file if we build a DLL.
2388
old_archive_from_new_cmds='true'
2389
# FIXME: Should let the user specify the lib program.
2390
old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
2391
fix_srcfile_path='`cygpath -w "$srcfile"`'
2394
darwin* | rhapsody*)
2395
allow_undefined_flag='-undefined suppress'
2396
# FIXME: Relying on posixy $() will cause problems for
2397
# cross-compilation, but unfortunately the echo tests do not
2398
# yet detect zsh echo's removal of \ escapes.
2399
archive_cmds='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linkopts -install_name $rpath/$soname $(test -n "$verstring" -a x$verstring != x0.0 && echo $verstring)'
2400
# We need to add '_' to the symbols in $export_symbols first
2401
#archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
2403
hardcode_shlibpath_var=no
2404
whole_archive_flag_spec='-all_load $convenience'
2411
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
2412
# support. Future versions do this automatically, but an explicit c++rt0.o
2413
# does not break anything, and helps significantly (at the cost of a little
2416
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
2417
hardcode_libdir_flag_spec='-R$libdir'
2419
hardcode_shlibpath_var=no
2422
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
2424
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2426
hardcode_minus_L=yes
2427
hardcode_shlibpath_var=no
2430
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
2432
archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
2433
hardcode_libdir_flag_spec='-R$libdir'
2435
hardcode_shlibpath_var=no
2438
hpux9* | hpux10* | hpux11*)
2440
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' ;;
2441
*) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
2443
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
2444
hardcode_libdir_separator=:
2446
hardcode_minus_L=yes # Not in the search PATH, but as the default
2447
# location of the library.
2448
export_dynamic_flag_spec='${wl}-E'
2452
if test "$GCC" = yes; then
2453
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'
2455
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'
2457
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2458
hardcode_libdir_separator=:
2459
link_all_deplibs=yes
2463
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2464
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
2466
archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
2468
hardcode_libdir_flag_spec='-R$libdir'
2470
hardcode_shlibpath_var=no
2474
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
2476
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2477
hardcode_libdir_separator=:
2478
hardcode_shlibpath_var=no
2482
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2483
hardcode_libdir_flag_spec='-R$libdir'
2485
hardcode_shlibpath_var=no
2489
hardcode_libdir_flag_spec='-L$libdir'
2490
hardcode_minus_L=yes
2491
allow_undefined_flag=unsupported
2492
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'
2493
old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
2497
if test "$GCC" = yes; then
2498
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2499
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'
2501
allow_undefined_flag=' -expect_unresolved \*'
2502
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'
2504
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2505
hardcode_libdir_separator=:
2508
osf4* | osf5*) # as osf3* with the addition of -msym flag
2509
if test "$GCC" = yes; then
2510
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2511
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'
2512
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2514
allow_undefined_flag=' -expect_unresolved \*'
2515
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'
2516
archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
2517
$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'
2519
#Both c and cxx compiler support -rpath directly
2520
hardcode_libdir_flag_spec='-rpath $libdir'
2522
hardcode_libdir_separator=:
2526
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2527
hardcode_shlibpath_var=no
2528
runpath_var=LD_RUN_PATH
2529
hardcode_runpath_var=yes
2533
no_undefined_flag=' -z defs'
2534
# $CC -shared without GNU ld will not create a library from C++
2535
# object files and a static libstdc++, better avoid it by now
2536
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2537
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2538
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2539
hardcode_libdir_flag_spec='-R$libdir'
2540
hardcode_shlibpath_var=no
2542
[solaris2.[0-5] | solaris2.[0-5].*]) ;;
2543
*) # Supported since Solaris 2.6 (maybe 2.5.1?)
2544
whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
2546
link_all_deplibs=yes
2550
if test "x$host_vendor" = xsequent; then
2551
# Use $CC to link under sequent, because it throws in some extra .o
2552
# files that make .init and .fini sections work.
2553
archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
2555
archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
2557
hardcode_libdir_flag_spec='-L$libdir'
2559
hardcode_minus_L=yes
2560
hardcode_shlibpath_var=no
2564
if test "x$host_vendor" = xsno; then
2565
archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linkopts'
2566
hardcode_direct=yes # is this really true???
2568
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2569
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
2571
runpath_var='LD_RUN_PATH'
2572
hardcode_shlibpath_var=no
2576
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2577
hardcode_shlibpath_var=no
2578
export_dynamic_flag_spec='-Bexport'
2582
no_undefined_flag=' -z text'
2583
# $CC -shared without GNU ld will not create a library from C++
2584
# object files and a static libstdc++, better avoid it by now
2585
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2586
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2587
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2588
hardcode_libdir_flag_spec=
2589
hardcode_shlibpath_var=no
2590
runpath_var='LD_RUN_PATH'
2594
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2595
hardcode_libdir_flag_spec='-L$libdir'
2596
hardcode_shlibpath_var=no
2600
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2601
hardcode_libdir_flag_spec='-L$libdir'
2602
hardcode_shlibpath_var=no
2606
if test -d /usr/nec; then
2607
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2608
hardcode_shlibpath_var=no
2609
runpath_var=LD_RUN_PATH
2610
hardcode_runpath_var=yes
2616
archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2619
hardcode_shlibpath_var=no
2620
hardcode_runpath_var=yes
2621
runpath_var=LD_RUN_PATH
2624
sysv5uw7* | unixware7*)
2625
no_undefined_flag='${wl}-z ${wl}text'
2626
if test "$GCC" = yes; then
2627
archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2629
archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2631
runpath_var='LD_RUN_PATH'
2632
hardcode_shlibpath_var=no
2640
AC_MSG_RESULT([$ld_shlibs])
2641
test "$ld_shlibs" = no && can_build_shared=no
2643
# Check hardcoding attributes.
2644
AC_MSG_CHECKING([how to hardcode library paths into programs])
2646
if test -n "$hardcode_libdir_flag_spec" || \
2647
test -n "$runpath_var"; then
2649
# We can hardcode non-existant directories.
2650
if test "$hardcode_direct" != no &&
2651
# If the only mechanism to avoid hardcoding is shlibpath_var, we
2652
# have to relink, otherwise we might link with an installed library
2653
# when we should be linking with a yet-to-be-installed one
2654
## test "$hardcode_shlibpath_var" != no &&
2655
test "$hardcode_minus_L" != no; then
2656
# Linking always hardcodes the temporary library directory.
2657
hardcode_action=relink
2659
# We can link without hardcoding, and we can hardcode nonexisting dirs.
2660
hardcode_action=immediate
2663
# We cannot hardcode anything, or else we can only hardcode existing
2665
hardcode_action=unsupported
2667
AC_MSG_RESULT([$hardcode_action])
2671
AC_MSG_CHECKING([whether stripping libraries is possible])
2672
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2673
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2674
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2675
AC_MSG_RESULT([yes])
2680
reload_cmds='$LD$reload_flag -o $output$reload_objs'
2681
test -z "$deplibs_check_method" && deplibs_check_method=unknown
2683
# PORTME Fill in your ld.so characteristics
2684
AC_MSG_CHECKING([dynamic linker characteristics])
2686
libname_spec='lib$name'
2693
shlibpath_overrides_runpath=unknown
2695
dynamic_linker="$host_os ld.so"
2696
sys_lib_dlsearch_path_spec="/lib /usr/lib"
2697
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2702
library_names_spec='${libname}${release}.so$versuffix $libname.a'
2703
shlibpath_var=LIBPATH
2705
# AIX has no versioning support, so we append a major version to the name.
2706
soname_spec='${libname}${release}.so$major'
2711
if test "$host_cpu" = ia64; then
2712
# AIX 5 supports IA64
2713
library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
2714
shlibpath_var=LD_LIBRARY_PATH
2716
# With GCC up to 2.95.x, collect2 would create an import file
2717
# for dependence libraries. The import file would start with
2718
# the line `#! .'. This would cause the generated library to
2719
# depend on `.', always an invalid library. This was fixed in
2720
# development snapshots of GCC prior to 3.0.
2722
[ aix4 | aix4.[01] | aix4.[01].*)]
2723
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2725
echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2732
# AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2733
# soname into executable. Probably we can add versioning support to
2734
# collect2, so additional links can be useful in future.
2735
if test "$aix_use_runtimelinking" = yes; then
2736
# If using run time linking (on AIX 4.2 or later) use lib<name>.so instead of
2737
# lib<name>.a to let people know that these are not typical AIX shared libraries.
2738
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2740
# We preserve .a as extension for shared libraries through AIX4.2
2741
# and later when we are not doing run time linking.
2742
library_names_spec='${libname}${release}.a $libname.a'
2743
soname_spec='${libname}${release}.so$major'
2745
shlibpath_var=LIBPATH
2746
deplibs_check_method=pass_all
2751
library_names_spec='$libname.ixlibrary $libname.a'
2752
# Create ${libname}_ixlibrary.a entries in /sys/libs.
2753
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'
2757
library_names_spec='${libname}.so'
2758
dynamic_linker="$host_os ld.so"
2759
shlibpath_var=LIBRARY_PATH
2765
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2766
soname_spec='${libname}${release}.so$major'
2767
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2768
shlibpath_var=LD_LIBRARY_PATH
2769
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2770
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2771
export_dynamic_flag_spec=-rdynamic
2772
# the default ld.so.conf also contains /usr/contrib/lib and
2773
# /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2774
# libtool to hard-code these into programs
2777
cygwin* | mingw* | pw32*)
2778
version_type=windows
2781
case $GCC,$host_os in
2783
library_names_spec='$libname.dll.a'
2784
soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | [sed -e 's/[.]/-/g']`${versuffix}.dll'
2785
postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
2786
dldir=$destdir/`dirname \$dlpath`~
2787
test -d \$dldir || mkdir -p \$dldir~
2788
$install_prog .libs/$dlname \$dldir/$dlname'
2789
postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
2790
dlpath=$dir/\$dldll~
2794
library_names_spec='${libname}`echo ${release} | [sed -e 's/[.]/-/g']`${versuffix}.dll'
2795
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
2798
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
2801
library_names_spec='${libname}`echo ${release} | [sed -e 's/[.]/-/g']`${versuffix}.dll $libname.lib'
2804
dynamic_linker='Win32 ld.exe'
2805
# FIXME: first we should search . and the directory the executable is in
2809
darwin* | rhapsody*)
2810
dynamic_linker="$host_os dyld"
2814
# FIXME: Relying on posixy $() will cause problems for
2815
# cross-compilation, but unfortunately the echo tests do not
2816
# yet detect zsh echo's removal of \ escapes.
2817
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)'
2818
soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
2819
shlibpath_overrides_runpath=yes
2820
shlibpath_var=DYLD_LIBRARY_PATH
2828
objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
2829
version_type=freebsd-$objformat
2830
case $version_type in
2832
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
2837
library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
2841
shlibpath_var=LD_LIBRARY_PATH
2844
shlibpath_overrides_runpath=yes
2847
shlibpath_overrides_runpath=no
2848
hardcode_into_libs=yes
2857
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
2858
soname_spec='${libname}${release}.so$major'
2859
shlibpath_var=LD_LIBRARY_PATH
2860
hardcode_into_libs=yes
2863
hpux9* | hpux10* | hpux11*)
2864
# Give a soname corresponding to the major version so that dld.sl refuses to
2865
# link against other versions.
2866
dynamic_linker="$host_os dld.sl"
2870
shlibpath_var=SHLIB_PATH
2871
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2872
library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
2873
soname_spec='${libname}${release}.sl$major'
2874
# HP-UX runs *really* slowly unless shared libraries are mode 555.
2875
postinstall_cmds='chmod 555 $lib'
2882
soname_spec='${libname}${release}.so$major'
2883
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
2889
case $LD in # libtool.m4 will add one of these switches to LD
2890
*-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
2891
*-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
2892
*-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
2893
*) libsuff= shlibsuff= libmagic=never-match;;
2897
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2898
shlibpath_overrides_runpath=no
2899
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2900
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2903
# No shared lib support for Linux oldld, aout, or coff.
2904
linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
2908
# This must be Linux ELF.
2913
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2914
soname_spec='${libname}${release}.so$major'
2915
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2916
shlibpath_var=LD_LIBRARY_PATH
2917
shlibpath_overrides_runpath=no
2918
# This implies no fast_install, which is unacceptable.
2919
# Some rework will be needed to allow for fast_install
2920
# before this can be enabled.
2921
hardcode_into_libs=yes
2923
# We used to test for /lib/ld.so.1 and disable shared libraries on
2924
# powerpc, because MkLinux only supported shared libraries with the
2925
# GNU dynamic linker. Since this was broken with cross compilers,
2926
# most powerpc-linux boxes support dynamic linking these days and
2927
# people can always --disable-shared, the test was removed, and we
2928
# assume the GNU/Linux dynamic linker is in use.
2929
dynamic_linker='GNU/Linux ld.so'
2936
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2937
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2938
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2939
dynamic_linker='NetBSD (a.out) ld.so'
2941
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
2942
soname_spec='${libname}${release}.so$major'
2943
dynamic_linker='NetBSD ld.elf_so'
2945
shlibpath_var=LD_LIBRARY_PATH
2946
shlibpath_overrides_runpath=yes
2947
hardcode_into_libs=yes
2952
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2953
shlibpath_var=LD_LIBRARY_PATH
2954
shlibpath_overrides_runpath=yes
2959
if test "$with_gnu_ld" = yes; then
2963
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2964
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2965
shlibpath_var=LD_LIBRARY_PATH
2969
libname_spec='$name'
2971
library_names_spec='$libname.dll $libname.a'
2972
dynamic_linker='OS/2 ld.exe'
2973
shlibpath_var=LIBPATH
2976
osf3* | osf4* | osf5*)
2979
soname_spec='${libname}${release}.so'
2980
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
2981
shlibpath_var=LD_LIBRARY_PATH
2982
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2983
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2988
soname_spec='${libname}${release}.so$major'
2989
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2990
shlibpath_var=LD_LIBRARY_PATH
2997
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2998
soname_spec='${libname}${release}.so$major'
2999
shlibpath_var=LD_LIBRARY_PATH
3000
shlibpath_overrides_runpath=yes
3001
hardcode_into_libs=yes
3002
# ldd complains unless libraries are executable
3003
postinstall_cmds='chmod +x $lib'
3008
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
3009
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3010
shlibpath_var=LD_LIBRARY_PATH
3011
shlibpath_overrides_runpath=yes
3012
if test "$with_gnu_ld" = yes; then
3018
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3020
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3021
soname_spec='${libname}${release}.so$major'
3022
shlibpath_var=LD_LIBRARY_PATH
3023
case $host_vendor in
3025
shlibpath_overrides_runpath=no
3030
shlibpath_overrides_runpath=no
3031
sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3038
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3039
soname_spec='${libname}${release}.so$major'
3040
shlibpath_var=LD_LIBRARY_PATH
3047
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3048
soname_spec='${libname}${release}.so$major'
3049
shlibpath_var=LD_LIBRARY_PATH
3053
if test -d /usr/nec ;then
3055
library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
3056
soname_spec='$libname.so.$major'
3057
shlibpath_var=LD_LIBRARY_PATH
3065
AC_MSG_RESULT([$dynamic_linker])
3066
test "$dynamic_linker" = no && can_build_shared=no
3068
# Report the final consequences.
3069
AC_MSG_CHECKING([if libtool supports shared libraries])
3070
AC_MSG_RESULT([$can_build_shared])
3072
if test "$hardcode_action" = relink; then
3073
# Fast installation is not supported
3074
enable_fast_install=no
3075
elif test "$shlibpath_overrides_runpath" = yes ||
3076
test "$enable_shared" = no; then
3077
# Fast installation is not necessary
3078
enable_fast_install=needless
3081
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3082
if test "$GCC" = yes; then
3083
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3086
AC_LIBTOOL_DLOPEN_SELF
3088
if test "$enable_shared" = yes && test "$GCC" = yes; then
3089
case $archive_cmds in
3091
# FIXME: we may have to deal with multi-command sequences.
3094
# Test whether the compiler implicitly links with -lc since on some
3095
# systems, -lgcc has to come before -lc. If gcc already passes -lc
3096
# to ld, don't add -lc before -lgcc.
3097
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
3098
AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
3100
echo 'static int dummy;' > conftest.$ac_ext
3102
if AC_TRY_EVAL(ac_compile); then
3105
libobjs=conftest.$ac_objext
3107
wl=$lt_cv_prog_cc_wl
3113
save_allow_undefined_flag=$allow_undefined_flag
3114
allow_undefined_flag=
3115
if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
3117
lt_cv_archive_cmds_need_lc=no
3119
lt_cv_archive_cmds_need_lc=yes
3121
allow_undefined_flag=$save_allow_undefined_flag
3123
cat conftest.err 1>&5
3125
AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
3129
need_lc=${lt_cv_archive_cmds_need_lc-yes}
3131
# The second clause should only fire when bootstrapping the
3132
# libtool distribution, otherwise you forgot to ship ltmain.sh
3133
# with your package, and you will get complaints that there are
3134
# no rules to generate ltmain.sh.
3135
if test -f "$ltmain"; then
3138
# If there is no Makefile yet, we rely on a make rule to execute
3139
# `config.status --recheck' to rerun these tests and create the
3140
# libtool script then.
3141
test -f Makefile && make "$ltmain"
3144
if test -f "$ltmain"; then
3145
trap "$rm \"${ofile}T\"; exit 1" 1 2 15
3148
echo creating $ofile
3150
# Now quote all the things that may contain metacharacters while being
3151
# careful not to overquote the AC_SUBSTed values. We take copies of the
3152
# variables and quote the copies for generation of the libtool script.
3153
for var in echo old_CC old_CFLAGS \
3154
AR AR_FLAGS CC LD LN_S NM SHELL \
3155
reload_flag reload_cmds wl \
3156
pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
3157
thread_safe_flag_spec whole_archive_flag_spec libname_spec \
3158
library_names_spec soname_spec \
3159
RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
3160
old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
3161
postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
3162
old_striplib striplib file_magic_cmd export_symbols_cmds \
3163
deplibs_check_method allow_undefined_flag no_undefined_flag \
3164
finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
3165
hardcode_libdir_flag_spec hardcode_libdir_separator \
3166
sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
3167
compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
3170
reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
3171
old_postinstall_cmds | old_postuninstall_cmds | \
3172
export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
3173
extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
3174
postinstall_cmds | postuninstall_cmds | \
3175
finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
3176
# Double-quote double-evaled strings.
3177
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
3180
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
3185
cat <<__EOF__ > "${ofile}T"
3188
# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
3189
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
3190
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
3192
# Copyright (C) 1996-2000 Free Software Foundation, Inc.
3193
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
3195
# This program is free software; you can redistribute it and/or modify
3196
# it under the terms of the GNU General Public License as published by
3197
# the Free Software Foundation; either version 2 of the License, or
3198
# (at your option) any later version.
3200
# This program is distributed in the hope that it will be useful, but
3201
# WITHOUT ANY WARRANTY; without even the implied warranty of
3202
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3203
# General Public License for more details.
3205
# You should have received a copy of the GNU General Public License
3206
# along with this program; if not, write to the Free Software
3207
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3209
# As a special exception to the GNU General Public License, if you
3210
# distribute this file as part of a program that contains a
3211
# configuration script generated by Autoconf, you may include it under
3212
# the same distribution terms that you use for the rest of that program.
3214
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
3215
Xsed="sed -e s/^X//"
3217
# The HP-UX ksh and POSIX shell print the target directory to stdout
3219
if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
3221
# ### BEGIN LIBTOOL CONFIG
3223
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3225
# Shell to use when invoking shell scripts.
3228
# Whether or not to build shared libraries.
3229
build_libtool_libs=$enable_shared
3231
# Whether or not to add -lc for building shared libraries.
3232
build_libtool_need_lc=$need_lc
3234
# Whether or not to build static libraries.
3235
build_old_libs=$enable_static
3237
# Whether or not to optimize for fast installation.
3238
fast_install=$enable_fast_install
3241
host_alias=$host_alias
3244
# An echo program that does not interpret backslashes.
3249
AR_FLAGS=$lt_AR_FLAGS
3251
# The default C compiler.
3254
# Is the compiler the GNU C compiler?
3257
# The linker used to build libraries.
3260
# Whether we need hard or soft links.
3263
# A BSD-compatible nm program.
3266
# A symbol stripping program
3269
# Used to examine libraries when file_magic_cmd begins "file"
3270
MAGIC_CMD=$MAGIC_CMD
3272
# Used on cygwin: DLL creation program.
3275
# Used on cygwin: object dumper.
3278
# Used on cygwin: assembler.
3281
# The name of the directory that contains temporary libtool files.
3284
# How to create reloadable object files.
3285
reload_flag=$lt_reload_flag
3286
reload_cmds=$lt_reload_cmds
3288
# How to pass a linker flag through the compiler.
3291
# Object file suffix (normally "o").
3294
# Old archive suffix (normally "a").
3297
# Executable file suffix (normally "").
3300
# Additional compiler flags for building library objects.
3301
pic_flag=$lt_pic_flag
3304
# Does compiler simultaneously support -c and -o options?
3305
compiler_c_o=$lt_compiler_c_o
3307
# Can we write directly to a .lo ?
3308
compiler_o_lo=$lt_compiler_o_lo
3310
# Must we lock files when doing compilation ?
3311
need_locks=$lt_need_locks
3313
# Do we need the lib prefix for modules?
3314
need_lib_prefix=$need_lib_prefix
3316
# Do we need a version for libraries?
3317
need_version=$need_version
3319
# Whether dlopen is supported.
3320
dlopen_support=$enable_dlopen
3322
# Whether dlopen of programs is supported.
3323
dlopen_self=$enable_dlopen_self
3325
# Whether dlopen of statically linked programs is supported.
3326
dlopen_self_static=$enable_dlopen_self_static
3328
# Compiler flag to prevent dynamic linking.
3329
link_static_flag=$lt_link_static_flag
3331
# Compiler flag to turn off builtin functions.
3332
no_builtin_flag=$lt_no_builtin_flag
3334
# Compiler flag to allow reflexive dlopens.
3335
export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
3337
# Compiler flag to generate shared objects directly from archives.
3338
whole_archive_flag_spec=$lt_whole_archive_flag_spec
3340
# Compiler flag to generate thread-safe objects.
3341
thread_safe_flag_spec=$lt_thread_safe_flag_spec
3343
# Library versioning type.
3344
version_type=$version_type
3346
# Format of library name prefix.
3347
libname_spec=$lt_libname_spec
3349
# List of archive names. First name is the real one, the rest are links.
3350
# The last name is the one that the linker finds with -lNAME.
3351
library_names_spec=$lt_library_names_spec
3353
# The coded name of the library, if different from the real name.
3354
soname_spec=$lt_soname_spec
3356
# Commands used to build and install an old-style archive.
3358
old_archive_cmds=$lt_old_archive_cmds
3359
old_postinstall_cmds=$lt_old_postinstall_cmds
3360
old_postuninstall_cmds=$lt_old_postuninstall_cmds
3362
# Create an old-style archive from a shared archive.
3363
old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
3365
# Create a temporary old-style archive to link instead of a shared archive.
3366
old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
3368
# Commands used to build and install a shared archive.
3369
archive_cmds=$lt_archive_cmds
3370
archive_expsym_cmds=$lt_archive_expsym_cmds
3371
postinstall_cmds=$lt_postinstall_cmds
3372
postuninstall_cmds=$lt_postuninstall_cmds
3374
# Commands to strip libraries.
3375
old_striplib=$lt_old_striplib
3376
striplib=$lt_striplib
3378
# Method to check whether dependent libraries are shared objects.
3379
deplibs_check_method=$lt_deplibs_check_method
3381
# Command to use when deplibs_check_method == file_magic.
3382
file_magic_cmd=$lt_file_magic_cmd
3384
# Flag that allows shared libraries with undefined symbols to be built.
3385
allow_undefined_flag=$lt_allow_undefined_flag
3387
# Flag that forces no undefined symbols.
3388
no_undefined_flag=$lt_no_undefined_flag
3390
# Commands used to finish a libtool library installation in a directory.
3391
finish_cmds=$lt_finish_cmds
3393
# Same as above, but a single script fragment to be evaled but not shown.
3394
finish_eval=$lt_finish_eval
3396
# Take the output of nm and produce a listing of raw symbols and C names.
3397
global_symbol_pipe=$lt_global_symbol_pipe
3399
# Transform the output of nm in a proper C declaration
3400
global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
3402
# This is the shared library runtime path variable.
3403
runpath_var=$runpath_var
3405
# This is the shared library path variable.
3406
shlibpath_var=$shlibpath_var
3408
# Is shlibpath searched before the hard-coded library search path?
3409
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
3411
# How to hardcode a shared library path into an executable.
3412
hardcode_action=$hardcode_action
3414
# Whether we should hardcode library paths into libraries.
3415
hardcode_into_libs=$hardcode_into_libs
3417
# Flag to hardcode \$libdir into a binary during linking.
3418
# This must work even if \$libdir does not exist.
3419
hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
3421
# Whether we need a single -rpath flag with a separated argument.
3422
hardcode_libdir_separator=$lt_hardcode_libdir_separator
3424
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
3426
hardcode_direct=$hardcode_direct
3428
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
3430
hardcode_minus_L=$hardcode_minus_L
3432
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
3433
# the resulting binary.
3434
hardcode_shlibpath_var=$hardcode_shlibpath_var
3436
# Variables whose values should be saved in libtool wrapper scripts and
3437
# restored at relink time.
3438
variables_saved_for_relink="$variables_saved_for_relink"
3440
# Whether libtool must link a program against all its dependency libraries.
3441
link_all_deplibs=$link_all_deplibs
3443
# Compile-time system search path for libraries
3444
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
3446
# Run-time system search path for libraries
3447
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
3449
# Fix the shell variable \$srcfile for the compiler.
3450
fix_srcfile_path="$fix_srcfile_path"
3452
# Set to yes if exported symbols are required.
3453
always_export_symbols=$always_export_symbols
3455
# The commands to list exported symbols.
3456
export_symbols_cmds=$lt_export_symbols_cmds
3458
# The commands to extract the exported symbol list from a shared archive.
3459
extract_expsyms_cmds=$lt_extract_expsyms_cmds
3461
# Symbols that should not be listed in the preloaded symbols.
3462
exclude_expsyms=$lt_exclude_expsyms
3464
# Symbols that must always be exported.
3465
include_expsyms=$lt_include_expsyms
3467
# ### END LIBTOOL CONFIG
3473
cat <<\EOF >> "${ofile}T"
3475
# AIX sometimes has problems with the GCC collect2 program. For some
3476
# reason, if we set the COLLECT_NAMES environment variable, the problems
3477
# vanish in a puff of smoke.
3478
if test "X${COLLECT_NAMES+set}" != Xset; then
3480
export COLLECT_NAMES
3487
cygwin* | mingw* | pw32* | os2*)
3488
cat <<'EOF' >> "${ofile}T"
3489
# This is a source program that is used to create dlls on Windows
3490
# Don't remove nor modify the starting and closing comments
3491
# /* ltdll.c starts here */
3492
# #define WIN32_LEAN_AND_MEAN
3493
# #include <windows.h>
3494
# #undef WIN32_LEAN_AND_MEAN
3495
# #include <stdio.h>
3497
# #ifndef __CYGWIN__
3498
# # ifdef __CYGWIN32__
3499
# # define __CYGWIN__ __CYGWIN32__
3503
# #ifdef __cplusplus
3506
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
3507
# #ifdef __cplusplus
3512
# #include <cygwin/cygwin_dll.h>
3513
# DECLARE_CYGWIN_DLL( DllMain );
3515
# HINSTANCE __hDllInstance_base;
3518
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
3520
# __hDllInstance_base = hInst;
3523
# /* ltdll.c ends here */
3524
# This is a source program that is used to create import libraries
3525
# on Windows for dlls which lack them. Don't remove nor modify the
3526
# starting and closing comments
3527
# /* impgen.c starts here */
3528
# /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
3530
# This file is part of GNU libtool.
3532
# This program is free software; you can redistribute it and/or modify
3533
# it under the terms of the GNU General Public License as published by
3534
# the Free Software Foundation; either version 2 of the License, or
3535
# (at your option) any later version.
3537
# This program is distributed in the hope that it will be useful,
3538
# but WITHOUT ANY WARRANTY; without even the implied warranty of
3539
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3540
# GNU General Public License for more details.
3542
# You should have received a copy of the GNU General Public License
3543
# along with this program; if not, write to the Free Software
3544
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3547
# #include <stdio.h> /* for printf() */
3548
# #include <unistd.h> /* for open(), lseek(), read() */
3549
# #include <fcntl.h> /* for O_RDONLY, O_BINARY */
3550
# #include <string.h> /* for strdup() */
3552
# /* O_BINARY isn't required (or even defined sometimes) under Unix */
3554
# #define O_BINARY 0
3557
# static unsigned int
3558
# pe_get16 (fd, offset)
3562
# unsigned char b[2];
3563
# lseek (fd, offset, SEEK_SET);
3565
# return b[0] + (b[1]<<8);
3568
# static unsigned int
3569
# pe_get32 (fd, offset)
3573
# unsigned char b[4];
3574
# lseek (fd, offset, SEEK_SET);
3576
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3579
# static unsigned int
3583
# unsigned char *b = ptr;
3584
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3593
# unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
3594
# unsigned long export_rva, export_size, nsections, secptr, expptr;
3595
# unsigned long name_rvas, nexp;
3596
# unsigned char *expdata, *erva;
3597
# char *filename, *dll_name;
3599
# filename = argv[1];
3601
# dll = open(filename, O_RDONLY|O_BINARY);
3605
# dll_name = filename;
3607
# for (i=0; filename[i]; i++)
3608
# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
3609
# dll_name = filename + i +1;
3611
# pe_header_offset = pe_get32 (dll, 0x3c);
3612
# opthdr_ofs = pe_header_offset + 4 + 20;
3613
# num_entries = pe_get32 (dll, opthdr_ofs + 92);
3615
# if (num_entries < 1) /* no exports */
3618
# export_rva = pe_get32 (dll, opthdr_ofs + 96);
3619
# export_size = pe_get32 (dll, opthdr_ofs + 100);
3620
# nsections = pe_get16 (dll, pe_header_offset + 4 +2);
3621
# secptr = (pe_header_offset + 4 + 20 +
3622
# pe_get16 (dll, pe_header_offset + 4 + 16));
3625
# for (i = 0; i < nsections; i++)
3628
# unsigned long secptr1 = secptr + 40 * i;
3629
# unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
3630
# unsigned long vsize = pe_get32 (dll, secptr1 + 16);
3631
# unsigned long fptr = pe_get32 (dll, secptr1 + 20);
3632
# lseek(dll, secptr1, SEEK_SET);
3633
# read(dll, sname, 8);
3634
# if (vaddr <= export_rva && vaddr+vsize > export_rva)
3636
# expptr = fptr + (export_rva - vaddr);
3637
# if (export_rva + export_size > vaddr + vsize)
3638
# export_size = vsize - (export_rva - vaddr);
3643
# expdata = (unsigned char*)malloc(export_size);
3644
# lseek (dll, expptr, SEEK_SET);
3645
# read (dll, expdata, export_size);
3646
# erva = expdata - export_rva;
3648
# nexp = pe_as32 (expdata+24);
3649
# name_rvas = pe_as32 (expdata+32);
3651
# printf ("EXPORTS\n");
3652
# for (i = 0; i<nexp; i++)
3654
# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
3655
# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
3660
# /* impgen.c ends here */
3666
# We use sed instead of cat because bash on DJGPP gets confused if
3667
# if finds mixed CR/LF and LF-only lines. Since sed operates in
3668
# text mode, it properly converts lines to CR/LF. This bash problem
3669
# is reportedly fixed, but why not run on old versions too?
3670
sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
3672
mv -f "${ofile}T" "$ofile" || \
3673
(rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
3677
])# _LT_AC_LTCONFIG_HACK
3679
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
3680
AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
3682
# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
3683
AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
3685
# AC_ENABLE_SHARED - implement the --enable-shared flag
3686
# Usage: AC_ENABLE_SHARED[(DEFAULT)]
3687
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3689
AC_DEFUN([AC_ENABLE_SHARED],
3690
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3691
AC_ARG_ENABLE(shared,
3692
changequote(<<, >>)dnl
3693
<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
3694
changequote([, ])dnl
3695
[p=${PACKAGE-default}
3697
yes) enable_shared=yes ;;
3698
no) enable_shared=no ;;
3701
# Look at the argument we got. We use all the common list separators.
3702
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3703
for pkg in $enableval; do
3704
if test "X$pkg" = "X$p"; then
3711
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
3714
# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
3715
AC_DEFUN([AC_DISABLE_SHARED],
3716
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3717
AC_ENABLE_SHARED(no)])
3719
# AC_ENABLE_STATIC - implement the --enable-static flag
3720
# Usage: AC_ENABLE_STATIC[(DEFAULT)]
3721
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3723
AC_DEFUN([AC_ENABLE_STATIC],
3724
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3725
AC_ARG_ENABLE(static,
3726
changequote(<<, >>)dnl
3727
<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
3728
changequote([, ])dnl
3729
[p=${PACKAGE-default}
3731
yes) enable_static=yes ;;
3732
no) enable_static=no ;;
3735
# Look at the argument we got. We use all the common list separators.
3736
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3737
for pkg in $enableval; do
3738
if test "X$pkg" = "X$p"; then
3745
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
3748
# AC_DISABLE_STATIC - set the default static flag to --disable-static
3749
AC_DEFUN([AC_DISABLE_STATIC],
3750
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3751
AC_ENABLE_STATIC(no)])
3754
# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
3755
# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
3756
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3758
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
3759
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3760
AC_ARG_ENABLE(fast-install,
3761
changequote(<<, >>)dnl
3762
<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
3763
changequote([, ])dnl
3764
[p=${PACKAGE-default}
3766
yes) enable_fast_install=yes ;;
3767
no) enable_fast_install=no ;;
3769
enable_fast_install=no
3770
# Look at the argument we got. We use all the common list separators.
3771
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3772
for pkg in $enableval; do
3773
if test "X$pkg" = "X$p"; then
3774
enable_fast_install=yes
3780
enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
3783
# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
3784
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
3785
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3786
AC_ENABLE_FAST_INSTALL(no)])
3788
# AC_LIBTOOL_PICMODE - implement the --with-pic flag
3789
# Usage: AC_LIBTOOL_PICMODE[(MODE)]
3790
# Where MODE is either `yes' or `no'. If omitted, it defaults to
3792
AC_DEFUN([AC_LIBTOOL_PICMODE],
3793
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3794
pic_mode=ifelse($#,1,$1,default)])
3797
# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
3798
AC_DEFUN([AC_PATH_TOOL_PREFIX],
3799
[AC_MSG_CHECKING([for $1])
3800
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3803
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3806
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
3809
ac_save_MAGIC_CMD="$MAGIC_CMD"
3810
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3811
dnl $ac_dummy forces splitting on constant user-supplied paths.
3812
dnl POSIX.2 word splitting is done only on the output of word expansions,
3813
dnl not every word. This closes a longstanding sh security hole.
3814
ac_dummy="ifelse([$2], , $PATH, [$2])"
3815
for ac_dir in $ac_dummy; do
3816
test -z "$ac_dir" && ac_dir=.
3817
if test -f $ac_dir/$1; then
3818
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3819
if test -n "$file_magic_test_file"; then
3820
case $deplibs_check_method in
3822
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3823
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3824
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3825
egrep "$file_magic_regex" > /dev/null; then
3830
*** Warning: the command libtool uses to detect shared libraries,
3831
*** $file_magic_cmd, produces output that libtool cannot recognize.
3832
*** The result is that libtool may fail to recognize shared libraries
3833
*** as such. This will affect the creation of libtool libraries that
3834
*** depend on shared libraries, but programs linked with such libtool
3835
*** libraries will work regardless of this problem. Nevertheless, you
3836
*** may want to report the problem to your system manager and/or to
3837
*** bug-libtool@gnu.org
3847
MAGIC_CMD="$ac_save_MAGIC_CMD"
3850
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3851
if test -n "$MAGIC_CMD"; then
3852
AC_MSG_RESULT($MAGIC_CMD)
3859
# AC_PATH_MAGIC - find a file program which can recognise a shared library
3860
AC_DEFUN([AC_PATH_MAGIC],
3861
[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
3862
AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
3863
if test -z "$lt_cv_path_MAGIC_CMD"; then
3864
if test -n "$ac_tool_prefix"; then
3865
AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
3873
# AC_PROG_LD - find the path to the GNU or non-GNU linker
3874
AC_DEFUN([AC_PROG_LD],
3875
[AC_ARG_WITH(gnu-ld,
3876
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
3877
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
3878
AC_REQUIRE([AC_PROG_CC])dnl
3879
AC_REQUIRE([AC_CANONICAL_HOST])dnl
3880
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3882
if test "$GCC" = yes; then
3883
# Check if gcc -print-prog-name=ld gives a path.
3884
AC_MSG_CHECKING([for ld used by GCC])
3887
# gcc leaves a trailing carriage return which upsets mingw
3888
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3890
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3893
# Accept absolute paths.
3894
[[\\/]* | [A-Za-z]:[\\/]*)]
3895
[re_direlt='/[^/][^/]*/\.\./']
3896
# Canonicalize the path of ld
3897
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3898
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3899
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3901
test -z "$LD" && LD="$ac_prog"
3904
# If it fails, then pretend we aren't using GCC.
3908
# If it is relative, then search for the first ld in PATH.
3912
elif test "$with_gnu_ld" = yes; then
3913
AC_MSG_CHECKING([for GNU ld])
3915
AC_MSG_CHECKING([for non-GNU ld])
3917
AC_CACHE_VAL(lt_cv_path_LD,
3918
[if test -z "$LD"; then
3919
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3920
for ac_dir in $PATH; do
3921
test -z "$ac_dir" && ac_dir=.
3922
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3923
lt_cv_path_LD="$ac_dir/$ac_prog"
3924
# Check to see if the program is GNU ld. I'd rather use --version,
3925
# but apparently some GNU ld's only accept -v.
3926
# Break only if it was the GNU/non-GNU ld that we prefer.
3927
if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3928
test "$with_gnu_ld" != no && break
3930
test "$with_gnu_ld" != yes && break
3936
lt_cv_path_LD="$LD" # Let the user override the test with a path.
3939
if test -n "$LD"; then
3944
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3949
AC_DEFUN([AC_PROG_LD_GNU],
3950
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3951
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
3952
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3953
lt_cv_prog_gnu_ld=yes
3955
lt_cv_prog_gnu_ld=no
3957
with_gnu_ld=$lt_cv_prog_gnu_ld
3960
# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
3961
# -- PORTME Some linkers may need a different reload flag.
3962
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3963
[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
3964
[lt_cv_ld_reload_flag='-r'])
3965
reload_flag=$lt_cv_ld_reload_flag
3966
test -n "$reload_flag" && reload_flag=" $reload_flag"
3969
# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
3970
# -- PORTME fill in with the dynamic library characteristics
3971
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3972
[AC_CACHE_CHECK([how to recognise dependant libraries],
3973
lt_cv_deplibs_check_method,
3974
[lt_cv_file_magic_cmd='$MAGIC_CMD'
3975
lt_cv_file_magic_test_file=
3976
lt_cv_deplibs_check_method='unknown'
3977
# Need to set the preceding variable on all platforms that support
3978
# interlibrary dependencies.
3979
# 'none' -- dependencies not supported.
3980
# `unknown' -- same as none, but documents that we really don't know.
3981
# 'pass_all' -- all dependencies passed with no checks.
3982
# 'test_compile' -- check by making test program.
3983
# ['file_magic [regex]'] -- check by looking for files in library path
3984
# which responds to the $file_magic_cmd with a given egrep regex.
3985
# If you have `file' or equivalent on your system and you're not sure
3986
# whether `pass_all' will *always* work, you probably want this one.
3990
lt_cv_deplibs_check_method=pass_all
3994
lt_cv_deplibs_check_method=pass_all
3998
[lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)']
3999
lt_cv_file_magic_cmd='/usr/bin/file -L'
4000
lt_cv_file_magic_test_file=/shlib/libc.so
4003
cygwin* | mingw* | pw32*)
4004
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
4005
lt_cv_file_magic_cmd='$OBJDUMP -f'
4008
darwin* | rhapsody*)
4009
lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
4010
lt_cv_file_magic_cmd='/usr/bin/file -L'
4012
rhapsody* | darwin1.[012])
4013
lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
4016
lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
4022
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4025
# Not sure whether the presence of OpenBSD here was a mistake.
4026
# Let's accept both of them until this is cleared up.
4027
[lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library']
4028
lt_cv_file_magic_cmd=/usr/bin/file
4029
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4033
lt_cv_deplibs_check_method=pass_all
4038
lt_cv_deplibs_check_method=pass_all
4042
[lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library']
4043
lt_cv_file_magic_cmd=/usr/bin/file
4044
lt_cv_file_magic_test_file=/usr/lib/libc.sl
4050
# this will be overridden with pass_all, but let us keep it just in case
4051
lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
4055
*-32|*"-32 ") libmagic=32-bit;;
4056
*-n32|*"-n32 ") libmagic=N32;;
4057
*-64|*"-64 ") libmagic=64-bit;;
4058
*) libmagic=never-match;;
4060
# this will be overridden with pass_all, but let us keep it just in case
4061
[lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"]
4064
lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
4065
lt_cv_deplibs_check_method=pass_all
4068
# This must be Linux ELF.
4071
alpha* | i*86 | powerpc* | sparc* | ia64* )
4072
lt_cv_deplibs_check_method=pass_all ;;
4074
# glibc up to 2.1.1 does not perform some relocations on ARM
4075
[lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;]
4077
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
4081
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4082
[lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
4084
[lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$']
4089
[lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)']
4090
lt_cv_file_magic_cmd=/usr/bin/file
4091
lt_cv_file_magic_test_file=/usr/lib/libnls.so
4094
osf3* | osf4* | osf5*)
4095
# this will be overridden with pass_all, but let us keep it just in case
4096
lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
4097
lt_cv_file_magic_test_file=/shlib/libc.so
4098
lt_cv_deplibs_check_method=pass_all
4102
lt_cv_deplibs_check_method=pass_all
4106
lt_cv_deplibs_check_method=pass_all
4107
lt_cv_file_magic_test_file=/lib/libc.so
4110
[sysv5uw[78]* | sysv4*uw2*)]
4111
lt_cv_deplibs_check_method=pass_all
4114
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4115
case $host_vendor in
4117
[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]']
4118
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4121
lt_cv_deplibs_check_method=pass_all
4124
lt_cv_file_magic_cmd='/bin/file'
4125
[lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )']
4128
lt_cv_file_magic_cmd='/bin/file'
4129
[lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"]
4130
lt_cv_file_magic_test_file=/lib/libc.so
4136
file_magic_cmd=$lt_cv_file_magic_cmd
4137
deplibs_check_method=$lt_cv_deplibs_check_method
4141
# AC_PROG_NM - find the path to a BSD-compatible name lister
4142
AC_DEFUN([AC_PROG_NM],
4143
[AC_MSG_CHECKING([for BSD-compatible nm])
4144
AC_CACHE_VAL(lt_cv_path_NM,
4145
[if test -n "$NM"; then
4146
# Let the user override the test.
4149
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
4150
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
4151
test -z "$ac_dir" && ac_dir=.
4152
tmp_nm=$ac_dir/${ac_tool_prefix}nm
4153
if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
4154
# Check to see if the nm accepts a BSD-compat flag.
4155
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
4156
# nm: unknown option "B" ignored
4157
# Tru64's nm complains that /dev/null is an invalid object file
4158
if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
4159
lt_cv_path_NM="$tmp_nm -B"
4161
elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
4162
lt_cv_path_NM="$tmp_nm -p"
4165
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4166
continue # so that we can try to find one that supports BSD flags
4171
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
4174
AC_MSG_RESULT([$NM])
4177
# AC_CHECK_LIBM - check for math library
4178
AC_DEFUN([AC_CHECK_LIBM],
4179
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4182
*-*-beos* | *-*-cygwin* | *-*-pw32*)
4183
# These system don't have libm
4186
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4187
AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
4190
AC_CHECK_LIB(m, main, LIBM="-lm")
4195
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
4196
# the libltdl convenience library and INCLTDL to the include flags for
4197
# the libltdl header and adds --enable-ltdl-convenience to the
4198
# configure arguments. Note that LIBLTDL and INCLTDL are not
4199
# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
4200
# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
4201
# with '${top_builddir}/' and INCLTDL will be prefixed with
4202
# '${top_srcdir}/' (note the single quotes!). If your package is not
4203
# flat and you're not using automake, define top_builddir and
4204
# top_srcdir appropriately in the Makefiles.
4205
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
4206
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4207
case $enable_ltdl_convenience in
4208
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
4209
"") enable_ltdl_convenience=yes
4210
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
4212
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
4213
INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4216
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
4217
# the libltdl installable library and INCLTDL to the include flags for
4218
# the libltdl header and adds --enable-ltdl-install to the configure
4219
# arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
4220
# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
4221
# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
4222
# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
4223
# with '${top_srcdir}/' (note the single quotes!). If your package is
4224
# not flat and you're not using automake, define top_builddir and
4225
# top_srcdir appropriately in the Makefiles.
4226
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
4227
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
4228
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4229
AC_CHECK_LIB(ltdl, main,
4230
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
4231
[if test x"$enable_ltdl_install" = xno; then
4232
AC_MSG_WARN([libltdl not installed, but installation disabled])
4234
enable_ltdl_install=yes
4237
if test x"$enable_ltdl_install" = x"yes"; then
4238
ac_configure_args="$ac_configure_args --enable-ltdl-install"
4239
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
4240
INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4242
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
4249
AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
4250
AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
4251
AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
4252
AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
4253
AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
4254
AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
4255
AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
4257
# This is just to silence aclocal about the macro not being used
4258
ifelse([AC_DISABLE_FAST_INSTALL])