package/fftw: add fortran support
authorSamuel Martin <s.martin49@gmail.com>
Sun, 3 Jul 2016 13:47:49 +0000 (15:47 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 3 Jul 2016 14:58:11 +0000 (16:58 +0200)
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
[Thomas: pass FLIBS explicitly to help the configure script.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/fftw/fftw.mk

index e89671f9e24b3d3ffb512683685d6b0c8a194c1e..5bd39a8ff2b47883d391f0f660fd8dec9f5761a1 100644 (file)
@@ -10,7 +10,13 @@ FFTW_INSTALL_STAGING = YES
 FFTW_LICENSE = GPLv2+
 FFTW_LICENSE_FILES = COPYING
 
-FFTW_CONF_OPTS = --disable-fortran
+# fortran support only enables generation and installation of fortran sources
+ifeq ($(BR2_TOOLCHAIN_HAS_FORTRAN),y)
+FFTW_CONF_OPTS += --enable-fortran
+FFTW_CONF_ENV += FLIBS="-lgfortran -lm"
+else
+FFTW_CONF_OPTS += --disable-fortran
+endif
 
 FFTW_CONF_OPTS += $(if $(BR2_PACKAGE_FFTW_PRECISION_SINGLE),--enable,--disable)-single
 FFTW_CONF_OPTS += $(if $(BR2_PACKAGE_FFTW_PRECISION_LONG_DOUBLE),--enable,--disable)-long-double