* tests/nonrecursive.at: Use -no-undefined for foo.la.
* tests/recursive.at: Likewise.
* tests/subproject.at: Likewise.
* tests/lt_dladvise.at: For systems where undefined symbols are
not allowed, to not try to load the module libdepend.
[ mingw ]: Add to list of such systems.
* tests/testsuite.at (_LT_AT_TRANSLATE_TEXT_OUTPUT): New macro,
to translate line ending of expout and experr files suitable for
host executables.
(LT_AT_CHECK, LT_AT_NOINST_EXEC_CHECK): Use it.
Report by Bob Friesenhahn.
2008-03-08 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+ Fix several test failures on Cygwin and MinGW.
+ * tests/nonrecursive.at: Use -no-undefined for foo.la.
+ * tests/recursive.at: Likewise.
+ * tests/subproject.at: Likewise.
+ * tests/lt_dladvise.at: For systems where undefined symbols are
+ not allowed, to not try to load the module libdepend.
+ [ mingw ]: Add to list of such systems.
+ * tests/testsuite.at (_LT_AT_TRANSLATE_TEXT_OUTPUT): New macro,
+ to translate line ending of expout and experr files suitable for
+ host executables.
+ (LT_AT_CHECK, LT_AT_NOINST_EXEC_CHECK): Use it.
+ Report by Bob Friesenhahn.
+
Fix installcheck dependencies, fix for --program-transform-name.
* Makefile.am (installcheck-local): Depend upon tests/atconfig
and $(srcdir)/$(TESTSUITE).
printf ("global: %d\n", moduletest (handle, "f", "i"));
/* Don't attempt to load moddepend unless modglobal was successfully
- loaded and the symglobal hint was taken. */
- if (info && info->is_symglobal)
+ loaded and the symglobal hint was taken, and the system allows to
+ to have undefined symbols. */
+ if (info && info->is_symglobal && HAVE_UNDEFINED_SYMBOLS)
{
hint_ext ();
}
# ------------------------------------------------------------------------- #
case $host_os in
-cygwin*)
+cygwin* | mingw*)
# These hosts do not support linking without -no-undefined
+ CPPFLAGS="$CPPFLAGS -DHAVE_UNDEFINED_SYMBOLS=0"
;;
*)
+ CPPFLAGS="$CPPFLAGS -DHAVE_UNDEFINED_SYMBOLS=1"
dlopenable="$dlopen depend"
$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c moddepend.c
AT_CHECK([$LIBTOOL --mode=link $CC -module $CFLAGS $LDFLAGS -o libdepend.la \
modules="${modules+$modules }$dlopen lib$module.la"
done
- AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT \
- $modules $LIBLTDL], [], [ignore], [ignore])
+ AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT $modules $LIBLTDL],
+ [], [ignore], [ignore])
LT_AT_NOINST_EXEC_CHECK([./main], [$modules], [], [expout], [])
done
include ltdl/Makefile.inc
-foo_la_LDFLAGS = -module -avoid-version
+foo_la_LDFLAGS = -module -avoid-version -no-undefined
foo_la_SOURCES = foo.c
]])
AUTOMAKE_OPTIONS = 1.7
SUBDIRS = ltdl
lib_LTLIBRARIES = foo.la
-foo_la_LDFLAGS = -module -avoid-version
+foo_la_LDFLAGS = -module -avoid-version -no-undefined
foo_la_SOURCES = foo.c
]])
# subproject.at -- test subproject Libltdl builds -*- Autotest -*-
#
-# Copyright (C) 2005 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2008 Free Software Foundation, Inc.
# Written by Gary V. Vaughan, 2005
#
# This file is part of GNU Libtool.
AUTOMAKE_OPTIONS = 1.9
SUBDIRS = sub/ltdl
lib_LTLIBRARIES = foo.la
-foo_la_LDFLAGS = -module -avoid-version
+foo_la_LDFLAGS = -module -avoid-version -no-undefined
]])
echo 'int dummy = 0;' > foo.c
m4_define([LT_AT_CHECK],
[echo "LT_ESCAPE([$1])"; AT_CHECK($@)])
+
+# _LT_AT_TRANSLATE_TEXT_OUTPUT(FILE)
+# ----------------------------------
+# Ensure correct line ending for expected output of host executables.
+m4_define([_LT_AT_TRANSLATE_TEXT_OUTPUT],
+[case $host_os in mingw*)
+ while read -r l; do printf "%s\r\n" "$l"; done < $1 > $1.t
+ mv -f $1.t $1 ;;
+esac])
+
+
# LT_AT_EXEC_CHECK(EXECUTABLE, [STATUS = 0], [STDOUT], [STDERR])
# --------------------------------------------------------------
m4_define([LT_AT_EXEC_CHECK],
-[AT_CHECK([$1; lt_status=$?; if test $lt_status -eq 0; then :;
+[m4_if([$3], [expout], [_LT_AT_TRANSLATE_TEXT_OUTPUT([$3])])
+m4_if([$4], [experr], [_LT_AT_TRANSLATE_TEXT_OUTPUT([$4])])
+AT_CHECK([$1; lt_status=$?; if test $lt_status -eq 0; then :;
elif test "X$host" != "X$build" && \
{ test -x "$1" || test -x "$1"$EXEEXT; }
then (exit 77); else (exit $lt_status); fi],[$2],[$3],[$4])
# [STATUS = 0], [STDOUT], [STDERR])
# ---------------------------------------------------------
m4_define([LT_AT_NOINST_EXEC_CHECK],
-[AT_CHECK([$LIBTOOL --mode=execute $2 $1; lt_status=$?;
+[m4_if([$4], [expout], [_LT_AT_TRANSLATE_TEXT_OUTPUT([$4])])
+m4_if([$5], [experr], [_LT_AT_TRANSLATE_TEXT_OUTPUT([$5])])
+AT_CHECK([$LIBTOOL --mode=execute $2 $1; lt_status=$?;
if test $lt_status -eq 0; then :;
elif test "X$host" != "X$build" && \
{ test -x "$1" || test -x "$1"$EXEEXT; }