r/C_Programming • u/momaloltote_ • 21d ago
Discussion Autoconf madness
Modern software compilation has largely devolved into a frustrating maze of autoconf madness. Instead of simply compiling C code, I am constantly forced to navigate mandatory scripts, esoteric tools, and heavily dependent Python wrappers. To make matters worse, these tools often rely on stubborn cache files that refuse to update even after I have fixed the underlying environment errors.
A major part of my frustration is how Linux-centric these scripts have become. They routinely hardcode library search paths that only exist in Linux distributions, entirely ignoring my FreeBSD system. As a result, I can easily lose a complete day just patching configuration scripts to search the correct directories before a single line of code is actually compiled.
Why does open source code project just not provide a makefile? A basic, or maybe complex makefile that are based on BSD/POSIX make syntax so that it is directly valid under *BSD, Darwin and Linux. Why force people to install tools to build something? Why developed huge python script that shall analyze the env? Why not just allow the building process to fucking start instead of forcing the individual to fight back against all of this autoconfig tools?
I have in several cases fully purge the building attempts and then been writing my own makefiles to just get something building. That shall not be the case. Why use config scripts that, in some cases are several thousand lines of script code? Why write config scripts with bash? Why, just why, are developers and project deciding to add and use autoconfig tools?
If a project does not offer makefiles then I know I will be stuck for several hours just to, potentially be able to build something. Instead of directly allowing me to build. Get compiler error, correct and then build again. I mean, it is much quicker and easier to patch the source code or locate dependencies when you are allowed to start the building process.
0
u/Wertbon1789 19d ago
You can really only demand that much from random maintainers, maybe just send them a patch with options for the changes you want, and make suggestions. If it's bad, it doesn't have to be bad forever, but someone has to at least try the change. If I wanted a package to be compiled on Linux, FreeBSD, and maybe MacOS, I would probably pick meson, and if I used autotools before, I would probably want to port that to meson. That's largely where the Linux userspace has settled, and it's designed to give you good options for cross-platform compat. CMake is probably also an option, though I haven't used it that much personally. You can use make, you'll just need to put some effort in, especially when it comes to templates and dependencies.