comparison src/fftw-3.3.8/m4/ax_gcc_version.m4 @ 167:bd3cc4d1df30

Add FFTW 3.3.8 source, and a Linux build
author Chris Cannam <cannam@all-day-breakfast.com>
date Tue, 19 Nov 2019 14:52:55 +0000
parents
children
comparison
equal deleted inserted replaced
166:cbd6d7e562c7 167:bd3cc4d1df30
1 dnl @synopsis AX_GCC_VERSION(MAJOR, MINOR, PATCHLEVEL, [ACTION-SUCCESS], [ACTION-FAILURE])
2 dnl @summary check wither gcc is at least version MAJOR.MINOR.PATCHLEVEL
3 dnl @category InstalledPackages
4 dnl
5 dnl Check whether we are using gcc and, if so, whether its version
6 dnl is at least MAJOR.MINOR.PATCHLEVEL
7 dnl
8 dnl ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
9 dnl success/failure.
10 dnl
11 dnl @version 2005-05-30
12 dnl @license GPLWithACException
13 dnl @author Steven G. Johnson <stevenj@alum.mit.edu> and Matteo Frigo.
14 AC_DEFUN([AX_GCC_VERSION],
15 [
16 AC_REQUIRE([AC_PROG_CC])
17 AC_CACHE_CHECK(whether we are using gcc $1.$2.$3 or later, ax_cv_gcc_$1_$2_$3,
18 [
19 ax_cv_gcc_$1_$2_$3=no
20 if test "$GCC" = "yes"; then
21 dnl The semicolon after "yes" below is to pacify NeXT's syntax-checking cpp.
22 AC_EGREP_CPP(yes, [
23 #ifdef __GNUC__
24 # if (__GNUC__ > $1) || (__GNUC__ == $1 && __GNUC_MINOR__ > $2) \
25 || (__GNUC__ == $1 && __GNUC_MINOR__ == $2 && __GNUC_PATCHLEVEL__ >= $3)
26 yes;
27 # endif
28 #endif
29 ], [ax_cv_gcc_$1_$2_$3=yes])
30 fi
31 ])
32 if test "$ax_cv_gcc_$1_$2_$3" = yes; then
33 m4_default([$4], :)
34 else
35 m4_default([$5], :)
36 fi
37 ])
38