@@ -915,7 +915,7 @@ static const bench_pq_alg bench_pq_asym_opt[] = {
915915 { NULL , 0 , NULL }
916916};
917917
918- #ifdef HAVE_LIBOQS
918+ #if defined( HAVE_LIBOQS ) && defined( HAVE_SPHINCS )
919919/* All recognized post-quantum asymmetric algorithm choosing command line
920920 * options. (Part 2) */
921921static const bench_pq_alg bench_pq_asym_opt2 [] = {
@@ -934,7 +934,7 @@ static const bench_pq_alg bench_pq_asym_opt2[] = {
934934 OQS_SIG_alg_sphincs_shake_256s_simple },
935935 { NULL , 0 , NULL }
936936};
937- #endif /* HAVE_LIBOQS */
937+ #endif /* HAVE_LIBOQS && HAVE_SPHINCS */
938938#endif /* HAVE_PQC */
939939
940940#ifdef HAVE_WNR
@@ -10357,10 +10357,10 @@ static void Usage(void)
1035710357#if defined(HAVE_PQC ) && defined(HAVE_LIBOQS )
1035810358 for (i = 0 ; bench_pq_asym_opt [i ].str != NULL ; i ++ )
1035910359 print_alg (bench_pq_asym_opt [i ].str , & line );
10360- #if defined(HAVE_LIBOQS )
10360+ #if defined(HAVE_LIBOQS ) && defined( HAVE_SPHINCS )
1036110361 for (i = 0 ; bench_pq_asym_opt2 [i ].str != NULL ; i ++ )
1036210362 print_alg (bench_pq_asym_opt2 [i ].str , & line );
10363- #endif /* HAVE_LIBOQS */
10363+ #endif /* HAVE_LIBOQS && HAVE_SPHINCS */
1036410364#endif /* HAVE_PQC */
1036510365#if defined(WOLFSSL_HAVE_LMS )
1036610366 for (i = 0 ; bench_pq_hash_sig_opt [i ].str != NULL ; i ++ )
@@ -10601,6 +10601,7 @@ int wolfcrypt_benchmark_main(int argc, char** argv)
1060110601 optMatched = 1 ;
1060210602 }
1060310603 }
10604+ #ifdef HAVE_SPHINCS
1060410605 /* Both bench_pq_asym_opt and bench_pq_asym_opt2 are looking for
1060510606 * -pq, so we need to do a special case for -pq since optMatched
1060610607 * was set to 1 just above. */
@@ -10616,6 +10617,7 @@ int wolfcrypt_benchmark_main(int argc, char** argv)
1061610617 optMatched = 1 ;
1061710618 }
1061810619 }
10620+ #endif
1061910621 #endif /* HAVE_PQC */
1062010622 /* Other known cryptographic algorithms */
1062110623 for (i = 0 ; !optMatched && bench_other_opt [i ].str != NULL ; i ++ ) {
0 commit comments