- [ --enable-profile make a binary for use with gprof],
- [profile=$enableval
- if test x$profile = xyes
- then
- CFLAGS="$CFLAGS -pg"
- CXXFLAGS="$CXXFLAGS -pg"
- fi])
+ [ --enable-profile make a binary for use with gprof profiler],
+ [profile=$enableval],
+ [profile=no])
+
+AC_ARG_ENABLE([extra-warnings],
+ [ --enable-extra-warnings make the gcc compiler give more warnings],
+ [extra_warnings=$enableval],
+ [extra_warnings=no])
+
+AC_ARG_WITH([log-level],
+ [AS_HELP_STRING([--with-log-level=NUM],
+ [0, none... 1, errors... 4, everything (default: 3)])],
+ [log_level=$withval],
+ [log_level=3])
+
+
+if test x$developer = xyes
+then
+ debug=yes
+ log_level=4
+
+ if test x$WIN32 != xyes
+ then
+ profile=yes
+ fi
+fi
+
+if test x$debug = xyes
+then
+ CFLAGS="$CFLAGS -Wall -O0 -gstabs -DDEBUG"
+ CXXFLAGS="$CXXFLAGS -Wall -O0 -gstabs -DDEBUG"
+else
+ CFLAGS="$CFLAGS -O2 -DNDEBUG"
+ CXXFLAGS="$CXXFLAGS -O2 -DNDEBUG"
+fi