aboutsummaryrefslogtreecommitdiff
path: root/m4/libgnurl.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4/libgnurl.m4')
-rw-r--r--m4/libgnurl.m421
1 files changed, 12 insertions, 9 deletions
diff --git a/m4/libgnurl.m4 b/m4/libgnurl.m4
index 412709373..d030c5dd8 100644
--- a/m4/libgnurl.m4
+++ b/m4/libgnurl.m4
@@ -1,3 +1,4 @@
1###########################################################################
1# LIBGNURL_CHECK_CONFIG ([DEFAULT-ACTION], [MINIMUM-VERSION], 2# LIBGNURL_CHECK_CONFIG ([DEFAULT-ACTION], [MINIMUM-VERSION],
2# [ACTION-IF-YES], [ACTION-IF-NO]) 3# [ACTION-IF-YES], [ACTION-IF-NO])
3# ---------------------------------------------------------- 4# ----------------------------------------------------------
@@ -146,34 +147,36 @@ AC_DEFUN([LIBGNURL_CHECK_CONFIG],
146 _libgnurl_save_libs=$LIBS 147 _libgnurl_save_libs=$LIBS
147 LIBS="$LIBGNURL $LIBS" 148 LIBS="$LIBGNURL $LIBS"
148 149
149 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <curl/curl.h>],[ 150 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <curl/curl.h>]],[[
150/* Try and use a few common options to force a failure if we are 151/* Try and use a few common options to force a failure if we are
151 missing symbols or can't link. */ 152 missing symbols or can't link. */
152int x; 153int x;
153curl_easy_setopt(NULL,CURLOPT_URL,NULL); 154curl_easy_setopt(NULL,CURLOPT_URL,NULL);
154x=CURL_ERROR_SIZE; 155x=CURL_ERROR_SIZE;
155x=CURLOPT_WRITEFUNCTION; 156x=CURLOPT_WRITEFUNCTION;
156x=CURLOPT_FILE; 157x=CURLOPT_WRITEDATA;
157x=CURLOPT_ERRORBUFFER; 158x=CURLOPT_ERRORBUFFER;
158x=CURLOPT_STDERR; 159x=CURLOPT_STDERR;
159x=CURLOPT_VERBOSE; 160x=CURLOPT_VERBOSE;
160])],libgnurl_cv_lib_gnurl_usable=yes,libgnurl_cv_lib_gnurl_usable=no) 161if (x) {;}
162]])],libgnurl_cv_lib_gnurl_usable=yes,libgnurl_cv_lib_gnurl_usable=no)
161 163
162# BEGIN Changes from original libcurl.m4: 164# BEGIN Changes from original libcurl.m4:
163# Give it a 2nd shot using 'gnurl/curl.h' 165# Give it a second shot using 'gnurl/curl.h'
164 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <gnurl/curl.h>],[ 166 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <gnurl/curl.h>]],[[
165/* Try and use a few common options to force a failure if we are 167/* Try and use a few common options to force a failure if we are
166 missing symbols or can't link. */ 168 missing symbols or can't link. */
167int x; 169int x;
168curl_easy_setopt(NULL,CURLOPT_URL,NULL); 170curl_easy_setopt(NULL,CURLOPT_URL,NULL);
169x=CURL_ERROR_SIZE; 171x=CURL_ERROR_SIZE;
170x=CURLOPT_WRITEFUNCTION; 172x=CURLOPT_WRITEFUNCTION;
171x=CURLOPT_FILE; 173x=CURLOPT_WRITEDATA;
172x=CURLOPT_ERRORBUFFER; 174x=CURLOPT_ERRORBUFFER;
173x=CURLOPT_STDERR; 175x=CURLOPT_STDERR;
174x=CURLOPT_VERBOSE; 176x=CURLOPT_VERBOSE;
175])],libgnurl_cv_lib_gnurl_usable=yes) 177if (x) {;}
176# END Changes from original libcurl.m4: 178]])],libgnurl_cv_lib_gnurl_usable=yes,libgnurl_cv_lib_gnurl_usable=no)
179# END Changes from original libcurl.m4
177 180
178 CPPFLAGS=$_libgnurl_save_cppflags 181 CPPFLAGS=$_libgnurl_save_cppflags
179 LIBS=$_libgnurl_save_libs 182 LIBS=$_libgnurl_save_libs
@@ -183,7 +186,7 @@ x=CURLOPT_VERBOSE;
183 186
184 if test $libgnurl_cv_lib_gnurl_usable = yes ; then 187 if test $libgnurl_cv_lib_gnurl_usable = yes ; then
185 188
186 # Does gnurl_free() exist in this version of libgnurl? 189 # Does curl_free() exist in this version of libgnurl?
187 # If not, fake it with free() 190 # If not, fake it with free()
188 191
189 _libgnurl_save_cppflags=$CPPFLAGS 192 _libgnurl_save_cppflags=$CPPFLAGS