Print pkg-config error if the module is not available

pull/16/merge
Tatsuhiro Tsujikawa 2012-04-07 21:43:03 +09:00
parent 7e5814f0f9
commit e5932879db
1 changed files with 25 additions and 10 deletions

View File

@ -99,10 +99,13 @@ if test "x$with_sqlite3" = "xyes"; then
LIBS="$SQLITE3_LIBS $LIBS" LIBS="$SQLITE3_LIBS $LIBS"
CPPFLAGS="$SQLITE3_CFLAGS $CPPFLAGS" CPPFLAGS="$SQLITE3_CFLAGS $CPPFLAGS"
AC_CHECK_FUNCS([sqlite3_open_v2]) AC_CHECK_FUNCS([sqlite3_open_v2])
elif test "x$with_sqlite3_requested" = "xyes"; then else
AC_MSG_WARN([$SQLITE3_PKG_ERRORS])
if test "x$with_sqlite3_requested" = "xyes"; then
ARIA2_DEP_NOT_MET([sqlite3]) ARIA2_DEP_NOT_MET([sqlite3])
fi fi
fi fi
fi
if test "x$with_gnutls" = "xyes"; then if test "x$with_gnutls" = "xyes"; then
# gnutls >= 2.8 doesn't have libgnutls-config anymore. We require # gnutls >= 2.8 doesn't have libgnutls-config anymore. We require
@ -113,10 +116,13 @@ if test "x$with_gnutls" = "xyes"; then
AC_DEFINE([HAVE_LIBGNUTLS], [1], [Define to 1 if you have libgnutls.]) AC_DEFINE([HAVE_LIBGNUTLS], [1], [Define to 1 if you have libgnutls.])
LIBS="$LIBGNUTLS_LIBS $LIBS" LIBS="$LIBGNUTLS_LIBS $LIBS"
CPPFLAGS="$LIBGNUTLS_CFLAGS $CPPFLAGS" CPPFLAGS="$LIBGNUTLS_CFLAGS $CPPFLAGS"
elif test "x$with_gnutls_requested" = "xyes"; then else
AC_MSG_WARN([$LIBGNUTLS_PKG_ERRORS])
if test "x$with_gnutls_requested" = "xyes"; then
ARIA2_DEP_NOT_MET([gnutls]) ARIA2_DEP_NOT_MET([gnutls])
fi fi
fi fi
fi
if test "x$with_openssl" = "xyes" && test "x$have_libgnutls" != "xyes"; then if test "x$with_openssl" = "xyes" && test "x$have_libgnutls" != "xyes"; then
PKG_CHECK_MODULES([OPENSSL], [openssl >= 0.9.8], PKG_CHECK_MODULES([OPENSSL], [openssl >= 0.9.8],
@ -134,10 +140,13 @@ if test "x$with_openssl" = "xyes" && test "x$have_libgnutls" != "xyes"; then
AC_CHECK_FUNCS([EVP_sha256]) AC_CHECK_FUNCS([EVP_sha256])
AC_CHECK_FUNCS([EVP_sha384]) AC_CHECK_FUNCS([EVP_sha384])
AC_CHECK_FUNCS([EVP_sha512]) AC_CHECK_FUNCS([EVP_sha512])
elif test "x$with_openssl_requested" = "xyes"; then else
AC_MSG_WARN([$OPENSSL_PKG_ERRORS])
if test "x$with_openssl_requested" = "xyes"; then
ARIA2_DEP_NOT_MET([openssl]) ARIA2_DEP_NOT_MET([openssl])
fi fi
fi fi
fi
if test "x$have_openssl" != "xyes"; then if test "x$have_openssl" != "xyes"; then
if test "x$with_libnettle" = "xyes"; then if test "x$with_libnettle" = "xyes"; then
@ -175,10 +184,13 @@ if test "x$with_libcares" = "xyes"; then
CPPFLAGS="$LIBCARES_CFLAGS $CPPFLAGS" CPPFLAGS="$LIBCARES_CFLAGS $CPPFLAGS"
AC_CHECK_TYPES([ares_addr_node], [], [], [[#include <ares.h>]]) AC_CHECK_TYPES([ares_addr_node], [], [], [[#include <ares.h>]])
AC_CHECK_FUNCS([ares_set_servers]) AC_CHECK_FUNCS([ares_set_servers])
elif test "x$with_libcares_requested" = "xyes"; then else
AC_MSG_WARN([$LIBCARES_PKG_ERRORS])
if test "x$with_libcares_requested" = "xyes"; then
ARIA2_DEP_NOT_MET([libcares]) ARIA2_DEP_NOT_MET([libcares])
fi fi
fi fi
fi
# Check availability of libz # Check availability of libz
if test "x$with_libz" = "xyes"; then if test "x$with_libz" = "xyes"; then
@ -187,10 +199,13 @@ if test "x$with_libz" = "xyes"; then
AC_DEFINE([HAVE_ZLIB], [1], [Define to 1 if you have zlib.]) AC_DEFINE([HAVE_ZLIB], [1], [Define to 1 if you have zlib.])
LIBS="$ZLIB_LIBS $LIBS" LIBS="$ZLIB_LIBS $LIBS"
CPPFLAGS="$ZLIB_CFLAGS $CPPFLAGS" CPPFLAGS="$ZLIB_CFLAGS $CPPFLAGS"
elif test "x$with_libz_requested" = "xyes"; then else
AC_MSG_WARN([$ZLIB_PKG_ERRORS])
if test "x$with_libz_requested" = "xyes"; then
ARIA2_DEP_NOT_MET([libz]) ARIA2_DEP_NOT_MET([libz])
fi fi
fi fi
fi
# Define variables based on the result of the checks for libraries. # Define variables based on the result of the checks for libraries.
if test "x$have_libgnutls" = "xyes" || test "x$have_openssl" = "xyes"; then if test "x$have_libgnutls" = "xyes" || test "x$have_openssl" = "xyes"; then