---

developerWorks: Debugging Configure: What To Do When Programs Won’t Compile

[ Thanks to Idean for
this link. ]

“A lot of open source programs come with configure scripts these
days. One purpose of such a script is to automate the guesswork of
targeting a new system. In times of yore, programs came with a
Makefile that had half a dozen different sets of compiler flags or
options, all but one of which were commented out, and a note saying
“select the appropriate flags for your system.” For more
comprehensive sets of configuration options, there might also have
been a large C header called config.h containing a few dozen flags
to set, depending on host system variables.

“The first approach was simply to have #ifdefs in code for the
two systems supported; for instance, BSD and System V. As the
number of Unix variants increased, it became more practical to have
#ifdefs for each feature…”


Complete Story

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends, & analysis