annotate fft/fftw/fftw-3.3.4/m4/ax_check_compiler_flags.m4 @ 40:223f770b5341 kissfft-double tip

Try a double-precision kissfft
author Chris Cannam
date Wed, 07 Sep 2016 10:40:32 +0100
parents 26056e866c29
children
rev   line source
Chris@19 1 dnl @synopsis AX_CHECK_COMPILER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE])
Chris@19 2 dnl @summary check whether FLAGS are accepted by the compiler
Chris@19 3 dnl @category Misc
Chris@19 4 dnl
Chris@19 5 dnl Check whether the given compiler FLAGS work with the current language's
Chris@19 6 dnl compiler, or whether they give an error. (Warnings, however, are
Chris@19 7 dnl ignored.)
Chris@19 8 dnl
Chris@19 9 dnl ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
Chris@19 10 dnl success/failure.
Chris@19 11 dnl
Chris@19 12 dnl @version 2005-05-30
Chris@19 13 dnl @license GPLWithACException
Chris@19 14 dnl @author Steven G. Johnson <stevenj@alum.mit.edu> and Matteo Frigo.
Chris@19 15 AC_DEFUN([AX_CHECK_COMPILER_FLAGS],
Chris@19 16 [AC_PREREQ(2.59) dnl for _AC_LANG_PREFIX
Chris@19 17 AC_MSG_CHECKING([whether _AC_LANG compiler accepts $1])
Chris@19 18 dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname:
Chris@19 19 AS_LITERAL_IF([$1],
Chris@19 20 [AC_CACHE_VAL(AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1), [
Chris@19 21 ax_save_FLAGS=$[]_AC_LANG_PREFIX[]FLAGS
Chris@19 22 _AC_LANG_PREFIX[]FLAGS="$1"
Chris@19 23 AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
Chris@19 24 AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=yes,
Chris@19 25 AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=no)
Chris@19 26 _AC_LANG_PREFIX[]FLAGS=$ax_save_FLAGS])],
Chris@19 27 [ax_save_FLAGS=$[]_AC_LANG_PREFIX[]FLAGS
Chris@19 28 _AC_LANG_PREFIX[]FLAGS="$1"
Chris@19 29 AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
Chris@19 30 eval AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=yes,
Chris@19 31 eval AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=no)
Chris@19 32 _AC_LANG_PREFIX[]FLAGS=$ax_save_FLAGS])
Chris@19 33 eval ax_check_compiler_flags=$AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)
Chris@19 34 AC_MSG_RESULT($ax_check_compiler_flags)
Chris@19 35 if test "x$ax_check_compiler_flags" = xyes; then
Chris@19 36 m4_default([$2], :)
Chris@19 37 else
Chris@19 38 m4_default([$3], :)
Chris@19 39 fi
Chris@19 40 ])dnl AX_CHECK_COMPILER_FLAGS