diff --git a/bootstrap.sh b/bootstrap.sh index f81f133..beb49f0 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -94,13 +94,33 @@ build_waf lv2 "${LV2_VERSION}" "--lv2dir=${PAWPAW_PREFIX}/lib/lv2" # --------------------------------------------------------------------------------------------------------------------- # fftw +FFTW_EXTRAFLAGS="--enable-sse2 --disable-debug --disable-alloca --disable-doc --disable-fortran --with-our-malloc" + +# if [ "${WIN32}" -eq 0 ]; then +# FFTW_EXTRAFLAGS="${FFTW_EXTRAFLAGS} --enable-threads" +# fi + download fftw "${FFTW_VERSION}" "http://www.fftw.org" -build_autoconf fftw "${FFTW_VERSION}" "--enable-sse2 --disable-debug --disable-alloca --disable-fortran --with-our-malloc" + +if [ "${MACOS_OLD}" -eq 1 ]; then + patch_file fftw "${FFTW_VERSION}" "configure" 's/CFLAGS="$CFLAGS -Wl,-no_compact_unwind"/CFLAGS="$CFLAGS"/' + patch_file fftw "${FFTW_VERSION}" "libbench2/timer.c" 's/#if defined(HAVE_GETTIMEOFDAY) && !defined(HAVE_TIMER)/#ifndef HAVE_TIMER/' +fi + +build_autoconf fftw "${FFTW_VERSION}" "${FFTW_EXTRAFLAGS}" # --------------------------------------------------------------------------------------------------------------------- # fftwf -copy_download fftw fftwf "${FFTW_VERSION}" -build_autoconf fftwf "${FFTW_VERSION}" "--enable-single --enable-sse2 --disable-debug --disable-alloca --disable-fortran --with-our-malloc" +FFTWF_EXTRAFLAGS="${FFTW_EXTRAFLAGS} --enable-single" + +copy_download fftw fftwf "${FFTW_VERSION}" + +if [ "${MACOS_OLD}" -eq 1 ]; then + patch_file fftwf "${FFTW_VERSION}" "configure" 's/CFLAGS="$CFLAGS -Wl,-no_compact_unwind"/CFLAGS="$CFLAGS"/' + patch_file fftwf "${FFTW_VERSION}" "libbench2/timer.c" 's/#if defined(HAVE_GETTIMEOFDAY) && !defined(HAVE_TIMER)/#ifndef HAVE_TIMER/' +fi + +build_autoconf fftwf "${FFTW_VERSION}" "${FFTWF_EXTRAFLAGS}" # --------------------------------------------------------------------------------------------------------------------- diff --git a/setup/env.sh b/setup/env.sh index 827c82c..53ff91d 100644 --- a/setup/env.sh +++ b/setup/env.sh @@ -50,6 +50,7 @@ BUILD_FLAGS="${BUILD_FLAGS} -fdata-sections -ffunction-sections -fno-common -fvi if [ "${MACOS}" -eq 1 ]; then if [ "${MACOS_OLD}" -eq 1 ]; then BUILD_FLAGS="${BUILD_FLAGS} -mmacosx-version-min=10.5" + # BUILD_FLAGS="${BUILD_FLAGS} -I/usr/lib/apple/SDKs/MacOSX10.5.sdk/usr/include" else BUILD_FLAGS="${BUILD_FLAGS} -mmacosx-version-min=10.8 -stdlib=libc++ -Wno-deprecated-declarations" fi @@ -69,8 +70,11 @@ LINK_FLAGS="${LINK_FLAGS} -fdata-sections -ffunction-sections" if [ "${MACOS}" -eq 1 ]; then LINK_FLAGS="${LINK_FLAGS} -Wl,-dead_strip -Wl,-dead_strip_dylibs" - if [ "${MACOS_OLD}" -ne 1 ]; then - LINK_FLAGS="${LINK_FLAGS} -stdlib=libc++" + if [ "${MACOS_OLD}" -eq 1 ]; then + LINK_FLAGS="${LINK_FLAGS} -mmacosx-version-min=10.5" + # LINK_FLAGS="${LINK_FLAGS} -L/usr/lib/apple/SDKs/MacOSX10.5.sdk/usr/lib" + else + LINK_FLAGS="${LINK_FLAGS} -mmacosx-version-min=10.8 -stdlib=libc++" fi else LINK_FLAGS="${LINK_FLAGS} -Wl,-O1 -Wl,--as-needed -Wl,--gc-sections -Wl,--no-undefined -Wl,--strip-all" diff --git a/setup/functions.sh b/setup/functions.sh index 11f2733..7e3ff73 100644 --- a/setup/functions.sh +++ b/setup/functions.sh @@ -122,7 +122,7 @@ function build_autoconf() { if [ ! -f "${pkgdir}/.stamp_configured" ]; then pushd "${pkgdir}" - ./configure --enable-static --disable-shared --prefix="${PAWPAW_PREFIX}" ${extraconfrules} + ./configure --enable-static --disable-shared --disable-maintainer-mode --prefix="${PAWPAW_PREFIX}" ${extraconfrules} touch .stamp_configured popd fi @@ -335,7 +335,7 @@ function build_host_autoconf() { if [ ! -f "${pkgdir}/.stamp_configured" ]; then pushd "${pkgdir}" - ./configure --enable-static --disable-shared --prefix="${PAWPAW_PREFIX}" ${extraconfrules} + ./configure --enable-static --disable-shared --disable-maintainer-mode --prefix="${PAWPAW_PREFIX}" ${extraconfrules} touch .stamp_configured popd fi