[SF#515] Fix configure --enable-debug.
authorAndriy Grytsenko <andrej@rep.kiev.ua>
Sun, 14 Sep 2014 14:15:02 +0000 (17:15 +0300)
committerAndriy Grytsenko <andrej@rep.kiev.ua>
Sun, 14 Sep 2014 14:17:04 +0000 (17:17 +0300)
configure.ac

index 2643756..29ca4f3 100644 (file)
@@ -104,16 +104,25 @@ if test x"$enable_more_warnings" = x"yes"; then
 fi
 AC_SUBST(ADDITIONAL_FLAGS)
 
-AC_ARG_ENABLE(man,
-       [AS_HELP_STRING([--enable-man],
-               [regenerate roff man pages from Docbook @<:@default=no@:>@])],
-       [enable_man="${enableval}"],
-       [enable_man=no]
+AC_ARG_ENABLE(debug,
+    [AC_HELP_STRING([--enable-debug],
+        [build lxappearance with debug support @<:@default=no@:>@])],
+    [enable_debug="${enableval}"],
+    [enable_debug=no]
 )
 
 if test "$enable_debug" = "yes"; then
     # turn on debug and disable optimization
     CPPFLAGS="$CPPFLAGS -DG_ENABLE_DEBUG -O0 -g"
+    case "$CC" in
+    gcc*)
+        CPPFLAGS="$CPPFLAGS -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers"
+        ;;
+    *)
+        ;;
+    esac
+    dnl Be more strict on portability
+    CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=700"
 else
     # turn off glib debug checks
     CPPFLAGS="$CPPFLAGS -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"