[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: zmailer and GNU autoconfig
[ On Wed, July 10, 1996 at 17:06:36 (+0300), Matti Aarnio wrote: ]
> Subject: Re: zmailer and GNU autoconfig
>
> Sometimes the gethostbyname() is at the libc, sometimes (like
> at Solaris) elsewere needing other libs, sometimes it is at
> the resolver library.. ... and sometimes the -lresolv version is
> preferred over the what ever is at libc ... (That isn't handled
> properly now, I think.)
With scotty/tkined I ended up changing the handling of -lresolv to the
following in order to get it to work properly on SunOS-4 systems which
had the new BIND-4.9.4 resolver in libc. I don't know if zmailer
currently makes use of the _res global options variable or not, but
here's how you can be sure you get the "right" resolver if you need it:
# The BIND 4.9.3/4.9.4 shared library for SunOS-4.1 doesn't make _res
# publicly available, so if we don't find it we need to link with
# -lresolv statically.
#
AC_CACHE_CHECK(_res without -lresolv, tk_cv_var__res, [
AC_TRY_LINK([#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>], [_res.options = RES_INIT;],
tk_cv_var__res=yes, tk_cv_var__res=no)
])
if test "$tk_cv_var__res" = "no"; then
LIBS="$LIBS -lresolv"
#
# Check again verbosely and make sure it is really there now...
#
AC_CACHE_CHECK(-lresolv, tk_cv_var__res_lresolv, [
AC_TRY_LINK([#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>], [_res.options = RES_INIT;],
tk_cv_var__res_lresolv=yes,
AC_MSG_ERROR(need resolver _res global but not in -lresolv; giving up))
])
fi
AC_CHECK_FUNC(res_mkquery, ,
AC_MSG_ERROR(bizzare -- _res but no res_mkquery; giving up))
There's lots of other good stuff in scotty's configure.in that deals
with networking interfaces....
--
Greg A. Woods
+1 416 443-1734 VE3TCP robohack!woods
Planix, Inc. <woods@planix.com>; Secrets of the Weird <woods@weird.com>