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
This commit is contained in:
Tom Tromey 2006-03-28 19:02:25 +00:00 committed by Tom Tromey
parent 625a46d9b6
commit fa275f0a5c
14 changed files with 3814 additions and 2415 deletions

View File

@ -3,7 +3,7 @@
Version 2.1, February 1999
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
of this license document, but changing it is not allowed.
@ -493,7 +493,7 @@ does.>
You should have received a copy of the GNU Lesser General Public
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
mail.

View File

@ -1,3 +1,8 @@
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>
* Makefile.in: Regenrate with Automake 1.9.3.

View File

@ -20,7 +20,7 @@ endif
CLEANFILES = libltdl.la libltdlc.la
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)
libltdlc_la_SOURCES = ltdl.c
@ -33,18 +33,19 @@ $(libltdl_la_OBJECTS) $(libltdlc_la_OBJECTS): libtool
libtool: $(LIBTOOL_DEPS)
$(SHELL) ./config.status --recheck
## This allows us to install libltdl without using ln and without creating
## a world writeable directory.
## FIXME: Remove this rule once automake can do this properly by itself.
local-install-files: $(DISTFILES)
-rm -rf $(DESTDIR)$(datadir)/libtool/libltdl
$(mkinstalldirs) $(DESTDIR)$(datadir)/libtool/libltdl
@for file in $(DISTFILES); do \
d=$(srcdir); \
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
## These are installed as a subdirectory of pkgdatadir so that
## libtoolize --ltdl can find them later:
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
## To avoid spurious reconfiguration when the user installs these files
## with libtoolize, we have to preserve their timestamps carefully:
install-data-local:
-rm -rf $(DESTDIR)$(ltdldatadir)
$(mkinstalldirs) $(DESTDIR)$(ltdldatadir)
( cd $(srcdir) && $(AMTAR) chf - $(ltdldatafiles); ) \
| ( umask 0 && cd $(DESTDIR)$(ltdldatadir) && $(AMTAR) xf -; )

View File

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.9.5 from Makefile.am.
# Makefile.in generated by automake 1.9.3 from Makefile.am.
# @configure_input@
# 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
# gives unlimited permission to copy and/or distribute it,
# 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) \
$(am__noinst_HEADERS_DIST) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config-h.in \
$(top_srcdir)/configure COPYING.LIB ChangeLog config.guess \
config.sub install-sh ltmain.sh missing mkinstalldirs
config.sub install-sh ltmain.sh missing
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
@ -52,8 +52,9 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno configure.status.lineno
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_CLEAN_FILES = config.h
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@ -72,7 +73,7 @@ libltdlc_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
am_libltdlc_la_OBJECTS = ltdl.lo
libltdlc_la_OBJECTS = $(am_libltdlc_la_OBJECTS)
@CONVENIENCE_LTDL_TRUE@am_libltdlc_la_rpath =
DEFAULT_INCLUDES = -I. -I$(srcdir)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
depcomp =
am__depfiles_maybe =
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
@ -149,9 +150,6 @@ LIBTOOL = @LIBTOOL@
LIBTOOL_DEPS = @LIBTOOL_DEPS@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
@ -221,17 +219,25 @@ INCLUDES = $(GCINCS)
@CONVENIENCE_LTDL_TRUE@noinst_LTLIBRARIES = libltdlc.la
CLEANFILES = libltdl.la libltdlc.la
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)
libltdlc_la_SOURCES = ltdl.c
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: .c .lo .o .obj
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 \
case '$(am__configure_deps)' in \
*$$dep*) \
@ -258,12 +264,27 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
$(top_srcdir)/configure: $(am__configure_deps)
cd $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
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)
@$(NORMAL_INSTALL)
test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
@ -357,11 +378,11 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
TAGS: $(HEADERS) $(SOURCES) config-h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
list='$(SOURCES) $(HEADERS) config-h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
@ -373,11 +394,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
CTAGS: $(HEADERS) $(SOURCES) config-h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
list='$(SOURCES) $(HEADERS) config-h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
@ -398,7 +419,6 @@ distclean-tags:
distdir: $(DISTFILES)
$(am__remove_distdir)
mkdir $(distdir)
$(mkdir_p) $(distdir)/.
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
@ -524,7 +544,7 @@ distcleancheck: distclean
exit 1; } >&2
check-am: all-am
check: check-am
all-am: Makefile $(LTLIBRARIES) $(HEADERS)
all-am: Makefile $(LTLIBRARIES) $(HEADERS) config.h
installdirs:
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
@ -563,7 +583,7 @@ distclean: distclean-am
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
distclean-hdr distclean-libtool distclean-tags
dvi: dvi-am
@ -575,7 +595,7 @@ info: info-am
info-am:
install-data-am: install-includeHEADERS
install-data-am: install-data-local install-includeHEADERS
install-exec-am: install-libLTLIBRARIES
@ -611,10 +631,11 @@ uninstall-am: uninstall-includeHEADERS uninstall-info-am \
clean-generic clean-libLTLIBRARIES clean-libtool \
clean-noinstLTLIBRARIES ctags dist dist-all dist-bzip2 \
dist-gzip dist-shar dist-tarZ dist-zip distcheck distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distcleancheck distdir distuninstallcheck dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-exec install-exec-am \
distclean-compile distclean-generic distclean-hdr \
distclean-libtool distclean-tags distcleancheck distdir \
distuninstallcheck dvi dvi-am html html-am info info-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-libLTLIBRARIES install-man install-strip installcheck \
installcheck-am installdirs maintainer-clean \
@ -630,18 +651,11 @@ $(libltdl_la_OBJECTS) $(libltdlc_la_OBJECTS): libtool
libtool: $(LIBTOOL_DEPS)
$(SHELL) ./config.status --recheck
local-install-files: $(DISTFILES)
-rm -rf $(DESTDIR)$(datadir)/libtool/libltdl
$(mkinstalldirs) $(DESTDIR)$(datadir)/libtool/libltdl
@for file in $(DISTFILES); do \
d=$(srcdir); \
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
install-data-local:
-rm -rf $(DESTDIR)$(ltdldatadir)
$(mkinstalldirs) $(DESTDIR)$(ltdldatadir)
( cd $(srcdir) && $(AMTAR) chf - $(ltdldatafiles); ) \
| ( umask 0 && cd $(DESTDIR)$(ltdldatadir) && $(AMTAR) xf -; )
# 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.
.NOEXPORT:

File diff suppressed because it is too large Load Diff

View File

@ -396,6 +396,30 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
[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 -*-
# This macro actually does too much some checks are only needed if
@ -580,46 +604,6 @@ fi
rmdir .tst 2>/dev/null
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 -*-
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.

File diff suppressed because it is too large Load Diff

View File

@ -13,17 +13,19 @@
#
# 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
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301 USA
dnl FIXME: Is this really new enough?
AC_PREREQ(2.50)
## ------------------------ ##
## Autoconf initialisation. ##
## ------------------------ ##
AC_PREREQ(2.59)
AC_INIT([libltdl], [1.2], [bug-libtool@gnu.org])
AC_CONFIG_SRCDIR([ltdl.c])
AC_CONFIG_FILES([config.h:config-h.in])
## ------------------------------- ##
@ -48,8 +50,8 @@ fi
## ------------------------ ##
## Automake Initialisation. ##
## ------------------------ ##
AM_INIT_AUTOMAKE([1.9.1])
AM_MAINTAINER_MODE
AM_INIT_AUTOMAKE(AC_PACKAGE_TARNAME, AC_PACKAGE_VERSION, -)
AM_CONFIG_HEADER([config.h:config-h.in])
## ------------------ ##

View File

@ -1,7 +1,8 @@
#!/bin/sh
#
# install - install a program, script, or datafile
#
scriptversion=2005-02-02.21
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
@ -41,13 +42,11 @@
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
@ -59,236 +58,266 @@ stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
transformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
chowncmd=
chgrpcmd=
stripcmd=
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""
src=
dst=
dir_arg=
dstarg=
no_target_directory=
while [ x"$1" != x ]; do
case $1 in
-c) instcmd=$cpprog
shift
continue;;
usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES...
-d) dir_arg=true
shift
continue;;
In the 1st form, copy SRCFILE to DSTFILE.
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
Options:
-c (ignored)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
-s $stripprog installed files.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
--help display this help and exit.
--version display version info and exit.
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
"
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
while test -n "$1"; do
case $1 in
-c) shift
continue;;
-s) stripcmd=$stripprog
shift
continue;;
-d) dir_arg=true
shift
continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
--help) echo "$usage"; exit $?;;
*) if [ x"$src" = x ]
then
src=$1
else
# this colon is to work around a 386BSD /bin/sh bug
:
dst=$1
fi
shift
continue;;
esac
done
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
if [ x"$src" = x ]
then
echo "$0: no input file specified" >&2
exit 1
else
:
fi
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
-s) stripcmd=$stripprog
shift
continue;;
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
-t) dstarg=$2
shift
shift
continue;;
if [ ! -d "$pathcomp" ] ;
then
$mkdirprog "$pathcomp"
else
:
fi
-T) no_target_directory=true
shift
continue;;
pathcomp=$pathcomp/
--version) echo "$0 $scriptversion"; exit $?;;
*) # When -d is used, all remaining arguments are directories to create.
# 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
if test -z "$1"; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
fi
# It's OK to call `install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
if [ x"$dir_arg" != x ]
then
$doit $instcmd "$dst" &&
for src
do
# Protect names starting with `-'.
case $src in
-*) src=./$src ;;
esac
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
else
if test -n "$dir_arg"; then
dst=$src
src=
# If we're going to rename the final executable, determine the name now.
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 [ x"$transformarg" = x ]
then
dstfile=`basename "$dst"`
else
dstfile=`basename "$dst" $transformbasename |
sed $transformarg`$transformbasename
fi
if test -z "$dstarg"; then
echo "$0: no destination specified." >&2
exit 1
fi
# don't allow the sed command to completely eliminate the filename
dst=$dstarg
# Protect names starting with `-'.
case $dst in
-*) dst=./$dst ;;
esac
if [ x"$dstfile" = x ]
then
dstfile=`basename "$dst"`
else
:
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
# Make a couple of temp file names in the proper directory.
# This sed command emulates the dirname command.
dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
dsttmp=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_
# Make sure that the destination directory exists.
# Trap to clean up temp files at exit.
# Skip lots of stat calls in the usual case.
if test ! -d "$dstdir"; then
defaultIFS='
'
IFS="${IFS-$defaultIFS}"
trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
trap '(exit $?); exit' 1 2 13 15
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
# Move or copy the file name to the temp name
pathcomp=
$doit $instcmd "$src" "$dsttmp" &&
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
# and set any options; do chmod last to preserve setuid bits
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"; }
# 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.
else
dstfile=`basename "$dst"`
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 &&
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_
# 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.
# 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
{
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
} &&
# Copy the file name to the temp name.
$doit $cpprog "$src" "$dsttmp" &&
# Now rename the file to the real destination.
# 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"; } &&
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
# 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.
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 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.
{
(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:

View File

@ -1,5 +1,5 @@
/* 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>
This file is part of GNU Libtool.
@ -20,8 +20,8 @@ Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
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
*/
@ -29,6 +29,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
# include <config.h>
#endif
#if HAVE_BOEHM_GC
# include <gc.h>
#endif
#if HAVE_UNISTD_H
# include <unistd.h>
#endif
@ -37,8 +41,14 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
# include <stdio.h>
#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
# include <stdlib.h>
#else
# if HAVE_MALLOC_H
# include <malloc.h>
# endif
#endif
#if HAVE_STRING_H
@ -53,10 +63,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
# include <ctype.h>
#endif
#if HAVE_MALLOC_H
# include <malloc.h>
#endif
#if HAVE_MEMORY_H
# include <memory.h>
#endif
@ -65,10 +71,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
# include <errno.h>
#endif
#if HAVE_BOEHM_GC
#include <gc.h>
#endif
#ifndef __WINDOWS__
# ifdef __WIN32__
@ -241,7 +243,7 @@ LT_GLOBAL_DATA void (*lt_dlfree) LT_PARAMS((lt_ptr ptr))
#else
#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) \
LT_STMT_START { if (p) (p) = (lt_dlfree (p), (lt_ptr) 0); } LT_STMT_END
@ -387,11 +389,13 @@ memcpy (dest, src, size)
const lt_ptr src;
size_t size;
{
size_t i = 0;
const char * s = src;
char * d = dest;
size_t i = 0;
for (i = 0; i < size; ++i)
{
dest[i] = src[i];
d[i] = s[i];
}
return dest;
@ -411,17 +415,21 @@ memmove (dest, src, size)
const lt_ptr src;
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)
{
dest[i] = src[i];
d[i] = s[i];
}
else if (dest > src)
for (i = size -1; i >= 0; --i)
else if (d > s && size > 0)
for (i = size -1; ; --i)
{
dest[i] = src[i];
d[i] = s[i];
if (i == 0)
break;
}
return dest;
@ -453,7 +461,9 @@ opendir (path)
DIR *entry;
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,"\\");
entry = LT_DLMALLOC (DIR,sizeof(DIR));
if (entry != (DIR *) 0)
@ -494,6 +504,7 @@ static struct dirent *readdir(entry)
entry->firsttime = FALSE;
(void) strncpy(entry->file_info.d_name,entry->Win32FindData.cFileName,
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);
return(&entry->file_info);
}
@ -686,7 +697,7 @@ argz_insert (pargz, pargz_len, before, entry)
/* This probably indicates a programmer error, but to preserve
semantics, scan back to the start of an entry if BEFORE points
into the middle of it. */
while ((before >= *pargz) && (before[-1] != LT_EOS_CHAR))
while ((before > *pargz) && (before[-1] != LT_EOS_CHAR))
--before;
{
@ -1020,7 +1031,7 @@ lt_erealloc (addr, size)
lt_ptr addr;
size_t size;
{
lt_ptr mem = realloc (addr, size);
lt_ptr mem = lt_dlrealloc (addr, size);
if (size && !mem)
LT_DLMUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY));
return mem;
@ -1584,7 +1595,11 @@ static struct lt_user_dlloader sys_dld = {
#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
#include <mach-o/getsect.h>
@ -1684,7 +1699,6 @@ static const char* lt_int_dyld_lib_install_name(mh)
int j;
struct load_command *lc;
unsigned long offset = sizeof(struct mach_header);
const struct mach_header *mh1;
const char* retStr=NULL;
for (j = 0; j < mh->ncmds; j++)
{
@ -1824,7 +1838,6 @@ sys_dyld_close (loader_data, module)
{
int retCode = 0;
int flags = 0;
unsigned long size=0;
if (module == (lt_module)-1) return 0;
#ifdef __BIG_ENDIAN__
if (((struct mach_header *)module)->magic == MH_MAGIC)
@ -1872,6 +1885,7 @@ sys_dyld_sym (loader_data, module, symbol)
NSSymbol *nssym = 0;
void *unused;
const struct mach_header *mh=NULL;
char saveError[256] = "Symbol not found";
if (module == (lt_module)-1)
{
_dyld_lookup_and_bind(symbol,(unsigned long*)&address,&unused);
@ -1902,12 +1916,14 @@ sys_dyld_sym (loader_data, module, symbol)
}
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);
nssym = lt_int_dyld_NSlookupSymbolInLinkedLibs(symbol,mh);
}
if (!nssym)
{
LT_DLMUTEX_SETERROR (lt_int_dyld_error(LT_DLSTRERROR(SYMBOL_NOT_FOUND)));
LT_DLMUTEX_SETERROR (saveError);
return NULL;
}
return NSAddressOfSymbol(nssym);
@ -2988,6 +3004,9 @@ trim (dest, str)
LT_DLFREE (*dest);
if (!end)
return 1;
if (len > 3 && str[0] == '\'')
{
tmp = LT_EMALLOC (char, end - str);
@ -3092,7 +3111,7 @@ try_dlopen (phandle, filename)
++base_name;
}
else
LT_DLMEM_REASSIGN (base_name, canonical);
base_name = canonical;
assert (base_name && *base_name);
@ -3923,7 +3942,7 @@ lt_dlerror ()
LT_DLMUTEX_GETERROR (error);
LT_DLMUTEX_SETERROR (0);
return error ? error : LT_DLSTRERROR (UNKNOWN);
return error ? error : NULL;
}
static int

View File

@ -20,8 +20,8 @@ Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/* Only include this header file once. */
@ -79,7 +79,7 @@ LT_BEGIN_C_DECLS
/* LT_CONC creates a new concatenated symbol for the compiler
in a portable way. */
#if defined(__STDC__) || defined(__cplusplus)
#if defined(__STDC__) || defined(__cplusplus) || defined(_MSC_VER)
# define LT_CONC(s,t) s##t
#else
# define LT_CONC(s,t) s/**/t
@ -111,6 +111,7 @@ LT_BEGIN_C_DECLS
# endif
#endif
#ifdef __WINDOWS__
# ifndef __CYGWIN__
/* LT_DIRSEP_CHAR is accepted *in addition* to '/' as a directory
@ -140,6 +141,10 @@ LT_BEGIN_C_DECLS
#endif
#if defined(_MSC_VER) /* Visual Studio */
# define R_OK 4
#endif
/* --- DYNAMIC MODULE LOADING API --- */
@ -148,31 +153,31 @@ LT_BEGIN_C_DECLS
typedef struct lt_dlhandle_struct *lt_dlhandle; /* A loaded module. */
/* Initialisation and finalisation functions for libltdl. */
extern int lt_dlinit LT_PARAMS((void));
extern int lt_dlexit LT_PARAMS((void));
LT_SCOPE int lt_dlinit LT_PARAMS((void));
LT_SCOPE int lt_dlexit LT_PARAMS((void));
/* Module search path manipulation. */
extern int lt_dladdsearchdir LT_PARAMS((const char *search_dir));
extern int lt_dlinsertsearchdir LT_PARAMS((const char *before,
LT_SCOPE int lt_dladdsearchdir LT_PARAMS((const char *search_dir));
LT_SCOPE int lt_dlinsertsearchdir LT_PARAMS((const char *before,
const char *search_dir));
extern int lt_dlsetsearchpath LT_PARAMS((const char *search_path));
extern const char *lt_dlgetsearchpath LT_PARAMS((void));
extern int lt_dlforeachfile LT_PARAMS((
LT_SCOPE int lt_dlsetsearchpath LT_PARAMS((const char *search_path));
LT_SCOPE const char *lt_dlgetsearchpath LT_PARAMS((void));
LT_SCOPE int lt_dlforeachfile LT_PARAMS((
const char *search_path,
int (*func) (const char *filename, lt_ptr data),
lt_ptr data));
/* Portable libltdl versions of the system dlopen() API. */
extern lt_dlhandle lt_dlopen LT_PARAMS((const char *filename));
extern lt_dlhandle lt_dlopenext LT_PARAMS((const char *filename));
extern lt_ptr lt_dlsym LT_PARAMS((lt_dlhandle handle,
LT_SCOPE lt_dlhandle lt_dlopen LT_PARAMS((const char *filename));
LT_SCOPE lt_dlhandle lt_dlopenext LT_PARAMS((const char *filename));
LT_SCOPE lt_ptr lt_dlsym LT_PARAMS((lt_dlhandle handle,
const char *name));
extern const char *lt_dlerror LT_PARAMS((void));
extern int lt_dlclose LT_PARAMS((lt_dlhandle handle));
LT_SCOPE const char *lt_dlerror LT_PARAMS((void));
LT_SCOPE int lt_dlclose LT_PARAMS((lt_dlhandle handle));
/* Module residency management. */
extern int lt_dlmakeresident LT_PARAMS((lt_dlhandle handle));
extern int lt_dlisresident LT_PARAMS((lt_dlhandle handle));
LT_SCOPE int lt_dlmakeresident 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));
typedef void lt_dlmutex_seterror LT_PARAMS((const char *errmsg));
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_seterror *seterror,
lt_dlmutex_geterror *geterror));
@ -218,8 +223,8 @@ typedef struct {
lt_ptr address;
} lt_dlsymlist;
extern int lt_dlpreload LT_PARAMS((const lt_dlsymlist *preloaded));
extern int lt_dlpreload_default
LT_SCOPE int lt_dlpreload LT_PARAMS((const lt_dlsymlist *preloaded));
LT_SCOPE int lt_dlpreload_default
LT_PARAMS((const lt_dlsymlist *preloaded));
#define LTDL_SET_PRELOADED_SYMBOLS() LT_STMT_START{ \
@ -241,20 +246,20 @@ typedef struct {
number of times lt_dlclosed. */
} lt_dlinfo;
extern const lt_dlinfo *lt_dlgetinfo LT_PARAMS((lt_dlhandle handle));
extern lt_dlhandle lt_dlhandle_next LT_PARAMS((lt_dlhandle place));
extern int lt_dlforeach LT_PARAMS((
LT_SCOPE const lt_dlinfo *lt_dlgetinfo LT_PARAMS((lt_dlhandle handle));
LT_SCOPE lt_dlhandle lt_dlhandle_next LT_PARAMS((lt_dlhandle place));
LT_SCOPE int lt_dlforeach LT_PARAMS((
int (*func) (lt_dlhandle handle, lt_ptr data),
lt_ptr data));
/* Associating user data with loaded modules. */
typedef unsigned lt_dlcaller_id;
extern 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_dlcaller_id lt_dlcaller_register LT_PARAMS((void));
LT_SCOPE lt_ptr lt_dlcaller_set_data LT_PARAMS((lt_dlcaller_id key,
lt_dlhandle handle,
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));
@ -285,15 +290,15 @@ struct lt_user_dlloader {
lt_user_data dlloader_data;
};
extern lt_dlloader *lt_dlloader_next LT_PARAMS((lt_dlloader *place));
extern lt_dlloader *lt_dlloader_find LT_PARAMS((
LT_SCOPE lt_dlloader *lt_dlloader_next LT_PARAMS((lt_dlloader *place));
LT_SCOPE lt_dlloader *lt_dlloader_find LT_PARAMS((
const char *loader_name));
extern const char *lt_dlloader_name LT_PARAMS((lt_dlloader *place));
extern lt_user_data *lt_dlloader_data LT_PARAMS((lt_dlloader *place));
extern int lt_dlloader_add LT_PARAMS((lt_dlloader *place,
LT_SCOPE const char *lt_dlloader_name LT_PARAMS((lt_dlloader *place));
LT_SCOPE lt_user_data *lt_dlloader_data LT_PARAMS((lt_dlloader *place));
LT_SCOPE int lt_dlloader_add LT_PARAMS((lt_dlloader *place,
const struct lt_user_dlloader *dlloader,
const char *loader_name));
extern int lt_dlloader_remove LT_PARAMS((
LT_SCOPE int lt_dlloader_remove LT_PARAMS((
const char *loader_name));
@ -336,8 +341,8 @@ enum {
};
/* These functions are only useful from inside custom module loaders. */
extern int lt_dladderror LT_PARAMS((const char *diagnostic));
extern int lt_dlseterror LT_PARAMS((int errorcode));
LT_SCOPE int lt_dladderror LT_PARAMS((const char *diagnostic));
LT_SCOPE int lt_dlseterror LT_PARAMS((int errorcode));

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,10 @@
#! /bin/sh
# 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.
# This program is free software; you can redistribute it and/or modify
@ -38,18 +42,24 @@ else
configure_ac=configure.in
fi
msg="missing on your system"
case "$1" in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
shift
"$@" && 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)
echo "\
@ -74,11 +84,15 @@ Supported PROGRAM values:
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
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)
echo "missing 0.4 - GNU automake"
echo "missing $scriptversion (GNU Automake)"
exit 0
;;
-*)
@ -87,14 +101,44 @@ Supported PROGRAM values:
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
# We have it, but it failed.
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
;;
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 "\
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
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
@ -102,13 +146,8 @@ WARNING: \`$1' is missing on your system. You should only need it if
;;
autoconf)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
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
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
@ -116,13 +155,8 @@ WARNING: \`$1' is missing on your system. You should only need it if
;;
autoheader)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
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
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
@ -140,13 +174,8 @@ WARNING: \`$1' is missing on your system. You should only need it if
;;
automake*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
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 might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
@ -156,14 +185,9 @@ WARNING: \`$1' is missing on your system. You should only need it if
;;
autom4te)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is needed, and you do not seem to have it handy on your
system. You might have modified some files without having the
WARNING: \`$1' is needed, but is $msg.
You might have modified some files without having the
proper tools for further handling them.
You can get \`$1' as part of \`Autoconf' from any GNU
archive site."
@ -185,7 +209,7 @@ WARNING: \`$1' is needed, and you do not seem to have it handy on your
bison|yacc)
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
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
@ -215,7 +239,7 @@ WARNING: \`$1' is missing on your system. You should only need it if
lex|flex)
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
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
@ -237,13 +261,8 @@ WARNING: \`$1' is missing on your system. You should only need it if
;;
help2man)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
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
\`Help2man' package in order for those modifications to take
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
;;
makeinfo)
if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
# We have makeinfo, but it failed.
exit 1
fi
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
indirectly affecting the aspect of the manual. The spurious
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
tar)
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.
# 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.
*)
echo 1>&2 "\
WARNING: \`$1' is needed, and you do not seem to have it handy on your
system. You might have modified some files without having the
WARNING: \`$1' is needed, and is $msg.
You might have modified some files without having the
proper tools for further handling them. Check the \`README' file,
it often tells you about the needed prerequisites for installing
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
esac
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:

View File

@ -1,111 +0,0 @@
#! /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