* 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>.
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.
## ----------- ##
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
## ------------- ##
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
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
# '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],
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
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
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
## ------------------------ ##
AT_DATA([configure.in],
[[AC_INIT([main.c])
AC_PROG_MAKE_SET
+AC_LIBTOOL_DLOPEN
AM_PROG_LIBTOOL
AC_WITH_LTDL
AC_OUTPUT(Makefile)
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
## ------------------------ ##
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
## ------------------------ ##
: ${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)='`
# --------------------------
m4_define([LT_AT_ACLOCAL],
[AT_CHECK([$ACLOCAL $1], [0], [ignore], [ignore])
+AT_XFAIL_IF([test "$ACLOCAL" = no])
+AT_KEYWORDS([automake])
])
# --------------------------
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])
])
# ---------------------------
m4_define([LT_AT_AUTOHEADER],
[AT_CHECK([$AUTOHEADER $1], [0], [ignore], [ignore])
+AT_XFAIL_IF([test "$AUTOHEADER" = no])
+AT_KEYWORDS([autoconf])
])
# --------------------------
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])
+ )
])
# --------------------------
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]) )
])
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
module.lo: $(LIBTOOL) module.c
$(LTCOMPILE) -c module.c
-]])])
+]])
+cat >> Makefile <<EOF
+SHELL = $SHELL
+EOF
+])
m4_popdef([_ARG_DIR])
])# _LTDL_PROJECT_FILES