annotate src/fftw-3.3.5/m4/ax_check_compiler_flags.m4 @ 169:223a55898ab9 tip default

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