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