scilab: in configure, use pkg-config + disable scilab if headers not found

This commit is contained in:
Simon Marchetto 2014-06-26 09:48:51 +02:00
commit 7cc6a58afb

View file

@ -1028,20 +1028,21 @@ else
if test "$SCILABINCDIR" != ""; then if test "$SCILABINCDIR" != ""; then
dirs="$SCILABINCDIR" dirs="$SCILABINCDIR"
else else
dirs="/usr/local/include /usr/include /opt/local/include" dirs=`pkg-config scilab --cflags-only-I | sed -e 's/-I//g'`
fi fi
for i in $dirs; do for i in $dirs; do
if test -r $i/scilab/api_scilab.h; then if test -r $i/api_scilab.h; then
SCILABINCLUDE="$i" SCILABINCLUDE="$i"
break; break;
fi fi
if test -r $i/scilab/scilab/api_scilab.h; then if test -r $i/scilab/api_scilab.h; then
SCILABINCLUDE="$i/scilab" SCILABINCLUDE="$i/scilab"
break; break;
fi fi
done done
if test "$SCILABINCLUDE" = "" ; then if test "$SCILABINCLUDE" = "" ; then
AC_MSG_RESULT(not found) AC_MSG_RESULT(not found)
SCILAB=
else else
AC_MSG_RESULT($SCILABINCLUDE) AC_MSG_RESULT($SCILABINCLUDE)
fi fi