25-fftw3.sh 956 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #!/bin/bash
  2. SCRIPT_REPO="https://github.com/FFTW/fftw3.git"
  3. SCRIPT_COMMIT="187045ea647ba19c55db5f503d11bd811ee6b56e"
  4. ffbuild_enabled() {
  5. return 0
  6. }
  7. ffbuild_dockerbuild() {
  8. local myconf=(
  9. --prefix="$FFBUILD_PREFIX"
  10. --enable-maintainer-mode
  11. --disable-shared
  12. --enable-static
  13. --disable-fortran
  14. --disable-doc
  15. --with-our-malloc
  16. --enable-threads
  17. --with-combined-threads
  18. --with-incoming-stack-boundary=2
  19. )
  20. if [[ $TARGET != *arm64 ]]; then
  21. myconf+=(
  22. --enable-sse2
  23. --enable-avx
  24. --enable-avx2
  25. )
  26. fi
  27. if [[ $TARGET == win* || $TARGET == linux* ]]; then
  28. myconf+=(
  29. --host="$FFBUILD_TOOLCHAIN"
  30. )
  31. else
  32. echo "Unknown target"
  33. return -1
  34. fi
  35. sed -i 's/windows.h/process.h/' configure.ac
  36. ./bootstrap.sh "${myconf[@]}"
  37. make -j$(nproc)
  38. make install
  39. }