--- libcurl.m4.orig 2006-05-09 05:25:24.000000000 +0200 +++ libcurl.m4 2006-05-09 05:24:33.000000000 +0200 @@ -131,6 +131,7 @@ # we didn't find curl-config, so let's see if the user-supplied # link line (or failing that, "-lcurl") is enough. + _libcurl_save_LIBCURL=$LIBCURL LIBCURL=${LIBCURL-"$_libcurl_ldflags -lcurl"} AC_CACHE_CHECK([whether libcurl is usable], @@ -156,10 +157,15 @@ CPPFLAGS=$_libcurl_save_cppflags LIBS=$_libcurl_save_libs + unset _libcurl_save_libs unset _libcurl_save_cppflags - unset _libcurl_save_libs ]) + dnl libcurl is not usable, reset the LIBCURL variable + if test $libcurl_cv_lib_curl_usable = no ; then + LIBCURL=$_libcurl_save_LIBCURL + fi + if test $libcurl_cv_lib_curl_usable = yes ; then # Does curl_free() exist in this version of libcurl? @@ -224,6 +230,8 @@ unset _libcurl_ldflags fi +AM_CONDITIONAL(USE_LIBCURL, test x$libcurl_cv_lib_curl_usable = xyes) + if test x$_libcurl_with = xno || test x$libcurl_cv_lib_curl_usable != xyes ; then # This is the IF-NO path ifelse([$4],,:,[$4])