[packages] bind: fix autoreconf
[packages] bind: fix autoreconf


git-svn-id: svn://svn.openwrt.org/openwrt/packages@24489 3c298f89-4303-0410-b956-a3cf2f4a3e73

--- a/net/bind/Makefile
+++ b/net/bind/Makefile
@@ -88,6 +88,7 @@
 	--with-openssl="$(STAGING_DIR)/usr" \
 	--with-libtool \
 	--with-libxml2=no \
+	--enable-epoll=yes \
 
 CONFIGURE_VARS += \
 	BUILD_CC="$(TARGET_CC)" \

--- /dev/null
+++ b/net/bind/patches/001-automake-cross.patch
@@ -1,1 +1,187 @@
+--- 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
 

--- a/net/bind/patches/100-cross_compile.patch
+++ b/net/bind/patches/100-cross_compile.patch
@@ -1,6 +1,6 @@
 --- a/configure
 +++ b/configure
-@@ -22023,8 +22023,7 @@ $as_echo_n "checking epoll support... " 
+@@ -22418,8 +22418,7 @@ $as_echo_n "checking epoll support... " 
    { { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
  See \`config.log' for more details." >&5
  $as_echo "$as_me: error: cannot run test program while cross compiling
@@ -10,7 +10,7 @@
  else
    cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
-@@ -23564,8 +23563,7 @@ if { as_var=$as_ac_File; eval "test \"\$
+@@ -24275,8 +24274,7 @@ if { as_var=$as_ac_File; eval "test \"\$
  else
    test "$cross_compiling" = yes &&
    { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
@@ -20,7 +20,7 @@
  if test -r "$devrandom"; then
    eval "$as_ac_File=yes"
  else
-@@ -27069,73 +27067,6 @@ rm -f core conftest.err conftest.$ac_obj
+@@ -27949,73 +27947,6 @@ rm -f core conftest.err conftest.$ac_obj
  # which provides some (all?) of the desired functions.
  #
  

comments