Merge pull request #74 from smarchetto/gsoc2012-scilab
Scilab: Fix test-suite crashes, fix configure log, and display Scilab version
This commit is contained in:
commit
4fa29e95ca
4 changed files with 48 additions and 37 deletions
|
|
@ -1577,6 +1577,7 @@ SCILAB_LIB = @SCILABLIB@
|
|||
SCILAB = @SCILAB@
|
||||
SCILABOPT =
|
||||
SCILAB_START_OPT = @SCILABSTARTOPT@
|
||||
SCILAB_VERSION = @SCILABVERSION@
|
||||
|
||||
# ----------------------------------------------------------------
|
||||
# Build a C dynamically loadable module
|
||||
|
|
@ -1636,6 +1637,13 @@ scilab_run:
|
|||
scilab_debug:
|
||||
@env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH SCILABPATH=$(srcdir):$$SCILABPATH $(SCILAB) -noatomsautoload -nb -debug -f runme.sci
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
# Version display
|
||||
# -----------------------------------------------------------------
|
||||
|
||||
scilab_version:
|
||||
echo $(SCILAB_VERSION)
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
# Cleaning the scilab examples
|
||||
# -----------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -149,6 +149,7 @@ check-versions: \
|
|||
check-uffi-version \
|
||||
check-cffi-version \
|
||||
check-r-version \
|
||||
check-scilab-version \
|
||||
check-go-version \
|
||||
check-d-version
|
||||
|
||||
|
|
@ -470,7 +471,7 @@ lib-languages = gcj typemaps tcl perl5 python guile java mzscheme ruby php ocaml
|
|||
lib-modules = std
|
||||
|
||||
|
||||
install-lib:
|
||||
install-lib:
|
||||
@echo "Installing the SWIG library"
|
||||
@$(MKINSTDIRS) $(DESTDIR)$(SWIG_LIB)
|
||||
@for file in $(srcdir)/Lib/*.i $(srcdir)/Lib/*.swg ; do \
|
||||
|
|
|
|||
|
|
@ -318,7 +318,6 @@ public:
|
|||
} else {
|
||||
Printf(wrapper->code, "%s\n", paramTypemap);
|
||||
}
|
||||
// Delete(paramTypemap); // Make SWIG crash with 'class' example
|
||||
param = Getattr(param, "tmap:in:next");
|
||||
} else {
|
||||
Swig_warning(WARN_TYPEMAP_IN_UNDEF, input_file, line_number, "Unable to use type %s as a function argument.\n", SwigType_str(paramType, 0));
|
||||
|
|
@ -361,8 +360,7 @@ public:
|
|||
minOutputArguments++;
|
||||
maxOutputArguments++;
|
||||
}
|
||||
|
||||
//Delete(functionReturnTypemap); // Makes SWIG crash on vararg test case.
|
||||
Delete(functionReturnTypemap);
|
||||
|
||||
} else {
|
||||
Swig_warning(WARN_TYPEMAP_OUT_UNDEF, input_file, line_number, "Unable to use return type %s in function %s.\n", SwigType_str(functionReturnType, 0), functionName);
|
||||
|
|
@ -392,7 +390,6 @@ public:
|
|||
if (tm && (Len(tm) != 0)) {
|
||||
Replaceall(tm, "$source", Getattr(param, "lname"));
|
||||
Printf(wrapper->code, "%s\n", tm);
|
||||
Delete(tm);
|
||||
}
|
||||
param= Getattr(param, "tmap:freearg:next");
|
||||
} else {
|
||||
|
|
|
|||
69
configure.ac
69
configure.ac
|
|
@ -995,57 +995,61 @@ AC_ARG_WITH(scilabincl,[ --with-scilabincl=path Set location of Scilab include
|
|||
if test x"${SCILABBIN}" = xno -o x"${with_alllang}" = xno ; then
|
||||
AC_MSG_NOTICE([Disabling Scilab])
|
||||
SCILAB=
|
||||
else
|
||||
# First figure out what the name of Scilab is
|
||||
|
||||
else
|
||||
|
||||
# Check Scilab executable
|
||||
AC_MSG_CHECKING(for Scilab executable)
|
||||
if test "x$SCILABBIN" = xyes; then
|
||||
AC_CHECK_PROGS(SCILAB, scilab)
|
||||
else
|
||||
SCILAB="$SCILABBIN"
|
||||
fi
|
||||
|
||||
|
||||
AC_MSG_CHECKING(for Scilab header files)
|
||||
if test -n "$SCILAB"; then
|
||||
if test "$SCILABINCDIR" != ""; then
|
||||
dirs="$SCILABINCDIR"
|
||||
SCILABEXT=""
|
||||
for i in $dirs; do
|
||||
if test -r $i/scilab/api_scilab.h; then
|
||||
SCILABEXT="$i"
|
||||
break;
|
||||
fi
|
||||
if test -r $i/scilab/scilab/api_scilab.h; then
|
||||
SCILABEXT="$i/scilab"
|
||||
break;
|
||||
fi
|
||||
done
|
||||
if test "$SCILABEXT" = "" ; then
|
||||
AC_MSG_RESULT(not found)
|
||||
else
|
||||
AC_MSG_RESULT($SCILABEXT)
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(for Scilab compiler options)
|
||||
SCILABCCFLAGS=""
|
||||
AC_MSG_RESULT($SCILABCCFLAGS)
|
||||
fi
|
||||
AC_MSG_RESULT([$SCILAB found])
|
||||
else
|
||||
AC_MSG_RESULT(could not figure out how to run scilab)
|
||||
AC_MSG_RESULT([$SCILAB not found])
|
||||
fi
|
||||
|
||||
# Set Scilab startup options depending on version
|
||||
SCILAB_VERSION=`$SCILAB -version|sed -e 's|Scilab version \"\(.*\)\"|\1|g'|head -1`
|
||||
AC_MSG_RESULT(Found Scilab version $SCILAB_VERSION)
|
||||
SCILAB_MAJOR_VERSION=`echo $SCILAB_VERSION | cut -d. -f1`
|
||||
# Check Scilab header files
|
||||
AC_MSG_CHECKING(for Scilab header files)
|
||||
if test "$SCILABINCDIR" != ""; then
|
||||
dirs="$SCILABINCDIR"
|
||||
SCILABEXT=""
|
||||
for i in $dirs; do
|
||||
if test -r $i/scilab/api_scilab.h; then
|
||||
SCILABEXT="$i"
|
||||
break;
|
||||
fi
|
||||
if test -r $i/scilab/scilab/api_scilab.h; then
|
||||
SCILABEXT="$i/scilab"
|
||||
break;
|
||||
fi
|
||||
done
|
||||
if test "$SCILABEXT" = "" ; then
|
||||
AC_MSG_RESULT(not found)
|
||||
else
|
||||
AC_MSG_RESULT($SCILABEXT)
|
||||
fi
|
||||
fi
|
||||
|
||||
# Get Scilab version
|
||||
AC_MSG_CHECKING(for Scilab version)
|
||||
SCILABVERSION=`$SCILAB -version|sed -e 's|Scilab version \"\(.*\)\"|\1|g'|head -1`
|
||||
AC_MSG_RESULT($SCILABVERSION)
|
||||
SCILAB_MAJOR_VERSION=`echo $SCILABVERSION | cut -d. -f1`
|
||||
SCILAB_MINOR_VERSION=`echo $SCILAB_VERSION | cut -d. -f2`
|
||||
|
||||
# Set Scilab startup options depending on version
|
||||
AC_MSG_CHECKING(for Scilab startup options)
|
||||
SCILABSTARTOPT="-nwni -nb"
|
||||
if test "$SCILAB_MAJOR_VERSION" -ge 5 ; then
|
||||
if test "$SCILAB_MINOR_VERSION" -ge 4 ; then
|
||||
SCILABSTARTOPT+=" -noatomsautoload"
|
||||
fi
|
||||
fi
|
||||
AC_MSG_RESULT($SCILABSTARTOPT)
|
||||
|
||||
fi
|
||||
|
||||
|
|
@ -1055,6 +1059,7 @@ AC_SUBST(SCILABDYNAMICLINKING)
|
|||
AC_SUBST(SCILABLIB)
|
||||
AC_SUBST(SCILABCCFLAGS)
|
||||
AC_SUBST(SCILABSTARTOPT)
|
||||
AC_SUBST(SCILABVERSION)
|
||||
|
||||
#----------------------------------------------------------------
|
||||
# Look for java
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue