Update the version of the library (5:1:0 => 5:2:0) to reflect the change in the ABI
[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 - 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.60)
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_LIBRARY_VERSION=5:2:0
27 AC_SUBST(SCILAB_LIBRARY_VERSION)
28
29 #shared library versioning
30 #GENERIC_LIBRARY_VERSION=1:2:0
31 #                       | | |
32 #                +------+ | +---+
33 #                |        |     |
34 #             current:revision:age
35 #                |        |     |
36 #                |        |     +- increment if interfaces have been added
37 #                |        |        set to zero if interfaces have been removed
38 #                                  or changed
39 #                |        +- increment if source code has changed
40 #                |           set to zero if current is incremented
41 #                +- increment if interfaces have been added, removed or changed
42
43 # Check if we have a space in the path to the source tree
44 SPACE_IN_PATH=`echo "$SCI_SRCDIR_FULL"|grep " " > /dev/null; echo $?`
45 if test "$SPACE_IN_PATH" = "0"; then
46    AC_MSG_WARN([=====================================])
47    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...])
48    AC_MSG_WARN([=====================================])
49    sleep 180
50 fi
51
52 AC_CONFIG_AUX_DIR(config)
53 AC_CONFIG_HEADERS([modules/core/includes/machine.h])
54
55 # strip executable
56 AM_PROG_INSTALL_STRIP
57 AC_PROG_LN_S
58
59 AC_SYS_LARGEFILE
60
61 # In order to be able to change the scilab directory
62 # See http://wiki.debian.org/RpathIssue
63 AC_RELOCATABLE
64 AC_RELOCATABLE_LIBRARY
65
66
67 # If configure detect that timestamp changed,
68 # it tries to rebuild configure & makefile which can be a painmaker
69 # if the version is different
70 AM_MAINTAINER_MODE
71
72 AM_INIT_AUTOMAKE([-Wall foreign]) # Not using -Werror because we override {C,F}FLAGS in order to disable optimisation
73
74 AC_CANONICAL_HOST
75
76 #################################
77 ## all the --with-* argument help
78 #################################
79
80
81 AC_ARG_ENABLE(debug,
82    AC_HELP_STRING([--enable-debug],[Do not optimize and print warning messages (C/C++/Fortran code)]))
83
84 AC_ARG_ENABLE(debug-C,
85    AC_HELP_STRING([--enable-debug-C],[Do not optimize and print warning messages (C code)]))
86
87 AC_ARG_ENABLE(debug-CXX,
88    AC_HELP_STRING([--enable-debug-CXX],[Do not optimize and print warning messages (C++ code)]))
89
90 AC_ARG_ENABLE(debug-java,
91    AC_HELP_STRING([--enable-debug-java],[Print warning messages and line numbers (Java code)]))
92
93 AC_ARG_ENABLE(debug-fortran,
94    AC_HELP_STRING([--enable-debug-fortran],[Do not optimize and print warning messages (Fortran code)]))
95
96 AC_ARG_ENABLE(debug-linker,
97    AC_HELP_STRING([--enable-debug-linker],[Print warning messages from the linker (ld)]))
98
99 AC_ARG_ENABLE(stopOnWarning,
100    AC_HELP_STRING([--enable-stop-on-warning],[Stop the compilation on the first warning found in the C/C++ code]))
101
102 AC_ARG_WITH(gcc,
103     AC_HELP_STRING([--with-gcc],[Use gcc C compiler ]))
104
105 AC_ARG_WITH(g77,
106     AC_HELP_STRING([--with-g77],[Use g77, GNU Fortran 77 compiler ]))
107
108 AC_ARG_WITH(gfortran,
109     AC_HELP_STRING([--with-gfortran],[Use gfortran, GNU Fortran 95 compiler ]))
110
111 AC_ARG_WITH(intelcompilers,
112     AC_HELP_STRING([--with-intelcompilers],[Use Intel C (icc) and Fortran (ifort) proprietary compilers (GNU/Linux only) ]))
113
114 AC_ARG_WITH(tk,
115     AC_HELP_STRING([--without-tk],[Disable the interface to Tcl/Tk ]))
116
117 AC_ARG_WITH(javasci,
118     AC_HELP_STRING([--without-javasci],[Disable the Java/Scilab interface (javasci)]))
119
120 AC_ARG_WITH(gui,
121     AC_HELP_STRING([--without-gui],[Disable the Scilab Graphical User Interface (GUI). Intended for embedded/clustering/grid Scilab ]))
122
123 AC_ARG_ENABLE(build-swig,
124     AC_HELP_STRING([--enable-build-swig],[Regenerate Java => C wrappers produces by Swig (A Java Development Kit (JDK) is mandatory for this option)]))
125
126 AC_ARG_ENABLE(build-giws,
127     AC_HELP_STRING([--enable-build-giws],[Regenerate C/C++ => Java wrappers produces by Giws (A Java Development Kit (JDK) is mandatory for this option)]))
128
129
130 ################################################
131 ########## compilator & misc programs detection
132 ################################################
133
134 AC_PROG_CPP
135 AC_PROG_GREP
136 PKG_PROG_PKG_CONFIG
137
138 #####################################################
139 ## check if options are correct (or not)
140 #####################################################
141
142 if test "$with_g77" = yes -a "$with_gfortran" = yes; then
143         AC_MSG_ERROR([Conflicting options : you specified two fortran compiler])
144 fi
145
146 if test "$with_intelcompilers" = yes -a "$with_gcc" = yes; then
147         AC_MSG_ERROR([Conflicting options : you specified two compiler series])
148 fi
149
150 ######## fortran ########
151 if test "$with_g77" = yes; then
152    AC_PROG_F77(g77)
153    if test -z "$F77"; then
154      AC_MSG_ERROR([You asked me to use g77 but i haven't been able to find it])
155         fi
156 fi
157
158 if test "$with_gfortran" = yes; then
159    AC_PROG_F77(gfortran)
160    if test -z "$F77"; then
161      AC_MSG_ERROR([You asked me to use gfortran but i haven't been able to find it])
162         fi
163 fi
164
165 if test "$with_intelcompilers" = yes; then
166    AC_PROG_F77(ifc ifort)
167    if test -z "$F77"; then
168      AC_MSG_ERROR([You asked me to use ifc (intel fortran compiler) but i haven't been able to find it])
169         fi
170 fi
171
172 if test -z "$F77"; then
173 ## No Frotran compiler specified... We rely on Autoconf to find the best
174    AC_PROG_F77
175 fi
176
177
178 # case statements were introduced in fortran 90 so we can use that
179 # as a test to see if our compiler is fortran 90 compatible.
180 f90compatible=false
181 if test -z "$F77"; then
182   AC_MSG_ERROR([No fortran compiler found. Cannot compile scilab without a fortran compiler])
183 fi
184
185 AC_MSG_CHECKING([if $F77 is a fortran 90 compatible compiler])
186  f90compatible=false
187 AC_LANG_PUSH([Fortran 77])
188 AC_COMPILE_IFELSE([
189       PROGRAM hello
190         do 50 i = 1, 5
191            select case ( i )
192               case (1)
193                  print*, "case is 1, i is ", i
194               case ( 2 : 3 )
195                  print*, "case is 2 to 3, i is ", i
196               case default
197                  print*, "default case, i is ", i
198               end select
199  50           continue
200       END
201         ],
202         [AC_MSG_RESULT([yes])
203          AC_DEFINE([G95_FORTRAN],[],[uses G95 fortran])
204          f90compatible=true
205         ],
206         [AC_MSG_RESULT([no])]
207 )
208 AC_LANG_POP([Fortran 77])
209
210 ############ C ###############
211
212
213 if test "$with_gcc" = yes; then
214    AC_PROG_CC(gcc)
215    if test -z "$CC"; then
216      AC_MSG_ERROR([You asked me to use gcc but i haven't been able to find it])
217         fi
218 fi
219
220 if test "$with_intelcompilers" = yes; then
221    AC_PROG_CC(icc ecc)
222    if test -z "$CC"; then
223      AC_MSG_ERROR([You asked me to use icc (intel C compiler) but I haven't been able to find it])
224         fi
225 fi
226
227 if test -z "$CC"; then
228 # No C compiler specified... We rely on Autoconf to find the best
229    AC_PROG_CC
230 fi
231
232 if test -z "$CC"; then
233   AC_MSG_ERROR([No C Compiler found. Cannot compile Scilab without a C compiler])
234 fi
235
236 AC_CHECK_SIZEOF([int])
237 AC_CHECK_SIZEOF([long])
238
239 ### C++ ###
240 AC_PROG_CXX
241 # we can't just do something like
242 # AC_CHECK_PROG(cxx_present, $CXX, "yes", "no")
243 # because if the user has specified the full path of the desired C++ compiler then AC_CHECK_PROG
244 # will fail.  If AC_PROG_CXX fails to find a c++ compiler it will set CXX=g++ so just run AC_CHECK_PROG
245 # in this special case
246 case $CXX in
247         g++)
248                 AC_CHECK_PROG([cxx_present], [$CXX], [yes], [no])
249                 if test "x$cxx_present" != "xyes"; then
250                     AC_MSG_ERROR([No C++ compiler found. Cannot compile scilab without a C++ compiler])
251                 fi
252                 ;;
253 esac
254
255 # for "subdir-objects"
256
257 AM_PROG_CC_C_O
258 AC_PROG_F77_C_O
259
260 # If this option is provided, enable the debug on C & C++
261 if test "$enable_stop_on_warning" = yes; then
262    enable_debug_C=yes
263    enable_debug_CXX=yes
264 fi
265
266 if test "$enable_debug" = yes; then
267    enable_debug_fortran=yes
268    enable_debug_C=yes
269    enable_debug_CXX=yes
270 else
271    enable_debug=no
272 fi
273
274 if test "$enable_debug_fortran" = yes; then
275    FFLAGS="`echo "$FFLAGS"| sed -e 's|-O[0-9+]|-O0|'`"
276 else
277    enable_debug_fortran=no
278 fi
279
280 if test "$enable_debug_C" = yes; then
281    CFLAGS="`echo "$CFLAGS"| sed -e 's|-O[0-9+]|-O0|'`"
282 else
283    enable_debug_C=no
284 fi
285
286 if test "$enable_debug_CXX" = yes; then
287    CXXFLAGS="`echo "$CXXFLAGS"| sed -e 's|-O[0-9+]|-O0|'`"
288 else
289    enable_debug_CXX=no
290 fi
291
292 if test "x${prefix}" = "xNONE"; then
293   prefix="${ac_default_prefix}"
294 fi
295
296 ###############################
297 ## get the version
298 ###############################
299
300 SCIVERSION=`cat $SCI_SRCDIR/Version.incl | sed -e "s/SCIVERSION=//" `
301
302 #############################################
303 ## Compilers and options according to machine
304 #############################################
305
306 ######################
307 ######## Set compilation options for intel C/Fortran compilers
308 ######################
309
310 if test "$with_intelcompilers" = yes; then
311    SCI_INTEL_COMPILER()
312 fi
313
314 ########### FORTRAN ######################
315
316
317 ######################
318 ######## With F77 / G77 / GFortran ...
319 ######################
320
321 if test -n "$F77"; then
322 dnl @TODO : Maybe we should check that it is actually gfortran
323    if test "$enable_debug_fortran" = yes; then
324         # -D_FORTIFY_SOURCE=2
325         AC_LANG_PUSH([Fortran 77])
326         for flag in -g -Wall -Wimplicit -Wsurprising ; do
327                 case " ${FFLAGS} " in
328                         *\ ${flag}\ *)
329                                 # flag is already present
330                                 ;;
331
332                         *)
333                                 AC_MSG_CHECKING([if the Fortran compiler accepts ${flag}])
334                                 ac_save_FFLAGS="$FFLAGS"
335                                 FFLAGS="$FFLAGS ${flag}"
336                                 AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
337                                         [AC_MSG_RESULT([yes])],
338                                         [AC_MSG_RESULT([no])
339                                         FFLAGS="$ac_save_FFLAGS"
340                                         ]
341                                 )
342                                 ;;
343                 esac
344         done
345         AC_LANG_POP([Fortran 77])
346    else
347           FFLAGS="$FFLAGS -DNDEBUG"
348    fi
349           case "$host" in
350                  x86_64-*-linux*)
351                         FFLAGS="$FFLAGS -m64 -fPIC"
352                                         ;;
353                 # Dec Alpha OSF 4
354                 alpha*-dec-osf4.*)
355               FFLAGS="$FFLAGS -fpe3"
356                 ;;
357                 alpha*-dec-osf*)
358                     FFLAGS="$FFLAGS -fpe3 -switch nosqrt_recip"
359                 ;;
360                 rs6000-*-*)
361                     FFLAGS="$FFLAGS -qcharlen=4096"
362                         ;;
363                 mips-*-ultrix*)
364                     FFLAGS="-O0 -fpe1"
365                 ;;
366                   *-*-hpux9.*)
367                         FFLAGS="$FFLAGS +Obb1200 +E4 -Dhpux"
368                 ;;
369                   *-*-hpux10.*)
370                         if test "$enable_debug_fortran" = yes; then
371                             FFLAGS="+E4 +Z +DAportable -Dhpux"
372                         else
373                             FFLAGS="+O2 +E4 +Z +DAportable -Dhpux"
374                         fi
375 #                   F77_LDFLAGS="-Wl,+vnocompatwarnings,-E /usr/lib/libdld.sl"
376
377                         ;;
378                   *-*-hpux11.*)
379                    if test "$enable_debug_fortran" = yes; then
380                           FFLAGS=" +Z +DAportable -Dhpux"
381                          else
382                       FFLAGS="+O2 +Z +DAportable -Dhpux"
383                    fi
384                           FLIBS="-ldld -lnsl -lU77 -lm"
385     #do not call AC_F77_LIBRARY_LDFLAGS because if assumes PA2.0 while Scilab is built with
386     #DAportable=PA1.1
387     #AC_F77_LIBRARY_LDFLAGS
388         # @TODO : check why and if it is still the case
389
390 #    F77_LDFLAGS="-Wl,+vnocompatwarnings,-E /usr/lib/libdld.sl"
391          ;;
392           esac
393 #          FFLAGS_O0=`echo $FFLAGS | sed 's/-O[0-9]*//g'`
394 fi
395
396 #########################
397 # setting parameters according to system types
398 #########################
399
400 case "$host" in
401         *-*-hpux9.*|*-*-hpux10.*|*-*-hpux11.*)
402                 HPUX=1
403         ;;
404         sparc-*)
405                 SPARC=1
406         ;;
407         mips-sgi-irix*)
408           MIPS_SGI_IRIX=1
409         ;;
410          *-*-solaris*)
411          SOLARIS=1
412          ;;
413         *darwin*)
414           MACOSX=1
415         ;;
416 esac
417
418 AM_CONDITIONAL(IS_MACOSX, test -n "$MACOSX")
419 AM_CONDITIONAL(IS_HPUX, test -n "$HPUX")
420 AM_CONDITIONAL(IS_SPARC, test -n "$SPARC")
421 AM_CONDITIONAL(IS_SOLARIS, test -n "$SOLARIS")
422 AM_CONDITIONAL(IS_MIPS_SGI_IRIX, test -n "$MIPS_SGI_IRIX")
423
424
425
426 ############
427 ## C++
428 ############
429
430
431 if test -z "$CXX"; then
432   AC_MSG_ERROR([No C++ compiler found. Cannot compile scilab without a C++ compiler])
433 fi
434
435 case "$CXX" in
436          g++-* | g++ | ccache*g++ | ccache*g++-* )
437    ## With GNU C++ Compiler
438    if test "$enable_debug_CXX" = yes; then
439           CXXFLAGS="$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 -Wold-style-cast -g3 -Weffc++"
440           case "$host" in
441           *-linux-gnu )
442           # Only doing that under Linux
443                   CXXFLAGS="$CXXFLAGS -fdiagnostics-show-option -Werror=format-security"
444           ;;
445           esac
446    else
447           CXXFLAGS="$CXXFLAGS -DNDEBUG"
448    fi
449    CXXFLAGS="$CXXFLAGS -fno-stack-protector" # bug 3131
450    ;;
451 esac
452
453 #### 64 bits detection
454 IS_64_BITS_CPU=false
455 case "$host" in
456          x86_64-*-linux-gnu | x86_64-linux-gnu | ia64-*-linux-gnu | alpha-*-linux-gnu | alpha-*-netbsd* | x86_64-*-netbsd* | sparc64-*-netbsd*)
457                 IS_64_BITS_CPU=true
458         ;;
459 esac
460
461 ##########"
462 # not useful under Linux (and was only defined here with scilab 4)
463 #AC_CHECK_LIB(ieee,main,[LIEEE="-lieee"])
464
465 #LDFLAGS="$LIEEE $LDFLAGS"
466 #F77_LDFLAGS="$F77_LDFLAGS $LIEEE"
467 case "$CC" in
468          gcc-* | gcc | ccache*gcc | ccache*gcc-* )
469    ## With GNU Compiler
470    if test "$enable_debug_C" = yes; then
471           CFLAGS="$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"
472           # used to be -O
473           # -D_FORTIFY_SOURCE=2
474           case "$host" in
475           *-linux-gnu )
476           # Only doing that under Linux
477                 if test "$enable_debugLinker" = yes; then
478                   LDFLAGS="$LDFLAGS -Wl,--warn-common,-x"
479                 fi
480                   CFLAGS="$CFLAGS -fdiagnostics-show-option -Werror=format-security"
481                   ;;
482                   esac
483    else
484           CFLAGS="$CFLAGS  -DNDEBUG"
485    fi
486    CFLAGS="$CFLAGS -fno-stack-protector" # bug 3131
487
488    case "$host" in
489    # Linux sparc | Linux, old binary format a.out (NO LONGER SUPPORTED)
490          sparc-*-linux-gnu|*-pc-linux-gnuaout)
491             CFLAGS="$CFLAGS -fwritable-strings"
492         ;;
493          x86_64-*-linux-gnu | x86_64-linux-gnu)
494                 CFLAGS="$CFLAGS -DNARROWPROTO -m64"
495     ;;
496          i*86-*-linux-gnu | *-pc-linux-gnu | i*86-*-linux )
497                 CFLAGS="$CFLAGS  -DNARROWPROTO"
498         ;;              
499          ia64-*-linux-gnu )
500                 CFLAGS="$CFLAGS -DNARROWPROTO"
501     ;;
502          alpha-*-linux-gnu)
503                 CFLAGS="$CFLAGS  -mieee-with-inexact -fwritable-strings"
504                 LDFLAGS="$LDFLAGS -mieee-with-inexact"
505         ;;
506          powerpc-*-linux-gnu)
507                 CFLAGS="$CFLAGS -D_GNU_SOURCE -fwritable-strings"
508         ;;
509          *-*-solaris*)
510         if test "$enable_debug_C" = yes; then
511                          CFLAGS="$CFLAGS -DSVR4 -DSYSV -Dsolaris"
512                 else
513                          CFLAGS="-O2 -DNDEBUG -DSVR4 -DSYSV -Dsolaris"
514                 fi
515         ;;
516    *-*-freebsd*)
517      CFLAGS="$CFLAGS -Dfreebsd"
518          LDFLAGS="$LDFLAGS -lm"
519          ;;
520
521   alpha-*-netbsd*)
522     CFLAGS="$CFLAGS -Dnetbsd -mieee"
523     FFLAGS="$FFLAGS -Dnetbsd -mieee"
524         ;;
525
526   *-*-netbsd*)
527     CFLAGS="$CFLAGS -Dnetbsd"
528         ;;
529
530   *-*-darwin*)
531          CFLAGS=" $CFLAGS -I/sw/include "
532          CPPFLAGS=" $CPPFLAGS -I/sw/include "
533          LDFLAGS=" $LDFLAGS -L/sw/lib/ "
534         ;;
535 esac
536 ;; # end of the gcc case on the $CC
537    *)
538
539                 ## CC compiler (not GCC)
540         if test "$enable_debug_C" = yes; then
541                      CFLAGS="$CFLAGS -g"
542                 else
543                      CFLAGS="$CFLAGS -DNDEBUG"
544                 fi
545
546 case "$host" in
547 # Dec Alpha OSF 4
548   alpha*-dec-osf4.*)
549       CFLAGS="$CFLAGS -std -ieee_with_inexact"
550       LDFLAGS="$LDFLAGS -ieee_with_inexact"
551           ;;
552   alpha*-dec-osf*)
553       CFLAGS="$CFLAGS -ieee_with_inexact"
554       LDFLAGS="$LDFLAGS -ieee_with_inexact"
555       ;;
556   rs6000-*-*) # IBM AIX RS 6000 (NO LONGER SUPPORTED)
557     CFLAGS="-Daix -DSYSV"
558   ;;
559   mips-sgi-irix*) # SGI
560         CFLAGS="$CFLAGS -DSYSV -DSVR4"
561   ;;
562   *-*-hpux9.*)
563         CFLAGS="$CFLAGS -DSYSV -Dhpux"
564   ;;
565   *-*-hpux10.*) # HP 10
566     if test "$enable_debug_C" = yes; then
567           CFLAGS="$CFLAGS -DSYSV -Dhpux"
568     else
569           CFLAGS="$CFLAGS -DSYSV -Dhpux +Z +DAportable"
570     fi
571   ;;
572
573   *-*-hpux11.*) # HP 11
574     CFLAGS="$CFLAGS -DSYSV -Dhpux -Dhppa +Z +DAportable"
575   ;;
576   *-*-solaris*) # SUN SOLARIS
577     CFLAGS="$CFLAGS -DSVR4 -DSYSV -Dsolaris -I/usr/local/include/"
578         LDFLAGS="$LDFLAGS  -L/usr/local/lib/"
579   ;;
580 esac
581 ;; # end of not a gcc compiler
582 esac
583
584
585 # flag for possible compilations in configure
586 CFLAGS="$CFLAGS "'-I$(top_srcdir)/modules/core/includes/ -I$(top_srcdir)/libs/MALLOC/includes/ -I$(top_srcdir)/modules/localization/includes/'
587 CXXFLAGS="$CXXFLAGS "'-I$(top_srcdir)/modules/core/includes/ -I$(top_srcdir)/libs/MALLOC/includes/ -I$(top_srcdir)/modules/localization/includes/'
588 FFLAGS="$FFLAGS "'-I$(top_srcdir)/modules/core/includes/'
589
590 if test $IS_64_BITS_CPU = true -o "$MACOSX" = "1"; then
591    if test $f90compatible = false; then
592       AC_MSG_ERROR([64 bits support needs a fortran 90 compiler (try --with-gfortran).])
593    fi
594    AC_DEFINE([USE_DYNAMIC_STACK], [], [If we are building a 64 bits version])
595 fi
596
597 AM_CONDITIONAL(IS_64_BITS_CPU, test $IS_64_BITS_CPU = true)
598 AM_CONDITIONAL(USE_DYNAMIC_STACK, test $IS_64_BITS_CPU = true -o "$MACOSX" = "1")
599
600 #######################
601 ## test for underscores (name mangling issues between C and fortran)
602 #######################
603 AC_CHECK_UNDERSCORE_FORTRAN()
604
605
606 #################
607 ## HDF5
608 #################
609
610 AC_ARG_WITH(hdf5,
611         AC_HELP_STRING([--without-hdf5],[Disable the interface to the HDF5 library]))   
612
613 HDF5_ENABLE=no
614
615 if test "$with_hdf5" != no; then
616    AC_HDF5()
617 # TODO: check if the JNI JHDF5 library are available
618    HDF5_ENABLE=yes
619 fi
620
621 AC_SUBST(HDF5_ENABLE)
622 AM_CONDITIONAL(HDF5, test "$with_hdf5" != no)
623
624
625 ###########################
626 ## test for JAVA compiler
627 ###########################
628
629 if test "$with_javasci" != no -o "$with_gui" != no -o "$enable_build_help" != no; then
630    # See if --with-jdk command line argument is given
631      # Try to detect the installed JVM, this could be controlled
632          # by the above --with options
633          AC_JAVA_WITH_JDK
634          AC_JAVA_DETECT_JVM
635    if test "$ac_java_jvm_name" = "jdk"; then
636                 JAVA_HOME=$ac_java_jvm_dir
637             JAVA_VERSION=$ac_java_jvm_version
638 #     AC_JAVA_TOOLS
639                 AC_JAVA_JNI_INCLUDE
640                 JAVA_JNI_INCLUDE=$ac_java_jvm_jni_include_flags
641
642                 AC_JAVA_JNI_LIBS
643                 JAVA_JNI_LIBS=$ac_java_jvm_jni_lib_flags
644                 JAVA_JNI_LIBS_PRELOAD=$ac_java_jvm_ld_preload
645                 AC_JAVA_CLASSPATH
646                 JAVA_CLASSPATH=$ac_java_classpath
647                 AC_JAVA_TOOLS
648                 AC_JAVA_ANT
649
650                 if test "$with_gui" != no; then
651
652                                 # Docking system
653                                 AC_JAVA_CHECK_PACKAGE([flexdock],[org.flexdock.docking.DockingManager],[Scilab Gui])
654                                 FLEXDOCK=$PACKAGE_JAR_FILE
655                                 AC_SUBST(FLEXDOCK)
656
657                                 # Swing look&feel implementations
658                                 AC_JAVA_CHECK_PACKAGE([looks],[com.jgoodies.looks.common.RenderingUtils],[Scilab Gui - Look and feel],"yes")
659                                 LOOKS=$PACKAGE_JAR_FILE
660
661                                 # Named differently under Opensuse
662                                 if test -z "$LOOKS"; then
663                                     AC_JAVA_CHECK_PACKAGE([looks2],[com.jgoodies.looks.common.RenderingUtils],[Scilab Gui - Look and feel])
664                                         LOOKS=$PACKAGE_JAR_FILE
665                                 fi
666                                 AC_SUBST(LOOKS)
667
668                                 AC_SUBST(LOOKS)
669
670                                 #  Skin Look and Feel 
671                                 AC_JAVA_CHECK_PACKAGE([skinlf],[com.l2fprod.util.AccessUtils],[Scilab Gui - Skin Look and Feel])
672                                 SKINLF=$PACKAGE_JAR_FILE
673                                 AC_SUBST(SKINLF)
674
675                                 # JOGL
676                                 AC_JAVA_CHECK_PACKAGE([jogl],[javax.media.opengl.glu.GLUnurbs],[Scilab 3D rendering - Version 1.1.1])
677                                 JOGL=$PACKAGE_JAR_FILE
678                                 AC_SUBST(JOGL)
679
680                                 # Jhall
681                                 AC_JAVA_CHECK_PACKAGE([jhall],[javax.help.JHelp],[Scilab Help Browser],"yes")
682                                 JHALL=$PACKAGE_JAR_FILE
683
684                                 # Named differently under Mandriva
685                                 if test -z "$JHALL"; then
686                                         AC_JAVA_CHECK_PACKAGE([javahelp2],[javax.help.JHelp],[Scilab Help Browser])
687                                         JHALL=$PACKAGE_JAR_FILE
688                                 fi
689                                 AC_SUBST(JHALL)
690
691                                 # JoGL Native <=> Java connector
692                                 AC_JAVA_CHECK_PACKAGE([gluegen-rt],[com.sun.gluegen.runtime.CPU],[Scilab 3D rendering])
693                                 GLUEGEN_RT=$PACKAGE_JAR_FILE
694                                 AC_SUBST(GLUEGEN_RT)
695
696                                 # Console API
697                                 AC_JAVA_CHECK_PACKAGE([jrosetta-API],[com.artenum.rosetta.interfaces.core.ConsoleConfiguration],[JRosetta : Console API Artenum / Scilab])
698                                 JROSETTA_API=$PACKAGE_JAR_FILE
699                                 AC_SUBST(JROSETTA_API)
700
701                                 # Console Core
702                                 AC_JAVA_CHECK_PACKAGE([jrosetta-engine],[com.artenum.rosetta.core.action.AbstractConsoleAction],[JRosetta : Console Core Artenum / Scilab])
703                                 JROSETTA_ENGINE=$PACKAGE_JAR_FILE
704                                 AC_SUBST(JROSETTA_ENGINE)
705
706                                 if test $HDF5_ENABLE = yes;  then
707                                 # HDF5 java lib
708                                   AC_JAVA_CHECK_PACKAGE([jhdf5],[ncsa.hdf.hdf5lib.HDF5Constants],[HDF5 Java library])
709                                   JHDF5=$PACKAGE_JAR_FILE
710                                   AC_SUBST(JHDF5)
711                                 fi
712
713                                 # Logging (flexdock dep)
714                                 AC_JAVA_CHECK_PACKAGE([commons-logging],[org.apache.commons.logging.LogFactory],[Apache logging])
715                                 COMMONS_LOGGING=$PACKAGE_JAR_FILE
716                                 AC_SUBST(COMMONS_LOGGING)
717
718                                 AC_DEFINE([WITH_GUI],[],[With the JAVA stuff (GUI, Console, JOGL...)])
719
720                 fi
721         else
722                 AC_MSG_WARN([Sun javac not found: I will not build the java interface])
723                 if test "$ac_java_jvm_name" != ""; then
724                         AC_MSG_WARN([We do not support $ac_java_jvm_name yet])
725                 fi
726         fi
727         AC_SUBST(JAVA_JNI_INCLUDE)
728     AC_SUBST(JAVA_JNI_LIBS)
729     AC_SUBST(JAVA_HOME)
730
731
732     if test "$enable_debug_java" = yes; then
733            JAVA_DEBUG_OPTIONS="<option value='-verbose:jni'/>
734            <option value='-Xcheck:jni'/>"
735            AC_SUBST(JAVA_DEBUG_OPTIONS)
736         fi
737
738         if test "$enable_build_swig" != no -a "$enable_build_swig" != ""; then
739                 SWIG_PROG()
740                 SWIG_ENABLE_JAVA()
741                 AC_SUBST(SWIG_BIN)
742         AC_SUBST(SWIG_JAVA)
743
744         fi
745
746         # Giws is the equivalent of Swig developped by the Scilab team
747         # in order to provide a wrapper to Java from C/C++
748         if test "$enable_build_giws" != no -a "$enable_build_giws" != ""; then
749                 AC_GIWS()
750         fi
751 fi
752
753 JAVA_ENABLE=yes
754
755 if test -z "$JAVAC"; then
756    JAVA_ENABLE=no
757 fi
758
759 AC_SUBST(JAVA_ENABLE)
760
761 AM_CONDITIONAL(NEED_JAVA, test "$with_javasci" != no -o "$with_gui" != no -o "$enable_build_help" != no)
762 AM_CONDITIONAL(GUI, test "$with_gui" != no)
763 AM_CONDITIONAL(JAVASCI, test "$with_javasci" != no)
764 AM_CONDITIONAL(SWIG, test "$enable_build_swig" != no -a "$enable_build_swig" != "")
765 AM_CONDITIONAL(GIWS, test "$enable_build_giws" != no  -a "$enable_build_giws" != "")
766
767 ##############################################################
768 ## GUI module
769 ##############################################################
770
771 GUI_ENABLE=no
772
773 if test "$JAVA_ENABLE" != no; then
774    GUI_ENABLE=yes
775 fi
776
777 if test "$with_gui" != no; then
778    GUI_ENABLE=yes
779 fi
780
781 AC_SUBST(GUI_ENABLE)
782
783 ##############################################################
784 ## test for functions in standard C library and C math library
785 ##############################################################
786
787 # Provided by unistd.h
788 AC_CHECK_FUNCS([sleep] [usleep] [dup2] [getcwd] [getpagesize] [getpass])
789 AC_CHECK_FUNCS([rmdir])
790
791 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])])
792
793 # Provided by <regex.h>
794 AC_CHECK_FUNCS([regcomp])
795
796 # Provided by stdlib.h
797 AC_CHECK_FUNCS([atexit] [putenv] [setenv])
798
799 # Provided by String.h
800 AC_CHECK_FUNCS([bzero] [memmove] [memset] [strcasecmp] [strerror] [strchr] [strdup] [strpbrk] [strrchr] [strstr] [strtol])
801
802 # Provided by select.h
803 AC_CHECK_FUNCS([select])
804
805 # Provided by pwd.h
806 AC_CHECK_FUNCS([endpwent])
807
808 # Provided by netdb.h
809 AC_CHECK_FUNCS([gethostbyaddr] [gethostbyname] [gethostname])
810
811 # Provided by time.h
812 AC_CHECK_FUNCS([gettimeofday])
813
814 # Provided by ctype.h
815 AC_CHECK_FUNCS([isascii])
816
817 # Provided by wctype.h
818 AC_CHECK_FUNCS([iswprint])
819
820 # Provided by types.h
821 AC_CHECK_FUNCS([mkdir])
822
823 # Provided by mman.h
824 AC_CHECK_FUNCS([munmap])
825
826 # Provided by math.h
827 save_LDFLAGS="$LDFLAGS"
828 LDFLAGS="$LDFLAGS -lm"
829
830 AC_CHECK_FUNCS([pow] [sqrt] [finite] [floor])
831
832 AC_CHECK_FUNC([exp10],,[
833                                 AC_DEFINE([log_10_],[2.3025850929940456840179914546844],[Provide a macro to do exp10])
834                                 AC_DEFINE([exp10(x)],[exp( (log_10_) * (x) )],[Provide a macro to do exp10])
835                                 ])
836
837 ### If isinf exists or not (used to not be the case under Solaris)
838 ### See bug #4164
839 AC_CHECK_FUNC([isinf],,[
840                 AC_DEFINE([isinf(x)],[(!finite(x) && x==x)],[Provide a macro to do isinf])
841 ])
842
843 LDFLAGS="$save_LDFLAGS"
844
845 # Provided by regex.h
846 AC_CHECK_FUNCS([re_comp])
847
848 # Provided by socket.h
849 AC_CHECK_FUNCS([socket])
850
851 # Provided by utsname.h
852 AC_CHECK_FUNCS([uname])
853
854 # Provided by wtloop.c
855 AC_CHECK_FUNCS([setlocale])
856
857 # Function memcmp used in modules/fileio/src/c/xls.c
858 AC_FUNC_MEMCMP
859
860 # function stat used in modules/core/src/c/link_std.c
861 AC_FUNC_STAT
862
863 # function strtod used in modules/core/src/c/getval.c
864 AC_FUNC_STRTOD
865
866 ########################
867 ## test for header files
868 ########################
869
870 AC_CHECK_HEADERS([limits.h values.h])
871
872 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])
873
874 # check header dirent
875 AC_HEADER_DIRENT
876
877 # static struct timeval defined or not | used in modules/core/src/c/timer.c
878 AC_HEADER_TIME
879
880 # check if the specific header is available or not | used in modules/core/src/c/link_SYSV.c
881 AC_HEADER_SYS_WAIT
882
883
884 #######################
885 ## Test for structures ##
886 #######################
887 AC_CHECK_MEMBERS([struct stat.st_blksize])
888 AC_CHECK_MEMBERS([struct stat.st_rdev])
889
890
891 #######################
892 ## MISC Test
893 #######################
894
895 # gettext.  See http://www.gnu.org/software/hello/manual/gettext/AM_005fGNU_005fGETTEXT.html
896 AM_GNU_GETTEXT([external])
897 AM_GNU_GETTEXT_VERSION([0.16])
898
899 # function closedir used in modules/metanet/src/c/files.c
900 AC_FUNC_CLOSEDIR_VOID
901
902 # Signals used in modules/core/src/c/realmain.c
903 AC_TYPE_SIGNAL
904
905 # struct tm used in modules/core/src/c/history.c
906 AC_STRUCT_TM
907
908 # st_blocks in the struct in modules/io/sci_gateway/c/intfilestat.c
909 AC_STRUCT_ST_BLOCKS
910
911
912 ##################
913 ## termcap library
914 ##################
915
916 # some systems may have a system curses implementation as well as ncurses
917 # installed.  We need to be consistent in making sure we get the correct
918 # library to go with the correct header and also provide a way for the user
919 # to have some control over which is picked when both are available.
920 #
921 # For now, just check for -lcurses and then -lncurses.  The user control
922 # may need to be revisited
923
924 TERMCAP_LIB=no
925
926 # Various observations:
927 #
928 #  ncurses 
929 #    - installs ncurses.h and possibly curses.h as a link to ncurses.h
930 #    - installs -lncurses.
931 #    - need to include term.h for tgetent() but tgetent() is in -lncurses.a
932 #
933 # curses as found in NetBSD-4 and NetBSD-5
934 #    - installs curses.h
935 #    - need to include termcap.h and link with -ltermcap for tgetent()
936 #
937
938 AC_CHECK_LIB([curses],[main])
939 if test $ac_cv_lib_curses_main = no ; then
940         AC_CHECK_LIB([ncurses],[main])
941 fi
942
943 # make sure we have what we need for tgetent
944 AC_SEARCH_LIBS([tgetent],[termcap])
945
946 AC_CHECK_HEADERS([ncurses.h curses.h])
947
948 if test "x$ac_cv_lib_curses_main" = "xyes" -o "x$ac_cv_lib_ncurses_main" = "xyes" ; then
949   AC_DEFINE([HAVE_TERMCAP],[],[Have Term Cap])
950 else
951  AC_MSG_ERROR([No termcap library detected. Please install ncurses dev library (or termcap library)])
952 fi
953
954 ##################
955 ## other libraries
956 ##################
957
958 AC_CHECK_LIB(dl, dlopen)
959
960 AC_SEARCH_LIBS([pthread_join],[pthread])
961
962 #################
963 ## SCICOS
964 #################
965
966 AC_ARG_WITH(scicos,
967     AC_HELP_STRING([--without-scicos],[Disable Scicos]))
968
969 AC_ARG_WITH(ocaml,
970     AC_HELP_STRING([--without-ocaml],[Disable the OCaml modules (modelica)]))
971
972
973 SCICOS_ENABLE=no
974
975 if test "$with_scicos" != no -a "$GUI_ENABLE" != no; then
976    AC_DEFINE([WITH_SCICOS], [], [With SCICOS])
977
978    save_LIBS="$LIBS"
979
980    AC_CHECK_LIB([rt], [clock_gettime],
981                       [RT_LIB="-lrt";
982                       AC_DEFINE([HAVE_CLOCK_GETTIME], [1],[Whether clock_gettime is available]) ],
983         [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])]
984    )
985    LIBS="$save_LIBS"
986    AC_SUBST(RT_LIB)
987
988 #################
989 ## ocaml which only called with using Scicos
990 #################
991
992                 if test "$with_ocaml" != no; then
993                    AC_CHECK_PROG_OCAML()
994                 fi
995                 SCICOS_ENABLE=yes
996 fi
997
998
999
1000
1001
1002
1003 AC_SUBST(SCICOS_ENABLE)
1004
1005 AM_CONDITIONAL(OCAML, test "$with_ocaml" != no -a "$OCAMLC" != no -a "$OCAMLOPT" != no)
1006 AM_CONDITIONAL(SCICOS, test "$SCICOS_ENABLE" != no)
1007
1008
1009 #################
1010 ## FFTW
1011 #################
1012
1013 AC_ARG_WITH(fftw,
1014     AC_HELP_STRING([--without-fftw],[Disable the interface to the FFTW 3 library]))
1015
1016 FFTW_ENABLE=no
1017 if test "$with_fftw" != no; then
1018    AC_FFTW()
1019    FFTW_ENABLE=yes
1020 fi
1021
1022 AC_SUBST(FFTW_ENABLE)
1023 AM_CONDITIONAL(FFTW, test "$with_fftw" != no)
1024
1025
1026 #################
1027 ## MPI
1028 #################
1029
1030 # Not in Scilab 5.0
1031 #AC_ARG_WITH(mpi,
1032 #    [  --with-mpi                 compile with MPI library])
1033 #
1034 #if test "$with_mpi" = yes; then
1035 #   AC_OPENMPI()
1036 #   # We will have to detect other implementation of OpenMPI
1037 #fi
1038 #AM_CONDITIONAL(MPI, test "$with_mpi" = yes)
1039
1040 #################
1041 ## PVM
1042 #################
1043
1044 AC_ARG_WITH(pvm,
1045     AC_HELP_STRING([--without-pvm],[Disable the interface to the PVM library]))
1046
1047 PVM_ENABLE=no
1048 if test "$with_pvm" != no; then
1049    AC_PVM()     
1050    PVM_ENABLE=yes
1051 fi
1052 AC_SUBST(PVM_ENABLE)
1053
1054 AM_CONDITIONAL(PVM, test "$with_pvm" != no)
1055
1056 #######################
1057 ## Test for libxml
1058 #######################
1059
1060 AC_LIBXML2()
1061
1062 #######################
1063 ## Test for gettext
1064 #######################
1065
1066 ALL_LINGUAS="en_US fr_FR zh_CN zh_TW ru_RU ca_ES de_DE es_ES pt_BR"
1067
1068 AC_ARG_ENABLE(build-localization,
1069                 AC_HELP_STRING([--disable-build-localization],[Disable the localization build])
1070                 )
1071 BUILD_LOCALIZATION_ENABLE=no
1072
1073 if test "$enable_build_localization" != no; then
1074
1075    AC_SUBST(ALL_LINGUAS)
1076    AC_CHECK_FUNCS([bind_textdomain_codeset])
1077
1078    AC_PATH_PROG(MSGCAT, msgcat, no)
1079    AC_PATH_PROG(MSGFMT, msgfmt, no)
1080    AC_PATH_PROG(XGETTEXT, xgettext, no)
1081
1082    if test x$MSGFMT = xno; then
1083           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 ])
1084           fi
1085         if test x$MSGCAT = xno; then
1086           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 ])
1087         fi
1088         BUILD_LOCALIZATION_ENABLE=yes
1089 fi
1090 AM_CONDITIONAL(GENERATE_LOCALIZATION_FILES, test "$BUILD_LOCALIZATION_ENABLE" = yes)
1091
1092 #######################
1093 ## Test for blas/Atlas and lapack
1094 #######################
1095 AC_MSG_CHECKING([if BLAS, ATLAS or MKL is available])
1096 echo ""
1097 ACX_BLAS(
1098                 [AC_MSG_RESULT([$BLAS_TYPE found])]
1099                 ,
1100                 AC_MSG_ERROR([Impossible to find a BLAS compatible library (see BLAS or ATLAS).])
1101                 )
1102
1103 AC_MSG_CHECKING([if LAPACK is available])
1104 echo ""
1105 ACX_LAPACK(
1106                 [AC_MSG_RESULT([$LAPACK_TYPE found])],
1107                 AC_MSG_ERROR([Impossible to find the LAPACK library.])
1108                 )
1109
1110 #################
1111 ## UMFPACK
1112 #################
1113
1114 AC_ARG_WITH(umfpack,
1115     AC_HELP_STRING([--without-umfpack],[Disable the interface to the UMFPACK library]))
1116
1117 UMFPACK_ENABLE=no
1118 if test "$with_umfpack" != no; then
1119    AC_UMFPACK([$BLAS_LIBS])
1120    UMFPACK_ENABLE=yes
1121 fi
1122
1123 AC_SUBST(UMFPACK_ENABLE)
1124 AM_CONDITIONAL(UMFPACK, test "$with_umfpack" != no)
1125
1126 #######################
1127 ## Test for PCRE
1128 #######################
1129
1130 AC_PCRE()
1131
1132 #################
1133 ## Tcl/Tk library
1134 #################
1135
1136 WITH_TKSCI=no
1137 if test "$with_tk" != no; then
1138
1139         # check user arguments
1140         USER_TCL_LIB_PATH=""
1141         USER_TCL_INC_PATH=""
1142         AC_ARG_WITH(tcl-library,
1143                 AC_HELP_STRING([--with-tcl-library=DIR],[Set the path to the TCL library]),
1144                 [  USER_TCL_LIB_PATH=$withval
1145         ])
1146         AC_ARG_WITH(tcl-include,
1147                 AC_HELP_STRING([--with-tcl-include=DIR],[Set the path to the TCL headers]),
1148                 [  USER_TCL_INC_PATH=$withval
1149         ])
1150
1151         USER_TK_LIB_PATH=$USER_TCL_LIB_PATH
1152         USER_TK_INC_PATH=$USER_TCL_INC_PATH
1153
1154         AC_ARG_WITH(tk-library,
1155                 AC_HELP_STRING([--with-tk-library=DIR],[Set the path to the TK library]),
1156                 [  USER_TK_LIB_PATH=$withval
1157         ])
1158
1159         AC_ARG_WITH(tk-include,
1160                 AC_HELP_STRING([--with-tk-include=DIR],[Set the path to the TK headers]),
1161                 [  USER_TK_INC_PATH=$withval
1162         ])
1163
1164 ###########################
1165 ########## X11 checks
1166 ###########################      
1167                 ## This check is mandatory since tk needs Xlib headers and libs
1168                 AC_PATH_XTRA
1169                 ##
1170
1171         saved_cflags="$CFLAGS"
1172         saved_ldflags="$LDFLAGS"
1173         saved_cppflags="$CPPFLAGS"
1174
1175         AC_CHECK_LIB([dl], [main], [TCLTK_LIBS=" -ldl"])
1176         AC_CHECK_TCLTK
1177
1178         # set variables
1179         if test "$WITH_TKSCI" = yes; then
1180                 AC_DEFINE([WITH_TK], [], [With TK])
1181         else
1182                 AC_MSG_ERROR([TCL/TK not found. Use --without-tk or specify the librairies and include paths manually])
1183         fi
1184
1185         AC_SUBST(TCLTK_LIBS)
1186         AC_SUBST(TCL_INC_PATH)
1187         AC_SUBST(TK_INC_PATH)
1188
1189 fi
1190 AC_SUBST(WITH_TKSCI)
1191 AM_CONDITIONAL(TCLTK, test "$WITH_TKSCI" = yes)
1192
1193 #################
1194 ## MATIO LIBRARY (MAT File I/O Library)
1195 #################
1196
1197
1198 AC_ARG_WITH(matio,
1199     AC_HELP_STRING([--without-matio],[Disable the interface to Matio (MAT File I/O library)]))
1200
1201 AC_ARG_WITH(matio_include,
1202                 AC_HELP_STRING([--with-matio-include=DIR],[Set the path to the MATIO headers]),
1203                 [with_matio_include="-I$withval"], [])
1204
1205 AC_ARG_WITH(matio_library,
1206                 AC_HELP_STRING([--with-matio-library=DIR],[Set the path to the MATIO libraries]),
1207                 [with_matio_library="-L$withval"], [])
1208
1209 MATIO_ENABLE=no
1210
1211 if test "$with_matio" != no; then
1212    if test -n "$with_matio_include" -o -n "$with_matio_library" ; then
1213       MATIO_CFLAGS="$with_matio_include"
1214       MATIO_LIBS="$with_matio_library -lm -lz -lmatio"
1215    else
1216       PKG_CHECK_MODULES(MATIO, [matio >= 1.3.3])
1217    fi
1218    
1219    save_CFLAGS="$CFLAGS"
1220    save_LIBS="$LIBS"
1221
1222    CFLAGS="$CFLAGS $MATIO_CFLAGS"
1223    LIBS="$LIBS $MATIO_LIBS"
1224    
1225    AC_CHECK_HEADERS([matio.h matioConfig.h], [],
1226      [AC_MSG_ERROR([Invalid MATIO_CFLAGS returned by pkg-config. Try to define MATIO_CFLAGS.])])
1227    AC_CHECK_LIB([matio], [Mat_Open], [],
1228      [AC_MSG_ERROR([Invalid MATIO_LIBS returned by pkg-config. Try to define MATIO_LIBS.])])
1229    
1230    LIBS="$save_LIBS"
1231    CFLAGS="$save_CFLAGS"
1232    
1233    AC_DEFINE([WITH_MATIO], [], [With the MATIO library])
1234    MATIO_ENABLE=yes
1235 fi
1236
1237
1238 AC_SUBST(MATIO_ENABLE)
1239 AM_CONDITIONAL(MATIO, test "$with_matio" != no)
1240
1241 #############################
1242 ## Documentation management #
1243 #############################
1244
1245 HELP_ENABLE=yes
1246
1247 AC_ARG_ENABLE(build-help,
1248                 AC_HELP_STRING([--disable-build-help],[Disable the help build])
1249                 )
1250
1251 if test "$enable_build_help" != no; then
1252     AC_DOCBOOK()
1253 else
1254     HELP_ENABLE=no
1255 fi
1256
1257 if test "$JAVA_ENABLE" = no; then
1258     HELP_ENABLE=no
1259 fi
1260
1261 AC_SUBST(HELP_ENABLE)
1262
1263 AM_CONDITIONAL(BUILD_HELP, test $HELP_ENABLE = yes)
1264
1265 ##¬†Install XML help files ###
1266
1267 AC_ARG_WITH(install-help-xml,
1268                 AC_HELP_STRING([--with-install-help-xml],[make install will install XML files])
1269                 )
1270 HELP_INSTALL_ENABLE=no
1271 if test "$with_install_help_xml" != no -a "$with_install_help_xml" != ""; then
1272    HELP_INSTALL_ENABLE=yes
1273 fi 
1274 AM_CONDITIONAL(INSTALL_HELP_XML, test "$HELP_INSTALL_ENABLE" != "")
1275
1276 ##############################################################
1277 ## Javasci module
1278 ##############################################################
1279
1280 JAVASCI_ENABLE=yes
1281
1282 if test "$JAVA_ENABLE" = no -o "$JAVASCI" = no; then
1283    JAVASCI_ENABLE=no
1284 fi
1285
1286 AC_SUBST(JAVASCI_ENABLE)
1287
1288 ##############################################################
1289 ## Scipad module
1290 ##############################################################
1291
1292 SCIPAD_ENABLE=yes
1293
1294 if test "$WITH_TKSCI" = no -o "$GUI_ENABLE" = no; then
1295    SCIPAD_ENABLE=no
1296 fi
1297
1298 AC_SUBST(SCIPAD_ENABLE)
1299
1300 ##############################################################
1301 ## demo_tools module
1302 ##############################################################
1303
1304 DEMOTOOLS_ENABLE=yes
1305
1306 if test "$GUI_ENABLE" = no; then
1307    DEMOTOOLS_ENABLE=yes
1308 fi
1309
1310 AC_SUBST(DEMOTOOLS_ENABLE)
1311
1312 ##############################################################
1313 ## graphics/renderer/graphic_export module
1314 ##############################################################
1315
1316 GRAPHICS_ENABLE=yes
1317
1318 if test "$GUI_ENABLE" = no; then
1319    GRAPHICS_ENABLE=no
1320 fi
1321
1322 AC_SUBST(GRAPHICS_ENABLE)
1323
1324 #########################
1325 ## libtool
1326 #########################
1327
1328 AM_DISABLE_STATIC
1329 AC_PROG_LIBTOOL([shared dlopen])
1330 AM_PROG_LIBTOOL
1331
1332
1333 # Avoid to link all the dep from others libraries (*.la included by LIBADD)
1334 link_all_deplibs=no
1335
1336 # Check to see if building shared libraries
1337 libtool_build_shared_libs=no
1338 if test "$enable_shared" = "yes"; then
1339   libtool_build_shared_libs=yes
1340 fi
1341
1342 # Check to see if building static libraries
1343 libtool_build_static_libs=no
1344 if test "$enable_static" = "yes"; then
1345   libtool_build_static_libs=yes
1346 fi
1347
1348 # AM_CONDITIONAL(ENABLE_STATIC, test "$libtool_build_static_libs" = yes)
1349 # Fake to disable the static build
1350 AM_CONDITIONAL(ENABLE_STATIC, test "$libtool_build_static_libs" = xxxx)
1351
1352 AC_C_CONST()
1353 AC_C_INLINE()
1354
1355
1356 #######################
1357 ###### Creation of the header file (machine.h)
1358 #######################
1359
1360 AC_DEFINE_UNQUOTED([PATH_SEPARATOR], ["$PATH_SEPARATOR"],
1361 [The default path separator character.])
1362
1363 AH_TOP([#ifndef MACHINE_H
1364 #define MACHINE_H
1365 /* This file defines global element configuration of the build host */
1366 ])
1367
1368 AH_BOTTOM([
1369
1370 #ifdef DIR_SEPARATOR
1371            #undef DIR_SEPARATOR
1372 #endif
1373 #define DIR_SEPARATOR "/"
1374
1375 #endif /* MACHINE_H  */
1376 ])
1377
1378 # Define the standard extension of a dynamic library
1379 AC_DEFINE_UNQUOTED([SHARED_LIB_EXT],["$shrext_cmds"],[Extension of a shared library])
1380
1381 #################
1382 ## stop on warning
1383 #################
1384
1385 # Stop to compile scilab when a warning is found ...
1386 # This stuff is at the end of the configure.ac because it causes some
1387 # problem with AC_COMPILE (the -Werror is added to the test)
1388 #
1389 dnl @TODO : -O0 is only to bypass Stack shit... Must be removed.
1390 if test "$enable_stop_on_warning" = yes; then
1391    CFLAGS="$CFLAGS -Werror -O0"
1392    CXXFLAGS="$CXXFLAGS -Werror -O0"
1393 fi
1394
1395 AC_CONFIG_FILES([
1396 libs/MALLOC/Makefile
1397 libs/dynamiclibrary/Makefile
1398 libs/doublylinkedlist/Makefile
1399 libs/hashtable/Makefile
1400 libs/libst/Makefile
1401 contrib/Makefile
1402 modules/helptools/Makefile
1403 modules/helptools/macros/xmlfiletohtml.sci
1404 modules/data_structures/Makefile
1405 modules/differential_equations/Makefile
1406 modules/optimization/Makefile
1407 modules/elementary_functions/Makefile
1408 modules/special_functions/Makefile
1409 modules/io/Makefile
1410 modules/shell/Makefile
1411 modules/completion/Makefile
1412 modules/history_manager/Makefile
1413 modules/jvm/Makefile
1414 modules/sound/Makefile
1415 modules/statistics/Makefile
1416 modules/mexlib/Makefile
1417 modules/sparse/Makefile
1418 modules/linear_algebra/Makefile
1419 modules/polynomials/Makefile
1420 modules/symbolic/Makefile
1421 modules/signal_processing/Makefile
1422 modules/arnoldi/Makefile
1423 modules/interpolation/Makefile
1424 modules/intersci/Makefile
1425 modules/localization/Makefile
1426 modules/metanet/Makefile
1427 modules/cacsd/Makefile
1428 modules/boolean/Makefile
1429 modules/integer/Makefile
1430 modules/double/Makefile
1431 modules/fileio/Makefile
1432 modules/spreadsheet/Makefile
1433 modules/string/Makefile
1434 modules/time/Makefile
1435 modules/graphics/Makefile
1436 modules/graphic_export/Makefile
1437 modules/renderer/Makefile
1438 modules/action_binding/Makefile
1439 modules/gui/Makefile
1440 modules/pvm/Makefile
1441 modules/randlib/Makefile
1442 modules/tclsci/Makefile
1443 modules/windows_tools/Makefile
1444 modules/core/Makefile
1445 modules/api_scilab/Makefile
1446 modules/call_scilab/Makefile
1447 modules/hdf5/Makefile
1448 modules/fftw/Makefile
1449 modules/umfpack/Makefile
1450 modules/scicos/Makefile
1451 modules/scicos_blocks/Makefile
1452 modules/functions/Makefile
1453 modules/dynamic_link/Makefile
1454 modules/overloading/Makefile
1455 modules/javasci/Makefile
1456 modules/maple2scilab/Makefile
1457 modules/m2sci/Makefile
1458 modules/compatibility_functions/Makefile
1459 modules/texmacs/Makefile
1460 modules/scipad/Makefile
1461 modules/development_tools/Makefile
1462 modules/output_stream/Makefile
1463 modules/console/Makefile
1464 modules/demo_tools/Makefile
1465 modules/genetic_algorithms/Makefile
1466 modules/simulated_annealing/Makefile
1467 modules/parameters/Makefile
1468 modules/matio/Makefile
1469 modules/atoms/Makefile
1470 modules/xpad/Makefile
1471 modules/Makefile
1472 libs/Makefile
1473 Makefile
1474 scilab.pc
1475 etc/modules.xml
1476 etc/classpath.xml
1477 modules/jvm/etc/jvm_options.xml
1478 scilab-lib.properties
1479 scilab-lib-doc.properties
1480 ])
1481
1482 # Detection of the module for the future version of Scilab 6
1483 # ie we detect module which ends with _yasp
1484
1485 if test "$enable_yasp" = yes; then
1486    AC_CONFIG_FILES([
1487    modules/development_tools/src/fake/Makefile
1488   ])
1489 fi
1490
1491 # This script is used by Scicos in order to regenerate the function/block list
1492 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])
1493
1494
1495 #MAN_FR MAN_ENG
1496 #modules/mpi/Makefile
1497 #for top_builddir in . .. ../.. $ac_auxdir $ac_auxdir/..; do
1498 #  test -f $top_builddir/configure && break
1499 #done
1500
1501
1502 #if test "$with_mpi" = yes; then
1503 #AC_CONFIG_FILES([modules/mpi/Makefile])
1504 #fi
1505
1506 # Generate stack.h
1507 if test "$IS_64_BITS_CPU" = true -o "$MACOSX" = "1"; then
1508    stack_h_cpp_flags=-DUSE_DYNAMIC_STACK
1509 else
1510    stack_h_cpp_flags=
1511 fi
1512
1513 AC_CONFIG_COMMANDS([modules/core/includes/stack.h],
1514   [if ! $CPP $stack_h_cpp_flags - < $srcdir/modules/core/includes/stack.h.in |\
1515               $GREP -v '^#' > $srcdir/modules/core/includes/stack.h ; then
1516      AC_MSG_ERROR([stack.h generation failed])
1517    fi],
1518   [CPP="$CPP"
1519    GREP="$GREP"
1520    stack_h_cpp_flags="$stack_h_cpp_flags"
1521   ])
1522
1523 AC_OUTPUT
1524
1525 # To distribution packager, you can uncomment this stuff is you want to 
1526 # disable the rpath issue
1527 # However, you will have to set all the LD_LIBRARY_PATH to .libs/ directory
1528 # since scilab is compiling macros and help into the source tree (ie before
1529 # the "make install")
1530 # You should consider using chrpath:
1531 # http://directory.fsf.org/project/chrpath/
1532 # to remove it before the make install
1533
1534 #case ${host} in
1535 #  *-pc-linux-gnu)
1536 #    AC_MSG_RESULT([Fixing libtool for -rpath problems.])
1537 #    sed < libtool > libtool-2 \
1538 #    's/^hardcode_libdir_flag_spec.*$/hardcode_libdir_flag_spec=" -D__LIBTOOL_IS_A_FOOL__ "/'
1539 #    mv libtool-2 libtool
1540 #    chmod 755 libtool
1541 #  ;;
1542 #esac
1543 #
1544
1545 echo ""
1546
1547 echo "Scilab is configured as follows. Please verify that this configuration"
1548 echo "matches your expectations."
1549 echo ""
1550 echo "Host system type : $host"
1551 echo ""
1552 echo "                  Option                        Value"
1553 echo "-------------------------------------------------------------------------"
1554 echo "Shared libraries.......      --enable-shared=$libtool_build_shared_libs   $libtool_build_shared_libs"
1555 echo "Static libraries.......      --enable-static=$libtool_build_static_libs   $libtool_build_static_libs"
1556 echo "GNU ld.................      --with-gnu-ld=$with_gnu_ld           $lt_cv_prog_gnu_ld"
1557 echo "Enable debug ..........      --enable-debug=$enable_debug $enable_debug"
1558 echo "Enable debug C.........      --enable-debug-C=$enable_debug_C     $enable_debug_C"
1559 echo "Enable debug C++.......      --enable-debug-CXX=$enable_debug_CXX $enable_debug_CXX"
1560 echo "Enable debug Java......      --enable-debug-java=$enable_debug_java       $enable_debug_java"
1561 echo "Enable debug Fortran...      --enable-debug-fortran=$enable_debug_fortran $enable_debug_fortran"
1562 echo "Enable stop on warning.      --enable-stop-on-warning=$enable_stop_on_warning     $enable_stop_on_warning"
1563
1564 echo ""
1565 echo "Compiler Configuration:"
1566 echo "Intel (--with-intelcompilers) .... =              $with_intelcompilers"
1567 echo "GNU gcc (--with-gcc) ............. =              $with_gcc"
1568 echo "GNU Fortran 77 (--with-g77) ...... =              $with_g77"
1569 echo "GNU Fortran 95 (--with-gfortran) . =              $with_gfortran"
1570 echo ""
1571 echo "Options:"
1572 echo "Use PVM (--without-pvm) .......................... = $with_pvm"
1573 echo "PVM include (--with-pvm-include) ................. = $PVMINCLUDE"
1574 echo "PVM library (--with-pvm-library) ................. = $PVMLIBDIR"
1575 echo "Compile with Ocaml (--without-ocaml) ............. = $with_ocaml"
1576 echo "Do not use TCL/TK (--without-tk) ................. = $with_tk"
1577 echo "TCL include (--with-tcl-include) ................. = $USER_TCL_INC_PATH"
1578 echo "TCL library (--with-tcl-library) ................. = $USER_TCL_LIB_PATH"
1579 echo "TK include (--with-tk-include) ................... = $USER_TK_INC_PATH"
1580 echo "TK library (--with-tk-library) ................... = $USER_TK_LIB_PATH"
1581 echo "Install XML Help (--with-install-help-xml) ....... = $with_install_help_xml"
1582 echo "Make the package relocatable (--enable-relocatable)= $RELOCATABLE"
1583 echo "Use FFTW (--without-fftw) ........................ = $with_fftw"
1584 echo "Use MATIO (--without-matio) ...................... = $with_matio"
1585
1586 echo ""
1587 if test "$with_gui" = no; then
1588    echo "Not using Scicos because of the option --without-gui"
1589 else
1590 if test $SCICOS_ENABLE = yes; then
1591    echo "Scicos enable"
1592    echo ""
1593 if test "$with_ocaml" != no -a "$OCAMLC" != no -a "$OCAMLOPT" != no; then
1594    echo "Ocaml Configuration (for Modelica compiler):"
1595    echo "OCAMLC ............. = $OCAMLC"
1596    echo "OCAMLOPT ........... = $OCAMLOPT"
1597    echo "OCAMLDEP ........... = $OCAMLDEP"
1598 else
1599         echo "Will not build Modelica compiler"
1600 fi
1601 else 
1602    echo "Not using Scicos"
1603 fi
1604 fi
1605
1606 echo ""
1607 if test $PVM_ENABLE = yes; then
1608    echo "PVM Configuration:"
1609    echo "PVM Architecture ... = $PVM_ARCH"
1610    echo "PVM INCLUDE ........ = $PVM_INCLUDE"
1611    echo "PVM LIBS ........... = $PVM_LIB"
1612 else
1613    echo "Not using PVM"
1614 fi
1615
1616 echo ""
1617 if test $FFTW_ENABLE = yes;  then
1618    echo "FFTW Configuration:"
1619    echo "FFTW LIBS .......... = $FFTW3_LIB"
1620    echo "FFTW CFLAGS ........ = $FFTW3_CFLAGS"
1621 else
1622    echo "Not using FFTW"
1623 fi
1624
1625 echo ""
1626 if test $MATIO_ENABLE = yes;  then
1627    echo "MATIO Configuration:"
1628    echo "MATIO LIBS .......... = $MATIO_LIBS"
1629    echo "MATIO CFLAGS ........ = $MATIO_CFLAGS"
1630 else
1631    echo "Not using MATIO"
1632 fi
1633
1634 echo ""
1635 if test $UMFPACK_ENABLE = yes;  then
1636    echo "UMFPACK Configuration:"
1637    echo "UMFPACK LIBS ....... = $UMFPACK_LIB"
1638    echo "UMFPACK CFLAGS ..... = $UMFPACK_CFLAGS"
1639    if test $SUITESPARSE = yes; then
1640       echo "UMFPACK SUITESPARSE  = Yes"
1641    else
1642       echo "UMFPACK SUITESPARSE  = No"
1643    fi
1644 else
1645    echo "Not using UMFPACK"
1646 fi
1647
1648
1649 echo ""
1650 echo "BLAS/LAPACK/ATLAS Configuration:"
1651 echo "BLAS LIBS ............. = $BLAS_LIBS"
1652 echo "BLAS TYPE ............. = $BLAS_TYPE"
1653 echo "LAPACK LIBS ........... = $LAPACK_LIBS"
1654 echo "LAPACK TYPE ........... = $LAPACK_TYPE"
1655
1656 echo ""
1657
1658 #if test "$with_mpi" = yes; then
1659 #   echo "MPI Configuration:"
1660 #   echo "MPI LIBS ........... = $MPILIBS"
1661 #   echo "MPI C Compiler ..... = $MPICC"
1662 #   echo "MPI C++ Compiler ... = $MPICXX"
1663 #   echo "MPI F77 Compiler ... = $MPIF77"
1664 #else
1665 #   echo "Not using MPI"
1666 #fi
1667
1668 #if test "$with_openmpi" != "no"; then
1669 #   echo "OpenMPI Configuration:"
1670 #   echo "OpenMPI LIBS ........... = $OPENMPI_LIBS"
1671 #   echo "OpenMPI C Compiler ..... = $OPENMPI_CC"
1672 #   echo "OpenMPI F77 Compiler ... = $MPIF77"
1673 #else
1674 #   echo "Not using MPI"
1675 #fi
1676
1677 echo ""
1678 if test $BUILD_LOCALIZATION_ENABLE != no; then
1679    echo "Gettext/localization configuration:"
1680    echo "xgettext ............... = $XGETTEXT"
1681    echo "msgfmt  ................ = $MSGFMT"
1682    echo "msgfmt_opts ............ = $MSGFMT_OPTS"
1683    echo "msgcat  ................ = $MSGCAT"
1684 else
1685    echo "Won't generate localization files"
1686 fi
1687
1688 echo ""
1689 if test $HELP_ENABLE = yes; then
1690    echo "Docbook XSL path ....... = $DOCBOOK_ROOT"
1691    echo "Batik (SVG) ............ = $BATIK"
1692    echo "Saxon XSLT ............. = $SAXON"
1693    echo "FOP (XML => PDF) ....... = $FOP"
1694    echo "Jeuclid (MathML) ....... = $JEUCLID_CORE"
1695    echo "Commons I/O ............ = $COMMONS_IO"
1696    echo "XML graphics commons ... = $XMLGRAPHICS_COMMONS"
1697    echo "XML commons external ... = $XML_APIS_EXT"
1698 else
1699    echo "No documentation generated"
1700 fi
1701
1702 echo ""
1703 echo "Java Configuration:"
1704 if test ! -z "$JAVAC"; then
1705 echo "  JAVA_HOME ........... = $JAVA_HOME"
1706 echo "  JAVAC ............... = $JAVAC"
1707 echo "  JAVA_CLASSPATH ...... = $JAVA_CLASSPATH"
1708 echo "  JAVA_VERSION ........ = $JAVA_VERSION"
1709 echo "  JAVAC_FLAGS ......... = $JAVAC_FLAGS"
1710 echo "  JAVA_JNI_INCLUDE .... = $JAVA_JNI_INCLUDE"
1711 echo "  JAVA_JNI_LIBS ....... = $JAVA_JNI_LIBS"
1712 echo "  JAVA_JNI_LIBS_PRELOAD = $JAVA_JNI_LIBS_PRELOAD"
1713 echo "  JAVA ................ = $JAVA"
1714 echo "  JAR ................. = $JAR"
1715 echo "  ANT ................. = $ANT"
1716 else
1717 echo "  JAVA disabled"
1718 fi
1719
1720
1721 echo ""
1722 echo "Java dependencies:"
1723 if test ! -z "$JAVAC"; then
1724 echo "  Flexdock ............ = $FLEXDOCK"
1725 echo "  JOGL ................ = $JOGL"
1726 echo "  Jhall  .............. = $JHALL"
1727 echo "  Gluegen ............. = $GLUEGEN_RT"
1728 echo "  Jrosetta (API) ...... = $JROSETTA_API"
1729 echo "  Jrosetta (Engine) ... = $JROSETTA_ENGINE"
1730 echo "  Commons Logging ..... = $COMMONS_LOGGING"
1731 fi
1732
1733 echo "" 
1734 echo "TCL/TK configuration:"
1735 echo "  TK_INC_PATH ........ = $TK_INC_PATH"
1736 echo "  TCL_INC_PATH ....... = $TCL_INC_PATH"
1737 echo "  TCLTK_LIBS ......... = $TCLTK_LIBS"
1738 echo "  TCL_SERIAL_VERSION . = $TCL_SERIAL_VERSION"
1739 echo "  TK_SERIAL_VERSION .. = $TK_SERIAL_VERSION"
1740
1741 echo "" 
1742 echo "XML configuration:"
1743 echo "  XML_FLAGS .......... = $XML_FLAGS"
1744 echo "  XML_LIBS ........... = $XML_LIBS"
1745 echo "  XML_VERSION ........ = $XML_VERSION"
1746
1747 echo "" 
1748 if test $HDF5_ENABLE = yes;  then
1749    echo "HDF5 configuration:"
1750    echo "  HDF5 CFLAGS ......... = $HDF5_CFLAGS"
1751    echo "  HDF5 LIBS ........... = $HDF5_LIBS"
1752    echo "  HDF5 Java ........... = $JHDF5"
1753 else
1754    echo "Not using HDF5"
1755 fi
1756
1757 echo "" 
1758 echo "PCRE configuration:"
1759 echo "  PCRE_CFLAGS ........ = $PCRE_CFLAGS"
1760 echo "  PCRE_LIBS .......... = $PCRE_LIBS"
1761 echo "  PCRE_VERSION ....... = $PCRE_VERSION"
1762
1763
1764 echo ""
1765 echo "SWIG Configuration:"
1766 if test ! -z "$SWIG_BIN"; then
1767 echo "  SWIG_BIN ........... = $SWIG_BIN"
1768 echo "  SWIG_JAVA .......... = $SWIG_JAVA"
1769 else
1770 echo "  SWIG generation disabled"
1771 fi
1772
1773 echo ""
1774 echo "GIWS Configuration:"
1775 if test ! -z "$GIWS_BIN"; then
1776 echo "  GIWS_BIN ........... = $GIWS_BIN"
1777 else
1778 echo "  GIWS generation disabled"
1779 fi
1780
1781 echo ""
1782 echo "Libtool config:"
1783 echo "  objext .............. = $objext"
1784 echo "  libext (static) ..... = $libext"
1785 echo "  shrext_cmds ......... = $shrext_cmds"
1786 echo "  exeext .............. = $exeext"
1787
1788 echo ""
1789
1790 echo "Compilation paths:"
1791 echo "  srcdir .............. = $SCI_SRCDIR"
1792 echo "  srcdir_full ......... = $SCI_SRCDIR_FULL"
1793 echo "  builddir ............ = $SCI_BUILDDIR"
1794 if test "$SCI_SRCDIR_FULL" != "$SCI_BUILDDIR"; then
1795 echo "  VPATH build ......... = Activated"
1796 fi
1797
1798 echo "" 
1799 echo "Platform informations:"
1800 echo "  host ........... = $host"
1801 echo "  host_cpu ....... = $host_cpu"
1802 echo "  host_vendor .... = $host_vendor"
1803 echo "  host_os ... .... = $host_os"
1804 echo "  hostname ....... = $ac_hostname"
1805 echo "  CPU 64 bits .... = $IS_64_BITS_CPU"
1806
1807 echo ""
1808 echo "Options used to compile and link:"
1809 echo "  prefix ......... = $prefix"
1810 echo "  localedir ...... = $localedir"
1811 echo "  VERSION ........ = $PACKAGE_VERSION"
1812 echo "  CC ............. = $CC"
1813 echo "  CFLAGS ......... = $CFLAGS"
1814 echo "  PCFLAGS ........ = $PCFLAGS"
1815 echo "  DEFS ........... = $DEFS"
1816 echo "  LD ............. = $LD"
1817 echo "  LDFLAGS ........ = $LDFLAGS"
1818 echo "  LIBS ........... = $LIBS"
1819 echo "  CXX ............ = $CXX"
1820 echo "  CXXFLAGS ....... = $CXXFLAGS"
1821 echo "  F77 ............ = $F77"
1822 echo "  FFLAGS ......... = $FFLAGS"
1823 echo "  F77_LDFLAGS .... = $F77_LDFLAGS"
1824 echo "  TERMCAP_LIB .... = $TERMCAP_LIB"
1825 echo ""