]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
Improved: no more 'failed' lines.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Wed, 14 Feb 2007 08:03:15 +0000 (08:03 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Wed, 14 Feb 2007 08:03:15 +0000 (08:03 +0000)
git-svn-id: file:///svn/unbound/trunk@95 be551aaa-1e26-0410-a405-d3ace91eadb9

configure.ac
doc/Changelog

index 702d31549c9bda9a015f6ee037e2981b0bdc7d4f..ba1605b436632d36ab85a64f35ea22de2834d79f 100644 (file)
@@ -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 <stdlib.h>
 #include <ctype.h>
 #include <sys/time.h>
+#ifdef HAVE_TIME_H
 #include <time.h>
+#endif
 #include <unistd.h>
 #include <netdb.h>
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#endif
 
 int test() {
        int a;
@@ -121,7 +128,6 @@ CHECK_COMPILER_FLAG_NEEDED(-std=c99,
 #include <ctype.h>
 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 <time.h>
+#endif
 #include <netdb.h>
 
 int test() {
@@ -160,7 +168,9 @@ CHECK_COMPILER_FLAG_NEEDED(-D__EXTENSIONS__,
 #include <ctype.h>
 #include <sys/time.h>
 #include <unistd.h>
+#ifdef HAVE_GETOPT_H
 #include <getopt.h>
+#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 <stdlib.h>
 #include <sys/time.h>
+#ifdef HAVE_TIME_H
 #include <time.h>
+#endif
 #include <netdb.h>
 #include <unistd.h>
+#ifdef HAVE_GETOPT_H
 #include <getopt.h>
+#endif
 #include <stdbool.h>
 #include <ctype.h>
 ])
index 0bb9a9ef7058b60cd2f4633976528ba2a5a4e6a8..37983ee8b6ca6b4d9adfc44f6d8a5c1fb55f32bb 100644 (file)
@@ -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.