2 dnl ocurl autoconf input
9 AC_MSG_CHECKING([for libcurl cflags])
10 CURLCFLAGS=`pkg-config libcurl --cflags || curl-config --cflags`
11 AS_IF([ test "$?" -eq 0 ],,[AC_MSG_ERROR([libcurl was not found])] )
12 AC_MSG_RESULT([$CURLCFLAGS])
14 AC_MSG_CHECKING([for libcurl libs])
15 CURLLIBS=`pkg-config libcurl --libs || curl-config --libs`
16 AS_IF([ test "$?" -eq 0 ],,[AC_MSG_ERROR([libcurl was not found])] )
17 AC_MSG_RESULT([$CURLLIBS])
23 AC_CHECK_OCAML_PKG([lwt])
25 INSTALLDIR=$OCAMLLIB/curl
27 AC_PREFIX_PROGRAM(ocamlc)
33 AC_SUBST(OCAML_PKG_lwt)
35 # set CFLAGS for tests below
36 CFLAGS="$CFLAGS $CURLCFLAGS"
38 AC_CHECK_HEADERS([curl/curl.h],[],[AC_MSG_ERROR([libcurl header file missing])])
40 AC_CHECK_DECLS([CURLMOPT_TIMERFUNCTION, CURLMOPT_TIMERDATA, CURLMOPT_SOCKETFUNCTION, CURLMOPT_SOCKETDATA],
41 [], [AC_MSG_ERROR([multi API is too old, need libcurl >= 7.16.0])],
43 #include "curl/curl.h"
47 CURLOPT_FILE, CURLOPT_URL, CURLOPT_PORT, CURLOPT_PROXY, CURLOPT_USERPWD,
48 CURLOPT_PROXYUSERPWD, CURLOPT_RANGE, CURLOPT_INFILE, CURLOPT_ERRORBUFFER,
49 CURLOPT_WRITEFUNCTION, CURLOPT_READFUNCTION, CURLOPT_TIMEOUT,
50 CURLOPT_INFILESIZE, CURLOPT_POSTFIELDS, CURLOPT_REFERER, CURLOPT_FTPPORT,
51 CURLOPT_USERAGENT, CURLOPT_LOW_SPEED_LIMIT, CURLOPT_LOW_SPEED_TIME,
52 CURLOPT_RESUME_FROM, CURLOPT_COOKIE, CURLOPT_HTTPHEADER,
53 CURLOPT_HTTPPOST, CURLOPT_SSLCERT, CURLOPT_SSLCERTPASSWD, CURLOPT_SSLKEYPASSWD,
54 CURLOPT_CRLF, CURLOPT_QUOTE, CURLOPT_WRITEHEADER, CURLOPT_COOKIEFILE,
55 CURLOPT_SSLVERSION, CURLOPT_TIMECONDITION, CURLOPT_TIMEVALUE,
56 CURLOPT_CUSTOMREQUEST, CURLOPT_POSTQUOTE, CURLOPT_WRITEINFO,
57 CURLOPT_VERBOSE, CURLOPT_HEADER, CURLOPT_NOPROGRESS, CURLOPT_NOBODY,
58 CURLOPT_FAILONERROR, CURLOPT_UPLOAD, CURLOPT_POST, CURLOPT_FTPLISTONLY,
59 CURLOPT_FTPAPPEND, CURLOPT_NETRC, CURLOPT_FOLLOWLOCATION,
60 CURLOPT_TRANSFERTEXT, CURLOPT_PUT, CURLOPT_PROGRESSFUNCTION,
61 CURLOPT_PROGRESSDATA, CURLOPT_AUTOREFERER, CURLOPT_PROXYPORT,
62 CURLOPT_POSTFIELDSIZE, CURLOPT_HTTPPROXYTUNNEL, CURLOPT_INTERFACE,
63 CURLOPT_KRB4LEVEL, CURLOPT_SSL_VERIFYPEER, CURLOPT_CAINFO,
64 CURLOPT_MAXREDIRS, CURLOPT_FILETIME, CURLOPT_TELNETOPTIONS,
65 CURLOPT_MAXCONNECTS, CURLOPT_CLOSEPOLICY, CURLOPT_FRESH_CONNECT,
66 CURLOPT_FORBID_REUSE, CURLOPT_RANDOM_FILE, CURLOPT_EGDSOCKET,
67 CURLOPT_CONNECTTIMEOUT, CURLOPT_HEADERFUNCTION, CURLOPT_HTTPGET,
68 CURLOPT_SSL_VERIFYHOST, CURLOPT_COOKIEJAR, CURLOPT_SSL_CIPHER_LIST,
69 CURLOPT_HTTP_VERSION, CURLOPT_FTP_USE_EPSV, CURLOPT_SSLCERTTYPE,
70 CURLOPT_SSLKEY, CURLOPT_SSLKEYTYPE, CURLOPT_SSLENGINE,
71 CURLOPT_SSLENGINE_DEFAULT, CURLOPT_DNS_USE_GLOBAL_CACHE,
72 CURLOPT_DNS_CACHE_TIMEOUT, CURLOPT_PREQUOTE, CURLOPT_DEBUGFUNCTION,
73 CURLOPT_DEBUGDATA, CURLOPT_COOKIESESSION, CURLOPT_CAPATH,
74 CURLOPT_BUFFERSIZE, CURLOPT_NOSIGNAL, CURLOPT_SHARE,
75 CURLOPT_PROXYTYPE, CURLOPT_ENCODING, CURLOPT_PRIVATE, CURLOPT_HTTP200ALIASES,
76 CURLOPT_UNRESTRICTED_AUTH, CURLOPT_FTP_USE_EPRT, CURLOPT_HTTPAUTH,
77 CURLOPT_FTP_CREATE_MISSING_DIRS, CURLOPT_PROXYAUTH,
78 CURLOPT_FTP_RESPONSE_TIMEOUT, CURLOPT_IPRESOLVE, CURLOPT_MAXFILESIZE,
79 CURLOPT_INFILESIZE_LARGE, CURLOPT_RESUME_FROM_LARGE,
80 CURLOPT_MAXFILESIZE_LARGE, CURLOPT_NETRC_FILE, CURLOPT_FTP_SSL,
81 CURLOPT_POSTFIELDSIZE_LARGE, CURLOPT_TCP_NODELAY, CURLOPT_FTPSSLAUTH,
82 CURLOPT_IOCTLFUNCTION, CURLOPT_FTP_ACCOUNT, CURLOPT_COOKIELIST,
83 CURLOPT_IGNORE_CONTENT_LENGTH, CURLOPT_FTP_SKIP_PASV_IP,
84 CURLOPT_FTP_FILEMETHOD, CURLOPT_LOCALPORT, CURLOPT_LOCALPORTRANGE,
85 CURLOPT_CONNECT_ONLY, CURLOPT_MAX_SEND_SPEED_LARGE,
86 CURLOPT_MAX_RECV_SPEED_LARGE, CURLOPT_FTP_ALTERNATIVE_TO_USER,
87 CURLOPT_SSL_SESSIONID_CACHE, CURLOPT_SSH_AUTH_TYPES,
88 CURLOPT_SSH_PUBLIC_KEYFILE, CURLOPT_SSH_PRIVATE_KEYFILE,
89 CURLOPT_FTP_SSL_CCC, CURLOPT_TIMEOUT_MS, CURLOPT_CONNECTTIMEOUT_MS,
90 CURLOPT_HTTP_TRANSFER_DECODING, CURLOPT_HTTP_CONTENT_DECODING,
91 CURLOPT_NEW_FILE_PERMS, CURLOPT_NEW_DIRECTORY_PERMS, CURLOPT_POST301,
92 CURLOPT_SSH_HOST_PUBLIC_KEY_MD5, CURLOPT_COPYPOSTFIELDS,
93 CURLOPT_PROXY_TRANSFER_MODE, CURLOPT_SEEKFUNCTION, CURLOPT_OPENSOCKETFUNCTION,
94 CURLOPT_PROTOCOLS, CURLOPT_REDIR_PROTOCOLS, CURLOPT_RESOLVE, CURLOPT_DNS_SERVERS,
95 CURLOPT_MAIL_FROM, CURLOPT_MAIL_RCPT,
97 CURLINFO_EFFECTIVE_URL, CURLINFO_RESPONSE_CODE, CURLINFO_TOTAL_TIME,
98 CURLINFO_NAMELOOKUP_TIME, CURLINFO_CONNECT_TIME, CURLINFO_PRETRANSFER_TIME,
99 CURLINFO_SIZE_UPLOAD, CURLINFO_SIZE_DOWNLOAD, CURLINFO_SPEED_DOWNLOAD,
100 CURLINFO_SPEED_UPLOAD, CURLINFO_HEADER_SIZE, CURLINFO_REQUEST_SIZE,
101 CURLINFO_SSL_VERIFYRESULT, CURLINFO_FILETIME, CURLINFO_CONTENT_LENGTH_DOWNLOAD,
102 CURLINFO_CONTENT_LENGTH_UPLOAD, CURLINFO_STARTTRANSFER_TIME,
103 CURLINFO_CONTENT_TYPE, CURLINFO_REDIRECT_TIME, CURLINFO_REDIRECT_COUNT,
104 CURLINFO_PRIVATE, CURLINFO_HTTP_CONNECTCODE, CURLINFO_HTTPAUTH_AVAIL,
105 CURLINFO_PROXYAUTH_AVAIL, CURLINFO_OS_ERRNO, CURLINFO_NUM_CONNECTS,
106 CURLINFO_SSL_ENGINES, CURLINFO_COOKIELIST, CURLINFO_LASTSOCKET,
107 CURLINFO_FTP_ENTRY_PATH, CURLINFO_REDIRECT_URL, CURLINFO_PRIMARY_IP,
108 CURLINFO_LOCAL_IP, CURLINFO_LOCAL_PORT, CURLINFO_CONDITION_UNMET,
110 CURLE_UNSUPPORTED_PROTOCOL, CURLE_FAILED_INIT, CURLE_URL_MALFORMAT,
111 CURLE_URL_MALFORMAT_USER, CURLE_COULDNT_RESOLVE_PROXY,
112 CURLE_COULDNT_RESOLVE_HOST, CURLE_COULDNT_CONNECT,
113 CURLE_FTP_WEIRD_SERVER_REPLY, CURLE_FTP_ACCESS_DENIED,
114 CURLE_FTP_USER_PASSWORD_INCORRECT, CURLE_FTP_WEIRD_PASS_REPLY,
115 CURLE_FTP_WEIRD_USER_REPLY, CURLE_FTP_WEIRD_PASV_REPLY,
116 CURLE_FTP_WEIRD_227_FORMAT, CURLE_FTP_CANT_GET_HOST, CURLE_FTP_CANT_RECONNECT,
117 CURLE_FTP_COULDNT_SET_BINARY, CURLE_PARTIAL_FILE, CURLE_FTP_COULDNT_RETR_FILE,
118 CURLE_FTP_WRITE_ERROR, CURLE_FTP_QUOTE_ERROR, CURLE_HTTP_RETURNED_ERROR,
119 CURLE_WRITE_ERROR, CURLE_MALFORMAT_USER, CURLE_FTP_COULDNT_STOR_FILE,
120 CURLE_READ_ERROR, CURLE_OUT_OF_MEMORY, CURLE_OPERATION_TIMEOUTED,
121 CURLE_FTP_COULDNT_SET_ASCII, CURLE_FTP_PORT_FAILED, CURLE_FTP_COULDNT_USE_REST,
122 CURLE_FTP_COULDNT_GET_SIZE, CURLE_HTTP_RANGE_ERROR, CURLE_HTTP_POST_ERROR,
123 CURLE_SSL_CONNECT_ERROR, CURLE_BAD_DOWNLOAD_RESUME,
124 CURLE_FILE_COULDNT_READ_FILE, CURLE_LDAP_CANNOT_BIND, CURLE_LDAP_SEARCH_FAILED,
125 CURLE_LIBRARY_NOT_FOUND, CURLE_FUNCTION_NOT_FOUND, CURLE_ABORTED_BY_CALLBACK,
126 CURLE_BAD_FUNCTION_ARGUMENT, CURLE_BAD_CALLING_ORDER, CURLE_INTERFACE_FAILED,
127 CURLE_BAD_PASSWORD_ENTERED, CURLE_TOO_MANY_REDIRECTS,
128 CURLE_UNKNOWN_TELNET_OPTION, CURLE_TELNET_OPTION_SYNTAX,
129 CURLE_SSL_PEER_CERTIFICATE, CURLE_GOT_NOTHING, CURLE_SSL_ENGINE_NOTFOUND,
130 CURLE_SSL_ENGINE_SETFAILED, CURLE_SEND_ERROR, CURLE_RECV_ERROR,
131 CURLE_SHARE_IN_USE, CURLE_SSL_CERTPROBLEM, CURLE_SSL_CIPHER, CURLE_SSL_CACERT,
132 CURLE_BAD_CONTENT_ENCODING, CURLE_LDAP_INVALID_URL, CURLE_FILESIZE_EXCEEDED,
133 CURLE_FTP_SSL_FAILED, CURLE_SEND_FAIL_REWIND, CURLE_SSL_ENGINE_INITFAILED,
134 CURLE_LOGIN_DENIED, CURLE_TFTP_NOTFOUND, CURLE_TFTP_PERM,
135 CURLE_REMOTE_DISK_FULL, CURLE_TFTP_ILLEGAL, CURLE_TFTP_UNKNOWNID,
136 CURLE_REMOTE_FILE_EXISTS, CURLE_TFTP_NOSUCHUSER, CURLE_CONV_FAILED,
137 CURLE_CONV_REQD, CURLE_SSL_CACERT_BADFILE, CURLE_REMOTE_FILE_NOT_FOUND,
138 CURLE_SSH, CURLE_SSL_SHUTDOWN_FAILED, CURLE_AGAIN,
140 CURL_VERSION_TLSAUTH_SRP, CURL_VERSION_NTLM_WB],
143 #include "curl/curl.h"
146 AC_CONFIG_HEADERS(config.h)
147 AC_CONFIG_FILES([Makefile examples/Makefile])