Commit fa275f0a by Tom Tromey Committed by Tom Tromey

re PR libgcj/26441 (Old libltdl may cause memory leak in Class.forName())

	PR libgcj/26641:
	* Merged libltdl 1.5.16 from vendor branch.

From-SVN: r112464
parent 625a46d9
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
Version 2.1, February 1999 Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc. Copyright (C) 1991, 1999 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed. of this license document, but changing it is not allowed.
...@@ -493,7 +493,7 @@ does.> ...@@ -493,7 +493,7 @@ does.>
You should have received a copy of the GNU Lesser General Public You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper Also add information on how to contact you by electronic and paper
mail. mail.
......
2006-03-28 Tom Tromey <tromey@redhat.com>
PR libgcj/26641:
* Merged libltdl 1.5.16 from vendor branch.
2004-11-24 Kelley Cook <kcook@gcc.gnu.org> 2004-11-24 Kelley Cook <kcook@gcc.gnu.org>
* Makefile.in: Regenrate with Automake 1.9.3. * Makefile.in: Regenrate with Automake 1.9.3.
......
...@@ -20,7 +20,7 @@ endif ...@@ -20,7 +20,7 @@ endif
CLEANFILES = libltdl.la libltdlc.la CLEANFILES = libltdl.la libltdlc.la
libltdl_la_SOURCES = ltdl.c libltdl_la_SOURCES = ltdl.c
libltdl_la_LDFLAGS = -no-undefined -version-info 4:0:1 libltdl_la_LDFLAGS = -no-undefined -version-info 4:1:1
libltdl_la_LIBADD = $(LIBADD_DL) libltdl_la_LIBADD = $(LIBADD_DL)
libltdlc_la_SOURCES = ltdl.c libltdlc_la_SOURCES = ltdl.c
...@@ -33,18 +33,19 @@ $(libltdl_la_OBJECTS) $(libltdlc_la_OBJECTS): libtool ...@@ -33,18 +33,19 @@ $(libltdl_la_OBJECTS) $(libltdlc_la_OBJECTS): libtool
libtool: $(LIBTOOL_DEPS) libtool: $(LIBTOOL_DEPS)
$(SHELL) ./config.status --recheck $(SHELL) ./config.status --recheck
## This allows us to install libltdl without using ln and without creating ## These are installed as a subdirectory of pkgdatadir so that
## a world writeable directory. ## libtoolize --ltdl can find them later:
## FIXME: Remove this rule once automake can do this properly by itself. ltdldatadir = $(datadir)/libtool/libltdl
local-install-files: $(DISTFILES) ltdldatafiles = COPYING.LIB README acinclude.m4 aclocal.m4 \
-rm -rf $(DESTDIR)$(datadir)/libtool/libltdl Makefile.am Makefile.in configure.ac configure \
$(mkinstalldirs) $(DESTDIR)$(datadir)/libtool/libltdl config-h.in config.guess config.sub \
@for file in $(DISTFILES); do \ install-sh missing ltmain.sh \
d=$(srcdir); \ ltdl.c ltdl.h
if test -d $$d/$$file; then \
cp -r $$d/$$file $(DESTDIR)$(datadir)/libtool/libltdl/$$file; \ ## To avoid spurious reconfiguration when the user installs these files
else \ ## with libtoolize, we have to preserve their timestamps carefully:
test -f $(DESTDIR)$(datadir)/libtool/libltdl/$$file \ install-data-local:
|| cp $$d/$$file $(DESTDIR)$(datadir)/libtool/libltdl/$$file || :; \ -rm -rf $(DESTDIR)$(ltdldatadir)
fi; \ $(mkinstalldirs) $(DESTDIR)$(ltdldatadir)
done ( cd $(srcdir) && $(AMTAR) chf - $(ltdldatafiles); ) \
| ( umask 0 && cd $(DESTDIR)$(ltdldatadir) && $(AMTAR) xf -; )
# Makefile.in generated by automake 1.9.5 from Makefile.am. # Makefile.in generated by automake 1.9.3 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc. # 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
...@@ -43,7 +43,7 @@ DIST_COMMON = README $(am__configure_deps) $(am__include_HEADERS_DIST) \ ...@@ -43,7 +43,7 @@ DIST_COMMON = README $(am__configure_deps) $(am__include_HEADERS_DIST) \
$(am__noinst_HEADERS_DIST) $(srcdir)/Makefile.am \ $(am__noinst_HEADERS_DIST) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config-h.in \ $(srcdir)/Makefile.in $(srcdir)/config-h.in \
$(top_srcdir)/configure COPYING.LIB ChangeLog config.guess \ $(top_srcdir)/configure COPYING.LIB ChangeLog config.guess \
config.sub install-sh ltmain.sh missing mkinstalldirs config.sub install-sh ltmain.sh missing
subdir = . subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
...@@ -52,8 +52,9 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ ...@@ -52,8 +52,9 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4) $(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno configure.status.lineno configure.lineno configure.status.lineno
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES = config.h CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \ am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
...@@ -72,7 +73,7 @@ libltdlc_la_DEPENDENCIES = $(am__DEPENDENCIES_1) ...@@ -72,7 +73,7 @@ libltdlc_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
am_libltdlc_la_OBJECTS = ltdl.lo am_libltdlc_la_OBJECTS = ltdl.lo
libltdlc_la_OBJECTS = $(am_libltdlc_la_OBJECTS) libltdlc_la_OBJECTS = $(am_libltdlc_la_OBJECTS)
@CONVENIENCE_LTDL_TRUE@am_libltdlc_la_rpath = @CONVENIENCE_LTDL_TRUE@am_libltdlc_la_rpath =
DEFAULT_INCLUDES = -I. -I$(srcdir) DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
depcomp = depcomp =
am__depfiles_maybe = am__depfiles_maybe =
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
...@@ -149,9 +150,6 @@ LIBTOOL = @LIBTOOL@ ...@@ -149,9 +150,6 @@ LIBTOOL = @LIBTOOL@
LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBTOOL_DEPS = @LIBTOOL_DEPS@
LN_S = @LN_S@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
OBJDUMP = @OBJDUMP@ OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@ OBJEXT = @OBJEXT@
...@@ -221,17 +219,25 @@ INCLUDES = $(GCINCS) ...@@ -221,17 +219,25 @@ INCLUDES = $(GCINCS)
@CONVENIENCE_LTDL_TRUE@noinst_LTLIBRARIES = libltdlc.la @CONVENIENCE_LTDL_TRUE@noinst_LTLIBRARIES = libltdlc.la
CLEANFILES = libltdl.la libltdlc.la CLEANFILES = libltdl.la libltdlc.la
libltdl_la_SOURCES = ltdl.c libltdl_la_SOURCES = ltdl.c
libltdl_la_LDFLAGS = -no-undefined -version-info 4:0:1 libltdl_la_LDFLAGS = -no-undefined -version-info 4:1:1
libltdl_la_LIBADD = $(LIBADD_DL) libltdl_la_LIBADD = $(LIBADD_DL)
libltdlc_la_SOURCES = ltdl.c libltdlc_la_SOURCES = ltdl.c
libltdlc_la_LIBADD = $(LIBADD_DL) libltdlc_la_LIBADD = $(LIBADD_DL)
all: all-am ltdldatadir = $(datadir)/libtool/libltdl
ltdldatafiles = COPYING.LIB README acinclude.m4 aclocal.m4 \
Makefile.am Makefile.in configure.ac configure \
config-h.in config.guess config.sub \
install-sh missing ltmain.sh \
ltdl.c ltdl.h
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES: .SUFFIXES:
.SUFFIXES: .c .lo .o .obj .SUFFIXES: .c .lo .o .obj
am--refresh: am--refresh:
@: @:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \ @for dep in $?; do \
case '$(am__configure_deps)' in \ case '$(am__configure_deps)' in \
*$$dep*) \ *$$dep*) \
...@@ -258,12 +264,27 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status ...@@ -258,12 +264,27 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck $(SHELL) ./config.status --recheck
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(top_srcdir)/configure: $(am__configure_deps)
cd $(srcdir) && $(AUTOCONF) cd $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
config.h: $(top_builddir)/config.status $(srcdir)/config-h.in
cd $(top_builddir) && $(SHELL) ./config.status $@ config.h: stamp-h1
@if test ! -f $@; then \
rm -f stamp-h1; \
$(MAKE) stamp-h1; \
else :; fi
stamp-h1: $(srcdir)/config-h.in $(top_builddir)/config.status
@rm -f stamp-h1
cd $(top_builddir) && $(SHELL) ./config.status config.h
$(srcdir)/config-h.in: $(am__configure_deps)
cd $(top_srcdir) && $(AUTOHEADER)
rm -f stamp-h1
touch $@
distclean-hdr:
-rm -f config.h stamp-h1
install-libLTLIBRARIES: $(lib_LTLIBRARIES) install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL) @$(NORMAL_INSTALL)
test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
...@@ -357,11 +378,11 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) ...@@ -357,11 +378,11 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
mkid -fID $$unique mkid -fID $$unique
tags: TAGS tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ TAGS: $(HEADERS) $(SOURCES) config-h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP) $(TAGS_FILES) $(LISP)
tags=; \ tags=; \
here=`pwd`; \ here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ list='$(SOURCES) $(HEADERS) config-h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \ unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \ done | \
...@@ -373,11 +394,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ ...@@ -373,11 +394,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$$tags $$unique; \ $$tags $$unique; \
fi fi
ctags: CTAGS ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ CTAGS: $(HEADERS) $(SOURCES) config-h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP) $(TAGS_FILES) $(LISP)
tags=; \ tags=; \
here=`pwd`; \ here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ list='$(SOURCES) $(HEADERS) config-h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \ unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \ done | \
...@@ -398,7 +419,6 @@ distclean-tags: ...@@ -398,7 +419,6 @@ distclean-tags:
distdir: $(DISTFILES) distdir: $(DISTFILES)
$(am__remove_distdir) $(am__remove_distdir)
mkdir $(distdir) mkdir $(distdir)
$(mkdir_p) $(distdir)/.
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \ list='$(DISTFILES)'; for file in $$list; do \
...@@ -524,7 +544,7 @@ distcleancheck: distclean ...@@ -524,7 +544,7 @@ distcleancheck: distclean
exit 1; } >&2 exit 1; } >&2
check-am: all-am check-am: all-am
check: check-am check: check-am
all-am: Makefile $(LTLIBRARIES) $(HEADERS) all-am: Makefile $(LTLIBRARIES) $(HEADERS) config.h
installdirs: installdirs:
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"; do \ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \ test -z "$$dir" || $(mkdir_p) "$$dir"; \
...@@ -563,7 +583,7 @@ distclean: distclean-am ...@@ -563,7 +583,7 @@ distclean: distclean-am
-rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -f Makefile -rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \ distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags distclean-hdr distclean-libtool distclean-tags
dvi: dvi-am dvi: dvi-am
...@@ -575,7 +595,7 @@ info: info-am ...@@ -575,7 +595,7 @@ info: info-am
info-am: info-am:
install-data-am: install-includeHEADERS install-data-am: install-data-local install-includeHEADERS
install-exec-am: install-libLTLIBRARIES install-exec-am: install-libLTLIBRARIES
...@@ -611,10 +631,11 @@ uninstall-am: uninstall-includeHEADERS uninstall-info-am \ ...@@ -611,10 +631,11 @@ uninstall-am: uninstall-includeHEADERS uninstall-info-am \
clean-generic clean-libLTLIBRARIES clean-libtool \ clean-generic clean-libLTLIBRARIES clean-libtool \
clean-noinstLTLIBRARIES ctags dist dist-all dist-bzip2 \ clean-noinstLTLIBRARIES ctags dist dist-all dist-bzip2 \
dist-gzip dist-shar dist-tarZ dist-zip distcheck distclean \ dist-gzip dist-shar dist-tarZ dist-zip distcheck distclean \
distclean-compile distclean-generic distclean-libtool \ distclean-compile distclean-generic distclean-hdr \
distclean-tags distcleancheck distdir distuninstallcheck dvi \ distclean-libtool distclean-tags distcleancheck distdir \
dvi-am html html-am info info-am install install-am \ distuninstallcheck dvi dvi-am html html-am info info-am \
install-data install-data-am install-exec install-exec-am \ install install-am install-data install-data-am \
install-data-local install-exec install-exec-am \
install-includeHEADERS install-info install-info-am \ install-includeHEADERS install-info install-info-am \
install-libLTLIBRARIES install-man install-strip installcheck \ install-libLTLIBRARIES install-man install-strip installcheck \
installcheck-am installdirs maintainer-clean \ installcheck-am installdirs maintainer-clean \
...@@ -630,18 +651,11 @@ $(libltdl_la_OBJECTS) $(libltdlc_la_OBJECTS): libtool ...@@ -630,18 +651,11 @@ $(libltdl_la_OBJECTS) $(libltdlc_la_OBJECTS): libtool
libtool: $(LIBTOOL_DEPS) libtool: $(LIBTOOL_DEPS)
$(SHELL) ./config.status --recheck $(SHELL) ./config.status --recheck
local-install-files: $(DISTFILES) install-data-local:
-rm -rf $(DESTDIR)$(datadir)/libtool/libltdl -rm -rf $(DESTDIR)$(ltdldatadir)
$(mkinstalldirs) $(DESTDIR)$(datadir)/libtool/libltdl $(mkinstalldirs) $(DESTDIR)$(ltdldatadir)
@for file in $(DISTFILES); do \ ( cd $(srcdir) && $(AMTAR) chf - $(ltdldatafiles); ) \
d=$(srcdir); \ | ( umask 0 && cd $(DESTDIR)$(ltdldatadir) && $(AMTAR) xf -; )
if test -d $$d/$$file; then \
cp -r $$d/$$file $(DESTDIR)$(datadir)/libtool/libltdl/$$file; \
else \
test -f $(DESTDIR)$(datadir)/libtool/libltdl/$$file \
|| cp $$d/$$file $(DESTDIR)$(datadir)/libtool/libltdl/$$file || :; \
fi; \
done
# Tell versions [3.59,3.63) of GNU make to not export all variables. # Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded. # Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT: .NOEXPORT:
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
## Copyright 1996, 1997, 1998, 1999, 2000, 2001 ## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
## Free Software Foundation, Inc. ## Free Software Foundation, Inc.
## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
## ##
## This program is free software; you can redistribute it and/or modify ## This file is free software; the Free Software Foundation gives
## it under the terms of the GNU General Public License as published by ## unlimited permission to copy and/or distribute it, with or without
## the Free Software Foundation; either version 2 of the License, or ## modifications, as long as this notice is preserved.
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
##
## As a special exception to the GNU General Public License, if you
## distribute this file as part of a program that contains a
## configuration script generated by Autoconf, you may include it under
## the same distribution terms that you use for the rest of that program.
# serial 47 AC_PROG_LIBTOOL # serial 47 AC_PROG_LIBTOOL
...@@ -132,7 +117,7 @@ esac ...@@ -132,7 +117,7 @@ esac
# Sed substitution that helps us do robust quoting. It backslashifies # Sed substitution that helps us do robust quoting. It backslashifies
# metacharacters that are still active within double-quoted strings. # metacharacters that are still active within double-quoted strings.
Xsed='sed -e s/^X//' Xsed='sed -e 1s/^X//'
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
# Same as above, but do not quote variable references. # Same as above, but do not quote variable references.
...@@ -200,6 +185,8 @@ if test -n "$RANLIB"; then ...@@ -200,6 +185,8 @@ if test -n "$RANLIB"; then
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
fi fi
_LT_CC_BASENAME([$compiler])
# Only perform the check for file, if the check method requires it # Only perform the check for file, if the check method requires it
case $deplibs_check_method in case $deplibs_check_method in
file_magic*) file_magic*)
...@@ -245,6 +232,48 @@ compiler=$CC ...@@ -245,6 +232,48 @@ compiler=$CC
])# _LT_AC_SYS_COMPILER ])# _LT_AC_SYS_COMPILER
# _LT_CC_BASENAME(CC)
# -------------------
# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
AC_DEFUN([_LT_CC_BASENAME],
[for cc_temp in $1""; do
case $cc_temp in
compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
\-*) ;;
*) break;;
esac
done
cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
])
# _LT_COMPILER_BOILERPLATE
# ------------------------
# Check for compiler boilerplate output or warnings with
# the simple compiler test code.
AC_DEFUN([_LT_COMPILER_BOILERPLATE],
[ac_outfile=conftest.$ac_objext
printf "$lt_simple_compile_test_code" >conftest.$ac_ext
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
_lt_compiler_boilerplate=`cat conftest.err`
$rm conftest*
])# _LT_COMPILER_BOILERPLATE
# _LT_LINKER_BOILERPLATE
# ----------------------
# Check for linker boilerplate output or warnings with
# the simple link test code.
AC_DEFUN([_LT_LINKER_BOILERPLATE],
[ac_outfile=conftest.$ac_objext
printf "$lt_simple_link_test_code" >conftest.$ac_ext
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
_lt_linker_boilerplate=`cat conftest.err`
$rm conftest*
])# _LT_LINKER_BOILERPLATE
# _LT_AC_SYS_LIBPATH_AIX # _LT_AC_SYS_LIBPATH_AIX
# ---------------------- # ----------------------
# Links a minimal program and checks the executable # Links a minimal program and checks the executable
...@@ -317,7 +346,7 @@ fi ...@@ -317,7 +346,7 @@ fi
# The HP-UX ksh and POSIX shell print the target directory to stdout # The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set. # if CDPATH is set.
if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
if test -z "$ECHO"; then if test -z "$ECHO"; then
if test "X${echo_test_string+set}" != Xset; then if test "X${echo_test_string+set}" != Xset; then
...@@ -500,7 +529,7 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) ...@@ -500,7 +529,7 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
x86_64-*linux*) x86_64-*linux*)
LD="${LD-ld} -m elf_i386" LD="${LD-ld} -m elf_i386"
;; ;;
ppc64-*linux*) ppc64-*linux*|powerpc64-*linux*)
LD="${LD-ld} -m elf32ppclinux" LD="${LD-ld} -m elf32ppclinux"
;; ;;
s390x-*linux*) s390x-*linux*)
...@@ -564,7 +593,8 @@ need_locks="$enable_libtool_lock" ...@@ -564,7 +593,8 @@ need_locks="$enable_libtool_lock"
# ---------------------------------------------------------------- # ----------------------------------------------------------------
# Check whether the given compiler option works # Check whether the given compiler option works
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
[AC_CACHE_CHECK([$1], [$2], [AC_REQUIRE([LT_AC_PROG_SED])
AC_CACHE_CHECK([$1], [$2],
[$2=no [$2=no
ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
printf "$lt_simple_compile_test_code" > conftest.$ac_ext printf "$lt_simple_compile_test_code" > conftest.$ac_ext
...@@ -585,8 +615,10 @@ AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], ...@@ -585,8 +615,10 @@ AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
if (exit $ac_status) && test -s "$ac_outfile"; then if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings # So say no if there are warnings other than the usual output.
if test ! -s conftest.err; then $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
$SED '/^$/d' conftest.err >conftest.er2
if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
$2=yes $2=yes
fi fi
fi fi
...@@ -617,6 +649,11 @@ AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], ...@@ -617,6 +649,11 @@ AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
if test -s conftest.err; then if test -s conftest.err; then
# Append any errors to the config.log. # Append any errors to the config.log.
cat conftest.err 1>&AS_MESSAGE_LOG_FD cat conftest.err 1>&AS_MESSAGE_LOG_FD
$echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp
$SED '/^$/d' conftest.err >conftest.er2
if diff conftest.exp conftest.er2 >/dev/null; then
$2=yes
fi
else else
$2=yes $2=yes
fi fi
...@@ -640,7 +677,7 @@ AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], ...@@ -640,7 +677,7 @@ AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
AC_MSG_CHECKING([the maximum length of command line arguments]) AC_MSG_CHECKING([the maximum length of command line arguments])
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
i=0 i=0
testring="ABCD" teststring="ABCD"
case $build_os in case $build_os in
msdosdjgpp*) msdosdjgpp*)
...@@ -669,20 +706,53 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl ...@@ -669,20 +706,53 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
lt_cv_sys_max_cmd_len=8192; lt_cv_sys_max_cmd_len=8192;
;; ;;
*) amigaos*)
# On AmigaOS with pdksh, this test takes hours, literally.
# So we just punt and use a minimum line length of 8192.
lt_cv_sys_max_cmd_len=8192;
;;
netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
# This has been around since 386BSD, at least. Likely further.
if test -x /sbin/sysctl; then
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
elif test -x /usr/sbin/sysctl; then
lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
else
lt_cv_sys_max_cmd_len=65536 # usable default for *BSD
fi
# And add a safety zone
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
;;
osf*)
# Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
# due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
# nice to cause kernel panics so lets avoid the loop below.
# First set a reasonable default.
lt_cv_sys_max_cmd_len=16384
#
if test -x /sbin/sysconfig; then
case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
*1*) lt_cv_sys_max_cmd_len=-1 ;;
esac
fi
;;
*)
# If test is not a shell built-in, we'll probably end up computing a # If test is not a shell built-in, we'll probably end up computing a
# maximum length that is only half of the actual maximum length, but # maximum length that is only half of the actual maximum length, but
# we can't tell. # we can't tell.
while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
= "XX$testring") >/dev/null 2>&1 && while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
new_result=`expr "X$testring" : ".*" 2>&1` && = "XX$teststring") >/dev/null 2>&1 &&
new_result=`expr "X$teststring" : ".*" 2>&1` &&
lt_cv_sys_max_cmd_len=$new_result && lt_cv_sys_max_cmd_len=$new_result &&
test $i != 17 # 1/2 MB should be enough test $i != 17 # 1/2 MB should be enough
do do
i=`expr $i + 1` i=`expr $i + 1`
testring=$testring$testring teststring=$teststring$teststring
done done
testring= teststring=
# Add a significant safety factor because C++ compilers can tack on massive # Add a significant safety factor because C++ compilers can tack on massive
# amounts of additional arguments before passing them to the linker. # amounts of additional arguments before passing them to the linker.
# It appears as though 1/2 is a usable value. # It appears as though 1/2 is a usable value.
...@@ -832,7 +902,7 @@ else ...@@ -832,7 +902,7 @@ else
lt_cv_dlopen_self=yes lt_cv_dlopen_self=yes
]) ])
;; ;;
*) *)
AC_CHECK_FUNC([shl_load], AC_CHECK_FUNC([shl_load],
[lt_cv_dlopen="shl_load"], [lt_cv_dlopen="shl_load"],
...@@ -921,13 +991,6 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], ...@@ -921,13 +991,6 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
mkdir out mkdir out
printf "$lt_simple_compile_test_code" > conftest.$ac_ext printf "$lt_simple_compile_test_code" > conftest.$ac_ext
# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
# that will create temporary files in the current directory regardless of
# the output directory. Thus, making CWD read-only will cause this test
# to fail, enabling locking or at least warning the user not to do parallel
# builds.
chmod -w .
lt_compiler_flag="-o out/conftest2.$ac_objext" lt_compiler_flag="-o out/conftest2.$ac_objext"
# Insert the option either (1) after the last *FLAGS variable, or # Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end. # (2) before a word containing "conftest.", or (3) at the end.
...@@ -946,13 +1009,18 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], ...@@ -946,13 +1009,18 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
then then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings # So say no if there are warnings
if test ! -s out/conftest.err; then $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
$SED '/^$/d' out/conftest.err >out/conftest.er2
if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
fi fi
fi fi
chmod u+w . chmod u+w .
$rm conftest* out/* $rm conftest*
rmdir out # SGI C++ compiler will create directory out/ii_files/ for
# template instantiation
test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
$rm out/* && rmdir out
cd .. cd ..
rmdir conftest rmdir conftest
$rm conftest* $rm conftest*
...@@ -1011,8 +1079,8 @@ AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], ...@@ -1011,8 +1079,8 @@ AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
[AC_MSG_CHECKING([how to hardcode library paths into programs]) [AC_MSG_CHECKING([how to hardcode library paths into programs])
_LT_AC_TAGVAR(hardcode_action, $1)= _LT_AC_TAGVAR(hardcode_action, $1)=
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \ test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
# We can hardcode non-existant directories. # We can hardcode non-existant directories.
if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
...@@ -1069,7 +1137,7 @@ fi ...@@ -1069,7 +1137,7 @@ fi
*) *)
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
;; ;;
esac esac
fi fi
])# AC_LIBTOOL_SYS_LIB_STRIP ])# AC_LIBTOOL_SYS_LIB_STRIP
...@@ -1082,7 +1150,7 @@ AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], ...@@ -1082,7 +1150,7 @@ AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
library_names_spec= library_names_spec=
libname_spec='lib$name' libname_spec='lib$name'
soname_spec= soname_spec=
shrext=".so" shrext_cmds=".so"
postinstall_cmds= postinstall_cmds=
postuninstall_cmds= postuninstall_cmds=
finish_cmds= finish_cmds=
...@@ -1170,7 +1238,7 @@ aix4* | aix5*) ...@@ -1170,7 +1238,7 @@ aix4* | aix5*)
amigaos*) amigaos*)
library_names_spec='$libname.ixlibrary $libname.a' library_names_spec='$libname.ixlibrary $libname.a'
# Create ${libname}_ixlibrary.a entries in /sys/libs. # Create ${libname}_ixlibrary.a entries in /sys/libs.
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' 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'
;; ;;
beos*) beos*)
...@@ -1179,7 +1247,7 @@ beos*) ...@@ -1179,7 +1247,7 @@ beos*)
shlibpath_var=LIBRARY_PATH shlibpath_var=LIBRARY_PATH
;; ;;
bsdi4*) bsdi[[45]]*)
version_type=linux version_type=linux
need_version=no need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
...@@ -1195,7 +1263,7 @@ bsdi4*) ...@@ -1195,7 +1263,7 @@ bsdi4*)
cygwin* | mingw* | pw32*) cygwin* | mingw* | pw32*)
version_type=windows version_type=windows
shrext=".dll" shrext_cmds=".dll"
need_version=no need_version=no
need_lib_prefix=no need_lib_prefix=no
...@@ -1217,7 +1285,7 @@ cygwin* | mingw* | pw32*) ...@@ -1217,7 +1285,7 @@ cygwin* | mingw* | pw32*)
cygwin*) cygwin*)
# Cygwin DLLs use 'cyg' prefix rather than 'lib' # Cygwin DLLs use 'cyg' prefix rather than 'lib'
soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib" sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
;; ;;
mingw*) mingw*)
# MinGW DLLs use traditional 'lib' prefix # MinGW DLLs use traditional 'lib' prefix
...@@ -1237,7 +1305,7 @@ cygwin* | mingw* | pw32*) ...@@ -1237,7 +1305,7 @@ cygwin* | mingw* | pw32*)
;; ;;
pw32*) pw32*)
# pw32 DLLs use 'pw' prefix rather than 'lib' # pw32 DLLs use 'pw' prefix rather than 'lib'
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
;; ;;
esac esac
;; ;;
...@@ -1256,17 +1324,16 @@ darwin* | rhapsody*) ...@@ -1256,17 +1324,16 @@ darwin* | rhapsody*)
version_type=darwin version_type=darwin
need_lib_prefix=no need_lib_prefix=no
need_version=no need_version=no
# FIXME: Relying on posixy $() will cause problems for
# cross-compilation, but unfortunately the echo tests do not
# yet detect zsh echo's removal of \ escapes.
library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
soname_spec='${libname}${release}${major}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext'
shlibpath_overrides_runpath=yes shlibpath_overrides_runpath=yes
shlibpath_var=DYLD_LIBRARY_PATH shlibpath_var=DYLD_LIBRARY_PATH
shrext='$(test .$module = .yes && echo .so || echo .dylib)' shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
# Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then if test "$GCC" = yes; then
sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
else
sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
fi fi
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
;; ;;
...@@ -1284,7 +1351,21 @@ freebsd1*) ...@@ -1284,7 +1351,21 @@ freebsd1*)
dynamic_linker=no dynamic_linker=no
;; ;;
freebsd*) kfreebsd*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
dynamic_linker='GNU ld.so'
;;
freebsd* | dragonfly*)
# DragonFly does not have aout. When/if they implement a new
# versioning mechanism, adjust this.
objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
version_type=freebsd-$objformat version_type=freebsd-$objformat
case $version_type in case $version_type in
...@@ -1303,7 +1384,7 @@ freebsd*) ...@@ -1303,7 +1384,7 @@ freebsd*)
freebsd2*) freebsd2*)
shlibpath_overrides_runpath=yes shlibpath_overrides_runpath=yes
;; ;;
freebsd3.[01]* | freebsdelf3.[01]*) freebsd3.[[01]]* | freebsdelf3.[[01]]*)
shlibpath_overrides_runpath=yes shlibpath_overrides_runpath=yes
hardcode_into_libs=yes hardcode_into_libs=yes
;; ;;
...@@ -1332,7 +1413,7 @@ hpux9* | hpux10* | hpux11*) ...@@ -1332,7 +1413,7 @@ hpux9* | hpux10* | hpux11*)
need_version=no need_version=no
case "$host_cpu" in case "$host_cpu" in
ia64*) ia64*)
shrext='.so' shrext_cmds='.so'
hardcode_into_libs=yes hardcode_into_libs=yes
dynamic_linker="$host_os dld.so" dynamic_linker="$host_os dld.so"
shlibpath_var=LD_LIBRARY_PATH shlibpath_var=LD_LIBRARY_PATH
...@@ -1347,7 +1428,7 @@ hpux9* | hpux10* | hpux11*) ...@@ -1347,7 +1428,7 @@ hpux9* | hpux10* | hpux11*)
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
;; ;;
hppa*64*) hppa*64*)
shrext='.sl' shrext_cmds='.sl'
hardcode_into_libs=yes hardcode_into_libs=yes
dynamic_linker="$host_os dld.sl" dynamic_linker="$host_os dld.sl"
shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
...@@ -1358,7 +1439,7 @@ hpux9* | hpux10* | hpux11*) ...@@ -1358,7 +1439,7 @@ hpux9* | hpux10* | hpux11*)
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
;; ;;
*) *)
shrext='.sl' shrext_cmds='.sl'
dynamic_linker="$host_os dld.sl" dynamic_linker="$host_os dld.sl"
shlibpath_var=SHLIB_PATH shlibpath_var=SHLIB_PATH
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
...@@ -1427,6 +1508,29 @@ linux*) ...@@ -1427,6 +1508,29 @@ linux*)
# before this can be enabled. # before this can be enabled.
hardcode_into_libs=yes hardcode_into_libs=yes
# find out which ABI we are using
libsuff=
case "$host_cpu" in
x86_64*|s390x*|powerpc64*)
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
case `/usr/bin/file conftest.$ac_objext` in
*64-bit*)
libsuff=64
sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
;;
esac
fi
rm -rf conftest*
;;
esac
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
fi
# We used to test for /lib/ld.so.1 and disable shared libraries on # We used to test for /lib/ld.so.1 and disable shared libraries on
# powerpc, because MkLinux only supported shared libraries with the # powerpc, because MkLinux only supported shared libraries with the
# GNU dynamic linker. Since this was broken with cross compilers, # GNU dynamic linker. Since this was broken with cross compilers,
...@@ -1436,6 +1540,18 @@ linux*) ...@@ -1436,6 +1540,18 @@ linux*)
dynamic_linker='GNU/Linux ld.so' dynamic_linker='GNU/Linux ld.so'
;; ;;
knetbsd*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
dynamic_linker='GNU ld.so'
;;
netbsd*) netbsd*)
version_type=sunos version_type=sunos
need_lib_prefix=no need_lib_prefix=no
...@@ -1445,7 +1561,7 @@ netbsd*) ...@@ -1445,7 +1561,7 @@ netbsd*)
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
dynamic_linker='NetBSD (a.out) ld.so' dynamic_linker='NetBSD (a.out) ld.so'
else else
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major' soname_spec='${libname}${release}${shared_ext}$major'
dynamic_linker='NetBSD ld.elf_so' dynamic_linker='NetBSD ld.elf_so'
fi fi
...@@ -1461,7 +1577,7 @@ newsos6) ...@@ -1461,7 +1577,7 @@ newsos6)
shlibpath_overrides_runpath=yes shlibpath_overrides_runpath=yes
;; ;;
nto-qnx) nto-qnx*)
version_type=linux version_type=linux
need_lib_prefix=no need_lib_prefix=no
need_version=no need_version=no
...@@ -1494,7 +1610,7 @@ openbsd*) ...@@ -1494,7 +1610,7 @@ openbsd*)
os2*) os2*)
libname_spec='$name' libname_spec='$name'
shrext=".dll" shrext_cmds=".dll"
need_lib_prefix=no need_lib_prefix=no
library_names_spec='$libname${shared_ext} $libname.a' library_names_spec='$libname${shared_ext} $libname.a'
dynamic_linker='OS/2 ld.exe' dynamic_linker='OS/2 ld.exe'
...@@ -1640,7 +1756,9 @@ if test -f "$ltmain" && test -n "$tagnames"; then ...@@ -1640,7 +1756,9 @@ if test -f "$ltmain" && test -n "$tagnames"; then
case $tagname in case $tagname in
CXX) CXX)
if test -n "$CXX" && test "X$CXX" != "Xno"; then if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
(test "X$CXX" != "Xg++"))) ; then
AC_LIBTOOL_LANG_CXX_CONFIG AC_LIBTOOL_LANG_CXX_CONFIG
else else
tagname="" tagname=""
...@@ -1930,7 +2048,7 @@ fi ...@@ -1930,7 +2048,7 @@ fi
# AC_PROG_LD # AC_PROG_LD
# ---------- # ----------
# find the path to the GNU or non-GNU linker # find the pathname to the GNU or non-GNU linker
AC_DEFUN([AC_PROG_LD], AC_DEFUN([AC_PROG_LD],
[AC_ARG_WITH([gnu-ld], [AC_ARG_WITH([gnu-ld],
[AC_HELP_STRING([--with-gnu-ld], [AC_HELP_STRING([--with-gnu-ld],
...@@ -1956,7 +2074,7 @@ if test "$GCC" = yes; then ...@@ -1956,7 +2074,7 @@ if test "$GCC" = yes; then
# Accept absolute paths. # Accept absolute paths.
[[\\/]]* | ?:[[\\/]]*) [[\\/]]* | ?:[[\\/]]*)
re_direlt='/[[^/]][[^/]]*/\.\./' re_direlt='/[[^/]][[^/]]*/\.\./'
# Canonicalize the path of ld # Canonicalize the pathname of ld
ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
...@@ -2019,7 +2137,7 @@ AC_DEFUN([AC_PROG_LD_GNU], ...@@ -2019,7 +2137,7 @@ AC_DEFUN([AC_PROG_LD_GNU],
[AC_REQUIRE([AC_PROG_EGREP])dnl [AC_REQUIRE([AC_PROG_EGREP])dnl
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
[# I'd rather use --version here, but apparently some GNU ld's only accept -v. [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
case `"$LD" -v 2>&1 </dev/null` in case `$LD -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*) *GNU* | *'with BFD'*)
lt_cv_prog_gnu_ld=yes lt_cv_prog_gnu_ld=yes
;; ;;
...@@ -2045,6 +2163,15 @@ case $reload_flag in ...@@ -2045,6 +2163,15 @@ case $reload_flag in
*) reload_flag=" $reload_flag" ;; *) reload_flag=" $reload_flag" ;;
esac esac
reload_cmds='$LD$reload_flag -o $output$reload_objs' reload_cmds='$LD$reload_flag -o $output$reload_objs'
case $host_os in
darwin*)
if test "$GCC" = yes; then
reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
else
reload_cmds='$LD$reload_flag -o $output$reload_objs'
fi
;;
esac
])# AC_PROG_LD_RELOAD_FLAG ])# AC_PROG_LD_RELOAD_FLAG
...@@ -2078,40 +2205,36 @@ beos*) ...@@ -2078,40 +2205,36 @@ beos*)
lt_cv_deplibs_check_method=pass_all lt_cv_deplibs_check_method=pass_all
;; ;;
bsdi4*) bsdi[[45]]*)
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_cmd='/usr/bin/file -L'
lt_cv_file_magic_test_file=/shlib/libc.so lt_cv_file_magic_test_file=/shlib/libc.so
;; ;;
cygwin* | mingw* | pw32*) cygwin*)
# win32_libid is a shell function defined in ltmain.sh # func_win32_libid is a shell function defined in ltmain.sh
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
lt_cv_file_magic_cmd='win32_libid' lt_cv_file_magic_cmd='func_win32_libid'
;;
mingw* | pw32*)
# Base MSYS/MinGW do not provide the 'file' command needed by
# func_win32_libid shell function, so use a weaker test based on 'objdump'.
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
lt_cv_file_magic_cmd='$OBJDUMP -f'
;; ;;
darwin* | rhapsody*) darwin* | rhapsody*)
# this will be overwritten by pass_all, but leave it in just in case
lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
lt_cv_file_magic_cmd='/usr/bin/file -L'
case "$host_os" in
rhapsody* | darwin1.[[012]])
lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
;;
*) # Darwin 1.3 on
lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
;;
esac
lt_cv_deplibs_check_method=pass_all lt_cv_deplibs_check_method=pass_all
;; ;;
freebsd*) freebsd* | kfreebsd*-gnu | dragonfly*)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
case $host_cpu in case $host_cpu in
i*86 ) i*86 )
# Not sure whether the presence of OpenBSD here was a mistake. # Not sure whether the presence of OpenBSD here was a mistake.
# Let's accept both of them until this is cleared up. # Let's accept both of them until this is cleared up.
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
;; ;;
...@@ -2144,36 +2267,18 @@ hpux10.20* | hpux11*) ...@@ -2144,36 +2267,18 @@ hpux10.20* | hpux11*)
;; ;;
irix5* | irix6* | nonstopux*) irix5* | irix6* | nonstopux*)
case $host_os in case $LD in
irix5* | nonstopux*) *-32|*"-32 ") libmagic=32-bit;;
# this will be overridden with pass_all, but let us keep it just in case *-n32|*"-n32 ") libmagic=N32;;
lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" *-64|*"-64 ") libmagic=64-bit;;
;; *) libmagic=never-match;;
*)
case $LD in
*-32|*"-32 ") libmagic=32-bit;;
*-n32|*"-n32 ") libmagic=N32;;
*-64|*"-64 ") libmagic=64-bit;;
*) libmagic=never-match;;
esac
# this will be overridden with pass_all, but let us keep it just in case
lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
;;
esac esac
lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
lt_cv_deplibs_check_method=pass_all lt_cv_deplibs_check_method=pass_all
;; ;;
# This must be Linux ELF. # This must be Linux ELF.
linux*) linux*)
case $host_cpu in lt_cv_deplibs_check_method=pass_all
alpha* | hppa* | i*86 | ia64* | m68* | mips | mipsel | powerpc* | sparc* | s390* | sh*)
lt_cv_deplibs_check_method=pass_all ;;
*)
# glibc up to 2.1.1 does not perform some relocations on ARM
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
esac
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
;; ;;
netbsd*) netbsd*)
...@@ -2190,24 +2295,19 @@ newos6*) ...@@ -2190,24 +2295,19 @@ newos6*)
lt_cv_file_magic_test_file=/usr/lib/libnls.so lt_cv_file_magic_test_file=/usr/lib/libnls.so
;; ;;
nto-qnx) nto-qnx*)
lt_cv_deplibs_check_method=unknown lt_cv_deplibs_check_method=unknown
;; ;;
openbsd*) openbsd*)
lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object' lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
else else
lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
fi fi
;; ;;
osf3* | osf4* | osf5*) osf3* | osf4* | osf5*)
# this will be overridden with pass_all, but let us keep it just in case
lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
lt_cv_file_magic_test_file=/shlib/libc.so
lt_cv_deplibs_check_method=pass_all lt_cv_deplibs_check_method=pass_all
;; ;;
...@@ -2217,7 +2317,6 @@ sco3.2v5*) ...@@ -2217,7 +2317,6 @@ sco3.2v5*)
solaris*) solaris*)
lt_cv_deplibs_check_method=pass_all lt_cv_deplibs_check_method=pass_all
lt_cv_file_magic_test_file=/lib/libc.so
;; ;;
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
...@@ -2257,7 +2356,7 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown ...@@ -2257,7 +2356,7 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
# AC_PROG_NM # AC_PROG_NM
# ---------- # ----------
# find the path to a BSD-compatible name lister # find the pathname to a BSD-compatible name lister
AC_DEFUN([AC_PROG_NM], AC_DEFUN([AC_PROG_NM],
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
[if test -n "$NM"; then [if test -n "$NM"; then
...@@ -2394,10 +2493,21 @@ AC_DEFUN([AC_LIBTOOL_CXX], ...@@ -2394,10 +2493,21 @@ AC_DEFUN([AC_LIBTOOL_CXX],
# --------------- # ---------------
AC_DEFUN([_LT_AC_LANG_CXX], AC_DEFUN([_LT_AC_LANG_CXX],
[AC_REQUIRE([AC_PROG_CXX]) [AC_REQUIRE([AC_PROG_CXX])
AC_REQUIRE([AC_PROG_CXXCPP]) AC_REQUIRE([_LT_AC_PROG_CXXCPP])
_LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,CXX" | sed 's/^,//'`]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
])# _LT_AC_LANG_CXX ])# _LT_AC_LANG_CXX
# _LT_AC_PROG_CXXCPP
# ---------------
AC_DEFUN([_LT_AC_PROG_CXXCPP],
[
AC_REQUIRE([AC_PROG_CXX])
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
(test "X$CXX" != "Xg++"))) ; then
AC_PROG_CXXCPP
fi
])# _LT_AC_PROG_CXXCPP
# AC_LIBTOOL_F77 # AC_LIBTOOL_F77
# -------------- # --------------
...@@ -2411,7 +2521,7 @@ AC_DEFUN([AC_LIBTOOL_F77], ...@@ -2411,7 +2521,7 @@ AC_DEFUN([AC_LIBTOOL_F77],
# --------------- # ---------------
AC_DEFUN([_LT_AC_LANG_F77], AC_DEFUN([_LT_AC_LANG_F77],
[AC_REQUIRE([AC_PROG_F77]) [AC_REQUIRE([AC_PROG_F77])
_LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,F77" | sed 's/^,//'`]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
])# _LT_AC_LANG_F77 ])# _LT_AC_LANG_F77
...@@ -2432,7 +2542,7 @@ AC_DEFUN([_LT_AC_LANG_GCJ], ...@@ -2432,7 +2542,7 @@ AC_DEFUN([_LT_AC_LANG_GCJ],
[ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
[ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
[AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
_LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,GCJ" | sed 's/^,//'`]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
])# _LT_AC_LANG_GCJ ])# _LT_AC_LANG_GCJ
...@@ -2441,7 +2551,7 @@ _LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,GCJ" | sed 's/^,//'`]) ...@@ -2441,7 +2551,7 @@ _LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,GCJ" | sed 's/^,//'`])
# enable support for Windows resource files # enable support for Windows resource files
AC_DEFUN([AC_LIBTOOL_RC], AC_DEFUN([AC_LIBTOOL_RC],
[AC_REQUIRE([LT_AC_PROG_RC]) [AC_REQUIRE([LT_AC_PROG_RC])
_LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,RC" | sed 's/^,//'`]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
])# AC_LIBTOOL_RC ])# AC_LIBTOOL_RC
...@@ -2470,6 +2580,10 @@ lt_simple_link_test_code='int main(){return(0);}\n' ...@@ -2470,6 +2580,10 @@ lt_simple_link_test_code='int main(){return(0);}\n'
_LT_AC_SYS_COMPILER _LT_AC_SYS_COMPILER
# save warnings/boilerplate of simple test code
_LT_COMPILER_BOILERPLATE
_LT_LINKER_BOILERPLATE
# #
# Check for any special shared library compilation flags. # Check for any special shared library compilation flags.
# #
...@@ -2483,7 +2597,7 @@ if test "$GCC" = no; then ...@@ -2483,7 +2597,7 @@ if test "$GCC" = no; then
fi fi
if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries]) AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[ ]]" >/dev/null; then : if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then :
else else
AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure]) AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
_LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
...@@ -2510,9 +2624,9 @@ AC_LIBTOOL_PROG_COMPILER_PIC($1) ...@@ -2510,9 +2624,9 @@ AC_LIBTOOL_PROG_COMPILER_PIC($1)
AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_PROG_CC_C_O($1)
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1)
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
AC_LIBTOOL_SYS_LIB_STRIP AC_LIBTOOL_SYS_LIB_STRIP
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
AC_LIBTOOL_DLOPEN_SELF($1) AC_LIBTOOL_DLOPEN_SELF($1)
# Report which librarie types wil actually be built # Report which librarie types wil actually be built
...@@ -2533,39 +2647,11 @@ aix3*) ...@@ -2533,39 +2647,11 @@ aix3*)
fi fi
;; ;;
aix4*) aix4* | aix5*)
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
test "$enable_shared" = yes && enable_static=no test "$enable_shared" = yes && enable_static=no
fi fi
;; ;;
darwin* | rhapsody*)
if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
case "$host_os" in
rhapsody* | darwin1.[[012]])
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
;;
*) # Darwin 1.3 on
test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
;;
esac
# FIXME: Relying on posixy $() will cause problems for
# cross-compilation, but unfortunately the echo tests do not
# yet detect zsh echo's removal of \ escapes. Also zsh mangles
# `"' quotes if we put them in here... so don't!
output_verbose_link_cmd='echo'
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
_LT_AC_TAGVAR(module_cmds, $1)='$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags'
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
_LT_AC_TAGVAR(hardcode_direct, $1)=no
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
fi
;;
esac esac
AC_MSG_RESULT([$enable_shared]) AC_MSG_RESULT([$enable_shared])
...@@ -2590,7 +2676,7 @@ AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) ...@@ -2590,7 +2676,7 @@ AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
[AC_LANG_PUSH(C++) [AC_LANG_PUSH(C++)
AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([AC_PROG_CXX])
AC_REQUIRE([AC_PROG_CXXCPP]) AC_REQUIRE([_LT_AC_PROG_CXXCPP])
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
_LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(allow_undefined_flag, $1)=
...@@ -2634,6 +2720,10 @@ lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' ...@@ -2634,6 +2720,10 @@ lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
# ltmain only uses $CC for tagged configurations so make sure $CC is set. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
_LT_AC_SYS_COMPILER _LT_AC_SYS_COMPILER
# save warnings/boilerplate of simple test code
_LT_COMPILER_BOILERPLATE
_LT_LINKER_BOILERPLATE
# Allow CC to be a program name with arguments. # Allow CC to be a program name with arguments.
lt_save_CC=$CC lt_save_CC=$CC
lt_save_LD=$LD lt_save_LD=$LD
...@@ -2655,7 +2745,7 @@ test -z "${LDCXX+set}" || LD=$LDCXX ...@@ -2655,7 +2745,7 @@ test -z "${LDCXX+set}" || LD=$LDCXX
CC=${CXX-"c++"} CC=${CXX-"c++"}
compiler=$CC compiler=$CC
_LT_AC_TAGVAR(compiler, $1)=$CC _LT_AC_TAGVAR(compiler, $1)=$CC
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` _LT_CC_BASENAME([$compiler])
# We don't want -fno-exception wen compiling C++ code, so set the # We don't want -fno-exception wen compiling C++ code, so set the
# no_builtin_flag separately # no_builtin_flag separately
...@@ -2700,7 +2790,7 @@ if test "$GXX" = yes; then ...@@ -2700,7 +2790,7 @@ if test "$GXX" = yes; then
# linker, instead of GNU ld. If possible, this setting should # linker, instead of GNU ld. If possible, this setting should
# overridden to take advantage of the native linker features on # overridden to take advantage of the native linker features on
# the platform it is being used on. # the platform it is being used on.
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
fi fi
# Commands to make compiler produce verbose output that lists # Commands to make compiler produce verbose output that lists
...@@ -2762,7 +2852,7 @@ case $host_os in ...@@ -2762,7 +2852,7 @@ case $host_os in
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
if test "$GXX" = yes; then if test "$GXX" = yes; then
case $host_os in aix4.[012]|aix4.[012].*) case $host_os in aix4.[[012]]|aix4.[[012]].*)
# We only want to do this on AIX 4.2 and lower, the check # We only want to do this on AIX 4.2 and lower, the check
# below for broken collect2 doesn't work under 4.3+ # below for broken collect2 doesn't work under 4.3+
collect2name=`${CC} -print-prog-name=collect2` collect2name=`${CC} -print-prog-name=collect2`
...@@ -2783,6 +2873,9 @@ case $host_os in ...@@ -2783,6 +2873,9 @@ case $host_os in
fi fi
esac esac
shared_flag='-shared' shared_flag='-shared'
if test "$aix_use_runtimelinking" = yes; then
shared_flag="$shared_flag "'${wl}-G'
fi
else else
# not using gcc # not using gcc
if test "$host_cpu" = ia64; then if test "$host_cpu" = ia64; then
...@@ -2842,6 +2935,7 @@ case $host_os in ...@@ -2842,6 +2935,7 @@ case $host_os in
esac esac
;; ;;
cygwin* | mingw* | pw32*) cygwin* | mingw* | pw32*)
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
# as there is no search path for DLLs. # as there is no search path for DLLs.
...@@ -2865,52 +2959,76 @@ case $host_os in ...@@ -2865,52 +2959,76 @@ case $host_os in
_LT_AC_TAGVAR(ld_shlibs, $1)=no _LT_AC_TAGVAR(ld_shlibs, $1)=no
fi fi
;; ;;
darwin* | rhapsody*)
case "$host_os" in
rhapsody* | darwin1.[[012]])
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
;;
*) # Darwin 1.3 on
if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
else
case ${MACOSX_DEPLOYMENT_TARGET} in
10.[[012]])
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
;;
10.*)
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
;;
esac
fi
;;
esac
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
_LT_AC_TAGVAR(hardcode_direct, $1)=no
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
darwin* | rhapsody*) if test "$GXX" = yes ; then
if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then lt_int_apple_cc_single_mod=no
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no output_verbose_link_cmd='echo'
case "$host_os" in if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
rhapsody* | darwin1.[[012]]) lt_int_apple_cc_single_mod=yes
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
;;
*) # Darwin 1.3 on
test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
;;
esac
lt_int_apple_cc_single_mod=no
output_verbose_link_cmd='echo'
if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
lt_int_apple_cc_single_mod=yes
fi
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
else
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
fi fi
_LT_AC_TAGVAR(module_cmds, $1)='$CC -bundle ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags'
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
else
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
fi
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
else
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
fi
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
else else
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' case $cc_basename in
xlc*)
output_verbose_link_cmd='echo'
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
;;
*)
_LT_AC_TAGVAR(ld_shlibs, $1)=no
;;
esac
fi fi
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;;
_LT_AC_TAGVAR(hardcode_direct, $1)=no
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
fi
;;
dgux*) dgux*)
case $cc_basename in case $cc_basename in
ec++) ec++*)
# FIXME: insert proper C++ library support # FIXME: insert proper C++ library support
_LT_AC_TAGVAR(ld_shlibs, $1)=no _LT_AC_TAGVAR(ld_shlibs, $1)=no
;; ;;
ghcx) ghcx*)
# Green Hills C++ Compiler # Green Hills C++ Compiler
# FIXME: insert proper C++ library support # FIXME: insert proper C++ library support
_LT_AC_TAGVAR(ld_shlibs, $1)=no _LT_AC_TAGVAR(ld_shlibs, $1)=no
...@@ -2921,14 +3039,14 @@ case $host_os in ...@@ -2921,14 +3039,14 @@ case $host_os in
;; ;;
esac esac
;; ;;
freebsd[12]*) freebsd[[12]]*)
# C++ shared libraries reported to be fairly broken before switch to ELF # C++ shared libraries reported to be fairly broken before switch to ELF
_LT_AC_TAGVAR(ld_shlibs, $1)=no _LT_AC_TAGVAR(ld_shlibs, $1)=no
;; ;;
freebsd-elf*) freebsd-elf*)
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
;; ;;
freebsd*) freebsd* | kfreebsd*-gnu | dragonfly*)
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
# conventions # conventions
_LT_AC_TAGVAR(ld_shlibs, $1)=yes _LT_AC_TAGVAR(ld_shlibs, $1)=yes
...@@ -2945,11 +3063,11 @@ case $host_os in ...@@ -2945,11 +3063,11 @@ case $host_os in
# location of the library. # location of the library.
case $cc_basename in case $cc_basename in
CC) CC*)
# FIXME: insert proper C++ library support # FIXME: insert proper C++ library support
_LT_AC_TAGVAR(ld_shlibs, $1)=no _LT_AC_TAGVAR(ld_shlibs, $1)=no
;; ;;
aCC) aCC*)
_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
# Commands to make compiler produce verbose output that lists # Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when # what "hidden" libraries, object files and flags are used when
...@@ -2959,7 +3077,7 @@ case $host_os in ...@@ -2959,7 +3077,7 @@ case $host_os in
# explicitly linking system object files so we need to strip them # explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library # from the output so that they don't get included in the library
# dependencies. # dependencies.
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
;; ;;
*) *)
if test "$GXX" = yes; then if test "$GXX" = yes; then
...@@ -3010,11 +3128,11 @@ case $host_os in ...@@ -3010,11 +3128,11 @@ case $host_os in
esac esac
case $cc_basename in case $cc_basename in
CC) CC*)
# FIXME: insert proper C++ library support # FIXME: insert proper C++ library support
_LT_AC_TAGVAR(ld_shlibs, $1)=no _LT_AC_TAGVAR(ld_shlibs, $1)=no
;; ;;
aCC) aCC*)
case "$host_cpu" in case "$host_cpu" in
hppa*64*|ia64*) hppa*64*|ia64*)
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
...@@ -3054,9 +3172,9 @@ case $host_os in ...@@ -3054,9 +3172,9 @@ case $host_os in
;; ;;
irix5* | irix6*) irix5* | irix6*)
case $cc_basename in case $cc_basename in
CC) CC*)
# SGI C++ # SGI C++
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
# Archives containing C++ object files must be created using # Archives containing C++ object files must be created using
# "CC -ar", where "CC" is the IRIX C++ compiler. This is # "CC -ar", where "CC" is the IRIX C++ compiler. This is
...@@ -3067,7 +3185,7 @@ case $host_os in ...@@ -3067,7 +3185,7 @@ case $host_os in
*) *)
if test "$GXX" = yes; then if test "$GXX" = yes; then
if test "$with_gnu_ld" = no; then if test "$with_gnu_ld" = no; then
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
else else
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
fi fi
...@@ -3080,7 +3198,7 @@ case $host_os in ...@@ -3080,7 +3198,7 @@ case $host_os in
;; ;;
linux*) linux*)
case $cc_basename in case $cc_basename in
KCC) KCC*)
# Kuck and Associates, Inc. (KAI) C++ Compiler # Kuck and Associates, Inc. (KAI) C++ Compiler
# KCC will only create a shared library if the output file # KCC will only create a shared library if the output file
...@@ -3105,17 +3223,41 @@ case $host_os in ...@@ -3105,17 +3223,41 @@ case $host_os in
# "CC -Bstatic", where "CC" is the KAI C++ compiler. # "CC -Bstatic", where "CC" is the KAI C++ compiler.
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
;; ;;
icpc) icpc*)
# Intel C++ # Intel C++
with_gnu_ld=yes with_gnu_ld=yes
# version 8.0 and above of icpc choke on multiply defined symbols
# if we add $predep_objects and $postdep_objects, however 7.1 and
# earlier do not add the objects themselves.
case `$CC -V 2>&1` in
*"Version 7."*)
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
;;
*) # Version 8.0 or newer
tmp_idyn=
case $host_cpu in
ia64*) tmp_idyn=' -i_dynamic';;
esac
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
;;
esac
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
;; ;;
cxx) pgCC*)
# Portland Group C++ compiler
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
;;
cxx*)
# Compaq C++ # Compaq C++
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
...@@ -3146,7 +3288,7 @@ case $host_os in ...@@ -3146,7 +3288,7 @@ case $host_os in
;; ;;
mvs*) mvs*)
case $cc_basename in case $cc_basename in
cxx) cxx*)
# FIXME: insert proper C++ library support # FIXME: insert proper C++ library support
_LT_AC_TAGVAR(ld_shlibs, $1)=no _LT_AC_TAGVAR(ld_shlibs, $1)=no
;; ;;
...@@ -3167,9 +3309,25 @@ case $host_os in ...@@ -3167,9 +3309,25 @@ case $host_os in
# Workaround some broken pre-1.5 toolchains # Workaround some broken pre-1.5 toolchains
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
;; ;;
openbsd2*)
# C++ shared libraries are fairly broken
_LT_AC_TAGVAR(ld_shlibs, $1)=no
;;
openbsd*)
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
fi
output_verbose_link_cmd='echo'
;;
osf3*) osf3*)
case $cc_basename in case $cc_basename in
KCC) KCC*)
# Kuck and Associates, Inc. (KAI) C++ Compiler # Kuck and Associates, Inc. (KAI) C++ Compiler
# KCC will only create a shared library if the output file # KCC will only create a shared library if the output file
...@@ -3185,14 +3343,14 @@ case $host_os in ...@@ -3185,14 +3343,14 @@ case $host_os in
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
;; ;;
RCC) RCC*)
# Rational C++ 2.4.1 # Rational C++ 2.4.1
# FIXME: insert proper C++ library support # FIXME: insert proper C++ library support
_LT_AC_TAGVAR(ld_shlibs, $1)=no _LT_AC_TAGVAR(ld_shlibs, $1)=no
;; ;;
cxx) cxx*)
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
...@@ -3210,7 +3368,7 @@ case $host_os in ...@@ -3210,7 +3368,7 @@ case $host_os in
*) *)
if test "$GXX" = yes && test "$with_gnu_ld" = no; then if test "$GXX" = yes && test "$with_gnu_ld" = no; then
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
...@@ -3229,7 +3387,7 @@ case $host_os in ...@@ -3229,7 +3387,7 @@ case $host_os in
;; ;;
osf4* | osf5*) osf4* | osf5*)
case $cc_basename in case $cc_basename in
KCC) KCC*)
# Kuck and Associates, Inc. (KAI) C++ Compiler # Kuck and Associates, Inc. (KAI) C++ Compiler
# KCC will only create a shared library if the output file # KCC will only create a shared library if the output file
...@@ -3244,17 +3402,17 @@ case $host_os in ...@@ -3244,17 +3402,17 @@ case $host_os in
# the KAI C++ compiler. # the KAI C++ compiler.
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
;; ;;
RCC) RCC*)
# Rational C++ 2.4.1 # Rational C++ 2.4.1
# FIXME: insert proper C++ library support # FIXME: insert proper C++ library support
_LT_AC_TAGVAR(ld_shlibs, $1)=no _LT_AC_TAGVAR(ld_shlibs, $1)=no
;; ;;
cxx) cxx*)
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
echo "-hidden">> $lib.exp~ echo "-hidden">> $lib.exp~
$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~
$rm $lib.exp' $rm $lib.exp'
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
...@@ -3273,7 +3431,7 @@ case $host_os in ...@@ -3273,7 +3431,7 @@ case $host_os in
*) *)
if test "$GXX" = yes && test "$with_gnu_ld" = no; then if test "$GXX" = yes && test "$with_gnu_ld" = no; then
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
...@@ -3297,7 +3455,7 @@ case $host_os in ...@@ -3297,7 +3455,7 @@ case $host_os in
sco*) sco*)
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
case $cc_basename in case $cc_basename in
CC) CC*)
# FIXME: insert proper C++ library support # FIXME: insert proper C++ library support
_LT_AC_TAGVAR(ld_shlibs, $1)=no _LT_AC_TAGVAR(ld_shlibs, $1)=no
;; ;;
...@@ -3309,12 +3467,12 @@ case $host_os in ...@@ -3309,12 +3467,12 @@ case $host_os in
;; ;;
sunos4*) sunos4*)
case $cc_basename in case $cc_basename in
CC) CC*)
# Sun C++ 4.x # Sun C++ 4.x
# FIXME: insert proper C++ library support # FIXME: insert proper C++ library support
_LT_AC_TAGVAR(ld_shlibs, $1)=no _LT_AC_TAGVAR(ld_shlibs, $1)=no
;; ;;
lcc) lcc*)
# Lucid # Lucid
# FIXME: insert proper C++ library support # FIXME: insert proper C++ library support
_LT_AC_TAGVAR(ld_shlibs, $1)=no _LT_AC_TAGVAR(ld_shlibs, $1)=no
...@@ -3327,7 +3485,7 @@ case $host_os in ...@@ -3327,7 +3485,7 @@ case $host_os in
;; ;;
solaris*) solaris*)
case $cc_basename in case $cc_basename in
CC) CC*)
# Sun C++ 4.2, 5.x and Centerline C++ # Sun C++ 4.2, 5.x and Centerline C++
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
...@@ -3337,13 +3495,17 @@ case $host_os in ...@@ -3337,13 +3495,17 @@ case $host_os in
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
case $host_os in case $host_os in
solaris2.[0-5] | solaris2.[0-5].*) ;; solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
*) *)
# The C++ compiler is used as linker so we must use $wl # The C++ compiler is used as linker so we must use $wl
# flag to pass the commands to the underlying system # flag to pass the commands to the underlying system
# linker. # linker. We must also pass each convience library through
# to the system linker between allextract/defaultextract.
# The C++ compiler will combine linker options so we
# cannot just pass the convience library names through
# without $wl.
# Supported since Solaris 2.6 (maybe 2.5.1?) # Supported since Solaris 2.6 (maybe 2.5.1?)
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
;; ;;
esac esac
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
...@@ -3364,7 +3526,7 @@ case $host_os in ...@@ -3364,7 +3526,7 @@ case $host_os in
# in the archive. # in the archive.
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
;; ;;
gcx) gcx*)
# Green Hills C++ Compiler # Green Hills C++ Compiler
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
...@@ -3407,7 +3569,7 @@ case $host_os in ...@@ -3407,7 +3569,7 @@ case $host_os in
;; ;;
tandem*) tandem*)
case $cc_basename in case $cc_basename in
NCC) NCC*)
# NonStop-UX NCC 3.20 # NonStop-UX NCC 3.20
# FIXME: insert proper C++ library support # FIXME: insert proper C++ library support
_LT_AC_TAGVAR(ld_shlibs, $1)=no _LT_AC_TAGVAR(ld_shlibs, $1)=no
...@@ -3442,9 +3604,9 @@ AC_LIBTOOL_PROG_COMPILER_PIC($1) ...@@ -3442,9 +3604,9 @@ AC_LIBTOOL_PROG_COMPILER_PIC($1)
AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_PROG_CC_C_O($1)
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1)
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
AC_LIBTOOL_SYS_LIB_STRIP AC_LIBTOOL_SYS_LIB_STRIP
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
AC_LIBTOOL_DLOPEN_SELF($1) AC_LIBTOOL_DLOPEN_SELF($1)
AC_LIBTOOL_CONFIG($1) AC_LIBTOOL_CONFIG($1)
...@@ -3643,12 +3805,16 @@ lt_simple_link_test_code=" program t\n end\n" ...@@ -3643,12 +3805,16 @@ lt_simple_link_test_code=" program t\n end\n"
# ltmain only uses $CC for tagged configurations so make sure $CC is set. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
_LT_AC_SYS_COMPILER _LT_AC_SYS_COMPILER
# save warnings/boilerplate of simple test code
_LT_COMPILER_BOILERPLATE
_LT_LINKER_BOILERPLATE
# Allow CC to be a program name with arguments. # Allow CC to be a program name with arguments.
lt_save_CC="$CC" lt_save_CC="$CC"
CC=${F77-"f77"} CC=${F77-"f77"}
compiler=$CC compiler=$CC
_LT_AC_TAGVAR(compiler, $1)=$CC _LT_AC_TAGVAR(compiler, $1)=$CC
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` _LT_CC_BASENAME([$compiler])
AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_CHECKING([if libtool supports shared libraries])
AC_MSG_RESULT([$can_build_shared]) AC_MSG_RESULT([$can_build_shared])
...@@ -3666,8 +3832,10 @@ aix3*) ...@@ -3666,8 +3832,10 @@ aix3*)
postinstall_cmds='$RANLIB $lib' postinstall_cmds='$RANLIB $lib'
fi fi
;; ;;
aix4*) aix4* | aix5*)
test "$enable_shared" = yes && enable_static=no if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
test "$enable_shared" = yes && enable_static=no
fi
;; ;;
esac esac
AC_MSG_RESULT([$enable_shared]) AC_MSG_RESULT([$enable_shared])
...@@ -3686,9 +3854,10 @@ AC_LIBTOOL_PROG_COMPILER_PIC($1) ...@@ -3686,9 +3854,10 @@ AC_LIBTOOL_PROG_COMPILER_PIC($1)
AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_PROG_CC_C_O($1)
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1)
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
AC_LIBTOOL_SYS_LIB_STRIP AC_LIBTOOL_SYS_LIB_STRIP
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
AC_LIBTOOL_CONFIG($1) AC_LIBTOOL_CONFIG($1)
...@@ -3717,20 +3886,27 @@ _LT_AC_TAGVAR(objext, $1)=$objext ...@@ -3717,20 +3886,27 @@ _LT_AC_TAGVAR(objext, $1)=$objext
lt_simple_compile_test_code="class foo {}\n" lt_simple_compile_test_code="class foo {}\n"
# Code to be used in simple link tests # Code to be used in simple link tests
lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n' lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
# ltmain only uses $CC for tagged configurations so make sure $CC is set. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
_LT_AC_SYS_COMPILER _LT_AC_SYS_COMPILER
# save warnings/boilerplate of simple test code
_LT_COMPILER_BOILERPLATE
_LT_LINKER_BOILERPLATE
# Allow CC to be a program name with arguments. # Allow CC to be a program name with arguments.
lt_save_CC="$CC" lt_save_CC="$CC"
CC=${GCJ-"gcj"} CC=${GCJ-"gcj"}
compiler=$CC compiler=$CC
_LT_AC_TAGVAR(compiler, $1)=$CC _LT_AC_TAGVAR(compiler, $1)=$CC
_LT_CC_BASENAME([$compiler])
# GCJ did not exist at the time GCC didn't implicitly link libc in. # GCJ did not exist at the time GCC didn't implicitly link libc in.
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
## CAVEAT EMPTOR: ## CAVEAT EMPTOR:
## There is no encapsulation within the following macros, do not change ## There is no encapsulation within the following macros, do not change
## the running order or otherwise move them around unless you know exactly ## the running order or otherwise move them around unless you know exactly
...@@ -3740,9 +3916,9 @@ AC_LIBTOOL_PROG_COMPILER_PIC($1) ...@@ -3740,9 +3916,9 @@ AC_LIBTOOL_PROG_COMPILER_PIC($1)
AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_PROG_CC_C_O($1)
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1)
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
AC_LIBTOOL_SYS_LIB_STRIP AC_LIBTOOL_SYS_LIB_STRIP
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
AC_LIBTOOL_DLOPEN_SELF($1) AC_LIBTOOL_DLOPEN_SELF($1)
AC_LIBTOOL_CONFIG($1) AC_LIBTOOL_CONFIG($1)
...@@ -3777,11 +3953,16 @@ lt_simple_link_test_code="$lt_simple_compile_test_code" ...@@ -3777,11 +3953,16 @@ lt_simple_link_test_code="$lt_simple_compile_test_code"
# ltmain only uses $CC for tagged configurations so make sure $CC is set. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
_LT_AC_SYS_COMPILER _LT_AC_SYS_COMPILER
# save warnings/boilerplate of simple test code
_LT_COMPILER_BOILERPLATE
_LT_LINKER_BOILERPLATE
# Allow CC to be a program name with arguments. # Allow CC to be a program name with arguments.
lt_save_CC="$CC" lt_save_CC="$CC"
CC=${RC-"windres"} CC=${RC-"windres"}
compiler=$CC compiler=$CC
_LT_AC_TAGVAR(compiler, $1)=$CC _LT_AC_TAGVAR(compiler, $1)=$CC
_LT_CC_BASENAME([$compiler])
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
AC_LIBTOOL_CONFIG($1) AC_LIBTOOL_CONFIG($1)
...@@ -3807,11 +3988,12 @@ if test -f "$ltmain"; then ...@@ -3807,11 +3988,12 @@ if test -f "$ltmain"; then
# without removal of \ escapes. # without removal of \ escapes.
if test -n "${ZSH_VERSION+set}" ; then if test -n "${ZSH_VERSION+set}" ; then
setopt NO_GLOB_SUBST setopt NO_GLOB_SUBST
fi fi
# Now quote all the things that may contain metacharacters while being # Now quote all the things that may contain metacharacters while being
# careful not to overquote the AC_SUBSTed values. We take copies of the # careful not to overquote the AC_SUBSTed values. We take copies of the
# variables and quote the copies for generation of the libtool script. # variables and quote the copies for generation of the libtool script.
for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL \ for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
SED SHELL STRIP \
libname_spec library_names_spec soname_spec extract_expsyms_cmds \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \
old_striplib striplib file_magic_cmd finish_cmds finish_eval \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \
deplibs_check_method reload_flag reload_cmds need_locks \ deplibs_check_method reload_flag reload_cmds need_locks \
...@@ -3861,7 +4043,7 @@ if test -f "$ltmain"; then ...@@ -3861,7 +4043,7 @@ if test -f "$ltmain"; then
_LT_AC_TAGVAR(archive_cmds, $1) | \ _LT_AC_TAGVAR(archive_cmds, $1) | \
_LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
_LT_AC_TAGVAR(module_cmds, $1) | \ _LT_AC_TAGVAR(module_cmds, $1) | \
_LT_AC_TAGVAR(module_expsym_cmds, $1) | \ _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
_LT_AC_TAGVAR(export_symbols_cmds, $1) | \ _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
extract_expsyms_cmds | reload_cmds | finish_cmds | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \
...@@ -3916,7 +4098,7 @@ ifelse([$1], [], ...@@ -3916,7 +4098,7 @@ ifelse([$1], [],
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# #
# As a special exception to the GNU General Public License, if you # As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a # distribute this file as part of a program that contains a
...@@ -3927,11 +4109,11 @@ ifelse([$1], [], ...@@ -3927,11 +4109,11 @@ ifelse([$1], [],
SED=$lt_SED SED=$lt_SED
# Sed that helps us avoid accidentally triggering echo(1) options like -n. # Sed that helps us avoid accidentally triggering echo(1) options like -n.
Xsed="$SED -e s/^X//" Xsed="$SED -e 1s/^X//"
# The HP-UX ksh and POSIX shell print the target directory to stdout # The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set. # if CDPATH is set.
if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
# The names of the tagged configurations supported by this script. # The names of the tagged configurations supported by this script.
available_tags= available_tags=
...@@ -3962,6 +4144,12 @@ fast_install=$enable_fast_install ...@@ -3962,6 +4144,12 @@ fast_install=$enable_fast_install
# The host system. # The host system.
host_alias=$host_alias host_alias=$host_alias
host=$host host=$host
host_os=$host_os
# The build system.
build_alias=$build_alias
build=$build
build_os=$build_os
# An echo program that does not interpret backslashes. # An echo program that does not interpret backslashes.
echo=$lt_echo echo=$lt_echo
...@@ -3992,7 +4180,7 @@ LN_S=$lt_LN_S ...@@ -3992,7 +4180,7 @@ LN_S=$lt_LN_S
NM=$lt_NM NM=$lt_NM
# A symbol stripping program # A symbol stripping program
STRIP=$STRIP STRIP=$lt_STRIP
# Used to examine libraries when file_magic_cmd begins "file" # Used to examine libraries when file_magic_cmd begins "file"
MAGIC_CMD=$MAGIC_CMD MAGIC_CMD=$MAGIC_CMD
...@@ -4023,7 +4211,7 @@ objext="$ac_objext" ...@@ -4023,7 +4211,7 @@ objext="$ac_objext"
libext="$libext" libext="$libext"
# Shared library suffix (normally ".so"). # Shared library suffix (normally ".so").
shrext='$shrext' shrext_cmds='$shrext_cmds'
# Executable file suffix (normally ""). # Executable file suffix (normally "").
exeext="$exeext" exeext="$exeext"
...@@ -4038,7 +4226,7 @@ max_cmd_len=$lt_cv_sys_max_cmd_len ...@@ -4038,7 +4226,7 @@ max_cmd_len=$lt_cv_sys_max_cmd_len
# Does compiler simultaneously support -c and -o options? # Does compiler simultaneously support -c and -o options?
compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
# Must we lock files when doing compilation ? # Must we lock files when doing compilation?
need_locks=$lt_need_locks need_locks=$lt_need_locks
# Do we need the lib prefix for modules? # Do we need the lib prefix for modules?
...@@ -4267,7 +4455,10 @@ else ...@@ -4267,7 +4455,10 @@ else
# If there is no Makefile yet, we rely on a make rule to execute # If there is no Makefile yet, we rely on a make rule to execute
# `config.status --recheck' to rerun these tests and create the # `config.status --recheck' to rerun these tests and create the
# libtool script then. # libtool script then.
test -f Makefile && make "$ltmain" ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
if test -f "$ltmain_in"; then
test -f Makefile && make "$ltmain"
fi
fi fi
])# AC_LIBTOOL_CONFIG ])# AC_LIBTOOL_CONFIG
...@@ -4309,9 +4500,6 @@ symcode='[[BCDEGRST]]' ...@@ -4309,9 +4500,6 @@ symcode='[[BCDEGRST]]'
# Regexp to match symbols that can be accessed directly from C. # Regexp to match symbols that can be accessed directly from C.
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
# Transform the above into a raw symbol and a C symbol.
symxfrm='\1 \2\3 \3'
# Transform an extracted symbol line into a proper C declaration # Transform an extracted symbol line into a proper C declaration
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
...@@ -4333,6 +4521,13 @@ hpux*) # Its linker distinguishes data from code symbols ...@@ -4333,6 +4521,13 @@ hpux*) # Its linker distinguishes data from code symbols
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
;; ;;
linux*)
if test "$host_cpu" = ia64; then
symcode='[[ABCDGIRSTW]]'
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
fi
;;
irix* | nonstopux*) irix* | nonstopux*)
symcode='[[BCDEGRST]]' symcode='[[BCDEGRST]]'
;; ;;
...@@ -4340,7 +4535,7 @@ osf*) ...@@ -4340,7 +4535,7 @@ osf*)
symcode='[[BCDEGQRST]]' symcode='[[BCDEGQRST]]'
;; ;;
solaris* | sysv5*) solaris* | sysv5*)
symcode='[[BDT]]' symcode='[[BDRT]]'
;; ;;
sysv4) sysv4)
symcode='[[DFNSTU]]' symcode='[[DFNSTU]]'
...@@ -4358,14 +4553,17 @@ esac ...@@ -4358,14 +4553,17 @@ esac
# If we're using GNU nm, then use its standard symbol codes. # If we're using GNU nm, then use its standard symbol codes.
case `$NM -V 2>&1` in case `$NM -V 2>&1` in
*GNU* | *'with BFD'*) *GNU* | *'with BFD'*)
symcode='[[ABCDGISTW]]' ;; symcode='[[ABCDGIRSTW]]' ;;
esac esac
# Try without a prefix undercore, then with it. # Try without a prefix undercore, then with it.
for ac_symprfx in "" "_"; do for ac_symprfx in "" "_"; do
# Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
symxfrm="\\1 $ac_symprfx\\2 \\2"
# Write the raw and C identifiers. # Write the raw and C identifiers.
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
# Check to see that the pipe works correctly. # Check to see that the pipe works correctly.
pipe_works=no pipe_works=no
...@@ -4554,18 +4752,28 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ...@@ -4554,18 +4752,28 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
;; ;;
chorus*) chorus*)
case $cc_basename in case $cc_basename in
cxch68) cxch68*)
# Green Hills C++ Compiler # Green Hills C++ Compiler
# _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
;; ;;
esac esac
;; ;;
darwin*)
# PIC is the default on this platform
# Common symbols not allowed in MH_DYLIB files
case $cc_basename in
xlc*)
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
;;
esac
;;
dgux*) dgux*)
case $cc_basename in case $cc_basename in
ec++) ec++*)
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
;; ;;
ghcx) ghcx*)
# Green Hills C++ Compiler # Green Hills C++ Compiler
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
;; ;;
...@@ -4573,19 +4781,19 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ...@@ -4573,19 +4781,19 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
;; ;;
esac esac
;; ;;
freebsd*) freebsd* | kfreebsd*-gnu | dragonfly*)
# FreeBSD uses GNU C++ # FreeBSD uses GNU C++
;; ;;
hpux9* | hpux10* | hpux11*) hpux9* | hpux10* | hpux11*)
case $cc_basename in case $cc_basename in
CC) CC*)
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
if test "$host_cpu" != ia64; then if test "$host_cpu" != ia64; then
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
fi fi
;; ;;
aCC) aCC*)
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
case "$host_cpu" in case "$host_cpu" in
...@@ -4603,7 +4811,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ...@@ -4603,7 +4811,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
;; ;;
irix5* | irix6* | nonstopux*) irix5* | irix6* | nonstopux*)
case $cc_basename in case $cc_basename in
CC) CC*)
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
# CC pic flag -KPIC is the default. # CC pic flag -KPIC is the default.
...@@ -4614,18 +4822,24 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ...@@ -4614,18 +4822,24 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
;; ;;
linux*) linux*)
case $cc_basename in case $cc_basename in
KCC) KCC*)
# KAI C++ Compiler # KAI C++ Compiler
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
;; ;;
icpc) icpc* | ecpc*)
# Intel C++ # Intel C++
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
;; ;;
cxx) pgCC*)
# Portland Group C++ compiler.
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
;;
cxx*)
# Compaq C++ # Compaq C++
# Make sure the PIC flag is empty. It appears that all Alpha # Make sure the PIC flag is empty. It appears that all Alpha
# Linux and Compaq Tru64 Unix objects are PIC. # Linux and Compaq Tru64 Unix objects are PIC.
...@@ -4642,8 +4856,8 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ...@@ -4642,8 +4856,8 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
;; ;;
mvs*) mvs*)
case $cc_basename in case $cc_basename in
cxx) cxx*)
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Wextra c,exportall' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
;; ;;
*) *)
;; ;;
...@@ -4653,14 +4867,14 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ...@@ -4653,14 +4867,14 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
;; ;;
osf3* | osf4* | osf5*) osf3* | osf4* | osf5*)
case $cc_basename in case $cc_basename in
KCC) KCC*)
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
;; ;;
RCC) RCC*)
# Rational C++ 2.4.1 # Rational C++ 2.4.1
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
;; ;;
cxx) cxx*)
# Digital/Compaq C++ # Digital/Compaq C++
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
# Make sure the PIC flag is empty. It appears that all Alpha # Make sure the PIC flag is empty. It appears that all Alpha
...@@ -4676,7 +4890,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ...@@ -4676,7 +4890,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
;; ;;
sco*) sco*)
case $cc_basename in case $cc_basename in
CC) CC*)
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
;; ;;
*) *)
...@@ -4685,13 +4899,13 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ...@@ -4685,13 +4899,13 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
;; ;;
solaris*) solaris*)
case $cc_basename in case $cc_basename in
CC) CC*)
# Sun C++ 4.2, 5.x and Centerline C++ # Sun C++ 4.2, 5.x and Centerline C++
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
;; ;;
gcx) gcx*)
# Green Hills C++ Compiler # Green Hills C++ Compiler
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
;; ;;
...@@ -4701,12 +4915,12 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ...@@ -4701,12 +4915,12 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
;; ;;
sunos4*) sunos4*)
case $cc_basename in case $cc_basename in
CC) CC*)
# Sun C++ 4.x # Sun C++ 4.x
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
;; ;;
lcc) lcc*)
# Lucid # Lucid
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
;; ;;
...@@ -4716,7 +4930,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ...@@ -4716,7 +4930,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
;; ;;
tandem*) tandem*)
case $cc_basename in case $cc_basename in
NCC) NCC*)
# NonStop-UX NCC 3.20 # NonStop-UX NCC 3.20
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
;; ;;
...@@ -4813,6 +5027,16 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ...@@ -4813,6 +5027,16 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
fi fi
;; ;;
darwin*)
# PIC is the default on this platform
# Common symbols not allowed in MH_DYLIB files
case $cc_basename in
xlc*)
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
;;
esac
;;
mingw* | pw32* | os2*) mingw* | pw32* | os2*)
# This hack is so that the source file can tell whether it is being # This hack is so that the source file can tell whether it is being
...@@ -4848,13 +5072,20 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ...@@ -4848,13 +5072,20 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
;; ;;
linux*) linux*)
case $CC in case $cc_basename in
icc|ecc) icc* | ecc*)
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
;; ;;
ccc) pgcc* | pgf77* | pgf90*)
# Portland Group compilers (*not* the Pentium gcc compiler,
# which looks to be a dead project)
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
;;
ccc*)
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
# All Alpha code is PIC. # All Alpha code is PIC.
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
...@@ -4874,9 +5105,14 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ...@@ -4874,9 +5105,14 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
;; ;;
solaris*) solaris*)
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
case $cc_basename in
f77* | f90* | f95*)
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
*)
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
esac
;; ;;
sunos4*) sunos4*)
...@@ -4898,6 +5134,11 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ...@@ -4898,6 +5134,11 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
fi fi
;; ;;
unicos*)
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
;;
uts4*) uts4*)
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
...@@ -4958,7 +5199,7 @@ ifelse([$1],[CXX],[ ...@@ -4958,7 +5199,7 @@ ifelse([$1],[CXX],[
_LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
;; ;;
cygwin* | mingw*) cygwin* | mingw*)
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
;; ;;
*) *)
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
...@@ -4984,7 +5225,7 @@ ifelse([$1],[CXX],[ ...@@ -4984,7 +5225,7 @@ ifelse([$1],[CXX],[
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
_LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=no
_LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_cmds, $1)=
_LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)=
_LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(always_export_symbols, $1)=no
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
# include_expsyms should be a list of space-separated symbols to be *always* # include_expsyms should be a list of space-separated symbols to be *always*
...@@ -5001,7 +5242,8 @@ ifelse([$1],[CXX],[ ...@@ -5001,7 +5242,8 @@ ifelse([$1],[CXX],[
# rely on this symbol name, it's probably fine to never include it in # rely on this symbol name, it's probably fine to never include it in
# preloaded symbol tables. # preloaded symbol tables.
extract_expsyms_cmds= extract_expsyms_cmds=
# Just being paranoid about ensuring that cc_basename is set.
_LT_CC_BASENAME([$compiler])
case $host_os in case $host_os in
cygwin* | mingw* | pw32*) cygwin* | mingw* | pw32*)
# FIXME: the MSVC++ port hasn't been tested in a loooong time # FIXME: the MSVC++ port hasn't been tested in a loooong time
...@@ -5020,7 +5262,28 @@ ifelse([$1],[CXX],[ ...@@ -5020,7 +5262,28 @@ ifelse([$1],[CXX],[
if test "$with_gnu_ld" = yes; then if test "$with_gnu_ld" = yes; then
# If archive_cmds runs LD, not CC, wlarc should be empty # If archive_cmds runs LD, not CC, wlarc should be empty
wlarc='${wl}' wlarc='${wl}'
# Set some defaults for GNU ld with shared library support. These
# are reset later if shared libraries are not supported. Putting them
# here allows them to be overridden if necessary.
runpath_var=LD_RUN_PATH
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
# ancient GNU ld didn't support --whole-archive et. al.
if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
else
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
fi
supports_anon_versioning=no
case `$LD -v 2>/dev/null` in
*\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
*\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
*\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
*\ 2.11.*) ;; # other 2.11 versions
*) supports_anon_versioning=yes ;;
esac
# See if GNU ld supports shared libraries. # See if GNU ld supports shared libraries.
case $host_os in case $host_os in
aix3* | aix4* | aix5*) aix3* | aix4* | aix5*)
...@@ -5071,7 +5334,7 @@ EOF ...@@ -5071,7 +5334,7 @@ EOF
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
_LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(always_export_symbols, $1)=no
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
...@@ -5085,7 +5348,37 @@ EOF ...@@ -5085,7 +5348,37 @@ EOF
fi~ fi~
$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
else else
ld_shlibs=no _LT_AC_TAGVAR(ld_shlibs, $1)=no
fi
;;
linux*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
tmp_addflag=
case $cc_basename,$host_cpu in
pgcc*) # Portland Group C compiler
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
;;
pgf77* | pgf90* ) # Portland Group f77 and f90 compilers
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
tmp_addflag=' -fpic -Mnomain' ;;
ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
tmp_addflag=' -i_dynamic' ;;
efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
tmp_addflag=' -i_dynamic -nofor_main' ;;
ifc* | ifort*) # Intel Fortran compiler
tmp_addflag=' -nofor_main' ;;
esac
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
if test $supports_anon_versioning = yes; then
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
$echo "local: *; };" >> $output_objdir/$libname.ver~
$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
fi
else
_LT_AC_TAGVAR(ld_shlibs, $1)=no
fi fi
;; ;;
...@@ -5137,16 +5430,11 @@ EOF ...@@ -5137,16 +5430,11 @@ EOF
;; ;;
esac esac
if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
runpath_var=LD_RUN_PATH runpath_var=
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
# ancient GNU ld didn't support --whole-archive et. al. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
else
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
fi
fi fi
else else
# PORTME fill in a description of your system's linker (not GNU ld) # PORTME fill in a description of your system's linker (not GNU ld)
...@@ -5210,7 +5498,7 @@ EOF ...@@ -5210,7 +5498,7 @@ EOF
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
if test "$GCC" = yes; then if test "$GCC" = yes; then
case $host_os in aix4.[012]|aix4.[012].*) case $host_os in aix4.[[012]]|aix4.[[012]].*)
# We only want to do this on AIX 4.2 and lower, the check # We only want to do this on AIX 4.2 and lower, the check
# below for broken collect2 doesn't work under 4.3+ # below for broken collect2 doesn't work under 4.3+
collect2name=`${CC} -print-prog-name=collect2` collect2name=`${CC} -print-prog-name=collect2`
...@@ -5231,6 +5519,9 @@ EOF ...@@ -5231,6 +5519,9 @@ EOF
fi fi
esac esac
shared_flag='-shared' shared_flag='-shared'
if test "$aix_use_runtimelinking" = yes; then
shared_flag="$shared_flag "'${wl}-G'
fi
else else
# not using gcc # not using gcc
if test "$host_cpu" = ia64; then if test "$host_cpu" = ia64; then
...@@ -5289,7 +5580,7 @@ EOF ...@@ -5289,7 +5580,7 @@ EOF
_LT_AC_TAGVAR(ld_shlibs, $1)=no _LT_AC_TAGVAR(ld_shlibs, $1)=no
;; ;;
bsdi4*) bsdi[[45]]*)
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
;; ;;
...@@ -5303,56 +5594,65 @@ EOF ...@@ -5303,56 +5594,65 @@ EOF
# Tell ltmain to make .lib files, not .a files. # Tell ltmain to make .lib files, not .a files.
libext=lib libext=lib
# Tell ltmain to make .dll files, not .so files. # Tell ltmain to make .dll files, not .so files.
shrext=".dll" shrext_cmds=".dll"
# FIXME: Setting linknames here is a bad hack. # FIXME: Setting linknames here is a bad hack.
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
# The linker will automatically build a .lib file if we build a DLL. # The linker will automatically build a .lib file if we build a DLL.
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
# FIXME: Should let the user specify the lib program. # FIXME: Should let the user specify the lib program.
_LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
fix_srcfile_path='`cygpath -w "$srcfile"`' _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
;; ;;
darwin* | rhapsody*) darwin* | rhapsody*)
if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
case "$host_os" in case "$host_os" in
rhapsody* | darwin1.[[012]]) rhapsody* | darwin1.[[012]])
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
;; ;;
*) # Darwin 1.3 on *) # Darwin 1.3 on
test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
;; _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
else
case ${MACOSX_DEPLOYMENT_TARGET} in
10.[[012]])
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
;;
10.*)
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
;;
esac
fi
;;
esac esac
# FIXME: Relying on posixy $() will cause problems for _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
# cross-compilation, but unfortunately the echo tests do not
# yet detect zsh echo's removal of \ escapes. Also zsh mangles
# `"' quotes if we put them in here... so don't!
lt_int_apple_cc_single_mod=no
output_verbose_link_cmd='echo'
if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
lt_int_apple_cc_single_mod=yes
fi
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
else
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
fi
_LT_AC_TAGVAR(module_cmds, $1)='$CC -bundle ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags'
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
else
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
fi
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
_LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
fi if test "$GCC" = yes ; then
output_verbose_link_cmd='echo'
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
else
case $cc_basename in
xlc*)
output_verbose_link_cmd='echo'
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
;;
*)
_LT_AC_TAGVAR(ld_shlibs, $1)=no
;;
esac
fi
;; ;;
dgux*) dgux*)
...@@ -5385,7 +5685,7 @@ EOF ...@@ -5385,7 +5685,7 @@ EOF
;; ;;
# FreeBSD 3 and greater uses gcc -shared to do shared libraries. # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
freebsd*) freebsd* | kfreebsd*-gnu | dragonfly*)
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
_LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_direct, $1)=yes
...@@ -5496,6 +5796,7 @@ EOF ...@@ -5496,6 +5796,7 @@ EOF
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
else else
...@@ -5541,7 +5842,7 @@ EOF ...@@ -5541,7 +5842,7 @@ EOF
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
$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' $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
# Both c and cxx compiler support -rpath directly # Both c and cxx compiler support -rpath directly
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
...@@ -5560,10 +5861,12 @@ EOF ...@@ -5560,10 +5861,12 @@ EOF
solaris*) solaris*)
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
if test "$GCC" = yes; then if test "$GCC" = yes; then
wlarc='${wl}'
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
$CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
else else
wlarc=''
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
...@@ -5572,8 +5875,18 @@ EOF ...@@ -5572,8 +5875,18 @@ EOF
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
case $host_os in case $host_os in
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
*) # Supported since Solaris 2.6 (maybe 2.5.1?) *)
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; # The compiler driver will combine linker options so we
# cannot just pass the convience library names through
# without $wl, iff we do not link with $LD.
# Luckily, gcc supports the same syntax we need for Sun Studio.
# Supported since Solaris 2.6 (maybe 2.5.1?)
case $wlarc in
'')
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
*)
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
esac ;;
esac esac
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
;; ;;
...@@ -5702,7 +6015,7 @@ x|xyes) ...@@ -5702,7 +6015,7 @@ x|xyes)
AC_MSG_CHECKING([whether -lc should be explicitly linked in]) AC_MSG_CHECKING([whether -lc should be explicitly linked in])
$rm conftest* $rm conftest*
printf "$lt_simple_compile_test_code" > conftest.$ac_ext printf "$lt_simple_compile_test_code" > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
soname=conftest soname=conftest
lib=conftest lib=conftest
...@@ -5836,7 +6149,7 @@ lt_ac_count=0 ...@@ -5836,7 +6149,7 @@ lt_ac_count=0
# Add /usr/xpg4/bin/sed as it is typically found on Solaris # Add /usr/xpg4/bin/sed as it is typically found on Solaris
# along with /bin/sed that truncates output. # along with /bin/sed that truncates output.
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
test ! -f $lt_ac_sed && break test ! -f $lt_ac_sed && continue
cat /dev/null > conftest.in cat /dev/null > conftest.in
lt_ac_count=0 lt_ac_count=0
echo $ECHO_N "0123456789$ECHO_C" >conftest.in echo $ECHO_N "0123456789$ECHO_C" >conftest.in
...@@ -5861,31 +6174,16 @@ for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do ...@@ -5861,31 +6174,16 @@ for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
fi fi
done done
done done
SED=$lt_cv_path_SED
]) ])
SED=$lt_cv_path_SED
AC_MSG_RESULT([$SED]) AC_MSG_RESULT([$SED])
]) ])
## ltdl.m4 - Configure ltdl for the target system. -*-Autoconf-*- ## ltdl.m4 - Configure ltdl for the target system. -*-Autoconf-*-
## Copyright (C) 1999-2000 Free Software Foundation, Inc. ## Copyright (C) 1999-2000 Free Software Foundation, Inc.
## ##
## This program is free software; you can redistribute it and/or modify ## This file is free software; the Free Software Foundation gives
## it under the terms of the GNU General Public License as published by ## unlimited permission to copy and/or distribute it, with or without
## the Free Software Foundation; either version 2 of the License, or ## modifications, as long as this notice is preserved.
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
##
## As a special exception to the GNU General Public License, if you
## distribute this file as part of a program that contains a
## configuration script generated by Autoconf, you may include it under
## the same distribution terms that you use for the rest of that program.
# serial 6 AC_LIB_LTDL # serial 6 AC_LIB_LTDL
...@@ -6008,8 +6306,9 @@ AC_CACHE_CHECK([whether deplibs are loaded by dlopen], ...@@ -6008,8 +6306,9 @@ AC_CACHE_CHECK([whether deplibs are loaded by dlopen],
# Assuming the user has installed a libdl from somewhere, this is true # Assuming the user has installed a libdl from somewhere, this is true
# If you are looking for one http://www.opendarwin.org/projects/dlcompat # If you are looking for one http://www.opendarwin.org/projects/dlcompat
libltdl_cv_sys_dlopen_deplibs=yes libltdl_cv_sys_dlopen_deplibs=yes
;; ;;
gnu*) gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
# GNU and its variants, using gnu ld.so (Glibc)
libltdl_cv_sys_dlopen_deplibs=yes libltdl_cv_sys_dlopen_deplibs=yes
;; ;;
hpux10*|hpux11*) hpux10*|hpux11*)
...@@ -6025,9 +6324,6 @@ AC_CACHE_CHECK([whether deplibs are loaded by dlopen], ...@@ -6025,9 +6324,6 @@ AC_CACHE_CHECK([whether deplibs are loaded by dlopen],
# at 6.2 and later dlopen does load deplibs. # at 6.2 and later dlopen does load deplibs.
libltdl_cv_sys_dlopen_deplibs=yes libltdl_cv_sys_dlopen_deplibs=yes
;; ;;
linux*)
libltdl_cv_sys_dlopen_deplibs=yes
;;
netbsd*) netbsd*)
libltdl_cv_sys_dlopen_deplibs=yes libltdl_cv_sys_dlopen_deplibs=yes
;; ;;
...@@ -6075,18 +6371,8 @@ AC_DEFUN([AC_LTDL_SHLIBEXT], ...@@ -6075,18 +6371,8 @@ AC_DEFUN([AC_LTDL_SHLIBEXT],
AC_CACHE_CHECK([which extension is used for loadable modules], AC_CACHE_CHECK([which extension is used for loadable modules],
[libltdl_cv_shlibext], [libltdl_cv_shlibext],
[ [
# Here in libltdl for libgcj we don't build modules for darwin. module=yes
# So we say no. Then the extension gets .dylib which is the right eval libltdl_cv_shlibext=$shrext_cmds
# thing for shared libraries on darwin.
case "$host_os" in
darwin*)
module=no
;;
*)
module=yes
;;
esac
eval libltdl_cv_shlibext=$shrext
]) ])
if test -n "$libltdl_cv_shlibext"; then if test -n "$libltdl_cv_shlibext"; then
AC_DEFINE_UNQUOTED(LTDL_SHLIB_EXT, "$libltdl_cv_shlibext", AC_DEFINE_UNQUOTED(LTDL_SHLIB_EXT, "$libltdl_cv_shlibext",
......
...@@ -396,6 +396,30 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], ...@@ -396,6 +396,30 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
]) ])
# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 7
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
# Do all the work for Automake. -*- Autoconf -*- # Do all the work for Automake. -*- Autoconf -*-
# This macro actually does too much some checks are only needed if # This macro actually does too much some checks are only needed if
...@@ -580,46 +604,6 @@ fi ...@@ -580,46 +604,6 @@ fi
rmdir .tst 2>/dev/null rmdir .tst 2>/dev/null
AC_SUBST([am__leading_dot])]) AC_SUBST([am__leading_dot])])
# Add --enable-maintainer-mode option to configure.
# From Jim Meyering
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 3
AC_DEFUN([AM_MAINTAINER_MODE],
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
dnl maintainer-mode is disabled by default
AC_ARG_ENABLE(maintainer-mode,
[ --enable-maintainer-mode enable make rules and dependencies not useful
(and sometimes confusing) to the casual installer],
USE_MAINTAINER_MODE=$enableval,
USE_MAINTAINER_MODE=no)
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
MAINT=$MAINTAINER_MODE_TRUE
AC_SUBST(MAINT)dnl
]
)
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
# Check to see how 'make' treats includes. -*- Autoconf -*- # Check to see how 'make' treats includes. -*- Autoconf -*-
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -13,17 +13,19 @@ ...@@ -13,17 +13,19 @@
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02111-1307 USA # 02110-1301 USA
dnl FIXME: Is this really new enough?
AC_PREREQ(2.50)
## ------------------------ ## ## ------------------------ ##
## Autoconf initialisation. ## ## Autoconf initialisation. ##
## ------------------------ ## ## ------------------------ ##
AC_PREREQ(2.59)
AC_INIT([libltdl], [1.2], [bug-libtool@gnu.org]) AC_INIT([libltdl], [1.2], [bug-libtool@gnu.org])
AC_CONFIG_SRCDIR([ltdl.c]) AC_CONFIG_SRCDIR([ltdl.c])
AC_CONFIG_FILES([config.h:config-h.in])
## ------------------------------- ## ## ------------------------------- ##
...@@ -48,8 +50,8 @@ fi ...@@ -48,8 +50,8 @@ fi
## ------------------------ ## ## ------------------------ ##
## Automake Initialisation. ## ## Automake Initialisation. ##
## ------------------------ ## ## ------------------------ ##
AM_INIT_AUTOMAKE([1.9.1]) AM_INIT_AUTOMAKE(AC_PACKAGE_TARNAME, AC_PACKAGE_VERSION, -)
AM_MAINTAINER_MODE AM_CONFIG_HEADER([config.h:config-h.in])
## ------------------ ## ## ------------------ ##
......
#!/bin/sh #!/bin/sh
#
# install - install a program, script, or datafile # install - install a program, script, or datafile
#
scriptversion=2005-02-02.21
# This originates from X11R5 (mit/util/scripts/install.sh), which was # This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the # later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license. # following copyright and license.
...@@ -41,13 +42,11 @@ ...@@ -41,13 +42,11 @@
# from scratch. It can only install one file at a time, a restriction # from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs. # shared with many OS's install programs.
# set DOITPROG to echo to test this script # set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it. # Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}" doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars. # put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}" mvprog="${MVPROG-mv}"
...@@ -59,236 +58,266 @@ stripprog="${STRIPPROG-strip}" ...@@ -59,236 +58,266 @@ stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}" rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}" mkdirprog="${MKDIRPROG-mkdir}"
transformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755" chmodcmd="$chmodprog 0755"
chowncmd="" chowncmd=
chgrpcmd="" chgrpcmd=
stripcmd="" stripcmd=
rmcmd="$rmprog -f" rmcmd="$rmprog -f"
mvcmd="$mvprog" mvcmd="$mvprog"
src="" src=
dst="" dst=
dir_arg="" dir_arg=
dstarg=
while [ x"$1" != x ]; do no_target_directory=
case $1 in
-c) instcmd=$cpprog usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
shift or: $0 [OPTION]... SRCFILES... DIRECTORY
continue;; or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES...
-d) dir_arg=true
shift In the 1st form, copy SRCFILE to DSTFILE.
continue;; In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
-m) chmodcmd="$chmodprog $2"
shift Options:
shift -c (ignored)
continue;; -d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-o) chowncmd="$chownprog $2" -m MODE $chmodprog installed files to MODE.
shift -o USER $chownprog installed files to USER.
shift -s $stripprog installed files.
continue;; -t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
-g) chgrpcmd="$chgrpprog $2" --help display this help and exit.
shift --version display version info and exit.
shift
continue;; Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
-s) stripcmd=$stripprog "
shift
continue;; while test -n "$1"; do
case $1 in
-t=*) transformarg=`echo $1 | sed 's/-t=//'` -c) shift
shift continue;;
continue;;
-d) dir_arg=true
-b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift
shift continue;;
continue;;
-g) chgrpcmd="$chgrpprog $2"
*) if [ x"$src" = x ] shift
then shift
src=$1 continue;;
else
# this colon is to work around a 386BSD /bin/sh bug --help) echo "$usage"; exit $?;;
:
dst=$1 -m) chmodcmd="$chmodprog $2"
fi shift
shift shift
continue;; continue;;
esac
done -o) chowncmd="$chownprog $2"
shift
if [ x"$src" = x ] shift
then continue;;
echo "$0: no input file specified" >&2
exit 1 -s) stripcmd=$stripprog
else shift
: continue;;
fi
-t) dstarg=$2
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
if [ -d "$dst" ]; then
instcmd=:
chmodcmd=""
else
instcmd=$mkdirprog
fi
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f "$src" ] || [ -d "$src" ]
then
:
else
echo "$0: $src does not exist" >&2
exit 1
fi
if [ x"$dst" = x ]
then
echo "$0: no destination specified" >&2
exit 1
else
:
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
if [ -d "$dst" ]
then
dst=$dst/`basename "$src"`
else
:
fi
fi
## this sed command emulates the dirname command
dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='
'
IFS="${IFS-$defaultIFS}"
oIFS=$IFS
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS=$oIFS
pathcomp=''
while [ $# -ne 0 ] ; do
pathcomp=$pathcomp$1
shift shift
shift
continue;;
if [ ! -d "$pathcomp" ] ; -T) no_target_directory=true
then shift
$mkdirprog "$pathcomp" continue;;
else
: --version) echo "$0 $scriptversion"; exit $?;;
fi
*) # When -d is used, all remaining arguments are directories to create.
pathcomp=$pathcomp/ # When -t is used, the destination is already specified.
test -n "$dir_arg$dstarg" && break
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dstarg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dstarg"
shift # fnord
fi
shift # arg
dstarg=$arg
done
break;;
esac
done done
fi
if [ x"$dir_arg" != x ]
then
$doit $instcmd "$dst" &&
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi && if test -z "$1"; then
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi && if test -z "$dir_arg"; then
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi && echo "$0: no input file specified." >&2
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi exit 1
else fi
# It's OK to call `install-sh -d' without argument.
# If we're going to rename the final executable, determine the name now. # This can happen when creating conditional directories.
exit 0
if [ x"$transformarg" = x ] fi
then
dstfile=`basename "$dst"`
else
dstfile=`basename "$dst" $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename
if [ x"$dstfile" = x ]
then
dstfile=`basename "$dst"`
else
:
fi
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_
# Trap to clean up temp files at exit.
trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
trap '(exit $?); exit' 1 2 13 15
# Move or copy the file name to the temp name
$doit $instcmd "$src" "$dsttmp" &&
# and set any options; do chmod last to preserve setuid bits
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
# Now remove or move aside any old file at destination location. We try this
# two ways since rm can't unlink itself on some systems and the destination
# file might be busy for other reasons. In this case, the final cleanup
# might fail but the new file should still install successfully.
{
if [ -f "$dstdir/$dstfile" ]
then
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
$doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
{
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
(exit 1); exit
}
else
:
fi
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile" for src
do
# Protect names starting with `-'.
case $src in
-*) src=./$src ;;
esac
if test -n "$dir_arg"; then
dst=$src
src=
if test -d "$dst"; then
mkdircmd=:
chmodcmd=
else
mkdircmd=$mkdirprog
fi
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if test ! -f "$src" && test ! -d "$src"; then
echo "$0: $src does not exist." >&2
exit 1
fi
if test -z "$dstarg"; then
echo "$0: no destination specified." >&2
exit 1
fi
dst=$dstarg
# Protect names starting with `-'.
case $dst in
-*) dst=./$dst ;;
esac
fi && # If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
if test -n "$no_target_directory"; then
echo "$0: $dstarg: Is a directory" >&2
exit 1
fi
dst=$dst/`basename "$src"`
fi
fi
# This sed command emulates the dirname command.
dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# Skip lots of stat calls in the usual case.
if test ! -d "$dstdir"; then
defaultIFS='
'
IFS="${IFS-$defaultIFS}"
oIFS=$IFS
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
shift
IFS=$oIFS
pathcomp=
while test $# -ne 0 ; do
pathcomp=$pathcomp$1
shift
if test ! -d "$pathcomp"; then
$mkdirprog "$pathcomp"
# mkdir can fail with a `File exist' error in case several
# install-sh are creating the directory concurrently. This
# is OK.
test -d "$pathcomp" || exit
fi
pathcomp=$pathcomp/
done
fi
if test -n "$dir_arg"; then
$doit $mkdircmd "$dst" \
&& { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
&& { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
else
dstfile=`basename "$dst"`
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
trap '(exit $?); exit' 1 2 13 15
# Copy the file name to the temp name.
$doit $cpprog "$src" "$dsttmp" &&
# and set any options; do chmod last to preserve setuid bits.
#
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $cpprog $src $dsttmp" command.
#
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
&& { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
# Now rename the file to the real destination.
{ $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
|| {
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
if test -f "$dstdir/$dstfile"; then
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
|| $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
|| {
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
(exit 1); exit 1
}
else
:
fi
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
}
}
fi || { (exit 1); exit 1; }
done
# The final little trick to "correctly" pass the exit status to the exit trap. # The final little trick to "correctly" pass the exit status to the exit trap.
{ {
(exit 0); exit (exit 0); exit 0
} }
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:
/* ltdl.c -- system independent dlopen wrapper /* ltdl.c -- system independent dlopen wrapper
Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. Copyright (C) 1998, 1999, 2000, 2004, 2006 Free Software Foundation, Inc.
Originally by Thomas Tanner <tanner@ffii.org> Originally by Thomas Tanner <tanner@ffii.org>
This file is part of GNU Libtool. This file is part of GNU Libtool.
...@@ -20,8 +20,8 @@ Lesser General Public License for more details. ...@@ -20,8 +20,8 @@ Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02111-1307 USA 02110-1301 USA
*/ */
...@@ -29,6 +29,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ...@@ -29,6 +29,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
# include <config.h> # include <config.h>
#endif #endif
#if HAVE_BOEHM_GC
# include <gc.h>
#endif
#if HAVE_UNISTD_H #if HAVE_UNISTD_H
# include <unistd.h> # include <unistd.h>
#endif #endif
...@@ -37,8 +41,14 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ...@@ -37,8 +41,14 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
# include <stdio.h> # include <stdio.h>
#endif #endif
/* Include the header defining malloc. On K&R C compilers,
that's <malloc.h>, on ANSI C and ISO C compilers, that's <stdlib.h>. */
#if HAVE_STDLIB_H #if HAVE_STDLIB_H
# include <stdlib.h> # include <stdlib.h>
#else
# if HAVE_MALLOC_H
# include <malloc.h>
# endif
#endif #endif
#if HAVE_STRING_H #if HAVE_STRING_H
...@@ -53,10 +63,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ...@@ -53,10 +63,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
# include <ctype.h> # include <ctype.h>
#endif #endif
#if HAVE_MALLOC_H
# include <malloc.h>
#endif
#if HAVE_MEMORY_H #if HAVE_MEMORY_H
# include <memory.h> # include <memory.h>
#endif #endif
...@@ -65,10 +71,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ...@@ -65,10 +71,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
# include <errno.h> # include <errno.h>
#endif #endif
#if HAVE_BOEHM_GC
#include <gc.h>
#endif
#ifndef __WINDOWS__ #ifndef __WINDOWS__
# ifdef __WIN32__ # ifdef __WIN32__
...@@ -241,7 +243,7 @@ LT_GLOBAL_DATA void (*lt_dlfree) LT_PARAMS((lt_ptr ptr)) ...@@ -241,7 +243,7 @@ LT_GLOBAL_DATA void (*lt_dlfree) LT_PARAMS((lt_ptr ptr))
#else #else
#define LT_DLMALLOC(tp, n) ((tp *) lt_dlmalloc ((n) * sizeof(tp))) #define LT_DLMALLOC(tp, n) ((tp *) lt_dlmalloc ((n) * sizeof(tp)))
#define LT_DLREALLOC(tp, p, n) ((tp *) rpl_realloc ((p), (n) * sizeof(tp))) #define LT_DLREALLOC(tp, p, n) ((tp *) lt_dlrealloc ((p), (n) * sizeof(tp)))
#define LT_DLFREE(p) \ #define LT_DLFREE(p) \
LT_STMT_START { if (p) (p) = (lt_dlfree (p), (lt_ptr) 0); } LT_STMT_END LT_STMT_START { if (p) (p) = (lt_dlfree (p), (lt_ptr) 0); } LT_STMT_END
...@@ -387,11 +389,13 @@ memcpy (dest, src, size) ...@@ -387,11 +389,13 @@ memcpy (dest, src, size)
const lt_ptr src; const lt_ptr src;
size_t size; size_t size;
{ {
size_t i = 0; const char * s = src;
char * d = dest;
size_t i = 0;
for (i = 0; i < size; ++i) for (i = 0; i < size; ++i)
{ {
dest[i] = src[i]; d[i] = s[i];
} }
return dest; return dest;
...@@ -411,17 +415,21 @@ memmove (dest, src, size) ...@@ -411,17 +415,21 @@ memmove (dest, src, size)
const lt_ptr src; const lt_ptr src;
size_t size; size_t size;
{ {
size_t i; const char * s = src;
char * d = dest;
size_t i;
if (dest < src) if (d < s)
for (i = 0; i < size; ++i) for (i = 0; i < size; ++i)
{ {
dest[i] = src[i]; d[i] = s[i];
} }
else if (dest > src) else if (d > s && size > 0)
for (i = size -1; i >= 0; --i) for (i = size -1; ; --i)
{ {
dest[i] = src[i]; d[i] = s[i];
if (i == 0)
break;
} }
return dest; return dest;
...@@ -453,7 +461,9 @@ opendir (path) ...@@ -453,7 +461,9 @@ opendir (path)
DIR *entry; DIR *entry;
assert(path != (char *) NULL); assert(path != (char *) NULL);
(void) strncpy(file_specification,path,LT_FILENAME_MAX-1); /* allow space for: path + '\\' '\\' '*' '.' '*' + '\0' */
(void) strncpy (file_specification, path, LT_FILENAME_MAX-6);
file_specification[LT_FILENAME_MAX-6] = LT_EOS_CHAR;
(void) strcat(file_specification,"\\"); (void) strcat(file_specification,"\\");
entry = LT_DLMALLOC (DIR,sizeof(DIR)); entry = LT_DLMALLOC (DIR,sizeof(DIR));
if (entry != (DIR *) 0) if (entry != (DIR *) 0)
...@@ -494,6 +504,7 @@ static struct dirent *readdir(entry) ...@@ -494,6 +504,7 @@ static struct dirent *readdir(entry)
entry->firsttime = FALSE; entry->firsttime = FALSE;
(void) strncpy(entry->file_info.d_name,entry->Win32FindData.cFileName, (void) strncpy(entry->file_info.d_name,entry->Win32FindData.cFileName,
LT_FILENAME_MAX-1); LT_FILENAME_MAX-1);
entry->file_info.d_name[LT_FILENAME_MAX - 1] = LT_EOS_CHAR;
entry->file_info.d_namlen = strlen(entry->file_info.d_name); entry->file_info.d_namlen = strlen(entry->file_info.d_name);
return(&entry->file_info); return(&entry->file_info);
} }
...@@ -686,7 +697,7 @@ argz_insert (pargz, pargz_len, before, entry) ...@@ -686,7 +697,7 @@ argz_insert (pargz, pargz_len, before, entry)
/* This probably indicates a programmer error, but to preserve /* This probably indicates a programmer error, but to preserve
semantics, scan back to the start of an entry if BEFORE points semantics, scan back to the start of an entry if BEFORE points
into the middle of it. */ into the middle of it. */
while ((before >= *pargz) && (before[-1] != LT_EOS_CHAR)) while ((before > *pargz) && (before[-1] != LT_EOS_CHAR))
--before; --before;
{ {
...@@ -1020,7 +1031,7 @@ lt_erealloc (addr, size) ...@@ -1020,7 +1031,7 @@ lt_erealloc (addr, size)
lt_ptr addr; lt_ptr addr;
size_t size; size_t size;
{ {
lt_ptr mem = realloc (addr, size); lt_ptr mem = lt_dlrealloc (addr, size);
if (size && !mem) if (size && !mem)
LT_DLMUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); LT_DLMUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY));
return mem; return mem;
...@@ -1584,7 +1595,11 @@ static struct lt_user_dlloader sys_dld = { ...@@ -1584,7 +1595,11 @@ static struct lt_user_dlloader sys_dld = {
#if HAVE_MACH_O_DYLD_H #if HAVE_MACH_O_DYLD_H
# include <mach-o/dyld.h> #if !defined(__APPLE_CC__) && !defined(__MWERKS__) && !defined(__private_extern__)
/* Is this correct? Does it still function properly? */
#define __private_extern__ extern
#endif
# include <mach-o/dyld.h>
#endif #endif
#include <mach-o/getsect.h> #include <mach-o/getsect.h>
...@@ -1610,14 +1625,14 @@ static enum DYLD_BOOL (*ltdl_NSIsSymbolNameDefinedInImage)(const struct mach_hea ...@@ -1610,14 +1625,14 @@ static enum DYLD_BOOL (*ltdl_NSIsSymbolNameDefinedInImage)(const struct mach_hea
static enum DYLD_BOOL (*ltdl_NSMakePrivateModulePublic)(NSModule module) = 0; static enum DYLD_BOOL (*ltdl_NSMakePrivateModulePublic)(NSModule module) = 0;
#ifndef NSADDIMAGE_OPTION_NONE #ifndef NSADDIMAGE_OPTION_NONE
#define NSADDIMAGE_OPTION_NONE 0x0 #define NSADDIMAGE_OPTION_NONE 0x0
#endif #endif
#ifndef NSADDIMAGE_OPTION_RETURN_ON_ERROR #ifndef NSADDIMAGE_OPTION_RETURN_ON_ERROR
#define NSADDIMAGE_OPTION_RETURN_ON_ERROR 0x1 #define NSADDIMAGE_OPTION_RETURN_ON_ERROR 0x1
#endif #endif
#ifndef NSADDIMAGE_OPTION_WITH_SEARCHING #ifndef NSADDIMAGE_OPTION_WITH_SEARCHING
#define NSADDIMAGE_OPTION_WITH_SEARCHING 0x2 #define NSADDIMAGE_OPTION_WITH_SEARCHING 0x2
#endif #endif
#ifndef NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED #ifndef NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED
#define NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED 0x4 #define NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED 0x4
#endif #endif
...@@ -1626,7 +1641,7 @@ static enum DYLD_BOOL (*ltdl_NSMakePrivateModulePublic)(NSModule module) = 0; ...@@ -1626,7 +1641,7 @@ static enum DYLD_BOOL (*ltdl_NSMakePrivateModulePublic)(NSModule module) = 0;
#endif #endif
#ifndef NSLOOKUPSYMBOLINIMAGE_OPTION_BIND #ifndef NSLOOKUPSYMBOLINIMAGE_OPTION_BIND
#define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND 0x0 #define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND 0x0
#endif #endif
#ifndef NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW #ifndef NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW
#define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW 0x1 #define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW 0x1
#endif #endif
...@@ -1647,11 +1662,11 @@ lt_int_dyld_error(othererror) ...@@ -1647,11 +1662,11 @@ lt_int_dyld_error(othererror)
int lerno; int lerno;
const char *errstr; const char *errstr;
const char *file; const char *file;
NSLinkEditError(&ler,&lerno,&file,&errstr); NSLinkEditError(&ler,&lerno,&file,&errstr);
if (!errstr || !strlen(errstr)) errstr = othererror; if (!errstr || !strlen(errstr)) errstr = othererror;
return errstr; return errstr;
} }
static const struct mach_header * static const struct mach_header *
lt_int_dyld_get_mach_header_from_nsmodule(module) lt_int_dyld_get_mach_header_from_nsmodule(module)
NSModule module; NSModule module;
...@@ -1675,7 +1690,7 @@ lt_int_dyld_get_mach_header_from_nsmodule(module) ...@@ -1675,7 +1690,7 @@ lt_int_dyld_get_mach_header_from_nsmodule(module)
static const char* lt_int_dyld_lib_install_name(mh) static const char* lt_int_dyld_lib_install_name(mh)
const struct mach_header *mh; const struct mach_header *mh;
{ {
/* NSAddImage is also used to get the loaded image, but it only works if the lib /* NSAddImage is also used to get the loaded image, but it only works if the lib
is installed, for uninstalled libs we need to check the install_names against is installed, for uninstalled libs we need to check the install_names against
each other. Note that this is still broken if DYLD_IMAGE_SUFFIX is set and a each other. Note that this is still broken if DYLD_IMAGE_SUFFIX is set and a
...@@ -1684,14 +1699,13 @@ static const char* lt_int_dyld_lib_install_name(mh) ...@@ -1684,14 +1699,13 @@ static const char* lt_int_dyld_lib_install_name(mh)
int j; int j;
struct load_command *lc; struct load_command *lc;
unsigned long offset = sizeof(struct mach_header); unsigned long offset = sizeof(struct mach_header);
const struct mach_header *mh1;
const char* retStr=NULL; const char* retStr=NULL;
for (j = 0; j < mh->ncmds; j++) for (j = 0; j < mh->ncmds; j++)
{ {
lc = (struct load_command*)(((unsigned long)mh) + offset); lc = (struct load_command*)(((unsigned long)mh) + offset);
if (LC_ID_DYLIB == lc->cmd) if (LC_ID_DYLIB == lc->cmd)
{ {
retStr=(char*)(((struct dylib_command*)lc)->dylib.name.offset + retStr=(char*)(((struct dylib_command*)lc)->dylib.name.offset +
(unsigned long)lc); (unsigned long)lc);
} }
offset += lc->cmdsize; offset += lc->cmdsize;
...@@ -1705,7 +1719,7 @@ lt_int_dyld_match_loaded_lib_by_install_name(const char *name) ...@@ -1705,7 +1719,7 @@ lt_int_dyld_match_loaded_lib_by_install_name(const char *name)
int i=_dyld_image_count(); int i=_dyld_image_count();
int j; int j;
const struct mach_header *mh=NULL; const struct mach_header *mh=NULL;
const char *id=NULL; const char *id=NULL;
for (j = 0; j < i; j++) for (j = 0; j < i; j++)
{ {
id=lt_int_dyld_lib_install_name(_dyld_get_image_header(j)); id=lt_int_dyld_lib_install_name(_dyld_get_image_header(j));
...@@ -1717,7 +1731,7 @@ lt_int_dyld_match_loaded_lib_by_install_name(const char *name) ...@@ -1717,7 +1731,7 @@ lt_int_dyld_match_loaded_lib_by_install_name(const char *name)
} }
return mh; return mh;
} }
static NSSymbol static NSSymbol
lt_int_dyld_NSlookupSymbolInLinkedLibs(symbol,mh) lt_int_dyld_NSlookupSymbolInLinkedLibs(symbol,mh)
const char *symbol; const char *symbol;
...@@ -1736,26 +1750,26 @@ lt_int_dyld_NSlookupSymbolInLinkedLibs(symbol,mh) ...@@ -1736,26 +1750,26 @@ lt_int_dyld_NSlookupSymbolInLinkedLibs(symbol,mh)
lc = (struct load_command*)(((unsigned long)mh) + offset); lc = (struct load_command*)(((unsigned long)mh) + offset);
if ((LC_LOAD_DYLIB == lc->cmd) || (LC_LOAD_WEAK_DYLIB == lc->cmd)) if ((LC_LOAD_DYLIB == lc->cmd) || (LC_LOAD_WEAK_DYLIB == lc->cmd))
{ {
mh1=lt_int_dyld_match_loaded_lib_by_install_name((char*)(((struct dylib_command*)lc)->dylib.name.offset + mh1=lt_int_dyld_match_loaded_lib_by_install_name((char*)(((struct dylib_command*)lc)->dylib.name.offset +
(unsigned long)lc)); (unsigned long)lc));
if (!mh1) if (!mh1)
{ {
/* Maybe NSAddImage can find it */ /* Maybe NSAddImage can find it */
mh1=ltdl_NSAddImage((char*)(((struct dylib_command*)lc)->dylib.name.offset + mh1=ltdl_NSAddImage((char*)(((struct dylib_command*)lc)->dylib.name.offset +
(unsigned long)lc), (unsigned long)lc),
NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED + NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED +
NSADDIMAGE_OPTION_WITH_SEARCHING + NSADDIMAGE_OPTION_WITH_SEARCHING +
NSADDIMAGE_OPTION_RETURN_ON_ERROR ); NSADDIMAGE_OPTION_RETURN_ON_ERROR );
} }
if (mh1) if (mh1)
{ {
retSym = ltdl_NSLookupSymbolInImage(mh1, retSym = ltdl_NSLookupSymbolInImage(mh1,
symbol, symbol,
NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW
| NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR | NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR
); );
if (retSym) break; if (retSym) break;
} }
} }
offset += lc->cmdsize; offset += lc->cmdsize;
} }
...@@ -1768,7 +1782,7 @@ sys_dyld_init() ...@@ -1768,7 +1782,7 @@ sys_dyld_init()
{ {
int retCode = 0; int retCode = 0;
int err = 0; int err = 0;
if (!_dyld_present()) { if (!_dyld_present()) {
retCode=1; retCode=1;
} }
else { else {
...@@ -1788,8 +1802,8 @@ sys_dyld_open (loader_data, filename) ...@@ -1788,8 +1802,8 @@ sys_dyld_open (loader_data, filename)
lt_module module = 0; lt_module module = 0;
NSObjectFileImage ofi = 0; NSObjectFileImage ofi = 0;
NSObjectFileImageReturnCode ofirc; NSObjectFileImageReturnCode ofirc;
if (!filename) if (!filename)
return (lt_module)-1; return (lt_module)-1;
ofirc = NSCreateObjectFileImageFromFile(filename, &ofi); ofirc = NSCreateObjectFileImageFromFile(filename, &ofi);
switch (ofirc) switch (ofirc)
...@@ -1806,9 +1820,9 @@ sys_dyld_open (loader_data, filename) ...@@ -1806,9 +1820,9 @@ sys_dyld_open (loader_data, filename)
case NSObjectFileImageInappropriateFile: case NSObjectFileImageInappropriateFile:
if (ltdl_NSIsSymbolNameDefinedInImage && ltdl_NSLookupSymbolInImage) if (ltdl_NSIsSymbolNameDefinedInImage && ltdl_NSLookupSymbolInImage)
{ {
module = (lt_module)ltdl_NSAddImage(filename, NSADDIMAGE_OPTION_RETURN_ON_ERROR); module = (lt_module)ltdl_NSAddImage(filename, NSADDIMAGE_OPTION_RETURN_ON_ERROR);
break; break;
} }
default: default:
LT_DLMUTEX_SETERROR (lt_int_dyld_error(LT_DLSTRERROR(CANNOT_OPEN))); LT_DLMUTEX_SETERROR (lt_int_dyld_error(LT_DLSTRERROR(CANNOT_OPEN)));
return 0; return 0;
...@@ -1824,13 +1838,12 @@ sys_dyld_close (loader_data, module) ...@@ -1824,13 +1838,12 @@ sys_dyld_close (loader_data, module)
{ {
int retCode = 0; int retCode = 0;
int flags = 0; int flags = 0;
unsigned long size=0;
if (module == (lt_module)-1) return 0; if (module == (lt_module)-1) return 0;
#ifdef __BIG_ENDIAN__ #ifdef __BIG_ENDIAN__
if (((struct mach_header *)module)->magic == MH_MAGIC) if (((struct mach_header *)module)->magic == MH_MAGIC)
#else #else
if (((struct mach_header *)module)->magic == MH_CIGAM) if (((struct mach_header *)module)->magic == MH_CIGAM)
#endif #endif
{ {
LT_DLMUTEX_SETERROR("Can not close a dylib"); LT_DLMUTEX_SETERROR("Can not close a dylib");
retCode = 1; retCode = 1;
...@@ -1841,14 +1854,14 @@ sys_dyld_close (loader_data, module) ...@@ -1841,14 +1854,14 @@ sys_dyld_close (loader_data, module)
/* Currently, if a module contains c++ static destructors and it is unloaded, we /* Currently, if a module contains c++ static destructors and it is unloaded, we
get a segfault in atexit(), due to compiler and dynamic loader differences of get a segfault in atexit(), due to compiler and dynamic loader differences of
opinion, this works around that. opinion, this works around that.
*/ */
if ((const struct section *)NULL != if ((const struct section *)NULL !=
getsectbynamefromheader(lt_int_dyld_get_mach_header_from_nsmodule(module), getsectbynamefromheader(lt_int_dyld_get_mach_header_from_nsmodule(module),
"__DATA","__mod_term_func")) "__DATA","__mod_term_func"))
{ {
flags += NSUNLINKMODULE_OPTION_KEEP_MEMORY_MAPPED; flags += NSUNLINKMODULE_OPTION_KEEP_MEMORY_MAPPED;
} }
#endif #endif
#ifdef __ppc__ #ifdef __ppc__
flags += NSUNLINKMODULE_OPTION_RESET_LAZY_REFERENCES; flags += NSUNLINKMODULE_OPTION_RESET_LAZY_REFERENCES;
#endif #endif
...@@ -1856,9 +1869,9 @@ sys_dyld_close (loader_data, module) ...@@ -1856,9 +1869,9 @@ sys_dyld_close (loader_data, module)
{ {
retCode=1; retCode=1;
LT_DLMUTEX_SETERROR (lt_int_dyld_error(LT_DLSTRERROR(CANNOT_CLOSE))); LT_DLMUTEX_SETERROR (lt_int_dyld_error(LT_DLSTRERROR(CANNOT_CLOSE)));
} }
} }
return retCode; return retCode;
} }
...@@ -1872,44 +1885,47 @@ sys_dyld_sym (loader_data, module, symbol) ...@@ -1872,44 +1885,47 @@ sys_dyld_sym (loader_data, module, symbol)
NSSymbol *nssym = 0; NSSymbol *nssym = 0;
void *unused; void *unused;
const struct mach_header *mh=NULL; const struct mach_header *mh=NULL;
char saveError[256] = "Symbol not found";
if (module == (lt_module)-1) if (module == (lt_module)-1)
{ {
_dyld_lookup_and_bind(symbol,(unsigned long*)&address,&unused); _dyld_lookup_and_bind(symbol,(unsigned long*)&address,&unused);
return address; return address;
} }
#ifdef __BIG_ENDIAN__ #ifdef __BIG_ENDIAN__
if (((struct mach_header *)module)->magic == MH_MAGIC) if (((struct mach_header *)module)->magic == MH_MAGIC)
#else #else
if (((struct mach_header *)module)->magic == MH_CIGAM) if (((struct mach_header *)module)->magic == MH_CIGAM)
#endif #endif
{ {
if (ltdl_NSIsSymbolNameDefinedInImage && ltdl_NSLookupSymbolInImage) if (ltdl_NSIsSymbolNameDefinedInImage && ltdl_NSLookupSymbolInImage)
{ {
mh=module; mh=module;
if (ltdl_NSIsSymbolNameDefinedInImage((struct mach_header*)module,symbol)) if (ltdl_NSIsSymbolNameDefinedInImage((struct mach_header*)module,symbol))
{ {
nssym = ltdl_NSLookupSymbolInImage((struct mach_header*)module, nssym = ltdl_NSLookupSymbolInImage((struct mach_header*)module,
symbol, symbol,
NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW
| NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR | NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR
); );
} }
} }
} }
else { else {
nssym = NSLookupSymbolInModule(module, symbol); nssym = NSLookupSymbolInModule(module, symbol);
} }
if (!nssym) if (!nssym)
{ {
strncpy(saveError, lt_int_dyld_error(LT_DLSTRERROR(SYMBOL_NOT_FOUND)), 255);
saveError[255] = 0;
if (!mh) mh=lt_int_dyld_get_mach_header_from_nsmodule(module); if (!mh) mh=lt_int_dyld_get_mach_header_from_nsmodule(module);
nssym = lt_int_dyld_NSlookupSymbolInLinkedLibs(symbol,mh); nssym = lt_int_dyld_NSlookupSymbolInLinkedLibs(symbol,mh);
} }
if (!nssym) if (!nssym)
{ {
LT_DLMUTEX_SETERROR (lt_int_dyld_error(LT_DLSTRERROR(SYMBOL_NOT_FOUND))); LT_DLMUTEX_SETERROR (saveError);
return NULL; return NULL;
} }
return NSAddressOfSymbol(nssym); return NSAddressOfSymbol(nssym);
} }
...@@ -2988,6 +3004,9 @@ trim (dest, str) ...@@ -2988,6 +3004,9 @@ trim (dest, str)
LT_DLFREE (*dest); LT_DLFREE (*dest);
if (!end)
return 1;
if (len > 3 && str[0] == '\'') if (len > 3 && str[0] == '\'')
{ {
tmp = LT_EMALLOC (char, end - str); tmp = LT_EMALLOC (char, end - str);
...@@ -3092,7 +3111,7 @@ try_dlopen (phandle, filename) ...@@ -3092,7 +3111,7 @@ try_dlopen (phandle, filename)
++base_name; ++base_name;
} }
else else
LT_DLMEM_REASSIGN (base_name, canonical); base_name = canonical;
assert (base_name && *base_name); assert (base_name && *base_name);
...@@ -3923,7 +3942,7 @@ lt_dlerror () ...@@ -3923,7 +3942,7 @@ lt_dlerror ()
LT_DLMUTEX_GETERROR (error); LT_DLMUTEX_GETERROR (error);
LT_DLMUTEX_SETERROR (0); LT_DLMUTEX_SETERROR (0);
return error ? error : LT_DLSTRERROR (UNKNOWN); return error ? error : NULL;
} }
static int static int
......
...@@ -20,8 +20,8 @@ Lesser General Public License for more details. ...@@ -20,8 +20,8 @@ Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02111-1307 USA 02110-1301 USA
*/ */
/* Only include this header file once. */ /* Only include this header file once. */
...@@ -79,7 +79,7 @@ LT_BEGIN_C_DECLS ...@@ -79,7 +79,7 @@ LT_BEGIN_C_DECLS
/* LT_CONC creates a new concatenated symbol for the compiler /* LT_CONC creates a new concatenated symbol for the compiler
in a portable way. */ in a portable way. */
#if defined(__STDC__) || defined(__cplusplus) #if defined(__STDC__) || defined(__cplusplus) || defined(_MSC_VER)
# define LT_CONC(s,t) s##t # define LT_CONC(s,t) s##t
#else #else
# define LT_CONC(s,t) s/**/t # define LT_CONC(s,t) s/**/t
...@@ -111,6 +111,7 @@ LT_BEGIN_C_DECLS ...@@ -111,6 +111,7 @@ LT_BEGIN_C_DECLS
# endif # endif
#endif #endif
#ifdef __WINDOWS__ #ifdef __WINDOWS__
# ifndef __CYGWIN__ # ifndef __CYGWIN__
/* LT_DIRSEP_CHAR is accepted *in addition* to '/' as a directory /* LT_DIRSEP_CHAR is accepted *in addition* to '/' as a directory
...@@ -140,6 +141,10 @@ LT_BEGIN_C_DECLS ...@@ -140,6 +141,10 @@ LT_BEGIN_C_DECLS
#endif #endif
#if defined(_MSC_VER) /* Visual Studio */
# define R_OK 4
#endif
/* --- DYNAMIC MODULE LOADING API --- */ /* --- DYNAMIC MODULE LOADING API --- */
...@@ -148,31 +153,31 @@ LT_BEGIN_C_DECLS ...@@ -148,31 +153,31 @@ LT_BEGIN_C_DECLS
typedef struct lt_dlhandle_struct *lt_dlhandle; /* A loaded module. */ typedef struct lt_dlhandle_struct *lt_dlhandle; /* A loaded module. */
/* Initialisation and finalisation functions for libltdl. */ /* Initialisation and finalisation functions for libltdl. */
extern int lt_dlinit LT_PARAMS((void)); LT_SCOPE int lt_dlinit LT_PARAMS((void));
extern int lt_dlexit LT_PARAMS((void)); LT_SCOPE int lt_dlexit LT_PARAMS((void));
/* Module search path manipulation. */ /* Module search path manipulation. */
extern int lt_dladdsearchdir LT_PARAMS((const char *search_dir)); LT_SCOPE int lt_dladdsearchdir LT_PARAMS((const char *search_dir));
extern int lt_dlinsertsearchdir LT_PARAMS((const char *before, LT_SCOPE int lt_dlinsertsearchdir LT_PARAMS((const char *before,
const char *search_dir)); const char *search_dir));
extern int lt_dlsetsearchpath LT_PARAMS((const char *search_path)); LT_SCOPE int lt_dlsetsearchpath LT_PARAMS((const char *search_path));
extern const char *lt_dlgetsearchpath LT_PARAMS((void)); LT_SCOPE const char *lt_dlgetsearchpath LT_PARAMS((void));
extern int lt_dlforeachfile LT_PARAMS(( LT_SCOPE int lt_dlforeachfile LT_PARAMS((
const char *search_path, const char *search_path,
int (*func) (const char *filename, lt_ptr data), int (*func) (const char *filename, lt_ptr data),
lt_ptr data)); lt_ptr data));
/* Portable libltdl versions of the system dlopen() API. */ /* Portable libltdl versions of the system dlopen() API. */
extern lt_dlhandle lt_dlopen LT_PARAMS((const char *filename)); LT_SCOPE lt_dlhandle lt_dlopen LT_PARAMS((const char *filename));
extern lt_dlhandle lt_dlopenext LT_PARAMS((const char *filename)); LT_SCOPE lt_dlhandle lt_dlopenext LT_PARAMS((const char *filename));
extern lt_ptr lt_dlsym LT_PARAMS((lt_dlhandle handle, LT_SCOPE lt_ptr lt_dlsym LT_PARAMS((lt_dlhandle handle,
const char *name)); const char *name));
extern const char *lt_dlerror LT_PARAMS((void)); LT_SCOPE const char *lt_dlerror LT_PARAMS((void));
extern int lt_dlclose LT_PARAMS((lt_dlhandle handle)); LT_SCOPE int lt_dlclose LT_PARAMS((lt_dlhandle handle));
/* Module residency management. */ /* Module residency management. */
extern int lt_dlmakeresident LT_PARAMS((lt_dlhandle handle)); LT_SCOPE int lt_dlmakeresident LT_PARAMS((lt_dlhandle handle));
extern int lt_dlisresident LT_PARAMS((lt_dlhandle handle)); LT_SCOPE int lt_dlisresident LT_PARAMS((lt_dlhandle handle));
...@@ -185,7 +190,7 @@ typedef void lt_dlmutex_unlock LT_PARAMS((void)); ...@@ -185,7 +190,7 @@ typedef void lt_dlmutex_unlock LT_PARAMS((void));
typedef void lt_dlmutex_seterror LT_PARAMS((const char *errmsg)); typedef void lt_dlmutex_seterror LT_PARAMS((const char *errmsg));
typedef const char *lt_dlmutex_geterror LT_PARAMS((void)); typedef const char *lt_dlmutex_geterror LT_PARAMS((void));
extern int lt_dlmutex_register LT_PARAMS((lt_dlmutex_lock *lock, LT_SCOPE int lt_dlmutex_register LT_PARAMS((lt_dlmutex_lock *lock,
lt_dlmutex_unlock *unlock, lt_dlmutex_unlock *unlock,
lt_dlmutex_seterror *seterror, lt_dlmutex_seterror *seterror,
lt_dlmutex_geterror *geterror)); lt_dlmutex_geterror *geterror));
...@@ -218,8 +223,8 @@ typedef struct { ...@@ -218,8 +223,8 @@ typedef struct {
lt_ptr address; lt_ptr address;
} lt_dlsymlist; } lt_dlsymlist;
extern int lt_dlpreload LT_PARAMS((const lt_dlsymlist *preloaded)); LT_SCOPE int lt_dlpreload LT_PARAMS((const lt_dlsymlist *preloaded));
extern int lt_dlpreload_default LT_SCOPE int lt_dlpreload_default
LT_PARAMS((const lt_dlsymlist *preloaded)); LT_PARAMS((const lt_dlsymlist *preloaded));
#define LTDL_SET_PRELOADED_SYMBOLS() LT_STMT_START{ \ #define LTDL_SET_PRELOADED_SYMBOLS() LT_STMT_START{ \
...@@ -241,20 +246,20 @@ typedef struct { ...@@ -241,20 +246,20 @@ typedef struct {
number of times lt_dlclosed. */ number of times lt_dlclosed. */
} lt_dlinfo; } lt_dlinfo;
extern const lt_dlinfo *lt_dlgetinfo LT_PARAMS((lt_dlhandle handle)); LT_SCOPE const lt_dlinfo *lt_dlgetinfo LT_PARAMS((lt_dlhandle handle));
extern lt_dlhandle lt_dlhandle_next LT_PARAMS((lt_dlhandle place)); LT_SCOPE lt_dlhandle lt_dlhandle_next LT_PARAMS((lt_dlhandle place));
extern int lt_dlforeach LT_PARAMS(( LT_SCOPE int lt_dlforeach LT_PARAMS((
int (*func) (lt_dlhandle handle, lt_ptr data), int (*func) (lt_dlhandle handle, lt_ptr data),
lt_ptr data)); lt_ptr data));
/* Associating user data with loaded modules. */ /* Associating user data with loaded modules. */
typedef unsigned lt_dlcaller_id; typedef unsigned lt_dlcaller_id;
extern lt_dlcaller_id lt_dlcaller_register LT_PARAMS((void)); LT_SCOPE lt_dlcaller_id lt_dlcaller_register LT_PARAMS((void));
extern lt_ptr lt_dlcaller_set_data LT_PARAMS((lt_dlcaller_id key, LT_SCOPE lt_ptr lt_dlcaller_set_data LT_PARAMS((lt_dlcaller_id key,
lt_dlhandle handle, lt_dlhandle handle,
lt_ptr data)); lt_ptr data));
extern lt_ptr lt_dlcaller_get_data LT_PARAMS((lt_dlcaller_id key, LT_SCOPE lt_ptr lt_dlcaller_get_data LT_PARAMS((lt_dlcaller_id key,
lt_dlhandle handle)); lt_dlhandle handle));
...@@ -285,15 +290,15 @@ struct lt_user_dlloader { ...@@ -285,15 +290,15 @@ struct lt_user_dlloader {
lt_user_data dlloader_data; lt_user_data dlloader_data;
}; };
extern lt_dlloader *lt_dlloader_next LT_PARAMS((lt_dlloader *place)); LT_SCOPE lt_dlloader *lt_dlloader_next LT_PARAMS((lt_dlloader *place));
extern lt_dlloader *lt_dlloader_find LT_PARAMS(( LT_SCOPE lt_dlloader *lt_dlloader_find LT_PARAMS((
const char *loader_name)); const char *loader_name));
extern const char *lt_dlloader_name LT_PARAMS((lt_dlloader *place)); LT_SCOPE const char *lt_dlloader_name LT_PARAMS((lt_dlloader *place));
extern lt_user_data *lt_dlloader_data LT_PARAMS((lt_dlloader *place)); LT_SCOPE lt_user_data *lt_dlloader_data LT_PARAMS((lt_dlloader *place));
extern int lt_dlloader_add LT_PARAMS((lt_dlloader *place, LT_SCOPE int lt_dlloader_add LT_PARAMS((lt_dlloader *place,
const struct lt_user_dlloader *dlloader, const struct lt_user_dlloader *dlloader,
const char *loader_name)); const char *loader_name));
extern int lt_dlloader_remove LT_PARAMS(( LT_SCOPE int lt_dlloader_remove LT_PARAMS((
const char *loader_name)); const char *loader_name));
...@@ -336,8 +341,8 @@ enum { ...@@ -336,8 +341,8 @@ enum {
}; };
/* These functions are only useful from inside custom module loaders. */ /* These functions are only useful from inside custom module loaders. */
extern int lt_dladderror LT_PARAMS((const char *diagnostic)); LT_SCOPE int lt_dladderror LT_PARAMS((const char *diagnostic));
extern int lt_dlseterror LT_PARAMS((int errorcode)); LT_SCOPE int lt_dlseterror LT_PARAMS((int errorcode));
......
# ltmain.sh - Provide generalized library-building support services. # ltmain.sh - Provide generalized library-building support services.
# NOTE: Changing this file will not affect anything until you rerun configure. # NOTE: Changing this file will not affect anything until you rerun configure.
# #
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
# Free Software Foundation, Inc. # Free Software Foundation, Inc.
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
# #
...@@ -17,13 +17,41 @@ ...@@ -17,13 +17,41 @@
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# #
# As a special exception to the GNU General Public License, if you # As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a # distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under # configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program. # the same distribution terms that you use for the rest of that program.
basename="s,^.*/,,g"
# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
# is ksh but when the shell is invoked as "sh" and the current value of
# the _XPG environment variable is not equal to 1 (one), the special
# positional parameter $0, within a function call, is the name of the
# function.
progpath="$0"
# The name of this program:
progname=`echo "$progpath" | $SED $basename`
modename="$progname"
# Global variables:
EXIT_SUCCESS=0
EXIT_FAILURE=1
PROGRAM=ltmain.sh
PACKAGE=libtool
VERSION=1.5.16
TIMESTAMP=" (1.1220.2.235 2005/04/25 18:13:26)"
# See if we are running on zsh, and set the options which allow our
# commands through without removal of \ escapes.
if test -n "${ZSH_VERSION+set}" ; then
setopt NO_GLOB_SUBST
fi
# Check that we have a working $echo. # Check that we have a working $echo.
if test "X$1" = X--no-reexec; then if test "X$1" = X--no-reexec; then
# Discard the --no-reexec flag, and continue. # Discard the --no-reexec flag, and continue.
...@@ -36,7 +64,7 @@ elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then ...@@ -36,7 +64,7 @@ elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
: :
else else
# Restart under the correct shell, and then maybe $echo will work. # Restart under the correct shell, and then maybe $echo will work.
exec $SHELL "$0" --no-reexec ${1+"$@"} exec $SHELL "$progpath" --no-reexec ${1+"$@"}
fi fi
if test "X$1" = X--fallback-echo; then if test "X$1" = X--fallback-echo; then
...@@ -45,19 +73,9 @@ if test "X$1" = X--fallback-echo; then ...@@ -45,19 +73,9 @@ if test "X$1" = X--fallback-echo; then
cat <<EOF cat <<EOF
$* $*
EOF EOF
exit 0 exit $EXIT_SUCCESS
fi fi
# The name of this program.
progname=`$echo "$0" | ${SED} 's%^.*/%%'`
modename="$progname"
# Constants.
PROGRAM=ltmain.sh
PACKAGE=libtool
VERSION=1.5.0a
TIMESTAMP=" (1.1220.2.25 2003/08/01 19:08:35) Debian$Rev: 49 $"
default_mode= default_mode=
help="Try \`$progname --help' for more information." help="Try \`$progname --help' for more information."
magic="%%%MAGIC variable%%%" magic="%%%MAGIC variable%%%"
...@@ -94,13 +112,14 @@ if test "${LANG+set}" = set; then ...@@ -94,13 +112,14 @@ if test "${LANG+set}" = set; then
fi fi
# Make sure IFS has a sensible default # Make sure IFS has a sensible default
: ${IFS=" lt_nl='
"} '
IFS=" $lt_nl"
if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
$echo "$modename: not configured to build any kind of library" 1>&2 $echo "$modename: not configured to build any kind of library" 1>&2
$echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
exit 1 exit $EXIT_FAILURE
fi fi
# Global variables. # Global variables.
...@@ -114,15 +133,20 @@ show_help= ...@@ -114,15 +133,20 @@ show_help=
execute_dlfiles= execute_dlfiles=
lo2o="s/\\.lo\$/.${objext}/" lo2o="s/\\.lo\$/.${objext}/"
o2lo="s/\\.${objext}\$/.lo/" o2lo="s/\\.${objext}\$/.lo/"
quote_scanset='[[~#^*{};<>?'"'"' ]'
##################################### #####################################
# Shell function definitions: # Shell function definitions:
# This seems to be the best place for them # This seems to be the best place for them
# func_win32_libid arg
# return the library type of file 'arg'
#
# Need a lot of goo to handle *both* DLLs and import libs # Need a lot of goo to handle *both* DLLs and import libs
# Has to be a shell function in order to 'eat' the argument # Has to be a shell function in order to 'eat' the argument
# that is supplied when $file_magic_command is called. # that is supplied when $file_magic_command is called.
win32_libid () { func_win32_libid ()
{
win32_libid_type="unknown" win32_libid_type="unknown"
win32_fileres=`file -L $1 2>/dev/null` win32_fileres=`file -L $1 2>/dev/null`
case $win32_fileres in case $win32_fileres in
...@@ -131,7 +155,7 @@ win32_libid () { ...@@ -131,7 +155,7 @@ win32_libid () {
;; ;;
*ar\ archive*) # could be an import, or static *ar\ archive*) # could be an import, or static
if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
grep -E 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
win32_nmres=`eval $NM -f posix -A $1 | \ win32_nmres=`eval $NM -f posix -A $1 | \
sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'` sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
if test "X$win32_nmres" = "Ximport" ; then if test "X$win32_nmres" = "Ximport" ; then
...@@ -141,7 +165,7 @@ win32_libid () { ...@@ -141,7 +165,7 @@ win32_libid () {
fi fi
fi fi
;; ;;
*DLL*) *DLL*)
win32_libid_type="x86 DLL" win32_libid_type="x86 DLL"
;; ;;
*executable*) # but shell scripts are "executable" too... *executable*) # but shell scripts are "executable" too...
...@@ -155,9 +179,179 @@ win32_libid () { ...@@ -155,9 +179,179 @@ win32_libid () {
$echo $win32_libid_type $echo $win32_libid_type
} }
# func_infer_tag arg
# Infer tagged configuration to use if any are available and
# if one wasn't chosen via the "--tag" command line option.
# Only attempt this if the compiler in the base compile
# command doesn't match the default compiler.
# arg is usually of the form 'gcc ...'
func_infer_tag ()
{
if test -n "$available_tags" && test -z "$tagname"; then
CC_quoted=
for arg in $CC; do
case $arg in
*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
arg="\"$arg\""
;;
esac
CC_quoted="$CC_quoted $arg"
done
case $@ in
# Blanks in the command may have been stripped by the calling shell,
# but not from the CC environment variable when configure was run.
" $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
# Blanks at the start of $base_compile will cause this to fail
# if we don't check for them as well.
*)
for z in $available_tags; do
if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
# Evaluate the configuration.
eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
CC_quoted=
for arg in $CC; do
# Double-quote args containing other shell metacharacters.
case $arg in
*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
arg="\"$arg\""
;;
esac
CC_quoted="$CC_quoted $arg"
done
case "$@ " in
" $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
# The compiler in the base compile command matches
# the one in the tagged configuration.
# Assume this is the tagged configuration we want.
tagname=$z
break
;;
esac
fi
done
# If $tagname still isn't set, then no tagged configuration
# was found and let the user know that the "--tag" command
# line option must be used.
if test -z "$tagname"; then
$echo "$modename: unable to infer tagged configuration"
$echo "$modename: specify a tag with \`--tag'" 1>&2
exit $EXIT_FAILURE
# else
# $echo "$modename: using $tagname tagged configuration"
fi
;;
esac
fi
}
# func_extract_an_archive dir oldlib
func_extract_an_archive ()
{
f_ex_an_ar_dir="$1"; shift
f_ex_an_ar_oldlib="$1"
$show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
$run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
:
else
$echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
exit $EXIT_FAILURE
fi
}
# func_extract_archives gentop oldlib ...
func_extract_archives ()
{
my_gentop="$1"; shift
my_oldlibs=${1+"$@"}
my_oldobjs=""
my_xlib=""
my_xabs=""
my_xdir=""
my_status=""
$show "${rm}r $my_gentop"
$run ${rm}r "$my_gentop"
$show "$mkdir $my_gentop"
$run $mkdir "$my_gentop"
my_status=$?
if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
exit $my_status
fi
for my_xlib in $my_oldlibs; do
# Extract the objects.
case $my_xlib in
[\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
*) my_xabs=`pwd`"/$my_xlib" ;;
esac
my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
my_xdir="$my_gentop/$my_xlib"
$show "${rm}r $my_xdir"
$run ${rm}r "$my_xdir"
$show "$mkdir $my_xdir"
$run $mkdir "$my_xdir"
status=$?
if test "$status" -ne 0 && test ! -d "$my_xdir"; then
exit $status
fi
case $host in
*-darwin*)
$show "Extracting $my_xabs"
# Do not bother doing anything if just a dry run
if test -z "$run"; then
darwin_orig_dir=`pwd`
cd $my_xdir || exit $?
darwin_archive=$my_xabs
darwin_curdir=`pwd`
darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
if test -n "$darwin_arches"; then
darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
darwin_arch=
$show "$darwin_base_archive has multiple architectures $darwin_arches"
for darwin_arch in $darwin_arches ; do
mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
func_extract_an_archive "`pwd`" "${darwin_base_archive}"
cd "$darwin_curdir"
$rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
done # $darwin_arches
## Okay now we have a bunch of thin objects, gotta fatten them up :)
darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
darwin_file=
darwin_files=
for darwin_file in $darwin_filelist; do
darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
lipo -create -output "$darwin_file" $darwin_files
done # $darwin_filelist
${rm}r unfat-$$
cd "$darwin_orig_dir"
else
cd "$darwin_orig_dir"
func_extract_an_archive "$my_xdir" "$my_xabs"
fi # $darwin_arches
fi # $run
;;
*)
func_extract_an_archive "$my_xdir" "$my_xabs"
;;
esac
my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
done
func_extract_archives_result="$my_oldobjs"
}
# End of Shell function definitions # End of Shell function definitions
##################################### #####################################
# Darwin sucks
eval std_shrext=\"$shrext_cmds\"
# Parse our command line options once, thoroughly. # Parse our command line options once, thoroughly.
while test "$#" -gt 0 while test "$#" -gt 0
do do
...@@ -177,12 +371,13 @@ do ...@@ -177,12 +371,13 @@ do
;; ;;
tag) tag)
tagname="$arg" tagname="$arg"
preserve_args="${preserve_args}=$arg"
# Check whether tagname contains only valid characters # Check whether tagname contains only valid characters
case $tagname in case $tagname in
*[!-_A-Za-z0-9,/]*) *[!-_A-Za-z0-9,/]*)
$echo "$progname: invalid tag name: $tagname" 1>&2 $echo "$progname: invalid tag name: $tagname" 1>&2
exit 1 exit $EXIT_FAILURE
;; ;;
esac esac
...@@ -192,10 +387,10 @@ do ...@@ -192,10 +387,10 @@ do
# not specially marked. # not specially marked.
;; ;;
*) *)
if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$0" > /dev/null; then if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
taglist="$taglist $tagname" taglist="$taglist $tagname"
# Evaluate the configuration. # Evaluate the configuration.
eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $0`" eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
else else
$echo "$progname: ignoring unknown tag $tagname" 1>&2 $echo "$progname: ignoring unknown tag $tagname" 1>&2
fi fi
...@@ -221,24 +416,25 @@ do ...@@ -221,24 +416,25 @@ do
--version) --version)
$echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
$echo $echo
$echo "Copyright (C) 2003 Free Software Foundation, Inc." $echo "Copyright (C) 2005 Free Software Foundation, Inc."
$echo "This is free software; see the source for copying conditions. There is NO" $echo "This is free software; see the source for copying conditions. There is NO"
$echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
exit 0 exit $?
;; ;;
--config) --config)
${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0 ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
# Now print the configurations for the tags. # Now print the configurations for the tags.
for tagname in $taglist; do for tagname in $taglist; do
${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$0" ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
done done
exit 0 exit $?
;; ;;
--debug) --debug)
$echo "$progname: enabling shell trace mode" $echo "$progname: enabling shell trace mode"
set -x set -x
preserve_args="$preserve_args $arg"
;; ;;
--dry-run | -n) --dry-run | -n)
...@@ -257,7 +453,7 @@ do ...@@ -257,7 +453,7 @@ do
else else
$echo "disable static libraries" $echo "disable static libraries"
fi fi
exit 0 exit $?
;; ;;
--finish) mode="finish" ;; --finish) mode="finish" ;;
...@@ -269,6 +465,7 @@ do ...@@ -269,6 +465,7 @@ do
--quiet | --silent) --quiet | --silent)
show=: show=:
preserve_args="$preserve_args $arg"
;; ;;
--tag) prevopt="--tag" prev=tag ;; --tag) prevopt="--tag" prev=tag ;;
...@@ -276,6 +473,7 @@ do ...@@ -276,6 +473,7 @@ do
set tag "$optarg" ${1+"$@"} set tag "$optarg" ${1+"$@"}
shift shift
prev=tag prev=tag
preserve_args="$preserve_args --tag"
;; ;;
-dlopen) -dlopen)
...@@ -286,7 +484,7 @@ do ...@@ -286,7 +484,7 @@ do
-*) -*)
$echo "$modename: unrecognized option \`$arg'" 1>&2 $echo "$modename: unrecognized option \`$arg'" 1>&2
$echo "$help" 1>&2 $echo "$help" 1>&2
exit 1 exit $EXIT_FAILURE
;; ;;
*) *)
...@@ -299,7 +497,7 @@ done ...@@ -299,7 +497,7 @@ done
if test -n "$prevopt"; then if test -n "$prevopt"; then
$echo "$modename: option \`$prevopt' requires an argument" 1>&2 $echo "$modename: option \`$prevopt' requires an argument" 1>&2
$echo "$help" 1>&2 $echo "$help" 1>&2
exit 1 exit $EXIT_FAILURE
fi fi
# If this variable is set in any of the actions, the command in it # If this variable is set in any of the actions, the command in it
...@@ -312,7 +510,7 @@ if test -z "$show_help"; then ...@@ -312,7 +510,7 @@ if test -z "$show_help"; then
# Infer the operation mode. # Infer the operation mode.
if test -z "$mode"; then if test -z "$mode"; then
$echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
$echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2 $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
case $nonopt in case $nonopt in
*cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
mode=link mode=link
...@@ -355,7 +553,7 @@ if test -z "$show_help"; then ...@@ -355,7 +553,7 @@ if test -z "$show_help"; then
if test -n "$execute_dlfiles" && test "$mode" != execute; then if test -n "$execute_dlfiles" && test "$mode" != execute; then
$echo "$modename: unrecognized option \`-dlopen'" 1>&2 $echo "$modename: unrecognized option \`-dlopen'" 1>&2
$echo "$help" 1>&2 $echo "$help" 1>&2
exit 1 exit $EXIT_FAILURE
fi fi
# Change the help message to a mode-specific one. # Change the help message to a mode-specific one.
...@@ -370,9 +568,11 @@ if test -z "$show_help"; then ...@@ -370,9 +568,11 @@ if test -z "$show_help"; then
# Get the compilation command and the source file. # Get the compilation command and the source file.
base_compile= base_compile=
srcfile="$nonopt" # always keep a non-empty value in "srcfile" srcfile="$nonopt" # always keep a non-empty value in "srcfile"
suppress_opt=yes
suppress_output= suppress_output=
arg_mode=normal arg_mode=normal
libobj= libobj=
later=
for arg for arg
do do
...@@ -395,24 +595,19 @@ if test -z "$show_help"; then ...@@ -395,24 +595,19 @@ if test -z "$show_help"; then
-o) -o)
if test -n "$libobj" ; then if test -n "$libobj" ; then
$echo "$modename: you cannot specify \`-o' more than once" 1>&2 $echo "$modename: you cannot specify \`-o' more than once" 1>&2
exit 1 exit $EXIT_FAILURE
fi fi
arg_mode=target arg_mode=target
continue continue
;; ;;
-static) -static | -prefer-pic | -prefer-non-pic)
build_old_libs=yes later="$later $arg"
continue
;;
-prefer-pic)
pic_mode=yes
continue continue
;; ;;
-prefer-non-pic) -no-suppress)
pic_mode=no suppress_opt=no
continue continue
;; ;;
...@@ -425,14 +620,14 @@ if test -z "$show_help"; then ...@@ -425,14 +620,14 @@ if test -z "$show_help"; then
args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
lastarg= lastarg=
save_ifs="$IFS"; IFS=',' save_ifs="$IFS"; IFS=','
for arg in $args; do for arg in $args; do
IFS="$save_ifs" IFS="$save_ifs"
# Double-quote args containing other shell metacharacters. # Double-quote args containing other shell metacharacters.
# Many Bourne shells cannot handle close brackets correctly # Many Bourne shells cannot handle close brackets correctly
# in scan sets, so we specify it separately. # in scan sets, so we specify it separately.
case $arg in case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
arg="\"$arg\"" arg="\"$arg\""
;; ;;
esac esac
...@@ -463,8 +658,11 @@ if test -z "$show_help"; then ...@@ -463,8 +658,11 @@ if test -z "$show_help"; then
case $lastarg in case $lastarg in
# Double-quote args containing other shell metacharacters. # Double-quote args containing other shell metacharacters.
# Many Bourne shells cannot handle close brackets correctly # Many Bourne shells cannot handle close brackets correctly
# in scan sets, so we specify it separately. # in scan sets, and some SunOS ksh mistreat backslash-escaping
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") # in scan sets (worked around with variable expansion),
# and furthermore cannot handle '|' '&' '(' ')' in scan sets
# at all, so we specify them separately.
*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
lastarg="\"$lastarg\"" lastarg="\"$lastarg\""
;; ;;
esac esac
...@@ -475,11 +673,11 @@ if test -z "$show_help"; then ...@@ -475,11 +673,11 @@ if test -z "$show_help"; then
case $arg_mode in case $arg_mode in
arg) arg)
$echo "$modename: you must specify an argument for -Xcompile" $echo "$modename: you must specify an argument for -Xcompile"
exit 1 exit $EXIT_FAILURE
;; ;;
target) target)
$echo "$modename: you must specify a target with \`-o'" 1>&2 $echo "$modename: you must specify a target with \`-o'" 1>&2
exit 1 exit $EXIT_FAILURE
;; ;;
*) *)
# Get the name of the library object. # Get the name of the library object.
...@@ -512,51 +710,40 @@ if test -z "$show_help"; then ...@@ -512,51 +710,40 @@ if test -z "$show_help"; then
*.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
*) *)
$echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
exit 1 exit $EXIT_FAILURE
;; ;;
esac esac
# Infer tagged configuration to use if any are available and func_infer_tag $base_compile
# if one wasn't chosen via the "--tag" command line option.
# Only attempt this if the compiler in the base compile for arg in $later; do
# command doesn't match the default compiler. case $arg in
if test -n "$available_tags" && test -z "$tagname"; then -static)
case $base_compile in build_old_libs=yes
# Blanks in the command may have been stripped by the calling shell, continue
# but not from the CC environment variable when configure was run. ;;
" $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "*) ;;
# Blanks at the start of $base_compile will cause this to fail -prefer-pic)
# if we don't check for them as well. pic_mode=yes
*) continue
for z in $available_tags; do ;;
if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then
# Evaluate the configuration. -prefer-non-pic)
eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`" pic_mode=no
case "$base_compile " in continue
"$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*)
# The compiler in the base compile command matches
# the one in the tagged configuration.
# Assume this is the tagged configuration we want.
tagname=$z
break
;;
esac
fi
done
# If $tagname still isn't set, then no tagged configuration
# was found and let the user know that the "--tag" command
# line option must be used.
if test -z "$tagname"; then
$echo "$modename: unable to infer tagged configuration"
$echo "$modename: specify a tag with \`--tag'" 1>&2
exit 1
# else
# $echo "$modename: using $tagname tagged configuration"
fi
;; ;;
esac esac
fi done
qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
case $qlibobj in
*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
qlibobj="\"$qlibobj\"" ;;
esac
if test "X$libobj" != "X$qlibobj"; then
$echo "$modename: libobj name \`$libobj' may not contain shell special characters."
exit $EXIT_FAILURE
fi
objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
if test "X$xdir" = "X$obj"; then if test "X$xdir" = "X$obj"; then
...@@ -569,7 +756,7 @@ if test -z "$show_help"; then ...@@ -569,7 +756,7 @@ if test -z "$show_help"; then
if test -z "$base_compile"; then if test -z "$base_compile"; then
$echo "$modename: you must specify a compilation command" 1>&2 $echo "$modename: you must specify a compilation command" 1>&2
$echo "$help" 1>&2 $echo "$help" 1>&2
exit 1 exit $EXIT_FAILURE
fi fi
# Delete any leftover library objects. # Delete any leftover library objects.
...@@ -580,7 +767,7 @@ if test -z "$show_help"; then ...@@ -580,7 +767,7 @@ if test -z "$show_help"; then
fi fi
$run $rm $removelist $run $rm $removelist
trap "$run $rm $removelist; exit 1" 1 2 15 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
# On Cygwin there's no "real" PIC flag so we must build both object types # On Cygwin there's no "real" PIC flag so we must build both object types
case $host_os in case $host_os in
...@@ -599,7 +786,7 @@ if test -z "$show_help"; then ...@@ -599,7 +786,7 @@ if test -z "$show_help"; then
output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
lockfile="$output_obj.lock" lockfile="$output_obj.lock"
removelist="$removelist $output_obj $lockfile" removelist="$removelist $output_obj $lockfile"
trap "$run $rm $removelist; exit 1" 1 2 15 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
else else
output_obj= output_obj=
need_locks=no need_locks=no
...@@ -609,7 +796,7 @@ if test -z "$show_help"; then ...@@ -609,7 +796,7 @@ if test -z "$show_help"; then
# Lock this critical section if it is needed # Lock this critical section if it is needed
# We use this script file to make the link, it avoids creating a new file # We use this script file to make the link, it avoids creating a new file
if test "$need_locks" = yes; then if test "$need_locks" = yes; then
until $run ln "$0" "$lockfile" 2>/dev/null; do until $run ln "$progpath" "$lockfile" 2>/dev/null; do
$show "Waiting for $lockfile to be removed" $show "Waiting for $lockfile to be removed"
sleep 2 sleep 2
done done
...@@ -627,14 +814,19 @@ avoid parallel builds (make -j) in this platform, or get a better ...@@ -627,14 +814,19 @@ avoid parallel builds (make -j) in this platform, or get a better
compiler." compiler."
$run $rm $removelist $run $rm $removelist
exit 1 exit $EXIT_FAILURE
fi fi
$echo $srcfile > "$lockfile" $echo "$srcfile" > "$lockfile"
fi fi
if test -n "$fix_srcfile_path"; then if test -n "$fix_srcfile_path"; then
eval srcfile=\"$fix_srcfile_path\" eval srcfile=\"$fix_srcfile_path\"
fi fi
qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
case $qsrcfile in
*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
qsrcfile="\"$qsrcfile\"" ;;
esac
$run $rm "$libobj" "${libobj}T" $run $rm "$libobj" "${libobj}T"
...@@ -656,10 +848,10 @@ EOF ...@@ -656,10 +848,10 @@ EOF
fbsd_hideous_sh_bug=$base_compile fbsd_hideous_sh_bug=$base_compile
if test "$pic_mode" != no; then if test "$pic_mode" != no; then
command="$base_compile $srcfile $pic_flag" command="$base_compile $qsrcfile $pic_flag"
else else
# Don't build PIC code # Don't build PIC code
command="$base_compile $srcfile" command="$base_compile $qsrcfile"
fi fi
if test ! -d "${xdir}$objdir"; then if test ! -d "${xdir}$objdir"; then
...@@ -682,7 +874,7 @@ EOF ...@@ -682,7 +874,7 @@ EOF
if $run eval "$command"; then : if $run eval "$command"; then :
else else
test -n "$output_obj" && $run $rm $removelist test -n "$output_obj" && $run $rm $removelist
exit 1 exit $EXIT_FAILURE
fi fi
if test "$need_locks" = warn && if test "$need_locks" = warn &&
...@@ -702,7 +894,7 @@ avoid parallel builds (make -j) in this platform, or get a better ...@@ -702,7 +894,7 @@ avoid parallel builds (make -j) in this platform, or get a better
compiler." compiler."
$run $rm $removelist $run $rm $removelist
exit 1 exit $EXIT_FAILURE
fi fi
# Just move the object if needed, then go on to compile the next one # Just move the object if needed, then go on to compile the next one
...@@ -723,7 +915,9 @@ pic_object='$objdir/$objname' ...@@ -723,7 +915,9 @@ pic_object='$objdir/$objname'
EOF EOF
# Allow error messages only from the first compilation. # Allow error messages only from the first compilation.
suppress_output=' >/dev/null 2>&1' if test "$suppress_opt" = yes; then
suppress_output=' >/dev/null 2>&1'
fi
else else
# No PIC object so indicate it doesn't exist in the libtool # No PIC object so indicate it doesn't exist in the libtool
# object file. # object file.
...@@ -737,9 +931,9 @@ EOF ...@@ -737,9 +931,9 @@ EOF
if test "$build_old_libs" = yes; then if test "$build_old_libs" = yes; then
if test "$pic_mode" != yes; then if test "$pic_mode" != yes; then
# Don't build PIC code # Don't build PIC code
command="$base_compile $srcfile" command="$base_compile $qsrcfile"
else else
command="$base_compile $srcfile $pic_flag" command="$base_compile $qsrcfile $pic_flag"
fi fi
if test "$compiler_c_o" = yes; then if test "$compiler_c_o" = yes; then
command="$command -o $obj" command="$command -o $obj"
...@@ -752,7 +946,7 @@ EOF ...@@ -752,7 +946,7 @@ EOF
if $run eval "$command"; then : if $run eval "$command"; then :
else else
$run $rm $removelist $run $rm $removelist
exit 1 exit $EXIT_FAILURE
fi fi
if test "$need_locks" = warn && if test "$need_locks" = warn &&
...@@ -772,7 +966,7 @@ avoid parallel builds (make -j) in this platform, or get a better ...@@ -772,7 +966,7 @@ avoid parallel builds (make -j) in this platform, or get a better
compiler." compiler."
$run $rm $removelist $run $rm $removelist
exit 1 exit $EXIT_FAILURE
fi fi
# Just move the object if needed # Just move the object if needed
...@@ -810,7 +1004,7 @@ EOF ...@@ -810,7 +1004,7 @@ EOF
$run $rm "$lockfile" $run $rm "$lockfile"
fi fi
exit 0 exit $EXIT_SUCCESS
;; ;;
# libtool link mode # libtool link mode
...@@ -836,7 +1030,7 @@ EOF ...@@ -836,7 +1030,7 @@ EOF
;; ;;
esac esac
libtool_args="$nonopt" libtool_args="$nonopt"
base_compile="$nonopt" base_compile="$nonopt $@"
compile_command="$nonopt" compile_command="$nonopt"
finalize_command="$nonopt" finalize_command="$nonopt"
...@@ -868,6 +1062,7 @@ EOF ...@@ -868,6 +1062,7 @@ EOF
no_install=no no_install=no
objs= objs=
non_pic_objects= non_pic_objects=
precious_files_regex=
prefer_static_libs=no prefer_static_libs=no
preload=no preload=no
prev= prev=
...@@ -881,6 +1076,8 @@ EOF ...@@ -881,6 +1076,8 @@ EOF
vinfo= vinfo=
vinfo_number=no vinfo_number=no
func_infer_tag $base_compile
# We need to know -static, to get the right output filenames. # We need to know -static, to get the right output filenames.
for arg for arg
do do
...@@ -912,10 +1109,9 @@ EOF ...@@ -912,10 +1109,9 @@ EOF
# Go through the arguments, transforming them on the way. # Go through the arguments, transforming them on the way.
while test "$#" -gt 0; do while test "$#" -gt 0; do
arg="$1" arg="$1"
base_compile="$base_compile $arg"
shift shift
case $arg in case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
;; ;;
*) qarg=$arg ;; *) qarg=$arg ;;
...@@ -976,7 +1172,7 @@ EOF ...@@ -976,7 +1172,7 @@ EOF
export_symbols="$arg" export_symbols="$arg"
if test ! -f "$arg"; then if test ! -f "$arg"; then
$echo "$modename: symbol file \`$arg' does not exist" $echo "$modename: symbol file \`$arg' does not exist"
exit 1 exit $EXIT_FAILURE
fi fi
prev= prev=
continue continue
...@@ -991,6 +1187,11 @@ EOF ...@@ -991,6 +1187,11 @@ EOF
prev= prev=
continue continue
;; ;;
precious_regex)
precious_files_regex="$arg"
prev=
continue
;;
release) release)
release="-$arg" release="-$arg"
prev= prev=
...@@ -1023,7 +1224,7 @@ EOF ...@@ -1023,7 +1224,7 @@ EOF
test "$pic_object" = none && \ test "$pic_object" = none && \
test "$non_pic_object" = none; then test "$non_pic_object" = none; then
$echo "$modename: cannot find name of object for \`$arg'" 1>&2 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
exit 1 exit $EXIT_FAILURE
fi fi
# Extract subdirectory from the argument. # Extract subdirectory from the argument.
...@@ -1076,7 +1277,7 @@ EOF ...@@ -1076,7 +1277,7 @@ EOF
# Only an error if not doing a dry-run. # Only an error if not doing a dry-run.
if test -z "$run"; then if test -z "$run"; then
$echo "$modename: \`$arg' is not a valid libtool object" 1>&2 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
exit 1 exit $EXIT_FAILURE
else else
# Dry-run case. # Dry-run case.
...@@ -1097,7 +1298,7 @@ EOF ...@@ -1097,7 +1298,7 @@ EOF
done done
else else
$echo "$modename: link input file \`$save_arg' does not exist" $echo "$modename: link input file \`$save_arg' does not exist"
exit 1 exit $EXIT_FAILURE
fi fi
arg=$save_arg arg=$save_arg
prev= prev=
...@@ -1109,7 +1310,7 @@ EOF ...@@ -1109,7 +1310,7 @@ EOF
[\\/]* | [A-Za-z]:[\\/]*) ;; [\\/]* | [A-Za-z]:[\\/]*) ;;
*) *)
$echo "$modename: only absolute run-paths are allowed" 1>&2 $echo "$modename: only absolute run-paths are allowed" 1>&2
exit 1 exit $EXIT_FAILURE
;; ;;
esac esac
if test "$prev" = rpath; then if test "$prev" = rpath; then
...@@ -1149,6 +1350,16 @@ EOF ...@@ -1149,6 +1350,16 @@ EOF
finalize_command="$finalize_command $qarg" finalize_command="$finalize_command $qarg"
continue continue
;; ;;
shrext)
shrext_cmds="$arg"
prev=
continue
;;
darwin_framework)
compiler_flags="$compiler_flags $arg"
prev=
continue
;;
*) *)
eval "$prev=\"\$arg\"" eval "$prev=\"\$arg\""
prev= prev=
...@@ -1197,7 +1408,7 @@ EOF ...@@ -1197,7 +1408,7 @@ EOF
-export-symbols | -export-symbols-regex) -export-symbols | -export-symbols-regex)
if test -n "$export_symbols" || test -n "$export_symbols_regex"; then if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
$echo "$modename: more than one -exported-symbols argument is not allowed" $echo "$modename: more than one -exported-symbols argument is not allowed"
exit 1 exit $EXIT_FAILURE
fi fi
if test "X$arg" = "X-export-symbols"; then if test "X$arg" = "X-export-symbols"; then
prev=expsyms prev=expsyms
...@@ -1207,6 +1418,12 @@ EOF ...@@ -1207,6 +1418,12 @@ EOF
continue continue
;; ;;
-framework)
prev=darwin_framework
compiler_flags="$compiler_flags $arg"
continue
;;
-inst-prefix-dir) -inst-prefix-dir)
prev=inst_prefix prev=inst_prefix
continue continue
...@@ -1233,7 +1450,7 @@ EOF ...@@ -1233,7 +1450,7 @@ EOF
absdir=`cd "$dir" && pwd` absdir=`cd "$dir" && pwd`
if test -z "$absdir"; then if test -z "$absdir"; then
$echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
exit 1 exit $EXIT_FAILURE
fi fi
dir="$absdir" dir="$absdir"
;; ;;
...@@ -1267,7 +1484,7 @@ EOF ...@@ -1267,7 +1484,7 @@ EOF
# These systems don't actually have a C library (as such) # These systems don't actually have a C library (as such)
test "X$arg" = "X-lc" && continue test "X$arg" = "X-lc" && continue
;; ;;
*-*-openbsd* | *-*-freebsd*) *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
# Do not include libc due to us having libc/libc_r. # Do not include libc due to us having libc/libc_r.
test "X$arg" = "X-lc" && continue test "X$arg" = "X-lc" && continue
;; ;;
...@@ -1278,7 +1495,7 @@ EOF ...@@ -1278,7 +1495,7 @@ EOF
esac esac
elif test "X$arg" = "X-lc_r"; then elif test "X$arg" = "X-lc_r"; then
case $host in case $host in
*-*-openbsd* | *-*-freebsd*) *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
# Do not include libc_r directly, use -pthread flag. # Do not include libc_r directly, use -pthread flag.
continue continue
;; ;;
...@@ -1288,23 +1505,41 @@ EOF ...@@ -1288,23 +1505,41 @@ EOF
continue continue
;; ;;
# Tru64 UNIX uses -model [arg] to determine the layout of C++
# classes, name mangling, and exception handling.
-model)
compile_command="$compile_command $arg"
compiler_flags="$compiler_flags $arg"
finalize_command="$finalize_command $arg"
prev=xcompiler
continue
;;
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
compiler_flags="$compiler_flags $arg"
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
continue
;;
-module) -module)
module=yes module=yes
continue continue
;; ;;
# gcc -m* arguments should be passed to the linker via $compiler_flags # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
# in order to pass architecture information to the linker # -r[0-9][0-9]* specifies the processor on the SGI compiler
# (e.g. 32 vs 64-bit). This may also be accomplished via -Wl,-mfoo # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
# but this is not reliable with gcc because gcc may use -mfoo to # +DA*, +DD* enable 64-bit mode on the HP compiler
# select a different linker, different libraries, etc, while # -q* pass through compiler args for the IBM compiler
# -Wl,-mfoo simply passes -mfoo to the linker. # -m* pass through architecture-specific compiler args for GCC
-m*) -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*)
# Unknown arguments in both finalize_command and compile_command need # Unknown arguments in both finalize_command and compile_command need
# to be aesthetically quoted because they are evaled later. # to be aesthetically quoted because they are evaled later.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
case $arg in case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
arg="\"$arg\"" arg="\"$arg\""
;; ;;
esac esac
...@@ -1352,6 +1587,11 @@ EOF ...@@ -1352,6 +1587,11 @@ EOF
-o) prev=output ;; -o) prev=output ;;
-precious-files-regex)
prev=precious_regex
continue
;;
-release) -release)
prev=release prev=release
continue continue
...@@ -1374,7 +1614,7 @@ EOF ...@@ -1374,7 +1614,7 @@ EOF
[\\/]* | [A-Za-z]:[\\/]*) ;; [\\/]* | [A-Za-z]:[\\/]*) ;;
*) *)
$echo "$modename: only absolute run-paths are allowed" 1>&2 $echo "$modename: only absolute run-paths are allowed" 1>&2
exit 1 exit $EXIT_FAILURE
;; ;;
esac esac
case "$xrpath " in case "$xrpath " in
...@@ -1415,7 +1655,7 @@ EOF ...@@ -1415,7 +1655,7 @@ EOF
for flag in $args; do for flag in $args; do
IFS="$save_ifs" IFS="$save_ifs"
case $flag in case $flag in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
flag="\"$flag\"" flag="\"$flag\""
;; ;;
esac esac
...@@ -1433,7 +1673,7 @@ EOF ...@@ -1433,7 +1673,7 @@ EOF
for flag in $args; do for flag in $args; do
IFS="$save_ifs" IFS="$save_ifs"
case $flag in case $flag in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
flag="\"$flag\"" flag="\"$flag\""
;; ;;
esac esac
...@@ -1466,7 +1706,7 @@ EOF ...@@ -1466,7 +1706,7 @@ EOF
# to be aesthetically quoted because they are evaled later. # to be aesthetically quoted because they are evaled later.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
case $arg in case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
arg="\"$arg\"" arg="\"$arg\""
;; ;;
esac esac
...@@ -1497,7 +1737,7 @@ EOF ...@@ -1497,7 +1737,7 @@ EOF
test "$pic_object" = none && \ test "$pic_object" = none && \
test "$non_pic_object" = none; then test "$non_pic_object" = none; then
$echo "$modename: cannot find name of object for \`$arg'" 1>&2 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
exit 1 exit $EXIT_FAILURE
fi fi
# Extract subdirectory from the argument. # Extract subdirectory from the argument.
...@@ -1550,7 +1790,7 @@ EOF ...@@ -1550,7 +1790,7 @@ EOF
# Only an error if not doing a dry-run. # Only an error if not doing a dry-run.
if test -z "$run"; then if test -z "$run"; then
$echo "$modename: \`$arg' is not a valid libtool object" 1>&2 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
exit 1 exit $EXIT_FAILURE
else else
# Dry-run case. # Dry-run case.
...@@ -1600,7 +1840,7 @@ EOF ...@@ -1600,7 +1840,7 @@ EOF
# to be aesthetically quoted because they are evaled later. # to be aesthetically quoted because they are evaled later.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
case $arg in case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
arg="\"$arg\"" arg="\"$arg\""
;; ;;
esac esac
...@@ -1617,48 +1857,7 @@ EOF ...@@ -1617,48 +1857,7 @@ EOF
if test -n "$prev"; then if test -n "$prev"; then
$echo "$modename: the \`$prevarg' option requires an argument" 1>&2 $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
$echo "$help" 1>&2 $echo "$help" 1>&2
exit 1 exit $EXIT_FAILURE
fi
# Infer tagged configuration to use if any are available and
# if one wasn't chosen via the "--tag" command line option.
# Only attempt this if the compiler in the base link
# command doesn't match the default compiler.
if test -n "$available_tags" && test -z "$tagname"; then
case $base_compile in
# Blanks in the command may have been stripped by the calling shell,
# but not from the CC environment variable when configure was run.
"$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) ;;
# Blanks at the start of $base_compile will cause this to fail
# if we don't check for them as well.
*)
for z in $available_tags; do
if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then
# Evaluate the configuration.
eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
case $base_compile in
"$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*)
# The compiler in $compile_command matches
# the one in the tagged configuration.
# Assume this is the tagged configuration we want.
tagname=$z
break
;;
esac
fi
done
# If $tagname still isn't set, then no tagged configuration
# was found and let the user know that the "--tag" command
# line option must be used.
if test -z "$tagname"; then
$echo "$modename: unable to infer tagged configuration"
$echo "$modename: specify a tag with \`--tag'" 1>&2
exit 1
# else
# $echo "$modename: using $tagname tagged configuration"
fi
;;
esac
fi fi
if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
...@@ -1702,7 +1901,7 @@ EOF ...@@ -1702,7 +1901,7 @@ EOF
"") "")
$echo "$modename: you must specify an output file" 1>&2 $echo "$modename: you must specify an output file" 1>&2
$echo "$help" 1>&2 $echo "$help" 1>&2
exit 1 exit $EXIT_FAILURE
;; ;;
*.$libext) linkmode=oldlib ;; *.$libext) linkmode=oldlib ;;
*.lo | *.$objext) linkmode=obj ;; *.lo | *.$objext) linkmode=obj ;;
...@@ -1712,7 +1911,7 @@ EOF ...@@ -1712,7 +1911,7 @@ EOF
case $host in case $host in
*cygwin* | *mingw* | *pw32*) *cygwin* | *mingw* | *pw32*)
# don't eliminate duplcations in $postdeps and $predeps # don't eliminate duplications in $postdeps and $predeps
duplicate_compiler_generated_deps=yes duplicate_compiler_generated_deps=yes
;; ;;
*) *)
...@@ -1765,7 +1964,7 @@ EOF ...@@ -1765,7 +1964,7 @@ EOF
*.la) ;; *.la) ;;
*) *)
$echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
exit 1 exit $EXIT_FAILURE
;; ;;
esac esac
done done
...@@ -1803,18 +2002,23 @@ EOF ...@@ -1803,18 +2002,23 @@ EOF
lib= lib=
found=no found=no
case $deplib in case $deplib in
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
if test "$linkmode,$pass" = "prog,link"; then
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"
else
compiler_flags="$compiler_flags $deplib"
fi
continue
;;
-l*) -l*)
if test "$linkmode" != lib && test "$linkmode" != prog; then if test "$linkmode" != lib && test "$linkmode" != prog; then
$echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
continue continue
fi fi
if test "$pass" = conv; then
deplibs="$deplib $deplibs"
continue
fi
name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
for search_ext in .la $shrext .so .a; do for search_ext in .la $std_shrext .so .a; do
# Search the libtool library # Search the libtool library
lib="$searchdir/lib${name}${search_ext}" lib="$searchdir/lib${name}${search_ext}"
if test -f "$lib"; then if test -f "$lib"; then
...@@ -1890,11 +2094,11 @@ EOF ...@@ -1890,11 +2094,11 @@ EOF
fi fi
if test "$pass" = scan; then if test "$pass" = scan; then
deplibs="$deplib $deplibs" deplibs="$deplib $deplibs"
newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
else else
compile_deplibs="$deplib $compile_deplibs" compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs" finalize_deplibs="$deplib $finalize_deplibs"
fi fi
newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
;; ;;
*) *)
$echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
...@@ -1922,7 +2126,22 @@ EOF ...@@ -1922,7 +2126,22 @@ EOF
fi fi
case $linkmode in case $linkmode in
lib) lib)
if test "$deplibs_check_method" != pass_all; then valid_a_lib=no
case $deplibs_check_method in
match_pattern*)
set dummy $deplibs_check_method
match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
if eval $echo \"$deplib\" 2>/dev/null \
| $SED 10q \
| $EGREP "$match_pattern_regex" > /dev/null; then
valid_a_lib=yes
fi
;;
pass_all)
valid_a_lib=yes
;;
esac
if test "$valid_a_lib" != yes; then
$echo $echo
$echo "*** Warning: Trying to link with static lib archive $deplib." $echo "*** Warning: Trying to link with static lib archive $deplib."
$echo "*** I have the capability to make that library automatically link in when" $echo "*** I have the capability to make that library automatically link in when"
...@@ -1973,14 +2192,14 @@ EOF ...@@ -1973,14 +2192,14 @@ EOF
if test "$found" = yes || test -f "$lib"; then : if test "$found" = yes || test -f "$lib"; then :
else else
$echo "$modename: cannot find the library \`$lib'" 1>&2 $echo "$modename: cannot find the library \`$lib'" 1>&2
exit 1 exit $EXIT_FAILURE
fi fi
# Check to see that this really is a libtool archive. # Check to see that this really is a libtool archive.
if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
else else
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
exit 1 exit $EXIT_FAILURE
fi fi
ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
...@@ -1996,6 +2215,8 @@ EOF ...@@ -1996,6 +2215,8 @@ EOF
# it will not redefine variables installed, or shouldnotlink # it will not redefine variables installed, or shouldnotlink
installed=yes installed=yes
shouldnotlink=no shouldnotlink=no
avoidtemprpath=
# Read the .la file # Read the .la file
case $lib in case $lib in
...@@ -2016,7 +2237,7 @@ EOF ...@@ -2016,7 +2237,7 @@ EOF
if test -z "$libdir"; then if test -z "$libdir"; then
if test -z "$old_library"; then if test -z "$old_library"; then
$echo "$modename: cannot find name of link library for \`$lib'" 1>&2 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
exit 1 exit $EXIT_FAILURE
fi fi
# It is a libtool convenience library, so add in its objects. # It is a libtool convenience library, so add in its objects.
convenience="$convenience $ladir/$objdir/$old_library" convenience="$convenience $ladir/$objdir/$old_library"
...@@ -2033,12 +2254,12 @@ EOF ...@@ -2033,12 +2254,12 @@ EOF
done done
elif test "$linkmode" != prog && test "$linkmode" != lib; then elif test "$linkmode" != prog && test "$linkmode" != lib; then
$echo "$modename: \`$lib' is not a convenience library" 1>&2 $echo "$modename: \`$lib' is not a convenience library" 1>&2
exit 1 exit $EXIT_FAILURE
fi fi
continue continue
fi # $pass = conv fi # $pass = conv
# Get the name of the library we link against. # Get the name of the library we link against.
linklib= linklib=
for l in $old_library $library_names; do for l in $old_library $library_names; do
...@@ -2046,16 +2267,18 @@ EOF ...@@ -2046,16 +2267,18 @@ EOF
done done
if test -z "$linklib"; then if test -z "$linklib"; then
$echo "$modename: cannot find name of link library for \`$lib'" 1>&2 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
exit 1 exit $EXIT_FAILURE
fi fi
# This library was specified with -dlopen. # This library was specified with -dlopen.
if test "$pass" = dlopen; then if test "$pass" = dlopen; then
if test -z "$libdir"; then if test -z "$libdir"; then
$echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
exit 1 exit $EXIT_FAILURE
fi fi
if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then if test -z "$dlname" ||
test "$dlopen_support" != yes ||
test "$build_libtool_libs" = no; then
# If there is no dlname, no dlopen support or we're linking # If there is no dlname, no dlopen support or we're linking
# statically, we need to preload. We also need to preload any # statically, we need to preload. We also need to preload any
# dependent libraries so libltdl's deplib preloader doesn't # dependent libraries so libltdl's deplib preloader doesn't
...@@ -2092,11 +2315,19 @@ EOF ...@@ -2092,11 +2315,19 @@ EOF
dir="$libdir" dir="$libdir"
absdir="$libdir" absdir="$libdir"
fi fi
test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
else else
dir="$ladir/$objdir" if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
absdir="$abs_ladir/$objdir" dir="$ladir"
# Remove this search path later absdir="$abs_ladir"
notinst_path="$notinst_path $abs_ladir" # Remove this search path later
notinst_path="$notinst_path $abs_ladir"
else
dir="$ladir/$objdir"
absdir="$abs_ladir/$objdir"
# Remove this search path later
notinst_path="$notinst_path $abs_ladir"
fi
fi # $installed = yes fi # $installed = yes
name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
...@@ -2104,7 +2335,7 @@ EOF ...@@ -2104,7 +2335,7 @@ EOF
if test "$pass" = dlpreopen; then if test "$pass" = dlpreopen; then
if test -z "$libdir"; then if test -z "$libdir"; then
$echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
exit 1 exit $EXIT_FAILURE
fi fi
# Prefer using a static library (so that no silly _DYNAMIC symbols # Prefer using a static library (so that no silly _DYNAMIC symbols
# are required to link). # are required to link).
...@@ -2131,7 +2362,7 @@ EOF ...@@ -2131,7 +2362,7 @@ EOF
continue continue
fi fi
if test "$linkmode" = prog && test "$pass" != link; then if test "$linkmode" = prog && test "$pass" != link; then
newlib_search_path="$newlib_search_path $ladir" newlib_search_path="$newlib_search_path $ladir"
deplibs="$lib $deplibs" deplibs="$lib $deplibs"
...@@ -2169,7 +2400,7 @@ EOF ...@@ -2169,7 +2400,7 @@ EOF
if test -n "$library_names" && if test -n "$library_names" &&
{ test "$prefer_static_libs" = no || test -z "$old_library"; }; then { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
# We need to hardcode the library path # We need to hardcode the library path
if test -n "$shlibpath_var"; then if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
# Make sure the rpath contains only unique directories. # Make sure the rpath contains only unique directories.
case "$temp_rpath " in case "$temp_rpath " in
*" $dir "*) ;; *" $dir "*) ;;
...@@ -2218,17 +2449,18 @@ EOF ...@@ -2218,17 +2449,18 @@ EOF
need_relink=yes need_relink=yes
fi fi
# This is a shared library # This is a shared library
# Warn about portability, can't link against -module's on some systems (darwin) # Warn about portability, can't link against -module's on
if test "$shouldnotlink" = yes && test "$pass" = link ; then # some systems (darwin)
if test "$shouldnotlink" = yes && test "$pass" = link ; then
$echo $echo
if test "$linkmode" = prog; then if test "$linkmode" = prog; then
$echo "*** Warning: Linking the executable $output against the loadable module" $echo "*** Warning: Linking the executable $output against the loadable module"
else else
$echo "*** Warning: Linking the shared library $output against the loadable module" $echo "*** Warning: Linking the shared library $output against the loadable module"
fi fi
$echo "*** $linklib is not portable!" $echo "*** $linklib is not portable!"
fi fi
if test "$linkmode" = lib && if test "$linkmode" = lib &&
test "$hardcode_into_libs" = yes; then test "$hardcode_into_libs" = yes; then
# Hardcode the library path. # Hardcode the library path.
...@@ -2286,9 +2518,10 @@ EOF ...@@ -2286,9 +2518,10 @@ EOF
else else
$show "extracting exported symbol list from \`$soname'" $show "extracting exported symbol list from \`$soname'"
save_ifs="$IFS"; IFS='~' save_ifs="$IFS"; IFS='~'
eval cmds=\"$extract_expsyms_cmds\" cmds=$extract_expsyms_cmds
for cmd in $cmds; do for cmd in $cmds; do
IFS="$save_ifs" IFS="$save_ifs"
eval cmd=\"$cmd\"
$show "$cmd" $show "$cmd"
$run eval "$cmd" || exit $? $run eval "$cmd" || exit $?
done done
...@@ -2299,9 +2532,10 @@ EOF ...@@ -2299,9 +2532,10 @@ EOF
if test -f "$output_objdir/$newlib"; then :; else if test -f "$output_objdir/$newlib"; then :; else
$show "generating import library for \`$soname'" $show "generating import library for \`$soname'"
save_ifs="$IFS"; IFS='~' save_ifs="$IFS"; IFS='~'
eval cmds=\"$old_archive_from_expsyms_cmds\" cmds=$old_archive_from_expsyms_cmds
for cmd in $cmds; do for cmd in $cmds; do
IFS="$save_ifs" IFS="$save_ifs"
eval cmd=\"$cmd\"
$show "$cmd" $show "$cmd"
$run eval "$cmd" || exit $? $run eval "$cmd" || exit $?
done done
...@@ -2324,9 +2558,9 @@ EOF ...@@ -2324,9 +2558,9 @@ EOF
case $host in case $host in
*-*-sco3.2v5* ) add_dir="-L$dir" ;; *-*-sco3.2v5* ) add_dir="-L$dir" ;;
*-*-darwin* ) *-*-darwin* )
# if the lib is a module then we can not link against it, someone # if the lib is a module then we can not link against
# is ignoring the new warnings I added # it, someone is ignoring the new warnings I added
if /usr/bin/file -L $add 2> /dev/null | grep "bundle" >/dev/null ; then if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then
$echo "** Warning, lib $linklib is a module, not a shared library" $echo "** Warning, lib $linklib is a module, not a shared library"
if test -z "$old_library" ; then if test -z "$old_library" ; then
$echo $echo
...@@ -2334,7 +2568,7 @@ EOF ...@@ -2334,7 +2568,7 @@ EOF
$echo "** The link will probably fail, sorry" $echo "** The link will probably fail, sorry"
else else
add="$dir/$old_library" add="$dir/$old_library"
fi fi
fi fi
esac esac
elif test "$hardcode_minus_L" = no; then elif test "$hardcode_minus_L" = no; then
...@@ -2376,7 +2610,7 @@ EOF ...@@ -2376,7 +2610,7 @@ EOF
if test "$lib_linked" != yes; then if test "$lib_linked" != yes; then
$echo "$modename: configuration error: unsupported hardcode properties" $echo "$modename: configuration error: unsupported hardcode properties"
exit 1 exit $EXIT_FAILURE
fi fi
if test -n "$add_shlibpath"; then if test -n "$add_shlibpath"; then
...@@ -2419,7 +2653,8 @@ EOF ...@@ -2419,7 +2653,8 @@ EOF
esac esac
add="-l$name" add="-l$name"
elif test "$hardcode_automatic" = yes; then elif test "$hardcode_automatic" = yes; then
if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then if test -n "$inst_prefix_dir" &&
test -f "$inst_prefix_dir$libdir/$linklib" ; then
add="$inst_prefix_dir$libdir/$linklib" add="$inst_prefix_dir$libdir/$linklib"
else else
add="$libdir/$linklib" add="$libdir/$linklib"
...@@ -2499,7 +2734,8 @@ EOF ...@@ -2499,7 +2734,8 @@ EOF
if test "$linkmode" = lib; then if test "$linkmode" = lib; then
if test -n "$dependency_libs" && if test -n "$dependency_libs" &&
{ test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || { test "$hardcode_into_libs" != yes ||
test "$build_old_libs" = yes ||
test "$link_static" = yes; }; then test "$link_static" = yes; }; then
# Extract -R from dependency_libs # Extract -R from dependency_libs
temp_deplibs= temp_deplibs=
...@@ -2556,7 +2792,7 @@ EOF ...@@ -2556,7 +2792,7 @@ EOF
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
if test -z "$libdir"; then if test -z "$libdir"; then
$echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
exit 1 exit $EXIT_FAILURE
fi fi
if test "$absdir" != "$libdir"; then if test "$absdir" != "$libdir"; then
$echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
...@@ -2566,7 +2802,8 @@ EOF ...@@ -2566,7 +2802,8 @@ EOF
depdepl= depdepl=
case $host in case $host in
*-*-darwin*) *-*-darwin*)
# we do not want to link against static libs, but need to link against shared # we do not want to link against static libs,
# but need to link against shared
eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
if test -n "$deplibrary_names" ; then if test -n "$deplibrary_names" ; then
for tmp in $deplibrary_names ; do for tmp in $deplibrary_names ; do
...@@ -2574,46 +2811,45 @@ EOF ...@@ -2574,46 +2811,45 @@ EOF
done done
if test -f "$path/$depdepl" ; then if test -f "$path/$depdepl" ; then
depdepl="$path/$depdepl" depdepl="$path/$depdepl"
fi fi
# do not add paths which are already there # do not add paths which are already there
case " $newlib_search_path " in case " $newlib_search_path " in
*" $path "*) ;; *" $path "*) ;;
*) newlib_search_path="$newlib_search_path $path";; *) newlib_search_path="$newlib_search_path $path";;
esac esac
path=""
fi fi
path=""
;; ;;
*) *)
path="-L$path" path="-L$path"
;; ;;
esac esac
;; ;;
-l*) -l*)
case $host in case $host in
*-*-darwin*) *-*-darwin*)
# Again, we only want to link against shared libraries # Again, we only want to link against shared libraries
eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
for tmp in $newlib_search_path ; do for tmp in $newlib_search_path ; do
if test -f "$tmp/lib$tmp_libs.dylib" ; then if test -f "$tmp/lib$tmp_libs.dylib" ; then
eval depdepl="$tmp/lib$tmp_libs.dylib" eval depdepl="$tmp/lib$tmp_libs.dylib"
break break
fi fi
done done
path="" path=""
;; ;;
*) continue ;; *) continue ;;
esac esac
;; ;;
*) continue ;; *) continue ;;
esac esac
case " $deplibs " in case " $deplibs " in
*" $depdepl "*) ;;
*) deplibs="$deplibs $depdepl" ;;
esac
case " $deplibs " in
*" $path "*) ;; *" $path "*) ;;
*) deplibs="$deplibs $path" ;; *) deplibs="$path $deplibs" ;;
esac
case " $deplibs " in
*" $depdepl "*) ;;
*) deplibs="$depdepl $deplibs" ;;
esac esac
done done
fi # link_all_deplibs != no fi # link_all_deplibs != no
...@@ -2700,7 +2936,8 @@ EOF ...@@ -2700,7 +2936,8 @@ EOF
eval $var=\"$tmp_libs\" eval $var=\"$tmp_libs\"
done # for var done # for var
fi fi
# Last step: remove runtime libs from dependency_libs (they stay in deplibs) # Last step: remove runtime libs from dependency_libs
# (they stay in deplibs)
tmp_libs= tmp_libs=
for i in $dependency_libs ; do for i in $dependency_libs ; do
case " $predeps $postdeps $compiler_lib_search_path " in case " $predeps $postdeps $compiler_lib_search_path " in
...@@ -2760,19 +2997,19 @@ EOF ...@@ -2760,19 +2997,19 @@ EOF
case $outputname in case $outputname in
lib*) lib*)
name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
eval shared_ext=\"$shrext\" eval shared_ext=\"$shrext_cmds\"
eval libname=\"$libname_spec\" eval libname=\"$libname_spec\"
;; ;;
*) *)
if test "$module" = no; then if test "$module" = no; then
$echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
$echo "$help" 1>&2 $echo "$help" 1>&2
exit 1 exit $EXIT_FAILURE
fi fi
if test "$need_lib_prefix" != no; then if test "$need_lib_prefix" != no; then
# Add the "lib" prefix for modules if required # Add the "lib" prefix for modules if required
name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
eval shared_ext=\"$shrext\" eval shared_ext=\"$shrext_cmds\"
eval libname=\"$libname_spec\" eval libname=\"$libname_spec\"
else else
libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
...@@ -2783,7 +3020,7 @@ EOF ...@@ -2783,7 +3020,7 @@ EOF
if test -n "$objs"; then if test -n "$objs"; then
if test "$deplibs_check_method" != pass_all; then if test "$deplibs_check_method" != pass_all; then
$echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
exit 1 exit $EXIT_FAILURE
else else
$echo $echo
$echo "*** Warning: Linking the shared library $output against the non-libtool" $echo "*** Warning: Linking the shared library $output against the non-libtool"
...@@ -2831,13 +3068,13 @@ EOF ...@@ -2831,13 +3068,13 @@ EOF
if test -n "$8"; then if test -n "$8"; then
$echo "$modename: too many parameters to \`-version-info'" 1>&2 $echo "$modename: too many parameters to \`-version-info'" 1>&2
$echo "$help" 1>&2 $echo "$help" 1>&2
exit 1 exit $EXIT_FAILURE
fi fi
# convert absolute version numbers to libtool ages # convert absolute version numbers to libtool ages
# this retains compatibility with .la files and attempts # this retains compatibility with .la files and attempts
# to make the code below a bit more comprehensible # to make the code below a bit more comprehensible
case $vinfo_number in case $vinfo_number in
yes) yes)
number_major="$2" number_major="$2"
...@@ -2877,36 +3114,36 @@ EOF ...@@ -2877,36 +3114,36 @@ EOF
# Check that each of the things are valid numbers. # Check that each of the things are valid numbers.
case $current in case $current in
0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
*) *)
$echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
exit 1 exit $EXIT_FAILURE
;; ;;
esac esac
case $revision in case $revision in
0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
*) *)
$echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
exit 1 exit $EXIT_FAILURE
;; ;;
esac esac
case $age in case $age in
0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
*) *)
$echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
exit 1 exit $EXIT_FAILURE
;; ;;
esac esac
if test "$age" -gt "$current"; then if test "$age" -gt "$current"; then
$echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
exit 1 exit $EXIT_FAILURE
fi fi
# Calculate the version variables. # Calculate the version variables.
...@@ -2923,7 +3160,7 @@ EOF ...@@ -2923,7 +3160,7 @@ EOF
versuffix="$major.$age.$revision" versuffix="$major.$age.$revision"
# Darwin ld doesn't like 0 for these options... # Darwin ld doesn't like 0 for these options...
minor_current=`expr $current + 1` minor_current=`expr $current + 1`
verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
;; ;;
freebsd-aout) freebsd-aout)
...@@ -2995,7 +3232,7 @@ EOF ...@@ -2995,7 +3232,7 @@ EOF
*) *)
$echo "$modename: unknown library version type \`$version_type'" 1>&2 $echo "$modename: unknown library version type \`$version_type'" 1>&2
$echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
exit 1 exit $EXIT_FAILURE
;; ;;
esac esac
...@@ -3049,6 +3286,12 @@ EOF ...@@ -3049,6 +3286,12 @@ EOF
*.$objext) *.$objext)
;; ;;
$output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
if test "X$precious_files_regex" != "X"; then
if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
then
continue
fi
fi
removelist="$removelist $p" removelist="$removelist $p"
;; ;;
*) ;; *) ;;
...@@ -3123,7 +3366,7 @@ EOF ...@@ -3123,7 +3366,7 @@ EOF
*-*-netbsd*) *-*-netbsd*)
# Don't link with libc until the a.out ld.so is fixed. # Don't link with libc until the a.out ld.so is fixed.
;; ;;
*-*-openbsd* | *-*-freebsd*) *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
# Do not include libc due to us having libc/libc_r. # Do not include libc due to us having libc/libc_r.
test "X$arg" = "X-lc" && continue test "X$arg" = "X-lc" && continue
;; ;;
...@@ -3528,7 +3771,7 @@ EOF ...@@ -3528,7 +3771,7 @@ EOF
fi fi
# Get the real and link names of the library. # Get the real and link names of the library.
eval shared_ext=\"$shrext\" eval shared_ext=\"$shrext_cmds\"
eval library_names=\"$library_names_spec\" eval library_names=\"$library_names_spec\"
set dummy $library_names set dummy $library_names
realname="$2" realname="$2"
...@@ -3558,10 +3801,11 @@ EOF ...@@ -3558,10 +3801,11 @@ EOF
$show "generating symbol list for \`$libname.la'" $show "generating symbol list for \`$libname.la'"
export_symbols="$output_objdir/$libname.exp" export_symbols="$output_objdir/$libname.exp"
$run $rm $export_symbols $run $rm $export_symbols
eval cmds=\"$export_symbols_cmds\" cmds=$export_symbols_cmds
save_ifs="$IFS"; IFS='~' save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do for cmd in $cmds; do
IFS="$save_ifs" IFS="$save_ifs"
eval cmd=\"$cmd\"
if len=`expr "X$cmd" : ".*"` && if len=`expr "X$cmd" : ".*"` &&
test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
$show "$cmd" $show "$cmd"
...@@ -3591,12 +3835,12 @@ EOF ...@@ -3591,12 +3835,12 @@ EOF
for test_deplib in $deplibs; do for test_deplib in $deplibs; do
case " $convenience " in case " $convenience " in
*" $test_deplib "*) ;; *" $test_deplib "*) ;;
*) *)
tmp_deplibs="$tmp_deplibs $test_deplib" tmp_deplibs="$tmp_deplibs $test_deplib"
;; ;;
esac esac
done done
deplibs="$tmp_deplibs" deplibs="$tmp_deplibs"
if test -n "$convenience"; then if test -n "$convenience"; then
if test -n "$whole_archive_flag_spec"; then if test -n "$whole_archive_flag_spec"; then
...@@ -3604,67 +3848,13 @@ EOF ...@@ -3604,67 +3848,13 @@ EOF
eval libobjs=\"\$libobjs $whole_archive_flag_spec\" eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
else else
gentop="$output_objdir/${outputname}x" gentop="$output_objdir/${outputname}x"
$show "${rm}r $gentop"
$run ${rm}r "$gentop"
$show "$mkdir $gentop"
$run $mkdir "$gentop"
status=$?
if test "$status" -ne 0 && test ! -d "$gentop"; then
exit $status
fi
generated="$generated $gentop" generated="$generated $gentop"
for xlib in $convenience; do func_extract_archives $gentop $convenience
# Extract the objects. libobjs="$libobjs $func_extract_archives_result"
case $xlib in
[\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
*) xabs=`pwd`"/$xlib" ;;
esac
xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
xdir="$gentop/$xlib"
$show "${rm}r $xdir"
$run ${rm}r "$xdir"
$show "$mkdir $xdir"
$run $mkdir "$xdir"
status=$?
if test "$status" -ne 0 && test ! -d "$xdir"; then
exit $status
fi
# We will extract separately just the conflicting names and we will no
# longer touch any unique names. It is faster to leave these extract
# automatically by $AR in one run.
$show "(cd $xdir && $AR x $xabs)"
$run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
:
else
$echo "$modename: warning: object name conflicts; renaming object files" 1>&2
$echo "$modename: warning: to ensure that they will not overwrite" 1>&2
$AR t "$xabs" | sort | uniq -cd | while read -r count name
do
i=1
while test "$i" -le "$count"
do
# Put our $i before any first dot (extension)
# Never overwrite any file
name_to="$name"
while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
do
name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
done
$show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
$run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
i=`expr $i + 1`
done
done
fi
libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
done
fi fi
fi fi
if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
eval flag=\"$thread_safe_flag_spec\" eval flag=\"$thread_safe_flag_spec\"
linker_flags="$linker_flags $flag" linker_flags="$linker_flags $flag"
...@@ -3678,19 +3868,23 @@ EOF ...@@ -3678,19 +3868,23 @@ EOF
# Do each of the archive commands. # Do each of the archive commands.
if test "$module" = yes && test -n "$module_cmds" ; then if test "$module" = yes && test -n "$module_cmds" ; then
if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
eval cmds=\"$module_expsym_cmds\" eval test_cmds=\"$module_expsym_cmds\"
cmds=$module_expsym_cmds
else else
eval cmds=\"$module_cmds\" eval test_cmds=\"$module_cmds\"
cmds=$module_cmds
fi fi
else else
if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
eval cmds=\"$archive_expsym_cmds\" eval test_cmds=\"$archive_expsym_cmds\"
cmds=$archive_expsym_cmds
else else
eval cmds=\"$archive_cmds\" eval test_cmds=\"$archive_cmds\"
cmds=$archive_cmds
fi fi
fi fi
if test "X$skipped_export" != "X:" && len=`expr "X$cmds" : ".*"` && if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` &&
test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
: :
else else
...@@ -3709,6 +3903,7 @@ EOF ...@@ -3709,6 +3903,7 @@ EOF
save_libobjs=$libobjs save_libobjs=$libobjs
fi fi
save_output=$output save_output=$output
output_la=`$echo "X$output" | $Xsed -e "$basename"`
# Clear the reloadable object creation command queue and # Clear the reloadable object creation command queue and
# initialize k to one. # initialize k to one.
...@@ -3718,7 +3913,7 @@ EOF ...@@ -3718,7 +3913,7 @@ EOF
delfiles= delfiles=
last_robj= last_robj=
k=1 k=1
output=$output_objdir/$save_output-${k}.$objext output=$output_objdir/$output_la-${k}.$objext
# Loop over the list of objects to be linked. # Loop over the list of objects to be linked.
for obj in $save_libobjs for obj in $save_libobjs
do do
...@@ -3738,9 +3933,9 @@ EOF ...@@ -3738,9 +3933,9 @@ EOF
# the last one created. # the last one created.
eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
fi fi
last_robj=$output_objdir/$save_output-${k}.$objext last_robj=$output_objdir/$output_la-${k}.$objext
k=`expr $k + 1` k=`expr $k + 1`
output=$output_objdir/$save_output-${k}.$objext output=$output_objdir/$output_la-${k}.$objext
objlist=$obj objlist=$obj
len=1 len=1
fi fi
...@@ -3760,13 +3955,13 @@ EOF ...@@ -3760,13 +3955,13 @@ EOF
eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
fi fi
# Set up a command to remove the reloadale object files # Set up a command to remove the reloadable object files
# after they are used. # after they are used.
i=0 i=0
while test "$i" -lt "$k" while test "$i" -lt "$k"
do do
i=`expr $i + 1` i=`expr $i + 1`
delfiles="$delfiles $output_objdir/$save_output-${i}.$objext" delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
done done
$echo "creating a temporary reloadable object file: $output" $echo "creating a temporary reloadable object file: $output"
...@@ -3791,19 +3986,28 @@ EOF ...@@ -3791,19 +3986,28 @@ EOF
# value of $libobjs for piecewise linking. # value of $libobjs for piecewise linking.
# Do each of the archive commands. # Do each of the archive commands.
if test "$module" = yes && test -n "$module_cmds" ; then
if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
cmds=$module_expsym_cmds
else
cmds=$module_cmds
fi
else
if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
eval cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds
else else
eval cmds=\"$archive_cmds\" cmds=$archive_cmds
fi
fi fi
# Append the command to remove the reloadable object files # Append the command to remove the reloadable object files
# to the just-reset $cmds. # to the just-reset $cmds.
eval cmds=\"\$cmds~$rm $delfiles\" eval cmds=\"\$cmds~\$rm $delfiles\"
fi fi
save_ifs="$IFS"; IFS='~' save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do for cmd in $cmds; do
IFS="$save_ifs" IFS="$save_ifs"
eval cmd=\"$cmd\"
$show "$cmd" $show "$cmd"
$run eval "$cmd" || exit $? $run eval "$cmd" || exit $?
done done
...@@ -3812,7 +4016,7 @@ EOF ...@@ -3812,7 +4016,7 @@ EOF
# Restore the uninstalled library and exit # Restore the uninstalled library and exit
if test "$mode" = relink; then if test "$mode" = relink; then
$run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
exit 0 exit $EXIT_SUCCESS
fi fi
# Create links to the real library. # Create links to the real library.
...@@ -3860,7 +4064,7 @@ EOF ...@@ -3860,7 +4064,7 @@ EOF
*.lo) *.lo)
if test -n "$objs$old_deplibs"; then if test -n "$objs$old_deplibs"; then
$echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
exit 1 exit $EXIT_FAILURE
fi fi
libobj="$output" libobj="$output"
obj=`$echo "X$output" | $Xsed -e "$lo2o"` obj=`$echo "X$output" | $Xsed -e "$lo2o"`
...@@ -3889,64 +4093,10 @@ EOF ...@@ -3889,64 +4093,10 @@ EOF
eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
else else
gentop="$output_objdir/${obj}x" gentop="$output_objdir/${obj}x"
$show "${rm}r $gentop"
$run ${rm}r "$gentop"
$show "$mkdir $gentop"
$run $mkdir "$gentop"
status=$?
if test "$status" -ne 0 && test ! -d "$gentop"; then
exit $status
fi
generated="$generated $gentop" generated="$generated $gentop"
for xlib in $convenience; do func_extract_archives $gentop $convenience
# Extract the objects. reload_conv_objs="$reload_objs $func_extract_archives_result"
case $xlib in
[\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
*) xabs=`pwd`"/$xlib" ;;
esac
xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
xdir="$gentop/$xlib"
$show "${rm}r $xdir"
$run ${rm}r "$xdir"
$show "$mkdir $xdir"
$run $mkdir "$xdir"
status=$?
if test "$status" -ne 0 && test ! -d "$xdir"; then
exit $status
fi
# We will extract separately just the conflicting names and we will no
# longer touch any unique names. It is faster to leave these extract
# automatically by $AR in one run.
$show "(cd $xdir && $AR x $xabs)"
$run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
:
else
$echo "$modename: warning: object name conflicts; renaming object files" 1>&2
$echo "$modename: warning: to ensure that they will not overwrite" 1>&2
$AR t "$xabs" | sort | uniq -cd | while read -r count name
do
i=1
while test "$i" -le "$count"
do
# Put our $i before any first dot (extension)
# Never overwrite any file
name_to="$name"
while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
do
name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
done
$show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
$run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
i=`expr $i + 1`
done
done
fi
reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
done
fi fi
fi fi
...@@ -3954,10 +4104,11 @@ EOF ...@@ -3954,10 +4104,11 @@ EOF
reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
output="$obj" output="$obj"
eval cmds=\"$reload_cmds\" cmds=$reload_cmds
save_ifs="$IFS"; IFS='~' save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do for cmd in $cmds; do
IFS="$save_ifs" IFS="$save_ifs"
eval cmd=\"$cmd\"
$show "$cmd" $show "$cmd"
$run eval "$cmd" || exit $? $run eval "$cmd" || exit $?
done done
...@@ -3970,7 +4121,7 @@ EOF ...@@ -3970,7 +4121,7 @@ EOF
$run ${rm}r $gentop $run ${rm}r $gentop
fi fi
exit 0 exit $EXIT_SUCCESS
fi fi
if test "$build_libtool_libs" != yes; then if test "$build_libtool_libs" != yes; then
...@@ -3983,17 +4134,18 @@ EOF ...@@ -3983,17 +4134,18 @@ EOF
# accidentally link it into a program. # accidentally link it into a program.
# $show "echo timestamp > $libobj" # $show "echo timestamp > $libobj"
# $run eval "echo timestamp > $libobj" || exit $? # $run eval "echo timestamp > $libobj" || exit $?
exit 0 exit $EXIT_SUCCESS
fi fi
if test -n "$pic_flag" || test "$pic_mode" != default; then if test -n "$pic_flag" || test "$pic_mode" != default; then
# Only do commands if we really have different PIC objects. # Only do commands if we really have different PIC objects.
reload_objs="$libobjs $reload_conv_objs" reload_objs="$libobjs $reload_conv_objs"
output="$libobj" output="$libobj"
eval cmds=\"$reload_cmds\" cmds=$reload_cmds
save_ifs="$IFS"; IFS='~' save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do for cmd in $cmds; do
IFS="$save_ifs" IFS="$save_ifs"
eval cmd=\"$cmd\"
$show "$cmd" $show "$cmd"
$run eval "$cmd" || exit $? $run eval "$cmd" || exit $?
done done
...@@ -4005,7 +4157,7 @@ EOF ...@@ -4005,7 +4157,7 @@ EOF
$run ${rm}r $gentop $run ${rm}r $gentop
fi fi
exit 0 exit $EXIT_SUCCESS
;; ;;
prog) prog)
...@@ -4206,12 +4358,12 @@ extern \"C\" { ...@@ -4206,12 +4358,12 @@ extern \"C\" {
# Prepare the list of exported symbols # Prepare the list of exported symbols
if test -z "$export_symbols"; then if test -z "$export_symbols"; then
export_symbols="$output_objdir/$output.exp" export_symbols="$output_objdir/$outputname.exp"
$run $rm $export_symbols $run $rm $export_symbols
$run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
else else
$run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' $run eval "${SED} -e 's/\([ ][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
$run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
$run eval 'mv "$nlist"T "$nlist"' $run eval 'mv "$nlist"T "$nlist"'
fi fi
fi fi
...@@ -4263,7 +4415,26 @@ extern \"C\" { ...@@ -4263,7 +4415,26 @@ extern \"C\" {
#endif #endif
/* The mapping between symbol names and symbols. */ /* The mapping between symbol names and symbols. */
"
case $host in
*cygwin* | *mingw* )
$echo >> "$output_objdir/$dlsyms" "\
/* DATA imports from DLLs on WIN32 can't be const, because
runtime relocations are performed -- see ld's documentation
on pseudo-relocs */
struct {
"
;;
* )
$echo >> "$output_objdir/$dlsyms" "\
const struct { const struct {
"
;;
esac
$echo >> "$output_objdir/$dlsyms" "\
const char *name; const char *name;
lt_ptr address; lt_ptr address;
} }
...@@ -4323,7 +4494,7 @@ static const void *lt_preloaded_setup() { ...@@ -4323,7 +4494,7 @@ static const void *lt_preloaded_setup() {
;; ;;
*) *)
$echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
exit 1 exit $EXIT_FAILURE
;; ;;
esac esac
else else
...@@ -4411,7 +4582,7 @@ static const void *lt_preloaded_setup() { ...@@ -4411,7 +4582,7 @@ static const void *lt_preloaded_setup() {
# Link the executable and exit # Link the executable and exit
$show "$link_command" $show "$link_command"
$run eval "$link_command" || exit $? $run eval "$link_command" || exit $?
exit 0 exit $EXIT_SUCCESS
fi fi
if test "$hardcode_action" = relink; then if test "$hardcode_action" = relink; then
...@@ -4466,10 +4637,10 @@ static const void *lt_preloaded_setup() { ...@@ -4466,10 +4637,10 @@ static const void *lt_preloaded_setup() {
fi fi
# Quote $echo for shipping. # Quote $echo for shipping.
if test "X$echo" = "X$SHELL $0 --fallback-echo"; then if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
case $0 in case $progpath in
[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";; [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
*) qecho="$SHELL `pwd`/$0 --fallback-echo";; *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
esac esac
qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
else else
...@@ -4492,10 +4663,10 @@ static const void *lt_preloaded_setup() { ...@@ -4492,10 +4663,10 @@ static const void *lt_preloaded_setup() {
esac esac
case $host in case $host in
*cygwin* | *mingw* ) *cygwin* | *mingw* )
cwrappersource=`$echo ${objdir}/lt-${output}.c` cwrappersource=`$echo ${objdir}/lt-${outputname}.c`
cwrapper=`$echo ${output}.exe` cwrapper=`$echo ${output}.exe`
$rm $cwrappersource $cwrapper $rm $cwrappersource $cwrapper
trap "$rm $cwrappersource $cwrapper; exit 1" 1 2 15 trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
cat > $cwrappersource <<EOF cat > $cwrappersource <<EOF
...@@ -4504,7 +4675,7 @@ static const void *lt_preloaded_setup() { ...@@ -4504,7 +4675,7 @@ static const void *lt_preloaded_setup() {
The $output program cannot be directly executed until all the libtool The $output program cannot be directly executed until all the libtool
libraries that it depends on are installed. libraries that it depends on are installed.
This wrapper executable should never be moved out of the build directory. This wrapper executable should never be moved out of the build directory.
If it is, it will not operate correctly. If it is, it will not operate correctly.
...@@ -4536,7 +4707,7 @@ EOF ...@@ -4536,7 +4707,7 @@ EOF
#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
defined (__OS2__) defined (__OS2__)
#define HAVE_DOS_BASED_FILE_SYSTEM #define HAVE_DOS_BASED_FILE_SYSTEM
#ifndef DIR_SEPARATOR_2 #ifndef DIR_SEPARATOR_2
#define DIR_SEPARATOR_2 '\\' #define DIR_SEPARATOR_2 '\\'
#endif #endif
#endif #endif
...@@ -4567,7 +4738,7 @@ main (int argc, char *argv[]) ...@@ -4567,7 +4738,7 @@ main (int argc, char *argv[])
{ {
char **newargz; char **newargz;
int i; int i;
program_name = (char *) xstrdup ((char *) basename (argv[0])); program_name = (char *) xstrdup ((char *) basename (argv[0]));
newargz = XMALLOC(char *, argc+2); newargz = XMALLOC(char *, argc+2);
EOF EOF
...@@ -4580,7 +4751,7 @@ EOF ...@@ -4580,7 +4751,7 @@ EOF
newargz[1] = fnqualify(argv[0]); newargz[1] = fnqualify(argv[0]);
/* we know the script has the same name, without the .exe */ /* we know the script has the same name, without the .exe */
/* so make sure newargz[1] doesn't end in .exe */ /* so make sure newargz[1] doesn't end in .exe */
strendzap(newargz[1],".exe"); strendzap(newargz[1],".exe");
for (i = 1; i < argc; i++) for (i = 1; i < argc; i++)
newargz[i+1] = xstrdup(argv[i]); newargz[i+1] = xstrdup(argv[i]);
newargz[argc+1] = NULL; newargz[argc+1] = NULL;
...@@ -4603,7 +4774,7 @@ xmalloc (size_t num) ...@@ -4603,7 +4774,7 @@ xmalloc (size_t num)
return p; return p;
} }
char * char *
xstrdup (const char *string) xstrdup (const char *string)
{ {
return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
...@@ -4617,7 +4788,7 @@ basename (const char *name) ...@@ -4617,7 +4788,7 @@ basename (const char *name)
#if defined (HAVE_DOS_BASED_FILE_SYSTEM) #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
/* Skip over the disk name in MSDOS pathnames. */ /* Skip over the disk name in MSDOS pathnames. */
if (isalpha (name[0]) && name[1] == ':') if (isalpha (name[0]) && name[1] == ':')
name += 2; name += 2;
#endif #endif
...@@ -4627,7 +4798,7 @@ basename (const char *name) ...@@ -4627,7 +4798,7 @@ basename (const char *name)
return (char *) base; return (char *) base;
} }
char * char *
fnqualify(const char *path) fnqualify(const char *path)
{ {
size_t size; size_t size;
...@@ -4655,7 +4826,7 @@ fnqualify(const char *path) ...@@ -4655,7 +4826,7 @@ fnqualify(const char *path)
} }
char * char *
strendzap(char *str, const char *pat) strendzap(char *str, const char *pat)
{ {
size_t len, patlen; size_t len, patlen;
...@@ -4675,7 +4846,7 @@ strendzap(char *str, const char *pat) ...@@ -4675,7 +4846,7 @@ strendzap(char *str, const char *pat)
} }
static void static void
lt_error_core (int exit_status, const char * mode, lt_error_core (int exit_status, const char * mode,
const char * message, va_list ap) const char * message, va_list ap)
{ {
fprintf (stderr, "%s: %s: ", program_name, mode); fprintf (stderr, "%s: %s: ", program_name, mode);
...@@ -4704,7 +4875,7 @@ EOF ...@@ -4704,7 +4875,7 @@ EOF
;; ;;
esac esac
$rm $output $rm $output
trap "$rm $output; exit 1" 1 2 15 trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
$echo > $output "\ $echo > $output "\
#! $SHELL #! $SHELL
...@@ -4725,7 +4896,7 @@ sed_quote_subst='$sed_quote_subst' ...@@ -4725,7 +4896,7 @@ sed_quote_subst='$sed_quote_subst'
# The HP-UX ksh and POSIX shell print the target directory to stdout # The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set. # if CDPATH is set.
if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
relink_command=\"$relink_command\" relink_command=\"$relink_command\"
...@@ -4804,7 +4975,7 @@ else ...@@ -4804,7 +4975,7 @@ else
else else
$echo \"\$relink_command_output\" >&2 $echo \"\$relink_command_output\" >&2
$rm \"\$progdir/\$file\" $rm \"\$progdir/\$file\"
exit 1 exit $EXIT_FAILURE
fi fi
fi fi
...@@ -4866,20 +5037,20 @@ else ...@@ -4866,20 +5037,20 @@ else
esac esac
$echo >> $output "\ $echo >> $output "\
\$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
exit 1 exit $EXIT_FAILURE
fi fi
else else
# The program doesn't exist. # The program doesn't exist.
\$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2 \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
\$echo \"This script is just a wrapper for \$program.\" 1>&2 \$echo \"This script is just a wrapper for \$program.\" 1>&2
$echo \"See the $PACKAGE documentation for more information.\" 1>&2 $echo \"See the $PACKAGE documentation for more information.\" 1>&2
exit 1 exit $EXIT_FAILURE
fi fi
fi\ fi\
" "
chmod +x $output chmod +x $output
fi fi
exit 0 exit $EXIT_SUCCESS
;; ;;
esac esac
...@@ -4902,76 +5073,78 @@ fi\ ...@@ -4902,76 +5073,78 @@ fi\
if test -n "$addlibs"; then if test -n "$addlibs"; then
gentop="$output_objdir/${outputname}x" gentop="$output_objdir/${outputname}x"
$show "${rm}r $gentop"
$run ${rm}r "$gentop"
$show "$mkdir $gentop"
$run $mkdir "$gentop"
status=$?
if test "$status" -ne 0 && test ! -d "$gentop"; then
exit $status
fi
generated="$generated $gentop" generated="$generated $gentop"
# Add in members from convenience archives. func_extract_archives $gentop $addlibs
for xlib in $addlibs; do oldobjs="$oldobjs $func_extract_archives_result"
# Extract the objects.
case $xlib in
[\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
*) xabs=`pwd`"/$xlib" ;;
esac
xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
xdir="$gentop/$xlib"
$show "${rm}r $xdir"
$run ${rm}r "$xdir"
$show "$mkdir $xdir"
$run $mkdir "$xdir"
status=$?
if test "$status" -ne 0 && test ! -d "$xdir"; then
exit $status
fi
# We will extract separately just the conflicting names and we will no
# longer touch any unique names. It is faster to leave these extract
# automatically by $AR in one run.
$show "(cd $xdir && $AR x $xabs)"
$run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
:
else
$echo "$modename: warning: object name conflicts; renaming object files" 1>&2
$echo "$modename: warning: to ensure that they will not overwrite" 1>&2
$AR t "$xabs" | sort | uniq -cd | while read -r count name
do
i=1
while test "$i" -le "$count"
do
# Put our $i before any first dot (extension)
# Never overwrite any file
name_to="$name"
while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
do
name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
done
$show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
$run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
i=`expr $i + 1`
done
done
fi
oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
done
fi fi
# Do each command in the archive commands. # Do each command in the archive commands.
if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
eval cmds=\"$old_archive_from_new_cmds\" cmds=$old_archive_from_new_cmds
else else
# POSIX demands no paths to be encoded in archives. We have
# to avoid creating archives with duplicate basenames if we
# might have to extract them afterwards, e.g., when creating a
# static archive out of a convenience library, or when linking
# the entirety of a libtool archive into another (currently
# not supported by libtool).
if (for obj in $oldobjs
do
$echo "X$obj" | $Xsed -e 's%^.*/%%'
done | sort | sort -uc >/dev/null 2>&1); then
:
else
$echo "copying selected object files to avoid basename conflicts..."
if test -z "$gentop"; then
gentop="$output_objdir/${outputname}x"
generated="$generated $gentop"
$show "${rm}r $gentop"
$run ${rm}r "$gentop"
$show "$mkdir $gentop"
$run $mkdir "$gentop"
status=$?
if test "$status" -ne 0 && test ! -d "$gentop"; then
exit $status
fi
fi
save_oldobjs=$oldobjs
oldobjs=
counter=1
for obj in $save_oldobjs
do
objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
case " $oldobjs " in
" ") oldobjs=$obj ;;
*[\ /]"$objbase "*)
while :; do
# Make sure we don't pick an alternate name that also
# overlaps.
newobj=lt$counter-$objbase
counter=`expr $counter + 1`
case " $oldobjs " in
*[\ /]"$newobj "*) ;;
*) if test ! -f "$gentop/$newobj"; then break; fi ;;
esac
done
$show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
$run ln "$obj" "$gentop/$newobj" ||
$run cp "$obj" "$gentop/$newobj"
oldobjs="$oldobjs $gentop/$newobj"
;;
*) oldobjs="$oldobjs $obj" ;;
esac
done
fi
eval cmds=\"$old_archive_cmds\" eval cmds=\"$old_archive_cmds\"
if len=`expr "X$cmds" : ".*"` && if len=`expr "X$cmds" : ".*"` &&
test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
: cmds=$old_archive_cmds
else else
# the command line is too long to link in one step, link in parts # the command line is too long to link in one step, link in parts
$echo "using piecewise archive linking..." $echo "using piecewise archive linking..."
...@@ -4980,25 +5153,12 @@ fi\ ...@@ -4980,25 +5153,12 @@ fi\
objlist= objlist=
concat_cmds= concat_cmds=
save_oldobjs=$oldobjs save_oldobjs=$oldobjs
# GNU ar 2.10+ was changed to match POSIX; thus no paths are
# encoded into archives. This makes 'ar r' malfunction in
# this piecewise linking case whenever conflicting object
# names appear in distinct ar calls; check, warn and compensate.
if (for obj in $save_oldobjs
do
$echo "X$obj" | $Xsed -e 's%^.*/%%'
done | sort | sort -uc >/dev/null 2>&1); then
:
else
$echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2
$echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2
AR_FLAGS=cq
fi
# Is there a better way of finding the last object in the list? # Is there a better way of finding the last object in the list?
for obj in $save_oldobjs for obj in $save_oldobjs
do do
last_oldobj=$obj last_oldobj=$obj
done done
for obj in $save_oldobjs for obj in $save_oldobjs
do do
oldobjs="$objlist $obj" oldobjs="$objlist $obj"
...@@ -5012,7 +5172,7 @@ fi\ ...@@ -5012,7 +5172,7 @@ fi\
oldobjs=$objlist oldobjs=$objlist
if test "$obj" = "$last_oldobj" ; then if test "$obj" = "$last_oldobj" ; then
RANLIB=$save_RANLIB RANLIB=$save_RANLIB
fi fi
test -z "$concat_cmds" || concat_cmds=$concat_cmds~ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
objlist= objlist=
...@@ -5023,12 +5183,13 @@ fi\ ...@@ -5023,12 +5183,13 @@ fi\
if test "X$oldobjs" = "X" ; then if test "X$oldobjs" = "X" ; then
eval cmds=\"\$concat_cmds\" eval cmds=\"\$concat_cmds\"
else else
eval cmds=\"\$concat_cmds~$old_archive_cmds\" eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
fi fi
fi fi
fi fi
save_ifs="$IFS"; IFS='~' save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do for cmd in $cmds; do
eval cmd=\"$cmd\"
IFS="$save_ifs" IFS="$save_ifs"
$show "$cmd" $show "$cmd"
$run eval "$cmd" || exit $? $run eval "$cmd" || exit $?
...@@ -5060,11 +5221,13 @@ fi\ ...@@ -5060,11 +5221,13 @@ fi\
fi fi
done done
# Quote the link command for shipping. # Quote the link command for shipping.
relink_command="(cd `pwd`; $SHELL $0 --mode=relink $libtool_args @inst_prefix_dir@)" relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
if test "$hardcode_automatic" = yes ; then if test "$hardcode_automatic" = yes ; then
relink_command= relink_command=
fi fi
# Only create the output if not a dry run. # Only create the output if not a dry run.
if test -z "$run"; then if test -z "$run"; then
for installed in no yes; do for installed in no yes; do
...@@ -5082,7 +5245,7 @@ fi\ ...@@ -5082,7 +5245,7 @@ fi\
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
if test -z "$libdir"; then if test -z "$libdir"; then
$echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
exit 1 exit $EXIT_FAILURE
fi fi
newdependency_libs="$newdependency_libs $libdir/$name" newdependency_libs="$newdependency_libs $libdir/$name"
;; ;;
...@@ -5096,7 +5259,7 @@ fi\ ...@@ -5096,7 +5259,7 @@ fi\
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
if test -z "$libdir"; then if test -z "$libdir"; then
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
exit 1 exit $EXIT_FAILURE
fi fi
newdlfiles="$newdlfiles $libdir/$name" newdlfiles="$newdlfiles $libdir/$name"
done done
...@@ -5107,7 +5270,7 @@ fi\ ...@@ -5107,7 +5270,7 @@ fi\
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
if test -z "$libdir"; then if test -z "$libdir"; then
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
exit 1 exit $EXIT_FAILURE
fi fi
newdlprefiles="$newdlprefiles $libdir/$name" newdlprefiles="$newdlprefiles $libdir/$name"
done done
...@@ -5115,7 +5278,7 @@ fi\ ...@@ -5115,7 +5278,7 @@ fi\
else else
newdlfiles= newdlfiles=
for lib in $dlfiles; do for lib in $dlfiles; do
case $lib in case $lib in
[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
*) abs=`pwd`"/$lib" ;; *) abs=`pwd`"/$lib" ;;
esac esac
...@@ -5124,7 +5287,7 @@ fi\ ...@@ -5124,7 +5287,7 @@ fi\
dlfiles="$newdlfiles" dlfiles="$newdlfiles"
newdlprefiles= newdlprefiles=
for lib in $dlprefiles; do for lib in $dlprefiles; do
case $lib in case $lib in
[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
*) abs=`pwd`"/$lib" ;; *) abs=`pwd`"/$lib" ;;
esac esac
...@@ -5187,7 +5350,7 @@ relink_command=\"$relink_command\"" ...@@ -5187,7 +5350,7 @@ relink_command=\"$relink_command\""
$run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
;; ;;
esac esac
exit 0 exit $EXIT_SUCCESS
;; ;;
# libtool install mode # libtool install mode
...@@ -5202,7 +5365,7 @@ relink_command=\"$relink_command\"" ...@@ -5202,7 +5365,7 @@ relink_command=\"$relink_command\""
# Aesthetically quote it. # Aesthetically quote it.
arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
case $arg in case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
arg="\"$arg\"" arg="\"$arg\""
;; ;;
esac esac
...@@ -5218,7 +5381,7 @@ relink_command=\"$relink_command\"" ...@@ -5218,7 +5381,7 @@ relink_command=\"$relink_command\""
# Aesthetically quote it. # Aesthetically quote it.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
case $arg in case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
arg="\"$arg\"" arg="\"$arg\""
;; ;;
esac esac
...@@ -5266,7 +5429,7 @@ relink_command=\"$relink_command\"" ...@@ -5266,7 +5429,7 @@ relink_command=\"$relink_command\""
# Aesthetically quote the argument. # Aesthetically quote the argument.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
case $arg in case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
arg="\"$arg\"" arg="\"$arg\""
;; ;;
esac esac
...@@ -5276,13 +5439,13 @@ relink_command=\"$relink_command\"" ...@@ -5276,13 +5439,13 @@ relink_command=\"$relink_command\""
if test -z "$install_prog"; then if test -z "$install_prog"; then
$echo "$modename: you must specify an install program" 1>&2 $echo "$modename: you must specify an install program" 1>&2
$echo "$help" 1>&2 $echo "$help" 1>&2
exit 1 exit $EXIT_FAILURE
fi fi
if test -n "$prev"; then if test -n "$prev"; then
$echo "$modename: the \`$prev' option requires an argument" 1>&2 $echo "$modename: the \`$prev' option requires an argument" 1>&2
$echo "$help" 1>&2 $echo "$help" 1>&2
exit 1 exit $EXIT_FAILURE
fi fi
if test -z "$files"; then if test -z "$files"; then
...@@ -5292,7 +5455,7 @@ relink_command=\"$relink_command\"" ...@@ -5292,7 +5455,7 @@ relink_command=\"$relink_command\""
$echo "$modename: you must specify a destination" 1>&2 $echo "$modename: you must specify a destination" 1>&2
fi fi
$echo "$help" 1>&2 $echo "$help" 1>&2
exit 1 exit $EXIT_FAILURE
fi fi
# Strip any trailing slash from the destination. # Strip any trailing slash from the destination.
...@@ -5313,7 +5476,7 @@ relink_command=\"$relink_command\"" ...@@ -5313,7 +5476,7 @@ relink_command=\"$relink_command\""
if test "$#" -gt 2; then if test "$#" -gt 2; then
$echo "$modename: \`$dest' is not a directory" 1>&2 $echo "$modename: \`$dest' is not a directory" 1>&2
$echo "$help" 1>&2 $echo "$help" 1>&2
exit 1 exit $EXIT_FAILURE
fi fi
fi fi
case $destdir in case $destdir in
...@@ -5325,7 +5488,7 @@ relink_command=\"$relink_command\"" ...@@ -5325,7 +5488,7 @@ relink_command=\"$relink_command\""
*) *)
$echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
$echo "$help" 1>&2 $echo "$help" 1>&2
exit 1 exit $EXIT_FAILURE
;; ;;
esac esac
done done
...@@ -5354,7 +5517,7 @@ relink_command=\"$relink_command\"" ...@@ -5354,7 +5517,7 @@ relink_command=\"$relink_command\""
else else
$echo "$modename: \`$file' is not a valid libtool archive" 1>&2 $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
$echo "$help" 1>&2 $echo "$help" 1>&2
exit 1 exit $EXIT_FAILURE
fi fi
library_names= library_names=
...@@ -5396,7 +5559,7 @@ relink_command=\"$relink_command\"" ...@@ -5396,7 +5559,7 @@ relink_command=\"$relink_command\""
# but it's something to keep an eye on. # but it's something to keep an eye on.
if test "$inst_prefix_dir" = "$destdir"; then if test "$inst_prefix_dir" = "$destdir"; then
$echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
exit 1 exit $EXIT_FAILURE
fi fi
if test -n "$inst_prefix_dir"; then if test -n "$inst_prefix_dir"; then
...@@ -5411,7 +5574,7 @@ relink_command=\"$relink_command\"" ...@@ -5411,7 +5574,7 @@ relink_command=\"$relink_command\""
if $run eval "$relink_command"; then : if $run eval "$relink_command"; then :
else else
$echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
exit 1 exit $EXIT_FAILURE
fi fi
fi fi
...@@ -5446,10 +5609,11 @@ relink_command=\"$relink_command\"" ...@@ -5446,10 +5609,11 @@ relink_command=\"$relink_command\""
# Do each command in the postinstall commands. # Do each command in the postinstall commands.
lib="$destdir/$realname" lib="$destdir/$realname"
eval cmds=\"$postinstall_cmds\" cmds=$postinstall_cmds
save_ifs="$IFS"; IFS='~' save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do for cmd in $cmds; do
IFS="$save_ifs" IFS="$save_ifs"
eval cmd=\"$cmd\"
$show "$cmd" $show "$cmd"
$run eval "$cmd" || exit $? $run eval "$cmd" || exit $?
done done
...@@ -5489,7 +5653,7 @@ relink_command=\"$relink_command\"" ...@@ -5489,7 +5653,7 @@ relink_command=\"$relink_command\""
*) *)
$echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
$echo "$help" 1>&2 $echo "$help" 1>&2
exit 1 exit $EXIT_FAILURE
;; ;;
esac esac
...@@ -5507,7 +5671,7 @@ relink_command=\"$relink_command\"" ...@@ -5507,7 +5671,7 @@ relink_command=\"$relink_command\""
$show "$install_prog $staticobj $staticdest" $show "$install_prog $staticobj $staticdest"
$run eval "$install_prog \$staticobj \$staticdest" || exit $? $run eval "$install_prog \$staticobj \$staticdest" || exit $?
fi fi
exit 0 exit $EXIT_SUCCESS
;; ;;
*) *)
...@@ -5561,7 +5725,7 @@ relink_command=\"$relink_command\"" ...@@ -5561,7 +5725,7 @@ relink_command=\"$relink_command\""
# Check the variables that should have been set. # Check the variables that should have been set.
if test -z "$notinst_deplibs"; then if test -z "$notinst_deplibs"; then
$echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
exit 1 exit $EXIT_FAILURE
fi fi
finalize=yes finalize=yes
...@@ -5602,8 +5766,12 @@ relink_command=\"$relink_command\"" ...@@ -5602,8 +5766,12 @@ relink_command=\"$relink_command\""
tmpdir="/tmp" tmpdir="/tmp"
test -n "$TMPDIR" && tmpdir="$TMPDIR" test -n "$TMPDIR" && tmpdir="$TMPDIR"
tmpdir="$tmpdir/libtool-$$" tmpdir="$tmpdir/libtool-$$"
if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then : save_umask=`umask`
umask 0077
if $mkdir "$tmpdir"; then
umask $save_umask
else else
umask $save_umask
$echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
continue continue
fi fi
...@@ -5662,16 +5830,17 @@ relink_command=\"$relink_command\"" ...@@ -5662,16 +5830,17 @@ relink_command=\"$relink_command\""
$show "$install_prog $file $oldlib" $show "$install_prog $file $oldlib"
$run eval "$install_prog \$file \$oldlib" || exit $? $run eval "$install_prog \$file \$oldlib" || exit $?
if test -n "$stripme" && test -n "$striplib"; then if test -n "$stripme" && test -n "$old_striplib"; then
$show "$old_striplib $oldlib" $show "$old_striplib $oldlib"
$run eval "$old_striplib $oldlib" || exit $? $run eval "$old_striplib $oldlib" || exit $?
fi fi
# Do each command in the postinstall commands. # Do each command in the postinstall commands.
eval cmds=\"$old_postinstall_cmds\" cmds=$old_postinstall_cmds
save_ifs="$IFS"; IFS='~' save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do for cmd in $cmds; do
IFS="$save_ifs" IFS="$save_ifs"
eval cmd=\"$cmd\"
$show "$cmd" $show "$cmd"
$run eval "$cmd" || exit $? $run eval "$cmd" || exit $?
done done
...@@ -5685,9 +5854,9 @@ relink_command=\"$relink_command\"" ...@@ -5685,9 +5854,9 @@ relink_command=\"$relink_command\""
if test -n "$current_libdirs"; then if test -n "$current_libdirs"; then
# Maybe just do a dry run. # Maybe just do a dry run.
test -n "$run" && current_libdirs=" -n$current_libdirs" test -n "$run" && current_libdirs=" -n$current_libdirs"
exec_cmd='$SHELL $0 --finish$current_libdirs' exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
else else
exit 0 exit $EXIT_SUCCESS
fi fi
;; ;;
...@@ -5706,10 +5875,11 @@ relink_command=\"$relink_command\"" ...@@ -5706,10 +5875,11 @@ relink_command=\"$relink_command\""
for libdir in $libdirs; do for libdir in $libdirs; do
if test -n "$finish_cmds"; then if test -n "$finish_cmds"; then
# Do each command in the finish commands. # Do each command in the finish commands.
eval cmds=\"$finish_cmds\" cmds=$finish_cmds
save_ifs="$IFS"; IFS='~' save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do for cmd in $cmds; do
IFS="$save_ifs" IFS="$save_ifs"
eval cmd=\"$cmd\"
$show "$cmd" $show "$cmd"
$run eval "$cmd" || admincmds="$admincmds $run eval "$cmd" || admincmds="$admincmds
$cmd" $cmd"
...@@ -5726,7 +5896,7 @@ relink_command=\"$relink_command\"" ...@@ -5726,7 +5896,7 @@ relink_command=\"$relink_command\""
fi fi
# Exit here if they wanted silent mode. # Exit here if they wanted silent mode.
test "$show" = : && exit 0 test "$show" = : && exit $EXIT_SUCCESS
$echo "----------------------------------------------------------------------" $echo "----------------------------------------------------------------------"
$echo "Libraries have been installed in:" $echo "Libraries have been installed in:"
...@@ -5762,7 +5932,7 @@ relink_command=\"$relink_command\"" ...@@ -5762,7 +5932,7 @@ relink_command=\"$relink_command\""
$echo "See any operating system documentation about shared libraries for" $echo "See any operating system documentation about shared libraries for"
$echo "more information, such as the ld(1) and ld.so(8) manual pages." $echo "more information, such as the ld(1) and ld.so(8) manual pages."
$echo "----------------------------------------------------------------------" $echo "----------------------------------------------------------------------"
exit 0 exit $EXIT_SUCCESS
;; ;;
# libtool execute mode # libtool execute mode
...@@ -5774,7 +5944,7 @@ relink_command=\"$relink_command\"" ...@@ -5774,7 +5944,7 @@ relink_command=\"$relink_command\""
if test -z "$cmd"; then if test -z "$cmd"; then
$echo "$modename: you must specify a COMMAND" 1>&2 $echo "$modename: you must specify a COMMAND" 1>&2
$echo "$help" $echo "$help"
exit 1 exit $EXIT_FAILURE
fi fi
# Handle -dlopen flags immediately. # Handle -dlopen flags immediately.
...@@ -5782,7 +5952,7 @@ relink_command=\"$relink_command\"" ...@@ -5782,7 +5952,7 @@ relink_command=\"$relink_command\""
if test ! -f "$file"; then if test ! -f "$file"; then
$echo "$modename: \`$file' is not a file" 1>&2 $echo "$modename: \`$file' is not a file" 1>&2
$echo "$help" 1>&2 $echo "$help" 1>&2
exit 1 exit $EXIT_FAILURE
fi fi
dir= dir=
...@@ -5793,7 +5963,7 @@ relink_command=\"$relink_command\"" ...@@ -5793,7 +5963,7 @@ relink_command=\"$relink_command\""
else else
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
$echo "$help" 1>&2 $echo "$help" 1>&2
exit 1 exit $EXIT_FAILURE
fi fi
# Read the libtool library. # Read the libtool library.
...@@ -5820,7 +5990,7 @@ relink_command=\"$relink_command\"" ...@@ -5820,7 +5990,7 @@ relink_command=\"$relink_command\""
dir="$dir/$objdir" dir="$dir/$objdir"
else else
$echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
exit 1 exit $EXIT_FAILURE
fi fi
;; ;;
...@@ -5900,7 +6070,7 @@ relink_command=\"$relink_command\"" ...@@ -5900,7 +6070,7 @@ relink_command=\"$relink_command\""
$echo "export $shlibpath_var" $echo "export $shlibpath_var"
fi fi
$echo "$cmd$args" $echo "$cmd$args"
exit 0 exit $EXIT_SUCCESS
fi fi
;; ;;
...@@ -5928,7 +6098,7 @@ relink_command=\"$relink_command\"" ...@@ -5928,7 +6098,7 @@ relink_command=\"$relink_command\""
if test -z "$rm"; then if test -z "$rm"; then
$echo "$modename: you must specify an RM program" 1>&2 $echo "$modename: you must specify an RM program" 1>&2
$echo "$help" 1>&2 $echo "$help" 1>&2
exit 1 exit $EXIT_FAILURE
fi fi
rmdirs= rmdirs=
...@@ -5983,10 +6153,11 @@ relink_command=\"$relink_command\"" ...@@ -5983,10 +6153,11 @@ relink_command=\"$relink_command\""
if test "$mode" = uninstall; then if test "$mode" = uninstall; then
if test -n "$library_names"; then if test -n "$library_names"; then
# Do each command in the postuninstall commands. # Do each command in the postuninstall commands.
eval cmds=\"$postuninstall_cmds\" cmds=$postuninstall_cmds
save_ifs="$IFS"; IFS='~' save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do for cmd in $cmds; do
IFS="$save_ifs" IFS="$save_ifs"
eval cmd=\"$cmd\"
$show "$cmd" $show "$cmd"
$run eval "$cmd" $run eval "$cmd"
if test "$?" -ne 0 && test "$rmforce" != yes; then if test "$?" -ne 0 && test "$rmforce" != yes; then
...@@ -5998,10 +6169,11 @@ relink_command=\"$relink_command\"" ...@@ -5998,10 +6169,11 @@ relink_command=\"$relink_command\""
if test -n "$old_library"; then if test -n "$old_library"; then
# Do each command in the old_postuninstall commands. # Do each command in the old_postuninstall commands.
eval cmds=\"$old_postuninstall_cmds\" cmds=$old_postuninstall_cmds
save_ifs="$IFS"; IFS='~' save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do for cmd in $cmds; do
IFS="$save_ifs" IFS="$save_ifs"
eval cmd=\"$cmd\"
$show "$cmd" $show "$cmd"
$run eval "$cmd" $run eval "$cmd"
if test "$?" -ne 0 && test "$rmforce" != yes; then if test "$?" -ne 0 && test "$rmforce" != yes; then
...@@ -6040,7 +6212,7 @@ relink_command=\"$relink_command\"" ...@@ -6040,7 +6212,7 @@ relink_command=\"$relink_command\""
if test "$mode" = clean ; then if test "$mode" = clean ; then
noexename=$name noexename=$name
case $file in case $file in
*.exe) *.exe)
file=`$echo $file|${SED} 's,.exe$,,'` file=`$echo $file|${SED} 's,.exe$,,'`
noexename=`$echo $name|${SED} 's,.exe$,,'` noexename=`$echo $name|${SED} 's,.exe$,,'`
# $file with .exe has already been added to rmfiles, # $file with .exe has already been added to rmfiles,
...@@ -6085,20 +6257,20 @@ relink_command=\"$relink_command\"" ...@@ -6085,20 +6257,20 @@ relink_command=\"$relink_command\""
"") "")
$echo "$modename: you must specify a MODE" 1>&2 $echo "$modename: you must specify a MODE" 1>&2
$echo "$generic_help" 1>&2 $echo "$generic_help" 1>&2
exit 1 exit $EXIT_FAILURE
;; ;;
esac esac
if test -z "$exec_cmd"; then if test -z "$exec_cmd"; then
$echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$modename: invalid operation mode \`$mode'" 1>&2
$echo "$generic_help" 1>&2 $echo "$generic_help" 1>&2
exit 1 exit $EXIT_FAILURE
fi fi
fi # test -z "$show_help" fi # test -z "$show_help"
if test -n "$exec_cmd"; then if test -n "$exec_cmd"; then
eval exec $exec_cmd eval exec $exec_cmd
exit 1 exit $EXIT_FAILURE
fi fi
# We need to display help for each of the modes. # We need to display help for each of the modes.
...@@ -6134,7 +6306,7 @@ MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for ...@@ -6134,7 +6306,7 @@ MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
a more detailed description of MODE. a more detailed description of MODE.
Report bugs to <bug-libtool@gnu.org>." Report bugs to <bug-libtool@gnu.org>."
exit 0 exit $EXIT_SUCCESS
;; ;;
clean) clean)
...@@ -6246,6 +6418,8 @@ The following components of LINK-COMMAND are treated specially: ...@@ -6246,6 +6418,8 @@ The following components of LINK-COMMAND are treated specially:
-no-undefined declare that a library does not refer to external symbols -no-undefined declare that a library does not refer to external symbols
-o OUTPUT-FILE create OUTPUT-FILE from the specified objects -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
-objectlist FILE Use a list of object files found in FILE to specify objects -objectlist FILE Use a list of object files found in FILE to specify objects
-precious-files-regex REGEX
don't remove output files matching REGEX
-release RELEASE specify package release information -release RELEASE specify package release information
-rpath LIBDIR the created library will eventually be installed in LIBDIR -rpath LIBDIR the created library will eventually be installed in LIBDIR
-R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
...@@ -6287,14 +6461,14 @@ Otherwise, only FILE itself is deleted using RM." ...@@ -6287,14 +6461,14 @@ Otherwise, only FILE itself is deleted using RM."
*) *)
$echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$modename: invalid operation mode \`$mode'" 1>&2
$echo "$help" 1>&2 $echo "$help" 1>&2
exit 1 exit $EXIT_FAILURE
;; ;;
esac esac
$echo $echo
$echo "Try \`$modename --help' for more information about other modes." $echo "Try \`$modename --help' for more information about other modes."
exit 0 exit $?
# The TAGs below are defined such that we never get into a situation # The TAGs below are defined such that we never get into a situation
# in which we disable both kinds of libraries. Given conflicting # in which we disable both kinds of libraries. Given conflicting
......
#! /bin/sh #! /bin/sh
# Common stub for a few missing GNU programs while installing. # Common stub for a few missing GNU programs while installing.
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
scriptversion=2004-09-07.08
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004
# Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
...@@ -38,18 +42,24 @@ else ...@@ -38,18 +42,24 @@ else
configure_ac=configure.in configure_ac=configure.in
fi fi
msg="missing on your system"
case "$1" in case "$1" in
--run) --run)
# Try to run requested program, and just exit if it succeeds. # Try to run requested program, and just exit if it succeeds.
run= run=
shift shift
"$@" && exit 0 "$@" && exit 0
# Exit code 63 means version mismatch. This often happens
# when the user try to use an ancient version of a tool on
# a file that requires a minimum version. In this case we
# we should proceed has if the program had been absent, or
# if --run hadn't been passed.
if test $? = 63; then
run=:
msg="probably too old"
fi
;; ;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case "$1" in
-h|--h|--he|--hel|--help) -h|--h|--he|--hel|--help)
echo "\ echo "\
...@@ -74,11 +84,15 @@ Supported PROGRAM values: ...@@ -74,11 +84,15 @@ Supported PROGRAM values:
lex create \`lex.yy.c', if possible, from existing .c lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file makeinfo touch the output file
tar try tar, gnutar, gtar, then tar without non-portable flags tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]" yacc create \`y.tab.[ch]', if possible, from existing .[ch]
Send bug reports to <bug-automake@gnu.org>."
exit 0
;; ;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version) -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing 0.4 - GNU automake" echo "missing $scriptversion (GNU Automake)"
exit 0
;; ;;
-*) -*)
...@@ -87,14 +101,44 @@ Supported PROGRAM values: ...@@ -87,14 +101,44 @@ Supported PROGRAM values:
exit 1 exit 1
;; ;;
aclocal*) esac
# Now exit if we have it, but it failed. Also exit now if we
# don't have it and --version was passed (most likely to detect
# the program).
case "$1" in
lex|yacc)
# Not GNU programs, they don't have --version.
;;
tar)
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
exit 1
fi
;;
*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed. # We have it, but it failed.
exit 1 exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
# Could not run --version or --help. This is probably someone
# running `$TOOL --version' or `$TOOL --help' to check whether
# $TOOL exists and not knowing $TOOL uses missing.
exit 1
fi fi
;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case "$1" in
aclocal*)
echo 1>&2 "\ echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if WARNING: \`$1' is $msg. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. You might want you modified \`acinclude.m4' or \`${configure_ac}'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site." any GNU archive site."
...@@ -102,13 +146,8 @@ WARNING: \`$1' is missing on your system. You should only need it if ...@@ -102,13 +146,8 @@ WARNING: \`$1' is missing on your system. You should only need it if
;; ;;
autoconf) autoconf)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\ echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if WARNING: \`$1' is $msg. You should only need it if
you modified \`${configure_ac}'. You might want to install the you modified \`${configure_ac}'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site." archive site."
...@@ -116,13 +155,8 @@ WARNING: \`$1' is missing on your system. You should only need it if ...@@ -116,13 +155,8 @@ WARNING: \`$1' is missing on your system. You should only need it if
;; ;;
autoheader) autoheader)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\ echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if WARNING: \`$1' is $msg. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want you modified \`acconfig.h' or \`${configure_ac}'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site." from any GNU archive site."
...@@ -140,13 +174,8 @@ WARNING: \`$1' is missing on your system. You should only need it if ...@@ -140,13 +174,8 @@ WARNING: \`$1' is missing on your system. You should only need it if
;; ;;
automake*) automake*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\ echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if WARNING: \`$1' is $msg. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
You might want to install the \`Automake' and \`Perl' packages. You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site." Grab them from any GNU archive site."
...@@ -156,14 +185,9 @@ WARNING: \`$1' is missing on your system. You should only need it if ...@@ -156,14 +185,9 @@ WARNING: \`$1' is missing on your system. You should only need it if
;; ;;
autom4te) autom4te)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\ echo 1>&2 "\
WARNING: \`$1' is needed, and you do not seem to have it handy on your WARNING: \`$1' is needed, but is $msg.
system. You might have modified some files without having the You might have modified some files without having the
proper tools for further handling them. proper tools for further handling them.
You can get \`$1' as part of \`Autoconf' from any GNU You can get \`$1' as part of \`Autoconf' from any GNU
archive site." archive site."
...@@ -185,7 +209,7 @@ WARNING: \`$1' is needed, and you do not seem to have it handy on your ...@@ -185,7 +209,7 @@ WARNING: \`$1' is needed, and you do not seem to have it handy on your
bison|yacc) bison|yacc)
echo 1>&2 "\ echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if WARNING: \`$1' $msg. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site." \`Bison' from any GNU archive site."
...@@ -215,7 +239,7 @@ WARNING: \`$1' is missing on your system. You should only need it if ...@@ -215,7 +239,7 @@ WARNING: \`$1' is missing on your system. You should only need it if
lex|flex) lex|flex)
echo 1>&2 "\ echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if WARNING: \`$1' is $msg. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site." \`Flex' from any GNU archive site."
...@@ -237,13 +261,8 @@ WARNING: \`$1' is missing on your system. You should only need it if ...@@ -237,13 +261,8 @@ WARNING: \`$1' is missing on your system. You should only need it if
;; ;;
help2man) help2man)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\ echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if WARNING: \`$1' is $msg. You should only need it if
you modified a dependency of a manual page. You may need the you modified a dependency of a manual page. You may need the
\`Help2man' package in order for those modifications to take \`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site." effect. You can get \`Help2man' from any GNU archive site."
...@@ -262,13 +281,8 @@ WARNING: \`$1' is missing on your system. You should only need it if ...@@ -262,13 +281,8 @@ WARNING: \`$1' is missing on your system. You should only need it if
;; ;;
makeinfo) makeinfo)
if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
# We have makeinfo, but it failed.
exit 1
fi
echo 1>&2 "\ echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if WARNING: \`$1' is $msg. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file you modified a \`.texi' or \`.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy \`make' (AIX, call might also be the consequence of using a buggy \`make' (AIX,
...@@ -284,10 +298,6 @@ WARNING: \`$1' is missing on your system. You should only need it if ...@@ -284,10 +298,6 @@ WARNING: \`$1' is missing on your system. You should only need it if
tar) tar)
shift shift
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
fi
# We have already tried tar in the generic part. # We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error # Look for gnutar/gtar before invocation to avoid ugly error
...@@ -323,8 +333,8 @@ WARNING: I can't seem to be able to run \`tar' with the given arguments. ...@@ -323,8 +333,8 @@ WARNING: I can't seem to be able to run \`tar' with the given arguments.
*) *)
echo 1>&2 "\ echo 1>&2 "\
WARNING: \`$1' is needed, and you do not seem to have it handy on your WARNING: \`$1' is needed, and is $msg.
system. You might have modified some files without having the You might have modified some files without having the
proper tools for further handling them. Check the \`README' file, proper tools for further handling them. Check the \`README' file,
it often tells you about the needed prerequisites for installing it often tells you about the needed prerequisites for installing
this package. You may also peek at any GNU archive site, in case this package. You may also peek at any GNU archive site, in case
...@@ -334,3 +344,10 @@ WARNING: \`$1' is needed, and you do not seem to have it handy on your ...@@ -334,3 +344,10 @@ WARNING: \`$1' is needed, and you do not seem to have it handy on your
esac esac
exit 0 exit 0
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain
errstatus=0
dirmode=""
usage="\
Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
# process command line arguments
while test $# -gt 0 ; do
case $1 in
-h | --help | --h*) # -h for help
echo "$usage" 1>&2
exit 0
;;
-m) # -m PERM arg
shift
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
dirmode=$1
shift
;;
--) # stop option processing
shift
break
;;
-*) # unknown option
echo "$usage" 1>&2
exit 1
;;
*) # first non-opt arg
break
;;
esac
done
for file
do
if test -d "$file"; then
shift
else
break
fi
done
case $# in
0) exit 0 ;;
esac
case $dirmode in
'')
if mkdir -p -- . 2>/dev/null; then
echo "mkdir -p -- $*"
exec mkdir -p -- "$@"
fi
;;
*)
if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
echo "mkdir -m $dirmode -p -- $*"
exec mkdir -m "$dirmode" -p -- "$@"
fi
;;
esac
for file
do
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
shift
pathcomp=
for d
do
pathcomp="$pathcomp$d"
case $pathcomp in
-*) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp"
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
else
if test ! -z "$dirmode"; then
echo "chmod $dirmode $pathcomp"
lasterr=""
chmod "$dirmode" "$pathcomp" || lasterr=$?
if test ! -z "$lasterr"; then
errstatus=$lasterr
fi
fi
fi
fi
pathcomp="$pathcomp/"
done
done
exit $errstatus
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# End:
# mkinstalldirs ends here
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment