]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
3105. [bug] GOST support can be suppressed by "configure
authorEvan Hunt <each@isc.org>
Thu, 5 May 2011 18:10:50 +0000 (18:10 +0000)
committerEvan Hunt <each@isc.org>
Thu, 5 May 2011 18:10:50 +0000 (18:10 +0000)
                        --without-gost" [RT #24367]

3104.   [bug]           Better support for cross-compiling. [RT #24367]

CHANGES
configure.in

diff --git a/CHANGES b/CHANGES
index 0c241ab1c70c487720e7f0c97c521c2ea83f3168..7b34496742f9f076daa210c7494fdab73621a501 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,8 @@
+3105.   [bug]           GOST support can be suppressed by "configure
+                        --without-gost" [RT #24367]
+
+3104.   [bug]           Better support for cross-compiling. [RT #24367]
+
 3103.  [bug]           Configuring 'dnssec-validation auto' in a view
                        instead of in the options statement could trigger
                        an assertion failure in named-checkconf. [RT #24382]
index ac4433a1c3f4f8706d1b0240709bf283fe8af04d..cb30f5c481c75e379bd1480cc8c7f9c9dae1d335 100644 (file)
@@ -18,7 +18,7 @@ AC_DIVERT_PUSH(1)dnl
 esyscmd([sed "s/^/# /" COPYRIGHT])dnl
 AC_DIVERT_POP()dnl
 
-AC_REVISION($Revision: 1.512.8.9 $)
+AC_REVISION($Revision: 1.512.8.10 $)
 
 AC_INIT(lib/dns/name.c)
 AC_PREREQ(2.59)
@@ -701,7 +701,25 @@ int main() {
                [AC_MSG_RESULT(yes)
                have_gost="yes"],
                [AC_MSG_RESULT(no)
-               have_gost="no"])
+               have_gost="no"],
+               [AC_MSG_RESULT(using --with-gost)])
+               AC_ARG_WITH(gost, , with_gost="$withval", with_gost="auto")
+               case "$with_gost" in
+               yes)
+                   case "$have_gost" in
+                   no)  AC_MSG_ERROR([gost not supported]) ;;
+                   *)  have_gost=yes ;;
+                   esac
+                   ;;
+               no)
+                   have_gost=no ;;
+               *)
+                   case "$have_gost" in
+                   yes|no) ;;
+                   *) AC_MSG_ERROR([need --with-gost=[[yes or no]]]) ;;
+                   esac
+                   ;;
+               esac
                case $have_gost in
                yes)
                        OPENSSL_GOST="yes"
@@ -1845,10 +1863,8 @@ char a[16],b[64]; return(inet_ntop(AF_INET6, a, b, sizeof(b)) == (char*)0);}],
        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"])
+       [AC_MSG_RESULT(assuming inet_ntop not needed)
+       ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP"])
 
 
 # On NetBSD 1.4.2 and maybe others, inet_pton() incorrectly accepts
@@ -1870,14 +1886,10 @@ main() { char a[16]; return (inet_pton(AF_INET, "1.2.3", a) == 1 ? 1 :
        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_NEEDPTON="#define ISC_PLATFORM_NEEDPTON 1"])
 
 AC_SUBST(ISC_PLATFORM_NEEDNTOP)
 AC_SUBST(ISC_PLATFORM_NEEDPTON)
@@ -2381,8 +2393,9 @@ ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long long int"],
 ],[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)])
+AC_ARG_WITH(rlimtype, , rlimtype="$withval", rlimtype="long long int")
+ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE $rlimtype"
+AC_MSG_RESULT(cannot determine type of rlim_cur when cross compiling - assuming $rlimtype)])
 ])
 AC_SUBST(ISC_PLATFORM_RLIMITTYPE)
 
@@ -2591,27 +2604,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