packages/net/bind/patches/001-automake-cross.patch
jow fd7cccc579 [packages] bind: fix autoreconf
git-svn-id: svn://svn.openwrt.org/openwrt/packages@24489 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-12-11 17:24:59 +00:00

187 lines
5.8 KiB
Diff

--- a/configure.in
+++ b/configure.in
@@ -1759,56 +1759,10 @@ AC_SUBST(ISC_PLATFORM_HAVEIF_LADDRCONF)
# which provides some (all?) of the desired functions.
#
-AC_MSG_CHECKING([for inet_ntop with IPv6 support])
-AC_TRY_RUN([
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-main() {
-char a[16],b[64]; return(inet_ntop(AF_INET6, a, b, sizeof(b)) == (char*)0);}],
- [AC_MSG_RESULT(yes)
- ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP"],
-
- [AC_MSG_RESULT(no)
- ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_ntop.$O"
- ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_ntop.c"
- ISC_PLATFORM_NEEDNTOP="#define ISC_PLATFORM_NEEDNTOP 1"],
- [AC_MSG_RESULT(assuming inet_ntop needed)
- ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_ntop.$O"
- ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_ntop.c"
- ISC_PLATFORM_NEEDNTOP="#define ISC_PLATFORM_NEEDNTOP 1"])
-
-
-# On NetBSD 1.4.2 and maybe others, inet_pton() incorrectly accepts
-# addresses with less than four octets, like "1.2.3". Also leading
-# zeros should also be rejected.
-
-AC_MSG_CHECKING([for working inet_pton with IPv6 support])
-AC_TRY_RUN([
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-main() { char a[16]; return (inet_pton(AF_INET, "1.2.3", a) == 1 ? 1 :
- inet_pton(AF_INET, "1.2.3.04", a) == 1 ? 1 :
- (inet_pton(AF_INET6, "::1.2.3.4", a) != 1)); }],
- [AC_MSG_RESULT(yes)
- ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON"],
- [AC_MSG_RESULT(no)
- ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_pton.$O"
- ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_pton.c"
- ISC_PLATFORM_NEEDPTON="#define ISC_PLATFORM_NEEDPTON 1"],
- [AC_MSG_RESULT(assuming target platform has working inet_pton)
- ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON"],
- [AC_MSG_RESULT(assuming inet_pton needed)
- ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_pton.$O"
- ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_pton.c"
- ISC_PLATFORM_NEEDPTON="#define ISC_PLATFORM_NEEDPTON 1"],
- [AC_MSG_RESULT(assuming target platform has working inet_pton)
- ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON"])
-
+ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP"
AC_SUBST(ISC_PLATFORM_NEEDNTOP)
+
+ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON"
AC_SUBST(ISC_PLATFORM_NEEDPTON)
#
@@ -2186,28 +2140,11 @@ AC_SUBST(DST_EXTRA_SRCS)
# Win32 uses "%I64d", but that's defined elsewhere since we don't use
# configure on Win32.
#
-AC_MSG_CHECKING(printf format modifier for 64-bit integers)
-AC_TRY_RUN([
-#include <stdio.h>
-main() {
- long long int j = 0;
- char buf[100];
- buf[0] = 0;
- sprintf(buf, "%lld", j);
- exit((sizeof(long long int) != sizeof(long int))? 0 :
- (strcmp(buf, "0") != 0));
-}
-],
- [AC_MSG_RESULT(ll)
- ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'
- LWRES_PLATFORM_QUADFORMAT='#define LWRES_PLATFORM_QUADFORMAT "ll"'],
- [AC_MSG_RESULT(l)
- ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "l"'
- LWRES_PLATFORM_QUADFORMAT='#define LWRES_PLATFORM_QUADFORMAT "l"'],
- [AC_MSG_RESULT(assuming target platform uses ll)
- ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'
- LWRES_PLATFORM_QUADFORMAT='#define LWRES_PLATFORM_QUADFORMAT "ll"'])
+
+ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'
AC_SUBST(ISC_PLATFORM_QUADFORMAT)
+
+LWRES_PLATFORM_QUADFORMAT='#define LWRES_PLATFORM_QUADFORMAT "ll"'
AC_SUBST(LWRES_PLATFORM_QUADFORMAT)
#
@@ -2272,47 +2209,8 @@ AC_DEFINE(NEED_OPTARG, 1, [Defined if ex
#
# BSD/OS, and perhaps some others, don't define rlim_t.
#
-AC_MSG_CHECKING(for type rlim_t)
-AC_TRY_COMPILE([
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/resource.h>],
-[rlim_t rl = 19671212; return (0);],
-[AC_MSG_RESULT(yes)
- ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE rlim_t"],
-[AC_MSG_RESULT(no)
-AC_MSG_CHECKING(type of rlim_cur)
-AC_TRY_RUN([
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/resource.h>
-main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(int)));}],
-[AC_MSG_RESULT(int)
-ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE int"],
-[
-AC_TRY_RUN([
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/resource.h>
-main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(long int)));}],
-[AC_MSG_RESULT(long int)
-ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long int"],
-[
-AC_TRY_RUN([
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/resource.h>
-main() { struct rlimit r; exit((!sizeof(r.rlim_cur) == sizeof(long long int)));}],
-[AC_MSG_RESULT(long long int)
-ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long long int"],
-[AC_MSG_ERROR([unable to determine sizeof rlim_cur])
-],[AC_MSG_ERROR(this cannot happen)])
-],[AC_MSG_ERROR(this cannot happen)])
-],[
-ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long long int"
-AC_MSG_RESULT(cannot determine type of rlim_cur when cross compiling - assuming long long int)])
-])
+ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long int"
AC_SUBST(ISC_PLATFORM_RLIMITTYPE)
#
@@ -2520,27 +2418,22 @@ if test "$use_atomic" = "yes"; then
[i[3456]86-*])
# XXX: some old x86 architectures actually do not support
# (some of) these operations. Do we need stricter checks?
-AC_TRY_RUN([
-main() {
- exit((sizeof(void *) == 8) ? 0 : 1);
-}
-],
- [arch=x86_64
- have_xaddq=yes],
- [arch=x86_32],
- [arch=x86_32])
+AC_CHECK_SIZEOF([void *])
+ if test $ac_cv_sizeof_void_p = 8; then
+ arch=x86_64
+ have_xaddq=yes
+ else
+ arch=x86_32
+ fi
;;
x86_64-*|amd64-*)
-AC_TRY_RUN([
-main() {
- exit((sizeof(void *) == 8) ? 0 : 1);
-}
-],
- [arch=x86_64
- have_xaddq=yes],
- [arch=x86_32],
- [arch=x86_64
- have_xaddq=yes])
+AC_CHECK_SIZEOF([void *])
+ if test $ac_cv_sizeof_void_p = 8; then
+ arch=x86_64
+ have_xaddq=yes
+ else
+ arch=x86_32
+ fi
;;
alpha*-*)
arch=alpha