diff options
author | 1998-12-01 11:48:27 +0000 | |
---|---|---|
committer | 1998-12-01 11:48:27 +0000 | |
commit | 3a266a3545aaab889614191040540273d0916e26 (patch) | |
tree | 67f0e0da3c1444661e5c3968d83011b4e476eecf /aclocal.m4 | |
parent | 33302ff8754ee9f36d8b64fe74b9ab1e1d56d4a8 (diff) |
Add ares support in build system.
Diffstat (limited to 'aclocal.m4')
-rw-r--r-- | aclocal.m4 | 40 |
1 files changed, 38 insertions, 2 deletions
@@ -22,8 +22,8 @@ dnl Generates error if com_err not found. dnl ATHENA_UTIL_SS dnl Generates error if ss not found. dnl ATHENA_REGEXP -dnl Sets RX_LIBS if rx library used; ensures POSIX regexp -dnl support. +dnl Sets REGEX_LIBS if rx library used; ensures POSIX +dnl regexp support. dnl ATHENA_MOTIF dnl Sets MOTIF_LIBS and defines HAVE_MOTIF if Motif used. dnl ATHENA_MOTIF_REQUIRED @@ -52,6 +52,11 @@ dnl Sets HESIOD_LIBS and defines HAVE_HESIOD if Hesiod dnl used. dnl ATHENA_HESIOD_REQUIRED dnl Generates error if Hesiod not found. +dnl ATHENA_ARES +dnl Sets ARES_LIBS and defines HAVE_ARES if libares +dnl used. +dnl ATHENA_ARES_REQUIRED +dnl Generates error if libares not found. dnl dnl All of the macros may extend CPPFLAGS and LDFLAGS to let the dnl compiler find the requested libraries. Put ATHENA_UTIL_COM_ERR @@ -292,3 +297,34 @@ if test "$hesiod" != no; then else AC_MSG_ERROR(This package requires Hesiod.) fi]) + +dnl ----- libares ----- + +AC_DEFUN(ATHENA_ARES_CHECK, +[AC_CHECK_FUNC(res_send, :, AC_CHECK_LIB(resolv, res_send)) +if test "$ares" != yes; then + CPPFLAGS="$CPPFLAGS -I$ares/include" + LDFLAGS="$LDFLAGS -L$ares/lib" +fi +AC_CHECK_LIB(ares, ares_init, :, [AC_MSG_ERROR(libares not found)])]) + +AC_DEFUN(ATHENA_ARES, +[AC_ARG_WITH(ares, + [ --with-ares=PREFIX Use libares], + [ares="$withval"], [ares=no]) +if test "$ares" != no; then + ATHENA_ARES_CHECK + ARES_LIBS="-lares" + AC_DEFINE(HAVE_ARES) +fi +AC_SUBST(ARES_LIBS)]) + +AC_DEFUN(ATHENA_ARES_REQUIRED, +[AC_ARG_WITH(ares, + [ --with-ares=PREFIX Specify location of libares], + [ares="$withval"], [ares=yes]) +if test "$ares" != no; then + ATHENA_ARES_CHECK +else + AC_MSG_ERROR(This package requires libares.) +fi]) |