diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index 69535243..54108fa5 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -19,12 +19,12 @@ jobs: macos-latest-clang-autotools, macos-latest-clang-cmake, windows-latest-cmake, - ubuntu-latest-gcc-autotools-64-bit-words, - ubuntu-latest-clang-autotools-64-bit-words, - ubuntu-latest-gcc-cmake-64-bit-words, - ubuntu-latest-clang-cmake-64-bit-words, - macos-latest-clang-autotools-64-bit-words, - macos-latest-clang-cmake-64-bit-words + ubuntu-latest-gcc-autotools-32-bit-words, + ubuntu-latest-clang-autotools-32-bit-words, + ubuntu-latest-gcc-cmake-32-bit-words, + ubuntu-latest-clang-cmake-32-bit-words, + macos-latest-clang-autotools-32-bit-words, + macos-latest-clang-cmake-32-bit-words ] include: - name: ubuntu-latest-gcc-autotools @@ -79,47 +79,47 @@ jobs: build-system: cmake configure-opts: '-DBUILD_SHARED_LIBS=ON' - - name: ubuntu-latest-gcc-autotools-64-bit-words + - name: ubuntu-latest-gcc-autotools-32-bit-words os: ubuntu-latest cc: gcc cxx: g++ build-system: autotools - configure-opts: --enable-64-bit-words + configure-opts: --disable-64-bit-words - - name: ubuntu-latest-clang-autotools-64-bit-words + - name: ubuntu-latest-clang-autotools-32-bit-words os: ubuntu-latest cc: clang cxx: clang++ build-system: autotools - configure-opts: --enable-64-bit-words + configure-opts: --disable-64-bit-words - - name: ubuntu-latest-gcc-cmake-64-bit-words + - name: ubuntu-latest-gcc-cmake-32-bit-words os: ubuntu-latest cc: gcc cxx: g++ build-system: cmake - configure-opts: -DENABLE_64_BIT_WORDS=ON + configure-opts: -DENABLE_64_BIT_WORDS=OFF - - name: ubuntu-latest-clang-cmake-64-bit-words + - name: ubuntu-latest-clang-cmake-32-bit-words os: ubuntu-latest cc: clang cxx: clang++ build-system: cmake - configure-opts: -DENABLE_64_BIT_WORDS=ON + configure-opts: -DENABLE_64_BIT_WORDS=OFF - - name: macos-latest-clang-autotools-64-bit-words + - name: macos-latest-clang-autotools-32-bit-words os: macos-latest cc: clang cxx: clang++ build-system: autotools - configure-opts: --enable-64-bit-words + configure-opts: --disable-64-bit-words - - name: macos-latest-clang-cmake-64-bit-words + - name: macos-latest-clang-cmake-32-bit-words os: macos-latest cc: clang cxx: clang++ build-system: cmake - configure-opts: -DENABLE_64_BIT_WORDS=ON + configure-opts: -DENABLE_64_BIT_WORDS=OFF runs-on: ${{ matrix.os }} diff --git a/.travis.yml b/.travis.yml index f635bad3..a4de8301 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,7 +26,7 @@ jobs: dist: focal arch: arm64 compiler: gcc - env: BUILD_SYSTEM="cmake" CONFIGURE_OPTS=-DENABLE_64_BIT_WORDS=ON + env: BUILD_SYSTEM="cmake" CONFIGURE_OPTS=-DENABLE_64_BIT_WORDS=OFF - os: linux dist: focal arch: ppc64le @@ -51,7 +51,7 @@ jobs: dist: focal arch: ppc64le compiler: gcc - env: BUILD_SYSTEM="cmake" CONFIGURE_OPTS=-DENABLE_64_BIT_WORDS=ON + env: BUILD_SYSTEM="cmake" CONFIGURE_OPTS=-DENABLE_64_BIT_WORDS=OFF install: - if [ $TRAVIS_OS_NAME = linux ]; then sudo apt-get -y install libtool-bin libogg-dev; fi diff --git a/configure.ac b/configure.ac index 6842b8ff..5358fa8f 100644 --- a/configure.ac +++ b/configure.ac @@ -265,12 +265,12 @@ esac AC_ARG_ENABLE(64-bit-words, - AS_HELP_STRING([--enable-64-bit-words],[Set FLAC__BYTES_PER_WORD to 8 (4 is the default)])) -if test "x$enable_64_bit_words" = xyes ; then - AC_DEFINE_UNQUOTED([ENABLE_64_BIT_WORDS],1,[Set FLAC__BYTES_PER_WORD to 8 (4 is the default)]) + AS_HELP_STRING([--disable-64-bit-words],[Set FLAC__BYTES_PER_WORD to 4 (8 is the default)])) +if test "x$enable_64_bit_words" = xno ; then + AC_DEFINE_UNQUOTED([ENABLE_64_BIT_WORDS],0,[Set FLAC__BYTES_PER_WORD to 8 (this is the default)]) else - AC_DEFINE_UNQUOTED([ENABLE_64_BIT_WORDS],0) - fi + AC_DEFINE_UNQUOTED([ENABLE_64_BIT_WORDS],1) +fi AC_SUBST(ENABLE_64_BIT_WORDS) AC_ARG_ENABLE(valgrind-testing, diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 97e397aa..262feead 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.11) -option(ENABLE_64_BIT_WORDS "Set FLAC__BYTES_PER_WORD to 8 (4 is the default)" OFF) +option(ENABLE_64_BIT_WORDS "Set FLAC__BYTES_PER_WORD to 8, for 64-bit machines. For 32-bit machines, turning this off might give a tiny speed improvement" ON) option(BUILD_UTILS "Build utils" OFF) add_subdirectory("libFLAC")