From 1df83267bd5130c905fe38c05ead52482d7d5f55 Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Thu, 30 Mar 2006 22:26:55 +0000 Subject: [PATCH] try autoreconfing our way to a happier AC_CHECK_LIB --- hesiod-3.1.0-libresolv.patch | 17 +++++++++++++++++ hesiod.spec | 2 ++ 2 files changed, 19 insertions(+) create mode 100644 hesiod-3.1.0-libresolv.patch diff --git a/hesiod-3.1.0-libresolv.patch b/hesiod-3.1.0-libresolv.patch new file mode 100644 index 0000000..468938a --- /dev/null +++ b/hesiod-3.1.0-libresolv.patch @@ -0,0 +1,17 @@ +Try to correctly find res_mkquery in libresolv, even in cases where a +preprocessor-based rename in may screw us up. +--- hesiod-3.1.0/configure.in 2006-03-30 11:22:11.000000000 -0500 ++++ hesiod-3.1.0/configure.in 2006-03-30 13:31:02.000000000 -0500 +@@ -12,7 +12,11 @@ + AC_EGREP_HEADER(pw_change, pwd.h, AC_DEFINE(HAVE_PW_CHANGE)) + AC_EGREP_HEADER(pw_expire, pwd.h, AC_DEFINE(HAVE_PW_EXPIRE)) + +-AC_CHECK_FUNC(res_mkquery, :, [AC_CHECK_LIB(resolv, res_mkquery)]) ++AC_CHECK_FUNC(res_mkquery, :, [AC_CHECK_LIB(resolv, res_mkquery,,[ ++saveLIBS="$LIBS" ++LIBS="-lresolv $LIBS" ++AC_TRY_LINK([#include ],[res_mkquery(0,NULL,0,0,NULL,0,NULL,NULL,0);],[AC_DEFINE(HAVE_RES_MKQUERY,1,[Define if your libresolv provides res_mkquery.])],[LIBS="$saveLIBS"]) ++])]) + + AC_CONFIG_HEADER(config.h) + AC_OUTPUT(Makefile) diff --git a/hesiod.spec b/hesiod.spec index 3219eff..2e2c9e4 100644 --- a/hesiod.spec +++ b/hesiod.spec @@ -10,6 +10,7 @@ Summary: Hesiod libraries. Group: System Environment/Libraries License: MIT Buildroot: %{_tmppath}/hesiod-root +BuildRequires: autoconf, automake, libtool %description Hesiod is a system which uses existing DNS functionality to provide access @@ -156,6 +157,7 @@ the header files and libraries required for building programs which use Hesiod. %patch1 -p1 -b .env %patch2 -p1 -b .str %patch3 -p1 -b .dnsparse +autoreconf %build %configure