Fix Octave detection for non-GNU sed on MacOS
This commit is contained in:
parent
ae7c04e204
commit
6489730892
1 changed files with 19 additions and 9 deletions
16
configure.ac
16
configure.ac
|
|
@ -1058,7 +1058,7 @@ if test -n "$OCTAVE"; then
|
||||||
AS_IF([test "x`${OCTAVE} --version 2>/dev/null | sed -n -e '1p' | sed -n -e '/Octave, version/p'`" != x],[
|
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_RESULT([yes])
|
||||||
],[
|
],[
|
||||||
AC_MSG_NOTICE([no, disabling Octave])
|
AC_MSG_NOTICE([no])
|
||||||
OCTAVE=
|
OCTAVE=
|
||||||
])
|
])
|
||||||
fi
|
fi
|
||||||
|
|
@ -1066,13 +1066,23 @@ fi
|
||||||
# Check for required Octave helper program "mkoctfile"
|
# Check for required Octave helper program "mkoctfile"
|
||||||
if test -n "$OCTAVE"; then
|
if test -n "$OCTAVE"; then
|
||||||
AC_MSG_CHECKING([for mkoctfile])
|
AC_MSG_CHECKING([for mkoctfile])
|
||||||
mkoctfile=["`echo $OCTAVE | sed -e 's|[a-z][a-z-]*$|mkoctfile|;t;s|[a-z][a-z-]*\(-[0-9][0-9.+]*\)$|mkoctfile\1|;t'`"]
|
version_suffix=["`echo $OCTAVE | sed -e 's|.*\(-[0-9][0-9.]*\)$|\1|'`"]
|
||||||
|
case $version_suffix in
|
||||||
|
-*) ;;
|
||||||
|
*) version_suffix="" ;;
|
||||||
|
esac
|
||||||
|
octave_directory=`dirname $OCTAVE`
|
||||||
|
if test "$octave_directory" = "." ; then
|
||||||
|
mkoctfile="mkoctfile${version_suffix}"
|
||||||
|
else
|
||||||
|
mkoctfile="${octave_directory}/mkoctfile${version_suffix}"
|
||||||
|
fi
|
||||||
AC_MSG_RESULT([${mkoctfile}])
|
AC_MSG_RESULT([${mkoctfile}])
|
||||||
AC_MSG_CHECKING([if ${mkoctfile} works])
|
AC_MSG_CHECKING([if ${mkoctfile} works])
|
||||||
AS_IF([test "x`${mkoctfile} --version 2>/dev/null | sed -n -e '1p' | sed -n -e '/mkoctfile, version/p'`" != x],[
|
AS_IF([test "x`${mkoctfile} --version 2>/dev/null | sed -n -e '1p' | sed -n -e '/mkoctfile, version/p'`" != x],[
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
],[
|
],[
|
||||||
AC_MSG_NOTICE([no, disabling Octave])
|
AC_MSG_RESULT([no])
|
||||||
OCTAVE=
|
OCTAVE=
|
||||||
])
|
])
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue