scilab: test several system include paths in configure

This commit is contained in:
Simon Marchetto 2014-03-31 10:40:12 +02:00
commit 341e61834f

View file

@ -926,10 +926,10 @@ AC_SUBST(OCTAVE_LDFLAGS)
AC_ARG_WITH(scilab, AS_HELP_STRING([--without-scilab], [Disable Scilab])
AS_HELP_STRING([--with-scilab=path], [Set location of Scilab executable]),[SCILABBIN="$withval"], [SCILABBIN=yes])
AC_ARG_WITH(scilab-inc, [ --with-scilab-inc=path Set location of Scilab include directory], [SCILABINCDIR="$withval"], [SCILABINCDIR="/usr/include"])
AC_ARG_WITH(scilab-inc, [ --with-scilab-inc=path Set location of Scilab include directory], [SCILABINCDIR="$withval"], [SCILABINCDIR=""])
# First, check for "--without-scilab" or "--with-scilab=no".
if test x"${SCILABBIN}" = xno -o x"${with_alllang}" = xno ; then
if test x"${SCILABBIN}" = xno -o x"${with_alllang}" = xno ; then
AC_MSG_NOTICE([Disabling Scilab])
SCILAB=
else
@ -975,21 +975,23 @@ else
AC_MSG_CHECKING(for Scilab header files)
if test "$SCILABINCDIR" != ""; then
dirs="$SCILABINCDIR"
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)
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