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