278
83
AC_MSG_ERROR([newly created file is older than distributed files!
279
84
Check your system clock])
281
87
AC_MSG_RESULT(yes)])
286
# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
288
# This program is free software; you can redistribute it and/or modify
289
# it under the terms of the GNU General Public License as published by
290
# the Free Software Foundation; either version 2, or (at your option)
293
# This program is distributed in the hope that it will be useful,
294
# but WITHOUT ANY WARRANTY; without even the implied warranty of
295
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
296
# GNU General Public License for more details.
298
# You should have received a copy of the GNU General Public License
299
# along with this program; if not, write to the Free Software
300
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
305
# AM_MISSING_PROG(NAME, PROGRAM)
306
# ------------------------------
307
AC_DEFUN([AM_MISSING_PROG],
308
[AC_REQUIRE([AM_MISSING_HAS_RUN])
309
$1=${$1-"${am_missing_run}$2"}
89
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
90
dnl The program must properly implement --version.
91
AC_DEFUN(AM_MISSING_PROG,
92
[AC_MSG_CHECKING(for working $2)
93
# Run test in a subshell; some versions of sh will print an error if
94
# an executable is not found, even if stderr is redirected.
95
# Redirect stdin to placate older versions of autoconf. Sigh.
96
if ($2 --version) < /dev/null > /dev/null 2>&1; then
101
AC_MSG_RESULT(missing)
315
# Define MISSING if not defined so far and test if it supports --run.
316
# If it does, set am_missing_run to use it, otherwise, to nothing.
317
AC_DEFUN([AM_MISSING_HAS_RUN],
318
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
319
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
320
# Use eval to expand $SHELL
321
if eval "$MISSING --run true"; then
322
am_missing_run="$MISSING --run "
325
AC_MSG_WARN([`missing' script is too old or missing])
331
# Copyright 2001 Free Software Foundation, Inc.
333
# This program is free software; you can redistribute it and/or modify
334
# it under the terms of the GNU General Public License as published by
335
# the Free Software Foundation; either version 2, or (at your option)
338
# This program is distributed in the hope that it will be useful,
339
# but WITHOUT ANY WARRANTY; without even the implied warranty of
340
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
341
# GNU General Public License for more details.
343
# You should have received a copy of the GNU General Public License
344
# along with this program; if not, write to the Free Software
345
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
348
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
349
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
350
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
352
# Of course, Automake must honor this variable whenever it calls a
353
# tool from the auxiliary directory. The problem is that $srcdir (and
354
# therefore $ac_aux_dir as well) can be either absolute or relative,
355
# depending on how configure is run. This is pretty annoying, since
356
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
357
# source directory, any form will work fine, but in subdirectories a
358
# relative path needs to be adjusted first.
360
# $ac_aux_dir/missing
361
# fails when called from a subdirectory if $ac_aux_dir is relative
362
# $top_srcdir/$ac_aux_dir/missing
363
# fails if $ac_aux_dir is absolute,
364
# fails when called from a subdirectory in a VPATH build with
365
# a relative $ac_aux_dir
367
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
368
# are both prefixed by $srcdir. In an in-source build this is usually
369
# harmless because $srcdir is `.', but things will broke when you
370
# start a VPATH build or use an absolute $srcdir.
372
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
373
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
374
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
375
# and then we would define $MISSING as
376
# MISSING="\${SHELL} $am_aux_dir/missing"
377
# This will work as long as MISSING is not called from configure, because
378
# unfortunately $(top_srcdir) has no meaning in configure.
379
# However there are other variables, like CC, which are often used in
380
# configure, and could therefore not use this "fixed" $ac_aux_dir.
382
# Another solution, used here, is to always expand $ac_aux_dir to an
383
# absolute PATH. The drawback is that using absolute paths prevent a
384
# configured tree to be moved without reconfiguration.
386
# Rely on autoconf to set up CDPATH properly.
389
AC_DEFUN([AM_AUX_DIR_EXPAND], [
390
# expand $ac_aux_dir to an absolute path
391
am_aux_dir=`cd $ac_aux_dir && pwd`
396
# Define $install_sh.
398
# Copyright 2001 Free Software Foundation, Inc.
400
# This program is free software; you can redistribute it and/or modify
401
# it under the terms of the GNU General Public License as published by
402
# the Free Software Foundation; either version 2, or (at your option)
405
# This program is distributed in the hope that it will be useful,
406
# but WITHOUT ANY WARRANTY; without even the implied warranty of
407
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
408
# GNU General Public License for more details.
410
# You should have received a copy of the GNU General Public License
411
# along with this program; if not, write to the Free Software
412
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
415
AC_DEFUN([AM_PROG_INSTALL_SH],
416
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
417
install_sh=${install_sh-"$am_aux_dir/install-sh"}
418
AC_SUBST(install_sh)])
420
# AM_PROG_INSTALL_STRIP
422
# Copyright 2001 Free Software Foundation, Inc.
424
# This program is free software; you can redistribute it and/or modify
425
# it under the terms of the GNU General Public License as published by
426
# the Free Software Foundation; either version 2, or (at your option)
429
# This program is distributed in the hope that it will be useful,
430
# but WITHOUT ANY WARRANTY; without even the implied warranty of
431
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
432
# GNU General Public License for more details.
434
# You should have received a copy of the GNU General Public License
435
# along with this program; if not, write to the Free Software
436
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
439
# One issue with vendor `install' (even GNU) is that you can't
440
# specify the program used to strip binaries. This is especially
441
# annoying in cross-compiling environments, where the build's strip
442
# is unlikely to handle the host's binaries.
443
# Fortunately install-sh will honor a STRIPPROG variable, so we
444
# always use install-sh in `make install-strip', and initialize
445
# STRIPPROG with the value of the STRIP variable (set by the user).
446
AC_DEFUN([AM_PROG_INSTALL_STRIP],
447
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
448
# Installed binaries are usually stripped using `strip' when the user
449
# run `make install-strip'. However `strip' might not be the right
450
# tool to use in cross-compilation environments, therefore Automake
451
# will honor the `STRIP' environment variable to overrule this program.
452
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
453
if test "$cross_compiling" != no; then
454
AC_CHECK_TOOL([STRIP], [strip], :)
456
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
457
AC_SUBST([INSTALL_STRIP_PROGRAM])])
460
# Copyright (C) 2003 Free Software Foundation, Inc.
462
# This program is free software; you can redistribute it and/or modify
463
# it under the terms of the GNU General Public License as published by
464
# the Free Software Foundation; either version 2, or (at your option)
467
# This program is distributed in the hope that it will be useful,
468
# but WITHOUT ANY WARRANTY; without even the implied warranty of
469
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
470
# GNU General Public License for more details.
472
# You should have received a copy of the GNU General Public License
473
# along with this program; if not, write to the Free Software
474
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
479
# Check whether the underlying file-system supports filenames
480
# with a leading dot. For instance MS-DOS doesn't.
481
AC_DEFUN([AM_SET_LEADING_DOT],
482
[rm -rf .tst 2>/dev/null
483
mkdir .tst 2>/dev/null
484
if test -d .tst; then
489
rmdir .tst 2>/dev/null
490
AC_SUBST([am__leading_dot])])
492
# serial 5 -*- Autoconf -*-
494
# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
496
# This program is free software; you can redistribute it and/or modify
497
# it under the terms of the GNU General Public License as published by
498
# the Free Software Foundation; either version 2, or (at your option)
501
# This program is distributed in the hope that it will be useful,
502
# but WITHOUT ANY WARRANTY; without even the implied warranty of
503
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
504
# GNU General Public License for more details.
506
# You should have received a copy of the GNU General Public License
507
# along with this program; if not, write to the Free Software
508
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
512
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
513
# written in clear, in which case automake, when reading aclocal.m4,
514
# will think it sees a *use*, and therefore will trigger all it's
515
# C support machinery. Also note that it means that autoscan, seeing
516
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
520
# _AM_DEPENDENCIES(NAME)
521
# ----------------------
522
# See how the compiler implements dependency checking.
523
# NAME is "CC", "CXX", "GCJ", or "OBJC".
524
# We try a few techniques and use that to set a single cache variable.
526
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
527
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
528
# dependency, and given that the user is not expected to run this macro,
529
# just rely on AC_PROG_CC.
530
AC_DEFUN([_AM_DEPENDENCIES],
531
[AC_REQUIRE([AM_SET_DEPDIR])dnl
532
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
533
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
534
AC_REQUIRE([AM_DEP_TRACK])dnl
536
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
537
[$1], CXX, [depcc="$CXX" am_compiler_list=],
538
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
539
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
540
[depcc="$$1" am_compiler_list=])
542
AC_CACHE_CHECK([dependency style of $depcc],
543
[am_cv_$1_dependencies_compiler_type],
544
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
545
# We make a subdir and do the tests there. Otherwise we can end up
546
# making bogus files that we don't know about and never remove. For
547
# instance it was reported that on HP-UX the gcc test will end up
548
# making a dummy file named `D' -- because `-MD' means `put the output
551
# Copy depcomp to subdir because otherwise we won't find it if we're
552
# using a relative directory.
553
cp "$am_depcomp" conftest.dir
556
am_cv_$1_dependencies_compiler_type=none
557
if test "$am_compiler_list" = ""; then
558
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
560
for depmode in $am_compiler_list; do
561
# We need to recreate these files for each test, as the compiler may
562
# overwrite some of them when testing with obscure command lines.
563
# This happens at least with the AIX C compiler.
564
echo '#include "conftest.h"' > conftest.c
565
echo 'int i;' > conftest.h
566
echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
570
# after this tag, mechanisms are not by side-effect, so they'll
571
# only be used when explicitly requested
572
if test "x$enable_dependency_tracking" = xyes; then
580
# We check with `-c' and `-o' for the sake of the "dashmstdout"
581
# mode. It turns out that the SunPro C++ compiler does not properly
582
# handle `-M -o', and we need to detect this.
583
if depmode=$depmode \
584
source=conftest.c object=conftest.o \
585
depfile=conftest.Po tmpdepfile=conftest.TPo \
586
$SHELL ./depcomp $depcc -c -o conftest.o conftest.c \
587
>/dev/null 2>conftest.err &&
588
grep conftest.h conftest.Po > /dev/null 2>&1 &&
589
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
590
# icc doesn't choke on unknown options, it will just issue warnings
591
# (even with -Werror). So we grep stderr for any message
592
# that says an option was ignored.
593
if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
594
am_cv_$1_dependencies_compiler_type=$depmode
603
am_cv_$1_dependencies_compiler_type=none
606
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
607
AM_CONDITIONAL([am__fastdep$1], [
608
test "x$enable_dependency_tracking" != xno \
609
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
615
# Choose a directory name for dependency files.
616
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
617
AC_DEFUN([AM_SET_DEPDIR],
618
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
619
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
625
AC_DEFUN([AM_DEP_TRACK],
626
[AC_ARG_ENABLE(dependency-tracking,
627
[ --disable-dependency-tracking Speeds up one-time builds
628
--enable-dependency-tracking Do not reject slow dependency extractors])
629
if test "x$enable_dependency_tracking" != xno; then
630
am_depcomp="$ac_aux_dir/depcomp"
633
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
634
AC_SUBST([AMDEPBACKSLASH])
637
# Generate code to set up dependency tracking. -*- Autoconf -*-
639
# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
641
# This program is free software; you can redistribute it and/or modify
642
# it under the terms of the GNU General Public License as published by
643
# the Free Software Foundation; either version 2, or (at your option)
646
# This program is distributed in the hope that it will be useful,
647
# but WITHOUT ANY WARRANTY; without even the implied warranty of
648
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
649
# GNU General Public License for more details.
651
# You should have received a copy of the GNU General Public License
652
# along with this program; if not, write to the Free Software
653
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
658
# _AM_OUTPUT_DEPENDENCY_COMMANDS
659
# ------------------------------
660
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
661
[for mf in $CONFIG_FILES; do
662
# Strip MF so we end up with the name of the file.
663
mf=`echo "$mf" | sed -e 's/:.*$//'`
664
# Check whether this is an Automake generated Makefile or not.
665
# We used to match only the files named `Makefile.in', but
666
# some people rename them; so instead we look at the file content.
667
# Grep'ing the first line is not enough: some people post-process
668
# each Makefile.in and add a new line on top of each file to say so.
669
# So let's grep whole file.
670
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
671
dirpart=`AS_DIRNAME("$mf")`
675
grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
676
# Extract the definition of DEP_FILES from the Makefile without
678
DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
679
test -z "$DEPDIR" && continue
680
# When using ansi2knr, U may be empty or an underscore; expand it
681
U=`sed -n -e '/^U = / s///p' < "$mf"`
682
test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
683
# We invoke sed twice because it is the simplest approach to
684
# changing $(DEPDIR) to its actual value in the expansion.
685
for file in `sed -n -e '
686
/^DEP_FILES = .*\\\\$/ {
695
/^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
696
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
697
# Make sure the directory exists.
698
test -f "$dirpart/$file" && continue
699
fdir=`AS_DIRNAME(["$file"])`
700
AS_MKDIR_P([$dirpart/$fdir])
701
# echo "creating $dirpart/$file"
702
echo '# dummy' > "$dirpart/$file"
705
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
708
# AM_OUTPUT_DEPENDENCY_COMMANDS
709
# -----------------------------
710
# This macro should only be invoked once -- use via AC_REQUIRE.
712
# This code is only required when automatic dependency tracking
713
# is enabled. FIXME. This creates each `.P' file that we will
714
# need in order to bootstrap the dependency handling code.
715
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
716
[AC_CONFIG_COMMANDS([depfiles],
717
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
718
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
721
# Check to see how 'make' treats includes. -*- Autoconf -*-
723
# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
725
# This program is free software; you can redistribute it and/or modify
726
# it under the terms of the GNU General Public License as published by
727
# the Free Software Foundation; either version 2, or (at your option)
730
# This program is distributed in the hope that it will be useful,
731
# but WITHOUT ANY WARRANTY; without even the implied warranty of
732
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
733
# GNU General Public License for more details.
735
# You should have received a copy of the GNU General Public License
736
# along with this program; if not, write to the Free Software
737
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
744
# Check to see how make treats includes.
745
AC_DEFUN([AM_MAKE_INCLUDE],
746
[am_make=${MAKE-make}
747
cat > confinc << 'END'
751
# If we don't find an include directive, just comment out the code.
752
AC_MSG_CHECKING([for style of include used by $am_make])
756
# First try GNU make style include.
757
echo "include confinc" > confmf
758
# We grep out `Entering directory' and `Leaving directory'
759
# messages which can occur if `w' ends up in MAKEFLAGS.
760
# In particular we don't look at `^make:' because GNU make might
761
# be invoked under some other name (usually "gmake"), in which
762
# case it prints its new name instead of `make'.
763
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
768
# Now try BSD make style include.
769
if test "$am__include" = "#"; then
770
echo '.include "confinc"' > confmf
771
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
777
AC_SUBST(am__include)
779
AC_MSG_RESULT($_am_result)
783
# AM_CONDITIONAL -*- Autoconf -*-
785
# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
787
# This program is free software; you can redistribute it and/or modify
788
# it under the terms of the GNU General Public License as published by
789
# the Free Software Foundation; either version 2, or (at your option)
792
# This program is distributed in the hope that it will be useful,
793
# but WITHOUT ANY WARRANTY; without even the implied warranty of
794
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
795
# GNU General Public License for more details.
797
# You should have received a copy of the GNU General Public License
798
# along with this program; if not, write to the Free Software
799
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
806
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
807
# -------------------------------------
808
# Define a conditional.
809
AC_DEFUN([AM_CONDITIONAL],
810
[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
811
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
821
AC_CONFIG_COMMANDS_PRE(
822
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
823
AC_MSG_ERROR([conditional "$1" was never defined.
824
Usually this means the macro was only invoked conditionally.])
827
# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
829
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
831
# This program is free software; you can redistribute it and/or modify
832
# it under the terms of the GNU General Public License as published by
833
# the Free Software Foundation; either version 2, or (at your option)
836
# This program is distributed in the hope that it will be useful,
837
# but WITHOUT ANY WARRANTY; without even the implied warranty of
838
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
839
# GNU General Public License for more details.
841
# You should have received a copy of the GNU General Public License
842
# along with this program; if not, write to the Free Software
843
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
850
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
851
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
853
# Add --enable-maintainer-mode option to configure.
856
# Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
858
# This program is free software; you can redistribute it and/or modify
859
# it under the terms of the GNU General Public License as published by
860
# the Free Software Foundation; either version 2, or (at your option)
863
# This program is distributed in the hope that it will be useful,
864
# but WITHOUT ANY WARRANTY; without even the implied warranty of
865
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
866
# GNU General Public License for more details.
868
# You should have received a copy of the GNU General Public License
869
# along with this program; if not, write to the Free Software
870
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
875
AC_DEFUN([AM_MAINTAINER_MODE],
876
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
877
dnl maintainer-mode is disabled by default
878
AC_ARG_ENABLE(maintainer-mode,
879
[ --enable-maintainer-mode enable make rules and dependencies not useful
880
(and sometimes confusing) to the casual installer],
881
USE_MAINTAINER_MODE=$enableval,
882
USE_MAINTAINER_MODE=no)
883
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
884
AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
885
MAINT=$MAINTAINER_MODE_TRUE
890
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
892
# libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
894
# serial 46 AC_PROG_LIBTOOL
896
AC_DEFUN([AC_PROG_LIBTOOL],
105
# Like AC_CONFIG_HEADER, but automatically create stamp file.
107
AC_DEFUN(AM_CONFIG_HEADER,
109
AC_CONFIG_HEADER([$1])
110
dnl When config.status generates a header, we must update the stamp-h file.
111
dnl This file resides in the same directory as the config header
112
dnl that is generated. We must strip everything past the first ":",
113
dnl and everything past the last "/".
114
AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
115
ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
116
<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
118
for am_file in <<$1>>; do
119
case " <<$>>CONFIG_HEADERS " in
120
*" <<$>>am_file "*<<)>>
121
echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
124
am_indx=`expr "<<$>>am_indx" + 1`
129
# serial 40 AC_PROG_LIBTOOL
130
AC_DEFUN(AC_PROG_LIBTOOL,
897
131
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
133
# Save cache, so that ltconfig can load it
136
# Actually configure libtool. ac_aux_dir is where install-sh is found.
137
CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
138
LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
139
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
140
DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
141
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
142
$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
143
|| AC_MSG_ERROR([libtool configure failed])
145
# Reload cache, that may have been modified by ltconfig
899
148
# This can be used to rebuild libtool when needed
900
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
149
LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
902
151
# Always use our own libtool.
903
152
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
904
153
AC_SUBST(LIBTOOL)dnl
906
# Prevent multiple expansion
907
define([AC_PROG_LIBTOOL], [])
155
# Redirect the config.log output again, so that the ltconfig log is not
156
# clobbered by the next message.
910
AC_DEFUN([AC_LIBTOOL_SETUP],
160
AC_DEFUN(AC_LIBTOOL_SETUP,
911
161
[AC_PREREQ(2.13)dnl
912
162
AC_REQUIRE([AC_ENABLE_SHARED])dnl
913
163
AC_REQUIRE([AC_ENABLE_STATIC])dnl
914
164
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
915
165
AC_REQUIRE([AC_CANONICAL_HOST])dnl
916
166
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
167
AC_REQUIRE([AC_PROG_RANLIB])dnl
917
168
AC_REQUIRE([AC_PROG_CC])dnl
918
169
AC_REQUIRE([AC_PROG_LD])dnl
919
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
920
170
AC_REQUIRE([AC_PROG_NM])dnl
921
AC_REQUIRE([LT_AC_PROG_SED])dnl
923
171
AC_REQUIRE([AC_PROG_LN_S])dnl
924
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
925
AC_REQUIRE([AC_OBJEXT])dnl
926
AC_REQUIRE([AC_EXEEXT])dnl
929
_LT_AC_PROG_ECHO_BACKSLASH
930
# Only perform the check for file, if the check method requires it
931
case $deplibs_check_method in
933
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
175
NONE) lt_target="$host" ;;
176
*) lt_target="$target" ;;
939
AC_CHECK_TOOL(RANLIB, ranlib, :)
940
AC_CHECK_TOOL(STRIP, strip, :)
942
ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
179
# Check for any special flags to pass to ltconfig.
180
libtool_flags="--cache-file=$cache_file"
181
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
182
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
183
test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
184
test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
185
test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
186
ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
187
[libtool_flags="$libtool_flags --enable-dlopen"])
943
188
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
944
enable_win32_dll=yes, enable_win32_dll=no)
189
[libtool_flags="$libtool_flags --enable-win32-dll"])
946
190
AC_ARG_ENABLE(libtool-lock,
947
191
[ --disable-libtool-lock avoid locking (might break parallel builds)])
948
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
192
test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
193
test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
950
195
# Some flags need to be propagated to the compiler or linker for good
951
196
# libtool support.
954
199
# Find out which ABI we are using.
955
200
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
956
201
if AC_TRY_EVAL(ac_compile); then
957
case `/usr/bin/file conftest.$ac_objext` in
202
case "`/usr/bin/file conftest.o`" in
959
204
LD="${LD-ld} -32"
987
229
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
988
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
230
[*-*-cygwin* | *-*-mingw*)
989
231
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
990
232
AC_CHECK_TOOL(AS, as, false)
991
233
AC_CHECK_TOOL(OBJDUMP, objdump, false)
993
# recent cygwin and mingw systems supply a stub DllMain which the user
994
# can override, but on older systems we have to supply one
995
AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
997
[extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
999
[lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
1002
*-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
1003
# old mingw systems require "-dll" to link a DLL, while more recent ones
1005
SAVE_CFLAGS="$CFLAGS"
1006
CFLAGS="$CFLAGS -mdll"
1007
AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
1008
[AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
1009
CFLAGS="$SAVE_CFLAGS" ;;
1010
*-*-cygwin* | *-*-pw32*)
1011
# cygwin systems need to pass --dll to the linker, and not link
1012
# crt.o which will require a WinMain@16 definition.
1013
lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
1019
_LT_AC_LTCONFIG_HACK
1023
# AC_LIBTOOL_HEADER_ASSERT
1024
# ------------------------
1025
AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT],
1026
[AC_CACHE_CHECK([whether $CC supports assert without backlinking],
1027
[lt_cv_func_assert_works],
1030
if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
1031
case `$CC --version 2>/dev/null` in
1032
[[12]].*) lt_cv_func_assert_works=no ;;
1033
*) lt_cv_func_assert_works=yes ;;
1039
if test "x$lt_cv_func_assert_works" = xyes; then
1040
AC_CHECK_HEADERS(assert.h)
1042
])# AC_LIBTOOL_HEADER_ASSERT
1044
# _LT_AC_CHECK_DLFCN
1045
# --------------------
1046
AC_DEFUN([_LT_AC_CHECK_DLFCN],
1047
[AC_CHECK_HEADERS(dlfcn.h)
1048
])# _LT_AC_CHECK_DLFCN
1050
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1051
# ---------------------------------
1052
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
1053
[AC_REQUIRE([AC_CANONICAL_HOST])
1054
AC_REQUIRE([AC_PROG_NM])
1055
AC_REQUIRE([AC_OBJEXT])
1056
# Check for command to grab the raw symbol name followed by C symbol from nm.
1057
AC_MSG_CHECKING([command to parse $NM output])
1058
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
1060
# These are sane defaults that work on at least a few old systems.
1061
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
1063
# Character class describing NM global symbol codes.
1064
symcode='[[BCDEGRST]]'
1066
# Regexp to match symbols that can be accessed directly from C.
1067
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
1069
# Transform the above into a raw symbol and a C symbol.
1070
symxfrm='\1 \2\3 \3'
1072
# Transform an extracted symbol line into a proper C declaration
1073
lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
1075
# Transform an extracted symbol line into symbol name and symbol address
1076
lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
1078
# Define system-specific variables.
1083
cygwin* | mingw* | pw32*)
1084
symcode='[[ABCDGISTW]]'
1086
hpux*) # Its linker distinguishes data from code symbols
1087
lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
1088
lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
1091
symcode='[[BCDEGRST]]'
1094
symcode='[[BCDEGQRST]]'
1100
symcode='[[DFNSTU]]'
1104
# Handle CRLF in mingw tool chain
1108
opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
1112
# If we're using GNU nm, then use its standard symbol codes.
1113
if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
1114
symcode='[[ABCDGISTW]]'
1117
# Try without a prefix undercore, then with it.
1118
for ac_symprfx in "" "_"; do
1120
# Write the raw and C identifiers.
1121
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
1123
# Check to see that the pipe works correctly.
1126
cat > conftest.$ac_ext <<EOF
1131
void nm_test_func(){}
1135
int main(){nm_test_var='a';nm_test_func();return(0);}
1138
if AC_TRY_EVAL(ac_compile); then
1139
# Now try to grab the symbols.
1141
if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
1142
# Try sorting and uniquifying the output.
1143
if sort "$nlist" | uniq > "$nlist"T; then
1144
mv -f "$nlist"T "$nlist"
1149
# Make sure that we snagged all the symbols we need.
1150
if egrep ' nm_test_var$' "$nlist" >/dev/null; then
1151
if egrep ' nm_test_func$' "$nlist" >/dev/null; then
1152
cat <<EOF > conftest.$ac_ext
1158
# Now generate the symbol file.
1159
eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
1161
cat <<EOF >> conftest.$ac_ext
1162
#if defined (__STDC__) && __STDC__
1163
# define lt_ptr void *
1165
# define lt_ptr char *
1169
/* The mapping between symbol names and symbols. */
1174
lt_preloaded_symbols[[]] =
1177
sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
1178
cat <<\EOF >> conftest.$ac_ext
1186
# Now try linking the two files.
1187
mv conftest.$ac_objext conftstm.$ac_objext
1189
save_CFLAGS="$CFLAGS"
1190
LIBS="conftstm.$ac_objext"
1191
CFLAGS="$CFLAGS$no_builtin_flag"
1192
if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
1196
CFLAGS="$save_CFLAGS"
1198
echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
1201
echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
1204
echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
1207
echo "$progname: failed program was:" >&AC_FD_CC
1208
cat conftest.$ac_ext >&5
1210
rm -f conftest* conftst*
1212
# Do not use the global_symbol_pipe unless it works.
1213
if test "$pipe_works" = yes; then
1216
lt_cv_sys_global_symbol_pipe=
1220
global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
1221
if test -z "$lt_cv_sys_global_symbol_pipe"; then
1222
global_symbol_to_cdecl=
1223
global_symbol_to_c_name_address=
1225
global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
1226
global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
1228
if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
1230
AC_MSG_RESULT(failed)
1234
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1236
# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1237
# ---------------------------------
1238
AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
1239
[# Find the correct PATH separator. Usually this is `:', but
1240
# DJGPP uses `;' like DOS.
1241
if test "X${PATH_SEPARATOR+set}" != Xset; then
1242
UNAME=${UNAME-`uname 2>/dev/null`}
1244
*-DOS) lt_cv_sys_path_separator=';' ;;
1245
*) lt_cv_sys_path_separator=':' ;;
1247
PATH_SEPARATOR=$lt_cv_sys_path_separator
1249
])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1251
# _LT_AC_PROG_ECHO_BACKSLASH
1252
# --------------------------
1253
# Add some code to the start of the generated configure script which
1254
# will find an echo command which doesn't interpret backslashes.
1255
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1256
[ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1257
[AC_DIVERT_PUSH(NOTICE)])
1258
_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1260
# Check that we are running under the correct shell.
1261
SHELL=${CONFIG_SHELL-/bin/sh}
1265
# Remove one level of quotation (which was required for Make).
1266
ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1271
if test "X[$]1" = X--no-reexec; then
1272
# Discard the --no-reexec flag, and continue.
1274
elif test "X[$]1" = X--fallback-echo; then
1275
# Avoid inline document here, it may be left over
1277
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
1278
# Yippee, $echo works!
1281
# Restart under the correct shell.
1282
exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1285
if test "X[$]1" = X--fallback-echo; then
1286
# used as fallback echo
1294
# The HP-UX ksh and POSIX shell print the target directory to stdout
1296
if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
1298
if test -z "$ECHO"; then
1299
if test "X${echo_test_string+set}" != Xset; then
1300
# find a string as large as possible, as long as the shell can cope with it
1301
for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1302
# expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1303
if (echo_test_string="`eval $cmd`") 2>/dev/null &&
1304
echo_test_string="`eval $cmd`" &&
1305
(test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1312
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1313
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1314
test "X$echo_testing_string" = "X$echo_test_string"; then
1317
# The Solaris, AIX, and Digital Unix default echo programs unquote
1318
# backslashes. This makes it impossible to quote backslashes using
1319
# echo "$something" | sed 's/\\/\\\\/g'
1321
# So, first we look for a working echo in the user's PATH.
1323
IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1324
for dir in $PATH /usr/ucb; do
1325
if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1326
test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1327
echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1328
test "X$echo_testing_string" = "X$echo_test_string"; then
1335
if test "X$echo" = Xecho; then
1336
# We didn't find a better echo, so look for alternatives.
1337
if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1338
echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1339
test "X$echo_testing_string" = "X$echo_test_string"; then
1340
# This shell has a builtin print -r that does the trick.
1342
elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1343
test "X$CONFIG_SHELL" != X/bin/ksh; then
1344
# If we have ksh, try running configure again with it.
1345
ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1346
export ORIGINAL_CONFIG_SHELL
1347
CONFIG_SHELL=/bin/ksh
1349
exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1353
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1354
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1355
test "X$echo_testing_string" = "X$echo_test_string"; then
1356
# Cool, printf works
1358
elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1359
test "X$echo_testing_string" = 'X\t' &&
1360
echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1361
test "X$echo_testing_string" = "X$echo_test_string"; then
1362
CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1364
SHELL="$CONFIG_SHELL"
1366
echo="$CONFIG_SHELL [$]0 --fallback-echo"
1367
elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1368
test "X$echo_testing_string" = 'X\t' &&
1369
echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1370
test "X$echo_testing_string" = "X$echo_test_string"; then
1371
echo="$CONFIG_SHELL [$]0 --fallback-echo"
1373
# maybe with a smaller string...
1376
for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1377
if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1384
if test "$prev" != 'sed 50q "[$]0"'; then
1385
echo_test_string=`eval $prev`
1386
export echo_test_string
1387
exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1389
# Oops. We lost completely, so just stick with echo.
1398
# Copy echo and quote the copy suitably for passing to libtool from
1399
# the Makefile, instead of quoting the original, which is used later.
1401
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1402
ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1407
])# _LT_AC_PROG_ECHO_BACKSLASH
1409
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1410
# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1411
# ------------------------------------------------------------------
1412
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1413
[if test "$cross_compiling" = yes; then :
1416
AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1417
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1418
lt_status=$lt_dlunknown
1419
cat > conftest.$ac_ext <<EOF
1420
[#line __oline__ "configure"
1421
#include "confdefs.h"
1430
# define LT_DLGLOBAL RTLD_GLOBAL
1433
# define LT_DLGLOBAL DL_GLOBAL
1435
# define LT_DLGLOBAL 0
1439
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1440
find out it does not work in some platform. */
1441
#ifndef LT_DLLAZY_OR_NOW
1443
# define LT_DLLAZY_OR_NOW RTLD_LAZY
1446
# define LT_DLLAZY_OR_NOW DL_LAZY
1449
# define LT_DLLAZY_OR_NOW RTLD_NOW
1452
# define LT_DLLAZY_OR_NOW DL_NOW
1454
# define LT_DLLAZY_OR_NOW 0
1462
extern "C" void exit (int);
1465
void fnord() { int i=42;}
1468
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1469
int status = $lt_dlunknown;
1473
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1474
else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1475
/* dlclose (self); */
1481
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1482
(./conftest; exit; ) 2>/dev/null
1485
x$lt_dlno_uscore) $1 ;;
1486
x$lt_dlneed_uscore) $2 ;;
1487
x$lt_unknown|x*) $3 ;;
1490
# compilation failed
1495
])# _LT_AC_TRY_DLOPEN_SELF
1497
# AC_LIBTOOL_DLOPEN_SELF
1498
# -------------------
1499
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1500
[if test "x$enable_dlopen" != xyes; then
1501
enable_dlopen=unknown
1502
enable_dlopen_self=unknown
1503
enable_dlopen_self_static=unknown
1510
lt_cv_dlopen="load_add_on"
1512
lt_cv_dlopen_self=yes
1515
cygwin* | mingw* | pw32*)
1516
lt_cv_dlopen="LoadLibrary"
1521
AC_CHECK_FUNC([shl_load],
1522
[lt_cv_dlopen="shl_load"],
1523
[AC_CHECK_LIB([dld], [shl_load],
1524
[lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1525
[AC_CHECK_FUNC([dlopen],
1526
[lt_cv_dlopen="dlopen"],
1527
[AC_CHECK_LIB([dl], [dlopen],
1528
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1529
[AC_CHECK_LIB([svld], [dlopen],
1530
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1531
[AC_CHECK_LIB([dld], [dld_link],
1532
[lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1541
if test "x$lt_cv_dlopen" != xno; then
1547
case $lt_cv_dlopen in
1549
save_CPPFLAGS="$CPPFLAGS"
1550
AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1551
test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1553
save_LDFLAGS="$LDFLAGS"
1554
eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1557
LIBS="$lt_cv_dlopen_libs $LIBS"
1559
AC_CACHE_CHECK([whether a program can dlopen itself],
1560
lt_cv_dlopen_self, [dnl
1561
_LT_AC_TRY_DLOPEN_SELF(
1562
lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1563
lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1566
if test "x$lt_cv_dlopen_self" = xyes; then
1567
LDFLAGS="$LDFLAGS $link_static_flag"
1568
AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1569
lt_cv_dlopen_self_static, [dnl
1570
_LT_AC_TRY_DLOPEN_SELF(
1571
lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1572
lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1576
CPPFLAGS="$save_CPPFLAGS"
1577
LDFLAGS="$save_LDFLAGS"
1582
case $lt_cv_dlopen_self in
1583
yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1584
*) enable_dlopen_self=unknown ;;
1587
case $lt_cv_dlopen_self_static in
1588
yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1589
*) enable_dlopen_self_static=unknown ;;
1592
])# AC_LIBTOOL_DLOPEN_SELF
1594
AC_DEFUN([_LT_AC_LTCONFIG_HACK],
1595
[AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
1596
# Sed substitution that helps us do robust quoting. It backslashifies
1597
# metacharacters that are still active within double-quoted strings.
1598
Xsed='sed -e s/^X//'
1599
sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g'
1601
# Same as above, but do not quote variable references.
1602
double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g'
1604
# Sed substitution to delay expansion of an escaped shell variable in a
1605
# double_quote_subst'ed string.
1606
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1612
default_ofile=libtool
1613
can_build_shared=yes
1615
# All known linkers require a `.a' archive for static linking (except M$VC,
1616
# which needs '.lib').
1618
ltmain="$ac_aux_dir/ltmain.sh"
1619
ofile="$default_ofile"
1620
with_gnu_ld="$lt_cv_prog_gnu_ld"
1621
need_locks="$enable_libtool_lock"
1624
old_CFLAGS="$CFLAGS"
1626
# Set sane defaults for various variables
1627
test -z "$AR" && AR=ar
1628
test -z "$AR_FLAGS" && AR_FLAGS=cru
1629
test -z "$AS" && AS=as
1630
test -z "$CC" && CC=cc
1631
test -z "$DLLTOOL" && DLLTOOL=dlltool
1632
test -z "$LD" && LD=ld
1633
test -z "$LN_S" && LN_S="ln -s"
1634
test -z "$MAGIC_CMD" && MAGIC_CMD=file
1635
test -z "$NM" && NM=nm
1636
test -z "$OBJDUMP" && OBJDUMP=objdump
1637
test -z "$RANLIB" && RANLIB=:
1638
test -z "$STRIP" && STRIP=:
1639
test -z "$ac_objext" && ac_objext=o
1641
if test x"$host" != x"$build"; then
1642
ac_tool_prefix=${host_alias}-
1647
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
1650
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
1655
# AIX sometimes has problems with the GCC collect2 program. For some
1656
# reason, if we set the COLLECT_NAMES environment variable, the problems
1657
# vanish in a puff of smoke.
1658
if test "X${COLLECT_NAMES+set}" != Xset; then
1660
export COLLECT_NAMES
1665
# Determine commands to create old-style static archives.
1666
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1667
old_postinstall_cmds='chmod 644 $oldlib'
1668
old_postuninstall_cmds=
1670
if test -n "$RANLIB"; then
1673
old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1676
old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1679
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1682
# Allow CC to be a program name with arguments.
1686
AC_MSG_CHECKING([for objdir])
1687
rm -f .libs 2>/dev/null
1688
mkdir .libs 2>/dev/null
1689
if test -d .libs; then
1692
# MS-DOS does not allow filenames that begin with a dot.
1695
rmdir .libs 2>/dev/null
1696
AC_MSG_RESULT($objdir)
1700
[ --with-pic try to use only PIC/non-PIC objects [default=use both]],
1701
pic_mode="$withval", pic_mode=default)
1702
test -z "$pic_mode" && pic_mode=default
1704
# We assume here that the value for lt_cv_prog_cc_pic will not be cached
1705
# in isolation, and that seeing it set (from the cache) indicates that
1706
# the associated values are set (in the cache) correctly too.
1707
AC_MSG_CHECKING([for $compiler option to produce PIC])
1708
AC_CACHE_VAL(lt_cv_prog_cc_pic,
1709
[ lt_cv_prog_cc_pic=
1710
lt_cv_prog_cc_shlib=
1712
lt_cv_prog_cc_static=
1713
lt_cv_prog_cc_no_builtin=
1714
lt_cv_prog_cc_can_build_shared=$can_build_shared
1716
if test "$GCC" = yes; then
1717
lt_cv_prog_cc_wl='-Wl,'
1718
lt_cv_prog_cc_static='-static'
1722
# Below there is a dirty hack to force normal static linking with -ldl
1723
# The problem is because libdl dynamically linked with both libc and
1724
# libC (AIX C++ library), which obviously doesn't included in libraries
1725
# list by gcc. This cause undefined symbols with -static flags.
1726
# This hack allows C programs to be linked with "-static -ldl", but
1727
# not sure about C++ programs.
1728
lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
1731
# FIXME: we need at least 68020 code to build shared libraries, but
1732
# adding the `-m68020' flag to GCC prevents building anything better,
1734
lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
1736
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
1737
# PIC is the default for these OSes.
1739
darwin* | rhapsody*)
1740
# PIC is the default on this platform
1741
# Common symbols not allowed in MH_DYLIB files
1742
lt_cv_prog_cc_pic='-fno-common'
1744
cygwin* | mingw* | pw32* | os2*)
1745
# This hack is so that the source file can tell whether it is being
1746
# built for inclusion in a dll (and should export symbols for example).
1747
lt_cv_prog_cc_pic='-DDLL_EXPORT'
1750
if test -d /usr/nec; then
1751
lt_cv_prog_cc_pic=-Kconform_pic
1755
lt_cv_prog_cc_pic='-fPIC'
1759
# PORTME Check for PIC flags for the system compiler.
1761
aix3* | aix4* | aix5*)
1762
lt_cv_prog_cc_wl='-Wl,'
1763
# All AIX code is PIC.
1764
if test "$host_cpu" = ia64; then
1765
# AIX 5 now supports IA64 processor
1766
lt_cv_prog_cc_static='-Bstatic'
1768
lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
1772
hpux9* | hpux10* | hpux11*)
1773
# Is there a better lt_cv_prog_cc_static that works with the bundled CC?
1774
lt_cv_prog_cc_wl='-Wl,'
1775
lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
1776
lt_cv_prog_cc_pic='+Z'
1779
irix5* | irix6* | nonstopux*)
1780
lt_cv_prog_cc_wl='-Wl,'
1781
lt_cv_prog_cc_static='-non_shared'
1782
# PIC (with -KPIC) is the default.
1785
cygwin* | mingw* | pw32* | os2*)
1786
# This hack is so that the source file can tell whether it is being
1787
# built for inclusion in a dll (and should export symbols for example).
1788
lt_cv_prog_cc_pic='-DDLL_EXPORT'
1792
lt_cv_prog_cc_pic='-KPIC'
1793
lt_cv_prog_cc_static='-Bstatic'
1796
osf3* | osf4* | osf5*)
1797
# All OSF/1 code is PIC.
1798
lt_cv_prog_cc_wl='-Wl,'
1799
lt_cv_prog_cc_static='-non_shared'
1803
lt_cv_prog_cc_pic='-Kpic'
1804
lt_cv_prog_cc_static='-dn'
1805
lt_cv_prog_cc_shlib='-belf'
1809
lt_cv_prog_cc_pic='-KPIC'
1810
lt_cv_prog_cc_static='-Bstatic'
1811
lt_cv_prog_cc_wl='-Wl,'
1815
lt_cv_prog_cc_pic='-PIC'
1816
lt_cv_prog_cc_static='-Bstatic'
1817
lt_cv_prog_cc_wl='-Qoption ld '
1820
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1821
lt_cv_prog_cc_pic='-KPIC'
1822
lt_cv_prog_cc_static='-Bstatic'
1823
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
save_objext="$ac_objext"
1967
AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1968
# The compiler can only warn and ignore the option if not recognized
1969
# So say no if there are warnings
1970
if test -s conftest.err; then
1971
lt_cv_compiler_o_lo=no
1973
lt_cv_compiler_o_lo=yes
1976
ac_objext="$save_objext"
1977
CFLAGS="$save_CFLAGS"
1979
compiler_o_lo=$lt_cv_compiler_o_lo
1980
AC_MSG_RESULT([$compiler_o_lo])
1985
# Check to see if we can do hard links to lock some files if needed
1986
hard_links="nottested"
1987
if test "$compiler_c_o" = no && test "$need_locks" != no; then
1988
# do not overwrite the value of need_locks provided by the user
1989
AC_MSG_CHECKING([if we can lock with hard links])
1992
ln conftest.a conftest.b 2>/dev/null && hard_links=no
1994
ln conftest.a conftest.b 2>&5 || hard_links=no
1995
ln conftest.a conftest.b 2>/dev/null && hard_links=no
1996
AC_MSG_RESULT([$hard_links])
1997
if test "$hard_links" = no; then
1998
AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
2005
if test "$GCC" = yes; then
2006
# Check to see if options -fno-rtti -fno-exceptions are supported by compiler
2007
AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
2008
echo "int some_variable = 0;" > conftest.$ac_ext
2009
save_CFLAGS="$CFLAGS"
2010
CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
2011
compiler_rtti_exceptions=no
2012
AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
2013
# The compiler can only warn and ignore the option if not recognized
2014
# So say no if there are warnings
2015
if test -s conftest.err; then
2016
compiler_rtti_exceptions=no
2018
compiler_rtti_exceptions=yes
2021
CFLAGS="$save_CFLAGS"
2022
AC_MSG_RESULT([$compiler_rtti_exceptions])
2024
if test "$compiler_rtti_exceptions" = "yes"; then
2025
no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
2027
no_builtin_flag=' -fno-builtin'
2031
# See if the linker supports building shared libraries.
2032
AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
2034
allow_undefined_flag=
2036
need_lib_prefix=unknown
2037
need_version=unknown
2038
# when you set need_version to no, make sure it does not cause -set_version
2039
# flags to be left without arguments
2041
archive_expsym_cmds=
2042
old_archive_from_new_cmds=
2043
old_archive_from_expsyms_cmds=
2044
export_dynamic_flag_spec=
2045
whole_archive_flag_spec=
2046
thread_safe_flag_spec=
2047
hardcode_into_libs=no
2048
hardcode_libdir_flag_spec=
2049
hardcode_libdir_separator=
2052
hardcode_shlibpath_var=unsupported
2054
link_all_deplibs=unknown
2055
always_export_symbols=no
2056
export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
2057
# include_expsyms should be a list of space-separated symbols to be *always*
2058
# included in the symbol list
2060
# exclude_expsyms can be an egrep regular expression of symbols to exclude
2061
# it will be wrapped by ` (' and `)$', so one must not match beginning or
2062
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
2063
# as well as any symbol that contains `d'.
2064
exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
2065
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
2066
# platforms (ab)use it in PIC code, but their linkers get confused if
2067
# the symbol is explicitly referenced. Since portable code cannot
2068
# rely on this symbol name, it's probably fine to never include it in
2069
# preloaded symbol tables.
2070
extract_expsyms_cmds=
2073
cygwin* | mingw* | pw32*)
2074
# FIXME: the MSVC++ port hasn't been tested in a loooong time
2075
# When not using gcc, we currently assume that we are using
2076
# Microsoft Visual C++.
2077
if test "$GCC" != yes; then
2087
if test "$with_gnu_ld" = yes; then
2088
# If archive_cmds runs LD, not CC, wlarc should be empty
2091
# See if GNU ld supports shared libraries.
2093
aix3* | aix4* | aix5*)
2094
# On AIX, the GNU linker is very broken
2095
# Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
2099
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
2100
*** to be unable to reliably create shared libraries on AIX.
2101
*** Therefore, libtool is disabling shared libraries support. If you
2102
*** really care for shared libraries, you may want to modify your PATH
2103
*** so that a non-GNU linker is found, and then restart.
2109
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)'
2110
hardcode_libdir_flag_spec='-L$libdir'
2111
hardcode_minus_L=yes
2113
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
2114
# that the semantics of dynamic libraries on AmigaOS, at least up
2115
# to version 4, is to share data among multiple programs linked
2116
# with the same dynamic library. Since this doesn't match the
2117
# behavior of shared libraries on other platforms, we can use
2123
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2124
allow_undefined_flag=unsupported
2125
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
2126
# support --undefined. This deserves some investigation. FIXME
2127
archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2133
cygwin* | mingw* | pw32*)
2134
# hardcode_libdir_flag_spec is actually meaningless, as there is
2135
# no search path for DLLs.
2136
hardcode_libdir_flag_spec='-L$libdir'
2137
allow_undefined_flag=unsupported
2138
always_export_symbols=yes
2140
extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
2141
sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
2142
test -f $output_objdir/impgen.exe || (cd $output_objdir && \
2143
if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
2144
else $CC -o impgen impgen.c ; fi)~
2145
$output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
2147
old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
2149
# cygwin and mingw dlls have different entry points and sets of symbols
2151
# FIXME: what about values for MSVC?
2152
dll_entry=__cygwin_dll_entry@12
2153
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
2157
dll_entry=_DllMainCRTStartup@12
2158
dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
2162
# mingw and cygwin differ, and it's simplest to just exclude the union
2163
# of the two symbol sets.
2164
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
2166
# recent cygwin and mingw systems supply a stub DllMain which the user
2167
# can override, but on older systems we have to supply one (in ltdll.c)
2168
if test "x$lt_cv_need_dllmain" = "xyes"; then
2169
ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
2170
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~
2171
test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
2177
# Extract the symbol export list from an `--export-all' def file,
2178
# then regenerate the def file from the symbol export list, so that
2179
# the compiled dll only exports the symbol export list.
2180
# Be careful not to strip the DATA tag left be newer dlltools.
2181
export_symbols_cmds="$ltdll_cmds"'
2182
$DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
2183
sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
2185
# If the export-symbols file already is a .def file (1st line
2186
# is EXPORTS), use it as is.
2187
# If DATA tags from a recent dlltool are present, honour them!
2188
archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
2189
cp $export_symbols $output_objdir/$soname-def;
2191
echo EXPORTS > $output_objdir/$soname-def;
2193
cat $export_symbols | while read symbol; do
2196
2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
2197
4) echo " \[$]2 \[$]3 \[$]4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
2198
*) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
2200
_lt_hint=`expr 1 + \$_lt_hint`;
2204
$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~
2205
$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~
2206
$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~
2207
$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~
2208
$CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
2212
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2213
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
2216
archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2217
archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2222
if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
2226
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
2227
*** create shared libraries on Solaris systems. Therefore, libtool
2228
*** is disabling shared libraries support. We urge you to upgrade GNU
2229
*** binutils to release 2.9.1 or newer. Another option is to modify
2230
*** your PATH or compiler configuration so that the native linker is
2231
*** used, and then restart.
2234
elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2235
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2236
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2243
archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2246
hardcode_shlibpath_var=no
2250
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2251
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2252
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2259
if test "$ld_shlibs" = yes; then
2260
runpath_var=LD_RUN_PATH
2261
hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
2262
export_dynamic_flag_spec='${wl}--export-dynamic'
2264
cygwin* | mingw* | pw32*)
2265
# dlltool doesn't understand --whole-archive et. al.
2266
whole_archive_flag_spec=
2269
# ancient GNU ld didn't support --whole-archive et. al.
2270
if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
2271
whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2273
whole_archive_flag_spec=
2279
# PORTME fill in a description of your system's linker (not GNU ld)
2282
allow_undefined_flag=unsupported
2283
always_export_symbols=yes
2284
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'
2285
# Note: this linker hardcodes the directories in LIBPATH if there
2286
# are no directories specified by -L.
2287
hardcode_minus_L=yes
2288
if test "$GCC" = yes && test -z "$link_static_flag"; then
2289
# Neither direct hardcoding nor static linking is supported with a
2291
hardcode_direct=unsupported
2296
if test "$host_cpu" = ia64; then
2297
# On IA64, the linker does run time linking by default, so we don't
2298
# have to do anything special.
2299
aix_use_runtimelinking=no
2300
exp_sym_flag='-Bexport'
2303
aix_use_runtimelinking=no
2305
# Test if we are trying to use run time linking or normal
2306
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
2307
# need to do runtime linking.
2308
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2309
for ld_flag in $LDFLAGS; do
2312
aix_use_runtimelinking=yes
2319
exp_sym_flag='-bexport'
2320
no_entry_flag='-bnoentry'
2323
# When large executables or shared objects are built, AIX ld can
2324
# have problems creating the table of contents. If linking a library
2325
# or program results in "error TOC overflow" add -mminimal-toc to
2326
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
2327
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2331
hardcode_libdir_separator=':'
2332
if test "$GCC" = yes; then
2333
case $host_os in aix4.[[012]]|aix4.[[012]].*)
2334
collect2name=`${CC} -print-prog-name=collect2`
2335
if test -f "$collect2name" && \
2336
strings "$collect2name" | grep resolve_lib_name >/dev/null
2338
# We have reworked collect2
2341
# We have old collect2
2342
hardcode_direct=unsupported
2343
# It fails to find uninstalled libraries when the uninstalled
2344
# path is not listed in the libpath. Setting hardcode_minus_L
2345
# to unsupported forces relinking
2346
hardcode_minus_L=yes
2347
hardcode_libdir_flag_spec='-L$libdir'
2348
hardcode_libdir_separator=
2352
shared_flag='-shared'
2355
if test "$host_cpu" = ia64; then
2356
shared_flag='${wl}-G'
2358
if test "$aix_use_runtimelinking" = yes; then
2359
shared_flag='${wl}-G'
2361
shared_flag='${wl}-bM:SRE'
2366
# It seems that -bexpall can do strange things, so it is better to
2367
# generate a list of symbols to export.
2368
always_export_symbols=yes
2369
if test "$aix_use_runtimelinking" = yes; then
2370
# Warning - without using the other runtime loading flags (-brtl),
2371
# -berok will link without error, but may produce a broken library.
2372
allow_undefined_flag='-berok'
2373
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
2374
archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
2376
if test "$host_cpu" = ia64; then
2377
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
2378
allow_undefined_flag="-z nodefs"
2379
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"
2381
hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
2382
# Warning - without using the other run time loading flags,
2383
# -berok will link without error, but may produce a broken library.
2384
allow_undefined_flag='${wl}-berok'
2385
# This is a bit strange, but is similar to how AIX traditionally builds
2386
# it's shared libraries.
2387
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'
2393
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)'
2394
hardcode_libdir_flag_spec='-L$libdir'
2395
hardcode_minus_L=yes
2396
# see comment about different semantics on the GNU ld section
2400
cygwin* | mingw* | pw32*)
2401
# When not using gcc, we currently assume that we are using
2402
# Microsoft Visual C++.
2403
# hardcode_libdir_flag_spec is actually meaningless, as there is
2404
# no search path for DLLs.
2405
hardcode_libdir_flag_spec=' '
2406
allow_undefined_flag=unsupported
2407
# Tell ltmain to make .lib files, not .a files.
2409
# FIXME: Setting linknames here is a bad hack.
2410
archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
2411
# The linker will automatically build a .lib file if we build a DLL.
2412
old_archive_from_new_cmds='true'
2413
# FIXME: Should let the user specify the lib program.
2414
old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
2415
fix_srcfile_path='`cygpath -w "$srcfile"`'
2418
darwin* | rhapsody*)
2420
rhapsody* | darwin1.[[012]])
2421
allow_undefined_flag='-undefined suppress'
2424
allow_undefined_flag='-flat_namespace -undefined suppress'
2427
# FIXME: Relying on posixy $() will cause problems for
2428
# cross-compilation, but unfortunately the echo tests do not
2429
# yet detect zsh echo's removal of \ escapes. Also zsh mangles
2430
# `"' quotes if we put them in here... so don't!
2431
archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
2432
# We need to add '_' to the symbols in $export_symbols first
2433
#archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
2435
hardcode_shlibpath_var=no
2436
whole_archive_flag_spec='-all_load $convenience'
2443
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
2444
# support. Future versions do this automatically, but an explicit c++rt0.o
2445
# does not break anything, and helps significantly (at the cost of a little
2448
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
2449
hardcode_libdir_flag_spec='-R$libdir'
2451
hardcode_shlibpath_var=no
2454
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
2456
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2458
hardcode_minus_L=yes
2459
hardcode_shlibpath_var=no
2462
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
2464
archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
2465
hardcode_libdir_flag_spec='-R$libdir'
2467
hardcode_shlibpath_var=no
2470
hpux9* | hpux10* | hpux11*)
2472
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' ;;
2473
*) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
2475
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
2476
hardcode_libdir_separator=:
2478
hardcode_minus_L=yes # Not in the search PATH, but as the default
2479
# location of the library.
2480
export_dynamic_flag_spec='${wl}-E'
2483
irix5* | irix6* | nonstopux*)
2484
if test "$GCC" = yes; then
2485
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'
2486
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2488
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'
2489
hardcode_libdir_flag_spec='-rpath $libdir'
2491
hardcode_libdir_separator=:
2492
link_all_deplibs=yes
2496
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2497
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
2499
archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
2501
hardcode_libdir_flag_spec='-R$libdir'
2503
hardcode_shlibpath_var=no
2507
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2509
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2510
hardcode_libdir_separator=:
2511
hardcode_shlibpath_var=no
2516
hardcode_shlibpath_var=no
2517
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2518
archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
2519
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2520
export_dynamic_flag_spec='${wl}-E'
2523
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
2524
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2525
hardcode_libdir_flag_spec='-R$libdir'
2528
archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
2529
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2536
hardcode_libdir_flag_spec='-L$libdir'
2537
hardcode_minus_L=yes
2538
allow_undefined_flag=unsupported
2539
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'
2540
old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
2544
if test "$GCC" = yes; then
2545
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2546
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'
2548
allow_undefined_flag=' -expect_unresolved \*'
2549
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'
2551
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2552
hardcode_libdir_separator=:
2555
osf4* | osf5*) # as osf3* with the addition of -msym flag
2556
if test "$GCC" = yes; then
2557
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2558
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'
2559
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2561
allow_undefined_flag=' -expect_unresolved \*'
2562
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'
2563
archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
2564
$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'
2566
#Both c and cxx compiler support -rpath directly
2567
hardcode_libdir_flag_spec='-rpath $libdir'
2569
hardcode_libdir_separator=:
2573
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2574
hardcode_shlibpath_var=no
2575
runpath_var=LD_RUN_PATH
2576
hardcode_runpath_var=yes
2577
export_dynamic_flag_spec='${wl}-Bexport'
2581
# gcc --version < 3.0 without binutils cannot create self contained
2582
# shared libraries reliably, requiring libgcc.a to resolve some of
2583
# the object symbols generated in some cases. Libraries that use
2584
# assert need libgcc.a to resolve __eprintf, for example. Linking
2585
# a copy of libgcc.a into every shared library to guarantee resolving
2586
# such symbols causes other problems: According to Tim Van Holder
2587
# <tim.van.holder@pandora.be>, C++ libraries end up with a separate
2588
# (to the application) exception stack for one thing.
2589
no_undefined_flag=' -z defs'
2590
if test "$GCC" = yes; then
2591
case `$CC --version 2>/dev/null` in
2595
*** Warning: Releases of GCC earlier than version 3.0 cannot reliably
2596
*** create self contained shared libraries on Solaris systems, without
2597
*** introducing a dependency on libgcc.a. Therefore, libtool is disabling
2598
*** -no-undefined support, which will at least allow you to build shared
2599
*** libraries. However, you may find that when you link such libraries
2600
*** into an application without using GCC, you have to manually add
2601
*** \`gcc --print-libgcc-file-name\` to the link command. We urge you to
2602
*** upgrade to a newer version of GCC. Another option is to rebuild your
2603
*** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
2610
# $CC -shared without GNU ld will not create a library from C++
2611
# object files and a static libstdc++, better avoid it by now
2612
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2613
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2614
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2615
hardcode_libdir_flag_spec='-R$libdir'
2616
hardcode_shlibpath_var=no
2618
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
2619
*) # Supported since Solaris 2.6 (maybe 2.5.1?)
2620
whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
2622
link_all_deplibs=yes
2626
if test "x$host_vendor" = xsequent; then
2627
# Use $CC to link under sequent, because it throws in some extra .o
2628
# files that make .init and .fini sections work.
2629
archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
2631
archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
2633
hardcode_libdir_flag_spec='-L$libdir'
2635
hardcode_minus_L=yes
2636
hardcode_shlibpath_var=no
2640
case $host_vendor in
2642
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2643
hardcode_direct=yes # is this really true???
2646
## LD is ld it makes a PLAMLIB
2647
## CC just makes a GrossModule.
2648
archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2649
reload_cmds='$CC -r -o $output$reload_objs'
2653
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2654
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
2657
runpath_var='LD_RUN_PATH'
2658
hardcode_shlibpath_var=no
2662
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2663
hardcode_shlibpath_var=no
2664
export_dynamic_flag_spec='-Bexport'
2668
no_undefined_flag=' -z text'
2669
# $CC -shared without GNU ld will not create a library from C++
2670
# object files and a static libstdc++, better avoid it by now
2671
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2672
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2673
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2674
hardcode_libdir_flag_spec=
2675
hardcode_shlibpath_var=no
2676
runpath_var='LD_RUN_PATH'
2680
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2681
hardcode_libdir_flag_spec='-L$libdir'
2682
hardcode_shlibpath_var=no
2686
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2687
hardcode_libdir_flag_spec='-L$libdir'
2688
hardcode_shlibpath_var=no
2692
if test -d /usr/nec; then
2693
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2694
hardcode_shlibpath_var=no
2695
runpath_var=LD_RUN_PATH
2696
hardcode_runpath_var=yes
2702
archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2705
hardcode_shlibpath_var=no
2706
hardcode_runpath_var=yes
2707
runpath_var=LD_RUN_PATH
2710
sysv5uw7* | unixware7*)
2711
no_undefined_flag='${wl}-z ${wl}text'
2712
if test "$GCC" = yes; then
2713
archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2715
archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2717
runpath_var='LD_RUN_PATH'
2718
hardcode_shlibpath_var=no
2726
AC_MSG_RESULT([$ld_shlibs])
2727
test "$ld_shlibs" = no && can_build_shared=no
2729
# Check hardcoding attributes.
2730
AC_MSG_CHECKING([how to hardcode library paths into programs])
2732
if test -n "$hardcode_libdir_flag_spec" || \
2733
test -n "$runpath_var"; then
2735
# We can hardcode non-existant directories.
2736
if test "$hardcode_direct" != no &&
2737
# If the only mechanism to avoid hardcoding is shlibpath_var, we
2738
# have to relink, otherwise we might link with an installed library
2739
# when we should be linking with a yet-to-be-installed one
2740
## test "$hardcode_shlibpath_var" != no &&
2741
test "$hardcode_minus_L" != no; then
2742
# Linking always hardcodes the temporary library directory.
2743
hardcode_action=relink
2745
# We can link without hardcoding, and we can hardcode nonexisting dirs.
2746
hardcode_action=immediate
2749
# We cannot hardcode anything, or else we can only hardcode existing
2751
hardcode_action=unsupported
2753
AC_MSG_RESULT([$hardcode_action])
2757
AC_MSG_CHECKING([whether stripping libraries is possible])
2758
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2759
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2760
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2761
AC_MSG_RESULT([yes])
2766
reload_cmds='$LD$reload_flag -o $output$reload_objs'
2767
test -z "$deplibs_check_method" && deplibs_check_method=unknown
2769
# PORTME Fill in your ld.so characteristics
2770
AC_MSG_CHECKING([dynamic linker characteristics])
2772
libname_spec='lib$name'
2779
shlibpath_overrides_runpath=unknown
2781
dynamic_linker="$host_os ld.so"
2782
sys_lib_dlsearch_path_spec="/lib /usr/lib"
2783
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2788
library_names_spec='${libname}${release}.so$versuffix $libname.a'
2789
shlibpath_var=LIBPATH
2791
# AIX has no versioning support, so we append a major version to the name.
2792
soname_spec='${libname}${release}.so$major'
2799
hardcode_into_libs=yes
2800
if test "$host_cpu" = ia64; then
2801
# AIX 5 supports IA64
2802
library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
2803
shlibpath_var=LD_LIBRARY_PATH
2805
# With GCC up to 2.95.x, collect2 would create an import file
2806
# for dependence libraries. The import file would start with
2807
# the line `#! .'. This would cause the generated library to
2808
# depend on `.', always an invalid library. This was fixed in
2809
# development snapshots of GCC prior to 3.0.
2811
aix4 | aix4.[[01]] | aix4.[[01]].*)
2812
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2814
echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2821
# AIX (on Power*) has no versioning support, so currently we can
2822
# not hardcode correct soname into executable. Probably we can
2823
# add versioning support to collect2, so additional links can
2824
# be useful in future.
2825
if test "$aix_use_runtimelinking" = yes; then
2826
# If using run time linking (on AIX 4.2 or later) use lib<name>.so
2827
# instead of lib<name>.a to let people know that these are not
2828
# typical AIX shared libraries.
2829
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2831
# We preserve .a as extension for shared libraries through AIX4.2
2832
# and later when we are not doing run time linking.
2833
library_names_spec='${libname}${release}.a $libname.a'
2834
soname_spec='${libname}${release}.so$major'
2836
shlibpath_var=LIBPATH
2838
hardcode_into_libs=yes
2842
library_names_spec='$libname.ixlibrary $libname.a'
2843
# Create ${libname}_ixlibrary.a entries in /sys/libs.
2844
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'
2848
library_names_spec='${libname}.so'
2849
dynamic_linker="$host_os ld.so"
2850
shlibpath_var=LIBRARY_PATH
2856
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2857
soname_spec='${libname}${release}.so$major'
2858
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2859
shlibpath_var=LD_LIBRARY_PATH
2860
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2861
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2862
export_dynamic_flag_spec=-rdynamic
2863
# the default ld.so.conf also contains /usr/contrib/lib and
2864
# /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2865
# libtool to hard-code these into programs
2868
cygwin* | mingw* | pw32*)
2869
version_type=windows
2872
case $GCC,$host_os in
2874
library_names_spec='$libname.dll.a'
2875
soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2876
postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
2877
dldir=$destdir/`dirname \$dlpath`~
2878
test -d \$dldir || mkdir -p \$dldir~
2879
$install_prog .libs/$dlname \$dldir/$dlname'
2880
postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
2881
dlpath=$dir/\$dldll~
2885
library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2886
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
2889
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
2892
library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
2895
dynamic_linker='Win32 ld.exe'
2896
# FIXME: first we should search . and the directory the executable is in
2900
darwin* | rhapsody*)
2901
dynamic_linker="$host_os dyld"
2905
# FIXME: Relying on posixy $() will cause problems for
2906
# cross-compilation, but unfortunately the echo tests do not
2907
# yet detect zsh echo's removal of \ escapes.
2908
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)'
2909
soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
2910
shlibpath_overrides_runpath=yes
2911
shlibpath_var=DYLD_LIBRARY_PATH
2922
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2923
soname_spec='${libname}${release}.so$major'
2924
shlibpath_var=LD_LIBRARY_PATH
2925
shlibpath_overrides_runpath=no
2926
hardcode_into_libs=yes
2927
dynamic_linker='GNU/FreeBSD ld.so'
2931
objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
2932
version_type=freebsd-$objformat
2933
case $version_type in
2935
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
2940
library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
2944
shlibpath_var=LD_LIBRARY_PATH
2947
shlibpath_overrides_runpath=yes
2950
shlibpath_overrides_runpath=no
2951
hardcode_into_libs=yes
2960
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
2961
soname_spec='${libname}${release}.so$major'
2962
shlibpath_var=LD_LIBRARY_PATH
2963
hardcode_into_libs=yes
2966
hpux9* | hpux10* | hpux11*)
2967
# Give a soname corresponding to the major version so that dld.sl refuses to
2968
# link against other versions.
2969
dynamic_linker="$host_os dld.sl"
2973
shlibpath_var=SHLIB_PATH
2974
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2975
library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
2976
soname_spec='${libname}${release}.sl$major'
2977
# HP-UX runs *really* slowly unless shared libraries are mode 555.
2978
postinstall_cmds='chmod 555 $lib'
2981
irix5* | irix6* | nonstopux*)
2983
nonstopux*) version_type=nonstopux ;;
2984
*) version_type=irix ;;
2988
soname_spec='${libname}${release}.so$major'
2989
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
2991
irix5* | nonstopux*)
2995
case $LD in # libtool.m4 will add one of these switches to LD
2996
*-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
2997
*-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
2998
*-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
2999
*) libsuff= shlibsuff= libmagic=never-match;;
3003
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3004
shlibpath_overrides_runpath=no
3005
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3006
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3009
# No shared lib support for Linux oldld, aout, or coff.
3010
linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
3014
# This must be Linux ELF.
3019
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3020
soname_spec='${libname}${release}.so$major'
3021
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3022
shlibpath_var=LD_LIBRARY_PATH
3023
shlibpath_overrides_runpath=no
3024
# This implies no fast_install, which is unacceptable.
3025
# Some rework will be needed to allow for fast_install
3026
# before this can be enabled.
3027
hardcode_into_libs=yes
3029
# We used to test for /lib/ld.so.1 and disable shared libraries on
3030
# powerpc, because MkLinux only supported shared libraries with the
3031
# GNU dynamic linker. Since this was broken with cross compilers,
3032
# most powerpc-linux boxes support dynamic linking these days and
3033
# people can always --disable-shared, the test was removed, and we
3034
# assume the GNU/Linux dynamic linker is in use.
3035
dynamic_linker='GNU/Linux ld.so'
3042
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3043
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
3044
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3045
dynamic_linker='NetBSD (a.out) ld.so'
3047
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
3048
soname_spec='${libname}${release}.so$major'
3049
dynamic_linker='NetBSD ld.elf_so'
3051
shlibpath_var=LD_LIBRARY_PATH
3052
shlibpath_overrides_runpath=yes
3053
hardcode_into_libs=yes
3058
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3059
shlibpath_var=LD_LIBRARY_PATH
3060
shlibpath_overrides_runpath=yes
3067
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3069
openbsd2.[[89]] | openbsd2.[[89]].*)
3070
shlibpath_overrides_runpath=no
3073
shlibpath_overrides_runpath=yes
3077
shlibpath_overrides_runpath=yes
3079
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
3080
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3081
shlibpath_var=LD_LIBRARY_PATH
3085
libname_spec='$name'
3087
library_names_spec='$libname.dll $libname.a'
3088
dynamic_linker='OS/2 ld.exe'
3089
shlibpath_var=LIBPATH
3092
osf3* | osf4* | osf5*)
3096
soname_spec='${libname}${release}.so$major'
3097
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3098
shlibpath_var=LD_LIBRARY_PATH
3099
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3100
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3101
hardcode_into_libs=yes
3106
soname_spec='${libname}${release}.so$major'
3107
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3108
shlibpath_var=LD_LIBRARY_PATH
3115
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3116
soname_spec='${libname}${release}.so$major'
3117
shlibpath_var=LD_LIBRARY_PATH
3118
shlibpath_overrides_runpath=yes
3119
hardcode_into_libs=yes
3120
# ldd complains unless libraries are executable
3121
postinstall_cmds='chmod +x $lib'
3126
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
3127
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3128
shlibpath_var=LD_LIBRARY_PATH
3129
shlibpath_overrides_runpath=yes
3130
if test "$with_gnu_ld" = yes; then
3136
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3138
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3139
soname_spec='${libname}${release}.so$major'
3140
shlibpath_var=LD_LIBRARY_PATH
3141
case $host_vendor in
3143
shlibpath_overrides_runpath=no
3145
export_dynamic_flag_spec='${wl}-Blargedynsym'
3146
runpath_var=LD_RUN_PATH
3154
shlibpath_overrides_runpath=no
3155
sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3162
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3163
soname_spec='${libname}${release}.so$major'
3164
shlibpath_var=LD_LIBRARY_PATH
3171
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3172
soname_spec='${libname}${release}.so$major'
3173
shlibpath_var=LD_LIBRARY_PATH
3177
if test -d /usr/nec ;then
3179
library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
3180
soname_spec='$libname.so.$major'
3181
shlibpath_var=LD_LIBRARY_PATH
3189
AC_MSG_RESULT([$dynamic_linker])
3190
test "$dynamic_linker" = no && can_build_shared=no
3192
# Report the final consequences.
3193
AC_MSG_CHECKING([if libtool supports shared libraries])
3194
AC_MSG_RESULT([$can_build_shared])
3196
AC_MSG_CHECKING([whether to build shared libraries])
3197
test "$can_build_shared" = "no" && enable_shared=no
3199
# On AIX, shared libraries and static libraries use the same namespace, and
3200
# are all built from PIC.
3203
test "$enable_shared" = yes && enable_static=no
3204
if test -n "$RANLIB"; then
3205
archive_cmds="$archive_cmds~\$RANLIB \$lib"
3206
postinstall_cmds='$RANLIB $lib'
3211
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3212
test "$enable_shared" = yes && enable_static=no
3216
AC_MSG_RESULT([$enable_shared])
3218
AC_MSG_CHECKING([whether to build static libraries])
3219
# Make sure either enable_shared or enable_static is yes.
3220
test "$enable_shared" = yes || enable_static=yes
3221
AC_MSG_RESULT([$enable_static])
3223
if test "$hardcode_action" = relink; then
3224
# Fast installation is not supported
3225
enable_fast_install=no
3226
elif test "$shlibpath_overrides_runpath" = yes ||
3227
test "$enable_shared" = no; then
3228
# Fast installation is not necessary
3229
enable_fast_install=needless
3232
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3233
if test "$GCC" = yes; then
3234
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3237
AC_LIBTOOL_DLOPEN_SELF
3239
if test "$enable_shared" = yes && test "$GCC" = yes; then
3240
case $archive_cmds in
3242
# FIXME: we may have to deal with multi-command sequences.
3245
# Test whether the compiler implicitly links with -lc since on some
3246
# systems, -lgcc has to come before -lc. If gcc already passes -lc
3247
# to ld, don't add -lc before -lgcc.
3248
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
3249
AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
3251
echo 'static int dummy;' > conftest.$ac_ext
3253
if AC_TRY_EVAL(ac_compile); then
3256
libobjs=conftest.$ac_objext
3258
wl=$lt_cv_prog_cc_wl
3264
save_allow_undefined_flag=$allow_undefined_flag
3265
allow_undefined_flag=
3266
if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
3268
lt_cv_archive_cmds_need_lc=no
3270
lt_cv_archive_cmds_need_lc=yes
3272
allow_undefined_flag=$save_allow_undefined_flag
3274
cat conftest.err 1>&5
3276
AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
3280
need_lc=${lt_cv_archive_cmds_need_lc-yes}
3282
# The second clause should only fire when bootstrapping the
3283
# libtool distribution, otherwise you forgot to ship ltmain.sh
3284
# with your package, and you will get complaints that there are
3285
# no rules to generate ltmain.sh.
3286
if test -f "$ltmain"; then
3289
# If there is no Makefile yet, we rely on a make rule to execute
3290
# `config.status --recheck' to rerun these tests and create the
3291
# libtool script then.
3292
test -f Makefile && make "$ltmain"
3295
if test -f "$ltmain"; then
3296
trap "$rm \"${ofile}T\"; exit 1" 1 2 15
3299
echo creating $ofile
3301
# Now quote all the things that may contain metacharacters while being
3302
# careful not to overquote the AC_SUBSTed values. We take copies of the
3303
# variables and quote the copies for generation of the libtool script.
3304
for var in echo old_CC old_CFLAGS SED \
3305
AR AR_FLAGS CC LD LN_S NM SHELL \
3306
reload_flag reload_cmds wl \
3307
pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
3308
thread_safe_flag_spec whole_archive_flag_spec libname_spec \
3309
library_names_spec soname_spec \
3310
RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
3311
old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
3312
postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
3313
old_striplib striplib file_magic_cmd export_symbols_cmds \
3314
deplibs_check_method allow_undefined_flag no_undefined_flag \
3315
finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
3316
global_symbol_to_c_name_address \
3317
hardcode_libdir_flag_spec hardcode_libdir_separator \
3318
sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
3319
compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
3322
reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
3323
old_postinstall_cmds | old_postuninstall_cmds | \
3324
export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
3325
extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
3326
postinstall_cmds | postuninstall_cmds | \
3327
finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
3328
# Double-quote double-evaled strings.
3329
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
3332
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
3337
cat <<__EOF__ > "${ofile}T"
3340
# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
3341
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
3342
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
3344
# Copyright (C) 1996-2000 Free Software Foundation, Inc.
3345
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
3347
# This program is free software; you can redistribute it and/or modify
3348
# it under the terms of the GNU General Public License as published by
3349
# the Free Software Foundation; either version 2 of the License, or
3350
# (at your option) any later version.
3352
# This program is distributed in the hope that it will be useful, but
3353
# WITHOUT ANY WARRANTY; without even the implied warranty of
3354
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3355
# General Public License for more details.
3357
# You should have received a copy of the GNU General Public License
3358
# along with this program; if not, write to the Free Software
3359
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3361
# As a special exception to the GNU General Public License, if you
3362
# distribute this file as part of a program that contains a
3363
# configuration script generated by Autoconf, you may include it under
3364
# the same distribution terms that you use for the rest of that program.
3366
# A sed that does not truncate output.
3369
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
3370
Xsed="${SED} -e s/^X//"
3372
# The HP-UX ksh and POSIX shell print the target directory to stdout
3374
if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
3376
# ### BEGIN LIBTOOL CONFIG
3378
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3380
# Shell to use when invoking shell scripts.
3383
# Whether or not to build shared libraries.
3384
build_libtool_libs=$enable_shared
3386
# Whether or not to build static libraries.
3387
build_old_libs=$enable_static
3389
# Whether or not to add -lc for building shared libraries.
3390
build_libtool_need_lc=$need_lc
3392
# Whether or not to optimize for fast installation.
3393
fast_install=$enable_fast_install
3396
host_alias=$host_alias
3399
# An echo program that does not interpret backslashes.
3404
AR_FLAGS=$lt_AR_FLAGS
3406
# The default C compiler.
3409
# Is the compiler the GNU C compiler?
3412
# The linker used to build libraries.
3415
# Whether we need hard or soft links.
3418
# A BSD-compatible nm program.
3421
# A symbol stripping program
3424
# Used to examine libraries when file_magic_cmd begins "file"
3425
MAGIC_CMD=$MAGIC_CMD
3427
# Used on cygwin: DLL creation program.
3430
# Used on cygwin: object dumper.
3433
# Used on cygwin: assembler.
3436
# The name of the directory that contains temporary libtool files.
3439
# How to create reloadable object files.
3440
reload_flag=$lt_reload_flag
3441
reload_cmds=$lt_reload_cmds
3443
# How to pass a linker flag through the compiler.
3446
# Object file suffix (normally "o").
3449
# Old archive suffix (normally "a").
3452
# Executable file suffix (normally "").
3455
# Additional compiler flags for building library objects.
3456
pic_flag=$lt_pic_flag
3459
# Does compiler simultaneously support -c and -o options?
3460
compiler_c_o=$lt_compiler_c_o
3462
# Can we write directly to a .lo ?
3463
compiler_o_lo=$lt_compiler_o_lo
3465
# Must we lock files when doing compilation ?
3466
need_locks=$lt_need_locks
3468
# Do we need the lib prefix for modules?
3469
need_lib_prefix=$need_lib_prefix
3471
# Do we need a version for libraries?
3472
need_version=$need_version
3474
# Whether dlopen is supported.
3475
dlopen_support=$enable_dlopen
3477
# Whether dlopen of programs is supported.
3478
dlopen_self=$enable_dlopen_self
3480
# Whether dlopen of statically linked programs is supported.
3481
dlopen_self_static=$enable_dlopen_self_static
3483
# Compiler flag to prevent dynamic linking.
3484
link_static_flag=$lt_link_static_flag
3486
# Compiler flag to turn off builtin functions.
3487
no_builtin_flag=$lt_no_builtin_flag
3489
# Compiler flag to allow reflexive dlopens.
3490
export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
3492
# Compiler flag to generate shared objects directly from archives.
3493
whole_archive_flag_spec=$lt_whole_archive_flag_spec
3495
# Compiler flag to generate thread-safe objects.
3496
thread_safe_flag_spec=$lt_thread_safe_flag_spec
3498
# Library versioning type.
3499
version_type=$version_type
3501
# Format of library name prefix.
3502
libname_spec=$lt_libname_spec
3504
# List of archive names. First name is the real one, the rest are links.
3505
# The last name is the one that the linker finds with -lNAME.
3506
library_names_spec=$lt_library_names_spec
3508
# The coded name of the library, if different from the real name.
3509
soname_spec=$lt_soname_spec
3511
# Commands used to build and install an old-style archive.
3513
old_archive_cmds=$lt_old_archive_cmds
3514
old_postinstall_cmds=$lt_old_postinstall_cmds
3515
old_postuninstall_cmds=$lt_old_postuninstall_cmds
3517
# Create an old-style archive from a shared archive.
3518
old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
3520
# Create a temporary old-style archive to link instead of a shared archive.
3521
old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
3523
# Commands used to build and install a shared archive.
3524
archive_cmds=$lt_archive_cmds
3525
archive_expsym_cmds=$lt_archive_expsym_cmds
3526
postinstall_cmds=$lt_postinstall_cmds
3527
postuninstall_cmds=$lt_postuninstall_cmds
3529
# Commands to strip libraries.
3530
old_striplib=$lt_old_striplib
3531
striplib=$lt_striplib
3533
# Method to check whether dependent libraries are shared objects.
3534
deplibs_check_method=$lt_deplibs_check_method
3536
# Command to use when deplibs_check_method == file_magic.
3537
file_magic_cmd=$lt_file_magic_cmd
3539
# Flag that allows shared libraries with undefined symbols to be built.
3540
allow_undefined_flag=$lt_allow_undefined_flag
3542
# Flag that forces no undefined symbols.
3543
no_undefined_flag=$lt_no_undefined_flag
3545
# Commands used to finish a libtool library installation in a directory.
3546
finish_cmds=$lt_finish_cmds
3548
# Same as above, but a single script fragment to be evaled but not shown.
3549
finish_eval=$lt_finish_eval
3551
# Take the output of nm and produce a listing of raw symbols and C names.
3552
global_symbol_pipe=$lt_global_symbol_pipe
3554
# Transform the output of nm in a proper C declaration
3555
global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
3557
# Transform the output of nm in a C name address pair
3558
global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
3560
# This is the shared library runtime path variable.
3561
runpath_var=$runpath_var
3563
# This is the shared library path variable.
3564
shlibpath_var=$shlibpath_var
3566
# Is shlibpath searched before the hard-coded library search path?
3567
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
3569
# How to hardcode a shared library path into an executable.
3570
hardcode_action=$hardcode_action
3572
# Whether we should hardcode library paths into libraries.
3573
hardcode_into_libs=$hardcode_into_libs
3575
# Flag to hardcode \$libdir into a binary during linking.
3576
# This must work even if \$libdir does not exist.
3577
hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
3579
# Whether we need a single -rpath flag with a separated argument.
3580
hardcode_libdir_separator=$lt_hardcode_libdir_separator
3582
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
3584
hardcode_direct=$hardcode_direct
3586
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
3588
hardcode_minus_L=$hardcode_minus_L
3590
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
3591
# the resulting binary.
3592
hardcode_shlibpath_var=$hardcode_shlibpath_var
3594
# Variables whose values should be saved in libtool wrapper scripts and
3595
# restored at relink time.
3596
variables_saved_for_relink="$variables_saved_for_relink"
3598
# Whether libtool must link a program against all its dependency libraries.
3599
link_all_deplibs=$link_all_deplibs
3601
# Compile-time system search path for libraries
3602
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
3604
# Run-time system search path for libraries
3605
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
3607
# Fix the shell variable \$srcfile for the compiler.
3608
fix_srcfile_path="$fix_srcfile_path"
3610
# Set to yes if exported symbols are required.
3611
always_export_symbols=$always_export_symbols
3613
# The commands to list exported symbols.
3614
export_symbols_cmds=$lt_export_symbols_cmds
3616
# The commands to extract the exported symbol list from a shared archive.
3617
extract_expsyms_cmds=$lt_extract_expsyms_cmds
3619
# Symbols that should not be listed in the preloaded symbols.
3620
exclude_expsyms=$lt_exclude_expsyms
3622
# Symbols that must always be exported.
3623
include_expsyms=$lt_include_expsyms
3625
# ### END LIBTOOL CONFIG
3631
cat <<\EOF >> "${ofile}T"
3633
# AIX sometimes has problems with the GCC collect2 program. For some
3634
# reason, if we set the COLLECT_NAMES environment variable, the problems
3635
# vanish in a puff of smoke.
3636
if test "X${COLLECT_NAMES+set}" != Xset; then
3638
export COLLECT_NAMES
3645
cygwin* | mingw* | pw32* | os2*)
3646
cat <<'EOF' >> "${ofile}T"
3647
# This is a source program that is used to create dlls on Windows
3648
# Don't remove nor modify the starting and closing comments
3649
# /* ltdll.c starts here */
3650
# #define WIN32_LEAN_AND_MEAN
3651
# #include <windows.h>
3652
# #undef WIN32_LEAN_AND_MEAN
3653
# #include <stdio.h>
3655
# #ifndef __CYGWIN__
3656
# # ifdef __CYGWIN32__
3657
# # define __CYGWIN__ __CYGWIN32__
3661
# #ifdef __cplusplus
3664
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
3665
# #ifdef __cplusplus
3670
# #include <cygwin/cygwin_dll.h>
3671
# DECLARE_CYGWIN_DLL( DllMain );
3673
# HINSTANCE __hDllInstance_base;
3676
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
3678
# __hDllInstance_base = hInst;
3681
# /* ltdll.c ends here */
3682
# This is a source program that is used to create import libraries
3683
# on Windows for dlls which lack them. Don't remove nor modify the
3684
# starting and closing comments
3685
# /* impgen.c starts here */
3686
# /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
3688
# This file is part of GNU libtool.
3690
# This program is free software; you can redistribute it and/or modify
3691
# it under the terms of the GNU General Public License as published by
3692
# the Free Software Foundation; either version 2 of the License, or
3693
# (at your option) any later version.
3695
# This program is distributed in the hope that it will be useful,
3696
# but WITHOUT ANY WARRANTY; without even the implied warranty of
3697
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3698
# GNU General Public License for more details.
3700
# You should have received a copy of the GNU General Public License
3701
# along with this program; if not, write to the Free Software
3702
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3705
# #include <stdio.h> /* for printf() */
3706
# #include <unistd.h> /* for open(), lseek(), read() */
3707
# #include <fcntl.h> /* for O_RDONLY, O_BINARY */
3708
# #include <string.h> /* for strdup() */
3710
# /* O_BINARY isn't required (or even defined sometimes) under Unix */
3712
# #define O_BINARY 0
3715
# static unsigned int
3716
# pe_get16 (fd, offset)
3720
# unsigned char b[2];
3721
# lseek (fd, offset, SEEK_SET);
3723
# return b[0] + (b[1]<<8);
3726
# static unsigned int
3727
# pe_get32 (fd, offset)
3731
# unsigned char b[4];
3732
# lseek (fd, offset, SEEK_SET);
3734
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3737
# static unsigned int
3741
# unsigned char *b = ptr;
3742
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3751
# unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
3752
# unsigned long export_rva, export_size, nsections, secptr, expptr;
3753
# unsigned long name_rvas, nexp;
3754
# unsigned char *expdata, *erva;
3755
# char *filename, *dll_name;
3757
# filename = argv[1];
3759
# dll = open(filename, O_RDONLY|O_BINARY);
3763
# dll_name = filename;
3765
# for (i=0; filename[i]; i++)
3766
# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
3767
# dll_name = filename + i +1;
3769
# pe_header_offset = pe_get32 (dll, 0x3c);
3770
# opthdr_ofs = pe_header_offset + 4 + 20;
3771
# num_entries = pe_get32 (dll, opthdr_ofs + 92);
3773
# if (num_entries < 1) /* no exports */
3776
# export_rva = pe_get32 (dll, opthdr_ofs + 96);
3777
# export_size = pe_get32 (dll, opthdr_ofs + 100);
3778
# nsections = pe_get16 (dll, pe_header_offset + 4 +2);
3779
# secptr = (pe_header_offset + 4 + 20 +
3780
# pe_get16 (dll, pe_header_offset + 4 + 16));
3783
# for (i = 0; i < nsections; i++)
3786
# unsigned long secptr1 = secptr + 40 * i;
3787
# unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
3788
# unsigned long vsize = pe_get32 (dll, secptr1 + 16);
3789
# unsigned long fptr = pe_get32 (dll, secptr1 + 20);
3790
# lseek(dll, secptr1, SEEK_SET);
3791
# read(dll, sname, 8);
3792
# if (vaddr <= export_rva && vaddr+vsize > export_rva)
3794
# expptr = fptr + (export_rva - vaddr);
3795
# if (export_rva + export_size > vaddr + vsize)
3796
# export_size = vsize - (export_rva - vaddr);
3801
# expdata = (unsigned char*)malloc(export_size);
3802
# lseek (dll, expptr, SEEK_SET);
3803
# read (dll, expdata, export_size);
3804
# erva = expdata - export_rva;
3806
# nexp = pe_as32 (expdata+24);
3807
# name_rvas = pe_as32 (expdata+32);
3809
# printf ("EXPORTS\n");
3810
# for (i = 0; i<nexp; i++)
3812
# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
3813
# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
3818
# /* impgen.c ends here */
3824
# We use sed instead of cat because bash on DJGPP gets confused if
3825
# if finds mixed CR/LF and LF-only lines. Since sed operates in
3826
# text mode, it properly converts lines to CR/LF. This bash problem
3827
# is reportedly fixed, but why not run on old versions too?
3828
sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
3830
mv -f "${ofile}T" "$ofile" || \
3831
(rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
3835
])# _LT_AC_LTCONFIG_HACK
3837
239
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
3838
AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
240
AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
3840
242
# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
3841
AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
243
AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
3843
245
# AC_ENABLE_SHARED - implement the --enable-shared flag
3844
246
# Usage: AC_ENABLE_SHARED[(DEFAULT)]
3845
247
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3847
AC_DEFUN([AC_ENABLE_SHARED],
3848
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
249
AC_DEFUN(AC_ENABLE_SHARED, [dnl
250
define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3849
251
AC_ARG_ENABLE(shared,
3850
252
changequote(<<, >>)dnl
3851
253
<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
3852
254
changequote([, ])dnl
3853
255
[p=${PACKAGE-default}
3855
257
yes) enable_shared=yes ;;
3856
258
no) enable_shared=no ;;