diff -ur curl-7.19.0/curl-7.19.0/configure.ac curl-7.19.0.new/curl-7.19.0/configure.ac
--- curl-7.19.0/curl-7.19.0/configure.ac	2008-09-23 13:06:20.000000000 +0200
+++ curl-7.19.0.new/curl-7.19.0/configure.ac	2008-09-24 14:41:20.000000000 +0200
@@ -459,6 +459,22 @@
        AC_SUBST(CURL_DISABLE_LDAPS, [1])
 )
 
+AC_MSG_CHECKING([whether to support proxiesy])
+AC_ARG_ENABLE(proxy,
+AC_HELP_STRING([--enable-proxy],[Enable proxy support])
+AC_HELP_STRING([--disable-proxy],[Disable proxy support]),
+[ case "$enableval" in
+  no)
+       AC_MSG_RESULT(no)
+       AC_DEFINE(CURL_DISABLE_PROXY, 1, [to disable proxies])
+       AC_SUBST(CURL_DISABLE_PROXY, [1])
+       ;;
+  *)   AC_MSG_RESULT(yes)
+       ;;
+  esac ],
+       AC_MSG_RESULT(yes)
+)
+
 AC_MSG_CHECKING([whether to support dict])
 AC_ARG_ENABLE(dict,
 AC_HELP_STRING([--enable-dict],[Enable DICT support])
diff -ur curl-7.19.0/curl-7.19.0/lib/config.h.in curl-7.19.0.new/curl-7.19.0/lib/config.h.in
--- curl-7.19.0/curl-7.19.0/lib/config.h.in	2008-09-23 13:06:21.000000000 +0200
+++ curl-7.19.0.new/curl-7.19.0/lib/config.h.in	2008-09-24 14:39:33.000000000 +0200
@@ -18,6 +18,9 @@
 /* to disable cryptographic authentication */
 #undef CURL_DISABLE_CRYPTO_AUTH
 
+/* to disable proxy support */
+#undef CURL_DISABLE_PROXY
+
 /* to disable DICT */
 #undef CURL_DISABLE_DICT
 
diff -ur curl-7.19.0/curl-7.19.0/lib/ftp.c curl-7.19.0.new/curl-7.19.0/lib/ftp.c
--- curl-7.19.0/curl-7.19.0/lib/ftp.c	2008-09-23 13:06:20.000000000 +0200
+++ curl-7.19.0.new/curl-7.19.0/lib/ftp.c	2008-09-24 16:42:25.000000000 +0200
@@ -1876,14 +1876,12 @@
     ftp_pasv_verbose(conn, conninfo, newhost, connectport);
 
   switch(data->set.proxytype) {
+#ifndef CURL_DISABLE_PROXY
   case CURLPROXY_SOCKS5:
   case CURLPROXY_SOCKS5_HOSTNAME:
     result = Curl_SOCKS5(conn->proxyuser, conn->proxypasswd, newhost, newport,
                          SECONDARYSOCKET, conn);
     break;
-  case CURLPROXY_HTTP:
-    /* do nothing here. handled later. */
-    break;
   case CURLPROXY_SOCKS4:
     result = Curl_SOCKS4(conn->proxyuser, newhost, newport,
                          SECONDARYSOCKET, conn, FALSE);
@@ -1892,6 +1890,10 @@
     result = Curl_SOCKS4(conn->proxyuser, newhost, newport,
                          SECONDARYSOCKET, conn, TRUE);
     break;
+#endif /* CURL_DISABLE_PROXY */
+  case CURLPROXY_HTTP:
+    /* do nothing here. handled later. */
+    break;
   default:
     failf(data, "unknown proxytype option given");
     result = CURLE_COULDNT_CONNECT;
diff -ur curl-7.19.0/curl-7.19.0/lib/socks.c curl-7.19.0.new/curl-7.19.0/lib/socks.c
--- curl-7.19.0/curl-7.19.0/lib/socks.c	2008-09-23 13:06:21.000000000 +0200
+++ curl-7.19.0.new/curl-7.19.0/lib/socks.c	2008-09-24 15:39:31.000000000 +0200
@@ -23,6 +23,7 @@
 
 #include "setup.h"
 
+#ifndef CURL_DISABLE_PROXY
 #include <string.h>
 
 #ifdef NEED_MALLOC_H
@@ -686,3 +687,6 @@
   Curl_nonblock(sock, TRUE);
   return CURLE_OK; /* Proxy was successful! */
 }
+
+#endif /* CURL_DISABLE_PROXY */
+
diff -ur curl-7.19.0/curl-7.19.0/lib/url.c curl-7.19.0.new/curl-7.19.0/lib/url.c
--- curl-7.19.0/curl-7.19.0/lib/url.c	2008-09-23 13:06:21.000000000 +0200
+++ curl-7.19.0.new/curl-7.19.0/lib/url.c	2008-09-24 16:41:48.000000000 +0200
@@ -2694,17 +2694,14 @@
     result = Curl_store_ip_addr(conn);
 
     if(CURLE_OK == result) {
-
       switch(data->set.proxytype) {
+#ifndef CURL_DISABLE_PROXY
       case CURLPROXY_SOCKS5:
       case CURLPROXY_SOCKS5_HOSTNAME:
         result = Curl_SOCKS5(conn->proxyuser, conn->proxypasswd,
                              conn->host.name, conn->remote_port,
                              FIRSTSOCKET, conn);
         break;
-      case CURLPROXY_HTTP:
-        /* do nothing here. handled later. */
-        break;
       case CURLPROXY_SOCKS4:
         result = Curl_SOCKS4(conn->proxyuser, conn->host.name,
                              conn->remote_port, FIRSTSOCKET, conn, FALSE);
@@ -2713,6 +2710,10 @@
         result = Curl_SOCKS4(conn->proxyuser, conn->host.name,
                              conn->remote_port, FIRSTSOCKET, conn, TRUE);
         break;
+#endif /* CURL_DISABLE_PROXY */
+      case CURLPROXY_HTTP:
+        /* do nothing here. handled later. */
+        break;
       default:
         failf(data, "unknown proxytype option given");
         result = CURLE_COULDNT_CONNECT;
@@ -3265,6 +3266,7 @@
   return CURLE_UNSUPPORTED_PROTOCOL;
 }
 
+#ifndef CURL_DISABLE_PROXY
 /****************************************************************
 * Detect what (if any) proxy to use. Remember that this selects a host
 * name and is not limited to HTTP proxies only.
@@ -3541,6 +3543,7 @@
 
   return CURLE_OK;
 }
+#endif /* CURL_DISABLE_PROXY */
 
 /*
  *
@@ -4159,6 +4162,7 @@
       return result;
   }
 
+#ifndef CURL_DISABLE_PROXY
   /*************************************************************
    * Extract the user and password from the authentication string
    *************************************************************/
@@ -4187,6 +4191,7 @@
     proxy = NULL;
   }
   /* proxy must be freed later unless NULL */
+#endif /* CURL_DISABLE_PROXY */
 
   /*************************************************************
    * No protocol part in URL was used, add it!
diff -ur curl-7.19.0/curl-7.19.0/src/config.h.in curl-7.19.0.new/curl-7.19.0/src/config.h.in
--- curl-7.19.0/curl-7.19.0/src/config.h.in	2008-09-23 13:06:19.000000000 +0200
+++ curl-7.19.0.new/curl-7.19.0/src/config.h.in	2008-09-24 15:38:10.000000000 +0200
@@ -18,6 +18,9 @@
 /* to disable cryptographic authentication */
 #undef CURL_DISABLE_CRYPTO_AUTH
 
+/* to disable proxy support */
+#undef CURL_DISABLE_PROXY
+
 /* to disable DICT */
 #undef CURL_DISABLE_DICT
 

