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