From: Jelte Jansen Date: Mon, 5 Feb 2007 10:34:28 +0000 (+0000) Subject: more compiler flag checks X-Git-Tag: release-1.2.0~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bbec18fc23bbf9e0033d25bcb06229cb11b24ce3;p=thirdparty%2Fldns.git more compiler flag checks --- diff --git a/configure.ac b/configure.ac index 5935a213..fe5c5dea 100644 --- a/configure.ac +++ b/configure.ac @@ -91,7 +91,28 @@ AC_C_CONST AC_LANG_C AC_TYPE_SIZE_T CHECK_COMPILER_FLAG(O2, [CFLAGS="$CFLAGS -O2"]) -CHECK_COMPILER_FLAG_NEEDED(-std=c99, [#include ], [CFLAGS="$CFLAGS -std=c99"]) +CHECK_COMPILER_FLAG_NEEDED(-std=c99, +[ +#include +#include +int test() { + int a = 0; + a = isblank(12); + return a; +} +], [CFLAGS="$CFLAGS -std=c99"]) + +CHECK_COMPILER_FLAG_NEEDED(-D_BSD_SOURCE, +[ +#include + +int test() { + int a; + a = isascii(32); + return a; +} +], [CFLAGS="$CFLAGS -D_BSD_SOURCE"]) + CHECK_COMPILER_FLAG_NEEDED(-D_POSIX_C_SOURCE=200112, [ #include @@ -104,13 +125,15 @@ int test() { t = ctime_r(&time, buf); return a; } -], [CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=200112"]) +], [CFLAGS="$CFLAGS -D_BSD_SOURCE"]) + CHECK_COMPILER_FLAG_NEEDED(-D__EXTENSIONS__, [ #include #include #include #include +#include int test() { int a;