Octave: fixups to previous configuration patch

- remove unneeded test -n "$OCTAVE"
- do not rely on Octave returning non-zero status for unrecognised option;
  search first line of output for 'unrecognized' instead
This commit is contained in:
Karl Wette 2013-07-16 14:18:16 +02:00 committed by William S Fulton
commit b28de20869

View file

@ -973,12 +973,10 @@ if test -n "$OCTAVE"; then
OCTAVE_LDFLAGS="${OCTAVE_LDFLAGS} "`${mkoctfile} -p $n`
done
AC_MSG_RESULT([$OCTAVE_LDFLAGS])
fi
if test -n "$OCTAVE"; then
for octave_opt in --silent --norc --no-history --no-window-system; do
AC_MSG_CHECKING([if Octave option '${octave_opt}' is supported])
${OCTAVE} ${octave_opt} /dev/null >/dev/null 2>&1
AS_IF([test $? -eq 0],[
octave_out=`${OCTAVE} ${octave_opt} /dev/null 2>&1 | sed -n '1{/unrecognized/p}'`
AS_IF([test "x${octave_out}" != x],[
AC_MSG_RESULT([yes])
OCTAVE="${OCTAVE} ${octave_opt}"
],[