summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--lib/libalpm/alpm.c6
-rw-r--r--lib/libalpm/dload.c6
-rw-r--r--lib/libalpm/error.c4
4 files changed, 9 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac
index 4341f1f5..b4570f58 100644
--- a/configure.ac
+++ b/configure.ac
@@ -150,7 +150,7 @@ AM_CONDITIONAL([HAVE_LIBSSL], [test "x$ac_cv_lib_ssl_MD5_Final" = "xyes"])
# Enable or disable usage of libfetch
AC_MSG_CHECKING(whether to link with libfetch)
-AS_IF([test "x$with_fetch" = "xyes"],
+AS_IF([test "x$with_fetch" != "xno"],
[AC_MSG_RESULT(yes)
AC_CHECK_LIB([fetch], [fetchParseURL], ,
[if test "x$with_fetch" != "xcheck"; then
diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c
index 6f4f4a4c..3f9cfff3 100644
--- a/lib/libalpm/alpm.c
+++ b/lib/libalpm/alpm.c
@@ -24,7 +24,7 @@
#include "config.h"
/* connection caching setup */
-#ifdef HAVE_FETCH
+#ifdef HAVE_LIBFETCH
#include <fetch.h>
#endif
@@ -59,7 +59,7 @@ int SYMEXPORT alpm_initialize(void)
bindtextdomain("libalpm", LOCALEDIR);
#endif
-#ifdef HAVE_FETCH
+#ifdef HAVE_LIBFETCH
fetchConnectionCacheInit(5, 1);
#endif
@@ -82,7 +82,7 @@ int SYMEXPORT alpm_release(void)
_alpm_handle_free(handle);
handle = NULL;
-#ifdef HAVE_FETCH
+#ifdef HAVE_LIBFETCH
fetchConnectionCacheClose();
#endif
diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c
index 32096e24..9b59f520 100644
--- a/lib/libalpm/dload.c
+++ b/lib/libalpm/dload.c
@@ -38,7 +38,7 @@
#include <sys/param.h> /* MAXHOSTNAMELEN */
#endif
-#ifdef HAVE_FETCH
+#ifdef HAVE_LIBFETCH
#include <fetch.h>
#endif
@@ -58,7 +58,7 @@ static char *get_filename(const char *url) {
return(filename);
}
-#ifdef HAVE_FETCH
+#ifdef HAVE_LIBFETCH
static char *get_destfile(const char *path, const char *filename) {
char *destfile;
/* len = localpath len + filename len + null */
@@ -338,7 +338,7 @@ cleanup:
static int download(const char *url, const char *localpath,
int force) {
if(handle->fetchcb == NULL) {
-#ifdef HAVE_FETCH
+#ifdef HAVE_LIBFETCH
return(download_internal(url, localpath, force));
#else
RET_ERR(PM_ERR_EXTERNAL_DOWNLOAD, -1);
diff --git a/lib/libalpm/error.c b/lib/libalpm/error.c
index b64ee67c..c83f606e 100644
--- a/lib/libalpm/error.c
+++ b/lib/libalpm/error.c
@@ -31,7 +31,7 @@
#include <sys/param.h> /* MAXHOSTNAMELEN */
#endif
-#ifdef HAVE_FETCH
+#ifdef HAVE_LIBFETCH
#include <fetch.h> /* fetchLastErrString */
#endif
@@ -145,7 +145,7 @@ const char SYMEXPORT *alpm_strerror(int err)
* error string instead. */
return _("libarchive error");
case PM_ERR_LIBFETCH:
-#ifdef HAVE_FETCH
+#ifdef HAVE_LIBFETCH
return fetchLastErrString;
#else
/* obviously shouldn't get here... */