annotate src/fftw-3.3.5/m4/ax_check_compiler_flags.m4 @ 84:08ae793730bd

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