# # Scilab ( http://www.scilab.org/ ) - This file is part of Scilab # Copyright (C) INRIA - 2006-2008 - Sylvestre Ledru # Copyright (C) DIGITEO - 2009 - Sylvestre Ledru # Copyright (C) DIGITEO - 2009 - Pierre MARECHAL # # This file must be used under the terms of the CeCILL. # This source file is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at # http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt # dnl Process this file with autoconf to produce a configure script. AC_REVISION($Revision$)dnl AC_INIT([Scilab],[5],[http://bugzilla.scilab.org/]) AC_PREREQ(2.60) AC_CONFIG_MACRO_DIR([m4/]) SCI_BUILDDIR="`pwd`" SCI_SRCDIR="$srcdir" SCI_SRCDIR_FULL="`cd $SCI_SRCDIR && pwd`" SCILAB_LIBRARY_VERSION=5:2:0 AC_SUBST(SCILAB_LIBRARY_VERSION) #shared library versioning #GENERIC_LIBRARY_VERSION=1:2:0 # | | | # +------+ | +---+ # | | | # current:revision:age # | | | # | | +- increment if interfaces have been added # | | set to zero if interfaces have been removed # or changed # | +- increment if source code has changed # | set to zero if current is incremented # +- increment if interfaces have been added, removed or changed # Check if we have a space in the path to the source tree SPACE_IN_PATH=`echo "$SCI_SRCDIR_FULL"|grep " " > /dev/null; echo $?` if test "$SPACE_IN_PATH" = "0"; then AC_MSG_WARN([=====================================]) 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...]) AC_MSG_WARN([=====================================]) sleep 180 fi AC_CONFIG_AUX_DIR(config) AC_CONFIG_HEADERS([modules/core/includes/machine.h]) # strip executable AM_PROG_INSTALL_STRIP AC_PROG_LN_S AC_SYS_LARGEFILE # In order to be able to change the scilab directory # See http://wiki.debian.org/RpathIssue AC_RELOCATABLE AC_RELOCATABLE_LIBRARY AC_LIB_RPATH # If configure detect that timestamp changed, # it tries to rebuild configure & makefile which can be a painmaker # if the version is different AM_MAINTAINER_MODE AM_INIT_AUTOMAKE([-Wall foreign]) # Not using -Werror because we override {C,F}FLAGS in order to disable optimisation AC_CANONICAL_HOST ################################# ## all the --with-* argument help ################################# AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug],[Do not optimize and print warning messages (C/C++/Fortran code)])) AC_ARG_ENABLE(debug-C, AC_HELP_STRING([--enable-debug-C],[Do not optimize and print warning messages (C code)])) AC_ARG_ENABLE(debug-CXX, AC_HELP_STRING([--enable-debug-CXX],[Do not optimize and print warning messages (C++ code)])) AC_ARG_ENABLE(debug-java, AC_HELP_STRING([--enable-debug-java],[Print warning messages and line numbers (Java code)])) AC_ARG_ENABLE(debug-fortran, AC_HELP_STRING([--enable-debug-fortran],[Do not optimize and print warning messages (Fortran code)])) AC_ARG_ENABLE(debug-linker, AC_HELP_STRING([--enable-debug-linker],[Print warning messages from the linker (ld)])) AC_ARG_ENABLE(stopOnWarning, AC_HELP_STRING([--enable-stop-on-warning],[Stop the compilation on the first warning found in the C/C++ code])) AC_ARG_WITH(gcc, AC_HELP_STRING([--with-gcc],[Use gcc C compiler ])) AC_ARG_WITH(g77, AC_HELP_STRING([--with-g77],[Use g77, GNU Fortran 77 compiler ])) AC_ARG_WITH(gfortran, AC_HELP_STRING([--with-gfortran],[Use gfortran, GNU Fortran 95 compiler ])) AC_ARG_WITH(intelcompilers, AC_HELP_STRING([--with-intelcompilers],[Use Intel C (icc) and Fortran (ifort) proprietary compilers (GNU/Linux only) ])) AC_ARG_WITH(tk, AC_HELP_STRING([--without-tk],[Disable the interface to Tcl/Tk ])) AC_ARG_WITH(javasci, AC_HELP_STRING([--without-javasci],[Disable the Java/Scilab interface (javasci)])) AC_ARG_WITH(gui, AC_HELP_STRING([--without-gui],[Disable the Scilab Graphical User Interface (GUI). Intended for embedded/clustering/grid Scilab ])) AC_ARG_ENABLE(build-swig, AC_HELP_STRING([--enable-build-swig],[Regenerate Java => C wrappers produces by Swig (A Java Development Kit (JDK) is mandatory for this option)])) AC_ARG_ENABLE(build-giws, AC_HELP_STRING([--enable-build-giws],[Regenerate C/C++ => Java wrappers produces by Giws (A Java Development Kit (JDK) is mandatory for this option)])) ################################################ ########## compilator & misc programs detection ################################################ AC_PROG_CPP AC_PROG_GREP PKG_PROG_PKG_CONFIG ##################################################### ## check if options are correct (or not) ##################################################### if test "$with_g77" = yes -a "$with_gfortran" = yes; then AC_MSG_ERROR([Conflicting options : you specified two fortran compiler]) fi if test "$with_intelcompilers" = yes -a "$with_gcc" = yes; then AC_MSG_ERROR([Conflicting options : you specified two compiler series]) fi ######## fortran ######## if test "$with_g77" = yes; then AC_PROG_F77(g77) if test -z "$F77"; then AC_MSG_ERROR([You asked me to use g77 but i haven't been able to find it]) fi fi if test "$with_gfortran" = yes; then AC_PROG_F77(gfortran) if test -z "$F77"; then AC_MSG_ERROR([You asked me to use gfortran but i haven't been able to find it]) fi fi if test "$with_intelcompilers" = yes; then AC_PROG_F77(ifc ifort) if test -z "$F77"; then AC_MSG_ERROR([You asked me to use ifc (intel fortran compiler) but i haven't been able to find it]) fi fi if test -z "$F77"; then ## No Frotran compiler specified... We rely on Autoconf to find the best AC_PROG_F77 fi # case statements were introduced in fortran 90 so we can use that # as a test to see if our compiler is fortran 90 compatible. f90compatible=false if test -z "$F77"; then AC_MSG_ERROR([No fortran compiler found. Cannot compile scilab without a fortran compiler]) fi AC_MSG_CHECKING([if $F77 is a fortran 90 compatible compiler]) f90compatible=false AC_LANG_PUSH([Fortran 77]) AC_COMPILE_IFELSE([ PROGRAM hello do 50 i = 1, 5 select case ( i ) case (1) print*, "case is 1, i is ", i case ( 2 : 3 ) print*, "case is 2 to 3, i is ", i case default print*, "default case, i is ", i end select 50 continue END ], [AC_MSG_RESULT([yes]) AC_DEFINE([G95_FORTRAN],[],[uses G95 fortran]) f90compatible=true ], [AC_MSG_RESULT([no])] ) AC_LANG_POP([Fortran 77]) ############ C ############### if test "$with_gcc" = yes; then AC_PROG_CC(gcc) if test -z "$CC"; then AC_MSG_ERROR([You asked me to use gcc but i haven't been able to find it]) fi fi if test "$with_intelcompilers" = yes; then AC_PROG_CC(icc ecc) if test -z "$CC"; then AC_MSG_ERROR([You asked me to use icc (intel C compiler) but I haven't been able to find it]) fi fi if test -z "$CC"; then # No C compiler specified... We rely on Autoconf to find the best AC_PROG_CC fi if test -z "$CC"; then AC_MSG_ERROR([No C Compiler found. Cannot compile Scilab without a C compiler]) fi AC_CHECK_SIZEOF([int]) AC_CHECK_SIZEOF([long]) ### C++ ### AC_PROG_CXX # we can't just do something like # AC_CHECK_PROG(cxx_present, $CXX, "yes", "no") # because if the user has specified the full path of the desired C++ compiler then AC_CHECK_PROG # will fail. If AC_PROG_CXX fails to find a c++ compiler it will set CXX=g++ so just run AC_CHECK_PROG # in this special case case $CXX in g++) AC_CHECK_PROG([cxx_present], [$CXX], [yes], [no]) if test "x$cxx_present" != "xyes"; then AC_MSG_ERROR([No C++ compiler found. Cannot compile scilab without a C++ compiler]) fi ;; esac # for "subdir-objects" AM_PROG_CC_C_O AC_PROG_F77_C_O # If this option is provided, enable the debug on C & C++ if test "$enable_stop_on_warning" = yes; then enable_debug_C=yes enable_debug_CXX=yes fi if test "$enable_debug" = yes; then enable_debug_fortran=yes enable_debug_C=yes enable_debug_CXX=yes else enable_debug=no fi if test "$enable_debug_fortran" = yes; then FFLAGS="`echo "$FFLAGS"| sed -e 's|-O[0-9+]|-O0|'`" else enable_debug_fortran=no fi if test "$enable_debug_C" = yes; then CFLAGS="`echo "$CFLAGS"| sed -e 's|-O[0-9+]|-O0|'`" else enable_debug_C=no fi if test "$enable_debug_CXX" = yes; then CXXFLAGS="`echo "$CXXFLAGS"| sed -e 's|-O[0-9+]|-O0|'`" else enable_debug_CXX=no fi if test "x${prefix}" = "xNONE"; then prefix="${ac_default_prefix}" fi ############################### ## get the version ############################### SCIVERSION=`cat $SCI_SRCDIR/Version.incl | sed -e "s/SCIVERSION=//" ` ############################################# ## Compilers and options according to machine ############################################# ###################### ######## Set compilation options for intel C/Fortran compilers ###################### if test "$with_intelcompilers" = yes; then SCI_INTEL_COMPILER() fi ########### FORTRAN ###################### ###################### ######## With F77 / G77 / GFortran ... ###################### if test -n "$F77"; then dnl @TODO : Maybe we should check that it is actually gfortran if test "$enable_debug_fortran" = yes; then # -D_FORTIFY_SOURCE=2 AC_LANG_PUSH([Fortran 77]) for flag in -g -Wall -Wimplicit -Wsurprising ; do case " ${FFLAGS} " in *\ ${flag}\ *) # flag is already present ;; *) AC_MSG_CHECKING([if the Fortran compiler accepts ${flag}]) ac_save_FFLAGS="$FFLAGS" FFLAGS="$FFLAGS ${flag}" AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]) FFLAGS="$ac_save_FFLAGS" ] ) ;; esac done AC_LANG_POP([Fortran 77]) else FFLAGS="$FFLAGS -DNDEBUG" fi case "$host" in x86_64-*-linux*) FFLAGS="$FFLAGS -m64 -fPIC" ;; # Dec Alpha OSF 4 alpha*-dec-osf4.*) FFLAGS="$FFLAGS -fpe3" ;; alpha*-dec-osf*) FFLAGS="$FFLAGS -fpe3 -switch nosqrt_recip" ;; rs6000-*-*) FFLAGS="$FFLAGS -qcharlen=4096" ;; mips-*-ultrix*) FFLAGS="-O0 -fpe1" ;; *-*-hpux9.*) FFLAGS="$FFLAGS +Obb1200 +E4 -Dhpux" ;; *-*-hpux10.*) if test "$enable_debug_fortran" = yes; then FFLAGS="+E4 +Z +DAportable -Dhpux" else FFLAGS="+O2 +E4 +Z +DAportable -Dhpux" fi # F77_LDFLAGS="-Wl,+vnocompatwarnings,-E /usr/lib/libdld.sl" ;; *-*-hpux11.*) if test "$enable_debug_fortran" = yes; then FFLAGS=" +Z +DAportable -Dhpux" else FFLAGS="+O2 +Z +DAportable -Dhpux" fi FLIBS="-ldld -lnsl -lU77 -lm" #do not call AC_F77_LIBRARY_LDFLAGS because if assumes PA2.0 while Scilab is built with #DAportable=PA1.1 #AC_F77_LIBRARY_LDFLAGS # @TODO : check why and if it is still the case # F77_LDFLAGS="-Wl,+vnocompatwarnings,-E /usr/lib/libdld.sl" ;; esac # FFLAGS_O0=`echo $FFLAGS | sed 's/-O[0-9]*//g'` fi ######################### # setting parameters according to system types ######################### case "$host" in *-*-hpux9.*|*-*-hpux10.*|*-*-hpux11.*) HPUX=1 ;; sparc-*) SPARC=1 ;; mips-sgi-irix*) MIPS_SGI_IRIX=1 ;; *-*-solaris*) SOLARIS=1 ;; *darwin*) MACOSX=1 ;; esac AM_CONDITIONAL(IS_MACOSX, test -n "$MACOSX") AM_CONDITIONAL(IS_HPUX, test -n "$HPUX") AM_CONDITIONAL(IS_SPARC, test -n "$SPARC") AM_CONDITIONAL(IS_SOLARIS, test -n "$SOLARIS") AM_CONDITIONAL(IS_MIPS_SGI_IRIX, test -n "$MIPS_SGI_IRIX") ############ ## C++ ############ if test -z "$CXX"; then AC_MSG_ERROR([No C++ compiler found. Cannot compile scilab without a C++ compiler]) fi case "$CXX" in g++-* | g++ | ccache*g++ | ccache*g++-* ) ## With GNU C++ Compiler if test "$enable_debug_CXX" = yes; then 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" case "$host" in *-linux-gnu ) # Only doing that under Linux CXXFLAGS="$CXXFLAGS -fdiagnostics-show-option -Werror=format-security" ;; esac else CXXFLAGS="$CXXFLAGS -DNDEBUG" fi CXXFLAGS="$CXXFLAGS -fno-stack-protector" # bug 3131 ;; esac #### 64 bits detection IS_64_BITS_CPU=false case "$host" in x86_64-*-linux-gnu | x86_64-linux-gnu | ia64-*-linux-gnu | alpha-*-linux-gnu | alpha-*-netbsd* | x86_64-*-netbsd* | sparc64-*-netbsd*) IS_64_BITS_CPU=true ;; esac ##########" # not useful under Linux (and was only defined here with scilab 4) #AC_CHECK_LIB(ieee,main,[LIEEE="-lieee"]) #LDFLAGS="$LIEEE $LDFLAGS" #F77_LDFLAGS="$F77_LDFLAGS $LIEEE" case "$CC" in gcc-* | gcc | ccache*gcc | ccache*gcc-* ) ## With GNU Compiler if test "$enable_debug_C" = yes; then 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" # used to be -O # -D_FORTIFY_SOURCE=2 case "$host" in *-linux-gnu ) # Only doing that under Linux if test "$enable_debugLinker" = yes; then LDFLAGS="$LDFLAGS -Wl,--warn-common,-x" fi CFLAGS="$CFLAGS -fdiagnostics-show-option -Werror=format-security" ;; esac else CFLAGS="$CFLAGS -DNDEBUG" fi CFLAGS="$CFLAGS -fno-stack-protector" # bug 3131 case "$host" in # Linux sparc | Linux, old binary format a.out (NO LONGER SUPPORTED) sparc-*-linux-gnu|*-pc-linux-gnuaout) CFLAGS="$CFLAGS -fwritable-strings" ;; x86_64-*-linux-gnu | x86_64-linux-gnu) CFLAGS="$CFLAGS -DNARROWPROTO -m64" ;; i*86-*-linux-gnu | *-pc-linux-gnu | i*86-*-linux ) CFLAGS="$CFLAGS -DNARROWPROTO" ;; ia64-*-linux-gnu ) CFLAGS="$CFLAGS -DNARROWPROTO" ;; alpha-*-linux-gnu) CFLAGS="$CFLAGS -mieee-with-inexact -fwritable-strings" LDFLAGS="$LDFLAGS -mieee-with-inexact" ;; powerpc-*-linux-gnu) CFLAGS="$CFLAGS -D_GNU_SOURCE -fwritable-strings" ;; *-*-solaris*) if test "$enable_debug_C" = yes; then CFLAGS="$CFLAGS -DSVR4 -DSYSV -Dsolaris" else CFLAGS="-O2 -DNDEBUG -DSVR4 -DSYSV -Dsolaris" fi ;; *-*-freebsd*) CFLAGS="$CFLAGS -Dfreebsd" LDFLAGS="$LDFLAGS -lm" ;; alpha-*-netbsd*) CFLAGS="$CFLAGS -Dnetbsd -mieee" FFLAGS="$FFLAGS -Dnetbsd -mieee" ;; *-*-netbsd*) CFLAGS="$CFLAGS -Dnetbsd" ;; *-*-darwin*) CFLAGS=" $CFLAGS -I/sw/include " CPPFLAGS=" $CPPFLAGS -I/sw/include " LDFLAGS=" $LDFLAGS -L/sw/lib/ " case "$host" in i386-apple-darwin*) CC=" $CC -arch i386 " CXX=" $CXX -arch i386 " ;; x86_64-apple-darwin*) CC=" $CC -arch x86_64 " CXX=" $CXX -arch x86_64 " ;; esac ;; esac ;; # end of the gcc case on the $CC *) ## CC compiler (not GCC) if test "$enable_debug_C" = yes; then CFLAGS="$CFLAGS -g" else CFLAGS="$CFLAGS -DNDEBUG" fi case "$host" in # Dec Alpha OSF 4 alpha*-dec-osf4.*) CFLAGS="$CFLAGS -std -ieee_with_inexact" LDFLAGS="$LDFLAGS -ieee_with_inexact" ;; alpha*-dec-osf*) CFLAGS="$CFLAGS -ieee_with_inexact" LDFLAGS="$LDFLAGS -ieee_with_inexact" ;; rs6000-*-*) # IBM AIX RS 6000 (NO LONGER SUPPORTED) CFLAGS="-Daix -DSYSV" ;; mips-sgi-irix*) # SGI CFLAGS="$CFLAGS -DSYSV -DSVR4" ;; *-*-hpux9.*) CFLAGS="$CFLAGS -DSYSV -Dhpux" ;; *-*-hpux10.*) # HP 10 if test "$enable_debug_C" = yes; then CFLAGS="$CFLAGS -DSYSV -Dhpux" else CFLAGS="$CFLAGS -DSYSV -Dhpux +Z +DAportable" fi ;; *-*-hpux11.*) # HP 11 CFLAGS="$CFLAGS -DSYSV -Dhpux -Dhppa +Z +DAportable" ;; *-*-solaris*) # SUN SOLARIS CFLAGS="$CFLAGS -DSVR4 -DSYSV -Dsolaris -I/usr/local/include/" LDFLAGS="$LDFLAGS -L/usr/local/lib/" ;; esac ;; # end of not a gcc compiler esac # flag for possible compilations in configure CFLAGS="$CFLAGS "'-I$(top_srcdir)/modules/core/includes/ -I$(top_srcdir)/libs/MALLOC/includes/ -I$(top_srcdir)/modules/localization/includes/' CXXFLAGS="$CXXFLAGS "'-I$(top_srcdir)/modules/core/includes/ -I$(top_srcdir)/libs/MALLOC/includes/ -I$(top_srcdir)/modules/localization/includes/' FFLAGS="$FFLAGS "'-I$(top_srcdir)/modules/core/includes/' if test $IS_64_BITS_CPU = true -o "$MACOSX" = "1"; then if test $f90compatible = false; then AC_MSG_ERROR([64 bits support needs a fortran 90 compiler (try --with-gfortran).]) fi AC_DEFINE([USE_DYNAMIC_STACK], [], [If we are building a 64 bits version]) fi AM_CONDITIONAL(IS_64_BITS_CPU, test $IS_64_BITS_CPU = true) AM_CONDITIONAL(USE_DYNAMIC_STACK, test $IS_64_BITS_CPU = true -o "$MACOSX" = "1") ####################### ## test for underscores (name mangling issues between C and fortran) ####################### AC_CHECK_UNDERSCORE_FORTRAN() ################# ## HDF5 ################# AC_ARG_WITH(hdf5, AC_HELP_STRING([--without-hdf5],[Disable the interface to the HDF5 library])) HDF5_ENABLE=no if test "$with_hdf5" != no; then AC_HDF5() # TODO: check if the JNI JHDF5 library are available HDF5_ENABLE=yes fi AC_SUBST(HDF5_ENABLE) AM_CONDITIONAL(HDF5, test "$with_hdf5" != no) ########################### ## test for JAVA compiler ########################### if test "$with_javasci" != no -o "$with_gui" != no -o "$enable_build_help" != no; then # See if --with-jdk command line argument is given # Try to detect the installed JVM, this could be controlled # by the above --with options AC_JAVA_WITH_JDK AC_JAVA_DETECT_JVM if test "$ac_java_jvm_name" = "jdk"; then JAVA_HOME=$ac_java_jvm_dir JAVA_VERSION=$ac_java_jvm_version # AC_JAVA_TOOLS AC_JAVA_JNI_INCLUDE JAVA_JNI_INCLUDE=$ac_java_jvm_jni_include_flags AC_JAVA_JNI_LIBS JAVA_JNI_LIBS=$ac_java_jvm_jni_lib_flags JAVA_JNI_LIBS_PRELOAD=$ac_java_jvm_ld_preload AC_JAVA_CLASSPATH JAVA_CLASSPATH=$ac_java_classpath AC_JAVA_TOOLS AC_JAVA_ANT if test "$with_gui" != no; then # jgraphx AC_JAVA_CHECK_PACKAGE([jgraphx],[com.mxgraph.model.mxCell],[Diagram design]) JGRAPHX=$PACKAGE_JAR_FILE AC_SUBST(JGRAPHX) AC_JAVA_CHECK_VERSION_PACKAGE([jgraphx],[import com.mxgraph.view.mxGraph;],$JGRAPHX,[1.2.0.7],[mxGraph.VERSION]) # Docking system AC_JAVA_CHECK_PACKAGE([flexdock],[org.flexdock.docking.DockingManager],[Scilab Gui]) FLEXDOCK=$PACKAGE_JAR_FILE AC_SUBST(FLEXDOCK) # Swing look&feel implementations AC_JAVA_CHECK_PACKAGE([looks],[com.jgoodies.looks.common.RenderingUtils],[Scilab Gui - Look and feel],"yes") LOOKS=$PACKAGE_JAR_FILE # Named differently under ArchLinux if test -z "$LOOKS"; then AC_JAVA_CHECK_PACKAGE([jgoodies-looks],[com.jgoodies.looks.common.RenderingUtils],[Scilab Gui - Look and feel]) LOOKS=$PACKAGE_JAR_FILE fi AC_SUBST(LOOKS) # Skin Look and Feel AC_JAVA_CHECK_PACKAGE([skinlf],[com.l2fprod.util.AccessUtils],[Scilab Gui - Skin Look and Feel]) SKINLF=$PACKAGE_JAR_FILE AC_SUBST(SKINLF) # JOGL AC_JAVA_CHECK_PACKAGE([jogl],[javax.media.opengl.glu.GLUnurbs],[Scilab 3D rendering - Version 1.1.1]) JOGL=$PACKAGE_JAR_FILE AC_SUBST(JOGL) if test "$MACOSX" = 1; then echo "Check of the presence of libjogl.jnilib and libjogl_awt.jnilib disabled under Mac OS X" else LDFLAGS_save=$LDFLAGS # Provide known paths where distribs/OS can store JNI libs LDFLAGS="-L/usr/lib/jni -L/usr/lib64/jni/ -L$SCI_SRCDIR/thirdparty/ -L$SCI_SRCDIR/bin/" AC_CHECK_LIB([jogl], [glTexParameterf], [JOGL_LIBS="-ljogl"],[AC_MSG_WARN([Could not link against -ljogl. Will try against -ljogl -lGL])]) if test -z "$JOGL_LIBS"; then # The previous test failed add more options to the LDFLAGS LDFLAGS="$LDFLAGS -lGL " # the space after "jogl" in the following line is on # purpose to disable the cache AC_CHECK_LIB([jogl ], [glTexParameterf], [JOGL_LIBS="-ljogl -lGL"], [AC_MSG_ERROR(["libjogl: Library missing (Cannot find symbol glTexParameterf). Check if libjogl - C/Java (JNI) interface for JOGL - or libGL are installed and if the version is correct. Note that you might have to update etc/librarypath.xml to provide the actual path the the JNI libraries."])]) fi LDFLAGS=$LDFLAGS_save fi # JoGL Native <=> Java connector AC_JAVA_CHECK_PACKAGE([gluegen-rt],[com.sun.gluegen.runtime.CPU],[Scilab 3D rendering]) GLUEGEN_RT=$PACKAGE_JAR_FILE AC_SUBST(GLUEGEN_RT) if test "$MACOSX" = 1; then echo "Check of the presence of libgluegen-rt.jnilib disabled under Mac OS X" else LDFLAGS_save=$LDFLAGS # Provide known paths where distribs/OS can store JNI libs LDFLAGS="-L/usr/lib/jni -L/usr/lib64/jni/ -ldl -L$SCI_SRCDIR/thirdparty/ -L$SCI_SRCDIR/bin/" symbol="Java_com_sun_gluegen_runtime_UnixDynamicLinkerImpl_dlclose__J" AC_CHECK_LIB([gluegen-rt], [$symbol], [GLUEGEN_RT_LIBS="-lgluegen-rt"], [AC_MSG_ERROR([libgluegen-rt: Library missing (Cannot find symbol glTexParameterf). Check if libgluegen-rt - C/Java (JNI) interface for GLUEGEN - is installed and if the version is correct. Note that you might have to update etc/librarypath.xml to provide the actual path the the JNI libraries.])]) LDFLAGS=$LDFLAGS_save fi # Jhall AC_JAVA_CHECK_PACKAGE([jhall],[javax.help.JHelp],[Scilab Help Browser],"yes") JHALL=$PACKAGE_JAR_FILE # Named differently under Mandriva if test -z "$JHALL"; then AC_JAVA_CHECK_PACKAGE([javahelp2],[javax.help.JHelp],[Scilab Help Browser]) JHALL=$PACKAGE_JAR_FILE fi AC_SUBST(JHALL) # Console API AC_JAVA_CHECK_PACKAGE([jrosetta-API],[com.artenum.rosetta.interfaces.core.ConsoleConfiguration],[JRosetta : Console API Artenum / Scilab]) JROSETTA_API=$PACKAGE_JAR_FILE AC_SUBST(JROSETTA_API) # Console Core AC_JAVA_CHECK_PACKAGE([jrosetta-engine],[com.artenum.rosetta.core.action.AbstractConsoleAction],[JRosetta : Console Core Artenum / Scilab]) JROSETTA_ENGINE=$PACKAGE_JAR_FILE AC_SUBST(JROSETTA_ENGINE) if test $HDF5_ENABLE = yes; then # HDF5 java lib AC_JAVA_CHECK_PACKAGE([jhdf5],[ncsa.hdf.hdf5lib.HDF5Constants],[HDF5 Java library]) JHDF5=$PACKAGE_JAR_FILE AC_SUBST(JHDF5) fi # Logging (flexdock dep) AC_JAVA_CHECK_PACKAGE([commons-logging],[org.apache.commons.logging.LogFactory],[Apache logging]) COMMONS_LOGGING=$PACKAGE_JAR_FILE AC_SUBST(COMMONS_LOGGING) # JLaTeXMath AC_JAVA_CHECK_PACKAGE([jlatexmath],[org.scilab.forge.jlatexmath.TeXFormula],[LaTex Rendering]) JLATEXMATH=$PACKAGE_JAR_FILE AC_SUBST(JLATEXMATH) AC_DEFINE([WITH_GUI],[],[With the JAVA stuff (GUI, Console, JOGL...)]) fi # Checkstyle (code checking) AC_JAVA_CHECK_PACKAGE([checkstyle],[com.puppycrawl.tools.checkstyle.CheckStyleTask],[Checkstyle - code checking],"yes") CHECKSTYLE=$PACKAGE_JAR_FILE AC_SUBST(CHECKSTYLE) # Commons beanutils (dependency of checkstyle) AC_JAVA_CHECK_PACKAGE([commons-beanutils],[org.apache.commons.beanutils.Converter],[Bean utility],"yes") COMMONS_BEANUTILS=$PACKAGE_JAR_FILE AC_SUBST(COMMONS_BEANUTILS) # antlr (dependency of checkstyle) AC_JAVA_CHECK_PACKAGE([antlr],[antlr.TokenStreamException],[language tool for constructing recognizers],"yes") ANTLR=$PACKAGE_JAR_FILE AC_SUBST(ANTLR) else AC_MSG_WARN([Sun javac not found: I will not build the java interface]) if test "$ac_java_jvm_name" != ""; then AC_MSG_WARN([We do not support $ac_java_jvm_name yet]) fi fi AC_SUBST(JAVA_JNI_INCLUDE) AC_SUBST(JAVA_JNI_LIBS) AC_SUBST(JAVA_HOME) if test "$enable_debug_java" = yes; then JAVA_DEBUG_OPTIONS="