Only check for function if we are using libfetch

We did this check unconditionally, rather than only doing it if we were
actually going to build and run with libfetch. This is safe because we would
have already bailed if libfetch was explicitly requested but not found.

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2010-10-07 17:53:11 -05:00
parent 1e0e5b2a02
commit 73442a7e03
1 changed files with 3 additions and 1 deletions

View File

@ -158,9 +158,11 @@ AS_IF([test "x$with_fetch" != "xno"],
fi],
[-lcrypto -ldl])
# Check if libfetch supports connnection caching which we use
AC_CHECK_DECL(fetchConnectionCacheInit, ,
AS_IF([test "x$ac_cv_lib_fetch_fetchParseURL" = "xyes"],
[AC_CHECK_DECL(fetchConnectionCacheInit, ,
AC_MSG_ERROR([libfetch must be version 2.28 or greater]),
[#include <fetch.h>])
])
],
AC_MSG_RESULT(no))
AM_CONDITIONAL([HAVE_LIBFETCH], [test "x$ac_cv_lib_fetch_fetchParseURL" = "xyes"])