Merge remote-tracking branch 'origin/master' into YaSp 06/12106/1
Vincent COUVERT [Tue, 23 Jul 2013 07:22:05 +0000 (09:22 +0200)]
Conflicts:
scilab/configure
scilab/modules/core/tests/nonreg_tests/bug_3296.dia.ref
scilab/modules/core/tests/nonreg_tests/bug_3296.tst
scilab/modules/data_structures/sci_gateway/c/sci_rlist.c
scilab/modules/differential_equations/sci_gateway/fortran/sci_f_bvode.f
scilab/modules/fileio/tests/unit_tests/mtell.tst
scilab/modules/output_stream/src/c/errorTable.c

Change-Id: Ib362ef74a4feb81bfa4370cfbe6bef4f4a5a8d51

16 files changed:
1  2 
scilab/Scilab.sln
scilab/configure
scilab/configure.ac
scilab/modules/cacsd/macros/ccontrg.sci
scilab/modules/data_structures/sci_gateway/c/sci_rlist.c
scilab/modules/data_structures/src/c/core_Import.def
scilab/modules/dynamic_link/Makefile.am
scilab/modules/dynamic_link/Makefile.in
scilab/modules/fileio/tests/unit_tests/mtell.tst
scilab/modules/hdf5/sci_gateway/cpp/sci_import_from_hdf5.cpp
scilab/modules/hdf5/sci_gateway/cpp/sci_listvar_in_hdf5.cpp
scilab/modules/hdf5/src/c/h5_readDataFromFile.c
scilab/modules/helptools/helptools.iss
scilab/modules/polynomials/src/fortran/dpsimp.f
scilab/modules/scicos/src/c/scicos.c
scilab/modules/scicos/src/c/scicos.vcxproj

@@@ -568,28 -500,12 +569,31 @@@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C
  EndProject
  Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nographic_objects", "modules\graphic_objects\src\nographic_objects\nographic_objects.vcxproj", "{A910BD0C-8FAF-4382-B06A-F767E4752733}"
  EndProject
 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gui_gw", "modules\gui\sci_gateway\cpp\gui_gw.vcxproj", "{83C04253-B152-4EF6-BB36-35A7B0FDFB98}"
 +EndProject
 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "graphics_gw", "modules\graphics\sci_gateway\cpp\graphics_gw.vcxproj", "{61B23D9B-3F73-4204-98F7-6F41218F4564}"
 +EndProject
  Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "external_objects", "modules\external_objects\external_objects.vcxproj", "{3142E52C-309A-41D9-BD12-7B7E9E3BDD44}"
  EndProject
 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nogui", "modules\gui\src\nogui\nogui.vcxproj", "{58A50B97-FA8D-4700-9E4A-C4993638EB7A}"
 +EndProject
 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nohistory_browser", "modules\history_browser\src\nohistory_browser\nohistory_browser.vcxproj", "{6EA99B1F-99B4-4528-8195-7508EF70CFED}"
 +EndProject
 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nolibjvm", "modules\jvm\src\nojvm\nojvm.vcxproj", "{889AD61B-12E9-4F85-8525-B83C16C88C3F}"
 +EndProject
 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "types_gw", "modules\types\sci_gateway\cpp\types_gw.vcxproj", "{C2E5F4F6-5EE7-4B36-BFAC-4AC36BB41420}"
 +EndProject
 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sparse_gw", "modules\sparse\sci_gateway\cpp\sparse_gw.vcxproj", "{7FC7AEC9-4922-4864-83F1-EAED67981AAC}"
 +      ProjectSection(ProjectDependencies) = postProject
 +              {13082624-97F9-47DB-A9A1-AD7D6BF3856A} = {13082624-97F9-47DB-A9A1-AD7D6BF3856A}
 +      EndProjectSection
 +EndProject
 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core_gw", "modules\core\sci_gateway\cpp\core_gw.vcxproj", "{3E933EB6-D427-4828-9B30-B6B9987491F6}"
 +EndProject
  Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "scicos-cli", "modules\scicos\src\c\cli\scicos-cli.vcxproj", "{A1CE241B-0FA7-488D-B737-1A1BC0F6A85E}"
+       ProjectSection(ProjectDependencies) = postProject
+               {F0F55692-0355-4BC3-BE9D-552C8AAC5238} = {F0F55692-0355-4BC3-BE9D-552C8AAC5238}
+       EndProjectSection
  EndProject
  Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "scicos_blocks-cli", "modules\scicos_blocks\src\c\cli\scicos_blocks-cli.vcxproj", "{424A5578-BA28-435F-8313-8D85886A3539}"
  EndProject
     ac_java_classpath=$saved_ac_java_classpath
  
  
+                 # JLaTeXMath FOP
+     { $as_echo "$as_me:${as_lineno-$LINENO}: checking jlatexmath-fop" >&5
+ $as_echo_n "checking jlatexmath-fop... " >&6; }
+     PACKAGE_JAR_FILE=
+     found_jar=no
+     saved_ac_java_classpath=$ac_java_classpath
+     DEFAULT_JAR_DIR="/usr/share/java /usr/lib/java /usr/share/java /usr/share/java/jar /opt/java/lib /usr/local/java /usr/local/java/jar /usr/local/share/java /usr/local/share/java/jar /usr/local/lib/java $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null)  $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null)"
+     for jardir in "`pwd`/thirdparty" "`pwd`/jar" $DEFAULT_JAR_DIR; do
+       for jar in "$jardir/jlatexmath-fop.jar" "$jardir/libjlatexmath-fop.jar" "$jardir/libjlatexmath-fop-java.jar" "$jardir/jlatexmath-fop*.jar"; do
+ # TODO check the behaviour when spaces
+         jars_resolved=`ls $jar 2>/dev/null`
+         for jar_resolved in $jars_resolved; do # If several jars matches
+           if test -e "$jar_resolved"; then
+             export ac_java_classpath="$jar_resolved:$ac_java_classpath"
+     cat << \EOF > conftest.java
 -// #line 16308 "configure"
++// #line 16707 "configure"
+ import java.util.regex.Pattern;
+ import org.scilab.forge.jlatexmath.fop.JLaTeXMathObj;
+ public class conftest {
+     public static void main(String[] argv) {
+     }
+     private static int compare(String v1, String v2) {
+         String s1 = normalisedVersion(v1);
+         String s2 = normalisedVersion(v2);
+         return s1.compareTo(s2);
+     }
+     private static String normalisedVersion(String version) {
+         return normalisedVersion(version, ".", 4);
+     }
+     private static String normalisedVersion(String version, String sep, int maxWidth) {
+         String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
+         StringBuilder sb = new StringBuilder();
+         for (String s : split) {
+             sb.append(String.format("%" + maxWidth + 's', s));
+         }
+         return sb.toString();
+     }
+ }
+ EOF
+     CLASSPATH=$ac_java_classpath
+     export CLASSPATH
+     cmd="$JAVAC ${JAVAC_FLAGS} conftest.java"
+     if (echo $cmd >&5 ; eval $cmd >conftest.java.output 2>&5) ; then
+        if test ""no"" = "no"; then
+            echo "yes" >&5
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $jar_resolved" >&5
+ $as_echo "$jar_resolved" >&6; }
+               found_jar=yes
+               PACKAGE_JAR_FILE=$jar_resolved
+               break 3
+        else
+               cmd="$JAVA conftest"
+               if (echo $cmd >&5 ; eval $cmd >conftest.java.output 2>&5); then
+                echo "yes" >&5
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $jar_resolved" >&5
+ $as_echo "$jar_resolved" >&6; }
+               found_jar=yes
+               PACKAGE_JAR_FILE=$jar_resolved
+               break 3
+             else
+                 echo "configure: failed program was:" >&5
+                 cat conftest.java >&5
+                 if test -s conftest.java.output; then
+                    STDOUT=`cat conftest.java.output`
+                 fi
+                 echo "configure: CLASSPATH was $CLASSPATH" >&5
+             ac_java_classpath=$saved_ac_java_classpath
+                             fi
+         fi
+         if test -f conftest.java.output; then
+            rm conftest.java.output
+         fi
+     else
+         echo "configure: failed program was:" >&5
+         cat conftest.java >&5
+         echo "configure: CLASSPATH was $CLASSPATH" >&5
+             ac_java_classpath=$saved_ac_java_classpath
+             fi
+           fi
+         done
+       done
+     done
+     if test "$found_jar" = "no"; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+       if test "" = "yes"; then
+          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar jlatexmath-fop used by LaTex Rendering - FOP plugin (looking for package org.scilab.forge.jlatexmath.fop.JLaTeXMathObj)" >&5
+ $as_echo "$as_me: WARNING: Could not find or use the Java package/jar jlatexmath-fop used by LaTex Rendering - FOP plugin (looking for package org.scilab.forge.jlatexmath.fop.JLaTeXMathObj)" >&2;}
+       else
+           as_fn_error $? "Could not find or use the Java package/jar jlatexmath-fop used by LaTex Rendering - FOP plugin (looking for package org.scilab.forge.jlatexmath.fop.JLaTeXMathObj)" "$LINENO" 5
+       fi
+     fi
+                 JLATEXMATH_FOP=$PACKAGE_JAR_FILE
  
  $as_echo "#define WITH_GUI /**/" >>confdefs.h
  
@@@ -16710,7 -16428,7 +16827,7 @@@ $as_echo_n "checking checkstyle... " >&
              export ac_java_classpath="$jar_resolved:$ac_java_classpath"
  
      cat << \EOF > conftest.java
- // #line 16713 "configure"
 -// #line 16431 "configure"
++// #line 16830 "configure"
  import java.util.regex.Pattern;
  
  import com.puppycrawl.tools.checkstyle.CheckStyleTask;
@@@ -16827,7 -16545,7 +16944,7 @@@ $as_echo_n "checking commons-beanutils.
              export ac_java_classpath="$jar_resolved:$ac_java_classpath"
  
      cat << \EOF > conftest.java
- // #line 16830 "configure"
 -// #line 16548 "configure"
++// #line 16947 "configure"
  import java.util.regex.Pattern;
  
  import org.apache.commons.beanutils.Converter;
@@@ -16944,7 -16662,7 +17061,7 @@@ $as_echo_n "checking antlr... " >&6; 
              export ac_java_classpath="$jar_resolved:$ac_java_classpath"
  
      cat << \EOF > conftest.java
- // #line 16947 "configure"
 -// #line 16665 "configure"
++// #line 17064 "configure"
  import java.util.regex.Pattern;
  
  import antlr.TokenStreamException;
@@@ -17061,7 -16779,7 +17178,7 @@@ $as_echo_n "checking junit4... " >&6; 
              export ac_java_classpath="$jar_resolved:$ac_java_classpath"
  
      cat << \EOF > conftest.java
- // #line 17064 "configure"
 -// #line 16782 "configure"
++// #line 17181 "configure"
  import java.util.regex.Pattern;
  
  import org.junit.Assert;
@@@ -17178,7 -16896,7 +17295,7 @@@ $as_echo_n "checking cobertura... " >&6
              export ac_java_classpath="$jar_resolved:$ac_java_classpath"
  
      cat << \EOF > conftest.java
- // #line 17181 "configure"
 -// #line 16899 "configure"
++// #line 17298 "configure"
  import java.util.regex.Pattern;
  
  import net.sourceforge.cobertura.merge.Main;
@@@ -17295,7 -17013,7 +17412,7 @@@ $as_echo_n "checking asm3... " >&6; 
              export ac_java_classpath="$jar_resolved:$ac_java_classpath"
  
      cat << \EOF > conftest.java
- // #line 17298 "configure"
 -// #line 17016 "configure"
++// #line 17415 "configure"
  import java.util.regex.Pattern;
  
  import org.objectweb.asm.Type;
@@@ -17411,7 -17129,7 +17528,7 @@@ $as_echo_n "checking asm... " >&6; 
              export ac_java_classpath="$jar_resolved:$ac_java_classpath"
  
      cat << \EOF > conftest.java
- // #line 17414 "configure"
 -// #line 17132 "configure"
++// #line 17531 "configure"
  import java.util.regex.Pattern;
  
  import org.objectweb.asm.Type;
  
  
  #################
 +## EIGEN
 +#################
 +
 +
 +ac_ext=cpp
 +ac_cpp='$CXXCPP $CPPFLAGS'
 +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
 +$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
 +if test -z "$CXXCPP"; then
 +  if ${ac_cv_prog_CXXCPP+:} false; then :
 +  $as_echo_n "(cached) " >&6
 +else
 +      # Double quotes because CXXCPP needs to be expanded
 +    for CXXCPP in "$CXX -E" "/lib/cpp"
 +    do
 +      ac_preproc_ok=false
 +for ac_cxx_preproc_warn_flag in '' yes
 +do
 +  # Use a header file that comes with gcc, so configuring glibc
 +  # with a fresh cross-compiler works.
 +  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 +  # <limits.h> exists even on freestanding compilers.
 +  # On the NeXT, cc -E runs the code through the compiler's parser,
 +  # not just through cpp. "Syntax error" is here to catch this case.
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
 +#ifdef __STDC__
 +# include <limits.h>
 +#else
 +# include <assert.h>
 +#endif
 +                   Syntax error
 +_ACEOF
 +if ac_fn_cxx_try_cpp "$LINENO"; then :
 +
 +else
 +  # Broken: fails on valid input.
 +continue
 +fi
 +rm -f conftest.err conftest.i conftest.$ac_ext
 +
 +  # OK, works on sane cases.  Now check whether nonexistent headers
 +  # can be detected and how.
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
 +#include <ac_nonexistent.h>
 +_ACEOF
 +if ac_fn_cxx_try_cpp "$LINENO"; then :
 +  # Broken: success on invalid input.
 +continue
 +else
 +  # Passes both tests.
 +ac_preproc_ok=:
 +break
 +fi
 +rm -f conftest.err conftest.i conftest.$ac_ext
 +
 +done
 +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
 +rm -f conftest.i conftest.err conftest.$ac_ext
 +if $ac_preproc_ok; then :
 +  break
 +fi
 +
 +    done
 +    ac_cv_prog_CXXCPP=$CXXCPP
 +
 +fi
 +  CXXCPP=$ac_cv_prog_CXXCPP
 +else
 +  ac_cv_prog_CXXCPP=$CXXCPP
 +fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
 +$as_echo "$CXXCPP" >&6; }
 +ac_preproc_ok=false
 +for ac_cxx_preproc_warn_flag in '' yes
 +do
 +  # Use a header file that comes with gcc, so configuring glibc
 +  # with a fresh cross-compiler works.
 +  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 +  # <limits.h> exists even on freestanding compilers.
 +  # On the NeXT, cc -E runs the code through the compiler's parser,
 +  # not just through cpp. "Syntax error" is here to catch this case.
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
 +#ifdef __STDC__
 +# include <limits.h>
 +#else
 +# include <assert.h>
 +#endif
 +                   Syntax error
 +_ACEOF
 +if ac_fn_cxx_try_cpp "$LINENO"; then :
 +
 +else
 +  # Broken: fails on valid input.
 +continue
 +fi
 +rm -f conftest.err conftest.i conftest.$ac_ext
 +
 +  # OK, works on sane cases.  Now check whether nonexistent headers
 +  # can be detected and how.
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
 +#include <ac_nonexistent.h>
 +_ACEOF
 +if ac_fn_cxx_try_cpp "$LINENO"; then :
 +  # Broken: success on invalid input.
 +continue
 +else
 +  # Passes both tests.
 +ac_preproc_ok=:
 +break
 +fi
 +rm -f conftest.err conftest.i conftest.$ac_ext
 +
 +done
 +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
 +rm -f conftest.i conftest.err conftest.$ac_ext
 +if $ac_preproc_ok; then :
 +
 +else
 +  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 +as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
 +See \`config.log' for more details" "$LINENO" 5; }
 +fi
 +
 +ac_ext=cpp
 +ac_cpp='$CXXCPP $CPPFLAGS'
 +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 +
 +
 +
 +ac_ext=cpp
 +ac_cpp='$CXXCPP $CPPFLAGS'
 +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 +
 +
 +
 +# Check whether --with-eigen_include was given.
 +if test "${with_eigen_include+set}" = set; then :
 +  withval=$with_eigen_include; with_eigen_include=$withval
 +else
 +  with_eigen_include='yes'
 +
 +fi
 +
 +
 +
 +save_CPPFLAGS="$CPPFLAGS"
 +
 +if test "x$with_eigen_include" != "xyes"; then
 +      CPPFLAGS="-I$with_eigen_include"
 +      ac_fn_cxx_check_header_mongrel "$LINENO" "Eigen/Sparse" "ac_cv_header_Eigen_Sparse" "$ac_includes_default"
 +if test "x$ac_cv_header_Eigen_Sparse" = xyes; then :
 +  EIGEN_CPPFLAGS="$CPPFLAGS"
 +else
 +  as_fn_error $? "Cannot find headers (Eigen/Sparse) of the library EIGEN in $with_eigen_include. Please install the dev package (Debian : libeigen3-dev)" "$LINENO" 5
 +
 +fi
 +
 +
 +    PATH_TO_EIGEN=$with_eigen_include
 +else
 +      ac_fn_cxx_check_header_mongrel "$LINENO" "Eigen/Sparse" "ac_cv_header_Eigen_Sparse" "$ac_includes_default"
 +if test "x$ac_cv_header_Eigen_Sparse" = xyes; then :
 +  EIGEN_CPPFLAGS=""
 +else
 +         $as_unset ac_cv_header_Eigen_Sparse
 +                CPPFLAGS="-I/usr/include/eigen3/"
 +                ac_fn_cxx_check_header_mongrel "$LINENO" "Eigen/Sparse" "ac_cv_header_Eigen_Sparse" "$ac_includes_default"
 +if test "x$ac_cv_header_Eigen_Sparse" = xyes; then :
 +  EIGEN_CPPFLAGS=$CPPFLAGS
 +else
 +  as_fn_error $? "Cannot find headers (Eigen/Sparse) of the library eigen. Please install the dev package (Debian : libeigen3-dev)" "$LINENO" 5
 +
 +fi
 +
 +
 +
 +fi
 +
 +
 +    PATH_TO_EIGEN="/usr/include/eigen3/"
 +fi
 +CPPFLAGS="$save_CPPFLAGS"
 +
 +CHK_EIGEN_WORLD=3
 +CHK_EIGEN_MAJOR=1
 +CHK_EIGEN_MINOR=0
 +
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if Eigen is version $CHK_EIGEN_WORLD.$CHK_EIGEN_MAJOR.$CHK_EIGEN_MINOR or later" >&5
 +$as_echo_n "checking if Eigen is version $CHK_EIGEN_WORLD.$CHK_EIGEN_MAJOR.$CHK_EIGEN_MINOR or later... " >&6; }
 +cat > conftest.$ac_ext <<EOF
- #line 21528 "configure"
++#line 21645 "configure"
 +#include "confdefs.h"
 +
 +#include "$PATH_TO_EIGEN/Eigen/Sparse"
 +#if EIGEN_VERSION_AT_LEAST(3,1,0)
 +EIGEN_VERSION_OK
 +#endif
 +
 +EOF
 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 +  grep "EIGEN_VERSION_OK" >/dev/null 2>&1; then
 +  rm -rf conftest*
 +  \
 +EIGEN_VERSION_OK=1
 +else
 +  rm -rf conftest*
 +  \
 +EIGEN_VERSION_OK=0
 +fi
 +rm -f conftest*
 +
 +if test $EIGEN_VERSION_OK = 0; then
 +   as_fn_error $? "Version $CHK_EIGEN_WORLD.$CHK_EIGEN_MAJOR.$CHK_EIGEN_MINOR of Eigen expected (at least)" "$LINENO" 5
 +else
 +   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 +$as_echo "yes" >&6; }
 +fi
 +
 +
 +
 +$as_echo "#define WITH_EIGEN /**/" >>confdefs.h
 +
 +ac_ext=c
 +ac_cpp='$CPP $CPPFLAGS'
 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
 +
 +
 +
 +
 +#################
  ## MPI
  #################
  
@@@ -25882,7 -25357,7 +25999,7 @@@ CPPFLAGS="$CPPFLAGS -I$CHK_TCL_INCLUDE_
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if tcl is version $CHK_TCL_MAJOR.$CHK_TCL_MINOR or later" >&5
  $as_echo_n "checking if tcl is version $CHK_TCL_MAJOR.$CHK_TCL_MINOR or later... " >&6; }
  cat > conftest.$ac_ext <<EOF
- #line 25885 "configure"
 -#line 25360 "configure"
++#line 26002 "configure"
  #include "confdefs.h"
  
  #include "$CHK_TCL_INCLUDE_PATH/$CHK_TCL_INC_NAME"
@@@ -26193,7 -25668,7 +26310,7 @@@ CPPFLAGS="$CPPFLAGS $TCL_INC_PATH -I$CH
  $as_echo_n "checking if tk is version $CHK_TK_MAJOR.$CHK_TK_MINOR or later... " >&6; }
  
  cat > conftest.$ac_ext <<EOF
- #line 26196 "configure"
 -#line 25671 "configure"
++#line 26313 "configure"
  #include "confdefs.h"
  
  #include "$CHK_TK_INCLUDE_PATH/$CHK_TK_INC_NAME"
@@@ -26775,10 -26252,10 +26894,10 @@@ $as_echo_n "checking saxon9he... " >&6
              export ac_java_classpath="$jar_resolved:$ac_java_classpath"
  
      cat << \EOF > conftest.java
- // #line 26778 "configure"
 -// #line 26255 "configure"
++// #line 26897 "configure"
  import java.util.regex.Pattern;
  
- import com.icl.saxon.Loader;
+ import net.sf.saxon.Version;
  
  public class conftest {
      public static void main(String[] argv) {
@@@ -26872,12 -26349,126 +26991,126 @@@ $as_echo "$as_me: WARNING: Could not fi
      fi
  
        SAXON=$PACKAGE_JAR_FILE
+       if test -z "$SAXON"; then
  
+     { $as_echo "$as_me:${as_lineno-$LINENO}: checking saxon" >&5
+ $as_echo_n "checking saxon... " >&6; }
+     PACKAGE_JAR_FILE=
+     found_jar=no
+     saved_ac_java_classpath=$ac_java_classpath
+     DEFAULT_JAR_DIR="/usr/share/java /usr/lib/java /usr/share/java /usr/share/java/jar /opt/java/lib /usr/local/java /usr/local/java/jar /usr/local/share/java /usr/local/share/java/jar /usr/local/lib/java $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null)  $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null)"
+     for jardir in "`pwd`/thirdparty" "`pwd`/jar" $DEFAULT_JAR_DIR; do
+       for jar in "$jardir/saxon.jar" "$jardir/libsaxon.jar" "$jardir/libsaxon-java.jar" "$jardir/saxon*.jar"; do
  
-     # JLaTeXMath FOP
+ # TODO check the behaviour when spaces
+         jars_resolved=`ls $jar 2>/dev/null`
+         for jar_resolved in $jars_resolved; do # If several jars matches
+           if test -e "$jar_resolved"; then
+             export ac_java_classpath="$jar_resolved:$ac_java_classpath"
  
-     { $as_echo "$as_me:${as_lineno-$LINENO}: checking jlatexmath-fop" >&5
- $as_echo_n "checking jlatexmath-fop... " >&6; }
+     cat << \EOF > conftest.java
 -// #line 26370 "configure"
++// #line 27012 "configure"
+ import java.util.regex.Pattern;
+ import net.sf.saxon.Version;
+ public class conftest {
+     public static void main(String[] argv) {
+     }
+     private static int compare(String v1, String v2) {
+         String s1 = normalisedVersion(v1);
+         String s2 = normalisedVersion(v2);
+         return s1.compareTo(s2);
+     }
+     private static String normalisedVersion(String version) {
+         return normalisedVersion(version, ".", 4);
+     }
+     private static String normalisedVersion(String version, String sep, int maxWidth) {
+         String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
+         StringBuilder sb = new StringBuilder();
+         for (String s : split) {
+             sb.append(String.format("%" + maxWidth + 's', s));
+         }
+         return sb.toString();
+     }
+ }
+ EOF
+     CLASSPATH=$ac_java_classpath
+     export CLASSPATH
+     cmd="$JAVAC ${JAVAC_FLAGS} conftest.java"
+     if (echo $cmd >&5 ; eval $cmd >conftest.java.output 2>&5) ; then
+        if test ""no"" = "no"; then
+            echo "yes" >&5
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $jar_resolved" >&5
+ $as_echo "$jar_resolved" >&6; }
+               found_jar=yes
+               PACKAGE_JAR_FILE=$jar_resolved
+               break 3
+        else
+               cmd="$JAVA conftest"
+               if (echo $cmd >&5 ; eval $cmd >conftest.java.output 2>&5); then
+                echo "yes" >&5
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $jar_resolved" >&5
+ $as_echo "$jar_resolved" >&6; }
+               found_jar=yes
+               PACKAGE_JAR_FILE=$jar_resolved
+               break 3
+             else
+                 echo "configure: failed program was:" >&5
+                 cat conftest.java >&5
+                 if test -s conftest.java.output; then
+                    STDOUT=`cat conftest.java.output`
+                 fi
+                 echo "configure: CLASSPATH was $CLASSPATH" >&5
+             ac_java_classpath=$saved_ac_java_classpath
+                             fi
+         fi
+         if test -f conftest.java.output; then
+            rm conftest.java.output
+         fi
+     else
+         echo "configure: failed program was:" >&5
+         cat conftest.java >&5
+         echo "configure: CLASSPATH was $CLASSPATH" >&5
+             ac_java_classpath=$saved_ac_java_classpath
+             fi
+           fi
+         done
+       done
+     done
+     if test "$found_jar" = "no"; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+       if test ""yes"" = "yes"; then
+          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar saxon used by Saxon XSLT Processor (looking for package net.sf.saxon.Version)" >&5
+ $as_echo "$as_me: WARNING: Could not find or use the Java package/jar saxon used by Saxon XSLT Processor (looking for package net.sf.saxon.Version)" >&2;}
+       else
+           as_fn_error $? "Could not find or use the Java package/jar saxon used by Saxon XSLT Processor (looking for package net.sf.saxon.Version)" "$LINENO" 5
+       fi
+     fi
+               SAXON=$PACKAGE_JAR_FILE
+       fi
+       if test -z "$SAXON"; then
+     { $as_echo "$as_me:${as_lineno-$LINENO}: checking saxon" >&5
+ $as_echo_n "checking saxon... " >&6; }
      PACKAGE_JAR_FILE=
      found_jar=no
      saved_ac_java_classpath=$ac_java_classpath
              export ac_java_classpath="$jar_resolved:$ac_java_classpath"
  
      cat << \EOF > conftest.java
- // #line 26895 "configure"
 -// #line 26486 "configure"
++// #line 27128 "configure"
  import java.util.regex.Pattern;
  
- import org.scilab.forge.jlatexmath.fop.JLaTeXMathObj;
+ import com.icl.saxon.Loader;
  
  public class conftest {
      public static void main(String[] argv) {
    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
    lt_status=$lt_dlunknown
    cat > conftest.$ac_ext <<_LT_EOF
- #line 33323 "configure"
 -#line 32913 "configure"
++#line 33555 "configure"
  #include "confdefs.h"
  
  #if HAVE_DLFCN_H
    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
    lt_status=$lt_dlunknown
    cat > conftest.$ac_ext <<_LT_EOF
- #line 33429 "configure"
 -#line 33019 "configure"
++#line 33661 "configure"
  #include "confdefs.h"
  
  #if HAVE_DLFCN_H
Simple merge
  extern int C2F(rattyp)(); /* fortran */
  extern int C2F(mtlist)(); /* fortran */
  /*--------------------------------------------------------------------------*/
 -int sci_rlist(char *fname, unsigned long fname_len)
 +int sci_rlist(char *fname, void* pvApiCtx)
  {
-     if (nbInputArgument(pvApiCtx) == 2)
-     {
-         callOverloadFunction(pvApiCtx, 0, fname, (unsigned int)strlen(fname));
-         return 0;
-     }
-     else
-     {
-         C2F(mtlist)(C2F(rattyp));
-         return 0;
-     }
+     C2F(mtlist)(C2F(rattyp));
+     return 0;
  }
  /*--------------------------------------------------------------------------*/
@@@ -9,8 -9,16 +9,7 @@@ iop
  callFunctionFromGateway
  stack_
  vstk_
 -createcvar_
 -putlhsvar_
  intersci_
 -createvar_
  com_
 -getrhsvar_
 -gettype_
 -createlistcvarfrom_
 -createlistvarfrom_
 -createlistvarfromptr_
 -creimati_
  MyHeapAlloc
  MyHeapFree
- overload_
@@@ -24,15 -25,28 +25,27 @@@ en
  mclose(fd);
  
  try
 -  mtell(fd);
 +    mtell(fd);
  catch
 -  [message, ierr]=lasterror();
 -  if ierr <> 10000 then pause,end
 +    errorMessage = sprintf(gettext("%s: Error while opening, reading or writing.\n"), "mtell");
 +    [message, ierr]=lasterror();
 +    if message <> errorMessage then bugmes();quit;end
  end
  
 -
 -
  fd = mopen(testFile,'wb');
+ // file should be empty
+ if mtell(fd) <> 0 then pause, end
+ for j=1:100
+   for i=1:j
+     mput(i,'us');
+   end
+   // 'us' is 2 bytes
+   if mtell(fd) <> 2 * j then pause, end
+   mseek(0);
+ end
+ mclose(fd);
  
+ fd = mopen(testFile,'wb');
  // file should be empty
  if mtell(fd) <> 0 then pause, end
  for j=1:100
Simple merge