@@ -95,7 +95,7 @@ AC_ARG_ENABLE(endomorphism,
9595AC_ARG_WITH ( [ field] , [ AS_HELP_STRING ( [ --with-field=gmp|64bit|64bit_asm|32bit|auto] ,
9696[ Specify Field Implementation. Default is auto] ) ] ,[ req_field=$withval] , [ req_field=auto] )
9797
98- AC_ARG_WITH ( [ bignum] , [ AS_HELP_STRING ( [ --with-bignum=gmp|auto] ,
98+ AC_ARG_WITH ( [ bignum] , [ AS_HELP_STRING ( [ --with-bignum=gmp|none| auto] ,
9999[ Specify Bignum Implementation. Default is auto] ) ] ,[ req_bignum=$withval] , [ req_bignum=auto] )
100100
101101AC_ARG_WITH ( [ scalar] , [ AS_HELP_STRING ( [ --with-scalar=64bit|32bit|auto] ,
@@ -179,16 +179,15 @@ if test x"$req_bignum" = x"auto"; then
179179 fi
180180
181181 if test x"$set_bignum" = x; then
182- AC_MSG_ERROR ( [ no working bignum implementation found ] )
182+ set_bignum=none
183183 fi
184184else
185185 set_bignum=$req_bignum
186186 case $set_bignum in
187187 gmp)
188188 SECP_GMP_CHECK
189189 ;;
190- openssl)
191- SECP_OPENSSL_CHECK
190+ none)
192191 ;;
193192 *)
194193 AC_MSG_ERROR ( [ invalid bignum implementation selection] )
@@ -221,11 +220,16 @@ esac
221220# select bignum implementation
222221case $set_bignum in
223222gmp)
224- AC_DEFINE ( HAVE_LIBGMP ,1 , [ Define this symbol if libgmp is installed] )
225- AC_DEFINE ( USE_NUM_GMP , 1 , [ Define this symbol to use the gmp implementation] )
223+ AC_DEFINE ( HAVE_LIBGMP , 1 , [ Define this symbol if libgmp is installed] )
224+ AC_DEFINE ( USE_NUM_GMP , 1 , [ Define this symbol to use the gmp implementation for num ] )
226225 AC_DEFINE ( USE_FIELD_INV_NUM , 1 , [ Define this symbol to use the num-based field inverse implementation] )
227226 AC_DEFINE ( USE_SCALAR_INV_NUM , 1 , [ Define this symbol to use the num-based scalar inverse implementation] )
228227 ;;
228+ none)
229+ AC_DEFINE ( USE_NUM_NONE , 1 , [ Define this symbol to use no num implementation] )
230+ AC_DEFINE ( USE_FIELD_INV_BUILTIN , 1 , [ Define this symbol to use the native field inverse implementation] )
231+ AC_DEFINE ( USE_SCALAR_INV_BUILTIN , 1 , [ Define this symbol to use the native scalar inverse implementation] )
232+ ;;
229233*)
230234 AC_MSG_ERROR ( [ invalid bignum implementation] )
231235 ;;
@@ -266,6 +270,9 @@ if test x"$set_field" = x"gmp" || test x"$set_bignum" = x"gmp"; then
266270fi
267271
268272if test x"$use_endomorphism" = x"yes"; then
273+ if test x"$set_bignum" = x"none"; then
274+ AC_MSG_ERROR ( [ Cannot use endomorphism optimization without a bignum implementation] )
275+ fi
269276 AC_DEFINE ( USE_ENDOMORPHISM , 1 , [ Define this symbol to use endomorphism] )
270277fi
271278
0 commit comments