From 67391c2c6cfa0044f554fb6a6b9717175d8d83a3 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Thu, 16 Dec 2010 17:19:07 -0500 Subject: Add configure.ac option for --with-curl To avoid breaking compilation, fetch defaults to 'no', and curl defaults to 'check'. Signed-off-by: Dave Reisner --- configure.ac | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 1039bba1..0ae9cba8 100644 --- a/configure.ac +++ b/configure.ac @@ -96,7 +96,12 @@ AC_ARG_WITH(openssl, # Help line for libfetch AC_ARG_WITH(fetch, AS_HELP_STRING([--with-fetch], [use libfetch as an internal downloader]), - [], [with_fetch=check]) + [], [with_fetch=no]) + +# Help line for libcurl +AC_ARG_WITH(curl, + AS_HELP_STRING([--with-curl], [use libcurl as an internal downloader]), + [], [with_curl=check]) # Help line for documentation AC_ARG_ENABLE(doc, @@ -149,6 +154,18 @@ AS_IF([test "x$with_openssl" != "xno"], AC_MSG_RESULT(no)) AM_CONDITIONAL([HAVE_LIBSSL], [test "x$ac_cv_lib_ssl_MD5_Final" = "xyes"]) +# Enable or disable usage of libcurl +AC_MSG_CHECKING(whether to link with libcurl) +AS_IF([test "x$with_curl" != "xno"], + [AC_MSG_RESULT(yes) + AC_CHECK_LIB([curl], [curl_easy_perform], , + [if test "x$with_curl" != "xcheck"; then + AC_MSG_FAILURE([--with-curl was given, but -lcurl was not found]) + fi], + [-lcurl])], + AC_MSG_RESULT(no)) +AM_CONDITIONAL([HAVE_LIBCURL], [test "x$ac_cv_lib_curl_curl_easy_perform" = "xyes"]) + # Enable or disable usage of libfetch AC_MSG_CHECKING(whether to link with libfetch) AS_IF([test "x$with_fetch" != "xno"], -- cgit v1.2.3-24-g4f1b From f2eac18a6ec62db3ec53744064e05416024c1b30 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Tue, 8 Feb 2011 21:05:53 -0500 Subject: Remove all traces of libfetch Signed-off-by: Dave Reisner --- configure.ac | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 0ae9cba8..88dee2f9 100644 --- a/configure.ac +++ b/configure.ac @@ -93,11 +93,6 @@ AC_ARG_WITH(openssl, AS_HELP_STRING([--with-openssl], [use OpenSSL crypto implementations instead of internal routines]), [], [with_openssl=check]) -# Help line for libfetch -AC_ARG_WITH(fetch, - AS_HELP_STRING([--with-fetch], [use libfetch as an internal downloader]), - [], [with_fetch=no]) - # Help line for libcurl AC_ARG_WITH(curl, AS_HELP_STRING([--with-curl], [use libcurl as an internal downloader]), @@ -166,25 +161,6 @@ AS_IF([test "x$with_curl" != "xno"], AC_MSG_RESULT(no)) AM_CONDITIONAL([HAVE_LIBCURL], [test "x$ac_cv_lib_curl_curl_easy_perform" = "xyes"]) -# Enable or disable usage of libfetch -AC_MSG_CHECKING(whether to link with libfetch) -AS_IF([test "x$with_fetch" != "xno"], - [AC_MSG_RESULT(yes) - AC_CHECK_LIB([fetch], [fetchParseURL], , - [if test "x$with_fetch" != "xcheck"; then - AC_MSG_FAILURE([--with-fetch was given, but -lfetch was not found]) - fi], - [-lcrypto -ldl]) - # Check if libfetch supports connnection caching which we use - 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 ]) - ]) - ], - AC_MSG_RESULT(no)) -AM_CONDITIONAL([HAVE_LIBFETCH], [test "x$ac_cv_lib_fetch_fetchParseURL" = "xyes"]) - # Checks for header files. AC_CHECK_HEADERS([fcntl.h glob.h libintl.h locale.h mntent.h string.h \ sys/ioctl.h sys/mount.h sys/param.h sys/statvfs.h \ -- cgit v1.2.3-24-g4f1b