X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=blobdiff_plain;f=configure.in;h=1fba8530dd72455c065117d184e171ac6f971cc8;hp=2b5e64ab9a8bb45134bb8e8dfb9c9a92e5b63352;hb=83194a23a30de5712375e10366bbd4f7b5b3e0c2;hpb=f5b91cd03da3adf47dd5f5ca47f4bc41fc755d00 diff --git a/configure.in b/configure.in index 2b5e64ab..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.89 2003/04/21 10:51:44 alex Exp $ +# $Id: configure.in,v 1.92 2003/04/25 15:04:43 alex Exp $ # # -- Initialisierung -- @@ -76,6 +76,13 @@ if test `uname` = "HP-UX"; then add_DEFINES="-D_XOPEN_SOURCE_EXTENDED $add_DEFINES" fi +if test `uname` = "SunOS"; then + # define _XOPEN_SOURCE, _XOPEN_SOURCE_EXTENDED=1 and __EXTENSIONS__ + # when compiling on SunOS (tested with 5.6): + AC_MSG_RESULT([detected SunOS, defining _XOPEN_SOURCE, _XOPEN_SOURCE_EXTENDED=1 and __EXTENSIONS__]) + add_DEFINES="-D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1 -D__EXTENSIONS__ $add_DEFINES" +fi + # -- Header -- AC_HEADER_STDC @@ -259,7 +266,26 @@ AC_DEFINE_UNQUOTED(TARGET_OS, "$target_os" ) if test "$GCC" = "yes"; then the_CFLAGS="-Wmissing-declarations -Wpointer-arith -Wstrict-prototypes" - add_CFLAGS="-Wall -W -ansi -pedantic $CFLAGS $CFLAGS_ADD" + 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"]) + 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"