Improve fftw m4 macro

First check if fftw functionality is already provided with the current
flags/library. This is useful, e.g., when using MKL or when providing
the FFTW flags via LDFLAGS/FCFLAGS/LIBS.
53 jobs for fix_fftw_m4 in 0 seconds
Status Job ID Name Coverage
  External
passed codecov/patch

passed codecov/project

70.31795%
passed distcheck

00:06:59

passed foss-2018a

00:16:35

passed foss-2018a_debug

00:22:52

passed foss-2018a_min

00:16:08

passed foss-2018a_mpi

00:17:35

passed foss-2018a_mpi_debug

00:24:20

passed foss-2018a_mpi_min

00:15:54

passed foss-2018a_mpi_opt

00:17:12

passed foss-2018a_opt

00:16:58

passed foss-2018a_ppc

00:22:21

passed foss-2018a_ppc_mpi

00:16:34

passed foss-2018a_valgrind

00:49:02

passed foss-2018b

00:15:52

passed foss-2018b_mpi

00:16:41

passed foss-2019a

00:16:29

passed foss-2019a_mpi

00:17:28

passed fosscuda-2018a

00:23:21

passed fosscuda-2018a_mpi

00:47:05

passed intel-2018a

00:18:01

passed intel-2018a_impi

00:18:52

passed intel-2018a_impi_omp

00:26:48

passed intel-2018a_omp

00:20:07

passed intel-2018b

00:18:09

passed intel-2018b_impi

00:21:23

passed intel-2019a

00:17:38

passed intel-2019a_impi

00:22:20

passed pgi-2017.10

00:50:30

passed pgi-2017.10_mpi

00:31:19

passed tests

01:26:39

passed codecov/patch

passed codecov/patch

passed codecov/patch

passed codecov/patch

passed codecov/patch

passed codecov/patch

passed codecov/patch

passed codecov/patch

passed codecov/patch

passed codecov/patch

passed codecov/patch

passed codecov/project

70.31795%
failed codecov/project

65.95812%
failed codecov/project

68.73225%
failed codecov/project

68.97303%
failed codecov/project

69.02928%
failed codecov/project

68.81238%
failed codecov/project

68.816%
failed codecov/project

68.80699%
failed codecov/project

70.164%
failed codecov/project

64.9735%
passed codecov/project

70.31795%