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