@@ -114,49 +114,54 @@ SECP_TRY_APPEND_DEFAULT_CFLAGS(SECP_CFLAGS)
114114# ## Define config arguments
115115# ##
116116
117+ #  In dev mode, we enable all binaries and modules by default but individual options can still be overridden explicitly.
118+ #  Check for dev mode first because SECP_SET_DEFAULT needs enable_dev_mode set.
119+ AC_ARG_ENABLE ( dev_mode , [ ] [ ] 
120+     [ enable_dev_mode=no] ) 
121+ 
117122AC_ARG_ENABLE ( benchmark ,
118123    AS_HELP_STRING ( [ --enable-benchmark] [ compile benchmark [ default=yes] ] ) , [ ] 
119-     [ enable_benchmark= yes] ) 
124+     [ SECP_SET_DEFAULT( [ enable_benchmark] ,  [ yes] ,  [ yes ] ) ] ) 
120125
121126AC_ARG_ENABLE ( coverage ,
122127    AS_HELP_STRING ( [ --enable-coverage] [ enable compiler flags to support kcov coverage analysis [ default=no] ] ) , [ ] 
123-     [ enable_coverage=no ] ) 
128+     [ SECP_SET_DEFAULT( [ enable_coverage] ,  [ no ] ,  [ no ] ) ] ) 
124129
125130AC_ARG_ENABLE ( tests ,
126131    AS_HELP_STRING ( [ --enable-tests] [ compile tests [ default=yes] ] ) , [ ] 
127-     [ enable_tests= yes] ) 
132+     [ SECP_SET_DEFAULT( [ enable_tests] ,  [ yes] ,  [ yes ] ) ] ) 
128133
129134AC_ARG_ENABLE ( experimental ,
130135    AS_HELP_STRING ( [ --enable-experimental] [ allow experimental configure options [ default=no] ] ) , [ ] 
131-     [ enable_experimental=no ] ) 
136+     [ SECP_SET_DEFAULT( [ enable_experimental] ,  [ no ] ,  [ yes ] ) ] ) 
132137
133138AC_ARG_ENABLE ( exhaustive_tests ,
134139    AS_HELP_STRING ( [ --enable-exhaustive-tests] [ compile exhaustive tests [ default=yes] ] ) , [ ] 
135-     [ enable_exhaustive_tests= yes] ) 
140+     [ SECP_SET_DEFAULT( [ enable_exhaustive_tests] ,  [ yes] ,  [ yes ] ) ] ) 
136141
137142AC_ARG_ENABLE ( examples ,
138143    AS_HELP_STRING ( [ --enable-examples] [ compile the examples [ default=no] ] ) , [ ] 
139-     [ enable_examples=no ] ) 
144+     [ SECP_SET_DEFAULT( [ enable_examples] ,  [ no ] ,  [ yes ] ) ] ) 
140145
141146AC_ARG_ENABLE ( module_ecdh ,
142147    AS_HELP_STRING ( [ --enable-module-ecdh] [ enable ECDH shared secret computation] ) , [ ] 
143-     [ enable_module_ecdh=no ] ) 
148+     [ SECP_SET_DEFAULT( [ enable_module_ecdh] ,  [ no ] ,  [ yes ] ) ] ) 
144149
145150AC_ARG_ENABLE ( module_recovery ,
146151    AS_HELP_STRING ( [ --enable-module-recovery] [ enable ECDSA pubkey recovery module [ default=no] ] ) , [ ] 
147-     [ enable_module_recovery=no ] ) 
152+     [ SECP_SET_DEFAULT( [ enable_module_recovery] ,  [ no ] ,  [ yes ] ) ] ) 
148153
149154AC_ARG_ENABLE ( module_extrakeys ,
150155    AS_HELP_STRING ( [ --enable-module-extrakeys] [ enable extrakeys module (experimental)] ) , [ ] 
151-     [ enable_module_extrakeys=no ] ) 
156+     [ SECP_SET_DEFAULT( [ enable_module_extrakeys] ,  [ no ] ,  [ yes ] ) ] ) 
152157
153158AC_ARG_ENABLE ( module_schnorrsig ,
154159    AS_HELP_STRING ( [ --enable-module-schnorrsig] [ enable schnorrsig module (experimental)] ) , [ ] 
155-     [ enable_module_schnorrsig=no ] ) 
160+     [ SECP_SET_DEFAULT( [ enable_module_schnorrsig] ,  [ no ] ,  [ yes ] ) ] ) 
156161
157162AC_ARG_ENABLE ( external_default_callbacks ,
158163    AS_HELP_STRING ( [ --enable-external-default-callbacks] [ enable external default callback functions [ default=no] ] ) , [ ] 
159-     [ enable_external_default_callbacks=no ] ) 
164+     [ SECP_SET_DEFAULT( [ enable_external_default_callbacks] ,  [ no ] ,  [ no ] ) ] ) 
160165
161166#  Test-only override of the (autodetected by the C code) "widemul" setting.
162167#  Legal values are int64 (for [u]int64_t), int128 (for [unsigned] __int128), and auto (the default).
0 commit comments