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,7 +926,7 @@ AC_SUBST(OCTAVE_LDFLAGS)
AC_ARG_WITH(scilab, AS_HELP_STRING([--without-scilab], [Disable Scilab]) 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]) 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". # 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
@ -975,6 +975,9 @@ else
AC_MSG_CHECKING(for Scilab header files) AC_MSG_CHECKING(for Scilab header files)
if test "$SCILABINCDIR" != ""; then if test "$SCILABINCDIR" != ""; then
dirs="$SCILABINCDIR" dirs="$SCILABINCDIR"
else
dirs="/usr/local/include /usr/include /opt/local/include"
fi
for i in $dirs; do for i in $dirs; do
if test -r $i/scilab/api_scilab.h; then if test -r $i/scilab/api_scilab.h; then
SCILABINCLUDE="$i" SCILABINCLUDE="$i"
@ -990,7 +993,6 @@ else
else else
AC_MSG_RESULT($SCILABINCLUDE) AC_MSG_RESULT($SCILABINCLUDE)
fi fi
fi
fi fi
AC_SUBST(SCILAB) AC_SUBST(SCILAB)