Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 libtool (2.4.6-5) unstable; urgency=medium
 .
   * Patch from Vincent Lefevre for AC_TRY_EVAL. Closes: #910076
Author: Alastair McKinstry <mckinstry@debian.org>
Bug-Debian: https://bugs.debian.org/910076

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: 2018-10-08

--- libtool-2.4.6.orig/m4/libtool.m4
+++ libtool-2.4.6/m4/libtool.m4
@@ -4063,8 +4063,7 @@ _LT_EOF
   if AC_TRY_EVAL(ac_compile); then
     # Now try to grab the symbols.
     nlist=conftest.nm
-    $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD
-    if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then
+    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
       # Try sorting and uniquifying the output.
       if sort "$nlist" | uniq > "$nlist"T; then
 	mv -f "$nlist"T "$nlist"
--- libtool-2.4.6.orig/tests/old-ltdl-iface.at
+++ libtool-2.4.6/tests/old-ltdl-iface.at
@@ -62,6 +62,9 @@ MOSTLYCLEANFILES =
 include ltdl/Makefile.inc
 bin_PROGRAMS = old
 old_LDADD = -Lltdl $(LIBLTDL)
+# TODO: if --with-included-ltdl was unused this would
+# generate useless dependency.
+old_DEPENDENCIES = $(LIBLTDL)
 ]])
 
 AT_DATA([old.c],
@@ -131,7 +134,7 @@ LT_AT_CHECK_LIBTOOLIZE([--ltdl=ltdl --no
 
 AT_CHECK([test -f ltdl/Makefile.inc])
 
-LT_AT_BOOTSTRAP([ignore], [-I m4], [], [--add-missing], [--force])
+LT_AT_BOOTSTRAP([ignore], [-I m4], [], [--add-missing], [--force], [--with-included-ltdl])
 
 LT_AT_EXEC_CHECK([./old], 0, [[...]])
 
