From 85c9b1ce612e9abd5a3fb125209aeaec595dda34 Mon Sep 17 00:00:00 2001 From: Akash Anand <akasha@iitk.ac.in> Date: Wed, 8 Aug 2007 16:14:17 +0000 Subject: [PATCH] *** empty log message *** --- configure | 411 +++++++++++++++++++++++++++++++++++++++++++++------ configure.in | 34 ++++- 2 files changed, 396 insertions(+), 49 deletions(-) diff --git a/configure b/configure index 5029d2c4e7..baf3c8f54a 100755 --- a/configure +++ b/configure @@ -309,7 +309,7 @@ ac_includes_default="\ # include <unistd.h> #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPP RANLIB ac_ct_RANLIB AR FLTKCONFIG CXXCPP EGREP UNAME FLAGS OPTIM LINKER GMSH_DIRS GMSH_LIBS POSTBUILD LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPP RANLIB ac_ct_RANLIB AR FLTKCONFIG F77 FFLAGS ac_ct_F77 CXXCPP EGREP UNAME FLAGS OPTIM LINKER GMSH_DIRS GMSH_LIBS POSTBUILD LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -778,6 +778,14 @@ ac_env_CPP_set=${CPP+set} ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} ac_cv_env_CPP_value=$CPP +ac_env_F77_set=${F77+set} +ac_env_F77_value=$F77 +ac_cv_env_F77_set=${F77+set} +ac_cv_env_F77_value=$F77 +ac_env_FFLAGS_set=${FFLAGS+set} +ac_env_FFLAGS_value=$FFLAGS +ac_cv_env_FFLAGS_set=${FFLAGS+set} +ac_cv_env_FFLAGS_value=$FFLAGS ac_env_CXXCPP_set=${CXXCPP+set} ac_env_CXXCPP_value=$CXXCPP ac_cv_env_CXXCPP_set=${CXXCPP+set} @@ -891,6 +899,8 @@ Optional Packages: --with-med-prefix=PFX prefix where OpenCascade is installed --with-fftw3-prefix=PFX prefix where FFTW3 is installed --with-fm-prefix=PFX prefix where FourierModel is installed + --with-blas-lapack-prefix=PFX + prefix where BLAS and LAPACK are installed Some influential environment variables: CC C compiler command @@ -902,6 +912,8 @@ Some influential environment variables: CXX C++ compiler command CXXFLAGS C++ compiler flags CPP C preprocessor + F77 Fortran 77 compiler command + FFLAGS Fortran 77 compiler flags CXXCPP C++ preprocessor Use these variables to override the choices made by `configure' or to help @@ -1416,6 +1428,12 @@ if test "${with_fm_prefix+set}" = set; then FM_PREFIX=$withval fi; +# Check whether --with-blas-lapack-prefix or --without-blas-lapack-prefix was given. +if test "${with_blas_lapack_prefix+set}" = set; then + withval="$with_blas_lapack_prefix" + BLAS_LAPACK_PREFIX=$withval +fi; + # Check whether --enable-gsl or --disable-gsl was given. if test "${enable_gsl+set}" = set; then enableval="$enable_gsl" @@ -4687,32 +4705,314 @@ fi fi fi -if test "x$enable_fm" != "xno"; then - if test "x${FM_PREFIX}" != "x"; then - LDFLAGS="-L${FM_PREFIX}/lib ${LDFLAGS}" +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu + +if test "x${BLAS_LAPACK_PREFIX}" != "x"; then + LDFLAGS="-L${BLAS_LAPACK_PREFIX} -L${BLAS_LAPACK_PREFIX}/lib ${LDFLAGS}" +fi +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$F77"; then + ac_cv_prog_F77="$F77" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_F77="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi - echo "$as_me:$LINENO: checking for main in -lFourierModel" >&5 -echo $ECHO_N "checking for main in -lFourierModel... $ECHO_C" >&6 -if test "${ac_cv_lib_FourierModel_main+set}" = set; then +done +done + +fi +fi +F77=$ac_cv_prog_F77 +if test -n "$F77"; then + echo "$as_me:$LINENO: result: $F77" >&5 +echo "${ECHO_T}$F77" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$F77" && break + done +fi +if test -z "$F77"; then + ac_ct_F77=$F77 + for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_F77"; then + ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_F77="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_F77=$ac_cv_prog_ac_ct_F77 +if test -n "$ac_ct_F77"; then + echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 +echo "${ECHO_T}$ac_ct_F77" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_F77" && break +done + + F77=$ac_ct_F77 +fi + + +# Provide some information about the compiler. +echo "$as_me:4808:" \ + "checking for Fortran 77 compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 + (eval $ac_compiler --version </dev/null >&5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5 + (eval $ac_compiler -v </dev/null >&5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5 + (eval $ac_compiler -V </dev/null >&5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +rm -f a.out + +# If we don't use `.F' as extension, the preprocessor is not run on the +# input file. (Note that this only needs to work for GNU compilers.) +ac_save_ext=$ac_ext +ac_ext=F +echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6 +if test "${ac_cv_f77_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF + program main +#ifndef __GNUC__ + choke me +#endif + + end +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f77_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_compiler_gnu=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_f77_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6 +ac_ext=$ac_save_ext +ac_test_FFLAGS=${FFLAGS+set} +ac_save_FFLAGS=$FFLAGS +FFLAGS= +echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 +echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_f77_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + FFLAGS=-g +cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f77_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_f77_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_prog_f77_g=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 +echo "${ECHO_T}$ac_cv_prog_f77_g" >&6 +if test "$ac_test_FFLAGS" = set; then + FFLAGS=$ac_save_FFLAGS +elif test $ac_cv_prog_f77_g = yes; then + if test "x$ac_cv_f77_compiler_gnu" = xyes; then + FFLAGS="-g -O2" + else + FFLAGS="-g" + fi +else + if test "x$ac_cv_f77_compiler_gnu" = xyes; then + FFLAGS="-O2" + else + FFLAGS= + fi +fi + +G77=`test $ac_compiler_gnu = yes && echo yes` +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu + + +echo "$as_me:$LINENO: checking for dasum in -lblas" >&5 +echo $ECHO_N "checking for dasum in -lblas... $ECHO_C" >&6 +if test "${ac_cv_lib_blas_dasum+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lFourierModel $LIBS" +LIBS="-lblas $LIBS" cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ + program main + call dasum + end _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f77_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_blas_dasum=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_lib_blas_dasum=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_blas_dasum" >&5 +echo "${ECHO_T}$ac_cv_lib_blas_dasum" >&6 +if test $ac_cv_lib_blas_dasum = yes; then + BLAS="yes" +else + BLAS="no" +fi -int -main () -{ -main (); - ; - return 0; -} +echo "$as_me:$LINENO: checking for dbdsqr in -llapack" >&5 +echo $ECHO_N "checking for dbdsqr in -llapack... $ECHO_C" >&6 +if test "${ac_cv_lib_lapack_dbdsqr+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-llapack -lblas $LIBS" +cat >conftest.$ac_ext <<_ACEOF + program main + call dbdsqr + end _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 @@ -4723,7 +5023,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" + { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -4736,33 +5036,43 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_FourierModel_main=yes + ac_cv_lib_lapack_dbdsqr=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_FourierModel_main=no +ac_cv_lib_lapack_dbdsqr=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_FourierModel_main" >&5 -echo "${ECHO_T}$ac_cv_lib_FourierModel_main" >&6 -if test $ac_cv_lib_FourierModel_main = yes; then - FM="yes" +echo "$as_me:$LINENO: result: $ac_cv_lib_lapack_dbdsqr" >&5 +echo "${ECHO_T}$ac_cv_lib_lapack_dbdsqr" >&6 +if test $ac_cv_lib_lapack_dbdsqr = yes; then + LAPACK="yes" else - FM="no" + LAPACK="no" fi - if test "x${FM}" = "xyes"; then - echo "$as_me:$LINENO: checking for main in -llapack" >&5 -echo $ECHO_N "checking for main in -llapack... $ECHO_C" >&6 -if test "${ac_cv_lib_lapack_main+set}" = set; then +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + +if test "x$enable_fm" != "xno"; then + if test "x${FM_PREFIX}" != "x"; then + LDFLAGS="-L${FM_PREFIX}/lib ${LDFLAGS}" + fi + echo "$as_me:$LINENO: checking for main in -lFourierModel" >&5 +echo $ECHO_N "checking for main in -lFourierModel... $ECHO_C" >&6 +if test "${ac_cv_lib_FourierModel_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-llapack $LIBS" +LIBS="-lFourierModel $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4801,28 +5111,29 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_lapack_main=yes + ac_cv_lib_FourierModel_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_lapack_main=no +ac_cv_lib_FourierModel_main=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_lapack_main" >&5 -echo "${ECHO_T}$ac_cv_lib_lapack_main" >&6 -if test $ac_cv_lib_lapack_main = yes; then - LAPACK="yes" +echo "$as_me:$LINENO: result: $ac_cv_lib_FourierModel_main" >&5 +echo "${ECHO_T}$ac_cv_lib_FourierModel_main" >&6 +if test $ac_cv_lib_FourierModel_main = yes; then + FM="yes" else - LAPACK="no" + FM="no" fi - if test "x${LAPACK}" != "xyes"; then - { echo "$as_me:$LINENO: WARNING: Could not find lapack: disabling FourierModel." >&5 -echo "$as_me: WARNING: Could not find lapack: disabling FourierModel." >&2;} + if test "x${FM}" = "xyes"; then + if test "x${BLAS}" != "xyes" -o "x${LAPACK}" != "xyes"; then + { echo "$as_me:$LINENO: WARNING: Could not find blas or lapack: disabling FourierModel." >&5 +echo "$as_me: WARNING: Could not find blas or lapack: disabling FourierModel." >&2;} else if test "x${FFTW3_PREFIX}" != "x"; then LDFLAGS="-L${FFTW3_PREFIX}/lib ${LDFLAGS}" @@ -4908,7 +5219,18 @@ echo "$as_me: WARNING: Could not find FFTW3: disabling FourierModel." >&2;} GMSH_LIBS="${GMSH_LIBS} -L${FFTW3_PREFIX}/lib -lfftw3" FLAGS="${FLAGS} -I${FFTW3_PREFIX}/include" fi - GMSH_LIBS="${GMSH_LIBS} -llapack" + if test "x${BLAS_LAPACK_PREFIX}" != "x"; then + GMSH_LIBS="${GMSH_LIBS} -L${BLAS_LAPACK_PREFIX} -L${BLAS_LAPACK_PREFIX}/lib" + fi + GMSH_LIBS="${GMSH_LIBS} -llapack -lblas" + case "${F77}" in + *gfortran*) + GMSH_LIBS="${GMSH_LIBS} -lgfortran" + ;; + *g77*) + GMSH_LIBS="${GMSH_LIBS} -lg2c" + ;; + esac fi fi fi @@ -6716,6 +7038,9 @@ s,@RANLIB@,$RANLIB,;t t s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t s,@AR@,$AR,;t t s,@FLTKCONFIG@,$FLTKCONFIG,;t t +s,@F77@,$F77,;t t +s,@FFLAGS@,$FFLAGS,;t t +s,@ac_ct_F77@,$ac_ct_F77,;t t s,@CXXCPP@,$CXXCPP,;t t s,@EGREP@,$EGREP,;t t s,@UNAME@,$UNAME,;t t diff --git a/configure.in b/configure.in index 79556f47ca..8a1561c814 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,4 @@ -dnl $Id: configure.in,v 1.130 2007-08-07 22:13:52 anand Exp $ +dnl $Id: configure.in,v 1.131 2007-08-08 16:14:17 anand Exp $ dnl dnl Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle dnl @@ -77,6 +77,10 @@ AC_ARG_WITH(fm-prefix, AC_HELP_STRING([--with-fm-prefix=PFX], [prefix where FourierModel is installed]), [FM_PREFIX=$withval]) +AC_ARG_WITH(blas-lapack-prefix, + AC_HELP_STRING([--with-blas-lapack-prefix=PFX], + [prefix where BLAS and LAPACK are installed]), + [BLAS_LAPACK_PREFIX=$withval]) dnl Parse '--enable' command line options AC_ARG_ENABLE(gsl, @@ -600,6 +604,15 @@ if test "x$enable_occ" = "xyes"; then fi fi +dnl Check for blas and lapack (used by FourierModel) +AC_LANG_PUSH(Fortran 77) +if test "x${BLAS_LAPACK_PREFIX}" != "x"; then + LDFLAGS="-L${BLAS_LAPACK_PREFIX} -L${BLAS_LAPACK_PREFIX}/lib ${LDFLAGS}" +fi +AC_CHECK_LIB(blas,dasum,BLAS="yes",BLAS="no") +AC_CHECK_LIB(lapack,dbdsqr,LAPACK="yes",LAPACK="no",-lblas) +AC_LANG_POP() + dnl Check for FourierModel if test "x$enable_fm" != "xno"; then if test "x${FM_PREFIX}" != "x"; then @@ -607,10 +620,8 @@ if test "x$enable_fm" != "xno"; then fi AC_CHECK_LIB(FourierModel,main,FM="yes",FM="no") if test "x${FM}" = "xyes"; then - dnl Check for lapack - AC_CHECK_LIB(lapack,main,LAPACK="yes",LAPACK="no") - if test "x${LAPACK}" != "xyes"; then - AC_MSG_WARN([Could not find lapack: disabling FourierModel.]) + if test "x${BLAS}" != "xyes" -o "x${LAPACK}" != "xyes"; then + AC_MSG_WARN([Could not find blas or lapack: disabling FourierModel.]) else dnl Check for FFTW3 if test "x${FFTW3_PREFIX}" != "x"; then @@ -633,7 +644,18 @@ if test "x$enable_fm" != "xno"; then GMSH_LIBS="${GMSH_LIBS} -L${FFTW3_PREFIX}/lib -lfftw3" FLAGS="${FLAGS} -I${FFTW3_PREFIX}/include" fi - GMSH_LIBS="${GMSH_LIBS} -llapack" + if test "x${BLAS_LAPACK_PREFIX}" != "x"; then + GMSH_LIBS="${GMSH_LIBS} -L${BLAS_LAPACK_PREFIX} -L${BLAS_LAPACK_PREFIX}/lib" + fi + GMSH_LIBS="${GMSH_LIBS} -llapack -lblas" + case "${F77}" in + *gfortran*) + GMSH_LIBS="${GMSH_LIBS} -lgfortran" + ;; + *g77*) + GMSH_LIBS="${GMSH_LIBS} -lg2c" + ;; + esac fi fi fi -- GitLab