Index: /trunk/configure
===================================================================
--- /trunk/configure	(revision 19848)
+++ /trunk/configure	(revision 19849)
@@ -85,4 +85,5 @@
 BUILD_LIBXML2=
 BUILD_LIBXSLT=
+BUILD_LIBCURL=
 LIBCRYPTO="-lcrypto"
 LIBPTHREAD="-lpthread"
@@ -931,6 +932,7 @@
 check_curl()
 {
-  test_header libcurl
-  cat > $ODIR.tmp_src.cc << EOF
+  if [ -z "$BUILD_LIBCURL" ]; then
+    test_header libcurl
+    cat > $ODIR.tmp_src.cc << EOF
 #include <cstdio>
 #include <curl/curl.h>
@@ -947,11 +949,10 @@
 }
 EOF
-  [ -n "$INCCURL" ] && I_INCCURL=`prefix_I "$INCCURL"`
-#  if test_compile "$LIBCURL $I_INCCURL" libcurl libcurl nofatal; then
-  if test_compile "$LIBCURL $I_INCCURL" libcurl libcurl; then
-#    if test_execute nofatal; then
-    if test_execute; then
-      cnf_append "SDK_VBOX_LIBCURL_LIBS" "`strip_l "$LIBCURL"`"
-      cnf_append "SDK_VBOX_LIBCURL_INCS" "$INCCURL"
+    [ -n "$INCCURL" ] && I_INCCURL=`prefix_I "$INCCURL"`
+    if test_compile "$LIBCURL $I_INCCURL" libcurl libcurl; then
+      if test_execute; then
+        cnf_append "SDK_VBOX_LIBCURL_LIBS" "`strip_l "$LIBCURL"`"
+        cnf_append "SDK_VBOX_LIBCURL_INCS" "$INCCURL"
+      fi
     fi
   fi
@@ -1888,4 +1889,5 @@
   --build-libxml2          build libxml2 from sources
   --build-libxslt          build libxslt from sources
+  --build-curl             build libcurl from sources (PUEL only)
   --setup-wine             setup a Wine directory and register the hhc hack
 
@@ -2011,4 +2013,7 @@
     --build-libxslt)
       BUILD_LIBXSLT=1
+      ;;
+    --build-libcurl)
+      BUILD_LIBCURL=1
       ;;
     --build-headless)
@@ -2148,4 +2153,5 @@
   BUILD_LIBXSLT=1
   BUILD_LIBXML2=1
+  BUILD_LIBCURL=1
 fi
 
@@ -2176,5 +2182,5 @@
 [ "$OS" != "darwin"  ] && check_z
 [ "$OS" != "darwin" -a "$OS" != "freebsd" ] && check_png
-[ "$OS" != "darwin" -a $OSE -eq 0 ] && check_curl
+[ $OSE -eq 0 ] && check_curl
 [ $OSE -eq 0 -a "$OS" = "linux" ] && check_pam
 [ $WITH_SDL -eq 1 ]    && check_sdl
