secp256k1
secp256k1 copied to clipboard
feat(build): add autoreconf dependency check
Add check for autoreconf dependency to autogen.sh and refactor -if to long forms of optional arguments.
Impact
- Add a functional change to improves error handling to provide a more helpful message if autoreconf is not found.
- Add a non-functional refactor to change the autoreconf optional arguments from -if to --install --force.
- These changes align with the format of autogen.sh on the bitcoin repo
Background
10 years ago: Created the entire file with no other updates.
- Add a functional change to improves error handling to provide a more helpful message if autoreconf is not found.
On my system, the current error message is already quite descriptive:
$ ./autogen.sh
./autogen.sh: 3: autoreconf: not found
the current error message is already quite descriptive
I agree, but the error message could be made even more helpful for those less familiar with the build process.
Since autoreconf is a part of the autoconf package, directing users to install autoconf (rather than just indicating that autoreconf is missing) makes it clearer which package to install.
autoconf is named consistently across popular Unix-based package managers, so this saves a step for users who try to install autoreconf:
apt-get install autoconf
dnf install autoconf
pacman -S autoconf
install autoconf
zypper install autoconf
apk add autoconf
nix-env -iA nixpkgs.autoconf
emerge dev-util/autoconf
the current error message is already quite descriptive
I agree, but the error message could be made even more helpful for those less familiar with the build process.
Since
autoreconfis a part of theautoconfpackage, directing users to installautoconf(rather than just indicating thatautoreconfis missing) makes it clearer which package to install.
autoconfis named consistently across popular Unix-based package managers, so this saves a step for users who try to installautoreconf:apt-get install autoconf dnf install autoconf pacman -S autoconf install autoconf zypper install autoconf apk add autoconf nix-env -iA nixpkgs.autoconf emerge dev-util/autoconf
The suggested approach is incomplete. Wouldn't it be better to document build prerequisites, which also include automake, libtool, etc?
The suggested approach is incomplete. Wouldn't it be better to document build prerequisites, which also include
automake,libtool, etc?
Yes, I think so, and this should probably simply go to the README then.