From: tim Date: Wed, 24 Aug 2005 00:11:26 +0000 (+0000) Subject: - (tim) [configure.ac ] Not all gcc's support -Wsign-compare X-Git-Tag: V_4_2_P1~10 X-Git-Url: http://andersk.mit.edu/gitweb/openssh.git/commitdiff_plain/5fdabf45a301636bf04659e7e2771bda219b60dc - (tim) [configure.ac ] Not all gcc's support -Wsign-compare --- diff --git a/ChangeLog b/ChangeLog index dd8a04e1..f52e7f16 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ - (dtucker) [regress/test-exec.sh] Do not prepend an extra "/" to a fully- qualified sshd pathname since some systems (eg Cygwin) may consider "/foo" and "//foo" to be different. Spotted by vinschen at redhat.com. + - (tim) [configure.ac ] Not all gcc's support -Wsign-compare 20050821 - (dtucker) [configure.ac defines.h includes.h sftp.c] Add support for diff --git a/configure.ac b/configure.ac index 5b1ad467..eea151fe 100644 --- a/configure.ac +++ b/configure.ac @@ -82,7 +82,13 @@ AC_CHECK_DECL(LLONG_MAX, have_llong_max=1, , [#include ]) if test "$GCC" = "yes" || test "$GCC" = "egcs"; then CFLAGS="$CFLAGS -Wall -Wpointer-arith -Wuninitialized" - CFLAGS="$CFLAGS -Wsign-compare" + GCC_VER=`$CC --version` + case $GCC_VER in + 1.*) ;; + 2.8* | 2.9*) CFLAGS="$CFLAGS -Wsign-compare" ;; + 2.*) ;; + *) CFLAGS="$CFLAGS -Wsign-compare" ;; + esac if test -z "$have_llong_max"; then # retry LLONG_MAX with -std=gnu99, needed on some Linuxes