aboutsummaryrefslogtreecommitdiff
path: root/m4/libgnurl.m4
diff options
context:
space:
mode:
authorAlessio Vanni <vannilla@firemail.cc>2021-11-11 00:56:30 +0100
committerAlessio Vanni <vannilla@firemail.cc>2021-11-21 18:42:34 +0100
commit20ffa0aa543853fb0d395167fb0a090c0e369db0 (patch)
tree0f6b0ae7414790cf6fc525c8b8e62446e37efc6d /m4/libgnurl.m4
parentd744d49e13fa6175016e8dcfc0f9506b9f170759 (diff)
downloadgnunet-20ffa0aa543853fb0d395167fb0a090c0e369db0.tar.gz
gnunet-20ffa0aa543853fb0d395167fb0a090c0e369db0.zip
Update configure.ac and a few macros used by it
The changes done to configure.ac are essentially divided in two categories: the first is made of changes to improve existing checks, even if it's merely in the message being printed during the check; the second category is made of updates aimed at bringing this file closer to Autoconf 2.71, which deprecated or even removed some stuff that was otherwise present either directly in configure.ac or in one of the macros it includes, which have been updated in this commit too. Actually, the generated configure script was created by Autoconf 2.71 during deveopment, so in a way it's already compatible with the latest version.
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