summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMandrake <mandrake@user.sourceforge.net>1999-10-31 19:45:22 +0000
committerMandrake <mandrake@user.sourceforge.net>1999-10-31 19:45:22 +0000
commit202c34558d226a12c43e4df3db5a822765ef667f (patch)
tree43df2c060f9a577f2103f77571f20d2c58efc737
parent7e72d5bac79dc943fa794b269b97fbd236807e63 (diff)
downloadimlib2-202c34558d226a12c43e4df3db5a822765ef667f.tar.gz
Sun Oct 31 20:21:13 PST 1999
(Mandrake) libltdl (large chunks of it) is automatically generated by autogen.sh. no need for those files to be in CVS. SVN revision: 1084
-rw-r--r--ChangeLog6
-rw-r--r--libltdl/.cvsignore8
-rw-r--r--libltdl/Makefile.am44
-rw-r--r--libltdl/Makefile.in454
-rw-r--r--libltdl/acinclude.m4427
-rw-r--r--libltdl/aclocal.m4566
-rw-r--r--libltdl/config.h.in80
-rw-r--r--libltdl/configure.in373
-rw-r--r--libltdl/ltdl.c1617
-rw-r--r--libltdl/ltdl.h91
10 files changed, 14 insertions, 3652 deletions
diff --git a/ChangeLog b/ChangeLog
index 62be6d1..a16d8d3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,3 +7,9 @@ main.c:287: warning: implicit declaration of function `__imlib_draw_line'
which I believe is because it's not using the appropriate API call yet.
-------------------------------------------------------------------------------
+
+Sun Oct 31 20:21:13 PST 1999
+(Mandrake)
+
+libltdl (large chunks of it) is automatically generated by autogen.sh.
+no need for those files to be in CVS.
diff --git a/libltdl/.cvsignore b/libltdl/.cvsignore
index e654bee..206bcd3 100644
--- a/libltdl/.cvsignore
+++ b/libltdl/.cvsignore
@@ -1,11 +1,19 @@
configure
+configure.in
config.log
libtool
config.h
config.status
stamp-h
+Makefile.am
+Makefile.in
Makefile
.libs
.deps
*.lo
*.la
+ltdl.c
+ltdl.h
+acinclude.m4
+aclocal.m4
+config.h.in
diff --git a/libltdl/Makefile.am b/libltdl/Makefile.am
deleted file mode 100644
index 12bdcbb..0000000
--- a/libltdl/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-AUTOMAKE_OPTIONS = no-dependencies foreign
-
-if INSTALL_LTDL
-include_HEADERS = ltdl.h
-lib_LTLIBRARIES = libltdl.la
-else
-noinst_HEADERS = ltdl.h
-endif
-
-if CONVENIENCE_LTDL
-noinst_LTLIBRARIES = libltdlc.la
-endif
-
-libltdl_la_SOURCES = ltdl.c
-libltdl_la_LDFLAGS = -version-info 1:1:1
-libltdl_la_LIBADD = $(LIBADD_DL)
-
-libltdlc_la_SOURCES = ltdl.c
-libltdlc_la_LIBADD = $(LIBADD_DL)
-
-## Because we do not have automatic dependency tracking:
-ltdl.lo: ltdl.h config.h
-
-$(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: Removed 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 -pr $$d/$$file $(DESTDIR)$(datadir)/libtool/libltdl/$$file; \
- else \
- test -f $(DESTDIR)$(datadir)/libtool/libltdl/$$file \
- || cp -p $$d/$$file $(DESTDIR)$(datadir)/libtool/libltdl/$$file || :; \
- fi; \
- done
diff --git a/libltdl/Makefile.in b/libltdl/Makefile.in
deleted file mode 100644
index 6d4c93b..0000000
--- a/libltdl/Makefile.in
+++ /dev/null
@@ -1,454 +0,0 @@
-# Makefile.in generated automatically by automake 1.4 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999 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.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = .
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-host_alias = @host_alias@
-host_triplet = @host@
-AS = @AS@
-CC = @CC@
-DLLTOOL = @DLLTOOL@
-LD = @LD@
-LIBADD_DL = @LIBADD_DL@
-LIBTOOL = @LIBTOOL@
-LIBTOOL_DEPS = @LIBTOOL_DEPS@
-LN_S = @LN_S@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-NM = @NM@
-OBJDUMP = @OBJDUMP@
-PACKAGE = @PACKAGE@
-RANLIB = @RANLIB@
-VERSION = @VERSION@
-
-AUTOMAKE_OPTIONS = no-dependencies foreign
-
-@INSTALL_LTDL_TRUE@include_HEADERS = ltdl.h
-@INSTALL_LTDL_TRUE@lib_LTLIBRARIES = libltdl.la
-@INSTALL_LTDL_FALSE@noinst_HEADERS = ltdl.h
-
-@CONVENIENCE_LTDL_TRUE@noinst_LTLIBRARIES = libltdlc.la
-
-libltdl_la_SOURCES = ltdl.c
-libltdl_la_LDFLAGS = -version-info 1:1:1
-libltdl_la_LIBADD = $(LIBADD_DL)
-
-libltdlc_la_SOURCES = ltdl.c
-libltdlc_la_LIBADD = $(LIBADD_DL)
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
-CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES =
-LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir) -I.
-CPPFLAGS = @CPPFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBS = @LIBS@
-libltdl_la_DEPENDENCIES =
-libltdl_la_OBJECTS = ltdl.lo
-libltdlc_la_LDFLAGS =
-libltdlc_la_DEPENDENCIES =
-libltdlc_la_OBJECTS = ltdl.lo
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-HEADERS = $(include_HEADERS) $(noinst_HEADERS)
-
-DIST_COMMON = README ./stamp-h.in COPYING.LIB Makefile.am Makefile.in \
-acconfig.h acinclude.m4 aclocal.m4 config.h.in configure configure.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = tar
-GZIP_ENV = --best
-SOURCES = $(libltdl_la_SOURCES) $(libltdlc_la_SOURCES)
-OBJECTS = $(libltdl_la_OBJECTS) $(libltdlc_la_OBJECTS)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .lo .o .s
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in acinclude.m4
- cd $(srcdir) && $(ACLOCAL)
-
-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
- cd $(srcdir) && $(AUTOCONF)
-
-config.h: stamp-h
- @if test ! -f $@; then \
- rm -f stamp-h; \
- $(MAKE) stamp-h; \
- else :; fi
-stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES= CONFIG_HEADERS=config.h \
- $(SHELL) ./config.status
- @echo timestamp > stamp-h 2> /dev/null
-$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@$(srcdir)/stamp-h.in
- @if test ! -f $@; then \
- rm -f $(srcdir)/stamp-h.in; \
- $(MAKE) $(srcdir)/stamp-h.in; \
- else :; fi
-$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
- cd $(top_srcdir) && $(AUTOHEADER)
- @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null
-
-mostlyclean-hdr:
-
-clean-hdr:
-
-distclean-hdr:
- -rm -f config.h
-
-maintainer-clean-hdr:
-
-mostlyclean-libLTLIBRARIES:
-
-clean-libLTLIBRARIES:
- -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
-
-distclean-libLTLIBRARIES:
-
-maintainer-clean-libLTLIBRARIES:
-
-install-libLTLIBRARIES: $(lib_LTLIBRARIES)
- @$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(libdir)
- @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
- if test -f $$p; then \
- echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p"; \
- $(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p; \
- else :; fi; \
- done
-
-uninstall-libLTLIBRARIES:
- @$(NORMAL_UNINSTALL)
- list='$(lib_LTLIBRARIES)'; for p in $$list; do \
- $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \
- done
-
-mostlyclean-noinstLTLIBRARIES:
-
-clean-noinstLTLIBRARIES:
- -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
-
-distclean-noinstLTLIBRARIES:
-
-maintainer-clean-noinstLTLIBRARIES:
-
-.c.o:
- $(COMPILE) -c $<
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-.c.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.s.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.S.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
-
-maintainer-clean-libtool:
-
-libltdl.la: $(libltdl_la_OBJECTS) $(libltdl_la_DEPENDENCIES)
- $(LINK) -rpath $(libdir) $(libltdl_la_LDFLAGS) $(libltdl_la_OBJECTS) $(libltdl_la_LIBADD) $(LIBS)
-
-libltdlc.la: $(libltdlc_la_OBJECTS) $(libltdlc_la_DEPENDENCIES)
- $(LINK) $(libltdlc_la_LDFLAGS) $(libltdlc_la_OBJECTS) $(libltdlc_la_LIBADD) $(LIBS)
-
-install-includeHEADERS: $(include_HEADERS)
- @$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(includedir)
- @list='$(include_HEADERS)'; for p in $$list; do \
- if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
- echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/$$p"; \
- $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/$$p; \
- done
-
-uninstall-includeHEADERS:
- @$(NORMAL_UNINSTALL)
- list='$(include_HEADERS)'; for p in $$list; do \
- rm -f $(DESTDIR)$(includedir)/$$p; \
- done
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- -rm -rf $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
- mkdir $(distdir)/=build
- mkdir $(distdir)/=inst
- dc_install_base=`cd $(distdir)/=inst && pwd`; \
- cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) dist
- -rm -rf $(distdir)
- @banner="$(distdir).tar.gz is ready for distribution"; \
- dashes=`echo "$$banner" | sed s/./=/g`; \
- echo "$$dashes"; \
- echo "$$banner"; \
- echo "$$dashes"
-dist: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-dist-all: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-distdir: $(DISTFILES)
- -rm -rf $(distdir)
- mkdir $(distdir)
- -chmod 777 $(distdir)
- @for file in $(DISTFILES); do \
- d=$(srcdir); \
- if test -d $$d/$$file; then \
- cp -pr $$/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
-info-am:
-info: info-am
-dvi-am:
-dvi: dvi-am
-check-am: all-am
-check: check-am
-installcheck-am:
-installcheck: installcheck-am
-all-recursive-am: config.h
- $(MAKE) $(AM_MAKEFLAGS) all-recursive
-
-install-exec-am: install-libLTLIBRARIES
-install-exec: install-exec-am
-
-install-data-am: install-includeHEADERS
-install-data: install-data-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am: uninstall-libLTLIBRARIES uninstall-includeHEADERS
-uninstall: uninstall-am
-all-am: Makefile $(LTLIBRARIES) $(HEADERS) config.h
-all-redirect: all-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
- $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir)
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-hdr mostlyclean-libLTLIBRARIES \
- mostlyclean-noinstLTLIBRARIES mostlyclean-compile \
- mostlyclean-libtool mostlyclean-tags \
- mostlyclean-generic
-
-mostlyclean: mostlyclean-am
-
-clean-am: clean-hdr clean-libLTLIBRARIES clean-noinstLTLIBRARIES \
- clean-compile clean-libtool clean-tags clean-generic \
- mostlyclean-am
-
-clean: clean-am
-
-distclean-am: distclean-hdr distclean-libLTLIBRARIES \
- distclean-noinstLTLIBRARIES distclean-compile \
- distclean-libtool distclean-tags distclean-generic \
- clean-am
- -rm -f libtool
-
-distclean: distclean-am
- -rm -f config.status
-
-maintainer-clean-am: maintainer-clean-hdr \
- maintainer-clean-libLTLIBRARIES \
- maintainer-clean-noinstLTLIBRARIES \
- maintainer-clean-compile maintainer-clean-libtool \
- maintainer-clean-tags maintainer-clean-generic \
- distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-am
- -rm -f config.status
-
-.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
-mostlyclean-libLTLIBRARIES distclean-libLTLIBRARIES \
-clean-libLTLIBRARIES maintainer-clean-libLTLIBRARIES \
-uninstall-libLTLIBRARIES install-libLTLIBRARIES \
-mostlyclean-noinstLTLIBRARIES distclean-noinstLTLIBRARIES \
-clean-noinstLTLIBRARIES maintainer-clean-noinstLTLIBRARIES \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile mostlyclean-libtool distclean-libtool \
-clean-libtool maintainer-clean-libtool uninstall-includeHEADERS \
-install-includeHEADERS tags mostlyclean-tags distclean-tags clean-tags \
-maintainer-clean-tags distdir info-am info dvi-am dvi check check-am \
-installcheck-am installcheck all-recursive-am install-exec-am \
-install-exec install-data-am install-data install-am install \
-uninstall-am uninstall all-redirect all-am all installdirs \
-mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-
-
-ltdl.lo: ltdl.h config.h
-
-$(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 -pr $$d/$$file $(DESTDIR)$(datadir)/libtool/libltdl/$$file; \
- else \
- test -f $(DESTDIR)$(datadir)/libtool/libltdl/$$file \
- || cp -p $$d/$$file $(DESTDIR)$(datadir)/libtool/libltdl/$$file || :; \
- fi; \
- done
-
-# 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:
diff --git a/libltdl/acinclude.m4 b/libltdl/acinclude.m4
deleted file mode 100644
index 2ad3206..0000000
--- a/libltdl/acinclude.m4
+++ /dev/null
@@ -1,427 +0,0 @@
-## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*-
-## Copyright (C) 1996-1999 Free Software Foundation, Inc.
-## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-##
-## 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 of the License, 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.
-##
-## 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 40 AC_PROG_LIBTOOL
-AC_DEFUN(AC_PROG_LIBTOOL,
-[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
-
-# Save cache, so that ltconfig can load it
-AC_CACHE_SAVE
-
-# Actually configure libtool. ac_aux_dir is where install-sh is found.
-CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
-DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
-$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
-|| AC_MSG_ERROR([libtool configure failed])
-
-# Reload cache, that may have been modified by ltconfig
-AC_CACHE_LOAD
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-AC_SUBST(LIBTOOL)dnl
-
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
-])
-
-AC_DEFUN(AC_LIBTOOL_SETUP,
-[AC_PREREQ(2.13)dnl
-AC_REQUIRE([AC_ENABLE_SHARED])dnl
-AC_REQUIRE([AC_ENABLE_STATIC])dnl
-AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_REQUIRE([AC_PROG_RANLIB])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_PROG_LD])dnl
-AC_REQUIRE([AC_PROG_NM])dnl
-AC_REQUIRE([AC_PROG_LN_S])dnl
-dnl
-
-# Check for any special flags to pass to ltconfig.
-libtool_flags="--cache-file=$cache_file"
-test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
-test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
-test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
-test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
-test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
-ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
-[libtool_flags="$libtool_flags --enable-dlopen"])
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-[libtool_flags="$libtool_flags --enable-win32-dll"])
-AC_ARG_ENABLE(libtool-lock,
- [ --disable-libtool-lock avoid locking (might break parallel builds)])
-test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
-test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case "$host" in
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '[#]line __oline__ "configure"' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case "`/usr/bin/file conftest.o`" in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
- [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- fi
- ;;
-
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-[*-*-cygwin* | *-*-mingw*)
- AC_CHECK_TOOL(DLLTOOL, dlltool, false)
- AC_CHECK_TOOL(AS, as, false)
- AC_CHECK_TOOL(OBJDUMP, objdump, false)
- ;;
-])
-esac
-])
-
-# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
-AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
-
-# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
-AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
-
-# AC_ENABLE_SHARED - implement the --enable-shared flag
-# Usage: AC_ENABLE_SHARED[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN(AC_ENABLE_SHARED, [dnl
-define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(shared,
-changequote(<<, >>)dnl
-<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case "$enableval" in
-yes) enable_shared=yes ;;
-no) enable_shared=no ;;
-*)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
-])
-
-# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
-AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_SHARED(no)])
-
-# AC_ENABLE_STATIC - implement the --enable-static flag
-# Usage: AC_ENABLE_STATIC[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN(AC_ENABLE_STATIC, [dnl
-define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(static,
-changequote(<<, >>)dnl
-<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case "$enableval" in
-yes) enable_static=yes ;;
-no) enable_static=no ;;
-*)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
-])
-
-# AC_DISABLE_STATIC - set the default static flag to --disable-static
-AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_STATIC(no)])
-
-
-# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
-# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
-define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(fast-install,
-changequote(<<, >>)dnl
-<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case "$enableval" in
-yes) enable_fast_install=yes ;;
-no) enable_fast_install=no ;;
-*)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
-])
-
-# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
-AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_FAST_INSTALL(no)])
-
-# AC_PROG_LD - find the path to the GNU or non-GNU linker
-AC_DEFUN(AC_PROG_LD,
-[AC_ARG_WITH(gnu-ld,
-[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-ac_prog=ld
-if test "$ac_cv_prog_gcc" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- AC_MSG_CHECKING([for ld used by GCC])
- ac_prog=`($CC -print-prog-name=ld) 2>&5`
- case "$ac_prog" in
- # Accept absolute paths.
-changequote(,)dnl
- [\\/]* | [A-Za-z]:[\\/]*)
- re_direlt='/[^/][^/]*/\.\./'
-changequote([,])dnl
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- AC_MSG_CHECKING([for GNU ld])
-else
- AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(ac_cv_path_LD,
-[if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- ac_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
- test "$with_gnu_ld" != no && break
- else
- test "$with_gnu_ld" != yes && break
- fi
- fi
- done
- IFS="$ac_save_ifs"
-else
- ac_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$ac_cv_path_LD"
-if test -n "$LD"; then
- AC_MSG_RESULT($LD)
-else
- AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_SUBST(LD)
-AC_PROG_LD_GNU
-])
-
-AC_DEFUN(AC_PROG_LD_GNU,
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
- ac_cv_prog_gnu_ld=yes
-else
- ac_cv_prog_gnu_ld=no
-fi])
-])
-
-# AC_PROG_NM - find the path to a BSD-compatible name lister
-AC_DEFUN(AC_PROG_NM,
-[AC_MSG_CHECKING([for BSD-compatible nm])
-AC_CACHE_VAL(ac_cv_path_NM,
-[if test -n "$NM"; then
- # Let the user override the test.
- ac_cv_path_NM="$NM"
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- ac_cv_path_NM="$ac_dir/nm -B"
- break
- elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- ac_cv_path_NM="$ac_dir/nm -p"
- break
- else
- ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
- continue # so that we can try to find one that supports BSD flags
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
-fi])
-NM="$ac_cv_path_NM"
-AC_MSG_RESULT([$NM])
-AC_SUBST(NM)
-])
-
-# AC_CHECK_LIBM - check for math library
-AC_DEFUN(AC_CHECK_LIBM,
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-LIBM=
-case "$host" in
-*-*-beos* | *-*-cygwin*)
- # These system don't have libm
- ;;
-*-ncr-sysv4.3*)
- AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
- AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
- ;;
-*)
- AC_CHECK_LIB(m, main, LIBM="-lm")
- ;;
-esac
-])
-
-# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl convenience library, adds --enable-ltdl-convenience to
-# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
-# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
-# to be `${top_builddir}/libltdl'. Make sure you start DIR with
-# '${top_builddir}/' (note the single quotes!) if your package is not
-# flat, and, if you're not using automake, define top_builddir as
-# appropriate in the Makefiles.
-AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
- case "$enable_ltdl_convenience" in
- no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
- "") enable_ltdl_convenience=yes
- ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
- esac
- LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
- INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
-])
-
-# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl installable library, and adds --enable-ltdl-install to
-# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
-# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
-# to be `${top_builddir}/libltdl'. Make sure you start DIR with
-# '${top_builddir}/' (note the single quotes!) if your package is not
-# flat, and, if you're not using automake, define top_builddir as
-# appropriate in the Makefiles.
-# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
-AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
- AC_CHECK_LIB(ltdl, main,
- [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
- [if test x"$enable_ltdl_install" = xno; then
- AC_MSG_WARN([libltdl not installed, but installation disabled])
- else
- enable_ltdl_install=yes
- fi
- ])
- if test x"$enable_ltdl_install" = x"yes"; then
- ac_configure_args="$ac_configure_args --enable-ltdl-install"
- LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
- INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
- else
- ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
- LIBLTDL="-lltdl"
- INCLTDL=
- fi
-])
-
-dnl old names
-AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
-AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
-AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
-AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
-AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
-AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
-AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
-
-dnl This is just to silence aclocal about the macro not being used
-ifelse([AC_DISABLE_FAST_INSTALL])dnl
diff --git a/libltdl/aclocal.m4 b/libltdl/aclocal.m4
deleted file mode 100644
index 7ade1e6..0000000
--- a/libltdl/aclocal.m4
+++ /dev/null
@@ -1,566 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4
-
-dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-
-# serial 40 AC_PROG_LIBTOOL
-AC_DEFUN(AC_PROG_LIBTOOL,
-[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
-
-# Save cache, so that ltconfig can load it
-AC_CACHE_SAVE
-
-# Actually configure libtool. ac_aux_dir is where install-sh is found.
-CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
-DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
-$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
-|| AC_MSG_ERROR([libtool configure failed])
-
-# Reload cache, that may have been modified by ltconfig
-AC_CACHE_LOAD
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-AC_SUBST(LIBTOOL)dnl
-
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
-])
-
-AC_DEFUN(AC_LIBTOOL_SETUP,
-[AC_PREREQ(2.13)dnl
-AC_REQUIRE([AC_ENABLE_SHARED])dnl
-AC_REQUIRE([AC_ENABLE_STATIC])dnl
-AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_REQUIRE([AC_PROG_RANLIB])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_PROG_LD])dnl
-AC_REQUIRE([AC_PROG_NM])dnl
-AC_REQUIRE([AC_PROG_LN_S])dnl
-dnl
-
-# Check for any special flags to pass to ltconfig.
-libtool_flags="--cache-file=$cache_file"
-test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
-test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
-test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
-test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
-test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
-ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
-[libtool_flags="$libtool_flags --enable-dlopen"])
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-[libtool_flags="$libtool_flags --enable-win32-dll"])
-AC_ARG_ENABLE(libtool-lock,
- [ --disable-libtool-lock avoid locking (might break parallel builds)])
-test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
-test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case "$host" in
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '[#]line __oline__ "configure"' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case "`/usr/bin/file conftest.o`" in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
- [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- fi
- ;;
-
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-[*-*-cygwin* | *-*-mingw*)
- AC_CHECK_TOOL(DLLTOOL, dlltool, false)
- AC_CHECK_TOOL(AS, as, false)
- AC_CHECK_TOOL(OBJDUMP, objdump, false)
- ;;
-])
-esac
-])
-
-# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
-AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
-
-# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
-AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
-
-# AC_ENABLE_SHARED - implement the --enable-shared flag
-# Usage: AC_ENABLE_SHARED[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN(AC_ENABLE_SHARED, [dnl
-define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(shared,
-changequote(<<, >>)dnl
-<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case "$enableval" in
-yes) enable_shared=yes ;;
-no) enable_shared=no ;;
-*)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
-])
-
-# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
-AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_SHARED(no)])
-
-# AC_ENABLE_STATIC - implement the --enable-static flag
-# Usage: AC_ENABLE_STATIC[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN(AC_ENABLE_STATIC, [dnl
-define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(static,
-changequote(<<, >>)dnl
-<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case "$enableval" in
-yes) enable_static=yes ;;
-no) enable_static=no ;;
-*)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
-])
-
-# AC_DISABLE_STATIC - set the default static flag to --disable-static
-AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_STATIC(no)])
-
-
-# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
-# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
-define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(fast-install,
-changequote(<<, >>)dnl
-<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case "$enableval" in
-yes) enable_fast_install=yes ;;
-no) enable_fast_install=no ;;
-*)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
-])
-
-# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
-AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_FAST_INSTALL(no)])
-
-# AC_PROG_LD - find the path to the GNU or non-GNU linker
-AC_DEFUN(AC_PROG_LD,
-[AC_ARG_WITH(gnu-ld,
-[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-ac_prog=ld
-if test "$ac_cv_prog_gcc" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- AC_MSG_CHECKING([for ld used by GCC])
- ac_prog=`($CC -print-prog-name=ld) 2>&5`
- case "$ac_prog" in
- # Accept absolute paths.
-changequote(,)dnl
- [\\/]* | [A-Za-z]:[\\/]*)
- re_direlt='/[^/][^/]*/\.\./'
-changequote([,])dnl
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- AC_MSG_CHECKING([for GNU ld])
-else
- AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(ac_cv_path_LD,
-[if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- ac_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
- test "$with_gnu_ld" != no && break
- else
- test "$with_gnu_ld" != yes && break
- fi
- fi
- done
- IFS="$ac_save_ifs"
-else
- ac_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$ac_cv_path_LD"
-if test -n "$LD"; then
- AC_MSG_RESULT($LD)
-else
- AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_SUBST(LD)
-AC_PROG_LD_GNU
-])
-
-AC_DEFUN(AC_PROG_LD_GNU,
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
- ac_cv_prog_gnu_ld=yes
-else
- ac_cv_prog_gnu_ld=no
-fi])
-])
-
-# AC_PROG_NM - find the path to a BSD-compatible name lister
-AC_DEFUN(AC_PROG_NM,
-[AC_MSG_CHECKING([for BSD-compatible nm])
-AC_CACHE_VAL(ac_cv_path_NM,
-[if test -n "$NM"; then
- # Let the user override the test.
- ac_cv_path_NM="$NM"
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- ac_cv_path_NM="$ac_dir/nm -B"
- break
- elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- ac_cv_path_NM="$ac_dir/nm -p"
- break
- else
- ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
- continue # so that we can try to find one that supports BSD flags
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
-fi])
-NM="$ac_cv_path_NM"
-AC_MSG_RESULT([$NM])
-AC_SUBST(NM)
-])
-
-# AC_CHECK_LIBM - check for math library
-AC_DEFUN(AC_CHECK_LIBM,
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-LIBM=
-case "$host" in
-*-*-beos* | *-*-cygwin*)
- # These system don't have libm
- ;;
-*-ncr-sysv4.3*)
- AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
- AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
- ;;
-*)
- AC_CHECK_LIB(m, main, LIBM="-lm")
- ;;
-esac
-])
-
-# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl convenience library, adds --enable-ltdl-convenience to
-# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
-# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
-# to be `${top_builddir}/libltdl'. Make sure you start DIR with
-# '${top_builddir}/' (note the single quotes!) if your package is not
-# flat, and, if you're not using automake, define top_builddir as
-# appropriate in the Makefiles.
-AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
- case "$enable_ltdl_convenience" in
- no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
- "") enable_ltdl_convenience=yes
- ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
- esac
- LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
- INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
-])
-
-# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl installable library, and adds --enable-ltdl-install to
-# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
-# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
-# to be `${top_builddir}/libltdl'. Make sure you start DIR with
-# '${top_builddir}/' (note the single quotes!) if your package is not
-# flat, and, if you're not using automake, define top_builddir as
-# appropriate in the Makefiles.
-# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
-AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
- AC_CHECK_LIB(ltdl, main,
- [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
- [if test x"$enable_ltdl_install" = xno; then
- AC_MSG_WARN([libltdl not installed, but installation disabled])
- else
- enable_ltdl_install=yes
- fi
- ])
- if test x"$enable_ltdl_install" = x"yes"; then
- ac_configure_args="$ac_configure_args --enable-ltdl-install"
- LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
- INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
- else
- ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
- LIBLTDL="-lltdl"
- INCLTDL=
- fi
-])
-
-dnl old names
-AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
-AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
-AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
-AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
-AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
-AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
-AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
-
-dnl This is just to silence aclocal about the macro not being used
-ifelse([AC_DISABLE_FAST_INSTALL])dnl
-
-# Do all the work for Automake. This macro actually does too much --
-# some checks are only needed if your package does certain things.
-# But this isn't really a big deal.
-
-# serial 1
-
-dnl Usage:
-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
-
-AC_DEFUN(AM_INIT_AUTOMAKE,
-[AC_REQUIRE([AC_PROG_INSTALL])
-PACKAGE=[$1]
-AC_SUBST(PACKAGE)
-VERSION=[$2]
-AC_SUBST(VERSION)
-dnl test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
-AC_REQUIRE([AM_SANITY_CHECK])
-AC_REQUIRE([AC_ARG_PROGRAM])
-dnl FIXME This is truly gross.
-missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
-AC_REQUIRE([AC_PROG_MAKE_SET])])
-
-#
-# Check to make sure that the build environment is sane.
-#
-
-AC_DEFUN(AM_SANITY_CHECK,
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "[$]*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "[$]*" != "X $srcdir/configure conftestfile" \
- && test "[$]*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
- test "[$]2" = conftestfile
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-rm -f conftest*
-AC_MSG_RESULT(yes)])
-
-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
-dnl The program must properly implement --version.
-AC_DEFUN(AM_MISSING_PROG,
-[AC_MSG_CHECKING(for working $2)
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if ($2 --version) < /dev/null > /dev/null 2>&1; then
- $1=$2
- AC_MSG_RESULT(found)
-else
- $1="$3/missing $2"
- AC_MSG_RESULT(missing)
-fi
-AC_SUBST($1)])
-
-# Like AC_CONFIG_HEADER, but automatically create stamp file.
-
-AC_DEFUN(AM_CONFIG_HEADER,
-[AC_PREREQ([2.12])
-AC_CONFIG_HEADER([$1])
-dnl When config.status generates a header, we must update the stamp-h file.
-dnl This file resides in the same directory as the config header
-dnl that is generated. We must strip everything past the first ":",
-dnl and everything past the last "/".
-AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
-ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
-<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
-<<am_indx=1
-for am_file in <<$1>>; do
- case " <<$>>CONFIG_HEADERS " in
- *" <<$>>am_file "*<<)>>
- echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
- ;;
- esac
- am_indx=`expr "<<$>>am_indx" + 1`
-done<<>>dnl>>)
-changequote([,]))])
-
-# Add --enable-maintainer-mode option to configure.
-# From Jim Meyering
-
-# serial 1
-
-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
-]
-)
-
-# Define a conditional.
-
-AC_DEFUN(AM_CONDITIONAL,
-[AC_SUBST($1_TRUE)
-AC_SUBST($1_FALSE)
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi])
-
diff --git a/libltdl/config.h.in b/libltdl/config.h.in
deleted file mode 100644
index 1e7613e..0000000
--- a/libltdl/config.h.in
+++ /dev/null
@@ -1,80 +0,0 @@
-/* config.h.in. Generated automatically from configure.in by autoheader. */
-
-/* Define to empty if the keyword does not work. */
-#undef const
-
-/* Define as __inline if that's what the C compiler calls it. */
-#undef inline
-
-/* Define if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Define if you have the libdl library or equivalent. */
-#undef HAVE_LIBDL
-
-/* Define if you have the GNU dld library. */
-#undef HAVE_DLD
-
-/* Define if you have the shl_load function. */
-#undef HAVE_SHL_LOAD
-
-/* Define if you have the dlerror function. */
-#undef HAVE_DLERROR
-
-/* Define if you have the index function. */
-#undef HAVE_INDEX
-
-/* Define if you have the rindex function. */
-#undef HAVE_RINDEX
-
-/* Define if you have the strchr function. */
-#undef HAVE_STRCHR
-
-/* Define if you have the strrchr function. */
-#undef HAVE_STRRCHR
-
-/* Define if you have the <ctype.h> header file. */
-#undef HAVE_CTYPE_H
-
-/* Define if you have the <dl.h> header file. */
-#undef HAVE_DL_H
-
-/* Define if you have the <dld.h> header file. */
-#undef HAVE_DLD_H
-
-/* Define if you have the <dlfcn.h> header file. */
-#undef HAVE_DLFCN_H
-
-/* Define if you have the <malloc.h> header file. */
-#undef HAVE_MALLOC_H
-
-/* Define if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
-/* Define if you have the <stdio.h> header file. */
-#undef HAVE_STDIO_H
-
-/* Define if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* Define if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* Define if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to the extension used for shared libraries, say, .so. */
-#undef LTDL_SHLIB_EXT
-
-/* Define to the name of the environment variable that determines the dynamic library search path. */
-#undef LTDL_SHLIBPATH_VAR
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries. */
-#undef LTDL_OBJDIR
-
-/* Define if libtool can extract symbol lists from object files. */
-#undef HAVE_PRELOADED_SYMBOLS
-
-/* Define if dlsym() requires a leading underscode in symbol names. */
-#undef NEED_USCORE
-
diff --git a/libltdl/configure.in b/libltdl/configure.in
deleted file mode 100644
index 2cf4149..0000000
--- a/libltdl/configure.in
+++ /dev/null
@@ -1,373 +0,0 @@
-dnl Process this file with autoconf to create configure.
-
-AC_INIT(ltdl.c)
-
-if test -z "$enable_ltdl_install$enable_ltdl_convenience"; then
- if test -f ${srcdir}/ltconfig && test -f ${srcdir}/ltmain.sh; then
- # if libltdl is libtoolized, it is assumed to be stand-alone and
- # installed unless the command line overrides it (tested above)
- enable_ltdl_install=yes
- else
- AC_MSG_WARN([*** The top-level configure must select either])
- AC_MSG_WARN([*** [A""C_LIBLTDL_INSTALLABLE] or [A""C_LIBLTDL_CONVENIENCE].])
- AC_MSG_ERROR([*** Maybe you want to --enable-ltdl-install?])
- fi
-fi
-
-AM_INIT_AUTOMAKE(libltdl,1.0,-)
-AM_CONFIG_HEADER(config.h)
-AM_MAINTAINER_MODE
-
-AC_PROG_CC
-AC_C_CONST
-AC_C_INLINE
-AM_PROG_LIBTOOL
-AC_SUBST(LIBTOOL_DEPS)
-
-AC_ARG_ENABLE(ltdl-install,
-[ --enable-ltdl-install install libltdl])
-
-AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno)
-AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)
-
-dnl Read the libtool configuration
-rm -f conftest
-./libtool --config > conftest
-. ./conftest
-rm -f conftest
-
-AC_CACHE_CHECK([which extension is used for shared libraries],
- libltdl_cv_shlibext, [dnl
-(
- last=
- for spec in $library_names_spec; do
- last="$spec"
- done
-changequote(, )
- echo "$last" | sed 's/\[.*\]//;s/^[^.]*//;s/\$.*$//;s/\.$//' > conftest
-changequote([, ])
-)
-libltdl_cv_shlibext=`cat conftest`
-rm -f conftest
-])
-if test -n "$libltdl_cv_shlibext"; then
- AC_DEFINE_UNQUOTED(LTDL_SHLIB_EXT, "$libltdl_cv_shlibext",
- [Define to the extension used for shared libraries, say, ".so". ])
-fi
-
-AC_CACHE_CHECK([which variable specifies run-time library path],
- libltdl_cv_shlibpath_var, [libltdl_cv_shlibpath_var="$shlibpath_var"])
-if test -n "$libltdl_cv_shlibpath_var"; then
- AC_DEFINE_UNQUOTED(LTDL_SHLIBPATH_VAR, "$libltdl_cv_shlibpath_var",
- [Define to the name of the environment variable that determines the dynamic library search path. ])
-fi
-
-AC_CACHE_CHECK([for objdir],
- libltdl_cv_objdir, [libltdl_cv_objdir="$objdir"])
-test -z "$libltdl_cv_objdir" && libltdl_cv_objdir=".libs"
-AC_DEFINE_UNQUOTED(LTDL_OBJDIR, "$libltdl_cv_objdir/",
- [Define to the sub-directory in which libtool stores uninstalled libraries. ])
-
-AC_HEADER_STDC
-AC_CHECK_HEADERS(malloc.h memory.h stdlib.h stdio.h ctype.h dlfcn.h dl.h dld.h)
-AC_CHECK_HEADERS(string.h strings.h, break)
-AC_CHECK_FUNCS(strchr index, break)
-AC_CHECK_FUNCS(strrchr rindex, break)
-
-AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen],
- libltdl_cv_preloaded_symbols, [dnl
- if test -n "$global_symbol_pipe"; then
- libltdl_cv_preloaded_symbols=yes
- else
- libltdl_cv_preloaded_symbols=no
- fi
-])
-if test x"$libltdl_cv_preloaded_symbols" = x"yes"; then
- AC_DEFINE(HAVE_PRELOADED_SYMBOLS, 1,
- [Define if libtool can extract symbol lists from object files. ])
-fi
-
-LIBADD_DL=
-AC_CHECK_LIB(dl, dlopen, [AC_DEFINE(HAVE_LIBDL, 1) LIBADD_DL="-ldl"],
-[AC_CHECK_FUNC(dlopen, [AC_DEFINE(HAVE_LIBDL, 1)])])
-AC_CHECK_FUNC(shl_load, [AC_DEFINE(HAVE_SHL_LOAD, 1)],
-[AC_CHECK_LIB(dld, shl_load, [AC_DEFINE(HAVE_SHL_LOAD, 1) LIBADD_DL="$LIBADD_DL -ldld"])])
-AC_CHECK_LIB(dld, dld_link, [AC_DEFINE(HAVE_DLD, 1)dnl
-test "x$ac_cv_lib_dld_shl_load" = yes || LIBADD_DL="$LIBADD_DL -ldld"])
-AC_SUBST(LIBADD_DL)
-
-if test "x$ac_cv_func_dlopen" = xyes || test "x$ac_cv_lib_dl_dlopen" = xyes; then
- LIBS_SAVE="$LIBS"
- LIBS="$LIBS $LIBADD_DL"
- AC_CHECK_FUNCS(dlerror)
- LIBS="$LIBS_SAVE"
-fi
-
-dnl Check for command to grab the raw symbol name followed
-dnl by C symbol name from nm.
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_PROG_NM])dnl
-# Check for command to grab the raw symbol name followed by C symbol from nm.
-AC_MSG_CHECKING([command to parse $NM output])
-AC_CACHE_VAL(ac_cv_sys_global_symbol_pipe,
-[# These are sane defaults that work on at least a few old systems.
-# {They come from Ultrix. What could be older than Ultrix?!! ;)}
-
-changequote(,)dnl
-# Character class describing NM global symbol codes.
-ac_symcode='[BCDEGRST]'
-
-# Regexp to match symbols that can be accessed directly from C.
-ac_sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
-
-# Transform the above into a raw symbol and a C symbol.
-ac_symxfrm='\1 \2\3 \3'
-
-# Transform an extracted symbol line into a proper C declaration
-ac_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
-
-# Define system-specific variables.
-case "$host_os" in
-aix*)
- ac_symcode='[BCDT]'
- ;;
-cygwin* | mingw*)
- ac_symcode='[ABCDGISTW]'
- ;;
-hpux*)
- ac_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'"
- ;;
-irix*)
- ac_symcode='[BCDEGRST]'
- ;;
-solaris*)
- ac_symcode='[BDT]'
- ;;
-esac
-
-# If we're using GNU nm, then use its standard symbol codes.
-if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
- ac_symcode='[ABCDGISTW]'
-fi
-changequote([,])dnl
-
-# Try without a prefix undercore, then with it.
-for ac_symprfx in "" "_"; do
-
- ac_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($ac_symcode\)[ ][ ]*\($ac_symprfx\)$ac_sympat$/$ac_symxfrm/p'"
-
- # Check to see that the pipe works correctly.
- ac_pipe_works=no
- rm -f conftest.$ac_ext
- cat > conftest.$ac_ext <<EOF
-#ifdef __cplusplus
-extern "C" {
-#endif
-char nm_test_var;
-void nm_test_func(){}
-#ifdef __cplusplus
-}
-#endif
-int main(){nm_test_var='a';nm_test_func;return 0;}
-EOF
-
- if AC_TRY_EVAL(ac_compile); then
- # Now try to grab the symbols.
- ac_nlist=conftest.nm
-
- if AC_TRY_EVAL(NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
-
- # Try sorting and uniquifying the output.
- if sort "$ac_nlist" | uniq > "$ac_nlist"T; then
- mv -f "$ac_nlist"T "$ac_nlist"
- else
- rm -f "$ac_nlist"T
- fi
-
- # Make sure that we snagged all the symbols we need.
- if egrep ' nm_test_var$' "$ac_nlist" >/dev/null; then
- if egrep ' nm_test_func$' "$ac_nlist" >/dev/null; then
- cat <<EOF > conftest.c
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-EOF
- # Now generate the symbol file.
- eval "$ac_global_symbol_to_cdecl"' < "$ac_nlist" >> conftest.c'
-
- cat <<EOF >> conftest.c
-#if defined (__STDC__) && __STDC__
-# define lt_ptr_t void *
-#else
-# define lt_ptr_t char *
-# define const
-#endif
-
-/* The mapping between symbol names and symbols. */
-const struct {
- const char *name;
- lt_ptr_t address;
-}
-changequote(,)dnl
-lt_preloaded_symbols[] =
-changequote([,])dnl
-{
-EOF
- sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$ac_nlist" >> conftest.c
- cat <<\EOF >> conftest.c
- {0, (lt_ptr_t) 0}
-};
-
-#ifdef __cplusplus
-}
-#endif
-EOF
- # Now try linking the two files.
- mv conftest.$ac_objext conftstm.$ac_objext
- ac_save_LIBS="$LIBS"
- ac_save_CFLAGS="$CFLAGS"
- LIBS="conftstm.$ac_objext"
- CFLAGS="$CFLAGS$no_builtin_flag"
- if AC_TRY_EVAL(ac_link) && test -s conftest; then
- ac_pipe_works=yes
- else
- echo "configure: failed program was:" >&AC_FD_CC
- cat conftest.c >&AC_FD_CC
- fi
- LIBS="$ac_save_LIBS"
- CFLAGS="$ac_save_CFLAGS"
- else
- echo "cannot find nm_test_func in $ac_nlist" >&AC_FD_CC
- fi
- else
- echo "cannot find nm_test_var in $ac_nlist" >&AC_FD_CC
- fi
- else
- echo "cannot run $ac_cv_sys_global_symbol_pipe" >&AC_FD_CC
- fi
- else
- echo "$progname: failed program was:" >&AC_FD_CC
- cat conftest.c >&AC_FD_CC
- fi
- rm -rf conftest* conftst*
-
- # Do not use the global_symbol_pipe unless it works.
- if test "$ac_pipe_works" = yes; then
- if test x"$ac_symprfx" = x"_"; then
- ac_cv_sys_symbol_underscore=yes
- else
- ac_cv_sys_symbol_underscore=no
- fi
- break
- else
- ac_cv_sys_global_symbol_pipe=
- fi
-done
-])
-
-ac_result=yes
-if test -z "$ac_cv_sys_global_symbol_pipe"; then
- ac_result=no
-fi
-AC_MSG_RESULT($ac_result)
-
-dnl does the compiler prefix global symbols with an underscore?
-AC_MSG_CHECKING([for _ prefix in compiled symbols])
-AC_CACHE_VAL(ac_cv_sys_symbol_underscore,
-[ac_cv_sys_symbol_underscore=no
-cat > conftest.$ac_ext <<EOF
-void nm_test_func(){}
-int main(){nm_test_func;return 0;}
-EOF
-if AC_TRY_EVAL(ac_compile); then
- # Now try to grab the symbols.
- ac_nlist=conftest.nm
- if AC_TRY_EVAL(NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
- # See whether the symbols have a leading underscore.
- if egrep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
- ac_cv_sys_symbol_underscore=yes
- else
- if egrep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
- :
- else
- echo "configure: cannot find nm_test_func in $ac_nlist" >&AC_FD_CC
- fi
- fi
- else
- echo "configure: cannot run $ac_cv_sys_global_symbol_pipe" >&AC_FD_CC
- fi
-else
- echo "configure: failed program was:" >&AC_FD_CC
- cat conftest.c >&AC_FD_CC
-fi
-rm -rf conftest*
-])
-AC_MSG_RESULT($ac_cv_sys_symbol_underscore)
-
-if test x"$ac_cv_sys_symbol_underscore" = xyes; then
- if test x"$ac_cv_func_dlopen" = xyes ||
- test x"$ac_cv_lib_dl_dlopen" = xyes ; then
- AC_CACHE_CHECK([whether we have to add an underscore for dlsym],
- libltdl_cv_need_uscore, [dnl
- AC_TRY_RUN([
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-# define LTDL_GLOBAL RTLD_GLOBAL
-#else
-# ifdef DL_GLOBAL
-# define LTDL_GLOBAL DL_GLOBAL
-# else
-# define LTDL_GLOBAL 0
-# endif
-#endif
-
-/* We may have to define LTDL_LAZY_OR_NOW in the command line if we
- find out it does not work in some platform. */
-#ifndef LTDL_LAZY_OR_NOW
-# ifdef RTLD_LAZY
-# define LTDL_LAZY_OR_NOW RTLD_LAZY
-# else
-# ifdef DL_LAZY
-# define LTDL_LAZY_OR_NOW DL_LAZY
-# else
-# ifdef RTLD_NOW
-# define LTDL_LAZY_OR_NOW RTLD_NOW
-# else
-# ifdef DL_NOW
-# define LTDL_LAZY_OR_NOW DL_NOW
-# else
-# define LTDL_LAZY_OR_NOW 0
-# endif
-# endif
-# endif
-# endif
-#endif
-
-fnord() { int i=42;}
-main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
- if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
- if(ptr1 && !ptr2) { dlclose(self); exit(0); } } exit(1); }
-], libltdl_cv_need_uscore=no, libltdl_cv_need_uscore=yes,
- libltdl_cv_need_uscore=cross
-)])
- fi
-fi
-
-if test x"$libltdl_cv_need_uscore" = xyes; then
- AC_DEFINE(NEED_USCORE, 1,
- [Define if dlsym() requires a leading underscode in symbol names. ])
-fi
-
-dnl Output the makefile
-AC_OUTPUT(Makefile)
-
-# Local Variables:
-# mode:shell-script
-# sh-indentation:2
-# End:
diff --git a/libltdl/ltdl.c b/libltdl/ltdl.c
deleted file mode 100644
index 704f213..0000000
--- a/libltdl/ltdl.c
+++ /dev/null
@@ -1,1617 +0,0 @@
-/* ltdl.c -- system independent dlopen wrapper
- Copyright (C) 1998-1999 Free Software Foundation, Inc.
- Originally by Thomas Tanner <tanner@ffii.org>
- This file is part of GNU Libtool.
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-As a special exception to the GNU Library General Public License,
-if you distribute this file as part of a program that uses GNU libtool
-to create libraries and programs, you may include it under the same
-distribution terms that you use for the rest of that program.
-
-This library 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
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with this library; if not, write to the Free
-Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-#define _LTDL_COMPILE_
-
-#if HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#if HAVE_STRING_H
-#include <string.h>
-#endif
-
-#if HAVE_STRINGS_H
-#include <strings.h>
-#endif
-
-#if HAVE_CTYPE_H
-#include <ctype.h>
-#endif
-
-#if HAVE_MALLOC_H
-#include <malloc.h>
-#endif
-
-#if HAVE_MEMORY_H
-#include <memory.h>
-#endif
-
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-
-#include "ltdl.h"
-
-/* max. filename length */
-#ifndef LTDL_FILENAME_MAX
-#define LTDL_FILENAME_MAX 1024
-#endif
-
-#undef LTDL_READTEXT_MODE
-/* fopen() mode flags for reading a text file */
-#ifdef _WIN32
-#define LTDL_READTEXT_MODE "rt"
-#else
-#define LTDL_READTEXT_MODE "r"
-#endif
-
-#undef LTDL_SYMBOL_LENGTH
-/* This is the maximum symbol size that won't require malloc/free */
-#define LTDL_SYMBOL_LENGTH 128
-
-#undef LTDL_SYMBOL_OVERHEAD
-/* This accounts for the _LTX_ separator */
-#define LTDL_SYMBOL_OVERHEAD 5
-
-static const char objdir[] = LTDL_OBJDIR;
-#ifdef LTDL_SHLIB_EXT
-static const char shlib_ext[] = LTDL_SHLIB_EXT;
-#endif
-
-static const char unknown_error[] = "unknown error";
-static const char dlopen_not_supported_error[] = "dlopen support not available";
-static const char file_not_found_error[] = "file not found";
-static const char no_symbols_error[] = "no symbols defined";
-static const char cannot_open_error[] = "can't open the module";
-static const char cannot_close_error[] = "can't close the module";
-static const char symbol_error[] = "symbol not found";
-static const char memory_error[] = "not enough memory";
-static const char invalid_handle_error[] = "invalid handle";
-static const char buffer_overflow_error[] = "internal buffer overflow";
-static const char shutdown_error[] = "library already shutdown";
-
-#ifndef HAVE_PRELOADED_SYMBOLS
-/* If libtool won't define it, we'd better do */
-const lt_dlsymlist lt_preloaded_symbols[1] = { { 0, 0 } };
-#endif
-
-static const char *last_error = 0;
-
-lt_ptr_t (*lt_dlmalloc) LTDL_PARAMS((size_t size)) = (lt_ptr_t(*)LTDL_PARAMS((size_t)))malloc;
-void (*lt_dlfree) LTDL_PARAMS((lt_ptr_t ptr)) = (void(*)LTDL_PARAMS((lt_ptr_t)))free;
-
-typedef struct lt_dltype_t {
- struct lt_dltype_t *next;
- const char *sym_prefix; /* prefix for symbols */
- int (*mod_init) LTDL_PARAMS((void));
- int (*mod_exit) LTDL_PARAMS((void));
- int (*lib_open) LTDL_PARAMS((lt_dlhandle handle, const char *filename));
- int (*lib_close) LTDL_PARAMS((lt_dlhandle handle));
- lt_ptr_t (*find_sym) LTDL_PARAMS((lt_dlhandle handle, const char *symbol));
-} lt_dltype_t;
-
-#define LTDL_TYPE_TOP 0
-
-typedef struct lt_dlhandle_t {
- struct lt_dlhandle_t *next;
- lt_dltype_t *type; /* dlopening interface */
- char *filename; /* file name */
- char *name; /* module name */
- int usage; /* usage */
- int depcount; /* number of dependencies */
- lt_dlhandle *deplibs; /* dependencies */
- lt_ptr_t handle; /* system handle */
- lt_ptr_t system; /* system specific data */
-} lt_dlhandle_t;
-
-#undef strdup
-#define strdup xstrdup
-
-static inline char *
-strdup(str)
- const char *str;
-{
- char *tmp;
-
- if (!str)
- return 0;
- tmp = (char*) lt_dlmalloc(strlen(str)+1);
- if (tmp)
- strcpy(tmp, str);
- return tmp;
-}
-
-#if ! HAVE_STRCHR
-
-# if HAVE_INDEX
-
-# define strchr index
-
-# else
-
-# define strchr xstrchr
-
-static inline const char*
-strchr(str, ch)
- const char *str;
- int ch;
-{
- const char *p;
-
- for (p = str; *p != (char)ch && *p != '\0'; p++)
- /*NOWORK*/;
-
- return (*p == (char)ch) ? p : 0;
-}
-
-# endif
-
-#endif
-
-#if ! HAVE_STRRCHR
-
-# if HAVE_RINDEX
-
-# define strrchr rindex
-
-# else
-
-# define strrchr xstrrchr
-
-static inline const char*
-strrchr(str, ch)
- const char *str;
- int ch;
-{
- const char *p;
-
- for (p = str; *p != '\0'; p++)
- /*NOWORK*/;
-
- while (*p != (char)ch && p >= str)
- p--;
-
- return (*p == (char)ch) ? p : 0;
-}
-
-# endif
-
-#endif
-
-#if HAVE_LIBDL
-
-/* dynamic linking with dlopen/dlsym */
-
-#if HAVE_DLFCN_H
-# include <dlfcn.h>
-#endif
-
-#ifdef RTLD_GLOBAL
-# define LTDL_GLOBAL RTLD_GLOBAL
-#else
-# ifdef DL_GLOBAL
-# define LTDL_GLOBAL DL_GLOBAL
-# else
-# define LTDL_GLOBAL 0
-# endif
-#endif
-
-/* We may have to define LTDL_LAZY_OR_NOW in the command line if we
- find out it does not work in some platform. */
-#ifndef LTDL_LAZY_OR_NOW
-# ifdef RTLD_LAZY
-# define LTDL_LAZY_OR_NOW RTLD_LAZY
-# else
-# ifdef DL_LAZY
-# define LTDL_LAZY_OR_NOW DL_LAZY
-# else
-# ifdef RTLD_NOW
-# define LTDL_LAZY_OR_NOW RTLD_NOW
-# else
-# ifdef DL_NOW
-# define LTDL_LAZY_OR_NOW DL_NOW
-# else
-# define LTDL_LAZY_OR_NOW 0
-# endif
-# endif
-# endif
-# endif
-#endif
-
-static int
-sys_dl_init LTDL_PARAMS((void))
-{
- return 0;
-}
-
-static int
-sys_dl_exit LTDL_PARAMS((void))
-{
- return 0;
-}
-
-static int
-sys_dl_open (handle, filename)
- lt_dlhandle handle;
- const char *filename;
-{
- handle->handle = dlopen(filename, LTDL_GLOBAL | LTDL_LAZY_OR_NOW);
- if (!handle->handle) {
-#if HAVE_DLERROR
- last_error = dlerror();
-#else
- last_error = cannot_open_error;
-#endif
- return 1;
- }
- return 0;
-}
-
-static int
-sys_dl_close (handle)
- lt_dlhandle handle;
-{
- if (dlclose(handle->handle) != 0) {
-#if HAVE_DLERROR
- last_error = dlerror();
-#else
- last_error = cannot_close_error;
-#endif
- return 1;
- }
- return 0;
-}
-
-static lt_ptr_t
-sys_dl_sym (handle, symbol)
- lt_dlhandle handle;
- const char *symbol;
-{
- lt_ptr_t address = dlsym(handle->handle, symbol);
-
- if (!address)
-#if HAVE_DLERROR
- last_error = dlerror();
-#else
- last_error = symbol_error;
-#endif
- return address;
-}
-
-static
-lt_dltype_t
-#ifdef NEED_USCORE
-sys_dl = { LTDL_TYPE_TOP, "_", sys_dl_init, sys_dl_exit,
- sys_dl_open, sys_dl_close, sys_dl_sym };
-#else
-sys_dl = { LTDL_TYPE_TOP, 0, sys_dl_init, sys_dl_exit,
- sys_dl_open, sys_dl_close, sys_dl_sym };
-#endif
-
-#undef LTDL_TYPE_TOP
-#define LTDL_TYPE_TOP &sys_dl
-
-#endif
-
-#if HAVE_SHL_LOAD
-
-/* dynamic linking with shl_load (HP-UX) (comments from gmodule) */
-
-#ifdef HAVE_DL_H
-#include <dl.h>
-#endif
-
-/* some flags are missing on some systems, so we provide
- * harmless defaults.
- *
- * Mandatory:
- * BIND_IMMEDIATE - Resolve symbol references when the library is loaded.
- * BIND_DEFERRED - Delay code symbol resolution until actual reference.
- *
- * Optionally:
- * BIND_FIRST - Place the library at the head of the symbol search order.
- * BIND_NONFATAL - The default BIND_IMMEDIATE behavior is to treat all unsatisfied
- * symbols as fatal. This flag allows binding of unsatisfied code
- * symbols to be deferred until use.
- * [Perl: For certain libraries, like DCE, deferred binding often
- * causes run time problems. Adding BIND_NONFATAL to BIND_IMMEDIATE
- * still allows unresolved references in situations like this.]
- * BIND_NOSTART - Do not call the initializer for the shared library when the
- * library is loaded, nor on a future call to shl_unload().
- * BIND_VERBOSE - Print verbose messages concerning possible unsatisfied symbols.
- *
- * hp9000s700/hp9000s800:
- * BIND_RESTRICTED - Restrict symbols visible by the library to those present at
- * library load time.
- * DYNAMIC_PATH - Allow the loader to dynamically search for the library specified
- * by the path argument.
- */
-
-#ifndef DYNAMIC_PATH
-#define DYNAMIC_PATH 0
-#endif /* DYNAMIC_PATH */
-#ifndef BIND_RESTRICTED
-#define BIND_RESTRICTED 0
-#endif /* BIND_RESTRICTED */
-
-#define LTDL_BIND_FLAGS (BIND_IMMEDIATE | BIND_NONFATAL | DYNAMIC_PATH)
-
-static int
-sys_shl_init LTDL_PARAMS((void))
-{
- return 0;
-}
-
-static int
-sys_shl_exit LTDL_PARAMS((void))
-{
- return 0;
-}
-
-static int
-sys_shl_open (handle, filename)
- lt_dlhandle handle;
- const char *filename;
-{
- handle->handle = shl_load(filename, LTDL_BIND_FLAGS, 0L);
- if (!handle->handle) {
- last_error = cannot_open_error;
- return 1;
- }
- return 0;
-}
-
-static int
-sys_shl_close (handle)
- lt_dlhandle handle;
-{
- if (shl_unload((shl_t) (handle->handle)) != 0) {
- last_error = cannot_close_error;
- return 1;
- }
- return 0;
-}
-
-static lt_ptr_t
-sys_shl_sym (handle, symbol)
- lt_dlhandle handle;
- const char *symbol;
-{
- lt_ptr_t address;
-
- if (handle->handle && shl_findsym((shl_t*) &(handle->handle),
- symbol, TYPE_UNDEFINED, &address) == 0)
- if (address)
- return address;
- last_error = symbol_error;
- return 0;
-}
-
-static
-lt_dltype_t
-sys_shl = { LTDL_TYPE_TOP, 0, sys_shl_init, sys_shl_exit,
- sys_shl_open, sys_shl_close, sys_shl_sym };
-
-#undef LTDL_TYPE_TOP
-#define LTDL_TYPE_TOP &sys_shl
-
-#endif
-
-#if HAVE_DLD
-
-/* dynamic linking with dld */
-
-#if HAVE_DLD_H
-#include <dld.h>
-#endif
-
-static int
-sys_dld_init LTDL_PARAMS((void))
-{
- return 0;
-}
-
-static int
-sys_dld_exit LTDL_PARAMS((void))
-{
- return 0;
-}
-
-static int
-sys_dld_open (handle, filename)
- lt_dlhandle handle;
- const char *filename;
-{
- handle->handle = strdup(filename);
- if (!handle->handle) {
- last_error = memory_error;
- return 1;
- }
- if (dld_link(filename) != 0) {
- last_error = cannot_open_error;
- lt_dlfree(handle->handle);
- return 1;
- }
- return 0;
-}
-
-static int
-sys_dld_close (handle)
- lt_dlhandle handle;
-{
- if (dld_unlink_by_file((char*)(handle->handle), 1) != 0) {
- last_error = cannot_close_error;
- return 1;
- }
- lt_dlfree(handle->filename);
- return 0;
-}
-
-static lt_ptr_t
-sys_dld_sym (handle, symbol)
- lt_dlhandle handle;
- const char *symbol;
-{
- lt_ptr_t address = dld_get_func(symbol);
-
- if (!address)
- last_error = symbol_error;
- return address;
-}
-
-static
-lt_dltype_t
-sys_dld = { LTDL_TYPE_TOP, 0, sys_dld_init, sys_dld_exit,
- sys_dld_open, sys_dld_close, sys_dld_sym };
-
-#undef LTDL_TYPE_TOP
-#define LTDL_TYPE_TOP &sys_dld
-
-#endif
-
-#ifdef _WIN32
-
-/* dynamic linking for Win32 */
-
-#include <windows.h>
-
-static int
-sys_wll_init LTDL_PARAMS((void))
-{
- return 0;
-}
-
-static int
-sys_wll_exit LTDL_PARAMS((void))
-{
- return 0;
-}
-
-/* Forward declaration; required to implement handle search below. */
-static lt_dlhandle handles;
-
-static int
-sys_wll_open (handle, filename)
- lt_dlhandle handle;
- const char *filename;
-{
- lt_dlhandle cur;
- char *searchname = NULL;
- char *ext = strrchr(filename, '.');
-
- if (ext) {
- /* FILENAME already has an extension. */
- searchname = strdup(filename);
- } else {
- /* Append a `.' to stop Windows from adding an
- implicit `.dll' extension. */
- searchname = (char*)lt_dlmalloc(2+ strlen(filename));
- strcpy(searchname, filename);
- strcat(searchname, ".");
- }
-
- handle->handle = LoadLibrary(searchname);
- lt_dlfree(searchname);
-
- /* libltdl expects this function to fail if it is unable
- to physically load the library. Sadly, LoadLibrary
- will search the loaded libraries for a match and return
- one of them if the path search load fails.
-
- We check whether LoadLibrary is returning a handle to
- an already loaded module, and simulate failure if we
- find one. */
- cur = handles;
- while (cur) {
- if (!cur->handle) {
- cur = 0;
- break;
- }
- if (cur->handle == handle->handle)
- break;
- cur = cur->next;
- }
-
- if (cur || !handle->handle) {
- last_error = cannot_open_error;
- return 1;
- }
-
- return 0;
-}
-
-static int
-sys_wll_close (handle)
- lt_dlhandle handle;
-{
- if (FreeLibrary(handle->handle) == 0) {
- last_error = cannot_close_error;
- return 1;
- }
- return 0;
-}
-
-static lt_ptr_t
-sys_wll_sym (handle, symbol)
- lt_dlhandle handle;
- const char *symbol;
-{
- lt_ptr_t address = GetProcAddress(handle->handle, symbol);
-
- if (!address)
- last_error = symbol_error;
- return address;
-}
-
-static
-lt_dltype_t
-sys_wll = { LTDL_TYPE_TOP, 0, sys_wll_init, sys_wll_exit,
- sys_wll_open, sys_wll_close, sys_wll_sym };
-
-#undef LTDL_TYPE_TOP
-#define LTDL_TYPE_TOP &sys_wll
-
-#endif
-
-#ifdef __BEOS__
-
-/* dynamic linking for BeOS */
-
-#include <kernel/image.h>
-
-static int
-sys_bedl_init LTDL_PARAMS((void))
-{
- return 0;
-}
-
-static int
-sys_bedl_exit LTDL_PARAMS((void))
-{
- return 0;
-}
-
-static int
-sys_bedl_open (handle, filename)
- lt_dlhandle handle;
- const char *filename;
-{
- image_id image = 0;
-
- if (filename) {
- image = load_add_on(filename);
- } else {
- image_info info;
- int32 cookie = 0;
- if (get_next_image_info(0, &cookie, &info) == B_OK)
- image = load_add_on(info.name);
- }
- if (image <= 0) {
- last_error = cannot_open_error;
- return 1;
- }
- handle->handle = (void*) image;
- return 0;
-}
-
-static int
-sys_bedl_close (handle)
- lt_dlhandle handle;
-{
- if (unload_add_on((image_id)handle->handle) != B_OK) {
- last_error = cannot_close_error;
- return 1;
- }
- return 0;
-}
-
-static lt_ptr_t
-sys_bedl_sym (handle, symbol)
- lt_dlhandle handle;
- const char *symbol;
-{
- lt_ptr_t address = 0;
- image_id image = (image_id)handle->handle;
-
- if (get_image_symbol(image, symbol, B_SYMBOL_TYPE_ANY,
- &address) != B_OK) {
- last_error = symbol_error;
- return 0;
- }
- return address;
-}
-
-static
-lt_dltype_t
-sys_bedl = { LTDL_TYPE_TOP, 0, sys_bedl_init, sys_bedl_exit,
- sys_bedl_open, sys_bedl_close, sys_bedl_sym };
-
-#undef LTDL_TYPE_TOP
-#define LTDL_TYPE_TOP &sys_bedl
-
-#endif
-
-/* emulate dynamic linking using preloaded_symbols */
-
-typedef struct lt_dlsymlists_t {
- struct lt_dlsymlists_t *next;
- const lt_dlsymlist *syms;
-} lt_dlsymlists_t;
-
-static const lt_dlsymlist *default_preloaded_symbols = 0;
-static lt_dlsymlists_t *preloaded_symbols = 0;
-
-static int
-presym_init LTDL_PARAMS((void))
-{
- preloaded_symbols = 0;
- if (default_preloaded_symbols)
- return lt_dlpreload(default_preloaded_symbols);
- return 0;
-}
-
-static int
-presym_free_symlists LTDL_PARAMS((void))
-{
- lt_dlsymlists_t *lists = preloaded_symbols;
-
- while (lists) {
- lt_dlsymlists_t *tmp = lists;
-
- lists = lists->next;
- lt_dlfree(tmp);
- }
- preloaded_symbols = 0;
- return 0;
-}
-
-static int
-presym_exit LTDL_PARAMS((void))
-{
- presym_free_symlists();
- return 0;
-}
-
-static int
-presym_add_symlist (preloaded)
- const lt_dlsymlist *preloaded;
-{
- lt_dlsymlists_t *tmp;
- lt_dlsymlists_t *lists = preloaded_symbols;
-
- while (lists) {
- if (lists->syms == preloaded)
- return 0;
- lists = lists->next;
- }
-
- tmp = (lt_dlsymlists_t*) lt_dlmalloc(sizeof(lt_dlsymlists_t));
- if (!tmp) {
- last_error = memory_error;
- return 1;
- }
- tmp->syms = preloaded;
- tmp->next = 0;
- if (!preloaded_symbols)
- preloaded_symbols = tmp;
- else {
- /* append to the end */
- lists = preloaded_symbols;
- while (lists->next)
- lists = lists->next;
- lists->next = tmp;
- }
- return 0;
-}
-
-static int
-presym_open (handle, filename)
- lt_dlhandle handle;
- const char *filename;
-{
- lt_dlsymlists_t *lists = preloaded_symbols;
-
- if (!lists) {
- last_error = no_symbols_error;
- return 1;
- }
- if (!filename)
- filename = "@PROGRAM@";
- while (lists) {
- const lt_dlsymlist *syms = lists->syms;
-
- while (syms->name) {
- if (!syms->address &&
- strcmp(syms->name, filename) == 0) {
- handle->handle = (lt_ptr_t) syms;
- return 0;
- }
- syms++;
- }
- lists = lists->next;
- }
- last_error = file_not_found_error;
- return 1;
-}
-
-static int
-presym_close (handle)
- lt_dlhandle handle;
-{
- /* Just to silence gcc -Wall */
- handle = 0;
- return 0;
-}
-
-static lt_ptr_t
-presym_sym (handle, symbol)
- lt_dlhandle handle;
- const char *symbol;
-{
- lt_dlsymlist *syms = (lt_dlsymlist*)(handle->handle);
-
- syms++;
- while (syms->address) {
- if (strcmp(syms->name, symbol) == 0)
- return syms->address;
- syms++;
- }
- last_error = symbol_error;
- return 0;
-}
-
-static
-lt_dltype_t
-presym = { LTDL_TYPE_TOP, 0, presym_init, presym_exit,
- presym_open, presym_close, presym_sym };
-
-#undef LTDL_TYPE_TOP
-#define LTDL_TYPE_TOP &presym
-
-static char *user_search_path = 0;
-static lt_dlhandle handles = 0;
-static int initialized = 0;
-
-static lt_dltype_t *types = LTDL_TYPE_TOP;
-#undef LTDL_TYPE_TOP
-
-int
-lt_dlinit LTDL_PARAMS((void))
-{
- /* initialize libltdl */
- lt_dltype_t **type = &types;
- int typecount = 0;
-
- if (initialized) { /* Initialize only at first call. */
- initialized++;
- return 0;
- }
- handles = 0;
- user_search_path = 0; /* empty search path */
-
- while (*type) {
- if ((*type)->mod_init())
- *type = (*type)->next; /* Remove it from the list */
- else {
- type = &(*type)->next; /* Keep it */
- typecount++;
- }
- }
- if (typecount == 0) {
- last_error = dlopen_not_supported_error;
- return 1;
- }
- last_error = 0;
- initialized = 1;
- return 0;
-}
-
-int
-lt_dlpreload (preloaded)
- const lt_dlsymlist *preloaded;
-{
- if (preloaded)
- return presym_add_symlist(preloaded);
- presym_free_symlists();
- if (default_preloaded_symbols)
- return lt_dlpreload(default_preloaded_symbols);
- return 0;
-}
-
-int
-lt_dlpreload_default (preloaded)
- const lt_dlsymlist *preloaded;
-{
- default_preloaded_symbols = preloaded;
- return 0;
-}
-
-int
-lt_dlexit LTDL_PARAMS((void))
-{
- /* shut down libltdl */
- lt_dltype_t *type = types;
- int errors;
-
- if (!initialized) {
- last_error = shutdown_error;
- return 1;
- }
- if (initialized != 1) { /* shut down only at last call. */
- initialized--;
- return 0;
- }
- /* close all modules */
- errors = 0;
- while (handles) {
- /* FIXME: what if a module depends on another one? */
- if (lt_dlclose(handles))
- errors++;
- }
- initialized = 0;
- while (type) {
- if (type->mod_exit())
- errors++;
- type = type->next;
- }
- return errors;
-}
-
-static int
-tryall_dlopen (handle, filename)
- lt_dlhandle *handle;
- const char *filename;
-{
- lt_dlhandle cur;
- lt_dltype_t *type = types;
- const char *saved_error = last_error;
-
- /* check whether the module was already opened */
- cur = handles;
- while (cur) {
- if (!cur->filename && !filename)
- break;
- if (cur->filename && filename &&
- strcmp(cur->filename, filename) == 0)
- break;
- cur = cur->next;
- }
- if (cur) {
- cur->usage++;
- *handle = cur;
- return 0;
- }
-
- cur = *handle;
- if (filename) {
- cur->filename = strdup(filename);
- if (!cur->filename) {
- last_error = memory_error;
- return 1;
- }
- } else
- cur->filename = 0;
- while (type) {
- if (type->lib_open(cur, filename) == 0)
- break;
- type = type->next;
- }
- if (!type) {
- if (cur->filename)
- lt_dlfree(cur->filename);
- return 1;
- }
- cur->type = type;
- last_error = saved_error;
- return 0;
-}
-
-static int
-find_module (handle, dir, libdir, dlname, old_name, installed)
- lt_dlhandle *handle;
- const char *dir;
- const char *libdir;
- const char *dlname;
- const char *old_name;
- int installed;
-{
- int error;
- char *filename;
- /* try to open the old library first; if it was dlpreopened,
- we want the preopened version of it, even if a dlopenable
- module is available */
- if (old_name && tryall_dlopen(handle, old_name) == 0)
- return 0;
- /* try to open the dynamic library */
- if (dlname) {
- /* try to open the installed module */
- if (installed && libdir) {
- filename = (char*)
- lt_dlmalloc(strlen(libdir)+1+strlen(dlname)+1);
- if (!filename) {
- last_error = memory_error;
- return 1;
- }
- strcpy(filename, libdir);
- strcat(filename, "/");
- strcat(filename, dlname);
- error = tryall_dlopen(handle, filename) == 0;
- lt_dlfree(filename);
- if (error)
- return 0;
- }
- /* try to open the not-installed module */
- if (!installed) {
- filename = (char*)
- lt_dlmalloc((dir ? strlen(dir) : 0)
- + strlen(objdir) + strlen(dlname) + 1);
- if (!filename) {
- last_error = memory_error;
- return 1;
- }
- if (dir)
- strcpy(filename, dir);
- else
- *filename = 0;
- strcat(filename, objdir);
- strcat(filename, dlname);
-
- error = tryall_dlopen(handle, filename) == 0;
- lt_dlfree(filename);
- if (error)
- return 0;
- }
- /* hmm, maybe it was moved to another directory */
- {
- filename = (char*)
- lt_dlmalloc((dir ? strlen(dir) : 0)
- + strlen(dlname) + 1);
- if (dir)
- strcpy(filename, dir);
- else
- *filename = 0;
- strcat(filename, dlname);
- error = tryall_dlopen(handle, filename) == 0;
- lt_dlfree(filename);
- if (error)
- return 0;
- }
- }
- last_error = file_not_found_error;
- return 1;
-}
-
-static lt_ptr_t
-find_file (basename, search_path, pdir, handle)
- const char *basename;
- const char *search_path;
- char **pdir;
- lt_dlhandle *handle;
-{
- /* when handle != NULL search a library, otherwise a file */
- /* return NULL on failure, otherwise the file/handle */
-
- char *filename = 0;
- int filenamesize = 0;
- const char *next = search_path;
- int lenbase = strlen(basename);
-
- if (!next || !*next) {
- last_error = file_not_found_error;
- return 0;
- }
- while (next) {
- int lendir;
- const char *cur = next;
-
- next = strchr(cur, ':');
- if (!next)
- next = cur + strlen(cur);
- lendir = next - cur;
- if (*next == ':')
- ++next;
- else
- next = 0;
- if (lendir == 0)
- continue;
- if (lendir + 1 + lenbase >= filenamesize) {
- if (filename)
- lt_dlfree(filename);
- filenamesize = lendir + 1 + lenbase + 1;
- filename = (char*) lt_dlmalloc(filenamesize);
- if (!filename) {
- last_error = memory_error;
- return 0;
- }
- }
- strncpy(filename, cur, lendir);
- if (filename[lendir-1] != '/')
- filename[lendir++] = '/';
- strcpy(filename+lendir, basename);
- if (handle) {
- if (tryall_dlopen(handle, filename) == 0) {
- lt_dlfree(filename);
- return (lt_ptr_t) handle;
- }
- } else {
- FILE *file = fopen(filename, LTDL_READTEXT_MODE);
- if (file) {
- if (*pdir)
- lt_dlfree(*pdir);
- filename[lendir] = '\0';
- *pdir = strdup(filename);
- if (!*pdir) {
- /* We could have even avoided the
- strdup, but there would be some
- memory overhead. */
- *pdir = filename;
- } else
- lt_dlfree(filename);
- return (lt_ptr_t) file;
- }
- }
- }
- if (filename)
- lt_dlfree(filename);
- last_error = file_not_found_error;
- return 0;
-}
-
-static int
-load_deplibs(handle, deplibs)
- lt_dlhandle handle;
- const char *deplibs;
-{
- /* FIXME: load deplibs */
- handle->depcount = 0;
- handle->deplibs = 0;
- /* Just to silence gcc -Wall */
- deplibs = 0;
- return 0;
-}
-
-static int
-unload_deplibs(handle)
- lt_dlhandle handle;
-{
- /* FIXME: unload deplibs */
- /* Just to silence gcc -Wall */
- handle = 0;
- return 0;
-}
-
-static inline int
-trim (dest, str)
- char **dest;
- const char *str;
-{
- /* remove the leading and trailing "'" from str
- and store the result in dest */
- char *tmp;
- const char *end = strrchr(str, '\'');
- int len = strlen(str);
-
- if (*dest)
- lt_dlfree(*dest);
- if (len > 3 && str[0] == '\'') {
- tmp = (char*) lt_dlmalloc(end - str);
- if (!tmp) {
- last_error = memory_error;
- return 1;
- }
- strncpy(tmp, &str[1], (end - str) - 1);
- tmp[len-3] = '\0';
- *dest = tmp;
- } else
- *dest = 0;
- return 0;
-}
-
-static inline int
-free_vars(dir, name, dlname, oldname, libdir, deplibs)
- char *dir;
- char *name;
- char *dlname;
- char *oldname;
- char *libdir;
- char *deplibs;
-{
- if (dir)
- lt_dlfree(dir);
- if (name)
- lt_dlfree(name);
- if (dlname)
- lt_dlfree(dlname);
- if (oldname)
- lt_dlfree(oldname);
- if (libdir)
- lt_dlfree(libdir);
- if (deplibs)
- lt_dlfree(deplibs);
- return 0;
-}
-
-lt_dlhandle
-lt_dlopen (filename)
- const char *filename;
-{
- lt_dlhandle handle, newhandle;
- const char *basename, *ext;
- const char *saved_error = last_error;
- char *dir = 0, *name = 0;
-
- if (!filename) {
- handle = (lt_dlhandle) lt_dlmalloc(sizeof(lt_dlhandle_t));
- if (!handle) {
- last_error = memory_error;
- return 0;
- }
- handle->usage = 0;
- handle->depcount = 0;
- handle->deplibs = 0;
- newhandle = handle;
- if (tryall_dlopen(&newhandle, 0) != 0) {
- lt_dlfree(handle);
- return 0;
- }
- goto register_handle;
- }
- basename = strrchr(filename, '/');
- if (basename) {
- basename++;
- dir = (char*) lt_dlmalloc(basename - filename + 1);
- if (!dir) {
- last_error = memory_error;
- return 0;
- }
- strncpy(dir, filename, basename - filename);
- dir[basename - filename] = '\0';
- } else
- basename = filename;
- /* check whether we open a libtool module (.la extension) */
- ext = strrchr(basename, '.');
- if (ext && strcmp(ext, ".la") == 0) {
- /* this seems to be a libtool module */
- FILE *file;
- int i;
- char *dlname = 0, *old_name = 0;
- char *libdir = 0, *deplibs = 0;
- char *line;
- int error = 0;
- /* if we can't find the installed flag, it is probably an
- installed libtool archive, produced with an old version
- of libtool */
- int installed = 1;
-
- /* extract the module name from the file name */
- name = (char*) lt_dlmalloc(ext - basename + 1);
- if (!name) {
- last_error = memory_error;
- if (dir)
- lt_dlfree(dir);
- return 0;
- }
- /* canonicalize the module name */
- for (i = 0; i < ext - basename; i++)
- if (isalnum((int)(basename[i])))
- name[i] = basename[i];
- else
- name[i] = '_';
- name[ext - basename] = '\0';
- /* now try to open the .la file */
- file = fopen(filename, LTDL_READTEXT_MODE);
- if (!file)
- last_error = file_not_found_error;
- if (!file && !dir) {
- /* try other directories */
- file = (FILE*) find_file(basename,
- user_search_path,
- &dir, 0);
- if (!file)
- file = (FILE*) find_file(basename,
- getenv("LTDL_LIBRARY_PATH"),
- &dir, 0);
-#ifdef LTDL_SHLIBPATH_VAR
- if (!file)
- file = (FILE*) find_file(basename,
- getenv(LTDL_SHLIBPATH_VAR),
- &dir, 0);
-#endif
- }
- if (!file) {
- if (name)
- lt_dlfree(name);
- if (dir)
- lt_dlfree(dir);
- return 0;
- }
- line = (char*) lt_dlmalloc(LTDL_FILENAME_MAX);
- if (!line) {
- fclose(file);
- last_error = memory_error;
- return 0;
- }
- /* read the .la file */
- while (!feof(file)) {
- if (!fgets(line, LTDL_FILENAME_MAX, file))
- break;
- if (line[0] == '\n' || line[0] == '#')
- continue;
-# undef STR_DLNAME
-# define STR_DLNAME "dlname="
- if (strncmp(line, STR_DLNAME,
- sizeof(STR_DLNAME) - 1) == 0)
- error = trim(&dlname,
- &line[sizeof(STR_DLNAME) - 1]);
- else
-# undef STR_OLD_LIBRARY
-# define STR_OLD_LIBRARY "old_library="
- if (strncmp(line, STR_OLD_LIBRARY,
- sizeof(STR_OLD_LIBRARY) - 1) == 0)
- error = trim(&old_name,
- &line[sizeof(STR_OLD_LIBRARY) - 1]);
- else
-# undef STR_LIBDIR
-# define STR_LIBDIR "libdir="
- if (strncmp(line, STR_LIBDIR,
- sizeof(STR_LIBDIR) - 1) == 0)
- error = trim(&libdir,
- &line[sizeof(STR_LIBDIR) - 1]);
- else
-# undef STR_DL_DEPLIBS
-# define STR_DL_DEPLIBS "dl_dependency_libs="
- if (strncmp(line, STR_DL_DEPLIBS,
- sizeof(STR_DL_DEPLIBS) - 1) == 0)
- error = trim(&deplibs,
- &line[sizeof(STR_DL_DEPLIBS) - 1]);
- else
- if (strcmp(line, "installed=yes\n") == 0)
- installed = 1;
- else
- if (strcmp(line, "installed=no\n") == 0)
- installed = 0;
- if (error)
- break;
- }
- fclose(file);
- lt_dlfree(line);
- /* allocate the handle */
- handle = (lt_dlhandle) lt_dlmalloc(sizeof(lt_dlhandle_t));
- if (!handle || error) {
- if (handle)
- lt_dlfree(handle);
- if (!error)
- last_error = memory_error;
- free_vars(name, dir, dlname, old_name, libdir, deplibs);
- return 0;
- }
- handle->usage = 0;
- if (load_deplibs(handle, deplibs) == 0) {
- newhandle = handle;
- /* find_module may replace newhandle */
- if (find_module(&newhandle, dir, libdir,
- dlname, old_name, installed)) {
- unload_deplibs(handle);
- error = 1;
- }
- } else
- error = 1;
- if (error) {
- lt_dlfree(handle);
- free_vars(name, dir, dlname, old_name, libdir, deplibs);
- return 0;
- }
- if (handle != newhandle) {
- unload_deplibs(handle);
- }
- } else {
- /* not a libtool module */
- handle = (lt_dlhandle) lt_dlmalloc(sizeof(lt_dlhandle_t));
- if (!handle) {
- last_error = memory_error;
- if (dir)
- lt_dlfree(dir);
- return 0;
- }
- handle->usage = 0;
- /* non-libtool modules don't have dependencies */
- handle->depcount = 0;
- handle->deplibs = 0;
- newhandle = handle;
- if (tryall_dlopen(&newhandle, filename)
- && (!dir
- || (!find_file(basename, user_search_path,
- 0, &newhandle)
- && !find_file(basename,
- getenv("LTDL_LIBRARY_PATH"),
- 0, &newhandle)
-#ifdef LTDL_SHLIBPATH_VAR
- && !find_file(basename,
- getenv(LTDL_SHLIBPATH_VAR),
- 0, &newhandle)
-#endif
- ))) {
- lt_dlfree(handle);
- if (dir)
- lt_dlfree(dir);
- return 0;
- }
- }
-register_handle:
- if (newhandle != handle) {
- lt_dlfree(handle);
- handle = newhandle;
- }
- if (!handle->usage) {
- handle->usage = 1;
- handle->name = name;
- handle->next = handles;
- handles = handle;
- } else if (name)
- lt_dlfree(name);
- if (dir)
- lt_dlfree(dir);
- last_error = saved_error;
- return handle;
-}
-
-lt_dlhandle
-lt_dlopenext (filename)
- const char *filename;
-{
- lt_dlhandle handle;
- char *tmp;
- int len;
- const char *saved_error = last_error;
-
- if (!filename)
- return lt_dlopen(filename);
- len = strlen(filename);
- if (!len) {
- last_error = file_not_found_error;
- return 0;
- }
- /* try the normal file name */
- handle = lt_dlopen(filename);
- if (handle)
- return handle;
- /* try "filename.la" */
- tmp = (char*) lt_dlmalloc(len+4);
- if (!tmp) {
- last_error = memory_error;
- return 0;
- }
- strcpy(tmp, filename);
- strcat(tmp, ".la");
- handle = lt_dlopen(tmp);
- if (handle) {
- last_error = saved_error;
- lt_dlfree(tmp);
- return handle;
- }
-#ifdef LTDL_SHLIB_EXT
- /* try "filename.EXT" */
- if (strlen(shlib_ext) > 3) {
- lt_dlfree(tmp);
- tmp = (char*) lt_dlmalloc(len + strlen(shlib_ext) + 1);
- if (!tmp) {
- last_error = memory_error;
- return 0;
- }
- strcpy(tmp, filename);
- } else
- tmp[len] = '\0';
- strcat(tmp, shlib_ext);
- handle = lt_dlopen(tmp);
- if (handle) {
- last_error = saved_error;
- lt_dlfree(tmp);
- return handle;
- }
-#endif
- last_error = file_not_found_error;
- lt_dlfree(tmp);
- return 0;
-}
-
-int
-lt_dlclose (handle)
- lt_dlhandle handle;
-{
- lt_dlhandle cur, last;
-
- /* check whether the handle is valid */
- last = cur = handles;
- while (cur && handle != cur) {
- last = cur;
- cur = cur->next;
- }
- if (!cur) {
- last_error = invalid_handle_error;
- return 1;
- }
- handle->usage--;
- if (!handle->usage) {
- int error;
-
- if (handle != handles)
- last->next = handle->next;
- else
- handles = handle->next;
- error = handle->type->lib_close(handle);
- error += unload_deplibs(handle);
- if (handle->filename)
- lt_dlfree(handle->filename);
- if (handle->name)
- lt_dlfree(handle->name);
- lt_dlfree(handle);
- return error;
- }
- return 0;
-}
-
-lt_ptr_t
-lt_dlsym (handle, symbol)
- lt_dlhandle handle;
- const char *symbol;
-{
- int lensym;
- char lsym[LTDL_SYMBOL_LENGTH];
- char *sym;
- lt_ptr_t address;
-
- if (!handle) {
- last_error = invalid_handle_error;
- return 0;
- }
- if (!symbol) {
- last_error = symbol_error;
- return 0;
- }
- lensym = strlen(symbol);
- if (handle->type->sym_prefix)
- lensym += strlen(handle->type->sym_prefix);
- if (handle->name)
- lensym += strlen(handle->name);
- if (lensym + LTDL_SYMBOL_OVERHEAD < LTDL_SYMBOL_LENGTH)
- sym = lsym;
- else
- sym = (char*) lt_dlmalloc(lensym + LTDL_SYMBOL_OVERHEAD + 1);
- if (!sym) {
- last_error = buffer_overflow_error;
- return 0;
- }
- if (handle->name) {
- /* this is a libtool module */
- if (handle->type->sym_prefix) {
- strcpy(sym, handle->type->sym_prefix);
- strcat(sym, handle->name);
- } else
- strcpy(sym, handle->name);
- strcat(sym, "_LTX_");
- strcat(sym, symbol);
- /* try "modulename_LTX_symbol" */
- address = handle->type->find_sym(handle, sym);
- if (address) {
- if (sym != lsym)
- lt_dlfree(sym);
- return address;
- }
- }
- /* otherwise try "symbol" */
- if (handle->type->sym_prefix) {
- strcpy(sym, handle->type->sym_prefix);
- strcat(sym, symbol);
- } else
- strcpy(sym, symbol);
- address = handle->type->find_sym(handle, sym);
- if (sym != lsym)
- lt_dlfree(sym);
- return address;
-}
-
-const char *
-lt_dlerror LTDL_PARAMS((void))
-{
- const char *error = last_error;
-
- last_error = 0;
- return error;
-}
-
-int
-lt_dladdsearchdir (search_dir)
- const char *search_dir;
-{
- if (!search_dir || !strlen(search_dir))
- return 0;
- if (!user_search_path) {
- user_search_path = strdup(search_dir);
- if (!user_search_path) {
- last_error = memory_error;
- return 1;
- }
- } else {
- char *new_search_path = (char*)
- lt_dlmalloc(strlen(user_search_path) +
- strlen(search_dir) + 2); /* ':' + '\0' == 2 */
- if (!new_search_path) {
- last_error = memory_error;
- return 1;
- }
- strcpy(new_search_path, user_search_path);
- strcat(new_search_path, ":");
- strcat(new_search_path, search_dir);
- lt_dlfree(user_search_path);
- user_search_path = new_search_path;
- }
- return 0;
-}
-
-int
-lt_dlsetsearchpath (search_path)
- const char *search_path;
-{
- if (user_search_path)
- lt_dlfree(user_search_path);
- user_search_path = 0; /* reset the search path */
- if (!search_path || !strlen(search_path))
- return 0;
- user_search_path = strdup(search_path);
- if (!user_search_path)
- return 1;
- return 0;
-}
-
-const char *
-lt_dlgetsearchpath LTDL_PARAMS((void))
-{
- return user_search_path;
-}
diff --git a/libltdl/ltdl.h b/libltdl/ltdl.h
deleted file mode 100644
index 48b1add..0000000
--- a/libltdl/ltdl.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/* ltdl.h -- generic dlopen functions
- Copyright (C) 1998-1999 Free Software Foundation, Inc.
- Originally by Thomas Tanner <tanner@ffii.org>
- This file is part of GNU Libtool.
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-As a special exception to the GNU Library General Public License,
-if you distribute this file as part of a program that uses GNU libtool
-to create libraries and programs, you may include it under the same
-distribution terms that you use for the rest of that program.
-
-This library 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
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with this library; if not, write to the Free
-Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-/* Only include this header file once. */
-#ifndef _LTDL_H_
-#define _LTDL_H_ 1
-
-/* __BEGIN_DECLS should be used at the beginning of your declarations,
- so that C++ compilers don't mangle their names. Use __END_DECLS at
- the end of C declarations. */
-#undef __BEGIN_DECLS
-#undef __END_DECLS
-#ifdef __cplusplus
-# define __BEGIN_DECLS extern "C" {
-# define __END_DECLS }
-#else
-# define __BEGIN_DECLS /* empty */
-# define __END_DECLS /* empty */
-#endif
-
-/* LTDL_PARAMS is a macro used to wrap function prototypes, so that compilers
- that don't understand ANSI C prototypes still work, and ANSI C
- compilers can issue warnings about type mismatches. */
-#undef LTDL_PARAMS
-#undef lt_ptr_t
-#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(WIN32) || defined(__cplusplus)
-# define LTDL_PARAMS(protos) protos
-# define lt_ptr_t void*
-#else
-# define LTDL_PARAMS(protos) ()
-# define lt_ptr_t char*
-#endif
-
-#include <stdlib.h>
-
-#ifdef _LTDL_COMPILE_
-typedef struct lt_dlhandle_t *lt_dlhandle;
-#else
-typedef lt_ptr_t lt_dlhandle;
-#endif
-
-typedef struct {
- const char *name;
- lt_ptr_t address;
-} lt_dlsymlist;
-
-__BEGIN_DECLS
-extern int lt_dlinit LTDL_PARAMS((void));
-extern int lt_dlpreload LTDL_PARAMS((const lt_dlsymlist *preloaded));
-extern int lt_dlpreload_default LTDL_PARAMS((const lt_dlsymlist *preloaded));
-extern int lt_dlexit LTDL_PARAMS((void));
-extern lt_dlhandle lt_dlopen LTDL_PARAMS((const char *filename));
-extern lt_dlhandle lt_dlopenext LTDL_PARAMS((const char *filename));
-extern int lt_dlclose LTDL_PARAMS((lt_dlhandle handle));
-extern lt_ptr_t lt_dlsym LTDL_PARAMS((lt_dlhandle handle, const char *name));
-extern const char *lt_dlerror LTDL_PARAMS((void));
-extern int lt_dladdsearchdir LTDL_PARAMS((const char *search_dir));
-extern int lt_dlsetsearchpath LTDL_PARAMS((const char *search_path));
-extern const char *lt_dlgetsearchpath LTDL_PARAMS((void));
-
-extern const lt_dlsymlist lt_preloaded_symbols[];
-#define LTDL_SET_PRELOADED_SYMBOLS() lt_dlpreload_default(lt_preloaded_symbols)
-
-extern lt_ptr_t (*lt_dlmalloc)LTDL_PARAMS((size_t size));
-extern void (*lt_dlfree)LTDL_PARAMS((lt_ptr_t ptr));
-
-__END_DECLS
-
-#endif /* !_LTDL_H_ */