Skip to contentSkip to conversation

broken hesiod check

PATCH Guillaume Rousse 1 participant 2 messages Aug 23, 2006 Kernel automounter

lore
Share & tools
lore
#0 lore raw

The hesiod check macros breaks configure script by changing LIBS value inconditionally, wich is evil.

This patch correct this, by saving and restoring original value as needed.

aclocal.m4 +0 -0
diff -Naur autofs-5.0.1/aclocal.m4 autofs-5.0.1-fix-hesiod-check/aclocal.m4

15:29:28.000000000 +0200
@@ -178,7 +178,11 @@
dnl
--------------------------------------------------------------------------
AC_DEFUN([AF_CHECK_LIBHESIOD],
[AC_MSG_CHECKING(for libhesiod)
-LIBS="$LIBHESIOD -lhesiod -lresolv"
+
+# save current ldflags
+af_check_hesiod_save_ldflags="$LDFLAGS"
+LDFLAGS="$LDFLAGS -lhesiod -lresolv"
+
AC_TRY_LINK(
[ #include <hesiod.h> ],
[ char *c; hesiod_init(&c); ],
@@ -186,5 +190,8 @@
LIBHESIOD="$LIBHESIOD -lhesiod -lresolv"
AC_MSG_RESULT(yes) ],
[ AC_MSG_RESULT(no) ])
+
+# restore ldflags
+LDFLAGS="$af_check_hesiod_save_ldflags"
])

Signature · 5 lines
Guillaume Rousse
Projet Estime, INRIA
Domaine de Voluceau
Rocquencourt - B.P. 105
78153 Le Chesnay Cedex - France
#1 lore raw
Quoted 2 lines · Guillaume Rousse

The hesiod check macros breaks configure script by changing LIBS value inconditionally, wich is evil.

I forget to precise it had also the unpleasant effect of making all following checks (sasl, ldap) fails because -lhesiod is systematically added to the linking attempt.

Signature · 5 lines
Guillaume Rousse
Projet Estime, INRIA
Domaine de Voluceau
Rocquencourt - B.P. 105
78153 Le Chesnay Cedex - France