package/aubio: add fftw optional dependency
authorRomain Naour <romain.naour@gmail.com>
Sat, 3 Dec 2016 12:17:38 +0000 (13:17 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 4 Dec 2016 15:22:12 +0000 (16:22 +0100)
Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/aubio/aubio.mk

index 7aac6e547a77f886a2cfbe8be59ef08eb7c220cd..9339f44957461a1528bc00ad1a492ab883b43ab2 100644 (file)
@@ -14,9 +14,7 @@ AUBIO_INSTALL_STAGING = YES
 AUBIO_CONF_OPTS = \
        --disable-docs \
        --disable-atlas \
-       --disable-avcodec \
-       --disable-fftw3 \
-       --disable-fftw3f
+       --disable-avcodec
 
 ifeq ($(BR2_PACKAGE_LIBSNDFILE),y)
 AUBIO_DEPENDENCIES += libsndfile
@@ -39,4 +37,16 @@ else
 AUBIO_CONF_OPTS += --disable-jack
 endif
 
+ifeq ($(BR2_PACKAGE_FFTW),y)
+AUBIO_DEPENDENCIES += fftw
+# fftw3 require double otherwise it will look for fftw3f
+ifeq ($(BR2_PACKAGE_FFTW_PRECISION_DOUBLE),y)
+AUBIO_CONF_OPTS += --enable-fftw3 --enable-double
+else ifeq ($(BR2_PACKAGE_FFTW_PRECISION_SINGLE),y)
+AUBIO_CONF_OPTS += --enable-fftw3f --disable-double
+endif
+else  # !BR2_PACKAGE_FFTW
+AUBIO_CONF_OPTS += --disable-fftw3
+endif
+
 $(eval $(waf-package))