changeset 25299:537b732926fb stable

fix logic error in OCTAVE_CONFIG_LIB (bug #53736) * acinclude.m4 (OCTAVE_CHECK_LIB): Don't allow PACKAGE_LIBS to be set if the library is not found. Previously this could happen in various ways, including if the macro was used with an empty warning string.
author John W. Eaton <jwe@octave.org>
date Tue, 24 Apr 2018 10:35:49 -0400
parents 65b4b04600c6
children 4c98a9e5ce25
files m4/acinclude.m4
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/m4/acinclude.m4	Mon Apr 23 17:05:43 2018 -0700
+++ b/m4/acinclude.m4	Tue Apr 24 10:35:49 2018 -0400
@@ -838,7 +838,11 @@
           warn_$1=
           AC_DEFINE([HAVE_]m4_toupper([$1]), 1,
             [Define to 1 if $2 is available.])], [$8])
+      else
+        m4_toupper([$1])_LIBS=
       fi
+    else
+      m4_toupper([$1])_LIBS=
     fi
     m4_ifnblank([$6], [AC_LANG_POP($6)])
     CPPFLAGS="$ac_octave_save_CPPFLAGS"
@@ -855,7 +859,6 @@
   AC_SUBST(m4_toupper([$1])_LIBS)
   if test -n "$warn_$1"; then
     OCTAVE_CONFIGURE_WARNING([warn_$1])
-    m4_toupper([$1])_LIBS=
   fi
 ])
 dnl