+2002-05-08 Charles Wilson <cwilson@ece.gatech.edu>
+ Alexandre Duret-Lutz <duret_g@epita.fr>
+
+ * lib/am/progs.am (clean-%DIR%PROGRAMS): If Libtool is used, clean
+ both `program$(EXEEXT)' and `program'; needed under Cygwin.
+ * tests/libtool3.test: New file.
+ * tests/Makefile.am (TESTS): Add libtool3.test.
+
2002-05-07 Alexandre Duret-Lutz <duret_g@epita.fr>
* TODO: Undust.
Brian Ford ford@vss.fsi.com
Brian Jones cbj@nortel.net
Bruno Haible haible@ilog.fr
+Charles Wilson cwilson@ece.gatech.edu
Chris Provenzano proven@io.proven.org
Christian Cornelssen ccorn@cs.tu-berlin.de
danbp danpb@nospam.postmaster.co.uk
.PHONY clean-am: clean-%DIR%PROGRAMS
clean-%DIR%PROGRAMS:
- -test -z "$(%DIR%_PROGRAMS)" || rm -f $(%DIR%_PROGRAMS)
+?!LIBTOOL? -test -z "$(%DIR%_PROGRAMS)" || rm -f $(%DIR%_PROGRAMS)
+## Under Cygwin, we build `program$(EXEEXT)'. However, if this
+## program uses a Libtool library, Libtool will move it in
+## `_libs/program$(EXEEXT)' and create a `program' wrapper (without
+## `$(EXEEXT)'). Therefore, if Libtool is used, we must try to erase
+## both `program$(EXEEXT)' and `program'.
+## Cleaning the `_libs/' or `.libs/' directory is done from clean-libtool.
+## FIXME: In the future (i.e., when it works) it would be nice to delegate
+## this task to `libtool --mode=clean'.
+?LIBTOOL? @list='$(%DIR%_PROGRAMS)'; for p in $$list; do \
+?LIBTOOL? f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+?LIBTOOL? echo " rm -f $$p $$f"; \
+?LIBTOOL? rm -f $$p $$f ; \
+?LIBTOOL? done
library.test \
libtool.test \
libtool2.test \
+libtool3.test \
link_c_cxx.test \
link_dist.test \
link_f_c.test \
library.test \
libtool.test \
libtool2.test \
+libtool3.test \
link_c_cxx.test \
link_dist.test \
link_f_c.test \
--- /dev/null
+#! /bin/sh
+
+# Try to build and package a program linked to a Libtool library.
+
+required='libtoolize gcc'
+. $srcdir/defs || exit 1
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AM_PROG_LIBTOOL
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+lib_LTLIBRARIES = lib0.la
+lib0_la_SOURCES = 0.c
+
+bin_PROGRAMS = 1
+1_SOURCES = 1.c
+1_LDADD = lib0.la
+END
+
+cat > 0.c << 'END'
+int
+zero (void)
+{
+ return 0;
+}
+END
+
+cat > 1.c << 'END'
+int zero ();
+
+int
+main ()
+{
+ return zero ();
+}
+END
+
+set -e
+
+# Use --copy to workaround a bug in Cygwin's `cp -p' during distcheck.
+# (This bug is already exhibited by subobj9.test.) In brief: Cygwin's
+# `cp -p' tries to preserve group and owner of the source and fails
+# to do so under normal accounts. With --copy we ensure we own all files.
+
+libtoolize --force --copy
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing --copy
+
+./configure
+$MAKE
+$MAKE distcheck