This simplifies manual builds and solves one item in #929.
Manual compilation now:
0gcc -O2 -c src/secp256k1.c src/precomputed_*.c
1ar rcs libsecp256k1.a secp256k1.o precomputed_*.o
The second commit will make debugging the config easier when passing -DCONFIG_DEBUG
. It currently only prints the ECMULT_*
variables but we could use it for WIDEMUL
and also synthetic int128 stuff in the future after #1000 is merge. The logic there is more complex than simply falling back to a default value.
But I’m happy to drop that commit if people don’t like this or think it’s overkill.
edit: The third commit removes basic-config.h which is now definitively not necessary anymore because we have default values.
My long-term plan is to get rid of the config header “src/libsecp256k1-config.h” currently generated by autotools and simply let autotools pass all config macros via -D
switches. Generated header files are annoying, and could then also be avoided in #1113. See #1113 (comment) for more context.