From f3029dda7d9135f76cb472de68cfe35805015a42 Mon Sep 17 00:00:00 2001 From: Karl Wette Date: Mon, 23 Jan 2017 17:18:34 +1300 Subject: [PATCH] configure.ac: check $OCTAVE is nonempty before testing functionality --- configure.ac | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index 0ff350102..a8c7e0d37 100644 --- a/configure.ac +++ b/configure.ac @@ -1031,13 +1031,15 @@ else fi # Check if Octave works -AC_MSG_CHECKING([if ${OCTAVE} works]) -AS_IF([test "x`${OCTAVE} --version 2>/dev/null | sed -n -e '1p' | sed -n -e '/Octave, version/p'`" != x],[ - AC_MSG_RESULT([yes]) -],[ - AC_MSG_NOTICE([no, disabling Octave]) - OCTAVE= -]) +if test -n "$OCTAVE"; then + AC_MSG_CHECKING([if ${OCTAVE} works]) + AS_IF([test "x`${OCTAVE} --version 2>/dev/null | sed -n -e '1p' | sed -n -e '/Octave, version/p'`" != x],[ + AC_MSG_RESULT([yes]) + ],[ + AC_MSG_NOTICE([no, disabling Octave]) + OCTAVE= + ]) +fi # Check for required Octave helper program "mkoctfile" if test -n "$OCTAVE"; then