Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=gfpm/.git;a=commitdiff;h=8cd3bbf1246bcf81d69325cb2e5591c01877b5e0

commit 8cd3bbf1246bcf81d69325cb2e5591c01877b5e0
Author: Christian Hamar alias krix <[EMAIL PROTECTED]>
Date:   Mon Aug 6 19:22:20 2007 +0200

Rewrite --enable-debug and extend with werror
* So you got now --enable-debug (which omits -ggdb3 -Wall stuffs)
and you got a --enable-werror which omits -Werror flag.
* Cleanup and cosmetics for AC_MSG_ARG and other stuffs

diff --git a/configure.ac b/configure.ac
index d75d1ab..ced6367 100644
--- a/configure.ac
+++ b/configure.ac
@@ -18,12 +18,27 @@ if test "${GCC}" = "yes" ; then
CFLAGS="${ENV_CFLAGS} -pipe"
fi

-AC_ARG_ENABLE(debug, [  --enable-debug    Enable debugging support], 
debug="yes")
+AC_ARG_ENABLE(werror,
+    AC_HELP_STRING([  --enable-werror], [Enable -Werror usage]), 
[werror="yes"])
+AC_ARG_ENABLE(debug,
+    AC_HELP_STRING([  --enable-debug], [Enable debugging support]), 
[debug="yes"])
+
+dnl Check for Werror request
+AC_MSG_CHECKING(for werror usage)
+if test "x$werror" = "xyes" ; then
+    CFLAGS="${CFLAGS} -Werror"
+    werror=yes
+    AC_MSG_RESULT(yes)
+else
+    werror=no
+    AC_MSG_RESULT(no)
+fi
+
dnl Check for debug enabled or not
AC_MSG_CHECKING(for debug request)
if test "x$debug" = "xyes" ; then
AC_DEFINE(GFPM_DEBUG, 1, [Debug support: enabled])
-    CFLAGS="${CFLAGS} -ggdb3 -Wall -Werror -DGFPM_DEBUG"
+    CFLAGS="${CFLAGS} -ggdb3 -Wall -DGFPM_DEBUG"
debug=yes
AC_MSG_RESULT(yes)
else
@@ -69,4 +84,5 @@ Gfpm $VERSION configuration summary:
compiler                 : ${CC}
compiler flags           : ${CFLAGS}
debug support            : ${debug}
+       werror usage             : ${werror}
"
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to