[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: OSX blas wrapper for release (plans for release)
From: |
Jarno Rajahalme |
Subject: |
Re: OSX blas wrapper for release (plans for release) |
Date: |
Mon, 7 Feb 2011 14:05:11 +0200 |
On Feb 6, 2011, at 22:03 , ext John W. Eaton wrote:
>
> +## On OSX, try again with a wrapper library (without -ff2c!)
> +if test "x$ax_blas_f77_func_ok" = "xno"; then
> + case "$canonical_host_type" in
> + *-*-darwin*)
> + ## test if wrapper functions help
> + $CC $CPPFLAGS $CFLAGS -DUSE_BLASWRAP -c -fomit-frame-pointer -W -Wall
> libcruft/misc/blaswrap.c -o conftest_blaswrap.o
>
> Please use autoconf macros to invoke compilers, and don't add random
> flags like -fomit-frame-pointer or other warning options. That way
> the options determined earlier in the configure script will be used
> consistently. See the OCTAVE_CHECK_FORTRAN_INTEGER_SIZE macro
> definition in acinclude.m4 for an example of using AC_COMPILE_IFELSE
> to compile a temporary file.
OK, does this look about right? It works as expected for me:
## On OSX, try again with a wrapper library (without -ff2c!)
if test "x$ax_blas_f77_func_ok" = "xno"; then
case "$canonical_host_type" in
*-*-darwin*)
## test if wrapper functions help
octave_blaswrap_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -DUSE_BLASWRAP"
AC_LANG_PUSH(C)
AC_COMPILE_IFELSE(
[#include "libcruft/misc/blaswrap.c"],
[mv conftest.$ac_objext blaswrap.$ac_objext
octave_blaswrap_save_BLAS_LIBS="$BLAS_LIBS"
BLAS_LIBS="blaswrap.$ac_objext -framework vecLib"
save_FFLAGS="$FFLAGS"
FFLAGS="$FFLAGS $F77_INTEGER_8_FLAG"
AX_BLAS_WITH_F77_FUNC([:], [:])
AX_LAPACK([:], [:])
## Restore FFLAGS.
FFLAGS="$save_FFLAGS"
## remove temp file
rm -f blaswrap.$ac_objext],
[AC_MSG_FAILURE([cannot compile libcruft/misc/blaswrap.c])])
AC_LANG_POP(C)
CFLAGS="$octave_blaswrap_save_CFLAGS"
if test "x$ax_blas_f77_func_ok" = "xno"; then
BLAS_LIBS="$octave_blaswrap_save_BLAS_LIBS"
else
## wrapper in libcruft, remove from BLAS_LIBS
BLAS_LIBS="`echo $BLAS_LIBS | sed -e 's/blaswrap.[[^ ]]* //g'`"
AC_DEFINE(USE_BLASWRAP, [1], [Define this if BLAS functions need to be
wrapped (potentially needed for 64-bit OSX only).])
fi
;;
esac
fi
Jarno
- Re: OSX blas wrapper for release (Re: plans for release), (continued)
- Re: OSX blas wrapper for release (plans for release), bpabbott, 2011/02/04
- Re: OSX blas wrapper for release (plans for release), Richard Campbell, 2011/02/04
- Re: OSX blas wrapper for release (plans for release), bpabbott, 2011/02/04
- Re: OSX blas wrapper for release (plans for release), Richard Campbell, 2011/02/06
- Re: OSX blas wrapper for release (plans for release), Ben Abbott, 2011/02/06
- Re: OSX blas wrapper for release (plans for release), John W. Eaton, 2011/02/06
- Re: OSX blas wrapper for release (plans for release),
Jarno Rajahalme <=
- Re: OSX blas wrapper for release (plans for release), Richard Campbell, 2011/02/12
- Re: OSX blas wrapper for release (plans for release), John W. Eaton, 2011/02/15
- Re: OSX blas wrapper for release (plans for release), Jarno Rajahalme, 2011/02/17
Re: plans for release, Rik, 2011/02/03
plans for release, John W. Eaton, 2011/02/04