2 # Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 # Copyright (C) INRIA - 2006-2008 - Sylvestre Ledru
4 # Copyright (C) DIGITEO - 2009-2011 - Sylvestre Ledru
5 # Copyright (C) DIGITEO - 2009 - Pierre MARECHAL <pierre.marechal@scilab.org>
6 # Copyright (C) Scilab Enterprises - 2014 - Clement DAVID <clement.david@scilab-enterprises.com>
8 # This file must be used under the terms of the CeCILL.
9 # This source file is licensed as described in the file COPYING, which
10 # you should have received as part of this distribution. The terms
11 # are also available at
12 # http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
15 dnl Process this file with autoconf to produce a configure script.
18 AC_REVISION($Revision$)dnl
19 AC_INIT([Scilab],[6],[http://bugzilla.scilab.org/])
21 AC_CONFIG_MACRO_DIR([m4])
25 SCI_SRCDIR_FULL="`cd $SCI_SRCDIR && pwd`"
27 if test -d "$SCI_SRCDIR_FULL/usr"; then
29 DEVTOOLS_BINDIR="$SCI_SRCDIR_FULL/usr/bin"
30 DEVTOOLS_INCDIR="$SCI_SRCDIR_FULL/usr/include"
31 DEVTOOLS_LIBDIR="$SCI_SRCDIR_FULL/usr/lib"
39 SCILAB_VERSION_MAJOR=6
40 SCILAB_VERSION_MINOR=0
41 SCILAB_VERSION_MAINTENANCE=0
42 AC_SUBST(SCILAB_VERSION_MAJOR)
43 AC_SUBST(SCILAB_VERSION_MINOR)
44 AC_SUBST(SCILAB_VERSION_MAINTENANCE)
47 SCILAB_LIBRARY_VERSION=$SCILAB_VERSION_MAJOR:$SCILAB_VERSION_MINOR:$SCILAB_VERSION_MAINTENANCE
48 AC_SUBST(SCILAB_LIBRARY_VERSION)
50 SCILAB_BINARY_VERSION=$SCILAB_VERSION_MAJOR.$SCILAB_VERSION_MINOR.$SCILAB_VERSION_MAINTENANCE
51 AC_SUBST(SCILAB_BINARY_VERSION)
53 #shared library versioning
54 #GENERIC_LIBRARY_VERSION=1:2:0
58 # current:revision:age
60 # | | +- increment if interfaces have been added
61 # | | set to zero if interfaces have been removed
63 # | +- increment if source code has changed
64 # | set to zero if current is incremented
65 # +- increment if interfaces have been added, removed or changed
67 # Check if we have a space in the path to the source tree
68 SPACE_IN_PATH=`echo "$SCI_SRCDIR_FULL"|grep " " > /dev/null; echo $?`
69 if test "$SPACE_IN_PATH" = "0"; then
70 AC_MSG_WARN([=====================================])
71 AC_MSG_WARN([Configure thinks that there is a space in the path to the source. This may cause problem with libtool and some other things...])
72 AC_MSG_WARN([=====================================])
76 AC_CONFIG_AUX_DIR(config)
77 AC_CONFIG_HEADERS([modules/core/includes/machine.h])
84 # In order to be able to change the scilab directory
85 # See http://wiki.debian.org/RpathIssue
87 AC_RELOCATABLE_LIBRARY
90 # If configure detect that timestamp changed,
91 # it tries to rebuild configure & makefile which can be a painmaker
92 # if the version is different
95 AM_INIT_AUTOMAKE([-Wall foreign serial-tests subdir-objects]) # Not using -Werror because we override {C,F}FLAGS in order to disable optimisation
99 #################################
100 ## all the --with-* argument help
101 #################################
105 AS_HELP_STRING([--enable-debug],[Do not optimize and print warning messages (C/C++/Fortran/Java code)]))
107 AC_ARG_ENABLE(debug-C,
108 AS_HELP_STRING([--enable-debug-C],[Do not optimize and print warning messages (C code)]))
110 AC_ARG_ENABLE(debug-CXX,
111 AS_HELP_STRING([--enable-debug-CXX],[Do not optimize and print warning messages (C++ code)]))
113 AC_ARG_ENABLE(debug-java,
114 AS_HELP_STRING([--enable-debug-java],[Print warning messages and line numbers (Java code)]))
116 AC_ARG_ENABLE(debug-fortran,
117 AS_HELP_STRING([--enable-debug-fortran],[Do not optimize and print warning messages (Fortran code)]))
119 AC_ARG_ENABLE(debug-linker,
120 AS_HELP_STRING([--enable-debug-linker],[Print warning messages from the linker (ld)]))
122 AC_ARG_ENABLE(code-coverage,
123 AS_HELP_STRING([--enable-code-coverage],[Enable code coverage]))
125 AC_ARG_ENABLE(stop-on-warning,
126 AS_HELP_STRING([--enable-stop-on-warning],[Stop the compilation on the first warning found in the C/C++ code]))
129 AS_HELP_STRING([--with-gcc],[Use gcc C compiler ]))
131 AC_ARG_WITH(gfortran,
132 AS_HELP_STRING([--with-gfortran],[Use gfortran, GNU Fortran 95 compiler]))
134 AC_ARG_WITH(intelcompilers,
135 AS_HELP_STRING([--with-intelcompilers],[Use Intel C (icc) and Fortran (ifort) proprietary compilers (GNU/Linux only) ]))
138 AS_HELP_STRING([--without-tk],[Disable the interface to Tcl/Tk ]))
141 AS_HELP_STRING([--without-javasci],[Disable the Java/Scilab interface (javasci)]))
143 AC_ARG_ENABLE(compilation-tests,
144 AS_HELP_STRING([--enable-compilation-tests],[Enable unitary tests and checks at compilation time]))
147 AS_HELP_STRING([--without-gui],[Disable the Scilab Graphical User Interface (GUI). Intended for embedded/clustering/grid Scilab ]))
149 AC_ARG_ENABLE(build-swig,
150 AS_HELP_STRING([--enable-build-swig=path],[Regenerate Java => C and Scilab => C wrappers produces by Swig]))
153 AC_ARG_ENABLE(build-giws,
154 AS_HELP_STRING([--enable-build-giws],[Regenerate C/C++ => Java wrappers produces by Giws]))
156 AC_ARG_ENABLE(build-parser,
157 AS_HELP_STRING([--enable-build-parser],[Regenerate code for the parser (Lex & YACC)]))
160 ################################################
161 ########## compilator & misc programs detection
162 ################################################
168 #### Mac OS X set of fink path with provided
171 AC_ARG_WITH(fink_prefix,
172 AS_HELP_STRING([--with-fink-prefix],[Provide a fink prefix. Default: /sw/ ]))
173 # Need MacosX Version to specify some path.
176 AC_GET_MACOSX_VERSION
182 if test -n "$with_fink_prefix"; then
183 # If with-fink-prefix is provided, use the provided path to make sure that we will
184 # use it to detect dependencies (for example, gfortran is not provided in xcode.
185 # Therefor, we use the one in fink)
186 FINK_PREFIX="$with_fink_prefix/"
188 # Exec the init script of fink to make sure that the env is set
189 if test -f $with_fink_prefix/bin/init.sh; then
190 echo "source $with_fink_prefix/bin/init.sh executed to set the env"
191 source $with_fink_prefix/bin/init.sh
193 AC_MSG_WARN([Could not find the fink init.sh script: $with_fink_prefix/bin/init.sh])
199 #Append to the default flags on Apple machines
200 CPPFLAGS="$CPPFLAGS -I$FINK_PREFIX/include/"
201 LDFLAGS="$LDFLAGS -L$FINK_PREFIX/lib/"
205 AC_ARG_WITH(min_macosx_version,
206 AS_HELP_STRING([--with-min-macosx-version],[Force compilers to generate binaries compatible with MacOSX minimal version.]))
209 if test -n "$with_min_macosx_version"; then
210 MIN_MACOSX_VERSION=$with_min_macosx_version
211 #Append to the default flags on Apple machines
212 ARCH_CFLAGS="-mmacosx-version-min=$MIN_MACOSX_VERSION"
213 ARCH_CXXFLAGS="-mmacosx-version-min=$MIN_MACOSX_VERSION"
214 ARCH_FFLAGS="-mmacosx-version-min=$MIN_MACOSX_VERSION"
215 ARCH_LDFLAGS="-mmacosx-version-min=$MIN_MACOSX_VERSION"
216 # We need this to be passed to all linker commands
217 LDFLAGS="$LDFLAGS -mmacosx-version-min=$MIN_MACOSX_VERSION"
223 #####################################################
224 ## Look for pkg-config
225 #####################################################
228 #####################################################
229 ## check if options are correct (or not)
230 #####################################################
232 if test "$with_intelcompilers" = yes -a "$with_gcc" = yes; then
233 AC_MSG_ERROR([Conflicting options : you specified two compiler series])
236 ######## fortran ########
238 if test "$with_gfortran" = yes; then
239 AC_PROG_F77(gfortran)
240 if test -z "$F77"; then
241 AC_MSG_ERROR([You asked me to use gfortran but i haven't been able to find it])
245 if test "$with_intelcompilers" = yes; then
246 AC_PROG_F77(ifc ifort)
247 if test -z "$F77"; then
248 AC_MSG_ERROR([You asked me to use ifc (intel fortran compiler) but i haven't been able to find it])
252 if test -z "$F77"; then
253 ## No Fortran compiler specified... Prefer gfortran and intel compilers
254 AC_PROG_F77([gfortran ifc ifort])
255 if test -z "$F77"; then
256 # Best effort to find a compiler (might be g77)
262 # case statements were introduced in fortran 90 so we can use that
263 # as a test to see if our compiler is fortran 90 compatible.
265 if test -z "$F77"; then
266 AC_MSG_ERROR([No fortran compiler found. Cannot compile scilab without a fortran compiler])
269 AC_MSG_CHECKING([if $F77 is a fortran 90 compatible compiler])
271 AC_LANG_PUSH([Fortran 77])
277 print*, "case is 1, i is ", i
279 print*, "case is 2 to 3, i is ", i
281 print*, "default case, i is ", i
286 [AC_MSG_RESULT([yes])
287 AC_DEFINE([G95_FORTRAN],[],[uses G95 fortran])
290 [AC_MSG_RESULT([no])]
292 AC_LANG_POP([Fortran 77])
294 ############ C ###############
297 if test "$with_gcc" = yes; then
299 if test -z "$CC"; then
300 AC_MSG_ERROR([You asked me to use gcc but i haven't been able to find it])
304 if test "$with_intelcompilers" = yes; then
306 if test -z "$CC"; then
307 AC_MSG_ERROR([You asked me to use icc (intel C compiler) but I haven't been able to find it])
311 if test -z "$CC"; then
312 # No C compiler specified... We rely on Autoconf to find the best
316 if test -z "$CC"; then
317 AC_MSG_ERROR([No C Compiler found. Cannot compile Scilab without a C compiler])
320 AC_CHECK_SIZEOF([int])
321 AC_CHECK_SIZEOF([long])
325 # we can't just do something like
326 # AC_CHECK_PROG(cxx_present, $CXX, "yes", "no")
327 # because if the user has specified the full path of the desired C++ compiler then AC_CHECK_PROG
328 # will fail. If AC_PROG_CXX fails to find a c++ compiler it will set CXX=g++ so just run AC_CHECK_PROG
329 # in this special case
332 AC_CHECK_PROG([cxx_present], [$CXX], [yes], [no])
333 if test "x$cxx_present" != "xyes"; then
334 AC_MSG_ERROR([No C++ compiler found. Cannot compile scilab without a C++ compiler])
339 # for "subdir-objects"
345 if test "$enable_debug" = yes; then
346 enable_debug_fortran=yes
349 enable_debug_java=yes
354 if test "$enable_debug_fortran" = yes; then
355 FFLAGS="`echo "$FFLAGS"| sed -e 's|-O[0-9+]|-O0|'`"
357 enable_debug_fortran=no
360 if test "$enable_debug_C" = yes; then
361 CFLAGS="`echo "$CFLAGS"| sed -e 's|-O[0-9+]|-O0|'`"
366 if test "$enable_debug_CXX" = yes; then
367 CXXFLAGS="`echo "$CXXFLAGS"| sed -e 's|-O[0-9+]|-O0|'`"
372 if test "$enable_debug_java" = yes; then
375 LOGGING_LEVEL="SEVERE"
377 AC_SUBST(LOGGING_LEVEL)
379 if test "x${prefix}" = "xNONE"; then
380 prefix="${ac_default_prefix}"
383 ###############################
385 ###############################
387 SCIVERSION=`cat $SCI_SRCDIR/Version.incl | sed -e "s/SCIVERSION=//" `
389 #############################################
390 ## Compilers and options according to machine
391 #############################################
393 ######################
394 ######## Set compilation options for intel C/Fortran compilers
395 ######################
397 if test "$with_intelcompilers" = yes; then
401 ########### FORTRAN ######################
404 ######################
405 ######## With gfortran ...
406 ######################
407 if test -n "$F77"; then
410 ## With GNU Compiler enable the code coverage
411 if test "$enable_code_coverage" = yes; then
412 CODECOVERAGE_FFLAGS="-fprofile-arcs -ftest-coverage"
416 AC_MSG_ERROR([g77 is no longer supported. Please consider switching to gfortran])
420 if test "$enable_debug_fortran" = yes; then
421 AC_LANG_PUSH([Fortran 77])
422 for flag in -g -Wall -Wsurprising; do
423 case " ${FFLAGS} " in
425 # flag is already present
429 AC_MSG_CHECKING([if the Fortran compiler accepts ${flag}])
430 ac_save_FFLAGS="$FFLAGS"
431 FFLAGS="$FFLAGS ${flag}"
432 AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
433 [AC_MSG_RESULT([yes])
434 DEBUG_FFLAGS="${flag}"
436 [AC_MSG_RESULT([no])]
441 AC_LANG_POP([Fortran 77])
443 DEBUG_FFLAGS="-DNDEBUG"
447 ARCH_FFLAGS="-m64 -fPIC"
454 ARCH_FFLAGS="-fpe3 -switch nosqrt_recip"
457 ARCH_FFLAGS="-qcharlen=4096"
460 ARCH_FFLAGS="-O0 -fpe1"
463 ARCH_FFLAGS="+Obb1200 +E4 -Dhpux"
466 if test "$enable_debug_fortran" = yes; then
467 ARCH_FFLAGS="+E4 +Z +DAportable -Dhpux"
469 ARCH_FFLAGS="+O2 +E4 +Z +DAportable -Dhpux"
471 # ARCH_LDFLAGS="-Wl,+vnocompatwarnings,-E /usr/lib/libdld.sl"
475 if test "$enable_debug_fortran" = yes; then
476 ARCH_FFLAGS=" +Z +DAportable -Dhpux"
478 ARCH_FFLAGS="+O2 +Z +DAportable -Dhpux"
480 ARCH_LDFLAGS="-ldld -lnsl -lU77 -lm"
487 #########################
488 # setting parameters according to system types
489 #########################
492 *-*-hpux9.*|*-*-hpux10.*|*-*-hpux11.*)
509 AM_CONDITIONAL(IS_MACOSX, test -n "$MACOSX")
510 AM_CONDITIONAL(IS_HPUX, test -n "$HPUX")
511 AM_CONDITIONAL(IS_SPARC, test -n "$SPARC")
512 AM_CONDITIONAL(IS_SOLARIS, test -n "$SOLARIS")
513 AM_CONDITIONAL(IS_MIPS_SGI_IRIX, test -n "$MIPS_SGI_IRIX")
522 if test -z "$CXX"; then
523 AC_MSG_ERROR([No C++ compiler found. Cannot compile scilab without a C++ compiler])
527 g++-* | g++ | ccache*g++ | ccache*g++-* )
528 ## With GNU C++ Compiler
530 # enable the code coverage
531 if test "$enable_code_coverage" = yes; then
532 CODECOVERAGE_CXXFLAGS="-fprofile-arcs -ftest-coverage"
535 if test "$enable_debug_CXX" = yes; then
536 DEBUG_CXXFLAGS="-pipe -Wshadow -Wpointer-arith -Wcast-align -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -Wno-strict-aliasing -Wextra -Wall -g3 -Wunsafe-loop-optimizations"
539 # Only doing that under Linux
540 DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -fdiagnostics-show-option -Werror=format-security"
544 DEBUG_CXXFLAGS="-DNDEBUG"
546 COMPILER_CXXFLAGS="$COMPILER_CXXFLAGS -fno-stack-protector " # bug 3131
551 #### 64 bits detection
554 x86_64-*-linux-gnu | x86_64-linux-gnu | ia64-*-linux-gnu | alpha-*-linux-gnu | alpha-*-netbsd* | x86_64-*-netbsd* | sparc64-*-netbsd*)
562 gcc-* | gcc | ccache*gcc | ccache*gcc-* )
565 # enable the code coverage
566 if test "$enable_code_coverage" = yes; then
567 CODECOVERAGE_CFLAGS="-fprofile-arcs -ftest-coverage"
570 if test "$enable_debug_C" = yes; then
571 DEBUG_CFLAGS="-pipe -Wformat -Wshadow -Wfloat-equal -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wmissing-noreturn -Wendif-labels -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wwrite-strings -Winline -Wredundant-decls -Wall -Wchar-subscripts -Wextra -Wuninitialized -Wno-format-y2k -Wmissing-format-attribute -Wno-missing-field-initializers -Wno-strict-aliasing -Wold-style-definition -g3 -Wunsafe-loop-optimizations"
575 # Only doing that under Linux
576 if test "$enable_debug_linker" = yes; then
577 LDFLAGS="$LDFLAGS -Wl,--warn-common,-x"
579 DEBUG_CFLAGS="$DEBUG_CFLAGS -fdiagnostics-show-option -Werror=format-security"
583 DEBUG_CFLAGS="-DNDEBUG"
586 COMPILER_CFLAGS="$COMPILER_CFLAGS -fno-stack-protector " # bug 3131
587 # Explictly disable the as needed. It was disable by default but Ubuntu
588 # activated it by default since release 11.04. See bug #8961.
589 # Once all cyclic dependencies have been dropped, this line could be removed.
590 # Check if linker supports --as-needed and --no-as-needed options
591 if $LD --help 2>/dev/null | grep no-as-needed > /dev/null; then
592 LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
597 x86_64-*-linux-gnu | x86_64-linux-gnu)
601 ARCH_CFLAGS="-mieee-with-inexact"
602 ARCH_LDFLAGS="-mieee-with-inexact"
605 ARCH_CFLAGS="-D_GNU_SOURCE"
608 ARCH_CFLAGS="-DSVR4 -DSYSV -Dsolaris"
611 ARCH_CFLAGS="-Dfreebsd"
616 ARCH_CFLAGS="-Dnetbsd -mieee"
617 ARCH_FFLAGS="-Dnetbsd -mieee"
621 ARCH_CFLAGS="-Dnetbsd"
625 # Flag no more added since :
626 # - No more supported in recent gcc versions (> 4.6)
627 # - only needed when compiling with flag -mmacosx-min-version=10.5
628 #ARCH_CFLAGS="$ARCH_CFLAGS -no_compact_linkedit"
629 #ARCH_CXXFLAGS="$ARCH_CXXFLAGS -no_compact_linkedit"
630 #ARCH_LDFLAGS="$ARCH_LDFLAGS -no_compact_linkedit"
631 # We need this to be passed to all linker commands
632 #LDFLAGS="$LDFLAGS -no_compact_linkedit"
636 # Extract from gfortran -v the version it has been built for
637 MAC_DETECTED_ARCH="`$F77 -v 2>&1|grep "Target:"|sed -e "s/Target: \([[a-z0-9A-Z_]]*\).*/\1/g"`"
640 AC_MSG_WARN([gfortran not used. Could not detect the architecture. Switch to the default case: x86_64])
641 MAC_DETECTED_ARCH="x86_64"
644 CC="$CC -arch $MAC_DETECTED_ARCH"
645 CXX="$CXX -arch $MAC_DETECTED_ARCH"
648 ;; # end of the gcc case on the $CC
651 ## CC compiler (not GCC)
652 if test "$enable_debug_C" != yes; then
653 ARCH_CFLAGS="-DNDEBUG"
659 ARCH_CFLAGS="-std -ieee_with_inexact"
660 ARCH_LDFLAGS="-ieee_with_inexact"
663 ARCH_CFLAGS="-ieee_with_inexact"
664 ARCH_LDFLAGS="-ieee_with_inexact"
666 rs6000-*-*) # IBM AIX RS 6000 (NO LONGER SUPPORTED)
667 ARCH_CFLAGS="-Daix -DSYSV"
669 mips-sgi-irix*) # SGI
670 ARCH_CFLAGS="-DSYSV -DSVR4"
673 ARCH_CFLAGS="-DSYSV -Dhpux"
675 *-*-hpux10.*) # HP 10
676 if test "$enable_debug_C" = yes; then
677 ARCH_CFLAGS="-DSYSV -Dhpux"
679 ARCH_CFLAGS="-DSYSV -Dhpux +Z +DAportable"
683 *-*-hpux11.*) # HP 11
684 ARCH_CFLAGS="-DSYSV -Dhpux -Dhppa +Z +DAportable"
686 *-*-solaris*) # SUN SOLARIS
687 ARCH_CFLAGS="-DSVR4 -DSYSV -Dsolaris -I/usr/local/include/"
688 ARCH_LDFLAGS="-L/usr/local/lib/"
691 ;; # end of not a gcc compiler
695 # enable the code coverage
696 if test "$enable_code_coverage" = yes; then
697 AC_PATH_PROG(LCOV, lcov)
698 if test -z "$LCOV" ; then
699 AC_MSG_ERROR([Cannot find lcov. Please install it (package lcov under Debian) or remove the option --enable-code-coverage])
701 AC_PATH_PROG(GENHTML, genhtml)
702 if test -z "$GENHTML" ; then
703 AC_MSG_ERROR([Cannot find genhtml. Please install it (package lcov under Debian) or remove the option --enable-code-coverage])
705 CODECOVERAGE_LDFLAGS="-coverage -lgcov"
707 AM_CONDITIONAL(CODE_COVERAGE, test "$enable_code_coverage" = yes)
708 AM_CONDITIONAL(ENABLE_DEBUG, test "$enable_debug" = yes)
710 # flag for possible compilations in configure
715 if test $IS_64_BITS_CPU = true -o "$MACOSX" = "1"; then
716 if test $f90compatible = false; then
717 AC_MSG_ERROR([64 bits support needs a fortran 90 compiler (try --with-gfortran).])
721 AM_CONDITIONAL(IS_64_BITS_CPU, test $IS_64_BITS_CPU = true)
723 # check if the compiler supports c++11
724 saved_cppflags="$CXXFLAGS"
726 AX_CXX_COMPILE_STDCXX_11(noext,mandatory)
727 STDCXX_11_CXXFLAGS="$CXXFLAGS"
728 CXXFLAGS="$saved_cppflags"
732 ## By default, for x86 CPU, enable the SSE2.
733 ## Note that it is already the case with 64 bits CPU
734 ## (these extensions are enabled by default by gcc)
738 i*86-linux-gnu|i*86-*-linux-gnu)
741 SSE_CXXFLAGS="-msse2"
745 #######################
746 ## test for underscores (name mangling issues between C and fortran)
747 #######################
748 AC_CHECK_UNDERSCORE_FORTRAN()
750 ###############################
751 ### Regenerate the parser files
753 ###############################
755 if test "$enable_build_parser" = yes; then
758 if test -z "$LEX" -o "$LEX" = ":"; then
759 AC_MSG_ERROR([No implementation of Lex (flex, lex) detected. Please install it (package flex)])
763 if test -z "$YACC"; then
764 AC_MSG_ERROR([No implementation of Yacc (bison, yacc) detected. Please install it (package bison)])
766 # Actually, AC_PROG_YACC is lying. It sometimes put yacc into $YACC even it
767 # hasn't been able to find it.
768 # AC_CHECK_PROG(YACC_PRESENT, $YACC, AC_MSG_ERROR([No implementation of Yacc (bison, yacc) detected. Please install it (package bison)]) )
770 AC_CHECK_PROG(yacc_present, $YACC, "yes","no")
771 if test "x$yacc_present" != "xyes"; then
772 AC_MSG_ERROR([No implementation of Yacc (bison, yacc) detected. Please install it (package bison)])
776 AM_CONDITIONAL(BUILD_PARSER, test "$enable_build_parser" = yes)
783 # The Java detection is done after in this file.
790 AC_ARG_WITH(external-scirenderer,
791 AS_HELP_STRING([--with-external-scirenderer],[Disable the usage of the internal copy of scirenderer. Intended for packaging of Scilab]))
793 AM_CONDITIONAL(EXTERNAL_SCIRENDERER, test "$with_external_scirenderer" = yes)
801 AS_HELP_STRING([--without-xcos], [Disable Xcos]))
803 AC_ARG_WITH(modelica,
804 AS_HELP_STRING([--without-modelica],[Disable the OCaml module (modelica)]))
807 if test "$with_gui" = no; then
808 AC_MSG_WARN([GUI is disabled. Disabling then Xcos GUI])
813 if test "$with_xcos" != no; then
814 AC_DEFINE([WITH_XCOS], [], [with XCos])
818 AC_CHECK_LIB([rt], [clock_gettime],
820 AC_DEFINE([HAVE_CLOCK_GETTIME], [1],[Whether clock_gettime is available]) ],
821 [AC_MSG_WARN([librt: library missing (Cannot find symbol clock_gettime). Check if librt is installed (it is usually provided by the libc) and if the version is correct])]
828 ## ocaml which only called when using Xcos
831 if test "$with_modelica" != no; then
832 AC_CHECK_PROG_OCAML()
838 AC_SUBST(XCOS_ENABLE)
840 AM_CONDITIONAL(OCAML, test "$with_modelica" != no -a "$OCAMLC" != no -a "$OCAMLOPT" != no)
841 AM_CONDITIONAL(XCOS, test "$XCOS_ENABLE" != no)
843 ###########################
844 ## test for JAVA compiler
845 ###########################
846 if test "$with_javasci" != no -o "$with_gui" != no -o "$enable_build_help" != no; then
848 # See if --with-jdk command line argument is given
849 # Try to detect the installed JVM, this could be controlled
850 # by the above --with options
852 if test "$with_jdk" != no; then
855 case "$ac_java_jvm_version" in
859 AC_MSG_ERROR([Wrong version of Java. Expected at least 1.8. Found $ac_java_jvm_version])
863 if test "$ac_java_jvm_name" = "jdk"; then
864 JAVA_HOME=$ac_java_jvm_dir
865 JAVA_VERSION=$ac_java_jvm_version
869 JAVA_JNI_INCLUDE=$ac_java_jvm_jni_include_flags
873 # Mac OS X does not link against the lib but uses -framework
874 JAVA_JNI_LIBS="-framework JavaVM"
878 JAVA_JNI_LIBS=$ac_java_jvm_jni_lib_flags
879 JAVA_JNI_LIBS_PRELOAD=$ac_java_jvm_ld_preload
884 JAVA_CLASSPATH=$ac_java_classpath
895 if test "$with_gui" != no; then
897 if test "$with_xcos" != no; then
899 AC_JAVA_CHECK_JAR([jgraphx],[com.mxgraph.view.mxGraph],[Diagram design],[],[VERSION],[2.0.0.1])
900 JGRAPHX=$PACKAGE_JAR_FILE
904 if test "$with_external_scirenderer" = yes; then
906 AC_JAVA_CHECK_JAR([scirenderer],[org.scilab.forge.scirenderer.PackageInfo],[Scilab Renderer],[],[VERSION],[1.1.0])
907 SCIRENDERER=$PACKAGE_JAR_FILE
908 SCIRENDERER_CP=$PACKAGE_JAR_FILE
910 echo "Use external version of scirenderer"
911 # Use the scirenderer in Scilab sources
912 SCIRENDERER="\${modules.dir}/scirenderer/\${build.jar.dir}/scirenderer.jar"
913 SCIRENDERER_CP="\$SCILAB/modules/scirenderer/jar/scirenderer.jar"
915 AC_SUBST(SCIRENDERER)
916 AC_SUBST(SCIRENDERER_CP)
919 AC_JAVA_CHECK_JAR([flexdock],[org.flexdock.util.Utilities],[Scilab Gui],[],[VERSION],[1.2.4])
920 FLEXDOCK=$PACKAGE_JAR_FILE
923 # Swing look&feel implementations
924 AC_JAVA_CHECK_JAR([looks],[com.jgoodies.looks.common.MenuItemRenderer],[Scilab Gui - Look and feel],"yes")
925 LOOKS=$PACKAGE_JAR_FILE
927 # Named differently under ArchLinux or Fedora
928 if test -z "$LOOKS"; then
929 AC_JAVA_CHECK_JAR([jgoodies-looks],[com.jgoodies.looks.common.MenuItemRenderer],[Scilab Gui - Look and feel])
930 LOOKS=$PACKAGE_JAR_FILE
935 AC_JAVA_CHECK_JAR([skinlf],[com.l2fprod.util.AccessUtils],[Scilab Gui - Skin Look and Feel])
936 SKINLF=$PACKAGE_JAR_FILE
940 AC_JAVA_CHECK_JAR([jogl2],[javax.media.opengl.glu.GLUnurbs],[Scilab 3D rendering - Version 2.0])
941 JOGL2=$PACKAGE_JAR_FILE
944 AC_JAVA_CHECK_VERSION_MANIFEST([jogl2],$JOGL2,[2.2],[Specification-Version])
946 if test "$MACOSX" = 1; then
947 echo "Check of the presence of libjogl.jnilib and libjogl_awt.jnilib disabled under Mac OS X"
949 LDFLAGS_save=$LDFLAGS
950 # Provide known paths where distribs/OS can store JNI libs
951 LDFLAGS="$LDFLAGS -L/usr/lib/jni -L/usr/lib64/jni" # Debian
952 LDFLAGS="$LDFLAGS -L/usr/lib/java -L/usr/lib64/java" # jpackage.org
953 LDFLAGS="$LDFLAGS -L/usr/lib/jogl2 -L/usr/lib64/jogl2" # RedHat
954 LDFLAGS="$LDFLAGS -L$SCI_SRCDIR/thirdparty -L$SCI_SRCDIR/lib/thirdparty -L$SCI_SRCDIR/bin" # Scilab thirdparties
955 AC_CHECK_LIB([jogl_desktop], [glTexParameterf], [JOGL2_LIBS="-ljogl_desktop"],[AC_MSG_WARN([Could not link against -ljogl_desktop. Will try against -ljogl_desktop -lGL])])
956 if test -z "$JOGL2_LIBS"; then # The previous test failed add more options to the LDFLAGS
957 # the space after "jogl" in the following line is on
958 # purpose to disable the cache
959 AC_CHECK_LIB([jogl_desktop ], [glTexParameterf],
960 [JOGL2_LIBS="-ljogl_desktop -lGL"],
961 [AC_MSG_ERROR(["libjogl: Library
962 missing (Cannot find symbol glTexParameterf). Check if libjogl - C/Java (JNI)
963 interface for JOGL2 - or libGL (OpenGL library) are installed and if the version is correct. Note that you might have to update etc/librarypath.xml to provide the actual path to the JNI libraries."])],
967 LDFLAGS=$LDFLAGS_save
970 # JoGL Native <=> Java connector
971 AC_JAVA_CHECK_JAR([gluegen2-rt],[jogamp.common.os.MachineDescriptionRuntime],[Scilab 3D rendering])
972 GLUEGEN2_RT=$PACKAGE_JAR_FILE
973 AC_SUBST(GLUEGEN2_RT)
975 if test "$MACOSX" = 1; then
976 echo "Check of the presence of libgluegen-rt.jnilib disabled under Mac OS X"
978 LDFLAGS_save=$LDFLAGS
979 # Provide known paths where distribs/OS can store JNI libs
980 LDFLAGS="$LDFLAGS -L/usr/lib/jni -L/usr/lib64/jni" # Debian
981 LDFLAGS="$LDFLAGS -L/usr/lib/java -L/usr/lib64/java" # jpackage.org
982 LDFLAGS="$LDFLAGS -L/usr/lib/gluegen2 -L/usr/lib64/gluegen2" # RedHat
983 LDFLAGS="$LDFLAGS -L$SCI_SRCDIR/thirdparty -L$SCI_SRCDIR/lib/thirdparty -L$SCI_SRCDIR/bin" # Scilab thirdparties
984 symbol="Java_jogamp_common_jvm_JVMUtil_initialize"
985 AC_CHECK_LIB([gluegen2-rt], [$symbol], [GLUEGEN2_RT_LIBS="-lgluegen2-rt"],
986 [AC_MSG_ERROR([libgluegen2-rt: Library missing (Cannot find symbol $symbol). Check if libgluegen-rt - C/Java (JNI) interface for GLUEGEN2 - is installed and if the version is correct. Note that you might have to update etc/librarypath.xml to provide the actual path to the JNI libraries.])],
988 LDFLAGS=$LDFLAGS_save
992 AC_JAVA_CHECK_JAR([jhall],[javax.help.JHelp],[Scilab Help Browser],"yes")
993 # Named differently under Mandriva or Fedora
994 if test -z "$PACKAGE_JAR_FILE"; then
995 AC_JAVA_CHECK_JAR([javahelp2],[javax.help.JHelp],[Scilab Help Browser])
997 JHALL=$PACKAGE_JAR_FILE
1001 AC_JAVA_CHECK_JAR([jrosetta-API],[com.artenum.rosetta.interfaces.core.ConsoleConfiguration],[JRosetta : Console API Artenum / Scilab],"yes")
1002 if test -z "$PACKAGE_JAR_FILE"; then
1003 AC_JAVA_CHECK_JAR([jrosetta-api],[com.artenum.rosetta.interfaces.core.ConsoleConfiguration],[JRosetta : Console API Artenum / Scilab])
1005 JROSETTA_API=$PACKAGE_JAR_FILE
1006 AC_SUBST(JROSETTA_API)
1009 AC_JAVA_CHECK_JAR([jrosetta-engine],[com.artenum.rosetta.util.ConfigurationBuilder],[JRosetta : Console Core Artenum / Scilab],[],[getVersion],[1.0.4])
1010 JROSETTA_ENGINE=$PACKAGE_JAR_FILE
1011 AC_SUBST(JROSETTA_ENGINE)
1014 # MathML rendering solution
1015 # Used in both graphic & help
1016 AC_JAVA_CHECK_JAR([jeuclid-core],[net.sourceforge.jeuclid.LayoutContext],[MathML rendering solution (at least version 3.1.X)])
1017 JEUCLID_CORE=$PACKAGE_JAR_FILE
1018 AC_SUBST(JEUCLID_CORE)
1021 ################ Mandatory for graphic_export features #####
1022 # XML to PDF/other Translator
1023 AC_JAVA_CHECK_JAR([fop],[org.apache.fop.pdf.PDFInfo],[XML to PDF Translator (fop)])
1024 FOP=$PACKAGE_JAR_FILE
1027 AC_ARG_WITH(emf, [AS_HELP_STRING([--without-emf],
1028 [disable support for EMF (Windows Metafile) export])])
1029 if test "x$with_emf" != xno; then
1030 # Freehep Graphics2D
1031 AC_JAVA_CHECK_JAR([freehep-graphics2d],[org.freehep.graphics2d.VectorGraphics],[Freehep Graphics2D])
1032 FREEHEP_GRAPHICS2D=$PACKAGE_JAR_FILE
1033 AC_SUBST(FREEHEP_GRAPHICS2D)
1035 # Freehep GraphicsIO
1036 AC_JAVA_CHECK_JAR([freehep-graphicsio],[org.freehep.graphicsio.VectorGraphicsIO],[Freehep GraphicsIO])
1037 FREEHEP_GRAPHICSIO=$PACKAGE_JAR_FILE
1038 AC_SUBST(FREEHEP_GRAPHICSIO)
1040 # Freehep GraphicsIO EMF
1041 AC_JAVA_CHECK_JAR([freehep-graphicsio-emf],[org.freehep.graphicsio.emf.EMFGraphics2D],[Freehep GraphicsIO EMF])
1042 FREEHEP_GRAPHICSIO_EMF=$PACKAGE_JAR_FILE
1043 AC_SUBST(FREEHEP_GRAPHICSIO_EMF)
1046 AC_JAVA_CHECK_JAR([freehep-io],[org.freehep.util.io.XMLSequence],[Freehep IO])
1047 FREEHEP_IO=$PACKAGE_JAR_FILE
1048 AC_SUBST(FREEHEP_IO)
1051 AC_JAVA_CHECK_JAR([freehep-util],[org.freehep.util.StringUtilities],[Freehep Util])
1052 FREEHEP_UTIL=$PACKAGE_JAR_FILE
1053 AC_SUBST(FREEHEP_UTIL)
1056 # xml.apache.org SVG Library (under mandriva for example)
1057 AC_JAVA_CHECK_JAR([batik-all],[org.apache.batik.Version],
1058 [Apache SVG Library],"yes",[getVersion],[1.8])
1059 BATIK=$PACKAGE_JAR_FILE
1061 if test -z "$BATIK"; then
1062 # Other other distribs
1063 AC_JAVA_CHECK_JAR([batik],[org.apache.batik.Version],
1064 [Apache SVG Library],[],[getVersion],[1.8])
1065 BATIK=$PACKAGE_JAR_FILE
1069 # Commons I/O library
1070 AC_JAVA_CHECK_JAR([commons-io],[org.apache.commons.io.output.CountingOutputStream],[Commons I/O library])
1071 COMMONS_IO=$PACKAGE_JAR_FILE
1072 AC_SUBST(COMMONS_IO)
1074 # XML graphics common
1075 AC_JAVA_CHECK_JAR([xmlgraphics-commons],[org.apache.xmlgraphics.util.Service],[Commons graphics library])
1076 XMLGRAPHICS_COMMONS=$PACKAGE_JAR_FILE
1077 AC_SUBST(XMLGRAPHICS_COMMONS)
1079 # Avalon Framework (PDF)
1080 AC_JAVA_CHECK_JAR([avalon-framework],[org.apache.avalon.framework.configuration.ConfigurationException],[Common framework for Java server application])
1081 AVALON_FRAMEWORK=$PACKAGE_JAR_FILE
1082 AC_SUBST(AVALON_FRAMEWORK)
1084 # XML API EXT (conversion of a SVG => PNG)
1085 AC_JAVA_CHECK_JAR([xml-apis-ext],[org.w3c.dom.svg.SVGDocument],[XML Commons external code],"yes")
1086 XML_APIS_EXT=$PACKAGE_JAR_FILE
1088 if test -z "$XML_APIS_EXT"; then
1089 # Other other distribs (Ex: Fedora/Redhat)
1090 AC_JAVA_CHECK_JAR([xml-commons-apis-ext],[org.w3c.dom.svg.SVGDocument],[XML Commons external code])
1091 XML_APIS_EXT=$PACKAGE_JAR_FILE
1093 AC_SUBST(XML_APIS_EXT)
1095 ################ END Mandatory for graphic_export features #####
1098 # Logging (flexdock dep)
1099 AC_JAVA_CHECK_JAR([commons-logging],[org.apache.commons.logging.LogFactory],[Apache logging])
1100 COMMONS_LOGGING=$PACKAGE_JAR_FILE
1101 AC_SUBST(COMMONS_LOGGING)
1104 AC_JAVA_CHECK_JAR([jlatexmath],[org.scilab.forge.jlatexmath.TeXFormula],[LaTex Rendering],[],[VERSION],[1.0.3])
1105 JLATEXMATH=$PACKAGE_JAR_FILE
1106 AC_SUBST(JLATEXMATH)
1109 AC_JAVA_CHECK_JAR([jlatexmath-fop],[org.scilab.forge.jlatexmath.fop.JLaTeXMathObj],[LaTex Rendering - FOP plugin])
1110 JLATEXMATH_FOP=$PACKAGE_JAR_FILE
1111 AC_SUBST(JLATEXMATH_FOP)
1113 AC_DEFINE([WITH_GUI],[],[With the JAVA stuff (GUI, Console, JOGL...)])
1117 # Checkstyle (code checking)
1118 AC_JAVA_CHECK_JAR([checkstyle],[com.puppycrawl.tools.checkstyle.CheckStyleTask],[Checkstyle - code checking],"yes")
1119 CHECKSTYLE=$PACKAGE_JAR_FILE
1120 AC_SUBST(CHECKSTYLE)
1122 # Commons beanutils (dependency of checkstyle)
1123 AC_JAVA_CHECK_JAR([commons-beanutils],[org.apache.commons.beanutils.Converter],[Bean utility],"yes")
1124 COMMONS_BEANUTILS=$PACKAGE_JAR_FILE
1125 AC_SUBST(COMMONS_BEANUTILS)
1127 # antlr (dependency of checkstyle)
1128 AC_JAVA_CHECK_JAR([antlr],[antlr.TokenStreamException],[language tool for constructing recognizers],"yes")
1129 ANTLR=$PACKAGE_JAR_FILE
1132 # Junit 4 (java unitary test)
1133 AC_JAVA_CHECK_JAR([junit4],[org.junit.Assert],[Junit4 - Unit tests],"yes")
1134 if test -z "$PACKAGE_JAR_FILE"; then
1135 AC_JAVA_CHECK_JAR([junit],[org.junit.Assert],[Junit4 -
1138 JUNIT4=$PACKAGE_JAR_FILE
1141 # hamcrest (junit4 dependency)
1142 AC_JAVA_CHECK_JAR([hamcrest-all],[org.hamcrest.core.IsNull],[Hamcrest- library matchers],"yes")
1143 if test -z "$PACKAGE_JAR_FILE"; then
1144 AC_JAVA_CHECK_JAR([hamcrest/all],[org.hamcrest.core.IsNull],[Hamcrest- library matchers],"yes")
1146 HAMCREST=$PACKAGE_JAR_FILE
1149 # Cobertura (java code coverage)
1150 AC_JAVA_CHECK_JAR([cobertura],[net.sourceforge.cobertura.merge.Main],[cobertura - Java code coverage],"yes")
1151 COBERTURA=$PACKAGE_JAR_FILE
1154 # ASM (a dependency of Cobertura)
1155 AC_JAVA_CHECK_JAR([asm3],[org.objectweb.asm.Type],[Java bytecode manipulation (dep of cobertura)],"yes")
1156 if test -z "$ASM3"; then
1157 AC_JAVA_CHECK_JAR([asm],[org.objectweb.asm.Type],[Java bytecode manipulation (dep of cobertura)],"yes")
1159 ASM3=$PACKAGE_JAR_FILE
1162 AC_JAVA_CHECK_JAR([ecj],[org.eclipse.jdt.core.compiler.batch.BatchCompiler],[Eclipse Java compiler],"yes")
1163 ECJ=$PACKAGE_JAR_FILE
1164 if test -z "$ECJ"; then
1165 ECJ='$SCILAB/thirdparty/ecj.jar'
1170 AC_MSG_WARN([Sun javac not found: I will not build the java interface])
1171 if test "$ac_java_jvm_name" != ""; then
1172 AC_MSG_WARN([We do not support $ac_java_jvm_name yet])
1175 AC_SUBST(JAVA_JNI_INCLUDE)
1176 AC_SUBST(JAVA_JNI_LIBS)
1180 if test "$enable_debug_java" = yes; then
1185 AC_SUBST(JAVAC_DEBUG)
1187 if test "$enable_build_swig" != no -a "$enable_build_swig" != ""; then
1190 SWIG_ENABLE_SCILAB()
1193 AC_SUBST(SWIG_SCILAB)
1197 # Giws is the equivalent of Swig developed by the Scilab team
1198 # in order to provide a wrapper to Java from C/C++
1199 if test "$enable_build_giws" != no -a "$enable_build_giws" != ""; then
1203 fi # "$with_jdk" != no;
1207 if test -z "$JAVAC"; then
1211 AC_SUBST(JAVA_ENABLE)
1213 # Xcos is not checked here because gui=no disables it
1214 AM_CONDITIONAL(NEED_JAVA, [test "$with_jdk" != no -a \( "$with_javasci" != no -o "$with_gui" != no -o "$enable_build_help" != no \)])
1215 AM_CONDITIONAL(GUI, [test "$with_jdk" != no -a "$with_gui" != no])
1216 AM_CONDITIONAL(JAVASCI, [test "$with_jdk" != no -a "$with_javasci" != no])
1217 AM_CONDITIONAL(SWIG, [test "$with_jdk" != no -a "$enable_build_swig" != no -a "$enable_build_swig" != ""])
1218 AM_CONDITIONAL(GIWS, [test "$with_jdk" != no -a "$enable_build_giws" != no -a "$enable_build_giws" != ""])
1220 ##############################################################
1222 ##############################################################
1226 if test "$JAVA_ENABLE" != no; then
1230 if test "$with_gui" != no; then
1234 AC_SUBST(GUI_ENABLE)
1236 ##############################################################
1237 ## test for functions in standard C library and C math library
1238 ##############################################################
1240 # Provided by unistd.h
1241 AC_CHECK_FUNCS([sleep] [usleep] [dup2] [getcwd] [getpagesize] [getpass])
1242 AC_CHECK_FUNCS([rmdir])
1244 AC_CHECK_FUNC([getwd],AC_DEFINE([HAVE_GETWD],[1],[Define to 1 if you have the `getwd' function.]),[AC_DEFINE([getwd(x)],[getcwd(x,1024)],[Don't use getwd but getcwd])])
1246 # Provided by <regex.h>
1247 AC_CHECK_FUNCS([regcomp])
1249 # Provided by stdlib.h
1250 AC_CHECK_FUNCS([atexit] [putenv] [setenv])
1252 # Provided by String.h
1253 AC_CHECK_FUNCS([bzero] [memmove] [memset] [strcasecmp] [strerror] [strchr] [strdup] [strpbrk] [strrchr] [strstr] [strtol])
1255 # Provided by select.h
1256 AC_CHECK_FUNCS([select])
1259 AC_CHECK_FUNCS([endpwent])
1261 # Provided by netdb.h
1262 AC_CHECK_FUNCS([gethostbyaddr] [gethostbyname] [gethostname])
1264 # Provided by time.h
1265 AC_CHECK_FUNCS([gettimeofday])
1267 # Provided by ctype.h
1268 AC_CHECK_FUNCS([isascii])
1270 # Provided by wctype.h
1271 AC_CHECK_FUNCS([iswprint])
1273 # Provided by types.h
1274 AC_CHECK_FUNCS([mkdir])
1276 # Provided by mman.h
1277 AC_CHECK_FUNCS([munmap])
1279 # Provided by signal.h
1280 AC_CHECK_FUNCS([strsignal])
1283 # Check of the libm (lib math). Macro provided by libtool.
1284 save_LDFLAGS="$LDFLAGS"
1287 # Provided by math.h
1289 LDFLAGS="$LDFLAGS $LIBM"
1290 AC_CHECK_FUNCS([pow] [sqrt] [finite] [floor] [exp10] [erf] [erfc] [isnan])
1292 ### If isinf exists or not (used to not be the case under Solaris)
1294 AC_DEFINE([HAVE_ISINF],[1],[Have isinf function or macro equivalent])
1295 AC_CHECK_FUNC([isinf],,[
1296 AC_DEFINE([isinf(x)],[(!finite(x) && x==x)],[Provide a macro to do isinf])
1299 LDFLAGS="$save_LDFLAGS"
1301 # Provided by regex.h
1302 AC_CHECK_FUNCS([re_comp])
1304 # Provided by socket.h
1305 AC_CHECK_FUNCS([socket])
1307 # Provided by utsname.h
1308 AC_CHECK_FUNCS([uname])
1310 # Provided by wtloop.c
1311 AC_CHECK_FUNCS([setlocale])
1313 # Function memcmp used in modules/fileio/src/c/xls.c
1316 # function stat used in modules/core/src/c/link_std.c
1319 # function strtod used in modules/core/src/c/getval.c
1322 ########################
1323 ## test for header files
1324 ########################
1326 AC_CHECK_HEADERS([limits.h values.h])
1328 AC_CHECK_HEADERS([fcntl.h float.h libintl.h locale.h malloc.h netdb.h netinet/in.h nlist.h sgtty.h stddef.h sys/file.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h sys/timeb.h sys/utsname.h syslog.h term.h termcap.h termio.h termios.h wchar.h wctype.h time.h])
1330 # check header dirent
1333 # static struct timeval defined or not | used in modules/core/src/c/timer.c
1336 # check if the specific header is available or not | used in modules/core/src/c/link_SYSV.c
1340 #######################
1341 ## Test for structures ##
1342 #######################
1343 AC_CHECK_MEMBERS([struct stat.st_blksize])
1344 AC_CHECK_MEMBERS([struct stat.st_rdev])
1347 #######################
1349 #######################
1351 # gettext. See http://www.gnu.org/software/hello/manual/gettext/AM_005fGNU_005fGETTEXT.html
1352 AM_GNU_GETTEXT([external])
1353 AM_GNU_GETTEXT_VERSION([0.16])
1355 # function closedir used in modules/metanet/src/c/files.c
1356 AC_FUNC_CLOSEDIR_VOID
1358 # Signals used in modules/core/src/c/realmain.c
1361 # struct tm used in modules/core/src/c/history.c
1364 # st_blocks in the struct in modules/io/sci_gateway/c/intfilestat.c
1372 # some systems may have a system curses implementation as well as ncurses
1373 # installed. We need to be consistent in making sure we get the correct
1374 # library to go with the correct header and also provide a way for the user
1375 # to have some control over which is picked when both are available.
1377 # For now, just check for -lcurses and then -lncurses. The user control
1378 # may need to be revisited
1382 # Various observations:
1385 # - installs ncurses.h and possibly curses.h as a link to ncurses.h
1386 # - installs -lncurses.
1387 # - need to include term.h for tgetent() but tgetent() is in -lncurses.a
1389 # curses as found in NetBSD-4 and NetBSD-5
1390 # - installs curses.h
1391 # - need to include termcap.h and link with -ltermcap for tgetent()
1394 AC_CHECK_LIB([curses],[main])
1395 if test $ac_cv_lib_curses_main = no ; then
1396 AC_CHECK_LIB([ncurses],[main])
1399 # make sure we have what we need for tgetent
1400 AC_SEARCH_LIBS([tgetent],[termcap])
1402 AC_CHECK_HEADERS([ncurses.h curses.h])
1404 if test "x$ac_cv_lib_curses_main" = "xyes" -o "x$ac_cv_lib_ncurses_main" = "xyes" ; then
1405 AC_DEFINE([HAVE_TERMCAP],[],[Have Term Cap])
1407 AC_MSG_ERROR([No termcap library detected. Please install ncurses dev library (or termcap library)])
1414 AC_CHECK_LIB(dl, dlopen)
1416 AC_SEARCH_LIBS([pthread_join],[pthread])
1423 AS_HELP_STRING([--without-fftw],[Disable the interface to the FFTW 3 library]))
1426 if test "$with_fftw" != no; then
1431 AC_SUBST(FFTW_ENABLE)
1432 AM_CONDITIONAL(FFTW, test "$with_fftw" != no)
1446 # Disable by default the build of MPI:
1447 # * It is hard to package
1448 # * People are administrating cluster know about rebuilding packages
1449 # * They use their own MPI library
1451 AS_HELP_STRING([--with-mpi],[compile with MPI library]))
1454 if test "$with_mpi" == yes; then
1456 # We will have to detect other implementation of OpenMPI
1459 AC_SUBST(MPI_ENABLE)
1461 AM_CONDITIONAL(MPI, test "$with_mpi" == yes)
1468 AS_HELP_STRING([--without-openmp],[Disable the usage of OpenMP (parallelization of some algoritms)]))
1471 if test "$with_openmp" != no; then
1473 OPENMP_CFLAGS="-fopenmp"
1474 OPENMP_CXXFLAGS="-fopenmp"
1475 OPENMP_LIBS="-lgomp"
1477 AC_CHECK_HEADERS([omp.h], [],
1478 [AC_MSG_ERROR([Could not find omp.h])])
1482 AC_SUBST(OPENMP_ENABLE)
1483 AC_SUBST(OPENMP_CFLAGS)
1484 AC_SUBST(OPENMP_CXXFLAGS)
1485 AC_SUBST(OPENMP_LIBS)
1487 AM_CONDITIONAL(OPENMP, test "$with_openmp" != no)
1490 #######################
1492 #######################
1496 #######################
1498 #######################
1500 ALL_LINGUAS="en_US fr_FR zh_CN zh_TW ru_RU ca_ES de_DE es_ES pt_BR ja_JP it_IT uk_UA pl_PL cs_CZ"
1501 ALL_LINGUAS_DOC="en_US fr_FR pt_BR ja_JP ru_RU"
1503 AC_ARG_ENABLE(build-localization,
1504 AS_HELP_STRING([--disable-build-localization],[Disable the localization build])
1506 BUILD_LOCALIZATION_ENABLE=no
1508 if test "$enable_build_localization" != no; then
1510 AC_SUBST(ALL_LINGUAS)
1511 AC_SUBST(ALL_LINGUAS_DOC)
1512 AC_CHECK_FUNCS([bind_textdomain_codeset])
1514 AC_PATH_PROG(MSGCAT, msgcat, no)
1515 # AC_PATH_PROG(MSGFMT, msgfmt, no)
1516 # AC_PATH_PROG(XGETTEXT, xgettext, no)
1518 if test x$MSGFMT = xno; then
1519 AC_MSG_ERROR([The msgfmt command is required to build Scilab. If it is installed on your system, ensure that it is in your path. If it is not, install GNU gettext to continue or use the option --disable-build-localization ])
1521 if test x$MSGCAT = xno; then
1522 AC_MSG_ERROR([The msgcat command is required to build Scilab. If it is installed on your system, ensure that it is in your path. If it is not, install GNU gettext to continue or use the option --disable-build-localization ])
1524 BUILD_LOCALIZATION_ENABLE=yes
1526 AM_CONDITIONAL(GENERATE_LOCALIZATION_FILES, test "$BUILD_LOCALIZATION_ENABLE" = yes)
1528 #######################
1529 ## Test for blas/Atlas and lapack
1530 #######################
1531 AC_MSG_CHECKING([if BLAS, ATLAS or MKL is available])
1534 [AC_MSG_RESULT([$BLAS_TYPE found])]
1536 AC_MSG_ERROR([Impossible to find a BLAS compatible library (see BLAS or ATLAS).])
1539 AC_MSG_CHECKING([if LAPACK is available])
1542 [AC_MSG_RESULT([$LAPACK_TYPE found])],
1543 AC_MSG_ERROR([Impossible to find the LAPACK library.])
1547 AC_ARG_WITH(arpack-ng,
1548 AS_HELP_STRING([--without-arpack-ng],[Disable the interface to ARPACK-NG]))
1551 if test "$with_arpack_ng" != no; then
1553 AC_MSG_CHECKING([if ARPACK-NG is available])
1556 [AC_MSG_RESULT([ARPACK-NG library found])],
1557 AC_MSG_ERROR([Impossible to find the ARPACK library. Please note that arpack was bundled with version prior to 5.4.0 and Scilab requires arpack-ng ( http://forge.scilab.org/index.php/p/arpack-ng/ ).])
1561 [AC_MSG_RESULT([Working ARPACK-NG library found (probably ARPACK-NG or a patched version of ARPACK)])],
1562 [AC_MSG_ERROR([ARPACK library found, but seems not to work properly. Please make sure you are using arpack-ng])
1565 AC_MSG_CHECKING([Skip ARPACK-NG detection])
1568 AM_CONDITIONAL(ARPACK_NG, test "$ARPACK_NG" != "no")
1575 AC_ARG_WITH(umfpack,
1576 AS_HELP_STRING([--without-umfpack],[Disable the interface to the UMFPACK library]))
1579 if test "$with_umfpack" != no; then
1580 AC_UMFPACK([$BLAS_LIBS])
1584 AC_SUBST(UMFPACK_ENABLE)
1585 AM_CONDITIONAL(UMFPACK, test "$with_umfpack" != no)
1587 #######################
1589 #######################
1593 #######################
1595 #######################
1604 if test "$with_tk" != no; then
1605 if test "$MACOSX" = "1"; then
1606 AC_MSG_ERROR([Due to technical constraints, Tcl/Tk must be disabled under Mac OS X (--without-tk)])
1609 # check user arguments
1610 USER_TCL_LIB_PATH=""
1611 USER_TCL_INC_PATH=""
1612 AC_ARG_WITH(tcl-library,
1613 AS_HELP_STRING([--with-tcl-library=DIR],[Set the path to the TCL library]),
1614 [ USER_TCL_LIB_PATH=$withval
1616 AC_ARG_WITH(tcl-include,
1617 AS_HELP_STRING([--with-tcl-include=DIR],[Set the path to the TCL headers]),
1618 [ USER_TCL_INC_PATH=$withval
1621 USER_TK_LIB_PATH=$USER_TCL_LIB_PATH
1622 USER_TK_INC_PATH=$USER_TCL_INC_PATH
1624 AC_ARG_WITH(tk-library,
1625 AS_HELP_STRING([--with-tk-library=DIR],[Set the path to the TK library]),
1626 [ USER_TK_LIB_PATH=$withval
1629 AC_ARG_WITH(tk-include,
1630 AS_HELP_STRING([--with-tk-include=DIR],[Set the path to the TK headers]),
1631 [ USER_TK_INC_PATH=$withval
1634 ###########################
1635 ########## X11 checks
1636 ###########################
1637 ## This check is mandatory since tk needs Xlib headers and libs
1641 saved_cflags="$CFLAGS"
1642 saved_ldflags="$LDFLAGS"
1643 saved_cppflags="$CXXFLAGS"
1645 AC_CHECK_LIB([dl], [main], [TCLTK_LIBS=" -ldl"])
1649 if test "$WITH_TKSCI" = yes; then
1650 AC_DEFINE([WITH_TK], [], [With TK])
1652 AC_MSG_ERROR([TCL/TK not found. Use --without-tk or specify the librairies and include paths manually])
1655 AC_SUBST(TCLTK_LIBS)
1656 AC_SUBST(TCL_INC_PATH)
1657 AC_SUBST(TK_INC_PATH)
1660 AC_SUBST(WITH_TKSCI)
1661 AM_CONDITIONAL(TCLTK, test "$WITH_TKSCI" = yes)
1664 ## MATIO LIBRARY (MAT File I/O Library)
1669 AS_HELP_STRING([--without-matio],[Disable the interface to Matio (MAT File I/O library)]))
1671 AC_ARG_WITH(matio_include,
1672 AS_HELP_STRING([--with-matio-include=DIR],[Set the path to the MATIO headers]),
1673 [with_matio_include="-I$withval"], [])
1675 AC_ARG_WITH(matio_library,
1676 AS_HELP_STRING([--with-matio-library=DIR],[Set the path to the MATIO libraries]),
1677 [with_matio_library="-L$withval"], [])
1681 if test "$with_matio" != no; then
1682 if test -n "$with_matio_include" -o -n "$with_matio_library" ; then
1683 MATIO_CFLAGS="$with_matio_include"
1684 MATIO_LIBS="$with_matio_library -lm -lz -lmatio -lhdf5"
1686 if $WITH_DEVTOOLS; then # Scilab thirdparties
1687 MATIO_CFLAGS="-I$DEVTOOLS_INCDIR"
1688 MATIO_LIBS="-L$DEVTOOLS_LIBDIR -lm -lz -lmatio -lhdf5"
1690 PKG_CHECK_MODULES(MATIO, [matio >= 1.5.0])
1694 save_CFLAGS="$CFLAGS"
1697 CFLAGS="$CFLAGS $MATIO_CFLAGS"
1698 LIBS="$LIBS $MATIO_LIBS"
1700 AC_CHECK_HEADERS([matio.h], [],
1701 [AC_MSG_ERROR([Invalid MATIO_CFLAGS returned by pkg-config. Try to define MATIO_CFLAGS.])])
1702 AC_CHECK_LIB([matio], [Mat_Open], [],
1703 [AC_MSG_ERROR([Invalid MATIO_LIBS returned by pkg-config. Try to define MATIO_LIBS.])])
1706 CFLAGS="$save_CFLAGS"
1708 AC_DEFINE([WITH_MATIO], [], [With the MATIO library])
1711 AC_SUBST(MATIO_LIBS)
1712 AC_SUBST(MATIO_CFLAGS)
1716 AC_SUBST(MATIO_ENABLE)
1717 AM_CONDITIONAL(MATIO, test "$with_matio" != no)
1719 #############################
1720 ## Documentation management #
1721 #############################
1725 AC_ARG_ENABLE(build-help,
1726 AS_HELP_STRING([--disable-build-help],[Disable the help build])
1729 if test "$enable_build_help" != no; then
1735 if test "$JAVA_ENABLE" = no; then
1739 AC_SUBST(HELP_ENABLE)
1741 AM_CONDITIONAL(BUILD_HELP, test $HELP_ENABLE = yes)
1743 ## Install XML help files ###
1745 AC_ARG_WITH(install-help-xml,
1746 AS_HELP_STRING([--with-install-help-xml],[make install will install XML files])
1748 HELP_INSTALL_ENABLE=no
1749 if test "$with_install_help_xml" != no -a "$with_install_help_xml" != ""; then
1750 HELP_INSTALL_ENABLE=yes
1752 AM_CONDITIONAL(INSTALL_HELP_XML, test "$HELP_INSTALL_ENABLE" != "")
1754 ## Doxygen help generation
1755 AC_ARG_ENABLE(build-doxygen,
1756 AS_HELP_STRING([--enable-build-doxygen],[Generate doxygen C/C++ documentation]))
1759 if test "$enable_build_doxygen" != no -a "$enable_build_doxygen" != ""; then
1764 AM_CONDITIONAL(DOXYGEN, test $DOXYGEN_ENABLE = yes)
1766 ## Valgrind specific code
1767 PKG_CHECK_EXISTS([valgrind], [PKG_CHECK_MODULES([VALGRIND], [valgrind], [AC_DEFINE([VALGRIND_ENABLE], [], [Enable valgrind specific tweaks])])], [])
1769 ##############################################################
1771 ##############################################################
1775 if test "$JAVA_ENABLE" = no -o "$JAVASCI" = no; then
1779 AC_SUBST(JAVASCI_ENABLE)
1782 ##############################################################
1783 ## Enable test at compilation time
1784 ##############################################################
1786 COMPILATION_TESTS=no
1787 if test "$enable_compilation_tests" != no -a "$enable_compilation_tests" != ""; then
1788 COMPILATION_TESTS=yes
1791 if test COMPILATION_TESTS=yes -a "$JUNIT4" == ""; then
1792 AC_MSG_WARN([--enable-compilation-tests deactivated: Could not find Junit4"])
1793 COMPILATION_TESTS=no
1796 AM_CONDITIONAL(COMPILATION_TESTS, test "$COMPILATION_TESTS" != "no")
1798 ##############################################################
1799 ## Enable the global force link
1800 ##############################################################
1802 AC_ARG_ENABLE(force-full-link,
1803 AS_HELP_STRING([--enable-force-full-link],[Forces the explicit link between libscilab and some "on-the-fly" loaded libraries. NOT USE IN PRODUCTION.]))
1805 FORCE_FULL_LINK="no"
1806 if test "$enable_force_full_link" == "yes"; then
1807 FORCE_FULL_LINK="yes"
1810 AM_CONDITIONAL(FORCE_LINK, test "$FORCE_FULL_LINK" == "yes")
1812 ##############################################################
1813 ## demo_tools module
1814 ##############################################################
1816 DEMOTOOLS_ENABLE=yes
1818 if test "$GUI_ENABLE" = no; then
1822 AC_SUBST(DEMOTOOLS_ENABLE)
1824 ##############################################################
1825 ## graphics/renderer/graphic_export module
1826 ##############################################################
1830 if test "$GUI_ENABLE" = no; then
1834 AC_SUBST(GRAPHICS_ENABLE)
1836 #########################
1838 #########################
1841 LT_INIT([shared dlopen disable-static])
1843 # Avoid to link all the dep from others libraries (*.la included by LIBADD)
1846 # Check to see if building shared libraries
1847 libtool_build_shared_libs=no
1848 if test "$enable_shared" = "yes"; then
1849 libtool_build_shared_libs=yes
1852 # Check to see if building static libraries
1853 libtool_build_static_libs=no
1854 if test "$enable_static" = "yes"; then
1855 libtool_build_static_libs=yes
1858 # AM_CONDITIONAL(ENABLE_STATIC, test "$libtool_build_static_libs" = yes)
1859 # Fake to disable the static build
1860 AM_CONDITIONAL(ENABLE_STATIC, test "$libtool_build_static_libs" = xxxx)
1870 AC_PATH_PROG(SPLINT, splint, no)
1873 ##### Detect ccache and use it by default if available
1876 AC_ARG_ENABLE(ccache,
1877 AS_HELP_STRING([--disable-ccache],[Disable the use of ccache])
1879 AC_PATH_PROG(CCACHE, ccache)
1880 if test x"$CCACHE" != x -a "$enable_ccache" != no; then
1885 #######################
1886 ###### Creation of the header file (machine.h)
1887 #######################
1889 AC_DEFINE_UNQUOTED([PATH_SEPARATOR], ["$PATH_SEPARATOR"],
1890 [The default path separator character.])
1892 AH_TOP([#ifndef MACHINE_H
1894 /* This file defines global element configuration of the build host */
1899 #ifdef DIR_SEPARATOR
1900 #undef DIR_SEPARATOR
1902 #define DIR_SEPARATOR "/"
1904 #ifdef DIR_SEPARATORW
1905 #undef DIR_SEPARATORW
1907 #define DIR_SEPARATORW L"/"
1911 #endif /* MACHINE_H */
1914 # Define the standard extension of a dynamic library
1915 AC_DEFINE_UNQUOTED([SHARED_LIB_EXT],["$shrext_cmds"],[Extension of a shared library])
1916 AC_DEFINE_UNQUOTED([SHARED_LIB_EXTW],[L"$shrext_cmds"],[Extension of a shared library ( wide string )])
1921 ## Update the years in the various part of the code.
1924 if test ! -f modules/core/src/cpp/banner.cpp; then
1925 AC_MSG_ERROR([Could not find the Scilab banner file.])
1928 CURRENT_YEAR=`date "+%Y"`
1929 DETECTED_YEAR=`grep "Copyright (c) 2011-" modules/core/src/cpp/banner.cpp|sed -e "s/.*Copyright (c) 2011-\([[0-9]]*\).*/\1/g"`
1931 if test "$CURRENT_YEAR" != "$DETECTED_YEAR"; then
1932 sed -i -e "s| 2011-$DETECTED_YEAR | 2011-$CURRENT_YEAR |g" modules/core/src/cpp/banner.cpp modules/windows_tools/src/c/scilab_windows/console.c
1933 sed -i -e "s| 2011-$DETECTED_YEAR Scilab Enterprises| 2011-$CURRENT_YEAR Scilab Enterprises|g" etc/Info.plist.in
1934 sed -i -e "s|VALUE \"LegalCopyright\", \"Copyright (C) $DETECTED_YEAR|VALUE \"LegalCopyright\", \"Copyright (C) $CURRENT_YEAR|" $(find . -iname '*.rc')
1935 AC_MSG_WARN([New year ($CURRENT_YEAR) detected. Copyright files updated. Please commit them ASAP.])
1940 ## Make sure that the libstdc++ libgcc and libgfortran can be compiled as
1941 ## static if requested
1943 AC_CHECK_STDCPP_STATIC()
1949 # Stop to compile scilab when a warning is found ...
1950 # This stuff is at the end of the configure.ac because it causes some
1951 # problem with AC_COMPILE (the -Werror is added to the test)
1953 if test "$enable_stop_on_warning" = yes; then
1954 WARNING_CFLAGS="-Werror=implicit-function-declaration -Werror=declaration-after-statement "
1955 WARNING_CXXFLAGS="-Werror=implicit-function-declaration "
1958 # SCI_*FLAGS contains all defaults values detected on configure
1961 $CODECOVERAGE_CFLAGS \
1969 SCI_CXXFLAGS=$(echo \
1970 $STDCXX_11_CXXFLAGS \
1971 $LARGEFILE_CXXFLAGS \
1972 $CODECOVERAGE_CXXFLAGS \
1975 $COMPILER_CXXFLAGS \
1978 $BACKTRACE_CXXFLAGS \
1982 $CODECOVERAGE_FFLAGS \
1990 SCI_LDFLAGS=$(echo \
1991 $LARGEFILE_LDFLAGS \
1992 $CODECOVERAGE_LDFLAGS \
1998 $BACKTRACE_LDFLAGS \
2000 AC_SUBST(SCI_CFLAGS)
2001 AC_SUBST(SCI_CXXFLAGS)
2002 AC_SUBST(SCI_FFLAGS)
2003 AC_SUBST(SCI_LDFLAGS)
2007 desktop/images/icons/Makefile
2009 modules/threads/Makefile
2010 modules/ast/Makefile
2011 modules/functions_manager/Makefile
2012 modules/helptools/Makefile
2013 modules/data_structures/Makefile
2014 modules/differential_equations/Makefile
2015 modules/optimization/Makefile
2016 modules/elementary_functions/Makefile
2017 modules/special_functions/Makefile
2019 modules/completion/Makefile
2020 modules/history_manager/Makefile
2021 modules/jvm/Makefile
2022 modules/commons/Makefile
2023 modules/sound/Makefile
2024 modules/statistics/Makefile
2025 modules/mexlib/Makefile
2026 modules/sparse/Makefile
2027 modules/linear_algebra/Makefile
2028 modules/polynomials/Makefile
2029 modules/signal_processing/Makefile
2030 modules/arnoldi/Makefile
2031 modules/interpolation/Makefile
2032 modules/localization/Makefile
2033 modules/cacsd/Makefile
2034 modules/boolean/Makefile
2035 modules/integer/Makefile
2036 modules/fileio/Makefile
2037 modules/spreadsheet/Makefile
2038 modules/string/Makefile
2039 modules/time/Makefile
2040 modules/graphics/Makefile
2041 modules/graphic_export/Makefile
2042 modules/graphic_objects/Makefile
2043 modules/renderer/Makefile
2044 modules/action_binding/Makefile
2045 modules/gui/Makefile
2046 modules/mpi/Makefile
2047 modules/randlib/Makefile
2048 modules/tclsci/Makefile
2049 modules/windows_tools/Makefile
2050 modules/core/Makefile
2051 modules/prebuildjava/Makefile
2052 modules/api_scilab/Makefile
2053 modules/call_scilab/Makefile
2054 modules/types/Makefile
2055 modules/hdf5/Makefile
2056 modules/fftw/Makefile
2057 modules/umfpack/Makefile
2058 modules/scicos/Makefile
2059 modules/scicos_blocks/Makefile
2060 modules/functions/Makefile
2061 modules/dynamic_link/Makefile
2062 modules/overloading/Makefile
2063 modules/javasci/Makefile
2064 modules/m2sci/Makefile
2065 modules/compatibility_functions/Makefile
2066 modules/development_tools/Makefile
2067 modules/output_stream/Makefile
2068 modules/console/Makefile
2069 modules/demo_tools/Makefile
2070 modules/genetic_algorithms/Makefile
2071 modules/simulated_annealing/Makefile
2072 modules/parameters/Makefile
2073 modules/matio/Makefile
2074 modules/atoms/Makefile
2075 modules/xcos/Makefile
2076 modules/scinotes/Makefile
2077 modules/ui_data/Makefile
2078 modules/graph/Makefile
2079 modules/parallel/Makefile
2080 modules/modules_manager/Makefile
2081 modules/history_browser/Makefile
2082 modules/preferences/Makefile
2083 modules/xml/Makefile
2084 modules/external_objects/Makefile
2085 modules/external_objects_java/Makefile
2086 modules/slint/Makefile
2087 modules/coverage/Makefile
2094 etc/logging.properties
2096 scilab-lib.properties
2097 scilab-lib-doc.properties
2098 modules/helptools/etc/SciDocConf.xml
2099 modules/core/includes/version.h
2100 modules/atoms/etc/repositories
2101 modules/atoms/tests/unit_tests/repositories.orig
2104 # Detection of the module for the future version of Scilab 6
2105 # ie we detect module which ends with _yasp
2107 if test "$enable_yasp" = yes; then
2109 modules/development_tools/src/fake/Makefile
2113 # This script is used by Xcos in order to regenerate the function/block list
2114 AC_CONFIG_COMMANDS_POST([chmod +x $SCI_SRCDIR_FULL/modules/scicos_blocks/src/scripts/GenBlocks.sh $SCI_SRCDIR_FULL/modules/dynamic_link/src/scripts/scicompile.sh $SCI_SRCDIR_FULL/modules/dynamic_link/src/scripts/compilerDetection.sh $SCI_SRCDIR_FULL/modules/dynamic_link/src/scripts/configure])
2118 # To distribution packager, you can uncomment this stuff is you want to
2119 # disable the rpath issue
2120 # However, you will have to set all the LD_LIBRARY_PATH to .libs/ directory
2121 # since scilab is compiling macros and help into the source tree (ie before
2122 # the "make install")
2123 # You should consider using chrpath:
2124 # http://directory.fsf.org/project/chrpath/
2125 # to remove it before the make install
2129 # AC_MSG_RESULT([Fixing libtool for -rpath problems.])
2130 # sed < libtool > libtool-2 \
2131 # 's/^hardcode_libdir_flag_spec.*$/hardcode_libdir_flag_spec=" -D__LIBTOOL_IS_A_FOOL__ "/'
2132 # mv libtool-2 libtool
2140 echo "Scilab is configured as follows. Please verify that this configuration"
2141 echo "matches your expectations."
2143 echo "Host system type : $host"
2145 echo " Option Value"
2146 echo "-------------------------------------------------------------------------"
2147 echo "Shared libraries....... --enable-shared=$libtool_build_shared_libs"
2148 echo "Static libraries....... --enable-static=$libtool_build_static_libs"
2149 echo "GNU ld................. --with-gnu-ld=$with_gnu_ld"
2150 echo "Enable debug .......... --enable-debug=$enable_debug"
2151 echo "Enable debug C......... --enable-debug-C=$enable_debug_C"
2152 echo "Enable debug C++....... --enable-debug-CXX=$enable_debug_CXX"
2153 echo "Enable debug Java...... --enable-debug-java=$enable_debug_java"
2154 echo "Enable debug Fortran... --enable-debug-fortran=$enable_debug_fortran"
2155 echo "Enable stop on warning. --enable-stop-on-warning=$enable_stop_on_warning"
2158 echo "Compiler Configuration:"
2159 echo " Intel (--with-intelcompilers) .... = $with_intelcompilers"
2160 echo " GNU gcc (--with-gcc) ............. = $with_gcc"
2161 echo " GNU Fortran 95 (--with-gfortran) . = $with_gfortran"
2164 echo " Do not use TCL/TK (--without-tk) ................. = $with_tk"
2165 echo " TCL include (--with-tcl-include) ................. = $USER_TCL_INC_PATH"
2166 echo " TCL library (--with-tcl-library) ................. = $USER_TCL_LIB_PATH"
2167 echo " TK include (--with-tk-include) ................... = $USER_TK_INC_PATH"
2168 echo " TK library (--with-tk-library) ................... = $USER_TK_LIB_PATH"
2169 echo " Install XML Help (--with-install-help-xml) ....... = $with_install_help_xml"
2170 echo " Compilation tests (--enable-compilation-tests) ... = $COMPILATION_TESTS"
2171 echo " Make the package relocatable (--enable-relocatable)= $RELOCATABLE"
2172 echo " Use FFTW (--without-fftw) ........................ = $with_fftw"
2173 echo " Use MATIO (--without-matio) ...................... = $with_matio"
2175 echo " Compile with Scilab thirdparties ................. = $WITH_DEVTOOLS"
2178 if test "$with_gui" = no; then
2179 echo "Not using Xcos because of the option --without-gui"
2181 if test $XCOS_ENABLE = yes; then
2183 echo "Build modelica compiler (--without-modelica) ....... = $with_modelica"
2185 if test "$with_modelica" != no -a "$OCAMLC" != no -a "$OCAMLOPT" != no; then
2186 echo "Ocaml Configuration (for Modelica compiler):"
2187 echo " OCAMLC ............. = $OCAMLC"
2188 echo " OCAMLOPT ........... = $OCAMLOPT"
2189 echo " OCAMLDEP ........... = $OCAMLDEP"
2191 echo "Will not build Modelica compiler"
2194 echo "Not using Xcos"
2199 if test "$enable_code_coverage" = yes; then
2200 echo "Code coverage configuration:"
2201 echo " LCOV .............. = $LCOV"
2202 echo " GENHTML ........... = $GENHTML"
2204 echo "Not using code coverage"
2208 if test $OPENMP_ENABLE = yes; then
2209 echo "OpenMP Configuration:"
2210 echo "OpenMP CFLAGS ...... = $OPENMP_CFLAGS"
2211 echo "OpenMP CXXFLAGS .... = $OPENMP_CXXFLAGS"
2212 echo "OpenMP LIBS ........ = $OPENMP_LIBS"
2213 echo "OpenMP LDFLAGS ..... = $OPENMP_LDFLAGS"
2215 echo "Not using OpenMP"
2219 if test $FFTW_ENABLE = yes; then
2220 echo "FFTW Configuration:"
2221 echo " FFTW LIBS .......... = $FFTW3_LIB"
2222 echo " FFTW CFLAGS ........ = $FFTW3_CFLAGS"
2224 echo "Not using FFTW"
2228 echo "Eigen3 Configuration:"
2229 echo " EIGEN CPPFLAGS ...... = $EIGEN_CPPFLAGS"
2232 if test $MATIO_ENABLE = yes; then
2233 echo "MATIO Configuration:"
2234 echo " MATIO LIBS .......... = $MATIO_LIBS"
2235 echo " MATIO CFLAGS ........ = $MATIO_CFLAGS"
2237 echo "Not using MATIO"
2241 if test $UMFPACK_ENABLE = yes; then
2242 echo "UMFPACK Configuration:"
2243 echo " UMFPACK LIBS ....... = $UMFPACK_LIB"
2244 echo " UMFPACK CFLAGS ..... = $UMFPACK_CFLAGS"
2245 if test $SUITESPARSE = yes; then
2246 echo " UMFPACK SUITESPARSE = Yes"
2248 echo " UMFPACK SUITESPARSE = No"
2251 echo "Not using UMFPACK"
2256 echo "BLAS/LAPACK/ATLAS Configuration:"
2257 echo " BLAS LIBS ............. = $BLAS_LIBS"
2258 echo " BLAS TYPE ............. = $BLAS_TYPE"
2259 echo " LAPACK LIBS ........... = $LAPACK_LIBS"
2260 echo " LAPACK TYPE ........... = $LAPACK_TYPE"
2261 echo " ARPACK LIBS ........... = $ARPACK_LIBS"
2265 if test "$with_mpi" == yes; then
2266 echo "OpenMPI Configuration:"
2267 echo "OpenMPI LIBS ........... = $OPENMPI_LIBS"
2268 echo "OpenMPI C Compiler ..... = $OPENMPI_CC"
2269 echo "OpenMPI C++ Compiler ... = $OPENMPI_CXX"
2270 echo "OpenMPI F77 Compiler ... = $MPIF77"
2272 echo "Not using MPI"
2276 if test $BUILD_LOCALIZATION_ENABLE != no; then
2277 echo "Gettext/localization configuration:"
2278 echo " xgettext ............... = $XGETTEXT"
2279 echo " msgfmt ................ = $MSGFMT"
2280 echo " msgfmt_opts ............ = $MSGFMT_OPTS"
2281 echo " msgcat ................ = $MSGCAT"
2283 echo "Won't generate localization files"
2287 if test $HELP_ENABLE = yes; then
2288 echo "Documentation building configuration:"
2289 echo " Docbook XSL path ....... = $DOCBOOK_ROOT"
2290 echo " Saxon XSLT ............. = $SAXON"
2291 echo " XML commons external ... = $XML_APIS_EXT"
2293 echo "No documentation generated"
2297 echo "Java Configuration:"
2298 if test ! -z "$JAVAC"; then
2299 echo " JAVA_HOME ........... = $JAVA_HOME"
2300 echo " JAVAC ............... = $JAVAC"
2301 echo " JAVA_CLASSPATH ...... = $JAVA_CLASSPATH"
2302 echo " JAVA_VERSION ........ = $JAVA_VERSION"
2303 echo " JAVAC_FLAGS ......... = $JAVAC_FLAGS"
2304 echo " JAVA_JNI_INCLUDE .... = $JAVA_JNI_INCLUDE"
2305 echo " JAVA_JNI_LIBS ....... = $JAVA_JNI_LIBS"
2306 echo " JAVA_JNI_LIBS_PRELOAD = $JAVA_JNI_LIBS_PRELOAD"
2307 echo " JAVA ................ = $JAVA"
2308 echo " JAVADOC ............. = $JAVADOC"
2309 echo " JAR ................. = $JAR"
2310 echo " ANT ................. = $ANT"
2312 echo " JAVA disabled"
2317 echo "Java dependencies:"
2318 if test ! -z "$JAVAC"; then
2319 echo " Flexdock ............ = $FLEXDOCK"
2320 echo " JOGL 2............... = $JOGL2"
2321 echo " JOGL 2 LIBS (JNI) ... = $JOGL2_LIBS"
2322 echo " Gluegen 2 ........... = $GLUEGEN2_RT"
2323 echo " Gluegen 2 LIBS (JNI) = $GLUEGEN2_RT_LIBS"
2324 echo " Jeuclid (MathML) .... = $JEUCLID_CORE"
2325 echo " Jhall .............. = $JHALL"
2326 echo " Jrosetta (API) ...... = $JROSETTA_API"
2327 echo " Jrosetta (Engine) ... = $JROSETTA_ENGINE"
2328 echo " Commons Logging ..... = $COMMONS_LOGGING"
2329 echo " JGraph X ............ = $JGRAPHX"
2330 echo " SciRenderer ......... = $SCIRENDERER"
2331 echo " JLaTeXMath .......... = $JLATEXMATH"
2332 echo " ECJ ................. = $ECJ"
2336 if test ! -z "$JAVAC"; then
2337 echo "Documentation, graphic export:"
2338 echo " FOP (XML => PDF) .... = $FOP"
2339 echo " JLaTeXMath Fop ...... = $JLATEXMATH_FOP"
2340 echo " Batik (SVG) ......... = $BATIK"
2341 echo " Avalon Framework .... = $AVALON_FRAMEWORK"
2342 echo " Commons I/O ......... = $COMMONS_IO"
2343 echo " XML graphics commons = $XMLGRAPHICS_COMMONS"
2348 echo "Code quality (optional):"
2349 echo " Checkstyle .......... = $CHECKSTYLE"
2350 echo " Commons-beanutils ... = $COMMONS_BEANUTILS"
2351 echo " Antlr ............... = $ANTLR"
2352 echo " Junit4 .............. = $JUNIT4"
2353 echo " Hamcrest ............ = $HAMCREST"
2354 echo " Cobertura ........... = $COBERTURA"
2355 echo " splint .............. = $SPLINT"
2358 echo "TCL/TK configuration:"
2359 echo " TK_INC_PATH ........ = $TK_INC_PATH"
2360 echo " TCL_INC_PATH ....... = $TCL_INC_PATH"
2361 echo " TCLTK_LIBS ......... = $TCLTK_LIBS"
2362 echo " TCL_SERIAL_VERSION . = $TCL_SERIAL_VERSION"
2363 echo " TK_SERIAL_VERSION .. = $TK_SERIAL_VERSION"
2366 echo "XML configuration:"
2367 echo " XML_FLAGS .......... = $XML_FLAGS"
2368 echo " XML_LIBS ........... = $XML_LIBS"
2369 echo " XML_VERSION ........ = $XML_VERSION"
2372 echo "HDF5 configuration:"
2373 echo " HDF5 CFLAGS ......... = $HDF5_CFLAGS"
2374 echo " HDF5 LIBS ........... = $HDF5_LIBS"
2377 echo "PCRE configuration:"
2378 echo " PCRE_CFLAGS ........ = $PCRE_CFLAGS"
2379 echo " PCRE_LIBS .......... = $PCRE_LIBS"
2380 echo " PCRE_VERSION ....... = $PCRE_VERSION"
2383 echo "Regenerate Scilab's parser"
2384 if test "$enable_build_parser" != no; then
2385 echo " YACC ............... = $YACC"
2386 echo " LEX ................ = $LEX"
2387 echo " YFLAGS ............. = $YFLAGS"
2389 echo " Regenerate parser disabled (will use embedded sources)"
2393 echo "CURL configuration:"
2394 echo " CURL_CFLAGS ........ = $CURL_CFLAGS"
2395 echo " CURL_LIBS .......... = $CURL_LIBS"
2396 echo " CURL_VERSION ....... = $CURL_VERSION"
2399 echo "SWIG Configuration:"
2400 if test ! -z "$SWIG_BIN"; then
2401 echo " SWIG_BIN ........... = $SWIG_BIN"
2402 echo " SWIG_JAVA .......... = $SWIG_JAVA"
2404 echo " SWIG generation disabled"
2408 echo "GIWS Configuration:"
2409 if test ! -z "$GIWS_BIN"; then
2410 echo " GIWS_BIN ........... = $GIWS_BIN"
2412 echo " GIWS generation disabled"
2416 echo "Valgrind configuration:"
2417 echo " VALGRIND_CFLAGS .... = $VALGRIND_CFLAGS"
2418 echo " VALGRIND_LIBS ...... = $VALGRIND_LIBS"
2422 echo "Libtool config:"
2423 echo " objext .............. = $objext"
2424 echo " libext (static) ..... = $libext"
2425 echo " shrext_cmds ......... = $shrext_cmds"
2426 echo " exeext .............. = $exeext"
2430 echo "Compilation paths:"
2431 echo " srcdir .............. = $SCI_SRCDIR"
2432 echo " srcdir_full ......... = $SCI_SRCDIR_FULL"
2433 echo " builddir ............ = $SCI_BUILDDIR"
2434 if test "$SCI_SRCDIR_FULL" != "$SCI_BUILDDIR"; then
2435 echo " VPATH build ......... = Activated"
2439 echo "Platform information:"
2440 echo " host ........... = $host"
2441 echo " host_cpu ....... = $host_cpu"
2442 echo " host_vendor .... = $host_vendor"
2443 echo " host_os ... .... = $host_os"
2444 echo " hostname ....... = $ac_hostname"
2445 echo " CPU 64 bits .... = $IS_64_BITS_CPU"
2446 if test -n "$MAC_DETECTED_ARCH"; then
2447 echo " Mac OS X arch .. = $MAC_DETECTED_ARCH"
2448 echo " Mac OS X version = $macosx_version"
2452 echo "Options used to compile and link:"
2453 echo " prefix ......... = $prefix"
2454 echo " localedir ...... = $localedir"
2455 echo " VERSION ........ = $PACKAGE_VERSION"
2456 echo " CC ............. = $CC"
2457 echo " CFLAGS ......... = $CFLAGS"
2458 echo " SCI_CFLAGS ..... = $SCI_CFLAGS"
2459 echo " DEFS ........... = $DEFS"
2460 echo " LD ............. = $LD"
2461 echo " LDFLAGS ........ = $LDFLAGS"
2462 echo " SCI_LDFLAGS .... = $SCI_LDFLAGS"
2463 echo " LIBS ........... = $LIBS"
2464 echo " CXX ............ = $CXX"
2465 echo " CXXFLAGS ....... = $CXXFLAGS"
2466 echo " SCI_CXXFLAGS ... = $SCI_CXXFLAGS"
2467 echo " F77 ............ = $F77"
2468 echo " FFLAGS ......... = $FFLAGS"
2469 echo " SCI_FFLAGS ..... = $SCI_FFLAGS"
2470 echo " F77_LDFLAGS .... = $F77_LDFLAGS"
2471 echo " FLIBS...... .... = $FLIBS"
2472 echo " TERMCAP_LIB .... = $TERMCAP_LIB"