--- configure.ac | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-)
diff --git a/configure.ac b/configure.ac index 49db7af1..6db3fc42 100644 --- a/configure.ac +++ b/configure.ac @@ -322,6 +322,17 @@ case "$host_cpu" in AC_TRY_COMPILE([ #if defined(__sgi) && defined(__LP64__) #error 64-bit mips +#endif + ], [], [ + ABI=32 + ], [ + ABI=64 + ]) + ;; + powerpc*) + AC_TRY_COMPILE([ +#if defined(__PPC64__) +#error 64-bit powerpc #endif ], [], [ ABI=32 @@ -438,13 +449,15 @@ if test "x$enable_assembler" = xyes ; then fi fi ;; - *powerpc64*) - if test "x$enable_fat" = xyes ; then - asm_path="powerpc64/fat powerpc64" - OPT_NETTLE_SOURCES="fat-ppc.c $OPT_NETTLE_SOURCES" - else - if test "x$enable_power_crypto_ext" = xyes ; then - asm_path="powerpc64/P8 powerpc64" + powerpc*) + if test "$ABI" = 64 ; then + if test "x$enable_fat" = xyes ; then + asm_path="powerpc64/fat powerpc64" + OPT_NETTLE_SOURCES="fat-ppc.c $OPT_NETTLE_SOURCES" + else + if test "x$enable_power_crypto_ext" = xyes ; then + asm_path="powerpc64/p8 powerpc64" + fi fi fi ;;