aboutsummaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-10-23 09:32:28 +0000
committerChristian Grothoff <christian@grothoff.org>2013-10-23 09:32:28 +0000
commit6be112bbd13b5e6708decbf92f953326ecac8a25 (patch)
treef04cb152144d00df0320a15771c5cf75662c471a /m4
parent688785b0a58478c328a2219033cd7e373b6519ab (diff)
downloadgnunet-6be112bbd13b5e6708decbf92f953326ecac8a25.tar.gz
gnunet-6be112bbd13b5e6708decbf92f953326ecac8a25.zip
-moving from libcurl to libgnurl
Diffstat (limited to 'm4')
-rw-r--r--m4/libcurl.m4250
-rw-r--r--m4/libgnurl.m4250
2 files changed, 250 insertions, 250 deletions
diff --git a/m4/libcurl.m4 b/m4/libcurl.m4
deleted file mode 100644
index 01a0575cc..000000000
--- a/m4/libcurl.m4
+++ /dev/null
@@ -1,250 +0,0 @@
1# LIBCURL_CHECK_CONFIG ([DEFAULT-ACTION], [MINIMUM-VERSION],
2# [ACTION-IF-YES], [ACTION-IF-NO])
3# ----------------------------------------------------------
4# David Shaw <dshaw@jabberwocky.com> May-09-2006
5#
6# Checks for libcurl. DEFAULT-ACTION is the string yes or no to
7# specify whether to default to --with-libcurl or --without-libcurl.
8# If not supplied, DEFAULT-ACTION is yes. MINIMUM-VERSION is the
9# minimum version of libcurl to accept. Pass the version as a regular
10# version number like 7.10.1. If not supplied, any version is
11# accepted. ACTION-IF-YES is a list of shell commands to run if
12# libcurl was successfully found and passed the various tests.
13# ACTION-IF-NO is a list of shell commands that are run otherwise.
14# Note that using --without-libcurl does run ACTION-IF-NO.
15#
16# This macro #defines HAVE_LIBCURL if a working libcurl setup is
17# found, and sets @LIBCURL@ and @LIBCURL_CPPFLAGS@ to the necessary
18# values. Other useful defines are LIBCURL_FEATURE_xxx where xxx are
19# the various features supported by libcurl, and LIBCURL_PROTOCOL_yyy
20# where yyy are the various protocols supported by libcurl. Both xxx
21# and yyy are capitalized. See the list of AH_TEMPLATEs at the top of
22# the macro for the complete list of possible defines. Shell
23# variables $libcurl_feature_xxx and $libcurl_protocol_yyy are also
24# defined to 'yes' for those features and protocols that were found.
25# Note that xxx and yyy keep the same capitalization as in the
26# curl-config list (e.g. it's "HTTP" and not "http").
27#
28# Users may override the detected values by doing something like:
29# LIBCURL="-lcurl" LIBCURL_CPPFLAGS="-I/usr/myinclude" ./configure
30#
31# For the sake of sanity, this macro assumes that any libcurl that is
32# found is after version 7.7.2, the first version that included the
33# curl-config script. Note that it is very important for people
34# packaging binary versions of libcurl to include this script!
35# Without curl-config, we can only guess what protocols are available,
36# or use curl_version_info to figure it out at runtime.
37
38AC_DEFUN([LIBCURL_CHECK_CONFIG],
39[
40 AH_TEMPLATE([LIBCURL_FEATURE_SSL],[Defined if libcurl supports SSL])
41 AH_TEMPLATE([LIBCURL_FEATURE_KRB4],[Defined if libcurl supports KRB4])
42 AH_TEMPLATE([LIBCURL_FEATURE_IPV6],[Defined if libcurl supports IPv6])
43 AH_TEMPLATE([LIBCURL_FEATURE_LIBZ],[Defined if libcurl supports libz])
44 AH_TEMPLATE([LIBCURL_FEATURE_ASYNCHDNS],[Defined if libcurl supports AsynchDNS])
45 AH_TEMPLATE([LIBCURL_FEATURE_IDN],[Defined if libcurl supports IDN])
46 AH_TEMPLATE([LIBCURL_FEATURE_SSPI],[Defined if libcurl supports SSPI])
47 AH_TEMPLATE([LIBCURL_FEATURE_NTLM],[Defined if libcurl supports NTLM])
48
49 AH_TEMPLATE([LIBCURL_PROTOCOL_HTTP],[Defined if libcurl supports HTTP])
50 AH_TEMPLATE([LIBCURL_PROTOCOL_HTTPS],[Defined if libcurl supports HTTPS])
51 AH_TEMPLATE([LIBCURL_PROTOCOL_FTP],[Defined if libcurl supports FTP])
52 AH_TEMPLATE([LIBCURL_PROTOCOL_FTPS],[Defined if libcurl supports FTPS])
53 AH_TEMPLATE([LIBCURL_PROTOCOL_FILE],[Defined if libcurl supports FILE])
54 AH_TEMPLATE([LIBCURL_PROTOCOL_TELNET],[Defined if libcurl supports TELNET])
55 AH_TEMPLATE([LIBCURL_PROTOCOL_LDAP],[Defined if libcurl supports LDAP])
56 AH_TEMPLATE([LIBCURL_PROTOCOL_DICT],[Defined if libcurl supports DICT])
57 AH_TEMPLATE([LIBCURL_PROTOCOL_TFTP],[Defined if libcurl supports TFTP])
58 AH_TEMPLATE([LIBCURL_PROTOCOL_RTSP],[Defined if libcurl supports RTSP])
59 AH_TEMPLATE([LIBCURL_PROTOCOL_POP3],[Defined if libcurl supports POP3])
60 AH_TEMPLATE([LIBCURL_PROTOCOL_IMAP],[Defined if libcurl supports IMAP])
61 AH_TEMPLATE([LIBCURL_PROTOCOL_SMTP],[Defined if libcurl supports SMTP])
62
63 AC_ARG_WITH(libcurl,
64 AC_HELP_STRING([--with-libcurl=PREFIX],[look for the curl library in PREFIX/lib and headers in PREFIX/include]),
65 [_libcurl_with=$withval],[_libcurl_with=ifelse([$1],,[yes],[$1])])
66
67 if test "$_libcurl_with" != "no" ; then
68
69 AC_PROG_AWK
70
71 _libcurl_version_parse="eval $AWK '{split(\$NF,A,\".\"); X=256*256*A[[1]]+256*A[[2]]+A[[3]]; print X;}'"
72
73 _libcurl_try_link=yes
74
75 if test -d "$_libcurl_with" ; then
76 LIBCURL_CPPFLAGS="-I$withval/include"
77 _libcurl_ldflags="-L$withval/lib"
78 AC_PATH_PROG([_libcurl_config],[curl-config],[],
79 ["$withval/bin"])
80 else
81 AC_PATH_PROG([_libcurl_config],[curl-config],[],[$PATH])
82 fi
83
84 if test x$_libcurl_config != "x" ; then
85 AC_CACHE_CHECK([for the version of libcurl],
86 [libcurl_cv_lib_curl_version],
87 [libcurl_cv_lib_curl_version=`$_libcurl_config --version | $AWK '{print $[]2}'`])
88
89 _libcurl_version=`echo $libcurl_cv_lib_curl_version | $_libcurl_version_parse`
90 _libcurl_wanted=`echo ifelse([$2],,[0],[$2]) | $_libcurl_version_parse`
91
92 if test $_libcurl_wanted -gt 0 ; then
93 AC_CACHE_CHECK([for libcurl >= version $2],
94 [libcurl_cv_lib_version_ok],
95 [
96 if test $_libcurl_version -ge $_libcurl_wanted ; then
97 libcurl_cv_lib_version_ok=yes
98 else
99 libcurl_cv_lib_version_ok=no
100 fi
101 ])
102 fi
103
104 if test $_libcurl_wanted -eq 0 || test x$libcurl_cv_lib_version_ok = xyes ; then
105 if test x"$LIBCURL_CPPFLAGS" = "x" ; then
106 LIBCURL_CPPFLAGS=`$_libcurl_config --cflags`
107 fi
108 if test x"$LIBCURL" = "x" ; then
109 LIBCURL=`$_libcurl_config --libs`
110
111 # This is so silly, but Apple actually has a bug in their
112 # curl-config script. Fixed in Tiger, but there are still
113 # lots of Panther installs around.
114 case "${host}" in
115 powerpc-apple-darwin7*)
116 LIBCURL=`echo $LIBCURL | sed -e 's|-arch i386||g'`
117 ;;
118 esac
119 fi
120
121 # All curl-config scripts support --feature
122 _libcurl_features=`$_libcurl_config --feature`
123
124 # Is it modern enough to have --protocols? (7.12.4)
125 if test $_libcurl_version -ge 461828 ; then
126 _libcurl_protocols=`$_libcurl_config --protocols`
127 fi
128 else
129 _libcurl_try_link=no
130 fi
131
132 unset _libcurl_wanted
133 fi
134
135 if test $_libcurl_try_link = yes ; then
136
137 # we didn't find curl-config, so let's see if the user-supplied
138 # link line (or failing that, "-lcurl") is enough.
139 LIBCURL=${LIBCURL-"$_libcurl_ldflags -lcurl"}
140
141 AC_CACHE_CHECK([whether libcurl is usable],
142 [libcurl_cv_lib_curl_usable],
143 [
144 _libcurl_save_cppflags=$CPPFLAGS
145 CPPFLAGS="$LIBCURL_CPPFLAGS $CPPFLAGS"
146 _libcurl_save_libs=$LIBS
147 LIBS="$LIBCURL $LIBS"
148
149 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 missing symbols or can't link. */
152int x;
153curl_easy_setopt(NULL,CURLOPT_URL,NULL);
154x=CURL_ERROR_SIZE;
155x=CURLOPT_WRITEFUNCTION;
156x=CURLOPT_FILE;
157x=CURLOPT_ERRORBUFFER;
158x=CURLOPT_STDERR;
159x=CURLOPT_VERBOSE;
160])],libcurl_cv_lib_curl_usable=yes,libcurl_cv_lib_curl_usable=no)
161
162 CPPFLAGS=$_libcurl_save_cppflags
163 LIBS=$_libcurl_save_libs
164 unset _libcurl_save_cppflags
165 unset _libcurl_save_libs
166 ])
167
168 if test $libcurl_cv_lib_curl_usable = yes ; then
169
170 # Does curl_free() exist in this version of libcurl?
171 # If not, fake it with free()
172
173 _libcurl_save_cppflags=$CPPFLAGS
174 CPPFLAGS="$CPPFLAGS $LIBCURL_CPPFLAGS"
175 _libcurl_save_libs=$LIBS
176 LIBS="$LIBS $LIBCURL"
177
178 AC_CHECK_FUNC(curl_free,,
179 AC_DEFINE(curl_free,free,
180 [Define curl_free() as free() if our version of curl lacks curl_free.]))
181
182 CPPFLAGS=$_libcurl_save_cppflags
183 LIBS=$_libcurl_save_libs
184 unset _libcurl_save_cppflags
185 unset _libcurl_save_libs
186
187 AC_DEFINE(HAVE_LIBCURL,1,
188 [Define to 1 if you have a functional curl library.])
189 AC_SUBST(LIBCURL_CPPFLAGS)
190 AC_SUBST(LIBCURL)
191
192 for _libcurl_feature in $_libcurl_features ; do
193 AC_DEFINE_UNQUOTED(AS_TR_CPP(libcurl_feature_$_libcurl_feature),[1])
194 eval AS_TR_SH(libcurl_feature_$_libcurl_feature)=yes
195 done
196
197 if test "x$_libcurl_protocols" = "x" ; then
198
199 # We don't have --protocols, so just assume that all
200 # protocols are available
201 _libcurl_protocols="HTTP FTP FILE TELNET LDAP DICT TFTP"
202
203 if test x$libcurl_feature_SSL = xyes ; then
204 _libcurl_protocols="$_libcurl_protocols HTTPS"
205
206 # FTPS wasn't standards-compliant until version
207 # 7.11.0 (0x070b00 == 461568)
208 if test $_libcurl_version -ge 461568; then
209 _libcurl_protocols="$_libcurl_protocols FTPS"
210 fi
211 fi
212
213 # RTSP, IMAP, POP3 and SMTP were added in
214 # 7.20.0 (0x071400 == 463872)
215 if test $_libcurl_version -ge 463872; then
216 _libcurl_protocols="$_libcurl_protocols RTSP IMAP POP3 SMTP"
217 fi
218 fi
219
220 for _libcurl_protocol in $_libcurl_protocols ; do
221 AC_DEFINE_UNQUOTED(AS_TR_CPP(libcurl_protocol_$_libcurl_protocol),[1])
222 eval AS_TR_SH(libcurl_protocol_$_libcurl_protocol)=yes
223 done
224 else
225 unset LIBCURL
226 unset LIBCURL_CPPFLAGS
227 fi
228 fi
229
230 unset _libcurl_try_link
231 unset _libcurl_version_parse
232 unset _libcurl_config
233 unset _libcurl_feature
234 unset _libcurl_features
235 unset _libcurl_protocol
236 unset _libcurl_protocols
237 unset _libcurl_version
238 unset _libcurl_ldflags
239 fi
240
241 if test x$_libcurl_with = xno || test x$libcurl_cv_lib_curl_usable != xyes ; then
242 # This is the IF-NO path
243 ifelse([$4],,:,[$4])
244 else
245 # This is the IF-YES path
246 ifelse([$3],,:,[$3])
247 fi
248
249 unset _libcurl_with
250])dnl
diff --git a/m4/libgnurl.m4 b/m4/libgnurl.m4
new file mode 100644
index 000000000..1cb3f2e2b
--- /dev/null
+++ b/m4/libgnurl.m4
@@ -0,0 +1,250 @@
1# LIBGNURL_CHECK_CONFIG ([DEFAULT-ACTION], [MINIMUM-VERSION],
2# [ACTION-IF-YES], [ACTION-IF-NO])
3# ----------------------------------------------------------
4# David Shaw <dshaw@jabberwocky.com> May-09-2006
5#
6# Checks for libgnurl. DEFAULT-ACTION is the string yes or no to
7# specify whether to default to --with-libgnurl or --without-libgnurl.
8# If not supplied, DEFAULT-ACTION is yes. MINIMUM-VERSION is the
9# minimum version of libgnurl to accept. Pass the version as a regular
10# version number like 7.10.1. If not supplied, any version is
11# accepted. ACTION-IF-YES is a list of shell commands to run if
12# libgnurl was successfully found and passed the various tests.
13# ACTION-IF-NO is a list of shell commands that are run otherwise.
14# Note that using --without-libgnurl does run ACTION-IF-NO.
15#
16# This macro #defines HAVE_LIBGNURL if a working libgnurl setup is
17# found, and sets @LIBGNURL@ and @LIBGNURL_CPPFLAGS@ to the necessary
18# values. Other useful defines are LIBGNURL_FEATURE_xxx where xxx are
19# the various features supported by libgnurl, and LIBGNURL_PROTOCOL_yyy
20# where yyy are the various protocols supported by libgnurl. Both xxx
21# and yyy are capitalized. See the list of AH_TEMPLATEs at the top of
22# the macro for the complete list of possible defines. Shell
23# variables $libgnurl_feature_xxx and $libgnurl_protocol_yyy are also
24# defined to 'yes' for those features and protocols that were found.
25# Note that xxx and yyy keep the same capitalization as in the
26# gnurl-config list (e.g. it's "HTTP" and not "http").
27#
28# Users may override the detected values by doing something like:
29# LIBGNURL="-lgnurl" LIBGNURL_CPPFLAGS="-I/usr/myinclude" ./configure
30#
31# For the sake of sanity, this macro assumes that any libgnurl that is
32# found is after version 7.7.2, the first version that included the
33# gnurl-config script. Note that it is very important for people
34# packaging binary versions of libgnurl to include this script!
35# Without gnurl-config, we can only guess what protocols are available,
36# or use gnurl_version_info to figure it out at runtime.
37
38AC_DEFUN([LIBGNURL_CHECK_CONFIG],
39[
40 AH_TEMPLATE([LIBGNURL_FEATURE_SSL],[Defined if libgnurl supports SSL])
41 AH_TEMPLATE([LIBGNURL_FEATURE_KRB4],[Defined if libgnurl supports KRB4])
42 AH_TEMPLATE([LIBGNURL_FEATURE_IPV6],[Defined if libgnurl supports IPv6])
43 AH_TEMPLATE([LIBGNURL_FEATURE_LIBZ],[Defined if libgnurl supports libz])
44 AH_TEMPLATE([LIBGNURL_FEATURE_ASYNCHDNS],[Defined if libgnurl supports AsynchDNS])
45 AH_TEMPLATE([LIBGNURL_FEATURE_IDN],[Defined if libgnurl supports IDN])
46 AH_TEMPLATE([LIBGNURL_FEATURE_SSPI],[Defined if libgnurl supports SSPI])
47 AH_TEMPLATE([LIBGNURL_FEATURE_NTLM],[Defined if libgnurl supports NTLM])
48
49 AH_TEMPLATE([LIBGNURL_PROTOCOL_HTTP],[Defined if libgnurl supports HTTP])
50 AH_TEMPLATE([LIBGNURL_PROTOCOL_HTTPS],[Defined if libgnurl supports HTTPS])
51 AH_TEMPLATE([LIBGNURL_PROTOCOL_FTP],[Defined if libgnurl supports FTP])
52 AH_TEMPLATE([LIBGNURL_PROTOCOL_FTPS],[Defined if libgnurl supports FTPS])
53 AH_TEMPLATE([LIBGNURL_PROTOCOL_FILE],[Defined if libgnurl supports FILE])
54 AH_TEMPLATE([LIBGNURL_PROTOCOL_TELNET],[Defined if libgnurl supports TELNET])
55 AH_TEMPLATE([LIBGNURL_PROTOCOL_LDAP],[Defined if libgnurl supports LDAP])
56 AH_TEMPLATE([LIBGNURL_PROTOCOL_DICT],[Defined if libgnurl supports DICT])
57 AH_TEMPLATE([LIBGNURL_PROTOCOL_TFTP],[Defined if libgnurl supports TFTP])
58 AH_TEMPLATE([LIBGNURL_PROTOCOL_RTSP],[Defined if libgnurl supports RTSP])
59 AH_TEMPLATE([LIBGNURL_PROTOCOL_POP3],[Defined if libgnurl supports POP3])
60 AH_TEMPLATE([LIBGNURL_PROTOCOL_IMAP],[Defined if libgnurl supports IMAP])
61 AH_TEMPLATE([LIBGNURL_PROTOCOL_SMTP],[Defined if libgnurl supports SMTP])
62
63 AC_ARG_WITH(libgnurl,
64 AC_HELP_STRING([--with-libgnurl=PREFIX],[look for the gnurl library in PREFIX/lib and headers in PREFIX/include]),
65 [_libgnurl_with=$withval],[_libgnurl_with=ifelse([$1],,[yes],[$1])])
66
67 if test "$_libgnurl_with" != "no" ; then
68
69 AC_PROG_AWK
70
71 _libgnurl_version_parse="eval $AWK '{split(\$NF,A,\".\"); X=256*256*A[[1]]+256*A[[2]]+A[[3]]; print X;}'"
72
73 _libgnurl_try_link=yes
74
75 if test -d "$_libgnurl_with" ; then
76 LIBGNURL_CPPFLAGS="-I$withval/include"
77 _libgnurl_ldflags="-L$withval/lib"
78 AC_PATH_PROG([_libgnurl_config],[gnurl-config],[],
79 ["$withval/bin"])
80 else
81 AC_PATH_PROG([_libgnurl_config],[gnurl-config],[],[$PATH])
82 fi
83
84 if test x$_libgnurl_config != "x" ; then
85 AC_CACHE_CHECK([for the version of libgnurl],
86 [libgnurl_cv_lib_gnurl_version],
87 [libgnurl_cv_lib_gnurl_version=`$_libgnurl_config --version | $AWK '{print $[]2}'`])
88
89 _libgnurl_version=`echo $libgnurl_cv_lib_gnurl_version | $_libgnurl_version_parse`
90 _libgnurl_wanted=`echo ifelse([$2],,[0],[$2]) | $_libgnurl_version_parse`
91
92 if test $_libgnurl_wanted -gt 0 ; then
93 AC_CACHE_CHECK([for libgnurl >= version $2],
94 [libgnurl_cv_lib_version_ok],
95 [
96 if test $_libgnurl_version -ge $_libgnurl_wanted ; then
97 libgnurl_cv_lib_version_ok=yes
98 else
99 libgnurl_cv_lib_version_ok=no
100 fi
101 ])
102 fi
103
104 if test $_libgnurl_wanted -eq 0 || test x$libgnurl_cv_lib_version_ok = xyes ; then
105 if test x"$LIBGNURL_CPPFLAGS" = "x" ; then
106 LIBGNURL_CPPFLAGS=`$_libgnurl_config --cflags`
107 fi
108 if test x"$LIBGNURL" = "x" ; then
109 LIBGNURL=`$_libgnurl_config --libs`
110
111 # This is so silly, but Apple actually has a bug in their
112 # gnurl-config script. Fixed in Tiger, but there are still
113 # lots of Panther installs around.
114 case "${host}" in
115 powerpc-apple-darwin7*)
116 LIBGNURL=`echo $LIBGNURL | sed -e 's|-arch i386||g'`
117 ;;
118 esac
119 fi
120
121 # All gnurl-config scripts support --feature
122 _libgnurl_features=`$_libgnurl_config --feature`
123
124 # Is it modern enough to have --protocols? (7.12.4)
125 if test $_libgnurl_version -ge 461828 ; then
126 _libgnurl_protocols=`$_libgnurl_config --protocols`
127 fi
128 else
129 _libgnurl_try_link=no
130 fi
131
132 unset _libgnurl_wanted
133 fi
134
135 if test $_libgnurl_try_link = yes ; then
136
137 # we didn't find gnurl-config, so let's see if the user-supplied
138 # link line (or failing that, "-lgnurl") is enough.
139 LIBGNURL=${LIBGNURL-"$_libgnurl_ldflags -lgnurl"}
140
141 AC_CACHE_CHECK([whether libgnurl is usable],
142 [libgnurl_cv_lib_gnurl_usable],
143 [
144 _libgnurl_save_cppflags=$CPPFLAGS
145 CPPFLAGS="$LIBGNURL_CPPFLAGS $CPPFLAGS"
146 _libgnurl_save_libs=$LIBS
147 LIBS="$LIBGNURL $LIBS"
148
149 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 missing symbols or can't link. */
152int x;
153gnurl_easy_setopt(NULL,GNURLOPT_URL,NULL);
154x=GNURL_ERROR_SIZE;
155x=GNURLOPT_WRITEFUNCTION;
156x=GNURLOPT_FILE;
157x=GNURLOPT_ERRORBUFFER;
158x=GNURLOPT_STDERR;
159x=GNURLOPT_VERBOSE;
160])],libgnurl_cv_lib_gnurl_usable=yes,libgnurl_cv_lib_gnurl_usable=no)
161
162 CPPFLAGS=$_libgnurl_save_cppflags
163 LIBS=$_libgnurl_save_libs
164 unset _libgnurl_save_cppflags
165 unset _libgnurl_save_libs
166 ])
167
168 if test $libgnurl_cv_lib_gnurl_usable = yes ; then
169
170 # Does gnurl_free() exist in this version of libgnurl?
171 # If not, fake it with free()
172
173 _libgnurl_save_cppflags=$CPPFLAGS
174 CPPFLAGS="$CPPFLAGS $LIBGNURL_CPPFLAGS"
175 _libgnurl_save_libs=$LIBS
176 LIBS="$LIBS $LIBGNURL"
177
178 AC_CHECK_FUNC(gnurl_free,,
179 AC_DEFINE(gnurl_free,free,
180 [Define gnurl_free() as free() if our version of gnurl lacks gnurl_free.]))
181
182 CPPFLAGS=$_libgnurl_save_cppflags
183 LIBS=$_libgnurl_save_libs
184 unset _libgnurl_save_cppflags
185 unset _libgnurl_save_libs
186
187 AC_DEFINE(HAVE_LIBGNURL,1,
188 [Define to 1 if you have a functional gnurl library.])
189 AC_SUBST(LIBGNURL_CPPFLAGS)
190 AC_SUBST(LIBGNURL)
191
192 for _libgnurl_feature in $_libgnurl_features ; do
193 AC_DEFINE_UNQUOTED(AS_TR_CPP(libgnurl_feature_$_libgnurl_feature),[1])
194 eval AS_TR_SH(libgnurl_feature_$_libgnurl_feature)=yes
195 done
196
197 if test "x$_libgnurl_protocols" = "x" ; then
198
199 # We don't have --protocols, so just assume that all
200 # protocols are available
201 _libgnurl_protocols="HTTP FTP FILE TELNET LDAP DICT TFTP"
202
203 if test x$libgnurl_feature_SSL = xyes ; then
204 _libgnurl_protocols="$_libgnurl_protocols HTTPS"
205
206 # FTPS wasn't standards-compliant until version
207 # 7.11.0 (0x070b00 == 461568)
208 if test $_libgnurl_version -ge 461568; then
209 _libgnurl_protocols="$_libgnurl_protocols FTPS"
210 fi
211 fi
212
213 # RTSP, IMAP, POP3 and SMTP were added in
214 # 7.20.0 (0x071400 == 463872)
215 if test $_libgnurl_version -ge 463872; then
216 _libgnurl_protocols="$_libgnurl_protocols RTSP IMAP POP3 SMTP"
217 fi
218 fi
219
220 for _libgnurl_protocol in $_libgnurl_protocols ; do
221 AC_DEFINE_UNQUOTED(AS_TR_CPP(libgnurl_protocol_$_libgnurl_protocol),[1])
222 eval AS_TR_SH(libgnurl_protocol_$_libgnurl_protocol)=yes
223 done
224 else
225 unset LIBGNURL
226 unset LIBGNURL_CPPFLAGS
227 fi
228 fi
229
230 unset _libgnurl_try_link
231 unset _libgnurl_version_parse
232 unset _libgnurl_config
233 unset _libgnurl_feature
234 unset _libgnurl_features
235 unset _libgnurl_protocol
236 unset _libgnurl_protocols
237 unset _libgnurl_version
238 unset _libgnurl_ldflags
239 fi
240
241 if test x$_libgnurl_with = xno || test x$libgnurl_cv_lib_gnurl_usable != xyes ; then
242 # This is the IF-NO path
243 ifelse([$4],,:,[$4])
244 else
245 # This is the IF-YES path
246 ifelse([$3],,:,[$3])
247 fi
248
249 unset _libgnurl_with
250])dnl