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