configure.ac: Add --enable-64-bit-words option

The old 32 bit words the default which can be overridded with this
configure option.
This commit is contained in:
Erik de Castro Lopo 2016-01-04 11:29:03 +11:00
parent 6cc1cbad2c
commit a3224c0434
4 changed files with 12 additions and 3 deletions

View File

@ -269,6 +269,15 @@ AC_ARG_ENABLE(werror,
AC_ARG_ENABLE(stack-smash-protection,
AC_HELP_STRING([--enable-stack-smash-protection], [Enable GNU GCC stack smash protection]))
AC_ARG_ENABLE(64-bit-words,
AC_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)])
else
AC_DEFINE_UNQUOTED([ENABLE_64_BIT_WORDS],0)
fi
AC_SUBST(ENABLE_64_BIT_WORDS)
AC_ARG_ENABLE(valgrind-testing,
AC_HELP_STRING([--enable-valgrind-testing], [Run all tests inside Valgrind]),
[case "${enableval}" in

View File

@ -49,7 +49,7 @@
/* WATCHOUT: there are a few places where the code will not work unless brword is >= 32 bits wide */
/* also, some sections currently only have fast versions for 4 or 8 bytes per word */
#if 1
#if (ENABLE_64_BIT_WORDS == 0)
typedef FLAC__uint32 brword;
#define FLAC__BYTES_PER_WORD 4 /* sizeof brword */

View File

@ -48,7 +48,7 @@
/* WATCHOUT: if you change this you must also change the following #defines down to SWAP_BE_WORD_TO_HOST below to match */
/* WATCHOUT: there are a few places where the code will not work unless bwword is >= 32 bits wide */
#if 1
#if (ENABLE_64_BIT_WORDS == 0)
typedef FLAC__uint32 bwword;
#define FLAC__BYTES_PER_WORD 4 /* sizeof bwword */

View File

@ -33,7 +33,7 @@
* the definition here to get at the internals. Make sure this is kept up
* to date with what is in ../libFLAC/bitwriter.c
*/
#if 1
#if (ENABLE_64_BIT_WORDS == 0)
typedef FLAC__uint32 bwword;
#define FLAC__BYTES_PER_WORD 4