libtool.m4 now contains a version of the code that used to run

from ltconfig, so that ltmain.sh and then libtool are
generated at configure time.

* Makefile.am:  Don't generate ltmain.sh or ltconfig anymore.
* bootstrap: ltconfig is no more!
* configure.in: Call AC_PROG_LIBTOOL directly.
(AC_OUTPUT): Generate tmain.sh.
* libtool.m4: Don't build an argument list for ltconfig.
(_LT_AC_LTCONFIG_HACK):  Refactoring of the former contents of
ltconfig.in to take advantage of the m4 macros from autoconf.
* ltmain.in: Don't do a version check against ltconfig.
* tests/assign.test: Remove reference to ltconfig.
* tests/hardcode.test: ditto.
* tests/sh.test: ditto.
This commit is contained in:
Gary V. Vaughan 2000-09-06 17:31:09 +00:00
parent ce4a397e19
commit e927e43114
12 changed files with 2388 additions and 3404 deletions

View File

@ -1,3 +1,21 @@
2000-09-07 Gary V. Vaughan <gvv@techie.com>
libtool.m4 now contains a version of the code that used to run
from ltconfig, so that ltmain.sh and then libtool are
generated at configure time.
* Makefile.am: Don't generate ltmain.sh or ltconfig anymore.
* bootstrap: ltconfig is no more!
* configure.in: Call AC_PROG_LIBTOOL directly.
(AC_OUTPUT): Generate tmain.sh.
* libtool.m4: Don't build an argument list for ltconfig.
(_LT_AC_LTCONFIG_HACK): Refactoring of the former contents of
ltconfig.in to take advantage of the m4 macros from autoconf.
* ltmain.in: Don't do a version check against ltconfig.
* tests/assign.test: Remove reference to ltconfig.
* tests/hardcode.test: ditto.
* tests/sh.test: ditto.
2000-09-05 Alexandre Oliva <aoliva@redhat.com>
* depdemo/main.c: Support -alt.

View File

@ -6,7 +6,7 @@ BUILD_SUBDIRS = . libltdl doc tests
SUBDIRS = $(BUILD_SUBDIRS)
DIST_SUBDIRS = $(BUILD_SUBDIRS) $(CONF_SUBDIRS)
# We need to export these variables when we run ltconfig.
# We need to export these variables
CFLAGS = @CFLAGS@
CPPLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
@ -14,12 +14,12 @@ LIBS= @LIBS@
aclocal_macros = libtool.m4 ltdl.m4
EXTRA_DIST = $(aclocal_macros) libtoolize.in ltconfig.in ltmain.in \
EXTRA_DIST = $(aclocal_macros) libtoolize.in ltmain.in \
mkstamp ChangeLog.0
CLEANFILES = libtool libtoolize ltconfig.T ltmain.shT
CLEANFILES = libtool libtoolize ltmain.shT
# These are required by libtoolize.
pkgdata_SCRIPTS = config.guess config.sub ltconfig
pkgdata_SCRIPTS = config.guess config.sub
pkgdata_DATA = ltmain.sh
# This macro file should be visible to Automake's aclocal.
@ -28,29 +28,6 @@ aclocal_DATA = $(aclocal_macros)
# The standalone libtool script, and the libtool distributor.
bin_SCRIPTS = libtool libtoolize
libtool: $(srcdir)/ltmain.sh $(srcdir)/ltconfig
AR="$(AR)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" \
MAGIC="$(MAGIC)" LD="$(LD)" LDFLAGS="$(LDFLAGS)" LIBS="$(LIBS)" \
LN_S="$(LN_S)" NM="$(NM)" RANLIB="$(RANLIB)" STRIP="$(STRIP)" \
AS="$(AS)" DLLTOOL="$(DLLTOOL)" OBJDUMP="$(OBJDUMP)" \
CONFIG_SHELL="$(SHELL)" ECHO="$(ECHO)" \
objext="$(OBJEXT)" exeext="$(EXEEXT)" reload_flag="$(reload_flag)" \
deplibs_check_method="$(deplibs_check_method)" file_magic_cmd="$(file_magic_cmd)" \
$(SHELL) $(srcdir)/ltconfig $(LIBTOOL_FLAGS) --srcdir=$(srcdir) \
--output=$@ $(srcdir)/ltmain.sh
# Experimental C version of libtool.
clibtool: $(srcdir)/ltmain.c $(srcdir)/ltconfig
AR="$(AR)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" \
MAGIC="$(MAGIC)" LD="$(LD)" LDFLAGS="$(LDFLAGS)" LIBS="$(LIBS)" \
LN_S="$(LN_S)" NM="$(NM)" RANLIB="$(RANLIB)" STRIP="$(STRIP)" \
AS="$(AS)" DLLTOOL="$(DLLTOOL)" OBJDUMP="$(OBJDUMP)" \
CONFIG_SHELL="$(SHELL)" ECHO="$(ECHO)" \
objext="$(objext)" exeext="$(exeext)" reload_flag="$(reload_flag)" \
deplibs_check_method="$(deplibs_check_method)" file_magic_cmd="$(file_magic_cmd)" \
$(SHELL) $(srcdir)/ltconfig $(LIBTOOL_FLAGS) --srcdir=$(srcdir) \
--output=$@ $(srcdir)/ltmain.c
libtoolize: $(srcdir)/libtoolize.in $(top_builddir)/config.status
CONFIG_FILES=libtoolize CONFIG_HEADERS= $(top_builddir)/config.status
chmod +x libtoolize
@ -66,29 +43,6 @@ update-timestamps:
@if (cd $(srcdir) && test -d CVS && \
$(CVS) -n update $(TSDEPS_DIST) | grep '^M'); then \
echo "Cannot make dist before commit"; exit 1; else :; fi
$(MAKE) TSDEPS="$(TSDEPS_DIST)" $(srcdir)/ltconfig $(srcdir)/ltmain.sh
# Do line number substitution, as well as PACKAGE, VERSION and TIMESTAMP.
# Line numbering transliterated from a section in autoconf (Autoconf 2.12).
@srcdir@/ltconfig: $(srcdir)/ltconfig.in $(top_srcdir)/configure.in $(TSDEPS)
rm -f ltconfig.T
date=`$(SHELL) $(srcdir)/mkstamp < $(srcdir)/ChangeLog` && \
$(AWK) '/@LINENO@/ { printf "%d:", NR } { print }' $(srcdir)/ltconfig.in | \
sed -e 's/@''PACKAGE@/@PACKAGE@/' -e 's/@''VERSION@/@VERSION@/' \
-e "s%@""TIMESTAMP@%$$date%" \
-e '/@LINENO@/s/^\([0-9][0-9]*\):\(.*\)@LINENO@/\2\1/' \
> ltconfig.T
chmod +x ltconfig.T
mv -f ltconfig.T $@ || \
(rm -f $@ && cp ltconfig.T $@ && rm -f ltconfig.T)
@srcdir@/ltmain.sh: $(srcdir)/ltmain.in $(top_srcdir)/configure.in $(TSDEPS)
-rm -f ltmain.shT
date=`$(SHELL) $(srcdir)/mkstamp < $(srcdir)/ChangeLog` && \
sed -e 's/@''PACKAGE@/@PACKAGE@/' -e 's/@''VERSION@/@VERSION@/' \
-e "s%@""TIMESTAMP@%$$date%" $(srcdir)/ltmain.in > ltmain.shT
mv -f ltmain.shT $@ || \
(rm -f $@ && cp ltmain.shT $@ && rm -f ltmain.shT)
# All our rules should depend on these demo files.
all-recursive: $(srcdir)/libltdl/acinclude.m4 $(ACINCLUDE_M4_LIST)

View File

@ -7,11 +7,10 @@
rm -f acinclude.m4
ln -s libtool.m4 acinclude.m4
# fake the libtool scripts
touch ltconfig
touch ltmain.sh
touch libtoolize
aclocal
automake --gnu --add-missing
automake --gnu --add-missing --copy
autoconf
for sub in libltdl demo depdemo mdemo cdemo; do
@ -26,6 +25,6 @@ for sub in libltdl demo depdemo mdemo cdemo; do
cd ..
done
rm -f ltconfig ltmain.sh libtoolize
rm -f ltmain.sh libtoolize
exit 0

View File

@ -31,7 +31,7 @@ AC_SUBST(pkgdatadir) dnl automake does not need this, but libtoolize does
aclocaldir='${datadir}/aclocal'
AC_SUBST(aclocaldir)
dnl Use the specified CC and LD while running ltconfig.
dnl Use the specified CC and LD
AC_PROG_CC
AM_PROG_LD
AC_SUBST(LD)
@ -39,7 +39,7 @@ AM_PROG_NM
AC_SUBST(NM)
AC_PROG_LN_S
dnl For the `lineno' script (which puts line numbers into `ltconfig').
dnl For the `lineno' script (which puts line numbers into `ltmain.sh').
AC_PROG_AWK
dnl Check for win32 dll support
@ -47,17 +47,7 @@ AC_LIBTOOL_WIN32_DLL
dnl Check for dlopen support
AC_LIBTOOL_DLOPEN
AC_LIBTOOL_SETUP
AC_SUBST(DLLTOOL)
AC_SUBST(MAGIC)
AC_SUBST(OBJDUMP)
AC_SUBST(AS)
AC_SUBST(reload_flag)
AC_SUBST(file_magic_cmd)
AC_SUBST(deplibs_check_method)
LIBTOOL_FLAGS="$libtool_flags"
AC_SUBST(LIBTOOL_FLAGS)
AC_PROG_LIBTOOL
AC_ARG_ENABLE(ltdl-install,
[ --disable-ltdl-install do not install libltdl])
@ -81,11 +71,7 @@ done
AC_SUBST(ACINCLUDE_M4_LIST)
AC_SUBST(DIST_MAKEFILE_LIST)
AC_OUTPUT_COMMANDS([
test -f ${saved_top_srcdir}/ltconfig || ${MAKE-make} ${saved_top_srcdir}/ltconfig
test -f ${saved_top_srcdir}/ltmain.sh || ${MAKE-make} ${saved_top_srcdir}/ltmain.sh
], [saved_top_srcdir=${srcdir}])
AC_OUTPUT([Makefile doc/Makefile tests/Makefile])
AC_OUTPUT([Makefile doc/Makefile tests/Makefile ltmain.sh:ltmain.in])
# Local Variables:
# mode:shell-script

2378
libtool.m4 vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -61,7 +61,7 @@ AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)
AC_DEFUN(AC_LTDL_SNARF_CONFIG,
[# Read the libtool configuration
rm -f conftest
./libtool --config > conftest
${SHELL-/bin/sh} ./libtool --config > conftest
. ./conftest
rm -f conftest
])

View File

@ -83,12 +83,6 @@ if test "${LANG+set}" = set; then
save_LANG="$LANG"; LANG=C; export LANG
fi
if test "$LTCONFIG_VERSION" != "$VERSION"; then
echo "$modename: ltconfig version \`$LTCONFIG_VERSION' does not match $PROGRAM version \`$VERSION'" 1>&2
echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
exit 1
fi
if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
echo "$modename: not configured to build any kind of library" 1>&2
echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
@ -146,7 +140,7 @@ do
;;
--config)
sed -e '1,/^### BEGIN LIBTOOL CONFIG/d' -e '/^### END LIBTOOL CONFIG/,$d' $0
sed -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0
exit 0
;;

View File

@ -200,3 +200,59 @@ Jon Leichter
jon@symas.com
"Gary V. Vaughan" wrote:
>
> On Wed, Aug 30, 2000 at 10:51:36AM -0400, Charles Wilson wrote:
> > No, it can't. Currently, libtool itself doesn't support *building*
> > dlls.
>
> Ouch. Yes it does. I added support around Christmas 1998, and have
> been maintaining it ever since.
Thanks for the correction.
>
> Yes it does. And provided your libraries don't trip over the stupid
> dll limitation of "to export a non-function symbol you must edit your
> sources", it works easily. Even if you do export data symbols,
> libtool woll build and link against a dll for you (even generating an
> import lib along the way).
>
> Unfortunately libtool was developed for Unix and assumes a featureful
> shared library architecture, which doesn't map very easily onto win32
> dll's.
>
> I will be able to simplify the dll build process a little when DJ's
> patches to binutils arrive in a cygwin release (did this happen in
> 1.1? I have been so busy with m4 that I only upgraded from b20.1 a few
> weeks ago).
They landed in binutils-20000625, and were finetuned/tweaked to a fairly
stable point by binutils-20000722 (the current version in /latest).
Also, there were a few additions that changed ld's default search order
for libraries:
-Bstatic -lfoo :
looks for libfoo.a
-Bdynamic -lfoo :
looks for libfoo.dll.a (default name for an import lib)
then foo.dll.a (alt. name for an import lib)
then libfoo.dll (link directly to a dll)
then foo.dll (ditto, alt. name)
finally, libfoo.a (fall back to static lib)
The spec file for gcc (as of 2.95.2-2) changed so that:
gcc -static calls 'ld -Bstatic'
gcc calls 'ld -Bdynamic'
Finally, 'gcc -shared' will build a dll, but you need to pass linker
options like '-Wl,--out-implib=libfoo.dll.a' explicitly.
FWIW, all of the (non-libtool) libraries I've dll-ized do not use
dlltool at all, and rely only on gcc (and ld, indirectly).
--Chuck
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

View File

@ -12,7 +12,7 @@ fi
. $srcdir/defs || exit 1
# Check that test -e isn't used in our portable shell scripts.
if egrep -n '[^ ]=[^ ].*(break|continue)' $srcdir/../ltconfig $srcdir/../ltmain.sh; then
if egrep -n '[^ ]=[^ ].*(break|continue)' $srcdir/../ltmain.sh; then
echo "cannot use \`break' or \`continue' on the same line as an assignment"
exit 1
fi

View File

@ -40,7 +40,7 @@ fi
echo "= Running $make hardcode in ../demo"
$make hardcode || exit 1
echo "= Finding ltconfig's guesses at hardcoding values"
echo "= Finding libtool.m4's guesses at hardcoding values"
status=0
hardcode_direct=NONE
hardcode_minus_L=NONE

View File

@ -12,7 +12,7 @@ fi
# Check all the "portable" shell scripts.
status=0
scripts="$srcdir/../ltconfig $srcdir/../ltmain.sh"
scripts="$srcdir/../ltmain.sh"
# Check for bad binary operators.
if egrep -n -e "if[ ]+[\"']?\\$.*(=|-[lg][te]|-eq|-ne)" $scripts; then