mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
ldns version check added.
git-svn-id: file:///svn/unbound/trunk@1346 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
7fc590cda5
commit
3bdd807610
3 changed files with 93 additions and 0 deletions
90
configure
vendored
90
configure
vendored
|
|
@ -26250,6 +26250,96 @@ _ACEOF
|
|||
|
||||
fi
|
||||
|
||||
{ echo "$as_me:$LINENO: checking for ldns_b32_ntop_extended_hex" >&5
|
||||
echo $ECHO_N "checking for ldns_b32_ntop_extended_hex... $ECHO_C" >&6; }
|
||||
if test "${ac_cv_func_ldns_b32_ntop_extended_hex+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
/* Define ldns_b32_ntop_extended_hex to an innocuous variant, in case <limits.h> declares ldns_b32_ntop_extended_hex.
|
||||
For example, HP-UX 11i <limits.h> declares gettimeofday. */
|
||||
#define ldns_b32_ntop_extended_hex innocuous_ldns_b32_ntop_extended_hex
|
||||
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char ldns_b32_ntop_extended_hex (); below.
|
||||
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
|
||||
<limits.h> exists even on freestanding compilers. */
|
||||
|
||||
#ifdef __STDC__
|
||||
# include <limits.h>
|
||||
#else
|
||||
# include <assert.h>
|
||||
#endif
|
||||
|
||||
#undef ldns_b32_ntop_extended_hex
|
||||
|
||||
/* Override any GCC internal prototype to avoid an error.
|
||||
Use char because int might match the return type of a GCC
|
||||
builtin and then its argument prototype would still apply. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
char ldns_b32_ntop_extended_hex ();
|
||||
/* The GNU C library defines this for functions which it implements
|
||||
to always fail with ENOSYS. Some functions are actually named
|
||||
something starting with __ and the normal name is an alias. */
|
||||
#if defined __stub_ldns_b32_ntop_extended_hex || defined __stub___ldns_b32_ntop_extended_hex
|
||||
choke me
|
||||
#endif
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return ldns_b32_ntop_extended_hex ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext conftest$ac_exeext
|
||||
if { (ac_try="$ac_link"
|
||||
case "(($ac_try" in
|
||||
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
||||
*) ac_try_echo=$ac_try;;
|
||||
esac
|
||||
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
||||
(eval "$ac_link") 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } && {
|
||||
test -z "$ac_c_werror_flag" ||
|
||||
test ! -s conftest.err
|
||||
} && test -s conftest$ac_exeext &&
|
||||
$as_test_x conftest$ac_exeext; then
|
||||
ac_cv_func_ldns_b32_ntop_extended_hex=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_cv_func_ldns_b32_ntop_extended_hex=no
|
||||
fi
|
||||
|
||||
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
fi
|
||||
{ echo "$as_me:$LINENO: result: $ac_cv_func_ldns_b32_ntop_extended_hex" >&5
|
||||
echo "${ECHO_T}$ac_cv_func_ldns_b32_ntop_extended_hex" >&6; }
|
||||
if test $ac_cv_func_ldns_b32_ntop_extended_hex = yes; then
|
||||
:
|
||||
else
|
||||
|
||||
{ { echo "$as_me:$LINENO: error: ldns version too old, need >=1.4.0" >&5
|
||||
echo "$as_me: error: ldns version too old, need >=1.4.0" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
|
||||
|
||||
else
|
||||
|
||||
|
|
|
|||
|
|
@ -999,6 +999,8 @@ AC_ARG_WITH(ldns,
|
|||
AC_CHECK_LIB(ldns, ldns_buffer_copy, [
|
||||
dnl ldns was found, check compat functions
|
||||
AC_CHECK_LIB(ldns, [ldns_rr_free])
|
||||
AC_CHECK_FUNC([ldns_b32_ntop_extended_hex],, [
|
||||
AC_MSG_ERROR([ldns version too old, need >=1.4.0])])
|
||||
] , [
|
||||
dnl use the builtin ldns-src.tar.gz file to build ldns.
|
||||
if test ! -f $srcdir/ldns-src.tar.gz; then
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
13 November 2008: Wouter
|
||||
- added fedora init and specfile to contrib (by Paul Wouters).
|
||||
- added configure check for ldns 1.4.0 (using its compat funcs).
|
||||
|
||||
12 November 2008: Wouter
|
||||
- add unbound-control manpage to makedist replace list.
|
||||
|
|
|
|||
Loading…
Reference in a new issue