I’ve been looking for this for a while: I’m currently converting a medium-size program to autotools, coming from an Eclipse-based method (with makefiles)
I’m always used to having a “debug” build, with all debug symbols and no optimizations, and a “release” build, without debug symbols and best optimizations.
Now I’m trying to replicate this in some way with autotools, so I can (perhaps) do something like:
./configure
make debug
Which would have all debug symbols and no optimizations, and where:
./configure
make
Would result in the “release” version (default)
PS: I’ve read about the –enable-debug flag/feature, but in my current (simple) setup, using that is unrecognized by configure
Add a clause to your
configure.inorconfigure.acfile;Now in your
Makefile.inorMakefile.am;So when
debugis enabled you can modify your{C/CXX}FLAGSto enable debug information.