2020-10-30 15:14:11 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2021-12-05 20:10:10 +00:00
|
|
|
# https://fftw.org/download.html
|
2021-10-28 18:47:11 +00:00
|
|
|
FFTW3_SRC="https://fftw.org/fftw-3.3.10.tar.gz"
|
2021-09-22 13:27:59 +00:00
|
|
|
FFTW3_SHA512="2d34b5ccac7b08740dbdacc6ebe451d8a34cf9d9bfec85a5e776e87adf94abfd803c222412d8e10fbaa4ed46f504aa87180396af1b108666cde4314a55610b40"
|
2020-10-30 15:14:11 +00:00
|
|
|
|
|
|
|
ffbuild_enabled() {
|
|
|
|
# Dependency of GPL-Only librubberband
|
2021-06-20 19:59:48 +00:00
|
|
|
[[ $VARIANT == lgpl* ]] && return -1
|
2020-10-30 15:14:11 +00:00
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
ffbuild_dockerbuild() {
|
|
|
|
mkdir fftw3
|
|
|
|
cd fftw3
|
|
|
|
|
|
|
|
check-wget fftw3.tar.gz "$FFTW3_SRC" "$FFTW3_SHA512"
|
|
|
|
tar xaf fftw3.tar.gz
|
|
|
|
rm fftw3.tar.gz
|
|
|
|
cd fftw*
|
|
|
|
|
|
|
|
local myconf=(
|
|
|
|
--prefix="$FFBUILD_PREFIX"
|
|
|
|
--disable-shared
|
|
|
|
--enable-static
|
2021-12-06 17:23:09 +00:00
|
|
|
--disable-fortran
|
2020-10-30 15:14:11 +00:00
|
|
|
--disable-doc
|
|
|
|
--with-our-malloc
|
|
|
|
--enable-threads
|
|
|
|
--with-combined-threads
|
|
|
|
--with-incoming-stack-boundary=2
|
|
|
|
--enable-sse2
|
|
|
|
--enable-avx
|
|
|
|
--enable-avx2
|
|
|
|
)
|
|
|
|
|
2021-05-14 02:52:29 +00:00
|
|
|
if [[ $TARGET == win* || $TARGET == linux* ]]; then
|
2020-10-30 15:14:11 +00:00
|
|
|
myconf+=(
|
|
|
|
--host="$FFBUILD_TOOLCHAIN"
|
|
|
|
)
|
2021-05-14 02:52:29 +00:00
|
|
|
else
|
2020-10-30 15:14:11 +00:00
|
|
|
echo "Unknown target"
|
|
|
|
return -1
|
|
|
|
fi
|
|
|
|
|
|
|
|
./configure "${myconf[@]}"
|
|
|
|
make -j$(nproc)
|
|
|
|
make install
|
|
|
|
}
|