On Mon, Mar 12, 2012 at 08:22:49PM +0100, Simon Josefsson wrote:
> Shishi is an implementation of the Kerberos 5 network authentication
> system.  Shishi can be used to authenticate users in distributed
> systems.  Shishi is part of a GNU system.
> 
> * Version 1.0.1 (released 2012-03-12)

libresolv.so does not provide res_query on some architectures.  At least
on amd64 here, libresolv.so provides __res_query only and res_query is
defined by resolv.h.  So, configure cannot find res_query in libresolv.so
with AC_CHECK_LIB.

The attached patch includes resolv.h in the test and works for me.

-- 
Eray Aslan <[email protected]>
--- configure.ac        2012-03-12 20:18:21.000000000 +0200
+++ configure.ac        2012-03-14 22:03:15.854332138 +0200
@@ -82,7 +82,27 @@
 
 # Checks for library functions.
 AC_CHECK_FUNCS(signal select ngettext gethostbyname getpwnam getuid)
-AC_CHECK_LIB(resolv, res_query,, AC_MSG_WARN([[no libresolv, SRV RRs not 
used]]))
+
+# libresolv provides only __res_query on some architectures
+# so we cannot just use AC_CHECK_LIB
+_save_LIBS="$LIBS"
+LIBS="$LIBS -lresolv"
+AC_MSG_CHECKING(for res_query in -lresolv)
+AC_LINK_IFELSE([
+#include <resolv.h>
+int main()
+{
+  res_query (0, 0, 0, 0, 0);
+  return 0;
+}],
+[_res_query_in_resolv=yes],
+[_res_query_in_resolv=no])
+AC_MSG_RESULT([$_res_query_in_resolv])
+if test "x$_res_query_in_resolv" = "xno"; then
+  LIBS="$_save_LIBS"
+  AC_MSG_WARN([[no libresolv, SRV RRs not used]])
+fi
+
 AC_SEARCH_LIBS(socket, socket)
 AC_SEARCH_LIBS(gethostbyname, nsl)
 
_______________________________________________
Help-shishi mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-shishi

Reply via email to