694f2c2
From 43536890043d7f6a9a3a45f3711dd2d719ddf4fd Mon Sep 17 00:00:00 2001
694f2c2
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
694f2c2
Date: Tue, 8 Oct 2013 14:44:53 +0200
694f2c2
Subject: [PATCH 2/4] Use configure options instead of GCC test
694f2c2
MIME-Version: 1.0
694f2c2
Content-Type: text/plain; charset=UTF-8
694f2c2
Content-Transfer-Encoding: 8bit
694f2c2
694f2c2
These configure options:
694f2c2
694f2c2
    --enable-gcc-debug
694f2c2
    --enable-gprof
694f2c2
    --enable-warnings
694f2c2
694f2c2
never worked because the configure script checked for GCC presence
694f2c2
instead of the option values.
694f2c2
694f2c2
Signed-off-by: Petr Písař <ppisar@redhat.com>
694f2c2
---
694f2c2
 configure.ac | 6 +++---
694f2c2
 1 file changed, 3 insertions(+), 3 deletions(-)
694f2c2
694f2c2
diff --git a/configure.ac b/configure.ac
694f2c2
index 0b822ac..d7c4c00 100644
694f2c2
--- a/configure.ac
694f2c2
+++ b/configure.ac
694f2c2
@@ -139,21 +139,21 @@ AC_SUBST(WRAP_LIBS)
694f2c2
 dnl Package options
694f2c2
 AC_ARG_ENABLE(gcc-debug, AS_HELP_STRING([--enable-gcc-debug], 
694f2c2
                          [Use '-g -Wall' if using gcc.]),
694f2c2
-[ if test -n "$GCC"; then
694f2c2
+[ if test "${enable_gcc_debug}" = 'yes'; then
694f2c2
 	AC_MSG_RESULT(Setting CFLAGS to -g -Wall)
694f2c2
 	CFLAGS="-g -Wall"
694f2c2
   fi])
694f2c2
 
694f2c2
 AC_ARG_ENABLE(warnings, AS_HELP_STRING([--enable-warnings], 
694f2c2
                         [Enable -Wall if using gcc.]),
694f2c2
-[ if test -n "$GCC"; then
694f2c2
+[ if test "${enable_warnings}" = 'yes'; then
694f2c2
     AC_MSG_RESULT(Adding -Wall to CFLAGS.)
694f2c2
     CFLAGS="$CFLAGS -Wall"
694f2c2
   fi])
694f2c2
 
694f2c2
 AC_ARG_ENABLE(gprof, AS_HELP_STRING([--enable-gprof], 
694f2c2
                      [Enable -pg if using gcc.]),
694f2c2
-[ if test -n "$GCC"; then
694f2c2
+[ if test "${enable_gprof}" = 'yes'; then
694f2c2
     AC_MSG_RESULT(Adding -pg to CFLAGS/LDFLAGS.)
694f2c2
     CFLAGS="$CFLAGS -pg"
694f2c2
     LDFLAGS="$LDFLAGS -pg"
694f2c2
-- 
694f2c2
1.8.3.1
694f2c2