Mercurial > octave
comparison configure.ac @ 12538:6a225fb7d361
Test fortran with -ff2c and with a wrapper for Apple blas/lapack, when needed.
author | Jarno Rajahalme <jarno.rajahalme@nsn.com> |
---|---|
date | Thu, 24 Mar 2011 16:46:34 -0400 |
parents | dfeea9cae79e |
children | 762d10c77277 |
comparison
equal
deleted
inserted
replaced
12537:015bfdc88092 | 12538:6a225fb7d361 |
---|---|
959 AX_BLAS_WITH_F77_FUNC([:], [:]) | 959 AX_BLAS_WITH_F77_FUNC([:], [:]) |
960 AX_LAPACK([:], [:]) | 960 AX_LAPACK([:], [:]) |
961 | 961 |
962 ## Restore FFLAGS. | 962 ## Restore FFLAGS. |
963 FFLAGS="$save_FFLAGS" | 963 FFLAGS="$save_FFLAGS" |
964 | |
965 ## Try again with -ff2c in FFLAGS | |
966 if test "x$ax_blas_f77_func_ok" = "xno"; then | |
967 save_FFLAGS="$FFLAGS" | |
968 FFLAGS="-ff2c $FFLAGS $F77_INTEGER_8_FLAG" | |
969 | |
970 AX_BLAS_WITH_F77_FUNC([:], [:]) | |
971 AX_LAPACK([:], [:]) | |
972 | |
973 ## Restore FFLAGS, with -ff2c if that was helpful | |
974 | |
975 if test "x$ax_blas_f77_func_ok" = "xno"; then | |
976 FFLAGS="$save_FFLAGS" | |
977 else | |
978 FFLAGS="-ff2c $save_FFLAGS" | |
979 fi | |
980 fi | |
981 | |
982 ## On OSX, try again with a wrapper library (without -ff2c!) | |
983 if test "x$ax_blas_f77_func_ok" = "xno"; then | |
984 case "$canonical_host_type" in | |
985 *-*-darwin*) | |
986 ## test if wrapper functions help | |
987 octave_blaswrap_save_CFLAGS="$CFLAGS" | |
988 CFLAGS="$CFLAGS -DUSE_BLASWRAP" | |
989 AC_LANG_PUSH(C) | |
990 AC_COMPILE_IFELSE( | |
991 [#include "libcruft/misc/blaswrap.c"], | |
992 [mv conftest.$ac_objext blaswrap.$ac_objext | |
993 octave_blaswrap_save_BLAS_LIBS="$BLAS_LIBS" | |
994 BLAS_LIBS="blaswrap.$ac_objext -framework vecLib" | |
995 | |
996 save_FFLAGS="$FFLAGS" | |
997 FFLAGS="$FFLAGS $F77_INTEGER_8_FLAG" | |
998 | |
999 AX_BLAS_WITH_F77_FUNC([:], [:]) | |
1000 AX_LAPACK([:], [:]) | |
1001 | |
1002 ## Restore FFLAGS. | |
1003 FFLAGS="$save_FFLAGS" | |
1004 | |
1005 ## remove temp file | |
1006 rm -f blaswrap.$ac_objext], | |
1007 [AC_MSG_FAILURE([cannot compile libcruft/misc/blaswrap.c])]) | |
1008 AC_LANG_POP(C) | |
1009 CFLAGS="$octave_blaswrap_save_CFLAGS" | |
1010 | |
1011 if test "x$ax_blas_f77_func_ok" = "xno"; then | |
1012 BLAS_LIBS="$octave_blaswrap_save_BLAS_LIBS" | |
1013 else | |
1014 ## wrapper in libcruft, remove from BLAS_LIBS | |
1015 BLAS_LIBS="`echo $BLAS_LIBS | sed -e 's/blaswrap.[[^ ]]* //g'`" | |
1016 AC_DEFINE(USE_BLASWRAP, [1], [Define this if BLAS functions need to be wrapped (potentially needed for 64-bit OSX only).]) | |
1017 fi | |
1018 ;; | |
1019 esac | |
1020 fi | |
964 | 1021 |
965 if test "x$ax_blas_f77_func_ok" = "xno"; then | 1022 if test "x$ax_blas_f77_func_ok" = "xno"; then |
966 if $USE_64_BIT_IDX_T && test "$ax_blas_integer_size_ok" = "no" ; then | 1023 if $USE_64_BIT_IDX_T && test "$ax_blas_integer_size_ok" = "no" ; then |
967 ## Attempt to be more informative. | 1024 ## Attempt to be more informative. |
968 AC_MSG_ERROR([BLAS doesn't seem to support 64-bit integers. This is incompatible with --enable-64.]) | 1025 AC_MSG_ERROR([BLAS doesn't seem to support 64-bit integers. This is incompatible with --enable-64.]) |