From 3e364c72f79e3cec69fc4c3263cd0bccbc467bf5 Mon Sep 17 00:00:00 2001 From: Petr Spacek Date: Nov 26 2014 16:37:53 +0000 Subject: Improve detection of BIND 9 isc__errno2result header file. This header file is not in standard distribution so normal isc-config.sh detection is not enough. --- diff --git a/configure.ac b/configure.ac index c985908..d12ef7b 100644 --- a/configure.ac +++ b/configure.ac @@ -65,6 +65,8 @@ fi CFLAGS="$BIND9_CFLAGS $CFLAGS" # Checks for libraries. +AC_CHECK_LIB([isc], [isc_dir_open], [], + AC_MSG_ERROR([Install BIND9 ISC development files])) AC_CHECK_LIB([dns], [dns_name_init], [], AC_MSG_ERROR([Install BIND9 development files])) AC_CHECK_LIB([ldap], [ldap_initialize], [], @@ -87,6 +89,21 @@ int main(void) { [AC_MSG_ERROR([Cross compiling is not supported.])] ) +dnl isc__errno2result() is typically not present in standard header files +AC_MSG_CHECKING([isc__errno2result availability in header files]) +AC_TRY_RUN([ +#include +int main(void) { + isc__errno2result(0); + return 0; +}], +[AC_MSG_RESULT([yes])], +[AC_MSG_ERROR([ + Can't find isc__errno2result() or header isc/errno2result.h: + Please install bind-lite-devel package or similar.])], +[AC_MSG_ERROR([Cross compiling is not supported.])] +) + dnl Older autoconf (2.59, for example) doesn't define docdir [[ ! -n "$docdir" ]] && docdir='${datadir}/doc/${PACKAGE_TARNAME}' AC_SUBST([docdir])