[ Forwarded mail from someone not on nmh-workers -ssen ]


From: Mark Histed <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: configure --with-hesiod: res_send test is pointless? (fwd)
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Date: Mon, 02 Oct 2000 11:35:27 -0400

Could you forward this to the nmh-workers list?  The redistributor won't let 
you send unless you are subscribed.
Thanks,
Mark

----------------------------

Right now configure.in contains tests to check for res_send if
- - --with-hesiod is specified.
However, as far as I can tell they don't seem to do anything even if
res_send isn't found, which sometimes happens:

GNU libc (2.1 is what I'm using) implements res_send as __res_send and
then resolv.h #defines res_send as __res_send.  Therefore using
AC_CHECK_LIB (resolv, res_send) fails because resolv.h isn't included.
I think that if you include resolv.h, the declaration there of
res_send() will conflict with configure calling res_send() with no
arguments (is there a portability reason to not specify arguments when
testing for functions?).

Sooo, as far as I can see the best way to handle this is just to test
for __res_send in libresolv and trust that resolv.h tells the
preprocessor to do the right thing.

Here's the patch for doing that.

Of course since apparently people have gotten along without these
tests for a while, maybe it's worth just removing them.

Hope this helps and I haven't missed anything obvious here...

Mark

diff -ur nmh-1.0.4+dev-20000807-orig/configure.in nmh-1.0.4+dev-20000807/configure.in
- - --- nmh-1.0.4+dev-20000807-orig/configure.in        Tue Aug  1 16:39:20 2000
+++ nmh-1.0.4+dev-20000807/configure.in Sun Sep 17 00:21:41 2000
@@ -538,8 +538,13 @@
     HESIOD_INCLUDES="-I$with_hesiod/include"
     HESIOD_LIBS="-L$with_hesiod/lib"
   fi
+
   AC_CHECK_FUNC(res_send, ,
- - -    AC_CHECK_LIB(resolv, res_send))
+    AC_CHECK_LIB(resolv, res_send, ,
+      dnl glibc2 defines res_send as __res_send
+      AC_CHECK_LIB(resolv, __res_send, ,
+        AC_MSG_ERROR(res_send not found))))
+
   AC_CHECK_LIB(hesiod, hes_resolve, [HESIOD_LIBS="$HESIOD_LIBS -lhesiod"],
     [AC_MSG_ERROR(Hesiod library not found)], $HESIOD_LIBS)
 fi


- ------- End of Forwarded Message




------- End of Forwarded Message

Reply via email to