Curl_lwt: handle Lwt.cancel
[ocurl.git] / configure.in
blob89efcc2c089d4fc329d6cb5b3eaf09922655cdfd
1 dnl
2 dnl ocurl autoconf input
3 dnl
5 AC_INIT(ocurl,0.7.0)
7 AC_PROG_CC()
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])
19 AC_PROG_INSTALL()
20 AC_PROG_OCAML()
21 AC_PROG_FINDLIB()
23 AC_CHECK_OCAML_PKG([lwt])
25 INSTALLDIR=$OCAMLLIB/curl
27 AC_PREFIX_PROGRAM(ocamlc)
29 AC_SUBST(CURLLIBS)
30 AC_SUBST(OCAMLLIB)
31 AC_SUBST(INSTALLDIR)
32 AC_SUBST(OCAMLFIND)
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([
41 CURLOPT_FILE, CURLOPT_URL, CURLOPT_PORT, CURLOPT_PROXY, CURLOPT_USERPWD,
42 CURLOPT_PROXYUSERPWD, CURLOPT_RANGE, CURLOPT_INFILE, CURLOPT_ERRORBUFFER,
43 CURLOPT_WRITEFUNCTION, CURLOPT_READFUNCTION, CURLOPT_TIMEOUT,
44 CURLOPT_INFILESIZE, CURLOPT_POSTFIELDS, CURLOPT_REFERER, CURLOPT_FTPPORT,
45 CURLOPT_USERAGENT, CURLOPT_LOW_SPEED_LIMIT, CURLOPT_LOW_SPEED_TIME,
46 CURLOPT_RESUME_FROM, CURLOPT_COOKIE, CURLOPT_HTTPHEADER,
47 CURLOPT_HTTPPOST, CURLOPT_SSLCERT, CURLOPT_SSLCERTPASSWD, CURLOPT_SSLKEYPASSWD,
48 CURLOPT_CRLF, CURLOPT_QUOTE, CURLOPT_WRITEHEADER, CURLOPT_COOKIEFILE,
49 CURLOPT_SSLVERSION, CURLOPT_TIMECONDITION, CURLOPT_TIMEVALUE,
50 CURLOPT_CUSTOMREQUEST, CURLOPT_STDERR, CURLOPT_POSTQUOTE, CURLOPT_WRITEINFO,
51 CURLOPT_VERBOSE, CURLOPT_HEADER, CURLOPT_NOPROGRESS, CURLOPT_NOBODY,
52 CURLOPT_FAILONERROR, CURLOPT_UPLOAD, CURLOPT_POST, CURLOPT_FTPLISTONLY,
53 CURLOPT_FTPAPPEND, CURLOPT_NETRC, CURLOPT_FOLLOWLOCATION,
54 CURLOPT_TRANSFERTEXT, CURLOPT_PUT, CURLOPT_PROGRESSFUNCTION,
55 CURLOPT_PROGRESSDATA, CURLOPT_AUTOREFERER, CURLOPT_PROXYPORT,
56 CURLOPT_POSTFIELDSIZE, CURLOPT_HTTPPROXYTUNNEL, CURLOPT_INTERFACE,
57 CURLOPT_KRB4LEVEL, CURLOPT_SSL_VERIFYPEER, CURLOPT_CAINFO,
58 CURLOPT_MAXREDIRS, CURLOPT_FILETIME, CURLOPT_TELNETOPTIONS,
59 CURLOPT_MAXCONNECTS, CURLOPT_CLOSEPOLICY, CURLOPT_FRESH_CONNECT,
60 CURLOPT_FORBID_REUSE, CURLOPT_RANDOM_FILE, CURLOPT_EGDSOCKET,
61 CURLOPT_CONNECTTIMEOUT, CURLOPT_HEADERFUNCTION, CURLOPT_HTTPGET,
62 CURLOPT_SSL_VERIFYHOST, CURLOPT_COOKIEJAR, CURLOPT_SSL_CIPHER_LIST,
63 CURLOPT_HTTP_VERSION, CURLOPT_FTP_USE_EPSV, CURLOPT_SSLCERTTYPE,
64 CURLOPT_SSLKEY, CURLOPT_SSLKEYTYPE, CURLOPT_SSLENGINE,
65 CURLOPT_SSLENGINE_DEFAULT, CURLOPT_DNS_USE_GLOBAL_CACHE,
66 CURLOPT_DNS_CACHE_TIMEOUT, CURLOPT_PREQUOTE, CURLOPT_DEBUGFUNCTION,
67 CURLOPT_DEBUGDATA, CURLOPT_COOKIESESSION, CURLOPT_CAPATH,
68 CURLOPT_BUFFERSIZE, CURLOPT_NOSIGNAL, CURLOPT_SHARE,
69 CURLOPT_PROXYTYPE, CURLOPT_ENCODING, CURLOPT_PRIVATE, CURLOPT_HTTP200ALIASES,
70 CURLOPT_UNRESTRICTED_AUTH, CURLOPT_FTP_USE_EPRT, CURLOPT_HTTPAUTH,
71 CURLOPT_FTP_CREATE_MISSING_DIRS, CURLOPT_PROXYAUTH,
72 CURLOPT_FTP_RESPONSE_TIMEOUT, CURLOPT_IPRESOLVE, CURLOPT_MAXFILESIZE,
73 CURLOPT_INFILESIZE_LARGE, CURLOPT_RESUME_FROM_LARGE,
74 CURLOPT_MAXFILESIZE_LARGE, CURLOPT_NETRC_FILE, CURLOPT_FTP_SSL,
75 CURLOPT_POSTFIELDSIZE_LARGE, CURLOPT_TCP_NODELAY, CURLOPT_FTPSSLAUTH,
76 CURLOPT_IOCTLFUNCTION, CURLOPT_FTP_ACCOUNT, CURLOPT_COOKIELIST,
77 CURLOPT_IGNORE_CONTENT_LENGTH, CURLOPT_FTP_SKIP_PASV_IP,
78 CURLOPT_FTP_FILEMETHOD, CURLOPT_LOCALPORT, CURLOPT_LOCALPORTRANGE,
79 CURLOPT_CONNECT_ONLY, CURLOPT_MAX_SEND_SPEED_LARGE,
80 CURLOPT_MAX_RECV_SPEED_LARGE, CURLOPT_FTP_ALTERNATIVE_TO_USER,
81 CURLOPT_SSL_SESSIONID_CACHE, CURLOPT_SSH_AUTH_TYPES,
82 CURLOPT_SSH_PUBLIC_KEYFILE, CURLOPT_SSH_PRIVATE_KEYFILE,
83 CURLOPT_FTP_SSL_CCC, CURLOPT_TIMEOUT_MS, CURLOPT_CONNECTTIMEOUT_MS,
84 CURLOPT_HTTP_TRANSFER_DECODING, CURLOPT_HTTP_CONTENT_DECODING,
85 CURLOPT_NEW_FILE_PERMS, CURLOPT_NEW_DIRECTORY_PERMS, CURLOPT_POST301,
86 CURLOPT_SSH_HOST_PUBLIC_KEY_MD5, CURLOPT_COPYPOSTFIELDS,
87 CURLOPT_PROXY_TRANSFER_MODE, CURLOPT_SEEKFUNCTION, CURLOPT_OPENSOCKETFUNCTION,
88 CURLOPT_PROTOCOLS, CURLOPT_REDIR_PROTOCOLS, CURLOPT_RESOLVE, CURLOPT_DNS_SERVERS,
90 CURLINFO_EFFECTIVE_URL, CURLINFO_RESPONSE_CODE, CURLINFO_TOTAL_TIME,
91 CURLINFO_NAMELOOKUP_TIME, CURLINFO_CONNECT_TIME, CURLINFO_PRETRANSFER_TIME,
92 CURLINFO_SIZE_UPLOAD, CURLINFO_SIZE_DOWNLOAD, CURLINFO_SPEED_DOWNLOAD,
93 CURLINFO_SPEED_UPLOAD, CURLINFO_HEADER_SIZE, CURLINFO_REQUEST_SIZE,
94 CURLINFO_SSL_VERIFYRESULT, CURLINFO_FILETIME, CURLINFO_CONTENT_LENGTH_DOWNLOAD,
95 CURLINFO_CONTENT_LENGTH_UPLOAD, CURLINFO_STARTTRANSFER_TIME,
96 CURLINFO_CONTENT_TYPE, CURLINFO_REDIRECT_TIME, CURLINFO_REDIRECT_COUNT,
97 CURLINFO_PRIVATE, CURLINFO_HTTP_CONNECTCODE, CURLINFO_HTTPAUTH_AVAIL,
98 CURLINFO_PROXYAUTH_AVAIL, CURLINFO_OS_ERRNO, CURLINFO_NUM_CONNECTS,
99 CURLINFO_SSL_ENGINES, CURLINFO_COOKIELIST, CURLINFO_LASTSOCKET,
100 CURLINFO_FTP_ENTRY_PATH, CURLINFO_REDIRECT_URL, CURLINFO_PRIMARY_IP,
101 CURLINFO_LOCAL_IP, CURLINFO_LOCAL_PORT, CURLINFO_CONDITION_UNMET,
103 CURLE_UNSUPPORTED_PROTOCOL, CURLE_FAILED_INIT, CURLE_URL_MALFORMAT,
104 CURLE_URL_MALFORMAT_USER, CURLE_COULDNT_RESOLVE_PROXY,
105 CURLE_COULDNT_RESOLVE_HOST, CURLE_COULDNT_CONNECT,
106 CURLE_FTP_WEIRD_SERVER_REPLY, CURLE_FTP_ACCESS_DENIED,
107 CURLE_FTP_USER_PASSWORD_INCORRECT, CURLE_FTP_WEIRD_PASS_REPLY,
108 CURLE_FTP_WEIRD_USER_REPLY, CURLE_FTP_WEIRD_PASV_REPLY,
109 CURLE_FTP_WEIRD_227_FORMAT, CURLE_FTP_CANT_GET_HOST, CURLE_FTP_CANT_RECONNECT,
110 CURLE_FTP_COULDNT_SET_BINARY, CURLE_PARTIAL_FILE, CURLE_FTP_COULDNT_RETR_FILE,
111 CURLE_FTP_WRITE_ERROR, CURLE_FTP_QUOTE_ERROR, CURLE_HTTP_RETURNED_ERROR,
112 CURLE_WRITE_ERROR, CURLE_MALFORMAT_USER, CURLE_FTP_COULDNT_STOR_FILE,
113 CURLE_READ_ERROR, CURLE_OUT_OF_MEMORY, CURLE_OPERATION_TIMEOUTED,
114 CURLE_FTP_COULDNT_SET_ASCII, CURLE_FTP_PORT_FAILED, CURLE_FTP_COULDNT_USE_REST,
115 CURLE_FTP_COULDNT_GET_SIZE, CURLE_HTTP_RANGE_ERROR, CURLE_HTTP_POST_ERROR,
116 CURLE_SSL_CONNECT_ERROR, CURLE_BAD_DOWNLOAD_RESUME,
117 CURLE_FILE_COULDNT_READ_FILE, CURLE_LDAP_CANNOT_BIND, CURLE_LDAP_SEARCH_FAILED,
118 CURLE_LIBRARY_NOT_FOUND, CURLE_FUNCTION_NOT_FOUND, CURLE_ABORTED_BY_CALLBACK,
119 CURLE_BAD_FUNCTION_ARGUMENT, CURLE_BAD_CALLING_ORDER, CURLE_INTERFACE_FAILED,
120 CURLE_BAD_PASSWORD_ENTERED, CURLE_TOO_MANY_REDIRECTS,
121 CURLE_UNKNOWN_TELNET_OPTION, CURLE_TELNET_OPTION_SYNTAX,
122 CURLE_SSL_PEER_CERTIFICATE, CURLE_GOT_NOTHING, CURLE_SSL_ENGINE_NOTFOUND,
123 CURLE_SSL_ENGINE_SETFAILED, CURLE_SEND_ERROR, CURLE_RECV_ERROR,
124 CURLE_SHARE_IN_USE, CURLE_SSL_CERTPROBLEM, CURLE_SSL_CIPHER, CURLE_SSL_CACERT,
125 CURLE_BAD_CONTENT_ENCODING, CURLE_LDAP_INVALID_URL, CURLE_FILESIZE_EXCEEDED,
126 CURLE_FTP_SSL_FAILED, CURLE_SEND_FAIL_REWIND, CURLE_SSL_ENGINE_INITFAILED,
127 CURLE_LOGIN_DENIED, CURLE_TFTP_NOTFOUND, CURLE_TFTP_PERM,
128 CURLE_REMOTE_DISK_FULL, CURLE_TFTP_ILLEGAL, CURLE_TFTP_UNKNOWNID,
129 CURLE_REMOTE_FILE_EXISTS, CURLE_TFTP_NOSUCHUSER, CURLE_CONV_FAILED,
130 CURLE_CONV_REQD, CURLE_SSL_CACERT_BADFILE, CURLE_REMOTE_FILE_NOT_FOUND,
131 CURLE_SSH, CURLE_SSL_SHUTDOWN_FAILED, CURLE_AGAIN,
133 CURL_VERSION_TLSAUTH_SRP, CURL_VERSION_NTLM_WB],
134 [], [],
136 #include "curl/curl.h"
139 AC_CONFIG_HEADERS(config.h)
140 AC_CONFIG_FILES([Makefile examples/Makefile])
142 AC_OUTPUT