annotate src/fftw-3.3.8/m4/ax_check_compiler_flags.m4 @ 82:d0c2a83c1364

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