Fix autoconf 2.68 warnings

git-svn-id: file:///svn/unbound/trunk@2467 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2011-08-01 11:14:33 +00:00
parent dbd816fafb
commit 27b5d25703
4 changed files with 304 additions and 273 deletions

View file

@ -2,7 +2,8 @@
# Copyright 2009, Wouter Wijngaards, NLnet Labs. # Copyright 2009, Wouter Wijngaards, NLnet Labs.
# BSD licensed. # BSD licensed.
# #
# Version 12 # Version 13
# 2011-08-01 Fix autoconf 2.68 warnings
# 2011-06-23 Add ACX_CHECK_FLTO to check -flto. # 2011-06-23 Add ACX_CHECK_FLTO to check -flto.
# 2010-08-16 Fix FLAG_OMITTED for AS_TR_CPP changes in autoconf-2.66. # 2010-08-16 Fix FLAG_OMITTED for AS_TR_CPP changes in autoconf-2.66.
# 2010-07-02 Add check for ss_family (for minix). # 2010-07-02 Add check for ss_family (for minix).
@ -766,7 +767,7 @@ AC_DEFUN([ACX_CHECK_GETADDRINFO_WITH_INCLUDES],
AC_MSG_CHECKING(for getaddrinfo) AC_MSG_CHECKING(for getaddrinfo)
ac_cv_func_getaddrinfo=no ac_cv_func_getaddrinfo=no
AC_LINK_IFELSE( AC_LINK_IFELSE(
[ [AC_LANG_SOURCE([[
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
@ -780,14 +781,14 @@ int main() {
; ;
return 0; return 0;
} }
], ]])],
dnl this case on linux, solaris, bsd dnl this case on linux, solaris, bsd
[ac_cv_func_getaddrinfo="yes"], [ac_cv_func_getaddrinfo="yes"],
dnl no quick getaddrinfo, try mingw32 and winsock2 library. dnl no quick getaddrinfo, try mingw32 and winsock2 library.
ORIGLIBS="$LIBS" ORIGLIBS="$LIBS"
LIBS="$LIBS -lws2_32" LIBS="$LIBS -lws2_32"
AC_LINK_IFELSE( AC_LINK_IFELSE(
AC_LANG_PROGRAM( [AC_LANG_PROGRAM(
[ [
#ifdef HAVE_WS2TCPIP_H #ifdef HAVE_WS2TCPIP_H
#include <ws2tcpip.h> #include <ws2tcpip.h>
@ -796,7 +797,7 @@ AC_LANG_PROGRAM(
[ [
(void)getaddrinfo(NULL, NULL, NULL, NULL); (void)getaddrinfo(NULL, NULL, NULL, NULL);
] ]
), )],
[ [
ac_cv_func_getaddrinfo="yes" ac_cv_func_getaddrinfo="yes"
dnl already: LIBS="$LIBS -lws2_32" dnl already: LIBS="$LIBS -lws2_32"
@ -860,7 +861,8 @@ if echo $target | grep mingw32 >/dev/null; then
AC_MSG_RESULT([no (windows)]) AC_MSG_RESULT([no (windows)])
AC_DEFINE([NONBLOCKING_IS_BROKEN], 1, [Define if the network stack does not fully support nonblocking io (causes lower performance).]) AC_DEFINE([NONBLOCKING_IS_BROKEN], 1, [Define if the network stack does not fully support nonblocking io (causes lower performance).])
else else
AC_RUN_IFELSE(AC_LANG_PROGRAM([ AC_RUN_IFELSE([
AC_LANG_SOURCE([[
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
@ -884,7 +886,9 @@ AC_RUN_IFELSE(AC_LANG_PROGRAM([
#ifdef HAVE_TIME_H #ifdef HAVE_TIME_H
#include <time.h> #include <time.h>
#endif #endif
],[[
int main(void)
{
int port; int port;
int sfd, cfd; int sfd, cfd;
int num = 10; int num = 10;
@ -977,7 +981,8 @@ AC_RUN_IFELSE(AC_LANG_PROGRAM([
close(sfd); close(sfd);
close(cfd); close(cfd);
]]), [ }
]])], [
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
], [ ], [
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
@ -1017,13 +1022,13 @@ AC_DEFUN([ACX_FUNC_IOCTLSOCKET],
[ [
# check ioctlsocket # check ioctlsocket
AC_MSG_CHECKING(for ioctlsocket) AC_MSG_CHECKING(for ioctlsocket)
AC_LINK_IFELSE(AC_LANG_PROGRAM([ AC_LINK_IFELSE([AC_LANG_PROGRAM([
#ifdef HAVE_WINSOCK2_H #ifdef HAVE_WINSOCK2_H
#include <winsock2.h> #include <winsock2.h>
#endif #endif
], [ ], [
(void)ioctlsocket(0, 0, NULL); (void)ioctlsocket(0, 0, NULL);
]), [ ])], [
AC_MSG_RESULT(yes) AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_IOCTLSOCKET, 1, [if the function 'ioctlsocket' is available]) AC_DEFINE(HAVE_IOCTLSOCKET, 1, [if the function 'ioctlsocket' is available])
],[AC_MSG_RESULT(no)]) ],[AC_MSG_RESULT(no)])

519
configure vendored

File diff suppressed because it is too large Load diff

View file

@ -299,13 +299,13 @@ if test "$on_mingw" = "yes"; then
# check windows threads # check windows threads
AC_CHECK_HEADERS([windows.h],,, [AC_INCLUDES_DEFAULT]) AC_CHECK_HEADERS([windows.h],,, [AC_INCLUDES_DEFAULT])
AC_MSG_CHECKING([for CreateThread]) AC_MSG_CHECKING([for CreateThread])
AC_TRY_COMPILE([ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
#ifdef HAVE_WINDOWS_H #ifdef HAVE_WINDOWS_H
#include <windows.h> #include <windows.h>
#endif #endif
], [ ], [
HANDLE t = CreateThread(NULL, 0, NULL, NULL, 0, NULL); HANDLE t = CreateThread(NULL, 0, NULL, NULL, 0, NULL);
], ])],
AC_MSG_RESULT(yes) AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_WINDOWS_THREADS, 1, [Using Windows threads]) AC_DEFINE(HAVE_WINDOWS_THREADS, 1, [Using Windows threads])
, ,
@ -663,13 +663,13 @@ AC_DEFUN([AC_CHECK_STRPTIME_WORKS],
[AC_REQUIRE([AC_PROG_CC]) [AC_REQUIRE([AC_PROG_CC])
AC_MSG_CHECKING(whether strptime works) AC_MSG_CHECKING(whether strptime works)
if test c${cross_compiling} = cno; then if test c${cross_compiling} = cno; then
AC_TRY_RUN([ AC_RUN_IFELSE([AC_LANG_SOURCE([[
#define _XOPEN_SOURCE #define _XOPEN_SOURCE
#include <time.h> #include <time.h>
int main(void) { struct tm tm; char *res; int main(void) { struct tm tm; char *res;
res = strptime("20070207111842", "%Y%m%d%H%M%S", &tm); res = strptime("20070207111842", "%Y%m%d%H%M%S", &tm);
if (!res) return 1; return 0; } if (!res) return 1; return 0; }
] , [eval "ac_cv_c_strptime_works=yes"], [eval "ac_cv_c_strptime_works=no"]) ]])] , [eval "ac_cv_c_strptime_works=yes"], [eval "ac_cv_c_strptime_works=no"])
else else
eval "ac_cv_c_strptime_works=maybe" eval "ac_cv_c_strptime_works=maybe"
fi fi

View file

@ -1,3 +1,6 @@
1 August 2011: Wouter
- Fix autoconf 2.68 warnings
14 July 2011: Wouter 14 July 2011: Wouter
- Unbound implements RFC6303 (since version 1.4.7). - Unbound implements RFC6303 (since version 1.4.7).
- tag 1.4.12rc1 is released as 1.4.12 (without the other fixes in the - tag 1.4.12rc1 is released as 1.4.12 (without the other fixes in the