Commit b123b265 authored by Mark Andrews's avatar Mark Andrews

3435. [bug] Cross compilation support in configure was broken.

                        [RT #32078]
parent bcf15a19
3435. [bug] Cross compilation support in configure was broken.
[RT #32078]
3434. [bug] Pass client info to the DLZ findzone() entry
point in addition to lookup(). This makes it
possible for a database to answer differently
......
......@@ -287,6 +287,9 @@ int sigwait(const unsigned int *set, int *sig);
/* Define to 1 if you have the <net/if6.h> header file. */
#undef HAVE_NET_IF6_H
/* Define if your OpenSSL version supports ECDSA. */
#undef HAVE_OPENSSL_ECDSA
/* Define if your OpenSSL version supports GOST. */
#undef HAVE_OPENSSL_GOST
......
......@@ -69,7 +69,7 @@ case $host in
esac
AC_ARG_ENABLE(threads,
[ --enable-threads enable multithreading])
[ --enable-threads enable multithreading])
case "$enable_threads" in
yes)
use_threads=true
......
This diff is collapsed.
......@@ -63,7 +63,7 @@ It is available from http://www.isc.org as a separate download.])
;;
esac
AC_ARG_ENABLE(developer, [ --enable-developer enable developer build settings])
AC_ARG_ENABLE(developer, [ --enable-developer enable developer build settings])
case "$enable_developer" in
yes)
test "${enable_fixed_rrset+set}" = set || enable_fixed_rrset=yes
......@@ -142,7 +142,7 @@ AC_SUBST(PERL)
# If python is unavailable, we simply don't build those.
#
AC_ARG_WITH(python,
[ --with-python=PATH Specify path to python interpreter],
[ --with-python=PATH Specify path to python interpreter],
use_python="$withval", use_python="unspec")
case "$use_python" in
......@@ -514,6 +514,8 @@ int main() {
[AC_MSG_RESULT(yes)
ISC_PLATFORM_HAVEEPOLL="#define ISC_PLATFORM_HAVEEPOLL 1"],
[AC_MSG_RESULT(no)
ISC_PLATFORM_HAVEEPOLL="#undef ISC_PLATFORM_HAVEEPOLL"],
[AC_MSG_RESULT(no)
ISC_PLATFORM_HAVEEPOLL="#undef ISC_PLATFORM_HAVEEPOLL"])
;;
yes)
......@@ -760,20 +762,20 @@ no)
;;
esac
AC_MSG_CHECKING(for OpenSSL DSA support)
if test -f $use_openssl/include/openssl/dsa.h
then
AC_DEFINE(HAVE_OPENSSL_DSA)
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
AC_MSG_CHECKING(for OpenSSL DSA support)
if test -f $use_openssl/include/openssl/dsa.h
then
AC_DEFINE(HAVE_OPENSSL_DSA)
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
AC_CHECK_FUNCS(EVP_sha256 EVP_sha384 EVP_sha512)
AC_CHECK_FUNCS(EVP_sha256 EVP_sha384 EVP_sha512)
AC_MSG_CHECKING(for OpenSSL ECDSA support)
have_ecdsa=""
AC_TRY_RUN([
AC_MSG_CHECKING(for OpenSSL ECDSA support)
have_ecdsa=""
AC_TRY_RUN([
#include <stdio.h>
#include <openssl/ecdsa.h>
#include <openssl/objects.h>
......@@ -790,22 +792,42 @@ int main() {
return (0);
}
],
[AC_MSG_RESULT(yes)
have_ecdsa="yes"],
[AC_MSG_RESULT(no)
have_ecdsa="no"])
case $have_ecdsa in
yes)
OPENSSL_ECDSA="yes"
AC_DEFINE(HAVE_OPENSSL_ECDSA)
;;
*)
;;
esac
AC_MSG_CHECKING(for OpenSSL GOST support)
have_gost=""
AC_TRY_RUN([
[AC_MSG_RESULT(yes)
have_ecdsa="yes"],
[AC_MSG_RESULT(no)
have_ecdsa="no"],
[AC_MSG_RESULT(using --with-ecdsa)])
AC_ARG_WITH(ecdsa, [ --with-ecdsa OpenSSL ECDSA],
with_ecdsa="$withval", with_ecdsa="auto")
case "$with_ecdsa" in
yes)
case "$have_ecdsa" in
no) AC_MSG_ERROR([ecdsa not supported]) ;;
*) have_ecdsa=yes ;;
esac
;;
no)
have_ecdsa=no ;;
*)
case "$have_ecdsa" in
yes|no) ;;
*) AC_MSG_ERROR([need --with-ecdsa=[[yes or no]]]) ;;
esac
;;
esac
case $have_ecdsa in
yes)
OPENSSL_ECDSA="yes"
AC_DEFINE(HAVE_OPENSSL_ECDSA, 1,
[Define if your OpenSSL version supports ECDSA.])
;;
*)
;;
esac
AC_MSG_CHECKING(for OpenSSL GOST support)
have_gost=""
AC_TRY_RUN([
#include <openssl/conf.h>
#include <openssl/engine.h>
int main() {
......@@ -827,43 +849,44 @@ int main() {
#endif
}
],
[AC_MSG_RESULT(yes)
have_gost="yes"],
[AC_MSG_RESULT(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"
AC_DEFINE(HAVE_OPENSSL_GOST, 1,
[Define if your OpenSSL version supports GOST.])
;;
*)
;;
esac
CFLAGS="$saved_cflags"
LIBS="$saved_libs"
OPENSSLLINKOBJS='${OPENSSLLINKOBJS}'
OPENSSLLINKSRCS='${OPENSSLLINKSRCS}'
[AC_MSG_RESULT(yes)
have_gost="yes"],
[AC_MSG_RESULT(no)
have_gost="no"],
[AC_MSG_RESULT(using --with-gost)])
AC_ARG_WITH(gost, [ --with-gost OpenSSL 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"
AC_DEFINE(HAVE_OPENSSL_GOST, 1,
[Define if your OpenSSL version supports GOST.])
;;
*)
;;
esac
CFLAGS="$saved_cflags"
LIBS="$saved_libs"
OPENSSLLINKOBJS='${OPENSSLLINKOBJS}'
OPENSSLLINKSRCS='${OPENSSLLINKSRCS}'
;;
;;
esac
#
......@@ -1144,6 +1167,11 @@ AC_ARG_WITH(randomdev,
case "$use_randomdev" in
unspec)
case "$cross_compiling" in
yes)
AC_MSG_RESULT(unspecified)
AC_MSG_ERROR([ need --with-randomdev=PATH or --with-randomdev=no])
esac
case "$host" in
*-openbsd*)
devrandom=/dev/arandom
......@@ -1156,6 +1184,7 @@ case "$use_randomdev" in
AC_CHECK_FILE($devrandom,
AC_DEFINE_UNQUOTED(PATH_RANDOMDEV,
"$devrandom"),)
;;
yes)
AC_MSG_ERROR([--with-randomdev must specify a path])
......@@ -1664,8 +1693,8 @@ AC_SUBST(LIBTOOL_IN_MAIN)
# build exportable DNS library?
#
AC_ARG_ENABLE(exportlib,
[ --enable-exportlib build exportable library (GNU make required)
[[default=no]]])
[ --enable-exportlib build exportable library (GNU make required)
[[default=no]]])
case "$enable_exportlib" in
yes)
gmake=
......@@ -1690,8 +1719,8 @@ AC_SUBST(BIND9_CO_RULE)
AC_ARG_WITH(export-libdir,
[ --with-export-libdir[=PATH]
installation directory for the export library
[[EPREFIX/lib/bind9]]],
installation directory for the export library
[[EPREFIX/lib/bind9]]],
export_libdir="$withval",)
if test -z "$export_libdir"; then
export_libdir="\${exec_prefix}/lib/bind9/"
......@@ -1700,8 +1729,8 @@ AC_SUBST(export_libdir)
AC_ARG_WITH(export-includedir,
[ --with-export-includedir[=PATH]
installation directory for the header files of the
export library [[PREFIX/include/bind9]]],
installation directory for the header files of the
export library [[PREFIX/include/bind9]]],
export_includedir="$withval",)
if test -z "$export_includedir"; then
export_includedir="\${prefix}/include/bind9/"
......@@ -3222,7 +3251,7 @@ AC_SUBST(IDNLIBS)
# Check whether to build Automated Test Framework unit tests
#
AC_ARG_WITH(atf,
[ --with-atf=ARG Automated Test Framework support],
[ --with-atf=ARG Automated Test Framework support],
atf="$withval", atf="no")
if test "$atf" = yes; then
atf=`pwd`/unit/atf
......
......@@ -3423,6 +3423,7 @@
./util/update-drafts.pl PERL 2000,2001,2004,2007,2012
./util/update_branches PERL 2005,2007,2012
./util/update_copyrights PERL 1998,1999,2000,2001,2004,2005,2006,2007,2008,2009,2010,2012
./util/xc SH 2012
./version X 1998,1999,2000,2001,2003,2005,2006,2007,2008,2009,2010,2011,2012
./win32utils/BINDBuild.dsw X 2001,2005,2006,2008,2009,2010
./win32utils/BuildAll.bat BAT 2001,2002,2004,2005,2006,2007,2008,2009,2010
......
# Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# # AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
#
# test cross compiler
#
chmod=
next=0
for t in ${BUILD_CC} gcc cc
do
type $t > /dev/null 2>&1 && cc=$t && break
done
for i in "$@"
do
[ $next = 1 ] && chmod="$i"
case "$i" in
-o) next=1;;
*) next=0;;
esac
done
if ${cc:-false} "$@"
then
[ "$chmod" != "" ] && chmod a-x "$chmod"
exit 0;
else
exit 1;
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment