]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Testsuite portability update round.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Mon, 14 Nov 2005 22:19:40 +0000 (22:19 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Mon, 14 Nov 2005 22:19:40 +0000 (22:19 +0000)
* 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 <tim@multitalents.net>.
(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 <cygwin@cwilson.fastmail.fm>.

ChangeLog
tests/am-subdir.at
tests/deplibs-ident.at
tests/inherited_flags.at
tests/libtoolize.at
tests/nonrecursive.at
tests/old-m4-iface.at
tests/recursive.at
tests/subproject.at
tests/testsuite.at

index d9f022d894475f0e29501ea9ddb6e25445b554b1..f5758f2dba96faf444d3d9cd16073e90f108f226 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,29 @@
 2005-11-14  Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
 
+       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 <tim@multitalents.net>.
+       (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 <cygwin@cwilson.fastmail.fm>.
+
        * 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.
index da1cb07f15feb13eb9910712f121690af3351422..ac9f867087a78cd3f90e031647539a61c830fc55 100644 (file)
@@ -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
index f3ade8a42f5afe1f0b7c9bde03ad7956bcf6b508..9fdc7361f29340f83f24bca903b2ccd229d9ecef 100644 (file)
@@ -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
index e2d97e0b25537d40c86084d00ad4f35016160169..11b321c202aef4bf8c74b88838dc5969cf12e04d 100644 (file)
@@ -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],
index 16f98e90521501568481815ee59a965870160c4c..02b2f1116f177ee93fc0822b688415a04f65c04e 100644 (file)
@@ -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
index cb5e9eb4f085a9cfd58766900f497bdb11bc477b..66207c853163668821e5d27ab12ec27074186d2a 100644 (file)
@@ -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
 
 ## ------------------------ ##
index a60c8ffdb75d217e318d81e262f1f0eec19e1ef1..7bcd5b23b79b6609448b767b499221a1925e63a3 100644 (file)
@@ -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)
index 698fd1be7be800a2524c9129adbd3e708a2582cd..3273e5121c42f3f31b40c8b41f715a3df512fb76 100644 (file)
@@ -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
 
 ## ------------------------ ##
index 782d06dad55836e8c81976a29a8ea40c5cffc45b..c30d50f6c1517ea888cff1ba9eafb91dea0b5f56 100644 (file)
@@ -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
 
 ## ------------------------ ##
index 3aa16c8df08ecba562975f69755a5d7d38a626df..0d9ac0d10cad9a0b4e4986b82983ccf0196a266d 100644 (file)
@@ -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 <<EOF
+SHELL = $SHELL 
+EOF
+])
 m4_popdef([_ARG_DIR])
 ])# _LTDL_PROJECT_FILES