src/main.c
changeset 323 3b24a0bd41ee
parent 320 53e1185e2366
child 325 73393734833c
     1.1 --- a/src/main.c	Tue Jan 06 14:06:00 2009 +0000
     1.2 +++ b/src/main.c	Wed Jan 07 17:17:10 2009 +0000
     1.3 @@ -19,6 +19,8 @@
     1.4  
     1.5  #define _GNU_SOURCE
     1.6  
     1.7 +#include "config.h"
     1.8 +
     1.9  #include <stdlib.h>
    1.10  #include <stddef.h>
    1.11  #include <stdio.h>
    1.12 @@ -28,7 +30,9 @@
    1.13  #include <unistd.h>
    1.14  #include <fcntl.h>
    1.15  #include <dirent.h>
    1.16 +#ifdef HAVE_CURL
    1.17  #include <curl/curl.h>
    1.18 +#endif
    1.19  #include <fnmatch.h>
    1.20  #include <errno.h>
    1.21  #include "razor.h"
    1.22 @@ -348,6 +352,9 @@
    1.23  static int
    1.24  download_if_missing(const char *url, const char *file)
    1.25  {
    1.26 +#ifndef HAVE_CURL
    1.27 +	return 1;
    1.28 +#else
    1.29  	CURL *curl;
    1.30  	struct stat buf;
    1.31  	char error[256];
    1.32 @@ -398,6 +405,7 @@
    1.33  	curl_easy_cleanup(curl);
    1.34  
    1.35  	return 0;
    1.36 +#endif	/* HAVE_CURL */
    1.37  }
    1.38  
    1.39  #define YUM_URL "http://download.fedora.redhat.com" \