For unrecognized options, Clang 3.1 (and ealier?) prints out a
warning, but it isn't a real warning as it doesn't cause a compilation
error with -Werror, so it is impossible to find out reliably if an
option is supported or not. So hardcode the information we know.
Do not depend on a distro-configs file to disable it. It is supposed
to be optional to pass a --with-distro option. Running a bare
./autogen.sh is supposed to produce a working configuration.
Maybe they'll be supported somewhen in the future, so do not hardcode
them out. Also, gb_DEBUG_C(XX)FLAGS are apparently common GCC options,
not platform-specific.
the argument given now can
- be 'all', meaning everything
- start with -, meaning not to enable symbols for that item
- end with /, meaning everything in that toplevel directory
- be a target of the form targettype_name, e.g. Library_swui
Note that there is no ordering and removal takes precedence.
- move using optimization, symbols (i.e. debug) and environment
cflags/cxxflags into one place
- --enable-dbgutils is independent from --enable-debug, and thus
also --enable-symbols, so it should not set debuglevel
- setting -g flag is controlled by --enable-symbols, not --enable-debug,
so it should be used also for selective -g enabling
- setting debug flags depending on debuglevel being 2 is certainly wrong
- do not let environment cflags/cxxflags disable optimization/symbols flags
completely, if one wants, it's possible to explicitly specify e.g. -g0,
but the current way does not make it easily possible to specify e.g.
-fcolor-diagnostics
- do not set debug flag globally now that it can be done selectively
with this you can now do:
./autogen.sh --enable-debug="sw sc"
and your build will have debug version of the libraries sw and sc, but a
non-debug build elsewhere. This currently only works for libraries. It would be
also possible to extend that to excutables, but that would need explicit in the
enable-debug switch then:
./autogen.sh --enable-debug="Library/sw Library/sc Executable/mkunroll"
so I dont know if it is worth it.
Cairo canvas is a LO feature, it doesn't make sense to use system cairo
only if the feature is enabled. Fixes mingw build (where our cairo copy
does not build for whatever reason).
$(file is a new function that landed in gnu-make cvs
it allow to write a makefile variable directly into a file
bypassing the usual command line size limitiation