From: Wouter Wijngaards Date: Wed, 14 Feb 2007 08:03:15 +0000 (+0000) Subject: Improved: no more 'failed' lines. X-Git-Tag: release-0.0~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e964b5f725276e09a6559ad7e4053d35ae5be37;p=thirdparty%2Funbound.git Improved: no more 'failed' lines. git-svn-id: file:///svn/unbound/trunk@95 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/configure.ac b/configure.ac index 702d31549..ba1605b43 100644 --- a/configure.ac +++ b/configure.ac @@ -88,14 +88,21 @@ AC_LANG_C CHECK_COMPILER_FLAG(g, [CFLAGS="$CFLAGS -g"]) CHECK_COMPILER_FLAG(O2, [CFLAGS="$CFLAGS -O2"]) +AC_CHECK_HEADERS([getopt.h time.h],,, [AC_INCLUDES_DEFAULT]) + CHECK_COMPILER_FLAG_NEEDED(-std=c99 -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600, [ #include #include #include +#ifdef HAVE_TIME_H #include +#endif #include #include +#ifdef HAVE_GETOPT_H +#include +#endif int test() { int a; @@ -121,7 +128,6 @@ CHECK_COMPILER_FLAG_NEEDED(-std=c99, #include int test() { int a = 0; - a = isblank(12); return a; } ], [CFLAGS="$CFLAGS -std=c99"]) @@ -139,7 +145,9 @@ int test() { CHECK_COMPILER_FLAG_NEEDED(-D_POSIX_C_SOURCE=200112, [ +#ifdef HAVE_TIME_H #include +#endif #include int test() { @@ -160,7 +168,9 @@ CHECK_COMPILER_FLAG_NEEDED(-D__EXTENSIONS__, #include #include #include +#ifdef HAVE_GETOPT_H #include +#endif int test() { int a; @@ -173,14 +183,17 @@ int test() { return a; } ], [CFLAGS="$CFLAGS -D__EXTENSIONS__"]) -# check that functions are defined -AC_CHECK_DECLS([isascii, getopt, srandom, ctime_r, isblank, gai_strerror],, [echo "Cannot set compile environment; pass defines in CFLAGS=-D... ./configure"; exit 1], [ +AC_CHECK_DECLS([isascii, getopt, srandom, ctime_r, gai_strerror],, [echo "Cannot set compile environment; pass defines in CFLAGS=-D... ./configure"; exit 1], [ #include #include +#ifdef HAVE_TIME_H #include +#endif #include #include +#ifdef HAVE_GETOPT_H #include +#endif #include #include ]) diff --git a/doc/Changelog b/doc/Changelog index 0bb9a9ef7..37983ee8b 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,5 +1,7 @@ 14 February 2007: Wouter - Included configure.ac changes from ldns. + - detect (some) headers before the standards check. + - do not use isblank to test c99, since its not available on solaris9. 13 February 2007: Wouter - work on fake events, first fwd replay works.