OISF/libhtp

configure doesn't honour --disable-debug and builds with -DHTP_DEBUG

barn opened this issue · 2 comments

barn commented

Which causes suricata to output all the debug information to stdout, like in http://pastebin.com/YSHzyxNT

On OSX, 10.9. Trying to build for homebrew, but just git clone-ing and building directly gets these results.

bash-3.2# uname -v
Darwin Kernel Version 12.6.0: Wed Dec 17 19:11:40 PST 2014; root:xnu-2050.48.15~1/RELEASE_X86_64
bash-3.2# sh autogen.sh
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
autoreconf: running: glibtoolize --copy --force
glibtoolize: putting auxiliary files in '.'.
glibtoolize: copying file './ltmain.sh'
glibtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
glibtoolize: copying file 'm4/libtool.m4'
glibtoolize: copying file 'm4/ltoptions.m4'
glibtoolize: copying file 'm4/ltsugar.m4'
glibtoolize: copying file 'm4/ltversion.m4'
glibtoolize: copying file 'm4/lt~obsolete.m4'
autoreconf: running: /usr/local/Cellar/autoconf/2.69/bin/autoconf --force
autoreconf: running: /usr/local/Cellar/autoconf/2.69/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:79: installing './compile'
configure.ac:82: installing './config.guess'
configure.ac:82: installing './config.sub'
configure.ac:7: installing './install-sh'
configure.ac:7: installing './missing'
Makefile.am: installing './INSTALL'
htp/Makefile.am: installing './depcomp'
parallel-tests: installing './test-driver'
autoreconf: Leaving directory `.'
bash-3.2# ./configure  --prefix=/usr/local/Cellar/suricata/2.0.8 --disable-debug
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
Debug mode enabled

Which is from

echo "Debug mode enabled"

So I've no idea why that check isn't working.

I attempted to fix this in #165 but I don't think the default behavior is correct as per @victorjulien, so I need to submit a change with a proper default of no

Do we want explicit flag values as per Suricata (e.g. --enable-debug=[yes|no]) or do we want flag presence to be all that's needed (e.g. [--enable-debug|<blank>])?

Fixed in #166.