diff options
author | Alessio Vanni <vannilla@firemail.cc> | 2021-11-11 00:56:30 +0100 |
---|---|---|
committer | Alessio Vanni <vannilla@firemail.cc> | 2021-11-21 18:42:34 +0100 |
commit | 20ffa0aa543853fb0d395167fb0a090c0e369db0 (patch) | |
tree | 0f6b0ae7414790cf6fc525c8b8e62446e37efc6d /m4/libgnurl.m4 | |
parent | d744d49e13fa6175016e8dcfc0f9506b9f170759 (diff) | |
download | gnunet-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.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 |