diff options
| author | Alexander Barton <alex@barton.de> | 2003-04-25 15:04:43 +0000 |
|---|---|---|
| committer | Alexander Barton <alex@barton.de> | 2003-04-25 15:04:43 +0000 |
| commit | e1c70a3c93cf0fbe9dc532003343405337351c9d (patch) | |
| tree | 1a1fd7154314815a2f5c8a6a7528a6b7af10356f /configure.in | |
| parent | c43d47d69ce2f55298ca2799720155a1a4fcebe8 (diff) | |
| download | ngircd-e1c70a3c93cf0fbe9dc532003343405337351c9d.tar.gz ngircd-e1c70a3c93cf0fbe9dc532003343405337351c9d.zip | |
Disabling "-ansi" on Cygwin: system headers are incompatible.
Diffstat (limited to 'configure.in')
| -rw-r--r-- | configure.in | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/configure.in b/configure.in index d76aa74c..1fba8530 100644 --- a/configure.in +++ b/configure.in @@ -8,7 +8,7 @@ # (at your option) any later version. # Please read the file COPYING, README and AUTHORS for more information. # -# $Id: configure.in,v 1.91 2003/04/23 01:07:59 alex Exp $ +# $Id: configure.in,v 1.92 2003/04/25 15:04:43 alex Exp $ # # -- Initialisierung -- @@ -266,15 +266,26 @@ AC_DEFINE_UNQUOTED(TARGET_OS, "$target_os" ) if test "$GCC" = "yes"; then the_CFLAGS="-Wmissing-declarations -Wpointer-arith -Wstrict-prototypes" + ansi=" -ansi" + pedantic=" -pedantic" + $CC --version | grep 20020420 > /dev/null 2>&1 if test $? -eq 0; then # Mac OS X (and Darwin?) ship with a slightly broken # prerelease of GCC 3.1 which don't like -pedantic: AC_MSG_RESULT([detected broken GNU C compiler, disabling "-pedantic"]) - add_CFLAGS="-Wall -W -ansi $CFLAGS $CFLAGS_ADD" - else - add_CFLAGS="-Wall -W -ansi -pedantic $CFLAGS $CFLAGS_ADD" + pedantic="" fi + + uname | grep "CYGWIN" > /dev/null 2>&1 + if test $? -eq 0; then + # The include files of Cygwin don't like -ansi, + # so we disable it: + AC_MSG_RESULT([detected Cygwin, disabling "-ansi"]) + ansi="" + fi + + add_CFLAGS="-Wall -W${ansi}${pedantic} $CFLAGS $CFLAGS_ADD" else the_CFLAGS="$CFLAGS" add_CFLAGS="$CFLAGS_ADD" |