Hello, 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. With this patch, ./configure should work even without explicit CFLAGS and it should also detect that bind-devel or bind-lite-devel packages are missing. -- Petr^2 Spacek
From e8feffa54b8e5835d32bfba2c20ef686b8349ec7 Mon Sep 17 00:00:00 2001 From: Petr Spacek <[email protected]> Date: Wed, 12 Nov 2014 16:03:12 +0100 Subject: [PATCH] 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. --- configure.ac | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/configure.ac b/configure.ac index c985908c760c974f7c02b6fa3d183e839bbeb9ad..d12ef7bb8c32f320e872d74405b980ced9bd28d8 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 <isc/errno2result.h> +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]) -- 2.1.0
_______________________________________________ Freeipa-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/freeipa-devel
