diff options
Diffstat (limited to 'm4/libgnurl.m4')
-rw-r--r-- | m4/libgnurl.m4 | 21 |
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. */ |
152 | int x; | 153 | int x; |
153 | curl_easy_setopt(NULL,CURLOPT_URL,NULL); | 154 | curl_easy_setopt(NULL,CURLOPT_URL,NULL); |
154 | x=CURL_ERROR_SIZE; | 155 | x=CURL_ERROR_SIZE; |
155 | x=CURLOPT_WRITEFUNCTION; | 156 | x=CURLOPT_WRITEFUNCTION; |
156 | x=CURLOPT_FILE; | 157 | x=CURLOPT_WRITEDATA; |
157 | x=CURLOPT_ERRORBUFFER; | 158 | x=CURLOPT_ERRORBUFFER; |
158 | x=CURLOPT_STDERR; | 159 | x=CURLOPT_STDERR; |
159 | x=CURLOPT_VERBOSE; | 160 | x=CURLOPT_VERBOSE; |
160 | ])],libgnurl_cv_lib_gnurl_usable=yes,libgnurl_cv_lib_gnurl_usable=no) | 161 | if (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. */ |
167 | int x; | 169 | int x; |
168 | curl_easy_setopt(NULL,CURLOPT_URL,NULL); | 170 | curl_easy_setopt(NULL,CURLOPT_URL,NULL); |
169 | x=CURL_ERROR_SIZE; | 171 | x=CURL_ERROR_SIZE; |
170 | x=CURLOPT_WRITEFUNCTION; | 172 | x=CURLOPT_WRITEFUNCTION; |
171 | x=CURLOPT_FILE; | 173 | x=CURLOPT_WRITEDATA; |
172 | x=CURLOPT_ERRORBUFFER; | 174 | x=CURLOPT_ERRORBUFFER; |
173 | x=CURLOPT_STDERR; | 175 | x=CURLOPT_STDERR; |
174 | x=CURLOPT_VERBOSE; | 176 | x=CURLOPT_VERBOSE; |
175 | ])],libgnurl_cv_lib_gnurl_usable=yes) | 177 | if (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 |