From: Ralf Wildenhues Date: Mon, 14 Nov 2005 22:19:40 +0000 (+0000) Subject: Testsuite portability update round. X-Git-Tag: release-2-1b~396 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bbfe62c66929cff4a8f9622df9897abcdbf49dd5;p=thirdparty%2Flibtool.git Testsuite portability update round. * tests/inherited_flags: skip when shared libs are disabled. * tests/deplibs-ident.at [ aix ]: No unexpected failure here. * tests/libtoolize.at: Fix for distcheck (readonly sources). * tests/nonrecursive.at, tests/recursive.at, tests/subproject.at (foo.c): Actually export a symbol, for AIX. * tests/old-m4-iface.at: Use AC_LIBTOOL_DLOPEN, for AIX. * tests/nonrecursive.at: Set foo_la_SOURCES, for automake-1.7. * tests/subproject.at: Require automake-1.9, we use indirect subdirs. * tests/am-subdir.at: Move AT_KEYWORDS settings.. * tests/testsuite.at: ..here, in respective macros. (LT_AT_AUTOMAKE): Skip if we detect failure due to old version. (PREPARE_TESTS): Set autotool variables to `no' if not present. (LT_AT_ACLOCAL, LT_AT_AUTOCONF, LT_AT_AUTOMAKE) (LT_AT_AUTOHEADER, LT_AT_AUTORECONF): Use to XFAIL tests. Reported by Tim Rice . (LT_AT_MAKE): Do not use `make -e'. (_LTDL_PROJECT_FILES): Adjust sub-make call. Work around `make' which does not set `MAKE' or `SHELL'. Fix for user-set `CONFIG_SHELL'. Reported by Charles Wilson . --- diff --git a/ChangeLog b/ChangeLog index d9f022d89..f5758f2db 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,29 @@ 2005-11-14 Ralf Wildenhues + Testsuite portability update round. + + * tests/inherited_flags: skip when shared libs are disabled. + * tests/deplibs-ident.at [ aix ]: No unexpected failure here. + * tests/libtoolize.at: Fix for distcheck (readonly sources). + * tests/nonrecursive.at, tests/recursive.at, tests/subproject.at + (foo.c): Actually export a symbol, for AIX. + * tests/old-m4-iface.at: Use AC_LIBTOOL_DLOPEN, for AIX. + * tests/nonrecursive.at: Set foo_la_SOURCES, for automake-1.7. + * tests/subproject.at: Require automake-1.9, we use indirect + subdirs. + * tests/am-subdir.at: Move AT_KEYWORDS settings.. + * tests/testsuite.at: ..here, in respective macros. + (LT_AT_AUTOMAKE): Skip if we detect failure due to old version. + (PREPARE_TESTS): Set autotool variables to `no' if not present. + (LT_AT_ACLOCAL, LT_AT_AUTOCONF, LT_AT_AUTOMAKE) + (LT_AT_AUTOHEADER, LT_AT_AUTORECONF): Use to XFAIL tests. + Reported by Tim Rice . + (LT_AT_MAKE): Do not use `make -e'. + (_LTDL_PROJECT_FILES): Adjust sub-make call. Work around `make' + which does not set `MAKE' or `SHELL'. Fix for user-set + `CONFIG_SHELL'. + Reported by Charles Wilson . + * libltdl/m4/lt~obsolete.m4 (_LT_CC_BASENAME) (_LT_COMPILER_BOILERPLATE, _LT_LINKER_BOILERPLATE): Added because they were added to branch-1-5 AC_DEFUNed. diff --git a/tests/am-subdir.at b/tests/am-subdir.at index da1cb07f1..ac9f86708 100644 --- a/tests/am-subdir.at +++ b/tests/am-subdir.at @@ -25,11 +25,10 @@ AT_BANNER([Libtool's subdir-objects support.]) ## ----------- ## AT_SETUP([C subdir-objects]) -AT_KEYWORDS([autoconf automake]) AT_DATA([[configure.ac]], [[AC_INIT([subdir-demo], ]]AT_PACKAGE_VERSION[[, ]]AT_PACKAGE_BUGREPORT[[) -AM_INIT_AUTOMAKE([subdir-objects foreign]) +AM_INIT_AUTOMAKE([subdir-objects foreign 1.5]) LT_INIT([win32-dll]) AC_PROG_CC AM_PROG_CC_C_O @@ -86,12 +85,11 @@ AT_CLEANUP ## ------------- ## AT_SETUP([C++ subdir-objects]) -AT_KEYWORDS([autoconf automake]) LT_AT_TAG([CXX]) AT_DATA([[configure.ac]], [[AC_INIT([subdir-demo], ]]AT_PACKAGE_VERSION[[, ]]AT_PACKAGE_BUGREPORT[[) -AM_INIT_AUTOMAKE([subdir-objects foreign]) +AM_INIT_AUTOMAKE([subdir-objects foreign 1.5]) AC_PROG_CC AM_PROG_CC_C_O AC_PROG_CXX diff --git a/tests/deplibs-ident.at b/tests/deplibs-ident.at index f3ade8a42..9fdc7361f 100644 --- a/tests/deplibs-ident.at +++ b/tests/deplibs-ident.at @@ -58,7 +58,8 @@ int main() { return a1() + a2() + a3() + c(); } AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o b b.$OBJEXT ../liba1.la ../liba2.la ../liba3.la ../../c/libcee.la -rpath /nowhere], [0],[stdout],[ignore]) AT_CHECK([$EGREP 'cee.*cee' stdout], 1, [ignore], [ignore]) - AT_XFAIL_IF(:) dnl This is currently broken in libtool + AT_XFAIL_IF([case $host_os in aix*) false;; *):;; esac]) + dnl This is currently broken in libtool ) AT_CLEANUP diff --git a/tests/inherited_flags.at b/tests/inherited_flags.at index e2d97e0b2..11b321c20 100644 --- a/tests/inherited_flags.at +++ b/tests/inherited_flags.at @@ -61,6 +61,7 @@ AT_CHECK([${LIBTOOL} --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libbaz.la baz. # 'llt_[[ui]]nlikely_existing_lib.*llt_[[ui]]nlikely_existing_lib' # here. This fails on win32/MSVC because the generated command lines have a # different syntax. So drop the first `l'. +AT_CHECK([${LIBTOOL} --features | grep 'disable shared libraries' && (exit 77)], [1], [ignore]) AT_CHECK([grep 'lt_[[ui]]nlikely_existing_lib.*lt_[[ui]]nlikely_existing_lib' stdout], [0],[ignore],[ignore]) AT_CHECK([${LIBTOOL} --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o main main.lo -no-undefined -rpath /usr/local/lib ./libfoo.la ./libbar.la], diff --git a/tests/libtoolize.at b/tests/libtoolize.at index 16f98e905..02b2f1116 100644 --- a/tests/libtoolize.at +++ b/tests/libtoolize.at @@ -38,6 +38,8 @@ m4_define([_LT_LIBTOOLIZE_SETUP], test -d m4 || { rm -f m4 && mkdir m4; } +rm -f m4/libtool.m4 m4/ltoptions.m4 config/ltmain.sh + # This file should be upgraded. AT_DATA([m4/libtool.m4], [[ # serial 25 LT_INIT @@ -426,6 +428,8 @@ LT_AT_CHECK_LIBTOOLIZE([--copy], 0, expout) LT_AT_ACLOCAL([-I m4]) +rm -f m4/libtool.m4 m4/ltoptions.m4 + # This file should be upgraded. AT_DATA([m4/libtool.m4], [[ # serial 25 LT_INIT diff --git a/tests/nonrecursive.at b/tests/nonrecursive.at index cb5e9eb4f..66207c853 100644 --- a/tests/nonrecursive.at +++ b/tests/nonrecursive.at @@ -56,9 +56,10 @@ MOSTLYCLEANFILES = include libltdl/Makefile.inc foo_la_LDFLAGS = -module -avoid-version +foo_la_SOURCES = foo.c ]]) -echo 'static int dummy = 0;' > foo.c +echo 'int dummy = 0;' > foo.c ])# _LTDL_SETUP ## ------------------------ ## diff --git a/tests/old-m4-iface.at b/tests/old-m4-iface.at index a60c8ffdb..7bcd5b23b 100644 --- a/tests/old-m4-iface.at +++ b/tests/old-m4-iface.at @@ -93,6 +93,7 @@ _LTDL_PROJECT_FILES AT_DATA([configure.in], [[AC_INIT([main.c]) AC_PROG_MAKE_SET +AC_LIBTOOL_DLOPEN AM_PROG_LIBTOOL AC_WITH_LTDL AC_OUTPUT(Makefile) diff --git a/tests/recursive.at b/tests/recursive.at index 698fd1be7..3273e5121 100644 --- a/tests/recursive.at +++ b/tests/recursive.at @@ -39,9 +39,10 @@ AT_DATA([Makefile.am], SUBDIRS = ltdl lib_LTLIBRARIES = foo.la foo_la_LDFLAGS = -module -avoid-version +foo_la_SOURCES = foo.c ]]) -echo 'static int dummy = 0;' > foo.c +echo 'int dummy = 0;' > foo.c ])# _LTDL_SETUP ## ------------------------ ## diff --git a/tests/subproject.at b/tests/subproject.at index 782d06dad..c30d50f6c 100644 --- a/tests/subproject.at +++ b/tests/subproject.at @@ -36,12 +36,13 @@ AC_OUTPUT AT_DATA([Makefile.am], [[ACLOCAL_AMFLAGS = -I sub/ltdl/m4 +AUTOMAKE_OPTIONS = 1.9 SUBDIRS = sub/ltdl lib_LTLIBRARIES = foo.la foo_la_LDFLAGS = -module -avoid-version ]]) -echo 'static int dummy = 0;' > foo.c +echo 'int dummy = 0;' > foo.c ])# _LTDL_SETUP ## ------------------------ ## diff --git a/tests/testsuite.at b/tests/testsuite.at index 3aa16c8df..0d9ac0d10 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -24,6 +24,9 @@ m4_divert_push([PREPARE_TESTS])dnl : ${AUTOCONF=autoconf} : ${AUTOMAKE=automake} : ${AUTORECONF=autoreconf} +for tool in ACLOCAL AUTOHEADER AUTOCONF AUTOMAKE AUTORECONF; do + if eval \$$tool --version >/dev/null 2>&1; then :; else eval $tool=no; fi +done export ACLOCAL AUTOHEADER AUTOCONF AUTOMAKE AUTORECONF eval `$LIBTOOL --config | grep ^EGREP=` eval `$LIBTOOL --config | $EGREP '^(host|host_os|host_alias|build|ECHO)='` @@ -58,6 +61,8 @@ m4_define([LT_AT_CHECK_LIBTOOLIZE], # -------------------------- m4_define([LT_AT_ACLOCAL], [AT_CHECK([$ACLOCAL $1], [0], [ignore], [ignore]) +AT_XFAIL_IF([test "$ACLOCAL" = no]) +AT_KEYWORDS([automake]) ]) @@ -65,13 +70,18 @@ m4_define([LT_AT_ACLOCAL], # -------------------------- m4_define([LT_AT_AUTOCONF], [AT_CHECK([$AUTOCONF $1], [0], [ignore], [ignore]) +AT_XFAIL_IF([test "$AUTOCONF" = no]) +AT_KEYWORDS([autoconf]) ]) # LT_AT_AUTOMAKE([OPTIONS]) # -------------------------- m4_define([LT_AT_AUTOMAKE], -[AT_CHECK([$AUTOMAKE $1], [0], [ignore], [ignore]) +[AT_CHECK([$AUTOMAKE $1], [0], [ignore], [stderr], +[AT_CHECK([grep 'require .*but have' stderr && (exit 77)], [1])]) +AT_XFAIL_IF([test "$AUTOMAKE" = no]) +AT_KEYWORDS([automake]) ]) @@ -79,6 +89,8 @@ m4_define([LT_AT_AUTOMAKE], # --------------------------- m4_define([LT_AT_AUTOHEADER], [AT_CHECK([$AUTOHEADER $1], [0], [ignore], [ignore]) +AT_XFAIL_IF([test "$AUTOHEADER" = no]) +AT_KEYWORDS([autoconf]) ]) @@ -86,13 +98,19 @@ m4_define([LT_AT_AUTOHEADER], # -------------------------- m4_define([LT_AT_AUTORECONF], [AT_CHECK([$AUTORECONF $1], [0], [ignore], [ignore]) +AT_XFAIL_IF( + [case ,$AUTORECONF,$AUTOCONF,$AUTOHEADER,$ACLOCAL,$AUTOMAKE, in *,no,*) :;; *) false;; esac]) +AT_KEYWORDS([autoconf automake]) ]) # LT_AT_CONFIGURE([OPTIONS]) # -------------------------- m4_define([LT_AT_CONFIGURE], -[AT_CHECK([./configure $configure_options $1], [0], [ignore], [ignore]) +[( SHELL=${CONFIG_SHELL-/bin/sh} + AT_CHECK([CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options $1], + [0], [ignore], [ignore]) + ) ]) @@ -100,7 +118,7 @@ m4_define([LT_AT_CONFIGURE], # -------------------------- m4_define([LT_AT_MAKE], [( $unset LIBTOOL LIBTOOLIZE - AT_CHECK([$2 $MAKE -e $1], [0], [ignore], [ignore]) ) + AT_CHECK([$MAKE $1 $2], [0], [ignore], [ignore]) ) ]) @@ -214,10 +232,13 @@ TARGETS = ]_ARG_DIR[/libltdlc.la module.la ltdldemo$(EXEEXT) all: $(TARGETS) $(LIBTOOL) ]_ARG_DIR[/libltdlc.la: ]_ARG_DIR[/Makefile - cd ]_ARG_DIR[ && $(MAKE) + MAKE='$(MAKE)'; test -n "$$MAKE" || MAKE=make; \ + cd ]_ARG_DIR[ && $$MAKE CC="$(CC)" LIBTOOLFLAGS="$(LIBTOOLFLAGS)" \ + CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \ + CONFIGURE_OPTIONS="$(CONFIGURE_OPTIONS)" ]_ARG_DIR[/Makefile: - cd ]_ARG_DIR[ && ./configure $(CONFIGURE_OPTIONS) + cd ]_ARG_DIR[ && CONFIG_SHELL="$(SHELL)" $(SHELL) ./configure $(CONFIGURE_OPTIONS) ltdldemo$(EXEEXT): $(LIBTOOL) module.la ]_ARG_DIR[/libltdlc.la main.lo $(LTLINK) -o ltdldemo main.lo -dlopen module.la ./]_ARG_DIR[/libltdlc.la @@ -230,7 +251,11 @@ module.la: $(LIBTOOL) module.lo module.lo: $(LIBTOOL) module.c $(LTCOMPILE) -c module.c -]])]) +]]) +cat >> Makefile <