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