annotate src/fftw-3.3.3/m4/ax_check_compiler_flags.m4 @ 95:89f5e221ed7b

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