From 9f88061cd93fb450944ff3be41a444a4bdba8cc6 Mon Sep 17 00:00:00 2001 From: Simon Marchetto Date: Thu, 12 Jun 2014 12:31:09 +0200 Subject: [PATCH] scilab: configure checks version >= 5.3.3 and disables scilab if check fails --- configure.ac | 69 ++++++++++++++++++++++++++++------------------------ 1 file changed, 37 insertions(+), 32 deletions(-) diff --git a/configure.ac b/configure.ac index cdcf3a8bb..350c584a3 100644 --- a/configure.ac +++ b/configure.ac @@ -998,51 +998,56 @@ else fi if test -n "$SCILAB"; then - # Check for Scilab version (needs api_scilab so needs version 5.3 or higher) + # Check for Scilab version (needs api_scilab so needs version 5.3.3 or higher) SCILAB_FULL_VERSION=`$SCILAB -version | head -1 | sed -e 's|Scilab version \"\(.*\)\"|\1|g'` AC_MSG_NOTICE([Scilab version: $SCILAB_FULL_VERSION]) - AC_MSG_CHECKING(for Scilab version is 5.3 or higher) + AC_MSG_CHECKING(for Scilab version is 5.3.3 or higher) SCILAB_MAJOR_VERSION=`echo $SCILAB_FULL_VERSION | cut -d. -f1` SCILAB_MINOR_VERSION=`echo $SCILAB_FULL_VERSION | cut -d. -f2` - SCILAB_VERSION="$SCILAB_MAJOR_VERSION$SCILAB_MINOR_VERSION" + SCILAB_MAINTENANCE_VERSION=`echo $SCILAB_FULL_VERSION | cut -d. -f3` + SCILAB_VERSION="$SCILAB_MAJOR_VERSION$SCILAB_MINOR_VERSION$SCILAB_MAINTENANCE_VERSION" - if test $SCILAB_VERSION -ge 53; then + if test $SCILAB_VERSION -ge 533; then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) + AC_MSG_NOTICE([Disabling Scilab]) + SCILAB= fi - # Set Scilab startup options depending on version - AC_MSG_CHECKING(for Scilab startup options) - SCILABOPT="-nwni -nb" - if test $SCILAB_VERSION -ge 54; then - SCILABOPT+=" -noatomsautoload" - fi - AC_MSG_RESULT($SCILABOPT) - fi + if test -n "$SCILAB"; then + # Set Scilab startup options depending on version + AC_MSG_CHECKING(for Scilab startup options) + SCILABOPT="-nwni -nb" + if test $SCILAB_VERSION -ge 540; then + SCILABOPT+=" -noatomsautoload" + fi + AC_MSG_RESULT($SCILABOPT) - # Check for Scilab header files - AC_MSG_CHECKING(for Scilab header files) - if test "$SCILABINCDIR" != ""; then - dirs="$SCILABINCDIR" - else - dirs="/usr/local/include /usr/include /opt/local/include" - fi - for i in $dirs; do - if test -r $i/scilab/api_scilab.h; then - SCILABINCLUDE="$i" - break; + # Check for Scilab header files + AC_MSG_CHECKING(for Scilab header files) + if test "$SCILABINCDIR" != ""; then + dirs="$SCILABINCDIR" + else + dirs="/usr/local/include /usr/include /opt/local/include" + fi + for i in $dirs; do + if test -r $i/scilab/api_scilab.h; then + SCILABINCLUDE="$i" + break; + fi + if test -r $i/scilab/scilab/api_scilab.h; then + SCILABINCLUDE="$i/scilab" + break; + fi + done + if test "$SCILABINCLUDE" = "" ; then + AC_MSG_RESULT(not found) + else + AC_MSG_RESULT($SCILABINCLUDE) + fi fi - if test -r $i/scilab/scilab/api_scilab.h; then - SCILABINCLUDE="$i/scilab" - break; - fi - done - if test "$SCILABINCLUDE" = "" ; then - AC_MSG_RESULT(not found) - else - AC_MSG_RESULT($SCILABINCLUDE) fi fi