Skip to content

Commit 1b0ef04

Browse files
committed
configure.ac: move handling for enable-all-asm to precede handling for enable-all-crypto, and compute DEFAULT_ENABLED_ALL_ASM appropriately.
1 parent 430d104 commit 1b0ef04

1 file changed

Lines changed: 68 additions & 65 deletions

File tree

configure.ac

Lines changed: 68 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -928,9 +928,76 @@ then
928928
fi
929929

930930

931+
# Auto-selected activation of all applicable asm accelerations
932+
if test "$enable_all_crypto" = "yes" &&
933+
test "$ENABLED_LINUXKM_DEFAULTS" = "no" &&
934+
test "$ENABLED_ASM" != "no" &&
935+
test "$enable_sp_asm" != "no" &&
936+
test "$enable_intelasm" != "no" &&
937+
test "$enable_armasm" != "no"
938+
then
939+
DEFAULT_ENABLED_ALL_ASM=yes
940+
else
941+
DEFAULT_ENABLED_ALL_ASM=no
942+
fi
943+
944+
AC_ARG_ENABLE([all-asm],
945+
[AS_HELP_STRING([--enable-all-asm],[Enable all applicable assembly accelerations (default: disabled)])],
946+
[ ENABLED_ALL_ASM=$enableval ],
947+
[ ENABLED_ALL_ASM=$DEFAULT_ENABLED_ALL_ASM ]
948+
)
949+
950+
if test "$ENABLED_ALL_ASM" != "no"
951+
then
952+
if test "$ENABLED_ASM" = "no"
953+
then
954+
AC_MSG_ERROR([--enable-all-asm is incompatible with --disable-asm])
955+
fi
956+
957+
if test "$enable_sp_asm" = "no"
958+
then
959+
AC_MSG_ERROR([--enable-all-asm is incompatible with --disable-sp-asm])
960+
fi
961+
962+
if test "$enable_intelasm" = "no"
963+
then
964+
AC_MSG_ERROR([--enable-all-asm is incompatible with --disable-intelasm])
965+
fi
966+
967+
if test "$enable_armasm" = "no"
968+
then
969+
AC_MSG_ERROR([--enable-all-asm is incompatible with --disable-armasm])
970+
fi
971+
972+
if test "$ENABLED_SP" != "no"
973+
then
974+
ENABLED_SP_ASM=yes
975+
if test "$ENABLED_SP" = ""
976+
then
977+
ENABLED_SP=yes
978+
fi
979+
fi
980+
981+
case "$host_cpu" in
982+
*x86_64*|*amd64*)
983+
if test "$enable_intelasm" = ""
984+
then
985+
enable_intelasm=yes
986+
fi
987+
;;
988+
*aarch64*|*arm*|*cortex*)
989+
if test "$enable_armasm" = ""
990+
then
991+
enable_armasm=yes
992+
fi
993+
;;
994+
esac
995+
fi
996+
997+
931998
# ALL CRYPTO FEATURES
932999
AC_ARG_ENABLE([all-crypto],
933-
[AS_HELP_STRING([--enable-all-crypto],[Enable all available wolfcrypt algorithm support (default: disabled)])],
1000+
[AS_HELP_STRING([--enable-all-crypto],[Enable all wolfcrypt algorithms (default: disabled)])],
9341001
[ ENABLED_ALL_CRYPT=$enableval ],
9351002
[ ENABLED_ALL_CRYPT=no ]
9361003
)
@@ -1053,15 +1120,6 @@ then
10531120

10541121
# Store issuer name components when parsing certificates.
10551122
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_HAVE_ISSUER_NAMES"
1056-
1057-
# enable all applicable assembly accelerations
1058-
if test "$ENABLED_ASM" != "no" &&
1059-
test "$enable_sp_asm" != "no" &&
1060-
test "$enable_all_asm" = "" &&
1061-
test "$ENABLED_LINUXKM_DEFAULTS" = "no"
1062-
then
1063-
enable_all_asm=yes
1064-
fi
10651123
fi
10661124

10671125
# liboqs
@@ -2750,61 +2808,6 @@ then
27502808
fi
27512809

27522810

2753-
# Auto-selected activation of all applicable asm accelerations
2754-
AC_ARG_ENABLE([all-asm],
2755-
[AS_HELP_STRING([--enable-all-asm],[Enable all applicable assembly accelerations (default: disabled)])],
2756-
[ ENABLED_ALL_ASM=$enableval ],
2757-
[ ENABLED_ALL_ASM=no ]
2758-
)
2759-
2760-
if test "$ENABLED_ALL_ASM" != "no"
2761-
then
2762-
if test "$ENABLED_ASM" = "no"
2763-
then
2764-
AC_MSG_ERROR([--enable-all-asm is incompatible with --disable-asm])
2765-
fi
2766-
2767-
if test "$enable_sp_asm" = "no"
2768-
then
2769-
AC_MSG_ERROR([--enable-all-asm is incompatible with --disable-sp-asm])
2770-
fi
2771-
2772-
if test "$enable_intelasm" = "no"
2773-
then
2774-
AC_MSG_ERROR([--enable-all-asm is incompatible with --disable-intelasm])
2775-
fi
2776-
2777-
if test "$enable_armasm" = "no"
2778-
then
2779-
AC_MSG_ERROR([--enable-all-asm is incompatible with --disable-armasm])
2780-
fi
2781-
2782-
if test "$ENABLED_SP" != "no"
2783-
then
2784-
ENABLED_SP_ASM=yes
2785-
if test "$ENABLED_SP" = ""
2786-
then
2787-
ENABLED_SP=yes
2788-
fi
2789-
fi
2790-
2791-
case "$host_cpu" in
2792-
*x86_64*|*amd64*)
2793-
if test "$enable_intelasm" = ""
2794-
then
2795-
enable_intelasm=yes
2796-
fi
2797-
;;
2798-
*aarch64*|*arm*|*cortex*)
2799-
if test "$enable_armasm" = ""
2800-
then
2801-
enable_armasm=yes
2802-
fi
2803-
;;
2804-
esac
2805-
fi
2806-
2807-
28082811
ENABLED_ARMASM_INLINE="no"
28092812
ENABLED_ARMASM_SHA3="no"
28102813
ENABLED_ARMASM_CRYPTO_SM4="no"

0 commit comments

Comments
 (0)