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