Introduced new configure option --enable-debug to build with -DDEBUG.
This activate several blocks of code that should compile. Some of them did not after the introduction of UNUSED(). Flag the arguments used with -DDEBUG with a new macro NDUNUSED().
There are several new compiler warnings in the DEBUG protected code. When these are fixed, --enable-gcc-werror could be enabled for DEBUG builds to avoid reintroducing such problems.