comparison configure.in @ 5270:a313e928afb1

[project @ 2005-04-06 19:22:03 by dbateman] ChangeLog
author dbateman
date Wed, 06 Apr 2005 19:22:04 +0000
parents 5f0ad69b5c8c
children 23b37da9fd5b
comparison
equal deleted inserted replaced
5269:a90ce2dc8b1e 5270:a313e928afb1
27 27
28 EXTERN_CFLAGS="$CFLAGS" 28 EXTERN_CFLAGS="$CFLAGS"
29 EXTERN_CXXFLAGS="$CXXFLAGS" 29 EXTERN_CXXFLAGS="$CXXFLAGS"
30 30
31 AC_INIT 31 AC_INIT
32 AC_REVISION($Revision: 1.469 $) 32 AC_REVISION($Revision: 1.470 $)
33 AC_PREREQ(2.57) 33 AC_PREREQ(2.57)
34 AC_CONFIG_SRCDIR([src/octave.cc]) 34 AC_CONFIG_SRCDIR([src/octave.cc])
35 AC_CONFIG_HEADER(config.h) 35 AC_CONFIG_HEADER(config.h)
36 36
37 AC_DEFINE(OCTAVE_SOURCE, 1, [Define if this is Octave.]) 37 AC_DEFINE(OCTAVE_SOURCE, 1, [Define if this is Octave.])
364 *) 364 *)
365 AC_CHECK_LIB(m, sin) 365 AC_CHECK_LIB(m, sin)
366 ;; 366 ;;
367 esac 367 esac
368 368
369 ### Check for HDF5 library. 369 ### Check for ZLIB library.
370 370
371 ### XXX FIXME XXX -- how can user specify a set of libraries here? 371 WITH_ZLIB=true
372 372 AC_ARG_WITH(zlib,
373 WITH_HDF5=true 373 [ --without-zlib don't use zlib],
374 AC_ARG_WITH(hdf5, 374 with_zlib=$withval, with_zlib=yes)
375 [ --without-hdf5 don't use HDF5], 375
376 with_hdf5=$withval, with_hdf5=yes) 376 zlib_lib=
377 377 if test "$with_zlib" = yes; then
378 hdf5_lib= 378 zlib_lib="z"
379 if test "$with_hdf5" = yes; then 379 elif test "$with_zlib" != no; then
380 hdf5_lib="hdf5" 380 zlib_lib="$with_zlib"
381 elif test "$with_hdf5" != no; then 381 fi
382 hdf5_lib="$with_hdf5" 382
383 fi 383 ZLIB_LIBS=
384 384 WITH_ZLIB=false
385 HDF5_LIBS= 385 if test -n "$zlib_lib"; then
386 WITH_HDF5=false 386 AC_CHECK_LIB($zlib_lib, deflate, [
387 if test -n "$hdf5_lib"; then 387 AC_CHECK_HEADERS(zlib.h, [
388 AC_CHECK_LIB($hdf5_lib, H5Pcreate, [ 388 WITH_ZLIB=true
389 AC_CHECK_LIB(z, deflate, [ 389 ZLIB_LIBS="-l$zlib_lib"
390 LIBS="$ZLIB_LIBS $LIBS"
391 AC_DEFINE(HAVE_ZLIB, 1, [Define if ZLIB is available.])])])
392 fi
393
394 if $WITH_ZLIB; then
395 ### Check for HDF5 library.
396
397 WITH_HDF5=true
398 AC_ARG_WITH(hdf5,
399 [ --without-hdf5 don't use HDF5],
400 with_hdf5=$withval, with_hdf5=yes)
401
402 hdf5_lib=
403 if test "$with_hdf5" = yes; then
404 hdf5_lib="hdf5"
405 elif test "$with_hdf5" != no; then
406 hdf5_lib="$with_hdf5"
407 fi
408
409 HDF5_LIBS=
410 WITH_HDF5=false
411 if test -n "$hdf5_lib"; then
412 AC_CHECK_LIB($hdf5_lib, H5Pcreate, [
390 AC_CHECK_HEADERS(hdf5.h, [ 413 AC_CHECK_HEADERS(hdf5.h, [
391 WITH_HDF5=true 414 WITH_HDF5=true
392 HDF5_LIBS="-l$hdf5_lib -lz" 415 HDF5_LIBS="-l$hdf5_lib"
393 LIBS="$HDF5_LIBS $LIBS" 416 LIBS="$HDF5_LIBS $LIBS"
394 AC_DEFINE(HAVE_HDF5, 1, [Define if HDF5 is available.]) 417 AC_DEFINE(HAVE_HDF5, 1, [Define if HDF5 is available.])
395 AC_CHECK_LIB($hdf5_lib, H5Gget_num_objs, [ 418 AC_CHECK_LIB($hdf5_lib, H5Gget_num_objs, [
396 AC_DEFINE(HAVE_H5GGET_NUM_OBJS, 1, [Define if HDF5 has H5Gget_num_objs.])])])])]) 419 AC_DEFINE(HAVE_H5GGET_NUM_OBJS, 1, [Define if HDF5 has H5Gget_num_objs.])])])])
397 fi 420 fi
398 421
399 if $WITH_HDF5; then 422 if $WITH_HDF5; then
400 true 423 true
424 else
425 warn_hdf5="HDF5 library not found. Octave will not be able to save or load HDF5 data files."
426 fi
401 else 427 else
402 warn_hdf5="HDF5 library not found. Octave will not be able to save or load HDF5 data files." 428 warn_zlib="ZLIB library not found. Octave will not be able to save or load compressed data files or HDF5 files."
403 fi 429 fi
430
404 431
405 # Checks for FFTW header and library. 432 # Checks for FFTW header and library.
406 433
407 # subdirectories of libcruft to build if they aren't found on the system: 434 # subdirectories of libcruft to build if they aren't found on the system:
408 FFT_DIR="fftpack" 435 FFT_DIR="fftpack"
650 have_umfpack_header=no 677 have_umfpack_header=no
651 with_umfpack=no 678 with_umfpack=no
652 AC_CHECK_HEADER(umfpack/umfpack.h, [have_umfpack_header=yes; break]) 679 AC_CHECK_HEADER(umfpack/umfpack.h, [have_umfpack_header=yes; break])
653 if test "$have_umfpack_header" = yes; then 680 if test "$have_umfpack_header" = yes; then
654 AC_CHECK_LIB(amd, amd_postorder, [ 681 AC_CHECK_LIB(amd, amd_postorder, [
655 LIBS="-lamd $LIBS"
656 AC_CHECK_LIB(umfpack, umfpack_zi_get_determinant, [ 682 AC_CHECK_LIB(umfpack, umfpack_zi_get_determinant, [
657 LIBS="-lumfpack $LIBS" 683 UMFPACK_LIBS="-lamd -lumfpack"; with_umfpack=yes], [
658 UMFPACK_LIBS="-lumfpack"; with_umfpack=yes], [
659 ## Invalidate the cache. 684 ## Invalidate the cache.
660 $as_unset ac_cv_lib_umfpack_umfpack_zi_get_determinant 685 $as_unset ac_cv_lib_umfpack_umfpack_zi_get_determinant
661 AC_CHECK_LIB(umfpack, umfpack_zi_get_determinant, [ 686 AC_CHECK_LIB(umfpack, umfpack_zi_get_determinant, [
662 LIBS="-lumfpack -lcblas $LIBS" 687 UMFPACK_LIBS="-lamd -lumfpack"; with_umfpack=yes], [
663 UMFPACK_LIBS="-lumfpack -lcblas"; with_umfpack=yes], [], -lcblas)])]) 688
689 ## Invalidate the cache.
690 $as_unset ac_cv_lib_umfpack_umfpack_zi_get_determinant
691 AC_CHECK_LIB(umfpack, umfpack_zi_get_determinant, [
692 UMFPACK_LIBS="-lamd -lumfpack -lcblas"; with_umfpack=yes], [], -lamd -lcblas $BLAS_LIBS)], -lamd $BLAS_LIBS $FLIBS)]), -lamd])
664 if test "$with_umfpack" = yes; then 693 if test "$with_umfpack" = yes; then
665 # For now the code needed for this is not in umfpack, will add 694 # For now the code needed for this is not in umfpack, will add
666 # a test later that will probably have to be based on version 695 # a test later that will probably have to be based on version
667 # numbers as there is no interface changes that are visible at 696 # numbers as there is no interface changes that are visible at
668 # compile time. 697 # compile time.
1647 if test -n "$warn_hdf5"; then 1676 if test -n "$warn_hdf5"; then
1648 AC_MSG_WARN($warn_hdf5) 1677 AC_MSG_WARN($warn_hdf5)
1649 warn_msg_printed=true 1678 warn_msg_printed=true
1650 fi 1679 fi
1651 1680
1681 if test -n "$warn_zlib"; then
1682 AC_MSG_WARN($warn_zlib)
1683 warn_msg_printed=true
1684 fi
1685
1652 if test -n "$warn_gnuplot"; then 1686 if test -n "$warn_gnuplot"; then
1653 1687
1654 ## If you change this text, be sure to also change the corresponding 1688 ## If you change this text, be sure to also change the corresponding
1655 ## set of warnings above. 1689 ## set of warnings above.
1656 1690