Mercurial > hg > octave-lyh
diff configure.in @ 3820:f0ab8a324da7
[project @ 2001-04-24 16:06:59 by jwe]
author | jwe |
---|---|
date | Tue, 24 Apr 2001 16:07:56 +0000 |
parents | 44386b0e53da |
children | 1a809dae77db |
line wrap: on
line diff
--- a/configure.in +++ b/configure.in @@ -21,7 +21,7 @@ ### Software Foundation, 59 Temple Place - Suite 330, Boston, MA ### 02111-1307, USA. -AC_REVISION($Revision: 1.342 $) +AC_REVISION($Revision: 1.343 $) AC_PREREQ(2.9) AC_INIT(src/octave.cc) AC_CONFIG_HEADER(config.h) @@ -251,7 +251,7 @@ DEPEND_EXTRA_SED_PATTERN="" case "$canonical_host_type" in sparc-sun-solaris2* | i386-pc-solaris2*) - if test "$GCC" = "yes"; then + if test "$GCC" = yes; then true else DEPEND_FLAGS="-xM1" @@ -304,7 +304,7 @@ ### We do our own template instantiation for specific compilers. -if test "$cxx_auto_instantiate_templates" = "no"; then +if test "$cxx_auto_instantiate_templates" = no; then OCTAVE_CXX_FLAG(-fno-implicit-templates, [ XTRA_CXXFLAGS="$XTRA_CXXFLAGS -fno-implicit-templates" AC_MSG_RESULT([adding -fno-implicit-templates to XTRA_CXXFLAGS])]) @@ -342,17 +342,33 @@ ;; esac -# ---------------------------------------------------------------------- -# Check for HDF5 library -AC_ARG_WITH(hdf5, [ --without-hdf5 don't use HDF5 output], ok=$withval, ok=yes) -if test "$ok" = "yes"; then - AC_CHECK_LIB(z, deflate) - AC_CHECK_LIB(hdf5, H5Pcreate, [ - AC_CHECK_HEADERS(hdf5.h, [LIBS="-lhdf5 $LIBS" - AC_DEFINE(HAVE_HDF5)])]) +### Check for HDF5 library. + +### XXX FIXME XXX -- how can user specify a set of libraries here? + +WITH_HDF5=true +AC_ARG_WITH(hdf5, + [ --without-hdf5 don't use HDF5], + with_hdf5=$withval, with_hdf5=yes) + +hdf5_lib= +if test "$with_hdf5" = yes; then + hdf5_lib="hdf5" +elif test "$with_hdf5" != no; then + hdf5_lib="$with_hdf5" fi -# ---------------------------------------------------------------------- +HDF5_LIBS= +WITH_HDF5=false +if test -n "$hdf5_lib"; then + AC_CHECK_LIB($hdf5_lib, H5Pcreate, [ + AC_CHECK_LIB(z, deflate, [ + AC_CHECK_HEADERS(hdf5.h, [ + WITH_HDF5=true + HDF5_LIBS="-l$hdf5_lib -lz" + LIBS="$HDF5_LIBS $LIBS" + AC_DEFINE(HAVE_HDF5)])])]) +fi ### We need these before trying to find libf2c. @@ -531,18 +547,22 @@ AC_SUBST(F2CFLAGS) AC_SUBST_FILE(f77_rules_frag) -# Checks for BLAS and LAPACK libraries: +### Checks for BLAS and LAPACK libraries: -# subdirectories of libcruft to build if they aren't found on the system: +### XXX FIXME XXX -- how can user specify a set of libraries here? + +### Subdirectories of libcruft to build if they aren't found on the system: + BLAS_DIR="blas" LAPACK_DIR="lapack" AC_SUBST(BLAS_DIR) AC_SUBST(LAPACK_DIR) -# names of Fortran dgemm & cheev functions to check for (depends upon -# F77 compiler name-mangling scheme): -if test "$octave_cv_f77_uppercase_names" = "yes"; then - if test "$octave_cv_f77_append_underscore" = "yes"; then +### names of Fortran dgemm & cheev functions to check for (depends upon +### F77 compiler name-mangling scheme): + +if test "$octave_cv_f77_uppercase_names" = yes; then + if test "$octave_cv_f77_append_underscore" = yes; then dgemm_func=DGEMM_ cheev_func=CHEEV_ else @@ -550,7 +570,7 @@ cheev_func=CHEEV fi else - if test "$octave_cv_f77_append_underscore" = "yes" || test -n "${F2C}"; then + if test "$octave_cv_f77_append_underscore" = yes || test -n "${F2C}"; then dgemm_func=dgemm_ cheev_func=cheev_ else @@ -559,10 +579,13 @@ fi fi -AC_ARG_WITH(fastblas, [ --without-fastblas use included (generic) BLAS and LAPACK], with_fastblas=$withval, with_fastblas=yes) -if test "$with_fastblas" = "no"; then +AC_ARG_WITH(fastblas, + [ --without-fastblas use included (generic) BLAS and LAPACK], + with_fastblas=$withval, with_fastblas=yes) + +if test "$with_fastblas" = no; then BLAS_LIBS=" " -elif test "$with_fastblas" != "yes"; then +elif test "$with_fastblas" != yes; then # user specified a BLAS library to try on the command line AC_CHECK_LIB($with_fastblas, $dgemm_func, BLAS_LIBS="-l$with_fastblas", , $FLIBS) @@ -620,7 +643,7 @@ AC_CHECK_LIB(blas, $dgemm_func, BLAS_LIBS="-lblas", , $FLIBS) fi -if test "$with_fastblas" = "no"; then +if test "$with_fastblas" = no; then # Unset BLAS_LIBS so that we know below that nothing was found. BLAS_LIBS="" fi @@ -628,13 +651,13 @@ if test "x$BLAS_LIBS" != x; then BLAS_DIR="" # don't build our own BLAS -# Check for LAPACK library. Note that ATLAS has its own liblapack.a, -# which is designed to be combined with the real LAPACK. cheev is a -# function in the real LAPACK but not in ATLAS's version, so this -# (hopefully) insures that we are getting the real LAPACK. Note also -# that on some systems, LAPACK is included in the math library -# (e.g. DXML) that we already linked to above...we detect this by -# doing AC_CHECK_FUNC if -llapack isn't found: +### Check for LAPACK library. Note that ATLAS has its own liblapack.a, +### which is designed to be combined with the real LAPACK. cheev is a +### function in the real LAPACK but not in ATLAS's version, so this +### (hopefully) insures that we are getting the real LAPACK. Note also +### that on some systems, LAPACK is included in the math library +### (e.g. DXML) that we already linked to above...we detect this by +### doing AC_CHECK_FUNC if -llapack isn't found: AC_CHECK_LIB(lapack, $cheev_func, [BLAS_LIBS="-llapack $BLAS_LIBS"; LAPACK_DIR=""], @@ -794,7 +817,7 @@ fi RLD_FLAG='-R $(octlibdir)' # Template closures in archive libraries need a different mechanism. - if test "$GXX" = "yes"; then + if test "$GXX" = yes; then true else TEMPLATE_AR="$CXX" @@ -1353,6 +1376,8 @@ C++ compiler: $CXX $XTRA_CXXFLAGS $CXXFLAGS Fortran compiler: $FORT Fortran libraries: $FLIBS + BLAS libraries: $BLAS_LIBS + HDF5 libraries: $HDF5_LIBS Use GNU readline: $USE_READLINE Default pager: $DEFAULT_PAGER gnuplot: $GNUPLOT_BINARY