File: configure.in

package info (click to toggle)
r-cran-rcurl 1.95-4.8-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,140 kB
  • ctags: 515
  • sloc: ansic: 3,135; xml: 1,734; asm: 993; sh: 12; makefile: 2
file content (194 lines) | stat: -rw-r--r-- 5,969 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
AC_INIT(DESCRIPTION)

AC_ARG_ENABLE(debug, [--enable-debug turn on debugging information])

if test -z "${CURL_CONFIG}" ; then
 AC_PATH_PROG(CURL_CONFIG, curl-config)
fi

if test -z "${CURL_CONFIG}" ; then
  echo "Cannot find curl-config"
  exit 1
fi

if test -n "${enable_debug}" && test "${enable_debug}" == "yes" ; then
 DEFINES=-DRCURL_DEBUG_MEMORY
fi


dnl Trying to find out if we have a libidn field.
AC_PROG_CC
AC_PROG_CPP

CURL_CPPFLAGS=`$CURL_CONFIG --cflags`
CPPFLAGS="${CPPFLAGS} $CURL_CPPFLAGS"

AC_TRY_COMPILE([
#include <curl/curl.h>
],
[
 curl_version_info_data *data;
 char *ptr;
 ptr = data->libidn;
],
[DEFINES="$DEFINES -DHAVE_LIBIDN_FIELD=1"; echo "Version has a libidn field"], 
[echo "No libidn field in version structure."])


LDFLAGS=`${CURL_CONFIG} --libs`


AC_DEFUN([RCURL_CHECK_ENUM], [

AC_TRY_COMPILE([
#include <curl/curl.h>
],
[
  int val;
  val = $1;
],
[DEFINES="$DEFINES -DHAVE_$1=1"; echo "Version has $1"], 
[echo "No $1 enumeration value."])
])

RCURL_CHECK_ENUM(CURLOPT_URL)



RCURL_CHECK_ENUM(CURLINFO_EFFECTIVE_URL)
RCURL_CHECK_ENUM(CURLINFO_RESPONSE_CODE)
RCURL_CHECK_ENUM(CURLINFO_TOTAL_TIME)
RCURL_CHECK_ENUM(CURLINFO_NAMELOOKUP_TIME)
RCURL_CHECK_ENUM(CURLINFO_CONNECT_TIME)
RCURL_CHECK_ENUM(CURLINFO_PRETRANSFER_TIME)
RCURL_CHECK_ENUM(CURLINFO_SIZE_UPLOAD)
RCURL_CHECK_ENUM(CURLINFO_SIZE_DOWNLOAD)
RCURL_CHECK_ENUM(CURLINFO_SPEED_DOWNLOAD)
RCURL_CHECK_ENUM(CURLINFO_SPEED_UPLOAD)
RCURL_CHECK_ENUM(CURLINFO_HEADER_SIZE)
RCURL_CHECK_ENUM(CURLINFO_REQUEST_SIZE)
RCURL_CHECK_ENUM(CURLINFO_SSL_VERIFYRESULT)
RCURL_CHECK_ENUM(CURLINFO_FILETIME)
RCURL_CHECK_ENUM(CURLINFO_CONTENT_LENGTH_DOWNLOAD)
RCURL_CHECK_ENUM(CURLINFO_CONTENT_LENGTH_UPLOAD)
RCURL_CHECK_ENUM(CURLINFO_STARTTRANSFER_TIME)
RCURL_CHECK_ENUM(CURLINFO_CONTENT_TYPE)
RCURL_CHECK_ENUM(CURLINFO_REDIRECT_TIME)
RCURL_CHECK_ENUM(CURLINFO_REDIRECT_COUNT)
RCURL_CHECK_ENUM(CURLINFO_PRIVATE)
RCURL_CHECK_ENUM(CURLINFO_HTTP_CONNECTCODE)
RCURL_CHECK_ENUM(CURLINFO_HTTPAUTH_AVAIL)
RCURL_CHECK_ENUM(CURLINFO_PROXYAUTH_AVAIL)
RCURL_CHECK_ENUM(CURLINFO_OS_ERRNO)
RCURL_CHECK_ENUM(CURLINFO_NUM_CONNECTS)
RCURL_CHECK_ENUM(CURLINFO_SSL_ENGINES)
RCURL_CHECK_ENUM(CURLINFO_COOKIELIST)
RCURL_CHECK_ENUM(CURLINFO_LASTSOCKET)
RCURL_CHECK_ENUM(CURLINFO_FTP_ENTRY_PATH)
RCURL_CHECK_ENUM(CURLINFO_REDIRECT_URL)
RCURL_CHECK_ENUM(CURLINFO_PRIMARY_IP)
RCURL_CHECK_ENUM(CURLINFO_APPCONNECT_TIME)
RCURL_CHECK_ENUM(CURLINFO_CERTINFO)
RCURL_CHECK_ENUM(CURLINFO_CONDITION_UNMET)


dnl RCURL_CHECK_ENUM(CURLINFO_CONDITION_UNMET)
dnl RCURL_CHECK_ENUM(CURLINFO_REDIRECT_URL)
dnl RCURL_CHECK_ENUM(CURLINFO_CERTINFO)
dnl RCURL_CHECK_ENUM(CURLINFO_PRIMARY_IP)
dnl RCURL_CHECK_ENUM(CURLINFO_APPCONNECT_TIME)


 RCURL_CHECK_ENUM(CURLOPT_WRITEDATA)
 RCURL_CHECK_ENUM(CURLOPT_KEYPASSWD)
 RCURL_CHECK_ENUM(CURLOPT_DIRLISTONLY)
 RCURL_CHECK_ENUM(CURLOPT_APPEND)
 RCURL_CHECK_ENUM(CURLOPT_KRBLEVEL)
 RCURL_CHECK_ENUM(CURLOPT_USE_SSL)
 RCURL_CHECK_ENUM(CURLOPT_TIMEOUT_MS)
 RCURL_CHECK_ENUM(CURLOPT_CONNECTTIMEOUT_MS)
 RCURL_CHECK_ENUM(CURLOPT_HTTP_TRANSFER_DECODING)
 RCURL_CHECK_ENUM(CURLOPT_HTTP_CONTENT_DECODING)
 RCURL_CHECK_ENUM(CURLOPT_NEW_FILE_PERMS)
 RCURL_CHECK_ENUM(CURLOPT_NEW_DIRECTORY_PERMS)
 RCURL_CHECK_ENUM(CURLOPT_POSTREDIR)
 RCURL_CHECK_ENUM(CURLOPT_OPENSOCKETFUNCTION)
 RCURL_CHECK_ENUM(CURLOPT_OPENSOCKETDATA)
 RCURL_CHECK_ENUM(CURLOPT_COPYPOSTFIELDS)
 RCURL_CHECK_ENUM(CURLOPT_PROXY_TRANSFER_MODE)
 RCURL_CHECK_ENUM(CURLOPT_SEEKFUNCTION)
 RCURL_CHECK_ENUM(CURLOPT_SEEKDATA)
 RCURL_CHECK_ENUM(CURLOPT_CRLFILE)
 RCURL_CHECK_ENUM(CURLOPT_ISSUERCERT)
 RCURL_CHECK_ENUM(CURLOPT_ADDRESS_SCOPE)
 RCURL_CHECK_ENUM(CURLOPT_CERTINFO)
 RCURL_CHECK_ENUM(CURLOPT_USERNAME)
 RCURL_CHECK_ENUM(CURLOPT_PASSWORD)
 RCURL_CHECK_ENUM(CURLOPT_PROXYUSERNAME)
 RCURL_CHECK_ENUM(CURLOPT_PROXYPASSWORD)
 RCURL_CHECK_ENUM(CURLOPT_SSH_HOST_PUBLIC_KEY_MD5)
 RCURL_CHECK_ENUM(CURLOPT_NOPROXY)
 RCURL_CHECK_ENUM(CURLOPT_TFTP_BLKSIZE)
 RCURL_CHECK_ENUM(CURLOPT_SOCKS5_GSSAPI_SERVICE)
 RCURL_CHECK_ENUM(CURLOPT_SOCKS5_GSSAPI_NEC)
 RCURL_CHECK_ENUM(CURLOPT_PROTOCOLS)
 RCURL_CHECK_ENUM(CURLOPT_REDIR_PROTOCOLS)
 RCURL_CHECK_ENUM(CURLOPT_SSH_AUTH_TYPES)
 RCURL_CHECK_ENUM(CURLOPT_SSH_PUBLIC_KEYFILE)
 RCURL_CHECK_ENUM(CURLOPT_SSH_PRIVATE_KEYFILE)
 RCURL_CHECK_ENUM(CURLOPT_FTP_SSL_CCC)
 RCURL_CHECK_ENUM(CURLOPT_COOKIELIST)
 RCURL_CHECK_ENUM(CURLOPT_IGNORE_CONTENT_LENGTH)
 RCURL_CHECK_ENUM(CURLOPT_FTP_SKIP_PASV_IP)
 RCURL_CHECK_ENUM(CURLOPT_FTP_FILEMETHOD)
 RCURL_CHECK_ENUM(CURLOPT_LOCALPORT)
 RCURL_CHECK_ENUM(CURLOPT_LOCALPORTRANGE)
 RCURL_CHECK_ENUM(CURLOPT_CONNECT_ONLY)
 RCURL_CHECK_ENUM(CURLOPT_CONV_FROM_NETWORK_FUNCTION)
 RCURL_CHECK_ENUM(CURLOPT_CONV_TO_NETWORK_FUNCTION)
 RCURL_CHECK_ENUM(CURLOPT_CONV_FROM_UTF8_FUNCTION)
 RCURL_CHECK_ENUM(CURLOPT_MAX_SEND_SPEED_LARGE)
 RCURL_CHECK_ENUM(CURLOPT_MAX_RECV_SPEED_LARGE)
 RCURL_CHECK_ENUM(CURLOPT_FTP_ALTERNATIVE_TO_USER)
 RCURL_CHECK_ENUM(CURLOPT_SOCKOPTFUNCTION)
 RCURL_CHECK_ENUM(CURLOPT_SOCKOPTDATA)
 RCURL_CHECK_ENUM(CURLOPT_SSL_SESSIONID_CACHE)


dnl Next we determine if the Curl_base64_encode routine has an extra parameter
dnl which appeared in curl-7.18.0 (approx?). This routine is not in the header
dnl file, so we can't use compilation warnings, etc. So we use the old style call and
dnl make  a sample program that uses this invocation. If it seg faults, we need the new style.
#AC_TRY_RUN([
##include <curl/curl.h>
##include <string.h>
#
#int main(int argc, char *argv[])
#{
#  char text[100] = "Some text", ans[200];
#  int len;
#  len = Curl_base64_encode(text, strlen(text), &ans);
#  return(0);
#}
#],
#[echo "Using older Curl_base64_enccode form with _no_ SessionHandle parameter."],
#[echo "Using Curl_base64_encode with SessionHandle parameter."; DEFINES="$DEFINES -DBASE64_NEEDS_SESSION_DATA=1"] 
#)


CURL_LIBS=`${CURL_CONFIG} --libs`
CURL_CFLAGS=`${CURL_CONFIG} --cflags`


AC_SUBST(DEFINES)

AC_SUBST(CURL_CONFIG)
AC_SUBST(CURL_CFLAGS)
AC_SUBST(CURL_LIBS)


echo "libcurl version: `${CURL_CONFIG} --version`"

AC_OUTPUT(src/Makevars)