Advertisement
4javier

Untitled

Dec 20th, 2013
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 82.91 KB | None | 0 0
  1.  
  2.  
  3. #
  4. # Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  5. # Copyright (C) INRIA - 2006-2008 - Sylvestre Ledru
  6. # Copyright (C) DIGITEO - 2009-2011 - Sylvestre Ledru
  7. # Copyright (C) DIGITEO - 2009 - Pierre MARECHAL <pierre.marechal@scilab.org>
  8. #
  9. # This file must be used under the terms of the CeCILL.
  10. # This source file is licensed as described in the file COPYING, which
  11. # you should have received as part of this distribution. The terms
  12. # are also available at
  13. # http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
  14. #
  15.  
  16. dnl Process this file with autoconf to produce a configure script.
  17.  
  18.  
  19. AC_REVISION($Revision$)dnl
  20. AC_INIT([Scilab],[5],[http://bugzilla.scilab.org/])
  21. AC_PREREQ(2.68)
  22. AC_CONFIG_MACRO_DIR([m4/])
  23.  
  24. SCI_BUILDDIR="`pwd`"
  25. SCI_SRCDIR="$srcdir"
  26. SCI_SRCDIR_FULL="`cd $SCI_SRCDIR && pwd`"
  27.  
  28. SCILAB_VERSION_MAJOR=5
  29. SCILAB_VERSION_MINOR=5
  30. SCILAB_VERSION_MAINTENANCE=0
  31. AC_SUBST(SCILAB_VERSION_MAJOR)
  32. AC_SUBST(SCILAB_VERSION_MINOR)
  33. AC_SUBST(SCILAB_VERSION_MAINTENANCE)
  34.  
  35.  
  36. SCILAB_LIBRARY_VERSION=$SCILAB_VERSION_MAJOR:$SCILAB_VERSION_MINOR:$SCILAB_VERSION_MAINTENANCE
  37. AC_SUBST(SCILAB_LIBRARY_VERSION)
  38.  
  39. SCILAB_BINARY_VERSION=$SCILAB_VERSION_MAJOR.$SCILAB_VERSION_MINOR.$SCILAB_VERSION_MAINTENANCE
  40. AC_SUBST(SCILAB_BINARY_VERSION)
  41.  
  42. #shared library versioning
  43. #GENERIC_LIBRARY_VERSION=1:2:0
  44. # | | |
  45. # +------+ | +---+
  46. # | | |
  47. # current:revision:age
  48. # | | |
  49. # | | +- increment if interfaces have been added
  50. # | | set to zero if interfaces have been removed
  51. # or changed
  52. # | +- increment if source code has changed
  53. # | set to zero if current is incremented
  54. # +- increment if interfaces have been added, removed or changed
  55.  
  56. # Check if we have a space in the path to the source tree
  57. SPACE_IN_PATH=`echo "$SCI_SRCDIR_FULL"|grep " " > /dev/null; echo $?`
  58. if test "$SPACE_IN_PATH" = "0"; then
  59. AC_MSG_WARN([=====================================])
  60. 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...])
  61. AC_MSG_WARN([=====================================])
  62. sleep 180
  63. fi
  64.  
  65. AC_CONFIG_AUX_DIR(config)
  66. AC_CONFIG_HEADERS([modules/core/includes/machine.h])
  67.  
  68. # strip executable
  69. AM_PROG_INSTALL_STRIP
  70. AC_PROG_LN_S
  71. AM_PROG_AR
  72.  
  73. AC_CUSTOM_LARGE_FILE
  74.  
  75. # In order to be able to change the scilab directory
  76. # See http://wiki.debian.org/RpathIssue
  77. AC_RELOCATABLE
  78. AC_RELOCATABLE_LIBRARY
  79. AC_LIB_RPATH
  80.  
  81. # If configure detect that timestamp changed,
  82. # it tries to rebuild configure & makefile which can be a painmaker
  83. # if the version is different
  84. AM_MAINTAINER_MODE
  85.  
  86. AM_INIT_AUTOMAKE([-Wall foreign serial-tests]) # Not using -Werror because we override {C,F}FLAGS in order to disable optimisation
  87.  
  88. AC_CANONICAL_HOST
  89.  
  90. #################################
  91. ## all the --with-* argument help
  92. #################################
  93.  
  94.  
  95. AC_ARG_ENABLE(debug,
  96. AC_HELP_STRING([--enable-debug],[Do not optimize and print warning messages (C/C++/Fortran/Java code)]))
  97.  
  98. AC_ARG_ENABLE(debug-C,
  99. AC_HELP_STRING([--enable-debug-C],[Do not optimize and print warning messages (C code)]))
  100.  
  101. AC_ARG_ENABLE(debug-CXX,
  102. AC_HELP_STRING([--enable-debug-CXX],[Do not optimize and print warning messages (C++ code)]))
  103.  
  104. AC_ARG_ENABLE(debug-java,
  105. AC_HELP_STRING([--enable-debug-java],[Print warning messages and line numbers (Java code)]))
  106.  
  107. AC_ARG_ENABLE(debug-fortran,
  108. AC_HELP_STRING([--enable-debug-fortran],[Do not optimize and print warning messages (Fortran code)]))
  109.  
  110. AC_ARG_ENABLE(debug-linker,
  111. AC_HELP_STRING([--enable-debug-linker],[Print warning messages from the linker (ld)]))
  112.  
  113. AC_ARG_ENABLE(code-coverage,
  114. AC_HELP_STRING([--enable-code-coverage],[Enable code coverage]))
  115.  
  116. AC_ARG_ENABLE(stop-on-warning,
  117. AC_HELP_STRING([--enable-stop-on-warning],[Stop the compilation on the first warning found in the C/C++ code]))
  118.  
  119. AC_ARG_WITH(gcc,
  120. AC_HELP_STRING([--with-gcc],[Use gcc C compiler ]))
  121.  
  122. AC_ARG_WITH(gfortran,
  123. AC_HELP_STRING([--with-gfortran],[Use gfortran, GNU Fortran 95 compiler]))
  124.  
  125. AC_ARG_WITH(intelcompilers,
  126. AC_HELP_STRING([--with-intelcompilers],[Use Intel C (icc) and Fortran (ifort) proprietary compilers (GNU/Linux only) ]))
  127.  
  128. AC_ARG_WITH(tk,
  129. AC_HELP_STRING([--without-tk],[Disable the interface to Tcl/Tk ]))
  130.  
  131. AC_ARG_WITH(javasci,
  132. AC_HELP_STRING([--without-javasci],[Disable the Java/Scilab interface (javasci)]))
  133.  
  134. AC_ARG_ENABLE(compilation-tests,
  135. AC_HELP_STRING([--enable-compilation-tests],[Enable unitary tests and checks at compilation time]))
  136.  
  137. AC_ARG_WITH(gui,
  138. AC_HELP_STRING([--without-gui],[Disable the Scilab Graphical User Interface (GUI). Intended for embedded/clustering/grid Scilab ]))
  139.  
  140. AC_ARG_WITH(build-swig,
  141. AC_HELP_STRING([--enable-build-swig=path],[Regenerate Java => C and Scilab => C wrappers produces by Swig]),
  142. [with_build_swig=$withval],
  143. [with_build_swig=no]
  144. )
  145.  
  146.  
  147. AC_ARG_ENABLE(build-giws,
  148. AC_HELP_STRING([--enable-build-giws],[Regenerate C/C++ => Java wrappers produces by Giws]))
  149.  
  150.  
  151. ################################################
  152. ########## compilator & misc programs detection
  153. ################################################
  154.  
  155. AC_PROG_CPP
  156. AC_PROG_GREP
  157.  
  158. ######
  159. #### Mac OS X set of fink path with provided
  160. ######
  161.  
  162. AC_ARG_WITH(fink_prefix,
  163. AC_HELP_STRING([--with-fink-prefix],[Provide a fink prefix. Default: /sw/ ]))
  164. # Need MacosX Version to specify some path.
  165. case "$host_os" in
  166. *Darwin* | *darwin*)
  167. AC_GET_MACOSX_VERSION
  168. ;;
  169. esac
  170.  
  171. case "$host" in
  172. *darwin*)
  173. if test -n "$with_fink_prefix"; then
  174. # If with-fink-prefix is provided, use the provided path to make sure that we will
  175. # use it to detect dependencies (for example, gfortran is not provided in xcode.
  176. # Therefor, we use the one in fink)
  177. FINK_PREFIX="$with_fink_prefix/"
  178.  
  179. # Exec the init script of fink to make sure that the env is set
  180. if test -f $with_fink_prefix/bin/init.sh; then
  181. echo "source $with_fink_prefix/bin/init.sh executed to set the env"
  182. source $with_fink_prefix/bin/init.sh
  183. else
  184. AC_MSG_WARN([Could not find the fink init.sh script: $with_fink_prefix/bin/init.sh])
  185. fi
  186. else
  187. FINK_PREFIX="/sw/"
  188. fi
  189.  
  190. #Append to the default flags on Apple machines
  191. CPPFLAGS="$CPPFLAGS -I$FINK_PREFIX/include/"
  192. LDFLAGS="$LDFLAGS -L$FINK_PREFIX/lib/"
  193. ;;
  194. esac
  195.  
  196. AC_ARG_WITH(min_macosx_version,
  197. AC_HELP_STRING([--with-min-macosx-version],[Force compilers to generate binaries compatible with MacOSX minimal version.]))
  198. case "$host" in
  199. *darwin*)
  200. if test -n "$with_min_macosx_version"; then
  201. MIN_MACOSX_VERSION=$with_min_macosx_version
  202. #Append to the default flags on Apple machines
  203. ARCH_CFLAGS="-mmacosx-version-min=$MIN_MACOSX_VERSION"
  204. ARCH_CXXFLAGS="-mmacosx-version-min=$MIN_MACOSX_VERSION"
  205. ARCH_FFLAGS="-mmacosx-version-min=$MIN_MACOSX_VERSION"
  206. ARCH_LDFLAGS="-mmacosx-version-min=$MIN_MACOSX_VERSION"
  207. # We need this to be passed to all linker commands
  208. LDFLAGS="$LDFLAGS -mmacosx-version-min=$MIN_MACOSX_VERSION"
  209. fi
  210. ;;
  211. esac
  212.  
  213.  
  214. #####################################################
  215. ## Look for pkg-config
  216. #####################################################
  217. PKG_PROG_PKG_CONFIG
  218.  
  219. #####################################################
  220. ## check if options are correct (or not)
  221. #####################################################
  222.  
  223. if test "$with_intelcompilers" = yes -a "$with_gcc" = yes; then
  224. AC_MSG_ERROR([Conflicting options : you specified two compiler series])
  225. fi
  226.  
  227. ######## fortran ########
  228.  
  229. if test "$with_gfortran" = yes; then
  230. AC_PROG_F77(gfortran)
  231. if test -z "$F77"; then
  232. AC_MSG_ERROR([You asked me to use gfortran but i haven't been able to find it])
  233. fi
  234. fi
  235.  
  236. if test "$with_intelcompilers" = yes; then
  237. AC_PROG_F77(ifc ifort)
  238. if test -z "$F77"; then
  239. AC_MSG_ERROR([You asked me to use ifc (intel fortran compiler) but i haven't been able to find it])
  240. fi
  241. fi
  242.  
  243. if test -z "$F77"; then
  244. ## No Fortran compiler specified... Prefer gfortran and intel compilers
  245. AC_PROG_F77([gfortran ifc ifort])
  246. if test -z "$F77"; then
  247. # Best effort to find a compiler (might be g77)
  248. AC_PROG_F77
  249. fi
  250. fi
  251.  
  252.  
  253. # case statements were introduced in fortran 90 so we can use that
  254. # as a test to see if our compiler is fortran 90 compatible.
  255. f90compatible=false
  256. if test -z "$F77"; then
  257. AC_MSG_ERROR([No fortran compiler found. Cannot compile scilab without a fortran compiler])
  258. fi
  259.  
  260. AC_MSG_CHECKING([if $F77 is a fortran 90 compatible compiler])
  261. f90compatible=false
  262. AC_LANG_PUSH([Fortran 77])
  263. AC_COMPILE_IFELSE([
  264. PROGRAM hello
  265. do 50 i = 1, 5
  266. select case ( i )
  267. case (1)
  268. print*, "case is 1, i is ", i
  269. case ( 2 : 3 )
  270. print*, "case is 2 to 3, i is ", i
  271. case default
  272. print*, "default case, i is ", i
  273. end select
  274. 50 continue
  275. END
  276. ],
  277. [AC_MSG_RESULT([yes])
  278. AC_DEFINE([G95_FORTRAN],[],[uses G95 fortran])
  279. f90compatible=true
  280. ],
  281. [AC_MSG_RESULT([no])]
  282. )
  283. AC_LANG_POP([Fortran 77])
  284.  
  285. ############ C ###############
  286.  
  287.  
  288. if test "$with_gcc" = yes; then
  289. AC_PROG_CC(gcc)
  290. if test -z "$CC"; then
  291. AC_MSG_ERROR([You asked me to use gcc but i haven't been able to find it])
  292. fi
  293. fi
  294.  
  295. if test "$with_intelcompilers" = yes; then
  296. AC_PROG_CC(icc ecc)
  297. if test -z "$CC"; then
  298. AC_MSG_ERROR([You asked me to use icc (intel C compiler) but I haven't been able to find it])
  299. fi
  300. fi
  301.  
  302. if test -z "$CC"; then
  303. # No C compiler specified... We rely on Autoconf to find the best
  304. AC_PROG_CC
  305. fi
  306.  
  307. if test -z "$CC"; then
  308. AC_MSG_ERROR([No C Compiler found. Cannot compile Scilab without a C compiler])
  309. fi
  310.  
  311. AC_CHECK_SIZEOF([int])
  312. AC_CHECK_SIZEOF([long])
  313.  
  314. ### C++ ###
  315. AC_PROG_CXX
  316. # we can't just do something like
  317. # AC_CHECK_PROG(cxx_present, $CXX, "yes", "no")
  318. # because if the user has specified the full path of the desired C++ compiler then AC_CHECK_PROG
  319. # will fail. If AC_PROG_CXX fails to find a c++ compiler it will set CXX=g++ so just run AC_CHECK_PROG
  320. # in this special case
  321. case $CXX in
  322. g++)
  323. AC_CHECK_PROG([cxx_present], [$CXX], [yes], [no])
  324. if test "x$cxx_present" != "xyes"; then
  325. AC_MSG_ERROR([No C++ compiler found. Cannot compile scilab without a C++ compiler])
  326. fi
  327. ;;
  328. esac
  329.  
  330. # for "subdir-objects"
  331.  
  332. AM_PROG_CC_C_O
  333. AC_PROG_F77_C_O
  334.  
  335.  
  336. # If this option is provided, enable the debug on C & C++
  337. if test "$enable_stop_on_warning" = yes; then
  338. enable_debug_C=yes
  339. enable_debug_CXX=yes
  340. fi
  341.  
  342. if test "$enable_debug" = yes; then
  343. enable_debug_fortran=yes
  344. enable_debug_C=yes
  345. enable_debug_CXX=yes
  346. enable_debug_java=yes
  347. else
  348. enable_debug=no
  349. fi
  350.  
  351. if test "$enable_debug_fortran" = yes; then
  352. FFLAGS="`echo "$FFLAGS"| sed -e 's|-O[0-9+]|-O0|'`"
  353. else
  354. enable_debug_fortran=no
  355. fi
  356.  
  357. if test "$enable_debug_C" = yes; then
  358. CFLAGS="`echo "$CFLAGS"| sed -e 's|-O[0-9+]|-O0|'`"
  359. else
  360. enable_debug_C=no
  361. fi
  362.  
  363. if test "$enable_debug_CXX" = yes; then
  364. CXXFLAGS="`echo "$CXXFLAGS"| sed -e 's|-O[0-9+]|-O0|'`"
  365. else
  366. enable_debug_CXX=no
  367. fi
  368.  
  369. if test "$enable_debug_java" = yes; then
  370. LOGGING_LEVEL="INFO"
  371. else
  372. LOGGING_LEVEL="SEVERE"
  373. fi
  374. AC_SUBST(LOGGING_LEVEL)
  375.  
  376. if test "x${prefix}" = "xNONE"; then
  377. prefix="${ac_default_prefix}"
  378. fi
  379.  
  380. ###############################
  381. ## get the version
  382. ###############################
  383.  
  384. SCIVERSION=`cat $SCI_SRCDIR/Version.incl | sed -e "s/SCIVERSION=//" `
  385.  
  386. #############################################
  387. ## Compilers and options according to machine
  388. #############################################
  389.  
  390. ######################
  391. ######## Set compilation options for intel C/Fortran compilers
  392. ######################
  393.  
  394. if test "$with_intelcompilers" = yes; then
  395. SCI_INTEL_COMPILER()
  396. fi
  397.  
  398. ########### FORTRAN ######################
  399.  
  400.  
  401. ######################
  402. ######## With gfortran ...
  403. ######################
  404. if test -n "$F77"; then
  405. case "$F77" in
  406. gfortran*)
  407. ## With GNU Compiler enable the code coverage
  408. if test "$enable_code_coverage" = yes; then
  409. CODECOVERAGE_FFLAGS="-fprofile-arcs -ftest-coverage"
  410. fi
  411. ;;
  412. g77*)
  413. AC_MSG_ERROR([g77 is no longer supported. Please consider switching to gfortran])
  414. ;;
  415. esac
  416.  
  417. if test "$enable_debug_fortran" = yes; then
  418. AC_LANG_PUSH([Fortran 77])
  419. for flag in -g -Wall -Wsurprising; do
  420. case " ${FFLAGS} " in
  421. *\ ${flag}\ *)
  422. # flag is already present
  423. ;;
  424.  
  425. *)
  426. AC_MSG_CHECKING([if the Fortran compiler accepts ${flag}])
  427. ac_save_FFLAGS="$FFLAGS"
  428. FFLAGS="$FFLAGS ${flag}"
  429. AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
  430. [AC_MSG_RESULT([yes])
  431. DEBUG_FFLAGS="${flag}"
  432. ],
  433. [AC_MSG_RESULT([no])]
  434. )
  435. ;;
  436. esac
  437. done
  438. AC_LANG_POP([Fortran 77])
  439. else
  440. DEBUG_FFLAGS="-DNDEBUG"
  441. fi
  442. case "$host" in
  443. x86_64-*-linux*)
  444. ARCH_FFLAGS="-m64 -fPIC"
  445. ;;
  446. # Dec Alpha OSF 4
  447. alpha*-dec-osf4.*)
  448. ARCH_FFLAGS="-fpe3"
  449. ;;
  450. alpha*-dec-osf*)
  451. ARCH_FFLAGS="-fpe3 -switch nosqrt_recip"
  452. ;;
  453. rs6000-*-*)
  454. ARCH_FFLAGS="-qcharlen=4096"
  455. ;;
  456. mips-*-ultrix*)
  457. ARCH_FFLAGS="-O0 -fpe1"
  458. ;;
  459. *-*-hpux9.*)
  460. ARCH_FFLAGS="+Obb1200 +E4 -Dhpux"
  461. ;;
  462. *-*-hpux10.*)
  463. if test "$enable_debug_fortran" = yes; then
  464. ARCH_FFLAGS="+E4 +Z +DAportable -Dhpux"
  465. else
  466. ARCH_FFLAGS="+O2 +E4 +Z +DAportable -Dhpux"
  467. fi
  468. # ARCH_LDFLAGS="-Wl,+vnocompatwarnings,-E /usr/lib/libdld.sl"
  469.  
  470. ;;
  471. *-*-hpux11.*)
  472. if test "$enable_debug_fortran" = yes; then
  473. ARCH_FFLAGS=" +Z +DAportable -Dhpux"
  474. else
  475. ARCH_FFLAGS="+O2 +Z +DAportable -Dhpux"
  476. fi
  477. ARCH_LDFLAGS="-ldld -lnsl -lU77 -lm"
  478.  
  479. ;;
  480. esac
  481.  
  482. fi
  483.  
  484. #########################
  485. # setting parameters according to system types
  486. #########################
  487.  
  488. case "$host" in
  489. *-*-hpux9.*|*-*-hpux10.*|*-*-hpux11.*)
  490. HPUX=1
  491. ;;
  492. sparc-*)
  493. SPARC=1
  494. ;;
  495. mips-sgi-irix*)
  496. MIPS_SGI_IRIX=1
  497. ;;
  498. *-*-solaris*)
  499. SOLARIS=1
  500. ;;
  501. *darwin*)
  502. MACOSX=1
  503. ;;
  504. esac
  505.  
  506. AM_CONDITIONAL(IS_MACOSX, test -n "$MACOSX")
  507. AM_CONDITIONAL(IS_HPUX, test -n "$HPUX")
  508. AM_CONDITIONAL(IS_SPARC, test -n "$SPARC")
  509. AM_CONDITIONAL(IS_SOLARIS, test -n "$SOLARIS")
  510. AM_CONDITIONAL(IS_MIPS_SGI_IRIX, test -n "$MIPS_SGI_IRIX")
  511.  
  512.  
  513.  
  514. ############
  515. ## C++
  516. ############
  517.  
  518.  
  519. if test -z "$CXX"; then
  520. AC_MSG_ERROR([No C++ compiler found. Cannot compile scilab without a C++ compiler])
  521. fi
  522.  
  523. case "$CXX" in
  524. g++-* | g++ | ccache*g++ | ccache*g++-* )
  525. ## With GNU C++ Compiler
  526.  
  527. # enable the code coverage
  528. if test "$enable_code_coverage" = yes; then
  529. CODECOVERAGE_CXXFLAGS="-fprofile-arcs -ftest-coverage"
  530. fi
  531.  
  532. if test "$enable_debug_CXX" = yes; then
  533. DEBUG_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 -g3 -Wunsafe-loop-optimizations"
  534. case "$host" in
  535. *-linux-gnu )
  536. # Only doing that under Linux
  537. DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -fdiagnostics-show-option -Werror=format-security"
  538. ;;
  539. esac
  540. else
  541. DEBUG_CXXFLAGS="-DNDEBUG"
  542. fi
  543. COMPILER_CXXFLAGS="-fno-stack-protector " # bug 3131
  544. ;;
  545.  
  546. esac
  547.  
  548. #### 64 bits detection
  549. IS_64_BITS_CPU=false
  550. case "$host" in
  551. x86_64-*-linux-gnu | x86_64-linux-gnu | ia64-*-linux-gnu | alpha-*-linux-gnu | alpha-*-netbsd* | x86_64-*-netbsd* | sparc64-*-netbsd*)
  552. IS_64_BITS_CPU=true
  553. ;;
  554. esac
  555.  
  556. ##########"
  557.  
  558. case "$CC" in
  559. gcc-* | gcc | ccache*gcc | ccache*gcc-* )
  560. ## With GNU Compiler
  561.  
  562. # enable the code coverage
  563. if test "$enable_code_coverage" = yes; then
  564. CODECOVERAGE_CFLAGS="-fprofile-arcs -ftest-coverage"
  565. fi
  566.  
  567. if test "$enable_debug_C" = yes; then
  568. DEBUG_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 -Wunsafe-loop-optimizations"
  569. # used to be -O
  570. # -D_FORTIFY_SOURCE=2
  571. case "$host" in
  572. *-linux-gnu )
  573. # Only doing that under Linux
  574. if test "$enable_debug_linker" = yes; then
  575. LDFLAGS="$LDFLAGS -Wl,--warn-common,-x"
  576. fi
  577. DEBUG_CFLAGS="$DEBUG_CFLAGS -fdiagnostics-show-option -Werror=format-security"
  578. ;;
  579. esac
  580. else
  581. DEBUG_CFLAGS="-DNDEBUG"
  582. fi
  583.  
  584. COMPILER_CFLAGS="-fno-stack-protector " # bug 3131
  585. # Explictly disable the as needed. It was disable by default but Ubuntu
  586. # activated it by default since release 11.04. See bug #8961.
  587. # Once all cyclic dependencies have been dropped, this line could be removed.
  588. # Check if linker supports --as-needed and --no-as-needed options
  589. if $LD --help 2>/dev/null | grep no-as-needed > /dev/null; then
  590. COMPILER_LDFLAGS="$COMPILER_LDFLAGS -Wl,--no-as-needed"
  591. fi
  592.  
  593.  
  594. case "$host" in
  595. x86_64-*-linux-gnu | x86_64-linux-gnu)
  596. ARCH_CFLAGS="-m64"
  597. ;;
  598. alpha-*-linux-gnu)
  599. ARCH_CFLAGS="-mieee-with-inexact"
  600. ARCH_LDFLAGS="-mieee-with-inexact"
  601. ;;
  602. powerpc-*-linux-gnu)
  603. ARCH_CFLAGS="-D_GNU_SOURCE"
  604. ;;
  605. *-*-solaris*)
  606. ARCH_CFLAGS="-DSVR4 -DSYSV -Dsolaris"
  607. ;;
  608. *-*-freebsd*)
  609. ARCH_CFLAGS="-Dfreebsd"
  610. ARCH_LDFLAGS="-lm"
  611. ;;
  612.  
  613. alpha-*-netbsd*)
  614. ARCH_CFLAGS="-Dnetbsd -mieee"
  615. ARCH_FFLAGS="-Dnetbsd -mieee"
  616. ;;
  617.  
  618. *-*-netbsd*)
  619. ARCH_CFLAGS="-Dnetbsd"
  620. ;;
  621.  
  622. *-*-darwin*)
  623. ARCH_CFLAGS="$ARCH_CFLAGS -no_compact_linkedit"
  624. ARCH_CXXFLAGS="$ARCH_CXXFLAGS -no_compact_linkedit"
  625. ARCH_LDFLAGS="$ARCH_LDFLAGS -no_compact_linkedit"
  626. # We need this to be passed to all linker commands
  627. LDFLAGS="$LDFLAGS -no_compact_linkedit"
  628.  
  629. case "$F77" in
  630. gfortran-*|gfortran)
  631. # Extract from gfortran -v the version it has been built for
  632. MAC_DETECTED_ARCH="`$F77 -v 2>&1|grep "Target:"|sed -e "s/Target: \([[a-z0-9A-Z_]]*\).*/\1/g"`"
  633. ;;
  634. *)
  635. AC_MSG_WARN([gfortran not used. Could not detect the architecture. Switch to the default case: x86_64])
  636. MAC_DETECTED_ARCH="x86_64"
  637. ;;
  638. esac
  639. CC="$CC -arch $MAC_DETECTED_ARCH"
  640. CXX="$CXX -arch $MAC_DETECTED_ARCH"
  641. ;;
  642. esac
  643. ;; # end of the gcc case on the $CC
  644. *)
  645.  
  646. ## CC compiler (not GCC)
  647. if test "$enable_debug_C" != yes; then
  648. ARCH_CFLAGS="-DNDEBUG"
  649. fi
  650.  
  651. case "$host" in
  652. # Dec Alpha OSF 4
  653. alpha*-dec-osf4.*)
  654. ARCH_CFLAGS="-std -ieee_with_inexact"
  655. ARCH_LDFLAGS="-ieee_with_inexact"
  656. ;;
  657. alpha*-dec-osf*)
  658. ARCH_CFLAGS="-ieee_with_inexact"
  659. ARCH_LDFLAGS="-ieee_with_inexact"
  660. ;;
  661. rs6000-*-*) # IBM AIX RS 6000 (NO LONGER SUPPORTED)
  662. ARCH_CFLAGS="-Daix -DSYSV"
  663. ;;
  664. mips-sgi-irix*) # SGI
  665. ARCH_CFLAGS="-DSYSV -DSVR4"
  666. ;;
  667. *-*-hpux9.*)
  668. ARCH_CFLAGS="-DSYSV -Dhpux"
  669. ;;
  670. *-*-hpux10.*) # HP 10
  671. if test "$enable_debug_C" = yes; then
  672. ARCH_CFLAGS="-DSYSV -Dhpux"
  673. else
  674. ARCH_CFLAGS="-DSYSV -Dhpux +Z +DAportable"
  675. fi
  676. ;;
  677.  
  678. *-*-hpux11.*) # HP 11
  679. ARCH_CFLAGS="-DSYSV -Dhpux -Dhppa +Z +DAportable"
  680. ;;
  681. *-*-solaris*) # SUN SOLARIS
  682. ARCH_CFLAGS="-DSVR4 -DSYSV -Dsolaris -I/usr/local/include/"
  683. ARCH_LDFLAGS="-L/usr/local/lib/"
  684. ;;
  685. esac
  686. ;; # end of not a gcc compiler
  687. esac
  688.  
  689.  
  690. # enable the code coverage
  691. if test "$enable_code_coverage" = yes; then
  692. AC_PATH_PROG(LCOV, lcov)
  693. if test -z "$LCOV" ; then
  694. AC_MSG_ERROR([Cannot find lcov. Please install it (package lcov under Debian) or remove the option --enable-code-coverage])
  695. fi
  696. AC_PATH_PROG(GENHTML, genhtml)
  697. if test -z "$GENHTML" ; then
  698. AC_MSG_ERROR([Cannot find genhtml. Please install it (package lcov under Debian) or remove the option --enable-code-coverage])
  699. fi
  700. CODECOVERAGE_LDFLAGS="-coverage -lgcov"
  701. fi
  702. AM_CONDITIONAL(CODE_COVERAGE, test "$enable_code_coverage" = yes)
  703.  
  704. # flag for possible compilations in configure
  705. SCILIBS_CFLAGS=''
  706. SCILIBS_CXXFLAGS=''
  707. SCILIBS_FFLAGS=''
  708.  
  709. if test $IS_64_BITS_CPU = true -o "$MACOSX" = "1"; then
  710. if test $f90compatible = false; then
  711. AC_MSG_ERROR([64 bits support needs a fortran 90 compiler (try --with-gfortran).])
  712. fi
  713. AC_DEFINE([USE_DYNAMIC_STACK], [], [If we are building a 64 bits version])
  714. fi
  715.  
  716. AM_CONDITIONAL(IS_64_BITS_CPU, test $IS_64_BITS_CPU = true)
  717. AM_CONDITIONAL(USE_DYNAMIC_STACK, test $IS_64_BITS_CPU = true -o "$MACOSX" = "1")
  718.  
  719. ################
  720. ## SSE
  721. ## By default, for x86 CPU, enable the SSE.
  722. ## Note that it is already the case with 64 bits CPU
  723. ## (these extensions are enabled by default by gcc)
  724. ################
  725.  
  726. case "$host" in
  727. i*86-linux-gnu|i*86-*-linux-gnu)
  728. SSE_CFLAGS="-msse"
  729. SSE_FFLAGS="-msse"
  730. SSE_CXXFLAGS="-msse"
  731. ;;
  732. esac
  733.  
  734. #######################
  735. ## test for underscores (name mangling issues between C and fortran)
  736. #######################
  737. AC_CHECK_UNDERSCORE_FORTRAN()
  738.  
  739.  
  740. #################
  741. ## HDF5
  742. #################
  743.  
  744. AC_HDF5()
  745. # The Java detection is done after in this file.
  746.  
  747.  
  748. #################
  749. ## scirenderer
  750. #################
  751.  
  752. AC_ARG_WITH(external-scirenderer,
  753. AC_HELP_STRING([--with-external-scirenderer],[Disable the usage of the internal copy of scirenderer. Intended for packaging of Scilab]))
  754.  
  755. AM_CONDITIONAL(EXTERNAL_SCIRENDERER, test "$with_external_scirenderer" = yes)
  756.  
  757.  
  758. #################
  759. ## XCOS
  760. #################
  761.  
  762. AC_ARG_WITH(xcos,
  763. AC_HELP_STRING([--without-xcos],[Disable Xcos]))
  764.  
  765. AC_ARG_WITH(modelica,
  766. AC_HELP_STRING([--without-modelica],[Disable the OCaml module (modelica)]))
  767.  
  768.  
  769. if test "$with_gui" = no; then
  770. AC_MSG_WARN([GUI is disabled. Disabling then xcos])
  771. with_xcos=no
  772. fi
  773.  
  774. XCOS_ENABLE=no
  775.  
  776. if test "$with_xcos" != no -a "$with_gui" != no; then
  777. AC_DEFINE([WITH_XCOS], [], [With XCOS])
  778.  
  779. save_LIBS="$LIBS"
  780.  
  781. AC_CHECK_LIB([rt], [clock_gettime],
  782. [RT_LIB="-lrt";
  783. AC_DEFINE([HAVE_CLOCK_GETTIME], [1],[Whether clock_gettime is available]) ],
  784. [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])]
  785. )
  786. LIBS="$save_LIBS"
  787. AC_SUBST(RT_LIB)
  788.  
  789.  
  790. #################
  791. ## ocaml which only called when using Xcos
  792. #################
  793.  
  794. if test "$with_modelica" != no; then
  795. AC_CHECK_PROG_OCAML()
  796. fi
  797. XCOS_ENABLE=yes
  798.  
  799. fi
  800.  
  801. AC_SUBST(XCOS_ENABLE)
  802.  
  803. AM_CONDITIONAL(OCAML, test "$with_modelica" != no -a "$OCAMLC" != no -a "$OCAMLOPT" != no)
  804. AM_CONDITIONAL(XCOS, test "$XCOS_ENABLE" != no)
  805.  
  806. ###########################
  807. ## test for JAVA compiler
  808. ###########################
  809.  
  810. if test "$with_javasci" != no -o "$with_gui" != no -o "$enable_build_help" != no; then
  811.  
  812. # See if --with-jdk command line argument is given
  813. # Try to detect the installed JVM, this could be controlled
  814. # by the above --with options
  815. AC_JAVA_WITH_JDK
  816. AC_JAVA_DETECT_JVM
  817. case "$ac_java_jvm_version" in
  818. 1.6 | 1.7)
  819. ;;
  820. *)
  821. AC_MSG_ERROR([Wrong version of Java. Expected at least 1.6. Found $ac_java_jvm_version])
  822. ;;
  823. esac
  824.  
  825. if test "$ac_java_jvm_name" = "jdk"; then
  826. JAVA_HOME=$ac_java_jvm_dir
  827. JAVA_VERSION=$ac_java_jvm_version
  828. # AC_JAVA_TOOLS
  829.  
  830. AC_JAVA_JNI_INCLUDE
  831. JAVA_JNI_INCLUDE=$ac_java_jvm_jni_include_flags
  832.  
  833. case "$host_os" in
  834. *Darwin* | *darwin*)
  835. # Mac OS X does not link against the lib but uses -framework
  836. JAVA_JNI_LIBS="-framework JavaVM"
  837. ;;
  838. *)
  839. AC_JAVA_JNI_LIBS
  840. JAVA_JNI_LIBS=$ac_java_jvm_jni_lib_flags
  841. JAVA_JNI_LIBS_PRELOAD=$ac_java_jvm_ld_preload
  842. ;;
  843. esac
  844.  
  845. AC_JAVA_CLASSPATH
  846. JAVA_CLASSPATH=$ac_java_classpath
  847. AC_JAVA_TOOLS
  848. AC_JAVA_ANT
  849.  
  850. case "$host_os" in
  851. *Darwin* | *darwin*)
  852. JAVA_HOME=""
  853. ;;
  854. esac
  855.  
  856.  
  857. if test "$with_gui" != no; then
  858.  
  859. if test $XCOS_ENABLE = yes; then
  860. # jgraphx
  861. AC_JAVA_CHECK_PACKAGE([jgraphx],[com.mxgraph.model.mxCell],[Diagram design])
  862. JGRAPHX=$PACKAGE_JAR_FILE
  863. AC_SUBST(JGRAPHX)
  864.  
  865. AC_JAVA_CHECK_VERSION_PACKAGE([jgraphx],[import com.mxgraph.view.mxGraph;],$JGRAPHX,[2.0.0.1],[mxGraph.VERSION],[],[])
  866.  
  867. fi
  868.  
  869. if test "$with_external_scirenderer" = yes; then
  870. # scirenderer
  871. AC_JAVA_CHECK_PACKAGE([scirenderer],[org.scilab.forge.scirenderer.PackageInfo],[Scilab Renderer])
  872. SCIRENDERER=$PACKAGE_JAR_FILE
  873. SCIRENDERER_CP=$PACKAGE_JAR_FILE
  874.  
  875. AC_JAVA_CHECK_VERSION_PACKAGE([scirenderer],[import org.scilab.forge.scirenderer.PackageInfo;],$SCIRENDERER,[1.1.0],[PackageInfo.VERSION])
  876. else
  877. echo "Use external version of scirenderer"
  878. # Use the scirenderer in Scilab sources
  879. SCIRENDERER="\${modules.dir}/scirenderer/\${build.jar.dir}/scirenderer.jar"
  880. SCIRENDERER_CP="\$SCILAB/modules/scirenderer/jar/scirenderer.jar"
  881. fi
  882. AC_SUBST(SCIRENDERER)
  883. AC_SUBST(SCIRENDERER_CP)
  884.  
  885. # Docking system
  886. AC_JAVA_CHECK_PACKAGE([flexdock],[org.flexdock.docking.DockingManager],[Scilab Gui])
  887. FLEXDOCK=$PACKAGE_JAR_FILE
  888. AC_SUBST(FLEXDOCK)
  889.  
  890. AC_JAVA_CHECK_VERSION_PACKAGE([flexdock],[import org.flexdock.util.Utilities;],$FLEXDOCK,[1.2.4],[Utilities.VERSION])
  891.  
  892. # Swing look&feel implementations
  893. AC_JAVA_CHECK_PACKAGE([looks],[com.jgoodies.looks.common.MenuItemRenderer],[Scilab Gui - Look and feel],"yes")
  894. LOOKS=$PACKAGE_JAR_FILE
  895.  
  896. # Named differently under ArchLinux or Fedora
  897. if test -z "$LOOKS"; then
  898. AC_JAVA_CHECK_PACKAGE([jgoodies-looks],[com.jgoodies.looks.common.MenuItemRenderer],[Scilab Gui - Look and feel])
  899. LOOKS=$PACKAGE_JAR_FILE
  900. fi
  901. AC_SUBST(LOOKS)
  902.  
  903. # Skin Look and Feel
  904. AC_JAVA_CHECK_PACKAGE([skinlf],[com.l2fprod.util.AccessUtils],[Scilab Gui - Skin Look and Feel])
  905. SKINLF=$PACKAGE_JAR_FILE
  906. AC_SUBST(SKINLF)
  907.  
  908. # JOGL 2
  909. AC_JAVA_CHECK_PACKAGE([jogl2],[javax.media.opengl.glu.GLUnurbs],[Scilab 3D rendering - Version 2.0])
  910. JOGL2=$PACKAGE_JAR_FILE
  911. AC_SUBST(JOGL2)
  912.  
  913. if test "$MACOSX" = 1; then
  914. echo "Check of the presence of libjogl.jnilib and libjogl_awt.jnilib disabled under Mac OS X"
  915. else
  916. LDFLAGS_save=$LDFLAGS
  917. # Provide known paths where distribs/OS can store JNI libs
  918. LDFLAGS="$LDFLAGS -L/usr/lib/jni -L/usr/lib64/jni" # Debian
  919. LDFLAGS="$LDFLAGS -L/usr/lib/java -L/usr/lib64/java" # jpackage.org
  920. LDFLAGS="$LDFLAGS -L/usr/lib/jogl2 -L/usr/lib64/jogl2" # RedHat
  921. LDFLAGS="$LDFLAGS -L$SCI_SRCDIR/thirdparty -L$SCI_SRCDIR/lib/thirdparty -L$SCI_SRCDIR/bin" # Scilab thirdparties
  922. AC_CHECK_LIB([jogl_desktop], [glTexParameterf], [JOGL2_LIBS="-ljogl_desktop"],[AC_MSG_WARN([Could not link against -ljogl_desktop. Will try against -ljogl_desktop -lGL])])
  923. if test -z "$JOGL2_LIBS"; then # The previous test failed add more options to the LDFLAGS
  924. # the space after "jogl" in the following line is on
  925. # purpose to disable the cache
  926. AC_CHECK_LIB([jogl_desktop ], [glTexParameterf],
  927. [JOGL2_LIBS="-ljogl_desktop -lGL"],
  928. [AC_MSG_ERROR(["libjogl: Library
  929. missing (Cannot find symbol glTexParameterf). Check if libjogl - C/Java (JNI)
  930. interface for JOGL2 - or libGL (OpenGL library) are installed and if the version is correct. Note that you might have to update etc/librarypath.xml to provide the actual path to the JNI libraries."])],
  931. [-lGL])
  932. fi
  933.  
  934. LDFLAGS=$LDFLAGS_save
  935. fi
  936.  
  937. # JoGL Native <=> Java connector
  938. AC_JAVA_CHECK_PACKAGE([gluegen2-rt],[jogamp.common.os.MachineDescriptionRuntime],[Scilab 3D rendering])
  939. GLUEGEN2_RT=$PACKAGE_JAR_FILE
  940. AC_SUBST(GLUEGEN2_RT)
  941.  
  942. if test "$MACOSX" = 1; then
  943. echo "Check of the presence of libgluegen-rt.jnilib disabled under Mac OS X"
  944. else
  945. LDFLAGS_save=$LDFLAGS
  946. # Provide known paths where distribs/OS can store JNI libs
  947. LDFLAGS="$LDFLAGS -L/usr/lib/jni -L/usr/lib64/jni" # Debian
  948. LDFLAGS="$LDFLAGS -L/usr/lib/java -L/usr/lib64/java" # jpackage.org
  949. LDFLAGS="$LDFLAGS -L/usr/lib/gluegen2 -L/usr/lib64/gluegen2" # RedHat
  950. LDFLAGS="$LDFLAGS -L~/scilab5/src/scilab-5.5.0-beta-1/thirdparty -L~/scilab5/src/scilab-5.5.0-beta-1/lib/thirdparty -L~/scilab5/src/scilab-5.5.0-beta-1/bin" # Scilab thirdparties
  951. symbol="Java_jogamp_common_jvm_JVMUtil_initialize"
  952. AC_CHECK_LIB([gluegen2-rt], [$symbol], [GLUEGEN2_RT_LIBS="-lgluegen2-rt"],
  953. [AC_MSG_ERROR([libgluegen2-rt: Library missing (Cannot find symbol $symbol). Check if libgluegen-rt - C/Java (JNI) interface for GLUEGEN2 - is installed and if the version is correct. Note that you might have to update etc/librarypath.xml to provide the actual path to the JNI libraries.])],
  954. [-ldl])
  955. LDFLAGS=$LDFLAGS_save
  956. fi
  957.  
  958. # Jhall
  959. AC_JAVA_CHECK_PACKAGE([jhall],[javax.help.JHelp],[Scilab Help Browser],"yes")
  960. JHALL=$PACKAGE_JAR_FILE
  961.  
  962. # Named differently under Mandriva or Fedora
  963. if test -z "$JHALL"; then
  964. AC_JAVA_CHECK_PACKAGE([javahelp2],[javax.help.JHelp],[Scilab Help Browser])
  965. JHALL=$PACKAGE_JAR_FILE
  966. fi
  967. AC_SUBST(JHALL)
  968.  
  969. # Console API
  970. AC_JAVA_CHECK_PACKAGE([jrosetta-API],[com.artenum.rosetta.interfaces.core.ConsoleConfiguration],[JRosetta : Console API Artenum / Scilab],"yes")
  971. JROSETTA_API=$PACKAGE_JAR_FILE
  972. if test -z "$JROSETTA_API"; then
  973. AC_JAVA_CHECK_PACKAGE([jrosetta-api],[com.artenum.rosetta.interfaces.core.ConsoleConfiguration],[JRosetta : Console API Artenum / Scilab])
  974. JROSETTA_API=$PACKAGE_JAR_FILE
  975. fi
  976. AC_SUBST(JROSETTA_API)
  977.  
  978. # Console Core
  979. AC_JAVA_CHECK_PACKAGE([jrosetta-engine],[com.artenum.rosetta.core.action.AbstractConsoleAction],[JRosetta : Console Core Artenum / Scilab])
  980. JROSETTA_ENGINE=$PACKAGE_JAR_FILE
  981. AC_SUBST(JROSETTA_ENGINE)
  982. AC_JAVA_CHECK_VERSION_PACKAGE([jrosetta-engine],[import com.artenum.rosetta.util.ConfigurationBuilder;],$JROSETTA_ENGINE,[1.0.4],[ConfigurationBuilder.getVersion()])
  983.  
  984.  
  985. # MathML rendering solution
  986. # Used in both graphic & help
  987. AC_JAVA_CHECK_PACKAGE([jeuclid-core],[net.sourceforge.jeuclid.LayoutContext],[MathML rendering solution (at least version 3.1.X)])
  988. JEUCLID_CORE=$PACKAGE_JAR_FILE
  989. AC_SUBST(JEUCLID_CORE)
  990.  
  991.  
  992. ################ Mandatory for graphic_export features #####
  993. # XML to PDF/other Translator
  994. AC_JAVA_CHECK_PACKAGE([fop],[org.apache.fop.pdf.PDFInfo],[XML to PDF Translator (fop)])
  995. FOP=$PACKAGE_JAR_FILE
  996. AC_SUBST(FOP)
  997.  
  998. # xml.apache.org SVG Library (under mandriva for example)
  999. AC_JAVA_CHECK_PACKAGE([batik-all],[org.apache.batik.parser.Parser],[Apache SVG Library],"yes")
  1000. BATIK=$PACKAGE_JAR_FILE
  1001.  
  1002. if test -z "$BATIK"; then
  1003. # Other other distribs
  1004. AC_JAVA_CHECK_PACKAGE([batik],[org.apache.batik.parser.Parser],[Apache SVG Library])
  1005. BATIK=$PACKAGE_JAR_FILE
  1006. fi
  1007. AC_SUBST(BATIK)
  1008. AC_JAVA_CHECK_VERSION_PACKAGE([batik],[import org.apache.batik.Version;],$BATIK,[1.7],[Version.getVersion()])
  1009.  
  1010. # Commons I/O library
  1011. AC_JAVA_CHECK_PACKAGE([commons-io],[org.apache.commons.io.output.CountingOutputStream],[Commons I/O library])
  1012. COMMONS_IO=$PACKAGE_JAR_FILE
  1013. AC_SUBST(COMMONS_IO)
  1014.  
  1015. # XML graphics common
  1016. AC_JAVA_CHECK_PACKAGE([xmlgraphics-commons],[org.apache.xmlgraphics.util.Service],[Commons graphics library])
  1017. XMLGRAPHICS_COMMONS=$PACKAGE_JAR_FILE
  1018. AC_SUBST(XMLGRAPHICS_COMMONS)
  1019.  
  1020. # Avalon Framework (PDF)
  1021. AC_JAVA_CHECK_PACKAGE([avalon-framework],[org.apache.avalon.framework.configuration.ConfigurationException],[Common framework for Java server application])
  1022. AVALON_FRAMEWORK=$PACKAGE_JAR_FILE
  1023. AC_SUBST(AVALON_FRAMEWORK)
  1024.  
  1025. # XML API EXT (conversion of a SVG => PNG)
  1026. AC_JAVA_CHECK_PACKAGE([xml-apis-ext],[org.w3c.dom.svg.SVGDocument],[XML Commons external code],"yes")
  1027. XML_APIS_EXT=$PACKAGE_JAR_FILE
  1028.  
  1029. if test -z "$XML_APIS_EXT"; then
  1030. # Other other distribs (Ex: Fedora/Redhat)
  1031. AC_JAVA_CHECK_PACKAGE([xml-commons-apis-ext],[org.w3c.dom.svg.SVGDocument],[XML Commons external code])
  1032. XML_APIS_EXT=$PACKAGE_JAR_FILE
  1033. fi
  1034. AC_SUBST(XML_APIS_EXT)
  1035.  
  1036. ################ END Mandatory for graphic_export features #####
  1037.  
  1038.  
  1039. # Logging (flexdock dep)
  1040. AC_JAVA_CHECK_PACKAGE([commons-logging],[org.apache.commons.logging.LogFactory],[Apache logging])
  1041. COMMONS_LOGGING=$PACKAGE_JAR_FILE
  1042. AC_SUBST(COMMONS_LOGGING)
  1043.  
  1044. # JLaTeXMath
  1045. AC_JAVA_CHECK_PACKAGE([jlatexmath],[org.scilab.forge.jlatexmath.TeXFormula],[LaTex Rendering])
  1046. JLATEXMATH=$PACKAGE_JAR_FILE
  1047. AC_SUBST(JLATEXMATH)
  1048.  
  1049. AC_JAVA_CHECK_VERSION_PACKAGE([jlatexmath],[import org.scilab.forge.jlatexmath.TeXFormula;],$JLATEXMATH,[1.0.2],[TeXFormula.VERSION])
  1050.  
  1051. # JLaTeXMath FOP
  1052. AC_JAVA_CHECK_PACKAGE([jlatexmath-fop],[org.scilab.forge.jlatexmath.fop.JLaTeXMathObj],[LaTex Rendering - FOP plugin])
  1053. JLATEXMATH_FOP=$PACKAGE_JAR_FILE
  1054. AC_SUBST(JLATEXMATH_FOP)
  1055.  
  1056. AC_DEFINE([WITH_GUI],[],[With the JAVA stuff (GUI, Console, JOGL...)])
  1057.  
  1058. fi
  1059.  
  1060. # Checkstyle (code checking)
  1061. AC_JAVA_CHECK_PACKAGE([checkstyle],[com.puppycrawl.tools.checkstyle.CheckStyleTask],[Checkstyle - code checking],"yes")
  1062. CHECKSTYLE=$PACKAGE_JAR_FILE
  1063. AC_SUBST(CHECKSTYLE)
  1064.  
  1065. # Commons beanutils (dependency of checkstyle)
  1066. AC_JAVA_CHECK_PACKAGE([commons-beanutils],[org.apache.commons.beanutils.Converter],[Bean utility],"yes")
  1067. COMMONS_BEANUTILS=$PACKAGE_JAR_FILE
  1068. AC_SUBST(COMMONS_BEANUTILS)
  1069.  
  1070. # antlr (dependency of checkstyle)
  1071. AC_JAVA_CHECK_PACKAGE([antlr],[antlr.TokenStreamException],[language tool for constructing recognizers],"yes")
  1072. ANTLR=$PACKAGE_JAR_FILE
  1073. AC_SUBST(ANTLR)
  1074.  
  1075. # Junit 4 (java unitary test)
  1076. AC_JAVA_CHECK_PACKAGE([junit4],[org.junit.Assert],[Junit4 - Unit tests],"yes")
  1077. JUNIT4=$PACKAGE_JAR_FILE
  1078. AC_SUBST(JUNIT4)
  1079.  
  1080. # Cobertura (java code coverage)
  1081. AC_JAVA_CHECK_PACKAGE([cobertura],[net.sourceforge.cobertura.merge.Main],[cobertura - Java code coverage],"yes")
  1082. COBERTURA=$PACKAGE_JAR_FILE
  1083. AC_SUBST(COBERTURA)
  1084.  
  1085. # ASM (a dependency of Cobertura)
  1086. AC_JAVA_CHECK_PACKAGE([asm3],[org.objectweb.asm.Type],[Java bytecode manipulation (dep of cobertura)],"yes")
  1087. ASM3=$PACKAGE_JAR_FILE
  1088. AC_SUBST(ASM3)
  1089. if test -z "$ASM3"; then
  1090. AC_JAVA_CHECK_PACKAGE([asm],[org.objectweb.asm.Type],[Java bytecode manipulation (dep of cobertura)],"yes")
  1091. ASM3=$PACKAGE_JAR_FILE
  1092. fi
  1093.  
  1094. else
  1095. AC_MSG_WARN([Sun javac not found: I will not build the java interface])
  1096. if test "$ac_java_jvm_name" != ""; then
  1097. AC_MSG_WARN([We do not support $ac_java_jvm_name yet])
  1098. fi
  1099. fi
  1100. AC_SUBST(JAVA_JNI_INCLUDE)
  1101. AC_SUBST(JAVA_JNI_LIBS)
  1102. AC_SUBST(JAVA_HOME)
  1103.  
  1104.  
  1105. if test "$enable_debug_java" = yes; then
  1106. JAVAC_DEBUG="on"
  1107. else
  1108. JAVAC_DEBUG="off"
  1109. fi
  1110. AC_SUBST(JAVAC_DEBUG)
  1111.  
  1112. if test "$with_build_swig" != no -a "$with_build_swig" != ""; then
  1113. SWIG_PROG()
  1114. SWIG_ENABLE_JAVA()
  1115. SWIG_ENABLE_SCILAB()
  1116. AC_SUBST(SWIG_BIN)
  1117. AC_SUBST(SWIG_JAVA)
  1118. AC_SUBST(SWIG_SCILAB)
  1119.  
  1120. fi
  1121.  
  1122. # Giws is the equivalent of Swig developed by the Scilab team
  1123. # in order to provide a wrapper to Java from C/C++
  1124. if test "$enable_build_giws" != no -a "$enable_build_giws" != ""; then
  1125. AC_GIWS([1.3.0])
  1126. fi
  1127. fi
  1128.  
  1129. JAVA_ENABLE=yes
  1130.  
  1131. if test -z "$JAVAC"; then
  1132. JAVA_ENABLE=no
  1133. fi
  1134.  
  1135. AC_SUBST(JAVA_ENABLE)
  1136.  
  1137. # Xcos is not checked here because gui=no disables it
  1138. AM_CONDITIONAL(NEED_JAVA, test "$with_javasci" != no -o "$with_gui" != no -o "$enable_build_help" != no)
  1139. AM_CONDITIONAL(GUI, test "$with_gui" != no)
  1140. AM_CONDITIONAL(JAVASCI, test "$with_javasci" != no)
  1141. AM_CONDITIONAL(SWIG, test "$with_build_swig" != no -a "$with_build_swig" != "")
  1142. AM_CONDITIONAL(GIWS, test "$enable_build_giws" != no -a "$enable_build_giws" != "")
  1143.  
  1144. ##############################################################
  1145. ## GUI module
  1146. ##############################################################
  1147.  
  1148. GUI_ENABLE=no
  1149.  
  1150. if test "$JAVA_ENABLE" != no; then
  1151. GUI_ENABLE=yes
  1152. fi
  1153.  
  1154. if test "$with_gui" != no; then
  1155. GUI_ENABLE=yes
  1156. fi
  1157.  
  1158. AC_SUBST(GUI_ENABLE)
  1159.  
  1160. ##############################################################
  1161. ## test for functions in standard C library and C math library
  1162. ##############################################################
  1163.  
  1164. # Provided by unistd.h
  1165. AC_CHECK_FUNCS([sleep] [usleep] [dup2] [getcwd] [getpagesize] [getpass])
  1166. AC_CHECK_FUNCS([rmdir])
  1167.  
  1168. 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])])
  1169.  
  1170. # Provided by <regex.h>
  1171. AC_CHECK_FUNCS([regcomp])
  1172.  
  1173. # Provided by stdlib.h
  1174. AC_CHECK_FUNCS([atexit] [putenv] [setenv])
  1175.  
  1176. # Provided by String.h
  1177. AC_CHECK_FUNCS([bzero] [memmove] [memset] [strcasecmp] [strerror] [strchr] [strdup] [strpbrk] [strrchr] [strstr] [strtol])
  1178.  
  1179. # Provided by select.h
  1180. AC_CHECK_FUNCS([select])
  1181.  
  1182. # Provided by pwd.h
  1183. AC_CHECK_FUNCS([endpwent])
  1184.  
  1185. # Provided by netdb.h
  1186. AC_CHECK_FUNCS([gethostbyaddr] [gethostbyname] [gethostname])
  1187.  
  1188. # Provided by time.h
  1189. AC_CHECK_FUNCS([gettimeofday])
  1190.  
  1191. # Provided by ctype.h
  1192. AC_CHECK_FUNCS([isascii])
  1193.  
  1194. # Provided by wctype.h
  1195. AC_CHECK_FUNCS([iswprint])
  1196.  
  1197. # Provided by types.h
  1198. AC_CHECK_FUNCS([mkdir])
  1199.  
  1200. # Provided by mman.h
  1201. AC_CHECK_FUNCS([munmap])
  1202.  
  1203. # Provided by signal.h
  1204. AC_CHECK_FUNCS([strsignal])
  1205.  
  1206.  
  1207. # Check of the libm (lib math). Macro provided by libtool.
  1208. save_LDFLAGS="$LDFLAGS"
  1209. LT_LIB_M()
  1210.  
  1211. # Provided by math.h
  1212.  
  1213. LDFLAGS="$LDFLAGS $LIBM"
  1214. AC_CHECK_FUNCS([pow] [sqrt] [finite] [floor] [exp10] [erf] [erfc] [isnan])
  1215.  
  1216. ### If isinf exists or not (used to not be the case under Solaris)
  1217. ### See bug #4164
  1218. AC_DEFINE([HAVE_ISINF],[1],[Have isinf function or macro equivalent])
  1219. AC_CHECK_FUNC([isinf],,[
  1220. AC_DEFINE([isinf(x)],[(!finite(x) && x==x)],[Provide a macro to do isinf])
  1221. ])
  1222. LIBS="$LIBS $LIBM"
  1223. LDFLAGS="$save_LDFLAGS"
  1224.  
  1225. # Provided by regex.h
  1226. AC_CHECK_FUNCS([re_comp])
  1227.  
  1228. # Provided by socket.h
  1229. AC_CHECK_FUNCS([socket])
  1230.  
  1231. # Provided by utsname.h
  1232. AC_CHECK_FUNCS([uname])
  1233.  
  1234. # Provided by wtloop.c
  1235. AC_CHECK_FUNCS([setlocale])
  1236.  
  1237. # Function memcmp used in modules/fileio/src/c/xls.c
  1238. AC_FUNC_MEMCMP
  1239.  
  1240. # function stat used in modules/core/src/c/link_std.c
  1241. AC_FUNC_STAT
  1242.  
  1243. # function strtod used in modules/core/src/c/getval.c
  1244. AC_FUNC_STRTOD
  1245.  
  1246. ########################
  1247. ## test for header files
  1248. ########################
  1249.  
  1250. AC_CHECK_HEADERS([limits.h values.h])
  1251.  
  1252. 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])
  1253.  
  1254. # check header dirent
  1255. AC_HEADER_DIRENT
  1256.  
  1257. # static struct timeval defined or not | used in modules/core/src/c/timer.c
  1258. AC_HEADER_TIME
  1259.  
  1260. # check if the specific header is available or not | used in modules/core/src/c/link_SYSV.c
  1261. AC_HEADER_SYS_WAIT
  1262.  
  1263.  
  1264. #######################
  1265. ## Test for structures ##
  1266. #######################
  1267. AC_CHECK_MEMBERS([struct stat.st_blksize])
  1268. AC_CHECK_MEMBERS([struct stat.st_rdev])
  1269.  
  1270.  
  1271. #######################
  1272. ## MISC Test
  1273. #######################
  1274.  
  1275. # gettext. See http://www.gnu.org/software/hello/manual/gettext/AM_005fGNU_005fGETTEXT.html
  1276. AM_GNU_GETTEXT([external])
  1277. AM_GNU_GETTEXT_VERSION([0.16])
  1278.  
  1279. # function closedir used in modules/metanet/src/c/files.c
  1280. AC_FUNC_CLOSEDIR_VOID
  1281.  
  1282. # Signals used in modules/core/src/c/realmain.c
  1283. AC_TYPE_SIGNAL
  1284.  
  1285. # struct tm used in modules/core/src/c/history.c
  1286. AC_STRUCT_TM
  1287.  
  1288. # st_blocks in the struct in modules/io/sci_gateway/c/intfilestat.c
  1289. AC_STRUCT_ST_BLOCKS
  1290.  
  1291.  
  1292. ##################
  1293. ## termcap library
  1294. ##################
  1295.  
  1296. # some systems may have a system curses implementation as well as ncurses
  1297. # installed. We need to be consistent in making sure we get the correct
  1298. # library to go with the correct header and also provide a way for the user
  1299. # to have some control over which is picked when both are available.
  1300. #
  1301. # For now, just check for -lcurses and then -lncurses. The user control
  1302. # may need to be revisited
  1303.  
  1304. TERMCAP_LIB=no
  1305.  
  1306. # Various observations:
  1307. #
  1308. # ncurses
  1309. # - installs ncurses.h and possibly curses.h as a link to ncurses.h
  1310. # - installs -lncurses.
  1311. # - need to include term.h for tgetent() but tgetent() is in -lncurses.a
  1312. #
  1313. # curses as found in NetBSD-4 and NetBSD-5
  1314. # - installs curses.h
  1315. # - need to include termcap.h and link with -ltermcap for tgetent()
  1316. #
  1317.  
  1318. AC_CHECK_LIB([curses],[main])
  1319. if test $ac_cv_lib_curses_main = no ; then
  1320. AC_CHECK_LIB([ncurses],[main])
  1321. fi
  1322.  
  1323. # make sure we have what we need for tgetent
  1324. AC_SEARCH_LIBS([tgetent],[termcap])
  1325.  
  1326. AC_CHECK_HEADERS([ncurses.h curses.h])
  1327.  
  1328. if test "x$ac_cv_lib_curses_main" = "xyes" -o "x$ac_cv_lib_ncurses_main" = "xyes" ; then
  1329. AC_DEFINE([HAVE_TERMCAP],[],[Have Term Cap])
  1330. else
  1331. AC_MSG_ERROR([No termcap library detected. Please install ncurses dev library (or termcap library)])
  1332. fi
  1333.  
  1334. ##################
  1335. ## other libraries
  1336. ##################
  1337.  
  1338. AC_CHECK_LIB(dl, dlopen)
  1339.  
  1340. AC_SEARCH_LIBS([pthread_join],[pthread])
  1341.  
  1342. #################
  1343. ## FFTW
  1344. #################
  1345.  
  1346. AC_ARG_WITH(fftw,
  1347. AC_HELP_STRING([--without-fftw],[Disable the interface to the FFTW 3 library]))
  1348.  
  1349. FFTW_ENABLE=no
  1350. if test "$with_fftw" != no; then
  1351. AC_FFTW()
  1352. FFTW_ENABLE=yes
  1353. fi
  1354.  
  1355. AC_SUBST(FFTW_ENABLE)
  1356. AM_CONDITIONAL(FFTW, test "$with_fftw" != no)
  1357.  
  1358.  
  1359. #################
  1360. ## MPI
  1361. #################
  1362.  
  1363. # Disable by default the build of MPI:
  1364. # * It is hard to package
  1365. # * People are administrating cluster know about rebuilding packages
  1366. # * They use their own MPI library
  1367. AC_ARG_WITH(mpi,
  1368. AC_HELP_STRING([--with-mpi],[compile with MPI library]))
  1369.  
  1370. MPI_ENABLE=no
  1371. if test "$with_mpi" == yes; then
  1372. AC_OPENMPI()
  1373. # We will have to detect other implementation of OpenMPI
  1374. MPI_ENABLE=yes
  1375. fi
  1376. AC_SUBST(MPI_ENABLE)
  1377.  
  1378. AM_CONDITIONAL(MPI, test "$with_mpi" == yes)
  1379.  
  1380. #################
  1381. ## OpenMP
  1382. #################
  1383.  
  1384. AC_ARG_WITH(openmp,
  1385. AC_HELP_STRING([--without-openmp],[Disable the usage of OpenMP (parallelization of some algoritms)]))
  1386.  
  1387. OPENMP_ENABLE=no
  1388. if test "$with_openmp" != no; then
  1389. # AC_OPENMP
  1390. OPENMP_CFLAGS="-fopenmp"
  1391. OPENMP_CXXFLAGS="-fopenmp"
  1392. OPENMP_LIBS="-lgomp"
  1393.  
  1394. AC_CHECK_HEADERS([omp.h], [],
  1395. [AC_MSG_ERROR([Could not find omp.h])])
  1396.  
  1397. OPENMP_ENABLE=yes
  1398. fi
  1399. AC_SUBST(OPENMP_ENABLE)
  1400. AC_SUBST(OPENMP_CFLAGS)
  1401. AC_SUBST(OPENMP_CXXFLAGS)
  1402. AC_SUBST(OPENMP_LIBS)
  1403.  
  1404. AM_CONDITIONAL(OPENMP, test "$with_openmp" != no)
  1405.  
  1406.  
  1407. #######################
  1408. ## Test for libxml
  1409. #######################
  1410.  
  1411. AC_LIBXML2()
  1412.  
  1413. #######################
  1414. ## Test for gettext
  1415. #######################
  1416.  
  1417. ALL_LINGUAS="en_US fr_FR zh_CN zh_TW ru_RU ca_ES de_DE es_ES pt_BR ja_JP it_IT uk_UA pl_PL cs_CZ"
  1418. ALL_LINGUAS_DOC="en_US fr_FR pt_BR ja_JP ru_RU"
  1419.  
  1420. AC_ARG_ENABLE(build-localization,
  1421. AC_HELP_STRING([--disable-build-localization],[Disable the localization build])
  1422. )
  1423. BUILD_LOCALIZATION_ENABLE=no
  1424.  
  1425. if test "$enable_build_localization" != no; then
  1426.  
  1427. AC_SUBST(ALL_LINGUAS)
  1428. AC_SUBST(ALL_LINGUAS_DOC)
  1429. AC_CHECK_FUNCS([bind_textdomain_codeset])
  1430.  
  1431. AC_PATH_PROG(MSGCAT, msgcat, no)
  1432. # AC_PATH_PROG(MSGFMT, msgfmt, no)
  1433. # AC_PATH_PROG(XGETTEXT, xgettext, no)
  1434.  
  1435. if test x$MSGFMT = xno; then
  1436. 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 ])
  1437. fi
  1438. if test x$MSGCAT = xno; then
  1439. 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 ])
  1440. fi
  1441. BUILD_LOCALIZATION_ENABLE=yes
  1442. fi
  1443. AM_CONDITIONAL(GENERATE_LOCALIZATION_FILES, test "$BUILD_LOCALIZATION_ENABLE" = yes)
  1444.  
  1445. #######################
  1446. ## Test for blas/Atlas and lapack
  1447. #######################
  1448. AC_MSG_CHECKING([if BLAS, ATLAS or MKL is available])
  1449. echo ""
  1450. ACX_BLAS(
  1451. [AC_MSG_RESULT([$BLAS_TYPE found])]
  1452. ,
  1453. AC_MSG_ERROR([Impossible to find a BLAS compatible library (see BLAS or ATLAS).])
  1454. )
  1455.  
  1456. AC_MSG_CHECKING([if LAPACK is available])
  1457. echo ""
  1458. ACX_LAPACK(
  1459. [AC_MSG_RESULT([$LAPACK_TYPE found])],
  1460. AC_MSG_ERROR([Impossible to find the LAPACK library.])
  1461. )
  1462.  
  1463.  
  1464. AC_ARG_WITH(arpack-ng,
  1465. AC_HELP_STRING([--without-arpack-ng],[Disable the interface to ARPACK-NG]))
  1466.  
  1467. ARPACK_NG=no
  1468. if test "$with_arpack_ng" != no; then
  1469. ARPACK_NG=yes
  1470. AC_MSG_CHECKING([if ARPACK-NG is available])
  1471. echo ""
  1472. ACX_ARPACK(
  1473. [AC_MSG_RESULT([ARPACK-NG library found])],
  1474. AC_MSG_ERROR([Impossible to find the ARPACK library. Please note that arpack was bundled with version prior to 5.4.0 and Scilab requires arpack-ng ( http://forge.scilab.org/index.php/p/arpack-ng/ ).])
  1475. )
  1476.  
  1477. CHECK_ARPACK_OK(
  1478. [AC_MSG_RESULT([Working ARPACK-NG library found (probably ARPACK-NG or a patched version of ARPACK)])],
  1479. [AC_MSG_ERROR([ARPACK library found, but seems not to work properly. Please make sure you are using arpack-ng])
  1480. ])
  1481. else
  1482. AC_MSG_CHECKING([Skip ARPACK-NG detection])
  1483. fi
  1484.  
  1485. AM_CONDITIONAL(ARPACK_NG, test "$ARPACK_NG" != "no")
  1486.  
  1487.  
  1488. #################
  1489. ## UMFPACK
  1490. #################
  1491.  
  1492. AC_ARG_WITH(umfpack,
  1493. AC_HELP_STRING([--without-umfpack],[Disable the interface to the UMFPACK library]))
  1494.  
  1495. UMFPACK_ENABLE=no
  1496. if test "$with_umfpack" != no; then
  1497. AC_UMFPACK([$BLAS_LIBS])
  1498. UMFPACK_ENABLE=yes
  1499. fi
  1500.  
  1501. AC_SUBST(UMFPACK_ENABLE)
  1502. AM_CONDITIONAL(UMFPACK, test "$with_umfpack" != no)
  1503.  
  1504. #######################
  1505. ## Test for PCRE
  1506. #######################
  1507.  
  1508. AC_PCRE()
  1509.  
  1510. #######################
  1511. ## Test for CURL
  1512. #######################
  1513.  
  1514. AC_CURL()
  1515.  
  1516. #################
  1517. ## Tcl/Tk library
  1518. #################
  1519.  
  1520. WITH_TKSCI=no
  1521. if test "$with_tk" != no; then
  1522. if test "$MACOSX" = "1"; then
  1523. AC_MSG_ERROR([Due to technical constraints, Tcl/Tk must be disabled under Mac OS X (--without-tk)])
  1524. fi
  1525.  
  1526. # check user arguments
  1527. USER_TCL_LIB_PATH=""
  1528. USER_TCL_INC_PATH=""
  1529. AC_ARG_WITH(tcl-library,
  1530. AC_HELP_STRING([--with-tcl-library=DIR],[Set the path to the TCL library]),
  1531. [ USER_TCL_LIB_PATH=$withval
  1532. ])
  1533. AC_ARG_WITH(tcl-include,
  1534. AC_HELP_STRING([--with-tcl-include=DIR],[Set the path to the TCL headers]),
  1535. [ USER_TCL_INC_PATH=$withval
  1536. ])
  1537.  
  1538. USER_TK_LIB_PATH=$USER_TCL_LIB_PATH
  1539. USER_TK_INC_PATH=$USER_TCL_INC_PATH
  1540.  
  1541. AC_ARG_WITH(tk-library,
  1542. AC_HELP_STRING([--with-tk-library=DIR],[Set the path to the TK library]),
  1543. [ USER_TK_LIB_PATH=$withval
  1544. ])
  1545.  
  1546. AC_ARG_WITH(tk-include,
  1547. AC_HELP_STRING([--with-tk-include=DIR],[Set the path to the TK headers]),
  1548. [ USER_TK_INC_PATH=$withval
  1549. ])
  1550.  
  1551. ###########################
  1552. ########## X11 checks
  1553. ###########################
  1554. ## This check is mandatory since tk needs Xlib headers and libs
  1555. AC_PATH_XTRA
  1556. ##
  1557.  
  1558. saved_cflags="$CFLAGS"
  1559. saved_ldflags="$LDFLAGS"
  1560. saved_cppflags="$CXXFLAGS"
  1561.  
  1562. AC_CHECK_LIB([dl], [main], [TCLTK_LIBS=" -ldl"])
  1563. AC_CHECK_TCLTK
  1564.  
  1565. # set variables
  1566. if test "$WITH_TKSCI" = yes; then
  1567. AC_DEFINE([WITH_TK], [], [With TK])
  1568. else
  1569. AC_MSG_ERROR([TCL/TK not found. Use --without-tk or specify the librairies and include paths manually])
  1570. fi
  1571.  
  1572. AC_SUBST(TCLTK_LIBS)
  1573. AC_SUBST(TCL_INC_PATH)
  1574. AC_SUBST(TK_INC_PATH)
  1575.  
  1576. fi
  1577. AC_SUBST(WITH_TKSCI)
  1578. AM_CONDITIONAL(TCLTK, test "$WITH_TKSCI" = yes)
  1579.  
  1580. #################
  1581. ## MATIO LIBRARY (MAT File I/O Library)
  1582. #################
  1583.  
  1584.  
  1585. AC_ARG_WITH(matio,
  1586. AC_HELP_STRING([--without-matio],[Disable the interface to Matio (MAT File I/O library)]))
  1587.  
  1588. AC_ARG_WITH(matio_include,
  1589. AC_HELP_STRING([--with-matio-include=DIR],[Set the path to the MATIO headers]),
  1590. [with_matio_include="-I$withval"], [])
  1591.  
  1592. AC_ARG_WITH(matio_library,
  1593. AC_HELP_STRING([--with-matio-library=DIR],[Set the path to the MATIO libraries]),
  1594. [with_matio_library="-L$withval"], [])
  1595.  
  1596. MATIO_ENABLE=no
  1597.  
  1598. if test "$with_matio" != no; then
  1599. if test -n "$with_matio_include" -o -n "$with_matio_library" ; then
  1600. MATIO_CFLAGS="$with_matio_include"
  1601. MATIO_LIBS="$with_matio_library -lm -lz -lmatio -lhdf5"
  1602. else
  1603. PKG_CHECK_MODULES(MATIO, [matio >= 1.5.0])
  1604. fi
  1605.  
  1606. save_CFLAGS="$CFLAGS"
  1607. save_LIBS="$LIBS"
  1608.  
  1609. CFLAGS="$CFLAGS $MATIO_CFLAGS"
  1610. LIBS="$LIBS $MATIO_LIBS"
  1611.  
  1612. AC_CHECK_HEADERS([matio.h], [],
  1613. [AC_MSG_ERROR([Invalid MATIO_CFLAGS returned by pkg-config. Try to define MATIO_CFLAGS.])])
  1614. AC_CHECK_LIB([matio], [Mat_Open], [],
  1615. [AC_MSG_ERROR([Invalid MATIO_LIBS returned by pkg-config. Try to define MATIO_LIBS.])])
  1616.  
  1617. LIBS="$save_LIBS"
  1618. CFLAGS="$save_CFLAGS"
  1619.  
  1620. AC_DEFINE([WITH_MATIO], [], [With the MATIO library])
  1621. MATIO_ENABLE=yes
  1622.  
  1623. AC_SUBST(MATIO_LIBS)
  1624. AC_SUBST(MATIO_CFLAGS)
  1625. fi
  1626.  
  1627.  
  1628. AC_SUBST(MATIO_ENABLE)
  1629. AM_CONDITIONAL(MATIO, test "$with_matio" != no)
  1630.  
  1631. #############################
  1632. ## Documentation management #
  1633. #############################
  1634.  
  1635. HELP_ENABLE=yes
  1636.  
  1637. AC_ARG_ENABLE(build-help,
  1638. AC_HELP_STRING([--disable-build-help],[Disable the help build])
  1639. )
  1640.  
  1641. if test "$enable_build_help" != no; then
  1642. AC_DOCBOOK()
  1643. else
  1644. HELP_ENABLE=no
  1645. fi
  1646.  
  1647. if test "$JAVA_ENABLE" = no; then
  1648. HELP_ENABLE=no
  1649. fi
  1650.  
  1651. AC_SUBST(HELP_ENABLE)
  1652.  
  1653. AM_CONDITIONAL(BUILD_HELP, test $HELP_ENABLE = yes)
  1654.  
  1655. ## Install XML help files ###
  1656.  
  1657. AC_ARG_WITH(install-help-xml,
  1658. AC_HELP_STRING([--with-install-help-xml],[make install will install XML files])
  1659. )
  1660. HELP_INSTALL_ENABLE=no
  1661. if test "$with_install_help_xml" != no -a "$with_install_help_xml" != ""; then
  1662. HELP_INSTALL_ENABLE=yes
  1663. fi
  1664. AM_CONDITIONAL(INSTALL_HELP_XML, test "$HELP_INSTALL_ENABLE" != "")
  1665.  
  1666. ## Doxygen help generation
  1667. AC_ARG_ENABLE(build-doxygen,
  1668. AC_HELP_STRING([--enable-build-doxygen],[Generate doxygen C/C++ documentation]))
  1669.  
  1670. DOXYGEN_ENABLE=yes
  1671. if test "$enable_build_doxygen" != no -a "$enable_build_doxygen" != ""; then
  1672. AC_DOXYGEN()
  1673. else
  1674. DOXYGEN_ENABLE=no
  1675. fi
  1676. AM_CONDITIONAL(DOXYGEN, test $DOXYGEN_ENABLE = yes)
  1677.  
  1678. ##############################################################
  1679. ## Javasci module
  1680. ##############################################################
  1681.  
  1682. JAVASCI_ENABLE=yes
  1683.  
  1684. if test "$JAVA_ENABLE" = no -o "$JAVASCI" = no; then
  1685. JAVASCI_ENABLE=no
  1686. fi
  1687.  
  1688. AC_SUBST(JAVASCI_ENABLE)
  1689.  
  1690.  
  1691. ##############################################################
  1692. ## Enable test at compilation time
  1693. ##############################################################
  1694.  
  1695. COMPILATION_TESTS=no
  1696. if test "$enable_compilation_tests" != no -a "$enable_compilation_tests" != ""; then
  1697. COMPILATION_TESTS=yes
  1698. fi
  1699.  
  1700. if test COMPILATION_TESTS=yes -a "$JUNIT4" == ""; then
  1701. AC_MSG_WARN([--enable-compilation-tests deactivated: Could not find Junit4"])
  1702. COMPILATION_TESTS=no
  1703. fi
  1704.  
  1705. AM_CONDITIONAL(COMPILATION_TESTS, test "$COMPILATION_TESTS" != "no")
  1706.  
  1707. ##############################################################
  1708. ## Enable the global force link
  1709. ##############################################################
  1710.  
  1711. AC_ARG_ENABLE(force-full-link,
  1712. AC_HELP_STRING([--enable-force-full-link],[Forces the explicit link between libscilab and some "on-the-fly" loaded libraries. NOT USE IN PRODUCTION.]))
  1713.  
  1714. FORCE_FULL_LINK="no"
  1715. if test "$enable_force_full_link" == "yes"; then
  1716. FORCE_FULL_LINK="yes"
  1717. fi
  1718.  
  1719. AM_CONDITIONAL(FORCE_LINK, test "$FORCE_FULL_LINK" == "yes")
  1720.  
  1721. ##############################################################
  1722. ## demo_tools module
  1723. ##############################################################
  1724.  
  1725. DEMOTOOLS_ENABLE=yes
  1726.  
  1727. if test "$GUI_ENABLE" = no; then
  1728. DEMOTOOLS_ENABLE=no
  1729. fi
  1730.  
  1731. AC_SUBST(DEMOTOOLS_ENABLE)
  1732.  
  1733. ##############################################################
  1734. ## graphics/renderer/graphic_export module
  1735. ##############################################################
  1736.  
  1737. GRAPHICS_ENABLE=yes
  1738.  
  1739. if test "$GUI_ENABLE" = no; then
  1740. GRAPHICS_ENABLE=no
  1741. fi
  1742.  
  1743. AC_SUBST(GRAPHICS_ENABLE)
  1744.  
  1745. #########################
  1746. ## libtool
  1747. #########################
  1748.  
  1749. AM_DISABLE_STATIC
  1750. LT_PREREQ([2.2.7])
  1751. AC_PROG_LIBTOOL([shared dlopen])
  1752. AM_PROG_LIBTOOL
  1753.  
  1754. # Eliminate -lstdc++ addition to postdeps for cross compiles.
  1755. postdeps_CXX=`echo " $postdeps_CXX " | sed 's, -lstdc++ ,,g'`
  1756.  
  1757. # Avoid to link all the dep from others libraries (*.la included by LIBADD)
  1758. link_all_deplibs=no
  1759.  
  1760. # Check to see if building shared libraries
  1761. libtool_build_shared_libs=no
  1762. if test "$enable_shared" = "yes"; then
  1763. libtool_build_shared_libs=yes
  1764. fi
  1765.  
  1766. # Check to see if building static libraries
  1767. libtool_build_static_libs=no
  1768. if test "$enable_static" = "yes"; then
  1769. libtool_build_static_libs=yes
  1770. fi
  1771.  
  1772. # AM_CONDITIONAL(ENABLE_STATIC, test "$libtool_build_static_libs" = yes)
  1773. # Fake to disable the static build
  1774. AM_CONDITIONAL(ENABLE_STATIC, test "$libtool_build_static_libs" = xxxx)
  1775.  
  1776. AC_C_CONST()
  1777. AC_C_INLINE()
  1778.  
  1779. AC_BACKTRACE()
  1780.  
  1781. ##########
  1782. ##### Code quality
  1783. ##########
  1784. AC_PATH_PROG(SPLINT, splint, no)
  1785.  
  1786. ##########
  1787. ##### Detect ccache and use it by default if available
  1788. ##########
  1789.  
  1790. AC_ARG_ENABLE(ccache,
  1791. AC_HELP_STRING([--disable-ccache],[Disable the use of ccache])
  1792. )
  1793. AC_PATH_PROG(CCACHE, ccache)
  1794. if test x"$CCACHE" != x -a "$enable_ccache" != no; then
  1795. CC="$CCACHE $CC"
  1796. CXX="$CCACHE $CXX"
  1797. fi
  1798.  
  1799. #######################
  1800. ###### Creation of the header file (machine.h)
  1801. #######################
  1802.  
  1803. AC_DEFINE_UNQUOTED([PATH_SEPARATOR], ["$PATH_SEPARATOR"],
  1804. [The default path separator character.])
  1805.  
  1806. AH_TOP([#ifndef MACHINE_H
  1807. #define MACHINE_H
  1808. /* This file defines global element configuration of the build host */
  1809. ])
  1810.  
  1811. AH_BOTTOM([
  1812.  
  1813. #ifdef DIR_SEPARATOR
  1814. #undef DIR_SEPARATOR
  1815. #endif
  1816. #define DIR_SEPARATOR "/"
  1817.  
  1818. #endif /* MACHINE_H */
  1819. ])
  1820.  
  1821. # Define the standard extension of a dynamic library
  1822. AC_DEFINE_UNQUOTED([SHARED_LIB_EXT],["$shrext_cmds"],[Extension of a shared library])
  1823.  
  1824.  
  1825. #########
  1826. ## Make sure that the libstdc++ and libgcc can be compiled as static
  1827. #########
  1828.  
  1829. AC_CHECK_STDCPP_STATIC()
  1830.  
  1831. #################
  1832. ## stop on warning
  1833. #################
  1834.  
  1835. # Stop to compile scilab when a warning is found ...
  1836. # This stuff is at the end of the configure.ac because it causes some
  1837. # problem with AC_COMPILE (the -Werror is added to the test)
  1838. #
  1839. dnl @TODO : -O0 is only to bypass Stack shit... Must be removed.
  1840. if test "$enable_stop_on_warning" = yes; then
  1841. WARNING_CFLAGS="-Werror=implicit-function-declaration -O0"
  1842. WARNING_CXXFLAGS="-Werror=implicit-function-declaration -O0"
  1843. fi
  1844.  
  1845. # SCI_*FLAGS contains all defaults values detected on configure
  1846. SCI_CFLAGS=$(echo $LARGEFILE_CFLAGS $CODECOVERAGE_CFLAGS $DEBUG_CFLAGS $ARCH_CFLAGS $COMPILER_CFLAGS $SCILIBS_CFLAGS $SSE_CFLAGS $BACKTRACE_CFLAGS $WARNING_CFLAGS)
  1847. SCI_CXXFLAGS=$(echo $LARGEFILE_CXXFLAGS $CODECOVERAGE_CXXFLAGS $DEBUG_CXXFLAGS $ARCH_CXXFLAGS $COMPILER_CXXFLAGS $SCILIBS_CXXFLAGS $SSE_CXXFLAGS $BACKTRACE_CXXFLAGS $WARNING_CXXFLAGS)
  1848. SCI_FFLAGS=$(echo $LARGEFILE_FFLAGS $CODECOVERAGE_FFLAGS $DEBUG_FFLAGS $ARCH_FFLAGS $COMPILER_FFLAGS $SCILIBS_FFLAGS $SSE_FFLAGS $BACKTRACE_FFLAGS $WARNING_FFLAGS)
  1849. SCI_LDFLAGS=$(echo $LARGEFILE_LDFLAGS $CODECOVERAGE_LDFLAGS $DEBUG_LDFLAGS $ARCH_LDFLAGS $COMPILER_LDFLAGS $SCILIBS_LDFLAGS $SSE_LDFLAGS $BACKTRACE_LDFLAGS $WARNING_LDFLAGS)
  1850. AC_SUBST(SCI_CFLAGS)
  1851. AC_SUBST(SCI_CXXFLAGS)
  1852. AC_SUBST(SCI_FFLAGS)
  1853. AC_SUBST(SCI_LDFLAGS)
  1854.  
  1855. AC_CONFIG_FILES([
  1856. contrib/Makefile
  1857. desktop/images/icons/Makefile
  1858. desktop/Makefile
  1859. modules/helptools/Makefile
  1860. modules/data_structures/Makefile
  1861. modules/differential_equations/Makefile
  1862. modules/optimization/Makefile
  1863. modules/elementary_functions/Makefile
  1864. modules/special_functions/Makefile
  1865. modules/io/Makefile
  1866. modules/completion/Makefile
  1867. modules/history_manager/Makefile
  1868. modules/jvm/Makefile
  1869. modules/commons/Makefile
  1870. modules/sound/Makefile
  1871. modules/statistics/Makefile
  1872. modules/mexlib/Makefile
  1873. modules/sparse/Makefile
  1874. modules/linear_algebra/Makefile
  1875. modules/polynomials/Makefile
  1876. modules/symbolic/Makefile
  1877. modules/signal_processing/Makefile
  1878. modules/arnoldi/Makefile
  1879. modules/interpolation/Makefile
  1880. modules/intersci/Makefile
  1881. modules/localization/Makefile
  1882. modules/cacsd/Makefile
  1883. modules/boolean/Makefile
  1884. modules/integer/Makefile
  1885. modules/double/Makefile
  1886. modules/fileio/Makefile
  1887. modules/spreadsheet/Makefile
  1888. modules/string/Makefile
  1889. modules/time/Makefile
  1890. modules/graphics/Makefile
  1891. modules/graphic_export/Makefile
  1892. modules/graphic_objects/Makefile
  1893. modules/renderer/Makefile
  1894. modules/action_binding/Makefile
  1895. modules/gui/Makefile
  1896. modules/mpi/Makefile
  1897. modules/randlib/Makefile
  1898. modules/tclsci/Makefile
  1899. modules/windows_tools/Makefile
  1900. modules/core/Makefile
  1901. modules/prebuildjava/Makefile
  1902. modules/api_scilab/Makefile
  1903. modules/call_scilab/Makefile
  1904. modules/types/Makefile
  1905. modules/hdf5/Makefile
  1906. modules/fftw/Makefile
  1907. modules/umfpack/Makefile
  1908. modules/scicos/Makefile
  1909. modules/scicos_blocks/Makefile
  1910. modules/functions/Makefile
  1911. modules/dynamic_link/Makefile
  1912. modules/overloading/Makefile
  1913. modules/javasci/Makefile
  1914. modules/m2sci/Makefile
  1915. modules/compatibility_functions/Makefile
  1916. modules/development_tools/Makefile
  1917. modules/output_stream/Makefile
  1918. modules/console/Makefile
  1919. modules/demo_tools/Makefile
  1920. modules/genetic_algorithms/Makefile
  1921. modules/simulated_annealing/Makefile
  1922. modules/parameters/Makefile
  1923. modules/matio/Makefile
  1924. modules/atoms/Makefile
  1925. modules/xcos/Makefile
  1926. modules/scinotes/Makefile
  1927. modules/ui_data/Makefile
  1928. modules/graph/Makefile
  1929. modules/parallel/Makefile
  1930. modules/modules_manager/Makefile
  1931. modules/history_browser/Makefile
  1932. modules/preferences/Makefile
  1933. modules/xml/Makefile
  1934. modules/external_objects/Makefile
  1935. modules/external_objects_java/Makefile
  1936. modules/Makefile
  1937. Makefile
  1938. scilab.pc
  1939. etc/modules.xml
  1940. etc/classpath.xml
  1941. etc/Info.plist
  1942. etc/logging.properties
  1943. scilab.properties
  1944. scilab-lib.properties
  1945. scilab-lib-doc.properties
  1946. modules/helptools/etc/SciDocConf.xml
  1947. modules/core/includes/version.h
  1948. ])
  1949.  
  1950. # Detection of the module for the future version of Scilab 6
  1951. # ie we detect module which ends with _yasp
  1952.  
  1953. if test "$enable_yasp" = yes; then
  1954. AC_CONFIG_FILES([
  1955. modules/development_tools/src/fake/Makefile
  1956. ])
  1957. fi
  1958.  
  1959. # This script is used by Xcos in order to regenerate the function/block list
  1960. 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])
  1961.  
  1962. # Generate stack.h
  1963. if test "$IS_64_BITS_CPU" = true -o "$MACOSX" = "1"; then
  1964. stack_h_cpp_flags=-DUSE_DYNAMIC_STACK
  1965. else
  1966. stack_h_cpp_flags=
  1967. fi
  1968.  
  1969. AC_CONFIG_COMMANDS([modules/core/includes/stack.h],
  1970. [if ! $CPP $stack_h_cpp_flags - < $srcdir/modules/core/includes/stack.h.in |\
  1971. $GREP -v '^#' > $srcdir/modules/core/includes/stack.h ; then
  1972. AC_MSG_ERROR([stack.h generation failed])
  1973. fi],
  1974. [CPP="$CPP"
  1975. GREP="$GREP"
  1976. stack_h_cpp_flags="$stack_h_cpp_flags"
  1977. ])
  1978.  
  1979. AC_OUTPUT
  1980.  
  1981. # To distribution packager, you can uncomment this stuff is you want to
  1982. # disable the rpath issue
  1983. # However, you will have to set all the LD_LIBRARY_PATH to .libs/ directory
  1984. # since scilab is compiling macros and help into the source tree (ie before
  1985. # the "make install")
  1986. # You should consider using chrpath:
  1987. # http://directory.fsf.org/project/chrpath/
  1988. # to remove it before the make install
  1989.  
  1990. #case ${host} in
  1991. # *-pc-linux-gnu)
  1992. # AC_MSG_RESULT([Fixing libtool for -rpath problems.])
  1993. # sed < libtool > libtool-2 \
  1994. # 's/^hardcode_libdir_flag_spec.*$/hardcode_libdir_flag_spec=" -D__LIBTOOL_IS_A_FOOL__ "/'
  1995. # mv libtool-2 libtool
  1996. # chmod 755 libtool
  1997. # ;;
  1998. #esac
  1999. #
  2000.  
  2001. echo ""
  2002.  
  2003. echo "Scilab is configured as follows. Please verify that this configuration"
  2004. echo "matches your expectations."
  2005. echo ""
  2006. echo "Host system type : $host"
  2007. echo ""
  2008. echo " Option Value"
  2009. echo "-------------------------------------------------------------------------"
  2010. echo "Shared libraries....... --enable-shared=$libtool_build_shared_libs"
  2011. echo "Static libraries....... --enable-static=$libtool_build_static_libs"
  2012. echo "GNU ld................. --with-gnu-ld=$with_gnu_ld"
  2013. echo "Enable debug .......... --enable-debug=$enable_debug"
  2014. echo "Enable debug C......... --enable-debug-C=$enable_debug_C"
  2015. echo "Enable debug C++....... --enable-debug-CXX=$enable_debug_CXX"
  2016. echo "Enable debug Java...... --enable-debug-java=$enable_debug_java"
  2017. echo "Enable debug Fortran... --enable-debug-fortran=$enable_debug_fortran"
  2018. echo "Enable stop on warning. --enable-stop-on-warning=$enable_stop_on_warning"
  2019.  
  2020. echo ""
  2021. echo "Compiler Configuration:"
  2022. echo " Intel (--with-intelcompilers) .... = $with_intelcompilers"
  2023. echo " GNU gcc (--with-gcc) ............. = $with_gcc"
  2024. echo " GNU Fortran 95 (--with-gfortran) . = $with_gfortran"
  2025. echo ""
  2026. echo "Options:"
  2027. echo " Do not use TCL/TK (--without-tk) ................. = $with_tk"
  2028. echo " TCL include (--with-tcl-include) ................. = $USER_TCL_INC_PATH"
  2029. echo " TCL library (--with-tcl-library) ................. = $USER_TCL_LIB_PATH"
  2030. echo " TK include (--with-tk-include) ................... = $USER_TK_INC_PATH"
  2031. echo " TK library (--with-tk-library) ................... = $USER_TK_LIB_PATH"
  2032. echo " Install XML Help (--with-install-help-xml) ....... = $with_install_help_xml"
  2033. echo " Compilation tests (--enable-compilation-tests) ... = $COMPILATION_TESTS"
  2034. echo " Make the package relocatable (--enable-relocatable)= $RELOCATABLE"
  2035. echo " Use FFTW (--without-fftw) ........................ = $with_fftw"
  2036. echo " Use MATIO (--without-matio) ...................... = $with_matio"
  2037.  
  2038. echo ""
  2039. if test "$with_gui" = no; then
  2040. echo "Not using Xcos because of the option --without-gui"
  2041. else
  2042. if test $XCOS_ENABLE = yes; then
  2043. echo "Xcos enable"
  2044. echo "Build modelica compiler (--without-modelica) ....... = $with_modelica"
  2045. echo ""
  2046. if test "$with_ocaml" != no -a "$OCAMLC" != no -a "$OCAMLOPT" != no; then
  2047. echo "Ocaml Configuration (for Modelica compiler):"
  2048. echo " OCAMLC ............. = $OCAMLC"
  2049. echo " OCAMLOPT ........... = $OCAMLOPT"
  2050. echo " OCAMLDEP ........... = $OCAMLDEP"
  2051. else
  2052. echo "Will not build Modelica compiler"
  2053. fi
  2054. else
  2055. echo "Not using Xcos"
  2056. fi
  2057. fi
  2058.  
  2059. echo ""
  2060. if test "$enable_code_coverage" = yes; then
  2061. echo "Code coverage configuration:"
  2062. echo " LCOV .............. = $LCOV"
  2063. echo " GENHTML ........... = $GENHTML"
  2064. else
  2065. echo "Not using code coverage"
  2066. fi
  2067.  
  2068. echo ""
  2069. if test $OPENMP_ENABLE = yes; then
  2070. echo "OpenMP Configuration:"
  2071. echo "OpenMP CFLAGS ...... = $OPENMP_CFLAGS"
  2072. echo "OpenMP CXXFLAGS .... = $OPENMP_CXXFLAGS"
  2073. echo "OpenMP LIBS ........ = $OPENMP_LIBS"
  2074. echo "OpenMP LDFLAGS ..... = $OPENMP_LDFLAGS"
  2075. else
  2076. echo "Not using OpenMP"
  2077. fi
  2078.  
  2079. echo ""
  2080. if test $FFTW_ENABLE = yes; then
  2081. echo "FFTW Configuration:"
  2082. echo " FFTW LIBS .......... = $FFTW3_LIB"
  2083. echo " FFTW CFLAGS ........ = $FFTW3_CFLAGS"
  2084. else
  2085. echo "Not using FFTW"
  2086. fi
  2087.  
  2088. echo ""
  2089. if test $MATIO_ENABLE = yes; then
  2090. echo "MATIO Configuration:"
  2091. echo " MATIO LIBS .......... = $MATIO_LIBS"
  2092. echo " MATIO CFLAGS ........ = $MATIO_CFLAGS"
  2093. else
  2094. echo "Not using MATIO"
  2095. fi
  2096.  
  2097. echo ""
  2098. if test $UMFPACK_ENABLE = yes; then
  2099. echo "UMFPACK Configuration:"
  2100. echo " UMFPACK LIBS ....... = $UMFPACK_LIB"
  2101. echo " UMFPACK CFLAGS ..... = $UMFPACK_CFLAGS"
  2102. if test $SUITESPARSE = yes; then
  2103. echo " UMFPACK SUITESPARSE = Yes"
  2104. else
  2105. echo " UMFPACK SUITESPARSE = No"
  2106. fi
  2107. else
  2108. echo "Not using UMFPACK"
  2109. fi
  2110.  
  2111.  
  2112. echo ""
  2113. echo "BLAS/LAPACK/ATLAS Configuration:"
  2114. echo " BLAS LIBS ............. = $BLAS_LIBS"
  2115. echo " BLAS TYPE ............. = $BLAS_TYPE"
  2116. echo " LAPACK LIBS ........... = $LAPACK_LIBS"
  2117. echo " LAPACK TYPE ........... = $LAPACK_TYPE"
  2118. echo " ARPACK LIBS ........... = $ARPACK_LIBS"
  2119. echo ""
  2120.  
  2121.  
  2122. if test "$with_mpi" == yes; then
  2123. echo "OpenMPI Configuration:"
  2124. echo "OpenMPI LIBS ........... = $OPENMPI_LIBS"
  2125. echo "OpenMPI C Compiler ..... = $OPENMPI_CC"
  2126. echo "OpenMPI C++ Compiler ... = $OPENMPI_CXX"
  2127. echo "OpenMPI F77 Compiler ... = $MPIF77"
  2128. else
  2129. echo "Not using MPI"
  2130. fi
  2131.  
  2132. echo ""
  2133. if test $BUILD_LOCALIZATION_ENABLE != no; then
  2134. echo "Gettext/localization configuration:"
  2135. echo " xgettext ............... = $XGETTEXT"
  2136. echo " msgfmt ................ = $MSGFMT"
  2137. echo " msgfmt_opts ............ = $MSGFMT_OPTS"
  2138. echo " msgcat ................ = $MSGCAT"
  2139. else
  2140. echo "Won't generate localization files"
  2141. fi
  2142.  
  2143. echo ""
  2144. if test $HELP_ENABLE = yes; then
  2145. echo "Documentation building configuration:"
  2146. echo " Docbook XSL path ....... = $DOCBOOK_ROOT"
  2147. echo " Saxon XSLT ............. = $SAXON"
  2148. echo " XML commons external ... = $XML_APIS_EXT"
  2149. else
  2150. echo "No documentation generated"
  2151. fi
  2152.  
  2153. echo ""
  2154. echo "Java Configuration:"
  2155. if test ! -z "$JAVAC"; then
  2156. echo " JAVA_HOME ........... = $JAVA_HOME"
  2157. echo " JAVAC ............... = $JAVAC"
  2158. echo " JAVA_CLASSPATH ...... = $JAVA_CLASSPATH"
  2159. echo " JAVA_VERSION ........ = $JAVA_VERSION"
  2160. echo " JAVAC_FLAGS ......... = $JAVAC_FLAGS"
  2161. echo " JAVA_JNI_INCLUDE .... = $JAVA_JNI_INCLUDE"
  2162. echo " JAVA_JNI_LIBS ....... = $JAVA_JNI_LIBS"
  2163. echo " JAVA_JNI_LIBS_PRELOAD = $JAVA_JNI_LIBS_PRELOAD"
  2164. echo " JAVA ................ = $JAVA"
  2165. echo " JAVADOC ............. = $JAVADOC"
  2166. echo " JAR ................. = $JAR"
  2167. echo " ANT ................. = $ANT"
  2168. else
  2169. echo " JAVA disabled"
  2170. fi
  2171.  
  2172.  
  2173. echo ""
  2174. echo "Java dependencies:"
  2175. if test ! -z "$JAVAC"; then
  2176. echo " Flexdock ............ = $FLEXDOCK"
  2177. echo " JOGL 2............... = $JOGL2"
  2178. echo " JOGL 2 LIBS (JNI) ... = $JOGL2_LIBS"
  2179. echo " Gluegen 2 ........... = $GLUEGEN2_RT"
  2180. echo " Gluegen 2 LIBS (JNI) = $GLUEGEN2_RT_LIBS"
  2181. echo " Jeuclid (MathML) .... = $JEUCLID_CORE"
  2182. echo " Jhall .............. = $JHALL"
  2183. echo " Jrosetta (API) ...... = $JROSETTA_API"
  2184. echo " Jrosetta (Engine) ... = $JROSETTA_ENGINE"
  2185. echo " Commons Logging ..... = $COMMONS_LOGGING"
  2186. echo " JGraph X ............ = $JGRAPHX"
  2187. echo " SciRenderer ......... = $SCIRENDERER"
  2188. echo " JLaTeXMath .......... = $JLATEXMATH"
  2189. fi
  2190.  
  2191. echo ""
  2192. if test ! -z "$JAVAC"; then
  2193. echo "Documentation, graphic export:"
  2194. echo " FOP (XML => PDF) .... = $FOP"
  2195. echo " JLaTeXMath Fop ...... = $JLATEXMATH_FOP"
  2196. echo " Batik (SVG) ......... = $BATIK"
  2197. echo " Avalon Framework .... = $AVALON_FRAMEWORK"
  2198. echo " Commons I/O ......... = $COMMONS_IO"
  2199. echo " XML graphics commons = $XMLGRAPHICS_COMMONS"
  2200. fi
  2201.  
  2202.  
  2203. echo ""
  2204. echo "Code quality (optional):"
  2205. echo " Checkstyle .......... = $CHECKSTYLE"
  2206. echo " Commons-beanutils ... = $COMMONS_BEANUTILS"
  2207. echo " Antlr ............... = $ANTLR"
  2208. echo " Junit4 .............. = $JUNIT4"
  2209. echo " Cobertura ........... = $COBERTURA"
  2210. echo " splint .............. = $SPLINT"
  2211.  
  2212. echo ""
  2213. echo "TCL/TK configuration:"
  2214. echo " TK_INC_PATH ........ = $TK_INC_PATH"
  2215. echo " TCL_INC_PATH ....... = $TCL_INC_PATH"
  2216. echo " TCLTK_LIBS ......... = $TCLTK_LIBS"
  2217. echo " TCL_SERIAL_VERSION . = $TCL_SERIAL_VERSION"
  2218. echo " TK_SERIAL_VERSION .. = $TK_SERIAL_VERSION"
  2219.  
  2220. echo ""
  2221. echo "XML configuration:"
  2222. echo " XML_FLAGS .......... = $XML_FLAGS"
  2223. echo " XML_LIBS ........... = $XML_LIBS"
  2224. echo " XML_VERSION ........ = $XML_VERSION"
  2225.  
  2226. echo ""
  2227. echo "HDF5 configuration:"
  2228. echo " HDF5 CFLAGS ......... = $HDF5_CFLAGS"
  2229. echo " HDF5 LIBS ........... = $HDF5_LIBS"
  2230.  
  2231. echo ""
  2232. echo "PCRE configuration:"
  2233. echo " PCRE_CFLAGS ........ = $PCRE_CFLAGS"
  2234. echo " PCRE_LIBS .......... = $PCRE_LIBS"
  2235. echo " PCRE_VERSION ....... = $PCRE_VERSION"
  2236.  
  2237. echo ""
  2238. echo "CURL configuration:"
  2239. echo " CURL_CFLAGS ........ = $CURL_CFLAGS"
  2240. echo " CURL_LIBS .......... = $CURL_LIBS"
  2241. echo " CURL_VERSION ....... = $CURL_VERSION"
  2242.  
  2243.  
  2244. echo ""
  2245. echo "SWIG Configuration:"
  2246. if test ! -z "$SWIG_BIN"; then
  2247. echo " SWIG_BIN ........... = $SWIG_BIN"
  2248. echo " SWIG_JAVA .......... = $SWIG_JAVA"
  2249. else
  2250. echo " SWIG generation disabled"
  2251. fi
  2252.  
  2253. echo ""
  2254. echo "GIWS Configuration:"
  2255. if test ! -z "$GIWS_BIN"; then
  2256. echo " GIWS_BIN ........... = $GIWS_BIN"
  2257. else
  2258. echo " GIWS generation disabled"
  2259. fi
  2260.  
  2261. echo ""
  2262. echo "Libtool config:"
  2263. echo " objext .............. = $objext"
  2264. echo " libext (static) ..... = $libext"
  2265. echo " shrext_cmds ......... = $shrext_cmds"
  2266. echo " exeext .............. = $exeext"
  2267.  
  2268. echo ""
  2269.  
  2270. echo "Compilation paths:"
  2271. echo " srcdir .............. = $SCI_SRCDIR"
  2272. echo " srcdir_full ......... = $SCI_SRCDIR_FULL"
  2273. echo " builddir ............ = $SCI_BUILDDIR"
  2274. if test "$SCI_SRCDIR_FULL" != "$SCI_BUILDDIR"; then
  2275. echo " VPATH build ......... = Activated"
  2276. fi
  2277.  
  2278. echo ""
  2279. echo "Platform information:"
  2280. echo " host ........... = $host"
  2281. echo " host_cpu ....... = $host_cpu"
  2282. echo " host_vendor .... = $host_vendor"
  2283. echo " host_os ... .... = $host_os"
  2284. echo " hostname ....... = $ac_hostname"
  2285. echo " CPU 64 bits .... = $IS_64_BITS_CPU"
  2286. if test -n "$MAC_DETECTED_ARCH"; then
  2287. echo " Mac OS X arch .. = $MAC_DETECTED_ARCH"
  2288. echo " Mac OS X version = $macosx_version"
  2289. fi
  2290.  
  2291. echo ""
  2292. echo "Options used to compile and link:"
  2293. echo " prefix ......... = $prefix"
  2294. echo " localedir ...... = $localedir"
  2295. echo " VERSION ........ = $PACKAGE_VERSION"
  2296. echo " CC ............. = $CC"
  2297. echo " CFLAGS ......... = $CFLAGS"
  2298. echo " SCI_CFLAGS ..... = $SCI_CFLAGS"
  2299. echo " DEFS ........... = $DEFS"
  2300. echo " LD ............. = $LD"
  2301. echo " LDFLAGS ........ = $LDFLAGS"
  2302. echo " SCI_LDFLAGS .... = $SCI_LDFLAGS"
  2303. echo " LIBS ........... = $LIBS"
  2304. echo " CXX ............ = $CXX"
  2305. echo " CXXFLAGS ....... = $CXXFLAGS"
  2306. echo " SCI_CXXFLAGS ... = $SCI_CXXFLAGS"
  2307. echo " F77 ............ = $F77"
  2308. echo " FFLAGS ......... = $FFLAGS"
  2309. echo " SCI_FFLAGS ..... = $SCI_FFLAGS"
  2310. echo " F77_LDFLAGS .... = $F77_LDFLAGS"
  2311. echo " TERMCAP_LIB .... = $TERMCAP_LIB"
  2312. echo ""
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement