Fix test failure of autopoint-3 on Cygwin.

It was broken since commit "tests: Use libtool in autopoint-3 test" (2014-09-05):
The Makefile specified to link the 'hello' program without libtool
(and thus Automake generated a direct link command without libtool),
but the LDADD variable used @LTLIBINTL@. On Cygwin, this led to a use of
the -R option, which the compiler does not understand:
x86_64-pc-cygwin-gcc: error: unrecognized command line option ‘-R’; did you mean ‘-R’?

* gettext-tools/tests/autopoint-3: Don't invoke LT_INIT. Use @LIBINTL@,
not @LTLIBINTL@. Don't touch ltmain.sh.
This commit is contained in:
Bruno Haible 2024-10-23 09:59:49 +02:00
parent 6dd0270bf6
commit 24bfd16669

View File

@ -48,7 +48,6 @@ export gettext_datadir
cat <<EOF >configure.ac
AC_INIT([hello], [0.0.0], [bug-gnu-gettext@gnu.org])
AM_INIT_AUTOMAKE([foreign])
LT_INIT
AC_CONFIG_MACRO_DIR([m4])
@ -84,7 +83,7 @@ DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
AM_CPPFLAGS = -I. -I$(srcdir)
# Link time dependencies.
LDADD = @LTLIBINTL@
LDADD = @LIBINTL@
EOF
cp -p "$abs_top_srcdir"/gnulib-lib/gettext.h .
@ -115,10 +114,6 @@ fi
${AUTOCONF} >/dev/null 2>autopoint.err
test $? = 0 || { cat autopoint.err; Exit 1; }
# If ltmain.sh is not present, some installations of Automake fail with an
# error "configure.ac:3: error: required file './ltmain.sh' not found".
touch ltmain.sh
# Avoid an Automake 1.16.5 failure, in the presence of Autoconf 2.71, on an ext4
# file system:
# PREFIX/share/automake-1.16/am/depend2.am: error: am__fastdepCC does not appear in AM_CONDITIONAL