summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2005-11-10 21:30:36 +1100
committerDarren Tucker <dtucker@zip.com.au>2005-11-10 21:30:36 +1100
commitf032435de7849ae80aa53df8028902711889a414 (patch)
treec828478cc8fab4e6fb9ceb71440f7a1e63aa4353 /configure.ac
parent9d30d1392289645b5275646bf63b42cc17ef0cac (diff)
- (dtucker) [configure.ac] Try to get the gcc version number in a way that
doesn't change between versions, and use a safer default.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac7
1 files changed, 4 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index a7b8e800..aee38719 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-# $Id: configure.ac,v 1.304 2005/11/10 03:46:49 dtucker Exp $
+# $Id: configure.ac,v 1.305 2005/11/10 10:30:36 dtucker Exp $
#
# Copyright (c) 1999-2004 Damien Miller
#
@@ -85,13 +85,14 @@ AC_CHECK_DECL(LLONG_MAX, have_llong_max=1, , [#include <limits.h>])
if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
CFLAGS="$CFLAGS -Wall -Wpointer-arith -Wuninitialized"
- GCC_VER=`$CC --version`
+ GCC_VER=`$CC -v 2>&1 | awk '/gcc version /{print $3}'`
case $GCC_VER in
1.*) ;;
2.8* | 2.9*) CFLAGS="$CFLAGS -Wsign-compare" ;;
2.*) ;;
3.*) CFLAGS="$CFLAGS -Wsign-compare" ;;
- *) CFLAGS="$CFLAGS -Wsign-compare -Wno-pointer-sign" ;;
+ 4.*) CFLAGS="$CFLAGS -Wsign-compare -Wno-pointer-sign" ;;
+ *) ;;
esac
if test -z "$have_llong_max"; then