Move jit code into a dedicated modules (was in core)
[scilab.git] / scilab / configure.ac
1 #
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 #
7 # This file must be used under the terms of the CeCILL.
8 # This source file is licensed as described in the file COPYING, which
9 # you should have received as part of this distribution.  The terms
10 # are also available at
11 # http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
12 #
13
14 dnl Process this file with autoconf to produce a configure script.
15
16
17 AC_REVISION($Revision$)dnl
18 AC_INIT([Scilab],[6],[http://bugzilla.scilab.org/])
19 AC_PREREQ(2.68)
20 AC_CONFIG_MACRO_DIR([m4/])
21
22 SCI_BUILDDIR="`pwd`"
23 SCI_SRCDIR="$srcdir"
24 SCI_SRCDIR_FULL="`cd $SCI_SRCDIR && pwd`"
25
26 SCILAB_VERSION_MAJOR=6
27 SCILAB_VERSION_MINOR=0
28 SCILAB_VERSION_MAINTENANCE=0
29 AC_SUBST(SCILAB_VERSION_MAJOR)
30 AC_SUBST(SCILAB_VERSION_MINOR)
31 AC_SUBST(SCILAB_VERSION_MAINTENANCE)
32
33
34 SCILAB_LIBRARY_VERSION=$SCILAB_VERSION_MAJOR:$SCILAB_VERSION_MINOR:$SCILAB_VERSION_MAINTENANCE
35 AC_SUBST(SCILAB_LIBRARY_VERSION)
36
37 SCILAB_BINARY_VERSION=$SCILAB_VERSION_MAJOR.$SCILAB_VERSION_MINOR.$SCILAB_VERSION_MAINTENANCE
38 AC_SUBST(SCILAB_BINARY_VERSION)
39
40 #shared library versioning
41 #GENERIC_LIBRARY_VERSION=1:2:0
42 #                       | | |
43 #                +------+ | +---+
44 #                |        |     |
45 #             current:revision:age
46 #                |        |     |
47 #                |        |     +- increment if interfaces have been added
48 #                |        |        set to zero if interfaces have been removed
49 #                                  or changed
50 #                |        +- increment if source code has changed
51 #                |           set to zero if current is incremented
52 #                +- increment if interfaces have been added, removed or changed
53
54 # Check if we have a space in the path to the source tree
55 SPACE_IN_PATH=`echo "$SCI_SRCDIR_FULL"|grep " " > /dev/null; echo $?`
56 if test "$SPACE_IN_PATH" = "0"; then
57    AC_MSG_WARN([=====================================])
58    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...])
59    AC_MSG_WARN([=====================================])
60    sleep 180
61 fi
62
63 AC_CONFIG_AUX_DIR(config)
64 AC_CONFIG_HEADERS([modules/core/includes/machine.h])
65
66 # strip executable
67 AM_PROG_INSTALL_STRIP
68 AC_PROG_LN_S
69 AM_PROG_AR
70
71 AC_CUSTOM_LARGE_FILE
72
73 # In order to be able to change the scilab directory
74 # See http://wiki.debian.org/RpathIssue
75 AC_RELOCATABLE
76 AC_RELOCATABLE_LIBRARY
77 AC_LIB_RPATH
78
79 # If configure detect that timestamp changed,
80 # it tries to rebuild configure & makefile which can be a painmaker
81 # if the version is different
82 AM_MAINTAINER_MODE
83
84 AM_INIT_AUTOMAKE([-Wall foreign serial-tests]) # Not using -Werror because we override {C,F}FLAGS in order to disable optimisation
85
86 AC_CANONICAL_HOST
87
88 #################################
89 ## all the --with-* argument help
90 #################################
91
92
93 AC_ARG_ENABLE(debug,
94    AC_HELP_STRING([--enable-debug],[Do not optimize and print warning messages (C/C++/Fortran/Java code)]))
95
96 AC_ARG_ENABLE(debug-C,
97    AC_HELP_STRING([--enable-debug-C],[Do not optimize and print warning messages (C code)]))
98
99 AC_ARG_ENABLE(debug-CXX,
100    AC_HELP_STRING([--enable-debug-CXX],[Do not optimize and print warning messages (C++ code)]))
101
102 AC_ARG_ENABLE(debug-java,
103    AC_HELP_STRING([--enable-debug-java],[Print warning messages and line numbers (Java code)]))
104
105 AC_ARG_ENABLE(debug-fortran,
106    AC_HELP_STRING([--enable-debug-fortran],[Do not optimize and print warning messages (Fortran code)]))
107
108 AC_ARG_ENABLE(debug-linker,
109    AC_HELP_STRING([--enable-debug-linker],[Print warning messages from the linker (ld)]))
110
111 AC_ARG_ENABLE(code-coverage,
112    AC_HELP_STRING([--enable-code-coverage],[Enable code coverage]))
113
114 AC_ARG_ENABLE(stop-on-warning,
115    AC_HELP_STRING([--enable-stop-on-warning],[Stop the compilation on the first warning found in the C/C++ code]))
116
117 AC_ARG_WITH(gcc,
118     AC_HELP_STRING([--with-gcc],[Use gcc C compiler ]))
119
120 AC_ARG_WITH(gfortran,
121     AC_HELP_STRING([--with-gfortran],[Use gfortran, GNU Fortran 95 compiler]))
122
123 AC_ARG_WITH(intelcompilers,
124     AC_HELP_STRING([--with-intelcompilers],[Use Intel C (icc) and Fortran (ifort) proprietary compilers (GNU/Linux only) ]))
125
126 AC_ARG_WITH(tk,
127     AC_HELP_STRING([--without-tk],[Disable the interface to Tcl/Tk ]))
128
129 AC_ARG_WITH(javasci,
130     AC_HELP_STRING([--without-javasci],[Disable the Java/Scilab interface (javasci)]))
131
132 AC_ARG_ENABLE(compilation-tests,
133     AC_HELP_STRING([--enable-compilation-tests],[Enable unitary tests and checks at compilation time]))
134
135 AC_ARG_WITH(gui,
136     AC_HELP_STRING([--without-gui],[Disable the Scilab Graphical User Interface (GUI). Intended for embedded/clustering/grid Scilab ]))
137
138 AC_ARG_WITH(build-swig,
139     AC_HELP_STRING([--enable-build-swig=path],[Regenerate Java => C and Scilab => C wrappers produces by Swig]),
140     [with_build_swig=$withval],
141         [with_build_swig=no]
142         )
143
144
145 AC_ARG_ENABLE(build-giws,
146     AC_HELP_STRING([--enable-build-giws],[Regenerate C/C++ => Java wrappers produces by Giws]))
147
148 AC_ARG_ENABLE(build-parser,
149     AC_HELP_STRING([--enable-build-parser],[Regenerate code for the parser (Lex & YACC)]))
150
151 ################################################
152 ########## VMKIT Stuff
153 ################################################
154 AC_VMKIT()
155
156
157 ################################################
158 ########## compilator & misc programs detection
159 ################################################
160
161 AC_PROG_CPP
162 AC_PROG_GREP
163
164 ######
165 #### Mac OS X set of fink path with provided
166 ######
167
168 AC_ARG_WITH(fink_prefix,
169 AC_HELP_STRING([--with-fink-prefix],[Provide a fink prefix. Default: /sw/ ]))
170 # Need MacosX Version to specify some path.
171 case "$host_os" in
172      *Darwin* | *darwin*)
173               AC_GET_MACOSX_VERSION
174      ;;
175 esac
176
177 case "$host" in
178     *darwin*)
179         if test -n "$with_fink_prefix"; then
180             # If with-fink-prefix is provided, use the provided path to make sure that we will
181             # use it to detect dependencies (for example, gfortran is not provided in xcode.
182             # Therefor, we use the one in fink)
183             FINK_PREFIX="$with_fink_prefix/"
184
185             # Exec the init script of fink to make sure that the env is set
186             if test -f $with_fink_prefix/bin/init.sh; then
187                 echo "source $with_fink_prefix/bin/init.sh executed to set the env"
188                 source $with_fink_prefix/bin/init.sh
189             else
190                 AC_MSG_WARN([Could not find the fink init.sh script: $with_fink_prefix/bin/init.sh])
191             fi
192         else
193             FINK_PREFIX="/sw/"
194         fi
195
196         #Append to the default flags on Apple machines
197         CPPFLAGS="$CPPFLAGS -I$FINK_PREFIX/include/"
198         LDFLAGS="$LDFLAGS -L$FINK_PREFIX/lib/"
199         ;;
200 esac
201
202 AC_ARG_WITH(min_macosx_version,
203 AC_HELP_STRING([--with-min-macosx-version],[Force compilers to generate binaries compatible with MacOSX minimal version.]))
204 case "$host" in
205     *darwin*)
206     if test -n "$with_min_macosx_version"; then
207        MIN_MACOSX_VERSION=$with_min_macosx_version
208        #Append to the default flags on Apple machines
209        ARCH_CFLAGS="-mmacosx-version-min=$MIN_MACOSX_VERSION"
210        ARCH_CXXFLAGS="-mmacosx-version-min=$MIN_MACOSX_VERSION"
211        ARCH_FFLAGS="-mmacosx-version-min=$MIN_MACOSX_VERSION"
212        ARCH_LDFLAGS="-mmacosx-version-min=$MIN_MACOSX_VERSION"
213        # We need this to be passed to all linker commands
214        LDFLAGS="$LDFLAGS -mmacosx-version-min=$MIN_MACOSX_VERSION"
215     fi
216 ;;
217 esac
218
219
220 #####################################################
221 ## Look for pkg-config
222 #####################################################
223 PKG_PROG_PKG_CONFIG
224
225 #####################################################
226 ## check if options are correct (or not)
227 #####################################################
228
229 if test "$with_intelcompilers" = yes -a "$with_gcc" = yes; then
230     AC_MSG_ERROR([Conflicting options : you specified two compiler series])
231 fi
232
233 ######## fortran ########
234
235 if test "$with_gfortran" = yes; then
236    AC_PROG_F77(gfortran)
237    if test -z "$F77"; then
238      AC_MSG_ERROR([You asked me to use gfortran but i haven't been able to find it])
239     fi
240 fi
241
242 if test "$with_intelcompilers" = yes; then
243    AC_PROG_F77(ifc ifort)
244    if test -z "$F77"; then
245      AC_MSG_ERROR([You asked me to use ifc (intel fortran compiler) but i haven't been able to find it])
246     fi
247 fi
248
249 if test -z "$F77"; then
250 ## No Fortran compiler specified... Prefer gfortran and intel compilers
251    AC_PROG_F77([gfortran ifc ifort])
252    if test -z "$F77"; then
253         # Best effort to find a compiler (might be g77)
254         AC_PROG_F77
255    fi
256 fi
257
258
259 # case statements were introduced in fortran 90 so we can use that
260 # as a test to see if our compiler is fortran 90 compatible.
261 f90compatible=false
262 if test -z "$F77"; then
263   AC_MSG_ERROR([No fortran compiler found. Cannot compile scilab without a fortran compiler])
264 fi
265
266 AC_MSG_CHECKING([if $F77 is a fortran 90 compatible compiler])
267  f90compatible=false
268 AC_LANG_PUSH([Fortran 77])
269 AC_COMPILE_IFELSE([
270       PROGRAM hello
271         do 50 i = 1, 5
272            select case ( i )
273               case (1)
274                  print*, "case is 1, i is ", i
275               case ( 2 : 3 )
276                  print*, "case is 2 to 3, i is ", i
277               case default
278                  print*, "default case, i is ", i
279               end select
280  50           continue
281       END
282     ],
283     [AC_MSG_RESULT([yes])
284      AC_DEFINE([G95_FORTRAN],[],[uses G95 fortran])
285      f90compatible=true
286     ],
287     [AC_MSG_RESULT([no])]
288 )
289 AC_LANG_POP([Fortran 77])
290
291 ############ C ###############
292
293
294 if test "$with_gcc" = yes; then
295    AC_PROG_CC(gcc)
296    if test -z "$CC"; then
297      AC_MSG_ERROR([You asked me to use gcc but i haven't been able to find it])
298     fi
299 fi
300
301 if test "$with_intelcompilers" = yes; then
302    AC_PROG_CC(icc ecc)
303    if test -z "$CC"; then
304      AC_MSG_ERROR([You asked me to use icc (intel C compiler) but I haven't been able to find it])
305     fi
306 fi
307
308 if test -z "$CC"; then
309 # No C compiler specified... We rely on Autoconf to find the best
310    AC_PROG_CC
311 fi
312
313 if test -z "$CC"; then
314   AC_MSG_ERROR([No C Compiler found. Cannot compile Scilab without a C compiler])
315 fi
316
317 AC_CHECK_SIZEOF([int])
318 AC_CHECK_SIZEOF([long])
319
320 ### C++ ###
321 AC_PROG_CXX
322 # we can't just do something like
323 # AC_CHECK_PROG(cxx_present, $CXX, "yes", "no")
324 # because if the user has specified the full path of the desired C++ compiler then AC_CHECK_PROG
325 # will fail.  If AC_PROG_CXX fails to find a c++ compiler it will set CXX=g++ so just run AC_CHECK_PROG
326 # in this special case
327 case $CXX in
328     g++)
329         AC_CHECK_PROG([cxx_present], [$CXX], [yes], [no])
330         if test "x$cxx_present" != "xyes"; then
331             AC_MSG_ERROR([No C++ compiler found. Cannot compile scilab without a C++ compiler])
332         fi
333         ;;
334 esac
335
336 # for "subdir-objects"
337
338 AM_PROG_CC_C_O
339 AC_PROG_F77_C_O
340
341
342 # If this option is provided, enable the debug on C & C++
343 if test "$enable_stop_on_warning" = yes; then
344    enable_debug=yes
345 fi
346
347 if test "$enable_debug" = yes; then
348    enable_debug_fortran=yes
349    enable_debug_C=yes
350    enable_debug_CXX=yes
351    enable_debug_java=yes
352 else
353    enable_debug=no
354 fi
355
356 if test "$enable_debug_fortran" = yes; then
357    FFLAGS="`echo "$FFLAGS"| sed -e 's|-O[0-9+]|-O0|'`"
358 else
359    enable_debug_fortran=no
360 fi
361
362 if test "$enable_debug_C" = yes; then
363    CFLAGS="`echo "$CFLAGS"| sed -e 's|-O[0-9+]|-O0|'`"
364 else
365    enable_debug_C=no
366 fi
367
368 if test "$enable_debug_CXX" = yes; then
369    CXXFLAGS="`echo "$CXXFLAGS"| sed -e 's|-O[0-9+]|-O0|'`"
370 else
371    enable_debug_CXX=no
372 fi
373
374 if test "$enable_debug_java" = yes; then
375    LOGGING_LEVEL="INFO"
376 else
377    LOGGING_LEVEL="SEVERE"
378 fi
379 AC_SUBST(LOGGING_LEVEL)
380
381 if test "x${prefix}" = "xNONE"; then
382   prefix="${ac_default_prefix}"
383 fi
384
385 ###############################
386 ## get the version
387 ###############################
388
389 SCIVERSION=`cat $SCI_SRCDIR/Version.incl | sed -e "s/SCIVERSION=//" `
390
391 #############################################
392 ## Compilers and options according to machine
393 #############################################
394
395 ######################
396 ######## Set compilation options for intel C/Fortran compilers
397 ######################
398
399 if test "$with_intelcompilers" = yes; then
400    SCI_INTEL_COMPILER()
401 fi
402
403 ########### FORTRAN ######################
404
405
406 ######################
407 ######## With gfortran ...
408 ######################
409 if test -n "$F77"; then
410    case "$F77" in
411      gfortran*)
412         ## With GNU Compiler enable the code coverage
413         if test "$enable_code_coverage" = yes; then
414             CODECOVERAGE_FFLAGS="-fprofile-arcs -ftest-coverage"
415         fi
416      ;;
417      g77*)
418         AC_MSG_ERROR([g77 is no longer supported. Please consider switching to gfortran])
419      ;;
420    esac
421
422    if test "$enable_debug_fortran" = yes; then
423     AC_LANG_PUSH([Fortran 77])
424     for flag in -g -Wall -Wsurprising; do
425         case " ${FFLAGS} " in
426             *\ ${flag}\ *)
427                 # flag is already present
428                 ;;
429
430             *)
431                 AC_MSG_CHECKING([if the Fortran compiler accepts ${flag}])
432                 ac_save_FFLAGS="$FFLAGS"
433                 FFLAGS="$FFLAGS ${flag}"
434                 AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
435                     [AC_MSG_RESULT([yes])
436                      DEBUG_FFLAGS="${flag}"
437                     ],
438                     [AC_MSG_RESULT([no])]
439                 )
440                 ;;
441         esac
442     done
443     AC_LANG_POP([Fortran 77])
444    else
445       DEBUG_FFLAGS="-DNDEBUG"
446    fi
447       case "$host" in
448          x86_64-*-linux*)
449             ARCH_FFLAGS="-m64 -fPIC"
450                     ;;
451         # Dec Alpha OSF 4
452         alpha*-dec-osf4.*)
453           ARCH_FFLAGS="-fpe3"
454         ;;
455         alpha*-dec-osf*)
456             ARCH_FFLAGS="-fpe3 -switch nosqrt_recip"
457         ;;
458         rs6000-*-*)
459             ARCH_FFLAGS="-qcharlen=4096"
460             ;;
461         mips-*-ultrix*)
462             ARCH_FFLAGS="-O0 -fpe1"
463         ;;
464           *-*-hpux9.*)
465             ARCH_FFLAGS="+Obb1200 +E4 -Dhpux"
466         ;;
467           *-*-hpux10.*)
468             if test "$enable_debug_fortran" = yes; then
469                 ARCH_FFLAGS="+E4 +Z +DAportable -Dhpux"
470             else
471                 ARCH_FFLAGS="+O2 +E4 +Z +DAportable -Dhpux"
472             fi
473 #            ARCH_LDFLAGS="-Wl,+vnocompatwarnings,-E /usr/lib/libdld.sl"
474
475             ;;
476           *-*-hpux11.*)
477            if test "$enable_debug_fortran" = yes; then
478               ARCH_FFLAGS=" +Z +DAportable -Dhpux"
479              else
480               ARCH_FFLAGS="+O2 +Z +DAportable -Dhpux"
481            fi
482            ARCH_LDFLAGS="-ldld -lnsl -lU77 -lm"
483
484      ;;
485       esac
486
487 fi
488
489 #########################
490 # setting parameters according to system types
491 #########################
492
493 case "$host" in
494     *-*-hpux9.*|*-*-hpux10.*|*-*-hpux11.*)
495         HPUX=1
496     ;;
497     sparc-*)
498         SPARC=1
499     ;;
500     mips-sgi-irix*)
501       MIPS_SGI_IRIX=1
502     ;;
503      *-*-solaris*)
504      SOLARIS=1
505      ;;
506     *darwin*)
507       MACOSX=1
508     ;;
509 esac
510
511 AM_CONDITIONAL(IS_MACOSX, test -n "$MACOSX")
512 AM_CONDITIONAL(IS_HPUX, test -n "$HPUX")
513 AM_CONDITIONAL(IS_SPARC, test -n "$SPARC")
514 AM_CONDITIONAL(IS_SOLARIS, test -n "$SOLARIS")
515 AM_CONDITIONAL(IS_MIPS_SGI_IRIX, test -n "$MIPS_SGI_IRIX")
516
517
518
519 ############
520 ## C++
521 ############
522
523
524 if test -z "$CXX"; then
525   AC_MSG_ERROR([No C++ compiler found. Cannot compile scilab without a C++ compiler])
526 fi
527
528 case "$CXX" in
529     g++-* | g++ | ccache*g++ | ccache*g++-* )
530         ## With GNU C++ Compiler
531
532         # enable the code coverage
533         if test "$enable_code_coverage" = yes; then
534             CODECOVERAGE_CXXFLAGS="-fprofile-arcs -ftest-coverage"
535         fi
536
537         if test "$enable_debug_CXX" = yes; then
538             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             case "$host" in
540                 *-linux-gnu )
541                     # Only doing that under Linux
542                     DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -fdiagnostics-show-option -Werror=format-security"
543                 ;;
544             esac
545         else
546             DEBUG_CXXFLAGS="-DNDEBUG"
547         fi
548         COMPILER_CXXFLAGS="-fno-stack-protector " # bug 3131
549     ;;
550
551 esac
552
553 #### 64 bits detection
554 IS_64_BITS_CPU=false
555 case "$host" in
556          x86_64-*-linux-gnu | x86_64-linux-gnu | ia64-*-linux-gnu | alpha-*-linux-gnu | alpha-*-netbsd* | x86_64-*-netbsd* | sparc64-*-netbsd*)
557                 IS_64_BITS_CPU=true
558     ;;
559 esac
560
561 ##########"
562
563 case "$CC" in
564      gcc-* | gcc | ccache*gcc | ccache*gcc-* )
565    ## With GNU Compiler
566
567    # enable the code coverage
568    if test "$enable_code_coverage" = yes; then
569     CODECOVERAGE_CFLAGS="-fprofile-arcs -ftest-coverage"
570    fi
571
572    if test "$enable_debug_C" = yes; then
573       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"
574       # used to be -O
575       # -D_FORTIFY_SOURCE=2
576       case "$host" in
577       *-linux-gnu )
578       # Only doing that under Linux
579         if test "$enable_debug_linker" = yes; then
580             LDFLAGS="$LDFLAGS -Wl,--warn-common,-x"
581         fi
582           DEBUG_CFLAGS="$DEBUG_CFLAGS -fdiagnostics-show-option -Werror=format-security"
583           ;;
584           esac
585    else
586       DEBUG_CFLAGS="-DNDEBUG"
587    fi
588
589    COMPILER_CFLAGS="-fno-stack-protector " # bug 3131
590    # Explictly disable the as needed. It was disable by default but Ubuntu
591    # activated it by default since release 11.04. See bug #8961.
592    # Once all cyclic dependencies have been dropped, this line could be removed.
593    # Check if linker supports --as-needed and --no-as-needed options
594    if $LD --help 2>/dev/null | grep no-as-needed > /dev/null; then
595       COMPILER_LDFLAGS="$COMPILER_LDFLAGS -Wl,--no-as-needed"
596    fi
597
598
599    case "$host" in
600      x86_64-*-linux-gnu | x86_64-linux-gnu)
601         ARCH_CFLAGS="-m64"
602     ;;
603      alpha-*-linux-gnu)
604         ARCH_CFLAGS="-mieee-with-inexact"
605         ARCH_LDFLAGS="-mieee-with-inexact"
606     ;;
607      powerpc-*-linux-gnu)
608         ARCH_CFLAGS="-D_GNU_SOURCE"
609     ;;
610      *-*-solaris*)
611         ARCH_CFLAGS="-DSVR4 -DSYSV -Dsolaris"
612     ;;
613    *-*-freebsd*)
614      ARCH_CFLAGS="-Dfreebsd"
615      ARCH_LDFLAGS="-lm"
616      ;;
617
618   alpha-*-netbsd*)
619     ARCH_CFLAGS="-Dnetbsd -mieee"
620     ARCH_FFLAGS="-Dnetbsd -mieee"
621     ;;
622
623   *-*-netbsd*)
624     ARCH_CFLAGS="-Dnetbsd"
625     ;;
626
627   *-*-darwin*)
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"
633
634     case "$F77" in
635          gfortran-*|gfortran)
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"`"
638          ;;
639          *)
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"
642          ;;
643     esac
644     CC="$CC -arch $MAC_DETECTED_ARCH"
645     CXX="$CXX -arch $MAC_DETECTED_ARCH"
646     ;;
647 esac
648 ;; # end of the gcc case on the $CC
649    *)
650
651         ## CC compiler (not GCC)
652         if test "$enable_debug_C" != yes; then
653              ARCH_CFLAGS="-DNDEBUG"
654         fi
655
656 case "$host" in
657 # Dec Alpha OSF 4
658   alpha*-dec-osf4.*)
659       ARCH_CFLAGS="-std -ieee_with_inexact"
660       ARCH_LDFLAGS="-ieee_with_inexact"
661       ;;
662   alpha*-dec-osf*)
663       ARCH_CFLAGS="-ieee_with_inexact"
664       ARCH_LDFLAGS="-ieee_with_inexact"
665       ;;
666   rs6000-*-*) # IBM AIX RS 6000 (NO LONGER SUPPORTED)
667     ARCH_CFLAGS="-Daix -DSYSV"
668   ;;
669   mips-sgi-irix*) # SGI
670     ARCH_CFLAGS="-DSYSV -DSVR4"
671   ;;
672   *-*-hpux9.*)
673     ARCH_CFLAGS="-DSYSV -Dhpux"
674   ;;
675   *-*-hpux10.*) # HP 10
676     if test "$enable_debug_C" = yes; then
677       ARCH_CFLAGS="-DSYSV -Dhpux"
678     else
679       ARCH_CFLAGS="-DSYSV -Dhpux +Z +DAportable"
680     fi
681   ;;
682
683   *-*-hpux11.*) # HP 11
684     ARCH_CFLAGS="-DSYSV -Dhpux -Dhppa +Z +DAportable"
685   ;;
686   *-*-solaris*) # SUN SOLARIS
687     ARCH_CFLAGS="-DSVR4 -DSYSV -Dsolaris -I/usr/local/include/"
688     ARCH_LDFLAGS="-L/usr/local/lib/"
689   ;;
690 esac
691 ;; # end of not a gcc compiler
692 esac
693
694
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])
700    fi
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])
704    fi
705    CODECOVERAGE_LDFLAGS="-coverage -lgcov"
706 fi
707 AM_CONDITIONAL(CODE_COVERAGE, test "$enable_code_coverage" = yes)
708 AM_CONDITIONAL(ENABLE_DEBUG, test "$enable_debug" = yes)
709
710 # flag for possible compilations in configure
711 SCILIBS_CFLAGS=''
712 SCILIBS_CXXFLAGS=''
713 SCILIBS_FFLAGS=''
714
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).])
718    fi
719    AC_DEFINE([USE_DYNAMIC_STACK], [], [If we are building a 64 bits version])
720 fi
721
722 AM_CONDITIONAL(IS_64_BITS_CPU, test $IS_64_BITS_CPU = true)
723 AM_CONDITIONAL(USE_DYNAMIC_STACK, test $IS_64_BITS_CPU = true -o "$MACOSX" = "1")
724
725 ################
726 ## SSE
727 ## By default, for x86 CPU, enable the SSE.
728 ## Note that it is already the case with 64 bits CPU
729 ## (these extensions are enabled by default by gcc)
730 ################
731
732 case "$host" in
733      i*86-linux-gnu|i*86-*-linux-gnu)
734         SSE_CFLAGS="-msse"
735         SSE_FFLAGS="-msse"
736         SSE_CXXFLAGS="-msse"
737      ;;
738 esac
739
740 #######################
741 ## test for underscores (name mangling issues between C and fortran)
742 #######################
743 AC_CHECK_UNDERSCORE_FORTRAN()
744
745 ###############################
746 ### Regenerate the parser files
747 ### Flex & Yacc
748 ###############################
749
750 if test "$enable_build_parser" = yes; then
751
752    AC_PROG_LEX
753    if test -z "$LEX" -o "$LEX" = ":"; then
754           AC_MSG_ERROR([No implementation of Lex (flex, lex) detected. Please install it (package flex)])
755    fi
756
757    AC_PROG_YACC
758    if test -z "$YACC"; then
759           AC_MSG_ERROR([No implementation of Yacc (bison, yacc) detected. Please install it (package bison)])
760   fi
761 # Actually, AC_PROG_YACC is lying. It sometimes put yacc into $YACC even it
762 # hasn't been able to find it.
763 #  AC_CHECK_PROG(YACC_PRESENT, $YACC, AC_MSG_ERROR([No implementation of Yacc (bison, yacc) detected. Please install it (package bison)]) )
764
765    AC_CHECK_PROG(yacc_present, $YACC, "yes","no")
766    if test "x$yacc_present" != "xyes"; then
767       AC_MSG_ERROR([No implementation of Yacc (bison, yacc) detected. Please install it (package bison)])
768    fi
769
770 fi
771 AM_CONDITIONAL(BUILD_PARSER, test "$enable_build_parser" = yes)
772
773 #################
774 ## HDF5
775 #################
776
777 AC_HDF5()
778 # The Java detection is done after in this file.
779
780
781 #################
782 ## scirenderer
783 #################
784
785 AC_ARG_WITH(external-scirenderer,
786     AC_HELP_STRING([--with-external-scirenderer],[Disable the usage of the internal copy of scirenderer. Intended for packaging of Scilab]))
787
788 AM_CONDITIONAL(EXTERNAL_SCIRENDERER, test "$with_external_scirenderer" = yes)
789
790
791 #################
792 ## XCOS
793 #################
794
795 AC_ARG_WITH(xcos,
796     AC_HELP_STRING([--without-xcos],[Disable Xcos]))
797
798 AC_ARG_WITH(modelica,
799     AC_HELP_STRING([--without-modelica],[Disable the OCaml module (modelica)]))
800
801
802 if test "$with_gui" = no; then
803    AC_MSG_WARN([GUI is disabled. Disabling then xcos])
804    with_xcos=no
805 fi
806
807 XCOS_ENABLE=no
808
809 if test "$with_xcos" != no -a "$with_gui" != no; then
810    AC_DEFINE([WITH_XCOS], [], [With XCOS])
811
812    save_LIBS="$LIBS"
813
814    AC_CHECK_LIB([rt], [clock_gettime],
815               [RT_LIB="-lrt";
816               AC_DEFINE([HAVE_CLOCK_GETTIME], [1],[Whether clock_gettime is available]) ],
817         [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])]
818    )
819    LIBS="$save_LIBS"
820    AC_SUBST(RT_LIB)
821
822
823 #################
824 ## ocaml which only called when using Xcos
825 #################
826
827    if test "$with_modelica" != no; then
828       AC_CHECK_PROG_OCAML()
829    fi
830    XCOS_ENABLE=yes
831
832 fi
833
834 AC_SUBST(XCOS_ENABLE)
835
836 AM_CONDITIONAL(OCAML, test "$with_modelica" != no -a "$OCAMLC" != no -a "$OCAMLOPT" != no)
837 AM_CONDITIONAL(XCOS, test "$XCOS_ENABLE" != no)
838
839 ###########################
840 ## test for JAVA compiler
841 ###########################
842
843 if test "$with_javasci" != no -o "$with_gui" != no -o "$enable_build_help" != no; then
844
845    # See if --with-jdk command line argument is given
846      # Try to detect the installed JVM, this could be controlled
847      # by the above --with options
848      AC_JAVA_WITH_JDK
849      AC_JAVA_DETECT_JVM
850      case "$ac_java_jvm_version" in
851         1.6 | 1.7)
852         ;;
853         *)
854             AC_MSG_ERROR([Wrong version of Java. Expected at least 1.6. Found $ac_java_jvm_version])
855         ;;
856      esac
857
858    if test "$ac_java_jvm_name" = "jdk"; then
859         JAVA_HOME=$ac_java_jvm_dir
860         JAVA_VERSION=$ac_java_jvm_version
861 #     AC_JAVA_TOOLS
862
863         AC_JAVA_JNI_INCLUDE
864         JAVA_JNI_INCLUDE=$ac_java_jvm_jni_include_flags
865
866         case "$host_os" in
867              *Darwin* | *darwin*)
868                # Mac OS X does not link against the lib but uses -framework
869                JAVA_JNI_LIBS="-framework JavaVM"
870              ;;
871              *)
872                AC_JAVA_JNI_LIBS
873                JAVA_JNI_LIBS=$ac_java_jvm_jni_lib_flags
874                JAVA_JNI_LIBS_PRELOAD=$ac_java_jvm_ld_preload
875              ;;
876         esac
877
878         AC_JAVA_CLASSPATH
879         JAVA_CLASSPATH=$ac_java_classpath
880         AC_JAVA_TOOLS
881         AC_JAVA_ANT
882
883         case "$host_os" in
884              *Darwin* | *darwin*)
885                   JAVA_HOME=""
886              ;;
887         esac
888
889
890         if test "$with_gui" != no; then
891
892                 if test $XCOS_ENABLE = yes; then
893                    # jgraphx
894                    AC_JAVA_CHECK_PACKAGE([jgraphx],[com.mxgraph.model.mxCell],[Diagram design])
895                    JGRAPHX=$PACKAGE_JAR_FILE
896                    AC_SUBST(JGRAPHX)
897
898                    AC_JAVA_CHECK_VERSION_PACKAGE([jgraphx],[import com.mxgraph.view.mxGraph;],$JGRAPHX,[2.0.0.1],[mxGraph.VERSION],[],[])
899
900                 fi
901
902                 if test "$with_external_scirenderer" = yes; then
903                    # scirenderer
904                    AC_JAVA_CHECK_PACKAGE([scirenderer],[org.scilab.forge.scirenderer.PackageInfo],[Scilab Renderer])
905                    SCIRENDERER=$PACKAGE_JAR_FILE
906                    SCIRENDERER_CP=$PACKAGE_JAR_FILE
907
908                    AC_JAVA_CHECK_VERSION_PACKAGE([scirenderer],[import org.scilab.forge.scirenderer.PackageInfo;],$SCIRENDERER,[1.1.0],[PackageInfo.VERSION])
909                  else
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"
914                 fi
915                 AC_SUBST(SCIRENDERER)
916                 AC_SUBST(SCIRENDERER_CP)
917
918                # Docking system
919                 AC_JAVA_CHECK_PACKAGE([flexdock],[org.flexdock.docking.DockingManager],[Scilab Gui])
920                 FLEXDOCK=$PACKAGE_JAR_FILE
921                 AC_SUBST(FLEXDOCK)
922
923                 AC_JAVA_CHECK_VERSION_PACKAGE([flexdock],[import org.flexdock.util.Utilities;],$FLEXDOCK,[1.2.4],[Utilities.VERSION])
924
925                 # Swing look&feel implementations
926                 AC_JAVA_CHECK_PACKAGE([looks],[com.jgoodies.looks.common.MenuItemRenderer],[Scilab Gui - Look and feel],"yes")
927                 LOOKS=$PACKAGE_JAR_FILE
928
929                 # Named differently under ArchLinux or Fedora
930                 if test -z "$LOOKS"; then
931                     AC_JAVA_CHECK_PACKAGE([jgoodies-looks],[com.jgoodies.looks.common.MenuItemRenderer],[Scilab Gui - Look and feel])
932                     LOOKS=$PACKAGE_JAR_FILE
933                 fi
934                 AC_SUBST(LOOKS)
935
936                 #  Skin Look and Feel
937                 AC_JAVA_CHECK_PACKAGE([skinlf],[com.l2fprod.util.AccessUtils],[Scilab Gui - Skin Look and Feel])
938                 SKINLF=$PACKAGE_JAR_FILE
939                 AC_SUBST(SKINLF)
940
941                 # JOGL 2
942                 AC_JAVA_CHECK_PACKAGE([jogl2],[javax.media.opengl.glu.GLUnurbs],[Scilab 3D rendering - Version 2.0])
943                 JOGL2=$PACKAGE_JAR_FILE
944                 AC_SUBST(JOGL2)
945
946                 if test "$MACOSX" = 1; then
947                    echo "Check of the presence of libjogl.jnilib and libjogl_awt.jnilib disabled under Mac OS X"
948                 else
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."])],
964                        [-lGL])
965                    fi
966
967                    LDFLAGS=$LDFLAGS_save
968                 fi
969
970                 # JoGL Native <=> Java connector
971                 AC_JAVA_CHECK_PACKAGE([gluegen2-rt],[jogamp.common.os.MachineDescriptionRuntime],[Scilab 3D rendering])
972                 GLUEGEN2_RT=$PACKAGE_JAR_FILE
973                 AC_SUBST(GLUEGEN2_RT)
974
975                 if test "$MACOSX" = 1; then
976                    echo "Check of the presence of libgluegen-rt.jnilib disabled under Mac OS X"
977                 else
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.])],
987                    [-ldl])
988                    LDFLAGS=$LDFLAGS_save
989                 fi
990
991                 # Jhall
992                 AC_JAVA_CHECK_PACKAGE([jhall],[javax.help.JHelp],[Scilab Help Browser],"yes")
993                 JHALL=$PACKAGE_JAR_FILE
994
995                 # Named differently under Mandriva or Fedora
996                 if test -z "$JHALL"; then
997                     AC_JAVA_CHECK_PACKAGE([javahelp2],[javax.help.JHelp],[Scilab Help Browser])
998                     JHALL=$PACKAGE_JAR_FILE
999                 fi
1000                 AC_SUBST(JHALL)
1001
1002                 # Console API
1003                 AC_JAVA_CHECK_PACKAGE([jrosetta-API],[com.artenum.rosetta.interfaces.core.ConsoleConfiguration],[JRosetta : Console API Artenum / Scilab],"yes")
1004                 JROSETTA_API=$PACKAGE_JAR_FILE
1005                 if test -z "$JROSETTA_API"; then
1006                         AC_JAVA_CHECK_PACKAGE([jrosetta-api],[com.artenum.rosetta.interfaces.core.ConsoleConfiguration],[JRosetta : Console API Artenum / Scilab])
1007                         JROSETTA_API=$PACKAGE_JAR_FILE
1008                 fi
1009                 AC_SUBST(JROSETTA_API)
1010
1011                 # Console Core
1012                 AC_JAVA_CHECK_PACKAGE([jrosetta-engine],[com.artenum.rosetta.core.action.AbstractConsoleAction],[JRosetta : Console Core Artenum / Scilab])
1013                 JROSETTA_ENGINE=$PACKAGE_JAR_FILE
1014                 AC_SUBST(JROSETTA_ENGINE)
1015                 AC_JAVA_CHECK_VERSION_PACKAGE([jrosetta-engine],[import com.artenum.rosetta.util.ConfigurationBuilder;],$JROSETTA_ENGINE,[1.0.4],[ConfigurationBuilder.getVersion()])
1016
1017
1018                 # MathML rendering solution
1019                 # Used in both graphic & help
1020                 AC_JAVA_CHECK_PACKAGE([jeuclid-core],[net.sourceforge.jeuclid.LayoutContext],[MathML rendering solution (at least version 3.1.X)])
1021                 JEUCLID_CORE=$PACKAGE_JAR_FILE
1022                 AC_SUBST(JEUCLID_CORE)
1023
1024
1025                 ################ Mandatory for graphic_export features #####
1026                 # XML to PDF/other Translator
1027                 AC_JAVA_CHECK_PACKAGE([fop],[org.apache.fop.pdf.PDFInfo],[XML to PDF Translator (fop)])
1028                 FOP=$PACKAGE_JAR_FILE
1029                 AC_SUBST(FOP)
1030
1031                 # xml.apache.org SVG Library (under mandriva for example)
1032                 AC_JAVA_CHECK_PACKAGE([batik-all],[org.apache.batik.parser.Parser],[Apache SVG Library],"yes")
1033                 BATIK=$PACKAGE_JAR_FILE
1034
1035                 if test -z "$BATIK"; then
1036                    # Other other distribs
1037                    AC_JAVA_CHECK_PACKAGE([batik],[org.apache.batik.parser.Parser],[Apache SVG Library])
1038                    BATIK=$PACKAGE_JAR_FILE
1039                 fi
1040                 AC_SUBST(BATIK)
1041                 AC_JAVA_CHECK_VERSION_PACKAGE([batik],[import org.apache.batik.Version;],$BATIK,[1.7],[Version.getVersion()])
1042
1043                 # Commons I/O library
1044                 AC_JAVA_CHECK_PACKAGE([commons-io],[org.apache.commons.io.output.CountingOutputStream],[Commons I/O library])
1045                 COMMONS_IO=$PACKAGE_JAR_FILE
1046                 AC_SUBST(COMMONS_IO)
1047
1048                 # XML graphics common
1049                 AC_JAVA_CHECK_PACKAGE([xmlgraphics-commons],[org.apache.xmlgraphics.util.Service],[Commons graphics library])
1050                 XMLGRAPHICS_COMMONS=$PACKAGE_JAR_FILE
1051                 AC_SUBST(XMLGRAPHICS_COMMONS)
1052
1053                 # Avalon Framework (PDF)
1054                 AC_JAVA_CHECK_PACKAGE([avalon-framework],[org.apache.avalon.framework.configuration.ConfigurationException],[Common framework for Java server application])
1055                 AVALON_FRAMEWORK=$PACKAGE_JAR_FILE
1056                 AC_SUBST(AVALON_FRAMEWORK)
1057
1058                 # XML API EXT (conversion of a SVG => PNG)
1059                 AC_JAVA_CHECK_PACKAGE([xml-apis-ext],[org.w3c.dom.svg.SVGDocument],[XML Commons external code],"yes")
1060                 XML_APIS_EXT=$PACKAGE_JAR_FILE
1061
1062                 if test -z "$XML_APIS_EXT"; then
1063                     # Other other distribs (Ex: Fedora/Redhat)
1064                     AC_JAVA_CHECK_PACKAGE([xml-commons-apis-ext],[org.w3c.dom.svg.SVGDocument],[XML Commons external code])
1065                     XML_APIS_EXT=$PACKAGE_JAR_FILE
1066                 fi
1067                 AC_SUBST(XML_APIS_EXT)
1068
1069                 ################ END Mandatory for graphic_export features #####
1070
1071
1072                 # Logging (flexdock dep)
1073                 AC_JAVA_CHECK_PACKAGE([commons-logging],[org.apache.commons.logging.LogFactory],[Apache logging])
1074                 COMMONS_LOGGING=$PACKAGE_JAR_FILE
1075                 AC_SUBST(COMMONS_LOGGING)
1076
1077                 # JLaTeXMath
1078                 AC_JAVA_CHECK_PACKAGE([jlatexmath],[org.scilab.forge.jlatexmath.TeXFormula],[LaTex Rendering])
1079                 JLATEXMATH=$PACKAGE_JAR_FILE
1080                 AC_SUBST(JLATEXMATH)
1081
1082                 AC_JAVA_CHECK_VERSION_PACKAGE([jlatexmath],[import org.scilab.forge.jlatexmath.TeXFormula;],$JLATEXMATH,[1.0.2],[TeXFormula.VERSION])
1083
1084                 # JLaTeXMath FOP
1085                 AC_JAVA_CHECK_PACKAGE([jlatexmath-fop],[org.scilab.forge.jlatexmath.fop.JLaTeXMathObj],[LaTex Rendering - FOP plugin])
1086                 JLATEXMATH_FOP=$PACKAGE_JAR_FILE
1087                 AC_SUBST(JLATEXMATH_FOP)
1088
1089                 AC_DEFINE([WITH_GUI],[],[With the JAVA stuff (GUI, Console, JOGL...)])
1090
1091         fi
1092
1093         # Checkstyle (code checking)
1094         AC_JAVA_CHECK_PACKAGE([checkstyle],[com.puppycrawl.tools.checkstyle.CheckStyleTask],[Checkstyle - code checking],"yes")
1095         CHECKSTYLE=$PACKAGE_JAR_FILE
1096         AC_SUBST(CHECKSTYLE)
1097
1098         # Commons beanutils (dependency of checkstyle)
1099         AC_JAVA_CHECK_PACKAGE([commons-beanutils],[org.apache.commons.beanutils.Converter],[Bean utility],"yes")
1100         COMMONS_BEANUTILS=$PACKAGE_JAR_FILE
1101         AC_SUBST(COMMONS_BEANUTILS)
1102
1103         # antlr (dependency of checkstyle)
1104         AC_JAVA_CHECK_PACKAGE([antlr],[antlr.TokenStreamException],[language tool for constructing recognizers],"yes")
1105         ANTLR=$PACKAGE_JAR_FILE
1106         AC_SUBST(ANTLR)
1107
1108         # Junit 4 (java unitary test)
1109         AC_JAVA_CHECK_PACKAGE([junit4],[org.junit.Assert],[Junit4 - Unit tests],"yes")
1110         JUNIT4=$PACKAGE_JAR_FILE
1111         AC_SUBST(JUNIT4)
1112
1113         # Cobertura (java code coverage)
1114         AC_JAVA_CHECK_PACKAGE([cobertura],[net.sourceforge.cobertura.merge.Main],[cobertura - Java code coverage],"yes")
1115         COBERTURA=$PACKAGE_JAR_FILE
1116         AC_SUBST(COBERTURA)
1117
1118         # ASM (a dependency of Cobertura)
1119         AC_JAVA_CHECK_PACKAGE([asm3],[org.objectweb.asm.Type],[Java bytecode manipulation (dep of cobertura)],"yes")
1120         ASM3=$PACKAGE_JAR_FILE
1121         AC_SUBST(ASM3)
1122         if test -z "$ASM3"; then
1123                 AC_JAVA_CHECK_PACKAGE([asm],[org.objectweb.asm.Type],[Java bytecode manipulation (dep of cobertura)],"yes")
1124                 ASM3=$PACKAGE_JAR_FILE
1125         fi
1126
1127     else
1128         AC_MSG_WARN([Sun javac not found: I will not build the java interface])
1129         if test "$ac_java_jvm_name" != ""; then
1130             AC_MSG_WARN([We do not support $ac_java_jvm_name yet])
1131         fi
1132     fi
1133     AC_SUBST(JAVA_JNI_INCLUDE)
1134     AC_SUBST(JAVA_JNI_LIBS)
1135     AC_SUBST(JAVA_HOME)
1136
1137
1138     if test "$enable_debug_java" = yes; then
1139         JAVAC_DEBUG="on"
1140     else
1141         JAVAC_DEBUG="off"
1142     fi
1143     AC_SUBST(JAVAC_DEBUG)
1144
1145     if test "$with_build_swig" != no -a "$with_build_swig" != ""; then
1146         SWIG_PROG()
1147         SWIG_ENABLE_JAVA()
1148         SWIG_ENABLE_SCILAB()
1149         AC_SUBST(SWIG_BIN)
1150         AC_SUBST(SWIG_JAVA)
1151         AC_SUBST(SWIG_SCILAB)
1152
1153     fi
1154
1155     # Giws is the equivalent of Swig developed by the Scilab team
1156     # in order to provide a wrapper to Java from C/C++
1157     if test "$enable_build_giws" != no -a "$enable_build_giws" != ""; then
1158         AC_GIWS([1.3.0])
1159     fi
1160 fi
1161
1162 JAVA_ENABLE=yes
1163
1164 if test -z "$JAVAC"; then
1165    JAVA_ENABLE=no
1166 fi
1167
1168 AC_SUBST(JAVA_ENABLE)
1169
1170 # Xcos is not checked here because gui=no disables it
1171 AM_CONDITIONAL(NEED_JAVA, test "$with_javasci" != no -o "$with_gui" != no -o "$enable_build_help" != no)
1172 AM_CONDITIONAL(GUI, test "$with_gui" != no)
1173 AM_CONDITIONAL(JAVASCI, test "$with_javasci" != no)
1174 AM_CONDITIONAL(SWIG, test "$with_build_swig" != no -a "$with_build_swig" != "")
1175 AM_CONDITIONAL(GIWS, test "$enable_build_giws" != no  -a "$enable_build_giws" != "")
1176
1177 ##############################################################
1178 ## GUI module
1179 ##############################################################
1180
1181 GUI_ENABLE=no
1182
1183 if test "$JAVA_ENABLE" != no; then
1184    GUI_ENABLE=yes
1185 fi
1186
1187 if test "$with_gui" != no; then
1188    GUI_ENABLE=yes
1189 fi
1190
1191 AC_SUBST(GUI_ENABLE)
1192
1193 ##############################################################
1194 ## test for functions in standard C library and C math library
1195 ##############################################################
1196
1197 # Provided by unistd.h
1198 AC_CHECK_FUNCS([sleep] [usleep] [dup2] [getcwd] [getpagesize] [getpass])
1199 AC_CHECK_FUNCS([rmdir])
1200
1201 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])])
1202
1203 # Provided by <regex.h>
1204 AC_CHECK_FUNCS([regcomp])
1205
1206 # Provided by stdlib.h
1207 AC_CHECK_FUNCS([atexit] [putenv] [setenv])
1208
1209 # Provided by String.h
1210 AC_CHECK_FUNCS([bzero] [memmove] [memset] [strcasecmp] [strerror] [strchr] [strdup] [strpbrk] [strrchr] [strstr] [strtol])
1211
1212 # Provided by select.h
1213 AC_CHECK_FUNCS([select])
1214
1215 # Provided by pwd.h
1216 AC_CHECK_FUNCS([endpwent])
1217
1218 # Provided by netdb.h
1219 AC_CHECK_FUNCS([gethostbyaddr] [gethostbyname] [gethostname])
1220
1221 # Provided by time.h
1222 AC_CHECK_FUNCS([gettimeofday])
1223
1224 # Provided by ctype.h
1225 AC_CHECK_FUNCS([isascii])
1226
1227 # Provided by wctype.h
1228 AC_CHECK_FUNCS([iswprint])
1229
1230 # Provided by types.h
1231 AC_CHECK_FUNCS([mkdir])
1232
1233 # Provided by mman.h
1234 AC_CHECK_FUNCS([munmap])
1235
1236 # Provided by signal.h
1237 AC_CHECK_FUNCS([strsignal])
1238
1239
1240 # Check of the libm (lib math). Macro provided by libtool.
1241 save_LDFLAGS="$LDFLAGS"
1242 LT_LIB_M()
1243
1244 # Provided by math.h
1245
1246 LDFLAGS="$LDFLAGS $LIBM"
1247 AC_CHECK_FUNCS([pow] [sqrt] [finite] [floor] [exp10] [erf] [erfc] [isnan])
1248
1249 ### If isinf exists or not (used to not be the case under Solaris)
1250 ### See bug #4164
1251 AC_DEFINE([HAVE_ISINF],[1],[Have isinf function or macro equivalent])
1252 AC_CHECK_FUNC([isinf],,[
1253         AC_DEFINE([isinf(x)],[(!finite(x) && x==x)],[Provide a macro to do isinf])
1254 ])
1255 LIBS="$LIBS $LIBM"
1256 LDFLAGS="$save_LDFLAGS"
1257
1258 # Provided by regex.h
1259 AC_CHECK_FUNCS([re_comp])
1260
1261 # Provided by socket.h
1262 AC_CHECK_FUNCS([socket])
1263
1264 # Provided by utsname.h
1265 AC_CHECK_FUNCS([uname])
1266
1267 # Provided by wtloop.c
1268 AC_CHECK_FUNCS([setlocale])
1269
1270 # Function memcmp used in modules/fileio/src/c/xls.c
1271 AC_FUNC_MEMCMP
1272
1273 # function stat used in modules/core/src/c/link_std.c
1274 AC_FUNC_STAT
1275
1276 # function strtod used in modules/core/src/c/getval.c
1277 AC_FUNC_STRTOD
1278
1279 ########################
1280 ## test for header files
1281 ########################
1282
1283 AC_CHECK_HEADERS([limits.h values.h])
1284
1285 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])
1286
1287 # check header dirent
1288 AC_HEADER_DIRENT
1289
1290 # static struct timeval defined or not | used in modules/core/src/c/timer.c
1291 AC_HEADER_TIME
1292
1293 # check if the specific header is available or not | used in modules/core/src/c/link_SYSV.c
1294 AC_HEADER_SYS_WAIT
1295
1296
1297 #######################
1298 ## Test for structures ##
1299 #######################
1300 AC_CHECK_MEMBERS([struct stat.st_blksize])
1301 AC_CHECK_MEMBERS([struct stat.st_rdev])
1302
1303
1304 #######################
1305 ## MISC Test
1306 #######################
1307
1308 # gettext.  See http://www.gnu.org/software/hello/manual/gettext/AM_005fGNU_005fGETTEXT.html
1309 AM_GNU_GETTEXT([external])
1310 AM_GNU_GETTEXT_VERSION([0.16])
1311
1312 # function closedir used in modules/metanet/src/c/files.c
1313 AC_FUNC_CLOSEDIR_VOID
1314
1315 # Signals used in modules/core/src/c/realmain.c
1316 AC_TYPE_SIGNAL
1317
1318 # struct tm used in modules/core/src/c/history.c
1319 AC_STRUCT_TM
1320
1321 # st_blocks in the struct in modules/io/sci_gateway/c/intfilestat.c
1322 AC_STRUCT_ST_BLOCKS
1323
1324
1325 ##################
1326 ## termcap library
1327 ##################
1328
1329 # some systems may have a system curses implementation as well as ncurses
1330 # installed.  We need to be consistent in making sure we get the correct
1331 # library to go with the correct header and also provide a way for the user
1332 # to have some control over which is picked when both are available.
1333 #
1334 # For now, just check for -lcurses and then -lncurses.  The user control
1335 # may need to be revisited
1336
1337 TERMCAP_LIB=no
1338
1339 # Various observations:
1340 #
1341 #  ncurses
1342 #    - installs ncurses.h and possibly curses.h as a link to ncurses.h
1343 #    - installs -lncurses.
1344 #    - need to include term.h for tgetent() but tgetent() is in -lncurses.a
1345 #
1346 # curses as found in NetBSD-4 and NetBSD-5
1347 #    - installs curses.h
1348 #    - need to include termcap.h and link with -ltermcap for tgetent()
1349 #
1350
1351 AC_CHECK_LIB([curses],[main])
1352 if test $ac_cv_lib_curses_main = no ; then
1353     AC_CHECK_LIB([ncurses],[main])
1354 fi
1355
1356 # make sure we have what we need for tgetent
1357 AC_SEARCH_LIBS([tgetent],[termcap])
1358
1359 AC_CHECK_HEADERS([ncurses.h curses.h])
1360
1361 if test "x$ac_cv_lib_curses_main" = "xyes" -o "x$ac_cv_lib_ncurses_main" = "xyes" ; then
1362   AC_DEFINE([HAVE_TERMCAP],[],[Have Term Cap])
1363 else
1364  AC_MSG_ERROR([No termcap library detected. Please install ncurses dev library (or termcap library)])
1365 fi
1366
1367 ##################
1368 ## other libraries
1369 ##################
1370
1371 AC_CHECK_LIB(dl, dlopen)
1372
1373 AC_SEARCH_LIBS([pthread_join],[pthread])
1374
1375 #################
1376 ## FFTW
1377 #################
1378
1379 AC_ARG_WITH(fftw,
1380     AC_HELP_STRING([--without-fftw],[Disable the interface to the FFTW 3 library]))
1381
1382 FFTW_ENABLE=no
1383 if test "$with_fftw" != no; then
1384    AC_FFTW()
1385    FFTW_ENABLE=yes
1386 fi
1387
1388 AC_SUBST(FFTW_ENABLE)
1389 AM_CONDITIONAL(FFTW, test "$with_fftw" != no)
1390
1391
1392 #################
1393 ## EIGEN
1394 #################
1395
1396 AC_EIGEN()
1397
1398
1399 #################
1400 ## MPI
1401 #################
1402
1403 # Disable by default the build of MPI:
1404 # * It is hard to package
1405 # * People are administrating cluster know about rebuilding packages
1406 # * They use their own MPI library
1407 AC_ARG_WITH(mpi,
1408     AC_HELP_STRING([--with-mpi],[compile with MPI library]))
1409
1410 MPI_ENABLE=no
1411 if test "$with_mpi" == yes; then
1412    AC_OPENMPI()
1413    # We will have to detect other implementation of OpenMPI
1414    MPI_ENABLE=yes
1415 fi
1416 AC_SUBST(MPI_ENABLE)
1417
1418 AM_CONDITIONAL(MPI, test "$with_mpi" == yes)
1419
1420 #################
1421 ## OpenMP
1422 #################
1423
1424 AC_ARG_WITH(openmp,
1425     AC_HELP_STRING([--without-openmp],[Disable the usage of OpenMP (parallelization of some algoritms)]))
1426
1427 OPENMP_ENABLE=no
1428 if test "$with_openmp" != no; then
1429 #   AC_OPENMP
1430     OPENMP_CFLAGS="-fopenmp"
1431     OPENMP_CXXFLAGS="-fopenmp"
1432     OPENMP_LIBS="-lgomp"
1433
1434     AC_CHECK_HEADERS([omp.h], [],
1435      [AC_MSG_ERROR([Could not find omp.h])])
1436
1437     OPENMP_ENABLE=yes
1438 fi
1439 AC_SUBST(OPENMP_ENABLE)
1440 AC_SUBST(OPENMP_CFLAGS)
1441 AC_SUBST(OPENMP_CXXFLAGS)
1442 AC_SUBST(OPENMP_LIBS)
1443
1444 AM_CONDITIONAL(OPENMP, test "$with_openmp" != no)
1445
1446
1447 #######################
1448 ## Test for libxml
1449 #######################
1450
1451 AC_LIBXML2()
1452
1453 #######################
1454 ## Test for gettext
1455 #######################
1456
1457 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"
1458 ALL_LINGUAS_DOC="en_US fr_FR pt_BR ja_JP ru_RU"
1459
1460 AC_ARG_ENABLE(build-localization,
1461         AC_HELP_STRING([--disable-build-localization],[Disable the localization build])
1462         )
1463 BUILD_LOCALIZATION_ENABLE=no
1464
1465 if test "$enable_build_localization" != no; then
1466
1467    AC_SUBST(ALL_LINGUAS)
1468    AC_SUBST(ALL_LINGUAS_DOC)
1469    AC_CHECK_FUNCS([bind_textdomain_codeset])
1470
1471    AC_PATH_PROG(MSGCAT, msgcat, no)
1472 #   AC_PATH_PROG(MSGFMT, msgfmt, no)
1473 #   AC_PATH_PROG(XGETTEXT, xgettext, no)
1474
1475    if test x$MSGFMT = xno; then
1476       AC_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 ])
1477       fi
1478     if test x$MSGCAT = xno; then
1479       AC_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 ])
1480     fi
1481     BUILD_LOCALIZATION_ENABLE=yes
1482 fi
1483 AM_CONDITIONAL(GENERATE_LOCALIZATION_FILES, test "$BUILD_LOCALIZATION_ENABLE" = yes)
1484
1485 #######################
1486 ## Test for blas/Atlas and lapack
1487 #######################
1488 AC_MSG_CHECKING([if BLAS, ATLAS or MKL is available])
1489 echo ""
1490 ACX_BLAS(
1491         [AC_MSG_RESULT([$BLAS_TYPE found])]
1492         ,
1493         AC_MSG_ERROR([Impossible to find a BLAS compatible library (see BLAS or ATLAS).])
1494         )
1495
1496 AC_MSG_CHECKING([if LAPACK is available])
1497 echo ""
1498 ACX_LAPACK(
1499         [AC_MSG_RESULT([$LAPACK_TYPE found])],
1500         AC_MSG_ERROR([Impossible to find the LAPACK library.])
1501         )
1502
1503
1504 AC_ARG_WITH(arpack-ng,
1505     AC_HELP_STRING([--without-arpack-ng],[Disable the interface to ARPACK-NG]))
1506
1507 ARPACK_NG=no
1508 if test "$with_arpack_ng" != no; then
1509    ARPACK_NG=yes
1510    AC_MSG_CHECKING([if ARPACK-NG is available])
1511 echo ""
1512 ACX_ARPACK(
1513         [AC_MSG_RESULT([ARPACK-NG library found])],
1514         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/ ).])
1515         )
1516
1517 CHECK_ARPACK_OK(
1518 [AC_MSG_RESULT([Working ARPACK-NG library found (probably ARPACK-NG or a patched version of ARPACK)])],
1519 [AC_MSG_ERROR([ARPACK library found, but seems not to work properly. Please make sure you are using arpack-ng])
1520 ])
1521 else
1522    AC_MSG_CHECKING([Skip ARPACK-NG detection])
1523 fi
1524
1525 AM_CONDITIONAL(ARPACK_NG, test "$ARPACK_NG" != "no")
1526
1527
1528 #################
1529 ## UMFPACK
1530 #################
1531
1532 AC_ARG_WITH(umfpack,
1533     AC_HELP_STRING([--without-umfpack],[Disable the interface to the UMFPACK library]))
1534
1535 UMFPACK_ENABLE=no
1536 if test "$with_umfpack" != no; then
1537    AC_UMFPACK([$BLAS_LIBS])
1538    UMFPACK_ENABLE=yes
1539 fi
1540
1541 AC_SUBST(UMFPACK_ENABLE)
1542 AM_CONDITIONAL(UMFPACK, test "$with_umfpack" != no)
1543
1544 #######################
1545 ## Test for PCRE
1546 #######################
1547
1548 AC_PCRE()
1549
1550 #######################
1551 ## Test for CURL
1552 #######################
1553
1554 AC_CURL()
1555
1556 #################
1557 ## Tcl/Tk library
1558 #################
1559
1560 WITH_TKSCI=no
1561 if test "$with_tk" != no; then
1562    if test "$MACOSX" = "1"; then
1563       AC_MSG_ERROR([Due to technical constraints, Tcl/Tk must be disabled under Mac OS X (--without-tk)])
1564    fi
1565
1566     # check user arguments
1567     USER_TCL_LIB_PATH=""
1568     USER_TCL_INC_PATH=""
1569     AC_ARG_WITH(tcl-library,
1570         AC_HELP_STRING([--with-tcl-library=DIR],[Set the path to the TCL library]),
1571         [  USER_TCL_LIB_PATH=$withval
1572     ])
1573     AC_ARG_WITH(tcl-include,
1574         AC_HELP_STRING([--with-tcl-include=DIR],[Set the path to the TCL headers]),
1575         [  USER_TCL_INC_PATH=$withval
1576     ])
1577
1578     USER_TK_LIB_PATH=$USER_TCL_LIB_PATH
1579     USER_TK_INC_PATH=$USER_TCL_INC_PATH
1580
1581     AC_ARG_WITH(tk-library,
1582         AC_HELP_STRING([--with-tk-library=DIR],[Set the path to the TK library]),
1583         [  USER_TK_LIB_PATH=$withval
1584     ])
1585
1586     AC_ARG_WITH(tk-include,
1587         AC_HELP_STRING([--with-tk-include=DIR],[Set the path to the TK headers]),
1588         [  USER_TK_INC_PATH=$withval
1589     ])
1590
1591 ###########################
1592 ########## X11 checks
1593 ###########################
1594         ## This check is mandatory since tk needs Xlib headers and libs
1595         AC_PATH_XTRA
1596         ##
1597
1598     saved_cflags="$CFLAGS"
1599     saved_ldflags="$LDFLAGS"
1600     saved_cppflags="$CXXFLAGS"
1601
1602     AC_CHECK_LIB([dl], [main], [TCLTK_LIBS=" -ldl"])
1603     AC_CHECK_TCLTK
1604
1605     # set variables
1606     if test "$WITH_TKSCI" = yes; then
1607         AC_DEFINE([WITH_TK], [], [With TK])
1608     else
1609         AC_MSG_ERROR([TCL/TK not found. Use --without-tk or specify the librairies and include paths manually])
1610     fi
1611
1612     AC_SUBST(TCLTK_LIBS)
1613     AC_SUBST(TCL_INC_PATH)
1614     AC_SUBST(TK_INC_PATH)
1615
1616 fi
1617 AC_SUBST(WITH_TKSCI)
1618 AM_CONDITIONAL(TCLTK, test "$WITH_TKSCI" = yes)
1619
1620 #################
1621 ## MATIO LIBRARY (MAT File I/O Library)
1622 #################
1623
1624
1625 AC_ARG_WITH(matio,
1626     AC_HELP_STRING([--without-matio],[Disable the interface to Matio (MAT File I/O library)]))
1627
1628 AC_ARG_WITH(matio_include,
1629         AC_HELP_STRING([--with-matio-include=DIR],[Set the path to the MATIO headers]),
1630         [with_matio_include="-I$withval"], [])
1631
1632 AC_ARG_WITH(matio_library,
1633         AC_HELP_STRING([--with-matio-library=DIR],[Set the path to the MATIO libraries]),
1634         [with_matio_library="-L$withval"], [])
1635
1636 MATIO_ENABLE=no
1637
1638 if test "$with_matio" != no; then
1639    if test -n "$with_matio_include" -o -n "$with_matio_library" ; then
1640       MATIO_CFLAGS="$with_matio_include"
1641       MATIO_LIBS="$with_matio_library -lm -lz -lmatio -lhdf5"
1642    else
1643       PKG_CHECK_MODULES(MATIO, [matio >= 1.5.0])
1644    fi
1645
1646    save_CFLAGS="$CFLAGS"
1647    save_LIBS="$LIBS"
1648
1649    CFLAGS="$CFLAGS $MATIO_CFLAGS"
1650    LIBS="$LIBS $MATIO_LIBS"
1651
1652    AC_CHECK_HEADERS([matio.h], [],
1653      [AC_MSG_ERROR([Invalid MATIO_CFLAGS returned by pkg-config. Try to define MATIO_CFLAGS.])])
1654    AC_CHECK_LIB([matio], [Mat_Open], [],
1655      [AC_MSG_ERROR([Invalid MATIO_LIBS returned by pkg-config. Try to define MATIO_LIBS.])])
1656
1657    LIBS="$save_LIBS"
1658    CFLAGS="$save_CFLAGS"
1659
1660    AC_DEFINE([WITH_MATIO], [], [With the MATIO library])
1661    MATIO_ENABLE=yes
1662
1663    AC_SUBST(MATIO_LIBS)
1664    AC_SUBST(MATIO_CFLAGS)
1665 fi
1666
1667
1668 AC_SUBST(MATIO_ENABLE)
1669 AM_CONDITIONAL(MATIO, test "$with_matio" != no)
1670
1671 #############################
1672 ## Documentation management #
1673 #############################
1674
1675 HELP_ENABLE=yes
1676
1677 AC_ARG_ENABLE(build-help,
1678         AC_HELP_STRING([--disable-build-help],[Disable the help build])
1679         )
1680
1681 if test "$enable_build_help" != no; then
1682     AC_DOCBOOK()
1683 else
1684     HELP_ENABLE=no
1685 fi
1686
1687 if test "$JAVA_ENABLE" = no; then
1688     HELP_ENABLE=no
1689 fi
1690
1691 AC_SUBST(HELP_ENABLE)
1692
1693 AM_CONDITIONAL(BUILD_HELP, test $HELP_ENABLE = yes)
1694
1695 ## Install XML help files ###
1696
1697 AC_ARG_WITH(install-help-xml,
1698         AC_HELP_STRING([--with-install-help-xml],[make install will install XML files])
1699         )
1700 HELP_INSTALL_ENABLE=no
1701 if test "$with_install_help_xml" != no -a "$with_install_help_xml" != ""; then
1702    HELP_INSTALL_ENABLE=yes
1703 fi
1704 AM_CONDITIONAL(INSTALL_HELP_XML, test "$HELP_INSTALL_ENABLE" != "")
1705
1706 ## Doxygen help generation
1707 AC_ARG_ENABLE(build-doxygen,
1708     AC_HELP_STRING([--enable-build-doxygen],[Generate doxygen C/C++ documentation]))
1709
1710 DOXYGEN_ENABLE=yes
1711 if test "$enable_build_doxygen" != no -a "$enable_build_doxygen" != ""; then
1712     AC_DOXYGEN()
1713 else
1714     DOXYGEN_ENABLE=no
1715 fi
1716 AM_CONDITIONAL(DOXYGEN, test $DOXYGEN_ENABLE = yes)
1717
1718 ##############################################################
1719 ## Javasci module
1720 ##############################################################
1721
1722 JAVASCI_ENABLE=yes
1723
1724 if test "$JAVA_ENABLE" = no -o "$JAVASCI" = no; then
1725    JAVASCI_ENABLE=no
1726 fi
1727
1728 AC_SUBST(JAVASCI_ENABLE)
1729
1730
1731 ##############################################################
1732 ## Enable test at compilation time
1733 ##############################################################
1734
1735 COMPILATION_TESTS=no
1736 if test "$enable_compilation_tests" != no -a "$enable_compilation_tests" != ""; then
1737    COMPILATION_TESTS=yes
1738 fi
1739
1740 if test COMPILATION_TESTS=yes -a "$JUNIT4" == ""; then
1741    AC_MSG_WARN([--enable-compilation-tests deactivated: Could not find Junit4"])
1742    COMPILATION_TESTS=no
1743 fi
1744
1745 AM_CONDITIONAL(COMPILATION_TESTS, test "$COMPILATION_TESTS" != "no")
1746
1747 ##############################################################
1748 ## Enable the global force link
1749 ##############################################################
1750
1751 AC_ARG_ENABLE(force-full-link,
1752     AC_HELP_STRING([--enable-force-full-link],[Forces the explicit link between libscilab and some "on-the-fly" loaded libraries. NOT USE IN PRODUCTION.]))
1753
1754 FORCE_FULL_LINK="no"
1755 if test "$enable_force_full_link" == "yes"; then
1756     FORCE_FULL_LINK="yes"
1757 fi
1758
1759 AM_CONDITIONAL(FORCE_LINK, test "$FORCE_FULL_LINK" == "yes")
1760
1761 ##############################################################
1762 ## demo_tools module
1763 ##############################################################
1764
1765 DEMOTOOLS_ENABLE=yes
1766
1767 if test "$GUI_ENABLE" = no; then
1768    DEMOTOOLS_ENABLE=no
1769 fi
1770
1771 AC_SUBST(DEMOTOOLS_ENABLE)
1772
1773 ##############################################################
1774 ## graphics/renderer/graphic_export module
1775 ##############################################################
1776
1777 GRAPHICS_ENABLE=yes
1778
1779 if test "$GUI_ENABLE" = no; then
1780    GRAPHICS_ENABLE=no
1781 fi
1782
1783 AC_SUBST(GRAPHICS_ENABLE)
1784
1785 #########################
1786 ## libtool
1787 #########################
1788
1789 AM_DISABLE_STATIC
1790 LT_PREREQ([2.2.7])
1791 AC_PROG_LIBTOOL([shared dlopen])
1792 AM_PROG_LIBTOOL
1793
1794 # Eliminate -lstdc++ addition to postdeps for cross compiles.
1795 postdeps_CXX=`echo " $postdeps_CXX " | sed 's, -lstdc++ ,,g'`
1796
1797 # Avoid to link all the dep from others libraries (*.la included by LIBADD)
1798 link_all_deplibs=no
1799
1800 # Check to see if building shared libraries
1801 libtool_build_shared_libs=no
1802 if test "$enable_shared" = "yes"; then
1803   libtool_build_shared_libs=yes
1804 fi
1805
1806 # Check to see if building static libraries
1807 libtool_build_static_libs=no
1808 if test "$enable_static" = "yes"; then
1809   libtool_build_static_libs=yes
1810 fi
1811
1812 # AM_CONDITIONAL(ENABLE_STATIC, test "$libtool_build_static_libs" = yes)
1813 # Fake to disable the static build
1814 AM_CONDITIONAL(ENABLE_STATIC, test "$libtool_build_static_libs" = xxxx)
1815
1816 AC_C_CONST()
1817 AC_C_INLINE()
1818
1819 AC_BACKTRACE()
1820
1821 ##########
1822 ##### Code quality
1823 ##########
1824 AC_PATH_PROG(SPLINT, splint, no)
1825
1826 ##########
1827 ##### Detect ccache and use it by default if available
1828 ##########
1829
1830 AC_ARG_ENABLE(ccache,
1831         AC_HELP_STRING([--disable-ccache],[Disable the use of ccache])
1832         )
1833 AC_PATH_PROG(CCACHE, ccache)
1834 if test x"$CCACHE" != x -a "$enable_ccache" != no; then
1835   CC="$CCACHE $CC"
1836   CXX="$CCACHE $CXX"
1837 fi
1838
1839 #######################
1840 ###### Creation of the header file (machine.h)
1841 #######################
1842
1843 AC_DEFINE_UNQUOTED([PATH_SEPARATOR], ["$PATH_SEPARATOR"],
1844 [The default path separator character.])
1845
1846 AH_TOP([#ifndef MACHINE_H
1847 #define MACHINE_H
1848 /* This file defines global element configuration of the build host */
1849 ])
1850
1851 AH_BOTTOM([
1852
1853 #ifdef DIR_SEPARATOR
1854        #undef DIR_SEPARATOR
1855 #endif
1856 #define DIR_SEPARATOR "/"
1857
1858 #ifdef DIR_SEPARATORW
1859            #undef DIR_SEPARATORW
1860 #endif
1861 #define DIR_SEPARATORW L"/"
1862
1863 #endif /* MACHINE_H  */
1864 ])
1865
1866 # Define the standard extension of a dynamic library
1867 AC_DEFINE_UNQUOTED([SHARED_LIB_EXT],["$shrext_cmds"],[Extension of a shared library])
1868 AC_DEFINE_UNQUOTED([SHARED_LIB_EXTW],[L"$shrext_cmds"],[Extension of a shared library ( wide string )])
1869
1870
1871 #########
1872 ## Make sure that the libstdc++ and libgcc can be compiled as static
1873 #########
1874
1875 AC_CHECK_STDCPP_STATIC()
1876
1877 #################
1878 ## stop on warning
1879 #################
1880
1881 # Stop to compile scilab when a warning is found ...
1882 # This stuff is at the end of the configure.ac because it causes some
1883 # problem with AC_COMPILE (the -Werror is added to the test)
1884 #
1885 dnl @TODO : -O0 is only to bypass Stack shit... Must be removed.
1886 if test "$enable_stop_on_warning" = yes; then
1887     WARNING_CFLAGS="-Werror=implicit-function-declaration -O0"
1888     WARNING_CXXFLAGS="-Werror=implicit-function-declaration -O0"
1889 fi
1890
1891 # SCI_*FLAGS contains all defaults values detected on configure
1892 SCI_CFLAGS=$(echo   $LARGEFILE_CFLAGS   $CODECOVERAGE_CFLAGS   $DEBUG_CFLAGS   $ARCH_CFLAGS   $COMPILER_CFLAGS   $SCILIBS_CFLAGS   $SSE_CFLAGS   $BACKTRACE_CFLAGS   $WARNING_CFLAGS)
1893 SCI_CXXFLAGS=$(echo $LARGEFILE_CXXFLAGS $CODECOVERAGE_CXXFLAGS $DEBUG_CXXFLAGS $ARCH_CXXFLAGS $COMPILER_CXXFLAGS $SCILIBS_CXXFLAGS $SSE_CXXFLAGS $BACKTRACE_CXXFLAGS $WARNING_CXXFLAGS)
1894 SCI_FFLAGS=$(echo   $LARGEFILE_FFLAGS   $CODECOVERAGE_FFLAGS   $DEBUG_FFLAGS   $ARCH_FFLAGS   $COMPILER_FFLAGS   $SCILIBS_FFLAGS   $SSE_FFLAGS   $BACKTRACE_FFLAGS   $WARNING_FFLAGS)
1895 SCI_LDFLAGS=$(echo  $LARGEFILE_LDFLAGS  $CODECOVERAGE_LDFLAGS  $DEBUG_LDFLAGS  $ARCH_LDFLAGS  $COMPILER_LDFLAGS  $SCILIBS_LDFLAGS  $SSE_LDFLAGS  $BACKTRACE_LDFLAGS  $WARNING_LDFLAGS)
1896 AC_SUBST(SCI_CFLAGS)
1897 AC_SUBST(SCI_CXXFLAGS)
1898 AC_SUBST(SCI_FFLAGS)
1899 AC_SUBST(SCI_LDFLAGS)
1900
1901 AC_CONFIG_FILES([
1902 contrib/Makefile
1903 desktop/images/icons/Makefile
1904 desktop/Makefile
1905 modules/threads/Makefile
1906 modules/ast/Makefile
1907 modules/jit/Makefile
1908 modules/parse/Makefile
1909 modules/symbol/Makefile
1910 modules/functions_manager/Makefile
1911 modules/system_env/Makefile
1912 modules/helptools/Makefile
1913 modules/data_structures/Makefile
1914 modules/differential_equations/Makefile
1915 modules/optimization/Makefile
1916 modules/elementary_functions/Makefile
1917 modules/special_functions/Makefile
1918 modules/io/Makefile
1919 modules/completion/Makefile
1920 modules/history_manager/Makefile
1921 modules/jvm/Makefile
1922 modules/commons/Makefile
1923 modules/sound/Makefile
1924 modules/statistics/Makefile
1925 modules/mexlib/Makefile
1926 modules/sparse/Makefile
1927 modules/linear_algebra/Makefile
1928 modules/polynomials/Makefile
1929 modules/symbolic/Makefile
1930 modules/signal_processing/Makefile
1931 modules/arnoldi/Makefile
1932 modules/interpolation/Makefile
1933 modules/localization/Makefile
1934 modules/cacsd/Makefile
1935 modules/boolean/Makefile
1936 modules/integer/Makefile
1937 modules/fileio/Makefile
1938 modules/spreadsheet/Makefile
1939 modules/string/Makefile
1940 modules/time/Makefile
1941 modules/graphics/Makefile
1942 modules/graphic_export/Makefile
1943 modules/graphic_objects/Makefile
1944 modules/renderer/Makefile
1945 modules/action_binding/Makefile
1946 modules/gui/Makefile
1947 modules/mpi/Makefile
1948 modules/randlib/Makefile
1949 modules/tclsci/Makefile
1950 modules/windows_tools/Makefile
1951 modules/core/Makefile
1952 modules/prebuildjava/Makefile
1953 modules/api_scilab/Makefile
1954 modules/call_scilab/Makefile
1955 modules/types/Makefile
1956 modules/hdf5/Makefile
1957 modules/fftw/Makefile
1958 modules/umfpack/Makefile
1959 modules/scicos/Makefile
1960 modules/scicos_blocks/Makefile
1961 modules/functions/Makefile
1962 modules/dynamic_link/Makefile
1963 modules/overloading/Makefile
1964 modules/javasci/Makefile
1965 modules/m2sci/Makefile
1966 modules/compatibility_functions/Makefile
1967 modules/development_tools/Makefile
1968 modules/output_stream/Makefile
1969 modules/console/Makefile
1970 modules/demo_tools/Makefile
1971 modules/genetic_algorithms/Makefile
1972 modules/simulated_annealing/Makefile
1973 modules/parameters/Makefile
1974 modules/matio/Makefile
1975 modules/operations/Makefile
1976 modules/atoms/Makefile
1977 modules/xcos/Makefile
1978 modules/scinotes/Makefile
1979 modules/ui_data/Makefile
1980 modules/graph/Makefile
1981 modules/parallel/Makefile
1982 modules/modules_manager/Makefile
1983 modules/history_browser/Makefile
1984 modules/preferences/Makefile
1985 modules/xml/Makefile
1986 modules/external_objects/Makefile
1987 modules/external_objects_java/Makefile
1988 modules/Makefile
1989 Makefile
1990 scilab.pc
1991 etc/modules.xml
1992 etc/classpath.xml
1993 etc/Info.plist
1994 etc/logging.properties
1995 scilab.properties
1996 scilab-lib.properties
1997 scilab-lib-doc.properties
1998 modules/helptools/etc/SciDocConf.xml
1999 modules/core/includes/version.h
2000 ])
2001
2002 # Detection of the module for the future version of Scilab 6
2003 # ie we detect module which ends with _yasp
2004
2005 if test "$enable_yasp" = yes; then
2006    AC_CONFIG_FILES([
2007    modules/development_tools/src/fake/Makefile
2008   ])
2009 fi
2010
2011 # This script is used by Xcos in order to regenerate the function/block list
2012 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])
2013
2014 # Generate stack.h
2015 if test "$IS_64_BITS_CPU" = true -o "$MACOSX" = "1"; then
2016    stack_h_cpp_flags=-DUSE_DYNAMIC_STACK
2017 else
2018    stack_h_cpp_flags=
2019 fi
2020
2021 AC_CONFIG_COMMANDS([modules/core/includes/stack.h],
2022   [if ! $CPP $stack_h_cpp_flags - < $srcdir/modules/core/includes/stack.h.in |\
2023               $GREP -v '^#' > $srcdir/modules/core/includes/stack.h ; then
2024      AC_MSG_ERROR([stack.h generation failed])
2025    fi],
2026   [CPP="$CPP"
2027    GREP="$GREP"
2028    stack_h_cpp_flags="$stack_h_cpp_flags"
2029   ])
2030
2031 AC_OUTPUT
2032
2033 # To distribution packager, you can uncomment this stuff is you want to
2034 # disable the rpath issue
2035 # However, you will have to set all the LD_LIBRARY_PATH to .libs/ directory
2036 # since scilab is compiling macros and help into the source tree (ie before
2037 # the "make install")
2038 # You should consider using chrpath:
2039 # http://directory.fsf.org/project/chrpath/
2040 # to remove it before the make install
2041
2042 #case ${host} in
2043 #  *-pc-linux-gnu)
2044 #    AC_MSG_RESULT([Fixing libtool for -rpath problems.])
2045 #    sed < libtool > libtool-2 \
2046 #    's/^hardcode_libdir_flag_spec.*$/hardcode_libdir_flag_spec=" -D__LIBTOOL_IS_A_FOOL__ "/'
2047 #    mv libtool-2 libtool
2048 #    chmod 755 libtool
2049 #  ;;
2050 #esac
2051 #
2052
2053 echo ""
2054
2055 echo "Scilab is configured as follows. Please verify that this configuration"
2056 echo "matches your expectations."
2057 echo ""
2058 echo "Host system type : $host"
2059 echo ""
2060 echo "                  Option                        Value"
2061 echo "-------------------------------------------------------------------------"
2062 echo "Shared libraries.......      --enable-shared=$libtool_build_shared_libs"
2063 echo "Static libraries.......      --enable-static=$libtool_build_static_libs"
2064 echo "GNU ld.................      --with-gnu-ld=$with_gnu_ld"
2065 echo "Enable debug ..........      --enable-debug=$enable_debug"
2066 echo "Enable debug C.........      --enable-debug-C=$enable_debug_C"
2067 echo "Enable debug C++.......      --enable-debug-CXX=$enable_debug_CXX"
2068 echo "Enable debug Java......      --enable-debug-java=$enable_debug_java"
2069 echo "Enable debug Fortran...      --enable-debug-fortran=$enable_debug_fortran"
2070 echo "Enable stop on warning.      --enable-stop-on-warning=$enable_stop_on_warning"
2071
2072 echo ""
2073 echo "Compiler Configuration:"
2074 echo "  Intel (--with-intelcompilers) .... =        $with_intelcompilers"
2075 echo "  GNU gcc (--with-gcc) ............. =        $with_gcc"
2076 echo "  GNU Fortran 95 (--with-gfortran) . =        $with_gfortran"
2077 echo ""
2078 echo "Options:"
2079 echo "  Do not use TCL/TK (--without-tk) ................. = $with_tk"
2080 echo "  TCL include (--with-tcl-include) ................. = $USER_TCL_INC_PATH"
2081 echo "  TCL library (--with-tcl-library) ................. = $USER_TCL_LIB_PATH"
2082 echo "  TK include (--with-tk-include) ................... = $USER_TK_INC_PATH"
2083 echo "  TK library (--with-tk-library) ................... = $USER_TK_LIB_PATH"
2084 echo "  Install XML Help (--with-install-help-xml) ....... = $with_install_help_xml"
2085 echo "  Compilation tests (--enable-compilation-tests) ... = $COMPILATION_TESTS"
2086 echo "  Make the package relocatable (--enable-relocatable)= $RELOCATABLE"
2087 echo "  Use FFTW (--without-fftw) ........................ = $with_fftw"
2088 echo "  Use MATIO (--without-matio) ...................... = $with_matio"
2089
2090 echo ""
2091 if test "$with_gui" = no; then
2092    echo "Not using Xcos because of the option --without-gui"
2093 else
2094 if test $XCOS_ENABLE = yes; then
2095    echo "Xcos enable"
2096    echo "Build modelica compiler (--without-modelica) ....... = $with_modelica"
2097    echo ""
2098    if test "$with_ocaml" != no -a "$OCAMLC" != no -a "$OCAMLOPT" != no; then
2099      echo "Ocaml Configuration (for Modelica compiler):"
2100      echo "  OCAMLC ............. = $OCAMLC"
2101      echo "  OCAMLOPT ........... = $OCAMLOPT"
2102      echo "  OCAMLDEP ........... = $OCAMLDEP"
2103    else
2104      echo "Will not build Modelica compiler"
2105    fi
2106 else
2107    echo "Not using Xcos"
2108 fi
2109 fi
2110
2111 echo ""
2112 if test "$enable_code_coverage" = yes;  then
2113    echo "Code coverage configuration:"
2114    echo "  LCOV .............. = $LCOV"
2115    echo "  GENHTML ........... = $GENHTML"
2116 else
2117    echo "Not using code coverage"
2118 fi
2119
2120 echo ""
2121 if test $OPENMP_ENABLE = yes; then
2122    echo "OpenMP Configuration:"
2123    echo "OpenMP CFLAGS ...... = $OPENMP_CFLAGS"
2124    echo "OpenMP CXXFLAGS .... = $OPENMP_CXXFLAGS"
2125    echo "OpenMP LIBS ........ = $OPENMP_LIBS"
2126    echo "OpenMP LDFLAGS ..... = $OPENMP_LDFLAGS"
2127 else
2128    echo "Not using OpenMP"
2129 fi
2130
2131 echo ""
2132 if test $FFTW_ENABLE = yes;  then
2133    echo "FFTW Configuration:"
2134    echo "  FFTW LIBS .......... = $FFTW3_LIB"
2135    echo "  FFTW CFLAGS ........ = $FFTW3_CFLAGS"
2136 else
2137    echo "Not using FFTW"
2138 fi
2139
2140 echo ""
2141 echo "Eigen3 Configuration:"
2142 echo "  EIGEN CPPFLAGS ...... = $EIGEN_CPPFLAGS"
2143
2144 echo ""
2145 if test $MATIO_ENABLE = yes;  then
2146    echo "MATIO Configuration:"
2147    echo "  MATIO LIBS .......... = $MATIO_LIBS"
2148    echo "  MATIO CFLAGS ........ = $MATIO_CFLAGS"
2149 else
2150    echo "Not using MATIO"
2151 fi
2152
2153 echo ""
2154 if test $UMFPACK_ENABLE = yes;  then
2155    echo "UMFPACK Configuration:"
2156    echo "  UMFPACK LIBS ....... = $UMFPACK_LIB"
2157    echo "  UMFPACK CFLAGS ..... = $UMFPACK_CFLAGS"
2158    if test $SUITESPARSE = yes; then
2159       echo "  UMFPACK SUITESPARSE  = Yes"
2160    else
2161       echo "  UMFPACK SUITESPARSE  = No"
2162    fi
2163 else
2164    echo "Not using UMFPACK"
2165 fi
2166
2167
2168 echo ""
2169 echo "BLAS/LAPACK/ATLAS Configuration:"
2170 echo "  BLAS LIBS ............. = $BLAS_LIBS"
2171 echo "  BLAS TYPE ............. = $BLAS_TYPE"
2172 echo "  LAPACK LIBS ........... = $LAPACK_LIBS"
2173 echo "  LAPACK TYPE ........... = $LAPACK_TYPE"
2174 echo "  ARPACK LIBS ........... = $ARPACK_LIBS"
2175 echo ""
2176
2177
2178 if test "$with_mpi" == yes; then
2179    echo "OpenMPI Configuration:"
2180    echo "OpenMPI LIBS ........... = $OPENMPI_LIBS"
2181    echo "OpenMPI C Compiler ..... = $OPENMPI_CC"
2182    echo "OpenMPI C++ Compiler ... = $OPENMPI_CXX"
2183    echo "OpenMPI F77 Compiler ... = $MPIF77"
2184 else
2185    echo "Not using MPI"
2186 fi
2187
2188 echo ""
2189 if test $BUILD_LOCALIZATION_ENABLE != no; then
2190    echo "Gettext/localization configuration:"
2191    echo "  xgettext ............... = $XGETTEXT"
2192    echo "  msgfmt  ................ = $MSGFMT"
2193    echo "  msgfmt_opts ............ = $MSGFMT_OPTS"
2194    echo "  msgcat  ................ = $MSGCAT"
2195 else
2196    echo "Won't generate localization files"
2197 fi
2198
2199 echo ""
2200 if test $HELP_ENABLE = yes; then
2201    echo "Documentation building configuration:"
2202    echo "  Docbook XSL path ....... = $DOCBOOK_ROOT"
2203    echo "  Saxon XSLT ............. = $SAXON"
2204    echo "  XML commons external ... = $XML_APIS_EXT"
2205 else
2206    echo "No documentation generated"
2207 fi
2208
2209 echo ""
2210 echo "Java Configuration:"
2211 if test ! -z "$JAVAC"; then
2212 echo "  JAVA_HOME ........... = $JAVA_HOME"
2213 echo "  JAVAC ............... = $JAVAC"
2214 echo "  JAVA_CLASSPATH ...... = $JAVA_CLASSPATH"
2215 echo "  JAVA_VERSION ........ = $JAVA_VERSION"
2216 echo "  JAVAC_FLAGS ......... = $JAVAC_FLAGS"
2217 echo "  JAVA_JNI_INCLUDE .... = $JAVA_JNI_INCLUDE"
2218 echo "  JAVA_JNI_LIBS ....... = $JAVA_JNI_LIBS"
2219 echo "  JAVA_JNI_LIBS_PRELOAD = $JAVA_JNI_LIBS_PRELOAD"
2220 echo "  JAVA ................ = $JAVA"
2221 echo "  JAVADOC ............. = $JAVADOC"
2222 echo "  JAR ................. = $JAR"
2223 echo "  ANT ................. = $ANT"
2224 else
2225 echo "  JAVA disabled"
2226 fi
2227
2228
2229 echo ""
2230 echo "Java dependencies:"
2231 if test ! -z "$JAVAC"; then
2232 echo "  Flexdock ............ = $FLEXDOCK"
2233 echo "  JOGL 2............... = $JOGL2"
2234 echo "  JOGL 2 LIBS (JNI) ... = $JOGL2_LIBS"
2235 echo "  Gluegen 2 ........... = $GLUEGEN2_RT"
2236 echo "  Gluegen 2 LIBS (JNI)  = $GLUEGEN2_RT_LIBS"
2237 echo "  Jeuclid (MathML) .... = $JEUCLID_CORE"
2238 echo "  Jhall  .............. = $JHALL"
2239 echo "  Jrosetta (API) ...... = $JROSETTA_API"
2240 echo "  Jrosetta (Engine) ... = $JROSETTA_ENGINE"
2241 echo "  Commons Logging ..... = $COMMONS_LOGGING"
2242 echo "  JGraph X ............ = $JGRAPHX"
2243 echo "  SciRenderer ......... = $SCIRENDERER"
2244 echo "  JLaTeXMath .......... = $JLATEXMATH"
2245 fi
2246
2247 echo ""
2248 if test ! -z "$JAVAC"; then
2249 echo "Documentation, graphic export:"
2250 echo "  FOP (XML => PDF) .... = $FOP"
2251 echo "  JLaTeXMath Fop ...... = $JLATEXMATH_FOP"
2252 echo "  Batik (SVG) ......... = $BATIK"
2253 echo "  Avalon Framework .... = $AVALON_FRAMEWORK"
2254 echo "  Commons I/O ......... = $COMMONS_IO"
2255 echo "  XML graphics commons  = $XMLGRAPHICS_COMMONS"
2256 fi
2257
2258
2259 echo ""
2260 echo "Code quality (optional):"
2261 echo "  Checkstyle .......... = $CHECKSTYLE"
2262 echo "  Commons-beanutils ... = $COMMONS_BEANUTILS"
2263 echo "  Antlr ............... = $ANTLR"
2264 echo "  Junit4 .............. = $JUNIT4"
2265 echo "  Cobertura ........... = $COBERTURA"
2266 echo "  splint .............. = $SPLINT"
2267
2268 echo ""
2269 echo "TCL/TK configuration:"
2270 echo "  TK_INC_PATH ........ = $TK_INC_PATH"
2271 echo "  TCL_INC_PATH ....... = $TCL_INC_PATH"
2272 echo "  TCLTK_LIBS ......... = $TCLTK_LIBS"
2273 echo "  TCL_SERIAL_VERSION . = $TCL_SERIAL_VERSION"
2274 echo "  TK_SERIAL_VERSION .. = $TK_SERIAL_VERSION"
2275
2276 echo ""
2277 echo "XML configuration:"
2278 echo "  XML_FLAGS .......... = $XML_FLAGS"
2279 echo "  XML_LIBS ........... = $XML_LIBS"
2280 echo "  XML_VERSION ........ = $XML_VERSION"
2281
2282 echo ""
2283 echo "HDF5 configuration:"
2284 echo "  HDF5 CFLAGS ......... = $HDF5_CFLAGS"
2285 echo "  HDF5 LIBS ........... = $HDF5_LIBS"
2286
2287 if test -n "$with_vmkit" -o -n "$with_vmkit_package"; then
2288 echo ""
2289 echo "JIT configuration:"
2290 echo "  VMKIT_CPPFLAGS ..... = $VMKIT_CPPFLAGS"
2291 echo "  VMKIT_LDFLAGS ...... = $VMKIT_LDFLAGS"
2292 echo "  VMKIT_LDADD ........ = $VMKIT_LDADD"
2293 fi
2294
2295 echo ""
2296 echo "PCRE configuration:"
2297 echo "  PCRE_CFLAGS ........ = $PCRE_CFLAGS"
2298 echo "  PCRE_LIBS .......... = $PCRE_LIBS"
2299 echo "  PCRE_VERSION ....... = $PCRE_VERSION"
2300
2301 echo ""
2302 echo "Regenerate Scilab's parser"
2303 if test "$enable_build_parser" != no; then
2304 echo "  YACC ............... = $YACC"
2305 echo "  LEX ................ = $LEX"
2306 echo "  YFLAGS ............. = $YFLAGS"
2307 else
2308 echo "  Regenerate parser disabled (will use embedded sources)"
2309 fi
2310
2311 echo ""
2312 echo "CURL configuration:"
2313 echo "  CURL_CFLAGS ........ = $CURL_CFLAGS"
2314 echo "  CURL_LIBS .......... = $CURL_LIBS"
2315 echo "  CURL_VERSION ....... = $CURL_VERSION"
2316
2317
2318 echo ""
2319 echo "SWIG Configuration:"
2320 if test ! -z "$SWIG_BIN"; then
2321 echo "  SWIG_BIN ........... = $SWIG_BIN"
2322 echo "  SWIG_JAVA .......... = $SWIG_JAVA"
2323 else
2324 echo "  SWIG generation disabled"
2325 fi
2326
2327 echo ""
2328 echo "GIWS Configuration:"
2329 if test ! -z "$GIWS_BIN"; then
2330 echo "  GIWS_BIN ........... = $GIWS_BIN"
2331 else
2332 echo "  GIWS generation disabled"
2333 fi
2334
2335 echo ""
2336 echo "Libtool config:"
2337 echo "  objext .............. = $objext"
2338 echo "  libext (static) ..... = $libext"
2339 echo "  shrext_cmds ......... = $shrext_cmds"
2340 echo "  exeext .............. = $exeext"
2341
2342 echo ""
2343
2344 echo "Compilation paths:"
2345 echo "  srcdir .............. = $SCI_SRCDIR"
2346 echo "  srcdir_full ......... = $SCI_SRCDIR_FULL"
2347 echo "  builddir ............ = $SCI_BUILDDIR"
2348 if test "$SCI_SRCDIR_FULL" != "$SCI_BUILDDIR"; then
2349 echo "  VPATH build ......... = Activated"
2350 fi
2351
2352 echo ""
2353 echo "Platform information:"
2354 echo "  host ........... = $host"
2355 echo "  host_cpu ....... = $host_cpu"
2356 echo "  host_vendor .... = $host_vendor"
2357 echo "  host_os ... .... = $host_os"
2358 echo "  hostname ....... = $ac_hostname"
2359 echo "  CPU 64 bits .... = $IS_64_BITS_CPU"
2360 if test -n "$MAC_DETECTED_ARCH"; then
2361 echo "  Mac OS X arch .. = $MAC_DETECTED_ARCH"
2362 echo "  Mac OS X version = $macosx_version"
2363 fi
2364
2365 echo ""
2366 echo "Options used to compile and link:"
2367 echo "  prefix ......... = $prefix"
2368 echo "  localedir ...... = $localedir"
2369 echo "  VERSION ........ = $PACKAGE_VERSION"
2370 echo "  CC ............. = $CC"
2371 echo "  CFLAGS ......... = $CFLAGS"
2372 echo "  SCI_CFLAGS ..... = $SCI_CFLAGS"
2373 echo "  DEFS ........... = $DEFS"
2374 echo "  LD ............. = $LD"
2375 echo "  LDFLAGS ........ = $LDFLAGS"
2376 echo "  SCI_LDFLAGS .... = $SCI_LDFLAGS"
2377 echo "  LIBS ........... = $LIBS"
2378 echo "  CXX ............ = $CXX"
2379 echo "  CXXFLAGS ....... = $CXXFLAGS"
2380 echo "  SCI_CXXFLAGS ... = $SCI_CXXFLAGS"
2381 echo "  F77 ............ = $F77"
2382 echo "  FFLAGS ......... = $FFLAGS"
2383 echo "  SCI_FFLAGS ..... = $SCI_FFLAGS"
2384 echo "  F77_LDFLAGS .... = $F77_LDFLAGS"
2385 echo "  TERMCAP_LIB .... = $TERMCAP_LIB"
2386 echo ""