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