2 ms·
If you redid all that work, and managed to avoid m4, it would still be a win! I believe m4 was used because some Unix shells at the time did not have functions
by chubot 3y ago
If you redid all that work, and managed to avoid m4, it would still be a win!
I believe m4 was used because some Unix shells at the time did not have functions. All shells have functions now -- it's in POSIX.
If you have shell functions, then you can have modularity without concatenating blocks of code. You can make a library of functions, and then allow people to reuse them.
It could just be
source lib_configure.sh
detect_foo
detect_bar
etc.
POSIX shell can do everything that m4 can, and it's MORE deployed, not less. (Related: some people missed that m4 never runs on the end user machine which compiles the source code -- only on the machine that makes the tarball from the repo.)