From: Wouter Wijngaards Date: Thu, 13 Nov 2008 09:26:02 +0000 (+0000) Subject: ldns version check added. X-Git-Tag: release-1.1.0~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3bdd8076106367960856b776325216a59c989012;p=thirdparty%2Funbound.git ldns version check added. git-svn-id: file:///svn/unbound/trunk@1346 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/configure b/configure index bbce39e6c..0b0e78084 100755 --- a/configure +++ b/configure @@ -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 declares ldns_b32_ntop_extended_hex. + For example, HP-UX 11i 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 to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#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 diff --git a/configure.ac b/configure.ac index 8679c6618..f20c468a7 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/doc/Changelog b/doc/Changelog index 34c4fed52..14380d746 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -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.