comparison m4/acinclude.m4 @ 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 ab3904f253c5
children 0b253ba6eb91
comparison
equal deleted inserted replaced
25297:65b4b04600c6 25299:537b732926fb
836 if test "$octave_cv_lib_$1" = yes; then 836 if test "$octave_cv_lib_$1" = yes; then
837 m4_ifblank([$8], [ 837 m4_ifblank([$8], [
838 warn_$1= 838 warn_$1=
839 AC_DEFINE([HAVE_]m4_toupper([$1]), 1, 839 AC_DEFINE([HAVE_]m4_toupper([$1]), 1,
840 [Define to 1 if $2 is available.])], [$8]) 840 [Define to 1 if $2 is available.])], [$8])
841 else
842 m4_toupper([$1])_LIBS=
841 fi 843 fi
844 else
845 m4_toupper([$1])_LIBS=
842 fi 846 fi
843 m4_ifnblank([$6], [AC_LANG_POP($6)]) 847 m4_ifnblank([$6], [AC_LANG_POP($6)])
844 CPPFLAGS="$ac_octave_save_CPPFLAGS" 848 CPPFLAGS="$ac_octave_save_CPPFLAGS"
845 LDFLAGS="$ac_octave_save_LDFLAGS" 849 LDFLAGS="$ac_octave_save_LDFLAGS"
846 LIBS="$ac_octave_save_LIBS" 850 LIBS="$ac_octave_save_LIBS"
853 AC_MSG_ERROR([to build Octave, you must have the $2 library and header files installed]) 857 AC_MSG_ERROR([to build Octave, you must have the $2 library and header files installed])
854 fi]) 858 fi])
855 AC_SUBST(m4_toupper([$1])_LIBS) 859 AC_SUBST(m4_toupper([$1])_LIBS)
856 if test -n "$warn_$1"; then 860 if test -n "$warn_$1"; then
857 OCTAVE_CONFIGURE_WARNING([warn_$1]) 861 OCTAVE_CONFIGURE_WARNING([warn_$1])
858 m4_toupper([$1])_LIBS=
859 fi 862 fi
860 ]) 863 ])
861 dnl 864 dnl
862 dnl Check whether ARPACK works (does not crash). 865 dnl Check whether ARPACK works (does not crash).
863 dnl 866 dnl