AC_MSG_RESULT($have_gcc4)
-PKG_CHECK_MODULES(CURL, [libcurl])
+AC_ARG_WITH([curl],
+ [AS_HELP_STRING([--without-curl], [disable support for curl])],
+ [],
+ [with_curl=yes])
+
+CURL_CFLAGS=
+CURL_LIBS=
+AS_IF([test "x$with_curl" != xno],
+ [PKG_CHECK_MODULES(CURL, [libcurl])
+ AC_DEFINE([HAVE_CURL], [1], [Define if you have curl])])
AC_SUBST(CURL_CFLAGS)
AC_SUBST(CURL_LIBS)
#define _GNU_SOURCE
+#include "config.h"
+
#include <stdlib.h>
#include <stddef.h>
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <dirent.h>
+#ifdef HAVE_CURL
#include <curl/curl.h>
+#endif
#include <fnmatch.h>
#include <errno.h>
#include "razor.h"
static int
download_if_missing(const char *url, const char *file)
{
+#ifndef HAVE_CURL
+ return 1;
+#else
CURL *curl;
struct stat buf;
char error[256];
curl_easy_cleanup(curl);
return 0;
+#endif /* HAVE_CURL */
}
#define YUM_URL "http://download.fedora.redhat.com" \