From: Jelte Jansen Date: Mon, 18 Dec 2006 11:00:06 +0000 (+0000) Subject: tweaking for bsd X-Git-Tag: release-1.2.0~80 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0bbfdabcace0410c51eef662f34a389cb5ff4b63;p=thirdparty%2Fldns.git tweaking for bsd --- diff --git a/examples/configure.ac b/examples/configure.ac index baaf7f84..5c21e2fb 100644 --- a/examples/configure.ac +++ b/examples/configure.ac @@ -87,10 +87,25 @@ fi 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(-D_POSIX_C_SOURCE=200112, +[ +#include + +int test() { + int a = 0; + char *t; + time_t time = 0; + char *buf = NULL; + t = ctime_r(&time, buf); + return a; +} +], [CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=200112"]) CHECK_COMPILER_FLAG_NEEDED(-D__EXTENSIONS__, [ #include #include +#include +#include int test() { int a; @@ -103,19 +118,6 @@ int test() { return a; } ], [CFLAGS="$CFLAGS -D__EXTENSIONS__"]) -CHECK_COMPILER_FLAG_NEEDED(-D_POSIX_C_SOURCE=200112, -[ -#include - -int test() { - int a = 0; - char *t; - time_t time = 0; - char *buf = NULL; - t = ctime_r(&time, buf); - return a; -} -], [CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=200112"]) AC_C_INLINE